将 MovieClip 实例动态放置在舞台上 (AS3)
我正在尝试将 MovieClip 的实例动态放置在舞台上。 收到错误:
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChild()
ActionScript:
// properties in class ----------
var circle_ary:Array = new Array;
var circ_num:int;//number of circles on the stage
// dynamically place MovieClip instances on the stage ----------
// inside Constructor function of class
var circ_num:int=20;//number of circles on the stage
for(var i=0; i<circ_num; i++) {
circle_ary[i] = new Circle(); //linkage in the library
addChild(Circle[i]);
}
I'm trying to dynamically place instances of MovieClip on the stage.
Receiving an error:
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChild()
ActionScript:
// properties in class ----------
var circle_ary:Array = new Array;
var circ_num:int;//number of circles on the stage
// dynamically place MovieClip instances on the stage ----------
// inside Constructor function of class
var circ_num:int=20;//number of circles on the stage
for(var i=0; i<circ_num; i++) {
circle_ary[i] = new Circle(); //linkage in the library
addChild(Circle[i]);
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
应该是
It should be