A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [F8] Rewinding a button animation

  1. #1
    wiggle your jiggle TrytoAnimate's Avatar
    Join Date
    Sep 2000
    Location
    Rhode Island, USA
    Posts
    149

    [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!
    Attached Files Attached Files
    Last edited by TrytoAnimate; 02-01-2007 at 09:33 PM.

  2. #2

  3. #3
    Member
    Join Date
    Mar 2002
    Location
    Hollywood, CA
    Posts
    50
    Quote Originally Posted by austriaman
    Attached file should do the job. It's pretty much self-explanatory.
    aut.
    Thank YOU. Finally a solution I've been looking for.
    Eric

  4. #4

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