A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Rollover button is sticky!

  1. #1
    Junior Member
    Join Date
    Sep 2006
    Posts
    9

    Rollover button is sticky!

    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!
    Attached Files Attached Files

  2. #2
    Junior Member
    Join Date
    Sep 2006
    Posts
    9
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center