PageRenderTime 23ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 1ms

/src/away3d/events/AnimatorEvent.as

http://github.com/away3d/away3d-core-fp11
ActionScript | 56 lines | 25 code | 8 blank | 23 comment | 0 complexity | 23c3d9f943862c0992abc6c331afa37e MD5 | raw file
 1package away3d.events
 2{
 3	import away3d.animators.*;
 4	
 5	import flash.events.*;
 6	
 7	/**
 8	 * Dispatched to notify changes in an animator's state.
 9	 */
10	public class AnimatorEvent extends Event
11	{
12		/**
13		 * Defines the value of the type property of a start event object.
14		 */
15		public static const START:String = "start";
16		
17		/**
18		 * Defines the value of the type property of a stop event object.
19		 */
20		public static const STOP:String = "stop";
21		
22		/**
23		 * Defines the value of the type property of a cycle complete event object.
24		 */
25		public static const CYCLE_COMPLETE:String = "cycle_complete";
26		
27		private var _animator:AnimatorBase;
28		
29		/**
30		 * Create a new <code>AnimatorEvent</code> object.
31		 *
32		 * @param type The event type.
33		 * @param animator The animator object that is the subject of this event.
34		 */
35		public function AnimatorEvent(type:String, animator:AnimatorBase):void
36		{
37			super(type, false, false);
38			_animator = animator;
39		}
40		
41		public function get animator():AnimatorBase
42		{
43			return _animator;
44		}
45		
46		/**
47		 * Clones the event.
48		 *
49		 * @return An exact duplicate of the current event object.
50		 */
51		override public function clone():Event
52		{
53			return new AnimatorEvent(type, _animator);
54		}
55	}
56}