Ben, you're a legend! Thank you so much! I just have to figure out how
to add a different texture to the back now. :-/

Many, many thanks!

On Jul 21, 10:58 am, ben <[email protected]> wrote:
> var Door1DAE:Object3DLoader = Collada.load("models/Door.dae",
> {material:TEXTURE_Door1, bothsides:true, scaling:1.0, y:0, x:-80,
> z:-100, loadersize:300});
> Door1DAE.addOnSuccess(setDoor);
> you have to load the LoaderEvent class
> function setDoor(e:LoaderEvent):void
> {
> /// get the name of the object contained in your collada file to debug
> for each (var item:Object3D in (e.loader.handle as
> ObjectContainer3D).children){
> trace (item.name)
> /// get the child you want by the name(s) you got
> var tempRef:Object3D = (e.loader.handle as
> ObjectContainer3D).getChildByName("yourname") as Object3D;
> tempRef.name = "newName" // if you want to change the name
> Mesh(tempRef).bothsides = true;
> scene.addChild(e.loader.handle);///add the whole collada scene (that
> could be more than one object)
> or
> scene.addChild(tempRef)///if you only want to add the Object3D you got
> by it's name from your collada
>
>
>
> }
> }

Reply via email to