Okay I have searched the forum for loading an simple image into flash using xml, and some have not been answered.
I simply got a jpg image and want to load it in a movie clip called (pic)
ActionScript code:>>>
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
}
loadImage();
} else {
trace("file not loaded!");
}
}
//Load Image
function loadImage() {
if (loaded == filesize) {
pic._alpha = 0;
pic.loadMovie(image[0], 1);
}
}
//Load your xml file to be showed up
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.load("images.xml");
<<<
and xml code file images.xml
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>50.jpg</image>
</pic>
</images>