Simple buttons animations in Flash
kenyabob (303 pencils) | Wed, 2006-03-22 17:51I have terrible Google-fu, and consequently, I am unable to find the soltuion to my problem with traditional searching means. I have a simple question, which I bet requires a complicated solution.
I've got a button in flash, lets say its a circle. When the user is hovering over the circle, in a mouse over state, the circle expands to twice its regular size. When the user mouses off the button, the circle returns to normal.
Now, what I have is that animation, but I don't know how I can use action scripting to control that animation to coincide with the users mouse on and off states. Any ideas, slash .flas?
Commenting on this Forum topic is closed.

This guy seems to have the right idea, though I've no idea how he has done it. All I see in the scripting are stops.
http://www.actionscript.org/showMovie.php?id=1252
It's been a while since I've done any work in flash, but I think this is what you want to do.
1. Create a movie clip out of your animation.
2. Create a button out of your movie clip.
3. Double Click on the button to bring up the button frames
4. Copy your movie clip (should be in the 'Up' position)
5. Break apart your movie clip (apple + b while movie clip is selected)
6. 'Paste in place' your movie clip into 'Over' frame
7. Create your 'down' frame
8. Create your 'hit' frame
9. Go back to your main movie stage
10. publish preview in flash (buttons with animations will not show unless it's published)
That should be it. I've created a simple fla for you. Not sure where to post it. I can email it to you if you'd like... need address.
FYI. I'm 98% self taught in flash, there are 1001 ways to do everything in flash. Not sure if this solution is the best, but I've used it a million times.
sa
I would have gotten back to you sooner, but I was away on spring break. I actually played around with that process, and it worked pretty well. I also figured out that I could create a button, assign the action of mouseover and mouseout and make the two actions play the forward and reverse sequences of an animation. You can check it out here:
http://www.howcurio.us/stuff/curious.swf
One question I did have, which is unrelated, was whether or not a flash movie could be aware of what html page it was on, and then make decisions based off that. So, if it were on the index page it'd play animation one, and if it were on the about page it'd play animation two, but again, this is all one swf.