This tutorial will show you a quick and easy way of allowing your objects to spin/rotate automaticaly.

Firstly you need to either import or create your shape.

creating a plane:

private var object:Plane;...object = new Plane(...)

If you need a more detailed explanation of creating standard shapes, please visit this tutorial for more information.

Importing a .DAE:

public class Example extends BasicView
var dae:DAE;
var daeFile:String;
var daeMaterialName:String;

public function Mainscale()
daeFile = "yourDAEfile.dae";
daeMaterialName = "YourTextureName";
dae = new DAE();
dae.scale = 120;

after you have imported and added your Object to the scene, you need to add a loop in the code (i.e an event listener) then call the function.
so stragiht after we have added the object to the scene i.e using scene.addChild(yourobjectName);

add an event listener:

addEventListener(Event.ENTER_FRAME, loop3D);

Then create a new function, that listens for the event:

private function loop3D(e:Event):void{
//either use
yourobjectName.yaw(2); //changing the number will increase or decrease the speed
//OR use

And that should do it!
need any extra help? leave a comment, and i will get back to you!

Be Sociable, Share!

Leave a Reply

This site is using OpenAvatar based on

Follow me on Twitter
free counters
PayPal Donation
If you like this blog and the help it has given you, why not donate for this good cause? Click on the button below to pay Safely and Securely through PayPal.