Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Color from database not working...

Status
Not open for further replies.

mancroft

Programmer
Oct 26, 2002
267
GB
Color from database not working...

Color stored in mySQL as 0xFF0000

0xFF0000 hauled into Flash via PHP and LoadVars

trace(myData.maintxtcolor); shows 0xFF0000

Trying to change text color:
Code:
myFormat_fmt= new TextFormat();
myFormat_fmt.color = myData.maintxtcolor;
etcetera...

REFUSES TO CHANGE COLOR.

Now, I know that the following works
Code:
myFormat_fmt= new TextFormat();
myFormat_fmt.color = 0xFF0000;

So the question is:

Why won't 0xFF0000 when hauled in from the database work?

Thank you.



 
Thanks, Bill but

myFormat_fmt.color = (parseInt((myData.maintxtcolor), 16 ));

works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top