XML and Preloader

Hi there guys,

I have an XML object that loads all the necessary info to their respective places.

My problem is, i would like to create preloaders for the images, and I am using the movieClipLoader class. I have tried to declare a global variable outside the XML object, but this does not seem to work. Any help would be appreciated.



import com.mosesSupposes.fuse.*;
ZigoEngine.simpleSetup( Shortcuts, PennerEasing, Fuse );

_global.pic1;

pic1Holder_mc._alpha = 0;

var teaser_xml:XML = new XML();
teaser_xml.ignoreWhite = true;
teaser_xml.onLoad = function(success){
	if(success){
		//****//heading and summaries for specific stories//****//
		//These are the main headlines and sub summaries for the
		//top story section of the teaser.
		heading1 = teaser_xml.firstChild.firstChild.firstChild.firstChild.nodeValue;
		summary1 = teaser_xml.firstChild.firstChild.firstChild.nextSibling.firstChild.nodeValue;
		
		heading2 = teaser_xml.firstChild.firstChild.nextSibling.firstChild.firstChild.nodeValue;
		summary2 = teaser_xml.firstChild.firstChild.nextSibling.firstChild.nextSibling.firstChild.nodeValue;
		
		heading3 = teaser_xml.firstChild.firstChild.nextSibling.nextSibling.firstChild.firstChild.nodeValue;
		summary3 = teaser_xml.firstChild.firstChild.nextSibling.nextSibling.firstChild.nextSibling.firstChild.nodeValue;
		
		heading4 = teaser_xml.firstChild.firstChild.nextSibling.nextSibling.nextSibling.firstChild.firstChild.nodeValue;
		summary4 = teaser_xml.firstChild.firstChild.nextSibling.nextSibling.nextSibling.firstChild.nextSibling.firstChild.nodeValue;
		
		storyBG_mc.summaryTxt.text = summary1;
		storyBG_mc.headingTxt.text = heading1;
		
		storyBG1_mc.summaryTxt.text = summary2;
		storyBG1_mc.headingTxt.text = heading2;
		
		storyBG2_mc.summaryTxt.text = summary3;
		storyBG2_mc.headingTxt.text = heading3;
		
		storyBG3_mc.summaryTxt.text = summary4;
		storyBG3_mc.headingTxt.text = heading4;
		//****//This is the end of the headings and summaries being loaded//****//
		
		
		//****//Loading Images//****//
		pic1 = teaser_xml.firstChild.firstChild.firstChild.nextSibling.nextSibling.firstChild
		pic1Holder_mc.loadMovie(pic1);
		return pic1;
		
		pic2 = teaser_xml.firstChild.firstChild.nextSibling.firstChild.nextSibling.nextSibling.firstChild
		pic2Holder_mc.loadMovie(pic2);
		
		//trace(pic2);
		
	
	}
}
teaser_xml.load("teaser.xml");

var loader:MovieClipLoader = new MovieClipLoader();
		loader.addListener(this);
		function onLoadInit(placeholder_mc:MovieClip) {
			pic1Holder_mc.alphaTo(100,1,"easeOutExpo");
		}
		function onLoadProgress(placeholder_mc:MovieClip, loaded:Number, total:Number) {
			var percent:Number = Math.floor(loaded/total*100);
			loader1_mc.pic1Loaded.text = "Pic1 " + percent;
		}
loader.loadClip(pic1, pic1Holder_mc);