hi everyone,
I have a problem with loading values from xml file.
the xml file has cost of items.
xml file name: item.xml
30 40 I have tried a lot with actionscript but I failed to get the values from xml file to my flash file so that I can do some calculations according to the values.Can anyone tell me what will be the actionscript code for getting value from xml file to flash file.
I am using actionscript 2.0
any help will be a lot for me.
thanks in advance.
Posted about 1 month ago

ML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
var fruitLength:Number = xml.firstChild.childNodes.length;
for(var i = 0;i < fruitLength; i++)
{
var fruit = xml.firstChild.childNodes[i].firstChild.nodeValue;
trace(fruit);
}
};
xml.load("fruits.xml");









