away3d / away3d-core-fp10

Away3D engine for Flash Player 10

Home Page:http://www.away3d.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problems with .obj import

tadaskrisciunas opened this issue · comments

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.