I try to import the .awd file but it does not show up when I run the program. I do not get any error but the model does not show up.
Why does it not show up? Does anybody know?
Have a look at the image below where I tried to import 5 different .awd files using Away3d 4.0.9 and Away 3d 4.0.11 aplha version.
“Yes” means it showed up while “no” means it did not show up when I ran the program.
If you need links to the model files, plz just request.
Here is my code -
package
{
import away3d.containers.View3D;
import away3d.events.LoaderEvent;
import away3d.loaders.Loader3D;
import away3d.loaders.parsers.Parsers;
import away3d.primitives.WireframeCube;
import flash.display.Sprite;
import flash.events.Event;
import flash.net.URLRequest;
[SWF(width="960", height="540")]
public class GettingStartedWithAway3D extends Sprite
{
private var _view : View3D;
private var _loader : Loader3D;
private var cube : WireframeCube;
public function GettingStartedWithAway3D()
{
_view = new View3D();
_view.backgroundColor = 0x666666;
_view.antiAlias = 4;
this.addChild(_view);
this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
cube = new WireframeCube(200, 200, 200, 0xFF0000, 1);
_view.scene.addChild(cube);
Parsers.enableAllBundled();
_loader = new Loader3D();
_loader.addEventListener(LoaderEvent.RESOURCE_COMPLETE, onResourceComplete);
_loader.addEventListener(LoaderEvent.LOAD_ERROR, onLoadError);
_loader.load(new URLRequest('soc.AWD'));
}
private function onEnterFrame(ev: Event) : void
{
_loader.rotationY = stage.mouseX - stage.stageWidth/2;
_view.camera.y = 3*(stage.mouseY - stage.stageHeight/2);
_view.camera.lookAt(_loader.position);
_view.render();
}
private function onLoadError(ev:LoaderEvent) : void
{
trace('Could Not find', ev.url);
_loader.removeEventListener(LoaderEvent.RESOURCE_COMPLETE, onResourceComplete);
_loader.removeEventListener(LoaderEvent.LOAD_ERROR, onLoadError);
_loader = null;
}
private function onResourceComplete(ev:LoaderEvent) : void
{
trace('Done Loading');
_loader.removeEventListener(LoaderEvent.RESOURCE_COMPLETE, onResourceComplete);
_loader.removeEventListener(LoaderEvent.LOAD_ERROR, onLoadError);
_view.scene.addChild(_loader);
}
}
}
Note: I use Flash Builder 4.6 premium and the playerglobal 11_4.swc
Also, I have put -use-network=flase in additional paramters.
I have a gut feeling that I am not exporting the model properly.
Can anybody give me tips on the settings I should check and uncheck while exporting through 3ds max plug in.