Copy link to clipboard
Copied
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)
}
Copy link to clipboard
Copied
what's a box?
Copy link to clipboard
Copied
my movieclip
Copy link to clipboard
Copied
also ignore the "blah.text = String(numChildren - 2)"
Copy link to clipboard
Copied
is "box" is the instance name of a movieclip or the class name?