Hey all.

So after some struggle, i managed to get Broomstick setup with FB4.

When i run this code, i dont see anything but a blank screen, am i missing
something obvious or is my setup mashed?

package thesurface.away3d.scenes
{
    import away3d.containers.Scene3D;
    import away3d.containers.View3D;
    import away3d.primitives.Cube;

    import flash.display.Sprite;
    import flash.geom.Point;

    public class BaseScene extends Sprite
    {
        private var _view:View3D;
        private var _cube:Cube;

        public function BaseScene()
        {
            super();

            _init();
        }

        protected function _init(): void
        {
            view = new View3D();
            view.width = 1024;
            view.height = 768;
            addChild(view);

            _createGeometry();
        }

        protected function _createGeometry(): void
        {
            _cube = new Cube();
            view.scene.addChild(_cube);
        }

        public function update(): void
        {
            _cube.rotationX++;
            view.render();

            tracer("update")  //update called from parent.
        }

        protected function get view():View3D
        {
            return _view;
        }

        protected function set view(value:View3D):void
        {
            _view = value;
        }


    }
}

Reply via email to