Im trying to load an embeded file.obj with AssetLibrary.loadData(), but it throws
[Fault] exception, information=Error: Error #2032: Stream Error. URL: app:/file.mtl
Could someone help please?
Heres my code:
[Embed(source="../stuff/logo.obj",mimeType="application/octet-stream")]
public var FileMesh:Class;
private var _view:View3D;
private var _mesh:Mesh;
private var _loader:Loader3D;
private var _color:ColorMaterial;
public function Main()
{
_view = new View3D();
_view.camera.z = -200;
_view.camera.lookAt(new Vector3D());
AssetLibrary.enableParser(OBJParser);
AssetLibrary.addEventListener(AssetEvent.ASSET_COMPLETE, onAssetComplete);
AssetLibrary.loadData(FileMesh);
addChild(_view);
}
private function onAssetComplete(e:AssetEvent):void
{
trace("Asset complete");
}