ObjectContainer3D removeChild( )  only remove half child!!!

Software: Away3D 4.x

datouaizi, Member
Posted: 03 March 2012 01:22 PM   Total Posts: 98

for(var i:int =0 ; i < ObjContainer.numchildren ; i++)
{
ObjContainer.removeChild(i)

not right

   

Avatar
Matse, Sr. Member
Posted: 03 March 2012 04:05 PM   Total Posts: 149   [ # 1 ]

var numChild:int = ObjContainer.numchildren;
for(var i:int =0 ; i < numChild ; i++)
{
ObjContainer.removeChild(0);
}

Right wink

   

Avatar
theMightyAtom, Sr. Member
Posted: 03 March 2012 07:17 PM   Total Posts: 669   [ # 2 ]

while(ObjContainer.numChildren > 0)
{
ObjContainer.removeChild(0);
}

Righter?

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X