Jump to content

[SOLVED] Flash embed ??


Distant_storm

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
Share on other sites

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.