Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/flash/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flash AS3列出问题_Flash_Actionscript 3_List_Runtime Error - Fatal编程技术网

Flash AS3列出问题

Flash AS3列出问题,flash,actionscript-3,list,runtime-error,Flash,Actionscript 3,List,Runtime Error,我试图动态地将列表对象添加到stage,但在调用某一行时,我总是会出错: input.addItem({label:"test",data:"test"}); 运行时引发的错误: TypeError: Error #2007: Parameter child must be non-null. at flash.display::DisplayObjectContainer/addChildAt() at fl.controls::BaseButton/fl.controls:BaseButt

我试图动态地将列表对象添加到stage,但在调用某一行时,我总是会出错:

input.addItem({label:"test",data:"test"});
运行时引发的错误:

TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::LabelButton/fl.controls:LabelButton::draw()
at fl.core::UIComponent/drawNow()
at fl.controls::List/fl.controls:List::drawList()
at fl.controls::List/fl.controls:List::draw()
at fl.core::UIComponent/fl.core:UIComponent::callLaterDispatcher()
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::LabelButton/fl.controls:LabelButton::draw()
at fl.core::UIComponent/fl.core:UIComponent::callLaterDispatcher()
有人知道怎么解决这个问题吗?谢谢你的帮助。

也许谷歌能帮上忙


仍处于崩溃状态……有人有主意吗?这是添加到列表中的第一项吗?您能再显示一点代码吗?@Amarghosh Yes@bhups这和初始化代码是我真正拥有的。您有列表组件及其库中的资产吗?