kingyiren / flex-object-handles

Automatically exported from code.google.com/p/flex-object-handles
0 stars 0 forks source link

how to add new children in array #28

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
var children:Array = genericTshirt.getChildren();
var n:int = children.length;
for (var i:int = 0; i < n; i++)
{
  var child:ObjectHandles = children[i] as ObjectHandles;
}

how to count ObjectHandles children. 

Original issue reported on code.google.com by abidr...@gmail.com on 27 Oct 2009 at 9:53

GoogleCodeExporter commented 8 years ago
I'd suggest something like

var children:Array = genericTshirt.getChildren();
var n:int = 0;
for (var i:int = 0; i < n; i++)
{
  var child:ObjectHandles = children[i] as ObjectHandles;
  if( child ) n++
}

Original comment by marc.hug...@gmail.com on 22 Dec 2009 at 3:40