Hi there,
I’m working on my portfolio site, and i wanted to use XML + Flash.
So i designed my flash file and AS my way to get my peice up and running.
I only have one problem, In my XML file im referring to an image as an attribute of a firstChild.; when i trace the attribute, the url of the file displays in the ouput. But i cant seem to use loadMive to display the image.
info = {ser: ser_txt, det: det_txt};
ser_txt.textColor =0xD6341A;
det_txt.textColor =0x747474;
function loadXML(loaded){
if(loaded){
_root.folio =
this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.client =
this.firstChild.childNodes[0].attributes;
_root.det =
this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
ser_txt.text = _root.folio;
//trace(_root.client.Is);
folio_mc.loadMovie(_root.client.Is);
det_txt.text = _root.det;
}else {trace("File Not Loaded")
};
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("file.xml");
The XML
<folio>
<client Is="Grom.jpg">
<ser>Grom</ser>
<det>Slayed from the giant one!</det>
</client>
</folio>
Can anyone point out what i should be doing to get it to display?