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!

Link to comment
Share on other sites

  • 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>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.