# This.GetChildAt(i) is returning null. But this.numChildren says there are 3

**URL:** <https://forum.kirupa.com/t/this-getchildat-i-is-returning-null-but-this-numchildren-says-there-are-3/322245>\
**Category:** Uncategorized\
**Created:** [May 16, 2011, 5:05am UTC](https://forum.kirupa.com/t/this-getchildat-i-is-returning-null-but-this-numchildren-says-there-are-3/322245 "2011-05-16T05:05:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![OhMyJosh](https://avatars.discourse-cdn.com/v4/letter/o/46a35a/32.png) [@OhMyJosh](https://forum.kirupa.com/u/OhMyJosh)\
**Post date:** [May 16, 2011, 5:05am UTC](https://forum.kirupa.com/t/this-getchildat-i-is-returning-null-but-this-numchildren-says-there-are-3/322245/1 "2011-05-16T05:05:32Z")

</div>

In the platform game I’m making, I have a movieclip level/stage with the platforms (which are there own class) added in. I’m trying to load those platforms into an array for future use, but as I keep on getting null. Take a look at the code:

package  
{  
public class StageLevel1Test extends StageManager  
{  
private var \_platformListCntr:Number = 0;  
private var \_platformList:Array = new Array();  
public function StageLevel1Test(stageRef, \_character)  
{  
for (var i = 0; i \< this.numChildren; i++)  
{  
var levelObjects = this.getChildAt(i);  
if (levelObjects is PlatformTest)  
{  
var platforms:PlatformTest = new PlatformTest();  
\_platformList[\_platformListCntr] = platforms;  
\_platformListCntr++;  
}  
}  
super(stageRef, \_character, \_platformList, \_platformListCntr);  
\_stageSpeed = 8;  
}  
}  
}

Why is it returning null?
