can anyone shine a little light onto a little confusion I am having, I have a menu that already loads in images via an XML file on a menu, what I am trying to do is when an image/meni Item is click I would like to load in an swf into the same place as the image Item loads into! am I making any sense.
on a click event, do I use in the XML file the link to swf ????
this is what I have in my xml file that loads in the images so far;
title=”Lorem ipsum 12″
text=”Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo 12″ />
what I am getting confused with is what I also put within the AS, I am sure it is not alot but I'm just not sure what needs to go where??
this is what I have within the AS that loads in XML, I hope its ok to paste this code, never like posting to much code incase is scares people off, I just don't want to leave anything out, hope thats ok with everyone
// Use URLLoader to load XML
xmlLoader = new URLLoader();
xmlLoader.dataFormat = URLLoaderDataFormat.TEXT;
// Listen for the complete event
xmlLoader.addEventListener(Event.COMPLETE, onXMLComplete);
xmlLoader.load(new URLRequest(“data.xml”));
private function onXMLComplete(event:Event):void
{
// Create an XML Object from loaded data
var data:XML = new XML(xmlLoader.data);
// Now we can parse it
var images:XMLList = data.image;
for(var i:int = 0; i < images.length(); i++)
{
// Get info from XML node
var imageName:String = images[i].@name;
var imagePath:String = images[i].@path;
var titles:String = images[i].@title;
var texts:String = images[i].@text;
// Load images using standard Loader
var loader:Loader = new Loader();