Tutorial: Flash buttons with rollover animations
Wednesday, November 17th, 2010
It’s been a while since I’ve done any flash design. Every time I’m tasked with doing something in Flash I feel like I’m relearning what I’ve forgotten. Things that should be easy are a pain in the ass. Here’s a fine example, and maybe it will save you a headache if you get lucky and google sends you to this page.
Have you ever created a button in flash and you wanted the over state to activate an animation that occurs somewhere else on the stage other than the location of the button? If you answered no, I can guarantee the first time you try it you’re in for a surprise.
So you make a button. When you roll over it displays short animation or some text… not directly on the button, but off to the side somewhere else on the stage.
Simple enough right? Just ad a movie clip containing your animation to the onRollover frame of the button.
Uh oh… something isn’t right. If you happen to roll over where the animation shows up on the stage, it springs to life, even though you didn’t roll over the button! WTF!?
The problem is incredibly simple to fix. Click your way in to edit the movie clip containing your animation for the onRollover state. Like any logical human you probably started your animation on frame 1. WRONG! BAD! Your animation needs to begin on FRAME 2 and then everything works just how you’d like! Just remember, any animation on an over state of a button needs to start on frame 2, otherwise the animation starts if it is rolled over, and not the button

