Moderator’s note: Moved to Howto.
This question may be related to a resolved thread.
I’ve fed a fair share of EE-generated XML files to Flash before, but I finally hit a wall on one and I can’t for the life of me figure out why this movie will only read a “real” (i.e. physical) XML file and not the one I’m outputting with EE.
The only different things about this instance is I’m using SWFObject 2.0 (latest) and the Actionscript for the Flash is kept as an external .as file.
We have a flash file, that I’m putting onto the page with SWFObject, like so:
var flashvars = {};
flashvars.xmlPath = "/_xml/home.xml";
var params = {};
params.play = "true";
params.loop = "true";
params.menu = "true";
params.quality = "high";
params.scale = "showall";
params.wmode = "transparent";
params.devicefont = "false";
params.allowfullscreen = "false";
params.allowscriptaccess = "always";
var attributes = {};
attributes.align = "middle";
attributes.id = "index";
attributes.name = "index";
swfobject.embedSWF("index.swf", "flashSplash", "900", "503", "8.0.0", false, flashvars, params, attributes);The XML path we’re passing is to a hard-coded XML file (properly formed, I checked) that is in the “_xml” directory. This works perfectly.
I made a new EE template called “home_xml” in my “site” template group, set the type to XML, and just copied all the data from the original file into it (baby steps, baby steps…). If I go to that EE XML page in a browser, it looks exactly like the hardcoded XML page they sent me. I then changed the flashvar to a number of different things, none of which worked:
flashvars.xmlPath = "/site/home_xml/";
flashvars.xmlPath = "{path=site/home_xml}";
flashvars.xmlPath = "site/home_xml/";The flash will simply not pick up this XML path and use the data from it!
I’m wondering if this may be a SWFObject 2 issue? Maybe I’m passing the variable wrong (though I don’t think so, as it works with a physical file). Or maybe I need to do something different with my EE XML file? I’m at a loss on this one.