Change button color

falcondesign

Born

Posts: 3

3+ Months Ago

I have a set of buttons that laod a .swf. Now i want, after you press that button and it loads that .swf for that corresponding button to change color so that the user knows which one they clicked. And then when you click on the others it would do the same. Is this possible?

I figure its probaby some actionscript coding that i am not advanced enough to do yet. Any feedback would be most apprecaited! Thank you

D

joebert

Fart Bubbles

Posts: 13506

Loc: Florida

3+ Months Ago

Are you using the component button that comes with flash or a custom button ?

If you're using the components then take a look in,
Window > Reference (shift + F1)
In the - Flash UI components > FStyleFormat - Book.

If it's a custom button you need to have an instanceName on the part of the button you want to change color, & attach a color object to it.

If your button has a background mC named "bg" you would edit the mC & on the timeline have,

When a button is pressed that lastClicked variable is pointing to a color object which is attached to a movieClip, the if statement just checks that a button has been pressed at least once.

falcondesign

Born

Posts: 3

3+ Months Ago

you said this: "When a button is pressed that lastClicked variable is pointing to a color object which is attached to a movieClip, the if statement just checks that a button has been pressed at least once."

But i was wondering if you could do it to the button itself without attaching color objects to movie clips cause i'm not too familiar with doing that?

joebert

Fart Bubbles

Posts: 13506

Loc: Florida

3+ Months Ago

Well.. You could create two movieclips for everything you want to have change color & swap out _visible properties with them. The global variable pointing to the lastClicked would still apply.