我正在尝试创建两个 var 一个 var 是一个对象,它在同一个类中获取另一个对象
package plus1
{
public class ScreenInfo
{
//setting a button to 0 means that it is disabled
public var object:Object = { button1:_Object2 };
public var _Object2:Object = { name:"test name" };
public function ScreenInfo()
{
}
}
}
但每次我这样做
var screens:ScreenInfo = new ScreenInfo();
var obj:Object = screens.object["button1"]
该对象是空的,为什么它不应该将第二个对象传递给我?