I have a very simple model (one small cylinder) which was modeled in Sketchup. I have attempted to load the OBJ file exported from Sketchup unsuccessfully.
I then ran the model through PreFab (which opened it fine) and attempted to load it in both OBJ and AC3D, as exported by Prefab, but was again unsuccessful.
In all cases the ‘Resource Complete’ event never gets fired.
I am using a URLLoader to load the model file initially and then Loader3D.loadData to parse the loaded ByteArray.
Something like this:
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.BINARY;
loader.load(new URLRequest(fileUrl));
loader.addEventListener(Event.COMPLETE, onLoaded);
function onLoaded(e:Event):void{
var loader3D = new Loader3D();
loader3D.addEventListener(LoaderEvent.RESOURCE_COMPLETE, onResourceComplete);
container.addChild(_loader);
loader3D.loadData(_objLoaderModel.data, new AssetLoaderContext(false),null,new OBJParser());
}
protected function onResourceComplete(event:Event):void{
trace("This never gets called");
}
I’ve attached the Prefab exported OBJ files, as I assume they’re the most likely to work.
Any help would be greatly appreciated.