I have tried all the methods I have found to load an .obj file, and I’ve 
tried to load various different .obj files, one of which was working in an 
example on the net 
(http://www.charglerode.com/blog/?p=164<http://away3d.com/?URL=http%3A%2F%2Fwww.charglerode.com%2Fblog%2F%3Fp%3D164>).
 
However, none of them seem to be working for me. When the parser gets to the 
.mtl it seems that it freezes. The message “Loading material file… X of X 
(or sometimes 0) bytes loaded” stays frozen on the screen. For example, here 
is the variant with the model from the net: 
http://tadas.asmeninis.com/teravil/flash/example/<http://away3d.com/?URL=http%3A%2F%2Ftadas.asmeninis.com%2Fteravil%2Fflash%2Fexample%2F>.
 
A snippet of the code of the example:

try {
    var loader3D:Loader3D = Obj.load( "models/m4_sherman.obj", { bothsides:
true } );
    loader3D.addOnSuccess( onModelLoadSuccess );
    view.scene.addChild( loader3D );
} catch( err:Error ) {
    errorHandle( err );
}

...

protected function onModelLoadSuccess( event:Loader3DEvent ):void {
    mesh = event.loader.handle;
    view.scene.addChild( mesh );
}

 

 

Reply via email to