All pastes #1839916 Raw Edit

lunette-handleXML

public text v1 · immutable
#1839916 ·published 2010-03-14 20:02 UTC
rendered paste body
private function handleLoadXML(e:Event):void {
			productXML = new XML(e.target.data);
			var productList:XMLList = new XMLList(productXML.children());
			
			var currentProductItem:Product;
			
			for (var i:int = 1; i < productList.length(); i++) {
				//trace("product #" + i);
				//trace("name: " + productList[i].name);
				//trace("image: " + productList[i].image);
				//trace("price: " + productList[i].price);
				
				currentProductItem = new Product();
				currentProductItem.setInfo(productList[i].name, productList[i].image, productList[i].description, productList[i].price);
				productsArray.push(currentProductItem);
			}
}