PDA

View Full Version : rollover works only in 1 frame not after animation?


wfz
07-29-2008, 02:53 AM
I think I miss some fundamental understanding on the AS. This standard rollover screen works fine before but won't after an animation is finsihed.

rv1.onRollOver = function() {
txt1._x = 185;
txt1._y = 131;
};
rv1.onRollOut = function() {
txt1._x = -1000;
txt1._y = -1000;
};

rv2.onRollOver = function() {
txt2._x = 185;
txt2._y = 131;
};
rv2.onRollOut = function() {
txt2._x = -1000;
txt2._y = -1000;
};

...


See attached FLA. If you delete all the frames before the last frame, the the rollover script would work. I can't see why the script won't work in this situation.

BTW, How can simplify my script. Is there a way to repeat the function so I don't have to repeat the same rv1, rv2, rv3, etc and txt1, txt2, txt3, etc.

Thanks for your help,

wfz

wfz
07-29-2008, 02:56 AM
file attached. THANKS!