home *** CD-ROM | disk | FTP | other *** search
- package ENGINE.INTERFACE.ANIMATORS
- {
- import ENGINE.INTERFACE.OIObject;
-
- public class OAnimator
- {
-
- public static const stStart:int = 1;
-
- public static const stEnd:int = 3;
-
- public static const stPause:int = 0;
-
- public static const stReturn:int = 4;
-
- public static const stPlay:int = 2;
-
-
- private var iState:int;
-
- protected var iTarget:OIObject;
-
- public function OAnimator(param1:Object, param2:OIObject = null)
- {
- var _loc3_:String = null;
- super();
- for(_loc3_ in param1)
- {
- if(this.hasOwnProperty(_loc3_))
- {
- this[_loc3_] = param1[_loc3_];
- }
- }
- this.iTarget = param2;
- this.State = stPause;
- }
-
- public function set State(param1:int) : void
- {
- this.iState = param1;
- switch(this.iState)
- {
- case stStart:
- this.State = this.Start();
- break;
- case stReturn:
- this.State = Return();
- }
- }
-
- public function Play() : void
- {
- this.State = stEnd;
- }
-
- public function set prTarget(param1:OIObject) : void
- {
- this.iTarget = param1;
- }
-
- protected function Start() : int
- {
- return stPlay;
- }
-
- public function get State() : int
- {
- return this.iState;
- }
-
- public function Return() : int
- {
- return stPlay;
- }
-
- public function OnEnterFrame() : void
- {
- if(this.iState == stPlay)
- {
- Play();
- }
- }
- }
- }
-