2010-02-18 88 views
1

我想要一個List對象添加到動態階段,但我總是當某一行被稱爲一個錯誤:AS3列表問題

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() 
:在運行時拋出

input.addItem({label:"test",data:"test"}); 

錯誤

任何人有任何想法如何解決這個問題?謝謝你的幫助。

+0

還是壞了...有人有想法嗎? – Cyclone 2010-02-18 03:11:36

+0

這是第一個添加到列表中的項目嗎? – Amarghosh 2010-02-18 04:31:19

+0

你能展示更多的代碼嗎? – bhups 2010-02-18 07:28:32

回答