Freid001 Posted September 3, 2010 Share Posted September 3, 2010 Hi every. I am trying to pass a php variable ($R1 = 1) in to flash 8 action script however im not sure how to do this? $R1 = 1 Any help would be great! Also when in flash how do I get the action script to pick up the php variable $R1 = 1? Thanks :confused: Link to comment https://forums.phpfreaks.com/topic/212467-php-variables-to-flash-action-script-help-please/ Share on other sites More sharing options...
ricmetal Posted September 12, 2010 Share Posted September 12, 2010 from php echo an urlencoded line to send to flash like following echo "varNameForFlashToPickUp=".rawurlencode($phpVariable).""; //if that doesn't work, add a & before 'varNameForFlashToPickUp' from within flash use the LoadVars method to load variables into flash var phpVariables:LoadVars = new LoadVars(); phpVariables.onLoad = function(){ trace(phpVariables.varNameForFlashToPickUp); } phpVariables.load("phpFile.php"); the rawurlencode funtion in php is used to make sure that all special characters like $ don't mess with the rest of the code flash automatically decodes Link to comment https://forums.phpfreaks.com/topic/212467-php-variables-to-flash-action-script-help-please/#findComment-1110181 Share on other sites More sharing options...
Freid001 Posted September 18, 2010 Author Share Posted September 18, 2010 Thanks Link to comment https://forums.phpfreaks.com/topic/212467-php-variables-to-flash-action-script-help-please/#findComment-1112399 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.