Sure that works, the confusing thing is if you add a loader, you can't remove it, but you can remove it's children, which you never added implicitly in the first place.
scene.addChild(myObjectLoader); myObject = myObjectLoader.handle as ObjectContainer3D; scene.removeChild(myObject) If these were Sprites you wouldn't be able to remove "myObject" and you would be able to remove "myObjectLoader" When I try to remove myObjectLoader I get the message that it's not a DisplayObject, however removing myObject works. On Sep 18, 6:15 am, katopz <[email protected]> wrote: > do try this, work for me > > > package > > { > > import away3dlite.materials.*; > > import away3dlite.primitives.*; > > import away3dlite.templates.*; > > > public class ExSphere extends BasicTemplate > > { > > override protected function onInit():void > > { > > var sphere:Sphere = new Sphere(new WireframeMaterial(), 100, 10, 10); > > scene.addChild(sphere); > > scene.removeChild(sphere); > > } > } > } > > hth > > 2009/9/18 themightyatom <[email protected]> > > > > > Anybody found a way to remove an object from a scene in Away3dLite? > > The ".removeChildByName" from the main branch isn't in the new engine. > > To add objects we use the addChild command, but removeChild dosn't > > work > > as the object is not actually a flash displayObject (i think!) > > > Any ideas greatly appreciated ;O) > > > Cheers > > > PS > > -- > katopzhttp://www.sleepydesign.com
