Forum Moderators: open
I have a Flash movie wherein I want an element to change color based on a variable recieved from a .php file and then, a few frames later, change to a color stated explicitly in the code.
My php script generates "&color=0x000000" (without the quotes), and running in debug mode, the variable is indeed being imported into global without any problems.
The following code works:
loadVariablesNum("variables.php", 0);
var myColor = new Color(This_Is_The_Movie_Instance);
myColor.setRGB(color);
The movie changes color nicely.
A few frames later, I have this code:
loadVariablesNum("variables.php", 0);
var myColor = new Color(This_Is_The_Movie_Instance);
myColor.setRGB("0xffffff");
What I want it to do, is change the movie to the color "000000", but it doesn't do anything... can anyone help me find out why?
Any suggestions would be very helpful.
OK quick look may be wrong, why do you have the first line as your referencing a local variable?
would not this or something like it do it?
onEnterFrame = function(){
var myNewColor = new Color(This_Is_The_Movie_Instance);
myNewColor.setRGB("0xffffff");
}