- Messages
- 1,682
- Reaction score
- 32
- Points
- 48
Code:
var xmlDoc:XML = new XML();
System.useCodepage = true;
xmlDoc.ignoreWhite = true;
xmlDoc.onLoad = function(ok:Boolean) {
if (ok) {
doMenu(this);
} else {
trace("XML did not load");
}
};
xmlDoc.load("myImages.xml");
function doMenu(xml:XML) {
var num:Number = xml.firstChild.childNodes.length;
pics = new Array();
for (var i = 0; i < num; i++) {
pics[i] = xml.firstChild.childNodes[i].attributes.image;
}
trace(pics);
}
Code:
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<MENU>
<ITEM image="image1.jpg" />
<ITEM image="image2.jpg" />
<ITEM image="image3.jpg" />
<ITEM image="image4.jpg" />
</MENU>
can someone explain to me what the actionscript means?