# Null object reference. when addChild(list)

**URL:** <https://forum.kirupa.com/t/null-object-reference-when-addchild-list/331506>\
**Category:** Uncategorized\
**Created:** [August 14, 2013, 1:11pm UTC](https://forum.kirupa.com/t/null-object-reference-when-addchild-list/331506 "2013-08-14T13:11:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lacki](https://avatars.discourse-cdn.com/v4/letter/l/58956e/32.png) [@lacki](https://forum.kirupa.com/u/lacki)\
**Post date:** [August 14, 2013, 1:11pm UTC](https://forum.kirupa.com/t/null-object-reference-when-addchild-list/331506/1 "2013-08-14T13:11:44Z")

</div>

hello  
I’m searching since 4 hours the web and connot find the answer…

the code I put into my existing project is from a Adobe help site , I just dont know how to post it like you always do with the colors.  
the problem ist when adding a fl.controls.list with addChild(listname) i get a null object reference my mainquestion is what property is null when the message comes ? or i dont know… the import is of course in the import section  
and sorry for my bad english ah well maybe its important I’m using flashdevelop

[COLOR=#333333][FONT=Courier New]import fl.controls.List; [/FONT][/COLOR]  
var aList:List = new List();  
aList.addItem({label:“One”, data:1});  
aList.addItem({label:“Two”, data:2});  
aList.addItem({label:“Three”, data:3});  
aList.addItem({label:“Four”, data:4});  
aList.addItem({label:“Five”, data:5});  
aList.setSize(60, 40);  
aList.move(200,200);  
addChild(aList);
