1. Upload your SWF and XML files
2. Add a new Flash Embed block
3. Select the SWF file on the first tab
4. Select the XML file on the second tab
Done!
If you need to edit the XML, you can do so from the file manager, or you can even do it from inside the block. Go to the second tab, click the XML file and select "Edit"
The XML editor includes color highlighting, and also includes shortcuts so you can browse for files or pages in the file manager or sitemap, and it will drop in the links for you.
The big thing you would need to do is make sure that your Flash supports a "flashvar" for the path to its XML file. It's possible to workaround a Flash file that has a hard-coded path, but its way easier when it isn't.
In AS2, the code would look something like this:
var xmlPath = _root.xml;
(load the XML);
If "xml" conflicts with other variables in the SWF, you can also use a different variable name ... just make it match on the second tab of the Flash Embed block.
In AS3, the code would look like this:
var xmlPath:String = stage.loaderInfo.parameters.xml;
The variables won't conflict in AS3, so you should be safe to use the default "xml" variable name. If the Flash file doesn't already support a variable like this, you can use this snippet of code, and replace a hard coded path (like "MyXML.xml") with xmlPath instead
Wow! Great answer! Thanks for your time. I think I'll go with the Pretty URL approach you offered in my other thread, for now. But I'd like to work this into my future applications.
Thanks again!
Issue Reply
concrete5 Environment Information
Browser User-Agent String
Hide Post Content
This will replace the post content with the message: "Content has been removed by an Administrator"
1. Upload your SWF and XML files
2. Add a new Flash Embed block
3. Select the SWF file on the first tab
4. Select the XML file on the second tab
Done!
If you need to edit the XML, you can do so from the file manager, or you can even do it from inside the block. Go to the second tab, click the XML file and select "Edit"
The XML editor includes color highlighting, and also includes shortcuts so you can browse for files or pages in the file manager or sitemap, and it will drop in the links for you.
The big thing you would need to do is make sure that your Flash supports a "flashvar" for the path to its XML file. It's possible to workaround a Flash file that has a hard-coded path, but its way easier when it isn't.
In AS2, the code would look something like this:
var xmlPath = _root.xml;
(load the XML);
If "xml" conflicts with other variables in the SWF, you can also use a different variable name ... just make it match on the second tab of the Flash Embed block.
In AS3, the code would look like this:
var xmlPath:String = stage.loaderInfo.parameters.xml;
The variables won't conflict in AS3, so you should be safe to use the default "xml" variable name. If the Flash file doesn't already support a variable like this, you can use this snippet of code, and replace a hard coded path (like "MyXML.xml") with xmlPath instead