Load image from XML into flash

I have a very simple question: How do I load one image from an XML file into a flash movie. Thats it, nothing fancy, just one image. Here is my XML

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>

    <news>
        <pic>http://www.mc2.com.ky/beta/cisc/images/navbar/spinnakers.jpg</pic>
    </news>

</images>

I have a basic flash movie with an empty movie clip on the stage labeled picture.

I’m whipping this out without really scrutinizing your xml. you may have to fiddle with the firstChild.firstChild etc. part to get it right but you should get the idea from this. also, check out senocular’s 40 page tute here on Kirupa. Hope this helps!


stop();
myXML=new XML();
myXML.onLoad=function(success){
if(success){
imageToLoad=myXML.firstChild.firstChild.firstChild.nodeValue;
picture.loadMovie(imageToLoad);
}
}
myXML.load("myXMLfile.xml");