STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228050
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2560 · P5120

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/19453155?noj=FRM19453155-24DC" width="1" height="1"></div>

Astrum Defense.swf

This is the info page for
Flash #57692

(Click the ID number above for more basic data on this flash file.)


Text
Name for Highscore List:

<p align="left"></p>

<p align="left"><font face="Times New Roman" size="14" color="#ff0000" letterSpacing="0.000000" kerning="1"><b>You must enter your name.</b></font></p>

<p align="justify"></p>

Storm. Astrum Defense.

<p align="justify"><font face="Times New Roman" size="18" color="#ffffff" letterSpacing="0.000000" kerning="1">Astrum is planet with high-grade deposit of uranium, the general trade resource.</font></p><p align="justify"><font face="Times New Roman" size="18" color="#ffffff" letterSpacing="0.000000" kerning="1">Industrial Guild laid waste its forces over reachest region of the &nbsp;recently researched planet.</font></p><p align="justify"><font face="Times New Roman" size="18" color="#ffffff" letterSpacing="0.000000" kerning="1">Defense Guild has sent you to protect planet from assault. You must defend planet and consolidate influence of the Defense Guild among Guild Union...</font></p><p align="justify"></p><p align="justify"></p>

Defense Guild

Industrial Guild

Clan Norads

Clan Gobalts

Region #1 is occupied by the norad forces! We must protect it...

<p align="left"><font face="Times New Roman" size="14" color="#33ff00" letterSpacing="0.000000" kerning="1"><b><i>You must withstand 25 waves</i></b></font></p>

Play

Closed to Play

<p align="left"><font face="Times New Roman" size="16" color="#cccccc" letterSpacing="0.000000" kerning="1">The reachest region on uranium in all Eartlock.</font></p><p align="left"><font face="Times New Roman" size="16" color="#cccccc" letterSpacing="0.000000" kerning="1">Enemy has fortified its position very strongly. </font></p>

<p align="left"><font face="Times New Roman" size="15" color="#00ff00" letterSpacing="0.000000" kerning="1"><b>You must survive in 20 waves.</b></font></p>

<p align="left"><font face="Times New Roman" size="19" color="#ffffff" letterSpacing="0.000000" kerning="1"><b>Region #3. Baranda</b></font></p>

1

2

3

4

7

11

9

8

5

6

10

13

15

14

12

presents

<p align="center"><font face="Times New Roman" size="80" color="#e2fcfb" letterSpacing="10.000000" kerning="1"><b>Storm. Astrum Defense.</b></font></p>

ActionScript [AS3]

Section 1
//AnimatedBitmap (fai.AnimatedBitmap) package fai { import flash.display.*; import flash.geom.*; public class AnimatedBitmap extends Bitmap { private var point:Point;// = null private var rect:Rectangle;// = null public var curbuffer:BitmapData;// = null public var nframes:uint;// = 0 public var framen:uint;// = 0 public function AnimatedBitmap(_arg1:BitmapData, _arg2:int, _arg3:int):void{ nframes = 0; curbuffer = null; framen = 0; point = null; rect = null; super(new BitmapData(_arg2, _arg3, true, 0), "auto", true); point = new Point(0, 0); setBuffer(_arg1); } public function setBuffer(_arg1:BitmapData):void{ if (((_arg1) && (!((curbuffer == _arg1))))){ curbuffer = _arg1; nframes = (curbuffer.width / width); framen = 0; draw(); }; } public function setFrame(_arg1:uint):void{ if (_arg1 == framen){ return; }; framen = _arg1; draw(); } private function draw():void{ var _local1:BitmapData; _local1 = bitmapData; rect = new Rectangle((framen * width), 0, width, height); _local1.copyPixels(curbuffer, rect, point); bitmapData = _local1; smoothing = true; } } }//package fai
Section 2
//Astar (fai.Astar) package fai { public class Astar { public var ns:Array;// = null public var checkxy:Function;// = null public var tid:uint;// = 0 private var nextbestpos:Position;// = null public var map:MapMatrix;// = null private var opened:AstarMap;// = null private var closed:AstarMap;// = null private var openedMap:AstarMap;// = null public function Astar(_arg1:MapMatrix):void{ checkxy = null; map = null; ns = null; opened = null; closed = null; openedMap = null; nextbestpos = null; tid = 0; super(); checkxy = checkwallid; map = _arg1; ns = new Array(); } private function addToOpened(_arg1:AstarNode):void{ opened.add(_arg1.key(), _arg1); openedMap.add(_arg1.h, _arg1); } public function hestimate(_arg1:Position, _arg2:Position):uint{ return ((Math.abs((_arg1.x - _arg2.x)) + Math.abs((_arg1.y - _arg2.y)))); } public function checkwall(_arg1:uint, _arg2:uint):Boolean{ return (!((Consts.Wall == map.getxy(_arg1, _arg2)))); } public function checknotempty(_arg1:uint, _arg2:uint):Boolean{ return (!(map.getxy(_arg1, _arg2))); } public function allgood(_arg1:uint, _arg2:uint):Boolean{ return (true); } public function search(_arg1:Position, _arg2:Position, _arg3:Array, _arg4:Boolean):Boolean{ var _local5:int; var _local6:int; var _local7:uint; var _local8:uint; var _local9:uint; var _local10:int; var _local11:AstarNode; var _local12:AstarNode; var _local13:AstarNode; var _local14:AstarNode; var _local15:Position; var _local16:AstarNode; var _local17:*; _local5 = 0; _local6 = 500; nextbestpos = null; ns.length = 0; _arg3.length = 0; opened = new AstarMap(); openedMap = new AstarMap(); closed = new AstarMap(); _local7 = 0; _local8 = 0; _local9 = 0; _local10 = 0; _local11 = null; _local12 = null; _local13 = new AstarNode(); _local14 = null; _local13.pos = _arg1; _local13.f = (_local13.h = hestimate(_arg1, _arg2)); if (!checkwallid(_arg2.x, _arg2.y)){ neighbours(_arg2); if (ns.length != 0){ _arg2.x = ns[0].x; _arg2.y = ns[0].y; ns.length = 0; } else { return (false); }; }; addToOpened(_local13); while (!(opened.empty())) { _local5++; if (((_arg4) && ((_local5 > _local6)))){ return (false); }; _local14 = getBestNode(); if (_local14.pos.isequal(_arg2)){ _local16 = _local14; while (_local16 != _local13) { _arg3.unshift(_local16.pos); _local16 = _local16.parent; }; return (true); }; neighbours(_local14.pos); for each (_local15 in ns) { _local7 = (_local14.g + hestimate(_local14.pos, _local15)); _local8 = hestimate(_local15, _arg2); _local10 = (_local7 + _local8); _local11 = opened.get(((_local15.x * 1000) + _local15.y)); if (((_local11) && ((_local11.f <= _local10)))){ } else { _local12 = closed.get(((_local15.x * 1000) + _local15.y)); if (((_local12) && ((_local12.f <= _local10)))){ } else { if (_local11){ opened.remove(_local11.key()); openedMap.removeNode(_local11.h, _local11); }; if (_local12){ closed.remove(_local12.key()); }; _local17 = new AstarNode(); _local17.pos = _local15; _local17.g = _local7; _local17.h = _local8; _local17.f = _local10; _local17.parent = _local14; addToOpened(_local17); }; }; }; closed.add(_local14.key(), _local14); }; return (false); } public function checkwallid(_arg1:uint, _arg2:uint):Boolean{ var _local3:uint; _local3 = map.getxy(_arg1, _arg2); return (((((((!((_local3 == Consts.Wall))) && (!((_local3 == Consts.oreId))))) && (!((_local3 == Consts.uraniumId))))) && (!((_local3 == tid))))); } public function neighbours(_arg1:Position):void{ ns.length = 0; if ((((_arg1.x > 0)) && (checkxy((_arg1.x - 1), _arg1.y)))){ ns.push(new Position((_arg1.x - 1), _arg1.y)); if ((((_arg1.y < (map.v - 1))) && (checkxy((_arg1.x - 1), (_arg1.y + 1))))){ ns.push(new Position((_arg1.x - 1), (_arg1.y + 1))); }; if ((((_arg1.y > 0)) && (checkxy((_arg1.x - 1), (_arg1.y - 1))))){ ns.push(new Position((_arg1.x - 1), (_arg1.y - 1))); }; }; if ((((_arg1.y > 0)) && (checkxy(_arg1.x, (_arg1.y - 1))))){ ns.push(new Position(_arg1.x, (_arg1.y - 1))); }; if ((((_arg1.x < (map.h - 1))) && (checkxy((_arg1.x + 1), _arg1.y)))){ ns.push(new Position((_arg1.x + 1), _arg1.y)); if ((((_arg1.y < (map.v - 1))) && (checkxy((_arg1.x + 1), (_arg1.y + 1))))){ ns.push(new Position((_arg1.x + 1), (_arg1.y + 1))); }; if ((((_arg1.y > 0)) && (checkxy((_arg1.x + 1), (_arg1.y - 1))))){ ns.push(new Position((_arg1.x + 1), (_arg1.y - 1))); }; }; if ((((_arg1.y < (map.v - 1))) && (checkxy(_arg1.x, (_arg1.y + 1))))){ ns.push(new Position(_arg1.x, (_arg1.y + 1))); }; } private function getBestNode():AstarNode{ var _local1:AstarNode; _local1 = openedMap.shift(); opened.remove(_local1.key()); return (_local1); } } }//package fai class AstarNode { public var f:uint;// = 0 public var g:uint;// = 0 public var h:uint;// = 0 public var parent:AstarNode;// = null public var pos:Position;// = null private function AstarNode(){ f = 0; g = 0; h = 0; parent = null; pos = null; super(); } public function key():uint{ return (((pos.x * 1000) + pos.y)); } } class AstarMap extends Map { private function AstarMap(){ } public function removeNode(_arg1:int, _arg2:AstarNode):void{ var _local3:int; if (find(_arg1)){ if (!values[index_].pos.isequal(_arg2.pos)){ _local3 = (index_ - 1); while ((((_local3 >= 0)) && ((keys[_local3] == _arg1)))) { if (values[_local3].pos.isequal(_arg2.pos)){ keys.splice(_local3, 1); values.splice(_local3, 1); return; }; _local3--; }; _local3 = (index_ + 1); while ((((_local3 < keys.length)) && ((keys[_local3] == _arg1)))) { if (values[_local3].pos.isequal(_arg2.pos)){ keys.splice(_local3, 1); values.splice(_local3, 1); return; }; _local3++; }; trace("ERROR ___ 1"); } else { keys.splice(index_, 1); values.splice(index_, 1); }; }; } }
Section 3
//AtomicBombGoal (fai.AtomicBombGoal) package fai { public class AtomicBombGoal extends Goal { private var engine:Engine;// = null private var abomb:AtomicBomb;// = null public function AtomicBombGoal(_arg1:Engine, _arg2:AtomicBomb):void{ engine = null; abomb = null; super(); engine = _arg1; abomb = _arg2; } public function advance():void{ if (!abomb.bombtimer){ deactivate(); }; } override public function deactivate():void{ super.deactivate(); abomb.clean(); abomb = null; } } }//package fai
Section 4
//AttackGoal (fai.AttackGoal) package fai { public class AttackGoal extends Goal { public var preciseTarget:Unit;// = null public var world:MapMatrix;// = null public var attacktarget:Unit;// = null private var recharging:int;// = 0 public var paused:Boolean;// = false private var precisePos:Position;// = null public var hostilecamp:Camp;// = null public function AttackGoal(_arg1:Unit, _arg2:Camp, _arg3:MapMatrix):void{ hostilecamp = null; world = null; attacktarget = null; recharging = 0; paused = false; preciseTarget = null; precisePos = null; super(); owner = _arg1; hostilecamp = _arg2; world = _arg3; } public function advance():void{ var _local1:Unit; _local1 = null; if (Consts.ATTACK == owner.cstate){ if (recharging > 0){ recharging--; if (((((!(recharging)) && (!(paused)))) && (!(preciseAttack())))){ _local1 = hostilecamp.getNearestUnit(owner.pos, owner.eyerange); if (_local1 != null){ owner.startattack(_local1); } else { owner.reset(); owner.sprite.setMoveSprite(); return; }; }; } else { owner.attack(); }; if ((((Consts.IDLE == owner.cstate)) && (!(paused)))){ if (preciseAttack()){ recharging = owner.rechargetime; } else { _local1 = hostilecamp.getNearestUnit(owner.pos, owner.eyerange); if (_local1 != null){ recharging = owner.rechargetime; owner.startattack(_local1); } else { owner.sprite.setMoveSprite(); }; }; }; } else { if ((((((Consts.IDLE == owner.cstate)) && (!(paused)))) && (!(preciseAttack())))){ _local1 = hostilecamp.getNearestUnit(owner.pos, owner.eyerange); if (_local1 != null){ owner.startattack(_local1); }; }; }; } public function preciseAttack():Boolean{ var _local1:int; var _local2:int; var _local3:Boolean; if (!preciseTarget){ return (false); }; if (!preciseTarget.isLive()){ clearPreciseTarget(); return (false); }; _local1 = (owner.pos.x - preciseTarget.pos.x); _local2 = (owner.pos.y - preciseTarget.pos.y); _local3 = (Math.sqrt(((_local1 * _local1) + (_local2 * _local2))) <= owner.eyerange); if (!_local3){ if (owner.building){ clearPreciseTarget(); return (false); }; if (((!(precisePos)) || (!(precisePos.isequal(preciseTarget.pos))))){ owner.life.move(preciseTarget.pos); precisePos = preciseTarget.pos; }; return (true); }; owner.startattack(preciseTarget); return (true); } public function clearPreciseTarget():void{ precisePos = null; preciseTarget = null; } } }//package fai
Section 5
//BulletGoal (fai.BulletGoal) package fai { import flash.display.*; public class BulletGoal extends Goal { public var engine:Engine;// = null public var sprite:AnimatedBitmap;// = null private var gip:int;// = 0 public var bullet:Sprite; private var hitpos:Position;// = null public var assaulter:Unit;// = null public var subject:Unit;// = null private var frame:int;// = 0 public function BulletGoal(_arg1:Unit, _arg2:Unit, _arg3:Position, _arg4:Engine):void{ var _local5:int; var _local6:int; assaulter = null; subject = null; sprite = null; engine = null; gip = 0; hitpos = null; bullet = new Sprite(); frame = 0; super(); engine = _arg4; assaulter = _arg1; subject = _arg2; sprite = new AnimatedBitmap(assaulter.sprite.bullet, 24, 24); bullet.addChild(sprite); sprite.y = (sprite.y - (Math.min(_arg1.sprite.width, _arg2.sprite.width) / 2)); sprite.x = (sprite.x - (Math.min(_arg1.sprite.sprite.width, _arg2.sprite.sprite.width) / 2)); hitpos = subject.pos; bullet.x = _arg1.sprite.x; bullet.y = _arg1.sprite.y; bullet.rotation = (((Math.atan2((_arg3.y - _arg1.sprite.y), (_arg3.x - _arg1.sprite.x)) / Math.PI) * 180) - 90); _local5 = (subject.pos.x - assaulter.pos.x); _local6 = (subject.pos.y - assaulter.pos.y); gip = (Math.sqrt(((_local5 * _local5) + (_local6 * _local6))) * Consts.cellsize); } public function advance():void{ var _local1:int; if (gip <= 0){ if (frame >= sprite.nframes){ deactivate(); } else { sprite.setFrame(frame); frame++; return; }; } else { gip = (gip - assaulter.bulletspeed); if (gip <= 0){ sprite.y = (sprite.y + (assaulter.bulletspeed + gip)); sprite.setBuffer(assaulter.sprite.bulletexp); if (subject.pos.isequal(hitpos)){ engine.hitUnit(assaulter.damage, subject); } else { if ((((Math.abs((subject.pos.x - hitpos.x)) == 1)) || ((Math.abs((subject.pos.y - hitpos.y)) == 1)))){ engine.hitUnit((assaulter.damage / 2), subject); }; }; if (!subject.isLive()){ assaulter.killed++; _local1 = (assaulter.killed / 50); if (assaulter.upgradeLevel < _local1){ engine.upgradeUnit(assaulter); }; if (engine.isSelectedUnit(assaulter)){ engine.menu.updateInfo(); }; }; } else { sprite.y = (sprite.y + assaulter.bulletspeed); }; }; } override public function deactivate():void{ super.deactivate(); if (bullet){ bullet.removeChild(sprite); engine.bulletlayer.removeChild(bullet); sprite = null; assaulter = (subject = null); bullet = null; }; } } }//package fai
Section 6
//Camp (fai.Camp) package fai { public class Camp { public var units:Array; public function Camp(){ units = new Array(); super(); } public function getUnder(_arg1:Position):Unit{ var _local2:Unit; var _local3:int; _local2 = null; _local3 = 0; while (_local3 < units.length) { _local2 = units[_local3]; if (((((((((_local2.sprite.x - (_local2.spritewidth / 2)) <= _arg1.x)) && ((_arg1.x < (_local2.sprite.x + (_local2.spritewidth / 2)))))) && (((_local2.sprite.y - (_local2.sprite.height / 2)) <= _arg1.y)))) && ((_arg1.y < (_local2.sprite.y + (_local2.sprite.height / 2)))))){ return (_local2); }; _local3++; }; return (null); } public function remove(_arg1:Unit):void{ var _local2:uint; _local2 = 0; while (_local2 < units.length) { if (units[_local2] == _arg1){ delete units[_local2]; units.splice(_local2, 1); break; }; _local2++; }; } public function add(_arg1:Unit):void{ units[units.length] = _arg1; } public function getUnderSelection(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:Array):void{ var _local6:Unit; var _local7:int; _arg5.length = 0; _local6 = null; _local7 = 0; while (_local7 < units.length) { _local6 = units[_local7]; if ((((((((((_local6.pos.x >= _arg1)) && ((_local6.pos.x <= (_arg1 + _arg3))))) && ((_local6.pos.y >= _arg2)))) && ((_local6.pos.y <= (_arg2 + _arg4))))) && (!(((_local6.building) && (_local6.peaceful)))))){ _arg5.push(_local6); }; _local7++; }; } public function getNearestUnit(_arg1:Position, _arg2:int):Unit{ var _local3:Unit; var _local4:int; var _local5:Unit; var _local6:int; var _local7:int; _local3 = null; _local4 = 9999999; _local5 = null; _local6 = 0; while (_local6 < units.length) { _local5 = units[_local6]; _local7 = distanceFrom(_arg1, _local5); if (_local7 <= _arg2){ if (_local7 < _local4){ _local4 = _local7; _local3 = _local5; }; }; _local6++; }; return (_local3); } public function getByType(_arg1:String):Unit{ var _local2:Unit; var _local3:int; _local2 = null; _local3 = 0; while (_local3 < units.length) { _local2 = units[_local3]; if (_local2.type == _arg1){ return (_local2); }; _local3++; }; return (null); } public function size():uint{ return (units.length); } public function getNearUnitById(_arg1:Position, _arg2:int, _arg3:int):Unit{ var _local4:Unit; var _local5:int; var _local6:int; var _local7:int; var _local8:*; _local4 = null; _local5 = 0; while (_local5 < units.length) { _local4 = units[_local5]; if (_local4.mapid != _arg3){ } else { _local6 = (_local4.pos.x - _arg1.x); _local7 = (_local4.pos.y - _arg1.y); _local8 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7))); if (_local8 <= _arg2){ return (_local4); }; }; _local5++; }; return (null); } public function isUnitNear(_arg1:Position, _arg2:int):Boolean{ var _local3:Unit; var _local4:int; var _local5:int; _local3 = null; _local4 = 0; while (_local4 < units.length) { _local3 = units[_local4]; _local5 = distanceFrom(_arg1, _local3); if (_local5 <= _arg2){ return (true); }; _local4++; }; return (false); } public function getInMapUnder(_arg1:Position):Unit{ var _local2:Unit; var _local3:int; _local2 = null; _local3 = 0; while (_local3 < units.length) { _local2 = units[_local3]; if ((((_local2.pos.x == _arg1.x)) && ((_local2.pos.y == _arg1.y)))){ return (_local2); }; _local3++; }; return (null); } public static function distanceFrom(_arg1:Position, _arg2:Unit):int{ var _local3:int; var _local4:int; _local3 = (_arg2.pos.x - _arg1.x); _local4 = (_arg2.pos.y - _arg1.y); return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4)))); } } }//package fai
Section 7
//Consts (fai.Consts) package fai { public class Consts { public static const PICKING:uint = 10; public static const defaultScrollSpeed:int = 50; public static const PathfindingsPerTick:int = 1; public static const UNIT_LEAVE_COUNT:int = 100; public static const maxLogMsgs:int = 10; public static const uraniumportion:int = 8; public static const oreId:int = 10; public static const cornerWindow:int = 150; public static const hostileId:uint = 4; public static const harvRange:int = 5; public static const upgradeHExtra:Number = 0.3; public static const oreportion:int = 8; public static const nitrobombDamage:int = 200; public static const ATTACK:uint = 1; public static const UnitWaveCount:int = 30; public static const MOVING:uint = 2; public static const abombcost:int = 150; public static const IDLE:uint = 0; public static const upgradeDExtra:Number = 0.15; public static const cellsize:uint = 35; public static const myId:uint = 3; public static const oreLoad:int = 50; public static const Wall:uint = 1; public static const DEATH:uint = 3; public static const GOALSCLEANPAUSE:uint = 10; public static const maxenergy:int = 250; public static const uraniumId:int = 11; public static const cumulativebombDamage:int = 500; public static const tickrate:int = 50; } }//package fai
Section 8
//CustomCursor (fai.CustomCursor) package fai { import flash.display.*; import flash.ui.*; public class CustomCursor extends Sprite { private var size:uint;// = 20 public var enabled:Boolean;// = false private var engine:Engine;// = null public function CustomCursor(_arg1:Engine):void{ engine = null; size = 20; enabled = false; super(); engine = _arg1; visible = false; draw(); } private function draw():void{ graphics.clear(); graphics.lineStyle(2, 0xFF00); graphics.drawEllipse((-(size) / 2), (-(size) / 4), size, (size / 2)); } public function hide():void{ visible = false; Mouse.show(); } public function enable(_arg1:Boolean):void{ if (_arg1){ x = engine.globalstage.stage.mouseX; y = engine.globalstage.stage.mouseY; show(); } else { hide(); }; enabled = _arg1; } public function show():void{ Mouse.hide(); visible = true; } } }//package fai
Section 9
//DieGoal (fai.DieGoal) package fai { public class DieGoal extends Goal { public var engine:Engine;// = null public var unit:Unit;// = null private var lifegoal:LifeGoal;// = null private var leave:int;// = 100 public function DieGoal(_arg1:Unit, _arg2:Engine, _arg3:LifeGoal):void{ unit = null; engine = null; leave = Consts.UNIT_LEAVE_COUNT; lifegoal = null; super(); unit = _arg1; engine = _arg2; lifegoal = _arg3; unit.startdie(); engine.unitlayer.setChildIndex(unit.sprite, 0); } public function advance():void{ if (Consts.DEATH == unit.cstate){ unit.die(); return; }; if (leave > 0){ leave--; return; }; deactivate(); } override public function deactivate():void{ super.deactivate(); lifegoal.destroy(true); } } }//package fai
Section 10
//EffectGoal (fai.EffectGoal) package fai { public class EffectGoal extends Goal { public var engine:Engine;// = null public var sprite:AnimatedBitmap;// = null private var pause:int;// = 0 private var frame:int;// = 0 public function EffectGoal(_arg1:AnimatedBitmap, _arg2:Engine):void{ sprite = null; engine = null; pause = 0; frame = 0; super(); engine = _arg2; sprite = _arg1; } public function advance():void{ if (pause > 0){ pause--; return; }; if (frame >= sprite.nframes){ deactivate(); } else { sprite.setFrame(frame); frame++; pause = 1; return; }; } override public function deactivate():void{ super.deactivate(); if (sprite){ engine.bulletlayer.removeChild(sprite); sprite = null; }; } } }//package fai
Section 11
//Engine (fai.Engine) package fai { import flash.display.*; import flash.events.*; import flash.media.*; import flash.text.*; import flash.utils.*; public class Engine { public var customcursor:CustomCursor;// = null public var backgr:Sprite;// = null public var gamewidth:int;// = 0 public var comp:Player;// = null public var camps:Array; public var mapstage:Sprite;// = null public var currentMap:LevelMap;// = null public var utypes:UnitTypes;// = null public var userid:int;// = 0 public var resources:Camp; public var paused:Boolean;// = false public var events:GameEvents;// = null public var globalstage:MovieClip;// = null public var sloader:SmartLoader;// = null public var unitlayer:Sprite;// = null public var gobaltid:int;// = 0 private var backbitmaps:Array; public var menu:GameMenu;// = null public var ccursor:MouseCursor;// = null public var mapheight:int;// = 0 public var labs:Dictionary; public var selshape:Shape;// = null public var bulletlayer:Sprite;// = null public var scenario:Scenario;// = null public var nechelons:int;// = 0 public var world:MapMatrix;// = null public var score:int;// = 0 public var selectedUnits:Array; public var gamesid:String;// = "" public var gameheight:int;// = 0 public var scrollspeed:int; public var wtxt:TextField;// = null public var my:Player;// = null public var logmsg:Array; public var goals:Array; public var noradid:int;// = 0 public var mapwidth:int;// = 0 public var uranium:int;// = 0 private var counter:int;// = 0 public var actions:GameActions;// = null public static var stageRadius = 0; public function Engine(_arg1:MovieClip, _arg2:SmartLoader):void{ goals = new Array(); world = null; camps = new Array(); counter = 0; mapstage = null; globalstage = null; selshape = null; ccursor = null; backgr = null; unitlayer = null; bulletlayer = null; sloader = null; my = null; comp = null; resources = new Camp(); menu = null; utypes = null; uranium = 0; score = 0; paused = false; scenario = null; scrollspeed = Consts.defaultScrollSpeed; mapwidth = 0; mapheight = 0; gamewidth = 0; gameheight = 0; wtxt = null; actions = null; events = null; gobaltid = 0; noradid = 0; labs = new Dictionary(); logmsg = new Array(); backbitmaps = new Array(); nechelons = 0; gamesid = ""; userid = 0; customcursor = null; selectedUnits = new Array(); currentMap = null; super(); gamewidth = _arg1.stage.stageWidth; gameheight = _arg1.stage.stageHeight; sloader = _arg2; sloader.engine = this; globalstage = _arg1; utypes = new UnitTypes(sloader); utypes.engine = this; KeyboardKeys.init(globalstage); actions = new GameActions(this); events = new GameEvents(this); customcursor = new CustomCursor(this); } public function getUnitUnder(_arg1:Position):Unit{ var _local2:Unit; _local2 = comp.camp.getInMapUnder(_arg1); if (!_local2){ _local2 = my.camp.getInMapUnder(_arg1); }; return (_local2); } public function isSelectedUnit(_arg1:Unit):Boolean{ if ((((selectedUnits.length == 1)) && ((selectedUnits[0] == _arg1)))){ return (true); }; return (false); } public function buildUnit(_arg1:String, _arg2:int, _arg3:int, _arg4:Boolean):Unit{ var _local5:Unit; var _local6:Camp; var _local7:MineGoal; _local5 = utypes.createUnit(_arg1); _local5.pos.set(_arg2, _arg3); addUnit(_local5); if (((_arg4) && (!(_local5.peaceful)))){ _local6 = ((_local5.mapid == Consts.myId)) ? comp.camp : my.camp; _local5.life.attack(_local6); } else { if (_arg1 == UnitTypes.urefinery){ _local7 = new MineGoal(this, _local5); _local5.life.goals.push(_local7); }; }; return (_local5); } public function restart():void{ gobaltid = Consts.myId; noradid = Consts.hostileId; events.register(); menu.reset(); menu.resources.update(); scenario.start(); log("Tip:"); log("Build turrets nearer to the Command Center and use its fire power."); } private function removeUnit(_arg1:Unit):void{ var _local2:Camp; var _local3:int; var _local4:int; if (_arg1.spritewidth > Consts.cellsize){ _local3 = (_arg1.pos.x - 1); while (_local3 <= (_arg1.pos.x + 1)) { _local4 = (_arg1.pos.y - 1); while (_local4 <= (_arg1.pos.y + 1)) { if ((((((((_local3 < world.h)) && ((_local3 > 0)))) && ((_local4 > 0)))) && ((_local4 < world.v)))){ world.setxy(_local3, _local4, 0); }; _local4++; }; _local3++; }; } else { world.setpos(_arg1.pos, 0); }; _local2 = null; if (_arg1.mapid == Consts.myId){ _local2 = my.camp; } else { if (_arg1.mapid == Consts.hostileId){ _local2 = comp.camp; }; }; if (_local2){ _local2.remove(_arg1); }; } public function loadLevel(_arg1:LevelMap):void{ var _local2:AnimatedBitmap; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:XMLList; var _local8:XML; var _local9:XMLList; var _local10:XML; var _local11:Unit; var _local12:XMLList; var _local13:XML; var _local14:AnimatedBitmap; var _local15:AnimatedBitmap; var _local16:AnimatedBitmap; mapwidth = _arg1.data.size.@width; mapheight = _arg1.data.size.@height; stageRadius = (Math.sqrt(((gamewidth * gamewidth) + (gameheight * gameheight))) / 3); world = new MapMatrix(mapwidth, mapheight); createMap(); createBackground(); my = new Player(this); comp = new Player(this); camps.length = 0; camps.push(my.camp); camps.push(comp.camp); _local2 = sloader.getGround(_arg1.data.background.@type); _local3 = ((mapstage.width / _local2.width) + 1); _local4 = ((mapstage.height / _local2.height) + 1); _local5 = 0; _local6 = 0; _local5 = 0; while (_local5 < _local4) { _local6 = 0; while (_local6 < _local3) { _local14 = sloader.getGround(_arg1.data.background.@type); _local14.x = (_local6 * _local2.width); _local14.y = (_local5 * _local2.height); backgr.addChild(_local14); backbitmaps.push(_local14); _local6++; }; _local5++; }; _local7 = _arg1.data.decor; for each (_local8 in _local7) { _local15 = sloader.getGround(_local8.@type); _local15.x = (_local8.@x * Consts.cellsize); _local15.y = (_local8.@y * Consts.cellsize); backgr.addChild(_local15); backbitmaps.push(_local15); }; _local9 = _arg1.data.wall; for each (_local10 in _local9) { _local16 = sloader.getGround(_local10.@type); _local16.x = (_local10.@x * Consts.cellsize); _local16.y = (_local10.@y * Consts.cellsize); backgr.addChild(_local16); backbitmaps.push(_local16); _local3 = ((_local16.width / Consts.cellsize) + 1); _local4 = ((_local16.height / Consts.cellsize) + 1); _local5 = 0; while (_local5 < _local4) { _local6 = 0; while (_local6 < _local3) { world.setxy((int(_local10.@x) + _local6), (int(_local10.@y) + _local5), Consts.Wall); _local6++; }; _local5++; }; }; _local11 = null; _local12 = _arg1.data.unit; for each (_local13 in _local12) { buildUnit(_local13.@type, _local13.@x, _local13.@y, true); }; nechelons = _arg1.data.scenario.nechelons.@value; wtxt = Utils.createTextField(0xFFFFFF, 12); wtxt.y = 35; globalstage.addChildAt(wtxt, 1); uranium = _arg1.data.scenario.suranium.@value; globalstage.addChild(customcursor); moveEntireMap(0, (-(mapheight) * Consts.cellsize)); } public function removeBuildCursor():void{ if (ccursor){ ccursor.remove(); mapstage.removeChild(ccursor); ccursor = null; }; } public function playSound(_arg1:Sound, _arg2:Position):void{ var _local3:SoundTransform; var _local4:int; var _local5:int; var _local6:int; if (((!(menu.volume)) || (paused))){ return; }; _local3 = new SoundTransform(); _local4 = ((Math.abs(mapstage.x) + (gamewidth / 2)) - (_arg2.x * Consts.cellsize)); _local5 = ((Math.abs(mapstage.y) + (gameheight / 2)) - (_arg2.y * Consts.cellsize)); _local6 = Math.sqrt(((_local4 * _local4) + (_local5 * _local5))); _local3.volume = (menu.volume / (1 + (_local6 / stageRadius))); _local3.pan = -((1 - (Math.abs(((Math.atan2(_local5, _local4) / Math.PI) * 180)) / 90))); _arg1.play(0, 0, _local3); } public function playExpl(_arg1:Position):void{ playSound(Sound(sloader.getLibSound(UnitTypes.shotmiddle)), _arg1); } public function moveEntireMap(_arg1:int, _arg2:int):void{ var _local3:int; var _local4:int; _local3 = (mapstage.x + _arg1); _local4 = (mapstage.y + _arg2); if (_arg1 != 0){ if (_local3 > 0){ mapstage.x = 0; } else { if ((Math.abs(_local3) + gamewidth) > (mapwidth * Consts.cellsize)){ mapstage.x = ((-(mapwidth) * Consts.cellsize) + gamewidth); } else { mapstage.x = _local3; }; }; }; if (_arg2 != 0){ if (_local4 > 0){ mapstage.y = 0; } else { if ((Math.abs(_local4) + gameheight) > (mapheight * Consts.cellsize)){ mapstage.y = ((-(mapheight) * Consts.cellsize) + gameheight); } else { mapstage.y = _local4; }; }; }; } public function log(_arg1:String):void{ logmsg.push(_arg1); updateLog(); if (events.logTimer){ events.logTimer.start(); }; } public function isUnitInSelection(_arg1:Unit):Boolean{ var _local2:Unit; for each (_local2 in selectedUnits) { if (_local2 == _arg1){ return (true); }; }; return (false); } public function createBuildingCursor(_arg1:String):void{ var _local2:Unit; var _local3:AnimatedBitmap; if (ccursor){ removeBuildCursor(); }; _local2 = utypes.params(_arg1); _local3 = new AnimatedBitmap(sloader.getBody(_arg1), _local2.spritewidth, sloader.getBody(_arg1).height); ccursor = new MouseCursor(_arg1, _local3, _local2.eyerange, _local2.costuran, _local2.spritewidth); ccursor.visible = events.mouseWithinMap; mapstage.addChild(ccursor); } private function createBackground():void{ backgr = new Sprite(); mapstage.addChildAt(backgr, 0); unitlayer = new Sprite(); mapstage.addChildAt(unitlayer, 1); bulletlayer = new Sprite(); mapstage.addChildAt(bulletlayer, 2); selshape = new Shape(); mapstage.addChildAt(selshape, 3); } public function stopall():void{ var _local1:Unit; var _local2:int; var _local3:AnimatedBitmap; if (scenario){ paused = true; scenario.stop(); scenario = null; events.unregister(); actions.clear(true); _local1 = null; _local2 = 0; _local2 = 0; while (_local2 < my.camp.units.length) { _local1 = my.camp.units[_local2]; _local1.life.destroy(true); _local2++; }; _local2 = 0; while (_local2 < comp.camp.units.length) { _local1 = comp.camp.units[_local2]; _local1.life.destroy(true); _local2++; }; _local2 = 0; while (_local2 < goals.length) { if ((goals[_local2] is LifeGoal)){ goals[_local2].destroy(true); } else { if (goals[_local2].active){ goals[_local2].deactivate(); }; }; _local2++; }; goals.length = 0; world = null; camps.length = 0; counter = 0; selshape.graphics.clear(); if (ccursor){ removeBuildCursor(); }; selectedUnits.length = 0; my.camp.units.length = 0; comp.camp.units.length = 0; resources.units.length = 0; utypes = null; uranium = 0; score = 0; menu.stat.reset(); mapwidth = 0; mapheight = 0; globalstage.removeChild(customcursor); globalstage.removeChild(wtxt); wtxt = null; labs = new Dictionary(); logmsg.length = 0; globalstage.removeChild(mapstage); mapstage.graphics.clear(); mapstage.removeChild(backgr); for each (_local3 in backbitmaps) { backgr.removeChild(_local3); _local3.bitmapData.dispose(); }; backbitmaps.length = 0; backgr = null; mapstage.removeChild(unitlayer); unitlayer = null; mapstage.removeChild(bulletlayer); bulletlayer = null; mapstage.removeChild(selshape); selshape = null; mapstage = null; paused = false; }; } public function runBullet(_arg1:Unit, _arg2:Unit, _arg3:Position):void{ var _local4:BulletGoal; _local4 = new BulletGoal(_arg1, _arg2, _arg3, this); bulletlayer.addChild(_local4.bullet); goals[goals.length] = _local4; } public function checkCursor():void{ var _local1:uint; var _local2:uint; var _local3:Boolean; var _local4:Boolean; var _local5:int; var _local6:int; if (ccursor != null){ ccursor.visible = true; _local1 = (mapstage.mouseX / Consts.cellsize); _local2 = (mapstage.mouseY / Consts.cellsize); _local3 = true; if (((!((ccursor.x == (_local1 * Consts.cellsize)))) || (!((ccursor.y == (_local2 * Consts.cellsize)))))){ ccursor.x = (_local1 * Consts.cellsize); ccursor.y = (_local2 * Consts.cellsize); if (ccursor.spritewidth > Consts.cellsize){ _local4 = false; _local5 = (_local1 - 1); while (_local5 <= (_local1 + 1)) { _local6 = (_local2 - 1); while (_local6 <= (_local2 + 1)) { if ((((((((_local5 < world.h)) && ((_local5 > 0)))) && ((_local6 > 0)))) && ((_local6 < world.v)))){ if (world.getxy(_local5, _local6) != 0){ _local3 = false; _local4 = true; break; }; }; _local6++; }; if (_local4){ break; }; _local5++; }; } else { if (world.getxy(_local1, _local2) != 0){ _local3 = false; }; }; ccursor.setGood(_local3); }; }; } public function addResources(_arg1:int):void{ uranium = (uranium + _arg1); menu.resources.update(); } public function loadMap(_arg1:LevelMap):void{ var _local2:Unit; stopall(); gobaltid = Consts.myId; noradid = Consts.hostileId; utypes = new UnitTypes(sloader); utypes.engine = this; scenario = new Scenario(this); loadLevel(_arg1); currentMap = _arg1; _local2 = my.camp.getByType(UnitTypes.cc); scenario.setCommandCenter(_local2); } public function effect(_arg1:int, _arg2:int, _arg3:String):void{ var _local4:BitmapData; var _local5:AnimatedBitmap; var _local6:EffectGoal; _local4 = sloader.specials[_arg3][0].content.bitmapData; _local5 = new AnimatedBitmap(_local4, _local4.height, _local4.height); _local5.x = _arg1; _local5.y = _arg2; bulletlayer.addChild(_local5); _local6 = new EffectGoal(_local5, this); goals[goals.length] = _local6; playSound(Sound(sloader.getLibSound(UnitTypes.shotbest)), new Position((_arg1 / Consts.cellsize), (_arg2 / Consts.cellsize))); } public function tick(_arg1:Event):void{ var _local2:uint; MoveGoal.npathfindings = 0; _local2 = 0; while (_local2 < goals.length) { if (goals[_local2].active){ goals[_local2].advance(); }; _local2++; }; if (!counter){ cleanGoals(); counter = Consts.GOALSCLEANPAUSE; } else { counter--; }; } public function destroyUnit(_arg1:Unit):void{ var _local2:uint; removeUnit(_arg1); if (_arg1.mapid == Consts.myId){ menu.stat.ilost++; } else { menu.stat.ikilled++; score = (score + (_arg1.costuran / 3)); addResources((_arg1.deathcost + ((_arg1.deathcost * _arg1.upgradeLevel) / 5))); menu.resources.update(); }; if (isUnitInSelection(_arg1)){ deselectUnit(_arg1); }; if (_arg1.mapid == Consts.hostileId){ menu.announce.subtract(_arg1.type); }; if (ccursor){ checkCursor(); }; _local2 = 0; while (_local2 < goals.length) { if (goals[_local2].owner == _arg1){ goals[_local2].deactivate(); }; _local2++; }; _arg1.health = 0; } public function deselectUnits():void{ var _local1:Unit; if (selectedUnits.length > 0){ for each (_local1 in selectedUnits) { _local1.sprite.select(0, false); }; selectedUnits.length = 0; actions.clear(true); }; } public function hitUnit(_arg1:int, _arg2:Unit):void{ if (!_arg2.isLive()){ return; }; if (_arg2.mapid == Consts.hostileId){ score = (score + 1); }; _arg2.health = (_arg2.health - (_arg1 - _arg2.armor)); if (((_arg2.sprite.selection) && (_arg2.sprite.selection.visible))){ _arg2.updateHealth(); }; if (!_arg2.isLive()){ destroyUnit(_arg2); }; if (isUnitInSelection(_arg2)){ updateMenu(); }; menu.resources.update(); } public function updateLog():void{ var _local1:String; var _local2:String; while (logmsg.length > Consts.maxLogMsgs) { logmsg.shift(); }; _local1 = ""; for each (_local2 in logmsg) { _local1 = (_local1 + (_local2 + "\n")); }; wtxt.text = _local1; } public function addUnit(_arg1:Unit):void{ var _local2:int; var _local3:int; if (_arg1.spritewidth > Consts.cellsize){ _local2 = (_arg1.pos.x - 1); while (_local2 <= (_arg1.pos.x + 1)) { _local3 = (_arg1.pos.y - 1); while (_local3 <= (_arg1.pos.y + 1)) { if ((((((((_local2 < world.h)) && ((_local2 > 0)))) && ((_local3 > 0)))) && ((_local3 < world.v)))){ world.setxy(_local2, _local3, _arg1.mapid); }; _local3++; }; _local2++; }; } else { world.setpos(_arg1.pos, _arg1.mapid); }; _arg1.activate(this); _arg1.sprite.x = (_arg1.pos.x * Consts.cellsize); _arg1.sprite.y = (_arg1.pos.y * Consts.cellsize); _arg1.sprite.visible = true; if (_arg1.mapid == Consts.myId){ my.camp.add(_arg1); } else { if (_arg1.mapid == Consts.hostileId){ comp.camp.add(_arg1); }; }; } public function isMoneyEnough(_arg1:String):Boolean{ return ((utypes.params(_arg1).costuran <= uranium)); } private function createMap():void{ mapstage = new Sprite(); mapstage.graphics.lineStyle(1, 0x666666); mapstage.graphics.beginFill(0xEAEAEA); mapstage.graphics.drawRect(0, 0, (mapwidth * Consts.cellsize), (mapheight * Consts.cellsize)); mapstage.graphics.endFill(); globalstage.addChildAt(mapstage, 0); } public function updateMenu():void{ var _local1:Unit; for each (_local1 in selectedUnits) { if (_local1.isLive()){ _local1.updateHealth(); }; }; if (selectedUnits.length > 0){ if (actions.unitAction != ""){ menu.buttons.action(); } else { if (((ccursor) || (!((actions.currentAction == ""))))){ menu.buttons.action(); } else { if (selectedUnits[0].mapid != Consts.hostileId){ menu.buttons.showButtons(selectedUnits[0].type); } else { menu.buttons.hideButtons(); }; }; }; } else { menu.buttons.hideButtons(); }; menu.updateInfo(); } public function upgradeUnit(_arg1:Unit):void{ var _local2:Unit; var _local3:UpgradeStar; _local2 = utypes.params(_arg1.type); _arg1.upgradeLevel++; _arg1.health = (_arg1.health + (_local2.health * Consts.upgradeHExtra)); _arg1.damage = (_arg1.damage + (_local2.damage * Consts.upgradeDExtra)); _arg1.movesteps = (_arg1.movesteps - _arg1.upgradeLevel); if (_arg1.movesteps < 3){ _arg1.movesteps = 3; }; if (!_arg1.sprite.star){ _local3 = new UpgradeStar(); _arg1.sprite.star = _local3; _local3.x = (_arg1.spritewidth / 2); _local3.y = _arg1.spritewidth; _arg1.sprite.addChild(_local3); }; _arg1.sprite.star.level.text = _arg1.upgradeLevel; if (isUnitInSelection(_arg1)){ updateMenu(); }; menu.resources.update(); } public function deselectUnit(_arg1:Unit):void{ var _local2:int; if (selectedUnits.length > 0){ if (isSelectedUnit(_arg1)){ _arg1.sprite.select(0, false); selectedUnits.length = 0; actions.clear(true); } else { _local2 = 0; while (_local2 < selectedUnits.length) { if (selectedUnits[_local2] == _arg1){ _arg1.sprite.select(0, false); selectedUnits.splice(_local2, 1); break; } else { _local2++; }; }; }; updateMenu(); }; } public function upgradeUnitToLevel(_arg1:Unit, _arg2:int):void{ var _local3:int; _local3 = 0; while (_local3 < _arg2) { upgradeUnit(_arg1); _local3++; }; } public function endSelection():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; var _local5:Array; events.selecting = false; selshape.graphics.clear(); _local1 = (events.downPoint.x - mapstage.mouseX); _local2 = (events.downPoint.y - mapstage.mouseY); if ((((_local1 == 0)) || ((_local2 == 0)))){ return; }; _local3 = events.downPoint.x; _local4 = events.downPoint.y; if (_local2 > 0){ _local4 = mapstage.mouseY; }; if (_local1 > 0){ _local3 = mapstage.mouseX; }; _local5 = new Array(); my.camp.getUnderSelection(Math.floor(((_local3 / Consts.cellsize) + 0.5)), Math.floor(((_local4 / Consts.cellsize) + 0.5)), Math.floor(((Math.abs(_local1) / Consts.cellsize) + 0.5)), Math.floor(((Math.abs(_local2) / Consts.cellsize) + 0.5)), _local5); if (_local5.length > 0){ deselectUnits(); selectedUnits = _local5; updateMenu(); }; } public function pause():void{ if (!paused){ log("Paused..."); events.unregister(); if (scenario){ scenario.thinktimer.stop(); }; } else { logmsg.pop(); updateLog(); events.register(); if (scenario){ scenario.thinktimer.start(); }; }; paused = !(paused); } private function cleanGoals():void{ var _local1:int; _local1 = 0; while (_local1 < goals.length) { if (!goals[_local1].active){ delete goals[_local1]; goals.splice(_local1, 1); } else { _local1++; }; }; } } }//package fai
Section 12
//GameActions (fai.GameActions) package fai { public class GameActions { private var engine:Engine;// = null public var currentAction:String;// = "" public var unitAction:String;// = "" public function GameActions(_arg1:Engine):void{ engine = null; currentAction = ""; unitAction = ""; super(); engine = _arg1; } public function doUnitAction():void{ var _local1:Position; _local1 = new Position(Math.floor(((engine.mapstage.mouseX / Consts.cellsize) + 0.5)), Math.floor(((engine.mapstage.mouseY / Consts.cellsize) + 0.5))); switch (unitAction){ case UnitTypes.battack: engine.my.attackTarget(_local1); break; }; clear(true); engine.updateMenu(); } private function buildConstruction(_arg1:String, _arg2:String):void{ engine.deselectUnits(); if (!engine.isMoneyEnough(_arg2)){ engine.log("Not enough resources"); return; }; engine.menu.buttons.action(); engine.createBuildingCursor(_arg2); currentAction = _arg1; } public function doCurrentAction():void{ var _local1:Position; var _local2:Unit; var _local3:AtomicBomb; _local1 = new Position(Math.floor(((engine.mapstage.mouseX / Consts.cellsize) + 0.5)), Math.floor(((engine.mapstage.mouseY / Consts.cellsize) + 0.5))); _local2 = engine.getUnitUnder(_local1); if (((!(_local2)) && (!((currentAction == UnitTypes.batomicbomb))))){ engine.log("This is not a unit."); return; }; switch (currentAction){ case UnitTypes.batomicbomb: engine.uranium = (engine.uranium - Consts.abombcost); _local3 = new AtomicBomb(_local1, engine); engine.bulletlayer.addChild(_local3); _local3.start(); engine.goals.push(new AtomicBombGoal(engine, _local3)); engine.score = (engine.score + 250); engine.menu.stat.iuranspent = (engine.menu.stat.iuranspent + Consts.abombcost); break; }; clear(true); engine.updateMenu(); engine.menu.resources.update(); } public function clear(_arg1:Boolean=false):void{ currentAction = ""; if (_arg1){ unitAction = ""; }; engine.customcursor.enable(false); } private function effectAction(_arg1:int, _arg2:String):void{ if (engine.uranium < _arg1){ engine.log("Not enough uranium"); return; }; engine.menu.buttons.action(); currentAction = _arg2; engine.customcursor.enable(true); } public function endAction():void{ switch (currentAction){ case UnitTypes.blcannon: cancelBuildingConstruction(UnitTypes.lightcannon); break; case UnitTypes.bhcannon: cancelBuildingConstruction(UnitTypes.heavycannon); break; case UnitTypes.bmissileturret: cancelBuildingConstruction(UnitTypes.missileturret); break; case UnitTypes.bbdg: cancelBuildingConstruction(UnitTypes.bdg); break; case UnitTypes.burefinery: cancelBuildingConstruction(UnitTypes.urefinery); break; case UnitTypes.bmortar: cancelBuildingConstruction(UnitTypes.mortar); break; case UnitTypes.bhowitzer: cancelBuildingConstruction(UnitTypes.howitzer); break; default: clear(true); break; }; engine.updateMenu(); } public function buttonCommand(_arg1:String):void{ switch (_arg1){ case UnitTypes.blcannon: buildConstruction(_arg1, UnitTypes.lightcannon); break; case UnitTypes.bhcannon: buildConstruction(_arg1, UnitTypes.heavycannon); break; case UnitTypes.bmissileturret: buildConstruction(_arg1, UnitTypes.missileturret); break; case UnitTypes.bbdg: buildConstruction(_arg1, UnitTypes.bdg); break; case UnitTypes.burefinery: buildConstruction(_arg1, UnitTypes.urefinery); break; case UnitTypes.bmortar: buildConstruction(_arg1, UnitTypes.mortar); break; case UnitTypes.bhowitzer: buildConstruction(_arg1, UnitTypes.howitzer); break; case UnitTypes.batomicbomb: effectAction(Consts.abombcost, _arg1); break; case UnitTypes.battack: engine.menu.buttons.action(); unitAction = _arg1; engine.customcursor.enable(true); break; case UnitTypes.bstop: engine.my.stopUnits(); break; case UnitTypes.bcancel: endAction(); break; }; } private function cancelBuildingConstruction(_arg1:String):void{ var type = _arg1; var _local3 = engine; with (_local3) { if (ccursor){ removeBuildCursor(); }; }; clear(); } } }//package fai
Section 13
//GameButtons (fai.GameButtons) package fai { import flash.display.*; import flash.events.*; public class GameButtons extends Sprite { private var tooltip:TooltipPanel;// = null public var engine:Engine;// = null public var buttons:Map;// = null private var container:Sprite;// = null public var selectedUnit:Unit;// = null public function GameButtons(_arg1:Engine):void{ engine = null; tooltip = null; buttons = null; container = null; selectedUnit = null; super(); engine = _arg1; buttons = new Map(); } public function onoutbutton(_arg1:MouseEvent):void{ if ((_arg1.currentTarget is ButtonSprite)){ _arg1.currentTarget.select(false); selectedUnit = null; engine.menu.updateInfo(); tooltip.visible = false; }; } public function create():void{ var _local1:int; var _local2:ButtonSprite; var _local3:int; container = new Sprite(); addChild(container); container.x = 2; container.y = 2; _local1 = 45; _local2 = null; _local2 = createButton(UnitTypes.burefinery, false, "7"); _local2.x = ((_local1 + 1) * 3); _local2 = createButton(UnitTypes.blcannon, false, "1"); _local2 = createButton(UnitTypes.bhcannon, false, "2"); _local2.x = (_local1 + 1); _local2 = createButton(UnitTypes.bhowitzer, false, "3"); _local2.x = ((_local1 + 1) * 2); _local2 = createButton(UnitTypes.bmissileturret, false, "4"); _local2.y = (_local1 + 1); _local2 = createButton(UnitTypes.bmortar, false, "5"); _local2.y = (_local1 + 1); _local2.x = (_local1 + 1); _local2 = createButton(UnitTypes.bbdg, false, "6"); _local2.x = ((_local1 + 1) * 2); _local2.y = (_local1 + 1); _local3 = 447; _local2 = createButton(UnitTypes.bstop, true, "S"); _local2.x = (_local1 + 1); _local2.y = ((_local1 + 1) * 2); _local2 = createButton(UnitTypes.battack, true, "A"); _local2.x = ((_local1 + 1) * 2); _local2.y = ((_local1 + 1) * 2); _local2 = createButton(UnitTypes.bcancel, true); _local2.x = ((_local1 + 1) * 2); _local2.y = ((_local1 + 1) * 2); _local2 = createButton(UnitTypes.batomicbomb); _local2.y = _local3; showButtons(UnitTypes.cc); tooltip = new TooltipPanel(engine); tooltip.y = 450; tooltip.x = 50; tooltip.visible = false; addChild(tooltip); } public function onclick(_arg1:MouseEvent):void{ if (engine.paused){ return; }; if ((_arg1.target is ButtonSprite)){ engine.actions.buttonCommand(_arg1.target.type); }; } public function onoverbutton(_arg1:MouseEvent):void{ if ((_arg1.currentTarget is ButtonSprite)){ _arg1.currentTarget.select(true); showTooltip(_arg1.target.type); selectedUnit = engine.utypes.units[engine.utypes.buttonToUnit[_arg1.currentTarget.type]]; if (selectedUnit){ engine.menu.updateInfo(); }; }; } public function action():void{ hideButtons(); buttons.get(UnitTypes.bcancel).visible = true; } private function createButton(_arg1:String, _arg2:Boolean=false, _arg3:String=""):ButtonSprite{ var _local4:AnimatedBitmap; var _local5:ButtonSprite; _local4 = engine.sloader.getButton(_arg1); _local5 = new ButtonSprite(_arg1, _local4); _local5.addEventListener(MouseEvent.CLICK, onclick); _local5.addEventListener(MouseEvent.MOUSE_OVER, onoverbutton); _local5.addEventListener(MouseEvent.MOUSE_OUT, onoutbutton); container.addChild(_local5); if (_arg3 != ""){ _local5.makeHotKey(_arg3); }; if (_arg2){ _local5.visible = false; buttons.add(_arg1, _local5); }; return (_local5); } public function showTooltip(_arg1:String):void{ switch (_arg1){ case UnitTypes.batomicbomb: tooltip.showr("Nuclear Bomb (V)", Consts.abombcost); break; }; } public function showButtons(_arg1:String):void{ hideButtons(); switch (_arg1){ default: if (!engine.utypes.params(_arg1).building){ buttons.get(UnitTypes.bstop).visible = true; if (!engine.utypes.params(_arg1).peaceful){ buttons.get(UnitTypes.battack).visible = true; }; } else { if (engine.utypes.params(_arg1).damage != 0){ buttons.get(UnitTypes.battack).visible = true; buttons.get(UnitTypes.bstop).visible = true; }; }; break; }; } public function hideButtons():void{ var _local1:ButtonSprite; for each (_local1 in buttons.values) { _local1.visible = false; }; } } }//package fai import flash.display.*; import flash.text.*; class ButtonSprite extends Sprite { private var shaped:Shape; public var type:String;// = null private var shapes:Shape; private function ButtonSprite(_arg1:String, _arg2:AnimatedBitmap):void{ type = null; shaped = new Shape(); shapes = new Shape(); super(); Utils.drawRect(shaped, 2, 532555, 8954319, _arg2.width, _arg2.height, true); shaped.alpha = 0.5; addChild(shaped); shapes.visible = false; Utils.drawRect(shapes, 2, 532555, 14998899, _arg2.width, _arg2.height, true); shapes.alpha = 0.5; addChild(shapes); type = _arg1; addChild(_arg2); } public function select(_arg1:Boolean):void{ shaped.visible = !(_arg1); shapes.visible = _arg1; } public function makeHotKey(_arg1:String):void{ var _local2:TextField; _local2 = Utils.createTextField(0xFFFFFF); _local2.text = _arg1; addChild(_local2); } } class TooltipPanel extends Sprite { private var etext:TextField;// = null private var resources:Sprite;// = null private var urant:TextField;// = null private var energy:Sprite;// = null private var tip:TextField;// = null private function TooltipPanel(_arg1):void{ var _local2:Shape; var _local3:AnimatedBitmap; tip = null; resources = null; energy = null; urant = null; etext = null; super(); _local2 = new Shape(); Utils.drawRect(_local2, 1, GameMenu.borderColor, 4086184, 130, 40); addChild(_local2); alpha = 0.8; _local3 = _arg1.sloader.getMenuItem(UnitTypes.miuranium); _local3.x = 5; _local3.y = 20; urant = Utils.createTextField(0xFF00, 10); urant.x = ((_local3.x + _local3.width) + 5); urant.y = 20; energy = new Sprite(); etext = Utils.createTextField(0xFF00, 10); etext.x = 5; etext.y = 20; energy.addChild(etext); addChild(energy); resources = new Sprite(); resources.addChild(_local3); resources.addChild(urant); addChild(resources); tip = Utils.createTextField(0xFFFFFF, 10); addChild(tip); } public function showr(_arg1:String, _arg2:int):void{ visible = true; tip.text = _arg1; resources.visible = true; energy.visible = false; urant.text = _arg2.toString(); } }
Section 14
//GameEvents (fai.GameEvents) package fai { import flash.events.*; import flash.utils.*; import flash.ui.*; public class GameEvents { private var engine:Engine;// = null public var downPoint:Position; public var dragging:Boolean;// = false public var mouseWithinMap:Boolean;// = false public var logTimer:Timer;// = null public var selecting:Boolean;// = false public var cursorpos:Position; public function GameEvents(_arg1:Engine):void{ engine = null; mouseWithinMap = false; dragging = false; selecting = false; downPoint = new Position(); cursorpos = new Position(); logTimer = null; super(); engine = _arg1; } public function unregister():void{ engine.globalstage.removeEventListener(Event.ENTER_FRAME, engine.tick); engine.globalstage.stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); engine.mapstage.removeEventListener(MouseEvent.MOUSE_MOVE, onmoving); engine.mapstage.removeEventListener(MouseEvent.MOUSE_DOWN, onmousedown); engine.mapstage.removeEventListener(MouseEvent.MOUSE_UP, onmouseup); engine.mapstage.removeEventListener(MouseEvent.MOUSE_OUT, onmapmouseout); engine.mapstage.removeEventListener(MouseEvent.MOUSE_OVER, onmapmouseover); if (logTimer){ logTimer.removeEventListener(TimerEvent.TIMER, logHandler); logTimer.stop(); logTimer = null; }; } private function onmouseup(_arg1:MouseEvent):void{ dragging = false; if (selecting){ engine.endSelection(); }; } private function onmapmouseover(_arg1:MouseEvent):void{ mouseWithinMap = true; if (engine.ccursor){ engine.ccursor.visible = true; }; } private function onKeyDown(_arg1:KeyboardEvent):void{ if ((((32 == _arg1.charCode)) || ((Keyboard.ESCAPE == _arg1.keyCode)))){ engine.removeBuildCursor(); engine.actions.clear(); engine.updateMenu(); } else { switch (_arg1.charCode){ case 49: buildInCC(UnitTypes.blcannon); break; case 50: buildInCC(UnitTypes.bhcannon); break; case 51: buildInCC(UnitTypes.bhowitzer); break; case 52: buildInCC(UnitTypes.bmissileturret); break; case 53: buildInCC(UnitTypes.bmortar); break; case 54: buildInCC(UnitTypes.bbdg); break; case 55: buildInCC(UnitTypes.burefinery); break; case 86: case 118: engine.actions.clear(true); engine.actions.buttonCommand(UnitTypes.batomicbomb); engine.updateMenu(); break; case 65: case 97: if ((((engine.selectedUnits.length > 0)) && (!((engine.selectedUnits[0].mapid == Consts.hostileId))))){ engine.actions.clear(true); engine.actions.buttonCommand(UnitTypes.battack); engine.updateMenu(); }; break; case 83: case 115: if ((((engine.selectedUnits.length > 0)) && (!((engine.selectedUnits[0].mapid == Consts.hostileId))))){ engine.actions.clear(true); engine.actions.buttonCommand(UnitTypes.bstop); engine.updateMenu(); }; break; default: engine.menu.onMenuKeyDown(_arg1.charCode); break; }; }; } public function onmousedown(_arg1:MouseEvent):void{ var building:*; var selunit:Unit; var event = _arg1; downPoint.x = engine.mapstage.mouseX; downPoint.y = engine.mapstage.mouseY; if (engine.ccursor != null){ var _local3 = engine; with (_local3) { if (paused){ return; }; if (ccursor.isGood()){ if (!isMoneyEnough(ccursor.type)){ log("Not enough resources"); return; }; uranium = (uranium - ccursor.costuran); menu.stat.iuranspent = (menu.stat.iuranspent + ccursor.costuran); menu.stat.ibuilt++; building = buildUnit(ccursor.type, (mapstage.mouseX / Consts.cellsize), (mapstage.mouseY / Consts.cellsize), true); engine.actions.clear(); removeBuildCursor(); updateMenu(); menu.resources.update(); }; }; return; }; if (engine.actions.unitAction != ""){ engine.actions.doUnitAction(); } else { if (((!((engine.actions.currentAction == ""))) && ((engine.actions.currentAction == UnitTypes.batomicbomb)))){ engine.actions.doCurrentAction(); } else { if (event.shiftKey){ dragging = true; } else { selunit = engine.my.camp.getUnder(downPoint); if (!selunit){ selunit = engine.comp.camp.getUnder(downPoint); if (!selunit){ selunit = engine.resources.getUnder(downPoint); }; }; if (selunit){ if (((((!(event.ctrlKey)) || ((selunit.mapid == Consts.hostileId)))) || ((((engine.selectedUnits.length > 0)) && ((engine.selectedUnits[0].mapid == Consts.hostileId)))))){ engine.deselectUnits(); } else { if (((event.ctrlKey) && (engine.isUnitInSelection(selunit)))){ engine.deselectUnit(selunit); return; }; }; engine.selectedUnits.push(selunit); engine.updateMenu(); } else { selecting = true; }; }; }; }; } public function buildInCC(_arg1:String):void{ engine.actions.buttonCommand(_arg1); engine.checkCursor(); } public function register():void{ engine.globalstage.addEventListener(Event.ENTER_FRAME, engine.tick); engine.globalstage.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); engine.globalstage.stage.addEventListener(MouseEvent.MOUSE_MOVE, onmoving); engine.mapstage.addEventListener(MouseEvent.MOUSE_DOWN, onmousedown); engine.mapstage.addEventListener(MouseEvent.MOUSE_UP, onmouseup); engine.mapstage.addEventListener(MouseEvent.MOUSE_OUT, onmapmouseout); engine.mapstage.addEventListener(MouseEvent.MOUSE_OVER, onmapmouseover); logTimer = new Timer(3000, 0); logTimer.addEventListener(TimerEvent.TIMER, logHandler); if (engine.logmsg.length > 0){ logTimer.start(); }; } private function logHandler(_arg1:TimerEvent):void{ if (engine.logmsg.length > 0){ engine.logmsg.shift(); engine.updateLog(); if (!engine.logmsg.length){ logTimer.stop(); }; }; } private function onmoving(_arg1:MouseEvent):void{ cursorpos.x = _arg1.stageX; cursorpos.y = _arg1.stageY; engine.checkCursor(); if (engine.customcursor.enabled){ engine.customcursor.x = cursorpos.x; engine.customcursor.y = cursorpos.y; }; if (selecting){ if (!_arg1.buttonDown){ engine.endSelection(); return; }; engine.selshape.graphics.clear(); engine.selshape.graphics.lineStyle(1, 0xFF00); engine.selshape.graphics.drawRect(downPoint.x, downPoint.y, -((downPoint.x - engine.mapstage.mouseX)), -((downPoint.y - engine.mapstage.mouseY))); }; } private function onmapmouseout(_arg1:MouseEvent):void{ mouseWithinMap = false; if (engine.ccursor){ engine.ccursor.visible = false; }; } public function isSelectedType(_arg1:String):Boolean{ if (engine.selectedUnits.length != 1){ return (false); }; return ((engine.selectedUnits[0].type == _arg1)); } } }//package fai
Section 15
//GameMenu (fai.GameMenu) package fai { import flash.display.*; import flash.events.*; import flash.text.*; import mochi.*; import flash.utils.*; import flash.net.*; public dynamic class GameMenu extends Sprite { private var acceptCodes:Boolean;// = false public var resources:Resources;// = null private var intomainmenubutton:WebButton;// = null private var engine:Engine;// = null public var stat:Statistics;// = null public var announce:Announce;// = null private var intro:Intro;// = null public var uinfo:UnitInfoPanel;// = null public var pausebutton:WebButton;// = null public var startmenu:StartMenu;// = null private var ararray:Array;// = null private var menuparent:Sprite;// = null private var submitform:SubmitHighscores;// = null private var aboutbutton:WebButton;// = null public var volume:Number;// = 1 private var isFunMode:Boolean;// = false public var introholder:Sprite;// = null public var levelmap:Sprite;// = null private var buttonsparent:Sprite;// = null public var buttons:GameButtons;// = null private var areas:Areas;// = null private var about:About;// = null public var currentArea:int;// = 0 private var ilp:InterlevelPopup;// = null private var volbutton:WebButton;// = null private var ilptimer:Timer;// = null public static const fillColor:int = 8954319; public static const borderColor:int = 532555; public function GameMenu(_arg1:Engine):void{ engine = null; menuparent = null; buttonsparent = null; pausebutton = null; aboutbutton = null; volbutton = null; announce = null; about = null; startmenu = null; stat = null; volume = 1; resources = null; buttons = null; uinfo = null; acceptCodes = false; ararray = null; currentArea = 0; levelmap = null; areas = null; introholder = null; intro = null; intomainmenubutton = null; ilp = null; ilptimer = null; isFunMode = false; submitform = null; super(); engine = _arg1; engine.menu = this; engine.globalstage.addChild(this); } public function victory():void{ if (engine.currentMap.data.@number == currentArea){ currentArea++; saveLocally(); }; stat.playnext.visible = (currentArea < 15); stat.caption.text = "Victory!!!"; stat.keepplaying.visible = true; stat.iscore = engine.score; stat.update(); engine.pause(); stat.visible = true; submitform.visible = false; } private function onsavescore(_arg1:MouseEvent):void{ submitform.visible = true; submitform.msg.visible = false; } public function onmenu1():void{ if (about.visible){ return; }; if (startmenu.visible){ resumegame(null); return; }; if (stat.visible){ stat.visible = false; submitform.visible = false; startmenu.visible = true; startmenu.cdl.visible = true; startmenu.resumegame.visible = false; introholder.visible = true; hide(); return; }; if (levelmap.visible){ startmenu.cdl.visible = false; startmenu.visible = true; introholder.visible = true; levelmap.visible = false; hide(); return; }; engine.pause(); startmenu.resumegame.visible = true; startmenu.cdl.visible = false; startmenu.visible = true; introholder.visible = true; hide(); } public function onplaymoregames(_arg1:MouseEvent):void{ var _local2:String; var _local3:URLRequest; _local2 = "http://www.yougame.com"; _local3 = new URLRequest(_local2); navigateToURL(_local3, "_top"); } private function ilpaHandler(_arg1:TimerEvent):void{ if (ilp.alpha < 1){ ilp.alpha = (ilp.alpha + 0.1); } else { ilptimer.stop(); ilptimer.removeEventListener(TimerEvent.TIMER, ilpaHandler); ilptimer = null; }; } public function victory1():void{ stat.visible = true; } public function createParents():void{ var menuback:Shape; var menuwidth:int; var buttonswidth:int; var bshape:Shape; menuparent = new Sprite(); menuback = new Shape(); addChild(menuparent); menuparent.addChild(menuback); menuwidth = 186; menuback.alpha = 0.3; Utils.drawRect(menuback, 1, 0x666666, 0xEAEAEA, menuwidth, engine.gameheight); menuparent.x = (engine.gamewidth - menuwidth); menuback.alpha = 0.3; buttonsparent = new Sprite(); buttonswidth = 141; bshape = new Shape(); var _local2 = bshape; with (_local2) { graphics.lineStyle(1, 3957386); graphics.beginFill(10993365); graphics.drawRoundRect(1, 0, (menuwidth - 2), 141, 20, 20); graphics.endFill(); }; bshape.alpha = 0.3; buttonsparent.addChild(bshape); buttonsparent.y = 105; menuparent.addChild(buttonsparent); } public function loadLocally():void{ var _local1:*; _local1 = SharedObject.getLocal("StormAD"); currentArea = _local1.data.currentArea; } private function closeIlp(_arg1:MouseEvent):void{ ilp.visible = false; } private function startCurrentRegion(_arg1:MouseEvent):void{ levelmap.visible = false; engine.loadMap(engine.sloader.maps.get(currentArea)); engine.restart(); show(); } private function areaDown(_arg1:MouseEvent):void{ if (_arg1.currentTarget.areaIndex > currentArea){ return; }; levelmap.visible = false; engine.loadMap(engine.sloader.maps.get(_arg1.currentTarget.areaIndex)); engine.restart(); show(); isFunMode = false; } private function onButtonDestroy(_arg1:MouseEvent):void{ while (engine.selectedUnits.length) { engine.addResources((engine.selectedUnits[0].costuran / 5)); engine.destroyUnit(engine.selectedUnits[0]); }; } private function onButtonRepair(_arg1:MouseEvent):void{ var _local2:int; _local2 = 0; _local2 = 0; while (_local2 < engine.selectedUnits.length) { engine.selectedUnits[_local2].life.repair(); _local2++; }; } private function createButtons():void{ var _local1:int; _local1 = 0xFFFFFF; volbutton = new WebButton("volume: 100%", 90, 20, 20, _local1, 10, 25, false); volbutton.y = 38; volbutton.x = 1; volbutton.addEventListener(MouseEvent.MOUSE_DOWN, onvolume); menuparent.addChild(volbutton); aboutbutton = new WebButton("Menu", 85, 20, 20, _local1, 10, 25, false); aboutbutton.y = 38; aboutbutton.x = 100; aboutbutton.addEventListener(MouseEvent.MOUSE_DOWN, onmenu); menuparent.addChild(aboutbutton); aboutbutton = new WebButton("Restart", 85, 20, 20, _local1, 10, 25, false); aboutbutton.y = 60; aboutbutton.x = 100; aboutbutton.addEventListener(MouseEvent.MOUSE_DOWN, onrestart); menuparent.addChild(aboutbutton); } private function onButtonUpgrade(_arg1:MouseEvent):void{ var _local2:int; var _local3:Unit; var _local4:int; _local2 = 0; _local2 = 0; while (_local2 < engine.selectedUnits.length) { _local3 = engine.utypes.params(engine.selectedUnits[_local2].type); _local4 = ((_local3.costuran * 0.5) * (engine.selectedUnits[_local2].upgradeLevel + 1)); if (engine.uranium < _local4){ engine.log("Not enough uranium"); } else { engine.uranium = (engine.uranium - _local4); engine.upgradeUnit(engine.selectedUnits[_local2]); }; _local2++; }; } public function create():void{ createStartMenu(); createParents(); buttons = new GameButtons(engine); buttonsparent.addChild(buttons); buttons.create(); uinfo = new UnitInfoPanel(engine); menuparent.addChild(uinfo); uinfo.y = 250; resources = new Resources(engine); engine.globalstage.addChild(resources); resources.x = ((engine.gamewidth - resources.width) + 10); createButtons(); createMenus(); } public function show():void{ visible = true; resources.visible = true; announce.visible = true; } private function areaOver(_arg1:MouseEvent):void{ if (_arg1.currentTarget.areaIndex > currentArea){ _arg1.currentTarget.gotoAndStop("closed"); } else { _arg1.currentTarget.gotoAndStop("opened"); }; if (_arg1.currentTarget.areaIndex == currentArea){ areas.attackflash.visible = false; }; showInfo(_arg1.currentTarget.areaIndex); } private function onplaynext(_arg1:MouseEvent):void{ stat.visible = false; submitform.visible = false; hide(); newgame(null); showInfo(currentArea); } public function onabout(_arg1:MouseEvent):void{ if (((startmenu.visible) || (stat.visible))){ return; }; engine.pause(); about.visible = !(about.visible); } public function updateInfo():void{ var _local1:Array; var _local2:Unit; var _local3:int; var _local4:int; var _local5:int; var _local6:int; uinfo.visible = false; unregisterButtons(); if (!buttons.selectedUnit){ _local1 = engine.selectedUnits; if (_local1.length > 0){ uinfo.visible = true; uinfo.showAbout(_local1[0], (_local1[0].mapid == Consts.hostileId)); if (_local1[0].mapid != Consts.hostileId){ registerButtons(); uinfo.upgradeButton.visible = !(_local1[0].peaceful); _local2 = null; _local3 = 0; _local4 = 0; _local5 = 0; _local6 = 0; while (_local6 < _local1.length) { _local2 = engine.utypes.params(_local1[_local6].type); _local3 = (_local3 + RepairGoal.rcost(engine, _local1[_local6])); _local4 = (_local4 + (_local1[_local6].costuran / 5)); _local5 = (_local5 + ((_local2.costuran * 0.5) * (_local1[_local6].upgradeLevel + 1))); _local6++; }; uinfo.upgradeButton.txt.text = (("Upgrade (U) - " + _local5.toString()) + " uran."); uinfo.repairButton.txt.text = (("Repair (R) - " + _local3.toString()) + " uran."); uinfo.destroyButton.txt.text = (("Sell for " + _local4.toString()) + " uran."); if (_local1.length > 1){ uinfo.title.text = (("Selected: " + _local1.length) + " units"); }; }; }; } else { uinfo.visible = true; uinfo.showAbout(buttons.selectedUnit, (buttons.selectedUnit.mapid == Consts.hostileId)); }; } public function showMap():void{ var _local1:*; var _local2:int; var _local3:Boolean; _local1 = null; _local2 = 0; _local3 = false; areas.attackflash.visible = false; areas.attackflash.stop(); ilp.visible = false; _local2 = 0; while (_local2 < ararray.length) { _local1 = ararray[_local2]; if (_local2 < currentArea){ _local1.gotoAndStop("blue"); } else { if (_local2 == currentArea){ _local1.gotoAndStop("orange"); areas.attackflash.visible = true; areas.attackflash.x = (_local1.x + (_local1.width / 2)); areas.attackflash.y = (_local1.y + (_local1.height / 2)); if (6 == currentArea){ areas.attackflash.x = (areas.attackflash.x + 50); }; areas.attackflash.play(); _local3 = true; } else { _local1.gotoAndStop("red"); }; }; _local2++; }; levelmap.visible = true; if (_local3){ if (ilptimer){ ilptimer.stop(); ilptimer.removeEventListener(TimerEvent.TIMER, ilpaHandler); ilptimer = null; }; ilptimer = new Timer(100, 0); ilptimer.addEventListener(TimerEvent.TIMER, ilpaHandler); ilptimer.start(); ilp.alpha = 0; ilp.visible = true; }; } private function onnotsavescore(_arg1:MouseEvent):void{ submitform.visible = false; } public function hide():void{ visible = false; resources.visible = false; announce.visible = false; } private function createStartMenu():void{ var ar:*; var i:int; var wb:WebButton; levelmap = new Sprite(); engine.globalstage.addChild(levelmap); levelmap.addChild(engine.sloader.getGround("themap.jpg")); areas = new Areas(); areas.x = 410; areas.y = 385; levelmap.addChild(areas); introholder = new Sprite(); intro = new Intro(); intro.x = 400; intro.y = 300; introholder.addChild(engine.sloader.getGround("themap.jpg")); introholder.addChild(intro); engine.globalstage.addChild(introholder); intomainmenubutton = new WebButton("Main Menu", 130, 30, 25, 0xFFFFFF, 12, 25); intomainmenubutton.y = 10; intomainmenubutton.x = 650; intomainmenubutton.addEventListener(MouseEvent.MOUSE_DOWN, onmenu); levelmap.addChild(intomainmenubutton); var _local2 = areas; with (_local2) { ararray = [ar1, ar2, ar3, ar4, ar5, ar6, ar7, ar8, ar9, ar10, ar11, ar12, ar13, ar14, ar15]; }; ar = null; i = 0; i = 0; while (i < ararray.length) { ar = ararray[i]; ar.areaIndex = i; ar.addEventListener(MouseEvent.MOUSE_OVER, areaOver); ar.addEventListener(MouseEvent.MOUSE_OUT, areaOut); ar.addEventListener(MouseEvent.MOUSE_DOWN, areaDown); i = (i + 1); }; startmenu = new StartMenu(engine); introholder.addChild(startmenu); startmenu.x = 530; startmenu.y = 275; startmenu.resumegame.addEventListener(MouseEvent.CLICK, resumegame); startmenu.newgame.addEventListener(MouseEvent.CLICK, newgame); startmenu.funmode.addEventListener(MouseEvent.CLICK, funmode); startmenu.playmoregames.addEventListener(MouseEvent.CLICK, onplaymoregames); startmenu.wallOfFame.addEventListener(MouseEvent.CLICK, onwallFame); startmenu.onSite.addEventListener(MouseEvent.CLICK, onplaymoregames); ilp = new InterlevelPopup(); ilp.x = 430; ilp.y = 300; ilp.visible = false; levelmap.addChild(ilp); wb = new WebButton("Start!", 110, 30, 23, 0xFF6600, 14, 25, false); wb.x = -50; wb.y = 80; wb.addEventListener(MouseEvent.MOUSE_DOWN, startCurrentRegion); ilp.addChild(wb); ilp.closebutton.addEventListener(MouseEvent.MOUSE_DOWN, closeIlp); } public function reset():void{ stat.reset(); if (announce){ engine.globalstage.removeChild(announce); }; announce = new Announce(engine); engine.globalstage.addChildAt(announce, 2); } public function showInfo(_arg1:int):void{ var _local2:TextFormat; var _local3:LevelMap; var _local4:String; _local2 = null; if (_arg1 > 14){ _arg1 = 14; }; _local3 = engine.sloader.maps.get(_arg1); _local4 = (((("Region #" + (_arg1 + 1).toString()) + ". ") + _local3.title) + "."); _local2 = areas.title.defaultTextFormat; _local2.bold = true; if (_arg1 > currentArea){ _local4 = (_local4 + ((" (area #" + (currentArea + 1).toString()) + " is not defended)")); _local2.color = 0xFF0000; } else { _local2.color = 6724095; }; areas.title.defaultTextFormat = _local2; areas.title.text = _local4; areas.desc.text = _local3.desc; _local2 = areas.waves.defaultTextFormat; _local2.bold = true; areas.waves.defaultTextFormat = _local2; areas.waves.text = (("You must survive in " + _local3.nechelons.toString()) + " waves"); } private function onrestart(_arg1:MouseEvent):void{ var evt = _arg1; if (about.visible){ return; }; var _local3 = engine; with (_local3) { loadMap(currentMap); if (isFunMode){ engine.nechelons = 99999; engine.uranium = 1500; }; restart(); }; } public function createMenus():void{ var _local1:WebButton; about = new About(); engine.globalstage.addChildAt(about, 2); about.x = 250; about.y = 80; about.closebutton.addEventListener(MouseEvent.CLICK, onabout); stat = new Statistics(); stat.mainmenu.addEventListener(MouseEvent.CLICK, onmenu); stat.restart.addEventListener(MouseEvent.CLICK, onrestart); stat.savescore.addEventListener(MouseEvent.CLICK, onsavescore); stat.playnext.addEventListener(MouseEvent.CLICK, onplaynext); stat.keepplaying.addEventListener(MouseEvent.CLICK, onkeepplaying); engine.globalstage.addChild(stat); stat.visible = false; stat.x = 280; stat.y = 100; submitform = new SubmitHighscores(); submitform.msg.visible = false; submitform.visible = false; stat.addChild(submitform); submitform.x = 110; submitform.y = 230; _local1 = new WebButton("Submit Score", 100, 25, 20, 0xFFFFFF, 11, 25, false); _local1.x = -113; _local1.y = 47; submitform.addChild(_local1); _local1.addEventListener(MouseEvent.CLICK, ondosavescore); _local1 = new WebButton("No Thanks", 80, 25, 20, 0xFFFFFF, 11, 25, false); _local1.x = 17; _local1.y = 47; submitform.addChild(_local1); _local1.addEventListener(MouseEvent.CLICK, onnotsavescore); reset(); } function onwallFame(_arg1:MouseEvent){ var me = _arg1; MochiScores.showLeaderboard({boardID:"bca8c7044a0d5505", onClose:function (){ }}); } public function registerButtons():void{ uinfo.destroyButton.visible = true; uinfo.repairButton.visible = true; uinfo.upgradeButton.visible = true; uinfo.destroyButton.addEventListener(MouseEvent.CLICK, onButtonDestroy); uinfo.repairButton.addEventListener(MouseEvent.CLICK, onButtonRepair); uinfo.upgradeButton.addEventListener(MouseEvent.CLICK, onButtonUpgrade); acceptCodes = true; } public function showIntro():void{ introholder.visible = true; } public function newgame(_arg1:MouseEvent):void{ var _local2:LevelMap; var _local3:TextFormat; startmenu.visible = false; introholder.visible = false; showMap(); showInfo(currentArea); levelmap.visible = true; if (currentArea < 15){ _local2 = engine.sloader.maps.get(currentArea); _local3 = ilp.title.defaultTextFormat; _local3.bold = true; ilp.title.defaultTextFormat = _local3; ilp.title.text = (((("Region #" + (currentArea + 1).toString()) + " ") + _local2.title) + " is occupied by the norad forces. We must protect it..."); _local3 = ilp.subtitle.defaultTextFormat; _local3.bold = true; _local3.italic = true; ilp.subtitle.defaultTextFormat = _local3; ilp.subtitle.text = (("You must withstand " + _local2.nechelons.toString()) + " waves"); }; } public function resumegame(_arg1:MouseEvent):void{ startmenu.visible = false; introholder.visible = false; show(); if (engine.paused){ engine.pause(); }; } public function funmode(_arg1:MouseEvent):void{ var _local2:int; startmenu.visible = false; introholder.visible = false; levelmap.visible = false; _local2 = (Math.random() * 15); if (_local2 >= 15){ _local2 = 10; }; engine.loadMap(engine.sloader.maps.get(_local2)); engine.nechelons = 99999; engine.uranium = 1500; engine.restart(); show(); isFunMode = true; } public function unregisterButtons():void{ uinfo.destroyButton.visible = false; uinfo.repairButton.visible = false; uinfo.upgradeButton.visible = false; uinfo.destroyButton.removeEventListener(MouseEvent.CLICK, onButtonDestroy); uinfo.repairButton.removeEventListener(MouseEvent.CLICK, onButtonRepair); uinfo.upgradeButton.addEventListener(MouseEvent.CLICK, onButtonUpgrade); acceptCodes = false; } public function onvolume(_arg1:MouseEvent):void{ if (volume >= 1){ volume = 0; } else { volume = (volume + 0.25); }; volbutton.txt.text = (("volume: " + (volume * 100)) + "%"); } private function areaOut(_arg1:MouseEvent):void{ if (_arg1.currentTarget.areaIndex < currentArea){ _arg1.currentTarget.gotoAndStop("blue"); } else { if (_arg1.currentTarget.areaIndex == currentArea){ _arg1.currentTarget.gotoAndStop("orange"); } else { _arg1.currentTarget.gotoAndStop("red"); }; }; if (_arg1.currentTarget.areaIndex == currentArea){ areas.attackflash.visible = true; }; } public function onmenu(_arg1:MouseEvent):void{ if (about.visible){ return; }; if (startmenu.visible){ resumegame(null); return; }; if (stat.visible){ stat.visible = false; submitform.visible = false; startmenu.visible = true; startmenu.cdl.visible = true; startmenu.resumegame.visible = false; introholder.visible = true; hide(); return; }; if (levelmap.visible){ startmenu.cdl.visible = false; startmenu.visible = true; introholder.visible = true; levelmap.visible = false; hide(); return; }; engine.pause(); startmenu.resumegame.visible = true; startmenu.cdl.visible = false; startmenu.visible = true; introholder.visible = true; hide(); } private function onkeepplaying(_arg1:MouseEvent):void{ engine.nechelons = (engine.nechelons + 100); stat.visible = false; submitform.visible = false; engine.pause(); announce.setWave((engine.scenario.wave + 1)); } public function gameover():void{ stat.iscore = engine.score; stat.caption.text = "Game Over"; stat.keepplaying.visible = false; stat.update(); engine.pause(); stat.visible = true; submitform.visible = false; stat.playnext.visible = false; } private function ondosavescore(_arg1:MouseEvent):void{ var strOut:String; var evt = _arg1; if (submitform.username.text.length == 0){ submitform.msg.visible = true; return; }; submitform.visible = false; strOut = ((submitform.username.text + "|") + engine.score.toString()); trace(strOut); MochiScores.showLeaderboard({boardID:"bca8c7044a0d5505", score:engine.score, name:submitform.username.text, onClose:function (){ onmenu1(); }}); } public function onMenuKeyDown(_arg1:int):void{ if (acceptCodes){ switch (_arg1){ case 82: case 114: onButtonRepair(null); break; case 85: case 117: onButtonUpgrade(null); break; }; }; } public function saveLocally():void{ var _local1:*; _local1 = SharedObject.getLocal("StormAD"); _local1.data.currentArea = currentArea; _local1.flush(); } } }//package fai import flash.display.*; import flash.events.*; import flash.text.*; class Resources extends Sprite { private var engine:Engine;// = null private var score:TextField;// = null private var uranium:TextField;// = null private function Resources(_arg1:Engine):void{ var back:Shape; var aburanium:AnimatedBitmap; var yoffs:int; var tcolor:int; var e = _arg1; engine = null; uranium = null; score = null; super(); engine = e; back = new Shape(); var _local3 = back.graphics; with (_local3) { beginFill(0); drawRect(0, 0, 185, 35); endFill(); }; back.alpha = 0.7; back.x = -10; addChild(back); aburanium = engine.sloader.getMenuItem(UnitTypes.miuranium); yoffs = 7; tcolor = 0xFF00; uranium = Utils.createTextField(tcolor, 11); uranium.y = yoffs; uranium.x = (aburanium.width + 5); aburanium.x = 0; aburanium.y = yoffs; addChild(aburanium); addChild(uranium); score = Utils.createTextField(0xFF5400, 12); score.text = "Score:"; score.x = 70; score.y = yoffs; addChild(score); score = Utils.createTextField(tcolor, 11); score.x = 120; score.y = yoffs; addChild(score); update(); } public function update():void{ uranium.text = engine.uranium.toString(); score.text = engine.score.toString(); } } class Statistics extends Sprite { public var keepplaying:WebButton;// = null public var ilost:int;// = 0 public var restart:WebButton;// = null public var ikilled:int;// = 0 public var playnext:WebButton;// = null private var lost:TextField;// = null public var savescore:WebButton;// = null private var uranspent:TextField;// = null private var killed:TextField;// = null private var built:TextField;// = null public var mainmenu:WebButton;// = null private var score:TextField;// = null public var ibuilt:int;// = 0 public var iscore:int;// = 0 public var iuranspent:int;// = 0 public var caption:TextField;// = null private var back:Shape;// = null private static const xoffset:int = 10; private function Statistics():void{ var tf:TextFormat; var statstat:TextField; back = null; caption = null; score = null; killed = null; lost = null; uranspent = null; built = null; iscore = 0; ikilled = 0; ilost = 0; iuranspent = 0; ibuilt = 0; restart = null; savescore = null; mainmenu = null; playnext = null; keepplaying = null; super(); back = new Shape(); var _local2 = back; with (_local2) { graphics.beginFill(0); graphics.drawRoundRect(0, 0, 220, 350, 15, 15); graphics.endFill(); alpha = 0.7; }; addChild(back); caption = Utils.createTextField(15943950, 20); caption.x = 50; tf = caption.defaultTextFormat; tf.underline = true; caption.defaultTextFormat = tf; caption.text = "Game Over!"; addChild(caption); statstat = null; statstat = Utils.createTextField(0xFFFFFF, 12); tf = statstat.defaultTextFormat; tf.bold = false; tf.italic = true; statstat.defaultTextFormat = tf; statstat.text = "Game statistics:"; statstat.x = xoffset; statstat.y = (caption.height + 10); addChild(statstat); score = createStatElement(15825434, 15); score.y = 70; killed = createStatElement(15825434, 13); killed.y = 100; lost = createStatElement(15825434, 13); lost.y = 130; uranspent = createStatElement(15825434, 13); uranspent.y = 160; built = createStatElement(15825434, 13); built.y = 190; mainmenu = new WebButton("Main Menu", 77, 20, 20, 0xFFFFFF, 10, 20, false); mainmenu.x = xoffset; mainmenu.y = 240; addChild(mainmenu); savescore = new WebButton("Save Score", 80, 20, 20, 0xFFFFFF, 10, 20, false); savescore.x = (xoffset + 100); savescore.y = 240; addChild(savescore); restart = new WebButton("Restart", 75, 20, 20, 0xFFFFFF, 10, 20, false); restart.x = xoffset; restart.y = 280; addChild(restart); keepplaying = new WebButton("Keep Playing", 180, 20, 20, 0xFFFFFF, 10, 20, false); keepplaying.x = xoffset; keepplaying.y = 320; addChild(keepplaying); playnext = new WebButton("Play Next!", 80, 20, 20, 11729148, 11, 20, false); playnext.x = (xoffset + 100); playnext.y = 280; addChild(playnext); update(); } public function reset():void{ visible = false; iscore = (ikilled = (ilost = (iuranspent = (ibuilt = 0)))); update(); } private function createStatElement(_arg1:int, _arg2:int):TextField{ var _local3:TextField; _local3 = Utils.createTextField(_arg1, _arg2); _local3.x = xoffset; addChild(_local3); return (_local3); } public function update():void{ score.text = ("Score: " + iscore.toString()); killed.text = ("Enemies Killed: " + ikilled.toString()); lost.text = ("Units Lost: " + ilost.toString()); uranspent.text = ("Uranium Spent: " + iuranspent.toString()); built.text = ("Units Built: " + ibuilt.toString()); } } class About extends Sprite { public var closebutton:Sprite;// = null private var mentart:TextField;// = null private var author:TextField;// = null private var caption:TextField;// = null private var back:Shape;// = null private var version:TextField;// = null private static const xoffset:int = 10; private function About():void{ var cbsize:int; var tf:TextFormat; var thanks:TextField; back = null; caption = null; version = null; author = null; mentart = null; closebutton = null; super(); visible = false; back = new Shape(); var _local2 = back; with (_local2) { graphics.beginFill(0); graphics.drawRoundRect(0, 0, 280, 220, 15, 15); graphics.endFill(); alpha = 0.7; }; addChild(back); closebutton = new Sprite(); cbsize = 20; _local2 = closebutton; with (_local2) { graphics.beginFill(0); graphics.drawRoundRect(0, 0, cbsize, cbsize, 5, 5); graphics.endFill(); alpha = 0.5; graphics.lineStyle(1, 0xFFFFFF); graphics.moveTo(2, 2); graphics.lineTo((cbsize - 2), (cbsize - 2)); graphics.moveTo((cbsize - 2), 2); graphics.lineTo(2, (cbsize - 2)); }; closebutton.x = ((280 - cbsize) - 1); closebutton.y = 1; addChild(closebutton); caption = Utils.createTextField(0xFFFFFF, 16); caption.x = 40; tf = caption.defaultTextFormat; tf.underline = true; caption.defaultTextFormat = tf; caption.text = "Storm: Astrum Defense."; addChild(caption); version = Utils.createTextField(0xFFFFFF, 12); tf = version.defaultTextFormat; tf.bold = false; tf.italic = true; version.defaultTextFormat = tf; version.text = "version 1.0"; version.x = (xoffset + 90); version.y = (caption.height + 10); addChild(version); author = createStatElement(15825434, 12); author.y = 70; author.x = 70; author.text = "Author Anton Fedoruk\nCopyright (c) 2008.\nAll Rights Reserved."; mentart = createStatElement(15943950, 12); mentart.y = 130; mentart.x = 50; tf = mentart.defaultTextFormat; tf.url = "http://www.warspark.com"; tf.underline = true; tf.italic = true; mentart.defaultTextFormat = tf; mentart.text = "www.WarSpark.com"; mentart = createStatElement(15943950, 12); mentart.y = 150; mentart.x = 50; tf = mentart.defaultTextFormat; tf.url = "mailto:contact@warspark.com"; tf.underline = true; tf.italic = true; mentart.defaultTextFormat = tf; mentart.text = "anton@warspark.com"; thanks = createStatElement(15825434, 12); thanks.y = 180; thanks.x = 50; thanks.text = "Thanks: RocketMan08 from\nNewgrounds"; } private function createStatElement(_arg1:int, _arg2:int):TextField{ var _local3:TextField; _local3 = Utils.createTextField(_arg1, _arg2); _local3.x = xoffset; addChild(_local3); return (_local3); } } class Announce extends Sprite { public var engine:Engine;// = null public var sprites:Map; public var subtext:TextField;// = null private var sendnextbutton:WebButton;// = null public var wavetxt:TextField;// = null private function Announce(_arg1:Engine):void{ var _local2:Shape; var _local3:int; var _local4:int; wavetxt = null; subtext = null; sprites = new Map(); sendnextbutton = null; engine = null; super(); engine = _arg1; _local2 = new Shape(); _local2.graphics.lineStyle(0, 0); _local2.graphics.beginFill(0); _local2.graphics.drawRect(0, 0, 614, 35); _local2.graphics.endFill(); _local2.alpha = 0.6; addChild(_local2); _local3 = 0; _local4 = 0; wavetxt = Utils.createTextField(0xC3C3C3, 12); wavetxt.text = "Echelon:"; wavetxt.y = 1; _local3 = wavetxt.width; addChild(wavetxt); wavetxt = Utils.createTextField(15943950, 12); wavetxt.y = 1; wavetxt.x = (_local3 + 3); wavetxt.text = "1/1"; _local3 = wavetxt.height; addChild(wavetxt); subtext = Utils.createTextField(0xC3C3C3, 10); subtext.text = "attack wave:"; subtext.y = _local3; _local4 = subtext.width; addChild(subtext); subtext = Utils.createTextField(0xFF0000, 10); subtext.text = "00 secs"; subtext.y = _local3; subtext.x = _local4; addChild(subtext); sendnextbutton = new WebButton("Send Next", 80, 20, 15, 0xFFFFFF, 10, 25, false); sendnextbutton.x = ((width - sendnextbutton.width) - 3); sendnextbutton.y = 7; addChild(sendnextbutton); sendnextbutton.addEventListener(MouseEvent.CLICK, sendnext); } public function subtract(_arg1:String):void{ var _local2:AnnounceSprite; _local2 = sprites.get(_arg1); if (_local2){ _local2.dec(); }; } public function sendnext(_arg1:MouseEvent):void{ if (engine.paused){ return; }; engine.scenario.sendNext(); } public function setWave(_arg1:int):void{ wavetxt.text = ((_arg1.toString() + "/") + engine.nechelons.toString()); } public function add(_arg1:String, _arg2:AnimatedBitmap, _arg3:int):void{ var _local4:AnnounceSprite; _local4 = sprites.get(_arg1); if (_local4){ _local4.alpha = 1; _local4.setCount((_arg3 + _local4.icount)); } else { _local4 = new AnnounceSprite(_arg1, _arg2, _arg3); _local4.x = ((sprites.size() * 45) + 130); addChild(_local4); sprites.add(_arg1, _local4); }; } public function setSubText(_arg1:String):void{ subtext.text = _arg1; } } class AnnounceSprite extends Sprite { public var tcount:TextField;// = null private var bitmap:AnimatedBitmap;// = null public var icount:int;// = 0 public var suite:String;// = null private function AnnounceSprite(_arg1:String, _arg2:AnimatedBitmap, _arg3:int):void{ suite = null; bitmap = null; tcount = null; icount = 0; super(); tcount = Utils.createTextField(0xC3C3C3, 10); tcount.text = "X"; tcount.y = 20; tcount.x = _arg2.width; suite = _arg1; bitmap = _arg2; addChild(_arg2); setCount(_arg3); addChild(tcount); } public function dec():void{ icount--; setCount(icount); if (!icount){ alpha = 0.3; }; } public function setCount(_arg1:int):void{ icount = _arg1; tcount.text = ("x" + _arg1.toString()); if (icount == 0){ alpha = 0.3; }; } } final class UnitInfoPanel extends Sprite { public var repairButton:WebButton;// = null private var armor:TextField;// = null private var range:TextField;// = null private var engine:Engine;// = null public var title:TextField;// = null private var health:TextField;// = null public var upgradeButton:WebButton;// = null private var damage:TextField;// = null private var level:TextField;// = null private var desc:TextField;// = null private var killed:TextField;// = null public var destroyButton:WebButton;// = null private var cost:TextField;// = null private var status:TextField;// = null private function UnitInfoPanel(_arg1:Engine):void{ var bitmap:AnimatedBitmap; var xrow1:int; var xrow2:int; var descback:Shape; var gfrom:int; var gto:int; var sgfrom:int; var sgto:int; var e = _arg1; title = null; health = null; armor = null; range = null; damage = null; cost = null; desc = null; status = null; level = null; killed = null; destroyButton = null; repairButton = null; upgradeButton = null; engine = null; super(); engine = e; title = Utils.createTextField(3627027, 12); health = Utils.createTextField(0); armor = Utils.createTextField(0); range = Utils.createTextField(0); level = Utils.createTextField(3158181); killed = Utils.createTextField(0); desc = Utils.createTextField(0, 9); damage = Utils.createTextField(0); cost = Utils.createTextField(0); status = Utils.createTextField(3158181, 10); bitmap = null; bitmap = e.sloader.getMenuItem(UnitTypes.miheart); addChild(bitmap); xrow1 = 15; xrow2 = 110; status.x = xrow1; status.y = 25; title.x = xrow1; health.y = 50; health.x = (xrow1 + bitmap.width); bitmap.y = 50; bitmap.x = xrow1; bitmap = e.sloader.getMenuItem(UnitTypes.miuranium); addChild(bitmap); bitmap.x = xrow2; bitmap.y = 50; cost.y = 50; cost.x = (xrow2 + bitmap.width); bitmap = e.sloader.getMenuItem(UnitTypes.miattack); addChild(bitmap); bitmap.x = xrow1; bitmap.y = 70; damage.x = (xrow1 + bitmap.width); damage.y = 70; bitmap = e.sloader.getMenuItem(UnitTypes.miarmor); addChild(bitmap); bitmap.x = xrow1; bitmap.y = 90; armor.y = 90; armor.x = (xrow1 + bitmap.width); bitmap = e.sloader.getMenuItem(UnitTypes.mirange); addChild(bitmap); bitmap.x = xrow1; bitmap.y = 110; range.y = 110; range.x = (xrow1 + bitmap.width); killed.x = xrow2; killed.y = 90; level.x = xrow2; level.y = 70; desc.y = 135; desc.x = xrow1; descback = new Shape(); var _local3 = descback; with (_local3) { graphics.beginFill(GameMenu.fillColor); graphics.drawRect(0, 0, 150, 50); graphics.endFill(); alpha = 0.5; x = xrow1; y = 135; }; addChild(descback); gfrom = 13162483; gto = 8428752; sgfrom = 14543359; sgto = 10467559; destroyButton = new WebButton("Sell for 100 uran.", 150, 20, 20, 0xFF0000, 10, 20, false, gfrom, gto, sgfrom, sgto); destroyButton.y = 195; destroyButton.x = xrow1; addChild(destroyButton); repairButton = new WebButton("Repair (R) - 100 uran.", 150, 20, 20, 0, 10, 20, false, gfrom, gto, sgfrom, sgto); repairButton.y = 230; repairButton.x = xrow1; addChild(repairButton); upgradeButton = new WebButton("Upgrade (U) - 1000 uran.", 150, 20, 20, 0, 10, 20, false, gfrom, gto, sgfrom, sgto); upgradeButton.y = 0xFF; upgradeButton.x = xrow1; addChild(upgradeButton); addChild(title); addChild(status); addChild(health); addChild(armor); addChild(range); addChild(damage); addChild(cost); addChild(desc); addChild(level); addChild(killed); visible = false; } public function showAbout(_arg1:Unit, _arg2:Boolean):void{ var _local3:int; var _local4:TextFormat; var _local5:int; var _local6:String; visible = !((_arg1 == null)); if (_arg1){ if (engine.menu.buttons.selectedUnit != _arg1){ destroyButton.visible = !(_arg2); repairButton.visible = !(_arg2); } else { destroyButton.visible = false; repairButton.visible = false; }; _local3 = 3627027; if (_arg2){ _local3 = 0xFF0000; }; _local4 = title.defaultTextFormat; _local4.color = _local3; title.defaultTextFormat = _local4; _local5 = engine.utypes.params(_arg1.type).health; _local5 = (engine.utypes.params(_arg1.type).health + ((_local5 * _arg1.upgradeLevel) * Consts.upgradeHExtra)); title.text = _arg1.type; health.text = ((_arg1.health.toString() + "/") + _local5.toString()); armor.text = _arg1.armor.toString(); range.text = Utils.textrange(_arg1.eyerange); desc.text = _arg1.desc; damage.text = _arg1.damage.toString(); cost.text = _arg1.costuran.toString(); level.text = ("Level: " + _arg1.upgradeLevel.toString()); killed.text = ("Killed: " + _arg1.killed.toString()); _local6 = ""; if (!_arg1.life){ status.text = "Click to build this unit"; } else { if (((_arg1.life.repairgoal) && (_arg1.life.repairgoal.active))){ _local6 = "Repairing..."; } else { _local6 = Utils.unitStatus(((_arg1.health * 100) / _local5)); }; status.text = ("State: " + _local6); }; }; } } class ButtonSprite extends Sprite { private var shaped:Shape; public var bitmap:AnimatedBitmap;// = null private var shapes:Shape; public var suite:String;// = null private function ButtonSprite(_arg1:String, _arg2:AnimatedBitmap):void{ suite = null; bitmap = null; shaped = new Shape(); shapes = new Shape(); super(); shaped.graphics.lineStyle(2, 532555); shaped.graphics.beginFill(8954319); shaped.graphics.drawRoundRect(0, 0, _arg2.width, _arg2.height, (_arg2.width / 5), (_arg2.height / 5)); shaped.graphics.endFill(); shaped.alpha = 0.5; addChild(shaped); shapes.visible = false; shapes.graphics.lineStyle(2, 532555); shapes.graphics.beginFill(14998899); shapes.graphics.drawRoundRect(0, 0, _arg2.width, _arg2.height, (_arg2.width / 5), (_arg2.height / 5)); shapes.graphics.endFill(); shapes.alpha = 0.5; addChild(shapes); suite = _arg1; bitmap = _arg2; addChild(_arg2); } public function select(_arg1:Boolean):void{ shaped.visible = !(_arg1); shapes.visible = _arg1; } } class StartMenu extends Sprite { public var warspark:TextField;// = null public var playmoregames:WebButton;// = null public var cdl:TextField;// = null private var engine:Engine;// = null public var wallOfFame:WebButton;// = null public var newgame:WebButton;// = null public var resumegame:WebButton;// = null public var funmode:WebButton;// = null public var onSite:WebButton;// = null private var caption:TextField;// = null private var version:TextField;// = null private static const xoffset:int = 10; private function StartMenu(_arg1:Engine):void{ var _local2:TextFormat; caption = null; version = null; cdl = null; resumegame = null; newgame = null; funmode = null; playmoregames = null; wallOfFame = null; onSite = null; warspark = null; engine = null; super(); engine = _arg1; _local2 = null; version = Utils.createTextField(0xFFFFFF, 12); _local2 = version.defaultTextFormat; _local2.bold = false; _local2.italic = true; version.defaultTextFormat = _local2; cdl = createStatElement(0xFFFFFF, 10); cdl.x = 65; cdl.text = "Welcome Defense Master..."; resumegame = new WebButton("Resume Game", 200, 40, 24, 7517947); resumegame.visible = false; addChild(resumegame); resumegame.x = (xoffset * 4); resumegame.y = 10; newgame = new WebButton("Campaign", 200, 40, 24, 0xFFFFFF); addChild(newgame); newgame.x = (xoffset * 4); newgame.y = 60; funmode = new WebButton("Fun Mode", 200, 40, 24, 16768553); addChild(funmode); funmode.x = (xoffset * 4); funmode.y = 110; wallOfFame = new WebButton("Wall Of Fame", 200, 40, 24, 7517947); addChild(wallOfFame); wallOfFame.x = (xoffset * 4); wallOfFame.y = 160; playmoregames = new WebButton("Play More Games", 200, 40, 24, 16745818); addChild(playmoregames); playmoregames.x = (xoffset * 4); playmoregames.y = 210; onSite = new WebButton("Game on Your Site", 200, 40, 24, 16745818); addChild(onSite); onSite.x = (xoffset * 4); onSite.y = 260; } private function createStatElement(_arg1:int, _arg2:int):TextField{ var _local3:TextField; _local3 = Utils.createTextField(_arg1, _arg2); _local3.x = xoffset; addChild(_local3); return (_local3); } } class TextButton extends Sprite { public var txt:TextField;// = null private var selshape:Shape;// = null private var back:Shape;// = null private function TextButton(_arg1:String, _arg2:int, _arg3:int, _arg4:int, _arg5:int=10):void{ var s = _arg1; var w = _arg2; var h = _arg3; var tcolor = _arg4; var tsize = _arg5; txt = null; back = null; selshape = null; super(); back = new Shape(); var _local7 = back.graphics; with (_local7) { lineStyle(2, GameMenu.borderColor); beginFill(GameMenu.fillColor); drawRoundRect(0, 0, w, h, 5, 5); endFill(); }; back.alpha = 0.5; addChild(back); selshape = new Shape(); _local7 = selshape.graphics; with (_local7) { lineStyle(2, GameMenu.borderColor); beginFill(14998899); drawRoundRect(0, 0, w, h, 5, 5); endFill(); }; selshape.alpha = 0.7; selshape.visible = false; addChild(selshape); txt = Utils.createTextField(tcolor, tsize); txt.text = s; txt.y = 1; addChild(txt); addEventListener(MouseEvent.MOUSE_OUT, onmouseout); addEventListener(MouseEvent.MOUSE_OVER, onmouseover); } private function onmouseout(_arg1:MouseEvent):void{ selshape.visible = false; } private function onmouseover(_arg1:MouseEvent):void{ selshape.visible = true; } }
Section 16
//Goal (fai.Goal) package fai { public class Goal { public var owner:Unit;// = null public var active:Boolean;// = true public function Goal(){ active = true; owner = null; super(); } public function deactivate():void{ active = false; } } }//package fai
Section 17
//KeyboardKeys (fai.KeyboardKeys) package fai { import flash.events.*; public class KeyboardKeys { private static var initialized:Boolean = false; private static var keys:Object = new Object(); public static function init(_arg1):void{ _arg1.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed); _arg1.stage.addEventListener(KeyboardEvent.KEY_UP, keyReleased); initialized = true; } private static function keyPressed(_arg1:KeyboardEvent):void{ keys[_arg1.keyCode] = true; } public static function isDown(_arg1:uint):Boolean{ if (!initialized){ return (false); }; if (Boolean((_arg1 in keys))){ return (keys[_arg1]); }; return (false); } private static function keyReleased(_arg1:KeyboardEvent):void{ keys[_arg1.keyCode] = false; } } }//package fai
Section 18
//LevelMap (fai.LevelMap) package fai { public class LevelMap { public var desc:String;// = null public var diff:String;// = null public var data:XML;// = null public var nechelons:int;// = 0 public var title:String;// = null public function LevelMap(_arg1:XML):void{ data = null; title = null; desc = null; nechelons = 0; diff = null; super(); data = _arg1; title = data.title.toString(); desc = data.desc.toString(); nechelons = int(data.scenario.nechelons.@value); diff = data.difficulty.toString(); if (!diff.length){ diff = "Normal"; }; } public function diffColor():int{ switch (diff){ case "Easy": return (5098747); case "Hard": return (0xFF0000); }; return (10925256); } } }//package fai
Section 19
//LifeGoal (fai.LifeGoal) package fai { public class LifeGoal extends Goal { private var engine:Engine;// = null public var goals:Array;// = null private var attackgoal:AttackGoal;// = null public var repairgoal:RepairGoal;// = null private var counter:int;// = 0 public var waitingMove:MoveGoal;// = null public function LifeGoal(_arg1:Engine, _arg2:Unit):void{ attackgoal = null; repairgoal = null; goals = null; waitingMove = null; engine = null; counter = 0; super(); owner = _arg2; engine = _arg1; goals = new Array(); } public function attack(_arg1:Camp):void{ if (attackgoal){ attackgoal.deactivate(); attackgoal = null; }; attackgoal = new AttackGoal(owner, _arg1, engine.world); } public function advance():void{ var _local1:uint; var _local2:Boolean; if (repairgoal){ if (repairgoal.active){ repairgoal.advance(); } else { repairgoal = null; }; }; if (attackgoal){ attackgoal.advance(); }; _local1 = 0; _local2 = false; while (_local1 < goals.length) { if (goals[_local1].active){ if ((goals[_local1] is MoveGoal)){ _local2 = true; }; goals[_local1].advance(); _local1++; } else { delete goals[_local1]; goals.splice(_local1, 1); }; }; if (!_local2){ if (attackgoal){ attackgoal.paused = false; }; }; } public function repair():void{ if (repairgoal){ repairgoal.deactivate(); repairgoal = null; engine.updateMenu(); return; }; repairgoal = new RepairGoal(owner, engine); } public function move(_arg1:Position, _arg2:Boolean=false):void{ var _local3:*; var _local4:MoveGoal; for each (_local3 in goals) { if ((_local3 is MoveGoal)){ _local3.deactivate(); }; }; _local4 = new MoveGoal(owner, engine.world, engine); _local4.setTarget(_arg1); goals[goals.length] = _local4; if (_arg2){ if (attackgoal){ attackgoal.clearPreciseTarget(); attackgoal.paused = true; }; } else { if (attackgoal){ attackgoal.paused = false; }; }; } public function destroy(_arg1:Boolean=false):void{ var _local2:int; _local2 = 0; while (_local2 < goals.length) { if (goals[_local2].active){ goals[_local2].deactivate(); }; _local2++; }; goals.length = 0; if (repairgoal){ repairgoal.deactivate(); repairgoal = null; }; if (attackgoal){ attackgoal.deactivate(); attackgoal = null; }; if (((_arg1) && (owner))){ if ((((owner.mapid == Consts.oreId)) || ((owner.mapid == Consts.uraniumId)))){ engine.backgr.removeChild(owner.sprite); } else { engine.unitlayer.removeChild(owner.sprite); }; owner.startdie(); owner = null; active = false; }; } public function stop():void{ var _local1:*; for each (_local1 in goals) { if ((_local1 is MoveGoal)){ _local1.deactivate(); }; }; if (attackgoal){ attackgoal.clearPreciseTarget(); }; } override public function deactivate():void{ if (owner){ destroy(); goals.push(new DieGoal(owner, engine, this)); owner.die(); }; } public function setAttackTarget(_arg1:Unit):void{ if (_arg1 == owner){ engine.log("I can't attack myself."); return; }; if (attackgoal){ attackgoal.clearPreciseTarget(); attackgoal.preciseTarget = _arg1; }; } } }//package fai
Section 20
//Map (fai.Map) package fai { public class Map { public var values:Array; protected var index_:int;// = 0 public var keys:Array; public function Map(){ keys = new Array(); values = new Array(); index_ = 0; super(); } public function add(_arg1:Object, _arg2):void{ index_ = 0; find(_arg1); keys.splice(index_, 0, _arg1); values.splice(index_, 0, _arg2); } public function empty():Boolean{ return ((keys.length == 0)); } public function shift(){ var _local1:*; _local1 = values.shift(); keys.shift(); return (_local1); } public function remove(_arg1:Object):void{ if (find(_arg1)){ keys.splice(index_, 1); values.splice(index_, 1); }; } public function size():int{ return (keys.length); } public function pop(){ var _local1:*; _local1 = values.pop(); keys.pop(); return (_local1); } public function get(_arg1:Object){ if (!find(_arg1)){ return (null); }; return (values[index_]); } public function getout(_arg1:Object){ var _local2:*; if (!find(_arg1)){ return (null); }; _local2 = values[index_]; values.splice(index_, 1); keys.splice(index_, 1); return (_local2); } public function find(_arg1:Object):Boolean{ var _local2:int; var _local3:int; _local2 = 0; _local3 = (keys.length - 1); while (_local2 <= _local3) { index_ = ((_local2 + _local3) >> 1); if (_arg1 < keys[index_]){ _local3 = (index_ - 1); } else { if (_arg1 > keys[index_]){ _local2 = (index_ + 1); } else { return (true); }; }; }; index_ = _local2; return (false); } public function clear():void{ keys.length = 0; values.length = 0; index_ = 0; } } }//package fai
Section 21
//MapMatrix (fai.MapMatrix) package fai { public class MapMatrix { public var matrix:Array; public var v:uint; public var h:uint; public function MapMatrix(_arg1:uint, _arg2:uint):void{ var _local3:int; var _local4:int; matrix = new Array(); super(); h = _arg1; v = _arg2; _local3 = 0; while (_local3 < (v + 5)) { matrix.push(new Array((h + 5))); _local4 = 0; while (_local4 < (h + 5)) { matrix[(matrix.length - 1)][_local4] = 0; _local4++; }; _local3++; }; } public function setxy(_arg1:uint, _arg2:uint, _arg3:uint):void{ matrix[_arg2][_arg1] = _arg3; } public function getxy(_arg1:uint, _arg2:uint):uint{ return (matrix[_arg2][_arg1]); } public function clear():void{ var _local1:int; var _local2:int; _local1 = 0; while (_local1 < v) { _local2 = 0; while (_local2 < h) { matrix[_local1][_local2] = 0; _local2++; }; _local1++; }; } public function setpos(_arg1:Position, _arg2:uint):void{ matrix[_arg1.y][_arg1.x] = _arg2; } public function getpos(_arg1:Position):uint{ return (matrix[_arg1.y][_arg1.x]); } } }//package fai
Section 22
//Maps (fai.Maps) package fai { public class Maps { public static const maps:XML = <maps> <ground name='ground1.jpg'/> <ground name='wall.png'/> <ground name='wall2.png'/> <ground name='mountain1.jpg'/> <ground name='tree.png'/> <ground name='tree2.png'/> <level number='0'> <title>Sunsina</title> <desc>Sunsina is a province of Astrum with an area of 83,511 km. The region is divided into 4 districts: Sandapa, Santalaha, Sambava, Sarito.</desc> <size width='25' height='20'/> <background type='ground1.jpg'/> <unit type='Command Center' x='10' y='16'/> <unit type='Light Cannon' x='8' y='12'/> <unit type='Light Cannon' x='12' y='12'/> <unit type='Light Cannon' x='10' y='12'/> <wall type='wall2.png' x='0' y='19'/> <wall type='wall2.png' x='0' y='18'/> <wall type='wall2.png' x='1' y='19'/> <wall type='wall2.png' x='0' y='17'/> <wall type='wall2.png' x='1' y='18'/> <wall type='wall2.png' x='2' y='19'/> <wall type='mountain1.jpg' x='17' y='2'/> <wall type='mountain1.jpg' x='16' y='11'/> <wall type='wall.png' x='8' y='19'/> <wall type='wall.png' x='9' y='19'/> <wall type='wall.png' x='10' y='19'/> <wall type='wall.png' x='11' y='19'/> <wall type='wall.png' x='12' y='19'/> <wall type='wall.png' x='7' y='19'/> <wall type='wall.png' x='6' y='18'/> <wall type='wall.png' x='5' y='17'/> <wall type='wall.png' x='4' y='16'/> <wall type='wall.png' x='3' y='15'/> <wall type='wall.png' x='3' y='14'/> <wall type='wall.png' x='3' y='13'/> <wall type='wall.png' x='13' y='18'/> <wall type='wall.png' x='14' y='17'/> <wall type='wall.png' x='15' y='16'/> <wall type='wall.png' x='16' y='15'/> <wall type='wall.png' x='16' y='14'/> <wall type='wall.png' x='16' y='13'/> <wall type='wall.png' x='16' y='12'/> <wall type='wall.png' x='15' y='11'/> <wall type='wall.png' x='3' y='12'/> <wall type='wall.png' x='4' y='11'/> <wall type='wall.png' x='5' y='10'/> <wall type='wall.png' x='14' y='10'/> <wall type='wall.png' x='5' y='9'/> <wall type='wall.png' x='14' y='9'/> <wall type='tree2.png' x='0' y='16'/> <wall type='tree2.png' x='1' y='17'/> <wall type='tree2.png' x='2' y='18'/> <wall type='tree2.png' x='3' y='19'/> <wall type='tree.png' x='16' y='19'/> <wall type='tree.png' x='16' y='18'/> <wall type='tree.png' x='16' y='17'/> <wall type='tree.png' x='15' y='18'/> <wall type='tree.png' x='15' y='19'/> <wall type='tree.png' x='14' y='19'/> <scenario> <suranium value='300'/> <nechelons value='2'/> </scenario> </level> <level number='1'> <title>Baranda</title> <desc>Baranda is a province of Astrum with an area of 64,081 km. The region is divided into 3 districts: Barond, Bokodo, Binako.</desc> <size width='25' height='20'/> <background type='ground1.jpg'/> <unit type='Command Center' x='10' y='16'/> <unit type='Light Cannon' x='5' y='13'/> <unit type='Light Cannon' x='14' y='13'/> <wall type='wall.png' x='9' y='4'/> <wall type='wall.png' x='9' y='5'/> <wall type='wall.png' x='9' y='7'/> <wall type='wall.png' x='9' y='6'/> <wall type='wall.png' x='9' y='8'/> <wall type='wall.png' x='9' y='9'/> <wall type='wall.png' x='9' y='10'/> <wall type='wall.png' x='8' y='11'/> <wall type='wall.png' x='7' y='12'/> <wall type='wall.png' x='10' y='11'/> <wall type='wall.png' x='11' y='12'/> <wall type='wall2.png' x='4' y='9'/> <wall type='wall2.png' x='3' y='10'/> <wall type='wall2.png' x='2' y='11'/> <wall type='wall2.png' x='1' y='12'/> <wall type='wall2.png' x='14' y='9'/> <wall type='wall2.png' x='15' y='10'/> <wall type='wall2.png' x='16' y='11'/> <wall type='wall2.png' x='17' y='12'/> <wall type='tree2.png' x='0' y='18'/> <wall type='tree2.png' x='2' y='18'/> <wall type='tree2.png' x='1' y='18'/> <wall type='tree2.png' x='0' y='17'/> <wall type='tree2.png' x='17' y='18'/> <wall type='tree2.png' x='18' y='17'/> <wall type='tree2.png' x='18' y='18'/> <wall type='tree2.png' x='16' y='18'/> <wall type='mountain1.jpg' x='18' y='8'/> <scenario> <suranium value='300'/> <nechelons value='2'/> </scenario> </level> <level number='2'> <title>Stigwel</title> <desc>Stigwel is a province of Astrum with an area of 101,304 km. The region is divided into 5 districts: Stogr, Stintent, Surokl, Sapata, Sorat.</desc> <size width='25' height='20'/> <background type='ground1.jpg'/> <unit type='Command Center' x='3' y='16'/> <unit type='Light Cannon' x='8' y='11'/> <unit type='Light Cannon' x='11' y='11'/> <wall type='mountain1.jpg' x='11' y='11'/> <wall type='mountain1.jpg' x='19' y='11'/> <wall type='wall.png' x='0' y='6'/> <wall type='wall.png' x='2' y='6'/> <wall type='wall.png' x='1' y='6'/> <wall type='wall.png' x='3' y='6'/> <wall type='wall.png' x='4' y='6'/> <wall type='wall.png' x='5' y='6'/> <wall type='wall2.png' x='0' y='11'/> <wall type='wall2.png' x='1' y='11'/> <wall type='wall2.png' x='2' y='11'/> <wall type='wall2.png' x='3' y='11'/> <wall type='wall2.png' x='4' y='11'/> <wall type='wall2.png' x='5' y='11'/> <wall type='wall2.png' x='10' y='8'/> <wall type='wall2.png' x='11' y='8'/> <wall type='wall2.png' x='12' y='8'/> <wall type='wall2.png' x='13' y='8'/> <wall type='wall2.png' x='14' y='9'/> <wall type='wall2.png' x='16' y='9'/> <wall type='wall2.png' x='15' y='9'/> <wall type='wall2.png' x='17' y='9'/> <wall type='tree.png' x='13' y='11'/> <wall type='tree.png' x='12' y='12'/> <wall type='tree.png' x='11' y='13'/> <wall type='tree.png' x='11' y='15'/> <wall type='tree.png' x='11' y='16'/> <wall type='tree.png' x='11' y='14'/> <wall type='tree.png' x='11' y='17'/> <wall type='tree.png' x='11' y='18'/> <wall type='tree.png' x='10' y='18'/> <wall type='tree.png' x='14' y='10'/> <wall type='tree.png' x='16' y='10'/> <wall type='tree2.png' x='18' y='17'/> <wall type='tree2.png' x='18' y='16'/> <wall type='tree2.png' x='19' y='14'/> <wall type='tree2.png' x='20' y='12'/> <scenario> <suranium value='300'/> <nechelons value='3'/> </scenario> </level> <level number='3'> <title>Hornstock 2</title> <desc>Hornstock 2 is a province of Astrum with an area of 120,417 km. The region is divided into 4 districts: New Horn, Horava, Hest, Houth.</desc> <size width='25' height='20'/> <background type='ground1.jpg'/> <unit type='Command Center' x='8' y='13'/> <wall type='wall2.png' x='3' y='11'/> <wall type='wall2.png' x='4' y='10'/> <wall type='wall2.png' x='5' y='9'/> <wall type='wall2.png' x='6' y='8'/> <wall type='wall2.png' x='7' y='8'/> <wall type='wall2.png' x='8' y='8'/> <wall type='wall2.png' x='9' y='8'/> <wall type='wall2.png' x='10' y='9'/> <wall type='wall2.png' x='11' y='10'/> <wall type='wall2.png' x='3' y='12'/> <wall type='wall2.png' x='12' y='11'/> <wall type='wall2.png' x='12' y='12'/> <wall type='mountain1.jpg' x='17' y='12'/> <wall type='tree.png' x='0' y='18'/> <wall type='tree.png' x='1' y='19'/> <wall type='tree.png' x='1' y='18'/> <wall type='tree.png' x='0' y='19'/> <wall type='tree.png' x='2' y='19'/> <wall type='tree.png' x='2' y='18'/> <wall type='tree.png' x='3' y='19'/> <wall type='tree.png' x='0' y='17'/> <wall type='tree.png' x='1' y='17'/> <wall type='tree.png' x='0' y='16'/> <wall type='tree2.png' x='17' y='19'/> <wall type='tree2.png' x='16' y='18'/> <wall type='tree2.png' x='17' y='15'/> <wall type='wall.png' x='5' y='8'/> <wall type='wall.png' x='4' y='9'/> <wall type='wall.png' x='3' y='10'/> <wall type='wall.png' x='10' y='8'/> <wall type='wall.png' x='11' y='9'/> <wall type='wall.png' x='12' y='10'/> <wall type='wall.png' x='7' y='7'/> <wall type='wall.png' x='8' y='7'/> <wall type='wall.png' x='6' y='7'/> <scenario> <suranium value='300'/> <nechelons value='4'/> </scenario> </level> <level number='4'> <title>Halgava</title> <desc>Halgava is a province of Astrum with an area of 103,001 km. The region is divided into 4 districts: Haltar, Homung, Hiroto, Hiesta.</desc> <size width='25' height='20'/> <background type='ground1.jpg'/> <unit type='Command Center' x='15' y='16'/> <unit type='Heavy Cannon' x='6' y='13'/> <unit type='Heavy Cannon' x='9' y='12'/> <wall type='mountain1.jpg' x='16' y='4'/> <wall type='tree.png' x='9' y='6'/> <wall type='tree.png' x='11' y='6'/> <wall type='tree.png' x='13' y='6'/> <wall type='tree.png' x='15' y='6'/> <wall type='tree.png' x='10' y='6'/> <wall type='tree.png' x='12' y='6'/> <wall type='tree.png' x='14' y='6'/> <wall type='tree.png' x='16' y='6'/> <wall type='tree.png' x='9' y='10'/> <wall type='tree.png' x='11' y='10'/> <wall type='tree.png' x='12' y='10'/> <wall type='tree.png' x='13' y='10'/> <wall type='tree.png' x='15' y='10'/> <wall type='tree.png' x='0' y='15'/> <wall type='tree.png' x='2' y='15'/> <wall type='tree.png' x='4' y='16'/> <wall type='tree.png' x='3' y='16'/> <wall type='tree.png' x='1' y='17'/> <wall type='tree.png' x='3' y='18'/> <wall type='tree.png' x='0' y='18'/> <wall type='tree2.png' x='2' y='16'/> <wall type='tree2.png' x='1' y='16'/> <wall type='tree2.png' x='2' y='17'/> <wall type='tree2.png' x='0' y='17'/> <wall type='tree.png' x='1' y='15'/> <wall type='tree.png' x='0' y='16'/> <wall type='tree.png' x='2' y='18'/> <wall type='wall2.png' x='0' y='9'/> <wall type='wall2.png' x='1' y='9'/> <wall type='wall2.png' x='2' y='9'/> <wall type='wall2.png' x='3' y='9'/> <wall type='wall2.png' x='4' y='9'/> <wall type='wall2.png' x='5' y='9'/> <wall type='wall.png' x='0' y='5'/> <wall type='wall.png' x='1' y='5'/> <wall type='wall.png' x='2' y='5'/> <wall type='wall.png' x='3' y='5'/> <wall type='wall.png' x='4' y='5'/> <wall type='wall.png' x='5' y='5'/> <scenario> <suranium value='300'/> <nechelons value='5'/> </scenario> </level> <level number='5'> <title>New Lionger</title> <desc>New Lionger is a province of Astrum with an area of 73,716 km. The region is divided into 3 districts: Liontok, Lioko, Lokoridge.</desc> <size width='25' height='20'/> <background type='ground1.jpg'/> <unit type='Command Center' x='10' y='16'/> <unit type='Light Cannon' x='7' y='13'/> <unit type='Light Cannon' x='11' y='13'/> <wall type='tree.png' x='4' y='3'/> <wall type='tree.png' x='4' y='4'/> <wall type='tree.png' x='4' y='5'/> <wall type='tree.png' x='4' y='6'/> <wall type='tree.png' x='4' y='7'/> <wall type='tree.png' x='4' y='8'/> <wall type='tree.png' x='4' y='9'/> <wall type='tree.png' x='4' y='10'/> <wall type='tree.png' x='4' y='11'/> <wall type='tree.png' x='8' y='3'/> <wall type='tree.png' x='8' y='4'/> <wall type='tree.png' x='8' y='6'/> <wall type='tree.png' x='8' y='5'/> <wall type='tree.png' x='8' y='7'/> <wall type='tree.png' x='8' y='8'/> <wall type='tree.png' x='8' y='9'/> <wall type='tree.png' x='8' y='10'/> <wall type='tree.png' x='8' y='11'/> <wall type='tree.png' x='12' y='3'/> <wall type='tree.png' x='12' y='4'/> <wall type='tree.png' x='12' y='5'/> <wall type='tree.png' x='12' y='6'/> <wall type='tree.png' x='12' y='6'/> <wall type='tree.png' x='12' y='7'/> <wall type='tree.png' x='12' y='8'/> <wall type='tree.png' x='12' y='8'/> <wall type='tree.png' x='12' y='9'/> <wall type='tree.png' x='12' y='10'/> <wall type='tree.png' x='12' y='11'/> <wall type='mountain1.jpg' x='17' y='11'/> <wall type='mountain1.jpg' x='18' y='2'/> <wall type='tree2.png' x='18' y='3'/> <wall type='tree2.png' x='18' y='4'/> <wall type='tree2.png' x='17' y='5'/> <wall type='tree.png' x='4' y='12'/> <wall type='tree.png' x='12' y='12'/> <wall type='tree.png' x='0' y='18'/> <wall type='tree.png' x='0' y='19'/> <wall type='tree.png' x='2' y='19'/> <wall type='tree.png' x='0' y='17'/> <wall type='tree.png' x='1' y='18'/> <wall type='tree.png' x='1' y='19'/> <wall type='tree.png' x='3' y='19'/> <wall type='tree.png' x='2' y='18'/> <wall type='tree.png' x='1' y='17'/> <wall type='tree.png' x='0' y='17'/> <wall type='tree.png' x='0' y='16'/> <scenario> <suranium value='300'/> <nechelons value='6'/> </scenario> </level> <level number='6'> <title>Tok-Nira</title> <desc>Tok-Nira is a province of Astrum with an area of 169,512 km. The region is divided into 4 districts: Toki, Tokart, Niragava, Tinak.</desc> <size width='25' height='20'/> <background type='ground1.jpg'/> <unit type='Command Center' x='10' y='16'/> <unit type='Heavy Cannon' x='8' y='14'/> <unit type='Heavy Cannon' x='11' y='14'/> <wall type='tree.png' x='0' y='5'/> <wall type='tree.png' x='2' y='5'/> <wall type='tree.png' x='1' y='6'/> <wall type='tree.png' x='4' y='5'/> <wall type='tree.png' x='3' y='6'/> <wall type='tree.png' x='2' y='7'/> <wall type='tree.png' x='0' y='8'/> <wall type='tree.png' x='1' y='8'/> <wall type='tree.png' x='3' y='9'/> <wall type='tree.png' x='4' y='10'/> <wall type='tree.png' x='3' y='11'/> <wall type='tree.png' x='2' y='11'/> <wall type='tree.png' x='1' y='11'/> <wall type='tree.png' x='0' y='12'/> <wall type='tree.png' x='1' y='12'/> <wall type='tree.png' x='3' y='13'/> <wall type='tree.png' x='3' y='14'/> <wall type='tree.png' x='4' y='14'/> <wall type='tree.png' x='2' y='13'/> <wall type='tree.png' x='2' y='15'/> <wall type='tree.png' x='1' y='15'/> <wall type='tree.png' x='1' y='16'/> <wall type='tree.png' x='0' y='17'/> <wall type='tree.png' x='1' y='10'/> <wall type='tree.png' x='0' y='9'/> <wall type='tree.png' x='0' y='7'/> <wall type='tree.png' x='5' y='5'/> <wall type='tree.png' x='6' y='5'/> <wall type='tree.png' x='4' y='6'/> <wall type='tree.png' x='3' y='7'/> <wall type='tree.png' x='5' y='10'/> <wall type='tree.png' x='5' y='14'/> <wall type='tree.png' x='3' y='15'/> <wall type='tree.png' x='4' y='13'/> <wall type='tree.png' x='3' y='12'/> <wall type='tree.png' x='2' y='16'/> <wall type='tree.png' x='2' y='9'/> <wall type='tree.png' x='2' y='8'/> <wall type='tree.png' x='3' y='10'/> <wall type='tree.png' x='0' y='14'/> <wall type='tree.png' x='12' y='5'/> <wall type='tree.png' x='14' y='5'/> <wall type='tree.png' x='16' y='5'/> <wall type='tree.png' x='15' y='6'/> <wall type='tree.png' x='14' y='6'/> <wall type='tree.png' x='15' y='7'/> <wall type='tree.png' x='14' y='8'/> <wall type='tree.png' x='12' y='8'/> <wall type='tree.png' x='12' y='9'/> <wall type='tree.png' x='12' y='9'/> <wall type='tree.png' x='11' y='9'/> <wall type='tree.png' x='14' y='9'/> <wall type='tree.png' x='16' y='10'/> <wall type='tree.png' x='16' y='10'/> <wall type='tree.png' x='14' y='10'/> <wall type='tree.png' x='13' y='11'/> <wall type='tree.png' x='12' y='12'/> <wall type='tree.png' x='13' y='13'/> <wall type='tree.png' x='14' y='14'/> <wall type='tree.png' x='15' y='15'/> <wall type='tree.png' x='15' y='16'/> <wall type='tree.png' x='14' y='17'/> <wall type='tree.png' x='16' y='15'/> <wall type='tree.png' x='15' y='13'/> <wall type='tree.png' x='15' y='12'/> <wall type='tree.png' x='16' y='13'/> <wall type='tree.png' x='16' y='11'/> <wall type='tree.png' x='16' y='8'/> <wall type='tree.png' x='17' y='6'/> <wall type='tree.png' x='13' y='10'/> <wall type='tree.png' x='13' y='4'/> <wall type='tree.png' x='16' y='4'/> <wall type='tree.png' x='5' y='4'/> <wall type='tree.png' x='3' y='4'/> <wall type='tree.png' x='16' y='17'/> <wall type='tree2.png' x='13' y='8'/> <wall type='tree2.png' x='15' y='9'/> <wall type='tree2.png' x='0' y='10'/> <wall type='tree2.png' x='1' y='7'/> <wall type='tree2.png' x='0' y='6'/> <wall type='tree2.png' x='2' y='6'/> <wall type='tree2.png' x='1' y='13'/> <wall type='tree2.png' x='1' y='14'/> <wall type='tree2.png' x='2' y='14'/> <wall type='tree2.png' x='14' y='12'/> <wall type='tree2.png' x='14' y='11'/> <wall type='tree2.png' x='16' y='7'/> <wall type='tree2.png' x='16' y='14'/> <wall type='tree2.png' x='17' y='12'/> <wall type='mountain1.jpg' x='19' y='11'/> <wall type='tree2.png' x='15' y='4'/> <wall type='tree2.png' x='12' y='4'/> <wall type='tree2.png' x='17' y='16'/> <wall type='tree.png' x='17' y='18'/> <scenario> <suranium value='300'/> <nechelons value='7'/> </scenario> </level> <level number='7'> <title>Bas-Nira</title> <desc>Bas-Nira is a province of Astrum with an area of 90,891 km. The region is divided into 4 districts: Basira, Bosta, Binako, Birad.</desc> <size width='25' height='20'/> <background type='ground1.jpg'/> <unit type='Command Center' x='10' y='15'/> <unit type='Light Cannon' x='10' y='12'/> <wall type='wall2.png' x='7' y='8'/> <wall type='wall2.png' x='6' y='8'/> <wall type='wall2.png' x='5' y='8'/> <wall type='wall2.png' x='3' y='8'/> <wall type='wall2.png' x='4' y='8'/> <wall type='wall2.png' x='3' y='9'/> <wall type='wall2.png' x='3' y='10'/> <wall type='wall2.png' x='3' y='12'/> <wall type='wall2.png' x='3' y='11'/> <wall type='wall2.png' x='3' y='13'/> <wall type='wall2.png' x='3' y='14'/> <wall type='wall2.png' x='3' y='15'/> <wall type='wall2.png' x='3' y='16'/> <wall type='wall2.png' x='3' y='17'/> <wall type='wall2.png' x='3' y='18'/> <wall type='wall2.png' x='12' y='8'/> <wall type='wall2.png' x='13' y='8'/> <wall type='wall2.png' x='14' y='8'/> <wall type='wall2.png' x='15' y='8'/> <wall type='wall2.png' x='16' y='8'/> <wall type='wall2.png' x='16' y='9'/> <wall type='wall2.png' x='16' y='10'/> <wall type='wall2.png' x='16' y='11'/> <wall type='wall2.png' x='16' y='12'/> <wall type='wall2.png' x='16' y='13'/> <wall type='wall2.png' x='16' y='14'/> <wall type='wall2.png' x='17' y='15'/> <wall type='wall2.png' x='16' y='15'/> <wall type='wall2.png' x='16' y='16'/> <wall type='wall2.png' x='16' y='17'/> <wall type='wall2.png' x='16' y='18'/> <wall type='wall2.png' x='17' y='16'/> <wall type='wall2.png' x='17' y='17'/> <wall type='wall2.png' x='19' y='17'/> <wall type='wall2.png' x='20' y='16'/> <wall type='wall2.png' x='22' y='16'/> <wall type='wall2.png' x='21' y='18'/> <wall type='wall2.png' x='20' y='19'/> <wall type='wall2.png' x='18' y='18'/> <wall type='wall2.png' x='19' y='15'/> <wall type='wall2.png' x='22' y='16'/> <wall type='wall2.png' x='21' y='17'/> <wall type='wall2.png' x='22' y='19'/> <wall type='wall.png' x='20' y='18'/> <wall type='wall.png' x='20' y='17'/> <wall type='wall.png' x='18' y='16'/> <wall type='wall.png' x='19' y='16'/> <wall type='wall.png' x='19' y='18'/> <wall type='wall.png' x='18' y='17'/> <wall type='wall.png' x='17' y='19'/> <wall type='wall.png' x='21' y='16'/> <wall type='wall.png' x='20' y='15'/> <wall type='wall.png' x='18' y='15'/> <wall type='tree2.png' x='21' y='15'/> <wall type='tree2.png' x='22' y='17'/> <wall type='tree2.png' x='18' y='14'/> <wall type='tree2.png' x='19' y='14'/> <wall type='tree2.png' x='0' y='18'/> <wall type='tree2.png' x='2' y='19'/> <wall type='tree2.png' x='1' y='19'/> <scenario> <suranium value='300'/> <nechelons value='8'/> </scenario> </level> <level number='8'> <title>Wek-Nira</title> <desc>Wek-Nira is a province of Astrum with an area of 79,451 km. The region is divided into 4 districts: Wekio, Wiki, Wenaro, Wtork.</desc> <size width='25' height='20'/> <background type='ground1.jpg'/> <unit type='Command Center' x='10' y='16'/> <unit type='Howitzer' x='10' y='11'/> <wall type='tree2.png' x='4' y='14'/> <wall type='tree2.png' x='4' y='15'/> <wall type='tree2.png' x='4' y='16'/> <wall type='tree2.png' x='14' y='14'/> <wall type='tree2.png' x='15' y='15'/> <wall type='tree2.png' x='14' y='15'/> <wall type='tree2.png' x='14' y='16'/> <wall type='tree2.png' x='3' y='15'/> <wall type='tree.png' x='13' y='3'/> <wall type='tree.png' x='14' y='4'/> <wall type='tree.png' x='15' y='5'/> <wall type='tree.png' x='16' y='6'/> <wall type='tree.png' x='16' y='4'/> <wall type='tree.png' x='15' y='3'/> <wall type='tree.png' x='14' y='3'/> <wall type='tree.png' x='16' y='4'/> <wall type='tree.png' x='16' y='3'/> <wall type='tree.png' x='17' y='4'/> <wall type='tree.png' x='17' y='6'/> <wall type='tree.png' x='17' y='6'/> <wall type='tree.png' x='17' y='7'/> <wall type='tree.png' x='18' y='8'/> <wall type='tree.png' x='17' y='5'/> <wall type='tree.png' x='16' y='5'/> <wall type='tree.png' x='15' y='4'/> <wall type='tree.png' x='0' y='7'/> <wall type='tree.png' x='1' y='6'/> <wall type='tree.png' x='2' y='5'/> <wall type='tree.png' x='3' y='4'/> <wall type='tree.png' x='0' y='5'/> <wall type='tree.png' x='0' y='5'/> <wall type='tree.png' x='1' y='5'/> <wall type='tree.png' x='1' y='4'/> <wall type='tree.png' x='0' y='4'/> <wall type='tree.png' x='0' y='6'/> <wall type='tree.png' x='2' y='4'/> <wall type='tree.png' x='2' y='3'/> <wall type='tree.png' x='4' y='3'/> <wall type='tree.png' x='3' y='3'/> <wall type='wall2.png' x='2' y='11'/> <wall type='wall2.png' x='4' y='9'/> <wall type='wall2.png' x='7' y='8'/> <wall type='wall2.png' x='11' y='8'/> <wall type='wall2.png' x='14' y='9'/> <wall type='wall2.png' x='16' y='11'/> <scenario> <suranium value='300'/> <nechelons value='10'/> </scenario> </level> <level number='9'> <title>Ionus</title> <desc>Ionus is a province of Astrum with an area of 93,009 km. The region is divided into 4 districts: Iont, Ikast, Ioro, Inus.</desc> <size width='25' height='20'/> <background type='ground1.jpg'/> <unit type='Command Center' x='10' y='16'/> <unit type='Heavy Cannon' x='8' y='13'/> <unit type='Heavy Cannon' x='11' y='13'/> <wall type='mountain1.jpg' x='16' y='2'/> <wall type='wall2.png' x='17' y='3'/> <wall type='wall2.png' x='15' y='3'/> <wall type='wall2.png' x='14' y='3'/> <wall type='wall2.png' x='14' y='3'/> <wall type='wall2.png' x='15' y='4'/> <wall type='wall2.png' x='16' y='5'/> <wall type='wall2.png' x='15' y='6'/> <wall type='wall2.png' x='13' y='5'/> <wall type='wall2.png' x='14' y='4'/> <wall type='wall2.png' x='14' y='5'/> <wall type='wall2.png' x='16' y='4'/> <wall type='wall2.png' x='16' y='7'/> <wall type='wall2.png' x='15' y='8'/> <wall type='wall2.png' x='16' y='9'/> <wall type='wall2.png' x='17' y='10'/> <wall type='wall2.png' x='17' y='11'/> <wall type='wall2.png' x='18' y='11'/> <wall type='wall2.png' x='14' y='7'/> <wall type='wall2.png' x='19' y='12'/> <wall type='wall2.png' x='20' y='13'/> <wall type='wall2.png' x='21' y='14'/> <wall type='wall2.png' x='21' y='12'/> <wall type='wall2.png' x='20' y='12'/> <wall type='wall2.png' x='22' y='11'/> <wall type='wall2.png' x='22' y='13'/> <wall type='wall2.png' x='12' y='3'/> <wall type='wall.png' x='14' y='6'/> <wall type='wall.png' x='15' y='5'/> <wall type='wall.png' x='13' y='4'/> <wall type='wall.png' x='16' y='8'/> <wall type='wall.png' x='13' y='3'/> <wall type='wall.png' x='18' y='12'/> <wall type='wall.png' x='16' y='11'/> <wall type='wall.png' x='20' y='13'/> <wall type='wall.png' x='21' y='13'/> <wall type='wall.png' x='22' y='14'/> <wall type='wall.png' x='19' y='13'/> <wall type='wall.png' x='20' y='14'/> <wall type='wall.png' x='16' y='10'/> <wall type='wall.png' x='15' y='9'/> <wall type='wall.png' x='13' y='6'/> <wall type='wall2.png' x='12' y='4'/> <wall type='wall2.png' x='11' y='3'/> <wall type='wall2.png' x='17' y='12'/> <wall type='wall2.png' x='18' y='13'/> <wall type='wall2.png' x='19' y='14'/> <wall type='wall2.png' x='21' y='15'/> <wall type='wall2.png' x='22' y='16'/> <wall type='wall2.png' x='22' y='15'/> <wall type='wall2.png' x='14' y='9'/> <wall type='wall2.png' x='14' y='8'/> <wall type='tree.png' x='5' y='15'/> <wall type='tree.png' x='7' y='16'/> <wall type='tree.png' x='7' y='17'/> <wall type='tree.png' x='7' y='18'/> <wall type='tree.png' x='4' y='16'/> <wall type='tree.png' x='2' y='15'/> <wall type='tree.png' x='2' y='17'/> <wall type='tree.png' x='4' y='17'/> <wall type='tree.png' x='5' y='17'/> <wall type='tree.png' x='6' y='18'/> <wall type='tree.png' x='4' y='18'/> <wall type='tree.png' x='1' y='16'/> <wall type='tree.png' x='0' y='16'/> <wall type='tree.png' x='0' y='17'/> <wall type='tree.png' x='1' y='18'/> <wall type='tree.png' x='3' y='19'/> <wall type='tree.png' x='0' y='14'/> <wall type='tree.png' x='2' y='14'/> <wall type='tree.png' x='1' y='12'/> <wall type='tree.png' x='0' y='12'/> <wall type='tree.png' x='1' y='14'/> <wall type='tree.png' x='9' y='19'/> <wall type='tree.png' x='8' y='18'/> <wall type='tree.png' x='4' y='15'/> <wall type='tree.png' x='3' y='16'/> <wall type='tree.png' x='1' y='13'/> <wall type='tree.png' x='3' y='14'/> <wall type='tree2.png' x='3' y='18'/> <wall type='tree2.png' x='3' y='17'/> <wall type='tree2.png' x='0' y='15'/> <wall type='tree2.png' x='6' y='17'/> <wall type='tree2.png' x='0' y='13'/> <scenario> <suranium value='300'/> <nechelons value='10'/> </scenario> </level> <level number='10'> <title>Moon York</title> <desc>Moon York is a province of Astrum with an area of 121,901 km. The region is divided into 3 districts: New Moon York, Yorkshir, Moonhold.</desc> <size width='25' height='20'/> <background type='ground1.jpg'/> <unit type='Command Center' x='15' y='16'/> <wall type='mountain1.jpg' x='18' y='3'/> <wall type='mountain1.jpg' x='10' y='3'/> <wall type='tree.png' x='17' y='10'/> <wall type='tree.png' x='17' y='8'/> <wall type='tree.png' x='18' y='6'/> <wall type='tree.png' x='18' y='4'/> <wall type='tree.png' x='17' y='3'/> <wall type='tree.png' x='18' y='5'/> <wall type='tree.png' x='17' y='7'/> <wall type='tree.png' x='17' y='9'/> <wall type='tree.png' x='12' y='12'/> <wall type='tree.png' x='14' y='12'/> <wall type='tree.png' x='15' y='12'/> <wall type='tree.png' x='17' y='12'/> <wall type='tree.png' x='18' y='11'/> <wall type='tree.png' x='19' y='12'/> <wall type='tree.png' x='20' y='12'/> <wall type='tree.png' x='21' y='12'/> <wall type='tree.png' x='18' y='13'/> <wall type='tree.png' x='16' y='12'/> <wall type='tree.png' x='16' y='13'/> <wall type='tree.png' x='14' y='13'/> <wall type='tree.png' x='13' y='13'/> <wall type='tree.png' x='13' y='12'/> <wall type='tree.png' x='21' y='13'/> <wall type='tree.png' x='20' y='13'/> <wall type='tree.png' x='11' y='11'/> <wall type='tree2.png' x='18' y='12'/> <wall type='tree2.png' x='15' y='13'/> <wall type='tree2.png' x='19' y='13'/> <wall type='tree2.png' x='11' y='12'/> <wall type='tree2.png' x='17' y='11'/> <wall type='tree.png' x='0' y='19'/> <wall type='tree.png' x='0' y='17'/> <wall type='tree.png' x='0' y='15'/> <wall type='tree.png' x='1' y='15'/> <wall type='tree.png' x='2' y='16'/> <wall type='tree.png' x='4' y='17'/> <wall type='tree.png' x='4' y='18'/> <wall type='tree.png' x='6' y='19'/> <wall type='tree.png' x='6' y='18'/> <wall type='tree.png' x='3' y='18'/> <wall type='tree.png' x='2' y='18'/> <wall type='tree.png' x='1' y='17'/> <wall type='tree.png' x='1' y='16'/> <wall type='tree.png' x='0' y='14'/> <wall type='tree.png' x='3' y='17'/> <wall type='tree.png' x='5' y='18'/> <wall type='tree.png' x='4' y='19'/> <wall type='tree.png' x='2' y='19'/> <wall type='tree.png' x='1' y='18'/> <wall type='tree.png' x='0' y='13'/> <wall type='tree.png' x='2' y='14'/> <wall type='tree.png' x='3' y='15'/> <wall type='tree.png' x='4' y='16'/> <wall type='tree.png' x='1' y='14'/> <wall type='tree2.png' x='2' y='17'/> <wall type='tree2.png' x='0' y='16'/> <scenario> <suranium value='300'/> <nechelons value='15'/> </scenario> </level> <level number='11'> <title>Sagatog</title> <desc>Sagatog is a province of Astrum with an area of 70,111 km. The region is divided into 4 districts: Saga, Songo, Sitra, Surena.</desc> <size width='25' height='20'/> <background type='ground1.jpg'/> <unit type='Command Center' x='10' y='16'/> <unit type='Missile Turret' x='8' y='14'/> <unit type='Missile Turret' x='10' y='14'/> <wall type='mountain1.jpg' x='0' y='16'/> <wall type='tree.png' x='0' y='16'/> <wall type='tree.png' x='1' y='15'/> <wall type='tree.png' x='2' y='14'/> <wall type='tree.png' x='2' y='12'/> <wall type='tree.png' x='2' y='10'/> <wall type='tree.png' x='2' y='8'/> <wall type='tree.png' x='3' y='6'/> <wall type='tree.png' x='6' y='5'/> <wall type='tree.png' x='7' y='5'/> <wall type='tree.png' x='6' y='7'/> <wall type='tree.png' x='5' y='9'/> <wall type='tree.png' x='4' y='11'/> <wall type='tree.png' x='4' y='13'/> <wall type='tree.png' x='4' y='10'/> <wall type='tree.png' x='4' y='6'/> <wall type='tree.png' x='5' y='6'/> <wall type='tree.png' x='5' y='9'/> <wall type='tree.png' x='4' y='8'/> <wall type='tree.png' x='3' y='9'/> <wall type='tree.png' x='1' y='8'/> <wall type='tree.png' x='0' y='10'/> <wall type='tree.png' x='0' y='12'/> <wall type='tree.png' x='0' y='14'/> <wall type='tree.png' x='1' y='11'/> <wall type='tree.png' x='0' y='8'/> <wall type='tree.png' x='0' y='6'/> <wall type='tree.png' x='2' y='7'/> <wall type='tree.png' x='1' y='5'/> <wall type='tree.png' x='2' y='5'/> <wall type='tree.png' x='3' y='5'/> <wall type='tree.png' x='3' y='4'/> <wall type='tree.png' x='5' y='4'/> <wall type='tree.png' x='7' y='3'/> <wall type='tree.png' x='7' y='4'/> <wall type='tree.png' x='5' y='5'/> <wall type='tree.png' x='4' y='8'/> <wall type='tree.png' x='1' y='7'/> <wall type='tree.png' x='1' y='9'/> <wall type='tree.png' x='3' y='11'/> <wall type='tree.png' x='3' y='13'/> <wall type='tree.png' x='1' y='13'/> <wall type='tree.png' x='3' y='7'/> <wall type='tree.png' x='2' y='11'/> <wall type='tree.png' x='0' y='11'/> <wall type='tree.png' x='5' y='8'/> <wall type='tree.png' x='4' y='4'/> <wall type='tree.png' x='14' y='10'/> <wall type='tree.png' x='16' y='8'/> <wall type='tree.png' x='14' y='8'/> <wall type='tree.png' x='12' y='9'/> <wall type='tree.png' x='12' y='10'/> <wall type='tree.png' x='12' y='12'/> <wall type='tree.png' x='11' y='11'/> <wall type='tree.png' x='13' y='11'/> <wall type='tree.png' x='13' y='9'/> <wall type='tree.png' x='13' y='8'/> <wall type='tree.png' x='15' y='9'/> <wall type='tree.png' x='15' y='11'/> <wall type='tree.png' x='14' y='12'/> <wall type='tree.png' x='11' y='10'/> <wall type='tree.png' x='10' y='12'/> <wall type='tree.png' x='15' y='13'/> <wall type='tree.png' x='14' y='14'/> <wall type='tree.png' x='15' y='14'/> <wall type='tree.png' x='14' y='13'/> <wall type='tree2.png' x='13' y='10'/> <wall type='tree2.png' x='15' y='11'/> <wall type='tree2.png' x='14' y='11'/> <wall type='tree2.png' x='13' y='12'/> <wall type='tree2.png' x='13' y='13'/> <wall type='tree2.png' x='4' y='10'/> <wall type='tree2.png' x='2' y='10'/> <wall type='tree2.png' x='3' y='9'/> <wall type='tree2.png' x='2' y='8'/> <wall type='tree2.png' x='4' y='8'/> <wall type='tree2.png' x='4' y='9'/> <wall type='tree2.png' x='3' y='10'/> <wall type='tree2.png' x='2' y='13'/> <wall type='tree2.png' x='0' y='13'/> <wall type='tree2.png' x='1' y='14'/> <wall type='tree.png' x='12' y='11'/> <wall type='tree.png' x='2' y='6'/> <wall type='tree.png' x='4' y='5'/> <wall type='tree.png' x='5' y='7'/> <wall type='tree.png' x='1' y='12'/> <wall type='tree.png' x='16' y='10'/> <wall type='tree.png' x='16' y='12'/> <wall type='tree.png' x='17' y='14'/> <wall type='tree.png' x='17' y='16'/> <wall type='tree.png' x='17' y='15'/> <wall type='tree.png' x='17' y='14'/> <wall type='tree.png' x='16' y='13'/> <wall type='tree.png' x='16' y='14'/> <wall type='tree.png' x='16' y='15'/> <wall type='tree.png' x='15' y='7'/> <wall type='tree.png' x='16' y='7'/> <wall type='tree.png' x='16' y='6'/> <wall type='tree2.png' x='16' y='7'/> <wall type='tree2.png' x='14' y='8'/> <wall type='tree2.png' x='4' y='6'/> <wall type='tree2.png' x='3' y='5'/> <wall type='tree2.png' x='5' y='5'/> <wall type='tree2.png' x='1' y='11'/> <wall type='tree2.png' x='17' y='15'/> <wall type='tree2.png' x='16' y='14'/> <wall type='tree2.png' x='15' y='14'/> <wall type='tree2.png' x='15' y='13'/> <wall type='tree2.png' x='11' y='11'/> <scenario> <suranium value='100'/> <nechelons value='15'/> </scenario> </level> <level number='12'> <title>Streverion</title> <desc>Streverion is a province of Astrum with an area of 99,712 km. The region is divided into 3 districts: Stever, Strion, Stork.</desc> <size width='25' height='20'/> <background type='ground1.jpg'/> <unit type='Command Center' x='10' y='15'/> <unit type='Light Cannon' x='9' y='13'/> <unit type='Light Cannon' x='11' y='13'/> <wall type='mountain1.jpg' x='16' y='12'/> <wall type='mountain1.jpg' x='16' y='3'/> <wall type='mountain1.jpg' x='0' y='5'/> <wall type='tree.png' x='6' y='11'/> <wall type='tree.png' x='6' y='13'/> <wall type='tree.png' x='4' y='14'/> <wall type='tree.png' x='4' y='16'/> <wall type='tree.png' x='6' y='17'/> <wall type='tree.png' x='7' y='18'/> <wall type='tree.png' x='5' y='17'/> <wall type='tree.png' x='4' y='15'/> <wall type='tree.png' x='13' y='11'/> <wall type='tree.png' x='14' y='12'/> <wall type='tree.png' x='15' y='13'/> <wall type='tree.png' x='14' y='14'/> <wall type='tree.png' x='15' y='15'/> <wall type='tree.png' x='14' y='17'/> <wall type='tree.png' x='13' y='18'/> <wall type='tree.png' x='14' y='18'/> <wall type='tree.png' x='14' y='16'/> <wall type='tree.png' x='5' y='13'/> <wall type='tree.png' x='14' y='11'/> <wall type='tree.png' x='13' y='10'/> <wall type='wall2.png' x='15' y='3'/> <wall type='wall2.png' x='16' y='3'/> <wall type='wall2.png' x='17' y='4'/> <wall type='wall2.png' x='16' y='4'/> <wall type='wall2.png' x='17' y='5'/> <wall type='wall2.png' x='16' y='6'/> <wall type='wall2.png' x='16' y='7'/> <wall type='wall2.png' x='16' y='8'/> <wall type='wall2.png' x='16' y='9'/> <wall type='wall2.png' x='17' y='10'/> <wall type='wall2.png' x='17' y='11'/> <wall type='wall2.png' x='18' y='12'/> <wall type='wall2.png' x='17' y='13'/> <wall type='wall2.png' x='16' y='5'/> <wall type='tree2.png' x='13' y='10'/> <wall type='tree2.png' x='13' y='11'/> <wall type='tree2.png' x='14' y='11'/> <wall type='tree2.png' x='14' y='12'/> <wall type='tree2.png' x='15' y='13'/> <wall type='tree2.png' x='14' y='14'/> <wall type='tree2.png' x='15' y='15'/> <wall type='tree2.png' x='14' y='16'/> <wall type='tree2.png' x='14' y='17'/> <wall type='tree2.png' x='14' y='18'/> <wall type='tree2.png' x='13' y='18'/> <wall type='tree2.png' x='7' y='18'/> <wall type='tree2.png' x='6' y='17'/> <wall type='tree2.png' x='5' y='17'/> <wall type='tree2.png' x='4' y='16'/> <wall type='tree2.png' x='4' y='15'/> <wall type='tree2.png' x='4' y='14'/> <wall type='tree2.png' x='5' y='13'/> <wall type='tree2.png' x='6' y='13'/> <wall type='tree2.png' x='6' y='11'/> <wall type='tree.png' x='5' y='14'/> <wall type='tree.png' x='5' y='16'/> <wall type='tree.png' x='5' y='15'/> <wall type='tree.png' x='4' y='17'/> <wall type='tree.png' x='5' y='12'/> <wall type='tree.png' x='15' y='14'/> <wall type='tree.png' x='14' y='13'/> <wall type='tree.png' x='15' y='16'/> <wall type='tree.png' x='15' y='18'/> <wall type='tree.png' x='13' y='19'/> <wall type='tree.png' x='6' y='18'/> <wall type='tree.png' x='14' y='10'/> <wall type='tree.png' x='16' y='11'/> <wall type='tree.png' x='15' y='12'/> <wall type='tree.png' x='15' y='11'/> <scenario> <suranium value='100'/> <nechelons value='20'/> </scenario> </level> <level number='13'> <title>Feihford</title> <desc>Feihford is a province of Astrum with an area of 83,511 km. The region is divided into 4 districts: Feigh, Finta, Fonford, Fostak.</desc> <size width='25' height='20'/> <background type='ground1.jpg'/> <unit type='Command Center' x='10' y='15'/> <unit type='Light Cannon' x='12' y='13'/> <unit type='Light Cannon' x='14' y='13'/> <unit type='Light Cannon' x='8' y='13'/> <wall type='wall2.png' x='22' y='19'/> <wall type='wall2.png' x='22' y='18'/> <wall type='wall2.png' x='21' y='18'/> <wall type='wall2.png' x='20' y='19'/> <wall type='wall2.png' x='17' y='19'/> <wall type='wall2.png' x='17' y='18'/> <wall type='wall2.png' x='18' y='18'/> <wall type='wall2.png' x='19' y='18'/> <wall type='wall2.png' x='18' y='16'/> <wall type='wall2.png' x='17' y='17'/> <wall type='wall2.png' x='20' y='16'/> <wall type='wall2.png' x='20' y='15'/> <wall type='wall2.png' x='19' y='13'/> <wall type='wall2.png' x='21' y='14'/> <wall type='wall2.png' x='22' y='16'/> <wall type='wall2.png' x='20' y='17'/> <wall type='wall2.png' x='19' y='17'/> <wall type='wall2.png' x='19' y='14'/> <wall type='wall2.png' x='20' y='13'/> <wall type='wall2.png' x='22' y='13'/> <wall type='wall2.png' x='21' y='16'/> <wall type='wall2.png' x='15' y='19'/> <wall type='wall2.png' x='16' y='19'/> <wall type='wall2.png' x='19' y='15'/> <wall type='wall2.png' x='16' y='18'/> <wall type='wall2.png' x='0' y='5'/> <wall type='wall2.png' x='3' y='5'/> <wall type='wall2.png' x='3' y='4'/> <wall type='wall2.png' x='2' y='5'/> <wall type='wall2.png' x='1' y='7'/> <wall type='wall2.png' x='0' y='9'/> <wall type='wall2.png' x='1' y='8'/> <wall type='wall2.png' x='0' y='6'/> <wall type='wall2.png' x='1' y='6'/> <wall type='wall2.png' x='3' y='6'/> <wall type='wall2.png' x='2' y='7'/> <wall type='wall2.png' x='0' y='8'/> <wall type='wall2.png' x='1' y='5'/> <wall type='wall2.png' x='4' y='4'/> <wall type='wall2.png' x='5' y='3'/> <wall type='wall2.png' x='4' y='5'/> <wall type='wall2.png' x='5' y='4'/> <wall type='wall.png' x='2' y='16'/> <wall type='wall.png' x='2' y='6'/> <wall type='wall.png' x='0' y='7'/> <wall type='wall.png' x='1' y='9'/> <wall type='wall.png' x='2' y='8'/> <wall type='wall.png' x='3' y='7'/> <wall type='wall.png' x='4' y='6'/> <wall type='wall.png' x='18' y='17'/> <wall type='wall.png' x='18' y='15'/> <wall type='wall.png' x='17' y='16'/> <wall type='wall.png' x='18' y='14'/> <wall type='wall.png' x='20' y='14'/> <wall type='wall.png' x='16' y='17'/> <wall type='tree.png' x='14' y='8'/> <wall type='tree.png' x='13' y='8'/> <wall type='tree.png' x='12' y='7'/> <wall type='tree.png' x='10' y='7'/> <wall type='tree.png' x='11' y='7'/> <wall type='tree.png' x='9' y='7'/> <wall type='tree.png' x='8' y='8'/> <wall type='tree.png' x='7' y='9'/> <wall type='tree.png' x='6' y='10'/> <wall type='tree.png' x='5' y='11'/> <wall type='tree.png' x='4' y='12'/> <wall type='tree.png' x='3' y='13'/> <wall type='tree.png' x='4' y='11'/> <wall type='tree.png' x='5' y='10'/> <wall type='tree.png' x='7' y='9'/> <wall type='tree.png' x='6' y='9'/> <wall type='tree.png' x='9' y='8'/> <wall type='tree.png' x='13' y='7'/> <wall type='tree.png' x='7' y='8'/> <wall type='tree2.png' x='8' y='7'/> <wall type='tree2.png' x='5' y='9'/> <wall type='tree2.png' x='3' y='12'/> <wall type='tree2.png' x='10' y='8'/> <wall type='tree2.png' x='12' y='8'/> <wall type='tree2.png' x='14' y='7'/> <wall type='mountain1.jpg' x='18' y='3'/> <scenario> <suranium value='100'/> <nechelons value='20'/> </scenario> </level> <level number='14'> <title>Uraniumland</title> <desc>Uraniumland is a province of Astrum with an area of 183,781 km. The region is divided into 5 districts: Minevil, Urankoal, Uviladge, Mernkot, Uraniumhold.</desc> <size width='25' height='20'/> <background type='ground1.jpg'/> <unit type='Command Center' x='10' y='16'/> <unit type='Howitzer' x='10' y='14'/> <wall type='tree.png' x='2' y='4'/> <wall type='tree.png' x='3' y='5'/> <wall type='tree.png' x='4' y='6'/> <wall type='tree.png' x='5' y='7'/> <wall type='tree.png' x='5' y='8'/> <wall type='tree.png' x='5' y='9'/> <wall type='tree.png' x='5' y='10'/> <wall type='tree.png' x='4' y='11'/> <wall type='tree.png' x='3' y='12'/> <wall type='tree.png' x='2' y='13'/> <wall type='tree.png' x='12' y='7'/> <wall type='tree.png' x='12' y='8'/> <wall type='tree.png' x='12' y='9'/> <wall type='tree.png' x='12' y='10'/> <wall type='tree.png' x='13' y='6'/> <wall type='tree.png' x='14' y='5'/> <wall type='tree.png' x='15' y='4'/> <wall type='tree.png' x='13' y='11'/> <wall type='tree.png' x='14' y='12'/> <wall type='tree.png' x='15' y='13'/> <wall type='tree2.png' x='4' y='7'/> <wall type='tree2.png' x='4' y='10'/> <wall type='tree2.png' x='13' y='7'/> <wall type='tree2.png' x='13' y='10'/> <wall type='mountain1.jpg' x='18' y='3'/> <wall type='mountain1.jpg' x='17' y='12'/> <wall type='wall2.png' x='0' y='18'/> <wall type='wall2.png' x='1' y='19'/> <wall type='wall2.png' x='0' y='19'/> <wall type='wall2.png' x='0' y='17'/> <wall type='wall2.png' x='1' y='18'/> <wall type='wall2.png' x='2' y='19'/> <wall type='wall2.png' x='3' y='19'/> <wall type='wall2.png' x='17' y='19'/> <wall type='wall2.png' x='16' y='19'/> <wall type='wall2.png' x='17' y='18'/> <wall type='wall2.png' x='15' y='19'/> <wall type='wall2.png' x='16' y='18'/> <wall type='wall2.png' x='17' y='17'/> <scenario> <suranium value='100'/> <nechelons value='25'/> </scenario> </level> </maps> ; } }//package fai
Section 23
//MineGoal (fai.MineGoal) package fai { public class MineGoal extends Goal { private var minetime:int;// = 80 private var engine:Engine;// = null private var mine:int;// = 0 public function MineGoal(_arg1:Engine, _arg2:Unit):void{ engine = null; mine = 0; minetime = 80; super(); engine = _arg1; owner = _arg2; } public function advance():void{ if (mine > 0){ mine--; } else { engine.addResources(Consts.uraniumportion); engine.updateMenu(); mine = minetime; }; } } }//package fai
Section 24
//MouseCursor (fai.MouseCursor) package fai { import flash.display.*; import flash.text.*; public class MouseCursor extends Sprite { private var goodshape:Shape;// = null public var bitmap:AnimatedBitmap;// = null public var type:String;// = null public var spritewidth:int;// = 0 private var msg:TextField;// = null private var badshape:Shape;// = null public var costuran:uint;// = 0 public function MouseCursor(_arg1:String, _arg2:AnimatedBitmap, _arg3:uint, _arg4:uint, _arg5:int):void{ bitmap = null; type = null; badshape = null; goodshape = null; costuran = 0; msg = null; spritewidth = 0; super(); type = _arg1; costuran = _arg4; bitmap = new AnimatedBitmap(_arg2.curbuffer, _arg2.width, _arg2.height); spritewidth = _arg5; addChild(bitmap); bitmap.x = (bitmap.x - (_arg2.width / 2)); bitmap.y = (bitmap.y - (_arg2.height / 2)); if (!_arg3){ _arg3 = 1; }; goodshape = new Shape(); drawEyeRange(0xEAEAEA, goodshape, _arg3); addChild(goodshape); badshape = new Shape(); badshape.visible = false; drawEyeRange(0xFF0000, badshape, _arg3); addChild(badshape); msg = Utils.createTextField(0xD8D8D8, 10); msg.text = "Select place for building"; msg.y = (msg.height * 2); msg.x = (msg.x - (msg.width / 2)); addChild(msg); } public function isGood():Boolean{ return (goodshape.visible); } public function setGood(_arg1:Boolean):void{ goodshape.visible = _arg1; badshape.visible = !(_arg1); } public function remove():void{ removeChild(bitmap); removeChild(goodshape); removeChild(badshape); } public function drawEyeRange(_arg1:uint, _arg2:Shape, _arg3:uint):void{ var _local4:uint; var _local5:uint; _local4 = 0x666666; _local5 = 0; _arg2.graphics.lineStyle(_local5, _local4); _arg2.graphics.beginFill(_arg1); _arg2.graphics.drawCircle(0, 0, (_arg3 * Consts.cellsize)); _arg2.graphics.endFill(); _arg2.alpha = 0.1; } } }//package fai
Section 25
//MoveGoal (fai.MoveGoal) package fai { public class MoveGoal extends Goal { private var engine:Engine;// = null public var checkpauses:Boolean;// = false public var pathindex:uint;// = 0 public var target:Position; public var world:MapMatrix;// = null public var path:Array; public var astar:Astar;// = null private var pause:uint;// = 0 private var pauses:int;// = 0 public static const PAUSE:uint = 10; public static var npathfindings:int = 0; public function MoveGoal(_arg1:Unit, _arg2:MapMatrix, _arg3:Engine):void{ target = new Position(); path = new Array(); pathindex = 0; world = null; pause = 0; pauses = 0; astar = null; checkpauses = false; engine = null; super(); engine = _arg3; owner = _arg1; world = _arg2; astar = new Astar(_arg2); astar.tid = owner.mapid; if (owner.peaceful){ astar.checkxy = astar.checknotempty; }; } public function advance():void{ var _local1:uint; if (Consts.MOVING == owner.cstate){ owner.move(); } else { if (Consts.IDLE == owner.cstate){ if (target.isequal(owner.pos)){ deactivate(); path.length = 0; owner = null; } else { if (pause > 0){ pause--; if (!pause){ if (((!(path.length)) || (world.getpos(path[pathindex])))){ setTarget(target); }; if (pauses >= 5){ if (checkpauses){ deactivate(); } else { if (owner.mapid != Consts.hostileId){ pauses = 0; astar.checkxy = astar.checknotempty; setTarget(target); astar.checkxy = astar.checkwallid; }; }; }; }; } else { if (path.length > 0){ _local1 = world.getpos(path[pathindex]); if (((!(owner.pos.isequal(path[pathindex]))) && (!((_local1 == 0))))){ if (Consts.Wall == _local1){ trace("very strange!"); setTarget(target); } else { pauses++; pause = PAUSE; return; }; } else { owner.startmove(path[pathindex]); world.setpos(path[pathindex], owner.mapid); pathindex++; owner.move(); }; } else { pauses++; pause = PAUSE; }; }; }; }; }; } public function setTarget(_arg1:Position):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; target.x = _arg1.x; target.y = _arg1.y; path.length = 0; pathindex = 0; if (npathfindings < Consts.PathfindingsPerTick){ astar.search(owner.pos, target, path, (owner.mapid == Consts.hostileId)); npathfindings++; }; if (!path.length){ pause = (PAUSE * 3); pauses++; } else { pauses = 0; _local2 = (owner.sprite.x / Consts.cellsize); _local3 = (owner.sprite.y / Consts.cellsize); if (((!((_local2 == owner.pos.x))) || (!((_local3 == owner.pos.y))))){ _local4 = Math.sqrt((((target.x - _local2) * (target.x - _local2)) + ((target.y - _local3) * (target.y - _local3)))); _local5 = Math.sqrt((((target.x - owner.pos.x) * (target.x - owner.pos.x)) + ((target.y - owner.pos.y) * (target.y - owner.pos.y)))); if (_local5 < _local4){ path.unshift(new Position(owner.pos.x, owner.pos.y)); }; }; }; } public function cleanup():void{ if (owner){ if ((((pathindex > 0)) && (!(owner.pos.isequal(path[(pathindex - 1)]))))){ world.setpos(path[(pathindex - 1)], 0); }; if (owner.cstate == Consts.MOVING){ owner.cstate = Consts.IDLE; }; }; } override public function deactivate():void{ super.deactivate(); cleanup(); } } }//package fai
Section 26
//Player (fai.Player) package fai { public class Player { public var camp:Camp; private var engine:Engine;// = null public function Player(_arg1:Engine):void{ engine = null; camp = new Camp(); super(); engine = _arg1; } public function attackTarget(_arg1:Position):void{ var _local2:Unit; var _local3:Unit; moveUnits(_arg1, false); _local2 = engine.getUnitUnder(_arg1); if (_local2){ for each (_local3 in engine.selectedUnits) { if (!_local3.peaceful){ _local3.life.setAttackTarget(_local2); }; }; }; } public function stopUnits():void{ var _local1:Unit; for each (_local1 in engine.selectedUnits) { _local1.life.stop(); }; } public function moveUnits(_arg1:Position, _arg2:Boolean):void{ var _local3:Unit; for each (_local3 in engine.selectedUnits) { if (!_local3.building){ _local3.life.move(_arg1, _arg2); }; }; } } }//package fai
Section 27
//Position (fai.Position) package fai { public class Position { public var x:int;// = 0 public var y:int;// = 0 public function Position(_arg1:int=0, _arg2:int=0):void{ x = 0; y = 0; super(); set(_arg1, _arg2); } public function set(_arg1:int, _arg2:int):void{ x = _arg1; y = _arg2; } public function isequal(_arg1:Position):Boolean{ return ((((x == _arg1.x)) && ((y == _arg1.y)))); } } }//package fai
Section 28
//RepairGoal (fai.RepairGoal) package fai { public class RepairGoal extends Goal { private var engine:Engine;// = null private var urancost:int;// = 0 private var life:int;// = 0 public function RepairGoal(_arg1:Unit, _arg2:Engine):void{ urancost = 0; life = 0; engine = null; super(); owner = _arg1; engine = _arg2; life = engine.utypes.params(owner.type).health; life = (life + ((life * _arg1.upgradeLevel) * Consts.upgradeHExtra)); if (life == owner.health){ deactivate(); return; }; urancost = (owner.costuran - ((owner.costuran * owner.health) / life)); if (((!(urancost)) && (owner.costuran))){ urancost = 1; }; if (engine.uranium < urancost){ engine.log("Not enough resources for repair"); } else { engine.uranium = (engine.uranium - urancost); engine.menu.resources.update(); owner.health = life; if (engine.isUnitInSelection(owner)){ engine.updateMenu(); }; }; deactivate(); } public function advance():void{ } public static function rcost(_arg1, _arg2:Unit):int{ var _local3:int; var _local4:int; _local3 = _arg1.utypes.params(_arg2.type).health; _local3 = (_local3 + ((_local3 * _arg2.upgradeLevel) * Consts.upgradeHExtra)); if (_arg2.health == _local3){ return (0); }; _local4 = (_arg2.costuran - ((_arg2.costuran * _arg2.health) / _local3)); if (((!(_local4)) && (_arg2.costuran))){ _local4 = 1; }; return (_local4); } } }//package fai
Section 29
//Scenario (fai.Scenario) package fai { import flash.display.*; import flash.events.*; import flash.utils.*; public class Scenario { public var engine:Engine;// = null public var wave:int;// = 0 public var thinktimer:Timer;// = null public var cc:Unit;// = null private var unitStack:Array; private var factories:Array; private var units:Array; public var pause:int;// = 0 private var subwave:int;// = 0 private var whileLive:Boolean;// = false private static const PAUSE:int = 8; private static var MaxUnitsPerWave:int = 0; public function Scenario(_arg1:Engine):void{ engine = null; thinktimer = null; cc = null; wave = 0; subwave = 0; pause = 0; whileLive = false; factories = new Array(); units = new Array(); unitStack = new Array(); super(); MaxUnitsPerWave = 0; engine = _arg1; engine.scenario = this; } private function liveCount():int{ var _local1:int; var _local2:int; var _local3:Unit; _local1 = 0; _local2 = 0; while (_local2 < units.length) { _local3 = units[_local2]; if ((((_local3.mapid == Consts.hostileId)) && (_local3.isLive()))){ _local1++; }; _local2++; }; return (_local1); } public function addUnit(_arg1:Unit):void{ units.push(_arg1); _arg1.life.move(cc.pos, false); } public function stop():void{ if (thinktimer){ thinktimer.stop(); thinktimer.removeEventListener(TimerEvent.TIMER, thinkHandler); thinktimer = null; }; units = null; cc = null; } private function makeEnemies(_arg1:int):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:String; var _local6:Unit; _local2 = int(((wave + 1) / 2)); _local3 = 0; while (_local3 < engine.mapheight) { _local4 = 3; while (_local4 < engine.mapwidth) { if (engine.world.getxy(_local4, _local3) == 0){ if ((((_arg1 < MaxUnitsPerWave)) && ((unitStack.length > 0)))){ _local5 = unitStack.shift(); _local6 = engine.buildUnit(_local5, _local4, _local3, true); engine.upgradeUnitToLevel(_local6, _local2); addUnit(_local6); _arg1++; } else { return; }; }; _local4++; }; _local3++; }; } public function sendNext():void{ if ((((subwave > 8)) && ((units.length > 0)))){ engine.log("You must destroy Boss Echelon first."); return; }; pause = 0; whileLive = false; thinkHandler(null); } public function start():void{ var _local1:String; var _local2:BitmapData; var _local3:AnimatedBitmap; engine.selectedUnits.length = 0; engine.selectedUnits.push(cc); engine.updateMenu(); MaxUnitsPerWave = 20; for each (_local1 in UnitTypes.enemies) { _local2 = engine.sloader.getBody(_local1); _local3 = new AnimatedBitmap(_local2, _local2.width, _local2.height); engine.menu.announce.add(_local1, _local3, 0); }; thinktimer = new Timer(1000, 0); thinktimer.addEventListener(TimerEvent.TIMER, thinkHandler); thinktimer.start(); engine.menu.announce.setWave((wave + 1)); thinkHandler(null); } private function makeSubwave(_arg1:int, _arg2:int=2):void{ var _local3:int; var _local4:int; _local3 = Math.floor((((UnitTypes.enemies.length - _arg1) * (wave + 1)) / _arg2)); if (!_local3){ _local3 = 1; }; engine.menu.announce.add(UnitTypes.enemies[_arg1], null, _local3); _local4 = 0; while (_local4 < _local3) { unitStack.push(UnitTypes.enemies[_arg1]); _local4++; }; } private function thinkHandler(_arg1:TimerEvent):void{ var _local2:int; var _local3:int; if (!cc.isLive()){ engine.log("Your Command Center has been destroyed!"); engine.menu.gameover(); return; }; _local2 = liveCount(); if (unitStack.length > 0){ makeEnemies(_local2); return; }; if (whileLive){ if (_local2 > 0){ return; }; whileLive = false; }; if (pause > 0){ pause--; engine.menu.announce.setSubText((pause + " secs")); return; }; if (subwave >= 8){ engine.menu.announce.setSubText("Boss"); } else { engine.menu.announce.setSubText(((subwave + 1).toString() + "/8")); }; if (!_local2){ units.length = 0; }; if (subwave == UnitTypes.enemies.length){ engine.log("Boss Attack Started."); _local3 = 0; while (_local3 < UnitTypes.enemies.length) { makeSubwave(_local3); _local3++; }; whileLive = true; subwave++; } else { if (subwave > UnitTypes.enemies.length){ subwave = 0; wave++; engine.score = (engine.score + 1000); if (wave >= engine.nechelons){ engine.menu.victory(); } else { engine.log("Another echelon is destroyed. Congratulations!"); engine.uranium = (engine.uranium + 300); engine.menu.announce.setWave((wave + 1)); }; engine.menu.resources.update(); pause = (PAUSE * 2); } else { makeSubwave(subwave); subwave++; whileLive = true; }; }; } public function setCommandCenter(_arg1:Unit):void{ cc = _arg1; } } }//package fai
Section 30
//SmartLoader (fai.SmartLoader) package fai { import flash.display.*; import flash.events.*; import flash.media.*; import flash.utils.*; public class SmartLoader { public var buttons:Dictionary; public var sounds:Dictionary; public var loaded:Boolean;// = false public var engine:Engine;// = null public var grounds:Dictionary; private var loadendHandler:Function;// = null public var maps:Map; private var loadprocessHandler:Function;// = null public var specials:Dictionary; public var utypes:UnitTypes;// = null public var mimages:Dictionary; private var loadcount:int;// = 0 private var startcount:int;// = 0 public var suites:Dictionary; public function SmartLoader(){ suites = new Dictionary(); buttons = new Dictionary(); sounds = new Dictionary(); grounds = new Dictionary(); mimages = new Dictionary(); specials = new Dictionary(); maps = new Map(); engine = null; loaded = false; loadcount = 0; startcount = 0; utypes = null; loadendHandler = null; loadprocessHandler = null; super(); } public function getLibSound(_arg1:String):Sound{ return (sounds[_arg1]); } public function getSpecial(_arg1:String):AnimatedBitmap{ var _local2:BitmapData; _local2 = specials[_arg1]; return (new AnimatedBitmap(_local2, _local2.width, _local2.height)); } public function dressUnit(_arg1:Unit, _arg2:String, _arg3:Engine):void{ var _local4:Array; _local4 = suites[_arg2]; _arg1.sprite.setAppearence(_local4[0], _local4[1], _local4[2], _local4[3], _local4[4], _arg1.spritewidth); if (!_arg1.attacksound){ _arg1.attacksound = Sound(getLibSound(UnitTypes.shotsimple)); }; _arg3.unitlayer.addChildAt(_arg1.sprite, 0); } public function getBody(_arg1:String):BitmapData{ return (suites[_arg1][0]); } public function dressPeacefulUnit(_arg1:Unit, _arg2:String, _arg3:Engine):void{ var _local4:Array; _local4 = suites[_arg2]; _arg1.sprite.setAppearence(_local4[0], null, _local4[2], null, null, _arg1.spritewidth); _arg3.unitlayer.addChildAt(_arg1.sprite, 0); } private function loadCompleteHandler(_arg1:Event):void{ loadcount--; if (!loadcount){ loadprocessHandler(100); loaded = true; loadendHandler(); } else { loadprocessHandler((100 - ((loadcount * 100) / startcount))); }; } public function load():void{ suites[UnitTypes.amphibiantank] = new Array(5); suites[UnitTypes.amphibiantank][0] = new AmphibianTankbody(0, 0); suites[UnitTypes.amphibiantank][1] = new AmphibianTankattack(0, 0); suites[UnitTypes.amphibiantank][2] = new AmphibianTankdeath(0, 0); suites[UnitTypes.amphibiantank][3] = new AmphibianTankbullet(0, 0); suites[UnitTypes.amphibiantank][4] = new AmphibianTankbe(0, 0); suites[UnitTypes.battleship] = new Array(5); suites[UnitTypes.battleship][0] = new Battleshipbody(0, 0); suites[UnitTypes.battleship][1] = new Battleshipattack(0, 0); suites[UnitTypes.battleship][2] = new Battleshipdeath(0, 0); suites[UnitTypes.battleship][3] = new Battleshipbullet(0, 0); suites[UnitTypes.battleship][4] = new Battleshipbe(0, 0); suites[UnitTypes.bdg] = new Array(5); suites[UnitTypes.bdg][0] = new BDGbody(0, 0); suites[UnitTypes.bdg][1] = new BDGattack(0, 0); suites[UnitTypes.bdg][2] = new BDGdeath(0, 0); suites[UnitTypes.bdg][3] = new AmphibianTankbullet(0, 0); suites[UnitTypes.bdg][4] = new AmphibianTankbe(0, 0); suites[UnitTypes.cc] = new Array(5); suites[UnitTypes.cc][0] = new CCbody(0, 0); suites[UnitTypes.cc][1] = new CCattack(0, 0); suites[UnitTypes.cc][2] = new CCdeath(0, 0); suites[UnitTypes.cc][3] = new AmphibianTankbullet(0, 0); suites[UnitTypes.cc][4] = new AmphibianTankbe(0, 0); suites[UnitTypes.coyote] = new Array(5); suites[UnitTypes.coyote][0] = new Coyotebody(0, 0); suites[UnitTypes.coyote][1] = new Coyoteattack(0, 0); suites[UnitTypes.coyote][2] = new Coyotedeath(0, 0); suites[UnitTypes.coyote][3] = new Coyotebullet(0, 0); suites[UnitTypes.coyote][4] = new Coyotebe(0, 0); suites[UnitTypes.tankdestroyer] = new Array(5); suites[UnitTypes.tankdestroyer][0] = new Destroyerbody(0, 0); suites[UnitTypes.tankdestroyer][1] = new Destroyerattack(0, 0); suites[UnitTypes.tankdestroyer][2] = new Destroyerdeath(0, 0); suites[UnitTypes.tankdestroyer][3] = new Battleshipbullet(0, 0); suites[UnitTypes.tankdestroyer][4] = new Battleshipbe(0, 0); suites[UnitTypes.heavycannon] = new Array(5); suites[UnitTypes.heavycannon][0] = new HCbody(0, 0); suites[UnitTypes.heavycannon][1] = new HCattack(0, 0); suites[UnitTypes.heavycannon][2] = new HCdeath(0, 0); suites[UnitTypes.heavycannon][3] = new AmphibianTankbullet(0, 0); suites[UnitTypes.heavycannon][4] = new AmphibianTankbe(0, 0); suites[UnitTypes.howitzer] = new Array(5); suites[UnitTypes.howitzer][0] = new Howitzerbody(0, 0); suites[UnitTypes.howitzer][1] = new Howitzerattack(0, 0); suites[UnitTypes.howitzer][2] = new Howitzerdeath(0, 0); suites[UnitTypes.howitzer][3] = new AmphibianTankbullet(0, 0); suites[UnitTypes.howitzer][4] = new AmphibianTankbe(0, 0); suites[UnitTypes.leopard] = new Array(5); suites[UnitTypes.leopard][0] = new Leopardbody(0, 0); suites[UnitTypes.leopard][1] = new Leopardattack(0, 0); suites[UnitTypes.leopard][2] = new Leoparddeath(0, 0); suites[UnitTypes.leopard][3] = new AmphibianTankbullet(0, 0); suites[UnitTypes.leopard][4] = new AmphibianTankbe(0, 0); suites[UnitTypes.lightcannon] = new Array(5); suites[UnitTypes.lightcannon][0] = new LCbody(0, 0); suites[UnitTypes.lightcannon][1] = new LCattack(0, 0); suites[UnitTypes.lightcannon][2] = new LCdeath(0, 0); suites[UnitTypes.lightcannon][3] = new Battleshipbullet(0, 0); suites[UnitTypes.lightcannon][4] = new Coyotebe(0, 0); suites[UnitTypes.m13tank] = new Array(5); suites[UnitTypes.m13tank][0] = new M13Tbody(0, 0); suites[UnitTypes.m13tank][1] = new M13Tattack(0, 0); suites[UnitTypes.m13tank][2] = new M13Tdeath(0, 0); suites[UnitTypes.m13tank][3] = new Coyotebullet(0, 0); suites[UnitTypes.m13tank][4] = new Coyotebe(0, 0); suites[UnitTypes.missiletank] = new Array(5); suites[UnitTypes.missiletank][0] = new MTbody(0, 0); suites[UnitTypes.missiletank][1] = new MTattack(0, 0); suites[UnitTypes.missiletank][2] = new MTdeath(0, 0); suites[UnitTypes.missiletank][3] = new AmphibianTankbullet(0, 0); suites[UnitTypes.missiletank][4] = new AmphibianTankbe(0, 0); suites[UnitTypes.missileturret] = new Array(5); suites[UnitTypes.missileturret][0] = new MTtbody(0, 0); suites[UnitTypes.missileturret][1] = new MTtattack(0, 0); suites[UnitTypes.missileturret][2] = new MTtdeath(0, 0); suites[UnitTypes.missileturret][3] = new AmphibianTankbullet(0, 0); suites[UnitTypes.missileturret][4] = new AmphibianTankbe(0, 0); suites[UnitTypes.mortar] = new Array(5); suites[UnitTypes.mortar][0] = new Mortarbody(0, 0); suites[UnitTypes.mortar][1] = new Mortarattack(0, 0); suites[UnitTypes.mortar][2] = new Mortardeath(0, 0); suites[UnitTypes.mortar][3] = new AmphibianTankbullet(0, 0); suites[UnitTypes.mortar][4] = new AmphibianTankbe(0, 0); suites[UnitTypes.tiger] = new Array(5); suites[UnitTypes.tiger][0] = new Tigerbody(0, 0); suites[UnitTypes.tiger][1] = new Tigerattack(0, 0); suites[UnitTypes.tiger][2] = new Tigerdeath(0, 0); suites[UnitTypes.tiger][3] = new AmphibianTankbullet(0, 0); suites[UnitTypes.tiger][4] = new AmphibianTankbe(0, 0); suites[UnitTypes.urefinery] = new Array(5); suites[UnitTypes.urefinery][0] = new URbody(0, 0); suites[UnitTypes.urefinery][1] = null; suites[UnitTypes.urefinery][2] = new URdeath(0, 0); suites[UnitTypes.urefinery][3] = null; suites[UnitTypes.urefinery][4] = null; buttons[UnitTypes.batomicbomb] = new Buttonatomicbomb(0, 0); buttons[UnitTypes.battack] = new Buttonattack(0, 0); buttons[UnitTypes.bbdg] = new Buttonbdg(0, 0); buttons[UnitTypes.bcancel] = new Buttoncancel(0, 0); buttons[UnitTypes.bhowitzer] = new Buttonhowitzer(0, 0); buttons[UnitTypes.blcannon] = new Buttonlcannon(0, 0); buttons[UnitTypes.bhcannon] = new Buttonhcannon(0, 0); buttons[UnitTypes.bmissileturret] = new Buttonmissileturret(0, 0); buttons[UnitTypes.bmortar] = new Buttonmortar(0, 0); buttons[UnitTypes.bstop] = new Buttonstop(0, 0); buttons[UnitTypes.burefinery] = new Buttonurefinery(0, 0); mimages[UnitTypes.miuranium] = new Menuuranium(0, 0); mimages[UnitTypes.miattack] = new Menuattack(0, 0); mimages[UnitTypes.mirange] = new Menurange(0, 0); mimages[UnitTypes.miarmor] = new Menushield(0, 0); mimages[UnitTypes.miheart] = new Menuheart(0, 0); grounds["ground1.jpg"] = new Ground1(0, 0); grounds["mountain1.jpg"] = new Mountain1(0, 0); grounds["themap.jpg"] = new GroundTheMap(0, 0); grounds["tree.png"] = new Groundtree(0, 0); grounds["tree2.png"] = new Groundtree2(0, 0); grounds["wall.png"] = new Groundwall(0, 0); grounds["wall2.png"] = new Groundwall2(0, 0); specials[UnitTypes.spatomicbomb] = new Specialatomicbomb(0, 0); sounds[UnitTypes.shotsimple] = new Soundshotsimple(); sounds[UnitTypes.shotmiddle] = new Soundshotmiddle(); sounds[UnitTypes.shotbest] = new Soundshotbest(); sounds[UnitTypes.shotab] = new Soundshotab(); loadendHandler(); loaded = true; } public function getButton(_arg1:String):AnimatedBitmap{ var _local2:BitmapData; _local2 = buttons[_arg1]; return (new AnimatedBitmap(_local2, _local2.width, _local2.height)); } public function getMenuItem(_arg1:String):AnimatedBitmap{ var _local2:BitmapData; _local2 = mimages[_arg1]; return (new AnimatedBitmap(_local2, _local2.width, _local2.height)); } public function startLoading(_arg1:Function, _arg2:Function):void{ var _local3:XML; var _local4:XMLList; var _local5:XML; loadendHandler = _arg2; loadprocessHandler = _arg1; _local3 = new XML(Maps.maps); _local4 = _local3.level; for each (_local5 in _local4) { maps.add(int(_local5.@number), new LevelMap(new XML(_local5.toString()))); }; load(); } public function getGround(_arg1:String):AnimatedBitmap{ var _local2:BitmapData; _local2 = grounds[_arg1]; return (new AnimatedBitmap(_local2, _local2.width, _local2.height)); } } }//package fai
Section 31
//Unit (fai.Unit) package fai { import flash.events.*; import flash.media.*; public class Unit { public var bulletspeed:uint;// = 45 public var mapid:uint;// = 0 private var attackpos:Position;// = null public var cstate:uint;// = 0 public var desc:String;// = "Assaulter. Defend Command Center against this unit." public var spritewidth:int;// = 24 public var rotstep:int;// = 15 private var destangel:int;// = 0 private var movetarget:Position;// = null public var eyerange:uint;// = 3 public var deathsteps:uint;// = 12 public var building:Boolean;// = false public var type:String;// = null public var deathcost:uint;// = 3 public var sprite:UnitSprite; public var attacksound:Sound;// = null public var upgradeLevel:int;// = 0 public var engine:Engine;// = null private var xstep:int;// = 0 private var ystep:int;// = 0 public var armor:uint;// = 1 public var peaceful:Boolean;// = false private var step:uint;// = 0 public var pos:Position; public var costuran:uint;// = 100 private var attacktarget:Unit;// = null public var health:int;// = 50 public var rotating:Boolean;// = false public var attackssteps:uint;// = 3 public var damage:uint;// = 0 public var movesteps:int;// = 10 public var rechargetime:uint;// = 25 public var life:LifeGoal;// = null public var killed:int;// = 0 public function Unit(_arg1:Engine, _arg2:uint, _arg3:String):void{ rotstep = 15; movesteps = 10; attackssteps = 3; deathsteps = 12; type = null; spritewidth = 24; pos = new Position(); sprite = new UnitSprite(); cstate = 0; eyerange = 3; damage = 0; armor = 1; health = 50; bulletspeed = 45; rechargetime = 25; deathcost = 3; killed = 0; upgradeLevel = 0; costuran = 100; building = false; peaceful = false; attacksound = null; desc = "Assaulter. Defend Command\nCenter against this unit."; movetarget = null; attacktarget = null; attackpos = null; engine = null; mapid = 0; xstep = 0; ystep = 0; step = 0; rotating = false; destangel = 0; life = null; super(); engine = _arg1; mapid = _arg2; type = _arg3; if (engine){ sprite.addEventListener(MouseEvent.MOUSE_OVER, onmouseover); sprite.addEventListener(MouseEvent.MOUSE_OUT, onmouseout); }; } public function die():void{ if (!step){ sprite.setDeathSprite(); engine.playExpl(pos); }; step++; sprite.setFrame(((step * sprite.nframes()) / deathsteps)); if (step >= deathsteps){ reset(); }; } private function onmouseover(_arg1:MouseEvent):void{ updateHealth(); } public function updateHealth():void{ var _local1:int; _local1 = engine.utypes.params(type).health; _local1 = (_local1 + ((_local1 * upgradeLevel) * Consts.upgradeHExtra)); sprite.select(((health * 100) / _local1), true); } public function copyProperties(_arg1:Unit):void{ eyerange = _arg1.eyerange; damage = _arg1.damage; armor = _arg1.armor; health = _arg1.health; bulletspeed = _arg1.bulletspeed; rechargetime = _arg1.rechargetime; } public function startattack(_arg1:Unit):void{ reset(); attacktarget = _arg1; cstate = Consts.ATTACK; attackpos = new Position(); attackpos.set(attacktarget.sprite.x, attacktarget.sprite.y); if (rotstep){ startrotate((((Math.atan2((attacktarget.sprite.y - sprite.y), (attacktarget.sprite.x - sprite.x)) / Math.PI) * 180) - 90)); }; } public function isLive():Boolean{ return ((health > 0)); } private function onmouseout(_arg1:MouseEvent):void{ if (((!(isLive())) || (!(engine.isUnitInSelection(this))))){ sprite.select(0, false); }; } public function startrotate(_arg1:int):void{ destangel = (_arg1 - sprite.body.rotation); if (destangel > 180){ destangel = (destangel - 360); } else { if (destangel < -180){ destangel = (destangel + 360); }; }; if (!destangel){ return; }; rotating = true; } public function move():void{ var _local1:DriveSmoke; if (rotating){ rotate(); return; }; if (!step){ sprite.setMoveSprite(); }; sprite.x = (sprite.x + xstep); sprite.y = (sprite.y + ystep); step++; if ((step % 2)){ _local1 = new DriveSmoke(engine); _local1.x = sprite.x; _local1.y = sprite.y; _local1.rotation = (Math.random() * 360); engine.backgr.addChild(_local1); _local1.play(); }; sprite.setFrame(((step * sprite.nframes()) / movesteps)); if (step >= movesteps){ engine.world.setpos(pos, 0); pos = movetarget; reset(); }; } public function reset():void{ cstate = Consts.IDLE; step = (ystep = (xstep = 0)); attacktarget = null; rotating = false; } public function rotate():void{ var _local1:int; if (Math.abs(destangel) < rotstep){ sprite.body.rotation = (sprite.body.rotation + destangel); destangel = 0; rotating = false; } else { _local1 = ((Math.abs(destangel) > rotstep)) ? ((destangel > 0)) ? rotstep : -(rotstep) : destangel; sprite.body.rotation = (sprite.body.rotation + _local1); destangel = (destangel - _local1); }; } public function startmove(_arg1:Position):void{ reset(); movetarget = _arg1; cstate = Consts.MOVING; xstep = (((movetarget.x * Consts.cellsize) - sprite.x) / movesteps); ystep = (((movetarget.y * Consts.cellsize) - sprite.y) / movesteps); if (rotstep){ startrotate((((Math.atan2(ystep, xstep) / Math.PI) * 180) - 90)); }; } public function startdie():void{ reset(); cstate = Consts.DEATH; sprite.removeEventListener(MouseEvent.MOUSE_OVER, onmouseover); sprite.removeEventListener(MouseEvent.MOUSE_OUT, onmouseout); sprite.select(0, false); } public function attack():void{ if (rotating){ rotate(); return; }; if (!step){ sprite.setAttackSprite(); engine.playSound(attacksound, pos); }; if (step >= attackssteps){ engine.runBullet(this, attacktarget, attackpos); reset(); sprite.setMoveSprite(); } else { step++; sprite.setFrame(((step * sprite.nframes()) / attackssteps)); }; } public function activate(_arg1:Engine):void{ life = new LifeGoal(_arg1, this); _arg1.goals.push(life); } } }//package fai
Section 32
//UnitSprite (fai.UnitSprite) package fai { import flash.display.*; public class UnitSprite extends Sprite { public var bullet:BitmapData;// = null public var star;// = null public var selection:Shape;// = null public var body:Sprite; private var lastfrontier:int;// = -1 public var sprite:AnimatedBitmap;// = null public var dbuffer:BitmapData;// = null public var bulletexp:BitmapData;// = null public var abuffer:BitmapData;// = null public var mbuffer:BitmapData;// = null public function UnitSprite(){ body = new Sprite(); selection = null; sprite = null; star = null; mbuffer = null; abuffer = null; dbuffer = null; bullet = null; bulletexp = null; lastfrontier = -1; super(); visible = false; } public function select(_arg1:uint, _arg2:Boolean):void{ var sqcount:*; var frontier:*; var diameter:*; var rsize:*; var startx:*; var i:*; var hpercent = _arg1; var enable = _arg2; if (!selection){ selection = new Shape(); addChildAt(selection, 1); selection.x = (selection.x - (sprite.width / 2)); selection.y = (selection.y - (sprite.height / 2)); selection.alpha = 0.5; }; if (enable){ var _local4 = selection; with (_local4) { visible = true; sqcount = 7; frontier = ((hpercent * sqcount) / 100); if (frontier != lastfrontier){ lastfrontier = frontier; diameter = Math.max(sprite.width, sprite.height); graphics.clear(); graphics.lineStyle(1, 2244111); graphics.drawCircle((sprite.width / 2), (sprite.height / 2), (diameter / 2)); rsize = 5; startx = (((-(rsize) * sqcount) / 2) + (sprite.width / 2)); graphics.lineStyle(1, 0); i = 0; while (i < sqcount) { if (i < frontier){ graphics.beginFill(4025627); }; graphics.drawRect(startx, (diameter + 3), rsize, rsize); if (i < frontier){ graphics.endFill(); }; startx = (startx + rsize); i++; }; }; }; } else { selection.visible = false; }; } public function setFrame(_arg1:uint):void{ sprite.setFrame(_arg1); } public function rotate(_arg1:uint):void{ body.rotation = _arg1; } public function setDeathSprite():void{ sprite.setBuffer(dbuffer); if (star){ removeChild(star); }; } public function nframes():uint{ return (sprite.nframes); } public function setAttackSprite():void{ sprite.setBuffer(abuffer); } public function setAppearence(_arg1:BitmapData, _arg2:BitmapData, _arg3:BitmapData, _arg4:BitmapData, _arg5:BitmapData, _arg6:int):void{ mbuffer = _arg1; abuffer = _arg2; dbuffer = _arg3; bullet = _arg4; bulletexp = _arg5; sprite = new AnimatedBitmap(mbuffer, _arg6, mbuffer.height); body.addChild(sprite); sprite.x = (sprite.x - (sprite.width / 2)); sprite.y = (sprite.y - (sprite.height / 2)); addChild(body); } public function setMoveSprite():void{ sprite.setBuffer(mbuffer); } } }//package fai
Section 33
//UnitTypes (fai.UnitTypes) package fai { import flash.utils.*; public class UnitTypes { public var engine:Engine;// = null private var sloader:SmartLoader;// = null public var upHealthOre:int;// = 200 public var upArmorOre:int;// = 300 public var upAttackOre:int;// = 300 public var upHealthUranium:int;// = 400 private var initiated:Boolean;// = false public var units:Dictionary; public var buttonToUnit:Dictionary; public var upArmorUranium:int;// = 200 public var upAttackUranium:int;// = 300 private var unitToButton:Dictionary; public static const types:Array = [lightcannon, heavycannon, missileturret, bdg, battleship, tiger, amphibiantank, cc, urefinery, mortar, howitzer, tankdestroyer, coyote, m13tank, missiletank, leopard]; public static const heavycannon:String = "Heavy Cannon"; public static const shotmiddle:String = "shotmiddle.mp3"; public static const missiletank:String = "Missile Tank"; public static const lightcannon:String = "Light Cannon"; public static const mortar:String = "Mortar"; public static const missileturret:String = "Missile Turret"; public static const buttons:Array = [battack, bstop, bcancel, bbdg, bhcannon, bhowitzer, blcannon, bmissileturret, bmortar, burefinery, batomicbomb]; public static const shotab:String = "shotab.mp3"; public static const mirange:String = "range.png"; public static const miarmor:String = "shield.png"; public static const enemies:Array = [coyote, m13tank, battleship, tankdestroyer, missiletank, amphibiantank, leopard, tiger]; public static const bhowitzer:String = "bhowitzer.png"; public static const batomicbomb:String = "batomicbomb.png"; public static const battack:String = "battack.png"; public static const shotsimple:String = "shotsimple.mp3"; public static const m13tank:String = "M13 Tank"; public static const tiger:String = "Tiger"; public static const bbdg:String = "bbdg.png"; public static const sounds:Array = [shotsimple, shotmiddle, shotbest, shotab]; public static const blcannon:String = "blcannon.png"; public static const howitzer:String = "Howitzer"; public static const burefinery:String = "burefinery.png"; public static const menuimages:Array = [miuranium, miattack, mirange, miarmor, miheart]; public static const miheart:String = "heart.png"; public static const specials:Array = [spatomicbomb]; public static const bhcannon:String = "bhcannon.png"; public static const bcancel:String = "bcancel.png"; public static const cc:String = "Command Center"; public static const miuranium:String = "uranium.png"; public static const amphibiantank:String = "Amphibian Tank"; public static const bstop:String = "bstop.png"; public static const bdg:String = "Big Defensive Gun"; public static const urefinery:String = "Uranium Refinery"; public static const spatomicbomb:String = "atomicbomb.png"; public static const shotbest:String = "shotbest.mp3"; public static const coyote:String = "Coyote"; public static const battleship:String = "Battleship"; public static const bmortar:String = "bmortar.png"; public static const leopard:String = "Leopard"; public static const bmissileturret:String = "bmissileturret.png"; public static const miattack:String = "attack.png"; public static const tankdestroyer:String = "Destroyer"; public function UnitTypes(_arg1:SmartLoader):void{ var _local2:String; var _local3:String; var _local4:Unit; units = new Dictionary(); unitToButton = new Dictionary(); buttonToUnit = new Dictionary(); sloader = null; engine = null; initiated = false; upArmorOre = 300; upArmorUranium = 200; upAttackOre = 300; upAttackUranium = 300; upHealthOre = 200; upHealthUranium = 400; super(); sloader = _arg1; sloader.utypes = this; for each (_local2 in types) { units[_local2] = createUnit(_local2); }; for each (_local3 in specials) { _local4 = createUnit(_local3); if (_local4){ units[_local3] = _local4; }; }; initUnitToButton(); initButtonToUnit(); initiated = true; } public function buttonByUnit(_arg1:String):String{ return (unitToButton[_arg1]); } public function params(_arg1:String):Unit{ return (units[_arg1]); } private function initUnitToButton():void{ unitToButton[mortar] = bmortar; unitToButton[howitzer] = bhowitzer; unitToButton[lightcannon] = blcannon; unitToButton[heavycannon] = bhcannon; unitToButton[missileturret] = bmissileturret; unitToButton[bdg] = bbdg; unitToButton[urefinery] = burefinery; } public function createUnit(_arg1:String):Unit{ var _local2:int; var _local3:int; var _local4:Unit; _local2 = 0; _local3 = 0; if (engine){ _local2 = engine.gobaltid; _local3 = engine.noradid; }; _local4 = null; switch (_arg1){ case lightcannon: _local4 = new Unit(engine, _local2, _arg1); _local4.health = 200; _local4.damage = 12; _local4.costuran = 25; _local4.eyerange = 4; _local4.desc = "Defense pawn. Small damage\nrate, attack and armor, as\nsame as cost."; _local4.armor = 0; _local4.building = true; break; case heavycannon: _local4 = new Unit(engine, _local2, _arg1); _local4.health = 350; _local4.damage = 16; _local4.costuran = 50; _local4.desc = "Good health, damage and\narmor. Best for all-round\ndefense."; _local4.armor = 1; _local4.building = true; _local4.eyerange = 4; if (initiated){ _local4.attacksound = sloader.getLibSound(shotbest); }; break; case howitzer: _local4 = new Unit(engine, _local2, _arg1); _local4.health = 400; _local4.damage = 20; _local4.eyerange = 5; _local4.costuran = 75; _local4.desc = "Best for back areas defense."; _local4.armor = 1; _local4.building = true; if (initiated){ _local4.attacksound = sloader.getLibSound(shotbest); }; break; case missileturret: _local4 = new Unit(engine, _local2, _arg1); _local4.health = 350; _local4.damage = 28; _local4.costuran = 100; _local4.eyerange = 7; _local4.bulletspeed = 40; _local4.desc = "Missile attack. Best fire\nrange. Can attack distant\nunits."; _local4.armor = 0; _local4.building = true; if (initiated){ _local4.attacksound = sloader.getLibSound(shotbest); }; break; case mortar: _local4 = new Unit(engine, _local2, _arg1); _local4.health = 500; _local4.damage = 40; _local4.costuran = 150; _local4.eyerange = 5; _local4.desc = "Very good defender.\nBest ratio of price and\npower."; _local4.armor = 2; _local4.building = true; _local4.rechargetime = 30; if (initiated){ _local4.attacksound = sloader.getLibSound(shotbest); }; break; case bdg: _local4 = new Unit(engine, _local2, _arg1); _local4.health = 600; _local4.damage = 50; _local4.costuran = 220; _local4.desc = "Best defender. Good health\nrate, damage and armor."; _local4.armor = 3; _local4.building = true; _local4.rechargetime = 30; _local4.bulletspeed = 70; _local4.eyerange = 5; if (initiated){ _local4.attacksound = sloader.getLibSound(shotbest); }; break; case cc: _local4 = new Unit(engine, _local2, _arg1); _local4.health = 1500; _local4.desc = "Your Headquarters. This\nbuilding must not be\ndestroyed."; _local4.armor = 0; _local4.damage = 35; _local4.rotstep = 0; _local4.costuran = 1000; _local4.eyerange = 8; _local4.spritewidth = 64; _local4.building = true; break; case urefinery: _local4 = new Unit(engine, _local2, _arg1); _local4.health = 500; _local4.costuran = 300; _local4.desc = "Extracts uranium.\nProduces 8 units of clear\nuranium each several seconds."; _local4.armor = 0; _local4.peaceful = true; _local4.building = true; _local4.spritewidth = 48; _local4.eyerange = 0; break; case coyote: _local4 = new Unit(engine, _local3, _arg1); _local4.health = 50; _local4.damage = 8; _local4.armor = 0; break; case m13tank: _local4 = new Unit(engine, _local3, _arg1); _local4.health = 70; _local4.damage = 16; _local4.armor = 1; _local4.deathcost = 5; break; case battleship: _local4 = new Unit(engine, _local3, _arg1); _local4.health = 100; _local4.damage = 12; _local4.armor = 1; _local4.bulletspeed = 150; _local4.deathcost = 7; _local4.eyerange = 4; if (initiated){ _local4.attacksound = sloader.getLibSound(shotab); }; break; case tankdestroyer: _local4 = new Unit(engine, _local3, _arg1); _local4.health = 125; _local4.damage = 16; _local4.armor = 1; _local4.bulletspeed = 150; _local4.deathcost = 10; _local4.eyerange = 4; if (initiated){ _local4.attacksound = sloader.getLibSound(shotab); }; break; case missiletank: _local4 = new Unit(engine, _local3, _arg1); _local4.health = 120; _local4.damage = 16; _local4.armor = 0; _local4.eyerange = 4; _local4.deathcost = 15; break; case amphibiantank: _local4 = new Unit(engine, _local3, _arg1); _local4.health = 250; _local4.damage = 20; _local4.armor = 2; _local4.deathcost = 20; _local4.eyerange = 3; if (initiated){ _local4.attacksound = sloader.getLibSound(shotbest); }; break; case leopard: _local4 = new Unit(engine, _local3, _arg1); _local4.health = 300; _local4.damage = 26; _local4.armor = 2; _local4.deathcost = 30; _local4.eyerange = 4; if (initiated){ _local4.attacksound = sloader.getLibSound(shotbest); }; break; case tiger: _local4 = new Unit(engine, _local3, _arg1); _local4.health = 400; _local4.damage = 35; _local4.armor = 3; _local4.deathcost = 50; _local4.eyerange = 4; if (initiated){ _local4.attacksound = sloader.getLibSound(shotbest); }; break; }; if (initiated){ _local4.copyProperties(units[_arg1]); if (_local4.peaceful){ sloader.dressPeacefulUnit(_local4, _arg1, engine); } else { sloader.dressUnit(_local4, _arg1, engine); }; }; return (_local4); } private function initButtonToUnit():void{ buttonToUnit[bmortar] = mortar; buttonToUnit[bhowitzer] = howitzer; buttonToUnit[blcannon] = lightcannon; buttonToUnit[bhcannon] = heavycannon; buttonToUnit[bmissileturret] = missileturret; buttonToUnit[bbdg] = bdg; buttonToUnit[burefinery] = urefinery; } } }//package fai
Section 34
//Utils (fai.Utils) package fai { import flash.text.*; public class Utils { public static function drawRect(_arg1, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:Boolean=false, _arg8:int=0, _arg9:int=0):void{ _arg1.graphics.lineStyle(_arg2, _arg3); _arg1.graphics.beginFill(_arg4); if (_arg7){ _arg1.graphics.drawRoundRect(_arg8, _arg9, _arg5, _arg6, (_arg5 / 5), (_arg6 / 5)); } else { _arg1.graphics.drawRect(_arg8, _arg9, _arg5, _arg6); }; _arg1.graphics.endFill(); } public static function createTextField(_arg1:uint, _arg2:uint=10):TextField{ var _local3:TextField; var _local4:TextFormat; _local3 = new TextField(); _local3.autoSize = TextFieldAutoSize.LEFT; _local3.background = false; _local3.border = false; _local3.selectable = false; _local4 = new TextFormat(); _local4.font = "Verdana"; _local4.color = _arg1; _local4.size = _arg2; _local4.bold = true; _local3.defaultTextFormat = _local4; return (_local3); } public static function unitStatus(_arg1:Number):String{ if (_arg1 >= 100){ return ("Very Good"); }; if (_arg1 >= 70){ return ("Well enough"); }; if (_arg1 >= 50){ return ("Could be better"); }; if (_arg1 >= 25){ return ("In bad condition"); }; return ("Poor"); } public static function textrange(_arg1:int):String{ if (_arg1 <= 3){ return ("Small"); }; if (_arg1 <= 5){ return ("Average"); }; if (_arg1 <= 6){ return ("Good"); }; return ("Big"); } } }//package fai
Section 35
//WebButton (fai.WebButton) package fai { import flash.display.*; import flash.events.*; import flash.text.*; import flash.geom.*; import flash.filters.*; public class WebButton extends Sprite { private var normalshape:Shape;// = null public var txt:TextField;// = null private var selshape:Shape;// = null public function WebButton(_arg1:String, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int=16, _arg7:int=40, _arg8:Boolean=true, _arg9:int=8158075, _arg10:int=0, _arg11:int=0x757575, _arg12:int=0x373737):void{ var radius:int; var btnW:int; var btnH:int; var web20Glow:GlowFilter; var web20Filters:Array; var myRssButton:Sprite; var shineRadius:int; var shineW:int; var shineH:int; var shineColors:Array; var shineAlphas:Array; var shineRatios:Array; var shineMatrix:Matrix; var shine:Shape; var s = _arg1; var w = _arg2; var h = _arg3; var r = _arg4; var tcolor = _arg5; var tsize = _arg6; var rr = _arg7; var doShine = _arg8; var ncf = _arg9; var nct = _arg10; var sncf = _arg11; var snct = _arg12; txt = null; selshape = null; normalshape = null; super(); radius = r; btnW = w; btnH = h; web20Glow = new GlowFilter(0xFD5300, 70); web20Filters = [web20Glow]; myRssButton = new Sprite(); addChild(myRssButton); myRssButton.x = 20; myRssButton.y = 10; normalshape = createBack(w, h, r, rr, ncf, nct); addChild(normalshape); selshape = createBack(w, h, r, rr, sncf, snct); selshape.visible = false; addChild(selshape); txt = Utils.createTextField(tcolor, tsize); txt.text = s; txt.x = ((width - txt.width) / 2); txt.y = ((height - txt.height) / 2); addChild(txt); if (doShine){ shineRadius = 16; shineW = (w - shineRadius); shineH = (h / 2); shineColors = [0xFFFFFF, 0xFFFFFF]; shineAlphas = [70, 0]; shineRatios = [0, 0xFF]; shineMatrix = new Matrix(); shineMatrix.createGradientBox(shineW, shineH, ((90 / 180) * Math.PI)); shine = new Shape(); addChild(shine); shine.x = 8; shine.y = 3; var _local14 = shine.graphics; with (_local14) { lineStyle(0, 0xFFFFFF, 0); beginGradientFill(GradientType.LINEAR, shineColors, shineAlphas, shineRatios, shineMatrix); drawRoundRect(0, 0, shineW, shineH, 20, 20); endFill(); }; }; normalshape.filters = web20Filters; selshape.filters = web20Filters; addEventListener(MouseEvent.MOUSE_OVER, onover); addEventListener(MouseEvent.MOUSE_OUT, onout); } private function createBack(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int):Shape{ var bkg:Shape; var colors:Array; var alphas:Array; var ratios:Array; var matr:Matrix; var w = _arg1; var h = _arg2; var radius = _arg3; var rr = _arg4; var gfrom = _arg5; var gto = _arg6; bkg = new Shape(); colors = [gfrom, gto]; alphas = [100, 100]; ratios = [0, 245]; matr = new Matrix(); matr.createGradientBox(w, h, ((90 / 180) * Math.PI)); var _local8 = bkg.graphics; with (_local8) { lineStyle(0, gto, 100, true, "none", "square", "round"); beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, matr, SpreadMethod.PAD); drawRoundRect(0, 0, w, h, rr, rr); endFill(); }; return (bkg); } private function onout(_arg1:MouseEvent):void{ selshape.visible = false; normalshape.visible = true; } private function onover(_arg1:MouseEvent):void{ selshape.visible = true; normalshape.visible = false; } } }//package fai
Section 36
//MochiBot (mochi.MochiBot) package mochi { import flash.display.*; import flash.net.*; import flash.system.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:Sprite, _arg2:String):MochiBot{ var _local3:MochiBot; var _local4:String; var _local5:URLVariables; var _local6:String; var _local7:URLRequest; var _local8:Loader; if (Security.sandboxType == "localWithFile"){ return (null); }; _local3 = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); _local4 = "http://core.mochibot.com/my/core.swf"; _local5 = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; _local6 = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; _local7 = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; _local8 = new Loader(); _local3.addChild(_local8); _local8.load(_local7); return (_local3); } } }//package mochi
Section 37
//MochiScores (mochi.MochiScores) package mochi { import flash.display.*; import flash.text.*; public class MochiScores { private static var boardID:String; public static var onErrorHandler:Object; public static var onCloseHandler:Object; public static function showLeaderboard(_arg1:Object=null):void{ var options = _arg1; if (options != null){ if (options.clip != null){ if ((options.clip is Sprite)){ MochiServices.setContainer(options.clip); }; delete options.clip; } else { MochiServices.setContainer(); }; MochiServices.stayOnTop(); if (options.name != null){ if ((options.name is TextField)){ if (options.name.text.length > 0){ options.name = options.name.text; }; }; }; if (options.score != null){ if ((options.score is TextField)){ if (options.score.text.length > 0){ options.score = options.score.text; }; }; }; if (options.onDisplay != null){ options.onDisplay(); } else { if (MochiServices.clip != null){ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; }; } else { options = {}; if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; if (options.onClose != null){ onCloseHandler = options.onClose; } else { onCloseHandler = function ():void{ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.play(); } else { trace("Warning: Container is not a MovieClip, cannot call default onClose."); }; }; }; if (options.onError != null){ onErrorHandler = options.onError; } else { onErrorHandler = null; }; if (options.boardID == null){ if (MochiScores.boardID != null){ options.boardID = MochiScores.boardID; }; }; MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose); } public static function closeLeaderboard():void{ MochiServices.send("scores_closeLeaderboard"); } public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2); } public static function requestList(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_requestList", null, _arg1, _arg2); } public static function scoresArrayToObjects(_arg1:Object):Object{ var _local2:Object; var _local3:Number; var _local4:Number; var _local5:Object; var _local6:Object; var _local7:String; var _local8:String; _local2 = {}; for (_local7 in _arg1) { if (typeof(_arg1[_local7]) == "object"){ if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){ _local2[_local7] = []; _local5 = _arg1[_local7]; _local4 = 0; while (_local4 < _local5.rows.length) { _local6 = {}; _local3 = 0; while (_local3 < _local5.cols.length) { _local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3]; _local3++; }; _local2[_local7].push(_local6); _local4++; }; } else { _local2[_local7] = {}; for (_local8 in _arg1[_local7]) { _local2[_local7][_local8] = _arg1[_local7][_local8]; }; }; } else { _local2[_local7] = _arg1[_local7]; }; }; return (_local2); } public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{ MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4); } public static function onClose(_arg1:Object=null):void{ if (_arg1 != null){ if (_arg1.error != null){ if (_arg1.error == true){ if (onErrorHandler != null){ if (_arg1.errorCode == null){ _arg1.errorCode = "IOError"; }; onErrorHandler(_arg1.errorCode); MochiServices.doClose(); return; }; }; }; }; onCloseHandler(); MochiServices.doClose(); } public static function setBoardID(_arg1:String):void{ MochiScores.boardID = _arg1; MochiServices.send("scores_setBoardID", {boardID:_arg1}); } } }//package mochi
Section 38
//MochiServices (mochi.MochiServices) package mochi { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.net.*; import flash.system.*; public class MochiServices { private static var _container:Object; private static var _connected:Boolean = false; private static var _swfVersion:String; private static var _sendChannel:LocalConnection; private static var _rcvChannelName:String; private static var _gatewayURL:String = "http://www.mochiads.com/static/lib/services/services.swf"; private static var _clip:MovieClip; private static var _loader:Loader; private static var _id:String; private static var _listenChannel:LocalConnection; private static var _timer:Timer; private static var _sendChannelName:String; private static var _startTime:Number; private static var _connecting:Boolean = false; public static var onError:Object; private static var _listenChannelName:String = "__mochiservices"; private static var _rcvChannel:LocalConnection; public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ if (_connected){ _sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ onError("NotConnected"); handleError(_arg2, _arg3, _arg4); flush(true); return; }; _clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); }; if (_clip != null){ if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){ _clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4}; _clip._nextcallbackID++; }; }; } public static function get connected():Boolean{ return (_connected); } private static function flush(_arg1:Boolean):void{ var _local2:Object; var _local3:Object; if (_clip != null){ if (_clip._queue != null){ while (_clip._queue.length > 0) { _local2 = _clip._queue.shift(); _local3 = null; if (_local2 != null){ if (_local2.callbackID != null){ _local3 = _clip._callbacks[_local2.callbackID]; }; delete _clip._callbacks[_local2.callbackID]; if (((_arg1) && (!((_local3 == null))))){ handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod); }; }; }; }; }; } private static function init(_arg1:String, _arg2:Object):void{ _id = _arg1; if (_arg2 != null){ _container = _arg2; loadCommunicator(_arg1, _container); }; } public static function get childClip():Object{ return (_clip); } public static function get id():String{ return (_id); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } public static function getVersion():String{ return ("1.2"); } public static function disconnect():void{ if (((_connected) || (_connecting))){ if (_clip != null){ if (_clip.parent != null){ if ((_clip.parent is Sprite)){ Sprite(_clip.parent).removeChild(_clip); _clip = null; }; }; }; _connecting = (_connected = false); flush(true); try { _listenChannel.close(); _rcvChannel.close(); } catch(error:Error) { }; }; if (_timer != null){ try { _timer.stop(); } catch(error:Error) { }; }; } public static function allowDomains(_arg1:String):String{ var _local2:String; Security.allowDomain("*"); Security.allowInsecureDomain("*"); if (_arg1.indexOf("http://") != -1){ _local2 = _arg1.split("/")[2].split(":")[0]; Security.allowDomain(_local2); Security.allowInsecureDomain(_local2); }; return (_local2); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); if (_clip.parent != null){ Sprite(_clip.parent).removeChild(_clip); }; } public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{ if (_arg1 != null){ if ((_arg1 is Sprite)){ _container = _arg1; }; }; if (_arg2){ if ((_container is Sprite)){ Sprite(_container).addChild(_clip); }; }; } private static function onStatus(_arg1:StatusEvent):void{ switch (_arg1.level){ case "error": _connected = false; _listenChannel.connect(_listenChannelName); break; }; } private static function initComChannels():void{ if (!_connected){ _sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion()}); _rcvChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _clip.onReceive = function (_arg1:Object):void{ var cb:String; var cblst:Object; var method:*; var obj:Object; var pkg = _arg1; cb = pkg.callbackID; cblst = this.client._callbacks[cb]; if (!cblst){ return; }; method = cblst.callbackMethod; obj = cblst.callbackObject; if (((obj) && ((typeof(method) == "string")))){ if (obj[method] != null){ method = obj[method]; } else { trace((("Error: Method " + method) + " does not exist.")); }; }; if (method != undefined){ try { method.apply(obj, pkg.args); } catch(error:Error) { trace("Unable to invoke callback method."); }; } else { if (obj != null){ try { obj(pkg.args); } catch(error:Error) { trace("Unable to invoke callback method on object."); }; }; }; delete this.client._callbacks[cb]; }; _clip.onError = function ():void{ MochiServices.onError("IOError"); }; _rcvChannel.connect(_rcvChannelName); trace("connected!"); _connecting = false; _connected = true; _listenChannel.close(); while (_clip._queue.length > 0) { _sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift()); }; }; } private static function listen():void{ _listenChannel = new LocalConnection(); _listenChannel.client = _clip; _clip.handshake = function (_arg1:Object):void{ MochiServices.comChannelName = _arg1.newChannel; }; _listenChannel.allowDomain("*", "localhost"); _listenChannel.allowInsecureDomain("*", "localhost"); _listenChannel.connect(_listenChannelName); trace("Waiting for MochiAds services to connect..."); } private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{ var args = _arg1; var callbackObject = _arg2; var callbackMethod = _arg3; if (args != null){ if (args.onError != null){ args.onError.apply(null, ["NotConnected"]); }; }; if (callbackMethod != null){ args = {}; args.error = true; args.errorCode = "NotConnected"; if (((!((callbackObject == null))) && ((callbackMethod is String)))){ try { var _local5 = callbackObject; _local5[callbackMethod](args); } catch(error:Error) { }; } else { if (callbackMethod != null){ try { callbackMethod.apply(args); } catch(error:Error) { }; }; }; }; } public static function get clip():Object{ return (_container); } public static function set comChannelName(_arg1:String):void{ if (_arg1 != null){ if (_arg1.length > 3){ _sendChannelName = (_arg1 + "_fromgame"); _rcvChannelName = _arg1; initComChannels(); }; }; } private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{ var clipname:String; var f:Function; var req:URLRequest; var id = _arg1; var clip = _arg2; clipname = ("_mochiservices_com_" + id); if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; MochiServices.allowDomains(_gatewayURL); _clip = createEmptyMovieClip(clip, clipname, 10336, false); _loader = new Loader(); _timer = new Timer(1000, 0); _startTime = getTimer(); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); f = function (_arg1:Object):void{ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); }; _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); req = new URLRequest(_gatewayURL); _loader.load(req); _clip.addChild(_loader); _clip._mochiservices_com = _loader; _sendChannel = new LocalConnection(); _clip._queue = []; _rcvChannel = new LocalConnection(); _rcvChannel.allowDomain("*", "localhost"); _rcvChannel.allowInsecureDomain("*", "localhost"); _rcvChannel.client = _clip; _clip._nextcallbackID = 0; _clip._callbacks = {}; listen(); return (_clip); } public static function bringToTop(_arg1:Event):void{ var e = _arg1; if (MochiServices.clip != null){ if (MochiServices.childClip != null){ try { if (MochiServices.clip.numChildren > 1){ MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1)); }; } catch(errorObject:Error) { trace("Warning: Depth sort error."); _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); }; }; }; } public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{ var id = _arg1; var clip = _arg2; var onError = _arg3; if ((clip is DisplayObject)){ if (((!(_connected)) && ((_clip == null)))){ trace("MochiServices Connecting..."); _connecting = true; init(id, clip); }; } else { trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage."); }; if (onError != null){ MochiServices.onError = onError; } else { if (MochiServices.onError == null){ MochiServices.onError = function (_arg1:String):void{ trace(_arg1); }; }; }; } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{ var _local5:MovieClip; _local5 = new MovieClip(); if (_arg4){ if (((false) && (_arg3))){ _arg1.addChildAt(_local5, _arg3); } else { _arg1.addChild(_local5); }; }; _arg1[_arg2] = _local5; _local5["_name"] = _arg2; return (_local5); } public static function connectWait(_arg1:TimerEvent):void{ if ((getTimer() - _startTime) > 10000){ if (!_connected){ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); }; _timer.stop(); }; } } }//package mochi
Section 39
//LOGO_YOUGAME_34 (stormad_fla.LOGO_YOUGAME_34) package stormad_fla { import flash.display.*; public dynamic class LOGO_YOUGAME_34 extends MovieClip { public function LOGO_YOUGAME_34(){ addFrameScript(0, frame1, 197, frame198); } function frame1(){ } function frame198(){ stop(); MovieClip(parent).play(); } } }//package stormad_fla
Section 40
//AmphibianTankattack (AmphibianTankattack) package { import flash.display.*; public dynamic class AmphibianTankattack extends BitmapData { public function AmphibianTankattack(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 41
//AmphibianTankbe (AmphibianTankbe) package { import flash.display.*; public dynamic class AmphibianTankbe extends BitmapData { public function AmphibianTankbe(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 42
//AmphibianTankbody (AmphibianTankbody) package { import flash.display.*; public dynamic class AmphibianTankbody extends BitmapData { public function AmphibianTankbody(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 43
//AmphibianTankbullet (AmphibianTankbullet) package { import flash.display.*; public dynamic class AmphibianTankbullet extends BitmapData { public function AmphibianTankbullet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 44
//AmphibianTankdeath (AmphibianTankdeath) package { import flash.display.*; public dynamic class AmphibianTankdeath extends BitmapData { public function AmphibianTankdeath(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 45
//Areas (Areas) package { import flash.display.*; import flash.text.*; public dynamic class Areas extends MovieClip { public var ar10:MovieClip; public var ar12:MovieClip; public var ar13:MovieClip; public var ar14:MovieClip; public var ar15:MovieClip; public var ar4:MovieClip; public var ar6:MovieClip; public var ar11:MovieClip; public var ar8:MovieClip; public var ar2:MovieClip; public var ar3:MovieClip; public var ar5:MovieClip; public var ar7:MovieClip; public var ar1:MovieClip; public var title:TextField; public var desc:TextField; public var waves:TextField; public var attackflash:MovieClip; public var ar9:MovieClip; } }//package
Section 46
//AtomicBomb (AtomicBomb) package { import fai.*; import flash.display.*; import flash.events.*; import flash.media.*; import flash.utils.*; public class AtomicBomb extends MovieClip { private var droppoint:Position;// = null public var bombtimer:Timer;// = null private var curscale:Number;// = 0 private var esprite:AnimatedBitmap;// = null private var frame:int;// = 0 private var engine:Engine;// = null private var step:Number;// = 3 private var pause:int;// = 0 private static const startScale:Number = 3; private static const endScale:Number = 0.1; public function AtomicBomb(_arg1:Position, _arg2:Engine):void{ var _local3:BitmapData; engine = null; bombtimer = null; curscale = 0; step = 3; frame = 0; pause = 0; droppoint = null; esprite = null; super(); engine = _arg2; gotoAndStop(0); x = (_arg1.x * Consts.cellsize); y = (_arg1.y * Consts.cellsize); scaleY = (scaleX = startScale); _local3 = engine.sloader.specials[UnitTypes.spatomicbomb]; esprite = new AnimatedBitmap(_local3, _local3.height, _local3.height); droppoint = _arg1; } private function makeDamage():void{ var _local1:int; var _local2:Unit; var _local3:int; _local1 = 0; _local2 = null; while (_local1 < engine.my.camp.units.length) { _local2 = engine.my.camp.units[_local1]; _local3 = Camp.distanceFrom(droppoint, _local2); calculateDamage(_local2, _local3); if (_local2.isLive()){ _local1++; }; }; _local1 = 0; while (_local1 < engine.comp.camp.units.length) { _local2 = engine.comp.camp.units[_local1]; _local3 = Camp.distanceFrom(droppoint, _local2); calculateDamage(_local2, _local3); if (_local2.isLive()){ _local1++; }; }; } public function clean():void{ if (bombtimer){ bombtimer.stop(); bombtimer.removeEventListener(TimerEvent.TIMER, timerfunc); bombtimer = null; }; engine.backgr.x = 0; engine.unitlayer.x = 0; if (!frame){ engine.bulletlayer.removeChild(this); } else { if (((esprite) && ((frame >= esprite.nframes)))){ engine.bulletlayer.removeChild(esprite); esprite = null; }; }; } public function start():void{ curscale = startScale; bombtimer = new Timer(50); bombtimer.addEventListener(TimerEvent.TIMER, timerfunc); bombtimer.start(); } private function calculateDamage(_arg1:Unit, _arg2:int):void{ if (_arg2 < 2){ engine.hitUnit(5000, _arg1); } else { if (_arg2 < 3){ engine.hitUnit(500, _arg1); } else { if (_arg2 < 5){ engine.hitUnit(100, _arg1); }; }; }; } private function timerfunc(_arg1:TimerEvent):void{ if (engine.paused){ return; }; if (curscale > endScale){ curscale = (curscale - (3 / (step * step))); step = (step + 0.35); scaleY = (scaleX = curscale); } else { if (!frame){ esprite.x = x; esprite.y = y; esprite.x = (esprite.x - (esprite.width / 2)); esprite.y = (esprite.y - (esprite.height / 2)); engine.bulletlayer.addChild(esprite); engine.bulletlayer.removeChild(this); makeDamage(); engine.playSound(Sound(engine.sloader.getLibSound(UnitTypes.shotbest)), droppoint); engine.playSound(Sound(engine.sloader.getLibSound(UnitTypes.shotmiddle)), droppoint); } else { if (frame >= esprite.nframes){ bombtimer.stop(); bombtimer.removeEventListener(TimerEvent.TIMER, timerfunc); bombtimer = null; engine.bulletlayer.removeChild(esprite); esprite = null; engine.backgr.x = 0; engine.unitlayer.x = 0; return; }; }; if ((pause % 2) == 0){ engine.backgr.x = 2; engine.unitlayer.x = 2; } else { engine.backgr.x = -2; engine.unitlayer.x = -2; }; if (pause > 0){ pause--; return; }; esprite.setFrame(frame); frame++; pause = 2; }; } } }//package
Section 47
//Battleshipattack (Battleshipattack) package { import flash.display.*; public dynamic class Battleshipattack extends BitmapData { public function Battleshipattack(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 48
//Battleshipbe (Battleshipbe) package { import flash.display.*; public dynamic class Battleshipbe extends BitmapData { public function Battleshipbe(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 49
//Battleshipbody (Battleshipbody) package { import flash.display.*; public dynamic class Battleshipbody extends BitmapData { public function Battleshipbody(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 50
//Battleshipbullet (Battleshipbullet) package { import flash.display.*; public dynamic class Battleshipbullet extends BitmapData { public function Battleshipbullet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 51
//Battleshipdeath (Battleshipdeath) package { import flash.display.*; public dynamic class Battleshipdeath extends BitmapData { public function Battleshipdeath(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 52
//BDGattack (BDGattack) package { import flash.display.*; public dynamic class BDGattack extends BitmapData { public function BDGattack(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 53
//BDGbody (BDGbody) package { import flash.display.*; public dynamic class BDGbody extends BitmapData { public function BDGbody(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 54
//BDGdeath (BDGdeath) package { import flash.display.*; public dynamic class BDGdeath extends BitmapData { public function BDGdeath(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 55
//Buttonatomicbomb (Buttonatomicbomb) package { import flash.display.*; public dynamic class Buttonatomicbomb extends BitmapData { public function Buttonatomicbomb(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 56
//Buttonattack (Buttonattack) package { import flash.display.*; public dynamic class Buttonattack extends BitmapData { public function Buttonattack(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 57
//Buttonbdg (Buttonbdg) package { import flash.display.*; public dynamic class Buttonbdg extends BitmapData { public function Buttonbdg(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 58
//Buttoncancel (Buttoncancel) package { import flash.display.*; public dynamic class Buttoncancel extends BitmapData { public function Buttoncancel(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 59
//Buttonhcannon (Buttonhcannon) package { import flash.display.*; public dynamic class Buttonhcannon extends BitmapData { public function Buttonhcannon(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 60
//Buttonhowitzer (Buttonhowitzer) package { import flash.display.*; public dynamic class Buttonhowitzer extends BitmapData { public function Buttonhowitzer(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 61
//Buttonlcannon (Buttonlcannon) package { import flash.display.*; public dynamic class Buttonlcannon extends BitmapData { public function Buttonlcannon(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 62
//Buttonmissileturret (Buttonmissileturret) package { import flash.display.*; public dynamic class Buttonmissileturret extends BitmapData { public function Buttonmissileturret(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 63
//Buttonmortar (Buttonmortar) package { import flash.display.*; public dynamic class Buttonmortar extends BitmapData { public function Buttonmortar(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 64
//Buttonstop (Buttonstop) package { import flash.display.*; public dynamic class Buttonstop extends BitmapData { public function Buttonstop(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 65
//Buttonurefinery (Buttonurefinery) package { import flash.display.*; public dynamic class Buttonurefinery extends BitmapData { public function Buttonurefinery(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 66
//CCattack (CCattack) package { import flash.display.*; public dynamic class CCattack extends BitmapData { public function CCattack(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 67
//CCbody (CCbody) package { import flash.display.*; public dynamic class CCbody extends BitmapData { public function CCbody(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 68
//CCdeath (CCdeath) package { import flash.display.*; public dynamic class CCdeath extends BitmapData { public function CCdeath(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 69
//Coyoteattack (Coyoteattack) package { import flash.display.*; public dynamic class Coyoteattack extends BitmapData { public function Coyoteattack(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 70
//Coyotebe (Coyotebe) package { import flash.display.*; public dynamic class Coyotebe extends BitmapData { public function Coyotebe(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 71
//Coyotebody (Coyotebody) package { import flash.display.*; public dynamic class Coyotebody extends BitmapData { public function Coyotebody(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 72
//Coyotebullet (Coyotebullet) package { import flash.display.*; public dynamic class Coyotebullet extends BitmapData { public function Coyotebullet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 73
//Coyotedeath (Coyotedeath) package { import flash.display.*; public dynamic class Coyotedeath extends BitmapData { public function Coyotedeath(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 74
//Destroyerattack (Destroyerattack) package { import flash.display.*; public dynamic class Destroyerattack extends BitmapData { public function Destroyerattack(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 75
//Destroyerbody (Destroyerbody) package { import flash.display.*; public dynamic class Destroyerbody extends BitmapData { public function Destroyerbody(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 76
//Destroyerdeath (Destroyerdeath) package { import flash.display.*; public dynamic class Destroyerdeath extends BitmapData { public function Destroyerdeath(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 77
//DriveSmoke (DriveSmoke) package { import fai.*; import flash.display.*; public class DriveSmoke extends MovieClip { private var engine:Engine;// = null public function DriveSmoke(_arg1:Engine):void{ engine = null; super(); addFrameScript(30, frame31); engine = _arg1; } function frame31(){ stop(); try { engine.backgr.removeChild(this); } catch(ArgumentError) { }; } } }//package
Section 78
//GameStage (GameStage) package { import fai.*; import flash.display.*; import flash.events.*; import flash.text.*; import mochi.*; import flash.utils.*; public dynamic class GameStage extends MovieClip { public var lbar:SimpleButton; private var mochifinished:Boolean;// = false private var loading:Sprite;// = null private var checktimer:Timer;// = null public var lpc:TextField; private var menu:GameMenu;// = null private var engine:Engine;// = null private var sloader:SmartLoader;// = null private var loadingText:TextField;// = null public function GameStage():void{ sloader = null; engine = null; menu = null; mochifinished = false; loading = null; loadingText = null; checktimer = null; super(); addFrameScript(0, frame1, 9, frame10, 19, frame20, 21, frame22); } private function mochifin():void{ if (((loading) && (loadingText))){ loading.visible = true; loadingText.visible = true; }; mochifinished = true; } public function GameStageInit():void{ sloader = new SmartLoader(); engine = new Engine(this, sloader); menu = new GameMenu(engine); mochifinished = false; loading = new Sprite(); loadingText = Utils.createTextField(0, 20); addChildAt(loading, 0); addChildAt(loadingText, 1); loadingText.x = 340; loadingText.y = 240; sloader.startLoading(loadprocess, loadcomplete); checktimer = new Timer(300, 0); checktimer.addEventListener("timer", tmfunc); checktimer.start(); mochifin(); } private function loadcomplete():void{ } function frame10(){ stop(); } function frame1(){ stop(); this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, PL_LOADING); MochiBot.track(this, "637e18c8"); MochiServices.connect("a34e8bc67a90c349", this); } function frame22(){ stop(); trace("gata"); GameStageInit(); } function frame20(){ MochiAd.showPreGameAd({id:"a34e8bc67a90c349", res:"800x600", clip:root}); } private function tmfunc(_arg1:TimerEvent):void{ if (((mochifinished) && (sloader.loaded))){ checktimer.stop(); checktimer.removeEventListener("timer", tmfunc); checktimer = null; menu.create(); menu.hide(); menu.loadLocally(); menu.showIntro(); }; } private function loadprocess(_arg1:Number):void{ var cbsize:*; var i:*; var percent = _arg1; var _local3 = loading; with (_local3) { cbsize = 8; graphics.clear(); graphics.beginFill((percent * 2.5)); i = 0; while (i <= percent) { graphics.drawRect((i * cbsize), 0, cbsize, engine.gameheight); i++; }; graphics.endFill(); }; loadingText.text = (("loading: " + int(percent).toString()) + "%"); if (100 == percent){ removeChild(loading); removeChild(loadingText); loading = null; loadingText = null; }; } public function PL_LOADING(_arg1:ProgressEvent):void{ var _local2:Number; _local2 = ((_arg1.bytesLoaded / _arg1.bytesTotal) * 100); lbar.scaleX = (_local2 / 100); lpc.text = (int(_local2) + "%"); if (_local2 == 100){ gotoAndStop("splash1"); }; } private function mochistart():void{ if (((loading) && (loadingText))){ loading.visible = false; loadingText.visible = false; }; } } }//package
Section 79
//Ground1 (Ground1) package { import flash.display.*; public dynamic class Ground1 extends BitmapData { public function Ground1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 80
//GroundTheMap (GroundTheMap) package { import flash.display.*; public dynamic class GroundTheMap extends BitmapData { public function GroundTheMap(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 81
//Groundtree (Groundtree) package { import flash.display.*; public dynamic class Groundtree extends BitmapData { public function Groundtree(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 82
//Groundtree2 (Groundtree2) package { import flash.display.*; public dynamic class Groundtree2 extends BitmapData { public function Groundtree2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 83
//Groundwall (Groundwall) package { import flash.display.*; public dynamic class Groundwall extends BitmapData { public function Groundwall(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 84
//Groundwall2 (Groundwall2) package { import flash.display.*; public dynamic class Groundwall2 extends BitmapData { public function Groundwall2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 85
//HCattack (HCattack) package { import flash.display.*; public dynamic class HCattack extends BitmapData { public function HCattack(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 86
//HCbody (HCbody) package { import flash.display.*; public dynamic class HCbody extends BitmapData { public function HCbody(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 87
//HCdeath (HCdeath) package { import flash.display.*; public dynamic class HCdeath extends BitmapData { public function HCdeath(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 88
//Howitzerattack (Howitzerattack) package { import flash.display.*; public dynamic class Howitzerattack extends BitmapData { public function Howitzerattack(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 89
//Howitzerbody (Howitzerbody) package { import flash.display.*; public dynamic class Howitzerbody extends BitmapData { public function Howitzerbody(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 90
//Howitzerdeath (Howitzerdeath) package { import flash.display.*; public dynamic class Howitzerdeath extends BitmapData { public function Howitzerdeath(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 91
//InterlevelPopup (InterlevelPopup) package { import flash.display.*; import flash.text.*; public dynamic class InterlevelPopup extends MovieClip { public var subtitle:TextField; public var closebutton:MovieClip; public var title:TextField; } }//package
Section 92
//Intro (Intro) package { import flash.display.*; public dynamic class Intro extends MovieClip { } }//package
Section 93
//LCattack (LCattack) package { import flash.display.*; public dynamic class LCattack extends BitmapData { public function LCattack(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 94
//LCbody (LCbody) package { import flash.display.*; public dynamic class LCbody extends BitmapData { public function LCbody(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 95
//LCdeath (LCdeath) package { import flash.display.*; public dynamic class LCdeath extends BitmapData { public function LCdeath(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 96
//Leopardattack (Leopardattack) package { import flash.display.*; public dynamic class Leopardattack extends BitmapData { public function Leopardattack(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 97
//Leopardbody (Leopardbody) package { import flash.display.*; public dynamic class Leopardbody extends BitmapData { public function Leopardbody(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 98
//Leoparddeath (Leoparddeath) package { import flash.display.*; public dynamic class Leoparddeath extends BitmapData { public function Leoparddeath(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 99
//M13Tattack (M13Tattack) package { import flash.display.*; public dynamic class M13Tattack extends BitmapData { public function M13Tattack(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 100
//M13Tbody (M13Tbody) package { import flash.display.*; public dynamic class M13Tbody extends BitmapData { public function M13Tbody(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 101
//M13Tdeath (M13Tdeath) package { import flash.display.*; public dynamic class M13Tdeath extends BitmapData { public function M13Tdeath(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 102
//Menuattack (Menuattack) package { import flash.display.*; public dynamic class Menuattack extends BitmapData { public function Menuattack(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 103
//Menuheart (Menuheart) package { import flash.display.*; public dynamic class Menuheart extends BitmapData { public function Menuheart(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 104
//Menurange (Menurange) package { import flash.display.*; public dynamic class Menurange extends BitmapData { public function Menurange(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 105
//Menushield (Menushield) package { import flash.display.*; public dynamic class Menushield extends BitmapData { public function Menushield(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 106
//Menuuranium (Menuuranium) package { import flash.display.*; public dynamic class Menuuranium extends BitmapData { public function Menuuranium(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 107
//MochiAd (MochiAd) package { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.net.*; import flash.system.*; public class MochiAd { public static function getVersion():String{ return ("2.2"); } public static function showTimedAd(_arg1:Object):void{ MochiAd.showInterLevelAd(_arg1); } public static function _allowDomains(_arg1:String):String{ var _local2:String; _local2 = _arg1.split("/")[2].split(":")[0]; Security.allowDomain("*"); Security.allowDomain(_local2); Security.allowInsecureDomain("*"); Security.allowInsecureDomain(_local2); return (_local2); } public static function load(_arg1:Object):MovieClip{ var DEFAULTS:Object; var clip:Object; var depth:Number; var mc:MovieClip; var wh:Array; var lv:URLVariables; var k:String; var server:String; var hostname:String; var lc:LocalConnection; var name:String; var loader:Loader; var f:Function; var g:Function; var req:URLRequest; var v:Object; var options = _arg1; DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; if (!MochiAd._isNetworkAvailable()){ return (null); }; try { if (clip._mochiad_loaded){ return (null); }; } catch(e:Error) { throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; depth = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, "_mochiad", depth); wh = MochiAd._getRes(options, clip); options.res = ((wh[0] + "x") + wh[1]); options.server = (options.server + options.id); delete options.id; clip._mochiad_loaded = true; if (clip.loaderInfo.loaderURL.indexOf("http") == 0){ options.as3_swf = clip.loaderInfo.loaderURL; }; lv = new URLVariables(); for (k in options) { v = options[k]; if (!(v is Function)){ lv[k] = v; }; }; server = lv.server; delete lv.server; hostname = _allowDomains(server); lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.lc = lc; lv.lc = name; lv.st = getTimer(); loader = new Loader(); f = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); mc._mochiad_ctr_failed = true; }; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); g = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); MochiAd.unload(clip); }; loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g); req = new URLRequest((server + ".swf")); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader.load(req); mc.addChild(loader); mc._mochiad_ctr = loader; return (mc); } public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{ var _local4:MovieClip; _local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id}); if (!_local4){ return (false); }; _local4.doSend(["sendHighScore", _arg1], _arg2, _arg3); return (true); } public static function _parseOptions(_arg1:Object, _arg2:Object):Object{ var _local3:Object; var _local4:String; var _local5:Array; var _local6:Number; var _local7:Array; _local3 = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; if (_arg1){ for (_local4 in _arg1) { _local3[_local4] = _arg1[_local4]; }; }; if (_local3.clip == undefined){ throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite.")); }; _arg1 = _local3.clip.loaderInfo.parameters.mochiad_options; if (_arg1){ _local5 = _arg1.split("&"); _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6].split("="); _local3[unescape(_local7[0])] = unescape(_local7[1]); _local6++; }; }; if (_local3.id == "test"){ trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!"); }; return (_local3); } public static function _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function _cleanup(_arg1:Object):void{ var idx:Number; var k:String; var lc:LocalConnection; var f:Function; var mc = _arg1; if (("lc" in mc)){ lc = mc.lc; f = function ():void{ try { lc.client = null; lc.close(); } catch(e:Error) { }; }; setTimeout(f, 0); }; idx = DisplayObjectContainer(mc).numChildren; while (idx > 0) { idx = (idx - 1); DisplayObjectContainer(mc).removeChildAt(idx); }; for (k in mc) { delete mc[k]; }; } public static function unload(_arg1:Object):Boolean{ if (((_arg1.clip) && (_arg1.clip._mochiad))){ _arg1 = _arg1.clip; }; if (!_arg1._mochiad){ return (false); }; if (_arg1._mochiad.onUnload){ _arg1._mochiad.onUnload(); }; delete _arg1._mochiad_loaded; delete _arg1._mochiad; return (true); } public static function showInterLevelAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = (_arg1 - 250); }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Number; var _local3:Boolean; var _local4:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; _local1 = this.parent._mochiad_ctr; _local2 = (getTimer() - this.started); _local3 = false; if (!chk.showing){ _local4 = _local1.loaderInfo.bytesTotal; if ((((_local4 > 0)) || (("number" == "undefined")))){ chk.showing = true; chk.started = getTimer(); } else { if (_local2 > chk.ad_timeout){ _local3 = true; }; }; }; if ((((_local2 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){ _local3 = true; }; if (_local3){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function _getRes(_arg1:Object, _arg2:Object):Array{ var _local3:Object; var _local4:Number; var _local5:Number; var _local6:Array; _local3 = _arg2.getBounds(_arg2.root); _local4 = 0; _local5 = 0; if (typeof(_arg1.res) != "undefined"){ _local6 = _arg1.res.split("x"); _local4 = parseFloat(_local6[0]); _local5 = parseFloat(_local6[1]); } else { _local4 = (_local3.xMax - _local3.xMin); _local5 = (_local3.yMax - _local3.yMin); }; if ((((_local4 == 0)) || ((_local5 == 0)))){ _local4 = _arg2.stage.stageWidth; _local5 = _arg2.stage.stageHeight; }; return ([_local4, _local5]); } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{ var _local4:MovieClip; _local4 = new MovieClip(); if (((false) && (_arg3))){ _arg1.addChildAt(_local4, _arg3); } else { _arg1.addChild(_local4); }; _arg1[_arg2] = _local4; _local4["_name"] = _arg2; return (_local4); } public static function _loadCommunicator(_arg1:Object):MovieClip{ var DEFAULTS:Object; var clip:Object; var clipname:String; var server:String; var depth:Number; var mc:MovieClip; var lv:URLVariables; var k:String; var lc:LocalConnection; var name:String; var req:URLRequest; var loader:Loader; var options = _arg1; DEFAULTS = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; clipname = ("_mochiad_com_" + options.id); if (!MochiAd._isNetworkAvailable()){ return (null); }; if (clip[clipname]){ return (clip[clipname]); }; server = (options.com_server + options.id); MochiAd._allowDomains(server); delete options.id; delete options.com_server; depth = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, clipname, depth); lv = new URLVariables(); for (k in options) { lv[k] = options[k]; }; lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.name = name; mc.lc = lc; lv.lc = name; mc._id = 0; mc._queue = []; mc.rpcResult = function (_arg1:Object):void{ var _local3:Array; var _local4:Array; var _local5:Number; var _local6:Object; var _local7:Object; _arg1 = parseInt(_arg1.toString()); _local3 = mc._callbacks[_arg1]; if (typeof(_local3) == "undefined"){ return; }; delete mc._callbacks[_arg1]; _local4 = []; _local5 = 2; while (_local5 < _local3.length) { _local4.push(_local3[_local5]); _local5++; }; _local5 = 1; while (_local5 < arguments.length) { _local4.push(arguments[_local5]); _local5++; }; _local6 = _local3[1]; _local7 = _local3[0]; if (((_local7) && ((typeof(_local6) == "string")))){ _local6 = _local7[_local6]; }; if (typeof(_local6) == "function"){ _local6.apply(_local7, _local4); }; }; mc._didConnect = function (_arg1:String):void{ var _local2:Array; var _local3:Function; var _local4:Number; var _local5:Array; mc._endpoint = _arg1; _local2 = mc._queue; delete mc._queue; _local3 = mc.doSend; _local4 = 0; while (_local4 < _local2.length) { _local5 = _local2[_local4]; _local3.apply(this, _local5); _local4++; }; }; mc.doSend = function (_arg1:Array, _arg2:Object, _arg3:Object):void{ var _local5:Number; var _local6:LocalConnection; var _local7:Array; var _local8:Number; if (mc._endpoint == null){ _local7 = []; _local8 = 0; while (_local8 < arguments.length) { _local7.push(arguments[_local8]); _local8++; }; mc._queue.push(_local7); return; }; mc._id = (mc._id + 1); _local5 = mc._id; mc._callbacks[_local5] = [_arg2, ((_arg3) || (_arg2))]; _local6 = new LocalConnection(); _local6.send(mc._endpoint, "rpc", _local5, _arg1); }; mc._callbacks = {}; mc._callbacks[0] = [mc, "_didConnect"]; lv.st = getTimer(); req = new URLRequest((server + ".swf")); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader = new Loader(); loader.load(req); mc.addChild(loader); mc._mochiad_com = loader; return (mc); } public static function showPreGameAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var bar:MovieClip; var bar_color:Number; var bar_background:Number; var bar_outline:Number; var backing_mc:MovieClip; var backing:Object; var inside_mc:MovieClip; var inside:Object; var outline_mc:MovieClip; var outline:Object; var complete:Boolean; var unloaded:Boolean; var f:Function; var r:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ var fn:Function; MochiAd._cleanup(mc); fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.x = (w * -0.5); chk.y = (h * -0.5); bar = createEmptyMovieClip(chk, "_mochiad_bar", 4); bar.x = 10; bar.y = (h - 20); bar_color = options.color; delete options.color; bar_background = options.background; delete options.background; bar_outline = options.outline; delete options.outline; backing_mc = createEmptyMovieClip(bar, "_outline", 1); backing = backing_mc.graphics; backing.beginFill(bar_background); backing.moveTo(0, 0); backing.lineTo((w - 20), 0); backing.lineTo((w - 20), 10); backing.lineTo(0, 10); backing.lineTo(0, 0); backing.endFill(); inside_mc = createEmptyMovieClip(bar, "_inside", 2); inside = inside_mc.graphics; inside.beginFill(bar_color); inside.moveTo(0, 0); inside.lineTo((w - 20), 0); inside.lineTo((w - 20), 10); inside.lineTo(0, 10); inside.lineTo(0, 0); inside.endFill(); inside_mc.scaleX = 0; outline_mc = createEmptyMovieClip(bar, "_outline", 3); outline = outline_mc.graphics; outline.lineStyle(0, bar_outline, 100); outline.moveTo(0, 0); outline.lineTo((w - 20), 0); outline.lineTo((w - 20), 10); outline.lineTo(0, 10); outline.lineTo(0, 0); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.last_pcnt = 0; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; f = function (_arg1:Event):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); complete = true; if (unloaded){ MochiAd.unload(clip); }; }; clip.loaderInfo.addEventListener(Event.COMPLETE, f); if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ MochiAd.unload(clip); }; }; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = _arg1; }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Object; var _local3:Number; var _local4:Boolean; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Object; var _local10:Number; var _local11:Number; if (!this.parent.parent){ delete this["onEnterFrame"]; return; }; _local1 = this.parent.parent.root; _local2 = this.parent._mochiad_ctr; _local3 = (getTimer() - this.started); _local4 = false; _local5 = _local1.loaderInfo.bytesTotal; _local6 = _local1.loaderInfo.bytesLoaded; if (complete){ _local6 = Math.max(1, _local6); _local5 = _local6; }; _local7 = ((100 * _local6) / _local5); _local8 = ((100 * _local3) / chk.ad_msec); _local9 = this._mochiad_bar._inside; _local10 = Math.min(100, Math.min(((_local7) || (0)), _local8)); _local10 = Math.max(this.last_pcnt, _local10); this.last_pcnt = _local10; _local9.scaleX = (_local10 * 0.01); if (!chk.showing){ _local11 = _local2.loaderInfo.bytesTotal; if ((((_local11 > 0)) || (("number" == "undefined")))){ chk.showing = true; chk.started = getTimer(); } else { if (_local3 > chk.ad_timeout){ _local4 = true; }; }; }; if ((((_local3 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){ _local4 = true; }; if (((complete) && (_local4))){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function showPreloaderAd(_arg1:Object):void{ MochiAd.showPreGameAd(_arg1); } public static function fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{ var _local4:MovieClip; _local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id}); if (!_local4){ return (false); }; _local4.doSend(["fetchHighScores", _arg1], _arg2, _arg3); return (true); } public static function doOnEnterFrame(_arg1:MovieClip):void{ var f:Function; var mc = _arg1; f = function (_arg1:Object):void{ if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){ mc.onEnterFrame(); } else { _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; }; mc.addEventListener(Event.ENTER_FRAME, f); } } }//package
Section 108
//Mortarattack (Mortarattack) package { import flash.display.*; public dynamic class Mortarattack extends BitmapData { public function Mortarattack(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 109
//Mortarbody (Mortarbody) package { import flash.display.*; public dynamic class Mortarbody extends BitmapData { public function Mortarbody(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 110
//Mortardeath (Mortardeath) package { import flash.display.*; public dynamic class Mortardeath extends BitmapData { public function Mortardeath(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 111
//Mountain1 (Mountain1) package { import flash.display.*; public dynamic class Mountain1 extends BitmapData { public function Mountain1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 112
//MTattack (MTattack) package { import flash.display.*; public dynamic class MTattack extends BitmapData { public function MTattack(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 113
//MTbody (MTbody) package { import flash.display.*; public dynamic class MTbody extends BitmapData { public function MTbody(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 114
//MTdeath (MTdeath) package { import flash.display.*; public dynamic class MTdeath extends BitmapData { public function MTdeath(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 115
//MTtattack (MTtattack) package { import flash.display.*; public dynamic class MTtattack extends BitmapData { public function MTtattack(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 116
//MTtbody (MTtbody) package { import flash.display.*; public dynamic class MTtbody extends BitmapData { public function MTtbody(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 117
//MTtdeath (MTtdeath) package { import flash.display.*; public dynamic class MTtdeath extends BitmapData { public function MTtdeath(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 118
//Soundshotab (Soundshotab) package { import flash.media.*; public dynamic class Soundshotab extends Sound { } }//package
Section 119
//Soundshotbest (Soundshotbest) package { import flash.media.*; public dynamic class Soundshotbest extends Sound { } }//package
Section 120
//Soundshotmiddle (Soundshotmiddle) package { import flash.media.*; public dynamic class Soundshotmiddle extends Sound { } }//package
Section 121
//Soundshotsimple (Soundshotsimple) package { import flash.media.*; public dynamic class Soundshotsimple extends Sound { } }//package
Section 122
//Specialatomicbomb (Specialatomicbomb) package { import flash.display.*; public dynamic class Specialatomicbomb extends BitmapData { public function Specialatomicbomb(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 123
//SubmitHighscores (SubmitHighscores) package { import flash.display.*; import flash.text.*; public dynamic class SubmitHighscores extends MovieClip { public var msg:TextField; public var username:TextField; } }//package
Section 124
//Tigerattack (Tigerattack) package { import flash.display.*; public dynamic class Tigerattack extends BitmapData { public function Tigerattack(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 125
//Tigerbody (Tigerbody) package { import flash.display.*; public dynamic class Tigerbody extends BitmapData { public function Tigerbody(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 126
//Tigerdeath (Tigerdeath) package { import flash.display.*; public dynamic class Tigerdeath extends BitmapData { public function Tigerdeath(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 127
//UpgradeStar (UpgradeStar) package { import flash.display.*; import flash.text.*; public dynamic class UpgradeStar extends MovieClip { public var level:TextField; } }//package
Section 128
//URbody (URbody) package { import flash.display.*; public dynamic class URbody extends BitmapData { public function URbody(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 129
//URdeath (URdeath) package { import flash.display.*; public dynamic class URdeath extends BitmapData { public function URdeath(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package

