...

View Full Version : dynamic yes/no in flash/php



ziggy1621
02-26-2008, 05:55 PM
i'm looking for a tutorial that will help me design a flash list that changes to a GREEN yes or RED no depending on what PHP sends to it. Right now, php is just sending a YES or NO.

Then once all are yes, the background will change from red to green.

any help appreciated,
David

_Aerospace_Eng_
02-26-2008, 06:00 PM
So what is the problem? Getting flash to read what PHP sends?

ziggy1621
02-26-2008, 06:09 PM
getting flash to make YES display in red and NO display in green.. I can have them displayed from php, then have flash change the background to green when all are yes

thanks

_Aerospace_Eng_
02-26-2008, 06:27 PM
Okay so the YES/NO is in a dynamic text field correct? If so you can do something like this

var str:String = 'NO'; /* this is the value you get from php */
instancename.text = (str == 'YES') ? 'YES' : 'NO';
instancename.textColor = (str == 'YES') ? 0xFF0000 : 0x008000;

ziggy1621
02-26-2008, 06:41 PM
Okay so the YES/NO is in a dynamic text field correct? If so you can do something like this

var str:String = 'NO'; /* this is the value you get from php */
instancename.text = (str == 'YES') ? 'YES' : 'NO';
instancename.textColor = (str == 'YES') ? 0xFF0000 : 0x008000;


makes sense, then I guess I could make a variable that if all='YES' then backgroundInstanceName=green. I'll give it a run. Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum