> THIS IS FANTASTIC!!!! With this you can create your 3D scenes in > Prefab, position your lights and textures and after simply export to > an AS3 class for use in Away3D. Glad you've found out what this little app can mean to you.
Fabrice On Feb 4, 2010, at 1:30 PM, [email protected] wrote: > I figured out the solution! > > I created a constructor class called Lesson1 and imported the Test2 > class generated by Prefab. > > THIS IS FANTASTIC!!!! With this you can create your 3D scenes in > Prefab, position your lights and textures and after simply export to > an AS3 class for use in Away3D. With Prefab I can now create > sophisticated sceneries in much less time. Whoever made this is a > God!!! > > package > { > import away3d.containers.View3D; > import away3d.primitives.Cube; > import flash.display.Sprite; > > import Test2; > > [SWF(width="500", height="400", frameRate="60", > backgroundColor="#FFFFFF")] > public class Lesson1 extends Sprite > { > public function Lesson1() > { > // create a viewport > var view:View3D = new View3D({x:250,y:200}); > addChild(view); > // create a sphere and put it on the 3D stage > > var holder:Test2 = new Test2(); > view.scene.addChild(holder); > holder.scaleX = 0.3; > holder.scaleY = 0.3; > holder.scaleZ = 0.3; > holder.rotationY = 100; > > var cube:Cube = new Cube(); > view.scene.addChild(cube); > > cube.roll(15); > cube.pitch(5); > cube.yaw(5); > > // render the view > view.render(); > } > } > }