Library Items

Symbol 1 Sound {Soundshotab}Used by:Timeline
Symbol 2 Sound {Soundshotbest}Used by:Timeline
Symbol 3 Sound {Soundshotsimple}Used by:Timeline
Symbol 4 Sound {Soundshotmiddle}Used by:Timeline
Symbol 5 GraphicUsed by:10
Symbol 6 FontUsed by:7 8 9 45 48 50 51 52 64 78 88 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 246
Symbol 7 TextUses:6Used by:10
Symbol 8 EditableTextUses:6Used by:10
Symbol 9 EditableTextUses:6Used by:10
Symbol 10 MovieClip {SubmitHighscores}Uses:5 7 8 9Used by:Timeline
Symbol 11 Bitmap {URdeath}Used by:Timeline
Symbol 12 Bitmap {URbody}Used by:Timeline
Symbol 13 Bitmap {Tigerdeath}Used by:Timeline
Symbol 14 Bitmap {Tigerbody}Used by:Timeline
Symbol 15 Bitmap {Tigerattack}Used by:Timeline
Symbol 16 Bitmap {Mortardeath}Used by:Timeline
Symbol 17 Bitmap {Mortarbody}Used by:Timeline
Symbol 18 Bitmap {Mortarattack}Used by:Timeline
Symbol 19 Bitmap {MTtdeath}Used by:Timeline
Symbol 20 Bitmap {MTtbody}Used by:Timeline
Symbol 21 Bitmap {MTtattack}Used by:Timeline
Symbol 22 Bitmap {MTdeath}Used by:Timeline
Symbol 23 Bitmap {MTbody}Used by:Timeline
Symbol 24 Bitmap {MTattack}Used by:Timeline
Symbol 25 Bitmap {M13Tdeath}Used by:Timeline
Symbol 26 Bitmap {M13Tbody}Used by:Timeline
Symbol 27 Bitmap {M13Tattack}Used by:Timeline
Symbol 28 Bitmap {LCdeath}Used by:Timeline
Symbol 29 Bitmap {LCbody}Used by:Timeline
Symbol 30 Bitmap {LCattack}Used by:Timeline
Symbol 31 Bitmap {Leoparddeath}Used by:Timeline
Symbol 32 Bitmap {Leopardbody}Used by:Timeline
Symbol 33 Bitmap {Leopardattack}Used by:Timeline
Symbol 34 Bitmap {Howitzerdeath}Used by:Timeline
Symbol 35 Bitmap {Howitzerbody}Used by:Timeline
Symbol 36 Bitmap {Howitzerattack}Used by:Timeline
Symbol 37 Bitmap {HCdeath}Used by:Timeline
Symbol 38 Bitmap {HCbody}Used by:Timeline
Symbol 39 Bitmap {HCattack}Used by:Timeline
Symbol 40 Bitmap {Destroyerdeath}Used by:Timeline
Symbol 41 Bitmap {Destroyerbody}Used by:Timeline
Symbol 42 Bitmap {Destroyerattack}Used by:Timeline
Symbol 43 Bitmap {Specialatomicbomb}Used by:Timeline
Symbol 44 GraphicUsed by:46
Symbol 45 EditableTextUses:6Used by:46
Symbol 46 MovieClip {UpgradeStar}Uses:44 45Used by:Timeline
Symbol 47 GraphicUsed by:61
Symbol 48 TextUses:6Used by:61
Symbol 49 FontUsed by:50 53 54 170 246
Symbol 50 EditableTextUses:6 49 65Used by:61
Symbol 51 TextUses:6Used by:61
Symbol 52 TextUses:6Used by:61
Symbol 53 TextUses:49Used by:61
Symbol 54 TextUses:49Used by:61
Symbol 55 BitmapUsed by:56 80 85 92 96 102 108 114 120 126 132 138 144 150 156 162
Symbol 56 GraphicUses:55Used by:57  Timeline
Symbol 57 MovieClipUses:56Used by:61
Symbol 58 BitmapUsed by:59
Symbol 59 GraphicUses:58Used by:60 82 89 95 101 107 113 119 125 131 137 143 149 155 161 167  Timeline
Symbol 60 MovieClipUses:59Used by:61  Timeline
Symbol 61 MovieClip {Intro}Uses:47 48 50 51 52 53 54 57 60Used by:Timeline
Symbol 62 GraphicUsed by:63
Symbol 63 MovieClipUses:62Used by:69  Timeline
Symbol 64 EditableTextUses:6Used by:69
Symbol 65 FontUsed by:50 66 246
Symbol 66 EditableTextUses:65Used by:69
Symbol 67 GraphicUsed by:68
Symbol 68 MovieClipUses:67Used by:69  Timeline
Symbol 69 MovieClip {InterlevelPopup}Uses:63 64 66 68Used by:Timeline
Symbol 70 GraphicUsed by:73
Symbol 71 GraphicUsed by:73
Symbol 72 GraphicUsed by:73
Symbol 73 MovieClip {DriveSmoke}Uses:70 71 72Used by:Timeline
Symbol 74 GraphicUsed by:75
Symbol 75 MovieClip {AtomicBomb}Uses:74Used by:Timeline
Symbol 76 GraphicUsed by:82
Symbol 77 GraphicUsed by:82 89 95 101 107 113 119 125 131 137 143 149 155 161 167 247
Symbol 78 TextUses:6Used by:82 89 95 101 107 113 119 125 131 137 143 149 155 161 167 247
Symbol 79 GraphicUsed by:82
Symbol 80 GraphicUses:55Used by:82
Symbol 81 GraphicUsed by:82
Symbol 82 MovieClipUses:76 77 78 79 80 81 59Used by:193  Timeline
Symbol 83 GraphicUsed by:89
Symbol 84 GraphicUsed by:89
Symbol 85 GraphicUses:55Used by:89
Symbol 86 GraphicUsed by:89
Symbol 87 GraphicUsed by:89
Symbol 88 TextUses:6Used by:89 95 101 107 113 119 125 131 137 143 149 155 161 167
Symbol 89 MovieClipUses:83 77 78 84 85 86 59 87 88Used by:193  Timeline
Symbol 90 GraphicUsed by:95
Symbol 91 GraphicUsed by:95
Symbol 92 GraphicUses:55Used by:95
Symbol 93 GraphicUsed by:95
Symbol 94 GraphicUsed by:95
Symbol 95 MovieClipUses:90 77 78 91 92 93 59 94 88Used by:193  Timeline
Symbol 96 GraphicUses:55Used by:101
Symbol 97 GraphicUsed by:101
Symbol 98 GraphicUsed by:101
Symbol 99 GraphicUsed by:101
Symbol 100 GraphicUsed by:101
Symbol 101 MovieClipUses:96 97 98 59 99 77 78 100 88Used by:193  Timeline
Symbol 102 GraphicUses:55Used by:107
Symbol 103 GraphicUsed by:107
Symbol 104 GraphicUsed by:107
Symbol 105 GraphicUsed by:107
Symbol 106 GraphicUsed by:107
Symbol 107 MovieClipUses:102 103 59 104 105 77 78 106 88Used by:193  Timeline
Symbol 108 GraphicUses:55Used by:113
Symbol 109 GraphicUsed by:113
Symbol 110 GraphicUsed by:113
Symbol 111 GraphicUsed by:113
Symbol 112 GraphicUsed by:113
Symbol 113 MovieClipUses:108 109 59 110 111 77 78 112 88Used by:193  Timeline
Symbol 114 GraphicUses:55Used by:119
Symbol 115 GraphicUsed by:119
Symbol 116 GraphicUsed by:119
Symbol 117 GraphicUsed by:119
Symbol 118 GraphicUsed by:119
Symbol 119 MovieClipUses:114 115 59 116 117 77 78 118 88Used by:193  Timeline
Symbol 120 GraphicUses:55Used by:125
Symbol 121 GraphicUsed by:125
Symbol 122 GraphicUsed by:125
Symbol 123 GraphicUsed by:125
Symbol 124 GraphicUsed by:125
Symbol 125 MovieClipUses:120 121 59 122 123 77 78 124 88Used by:193  Timeline
Symbol 126 GraphicUses:55Used by:131
Symbol 127 GraphicUsed by:131
Symbol 128 GraphicUsed by:131
Symbol 129 GraphicUsed by:131
Symbol 130 GraphicUsed by:131
Symbol 131 MovieClipUses:126 127 59 128 129 77 78 130 88Used by:193  Timeline
Symbol 132 GraphicUses:55Used by:137
Symbol 133 GraphicUsed by:137
Symbol 134 GraphicUsed by:137
Symbol 135 GraphicUsed by:137
Symbol 136 GraphicUsed by:137
Symbol 137 MovieClipUses:132 133 59 134 135 77 78 136 88Used by:193  Timeline
Symbol 138 GraphicUses:55Used by:143
Symbol 139 GraphicUsed by:143
Symbol 140 GraphicUsed by:143
Symbol 141 GraphicUsed by:143
Symbol 142 GraphicUsed by:143
Symbol 143 MovieClipUses:138 139 59 140 141 77 78 142 88Used by:193  Timeline
Symbol 144 GraphicUses:55Used by:149
Symbol 145 GraphicUsed by:149
Symbol 146 GraphicUsed by:149
Symbol 147 GraphicUsed by:149
Symbol 148 GraphicUsed by:149
Symbol 149 MovieClipUses:144 145 59 146 147 77 78 148 88Used by:193  Timeline
Symbol 150 GraphicUses:55Used by:155
Symbol 151 GraphicUsed by:155
Symbol 152 GraphicUsed by:155
Symbol 153 GraphicUsed by:155
Symbol 154 GraphicUsed by:155
Symbol 155 MovieClipUses:150 151 59 152 153 77 78 154 88Used by:193  Timeline
Symbol 156 GraphicUses:55Used by:161
Symbol 157 GraphicUsed by:161
Symbol 158 GraphicUsed by:161
Symbol 159 GraphicUsed by:161
Symbol 160 GraphicUsed by:161
Symbol 161 MovieClipUses:156 157 59 158 159 77 78 160 88Used by:193  Timeline
Symbol 162 GraphicUses:55Used by:167
Symbol 163 GraphicUsed by:167
Symbol 164 GraphicUsed by:167
Symbol 165 GraphicUsed by:167
Symbol 166 GraphicUsed by:167
Symbol 167 MovieClipUses:162 163 59 164 165 77 78 166 88Used by:193  Timeline
Symbol 168 GraphicUsed by:169
Symbol 169 MovieClipUses:168Used by:193
Symbol 170 EditableTextUses:49Used by:193
Symbol 171 EditableTextUses:6Used by:193
Symbol 172 EditableTextUses:6Used by:193
Symbol 173 TextUses:6Used by:193
Symbol 174 TextUses:6Used by:193
Symbol 175 TextUses:6Used by:193
Symbol 176 TextUses:6Used by:193
Symbol 177 TextUses:6Used by:193
Symbol 178 TextUses:6Used by:193
Symbol 179 TextUses:6Used by:193
Symbol 180 TextUses:6Used by:193
Symbol 181 TextUses:6Used by:193
Symbol 182 TextUses:6Used by:193
Symbol 183 TextUses:6Used by:193
Symbol 184 TextUses:6Used by:193
Symbol 185 TextUses:6Used by:193
Symbol 186 TextUses:6Used by:193
Symbol 187 TextUses:6Used by:193
Symbol 188 GraphicUsed by:189
Symbol 189 MovieClipUses:188Used by:192
Symbol 190 GraphicUsed by:191
Symbol 191 MovieClipUses:190Used by:192  Timeline
Symbol 192 MovieClipUses:189 191Used by:193
Symbol 193 MovieClip {Areas}Uses:82 89 95 101 107 113 119 125 131 137 143 149 155 161 167 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 192Used by:Timeline
Symbol 194 Bitmap {Coyotedeath}Used by:Timeline
Symbol 195 Bitmap {Coyotebullet}Used by:Timeline
Symbol 196 Bitmap {Coyotebody}Used by:Timeline
Symbol 197 Bitmap {Coyotebe}Used by:Timeline
Symbol 198 Bitmap {Coyoteattack}Used by:Timeline
Symbol 199 Bitmap {CCdeath}Used by:Timeline
Symbol 200 Bitmap {CCbody}Used by:Timeline
Symbol 201 Bitmap {CCattack}Used by:Timeline
Symbol 202 Bitmap {BDGdeath}Used by:Timeline
Symbol 203 Bitmap {BDGbody}Used by:Timeline
Symbol 204 Bitmap {BDGattack}Used by:Timeline
Symbol 205 Bitmap {Battleshipdeath}Used by:Timeline
Symbol 206 Bitmap {Battleshipbullet}Used by:Timeline
Symbol 207 Bitmap {Battleshipbody}Used by:Timeline
Symbol 208 Bitmap {Battleshipbe}Used by:Timeline
Symbol 209 Bitmap {Battleshipattack}Used by:Timeline
Symbol 210 Bitmap {AmphibianTankdeath}Used by:Timeline
Symbol 211 Bitmap {AmphibianTankbullet}Used by:Timeline
Symbol 212 Bitmap {AmphibianTankbody}Used by:Timeline
Symbol 213 Bitmap {AmphibianTankbe}Used by:Timeline
Symbol 214 Bitmap {AmphibianTankattack}Used by:Timeline
Symbol 215 Bitmap {Groundwall2}Used by:Timeline
Symbol 216 Bitmap {Groundwall}Used by:Timeline
Symbol 217 Bitmap {Groundtree2}Used by:Timeline
Symbol 218 Bitmap {Groundtree}Used by:Timeline
Symbol 219 Bitmap {GroundTheMap}Used by:Timeline
Symbol 220 Bitmap {Mountain1}Used by:Timeline
Symbol 221 Bitmap {Ground1}Used by:Timeline
Symbol 222 Bitmap {Menuuranium}Used by:Timeline
Symbol 223 Bitmap {Menushield}Used by:Timeline
Symbol 224 Bitmap {Menurange}Used by:Timeline
Symbol 225 Bitmap {Menuheart}Used by:Timeline
Symbol 226 Bitmap {Menuattack}Used by:Timeline
Symbol 227 Bitmap {Buttonurefinery}Used by:Timeline
Symbol 228 Bitmap {Buttonstop}Used by:Timeline
Symbol 229 Bitmap {Buttonmortar}Used by:Timeline
Symbol 230 Bitmap {Buttonmissileturret}Used by:Timeline
Symbol 231 Bitmap {Buttonlcannon}Used by:Timeline
Symbol 232 Bitmap {Buttonhowitzer}Used by:Timeline
Symbol 233 Bitmap {Buttonhcannon}Used by:Timeline
Symbol 234 Bitmap {Buttoncancel}Used by:Timeline
Symbol 235 Bitmap {Buttonbdg}Used by:Timeline
Symbol 236 Bitmap {Buttonattack}Used by:Timeline
Symbol 237 Bitmap {Buttonatomicbomb}Used by:Timeline
Symbol 238 GraphicUsed by:239
Symbol 239 MovieClipUses:238Used by:266  Timeline
Symbol 240 FontUsed by:241
Symbol 241 EditableTextUses:240Used by:Timeline
Symbol 242 GraphicUsed by:243
Symbol 243 ButtonUses:242Used by:Timeline
Symbol 244 FontUsed by:245
Symbol 245 EditableTextUses:244Used by:Timeline
Symbol 246 EditableTextUses:6 49 65Used by:Timeline
Symbol 247 MovieClipUses:77 78Used by:Timeline
Symbol 248 GraphicUsed by:266
Symbol 249 GraphicUsed by:250
Symbol 250 MovieClipUses:249Used by:266
Symbol 251 SoundUsed by:266
Symbol 252 ShapeTweeningUsed by:266
Symbol 253 GraphicUsed by:254
Symbol 254 MovieClipUses:253Used by:266
Symbol 255 GraphicUsed by:266
Symbol 256 GraphicUsed by:257
Symbol 257 MovieClipUses:256Used by:266
Symbol 258 ShapeTweeningUsed by:266
Symbol 259 ShapeTweeningUsed by:266
Symbol 260 GraphicUsed by:261
Symbol 261 MovieClipUses:260Used by:266
Symbol 262 GraphicUsed by:266
Symbol 263 GraphicUsed by:264
Symbol 264 MovieClipUses:263Used by:266
Symbol 265 GraphicUsed by:266
Symbol 266 MovieClip {stormad_fla.LOGO_YOUGAME_34}Uses:248 250 251 252 254 255 257 239 258 259 261 262 264 265Used by:Timeline

