edwinlimlx
unread,Aug 20, 2010, 9:37:42 AM8/20/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Away3D.dev
Hi,
I've a 3D game, where after the alienship is being shot, it should
have some kind of feedback, like tint it red or something. However
there's no properties that i can do that(kindly enlighten if there
is). Thus, I've decided to change the texture of the alienship upon
being shot.
I have something like..
private function onSuccess(event:Loader3DEvent):void {
alienship = event.loader.handle as ObjectContainer3D;
//Cloning from the imported model.
var clonedAlienShip:Object3D = alienship.clone() as Object3D;
scene.addChild(clonedAlienShip);
trace(alienship.materialLibrary.getMaterial("Material
#309").material)
// [object BitmapMaterial]
trace(clonedAlienShip.materialLibrary.getMaterial("Material
#309").material)
// TypeError: Error #1009: Cannot access a property or method of a
null object reference.
}
However the clonedAlienShip appears on the scene with proper texture
as the original.
How do i access and modifies it?
Thanks!
Edwin