Hello,

I have loaded a mesh by doing :

object3DLoader = Obj.load("model.obj", {material:bitmapMaterial,
name:"crist", scaling:30, x:0, y:0, z:0, loadersize:200});

object3DLoader.addOnSuccess(onLoaderSuccess);

                private function onLoaderSuccess(e:Loader3DEvent):void {

                        if(e.loader.handle is Mesh){

                                mesh = e.loader.handle as Mesh;
                                mesh.material= new ColorMaterial();


                        } else {

                        }
                }

But I can't figure how o acces the material to change it within the
function onLoaderSuccess.
when I trace(mesh.material) I get null before doing : mesh.material=
new ColorMaterial();

Reply via email to