Freid001 Posted September 8, 2010 Share Posted September 8, 2010 Hi everyone I am trying to pass a php variable ($R1 = 1) in to action script flash 8. After this variable is in flash 8 I want the action script to do a if statement that says if the php variable is = 1 then display layer or object. However i am not sure how to do this any help would be great thanks Freid001 PS if this is not possible to do with php and action script please say thanks Link to comment https://forums.phpfreaks.com/topic/212898-php-to-action-script-help/ Share on other sites More sharing options...
son.of.the.morning Posted September 8, 2010 Share Posted September 8, 2010 load the vars in to a dynamic text box give the text box a var name, then use an if statment like you normaly would. Link to comment https://forums.phpfreaks.com/topic/212898-php-to-action-script-help/#findComment-1108881 Share on other sites More sharing options...
son.of.the.morning Posted September 8, 2010 Share Posted September 8, 2010 Maybe i didn’t explain my self so well, 1.firstly you will have to create a dynamic text field (make sure you name the variable on it , example myVar). 2. select the dynamic text box and convert it to a movieClip (F8). 3. add the following actions to the moiveClip.... onClipEvent (load) { loadVariables("your-vars.php", this, "GET"); } 4. Create a your php file and put inside the following php code... Action script would interpt php varibles but $var will still be printed. <?php $var = "as-php"; print $var; print "myVar=$var"; ?> Actionscript will recognize myVar and put the $var value inside you dynamic text box providing that the text box was the correct variable name. 5. now you have the value of your php var inside your text box your ready to put in an if statement If (myVar eq”as-php”) { getURL(‘’); } else { getURL(‘’); } don’t no what you are going to do with the if statement so that’s just an example. Link to comment https://forums.phpfreaks.com/topic/212898-php-to-action-script-help/#findComment-1108895 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.