Smal flash question/ Flash button help!

When creating animated buttons, i cant seem to make a button that animates on rollover and then plays an animation when clicked.
Not playing an animation elsewhere, but just a “clicked” animation on the button itself…



Just having some trouble creating abutton that anim’s during scrollover and also anim’s when clicked… the scroll over anim part is no problem i just cant seem to create a button that anim’s when clicked.
thnx a ton.


i rarely use buttons, so is a bit hard to remember, but can’t you put a movieClip with the animation in the downstate of your button?

//do something}

on(press, release){
//do something else}

Just write different functions for the different button states. Or do what sintax suggested.


thnx guys.
i tired tossin the button anim into the downstate but to no avail.

Can you post an example of what you are trying to do?

if your using a button, you can’t (easily) have a clicked animation. the best way to do that is with a MC.


im tryin to make a similar nav to this site.
i just cant gethe button to do what i want when its depressed.

forinstance, i just want the button to even stay a certain color once depressed.
or play an anim…

or even in this site. enter the tour directly>
in the nav how the button plays an anim whne depreesed.

thanks alot.

Please don’t double-post :wink:

If you could post an example in the other thread you started I can try to help.


this is the nav im working on…

thnx for the help.

Rollovers look good. What would you like to happen when the button is released? Do you want text to appear? Do you want some kind of animation to appear in the button itself? Outside the button?



my goal was to have an anim play in the button itself… once depressed.

thnx alot.

Here’s what you do:


Intead, create MovieClips that behave like buttons. That way, you have more control and can create some really awesome effects.

Then, once you have your faux-button you add this:

myButtonMC.onPress = function() {

I can attach an FLA if it’d help, but it’s all very, very basic ActionScript. :geek:

Hey thnx.
i tried actionscripting it up as well.
if its possible attach up an fla… that would probably help me tons.

Yep, that’s exactly it. You can give movie clips button behaviors but also added functionality since every movie clip has its own timeline. So you can give a frame a label like “over” and then another frame a label of “hit”. Then you can have different things going on at those frames - one is an your button that is a different color, the other is an animation that starts and stops.

Your actionscript would be:

myMovieClip.onRollover = function(){

myMovieClip.onRelease = function(){

does that make sense?


I always use a MC as my buttons. But I’m pretty this would work:

Keyframe your down and hit inside your button. Put the animation you want in those frames and it will animate.

This is also in the wrong section to post this, should be in one of the flash sections.

yes thank you dearly.
ill see if i can get it working.

i have merged and moved the two threads into mx2004 forum.

as lunatic said , please dont double post and keep all flash related question in the flash forums.