1 Attachment(s)
[F8] Rewinding a button animation (Resolved)
I tried attaching the file to show you exactly what I'm trying to do, and see what I'm doing wrong... the .fla is just a really crude version of what I'm attempting. Basically, I have a button. When mousing over the button, the button will get bigger and a glow animation will begin behind it. Rather than have the effect simply stop on rollout, or if the button doesn't completely animate and have it begin a rollout animation starting from a completed state, I am trying to tell the animation inside the button in it's rollover state that on rollout I want it to rewind itself back to the beginning. I have the feeling though that I cannot actually do this inside a button, because after it rolls out, the rollover state won't be there anymore. So I'm GUESSING I have to do some kind of trick with an invisible button talking to a movie clip... but I'm kinda stumped. The code (which is obviously wrong, because I have it figured for a button and a clip within a button) on the main timeline looks something like this:
button.onRollOut = function() {
button_mc.gotoAndPlay(button_mc._currentframe-1);
}
I'm just wondering if I'm on the right track at all, and if anyone can enlighten me as to the proper way of doing this. I see it all the time so I'm guessing it's not that hard... I'm just stumped!
-Chris
Edit: Thanks so much for the help!