# ActionScripted Button With Color Fade (Hard)Question

**URL:** https://forum.kirupa.com/t/actionscripted-button-with-color-fade-hard-question/2697
**Category:** flash
**Created:** [May 7, 2002, 7:54pm UTC](https://forum.kirupa.com/t/actionscripted-button-with-color-fade-hard-question/2697 "2002-05-07T19:54:52Z")
**Posts on this page:** 9
**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: [May 7, 2002, 7:54pm UTC](https://forum.kirupa.com/t/actionscripted-button-with-color-fade-hard-question/2697/1 "2002-05-07T19:54:52Z")

</div>

Hello, This is my first post here and it my be a hard one to understand?\r\rOverview----------------------------------\r\rI have four buttons on the main stage (info) (help) (bio) (main)\r\rWhen you Rollover a button it fades to another color/when you rollout it fades back to the original color\r\rI have a script that does the color change because I do not want to use motion tweens.\r\rHere is what I did------------------------\r\rI made a 2 frame MC named infoMC\r\rIn the 1st frame of the MC I made the word (info) a nested MC and attached the color change code to it.\r\r\r\rThe 2nd frame of the MC Is the same as the 1st frame but I revesed the color change\r\r\r\rBoth frames have stops in them\rThe first frame is labeled “over”\rThe second frame is labeled “up”\r\r---------------------------------------------------------\rA button on the main targets the infoMC\r\r\r\r\r???\rNow to my question \r\rDo I have to do this to every button?\rIs there a way to reuse this script for all the buttons?\r\rI would like to find a better way to do this because the file size jumps up everytime I make a new 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: [May 7, 2002, 8:14pm UTC](https://forum.kirupa.com/t/actionscripted-button-with-color-fade-hard-question/2697/2 "2002-05-07T20:14:21Z")

</div>

you could possibley try tweening the colour fade?

---

<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: [May 7, 2002, 8:24pm UTC](https://forum.kirupa.com/t/actionscripted-button-with-color-fade-hard-question/2697/3 "2002-05-07T20:24:31Z")

</div>

lobstars I am not using motion tweens thanks anyway.

---

<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: [May 7, 2002, 9:26pm UTC](https://forum.kirupa.com/t/actionscripted-button-with-color-fade-hard-question/2697/4 "2002-05-07T21:26:05Z")

</div>

Well… you might be able to do it with a function… but why would you not do it with tweens IF it saves file size?

---

<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: [May 7, 2002, 9:34pm UTC](https://forum.kirupa.com/t/actionscripted-button-with-color-fade-hard-question/2697/5 "2002-05-07T21:34:48Z")

</div>

-I want to use textfields\r-tweening textfield can get messy\r-I like the feel of a actionscripted color change over a tweened one.

---

<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: [May 8, 2002, 2:42am UTC](https://forum.kirupa.com/t/actionscripted-button-with-color-fade-hard-question/2697/6 "2002-05-08T02:42:40Z")

</div>

This Forum should be called Flash Tweening

---

<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: [May 8, 2002, 2:55am UTC](https://forum.kirupa.com/t/actionscripted-button-with-color-fade-hard-question/2697/7 "2002-05-08T02:55:34Z")

</div>

I think upu said it. Put the script into a function, and put the function in the main timeline and then just call the function from 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: [May 8, 2002, 5:22am UTC](https://forum.kirupa.com/t/actionscripted-button-with-color-fade-hard-question/2697/8 "2002-05-08T05:22:39Z")

</div>

Thank you upuaut8 and Jabba I’m reading about them right now if you know of any examples out thereplease let me know…

---

<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: [May 8, 2002, 7:00am UTC](https://forum.kirupa.com/t/actionscripted-button-with-color-fade-hard-question/2697/9 "2002-05-08T07:00:04Z")

</div>

What is your color change code? If I had that I could probebly work out the function for you.
