# Macromedia buttons

**URL:** <https://forum.kirupa.com/t/macromedia-buttons/5465>\
**Category:** Uncategorized\
**Created:** [September 12, 2002, 4:54am UTC](https://forum.kirupa.com/t/macromedia-buttons/5465 "2002-09-12T04:54:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DDD](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@DDD](https://forum.kirupa.com/u/DDD)\
**Post date:** [September 12, 2002, 4:54am UTC](https://forum.kirupa.com/t/macromedia-buttons/5465/1 "2002-09-12T04:54:57Z")

</div>

Does anyone know how macromedia created those cool fade in buttons?? I know this is something I should know but I cannot get it to act right. If someone has a snippet they could post I would greatly appreciate it. I think I got it to work but I wanna achieve it with AS. 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:** [September 12, 2002, 5:28am UTC](https://forum.kirupa.com/t/macromedia-buttons/5465/2 "2002-09-12T05:28:00Z")

</div>

Heres a small blank menu I did based on one I saw on the net. It’s very easy to do. In this example the fade occurs when you rollout, but you can change the tweening so it occurs when you roll over. There’s an MX and Flash 5 version in the zip

---

<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:** [September 12, 2002, 12:05pm UTC](https://forum.kirupa.com/t/macromedia-buttons/5465/3 "2002-09-12T12:05:07Z")

</div>

I appreciate it. BUt this is similar to what I came up with. In macromedias button it fades in and fades out. Also if you mouseover a buttton and mouseout before it achieves its full fade in it will actually fade back out from the point it stopped which leads me to believe that it is acionscript driven. This is the part I was unable to recreate. But your menus do work better than the one I came up with so thanks:) But if someone knows the AS behind that button I would greatly appreciate a nudge in the right direction.

---

<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:** [September 12, 2002, 12:09pm UTC](https://forum.kirupa.com/t/macromedia-buttons/5465/4 "2002-09-12T12:09:31Z")

</div>

I know what you mean. You use a variable that checks to see whether the full fade has been achieved. If so then the button will fade again, otherwise it will not fade out, or in until the previous fade has been completed. Is that clear? It’s done with actionscript but is just a matter of a variables. If I have time I’ll post a fla.

In the mean time see if this helps

[http://www.echoecho.com/flashbuttons.htm](http://www.echoecho.com/flashbuttons.htm)

---

<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:** [September 12, 2002, 12:17pm UTC](https://forum.kirupa.com/t/macromedia-buttons/5465/5 "2002-09-12T12:17:59Z")

</div>

Are you using Flash MX, 3D? Cos if you are it’s really simple (sorry if this is redundant with Flex’s link). You could write something like this in the \_root, if you have a movie clip called _myButton_:

```auto
function fadeIn(){
    this._alpha+=5;
    // it can be any value
    if (this._alpha>=100) this.onEnterFrame=null;
};
function fadeOut(){
    this._alpha-=5;
    if (this._alpha<0) this.onEnterFrame=null;
};
myButton.onRollOver=function(){
    this.onEnterFrame=fadeIn;
}
myButton.onRollOut=function(){
    this.onEnterFrame=fadeOut;
}

```

This is called dynamic event handlers (see in the AS tricks section), and works only with MX. With Flash 5 you can do it too but it’s painful.

pom :asian:

---

<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:** [September 12, 2002, 1:48pm UTC](https://forum.kirupa.com/t/macromedia-buttons/5465/6 "2002-09-12T13:48:32Z")

</div>

Yes I am using MX this is just what i was looking for. Dynamic Event Handling huh…DOH!!!..now something else I have to learn. Hey thanks guys …flex if you could post a .fla I would love it but I think you guys have given me enought to work with.

---

<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:** [September 12, 2002, 2:04pm UTC](https://forum.kirupa.com/t/macromedia-buttons/5465/7 "2002-09-12T14:04:50Z")

</div>

It’s very intuitive, you’ll see. And it’s explained in the AS section. [SIZE=1]I love self-promotion…[/SIZE] 🙂
