How do I scan for only ONE type of object? ActionScript 3.0
I want to make an array of all the boxes on screen but it's also counting the mouse trails. This is the code I'm using which I don't understand in depth because I'm not an expirienced coder. How do I make it only count boxes, do I use an if statement?
stage.addEventListener(Event.ENTER_FRAME, eee);
function eee(event:Event)
{
function getCircles(container:DisplayObjectContainer):Array
{
for (var i:uint = 0; i < container.numChildren; i++)
if (container.getChildAt(i) is box)
{
var array:Array = new Array();
array.push(container.getChildAt(i));
}
return array;
}
blah.text = String(numChildren - 2)
}
