PDA

View Full Version : MC. Colour!!



gllanci
October 12th, 2005, 04:33 PM
Hi Is there any maner so I can change a MC colour ( background ) for example in the 1st lint to have a red button then in the 2nd to have blue buttons!!


thnx
Gllanci

Barn
October 12th, 2005, 04:49 PM
Yes, it would involved nesting another movieclip inside, with a filled shape, and using either setRGB() or setTransform() to change the color of that nested movieclip. See the Actionscript Reference for information on those, under Color.setRGB() and Color.setTransform().

gllanci
October 12th, 2005, 05:10 PM
Yes!!

But How can I make a coupple of MC's to change in same time!!


on (release) {
color = new Color(_root.myMC);
color.setRGB(0x00FF00);
}

Barn
October 12th, 2005, 05:17 PM
A. You cannot use the word color as the name of a color object -- it is a reserved word.

B. You do not need to create a color object every time a button is pressed -- the object need only be created once. Subsequent setRGB() or setTransform() functions can be made upon the same object.


But How can I make a coupple of MC's to change in same time!!

What are the names of your movieclips? At what time do you want them to change? On a button press? When a certain frame on some timeline is reached? What's the name of the button? Does the button exist for the whole timeline? Does the button exist in the same timeline as the movieclips whose color you want to change?

In essence, you really haven't provided much of a specification for what you are trying to do.

VersusMG
October 12th, 2005, 05:44 PM
something like this might work



var b:Color = new Color(_root.myMc,_root.myMc2,_root.myMc3);

b.onRelease = function() {
b.setRGB(0x00FF00);
}

gllanci
October 12th, 2005, 06:03 PM
this:

var b:Color = new Color(_root.myMc,_root.myMc2,_root.myMc3);

b.onRelease = function() {
b.setRGB(0x00FF00);
}



dsnt' WORK!!!!
thnx a LOT!!

gllanci
October 12th, 2005, 06:06 PM
Hi

THE menu that Iam trying to change the color will stay allways on the buttom of the site!

So if there is possible to change a colore of button in any links please help me!

thnx

gllanci
October 12th, 2005, 06:52 PM
????

:(