WHAT?! A DisplayObject becomes NaN?! Please Help!

I’ve come across a pretty bizarre bug in my code when working with level generation in a side-scrolling platformer I’m trying to make… I’ve been desperately trying to debug it for the past 2 days! I have a movieclip (exported for AS) called Section1, that contains the first section for a level. It’s basically a huge movieclip containing other movieclips; this Section1 movieclip contains the graphics for the level, as well as collision detection (the graphics are .pngs converted into movieclips, the collision detection is transparent rectangles converted to movieclips). FYI, it’s a BIG movieclip… roughly 3400 pixels wide.

So, since it is the 1st section of a level, I have it spawn at the beginning of the game. However, I need to access all the platforms, walls, and graphics inside section1 from inside AS. So, here’s the code I am using to do this:

public var s1:Section1;
public var platforms:Array, walls:Array, levelGraphics:Array;

// in Main’s constructor now:
s1 = new Section1(2236, 8);
addChild(s1);
platforms = [];
walls = [];
levelGraphics = [];

findPlatforms(s1);

// findPlatforms method

public function findPlatforms(eDO:DisplayObjectContainer){	
			for (var i:int = 0; i < eDO.numChildren; i++) {
				if (eDO.getChildAt(i) is Floor) {
					platforms.push(eDO.getChildAt(i));
				}
				else if(eDO.getChildAt(i) is Wall){
					walls.push(eDO.getChildAt(i));
				}
				else{
					levelGraphics.push(eDO.getChildAt(i));
				}
	}
}

Initially, it works… I’ve traced the data in the arrays in my update method (run every frame), and I can see that the arrays contain displayobjects… for a split second, that is. Seemingly out of nowhere, the values for all the elements in the arrays become NaN! I think to myself… of course these DisplayObjects are “not a number”… they’re displayobjects! Of course, this renders my arrays useless, since I can no longer access the data I need to do collision detections! Please help… I’m completely at a loss for figuring this out.