Tutorials, extensions, and source files for ActionScript, Flash, and other Adobe products.

 

senocular.com ActionScript Library

SeekMove.as

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.senocular.gyro {
	
	/**
	 * Seekers follow target at a constant speed
	 */
	public class SeekMove extends Seek {
		
		public static const TO_DEGREES:Number = (180/Math.PI);
		
		protected var _orient:Boolean = true;
		
		/**
		 * When true, seeker rotation is set 
		 * to point to the target location
		 */
		public function get orient():Boolean {
			return _orient;
		}
		public function set orient(b:Boolean):void {
			_orient = b;
		}
	
		/**
		 * Constructor
		 */
		public function SeekMove(){
			
			// TODO: move properties only affect x and y 
			// and rotation (if orient) properties
			super();
		}
	}
}