Instance Names

"lbar"Frame 1Symbol 243 Button
"lpc"Frame 1Symbol 245 EditableText
"username"Symbol 10 MovieClip {SubmitHighscores} Frame 1Symbol 8 EditableText
"msg"Symbol 10 MovieClip {SubmitHighscores} Frame 1Symbol 9 EditableText
"level"Symbol 46 MovieClip {UpgradeStar} Frame 1Symbol 45 EditableText
"title"Symbol 69 MovieClip {InterlevelPopup} Frame 1Symbol 64 EditableText
"subtitle"Symbol 69 MovieClip {InterlevelPopup} Frame 1Symbol 66 EditableText
"closebutton"Symbol 69 MovieClip {InterlevelPopup} Frame 1Symbol 68 MovieClip
"ar1"Symbol 193 MovieClip {Areas} Frame 1Symbol 82 MovieClip
"ar2"Symbol 193 MovieClip {Areas} Frame 1Symbol 89 MovieClip
"ar3"Symbol 193 MovieClip {Areas} Frame 1Symbol 95 MovieClip
"ar4"Symbol 193 MovieClip {Areas} Frame 1Symbol 101 MovieClip
"ar5"Symbol 193 MovieClip {Areas} Frame 1Symbol 107 MovieClip
"ar6"Symbol 193 MovieClip {Areas} Frame 1Symbol 113 MovieClip
"ar7"Symbol 193 MovieClip {Areas} Frame 1Symbol 119 MovieClip
"ar8"Symbol 193 MovieClip {Areas} Frame 1Symbol 125 MovieClip
"ar9"Symbol 193 MovieClip {Areas} Frame 1Symbol 131 MovieClip
"ar10"Symbol 193 MovieClip {Areas} Frame 1Symbol 137 MovieClip
"ar11"Symbol 193 MovieClip {Areas} Frame 1Symbol 143 MovieClip
"ar12"Symbol 193 MovieClip {Areas} Frame 1Symbol 149 MovieClip
"ar13"Symbol 193 MovieClip {Areas} Frame 1Symbol 155 MovieClip
"ar14"Symbol 193 MovieClip {Areas} Frame 1Symbol 161 MovieClip
"ar15"Symbol 193 MovieClip {Areas} Frame 1Symbol 167 MovieClip
"desc"Symbol 193 MovieClip {Areas} Frame 1Symbol 170 EditableText
"waves"Symbol 193 MovieClip {Areas} Frame 1Symbol 171 EditableText
"title"Symbol 193 MovieClip {Areas} Frame 1Symbol 172 EditableText
"attackflash"Symbol 193 MovieClip {Areas} Frame 1Symbol 192 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata not present, AS3.
Protect (24)Timeline Frame 10 bytes ""

