I have done this before and I lost my files. Im trying again I want to only load a simple image using xml in flash.
Its basic I made a movie clip and called it “picture” and then I created a layer and called it actions and in the actions layer I added the code I made and learned from Kirupas tutorial. But the image do not show up.
Im using 2 images witch are a .jpg format
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<images>
<img>cent.jpg</img>
<img>cent2.jpg</img>
</images>
////
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image* = xmlNode.childNodes*;
}
loadImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("myData.xml");
////////////////////////////////////////////////
function loadImage() {
picture.loadMovie(image[1], 1);
}
Im just mad I cannot get this simple thing going.