I am able to load my XML file into flash and trace results. Want to populate listbox with information from xml file.
Structure of xml file:
<eBorders>
<item>
<thumb>borderTh/blank_th.jpg</thumb>
<file>border/blank.jpg</file>
</item>
<item>
<thumb>borderTh/border1_th.jpg</thumb>
<file>border/border1.jpg</file>
</item>
</eBorders>
AS3 code:
var myLoader:URLLoader = new URLLoader();
myLoader.load(new URLRequest("xml/borders.xml"));
var dp:DataProvider = new DataProvider("borders.xml");
border_lb.dataProvider = dp;
border_lb.iconField = "iconSource";
border_lb.rowHeight = 45;
function processXML(e:Event):void {
myXML = new XML(e.target.data);
for(var i:int=0;i<myXML.*.length(); i++){
dp.addItem({iconSource:myXML.item.thumb.[i]});
}
}
Code is producing error I can't find.
Thank you in advance for any help you might offer.
Annie