출처 : http://blog.daum.net/volzh/13390179
package
{
import away3d.cameras.Camera3D;
import away3d.containers.Scene3D;
import away3d.containers.View3D;
import away3d.debug.AwayStats;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
[SWF(frameRate="60",width="800",height="600")]
public class Hello1 extends Sprite
{
private var _scene:Scene3D;
private var _camera:Camera3D;
private var _view:View3D;
public function Hello1()
{
this.initStage();
this.init3D();
this.addEventListener(Event.ENTER_FRAME, render);
}
private function initStage():void {
this.stage.scaleMode = StageScaleMode.NO_SCALE;
this.stage.align = StageAlign.TOP_LEFT;
}
private function init3D():void {
this._scene = new Scene3D();
this._camera = new Camera3D();
this._view = new View3D(this._scene, this._camera);
this.addChild(this._view);
var stat:AwayStats = new AwayStats(this._view);
this.addChild(stat);
}
private function render(e:Event):void {
this._view.render();
}
}
}