PDA

View Full Version : ActionScripted Button With Color Fade (Hard)Question



coastside
May 7th, 2002, 03:54 PM
Hello, This is my first post here and it my be a hard one to understand?

Overview----------------------------------

I have four buttons on the main stage (info) (help) (bio) (main)

When you Rollover a button it fades to another color/when you rollout it fades back to the original color

I have a script that does the color change because I do not want to use motion tweens.

Here is what I did------------------------

I made a 2 frame MC named infoMC

In the 1st frame of the MC I made the word (info) a nested MC and attached the color change code to it.



The 2nd frame of the MC Is the same as the 1st frame but I revesed the color change



Both frames have stops in them
The first frame is labeled "over"
The second frame is labeled "up"

---------------------------------------------------------
A button on the main targets the infoMC




????????????????????????
Now to my question

Do I have to do this to every button?
Is there a way to reuse this script for all the buttons?

I would like to find a better way to do this because the file size jumps up everytime I make a new button ! !!! !!!!!! !!!!!!!!!

lobstars
May 7th, 2002, 04:14 PM
you could possibley try tweening the colour fade?

coastside
May 7th, 2002, 04:24 PM
lobstars I am not using motion tweens thanks anyway.

upuaut8
May 7th, 2002, 05:26 PM
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?

coastside
May 7th, 2002, 05:34 PM
-I want to use textfields
-tweening textfield can get messy
-I like the feel of a actionscripted color change over a tweened one.

coastside
May 7th, 2002, 10:42 PM
This Forum should be called Flash Tweening

I am not Jubba
May 7th, 2002, 10:55 PM
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.

coastside
May 8th, 2002, 01:22 AM
Thank you upuaut8 and Jabba I'm reading about them right now if you know of any examples out thereplease let me know...

upuaut8
May 8th, 2002, 03:00 AM
What is your color change code? If I had that I could probebly work out the function for you.