;

PDA

Click to See Complete Forum and Search --> : Rollover button is sticky!


omegacore
07-09-2008, 12:25 PM
So I have this flash button I'm making, I wanted a consistent animation so I wrote a bit of actionscript to manage the animation.

This button animation is 5 frames to the button up position and 5 frames back to the regular button position.

The idea behind the code is to collect the current frame from the movie clip and then jump to "the other side" of the animation.

For example, say you rollover the movie at frame 1, and then rolloff at frame 3. The code changes your timeline position to frame 7 and finishes the clip.

Code:

on (rollOver) {
playframe = this._currentframe;
gotoAndPlay(playframe);
}
on (rollOut) {
playframe = this._currentframe;
gotoAndPlay(10 - playframe);
}

The problem is that the button is sticky sometimes, and stays in the up position when you roll your mouse over it. I want the button to be flawless so how can I improve this method?

The button file is attached

thanks!

omegacore
07-10-2008, 11:37 AM
OK. So I had to sit around and really hammer out this thing... and so I did... It took forever, and lots of hair, but I finally got it. If anyone wants the file just post and I'll reply with the file.