# Simple ( For you guys )

**URL:** <https://forum.kirupa.com/t/simple-for-you-guys/2356>\
**Category:** flash\
**Created:** [April 15, 2002, 5:26pm UTC](https://forum.kirupa.com/t/simple-for-you-guys/2356 "2002-04-15T17:26:23Z")\
**Posts on this page:** 11\
**Page:** 1

<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:** [April 15, 2002, 5:26pm UTC](https://forum.kirupa.com/t/simple-for-you-guys/2356/1 "2002-04-15T17:26:23Z")

</div>

Hey guys how are ya ??

So I made a button and i got some animation in it when you go over it.  
but the animation is about a sec long and you proberly don’t keep the mouse a second long on the button

SO how do you keep the animation going when the mouse is off the button

sorry if this is 2 simple for you guys 😃

Verbal Violence

---

<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:** [April 15, 2002, 5:37pm UTC](https://forum.kirupa.com/t/simple-for-you-guys/2356/2 "2002-04-15T17:37:34Z")

</div>

if the annimation is only about a second long then it will only play for a second. If you make it longer than a second and turn it in to an mc then on the “over state” it should play the whole mc. I could be wrong though.  
Jubba help this dude out, comeon!

---

<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:** [April 15, 2002, 5:41pm UTC](https://forum.kirupa.com/t/simple-for-you-guys/2356/3 "2002-04-15T17:41:49Z")

</div>

It’s already a MC ( movie clip right ??)  
but it just stops when you go of the button, so that doesn’t 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:** [April 15, 2002, 5:50pm UTC](https://forum.kirupa.com/t/simple-for-you-guys/2356/4 "2002-04-15T17:50:21Z")

</div>

Im slightly confused.

Do you want the button to always play the animation? If so, you would turn the animation into a button, instead of just putting animation in the rollover state of the button.

---

<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:** [April 15, 2002, 5:51pm UTC](https://forum.kirupa.com/t/simple-for-you-guys/2356/5 "2002-04-15T17:51:35Z")

</div>

are you using action script? and yes mc = movie clip

---

<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:** [April 15, 2002, 5:56pm UTC](https://forum.kirupa.com/t/simple-for-you-guys/2356/6 "2002-04-15T17:56:56Z")

</div>

Iammontoya:  
No i only want it 2 play when you go over the button and play it once  
and it’s starts 2 play again after 2 go over it again and stops when the animation is done

Iobstar  
Nope no action script  
I’m not that good with flash,  
only thing i can do with action script is load a frame but that’s it  
( and the stuff i copy from [Kirupa.com](http://Kirupa.com) )

Verbal Violence

---

<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:** [April 15, 2002, 11:40pm UTC](https://forum.kirupa.com/t/simple-for-you-guys/2356/7 "2002-04-15T23:40:20Z")

</div>

Alright, here we go.

… wait, I just wrote a big long answer and realised I was wasting my time.

All you have to do for what you want is put this action in the button that activates the movie clip (If you want the movie clip to act as the button you can hide the button behind the background or put the button in the movie clip or whatever.)

tellTarget (whatever) {  
play ();  
}

and make sure that on frame 1 of the movie clip there’s a

stop ();

action.

---

<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:** [April 16, 2002, 1:16am UTC](https://forum.kirupa.com/t/simple-for-you-guys/2356/8 "2002-04-16T01:16:53Z")

</div>

What I do is make my button…then i put this as its action:

on (rollOver) {  
\_root.animation1.gotoAndPlay(2);  
}  
on (rollOut) {  
\_root.animation1.gotoAndStop(1);  
}

…then I go to “Insert\>New Symbol” then I set it as Movie Clip and name it, then I make my animation. I have 3 layers.  
First Layer–  
First KeyFrame: stop()  
Last KeyFrame: gotoAndPlay (2);

Second Layer–  
After Tween(if you have one) stop()  
If you dont have a tween just set the last Keyframe but over Frame 3’s last keyframe to: stop()

Third Layer–  
Just make whatever animation you want in the keyframes…but keep it one keyframe behind the First Frames last Keyframe(lol if that is understandable)…

Then I open up my library(Ctrl+L)and and then drag and drop my animation and line it up where I want it around the button. Then click on the animation and then go to “Window\>Panels\>Instance”…and then i name it(for this example) “animation1”…then it should play after you rollover the button…and stop once you rollout…hope it helps(although it may be very confusing) 😉

---

<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:** [April 16, 2002, 12:16pm UTC](https://forum.kirupa.com/t/simple-for-you-guys/2356/9 "2002-04-16T12:16:39Z")

</div>

wow it helped  
tnx guys

---

<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:** [April 17, 2002, 1:24am UTC](https://forum.kirupa.com/t/simple-for-you-guys/2356/10 "2002-04-17T01:24:22Z")

</div>

you’re welcome…need anymore help…just ask 😉

---

<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:** [April 17, 2002, 12:39pm UTC](https://forum.kirupa.com/t/simple-for-you-guys/2356/11 "2002-04-17T12:39:33Z")

</div>

Good explination guys…

There are also some good posts covering these basics of movie button interaction in both the tutorial section of [www.Kirupa.com](http://www.Kirupa.com) and in the “best of Kirupa” below. Take a look around and I’ll bet you’ll have all your answers very quickly. Be sure to look for my explination there on invisible buttons. Easy to make, reuse, and cost effective both in k, and in processor speed. 🙂
