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 Chriss Miller 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
Joined
Oct 26, 2002
Messages
267
Location
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.



 
are you also using setFormat for the textfield instance
 
Thanks, Bill but

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

works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top