【发布时间】:2023-03-10 17:42:01
【问题描述】:
是否可以将构造函数参数传递给我放置在舞台上的实例对象? 实例对象的实例化是否像 .NET WinForms 一样集中在某个地方,所以我可以编辑 xxx = new CustomRecangle() 构造函数?
public class CustomRectangle extends MovieClip {
public function CustomRectangle(width:int, height:int) {
this.width = width;
this.height = height;
}
}
【问题讨论】:
标签: flash actionscript-3 constructor