Photo Gallery in AS3

So I need/want to design a photo gallery for actionscript 3.

However, getting it to work is an issue, due to my lack of knowledge and the lack of any tutorials for AS3.

I have used a combination of the AS3 XML tutorial and the MX2004 Photogallery tutorial to try to get it to work, but honestly I don’t really know what I am doing. I have read both, and while my XML is loaded correctly (I can trace it), I can’t get it to be called by anything.

You probably don’t want to see my code (ITS SOOO BAD), but here it is anyways.

var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
 
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
 
xmlLoader.load(new URLRequest("images.xml"));

function LoadXML(e:Event):void {

xmlData = new XML(e.target.data);
       if (Event.COMPLETE) {
firstImage(xmlData);}
else { trace("wtf");}
}

function firstImage(imagesInput:XML):void {
    var captionList:XMLList = imagesInput.pic;
    this.picture.load(new URLRequest("imagesInput.pic.image.text()[0]");
}


Right now all I want is for the ‘picture’ movieclip to be filled with the first image.

The AS is all on the main frame, and the only other thing in the file is the movieclip (with the instance name ‘picture’) mentioned above.

I don’t mean to be obnoxious, but please help me :3
~Overshee