i think it should be place in ObjectContainer3D instead of Object3D, normally Object3D didn't contain any child by meaning but it can be add like that because of it extends from Sprite anyway
thx for idea 2009/10/28 mogg <[email protected]> > > rob.bateman, katopz, > > I made the following changes to help support the "Object3D.canvas" > with objects inside other objects. Are these a good idea? Can this or > something like it be included in the code base? > > > in Object3D.as I made the following changes starting at line 130 to > recursively update all 3D children with the same canvas: > ------------------ > public function set canvas(value:Sprite):void > { > _canvas = value; > > for(var i:int = 0; i < numChildren; i++) > { > var obj3d:Object3D = getChildAt(i) as Object3D; > > if(obj3d) > { > obj3d.canvas = value; > } > } > } > > public function get canvas():Sprite > { > return _canvas; > } > ------------------ > > In ObjectContainer3D I made the following addition in the "addChild" > method at line 163: > > ------------------ > 163: (child as Object3D).canvas = this.canvas; > > ------------------ > -- katopz http://www.sleepydesign.com
