View Full Version : Using a variable in the Generator set tint

03-08-2001, 03:43 PM
I'm trying to use a 3 variables to set the tint of a movie clip by typing the variable names in the red green and blue fields. it doesn't seem to work (i guess it doesn't recognize it as an integer). So i guess my question is how do i solve this? is there a way to convert the variable through flash5 actionscript? or perhaps i'm approaching this wrong.

03-09-2001, 04:03 AM
Do you mean you have a variable called 'color1' which has the value "FF3300" and you want to be able to enter "color1" in a text field and have your object's color change to FF3300?

If that's what you're after you could use code like this (adapated from Macromedia's ActionScript Reference example)

on (release) {
c = new Color(mcName);
c.setRGB(parseInt(color1, 16));

This would make the clip witht he instance name 'mcName' change color to FF3300 (a nice reddy color)



03-09-2001, 01:42 PM
Thank you for your help it is not what i meant but anyway is started working now. i think i'm encountering a lot of stupid bugs in genereator, do you know where can i find known bugs?