views:

160

answers:

1
+1  Q: 

AS3 List issues

I'm trying to add a List object to the stage dynamically, but I always get an error when a certain line is called:

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

Error thrown at runtime:

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()

Anybody have any ideas how to fix this? Thanks for your help.

A: 

Maybe google helps ?

http://www.actionscript.org/forums/showthread.php3?t=150778

Theo.T