创建了一个复制的原始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);
}
}
}
时间: 2024-10-31 13:31:04