Labels

"preLoader"Frame 1
"splash1"Frame 10
"splash2"Frame 20
"opened"Symbol 82 MovieClip Frame 1
"orange"Symbol 82 MovieClip Frame 2
"red"Symbol 82 MovieClip Frame 3
"blue"Symbol 82 MovieClip Frame 4
"opened"Symbol 89 MovieClip Frame 1
"orange"Symbol 89 MovieClip Frame 2
"red"Symbol 89 MovieClip Frame 3
"blue"Symbol 89 MovieClip Frame 4
"closed"Symbol 89 MovieClip Frame 5
"opened"Symbol 95 MovieClip Frame 1
"orange"Symbol 95 MovieClip Frame 2
"red"Symbol 95 MovieClip Frame 3
"blue"Symbol 95 MovieClip Frame 4
"closed"Symbol 95 MovieClip Frame 5
"red"Symbol 101 MovieClip Frame 1
"orange"Symbol 101 MovieClip Frame 2
"blue"Symbol 101 MovieClip Frame 3
"opened"Symbol 101 MovieClip Frame 4
"closed"Symbol 101 MovieClip Frame 5
"red"Symbol 107 MovieClip Frame 1
"blue"Symbol 107 MovieClip Frame 2
"orange"Symbol 107 MovieClip Frame 3
"opened"Symbol 107 MovieClip Frame 4
"closed"Symbol 107 MovieClip Frame 5
"red"Symbol 113 MovieClip Frame 1
"blue"Symbol 113 MovieClip Frame 2
"orange"Symbol 113 MovieClip Frame 3
"opened"Symbol 113 MovieClip Frame 4
"closed"Symbol 113 MovieClip Frame 5
"red"Symbol 119 MovieClip Frame 1
"blue"Symbol 119 MovieClip Frame 2
"orange"Symbol 119 MovieClip Frame 3
"opened"Symbol 119 MovieClip Frame 4
"closed"Symbol 119 MovieClip Frame 5
"red"Symbol 125 MovieClip Frame 1
"blue"Symbol 125 MovieClip Frame 2
"orange"Symbol 125 MovieClip Frame 3
"opened"Symbol 125 MovieClip Frame 4
"closed"Symbol 125 MovieClip Frame 5
"red"Symbol 131 MovieClip Frame 1
"blue"Symbol 131 MovieClip Frame 2
"orange"Symbol 131 MovieClip Frame 3
"opened"Symbol 131 MovieClip Frame 4
"closed"Symbol 131 MovieClip Frame 5
"red"Symbol 137 MovieClip Frame 1
"blue"Symbol 137 MovieClip Frame 2
"orange"Symbol 137 MovieClip Frame 3
"opened"Symbol 137 MovieClip Frame 4
"closed"Symbol 137 MovieClip Frame 5
"red"Symbol 143 MovieClip Frame 1
"blue"Symbol 143 MovieClip Frame 2
"orange"Symbol 143 MovieClip Frame 3
"opened"Symbol 143 MovieClip Frame 4
"closed"Symbol 143 MovieClip Frame 5
"red"Symbol 149 MovieClip Frame 1
"blue"Symbol 149 MovieClip Frame 2
"orange"Symbol 149 MovieClip Frame 3
"opened"Symbol 149 MovieClip Frame 4
"closed"Symbol 149 MovieClip Frame 5
"red"Symbol 155 MovieClip Frame 1
"blue"Symbol 155 MovieClip Frame 2
"orange"Symbol 155 MovieClip Frame 3
"opened"Symbol 155 MovieClip Frame 4
"closed"Symbol 155 MovieClip Frame 5
"red"Symbol 161 MovieClip Frame 1
"blue"Symbol 161 MovieClip Frame 2
"orange"Symbol 161 MovieClip Frame 3
"opened"Symbol 161 MovieClip Frame 4
"closed"Symbol 161 MovieClip Frame 5
"red"Symbol 167 MovieClip Frame 1
"blue"Symbol 167 MovieClip Frame 2
"orange"Symbol 167 MovieClip Frame 3
"opened"Symbol 167 MovieClip Frame 4
"closed"Symbol 167 MovieClip Frame 5




http://swfchan.com/12/57692/info.shtml
Created: 17/4 -2019 21:24:46 Last modified: 17/4 -2019 21:24:46 Server time: 24/04 -2024 22:20:44