Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import flash.events.Event;
- import com.whirled.AvatarControl;
- if (_ctrl == null) {
- _ctrl = new AvatarControl(this);
- _ctrl.setHotSpot(300, 370, 250);
- _body = new Body(_ctrl, this, 600);
- addEventListener(Event.UNLOAD, handleUnload);
- function handleUnload (... ignored) :void {
- _body.shutdown();
- }
- }
- if (_ctrl.getMemory("ranksImage") == null && _ctrl.hasControl()) {
- _ctrl.setMemory("timerCount",0);
- _ctrl.setMemory("ranksImage",new MovieClip());
- // Btw, I'm not so sure that you
- // you can store MovieClips. But,
- // might as well try.
- }
- // RANKS //
- var timer:Timer = new Timer(1000, 0);
- timer.addEventListener(TimerEvent.TIMER, timeCount);
- timer.start();
- var ranks:MovieClip = _popup.rank;
- function timeCount(e:TimerEvent):void{
- if(timer.currentCount >= 30) {
- //Traces
- trace("Times Fired: " + e.currentTarget.currentCount);
- trace("Time Delayed: " + e.currentTarget.delay);
- _ctrl.setMemory("timerCount",timer);
- //Rank
- trace("Update Rank");
- _popup.rank.gotoAndStop(2);
- _ctrl.setMemory("ranksImage",_popup.rank);
- }
- }
- _ctrl.setMemory("ranksImage",_popup.rank);
- // RANKS END //
- var _ctrl :AvatarControl;
- var _body :Body;
- var dlsa:DuelingLandSeaAnimal = new DuelingLandSeaAnimal(_ctrl, ["PrimaryB","SecondaryB", "MeleeB", "RPGB", "GrenadeB"],
- ["PFire Battle","SFire Battle", "MeleeB", "RFire Battle", "GThrow Battle"], ["Dead"]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement