as 复制一个xml对象
创建了一个复制的原始xml对象,以便它可以按值传递
package{
import flash.display.sprite;
public class main extends sprite{
public function main(){
var template:xml = <person><name><first /><last /></name></person>;
var me:xml = template.copy();
me.name.first = "mims";
me.name.last = "wright";
trace(template);
trace(me);
}
}
}
补充:flash教程,As3.0