How can i exchange a filename/url (like "XMLtoLoad") by a more general variable?

Hi there,

I have the following question:

How can i load a dynamic xml, i.e. the .xml file that will be generated automatically and thus gets different names.

I want flash to “listen” to a variable “file”, that is “file” represents the name of the xml-file to load. Like showXml.swf?file=abcd1234.xml

btw i don’t exactly use the xml extension so it becomes showXml.swf?file=abcd1234

I using a general name = “XMLtoLoad” to load my xml.
My AS right now is somthing like:
[AS]
file = XMLtoLoad;

_root.xmlDocument.load(“XMLtoLoad”);

[/AS]

In short how can i exchange a filename/url (like “XMLtoLoad”) by a more general variable?

Or maybe i should ask how can i convert the name after “?file=” to a URL within AS

Grtz,
keitai

[AS]file = “XMLtoLoad”;

_root.xmlDocument.load(file);[/AS]?

Let me try to explain myself better.


file = "XMLtoLoad";

_root.xmlDocument.load(file);


where file=abc1234 (see showXml.swf?file=abcd1234.xml) so in the end it must read



_root.xmlDocument.load("abcd1234.xml");


I personally think i must convert the value of file to a string/text. But i don’t know how. I have tried


file = (abcd1234).toString();
trace (file);

But it doesn’t work.

Any more suggestions?