xml to array is sloooow
i want to load xml file in array
i use
var ddd:XML;
var ttt:URLLoader =new URLLoader();
ttt.load(new URLRequest("test1.xml"));
ttt.addEventListener(Event.COMPLETE, fdf);
var arr2:Array = new Array();
function fdf (e:Event)
{
ddd = new XML(e.target.data);
for (var i = 0; i < ddd.drug.length(); i++)
{
arr2.push(String(ddd.drug.@naame));
}
}
the xml file contain about 2000 record like this
<drug type ="antibiotic" effe ="cephalexin" naame ="ceporex 500tab" form ="tab" dose1 ="500" price ="15" sidee ="allergic to pencillin & -- in marked RF" imgee ="abo_content/drugimge/ceporex 500tab.jpg" barcodeimg ="" dose2 ="50" dose3 ="" temp1 ="" temp2 ="" temp3 ="1"></drug>
when i use this it takes long time to do this for loop and the swf is shocked for many second until it works
is the xml is so big to be loaded in array in as3
or i have done some thing wrong
and is there any way to solve this
tkanks v.much