Jump to content

[SOLVED] $_GET ting PHP page url into flash actionscript. Is it possible?


Thauwa

Recommended Posts

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!

  • 2 weeks later...

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>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.