away3d / away3d-core-fp10

Away3D engine for Flash Player 10
http://www.away3d.com
33 stars 11 forks source link

Problems with .obj import #4

Open tadaskrisciunas opened 13 years ago

tadaskrisciunas commented 13 years ago

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). 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 0 bytes loaded" stays frozen on the screen. For example: http://tadas.asmeninis.com/teravil/flash/example/. A snippet of the code of the example:

try {
    var loader3D:Loader3D = Obj.load( "models/be_sienos.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 );
}

What's wrong?

EDIT: Sorry for closing and reopening the issue. I am new to GitHub.