package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var order:XML =
Toy
39.99
2
var total:Number = 0;
for each (var item:XML in order.*) {
trace( item.QUANTITY
+ " " + item.NAME + "(s)."
+ " $" + item.PRICE + " each.\n");
total += item.QUANTITY * item.PRICE;
}
trace("TOTAL: " + total);
for each (var item:XML in order.*) {
item.PRICE = 1;
}
trace(order);
}
}
}