我正在尝试将一些影片剪辑放到一个对象上。
var br1_txt:TextField = new TextField();
br1_txt.text = "t";
br1_txt.defaultTextFormat = tfB;
br1_txt.setTextFormat(tfB);
br1_txt.textColor = 0x000000;
br1_txt.x = -3;
br1_txt.y = -3;
var br1_mc:MovieClip = new MovieClip();
br1_mc.addChild(br1_txt);
addChild(br1_mc);
var array:Array = new Array();
var object1:Object = new Object;
var s1:MovieClip = this.getChildByName("squared2") as MovieClip;
var piece1:MovieClip = this.getChildByName("br1_mc") as MovieClip;
object1.s1 = s1; // or object["movieClip"] = movieClip
object1.piece1 = piece1;
array.push(object1);
trace(s1); // Outputs [object MovieClip]
trace(piece1); // Outputs null, why?