View Full Version : functions for colour
allie
05-07-2002, 10:26 AM
I'm trying to create a function that will enable me to change the colour of any movie clip to red on calling this function. I'm trying and failing miserably - so far I've managed to change everything red! Can anyone help me, pretty please?
pinkaboo
05-07-2002, 11:45 AM
hmm, set your function on the main time line:
function colourChange(clip) {
myColor = new Color(clip);
myColorTransform = new Object();
myColorTransform.ra = 254;
myColorTransform.ga = 22;
myColorTransform.ba = 22;
myColor.setTransform(myColorTransform);
}
and then call it using:
_root.colourChange(target_instance_here);
pinkaboo
05-07-2002, 11:52 AM
or...
function colourChange(clip) {
myColor = new Color(clip);
mycolor.setRGB(0xff0000)
}
and again,
_root.colourChange(target_instance_here);
so if you just want _root.changeMyColour to go red you would write:
_root.colourChange(_root.changeMyColour);
:) Does that help? Fit in with what you want?
allie
05-07-2002, 02:17 PM
Brilliant thankyou princess. Long may your reign continue!
pinkaboo
05-07-2002, 09:19 PM
no problem :) glad to help
if (kiss == true && girl == princess) {
this.frog = prince;
} else {
trace ("ribbit!");
}
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.