# Fades in and out animated buttons

**URL:** <https://forum.kirupa.com/t/fades-in-and-out-animated-buttons/5014>\
**Category:** Uncategorized\
**Created:** [August 28, 2002, 8:08pm UTC](https://forum.kirupa.com/t/fades-in-and-out-animated-buttons/5014 "2002-08-28T20:08:47Z")\
**Posts on this page:** 5\
**Page:** 2

<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 5, 2002, 6:34am UTC](https://forum.kirupa.com/t/fades-in-and-out-animated-buttons/5014/21 "2002-09-05T06:34:36Z")

</div>

This is called a callback function, or a dynamic event handler. There’s something about it in the AS tricks section. And to answer your question, onRollOver **is** the name of the function.

OK, now concerning Lost code: Are you applying this to every button? I don’t understand. And secondly, you redefine the functions on EnterFrame, and each button will redefine its own function on EnterFrame, which is not a very good idea. Or maybe I didn’t understand you code.

pom

---

<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 5, 2002, 6:39am UTC](https://forum.kirupa.com/t/fades-in-and-out-animated-buttons/5014/22 "2002-09-05T06:39:29Z")

</div>

My code was just an example of how to use the function().

It served no purpose in the task at hand. I doubt that even works at all, I was just using it to show how a user can add a …dynamic variable(?, the word isn’t coming to mind).

---

<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 5, 2002, 6:43am UTC](https://forum.kirupa.com/t/fades-in-and-out-animated-buttons/5014/23 "2002-09-05T06:43:20Z")

</div>

😛 I was talking about the code you posted before…

pom 🙂

---

<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 5, 2002, 6:47am UTC](https://forum.kirupa.com/t/fades-in-and-out-animated-buttons/5014/24 "2002-09-05T06:47:37Z")

</div>

OH, I am such a dunce.

I applied the actions to every button (which were actually movie clips). I didn’t spend much time on it, just copied and pasted what you had and changed a few things around a little. Didn’t really think to scope it out.

---

<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 5, 2002, 6:55am UTC](https://forum.kirupa.com/t/fades-in-and-out-animated-buttons/5014/25 "2002-09-05T06:55:17Z")

</div>

Just in case…

pom 🙂

[Previous page](https://forum.kirupa.com/t/fades-in-and-out-animated-buttons/5014.md?page=1)
