A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: AWAY 3D empty scene

  1. #1

    AWAY 3D empty scene

    This code seems correct, no errors, Flash CS5.5 is finding the Away 3D libraries ok, using most recent playerglobal11_0.swc for Flash Player 11.

    Everything is working fine in terms of the rendering pipeline ( I think ) .... except I can't see anything !

    I thought my model ( the sphere) may be in the wrong place on the z axis, so I moved it to (0,0,100) , then (0,0,-100) .... still can't see it.

    What's missing ?

    package  {
    	import away3d.core.base.*;
    	import away3d.materials.*;
    	import away3d.containers.Scene3D;
    	import away3d.containers.View3D;
            import away3d.primitives.Sphere;
            import flash.display.Sprite;
    	public class helloworld extends Sprite{
    		public function helloworld() {
    			 // create a viewport
                            var View:View3D = new View3D();
    			View.backgroundColor = 0x666666;
    			var scene1:Scene3D = new Scene3D(); 
    			var View:View3D = new View3D(scene1);
                // create a sphere and put it on the 3D stage
                var sphere:Sphere = new Sphere();
    			sphere.moveTo(0,0, 100);
                // render the view

  2. #2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center