Forum Moderators: open

Message Too Old, No Replies

Changing Colors in Flah WITHOUT Buttons

ActionScript problems

         

Brickface

12:24 am on Oct 15, 2005 (gmt 0)



I'm having a lot of problems learning ActionScript, and have exhausted the tutorials and dictionary entries that I've found.

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.

Richard_N

11:44 pm on Oct 15, 2005 (gmt 0)



loadVariablesNum("variables.php", 0);
var myColor = new Color(This_Is_The_Movie_Instance);
myColor.setRGB("0xffffff");

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");
}