|
-
Colouring... Help
Hello,
I have the following code
Code:
myColor = new Color (this.snow);
myColor.setRGB(0xff0000);
now that code works create BUT in a text file I have a varible
&scolour=0xff0000
now flash knows the value, because I have tested it with the trace function and it shows "0xff0000".
now what I want is to use that varible "scolour" rather than hard coding it. but the following doesnot work.
Code:
myColor = new Color (this.snow);
myColor.setRGB(scolour);
any ideas anyone, im sure its very simple I just cant get it working!
Thanks
Andrew
-
Flash Gordon
When you load it, flash thinks this Color is a String,
so you would have to put:
scolour=parseInt(scolour);
in before using it as a Number.
BUT: The Color-Object is deprecated since Flash8!
Try testing around with the ColourTransform Object
-
thats great thnx alot for the answer and the fast reply
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|