# Animated buttons

**URL:** https://forum.kirupa.com/t/animated-buttons/961
**Category:** flash
**Created:** [August 4, 2002, 10:47pm UTC](https://forum.kirupa.com/t/animated-buttons/961 "2002-08-04T22:47:30Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Sw0L\_z](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Sw0L\_z](https://forum.kirupa.com/u/Sw0L_z)
#### Post date: [August 4, 2002, 10:47pm UTC](https://forum.kirupa.com/t/animated-buttons/961/1 "2002-08-04T22:47:30Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 4, 2002, 10:56pm UTC](https://forum.kirupa.com/t/animated-buttons/961/2 "2002-08-04T22:56:43Z")

</div>

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

```auto

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!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 4, 2002, 11:13pm UTC](https://forum.kirupa.com/t/animated-buttons/961/3 "2002-08-04T23:13:26Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2002, 2:18am UTC](https://forum.kirupa.com/t/animated-buttons/961/4 "2002-08-05T02:18:58Z")

</div>

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. 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2002, 2:35am UTC](https://forum.kirupa.com/t/animated-buttons/961/5 "2002-08-05T02:35:43Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2002, 2:45am UTC](https://forum.kirupa.com/t/animated-buttons/961/6 "2002-08-05T02:45:24Z")

</div>

sure! Instead of:

```auto

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

```

You will do:

```auto

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

```

Cool. Huh?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2002, 3:06am UTC](https://forum.kirupa.com/t/animated-buttons/961/7 "2002-08-05T03:06:21Z")

</div>

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!
