Featured FLA
» Author: Nitin Tikhe
» Title: Cart
» Description: This Animation Tut is a fun and useful for kids below 15 years. Watch the Flag, Doors, Stick and Horse movements.
» More by Nitin Tikhe
Featured Site
» Posted in the Flash Kit Links section
» Title: Banana Swimwear
» Description: This is a banana swim wear interactive catalog we designed and animated in Flash
Loading the pictures or objects from an XML file
So here is the heart of all of this. You will need to create a simple xml file with the “pointers” to your picture locations.
XML.prototype.ignoreWhite = true;
//ignores the white bit bellow the picture
load_xml= function()
//calls a function that loads xml files
{
var myXML = new XML();
//instantiates the space for a xml variable
myXML.load("pointers.xml");
//loads a xml file called pointers.xml
myXML.onLoad = function(success)
{
if(success)
{
read_xml(this);
load_pictures(0);
return;
}
//in case of success loading flash will load to your picture array pictures stored where the
//pointers point to, so where are they? That’s what the xml file will tell flash
trace("error!");
}
}
//else it just keeps an error log to know what happened.