Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import flash.events.Event;
  2. import com.whirled.AvatarControl;
  3.  
  4. if (_ctrl == null) {
  5.     _ctrl = new AvatarControl(this);
  6.     _ctrl.setHotSpot(300, 370, 250);
  7.     _body = new Body(_ctrl, this, 600);
  8.     addEventListener(Event.UNLOAD, handleUnload);
  9.     function handleUnload (... ignored) :void {
  10.         _body.shutdown();
  11.     }
  12. }
  13.  
  14.  
  15. if (_ctrl.getMemory("ranksImage") == null && _ctrl.hasControl()) {
  16.     _ctrl.setMemory("timerCount",0);
  17.     _ctrl.setMemory("ranksImage",new MovieClip());
  18.     // Btw, I'm not so sure that you
  19.     // you can store MovieClips. But,
  20.     // might as well try.
  21. }
  22.  
  23. // RANKS //
  24. var timer:Timer = new Timer(1000, 0);
  25.     timer.addEventListener(TimerEvent.TIMER, timeCount);
  26.     timer.start();
  27.  
  28. var ranks:MovieClip = _popup.rank;
  29.  
  30. function timeCount(e:TimerEvent):void{
  31.      if(timer.currentCount >= 30) {
  32.          //Traces
  33.          trace("Times Fired: " + e.currentTarget.currentCount);
  34.          trace("Time Delayed: " + e.currentTarget.delay);
  35.          _ctrl.setMemory("timerCount",timer);
  36.          //Rank
  37.          trace("Update Rank");
  38.          _popup.rank.gotoAndStop(2);
  39.          _ctrl.setMemory("ranksImage",_popup.rank);
  40.      }
  41. }
  42.  
  43.  
  44. _ctrl.setMemory("ranksImage",_popup.rank);
  45.  
  46. // RANKS END //
  47.  
  48. var _ctrl :AvatarControl;
  49. var _body :Body;
  50.  
  51.  
  52. var dlsa:DuelingLandSeaAnimal = new DuelingLandSeaAnimal(_ctrl, ["PrimaryB","SecondaryB", "MeleeB", "RPGB", "GrenadeB"],
  53.    ["PFire Battle","SFire Battle", "MeleeB", "RFire Battle", "GThrow Battle"], ["Dead"]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement