That doesnt sound to promising.
Here is more of my code.
I can send you the whole source if you want.
I would like to get on thr right track with this ASAP and currently it
isn't.
If anyone can help I will appreciate it.

        public function myload2()
                {


                        init3D();
                        createScene();

                        // prep for handling resizing events
                        //      stage.scaleMode = StageScaleMode.NO_SCALE;
                        //      stage.align = StageAlign.TOP;


                }

                private function init3D():void {
                        scene = new Scene3D();
                        //      camera = new Camera3D({zoom:20, focus:30, 
x:100, y:50, z:-500});
                        camera = new Camera3D();
                        camera.x=100;
                        camera.z=-500;
                        camera.focus=30;
                        camera.zoom=20;

                        view = new View3D({scene:scene, camera:camera});

                        // center the viewport to the middle of the stage
                        view.x = stage.stageWidth / 2;
                        view.y = stage.stageHeight / 2;

                        addChild(view);


                }
                private function createScene():void {

                        var modelMaterial:BitmapMaterial =
                                new BitmapMaterial(Cast.bitmap(AS3Material));
                        var modelMaterial2:BitmapMaterial =
                                new BitmapMaterial(Cast.bitmap(AS3Material2));
                        var modelMaterial4:BitmapMaterial =
                                new BitmapMaterial(Cast.bitmap(AS3Material3));
                        var modelMaterial5:BitmapMaterial =
                                new BitmapMaterial(Cast.bitmap(AS3Material4));

                        var bitmap:Bitmap = new grassBitmap() as Bitmap;
                        grassTexture = bitmap.bitmapData;

                        mygrass = new BitmapMaterial(Cast.bitmap(grassTexture));

                        //model = new House2( 1); //if have 0 for posistion you 
get weird
movement when camera moves
                        model = new House3(1);
                        model.material = modelMaterial;
                        model.z =100;
                        model.y=-50;
                        model.x=200;
                        view.scene.addChild(model);

                        model3 = new House2( 1);
                        model3.material = modelMaterial2;
                        model3.z = 300;
                        model3.y=50;
                        model3.x=-300;
                        view.scene.addChild(model3);

                        model4 = new Chest( 1);
                        model4.material = modelMaterial4;
                        model4.z = 150;
                        model4.y=-130;
                        model4.x=50;
                        view.scene.addChild(model4);

                        model5 = new Redcar( 1);
                        model5.material = modelMaterial5;
                        model5.z = 150;
                        model5.y=-130;
                        model5.x=0;
                        view.scene.addChild(model5);

                        // create a plane
                        //plane = new Plane({material:"green#", name:"plane", 
y:-100,x:0,
width:1000, height:1000, pushback:true});
                        plane = new Plane({material:mygrass, name:"plane", 
y:-100,x:0,
width:1000, height:1000, pushback:true});

                        view.scene.addChild(plane);



                        
stage.addEventListener(KeyboardEvent.KEY_DOWN,getkeyDown,false,
0,true);
                        
stage.addEventListener(KeyboardEvent.KEY_UP,getkeyUp,false,0,true);

                        
stage.addEventListener(Event.ENTER_FRAME,gameLoop,false,0,true);
                }

Reply via email to