Flash AS2 XML to Array

var xmlDoc:XML = new XML();
System.useCodepage = true;
xmlDoc.ignoreWhite = true;

xmlDoc.onLoad = function(ok:Boolean) {
if (ok) {
} else {
trace(“XML did not load”);


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;


<?xml version=”1.0″ encoding=”ISO-8859-1″ standalone=”yes”?>
<ITEM image=”image1.jpg” />
<ITEM image=”image2.jpg” />
<ITEM image=”image3.jpg” />
<ITEM image=”image4.jpg” />

thanks http://www.webdeveloper.com/forum/showthread.php?t=72067

Join the Conversation


  1. I have been exploring for a little bit for any high quality articles or weblog posts on this sort of space . Exploring in Yahoo I finally stumbled upon this site. Studying this information So i’m satisfied to show that I have a very just right uncanny feeling I came upon just what I needed. I such a lot undoubtedly will make sure to don?t omit this website and provides it a look on a continuing basis.

Leave a comment