Thauwa Posted April 6, 2009 Share Posted April 6, 2009 I have a page called do.php, and it displays records when url is like, view.php?id=2 I have a flash document in which I need to load mysql data from an XML file, which too singles out data in the above way (ex:id=2). So I need to get the 'id' value from the url to the actionscript, which loads data from the XML. The flash object is to be in 'view.php', but data loaded from xml.php (php file with XML content). Both should have the same ids. So, all I need to know is how I can get the ID value from view.php and use it in the flash doc. to get data from xml.php. Here is the flash actionscript code: myData.load("xml.php?id=ID FROM VIEW.PHP"); Thank you all very much in advance, because I was struggling to have this problem fixed, and I know that one of you all can help me! Quote Link to comment https://forums.phpfreaks.com/topic/152742-solved-_get-ting-php-page-url-into-flash-actionscript-is-it-possible/ Share on other sites More sharing options...
chelnov63 Posted April 14, 2009 Share Posted April 14, 2009 embed your flash object using swfobject ..it is very easy to pass querystring parameters to flash then: http://blog.deconcept.com/swfobject/#examples e.g <script type="text/javascript"> var so = new SWFObject("movie.swf", "mymovie", "400", "200", "8", "#336699"); so.addVariable("variable1", getQueryParamValue("variable1")); so.addVariable("variable2", getQueryParamValue("variable2")); so.write("flashcontent"); </script> Quote Link to comment https://forums.phpfreaks.com/topic/152742-solved-_get-ting-php-page-url-into-flash-actionscript-is-it-possible/#findComment-809496 Share on other sites More sharing options...
Thauwa Posted April 14, 2009 Author Share Posted April 14, 2009 Thank you very much. I used a very similar method, FlashVars! It was easy and simple. Thanks all for the support! Quote Link to comment https://forums.phpfreaks.com/topic/152742-solved-_get-ting-php-page-url-into-flash-actionscript-is-it-possible/#findComment-809867 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.