Animated buttons

Ok i havent tried to do this yet but im gonna be getting to it this week so i thought i might get some input on my task.
What I would like to do is when my buttons are pressed i want a animation to be triggered…
im thinking of using actionscript… maybe gotoAndPlay(); ??? im not sure. its been the gotoAndPlay /gotoAndStop that are confusing me…
If anyone could maybe give me the code i would use or maybe a link to a tutorial on it for FLASH MX! that would be great.

Animated Buttons! For Flash MX! please help.

Look for tutorials on Tell Target. A basic Tell Target button will look like this


on (release) {
    tellTarget ("yourMC") {
        gotoAndPlay(1);
    }
}

Be sure to have an instance of yourMC on the movie for this to work

BTW, yourMC = your movie clip (the instance name of your movie clip)

It usually helps to create a movie clip, but have its first frame be blank and with a stop() action. that way you can drag it ANYWHERE on the scene without it being seen. then use gotoAndPlay(2) to run the animation.

Hope this helps!

I attached a .zip file with a cheesy example of what I mean. My example shows how to trigger an animation. You can use Tell Target in many ways with buttons. Be sure to check out the example.

Just in case you don’t use Flash MX I included a readme.txt file that tells you the code for each button and for the movieClip.

I hope this helps too!

Hello fellas! No offense, but since he was looking for FlashMX tutorials or examples, I will say that TellTarget has been deprecated and will not likely be supported in the future. Now you’re supposed to use dot syntax.

Just FYI… that’s all. :slight_smile:

I am kinda new at this AS stuff, so I didn’t really know that. It is definitly a great thing to know. It definitely explains why Tell Target is so hard to find in Flash MX.

Can you tell me how to do it in dot syntax?

sure! Instead of:


on (release) {
    tellTarget ("yourMC") {
        gotoAndPlay(1);
    }
}

You will do:


on(release){
  yourmc.gotoAndPlay(1);
}

Cool. Huh?

Man do I waste time…hahaha. DOT SINTAX IS SO MUCH EASIER!

Thanks Iammontoya, this will definitely save me some time and make things much easier for me to learn.

Hey Sw0L|z*,

I recommend this method too!