Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

would someone help with button animation?

Status
Not open for further replies.

mpaone12

Technical User
Oct 15, 2000
13
US
hey, i'm a begginer with flash and not much of a web developer (only 16) but i have a question with animation for a button i'm working on. it's a pretty simple concept.
for the up state it is at 60% transparency, and for the over state i made it a movie clip so that it fades in to 100% transparency. but once the mouse is removed, it quickly goes back to 60% and it looks sloppy. is there a way that when the mouse is moved off the button i can have it fade back down to 60% slowly without the quick jump? i'd appreciate any feedback =) thanks again [sig][/sig]
 
Set up a new movie with a tween command or just slow the speed down. [sig][/sig]
 
Hi,

Dude, dont put yourself down with your age! Heck, I bet you most of these web designers would want to have started web design at 16 like us (I'm 16 aswell - started programming at 12) so dont beat yourself up about it - you have an advantage over all these old farts (no offense to anyone over 16 :). This is a hard question for anyone who starts at Flash, heck this question had me stumped for a while too. This is how I would do it:

Make a Movieclip (now referred to as MC) and keep your button.

First edit your Movieclip. In frame one have the picture at 60% transparency and the Stop actionscript. Insert a keyframe at frame 10 and change the Alpha to 100%. Insert a Stop Action here aswell. Now at frame 20 put another keyframe and change the Alpha to 60% again. Don't put a Stop Action in here though. Insert Motion Tweens inbetween frames 0-10 and 10-20.

Now edit that button. Hit F6 with the Hit Frame selected. In frames Up, Over and Down, delete everything. But in the Hit frame leave the image to create a Hotspot.

Go back to your Main Scene (Scene 1 by default). You will notice the button turned aqua. Double Click on the movieclip first and call the instance MC. Then doubleclick the button and Add this Actionscript:
On (Roll Over)
Begin Tell Target ("/mc")
Play
End Tell Target
End On
On (Roll Out)
Begin Tell Target ("/mc")
Play
End Tell Target
End On
Position the aqua button infront of the MC and test the movie.

Hope that helps, [sig]<p>Napalm 2000<br><a href=mailto:hlechler@hotmail.com>hlechler@hotmail.com</a><br><a href= 2000's Domain</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top