Jump to content

Recommended Posts

You can easily pass in different XML documents via the query string as you would in some PHP pages. You would have something like this if you were loading a static XML document (my_document.xml):

var my_xml = new XML();
my_xml.onLoad = function(success)
{
  if (success)
  {
    trace(this);
  }
}

my_xml.load("my_document.xml");
trace(my_xml);

 

Then, if you wanted to make that document dynamically passed in via the query string, you would set a variable in your param movie tag (also in your embed tag if you are using embed) like this:

<param name="movie" value="myflashmovie.swf?xmldoc=myxmldoc.xml" />

 

You can pick up those query string values from the root within your flash document, so your XML actionscript may change to something like this:

my_xml.load(_root.xmldoc);
trace(my_xml);

 

Hope that helps some.

Link to comment
https://forums.phpfreaks.com/topic/78222-solved-flash-embed/#findComment-395851
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.