Learn Flash3d today.
Configure first:
This is configured well.
The next one is the first flash3d.
Import Flash.display.movieclip;import Flash.events.event;import Flash.display.stage;import Away3d.primitives.wireframesphere;import Away3d.containers.view3d;var View:view3d;var Ball:WireframeSphere;main () function Main (): void{//set frame rate stage.framerate=30;//Create a viewport (if you are standing indoors through a window to look outdoors, this viewport is equivalent to a window) view=new view3d ();// Add a viewport to the stage addchild (view);//Create a mesh sphere ball= new Wireframesphere (300,10,10,0xff0000,1);//Add a sphere to the scene of the viewport (scene is a world, Objects seen through the viewport are view.scene.addChild (ball),//trace (ball.x);//Add a Enterframe listener event AddEventListener ( Event.enter_frame, onenterframe);} function Onenterframe (e:event): void{//Rotates the sphere along the y-axis 550+275=825,ball.rotationy++;ball.rotationz++;ball.x+=5;if (ball.x >975) ball.x=-700;//render viewports (with viewports, scenes, and objects in the scene, we also need a final step to render, so we can end up with the effect) View.render ();}
The original is written in the class, I used to write on the frame. It changed, and by the way a moving effect.
Original: http://blog.sina.com.cn/s/blog_4532d8b50101ata2.html
Attached to me: http://download.csdn.net/detail/jianqiu000/8901397
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
FLASH3D Study 1