I have a flash piece with all of the text loaded dynamically through xml. I also have several versions of the same xml translated into different languages (Russian, Japanese ect). Using this loading method, or others if one is better than the next, how do I set a variable to load in the specific xml for the specific site.
Other words: Five different site versions, five different xml, using only the one flash file, as opposed to a different flash piece for every different xml… The Flash piece is unchanging except for the xml that is fed in. Is this possible and have I confused you?
Any input and or direction is as always greatly appreciated.
import flash.net.URLLoader;
import flash.net.URLRequest;
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest("CalloutContent.xml"));
function LoadXML(e:Event):void {
trace("LoadXML");
xmlData = new XML(e.target.data);
ParseContent(xmlData);
}
function ParseContent(contentInput:XML):void {
trace("ParseContent this is the first header");
toolHeader.htmlText = contentInput.callout.tool;
}