Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
57
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. _ctrl.getMemory("ranksImage");
  5. _ctrl.getMemory("timerCount");
  6.  
  7. if (_ctrl == null) {
  8.     _ctrl = new AvatarControl(this);
  9.     _ctrl.setHotSpot(300, 370, 250);
  10.     _body = new Body(_ctrl, this, 600);
  11.     addEventListener(Event.UNLOAD, handleUnload);
  12.     function handleUnload (... ignored) :void {
  13.         _body.shutdown();
  14.     }
  15. }
  16.  
  17. // RANKS //
  18. var timer:Timer = new Timer(1000, 0);
  19.     timer.addEventListener(TimerEvent.TIMER, timeCount);
  20.     timer.start();
  21.  
  22. var ranks:MovieClip = _popup.rank;
  23.  
  24. function timeCount(e:TimerEvent):void{
  25.      if(timer.currentCount >= 30) {
  26.          //Traces
  27.          trace("Times Fired: " + e.currentTarget.currentCount);
  28.          trace("Time Delayed: " + e.currentTarget.delay);
  29.          _ctrl.setMemory("timerCount",timer);
  30.          //Rank
  31.          trace("Update Rank");
  32.          _popup.rank.gotoAndStop(2);
  33.          _ctrl.setMemory("ranksImage",_popup.rank);
  34.      }
  35. }
  36.  
  37.  
  38. _ctrl.setMemory("ranksImage",_popup.rank);
  39.  
  40. // RANKS END //
  41.  
  42. var _ctrl :AvatarControl;
  43. var _body :Body;
  44.  
  45.  
  46. var dlsa:DuelingLandSeaAnimal = new DuelingLandSeaAnimal(_ctrl, ["PrimaryB","SecondaryB", "MeleeB", "RPGB", "GrenadeB"],
  47.    ["PFire Battle","SFire Battle", "MeleeB", "RFire Battle", "GThrow Battle"], ["Dead"]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement