AQRotate
| Kind of class: | public class | 
|---|---|
| Package: | |
| Inherits from: | 
 | 
| Classpath: | org.asaplibrary.util.actionqueue.AQRotate | 
| File last modified: | Wednesday, 11 May 2011, 18:54:13 | 
	Action method to control the timed rotation of a DisplayObject.
									Summary
					Constants
					
									
							
					Constants
CCW
							static const CCW:uint = 1 << 2						
											Counter-clockwise rotation.
CW
							static const CW:uint = 1 << 1						
											Clockwise rotation.
NEAR
							static const NEAR:uint = 1 << 3						
											Clockwise or counter-clockwise rotation to nearest rotation.
NONE
							static const NONE:uint						
														Instance methods
rotate
							function rotate(inDO:DisplayObject,
                inDuration:Number,
                inStartRotation:Number,
                inEndRotation:Number,
                inDirection:uint = AQRotate.NONE,
                inEffect:Function = null) : Function						
															
			Parameters
						
					
					
	
		inDO           :DisplayObject to rotate	
						
		inDuration     :length of rotation in seconds; 0 is used for perpetual animations - use -1 for instant rotation	
						
		inStartRotation:the starting rotation in degrees; if NaN the current DisplayObject's rotation will be used	
						
		inEndRotation  :the end rotation in degrees; if NaN the current DisplayObject's rotation will be used	
						
		inDirection    :(optional) the rotation direction; either 
						AQRotate.CW (clockwise) or AQRotate.CCW (counter-clockwise) or AQRotate.NEAR (nearest rotation); default CW	
		inEffect       :(optional) an effect function, for instance one of the fl.transitions.easing methods	
					
			Example
					
					
					
	- 
					This example rotates a needle in a dial to the location that has been clicked, using the direction of the nearest rotation:
		var angle:Number = NumberUtils.angle(mouseX - tNeedle.x, mouseY - tNeedle.y); queue.addAction( AQRotate.rotate, tNeedle, 1, NaN, angle, AQRotate.NEAR ); @usageNote Bug: passing an inDuration of 0 will result in no rotation at all. 
			Returns
					
					
					
	- A reference to initDoRotate that in turn returns the performing rotation TimedAction.