# Smal flash question/ Flash button help!

**URL:** <https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572>\
**Category:** Uncategorized\
**Created:** [July 28, 2004, 3:01pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572 "2004-07-28T15:01:22Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alejandro\_d](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@Alejandro\_d](https://forum.kirupa.com/u/Alejandro_d)\
**Post date:** [July 28, 2004, 3:01pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572/1 "2004-07-28T15:01:22Z")

</div>

Helo,  
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…

thnx…

---

<div class="post-metadata">

**Author:** ![Alejandro\_d](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@Alejandro\_d](https://forum.kirupa.com/u/Alejandro_d)\
**Post date:** [July 28, 2004, 3:05pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572/2 "2004-07-28T15:05:05Z")

</div>

Helo,

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.

A

---

<div class="post-metadata">

**Author:** ![sintax](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@sintax](https://forum.kirupa.com/u/sintax)\
**Post date:** [July 28, 2004, 3:08pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572/3 "2004-07-28T15:08:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![lunatic](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@lunatic](https://forum.kirupa.com/u/lunatic)\
**Post date:** [July 28, 2004, 3:11pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572/4 "2004-07-28T15:11:51Z")

</div>

on(rollover){  
//do something}

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

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

:hr:

---

<div class="post-metadata">

**Author:** ![Alejandro\_d](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@Alejandro\_d](https://forum.kirupa.com/u/Alejandro_d)\
**Post date:** [July 28, 2004, 3:13pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572/5 "2004-07-28T15:13:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lunatic](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@lunatic](https://forum.kirupa.com/u/lunatic)\
**Post date:** [July 28, 2004, 3:14pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572/6 "2004-07-28T15:14:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bodyvisual](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bodyvisual/32/564_2.png) [@bodyvisual](https://forum.kirupa.com/u/bodyvisual)\
**Post date:** [July 28, 2004, 3:25pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572/7 "2004-07-28T15:25:59Z")

</div>

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

:p:

---

<div class="post-metadata">

**Author:** ![Alejandro\_d](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@Alejandro\_d](https://forum.kirupa.com/u/Alejandro_d)\
**Post date:** [July 28, 2004, 3:27pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572/8 "2004-07-28T15:27:02Z")

</div>

im tryin to make a similar nav to this site.  
i just cant gethe button to do what i want when its depressed.  
[http://www.liquidintelligence.com/](http://www.liquidintelligence.com/)

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.  
[http://www.orbik.com/dell/](http://www.orbik.com/dell/)#

thanks alot.

---

<div class="post-metadata">

**Author:** ![lunatic](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@lunatic](https://forum.kirupa.com/u/lunatic)\
**Post date:** [July 28, 2004, 3:27pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572/9 "2004-07-28T15:27:26Z")

</div>

Please don’t double-post 😉

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

:hr:

---

<div class="post-metadata">

**Author:** ![Alejandro\_d](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@Alejandro\_d](https://forum.kirupa.com/u/Alejandro_d)\
**Post date:** [July 28, 2004, 3:31pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572/10 "2004-07-28T15:31:33Z")

</div>

this is the nav im working on…

[http://www.precisiongroupmedia.com/nav.html](http://www.precisiongroupmedia.com/nav.html)

thnx for the help.

---

<div class="post-metadata">

**Author:** ![lunatic](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@lunatic](https://forum.kirupa.com/u/lunatic)\
**Post date:** [July 28, 2004, 3:41pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572/11 "2004-07-28T15:41:08Z")

</div>

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?

:hr:

---

<div class="post-metadata">

**Author:** ![Alejandro\_d](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@Alejandro\_d](https://forum.kirupa.com/u/Alejandro_d)\
**Post date:** [July 28, 2004, 3:53pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572/12 "2004-07-28T15:53:21Z")

</div>

Sorry,

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

thnx alot.

---

<div class="post-metadata">

**Author:** ![newhopekenny](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/newhopekenny/32/317_2.png) [@newhopekenny](https://forum.kirupa.com/u/newhopekenny)\
**Post date:** [July 28, 2004, 4:11pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572/13 "2004-07-28T16:11:48Z")

</div>

Here’s what you do:

NEVER MAKE BUTTONS USING FLASH’S BUILT-IN BUTTON CLASS.

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:

```auto
myButtonMC.onPress = function() {
this.gotoAndPlay("mouseDown");
}

```

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

---

<div class="post-metadata">

**Author:** ![Alejandro\_d](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@Alejandro\_d](https://forum.kirupa.com/u/Alejandro_d)\
**Post date:** [July 28, 2004, 4:15pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572/14 "2004-07-28T16:15:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lunatic](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@lunatic](https://forum.kirupa.com/u/lunatic)\
**Post date:** [July 28, 2004, 4:17pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572/15 "2004-07-28T16:17:40Z")

</div>

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:

```auto

myMovieClip.onRollover = function(){
gotoAndPlay("over");
}

myMovieClip.onRelease = function(){
gotoAndPlay("hit");
}

```

does that make sense?

:hr:

---

<div class="post-metadata">

**Author:** ![simplistik](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/simplistik/32/7747_2.png) [@simplistik](https://forum.kirupa.com/u/simplistik)\
**Post date:** [July 28, 2004, 4:34pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572/16 "2004-07-28T16:34:22Z")

</div>

> [@bodyvisual](#):
>
> if your using a button, you can’t (easily) have a clicked animation. the best way to do that is with a MC.
> 
> :p:

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.

---

<div class="post-metadata">

**Author:** ![Alejandro\_d](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@Alejandro\_d](https://forum.kirupa.com/u/Alejandro_d)\
**Post date:** [July 28, 2004, 4:39pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572/17 "2004-07-28T16:39:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![soulty](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/soulty/32/105_2.png) [@soulty](https://forum.kirupa.com/u/soulty)\
**Post date:** [July 28, 2004, 5:46pm UTC](https://forum.kirupa.com/t/smal-flash-question-flash-button-help/117572/18 "2004-07-28T17:46:42Z")

</div>

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.

thanks.  
.soulty
