Section 1
//a10_2_107 (CityInvasion_fla.a10_2_107)
package CityInvasion_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class a10_2_107 extends MovieClip {
public var logo:MovieClip;
public var request:URLRequest;
public function a10_2_107(){
addFrameScript(0, frame1);
}
function frame1(){
logo.gotoAndStop(language.branding_nr);
this.addEventListener(MouseEvent.CLICK, onCLick3);
}
public function onCLick3(_arg1:Event){
if (language.language_nr == 2){
request = new URLRequest(language.url1);
} else {
request = new URLRequest(((language.url1 + "&utm_content=") + Main.utmContent));
};
navigateToURL(request, "_blank");
}
}
}//package CityInvasion_fla
Section 2
//a10_52 (CityInvasion_fla.a10_52)
package CityInvasion_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
public dynamic class a10_52 extends MovieClip {
public var txt:TextField;
public var logo:MovieClip;
public var request:URLRequest;
public function a10_52(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
logo.gotoAndStop(language.branding_nr);
this.addEventListener(MouseEvent.CLICK, onCLick3);
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
public function enterFrameHandler(_arg1):void{
txt.autoSize = "left";
logo.x = (txt.width + 10);
}
public function onCLick3(_arg1:Event){
if (language.language_nr == 2){
request = new URLRequest(language.url1);
} else {
request = new URLRequest(((language.url1 + "&utm_content=") + Main.utmContent));
};
navigateToURL(request, "_blank");
}
}
}//package CityInvasion_fla
Section 3
//branding_aligned_left_108 (CityInvasion_fla.branding_aligned_left_108)
package CityInvasion_fla {
import flash.display.*;
public dynamic class branding_aligned_left_108 extends MovieClip {
public function branding_aligned_left_108(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CityInvasion_fla
Section 4
//frame_tween_77 (CityInvasion_fla.frame_tween_77)
package CityInvasion_fla {
import flash.display.*;
public dynamic class frame_tween_77 extends MovieClip {
public function frame_tween_77(){
addFrameScript(37, frame38);
}
function frame38(){
stop();
}
}
}//package CityInvasion_fla
Section 5
//introBg_102 (CityInvasion_fla.introBg_102)
package CityInvasion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class introBg_102 extends MovieClip {
public var ue1_1:TextField;
public var ue3_1:TextField;
public var ue5_1:TextField;
public var ue7_1:TextField;
public var ue1:TextField;
public var ue2:TextField;
public var ue3:TextField;
public var ue4:TextField;
public var ue5:TextField;
public var ue6:TextField;
public var ue7:TextField;
public var un2:TextField;
public var un4:TextField;
public var un5:TextField;
public var un6:TextField;
public var un7:TextField;
public var un1:TextField;
public var un3:TextField;
public var bu:TextField;
public var ue2_1:TextField;
public var ue4_1:TextField;
public var ue6_1:TextField;
public var pe1:TextField;
public var pe2:TextField;
public var pe3:TextField;
public var pe4:TextField;
public var pe5:TextField;
public var sp:TextField;
public var pn1:TextField;
public var pn3:TextField;
public var pn4:TextField;
public var pn5:TextField;
public var pn2:TextField;
public function introBg_102(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CityInvasion_fla
Section 6
//LogoMc_62 (CityInvasion_fla.LogoMc_62)
package CityInvasion_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
public dynamic class LogoMc_62 extends MovieClip {
public var txt:TextField;
public var logo:MovieClip;
public var request:URLRequest;
public function LogoMc_62(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
logo.gotoAndStop(language.branding_nr);
this.addEventListener(MouseEvent.CLICK, onCLick3);
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
public function enterFrameHandler(_arg1):void{
txt.autoSize = "left";
logo.x = ((txt.x + txt.width) + 10);
}
public function onCLick3(_arg1:Event){
if (language.language_nr == 2){
request = new URLRequest(language.url1);
} else {
request = new URLRequest(((language.url1 + "&utm_content=") + Main.utmContent));
};
navigateToURL(request, "_blank");
}
}
}//package CityInvasion_fla
Section 7
//MainTimeline (CityInvasion_fla.MainTimeline)
package CityInvasion_fla {
import flash.events.*;
import flash.media.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.geom.*;
import flash.errors.*;
import flash.system.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var OUR_SITE;
public var SHOOTING;
public var DEAD;
public var pb:MovieClip;
public var infor_txt:TextField;
public var main;
public var logo:LogoMc2;
public var SHOOTED;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame2(){
SHOOTING = "shooting";
SHOOTED = "shooted";
DEAD = "dead";
OUR_SITE = "http://www.gameportal.net";
}
function frame3(){
stop();
main = new Main();
addChild(main);
main.start();
}
function frame1(){
stop();
LanguageManager.loadLanguageXML("us");
logo.txt.text = LanguageManager.getStr("startpage", "playMore");
this.addEventListener(Event.ENTER_FRAME, tick);
}
public function tick(_arg1){
var _local2:* = int(((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100));
infor_txt.text = (("" + _local2) + "%");
pb.scaleX = (_local2 / 100);
if (_local2 >= 100){
this.removeEventListener(Event.ENTER_FRAME, tick);
this.play();
};
}
}
}//package CityInvasion_fla
Section 8
//map_104 (CityInvasion_fla.map_104)
package CityInvasion_fla {
import flash.display.*;
public dynamic class map_104 extends MovieClip {
public function map_104(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CityInvasion_fla
Section 9
//MapPage_106 (CityInvasion_fla.MapPage_106)
package CityInvasion_fla {
import flash.display.*;
public dynamic class MapPage_106 extends MovieClip {
public function MapPage_106(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CityInvasion_fla
Section 10
//menuBar_115 (CityInvasion_fla.menuBar_115)
package CityInvasion_fla {
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import com.veltive.cityinvasion.ui.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class menuBar_115 extends MovieClip {
public var s_txt:TextField;
public var a10:MovieClip;
public var menuBtn:MyButton;
public var spdSlider:Slider;
public function menuBar_115(){
__setProp_spdSlider_menuBar_Layer2_0();
}
function __setProp_spdSlider_menuBar_Layer2_0(){
try {
spdSlider["componentInspectorSetting"] = true;
} catch(e:Error) {
};
spdSlider.direction = "horizontal";
spdSlider.enabled = true;
spdSlider.liveDragging = false;
spdSlider.maximum = 1.5;
spdSlider.minimum = 0.5;
spdSlider.snapInterval = 0.1;
spdSlider.tickInterval = 0;
spdSlider.value = 1;
spdSlider.visible = true;
try {
spdSlider["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package CityInvasion_fla
Section 11
//RobotDie_161 (CityInvasion_fla.RobotDie_161)
package CityInvasion_fla {
import flash.display.*;
public dynamic class RobotDie_161 extends MovieClip {
public function RobotDie_161(){
addFrameScript(74, frame75);
}
function frame75(){
stop();
}
}
}//package CityInvasion_fla
Section 12
//spilgame_logo_95 (CityInvasion_fla.spilgame_logo_95)
package CityInvasion_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class spilgame_logo_95 extends MovieClip {
public function spilgame_logo_95(){
addFrameScript(0, frame1);
}
function frame1(){
this.addEventListener(MouseEvent.CLICK, gotoURL);
this.buttonMode = true;
}
public function gotoURL(_arg1){
navigateToURL(new URLRequest("http://www.spilgames.com/"));
}
}
}//package CityInvasion_fla
Section 13
//stasticMcMask_91 (CityInvasion_fla.stasticMcMask_91)
package CityInvasion_fla {
import flash.display.*;
public dynamic class stasticMcMask_91 extends MovieClip {
public function stasticMcMask_91(){
addFrameScript(47, frame48);
}
function frame48(){
stop();
}
}
}//package CityInvasion_fla
Section 14
//Stastics_90 (CityInvasion_fla.Stastics_90)
package CityInvasion_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Stastics_90 extends MovieClip {
public var txt0:TextField;
public var txt1:TextField;
public var txt3:TextField;
public var txt5:TextField;
public var txt6:TextField;
public var txt2:TextField;
public var txt4:TextField;
public var maskMc:MovieClip;
public var txt1_1:TextField;
public var txt2_1:TextField;
public var txt3_1:TextField;
public var txt4_1:TextField;
public var txt5_1:TextField;
public var txt6_1:TextField;
public function Stastics_90(){
addFrameScript(0, frame1);
}
function frame1(){
this.mask = maskMc;
}
}
}//package CityInvasion_fla
Section 15
//Timeline_138 (CityInvasion_fla.Timeline_138)
package CityInvasion_fla {
import flash.display.*;
public dynamic class Timeline_138 extends MovieClip {
public function Timeline_138(){
addFrameScript(21, frame22);
}
function frame22(){
stop();
}
}
}//package CityInvasion_fla
Section 16
//Timeline_139 (CityInvasion_fla.Timeline_139)
package CityInvasion_fla {
import flash.display.*;
public dynamic class Timeline_139 extends MovieClip {
public function Timeline_139(){
addFrameScript(36, frame37);
}
function frame37(){
stop();
}
}
}//package CityInvasion_fla
Section 17
//Timeline_140 (CityInvasion_fla.Timeline_140)
package CityInvasion_fla {
import flash.display.*;
public dynamic class Timeline_140 extends MovieClip {
public function Timeline_140(){
addFrameScript(21, frame22);
}
function frame22(){
stop();
}
}
}//package CityInvasion_fla
Section 18
//Timeline_141 (CityInvasion_fla.Timeline_141)
package CityInvasion_fla {
import flash.display.*;
public dynamic class Timeline_141 extends MovieClip {
public function Timeline_141(){
addFrameScript(27, frame28);
}
function frame28(){
stop();
}
}
}//package CityInvasion_fla
Section 19
//tribeplay_logo_96 (CityInvasion_fla.tribeplay_logo_96)
package CityInvasion_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class tribeplay_logo_96 extends MovieClip {
public function tribeplay_logo_96(){
addFrameScript(0, frame1);
}
function frame1(){
this.addEventListener(MouseEvent.CLICK, gotoURL);
this.buttonMode = true;
}
public function gotoURL(_arg1){
navigateToURL(new URLRequest("http://www.tribeplay.com"));
}
}
}//package CityInvasion_fla
Section 20
//urlMC_83 (CityInvasion_fla.urlMC_83)
package CityInvasion_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class urlMC_83 extends MovieClip {
public function urlMC_83(){
addFrameScript(0, frame1);
}
function frame1(){
this.addEventListener(MouseEvent.CLICK, gotoURL);
this.buttonMode = true;
}
public function gotoURL(_arg1){
navigateToURL(new URLRequest("http://www.gameportal.net"));
}
}
}//package CityInvasion_fla
Section 21
//AbstractMoveMode (com.veltive.cityinvasion.ammos.movemode.AbstractMoveMode)
package com.veltive.cityinvasion.ammos.movemode {
import flash.events.*;
public class AbstractMoveMode extends EventDispatcher {
public function move():void{
}
}
}//package com.veltive.cityinvasion.ammos.movemode
Section 22
//Beeline (com.veltive.cityinvasion.ammos.movemode.Beeline)
package com.veltive.cityinvasion.ammos.movemode {
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.*;
public class Beeline extends AbstractMoveMode {
private var _run;// = 0
private var _ammo:AbstractAmmo;
private var _dir;// = 1
private var _spd;
private var _distance;
public function Beeline(_arg1:AbstractAmmo){
_ammo = _arg1;
_distance = Math.abs((_arg1.endX - _arg1.startX));
if ((_arg1.endX - _arg1.startX) < 0){
_dir = -1;
};
}
override public function move():void{
var _local1:* = ((_ammo.spd * _dir) * GameVariables.GAME_SPD);
_ammo.x = (_ammo.x + _local1);
if (Math.abs((_ammo.x - _ammo.startX)) >= (_distance - _local1)){
_ammo.x = _ammo.endX;
dispatchEvent(new Event(Event.COMPLETE));
};
}
}
}//package com.veltive.cityinvasion.ammos.movemode
Section 23
//Infighting (com.veltive.cityinvasion.ammos.movemode.Infighting)
package com.veltive.cityinvasion.ammos.movemode {
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
public class Infighting extends AbstractMoveMode {
public function Infighting(_arg1:AbstractAmmo){
}
override public function move():void{
dispatchEvent(new Event(Event.COMPLETE));
}
}
}//package com.veltive.cityinvasion.ammos.movemode
Section 24
//InfightingDelay (com.veltive.cityinvasion.ammos.movemode.InfightingDelay)
package com.veltive.cityinvasion.ammos.movemode {
import com.veltive.cityinvasion.ammos.*;
public class InfightingDelay extends AbstractMoveMode {
public function InfightingDelay(_arg1:AbstractAmmo){
}
override public function move():void{
}
}
}//package com.veltive.cityinvasion.ammos.movemode
Section 25
//Missile (com.veltive.cityinvasion.ammos.movemode.Missile)
package com.veltive.cityinvasion.ammos.movemode {
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.*;
public class Missile extends AbstractMoveMode {
private var _run;// = 0
private var _ammo:AbstractAmmo;
private var _dir;// = 1
private var _spd;
private var _distance;
public function Missile(_arg1:AbstractAmmo){
_ammo = _arg1;
_distance = Math.abs((_arg1.endX - _arg1.startX));
if ((_arg1.endX - _arg1.startX) < 0){
_dir = -1;
};
_spd = ((_ammo.spd * _dir) * GameVariables.GAME_SPD);
}
override public function move():void{
_spd = (_spd + (_dir * 0.6));
_ammo.y = (_ammo.y + (Math.sin((_spd / 2)) * 2));
_ammo.x = (_ammo.x + _spd);
_distance = Math.abs((_ammo.endX - _ammo.startX));
if (Math.abs((_ammo.x - _ammo.startX)) >= (_distance - _spd)){
_ammo.x = _ammo.endX;
_ammo.y = (_ammo.y + 5);
dispatchEvent(new Event(Event.COMPLETE));
};
}
}
}//package com.veltive.cityinvasion.ammos.movemode
Section 26
//Parabola (com.veltive.cityinvasion.ammos.movemode.Parabola)
package com.veltive.cityinvasion.ammos.movemode {
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.*;
public class Parabola extends AbstractMoveMode {
private var _r;
private var _h;
private var _ammo:AbstractAmmo;
private var _dir;// = 1
private var _spd;
private var _duration;
private var _distance;
private var _y0;
public function Parabola(_arg1:AbstractAmmo){
_r = 0;
_ammo = _arg1;
if (isNaN(_arg1.startX)){
throw (new Error("the ammo has no startX and startY"));
};
_distance = Math.abs((_arg1.endX - _arg1.startX));
_duration = (_distance / _arg1.spd);
_y0 = _arg1.y;
_spd = (Math.PI / _duration);
if ((_arg1.endX - _arg1.startX) < 0){
_dir = -1;
};
_h = ((Math.random() * 2) + 6);
}
override public function move():void{
_ammo.x = (_ammo.x + ((_ammo.spd * _dir) * GameVariables.GAME_SPD));
_ammo.rotation = (_ammo.rotation + (_dir * 50));
var _local1:* = ((Math.PI * Math.abs((_ammo.x - _ammo.startX))) / ((_distance - 0.1) * 0.85));
_ammo.y = ((-(Math.sin(_local1)) * (_distance / _h)) + _y0);
if (Math.abs((_ammo.x - _ammo.startX)) >= _distance){
dispatchEvent(new Event(Event.COMPLETE));
};
}
}
}//package com.veltive.cityinvasion.ammos.movemode
Section 27
//AbstractAmmo (com.veltive.cityinvasion.ammos.AbstractAmmo)
package com.veltive.cityinvasion.ammos {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.battlefield.*;
import flash.events.*;
import com.veltive.cityinvasion.effects.*;
import flash.display.*;
import com.veltive.cityinvasion.*;
import com.veltive.cityinvasion.ammos.movemode.*;
public class AbstractAmmo extends MovieClip implements IGameObject {
protected var _damage:Number;// = 20
protected var _needScaleX:Boolean;// = true
protected var _hurtFriend;// = false
protected var _target:AbstractUnit;// = null
protected var _initiator:AbstractUnit;// = null
protected var _moveModeL:AbstractMoveMode;
private var _endX:Number;// = 0
protected var _initX:Number;// = 0
protected var _initY:Number;// = 0
private var _lane:Lane;
protected var _sparateWithUnit:Boolean;// = true
private var _startX:Number;// = 0
protected var _damageRange:Number;// = 0
protected var _stunProbability:Number;// = 0
protected var _dieEffectName:String;
protected var _ammoName:String;
protected var _moveModeLName:String;// = "parabola"
private var _startY:Number;// = 0
protected var _spd:Number;// = 8
public function AbstractAmmo(_arg1:AbstractAmmo=null){
if (_arg1 != this){
throw (new Error("this is a abstract class"));
};
this.mouseEnabled = false;
this.mouseChildren = false;
this.addEventListener(Event.ADDED_TO_STAGE, added);
}
protected function added(_arg1):void{
if ((((_target == null)) || ((_initiator == null)))){
clear();
return;
};
var _local2 = 1;
if (_initiator.group == UnitGroup.GROUP_ENEMY){
_local2 = -1;
};
if (_needScaleX){
this.scaleX = _local2;
};
this.x = (_startX = (_initiator.x + _initiator.initAmmoX));
this.y = (_startY = (_initiator.y + initiator.initAmmoY));
_endX = (_target.x + _target.endAmmoX);
_moveModeL = MoveModeFactory.getMoveMode(_moveModeLName, this);
this._moveModeL.addEventListener(Event.COMPLETE, hurt);
}
protected function hurt(_arg1){
var _local2:AbstractEffect = EffectFactory.getEffect(_dieEffectName, this.x, (this.y + 10), 1, 1);
_lane.addEffect(_local2);
this._moveModeL.removeEventListener(Event.COMPLETE, hurt);
this._moveModeL = null;
clear();
if (this._target){
faint(this._target);
_target.changeLife((-1 * this._damage), this.ammoName);
};
if (_damageRange > 0){
hurtUnitsInRange();
};
}
public function get target():AbstractUnit{
return (_target);
}
public function get sparateWithUnit():Boolean{
return (_sparateWithUnit);
}
protected function getUnitsNearby():Array{
var _local2:Number;
var _local1:Array = [];
if ((this._target == null)){
_local2 = this.x;
} else {
_local2 = this._target.x;
};
var _local3:Array = _lane.getEnemyArr(this.initiator);
var _local4:* = 0;
while (_local4 < _local3.length) {
if (Math.abs((_local3[_local4].x - _local2)) <= _damageRange){
if (((_target) && ((_target == _local3[_local4])))){
} else {
_local1.push(_local3[_local4]);
};
};
_local4++;
};
if (_hurtFriend == false){
return (_local1);
};
var _local5:Array = _lane.getFriendArr(this.initiator);
_local4 = 0;
while (_local4 < _local5.length) {
if (Math.abs((_local5[_local4].x - _local2)) <= _damageRange){
if (_local5[_local4] != this.initiator){
_local1.push(_local5[_local4]);
};
};
_local4++;
};
return (_local1);
}
protected function subFuc():void{
}
protected function enterframeHandle(_arg1:Event):void{
if (_moveModeL){
_moveModeL.move();
};
subFuc();
}
private function setUnitLife(_arg1:AbstractUnit):void{
var _local2:Number;
faint(_arg1);
if ((this._target == null)){
_local2 = this.x;
} else {
_local2 = this._target.x;
};
var _local3:Number = (((_damageRange - Math.abs((_arg1.x - _local2))) / _damageRange) / 2);
_arg1.changeLife(((-1 * this._damage) * _local3), this.ammoName);
}
public function get spd():Number{
return (_spd);
}
public function resume():void{
this.play();
this.addEventListener(Event.ENTER_FRAME, enterframeHandle);
}
public function get initiator():AbstractUnit{
return (_initiator);
}
public function get startX():Number{
return (_startX);
}
public function get startY():Number{
return (_startY);
}
public function clear():void{
pause();
this.stop();
if (this.root){
this.parent.removeChild(this);
//unresolved jump
};
}
private function faint(_arg1:AbstractUnit){
if (Math.random() < _stunProbability){
_arg1.state = UnitStateFactory.FAINT;
};
}
public function get endX():Number{
if (_target){
_endX = (_target.x + _target.endAmmoX);
};
return (_endX);
}
public function set lane(_arg1:Lane){
this._lane = _arg1;
}
public function get lane():Lane{
return (this._lane);
}
public function pause():void{
this.stop();
this.removeEventListener(Event.ENTER_FRAME, enterframeHandle);
}
public function get ammoName():String{
return (_ammoName);
}
private function hurtUnitsInRange():void{
var _local1:Array = getUnitsNearby();
var _local2:* = 0;
while (_local2 < _local1.length) {
setUnitLife(_local1[_local2]);
_local2++;
};
}
}
}//package com.veltive.cityinvasion.ammos
Section 28
//AmmoFactory (com.veltive.cityinvasion.ammos.AmmoFactory)
package com.veltive.cityinvasion.ammos {
import com.veltive.cityinvasion.units.*;
public class AmmoFactory {
public static const EXPLODE = "explode";
public static const BULLET = "bullet";
public static const STONE = "stone";
public static const SHORT_LASER = "short_laser";
public static const MIND = "mind";
public static const EXTEND_AMMO = "extend_ammo";
public static const ROCKET = "rocket";
public static const BOLT = "bolt";
public static const TIME_BOMB = "time_bomb";
public static const EXPLODE_SUICIDE_CAR = "explode suicide car";
public static const SHOTGUN = "shot_gun";
public static const LASER = "laser";
public static const CLOSEWEAPON = "closeweapon";
public static const MOLOTOV = "molotov";
public static const RIFLE = "rifle";
public static function getAmmo(_arg1:String, _arg2:AbstractUnit, _arg3:AbstractUnit){
switch (_arg1){
case BULLET:
return (new Bullet(_arg2, _arg3));
case SHOTGUN:
return (new RIFLE(_arg2, _arg3));
case STONE:
return (new Stone(_arg2, _arg3));
case CLOSEWEAPON:
return (new CloseWeapon(_arg2, _arg3));
case MIND:
return (new Mind(_arg2, _arg3));
case EXPLODE:
return (new Explode(_arg2, _arg3));
case LASER:
return (new Laser(_arg2, _arg3));
case SHORT_LASER:
return (new ShortLaser(_arg2, _arg3));
case BOLT:
return (new Bolt(_arg2, _arg3));
case ROCKET:
return (new Rocket(_arg2, _arg3));
case EXTEND_AMMO:
return (new ExtendAmmo(_arg2, _arg3));
case MOLOTOV:
return (new Molotov(_arg2, _arg3));
case RIFLE:
return (new Rifle(_arg2, _arg3));
case TIME_BOMB:
return (new TimeBomb(_arg2, _arg3));
case EXPLODE_SUICIDE_CAR:
return (new ExplodeSuicideCar(_arg2, _arg3));
};
return (null);
}
}
}//package com.veltive.cityinvasion.ammos
Section 29
//Bolt (com.veltive.cityinvasion.ammos.Bolt)
package com.veltive.cityinvasion.ammos {
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import com.veltive.cityinvasion.*;
import flash.filters.*;
public class Bolt extends AbstractAmmo {
private var _ammoDuration:Number;// = 8
private var _time;// = 0
private var _glowSpd:Number;// = 0
public function Bolt(_arg1, _arg2){
var _local3:Object;
super(this);
_ammoName = AmmoFactory.BOLT;
this._initiator = _arg1;
this._target = _arg2;
_initX = 20;
_initY = -25;
_local3 = Attribute.getAmmoAttribute(_ammoName);
_damage = _local3._damage;
_spd = _local3._spd;
_damageRange = _local3._damageRange;
_hurtFriend = _local3._hurtFriend;
_stunProbability = _local3._stunProbability;
_moveModeLName = MoveModeFactory.INFIGHTING_DELAY;
_sparateWithUnit = false;
_needScaleX = false;
resume();
drawLine(_arg1, _arg2, this);
}
private function resetLine(){
this.graphics.clear();
this.graphics.clear();
this.graphics.lineStyle(0.1, 0xFFFFFF, 0.2);
this.x = 0;
this.y = 0;
}
private function drawLeg(_arg1, _arg2, _arg3, _arg4, _arg5){
var _local6:Graphics = _arg5.graphics;
var _local7:* = int((Math.sqrt((((_arg1 - _arg3) * (_arg1 - _arg3)) + ((_arg2 - _arg4) * (_arg2 - _arg4)))) / 25));
var _local8:* = ((_arg3 - _arg1) / _local7);
var _local9:* = _local8;
var _local10:* = ((_arg4 - _arg2) / _local7);
var _local11:* = _local10;
_local6.moveTo(_arg1, _arg2);
var _local12:* = (_local7 - 1);
while (_local12 > 0) {
_local6.lineTo((_arg1 + _local9), (((_arg2 + _local11) + (Math.random() * 30)) - 15));
_local12--;
_local9 = (_local9 + _local8);
_local11 = (_local11 + _local10);
};
_local6.lineTo(((_arg3 + (Math.random() * 10)) - 5), ((_arg4 + (Math.random() * 10)) - 5));
}
private function glow():void{
var _local1:GlowFilter = new GlowFilter();
_local1.color = 26367;
_local1.blurX = ((Math.random() * 5) + 5);
_local1.blurY = ((Math.random() * 5) + 5);
_local1.strength = ((Math.random() * 5) + 5);
_local1.quality = BitmapFilterQuality.HIGH;
this.filters = [_local1];
}
override protected function subFuc():void{
if ((((((((((this._target == null)) || (this._target.dead))) || ((this._initiator == null)))) || (this._initiator.dead))) || ((this._target.group == this._initiator.group)))){
clear();
return;
};
resetLine();
drawLine(_initiator, _target, this);
scatter();
_time = (_time + (1 * GameVariables.GAME_SPD));
if (_time >= _ammoDuration){
this.graphics.clear();
hurt(null);
};
}
private function scatter():void{
var _local1:Array = getUnitsNearby();
if (_local1.length <= 0){
return;
};
drawLine(target, _local1[0], this);
var _local2:* = 1;
while (_local2 < (_local1.length - 1)) {
drawLine(_local1[_local2], _local1[(_local2 + 1)], this);
_local2++;
};
}
private function drawLine(_arg1, _arg2, _arg3){
var _local5:Graphics;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local4:* = 0;
while (_local4 < 5) {
_local5 = _arg3.graphics;
_local6 = (_arg1.x + _arg1.initAmmoX);
_local7 = (_arg1.y + _arg1.initAmmoY);
if (_arg1 != this._initiator){
_local6 = (_arg1.x + _arg1.endAmmoX);
_local7 = (_arg1.y + _arg1.endAmmoY);
};
_local8 = (_arg2.x + _arg2.endAmmoX);
_local9 = (_arg2.y + _arg2.endAmmoY);
drawLeg(_local6, _local7, _local8, _local9, _arg3);
glow();
_local4++;
};
}
}
}//package com.veltive.cityinvasion.ammos
Section 30
//Bullet (com.veltive.cityinvasion.ammos.Bullet)
package com.veltive.cityinvasion.ammos {
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
public class Bullet extends AbstractAmmo {
public function Bullet(_arg1, _arg2){
var _local3:Object;
super(this);
_ammoName = AmmoFactory.BULLET;
this._initiator = _arg1;
this._target = _arg2;
_initX = 25;
_initY = -10;
_local3 = Attribute.getAmmoAttribute(_ammoName);
_damage = _local3._damage;
if (int((Math.random() * 10)) <= 1){
_damage = 0;
};
if (int((Math.random() * 10)) >= 8){
_damage = (_damage * 2);
};
_spd = _local3._spd;
_damageRange = _local3._damageRange;
_hurtFriend = _local3._hurtFriend;
_stunProbability = _local3._stunProbability;
_moveModeLName = MoveModeFactory.BEELINE;
resume();
}
}
}//package com.veltive.cityinvasion.ammos
Section 31
//CloseWeapon (com.veltive.cityinvasion.ammos.CloseWeapon)
package com.veltive.cityinvasion.ammos {
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
public class CloseWeapon extends AbstractAmmo {
public function CloseWeapon(_arg1, _arg2){
var _local3:Object;
super(this);
_ammoName = AmmoFactory.CLOSEWEAPON;
this._initiator = _arg1;
this._target = _arg2;
_local3 = Attribute.getAmmoAttribute(_ammoName);
_damage = _local3._damage;
_spd = _local3._spd;
_damageRange = _local3._damageRange;
_hurtFriend = _local3._hurtFriend;
_stunProbability = _local3._stunProbability;
_initX = 5;
_initY = -20;
_moveModeLName = MoveModeFactory.INFIGHTING;
resume();
}
}
}//package com.veltive.cityinvasion.ammos
Section 32
//Explode (com.veltive.cityinvasion.ammos.Explode)
package com.veltive.cityinvasion.ammos {
import com.veltive.cityinvasion.effects.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
public class Explode extends AbstractAmmo {
public function Explode(_arg1, _arg2){
var _local3:Object;
super(this);
_ammoName = AmmoFactory.EXPLODE;
this._initiator = _arg1;
this._target = _arg2;
_initX = 0;
_initY = 0;
_local3 = Attribute.getAmmoAttribute(_ammoName);
_damage = _local3._damage;
_spd = _local3._spd;
_damageRange = _local3._damageRange;
_hurtFriend = _local3._hurtFriend;
_stunProbability = _local3._stunProbability;
_moveModeLName = MoveModeFactory.INFIGHTING;
_dieEffectName = EffectFactory.EXPLODE;
resume();
}
}
}//package com.veltive.cityinvasion.ammos
Section 33
//ExplodeSuicideCar (com.veltive.cityinvasion.ammos.ExplodeSuicideCar)
package com.veltive.cityinvasion.ammos {
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
public class ExplodeSuicideCar extends AbstractAmmo {
public function ExplodeSuicideCar(_arg1, _arg2){
var _local3:Object;
super(this);
_ammoName = AmmoFactory.EXPLODE_SUICIDE_CAR;
this._initiator = _arg1;
this._target = _arg2;
_initX = 0;
_initY = 0;
_local3 = Attribute.getAmmoAttribute(_ammoName);
_damage = _local3._damage;
_spd = _local3._spd;
_damageRange = _local3._damageRange;
_hurtFriend = _local3._hurtFriend;
_stunProbability = _local3._stunProbability;
_moveModeLName = MoveModeFactory.INFIGHTING;
resume();
}
}
}//package com.veltive.cityinvasion.ammos
Section 34
//ExtendAmmo (com.veltive.cityinvasion.ammos.ExtendAmmo)
package com.veltive.cityinvasion.ammos {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.battlefield.*;
import flash.events.*;
import com.veltive.cityinvasion.effects.*;
import com.veltive.cityinvasion.utils.*;
import com.veltive.cityinvasion.*;
public class ExtendAmmo extends AbstractAmmo {
private var _group:int;
private var _time;// = 42
private var _timeLeft;
public function ExtendAmmo(_arg1, _arg2){
var _local3:Object;
_timeLeft = _time;
super(this);
_ammoName = AmmoFactory.EXTEND_AMMO;
_initX = 0;
_initY = 0;
_local3 = Attribute.getAmmoAttribute(_ammoName);
_damage = _local3._damage;
_spd = _local3._spd;
_damageRange = _local3._damageRange;
_hurtFriend = _local3._hurtFriend;
_stunProbability = _local3._stunProbability;
_moveModeLName = MoveModeFactory.INFIGHTING_DELAY;
_sparateWithUnit = true;
_dieEffectName = EffectFactory.EXPLODE;
resume();
}
public function get direction():int{
if (this._group == UnitGroup.GROUP_FRIEND){
return (1);
};
return (-1);
}
override protected function added(_arg1):void{
var _local2 = 1;
if (_group == UnitGroup.GROUP_ENEMY){
_local2 = -1;
};
this.y = (Lane.LANE_H / 2);
_moveModeL = MoveModeFactory.getMoveMode(_moveModeLName, this);
this._moveModeL.addEventListener(Event.COMPLETE, hurt);
}
override protected function subFuc():void{
_timeLeft--;
if (_timeLeft <= 0){
Command.shack();
this._moveModeL.dispatchEvent(new Event(Event.COMPLETE));
};
}
public function set group(_arg1):void{
this._group = _arg1;
}
override protected function getUnitsNearby():Array{
var _local1:Array = [];
var _local2:Array = lane.getEnemyArr(this._group);
var _local3:* = 0;
while (_local3 < _local2.length) {
if (Math.abs((_local2[_local3].x - this.x)) <= _damageRange){
_local1.push(_local2[_local3]);
};
_local3++;
};
if (_hurtFriend == false){
return (_local1);
};
var _local4:Array = lane.getFriendArr(this._group);
_local3 = 0;
while (_local3 < _local4.length) {
if (Math.abs((_local4[_local3].x - this.x)) <= _damageRange){
_local1.push(_local4[_local3]);
};
_local3++;
};
return (_local1);
}
}
}//package com.veltive.cityinvasion.ammos
Section 35
//Laser (com.veltive.cityinvasion.ammos.Laser)
package com.veltive.cityinvasion.ammos {
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import com.veltive.cityinvasion.*;
import flash.filters.*;
public class Laser extends AbstractAmmo {
protected var _ammoDuration:Number;// = 600
protected var _color:uint;// = 0xFFFF
private var _laserLen;// = 0
private var _glowSpd:Number;// = 0
private var _time;// = 0
private var fireing:Boolean;// = false
private var _yt;
private var _xt;
public function Laser(_arg1, _arg2){
var _local3:Object;
super(this);
_ammoName = AmmoFactory.LASER;
this._initiator = _arg1;
this._target = _arg2;
_initX = 20;
_initY = -25;
_local3 = Attribute.getAmmoAttribute(_ammoName);
_damage = _local3._damage;
_spd = _local3._spd;
_damageRange = _local3._damageRange;
_hurtFriend = _local3._hurtFriend;
_stunProbability = _local3._stunProbability;
_moveModeLName = MoveModeFactory.INFIGHTING_DELAY;
_sparateWithUnit = false;
_needScaleX = false;
_ammoName = AmmoFactory.LASER;
resume();
refire();
drawLine();
}
override protected function subFuc():void{
if ((((((((((((this._target == null)) || (this._target.dead))) || ((this._initiator == null)))) || (this._initiator.dead))) || ((this._target.group == this._initiator.group)))) || (!((this._target == this._initiator.target))))){
if (this._initiator){
this._initiator.coolingModulus = 1;
};
clear();
refire();
return;
};
drawLine();
hurt(null);
_time = (_time + (1 * GameVariables.GAME_SPD));
if (_time >= _ammoDuration){
this.graphics.clear();
refire();
this._initiator.coolingModulus = 1;
};
}
private function drawLine(){
var _local1:Graphics = this.graphics;
_local1.clear();
_local1.lineStyle(0.1, 0xFFFFFF, 0.5);
var _local2:* = 0;
var _local3:* = 0;
var _local4:* = (((_target.x + _target.endAmmoX) - _initiator.x) - _initiator.initAmmoX);
var _local5:* = (((_target.y + _target.endAmmoY) - _initiator.y) - initiator.initAmmoY);
var _local6:* = Math.sqrt(((_local4 * _local4) + (_local5 * _local5)));
var _local7:* = Math.atan2(_local5, _local4);
_local1.moveTo(_local2, _local3);
if (_local6 > (_laserLen + spd)){
_xt = (_xt + (spd * Math.cos(_local7)));
_yt = (_yt + (spd * Math.sin(_local7)));
_local1.lineTo(_xt, _yt);
_laserLen = Math.sqrt(((_xt * _xt) + (_yt * _yt)));
fireing = false;
} else {
_local1.lineTo(_local4, _local5);
fireing = true;
};
glow();
this._initiator.coolingModulus = 0;
}
private function glow():void{
var _local1:GlowFilter = new GlowFilter();
_local1.color = _color;
_local1.blurX = 5;
_local1.blurY = 5;
_local1.strength = (2 + Math.abs((Math.sin((_glowSpd = (_glowSpd + (Math.PI / 30)))) * 2)));
_local1.quality = BitmapFilterQuality.LOW;
this.filters = [_local1];
}
override protected function hurt(_arg1){
if (!fireing){
return;
};
_target.changeLife((-1 * this._damage), this.ammoName);
}
private function refire(){
_xt = 0;
_yt = 0;
_laserLen = 0;
}
}
}//package com.veltive.cityinvasion.ammos
Section 36
//Mind (com.veltive.cityinvasion.ammos.Mind)
package com.veltive.cityinvasion.ammos {
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import com.veltive.cityinvasion.*;
import flash.filters.*;
public class Mind extends AbstractAmmo {
private var _mind:Number;// = 0
private var _controlSpd:Number;// = 1.5
private var _glowSpd:Number;// = 0
public function Mind(_arg1, _arg2){
var _local3:Object;
super(this);
_ammoName = AmmoFactory.MIND;
this._initiator = _arg1;
this._target = _arg2;
_initX = 5;
_initY = -20;
_local3 = Attribute.getAmmoAttribute(_ammoName);
_damage = _local3._damage;
_spd = _local3._spd;
_damageRange = _local3._damageRange;
_hurtFriend = _local3._hurtFriend;
_stunProbability = _local3._stunProbability;
_moveModeLName = MoveModeFactory.INFIGHTING_DELAY;
_sparateWithUnit = false;
_needScaleX = false;
this._initiator.coolingModulus = 0;
resume();
}
private function glow():void{
var _local1:GlowFilter = new GlowFilter();
_local1.color = 0xFFFFFF;
_local1.blurX = 5;
_local1.blurY = 5;
_local1.strength = (Math.sin((_glowSpd = (_glowSpd + (Math.PI / 30)))) * 5);
_local1.quality = BitmapFilterQuality.LOW;
this.filters = [_local1];
}
private function drawLine(){
var _local1:Graphics = this.graphics;
_local1.clear();
_local1.lineStyle(0.1, 0xFFFF, 0.3);
var _local2:* = 0;
var _local3:* = 0;
var _local4:* = (((_target.x + _target.endAmmoX) - _initiator.x) - _initiator.initAmmoX);
var _local5:* = (((_target.y + _target.endAmmoY) - _initiator.y) - _initiator.initAmmoY);
var _local6:* = (_local4 / 2);
var _local7:* = (-(Math.abs(_local4)) / 4);
var _local8:* = ((_local6 * 2) - ((_local2 + _local4) / 2));
var _local9:* = ((_local7 * 2) - ((_local3 + _local5) / 2));
_local1.moveTo(_local2, _local3);
_local1.curveTo(_local8, _local9, _local4, _local5);
glow();
}
override protected function subFuc():void{
_mind = (_mind + ((_controlSpd * GameVariables.GAME_SPD) * Restriction.HurtRate(this._target.unitName, _ammoName)));
if (_mind > _target.life){
hurt(null);
_mind = 0;
};
}
override protected function enterframeHandle(_arg1:Event):void{
if ((((((((((((this._target == null)) || (this._target.dead))) || ((this._initiator == null)))) || (this._initiator.dead))) || ((this._target.group == this._initiator.group)))) || (!((this._target == this._initiator.target))))){
super.clear();
if (this._initiator){
this._initiator.coolingModulus = 1;
};
return;
};
super.enterframeHandle(_arg1);
drawLine();
}
override protected function hurt(_arg1){
super.hurt(_arg1);
this.graphics.clear();
if (this._target){
_target.betray();
};
if (this._initiator){
this._initiator.coolingModulus = 1;
};
}
}
}//package com.veltive.cityinvasion.ammos
Section 37
//Molotov (com.veltive.cityinvasion.ammos.Molotov)
package com.veltive.cityinvasion.ammos {
import com.veltive.cityinvasion.effects.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
public class Molotov extends AbstractAmmo {
public function Molotov(_arg1, _arg2){
var _local3:Object;
super(this);
this._initiator = _arg1;
this._target = _arg2;
_ammoName = AmmoFactory.MOLOTOV;
_local3 = Attribute.getAmmoAttribute(_ammoName);
_damage = _local3._damage;
_spd = _local3._spd;
_damageRange = _local3._damageRange;
_hurtFriend = _local3._hurtFriend;
_stunProbability = _local3._stunProbability;
_initX = 20;
_initY = -25;
_moveModeLName = MoveModeFactory.PARABOLA;
_dieEffectName = EffectFactory.MOLOTOV;
resume();
}
}
}//package com.veltive.cityinvasion.ammos
Section 38
//MoveModeFactory (com.veltive.cityinvasion.ammos.MoveModeFactory)
package com.veltive.cityinvasion.ammos {
import com.veltive.cityinvasion.ammos.movemode.*;
public class MoveModeFactory {
public static const PARABOLA = "parabola";
public static const MISSILE = "missile";
public static const BEELINE = "beeline";
public static const INFIGHTING = "infighting";
public static const INFIGHTING_DELAY = "infightDelay";
public static const THOUGHT_CONTROL = "thoughtControl";
public static function getMoveMode(_arg1:String, _arg2:AbstractAmmo){
switch (_arg1){
case PARABOLA:
return (new Parabola(_arg2));
case BEELINE:
return (new Beeline(_arg2));
case INFIGHTING:
return (new Infighting(_arg2));
case INFIGHTING_DELAY:
return (new InfightingDelay(_arg2));
case MISSILE:
return (new Missile(_arg2));
};
return (null);
}
}
}//package com.veltive.cityinvasion.ammos
Section 39
//Rifle (com.veltive.cityinvasion.ammos.Rifle)
package com.veltive.cityinvasion.ammos {
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
public class Rifle extends AbstractAmmo {
public function Rifle(_arg1, _arg2){
var _local3:Object;
super(this);
_ammoName = AmmoFactory.RIFLE;
this._initiator = _arg1;
this._target = _arg2;
_local3 = Attribute.getAmmoAttribute(_ammoName);
_damage = _local3._damage;
_spd = _local3._spd;
_damageRange = _local3._damageRange;
_hurtFriend = _local3._hurtFriend;
_stunProbability = _local3._stunProbability;
_initX = 5;
_initY = -20;
_moveModeLName = MoveModeFactory.BEELINE;
resume();
}
}
}//package com.veltive.cityinvasion.ammos
Section 40
//Rocket (com.veltive.cityinvasion.ammos.Rocket)
package com.veltive.cityinvasion.ammos {
import com.veltive.cityinvasion.effects.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import com.veltive.cityinvasion.*;
public class Rocket extends AbstractAmmo {
public function Rocket(_arg1, _arg2){
var _local3:Object;
super(this);
_ammoName = AmmoFactory.ROCKET;
this._initiator = _arg1;
this._target = _arg2;
_initX = 15;
_initY = -20;
_local3 = Attribute.getAmmoAttribute(_ammoName);
_damage = _local3._damage;
_spd = _local3._spd;
_damageRange = _local3._damageRange;
_hurtFriend = _local3._hurtFriend;
_stunProbability = _local3._stunProbability;
_moveModeLName = MoveModeFactory.MISSILE;
_dieEffectName = EffectFactory.EXPLODE;
resume();
}
override public function clear():void{
super.clear();
Command.shack();
}
}
}//package com.veltive.cityinvasion.ammos
Section 41
//ShortLaser (com.veltive.cityinvasion.ammos.ShortLaser)
package com.veltive.cityinvasion.ammos {
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
public class ShortLaser extends Bullet {
private var _glowSpd:Number;// = 0
private var _time;// = 0
public function ShortLaser(_arg1, _arg2){
var _local3:Object;
super(_arg1, _arg2);
_ammoName = AmmoFactory.SHORT_LASER;
_local3 = Attribute.getAmmoAttribute(_ammoName);
_damage = _local3._damage;
_spd = _local3._spd;
_damageRange = _local3._damageRange;
_hurtFriend = _local3._hurtFriend;
_stunProbability = _local3._stunProbability;
}
}
}//package com.veltive.cityinvasion.ammos
Section 42
//Stone (com.veltive.cityinvasion.ammos.Stone)
package com.veltive.cityinvasion.ammos {
public class Stone extends AbstractAmmo {
public function Stone(_arg1, _arg2){
super(this);
this._initiator = _arg1;
this._target = _arg2;
_damage = 50;
_spd = 20;
_initX = 20;
_initY = -25;
_stunProbability = 0.1;
_moveModeLName = MoveModeFactory.PARABOLA;
_ammoName = AmmoFactory.STONE;
resume();
}
}
}//package com.veltive.cityinvasion.ammos
Section 43
//TimeBomb (com.veltive.cityinvasion.ammos.TimeBomb)
package com.veltive.cityinvasion.ammos {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.battlefield.*;
import flash.events.*;
import com.veltive.cityinvasion.effects.*;
import com.veltive.cityinvasion.utils.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
public class TimeBomb extends AbstractAmmo {
private var _time;// = 96.7741935483871
private var _group:int;
public var txt:TextField;
private var _timeLeft;
public function TimeBomb(_arg1, _arg2){
var _local3:Object;
_timeLeft = _time;
super(this);
_ammoName = AmmoFactory.TIME_BOMB;
_initX = 0;
_initY = 0;
_local3 = Attribute.getAmmoAttribute(_ammoName);
_damage = _local3._damage;
_spd = _local3._spd;
_damageRange = _local3._damageRange;
_hurtFriend = _local3._hurtFriend;
_stunProbability = _local3._stunProbability;
_moveModeLName = MoveModeFactory.INFIGHTING_DELAY;
_sparateWithUnit = true;
_dieEffectName = EffectFactory.EXPLODE;
this.txt.selectable = false;
resume();
}
override protected function added(_arg1):void{
var _local2 = 1;
if (_group == UnitGroup.GROUP_ENEMY){
_local2 = -1;
};
this.y = (Lane.LANE_H / 2);
_moveModeL = MoveModeFactory.getMoveMode(_moveModeLName, this);
this._moveModeL.addEventListener(Event.COMPLETE, hurt);
}
public function get direction():int{
if (this._group == UnitGroup.GROUP_FRIEND){
return (1);
};
return (-1);
}
override protected function subFuc():void{
var _local1:*;
_timeLeft = (_timeLeft - (1 * GameVariables.GAME_SPD));
this.txt.text = (int(((_timeLeft / _time) * 10)) + 1).toString();
if (_timeLeft <= 0){
Command.shack();
_local1 = new Crater();
this.lane.addEffect(_local1, true);
_local1.x = this.x;
_local1.y = ((this.y + (Math.random() * 2)) - 1);
_local1.scaleX = ((Math.random() / 2) + 0.5);
_local1.scaleY = ((Math.random() / 2) + 0.5);
this._moveModeL.dispatchEvent(new Event(Event.COMPLETE));
};
}
override protected function getUnitsNearby():Array{
var _local1:Array = [];
var _local2:Array = lane.getEnemyArr(this._group);
var _local3:* = 0;
while (_local3 < _local2.length) {
if (Math.abs((_local2[_local3].x - this.x)) <= _damageRange){
_local1.push(_local2[_local3]);
};
_local3++;
};
if (_hurtFriend == false){
return (_local1);
};
var _local4:Array = lane.getFriendArr(this._group);
_local3 = 0;
while (_local3 < _local4.length) {
if (Math.abs((_local4[_local3].x - this.x)) <= _damageRange){
_local1.push(_local4[_local3]);
};
_local3++;
};
return (_local1);
}
public function set group(_arg1):void{
this._group = _arg1;
}
}
}//package com.veltive.cityinvasion.ammos
Section 44
//Base (com.veltive.cityinvasion.battlefield.Base)
package com.veltive.cityinvasion.battlefield {
import com.veltive.cityinvasion.player.*;
import flash.events.*;
import flash.display.*;
public class Base extends MovieClip {
private var _playerData:PlayerData;
public function Base(_arg1:PlayerData){
addFrameScript(0, frame1);
_playerData = _arg1;
_playerData.addEventListener(Event.CHANGE, changed);
}
function frame1(){
stop();
}
private function changed(_arg1){
var _local2:* = (_playerData.life / PlayerData.PLAYER_LIFE);
if (_local2 <= 0){
gotoAndStop(4);
} else {
if (_local2 <= 0.4){
gotoAndStop(3);
} else {
if (_local2 <= 0.8){
gotoAndStop(2);
} else {
gotoAndStop(1);
};
};
};
}
}
}//package com.veltive.cityinvasion.battlefield
Section 45
//BattleField (com.veltive.cityinvasion.battlefield.BattleField)
package com.veltive.cityinvasion.battlefield {
import com.veltive.cityinvasion.units.*;
import gs.*;
import flash.events.*;
import flash.display.*;
import com.veltive.cityinvasion.*;
import gs.easing.*;
public class BattleField extends Sprite implements IGameObject {
private var _laneEnabled:Boolean;// = true
private var _arrow;
private var _paused:Boolean;
private var _farView:MovieClip;
private var _ground:MovieClip;
private var _baseFriend:Base;
private var _baseEnemy:Base;
private var _lanesArr:Array;
public static const LANE_CHANGE = "lane changed";
public static const BATTLE_FIELD_WIDTH = 700;
public static const BATTLE_FIELD_X = 0;
public static const BATTLE_FIELD_Y = 0;
public static const BATTLE_FIELD_HEIGHT = 480;
public static const CONTROLER_HEIGHT = 80;
public static const LANE_INIT_Y = 205;
private static var _battleField:BattleField;
public function BattleField(){
var _local2:Lane;
super();
this.x = 0;
this.y = 0;
_paused = false;
_lanesArr = new Array();
var _local1:* = 0;
while (_local1 < GameVariables.LANES_NUM) {
_local2 = Lane(addChild(new Lane(_local1)));
this.addEventListener(MouseEvent.MOUSE_DOWN, checkLane);
_lanesArr[_local1] = _local2;
_local1++;
};
_arrow = new Arrow();
setLaneDex(null);
_ground = new Ground();
_farView = new FarView();
addChildAt(_ground, 0);
addChildAt(_farView, 0);
_baseFriend = new Base(GameVariables.PLAYER_FRIEND);
addChildAt(_baseFriend, 1);
addChild(_baseFriend);
_baseFriend.x = 0;
_baseFriend.y = LANE_INIT_Y;
_baseEnemy = new Base(GameVariables.PLAYER_ENEMY);
addChildAt(_baseEnemy, 1);
addChild(_baseEnemy);
_baseEnemy.scaleX = -1;
_baseEnemy.x = BATTLE_FIELD_WIDTH;
_baseEnemy.y = LANE_INIT_Y;
resume();
}
public function get lanes():Array{
return (_lanesArr);
}
public function get arrow():MovieClip{
return (_arrow);
}
public function clear():void{
var _local1:* = 0;
while (_local1 < _lanesArr.length) {
_lanesArr[_local1].clear();
_local1++;
};
}
public function set ground(_arg1:int){
var onFinishTween:Function;
var dex = _arg1;
onFinishTween = function (){
TweenLite.to(_farView, 10, {alpha:1, ease:Back.easeOut});
};
_ground.gotoAndStop(dex);
_ground.y = BATTLE_FIELD_Y;
_ground.width = BATTLE_FIELD_WIDTH;
_ground.height = BATTLE_FIELD_HEIGHT;
_farView.gotoAndStop(dex);
_farView.x = 0;
_farView.width = BATTLE_FIELD_WIDTH;
_farView.height = LANE_INIT_Y;
_farView.alpha = 0;
TweenLite.to(_farView, 0, {alpha:0, ease:Back.easeOut, onComplete:onFinishTween});
}
public function enableLane(_arg1:Boolean){
_laneEnabled = _arg1;
}
public function setLaneDex(_arg1){
if (_laneEnabled == false){
return;
};
if ((_arg1 is Number)){
GameVariables.LANE_DEX = _arg1;
} else {
if (_arg1 != null){
GameVariables.LANE_DEX = Lane(_arg1.currentTarget.parent).dex;
} else {
GameVariables.LANE_DEX = 0;
};
};
_lanesArr[GameVariables.LANE_DEX].addChildAt(_arrow, 1);
_arrow.x = (BATTLE_FIELD_WIDTH / 2);
_arrow.y = ((((BATTLE_FIELD_HEIGHT - LANE_INIT_Y) - CONTROLER_HEIGHT) / GameVariables.LANES_NUM) / 2);
if (GameVariables.HUMAN_GROUP == UnitGroup.GROUP_ENEMY){
_arrow.scaleX = -1;
} else {
_arrow.scaleX = 1;
};
dispatchEvent(new Event(BattleField.LANE_CHANGE));
}
private function checkLane(_arg1){
var _local3:*;
var _local2:* = 0;
while (_local2 < _lanesArr.length) {
_local3 = Lane(_lanesArr[_local2]).bg;
if (_local3.hitTestPoint(this.mouseX, this.mouseY)){
setLaneDex(_local2);
break;
};
_local2++;
};
}
public function resume():void{
var _local1:* = 0;
while (_local1 < _lanesArr.length) {
_lanesArr[_local1].resume();
_local1++;
};
_arrow.alpha = 1;
this.addEventListener(Event.ENTER_FRAME, goWithMouse);
}
public function pause():void{
var _local1:* = 0;
while (_local1 < _lanesArr.length) {
_lanesArr[_local1].pause();
_local1++;
};
this.removeEventListener(Event.ENTER_FRAME, goWithMouse);
_arrow.alpha = 0;
}
private function goWithMouse(_arg1){
if (!this.stage){
return;
};
if ((((stage.mouseY < 40)) || ((stage.mouseY > (480 - 80))))){
return;
};
var _local2:* = 10;
if (this.stage.mouseX > (0.75 * GameVariables.STAGE_WIDTH)){
this.x = (this.x - _local2);
if (this.x < (-(BATTLE_FIELD_WIDTH) + GameVariables.STAGE_WIDTH)){
this.x = (-(BATTLE_FIELD_WIDTH) + GameVariables.STAGE_WIDTH);
} else {
_farView.x = (_farView.x + (_local2 / 3));
};
} else {
if (this.stage.mouseX < (0.25 * GameVariables.STAGE_WIDTH)){
this.x = (this.x + _local2);
if (this.x > 0){
this.x = 0;
} else {
_farView.x = (_farView.x - (_local2 / 3));
};
};
};
}
public static function getInstance():BattleField{
if (_battleField == null){
_battleField = new (BattleField);
};
return (_battleField);
}
}
}//package com.veltive.cityinvasion.battlefield
Section 46
//Lane (com.veltive.cityinvasion.battlefield.Lane)
package com.veltive.cityinvasion.battlefield {
import com.veltive.cityinvasion.units.*;
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.effects.*;
import flash.display.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
public class Lane extends Sprite implements IGameObject {
private var _targetFreind:AbstractUnit;
private var _unitsArrFreind:Array;
private var _dex:int;
private var _laneH:Number;
private var _laneShape:Sprite;
private var _lineY:Number;
private var _targetEnemy:AbstractUnit;
private var _unitsArrEnemy:Array;
public static const START_POINT = 80;
public static var LANE_H:Number;
public function Lane(_arg1:int){
this._dex = _arg1;
drawShape();
resume();
reset();
}
private function setDepth(_arg1:AbstractUnit){
var _local3:*;
var _local2:* = 0;
while (_local2 < this.numChildren) {
_local3 = this.getChildAt(_local2);
if ((((_local3 is AbstractUnit)) && ((_local3.y > _arg1.y)))){
this.setChildIndex(_arg1, _local2);
break;
};
_local2++;
};
}
private function setTargetEnemy(){
var _local4:*;
var _local1:* = 888888;
var _local2:* = null;
var _local3:* = 0;
while (_local3 < _unitsArrEnemy.length) {
_local4 = AbstractUnit(_unitsArrEnemy[_local3]);
if (_local4.x < _local1){
_local1 = _local4.x;
_local2 = _local4;
};
_local3++;
};
_targetEnemy = _local2;
}
public function addUnit(_arg1:AbstractUnit):void{
var _local2:Array;
Command.getPlayerData(_arg1.group).produceNum++;
if (_arg1.group == UnitGroup.GROUP_FRIEND){
_local2 = _unitsArrFreind;
} else {
if (_arg1.group == UnitGroup.GROUP_ENEMY){
_local2 = _unitsArrEnemy;
};
};
_local2.push(_arg1);
this.addChild(_arg1);
_arg1.lane = this;
_arg1.y = (((laneH / 2) + (Math.random() * 10)) - 5);
_arg1.y = (laneH / 2);
_arg1.addEventListener(AbstractUnit.DIE, unitDie);
setDepth(_arg1);
addChild(_laneShape);
}
public function get targetEnemy():AbstractUnit{
return (_targetEnemy);
}
public function get lineY():Number{
return (_lineY);
}
public function clear():void{
var _local2:IGameObject;
var _local1:* = 0;
while (_local1 < this.numChildren) {
if ((this.getChildAt(_local1) is IGameObject)){
_local2 = IGameObject(this.getChildAt(_local1));
_local2.clear();
_local1--;
};
_local1++;
};
reset();
}
private function reset(){
_unitsArrFreind = [];
_unitsArrEnemy = [];
addUnit(new Headquarters(1));
addUnit(new Headquarters(2));
}
private function setTargetFriend(){
var _local4:*;
var _local1:* = -88888;
var _local2:* = null;
var _local3:* = 0;
while (_local3 < _unitsArrFreind.length) {
_local4 = _unitsArrFreind[_local3];
if (_local4.x > _local1){
_local1 = _local4.x;
_local2 = _local4;
};
_local3++;
};
_targetFreind = _local2;
}
public function addEffect(_arg1:AbstractEffect, _arg2:Boolean=false):void{
if (_arg1 == null){
return;
};
if (_arg2){
this.addChildAt(_arg1, 0);
} else {
this.addChild(_arg1);
};
addChild(_laneShape);
}
private function drawShape():void{
_laneShape = new Sprite();
addChild(_laneShape);
var _local1:* = _laneShape.graphics;
_local1.lineStyle(0.1, 0, 0);
_local1.beginFill(13158, 0);
_local1.drawRect(0, 0, BattleField.BATTLE_FIELD_WIDTH, (((BattleField.BATTLE_FIELD_HEIGHT - BattleField.LANE_INIT_Y) - BattleField.CONTROLER_HEIGHT) / GameVariables.LANES_NUM));
_local1.endFill();
this.y = ((this.height * _dex) + BattleField.LANE_INIT_Y);
_lineY = (this.y + (this.height / 2));
LANE_H = (_laneH = this.height);
}
public function addAmmo(_arg1:AbstractAmmo):void{
this.addChild(_arg1);
_arg1.lane = this;
addChild(_laneShape);
}
public function get laneH():Number{
return (_laneH);
}
public function get targetFriend():AbstractUnit{
return (_targetFreind);
}
private function unitDie(_arg1:Event){
var _local2:AbstractUnit = AbstractUnit(_arg1.currentTarget);
_local2.removeEventListener(AbstractUnit.DIE, unitDie);
removeUnit(_local2);
}
private function enterframeHandle(_arg1):void{
setTargetFriend();
setTargetEnemy();
}
public function get bg():Sprite{
return (_laneShape);
}
public function removeUnit(_arg1:AbstractUnit):void{
var _local2:int;
var _local3:Array;
Command.getPlayerData(_arg1.group).killedNum++;
if (_arg1.group == UnitGroup.GROUP_FRIEND){
_local3 = _unitsArrFreind;
} else {
if (_arg1.group == UnitGroup.GROUP_ENEMY){
_local3 = _unitsArrEnemy;
};
};
_local2 = _local3.indexOf(_arg1);
if (_local2 != -1){
_local3.splice(_local2, 1);
} else {
trace("unit not in the list?");
};
}
public function resume():void{
var _local2:IGameObject;
this.addEventListener(Event.ENTER_FRAME, enterframeHandle);
var _local1:* = 0;
while (_local1 < this.numChildren) {
if ((this.getChildAt(_local1) is IGameObject)){
_local2 = IGameObject(this.getChildAt(_local1));
_local2.resume();
};
_local1++;
};
}
public function getEnemyArr(_arg1):Array{
var _local2:Array;
var _local3:*;
if ((_arg1 is AbstractUnit)){
_local3 = _arg1.group;
} else {
_local3 = _arg1;
};
if (_local3 == UnitGroup.GROUP_FRIEND){
_local2 = _unitsArrEnemy;
} else {
_local2 = _unitsArrFreind;
};
return (_local2);
}
public function get dex():int{
return (this._dex);
}
public function getFriendArr(_arg1):Array{
var _local2:Array;
var _local3:*;
if ((_arg1 is AbstractUnit)){
_local3 = _arg1.group;
} else {
_local3 = _arg1;
};
if (_local3 == UnitGroup.GROUP_FRIEND){
_local2 = _unitsArrFreind;
} else {
_local2 = _unitsArrEnemy;
};
return (_local2);
}
public function pause():void{
var _local2:IGameObject;
this.removeEventListener(Event.ENTER_FRAME, enterframeHandle);
var _local1:* = 0;
while (_local1 < this.numChildren) {
if ((this.getChildAt(_local1) is IGameObject)){
_local2 = IGameObject(this.getChildAt(_local1));
_local2.pause();
};
_local1++;
};
}
}
}//package com.veltive.cityinvasion.battlefield
Section 47
//Appoint (com.veltive.cityinvasion.commands.Appoint)
package com.veltive.cityinvasion.commands {
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.*;
import flash.utils.*;
public class Appoint extends EventDispatcher implements IGameObject {
private var _timer;
public function Appoint(){
_timer = new Timer(50);
super();
_timer.addEventListener(TimerEvent.TIMER, tick);
}
protected function tick(_arg1):void{
}
public function resume():void{
_timer.start();
}
public function clear():void{
pause();
_timer.removeEventListener(TimerEvent.TIMER, tick);
dispatchEvent(new Event(Event.REMOVED));
}
public function pause():void{
_timer.stop();
}
}
}//package com.veltive.cityinvasion.commands
Section 48
//BombRain (com.veltive.cityinvasion.commands.BombRain)
package com.veltive.cityinvasion.commands {
import com.veltive.cityinvasion.battlefield.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.utils.*;
import com.veltive.cityinvasion.*;
public class BombRain extends Appoint implements IGameObject {
private var _posX;// = 0
private var _interval;// = 6
private var _bombNum;// = 10
private var _group;
private var _lane;
private var _time;// = 0
private var _num;
private var _currentNum;// = 0
private var _sound:GameSound;
private var _ammoName;
public function BombRain(_arg1:String, _arg2:int, _arg3:int=-1, _arg4:int=1){
_ammoName = _arg1;
_group = _arg2;
_lane = _arg3;
_num = _arg4;
_sound = new GameSound(new AirStrike());
_sound.resume();
}
private function addAmmoRan(_arg1:String, _arg2:int, _arg3:int=-1, _arg4:int=1){
var _local7:ExtendAmmo;
if ((_arg4 < 0)){
_arg4 = 0;
//unresolved jump
};
var _local5:Lane = Command.getLane(int((Math.random() * GameVariables.LANES_NUM)));
var _local6:* = 0;
while (_local6 < _arg4) {
_local7 = AmmoFactory.getAmmo(_arg1, null, null);
_local7.group = _arg2;
_posX = (BattleField.BATTLE_FIELD_WIDTH * Math.random());
_local7.x = _posX;
_local7.scaleX = _local7.direction;
_local5.addAmmo(_local7);
_local6++;
};
}
override protected function tick(_arg1):void{
_time++;
if ((_time % _interval) == 0){
addAmmoRan(_ammoName, _group, _lane, _num);
_currentNum++;
if (_currentNum >= _bombNum){
clear();
};
};
}
private function addAmmo(_arg1:String, _arg2:int, _arg3:int=-1, _arg4:int=1){
var _local7:ExtendAmmo;
if ((_arg4 < 0)){
_arg4 = 0;
//unresolved jump
};
var _local5:Lane = Command.getLane(_arg3);
var _local6:* = 0;
while (_local6 < _arg4) {
_local7 = AmmoFactory.getAmmo(_arg1, null, null);
_local7.group = _arg2;
_posX = (_posX + 100);
_local7.x = (_local7.direction * _posX);
_local5.addAmmo(_local7);
_local6++;
};
}
}
}//package com.veltive.cityinvasion.commands
Section 49
//Mobilisation (com.veltive.cityinvasion.commands.Mobilisation)
package com.veltive.cityinvasion.commands {
import com.veltive.cityinvasion.ui.*;
import com.veltive.cityinvasion.utils.*;
import com.veltive.cityinvasion.*;
public class Mobilisation extends Appoint implements IGameObject {
private var _group;
private var _interval;// = 140
private var _controler:Controler;
private var _time;// = 0
private var _s:GameSound;
private var _produceBtn:ProduceBtn;
public function Mobilisation(_arg1:ProduceBtn){
_produceBtn = _arg1;
_produceBtn.timeTxt.visible = true;
_produceBtn.addChild(_produceBtn.timeTxt);
_controler = Controler(_arg1.parent);
_controler.playerData.buildModulus = 2.5;
_produceBtn.timeTxt.text = String((_interval / 20));
}
override public function pause():void{
super.pause();
}
override public function resume():void{
super.resume();
}
override public function clear():void{
super.clear();
_controler.playerData.buildModulus = 1;
_produceBtn.timeTxt.visible = false;
}
override protected function tick(_arg1):void{
if (_time++ >= (_interval - 1)){
clear();
return;
};
_controler.playerData.buildModulus = 2.5;
_produceBtn.timeTxt.text = String((10 - int(((_time / _interval) * 10))));
}
}
}//package com.veltive.cityinvasion.commands
Section 50
//PutAmmo (com.veltive.cityinvasion.commands.PutAmmo)
package com.veltive.cityinvasion.commands {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ui.*;
import com.veltive.cityinvasion.battlefield.*;
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.utils.*;
import com.veltive.cityinvasion.*;
import com.veltive.cityinvasion.pages.*;
public class PutAmmo extends Appoint implements IGameObject {
private var _group;
private var _lane;
private var _sound:GameSound;
private var _iconMc;
protected var _icon;
private var _ammoName;
private var _posX;// = 0
private var _btn:ProduceBtn;
private var _num;
public function PutAmmo(_arg1:String, _arg2:int, _arg3:int=-1, _arg4:int=1, _arg5:ProduceBtn=null){
_ammoName = _arg1;
_group = _arg2;
_lane = _arg3;
_num = _arg4;
_btn = _arg5;
_btn.buildModulus = 0;
_iconMc = new Coords();
if (this._group == GameVariables.AI_GROUP){
isAl();
} else {
BattleField.getInstance().addEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
BattleField.getInstance().addEventListener(MouseEvent.MOUSE_DOWN, mouseClick);
};
}
override public function clear():void{
super.clear();
if (_iconMc.parent){
_iconMc.stop();
_iconMc.parent.removeChild(_iconMc);
};
_btn.buildModulus = 1;
var _local1:* = 0;
while (_local1 < BattleField.getInstance().lanes.length) {
BattleField.getInstance().removeEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
BattleField.getInstance().removeEventListener(MouseEvent.MOUSE_DOWN, mouseClick);
_local1++;
};
}
private function addAmmo(_arg1:String, _arg2:int, _arg3:int=-1, _arg4:int=1){
var _local7:TimeBomb;
if ((_arg4 < 0)){
_arg4 = 0;
//unresolved jump
};
var _local5:Lane = Command.getLane(_arg3);
var _local6:* = 0;
while (_local6 < _arg4) {
_local7 = AmmoFactory.getAmmo(_arg1, null, null);
_local7.group = _arg2;
_local7.x = BattleField.getInstance().mouseX;
_local5.addAmmo(_local7);
_local6++;
};
}
private function mouseMove(_arg1){
var l:Lane;
var e = _arg1;
var i:* = 0;
while (i < BattleField.getInstance().lanes.length) {
l = BattleField.getInstance().lanes[i];
try {
l.removeChild(_iconMc);
} catch(e) {
};
i = (i + 1);
};
if (getLane(e) != null){
getLane(e).addChild(_iconMc);
_lane = getLane(e).dex;
};
}
private function mouseOver(_arg1){
_lane = Lane(_arg1.currentTarget.parent).dex;
Lane(_arg1.currentTarget.parent).addChild(_iconMc);
}
private function getLane(_arg1:MouseEvent):Lane{
var _local3:Lane;
var _local2:* = 0;
while (_local2 < BattleField.getInstance().lanes.length) {
_local3 = BattleField.getInstance().lanes[_local2];
if (_local3.bg.hitTestPoint(_arg1.stageX, _arg1.stageY)){
return (_local3);
};
_local2++;
};
return (null);
}
private function mouseOut(_arg1){
var e = _arg1;
var _lane:Lane = Command.getLane(_lane);
try {
Lane(e.currentTarget.parent).removeChild(_iconMc);
} catch(e) {
};
}
private function mouseClick(_arg1){
mouseMove(_arg1);
addAmmo(_ammoName, _group, _lane, _num);
clear();
}
override protected function tick(_arg1):void{
var _local2:Lane = Command.getLane(_lane);
_iconMc.x = BattleField.getInstance().mouseX;
_iconMc.y = (Lane.LANE_H / 2);
}
override public function resume():void{
super.resume();
}
private function isAl(){
addAmmoAI(_ammoName, _group, _lane, _num);
clear();
}
override public function pause():void{
super.pause();
}
private function addAmmoAI(_arg1:String, _arg2:int, _arg3:int=-1, _arg4:int=1){
var _local7:TimeBomb;
_arg3 = int((Math.random() * GameVariables.LANES_NUM));
var _local5:Lane = Command.getLane(_arg3);
var _local6:* = 0;
while (_local6 < _arg4) {
_local7 = AmmoFactory.getAmmo(_arg1, null, null);
_local7.group = _arg2;
if (GameVariables.AI_GROUP == UnitGroup.GROUP_ENEMY){
_local7.x = Lane.START_POINT;
} else {
_local7.x = (BattleField.BATTLE_FIELD_WIDTH - Lane.START_POINT);
};
_local5.addAmmo(_local7);
_local6++;
};
}
}
}//package com.veltive.cityinvasion.commands
Section 51
//Rush (com.veltive.cityinvasion.commands.Rush)
package com.veltive.cityinvasion.commands {
import com.veltive.cityinvasion.*;
public class Rush extends Appoint implements IGameObject {
private var _group;
private var _interval;// = 15
private var _num;
private var _lane;
private var _time;// = 0
private var _unitName;
private var _currentNum;// = 0
public function Rush(_arg1:String, _arg2:int, _arg3:int=-1, _arg4:int=1){
_unitName = _arg1;
_group = _arg2;
_lane = _arg3;
_num = _arg4;
}
override protected function tick(_arg1):void{
if (_currentNum >= _num){
clear();
return;
};
_time = (_time + (1 * GameVariables.GAME_SPD));
if ((_time % _interval) == 0){
Command.addUnit(_unitName, _group, _lane, 1);
_currentNum++;
};
}
}
}//package com.veltive.cityinvasion.commands
Section 52
//Shake (com.veltive.cityinvasion.commands.Shake)
package com.veltive.cityinvasion.commands {
import com.veltive.cityinvasion.battlefield.*;
import com.veltive.cityinvasion.*;
public class Shake extends Appoint implements IGameObject {
private var _group;
private var _interval;// = 10
private var _px;
private var _lane;
private var _time;// = 0
private var _py;
private var _ammoName;
private var _num;
public function Shake(){
_px = BattleField.getInstance().x;
_py = BattleField.getInstance().y;
}
private function toShake(){
var _local1:BattleField = BattleField.getInstance();
_local1.x = (((Math.random() * 1) - 0.5) + _px);
_local1.y = (((Math.random() * 3) - 1.5) + _py);
}
override protected function tick(_arg1):void{
toShake();
_time++;
if (_time >= _interval){
BattleField.getInstance().x = 0;
BattleField.getInstance().y = 0;
clear();
};
}
}
}//package com.veltive.cityinvasion.commands
Section 53
//AbstractEffect (com.veltive.cityinvasion.effects.AbstractEffect)
package com.veltive.cityinvasion.effects {
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import com.veltive.cityinvasion.*;
public class AbstractEffect extends MovieClip implements IGameObject {
protected var _sound:GameSound;
public function AbstractEffect(_arg1=0, _arg2=0, _arg3=1, _arg4=1){
this.x = _arg1;
this.y = _arg2;
this.scaleX = _arg3;
this.scaleY = _arg4;
this.mouseEnabled = false;
this.mouseChildren = false;
this.addEventListener(Event.COMPLETE, disappear);
this.addEventListener(Event.REMOVED_FROM_STAGE, removed);
if (_sound){
_sound.resume();
//unresolved jump
};
}
public function pause():void{
this.stop();
}
private function removed(_arg1){
clear();
}
private function disappear(_arg1){
clear();
}
public function resume():void{
this.play();
}
public function clear():void{
this.removeEventListener(Event.COMPLETE, disappear);
this.removeEventListener(Event.REMOVED_FROM_STAGE, removed);
pause();
if (_sound != null){
_sound.clear();
_sound = null;
};
try {
this.parent.removeChild(this);
} catch(e) {
};
}
}
}//package com.veltive.cityinvasion.effects
Section 54
//EffectFactory (com.veltive.cityinvasion.effects.EffectFactory)
package com.veltive.cityinvasion.effects {
public class EffectFactory {
public static const EXPLODE = "explodeEffect";
public static const FAINT = "faintEffect";
public static const MOLOTOV = "molotovEffect";
public static const ROCKET_EXPLODE_EFFECT = "RocketExplodeEffect";
public static function getEffect(_arg1:String, _arg2=0, _arg3=0, _arg4=1, _arg5=1):AbstractEffect{
switch (_arg1){
case EXPLODE:
return (new ExplodeEffect(_arg2, _arg3, _arg4, _arg5));
case MOLOTOV:
return (new MolotovEffect(_arg2, 10, 1, 0.5));
case FAINT:
return (new FaintEffect(_arg2, _arg3, _arg4, _arg5));
case ROCKET_EXPLODE_EFFECT:
return (new RocketExplodeEffect(_arg2, _arg3, _arg4, _arg5));
};
return (null);
}
}
}//package com.veltive.cityinvasion.effects
Section 55
//ExplodeEffect (com.veltive.cityinvasion.effects.ExplodeEffect)
package com.veltive.cityinvasion.effects {
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
public class ExplodeEffect extends AbstractEffect {
public function ExplodeEffect(_arg1=0, _arg2=0, _arg3=1, _arg4=1){
addFrameScript(28, frame29);
_sound = new GameSound(new ExplodeSound1());
super(_arg1, _arg2, _arg3, _arg4);
}
function frame29(){
stop();
dispatchEvent(new Event(Event.COMPLETE));
}
}
}//package com.veltive.cityinvasion.effects
Section 56
//FaintEffect (com.veltive.cityinvasion.effects.FaintEffect)
package com.veltive.cityinvasion.effects {
public class FaintEffect extends AbstractEffect {
public function FaintEffect(_arg1=0, _arg2=0, _arg3=1, _arg4=1){
super(_arg1, _arg2, _arg3, _arg4);
}
}
}//package com.veltive.cityinvasion.effects
Section 57
//MolotovEffect (com.veltive.cityinvasion.effects.MolotovEffect)
package com.veltive.cityinvasion.effects {
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
public class MolotovEffect extends AbstractEffect {
public function MolotovEffect(_arg1=0, _arg2=40, _arg3=1, _arg4=1){
addFrameScript(25, frame26);
_sound = new GameSound(new GlassSound());
super(_arg1, _arg2, _arg3, _arg4);
}
function frame26(){
stop();
dispatchEvent(new Event(Event.COMPLETE));
}
}
}//package com.veltive.cityinvasion.effects
Section 58
//RocketExplodeEffect (com.veltive.cityinvasion.effects.RocketExplodeEffect)
package com.veltive.cityinvasion.effects {
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
public class RocketExplodeEffect extends AbstractEffect {
public function RocketExplodeEffect(_arg1=0, _arg2=0, _arg3=1, _arg4=1){
addFrameScript(21, frame22);
_sound = new GameSound(new ExplodeSound1());
super(_arg1, _arg2, _arg3, _arg4);
}
function frame22(){
stop();
dispatchEvent(new Event(Event.COMPLETE));
}
}
}//package com.veltive.cityinvasion.effects
Section 59
//AbstractPage (com.veltive.cityinvasion.pages.AbstractPage)
package com.veltive.cityinvasion.pages {
import gs.*;
import flash.events.*;
import flash.display.*;
import com.veltive.cityinvasion.*;
import gs.easing.*;
public class AbstractPage extends MovieClip {
private var _enable;// = false
public var UTM:String;// = "more_games_cityinvasion"
private var oldPage:AbstractPage;
public function onFinishTween2(){
}
public function disappear(_arg1:Number=2){
this.alpha = 1;
TweenLite.to(this, _arg1, {alpha:0, ease:null, onComplete:onFinishTween});
disable();
stopMove();
if (oldPage != null){
GameVariables.CURRENT_PAGE = oldPage;
};
}
public function get isEnable():Boolean{
return (_enable);
}
public function disable(){
_enable = (this.mouseChildren = false);
}
public function enable(){
_enable = (this.mouseChildren = true);
}
public function appear(_arg1:Number=2){
this.alpha = 0;
TweenLite.to(this, _arg1, {alpha:1, ease:Back.easeOut, onComplete:onFinishTween2});
enable();
oldPage = GameVariables.CURRENT_PAGE;
GameVariables.CURRENT_PAGE = this;
GameVariables.STAGE = this.stage;
}
protected function stopMove():void{
this.removeEventListener(Event.ENTER_FRAME, subFuc);
}
protected function subFuc(_arg1):void{
}
public function onFinishTween(){
if (this.parent){
this.parent.removeChild(this);
};
}
protected function startMove():void{
this.addEventListener(Event.ENTER_FRAME, subFuc);
}
}
}//package com.veltive.cityinvasion.pages
Section 60
//ChoosePage (com.veltive.cityinvasion.pages.ChoosePage)
package com.veltive.cityinvasion.pages {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ui.*;
import com.veltive.cityinvasion.battlefield.*;
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
public class ChoosePage extends AbstractPage {
public var txt:TextField;
public var yBtn:MyButton;
public var nBtn:MyButton;
public static const NO = "no";
public static const YES = "yes";
public static const PAGE_NAME = "choosepage";
private static var _choosePage:ChoosePage;
public function ChoosePage(){
txt.text = LanguageManager.getStr(PAGE_NAME, "txt");
yBtn.addEventListener(MouseEvent.CLICK, yes);
yBtn.label = LanguageManager.getStr(PAGE_NAME, "yes");
yBtn.type = 2;
nBtn.addEventListener(MouseEvent.CLICK, no);
nBtn.label = LanguageManager.getStr(PAGE_NAME, "no");
nBtn.type = 2;
}
function no(_arg1){
setEnable();
disappear(0.5);
dispatchEvent(new Event(NO));
}
public function setEnable(){
GamePage.getInstance().resume(null);
}
override public function appear(_arg1:Number=2){
super.appear(_arg1);
GamePage.getInstance().pause(null);
}
function yes(_arg1){
setEnable();
disappear(0.5);
dispatchEvent(new Event(YES));
}
public static function getInstance(){
if (_choosePage == null){
_choosePage = new (ChoosePage);
};
return (_choosePage);
}
}
}//package com.veltive.cityinvasion.pages
Section 61
//FinalPage (com.veltive.cityinvasion.pages.FinalPage)
package com.veltive.cityinvasion.pages {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ui.*;
import com.veltive.cityinvasion.battlefield.*;
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
import gs.easing.*;
public class FinalPage extends AbstractPage {
public var a10:MovieClip;
public var tBtn:MyButton;
public var cBtn:MyButton;
public var creditsMc:MovieClip;
private var _finalSound:GameSound;
public var submit_box:SubmitBox;
private var _typeWriter:TypeWriter;
public var txt:TextField;
public static const CONTINUE = "continue";
public static const PAGE_NAME = "finalpage";
public static const TO_HIGHSCORE = "to high score";
public static const TO_HIGHSCORE_WITHOUT_NEW = "high score with out new ";
public static var _finalPage:FinalPage;
public function FinalPage(){
super();
addFrameScript(591, frame592);
UTM = "more_games_final";
txt.htmlText = LanguageManager.getStr(PAGE_NAME, "cong");
cBtn.addEventListener(MouseEvent.CLICK, continueHandle);
cBtn.label = LanguageManager.getStr(LosePage.PAGE_NAME, "mm");
cBtn.type = 2;
tBtn.addEventListener(MouseEvent.CLICK, displayCredits);
tBtn.label = LanguageManager.getStr(PAGE_NAME, "cr");
tBtn.type = 3;
var _local2 = creditsMc;
with (_local2) {
cBtn.addEventListener(MouseEvent.CLICK, displayCredits);
cBtn.label = LanguageManager.getStr(PAGE_NAME, "close");
cBtn.type = 2;
cBtn.addEventListener(MouseEvent.MOUSE_DOWN, displayCredits);
cr.text = LanguageManager.getStr(PAGE_NAME, "cr");
gd.text = LanguageManager.getStr(PAGE_NAME, "gd");
aw.text = LanguageManager.getStr(PAGE_NAME, "aw");
pg.text = LanguageManager.getStr(PAGE_NAME, "pg");
};
submit_box.addEventListener(Event.CLOSE, closeHandle);
a10.txt.text = LanguageManager.getStr(ScorePage.PAGE_NAME, "a10");
}
function closeHandle2(_arg1){
var _local2:* = this;
_local2.disappear();
_local2.clearTyperWriter(null);
_local2._typeWriter.clear();
_local2.dispatchEvent(new Event(TO_HIGHSCORE_WITHOUT_NEW));
}
override public function appear(_arg1:Number=2){
super.appear();
_finalSound = new GameSound(new FinalSound(), 0);
_finalSound.resume();
this.gotoAndPlay(1);
submit_box.visible = true;
submit_box.appear();
creditsMc.visible = false;
}
function frame592(){
stop();
}
public function get finalSound():GameSound{
return (_finalSound);
}
function closeHandle(_arg1){
var _local2:* = this;
_local2.disappear();
var _local3:Boolean = LocalFile.CHECK_SCORE();
if (_local3){
_local2.dispatchEvent(new Event(TO_HIGHSCORE));
} else {
_local2.dispatchEvent(new Event(TO_HIGHSCORE_WITHOUT_NEW));
};
}
override public function disappear(_arg1:Number=2){
super.disappear(_arg1);
_finalSound.fadeOut();
}
private function submitHandle(_arg1){
var _local2:* = this;
var _local3:SubmitBox = new SubmitBox();
this.addChild(_local3);
_local3.addEventListener(Event.CLOSE, closeHandle);
}
private function continueHandle(_arg1){
disappear();
dispatchEvent(new Event(CONTINUE));
}
private function displayCredits(_arg1){
creditsMc.visible = !(creditsMc.visible);
submit_box.visible = !(creditsMc.visible);
}
override public function onFinishTween(){
super.onFinishTween();
}
private function clearTyperWriter(_arg1){
_typeWriter.removeEventListener(Event.COMPLETE, continueHandle);
cBtn.visible = true;
}
public static function getInstance(){
if (_finalPage == null){
_finalPage = new (FinalPage);
};
return (_finalPage);
}
}
}//package com.veltive.cityinvasion.pages
Section 62
//GamePage (com.veltive.cityinvasion.pages.GamePage)
package com.veltive.cityinvasion.pages {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ui.*;
import com.veltive.cityinvasion.battlefield.*;
import com.veltive.cityinvasion.player.*;
import gs.*;
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
import gs.easing.*;
import flash.system.*;
public class GamePage extends AbstractPage {
public var bfMc:MovieClip;
private var _backgroundSound:GameSound;
public var ControlerMc:Controler;
private var ai;
public var lifeEnemy:LifeBar;
public var menuBar:MovieClip;
public var lifeFriend:LifeBar;
private var _timeKeeper:TimeKeeper;
public static const SHOW_HELP = "show help";
public static const RETRY = "retry";
public static const WIN = "win";
public static const TO_OPT_PAGE = "to option page";
public static const RETRY_TUTO = "retry tuto";
public static const TUTO_FINISHED = "tuto finished";
public static const LOSE = "lose";
public static const EXIT = "exit";
public static const SHOW_MENU = "show menu";
public static const PAGE_NAME = "gamepage";
public static const SKIP = "skip";
public static var _gamePage:GamePage;
public static var duration:Number;
public function GamePage(){
var show:Function;
super();
show = function (_arg1){
menuBar.menuBtn.label = LanguageManager.getStr(PAGE_NAME, "menu");
menuBar.menuBtn.autoSize = true;
lifeEnemy.txt3.text = LanguageManager.getStr(PAGE_NAME, "eh");
lifeFriend.txt3.text = LanguageManager.getStr(PAGE_NAME, "yh");
menuBar.a10.txt.text = LanguageManager.getStr(ScorePage.PAGE_NAME, "a10");
};
UTM = "more_games_battlefield";
var bb:BattleField = BattleField.getInstance();
bfMc.addChildAt(bb, 0);
menuBar.spdSlider.visible = false;
menuBar.spdSlider.addEventListener(Event.CHANGE, spdChange);
menuBar.menuBtn.addEventListener(MouseEvent.CLICK, showMenu);
menuBar.s_txt.visible = false;
lifeEnemy.playerData = GameVariables.PLAYER_ENEMY;
lifeFriend.playerData = GameVariables.PLAYER_FRIEND;
var timer:TextTimer = new TextTimer(100, show);
removeControler();
}
private function reduceLevel(_arg1){
if (GameVariables.LEVEL <= 1){
return;
};
GameVariables.LEVEL--;
Controler(GamePage.getInstance().ControlerMc).level = GameVariables.LEVEL;
Controler(ai.controler).level = GameVariables.LEVEL;
}
public function get backgroundSound(){
return (_backgroundSound);
}
public function retry(_arg1){
dispatchEvent(new Event(RETRY));
clear(null);
removeControler();
disappear(1);
GameVariables.IN_BATTLE = false;
}
public function clear(_arg1){
var _local2:* = BattleField.getInstance();
_local2.resume();
_local2.clear();
ControlerMc.clear();
ai.clear();
Command.clear();
disappear(1);
}
public function reset(){
if (GameVariables.LEVEL >= 1){
BattleField.getInstance().ground = GameVariables.LEVEL;
} else {
BattleField.getInstance().ground = 6;
};
Controler(GamePage.getInstance().ControlerMc).reset();
Controler(ai.controler).reset();
GameVariables.PLAYER_ENEMY.reset();
GameVariables.PLAYER_FRIEND.reset();
GameVariables.PLAYER_ENEMY.addEventListener(PlayerData.PLAYER_LOSE, getResult);
GameVariables.PLAYER_FRIEND.addEventListener(PlayerData.PLAYER_LOSE, getResult);
_backgroundSound = new GameSound(new BackgroundSound(), 2);
GameVariables.IN_BATTLE = true;
}
private function showHighScore(){
menuBar.s_txt.text = LocalFile.HIGH_SCORE;
}
public function showMenu(_arg1){
dispatchEvent(new Event(SHOW_MENU));
pause(_arg1);
this.disable();
}
override public function appear(_arg1:Number=3){
super.appear(_arg1);
addControler();
showHighScore();
reset();
disable();
}
private function controlerAdded(){
ai.start();
_timeKeeper = new TimeKeeper();
_timeKeeper.start();
ControlerMc.enable = true;
if (GameVariables.MUSIC_VOLUME != 0){
_backgroundSound.pos = 0;
_backgroundSound.resume();
};
GameVariables.IN_BATTLE = true;
enable();
}
private function fail(){
clear(null);
dispatchEvent(new Event(LOSE));
}
private function getResult(_arg1){
duration = _timeKeeper.duration;
_timeKeeper.clear();
WinPage.getInstance().showData();
LosePage.getInstance().showData();
ControlerMc.pause();
ai.pause();
Command.pause();
removeControler();
GameVariables.IN_BATTLE = false;
GameVariables.PLAYER_ENEMY.removeEventListener(PlayerData.PLAYER_LOSE, getResult);
GameVariables.PLAYER_FRIEND.removeEventListener(PlayerData.PLAYER_LOSE, getResult);
if (_arg1.currentTarget == GameVariables.PLAYER_FRIEND){
if (GameVariables.HUMAN_GROUP == UnitGroup.GROUP_ENEMY){
TweenLite.to(this, 5, {alpha:1, ease:null, onComplete:win});
new GameSound(new CheerSound()).resume();
Command.cheer(1);
} else {
TweenLite.to(this, 5, {alpha:1, ease:null, onComplete:fail});
Command.cheer(-1);
};
} else {
if (GameVariables.HUMAN_GROUP == UnitGroup.GROUP_ENEMY){
TweenLite.to(this, 5, {alpha:1, ease:null, onComplete:fail});
Command.cheer(-1);
} else {
TweenLite.to(this, 5, {alpha:1, ease:null, onComplete:win});
new GameSound(new CheerSound()).resume();
Command.cheer(1);
};
};
}
private function win(){
clear(null);
if (GameVariables.LEVEL == 0){
dispatchEvent(new Event(TUTO_FINISHED));
} else {
dispatchEvent(new Event(WIN));
};
}
public function showHelp(_arg1){
dispatchEvent(new Event(SHOW_HELP));
}
private function setMusic(_arg1){
if (_backgroundSound.paused == true){
_backgroundSound.resume();
} else {
_backgroundSound.pause();
};
}
public function exit(_arg1){
dispatchEvent(new Event(EXIT));
clear(null);
removeControler();
disappear(1);
GameVariables.IN_BATTLE = false;
}
public function removeControler(){
TweenLite.to(ControlerMc, 2, {y:GameVariables.STAGE_HEIGHT, ease:null});
TweenLite.to(menuBar, 2, {y:-(menuBar.height), ease:null});
TweenLite.to(lifeFriend, 1, {alpha:0, ease:null});
TweenLite.to(lifeEnemy, 1, {alpha:0, ease:null});
ControlerMc.enable = false;
if (ai){
ai.clear();
};
GameVariables.IN_BATTLE = false;
if (_backgroundSound){
_backgroundSound.clear();
_backgroundSound = null;
};
}
public function addControler(){
TweenLite.to(ControlerMc, 1, {y:(GameVariables.STAGE_HEIGHT - ControlerMc.height), ease:null, onComplete:controlerAdded});
TweenLite.to(menuBar, 1, {y:0, ease:null});
TweenLite.to(lifeFriend, 1, {alpha:1, ease:null});
TweenLite.to(lifeEnemy, 1, {alpha:1, ease:null});
if (GameVariables.LEVEL <= 0){
ai = AI_TUTO.getInstance();
} else {
ai = AI.getInstance();
};
}
private function addLevel(_arg1){
if (GameVariables.LEVEL > 1){
return;
};
GameVariables.LEVEL++;
Controler(GamePage.getInstance().ControlerMc).level = GameVariables.LEVEL;
Controler(ai.controler).level = GameVariables.LEVEL;
}
public function resume(_arg1){
BattleField.getInstance().resume();
ControlerMc.resume();
ai.resume();
Command.resume();
}
public function showOpt(_arg1){
dispatchEvent(new Event(TO_OPT_PAGE));
}
private function spdChange(_arg1){
GameVariables.GAME_SPD = _arg1.currentTarget.value;
}
public function pause(_arg1){
BattleField.getInstance().pause();
ControlerMc.pause();
ai.pause();
Command.pause();
}
public function skip(_arg1){
clear(null);
removeControler();
disappear(1);
GameVariables.IN_BATTLE = false;
GameVariables.LEVEL = 1;
dispatchEvent(new Event(SKIP));
}
public static function getInstance(){
if (_gamePage == null){
_gamePage = new (GamePage);
};
return (_gamePage);
}
}
}//package com.veltive.cityinvasion.pages
Section 63
//IntroPage (com.veltive.cityinvasion.pages.IntroPage)
package com.veltive.cityinvasion.pages {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ui.*;
import com.veltive.cityinvasion.battlefield.*;
import gs.*;
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
import gs.easing.*;
public class IntroPage extends AbstractPage {
public var mapBg:MovieClip;
private var _typeWriter:TypeWriter;
public var introBg:MovieClip;
public var cBtn:MyButton;
public var typeBg:MovieClip;
public static const CONTINUE = "continue";
public static const PAGE_NAME = "intropage";
public static var _introPage:IntroPage;
public function IntroPage(){
UTM = "more_games_mission_briefing";
cBtn.addEventListener(MouseEvent.CLICK, continueHandle);
cBtn.label = LanguageManager.getStr(ScorePage.PAGE_NAME, "continue");
cBtn.visible = false;
cBtn.type = 2;
}
override public function onFinishTween(){
super.onFinishTween();
}
private function controlerRemoved(){
removeAll();
}
private function disTween(){
TweenLite.to(introBg, 1, {x:(-(introBg.width) * 1.3), ease:null});
TweenLite.to(mapBg, 1, {x:(BattleField.BATTLE_FIELD_WIDTH + 10), ease:null});
TweenLite.to(typeBg, 1, {y:BattleField.BATTLE_FIELD_HEIGHT, ease:null, onComplete:controlerRemoved});
}
private function controlerAdded(){
showIntro(GameVariables.LEVEL);
cBtn.visible = true;
}
private function typeComplete(_arg1){
cBtn.visible = true;
}
private function showTween(){
introBg.x = (-(introBg.width) * 1.3);
mapBg.x = BattleField.BATTLE_FIELD_WIDTH;
typeBg.y = BattleField.BATTLE_FIELD_HEIGHT;
TweenLite.to(introBg, 1, {x:11, ease:null});
TweenLite.to(mapBg, 1, {x:285, ease:null});
TweenLite.to(typeBg, 1, {y:357, ease:null, onComplete:controlerAdded});
}
private function continueHandle(_arg1){
var e = _arg1;
disTween();
cBtn.visible = false;
try {
_typeWriter.clear();
_typeWriter.removeEventListener(Event.COMPLETE, continueHandle);
} catch(e) {
};
GameVariables.GIVE_UP_RATE = (GameVariables.LEVEL * 0.2);
}
override public function appear(_arg1:Number=2){
var show:Function;
var t = _arg1;
show = function (_arg1){
switch (GameVariables.LEVEL){
case 1:
introBg.bu.text = LanguageManager.getStr(PAGE_NAME, "bu");
introBg.sp.text = LanguageManager.getStr(PAGE_NAME, "sp");
introBg.un1.text = LanguageManager.getStr(PAGE_NAME, "un1");
introBg.ue1.text = LanguageManager.getStr(PAGE_NAME, "ue1");
introBg.ue1_1.text = LanguageManager.getStr(PAGE_NAME, "ue1_1");
introBg.un2.text = LanguageManager.getStr(PAGE_NAME, "un2");
introBg.ue2.text = LanguageManager.getStr(PAGE_NAME, "ue2");
introBg.ue2_1.text = LanguageManager.getStr(PAGE_NAME, "ue2_1");
introBg.un3.text = LanguageManager.getStr(PAGE_NAME, "un3");
introBg.ue3.text = LanguageManager.getStr(PAGE_NAME, "ue3");
introBg.ue3_1.text = LanguageManager.getStr(PAGE_NAME, "ue3_1");
introBg.pn1.text = LanguageManager.getStr(PAGE_NAME, "pn1");
introBg.pe1.text = LanguageManager.getStr(PAGE_NAME, "pe1");
break;
case 2:
introBg.bu.text = LanguageManager.getStr(PAGE_NAME, "bu");
introBg.sp.text = LanguageManager.getStr(PAGE_NAME, "sp");
introBg.un4.text = LanguageManager.getStr(PAGE_NAME, "un4");
introBg.ue4.text = LanguageManager.getStr(PAGE_NAME, "ue4");
introBg.ue4_1.text = LanguageManager.getStr(PAGE_NAME, "ue4_1");
introBg.pn2.text = LanguageManager.getStr(PAGE_NAME, "pn2");
introBg.pe2.text = LanguageManager.getStr(PAGE_NAME, "pe2");
break;
case 3:
introBg.bu.text = LanguageManager.getStr(PAGE_NAME, "bu");
introBg.sp.text = LanguageManager.getStr(PAGE_NAME, "sp");
introBg.un5.text = LanguageManager.getStr(PAGE_NAME, "un5");
introBg.ue5.text = LanguageManager.getStr(PAGE_NAME, "ue5");
introBg.ue5_1.text = LanguageManager.getStr(PAGE_NAME, "ue5_1");
introBg.pn3.text = LanguageManager.getStr(PAGE_NAME, "pn3");
introBg.pe3.text = LanguageManager.getStr(PAGE_NAME, "pe3");
break;
case 4:
introBg.bu.text = LanguageManager.getStr(PAGE_NAME, "bu");
introBg.sp.text = LanguageManager.getStr(PAGE_NAME, "sp");
introBg.un6.text = LanguageManager.getStr(PAGE_NAME, "un6");
introBg.ue6.text = LanguageManager.getStr(PAGE_NAME, "ue6");
introBg.ue6_1.text = LanguageManager.getStr(PAGE_NAME, "ue6_1");
introBg.pn4.text = LanguageManager.getStr(PAGE_NAME, "pn4");
introBg.pe4.text = LanguageManager.getStr(PAGE_NAME, "pe4");
break;
case 5:
introBg.bu.text = LanguageManager.getStr(PAGE_NAME, "bu");
introBg.sp.text = LanguageManager.getStr(PAGE_NAME, "sp");
introBg.un7.text = LanguageManager.getStr(PAGE_NAME, "un7");
introBg.ue7.text = LanguageManager.getStr(PAGE_NAME, "ue7");
introBg.ue7_1.text = LanguageManager.getStr(PAGE_NAME, "ue7_1");
introBg.pn5.text = LanguageManager.getStr(PAGE_NAME, "pn5");
introBg.pe5.text = LanguageManager.getStr(PAGE_NAME, "pe5");
break;
};
};
super.appear();
showTween();
this.mapBg.gotoAndStop(GameVariables.LEVEL);
this.introBg.gotoAndStop(GameVariables.LEVEL);
var timer:TextTimer = new TextTimer(100, show);
}
private function showIntro(_arg1){
_typeWriter = new TypeWriter();
_typeWriter.y = 380;
_typeWriter.x = (_typeWriter.x + (275 / 2));
_typeWriter.addEventListener(Event.COMPLETE, typeComplete);
addChild(_typeWriter);
switch (_arg1){
case 1:
_typeWriter.addString(LanguageManager.getStr(PAGE_NAME, "m1"));
_typeWriter.addString(LanguageManager.getStr(PAGE_NAME, "m1_1"));
break;
case 2:
_typeWriter.addString(LanguageManager.getStr(PAGE_NAME, "m2"));
_typeWriter.addString(LanguageManager.getStr(PAGE_NAME, "m2_1"));
break;
case 3:
_typeWriter.addString(LanguageManager.getStr(PAGE_NAME, "m3"));
_typeWriter.addString(LanguageManager.getStr(PAGE_NAME, "m3_1"));
break;
case 4:
_typeWriter.addString(LanguageManager.getStr(PAGE_NAME, "m4"));
_typeWriter.addString(LanguageManager.getStr(PAGE_NAME, "m4_1"));
break;
case 5:
_typeWriter.addString(LanguageManager.getStr(PAGE_NAME, "m5"));
_typeWriter.addString(LanguageManager.getStr(PAGE_NAME, "m5_1"));
break;
default:
_typeWriter.addString("Mission X ");
_typeWriter.addString("Where is here ");
break;
};
_typeWriter.start();
}
private function removeAll(){
disappear();
dispatchEvent(new Event(CONTINUE));
try {
_typeWriter.clear();
_typeWriter.removeEventListener(Event.COMPLETE, continueHandle);
} catch(e) {
};
}
public static function getInstance(){
if (_introPage == null){
_introPage = new (IntroPage);
};
return (_introPage);
}
}
}//package com.veltive.cityinvasion.pages
Section 64
//LearnPage (com.veltive.cityinvasion.pages.LearnPage)
package com.veltive.cityinvasion.pages {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ui.*;
import com.veltive.cityinvasion.battlefield.*;
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
import gs.easing.*;
public class LearnPage extends AbstractPage {
public var a10:MovieClip;
public var specialExp:TextField;
public var lifeBarExp:TextField;
public var showLifeExp:TextField;
public var menuExp:TextField;
public var yh:TextField;
public var cBtn:MyButton;
public var unitExp:TextField;
public var topTxt:TextField;
public var lanesExp:TextField;
public var menu:TextField;
public static const CONTINUE = "continue";
public static const PAGE_NAME = "learnpage";
public static var _learnPage:LearnPage;
public function LearnPage(){
UTM = "more_games_howtoplay";
topTxt.htmlText = LanguageManager.getStr(PAGE_NAME, "topTxt");
unitExp.htmlText = LanguageManager.getStr(PAGE_NAME, "unitExp");
specialExp.htmlText = LanguageManager.getStr(PAGE_NAME, "specialExp");
lifeBarExp.htmlText = LanguageManager.getStr(PAGE_NAME, "lifeBarExp");
yh.text = LanguageManager.getStr(GamePage.PAGE_NAME, "yh");
menu.text = LanguageManager.getStr(GamePage.PAGE_NAME, "menu");
menuExp.htmlText = LanguageManager.getStr(PAGE_NAME, "menuExp");
lanesExp.htmlText = LanguageManager.getStr(PAGE_NAME, "lanesExp");
showLifeExp.htmlText = LanguageManager.getStr(PAGE_NAME, "showLifeExp");
cBtn.addEventListener(MouseEvent.CLICK, continueHandle);
cBtn.label = LanguageManager.getStr(PAGE_NAME, "cBtn");
cBtn.type = 2;
a10.txt.text = LanguageManager.getStr(ScorePage.PAGE_NAME, "a10");
}
private function continueHandle(_arg1){
dispatchEvent(new Event(CONTINUE));
disappear(0.5);
}
public static function getInstance(){
if (_learnPage == null){
_learnPage = new (LearnPage);
};
return (_learnPage);
}
}
}//package com.veltive.cityinvasion.pages
Section 65
//LogoPage (com.veltive.cityinvasion.pages.LogoPage)
package com.veltive.cityinvasion.pages {
import flash.display.*;
import flash.events.*;
import com.veltive.cityinvasion.ui.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
import gs.easing.*;
import flash.system.*;
import com.veltive.cityinvasion.battlefield.*;
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.utils.*;
public class LogoPage extends AbstractPage {
private var _logo:MovieClip;
public var logo:MovieClip;
private var _x0;
private var _y0;
private static var _logoPage:LogoPage;
public function LogoPage(){
addFrameScript(149, frame150);
this.addFrameScript(149, completeHandle);
logo.txt.text = LanguageManager.getStr(StartPage.PAGE_NAME, "playMore");
}
function completeHandle(){
this.dispatchEvent(new Event(Event.COMPLETE));
disappear();
this.stop();
}
private function move(){
}
function frame150(){
stop();
}
public static function getInstance(){
if (_logoPage == null){
_logoPage = new (LogoPage);
};
return (_logoPage);
}
}
}//package com.veltive.cityinvasion.pages
Section 66
//LosePage (com.veltive.cityinvasion.pages.LosePage)
package com.veltive.cityinvasion.pages {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ui.*;
import com.veltive.cityinvasion.battlefield.*;
import com.veltive.cityinvasion.player.*;
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
public class LosePage extends AbstractPage {
public var a10:MovieClip;
private var _killNum:Number;
public var rBtn:MyButton;
private var _score:Number;
private var _skillNum:Number;
private var _killedNum:Number;
private var _life:Number;
private var _produceNum:Number;
private var _typeWriter:TypeWriter;
public var stasticsMc:MovieClip;
private var _time:Number;
public var cBtn:MyButton;
private var _loseSound:GameSound;
public static const CONTINUE = "continue";
public static const RETRY = "retry";
public static const PAGE_NAME = "losepage";
public static var _losePage:LosePage;
public function LosePage(){
UTM = "more_games_mission_failed";
cBtn.addEventListener(MouseEvent.CLICK, continueHandle);
cBtn.label = LanguageManager.getStr(PAGE_NAME, "mm");
cBtn.type = 2;
rBtn.addEventListener(MouseEvent.CLICK, retryHandle);
rBtn.label = LanguageManager.getStr(PAGE_NAME, "re");
rBtn.type = 2;
a10.txt.text = LanguageManager.getStr(ScorePage.PAGE_NAME, "a10");
}
public function showData(){
_produceNum = Command.getPlayerData(GameVariables.HUMAN_GROUP).produceNum;
_killedNum = Command.getPlayerData(GameVariables.HUMAN_GROUP).killedNum;
_killNum = Command.getPlayerData(GameVariables.AI_GROUP).killedNum;
_time = GamePage.duration;
_life = (((Command.getPlayerData(GameVariables.HUMAN_GROUP).life / PlayerData.PLAYER_LIFE) * 100) / 100);
_life = (int((_life * 100)) / 100);
if ((_life < 0)){
_life = 0;
//unresolved jump
};
_score = ((_killNum - _killedNum) + ((_produceNum * 1000) * (_life + 0.5)));
_score = (int((_score * 100)) / 100);
}
override public function appear(_arg1:Number=2){
var time = _arg1;
super.appear();
_loseSound = new GameSound(new LoseSound(), 0);
_loseSound.resume();
var _local3 = stasticsMc;
with (_local3) {
txt0.text = LanguageManager.getStr(PAGE_NAME, "mf");
txt1.text = (_time + "s");
txt2.text = _produceNum;
txt3.text = _killNum;
txt4.text = _killedNum;
txt5.text = (int((_life * 100)) + "%");
txt6.text = _score;
txt1_1.text = LanguageManager.getStr(PAGE_NAME, "du");
txt2_1.text = LanguageManager.getStr(PAGE_NAME, "cu");
txt3_1.text = LanguageManager.getStr(PAGE_NAME, "ku");
txt4_1.text = LanguageManager.getStr(PAGE_NAME, "lu");
txt5_1.text = LanguageManager.getStr(PAGE_NAME, "li");
txt6_1.text = LanguageManager.getStr(PAGE_NAME, "sc");
LocalFile.HIGH_SCORE = _score;
maskMc.gotoAndPlay(1);
};
}
override public function disappear(_arg1:Number=2){
super.disappear(_arg1);
_loseSound.fadeOut();
}
private function continueHandle(_arg1){
disappear();
dispatchEvent(new Event(CONTINUE));
}
private function retryHandle(_arg1){
disappear();
dispatchEvent(new Event(RETRY));
}
public static function getInstance(){
if (_losePage == null){
_losePage = new (LosePage);
};
return (_losePage);
}
}
}//package com.veltive.cityinvasion.pages
Section 67
//OptPage (com.veltive.cityinvasion.pages.OptPage)
package com.veltive.cityinvasion.pages {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ui.*;
import com.veltive.cityinvasion.battlefield.*;
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
public class OptPage extends AbstractPage {
public var a10:MovieClip;
public var txt_se:TextField;
public var cBtn:MyButton;
public var musicOnBtn:MyButton;
public var highBtn:MyButton;
public var txt_m:TextField;
public var soundOffBtn:MyButton;
public var mediumBtn:MyButton;
public var lowBtn:MyButton;
public var txt_vq:TextField;
public var txt_opt:TextField;
public var soundOnBtn:MyButton;
public var musicOffBtn:MyButton;
public static const CONTINUE = "continue";
public static const PAGE_NAME = "optpage";
public static var _optPage:OptPage;
public function OptPage(){
UTM = "more_games_option";
txt_opt.text = LanguageManager.getStr(PAGE_NAME, "options");
txt_vq.text = LanguageManager.getStr(PAGE_NAME, "vq");
txt_se.text = LanguageManager.getStr(PAGE_NAME, "se");
txt_m.text = LanguageManager.getStr(PAGE_NAME, "m");
cBtn.addEventListener(MouseEvent.CLICK, continueHandle);
cBtn.label = LanguageManager.getStr(PAGE_NAME, "back");
cBtn.type = 2;
musicOnBtn.addEventListener(MouseEvent.CLICK, musicOn);
musicOnBtn.label = LanguageManager.getStr(PAGE_NAME, "on");
musicOnBtn.selected = true;
musicOnBtn.autoSize = false;
musicOffBtn.addEventListener(MouseEvent.CLICK, musicOff);
musicOffBtn.label = LanguageManager.getStr(PAGE_NAME, "off");
musicOffBtn.autoSize = false;
soundOnBtn.addEventListener(MouseEvent.CLICK, soundOn);
soundOnBtn.label = LanguageManager.getStr(PAGE_NAME, "on");
soundOnBtn.autoSize = false;
soundOnBtn.selected = true;
soundOffBtn.addEventListener(MouseEvent.CLICK, soundOff);
soundOffBtn.label = LanguageManager.getStr(PAGE_NAME, "off");
soundOffBtn.autoSize = false;
highBtn.addEventListener(MouseEvent.CLICK, high);
highBtn.selected = true;
highBtn.label = LanguageManager.getStr(PAGE_NAME, "high");
highBtn.autoSize = false;
mediumBtn.addEventListener(MouseEvent.CLICK, medium);
mediumBtn.label = LanguageManager.getStr(PAGE_NAME, "medium");
mediumBtn.autoSize = false;
lowBtn.addEventListener(MouseEvent.CLICK, low);
lowBtn.label = LanguageManager.getStr(PAGE_NAME, "low");
lowBtn.autoSize = false;
a10.txt.text = LanguageManager.getStr(ScorePage.PAGE_NAME, "a10");
}
public function musicOn(_arg1){
GameVariables.MUSIC_VOLUME = 1;
StartPage.getInstance().musicBtn.selected = false;
if (GamePage.getInstance().backgroundSound != null){
GamePage.getInstance().backgroundSound.pos = 0;
GamePage.getInstance().backgroundSound.resume();
};
if (StartPage.getInstance().startSound != null){
StartPage.getInstance().startSound.resume();
};
musicOffBtn.selected = false;
musicOnBtn.selected = true;
}
public function musicOff(_arg1){
GameVariables.MUSIC_VOLUME = 0;
StartPage.getInstance().musicBtn.selected = true;
if (GamePage.getInstance().backgroundSound != null){
GamePage.getInstance().backgroundSound.pause();
};
if (StartPage.getInstance().startSound != null){
StartPage.getInstance().startSound.pause();
};
musicOffBtn.selected = true;
musicOnBtn.selected = false;
}
public function soundOn(_arg1){
StartPage.getInstance().soundBtn.selected = false;
GameVariables.SOUND_VOLUME = 1;
soundOnBtn.selected = true;
soundOffBtn.selected = false;
}
private function low(_arg1){
highBtn.selected = false;
mediumBtn.selected = false;
lowBtn.selected = false;
stage.quality = "low";
_arg1.currentTarget.selected = true;
}
public function soundOff(_arg1){
StartPage.getInstance().soundBtn.selected = true;
GameVariables.SOUND_VOLUME = 0;
soundOffBtn.selected = true;
soundOnBtn.selected = false;
}
private function high(_arg1){
highBtn.selected = false;
mediumBtn.selected = false;
lowBtn.selected = false;
stage.quality = "high";
_arg1.currentTarget.selected = true;
}
private function continueHandle(_arg1){
disappear(0.5);
}
private function medium(_arg1){
highBtn.selected = false;
mediumBtn.selected = false;
lowBtn.selected = false;
stage.quality = "medium";
_arg1.currentTarget.selected = true;
}
public static function getInstance(){
if (_optPage == null){
_optPage = new (OptPage);
};
return (_optPage);
}
}
}//package com.veltive.cityinvasion.pages
Section 68
//ScorePage (com.veltive.cityinvasion.pages.ScorePage)
package com.veltive.cityinvasion.pages {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ui.*;
import com.veltive.cityinvasion.battlefield.*;
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
import gs.easing.*;
public class ScorePage extends AbstractPage {
public var no_record_txt:MovieClip;
public var a10:MovieClip;
public var newMc:MovieClip;
public var dBtn:MyButton;
public var cBtn:MyButton;
public static const CONTINUE = "continue";
public static const PAGE_NAME = "scorepage";
public static var _scorePage:ScorePage;
public function ScorePage(){
UTM = "more_games_score";
this.newMc.txt.text = LanguageManager.getStr(FinalPage.PAGE_NAME, "new");
cBtn.addEventListener(MouseEvent.CLICK, continueHandle);
cBtn.label = LanguageManager.getStr(PAGE_NAME, "continue");
cBtn.type = 2;
dBtn.addEventListener(MouseEvent.CLICK, clearHandle);
dBtn.label = "Clear records";
dBtn.type = 2;
dBtn.visible = false;
a10.txt.text = LanguageManager.getStr(PAGE_NAME, "a10");
}
override public function disappear(_arg1:Number=2){
super.disappear(0.5);
}
private function clearHandle(_arg1){
LocalFile.CLEAR_RECORDS();
showScore();
}
override public function appear(_arg1:Number=2){
super.appear(_arg1);
showScore();
}
private function clearScoreMc(){
var _local1:* = 0;
while (_local1 < this.numChildren) {
if ((this.getChildAt(_local1) is ScoreMc)){
removeChild(this.getChildAt(_local1));
_local1--;
};
_local1++;
};
}
private function showScore(){
var _local3:ScoreMc;
clearScoreMc();
var _local1:Array = LocalFile.GET_HIGH_SCORE_ARR();
var _local2:* = 0;
while (_local2 < _local1.length) {
_local3 = new ScoreMc();
addChild(_local3);
_local3.x = ((this.stage.stageWidth - _local3.width) / 2);
_local3.y = ((40 * _local2) + 38);
_local3.order = (_local2 + 1);
_local3.score = _local1[_local2].score;
_local3.date = _local1[_local2].date;
_local3.user = _local1[_local2].user;
if (_local2 == LocalFile.LATEST_RECORD){
newMc.y = _local3.y;
};
_local2++;
};
if (_local1.length <= 0){
no_record_txt.visible = true;
} else {
no_record_txt.visible = false;
};
}
private function continueHandle(_arg1){
disappear();
dispatchEvent(new Event(CONTINUE));
}
public function set showNewIcon(_arg1:Boolean){
this.newMc.visible = _arg1;
}
public static function getInstance(){
if (_scorePage == null){
_scorePage = new (ScorePage);
};
return (_scorePage);
}
}
}//package com.veltive.cityinvasion.pages
Section 69
//StartPage (com.veltive.cityinvasion.pages.StartPage)
package com.veltive.cityinvasion.pages {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ui.*;
import com.veltive.cityinvasion.battlefield.*;
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
public class StartPage extends AbstractPage {
public var soundBtn:IconBtnSound;
public var tuBtn:MyButton;
public var htpBtn:MyButton;
public var ngBtn:MyButton;
public var cgBtn:MyButton;
public var optBtn:MyButton;
public var scoreBtn:MyButton;
public var logo:MovieClip;
private var _startSound:GameSound;
public var musicBtn:IconBtnMusic;
public static const TO_INTRO_PAGE = "to intro page";
public static const TO_TUTO_PAGE_WITHOUT_SKIP = "to tuto page with out skip";
public static const TO_TUTO_PAGE = "to tuto page";
public static const TO_CHOOSE_PAGE = "to choose page";
public static const TO_LEARN_PAGE = "to learn page";
public static const SHOW_SOCRE = "show score";
public static const PAGE_NAME = "startpage";
public static const TO_OPT_PAGE = "to option page";
private static var _startPage:StartPage;
public function StartPage(){
UTM = "more_games_main_menu";
tuBtn.addEventListener(MouseEvent.CLICK, toTuto_without_skip);
tuBtn.label = LanguageManager.getStr(PAGE_NAME, "tuBtn");
ngBtn.addEventListener(MouseEvent.CLICK, newGame);
ngBtn.label = LanguageManager.getStr(PAGE_NAME, "ngBtn");
cgBtn.addEventListener(MouseEvent.CLICK, continueGame);
htpBtn.addEventListener(MouseEvent.CLICK, HowToPlay);
cgBtn.label = LanguageManager.getStr(PAGE_NAME, "cgBtn");
htpBtn.label = LanguageManager.getStr(PAGE_NAME, "htpBtn");
optBtn.addEventListener(MouseEvent.CLICK, showOption);
optBtn.label = LanguageManager.getStr(PAGE_NAME, "optBtn");
scoreBtn.addEventListener(MouseEvent.CLICK, showScore);
scoreBtn.label = LanguageManager.getStr(PAGE_NAME, "scoreBtn");
musicBtn.addEventListener(MouseEvent.CLICK, changeMusic);
soundBtn.addEventListener(MouseEvent.CLICK, changeSound);
logo.txt.text = LanguageManager.getStr(PAGE_NAME, "playMore");
}
private function continueGame(_arg1){
GameVariables.LEVEL = LocalFile.LEVEL;
dispatchEvent(new Event(TO_INTRO_PAGE));
disappear();
}
private function HowToPlay(_arg1){
dispatchEvent(new Event(TO_LEARN_PAGE));
}
private function toTuto_without_skip(_arg1){
GameVariables.LEVEL = 0;
dispatchEvent(new Event(TO_TUTO_PAGE_WITHOUT_SKIP));
disappear();
}
private function changeMusic(_arg1){
if (_arg1.currentTarget.selected == false){
OptPage.getInstance().musicOff(_arg1);
} else {
OptPage.getInstance().musicOn(_arg1);
};
}
private function toTuto(_arg1){
GameVariables.LEVEL = 0;
dispatchEvent(new Event(TO_TUTO_PAGE));
disappear();
}
private function showOption(_arg1){
dispatchEvent(new Event(TO_OPT_PAGE));
}
override public function appear(_arg1:Number=2){
super.appear(1);
_startSound = new GameSound(new StartSound(), 2);
_startSound.resume();
checkLocalFile();
disable();
}
override public function onFinishTween2(){
enable();
}
private function showScore(_arg1){
dispatchEvent(new Event(SHOW_SOCRE));
}
public function get startSound():GameSound{
return (_startSound);
}
private function checkLocalFile():void{
if (((LocalFile.LEVEL) && ((LocalFile.LEVEL > 1)))){
cgBtn.enable = true;
if ((LocalFile.LEVEL > GameVariables.MAX_LEVEL)){
LocalFile.CURRENT_LEVEL = GameVariables.MAX_LEVEL;
//unresolved jump
};
} else {
cgBtn.enable = false;
};
LocalFile.CREATE_DEFAULT_SCORES();
}
override public function disappear(_arg1:Number=2){
super.disappear(_arg1);
_startSound.fadeOut();
_startSound = null;
}
private function newGame(_arg1){
if (LocalFile.FIRST_PLAY == false){
GameVariables.LEVEL = 1;
dispatchEvent(new Event(TO_INTRO_PAGE));
disappear();
LocalFile.CREATE_ACCOUNT();
} else {
toTuto(_arg1);
};
}
private function changeSound(_arg1){
if (_arg1.currentTarget.selected == false){
OptPage.getInstance().soundOff(_arg1);
} else {
OptPage.getInstance().soundOn(_arg1);
};
}
public static function getInstance(){
if (_startPage == null){
_startPage = new (StartPage);
};
return (_startPage);
}
}
}//package com.veltive.cityinvasion.pages
Section 70
//WinPage (com.veltive.cityinvasion.pages.WinPage)
package com.veltive.cityinvasion.pages {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ui.*;
import com.veltive.cityinvasion.battlefield.*;
import com.veltive.cityinvasion.player.*;
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
public class WinPage extends AbstractPage {
public var a10:MovieClip;
private var _killNum:Number;
private var _killedNum:Number;
private var _score:Number;
private var _life:Number;
private var _skillNum:Number;
private var _produceNum:Number;
private var _time:Number;
public var stasticsMc:MovieClip;
private var _winSound:GameSound;
public var cBtn:MyButton;
private var _typeWriter:TypeWriter;
public static const BACK_MAIN = "back to main";
public static const CONTINUE = "continue";
public static const GAME_OVER = "game over";
public static var _winPage:WinPage;
public function WinPage(){
UTM = "more_games_mission_completed";
a10.txt.text = LanguageManager.getStr(ScorePage.PAGE_NAME, "a10");
cBtn.addEventListener(MouseEvent.CLICK, continueHandle);
cBtn.label = LanguageManager.getStr(ScorePage.PAGE_NAME, "continue");
cBtn.type = 2;
}
public function showData(){
_produceNum = Command.getPlayerData(GameVariables.HUMAN_GROUP).produceNum;
_killedNum = Command.getPlayerData(GameVariables.HUMAN_GROUP).killedNum;
_killNum = Command.getPlayerData(GameVariables.AI_GROUP).killedNum;
_time = GamePage.duration;
_life = (((Command.getPlayerData(GameVariables.HUMAN_GROUP).life / PlayerData.PLAYER_LIFE) * 100) / 100);
_life = (int((_life * 100)) / 100);
_score = ((_killNum - _killedNum) + ((_produceNum * 1000) * _life));
_score = (int((_score * 100)) / 100);
}
override public function appear(_arg1:Number=2){
var time = _arg1;
super.appear();
_winSound = new GameSound(new WinSound(), 0);
_winSound.resume();
var _local3 = stasticsMc;
with (_local3) {
txt0.text = LanguageManager.getStr(LosePage.PAGE_NAME, "mc");
txt1.text = (_time + "s");
txt2.text = _produceNum;
txt3.text = _killNum;
txt4.text = _killedNum;
txt5.text = (int((_life * 100)) + "%");
txt6.text = _score;
txt1_1.text = LanguageManager.getStr(LosePage.PAGE_NAME, "du");
txt2_1.text = LanguageManager.getStr(LosePage.PAGE_NAME, "cu");
txt3_1.text = LanguageManager.getStr(LosePage.PAGE_NAME, "ku");
txt4_1.text = LanguageManager.getStr(LosePage.PAGE_NAME, "lu");
txt5_1.text = LanguageManager.getStr(LosePage.PAGE_NAME, "li");
txt6_1.text = LanguageManager.getStr(LosePage.PAGE_NAME, "sc");
LocalFile.HIGH_SCORE = _score;
maskMc.gotoAndPlay(1);
};
}
public function get winSound():GameSound{
return (_winSound);
}
override public function disappear(_arg1:Number=2){
super.disappear(_arg1);
_winSound.fadeOut();
}
private function continueHandle(_arg1){
disappear();
if (GameVariables.LEVEL == 0){
dispatchEvent(new Event(BACK_MAIN));
return;
};
GameVariables.LEVEL++;
if (GameVariables.LEVEL <= GameVariables.MAX_LEVEL){
LocalFile.LEVEL = GameVariables.LEVEL;
dispatchEvent(new Event(CONTINUE));
} else {
showData();
dispatchEvent(new Event(GAME_OVER));
};
}
public static function getInstance(){
if (_winPage == null){
_winPage = new (WinPage);
};
return (_winPage);
}
}
}//package com.veltive.cityinvasion.pages
Section 71
//PlayerData (com.veltive.cityinvasion.player.PlayerData)
package com.veltive.cityinvasion.player {
import flash.events.*;
public class PlayerData extends EventDispatcher {
private var _group:int;
public var produceNum:Number;// = 0
public var killNum:Number;// = 0
public var killedNum:Number;// = 0
public var time:Number;// = 0
private var _buildModulus:int;
public var score:Number;// = 0
private var _credit:Number;
private var _life:Number;
public var invincible;// = false
public var skillNum:Number;// = 0
public static const PLAYER_LIFE:Number = 5000;
public static const PLAYER_LOSE:String = "player lose";
public function PlayerData(_arg1:int){
this._group = _arg1;
reset();
}
public function changeLife(_arg1):void{
if (invincible){
return;
};
_life = (_life + _arg1);
if ((_life > PLAYER_LIFE)){
_life = PLAYER_LIFE;
//unresolved jump
};
this.dispatchEvent(new Event(Event.CHANGE));
if (_life <= 0){
dispatchEvent(new Event(PLAYER_LOSE));
};
}
public function reset(){
_credit = 500;
_life = PLAYER_LIFE;
_buildModulus = 1;
score = 0;
killNum = 0;
killedNum = 0;
time = 0;
produceNum = 0;
skillNum = 0;
this.dispatchEvent(new Event(Event.CHANGE));
}
public function changeCredit(_arg1):void{
_credit = (_credit + _arg1);
this.dispatchEvent(new Event(Event.CHANGE));
}
public function get buildModulus():Number{
return (_buildModulus);
}
public function set buildModulus(_arg1:Number):void{
_buildModulus = _arg1;
}
public function get credit():Number{
return (_credit);
}
public function get life():Number{
return (_life);
}
public function get group():int{
return (_group);
}
}
}//package com.veltive.cityinvasion.player
Section 72
//ClockDrawer (com.veltive.cityinvasion.ui.ClockDrawer)
package com.veltive.cityinvasion.ui {
import flash.events.*;
import flash.display.*;
import com.veltive.cityinvasion.*;
import flash.utils.*;
public class ClockDrawer extends Sprite implements IGameObject {
private var _timer:Timer;
private var _unitName;
private var _angle;
private var _x0;
private var _interval:Number;
private var _spd:Number;
private var _color:int;// = 0
private var _y0;
private var _r;
public function ClockDrawer(_arg1:Number){
_interval = 10;
_r = 90;
_x0 = (_y0 = _r);
_angle = 360;
_spd = (360 / (_arg1 / _interval));
_timer = new Timer(_interval);
this.rotation = 90;
this.scaleX = -1;
this.mouseEnabled = false;
}
private function draw(_arg1){
var _local2:ProduceBtn = ProduceBtn(this.parent);
var _local3:Controler = Controler(_local2.parent);
_angle = (_angle - (((_spd * GameVariables.GAME_SPD) * _local3.playerData.buildModulus) * ProduceBtn(this.parent).buildModulus));
if (_angle > 0){
drawArcLine(this, _r, _angle);
} else {
finshed();
};
}
public function pause():void{
_timer.stop();
}
private function drawArcLine(_arg1:Sprite, _arg2:Number, _arg3:Number){
_arg1.graphics.clear();
_arg1.graphics.beginFill(_color, 0.6);
var _local4:Number = (((_arg3 / 180) * Math.PI) / 0.01);
_arg1.graphics.lineTo(_arg2, 0);
var _local5:int;
while (_local5 <= _local4) {
_arg1.graphics.curveTo((Math.cos(((_local5 - 0.5) * 0.01)) * _arg2), (Math.sin(((_local5 - 0.5) * 0.01)) * _arg2), (Math.cos((_local5 * 0.01)) * _arg2), (Math.sin((_local5 * 0.01)) * _arg2));
_local5++;
};
_arg1.graphics.endFill();
}
public function clear():void{
_angle = 0;
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, draw);
this.graphics.clear();
}
public function start(_arg1:Boolean=false){
if (_arg1 == false){
_color = 0xFFFFFF;
} else {
_color = 0;
};
_angle = 360;
_timer.addEventListener(TimerEvent.TIMER, draw);
resume();
}
public function set radius(_arg1:Number){
_r = _arg1;
}
public function resume():void{
if (_timer.running == false){
_timer.start();
};
}
private function finshed(){
dispatchEvent(new Event(Event.COMPLETE));
clear();
}
}
}//package com.veltive.cityinvasion.ui
Section 73
//Controler (com.veltive.cityinvasion.ui.Controler)
package com.veltive.cityinvasion.ui {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.battlefield.*;
import com.veltive.cityinvasion.player.*;
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import com.veltive.cityinvasion.*;
import com.veltive.cityinvasion.pages.*;
import flash.system.*;
public class Controler extends Sprite implements IGameObject {
protected var _group:int;// = 1
private var _btnArr:Array;
private var _playerData:PlayerData;
public var btn1:ProduceBtn;
public var btn3:ProduceBtn;
public var btn5:ProduceBtn;
public var btn6:ProduceBtn;
public var btn7:ProduceBtn;
public var btn2:ProduceBtn;
public var btn4:ProduceBtn;
private var _allBtnArr:Array;
public var sBtn1:ProduceBtn;
public var sBtn2:ProduceBtn;
public var sBtn4:ProduceBtn;
public var sBtn5:ProduceBtn;
public var sBtn3:ProduceBtn;
private var _currentBtnDex:int;
private var _sBtnArr:Array;
public function Controler(){
init();
}
public function set enable(_arg1:Boolean):void{
this.mouseEnabled = _arg1;
this.mouseChildren = _arg1;
if (_arg1){
if (this.stage){
this.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
//unresolved jump
};
if (this.stage){
this.stage.addEventListener(KeyboardEvent.KEY_UP, keyUp);
//unresolved jump
};
} else {
if (this.stage){
this.stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDown);
//unresolved jump
};
if (this.stage){
this.stage.removeEventListener(KeyboardEvent.KEY_UP, keyUp);
//unresolved jump
};
};
}
private function unitProduceHandle(_arg1){
dispatchEvent(new Event(Event.COMPLETE));
var _local2:ProduceBtn = ProduceBtn(_arg1.currentTarget);
var _local3:int;
if (this._group == GameVariables.HUMAN_GROUP){
_local3 = GameVariables.LANE_DEX;
} else {
_local3 = -1;
};
unitsStartCooling(_arg1);
Command.addUnit(_local2.unitName, this._group, _local3);
currentBtn = _allBtnArr.indexOf(_local2);
}
public function set level(_arg1:int){
var _local3:*;
var _local2:* = 1;
while (_local2 <= 7) {
_local3 = this.getChildByName(("btn" + _local2));
_btnArr.push(_local3);
_local3.addEventListener(ProduceBtn.PRODUCE, unitProduceHandle);
_local3.addEventListener(ProduceBtn.PRODUCED, unitCoolTimeOut);
if (_local3.level <= _arg1){
_local3.activated = true;
} else {
_local3.activated = false;
};
_local2++;
};
_local2 = 1;
while (_local2 <= 5) {
_local3 = this.getChildByName(("sBtn" + _local2));
_sBtnArr.push(_local3);
_local3.addEventListener(ProduceBtn.PRODUCE, skillProduceHandle);
_local3.addEventListener(ProduceBtn.PRODUCED, skillCoolTimeOut);
if (_local3.level <= _arg1){
if (_local3.activated == false){
_local3.activated = true;
_local3.start();
};
} else {
_local3.activated = false;
};
_local2++;
};
_allBtnArr = _btnArr.concat(_sBtnArr);
_currentBtnDex = 0;
currentBtn = _currentBtnDex;
}
private function init(){
_btnArr = [];
_sBtnArr = [];
ProduceBtn(btn1).thumb = new t1(100, 100);
ProduceBtn(btn1).duration = 800;
ProduceBtn(btn1).credit = 50;
ProduceBtn(btn1).unitName = UnitFactory.COP_WITH_SHOTGUN;
ProduceBtn(btn1).enable = true;
ProduceBtn(btn1).level = 0;
ProduceBtn(btn2).thumb = new t4(100, 100);
ProduceBtn(btn2).duration = 800;
ProduceBtn(btn2).unitName = UnitFactory.CIVILIAN_WITH_ROCK;
ProduceBtn(btn2).enable = true;
ProduceBtn(btn2).credit = 50;
ProduceBtn(btn2).level = 0;
ProduceBtn(btn3).thumb = new t2(100, 100);
ProduceBtn(btn3).duration = 1200;
ProduceBtn(btn3).unitName = UnitFactory.COP_WITH_SHIELD;
ProduceBtn(btn3).enable = true;
ProduceBtn(btn3).credit = 50;
ProduceBtn(btn3).level = 0;
ProduceBtn(btn4).thumb = new t3(100, 100);
ProduceBtn(btn4).duration = 1500;
ProduceBtn(btn4).unitName = UnitFactory.SNIPER;
ProduceBtn(btn4).enable = true;
ProduceBtn(btn4).credit = 50;
ProduceBtn(btn4).level = 2;
ProduceBtn(btn5).thumb = new t5(100, 100);
ProduceBtn(btn5).duration = 1800;
ProduceBtn(btn5).unitName = UnitFactory.ROCKET_SOLIDER;
ProduceBtn(btn5).enable = true;
ProduceBtn(btn5).credit = 50;
ProduceBtn(btn5).level = 3;
ProduceBtn(btn6).thumb = new t6(100, 100);
ProduceBtn(btn6).duration = 2200;
ProduceBtn(btn6).unitName = UnitFactory.ROBOT;
ProduceBtn(btn6).enable = true;
ProduceBtn(btn6).credit = 50;
ProduceBtn(btn6).level = 4;
ProduceBtn(btn7).thumb = new t7(100, 100);
ProduceBtn(btn7).duration = 2500;
ProduceBtn(btn7).unitName = UnitFactory.TANK;
ProduceBtn(btn7).enable = true;
ProduceBtn(btn7).credit = 50;
ProduceBtn(btn7).level = 5;
ProduceBtn(sBtn1).thumb = new s2(100, 100);
ProduceBtn(sBtn1).duration = 18000;
ProduceBtn(sBtn1).unitName = "mobilization order";
ProduceBtn(sBtn1).enable = true;
ProduceBtn(sBtn1).level = 0;
ProduceBtn(sBtn4).thumb = new s1(100, 100);
ProduceBtn(sBtn4).duration = 20000;
ProduceBtn(sBtn4).unitName = AmmoFactory.EXTEND_AMMO;
ProduceBtn(sBtn4).ammoName = AmmoFactory.EXTEND_AMMO;
ProduceBtn(sBtn4).enable = true;
ProduceBtn(sBtn4).credit = 50;
ProduceBtn(sBtn4).level = 4;
ProduceBtn(sBtn3).thumb = new s3(100, 100);
ProduceBtn(sBtn3).duration = 12000;
ProduceBtn(sBtn3).unitName = AmmoFactory.TIME_BOMB;
ProduceBtn(sBtn3).ammoName = AmmoFactory.TIME_BOMB;
ProduceBtn(sBtn3).enable = true;
ProduceBtn(sBtn3).level = 3;
ProduceBtn(sBtn2).thumb = new s4(100, 100);
ProduceBtn(sBtn2).duration = 8000;
ProduceBtn(sBtn2).unitName = UnitFactory.SUICIDE_CAR;
ProduceBtn(sBtn2).enable = true;
ProduceBtn(sBtn2).level = 2;
ProduceBtn(sBtn5).thumb = new s5(100, 100);
ProduceBtn(sBtn5).duration = 10000;
ProduceBtn(sBtn5).unitName = UnitFactory.YURI;
ProduceBtn(sBtn5).enable = true;
ProduceBtn(sBtn5).level = 5;
}
private function unitCoolTimeOut(_arg1){
_arg1.currentTarget.enable = true;
}
private function keyDown(_arg1:KeyboardEvent){
var _local2:*;
if (_arg1.keyCode == 37){
while (1) {
_currentBtnDex--;
if (_currentBtnDex < 0){
_currentBtnDex = int((_allBtnArr.length - 1));
};
_local2 = _allBtnArr[_currentBtnDex];
if (((!((_local2 == null))) && ((_local2.activated == true)))){
break;
};
};
} else {
if (_arg1.keyCode == 39){
while (1) {
_currentBtnDex++;
if (_currentBtnDex > int((_allBtnArr.length - 1))){
_currentBtnDex = 0;
};
_local2 = _allBtnArr[_currentBtnDex];
if (((!((_local2 == null))) && ((_local2.activated == true)))){
break;
};
};
};
};
if (_arg1.keyCode == 38){
if ((--GameVariables.LANE_DEX < 0)){
GameVariables.LANE_DEX = (GameVariables.LANES_NUM - 1);
//unresolved jump
};
} else {
if (_arg1.keyCode == 40){
if ((++GameVariables.LANE_DEX > (GameVariables.LANES_NUM - 1))){
GameVariables.LANE_DEX = 0;
//unresolved jump
};
};
};
BattleField.getInstance().setLaneDex(GameVariables.LANE_DEX);
currentBtn = _currentBtnDex;
if ((((_arg1.keyCode == 68)) || ((_arg1.keyCode == 32)))){
_allBtnArr[_currentBtnDex].produceOrder();
};
if ((((_arg1.keyCode == 80)) && (GamePage.getInstance().isEnable))){
GamePage.getInstance().showMenu(null);
};
if (_arg1.shiftKey){
Command.addBloodBar();
};
if (_arg1.ctrlKey){
};
}
private function skillCoolTimeOut(_arg1){
_arg1.currentTarget.enable = true;
}
public function get playerData():PlayerData{
return (_playerData);
}
public function resume():void{
var _local1:* = 0;
while (_local1 < _btnArr.length) {
_btnArr[_local1].resume();
_local1++;
};
_local1 = 0;
while (_local1 < _sBtnArr.length) {
_sBtnArr[_local1].resume();
_local1++;
};
this.enable = true;
}
public function get sBtnArr():Array{
return (_sBtnArr);
}
private function set currentBtn(_arg1:int){
var _local2:* = 0;
while (_local2 < _allBtnArr.length) {
_allBtnArr[_local2].selected = false;
_local2++;
};
_allBtnArr[_arg1].selected = true;
_currentBtnDex = _arg1;
}
public function clear():void{
var _local1:* = 0;
while (_local1 < _btnArr.length) {
_btnArr[_local1].clear();
_local1++;
};
_local1 = 0;
while (_local1 < _sBtnArr.length) {
_sBtnArr[_local1].clear();
_local1++;
};
}
public function reset(){
_btnArr = [];
_sBtnArr = [];
_allBtnArr = [];
level = GameVariables.LEVEL;
ProduceBtn(sBtn5).start();
ProduceBtn(sBtn4).start();
ProduceBtn(sBtn3).start();
ProduceBtn(sBtn2).start();
ProduceBtn(sBtn1).start();
ProduceBtn(btn7).start();
ProduceBtn(btn6).start();
ProduceBtn(btn5).start();
ProduceBtn(btn4).start();
ProduceBtn(btn3).start();
ProduceBtn(btn2).start();
ProduceBtn(btn1).start();
if (this.stage){
this.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
stage.focus = stage;
};
}
private function unitsStartCooling(_arg1){
var _local2:* = 0;
while (_local2 < _btnArr.length) {
if (_arg1.currentTarget != _btnArr[_local2]){
_btnArr[_local2].start(true);
} else {
_btnArr[_local2].start(false);
};
_local2++;
};
}
private function keyUp(_arg1:KeyboardEvent){
Command.clearBloodBar();
}
public function get btnArr():Array{
return (_btnArr);
}
private function skillProduceHandle(_arg1){
var _local2:ProduceBtn = ProduceBtn(_arg1.currentTarget);
var _local3:int;
if (this._group == GameVariables.HUMAN_GROUP){
_local3 = GameVariables.LANE_DEX;
} else {
_local3 = GameVariables.LANE_DEX_AI;
};
_local2.start();
if (_local2.unitName == AmmoFactory.EXTEND_AMMO){
Command.addBombRain(_local2.ammoName, this._group, _local3, 1);
} else {
if (_local2.unitName == "mobilization order"){
Command.AddMobilisation(_arg1.currentTarget);
} else {
if (_local2.unitName == AmmoFactory.TIME_BOMB){
Command.putAmmo(_local2.ammoName, this._group, _local3, 1, _arg1.currentTarget);
} else {
if (_local2.unitName == UnitFactory.SUICIDE_CAR){
Command.addUnit(_local2.unitName, this._group, _local3);
} else {
if (_local2.unitName == UnitFactory.YURI){
Command.addUnit(_local2.unitName, this._group, _local3);
};
};
};
};
};
currentBtn = _allBtnArr.indexOf(_local2);
}
public function pause():void{
var _local1:* = 0;
while (_local1 < _btnArr.length) {
_btnArr[_local1].pause();
_local1++;
};
_local1 = 0;
while (_local1 < _sBtnArr.length) {
_sBtnArr[_local1].pause();
_local1++;
};
this.enable = false;
}
public function set group(_arg1:int){
this._group = _arg1;
if (_arg1 == UnitGroup.GROUP_ENEMY){
this._playerData = GameVariables.PLAYER_ENEMY;
} else {
this._playerData = GameVariables.PLAYER_FRIEND;
};
}
public function get group():int{
return (_group);
}
}
}//package com.veltive.cityinvasion.ui
Section 74
//CreditMc (com.veltive.cityinvasion.ui.CreditMc)
package com.veltive.cityinvasion.ui {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
public class CreditMc extends Sprite {
public var txt:TextField;
var des:int;// = 0
var res:int;// = 0
var spd;// = 3
public function CreditMc(){
this.addEventListener(Event.ENTER_FRAME, go);
Command.getPlayerData(GameVariables.HUMAN_GROUP).addEventListener(Event.CHANGE, changed);
changed(null);
}
private function go(_arg1){
if (Math.abs((res - des)) <= spd){
res = des;
this.txt.text = res.toString();
return;
};
if (res > des){
res = (res - spd);
} else {
res = (res + spd);
};
this.txt.text = res.toString();
}
private function changed(_arg1){
des = Command.getPlayerData(GameVariables.HUMAN_GROUP).credit;
}
}
}//package com.veltive.cityinvasion.ui
Section 75
//GameMenu (com.veltive.cityinvasion.ui.GameMenu)
package com.veltive.cityinvasion.ui {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.battlefield.*;
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
import com.veltive.cityinvasion.pages.*;
public class GameMenu extends AbstractPage {
public var optBtn:MyButton;
public var resumeBtn:MyButton;
public var retryBtn:MyButton;
public var learnBtn:MyButton;
public var exitBtn:MyButton;
public static const PAGE_NAME = "menupage";
private static var _gameMenu:GameMenu;
public function GameMenu(){
optBtn.addEventListener(MouseEvent.CLICK, showOpt);
optBtn.label = LanguageManager.getStr(PAGE_NAME, "options");
optBtn.type = 3;
retryBtn.addEventListener(MouseEvent.CLICK, retry);
retryBtn.label = LanguageManager.getStr(PAGE_NAME, "retry");
retryBtn.type = 3;
exitBtn.addEventListener(MouseEvent.CLICK, exit);
exitBtn.label = LanguageManager.getStr(PAGE_NAME, "exit");
exitBtn.type = 3;
resumeBtn.addEventListener(MouseEvent.CLICK, resume);
resumeBtn.label = LanguageManager.getStr(PAGE_NAME, "resume");
resumeBtn.type = 3;
this.addEventListener(KeyboardEvent.KEY_DOWN, keyUp);
learnBtn.label = LanguageManager.getStr(PAGE_NAME, "htp");
learnBtn.type = 3;
learnBtn.addEventListener(MouseEvent.CLICK, HowToPlay);
}
private function keyUp(_arg1){
if ((((_arg1.keyCode == 80)) && (this.isEnable))){
resume(_arg1);
};
}
private function resume(_arg1){
this.disappear(0.5);
GamePage.getInstance().resume(_arg1);
}
private function exit(_arg1){
GamePage.getInstance().exit(_arg1);
this.disappear(0.5);
}
override public function appear(_arg1:Number=2){
super.appear(_arg1);
stage.focus = this;
}
private function showOpt(_arg1){
GamePage.getInstance().showOpt(_arg1);
}
private function retry(_arg1){
GamePage.getInstance().retry(_arg1);
this.disappear(0.5);
}
override public function onFinishTween(){
stage.focus = GamePage.getInstance();
GamePage.getInstance().enable();
super.onFinishTween();
}
private function HowToPlay(_arg1){
GamePage.getInstance().showHelp(_arg1);
}
public static function getInstance():GameMenu{
if (_gameMenu == null){
_gameMenu = new (GameMenu);
};
return (_gameMenu);
}
}
}//package com.veltive.cityinvasion.ui
Section 76
//IconBtnMusic (com.veltive.cityinvasion.ui.IconBtnMusic)
package com.veltive.cityinvasion.ui {
public class IconBtnMusic extends IconBtnSound {
}
}//package com.veltive.cityinvasion.ui
Section 77
//IconBtnSound (com.veltive.cityinvasion.ui.IconBtnSound)
package com.veltive.cityinvasion.ui {
import gs.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
public class IconBtnSound extends MovieClip {
protected var _selected;// = false
public function IconBtnSound(){
addFrameScript(0, frame1);
}
public function set enable(_arg1:Boolean){
if (!_arg1){
TweenLite.to(this, 0, {tint:0x999999, ease:null});
this.mouseChildren = false;
this.mouseEnabled = false;
} else {
TweenLite.to(this, 0, {tint:0xCCCCCC, ease:null});
this.mouseChildren = true;
this.mouseEnabled = true;
};
}
public function set selected(_arg1:Boolean){
if (_arg1){
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
};
this._selected = _arg1;
}
protected function down(_arg1){
}
protected function over(_arg1){
TweenLite.to(this, 0.3, {scaleX:1.1, scaleY:1.1, blur:0, ease:null});
new GameSound(new BtnSound()).resume();
}
function frame1(){
stop();
}
public function get selected():Boolean{
return (_selected);
}
protected function out(_arg1){
TweenLite.to(this, 0.3, {scaleX:1, scaleY:1, blur:3, ease:null});
}
}
}//package com.veltive.cityinvasion.ui
Section 78
//LifeBar (com.veltive.cityinvasion.ui.LifeBar)
package com.veltive.cityinvasion.ui {
import com.veltive.cityinvasion.player.*;
import gs.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
import gs.easing.*;
public class LifeBar extends Sprite {
public var txt1:TextField;
public var maskMc:MovieClip;
public var txt3:TextField;
public var barMc:MovieClip;
private var _playerData;
public var focusMc:MovieClip;
protected var _txt;
public var txt2:TextField;
public function clear(){
var _local1:* = 0;
_local1 = (maskMc.width * _local1);
TweenLite.to(barMc, 1, {width:_local1, ease:Back.easeOut});
_txt.text = "";
}
public function set playerData(_arg1:PlayerData){
_playerData = _arg1;
_playerData.addEventListener(Event.CHANGE, changed);
if (_arg1 == GameVariables.PLAYER_FRIEND){
_txt = txt1;
} else {
_txt = txt2;
};
changed(null);
_txt.selectable = false;
txt3.selectable = false;
}
private function changed(_arg1){
var _local2:* = (_playerData.life / PlayerData.PLAYER_LIFE);
focusMc.gotoAndPlay(1);
_local2 = (maskMc.width * _local2);
TweenLite.to(barMc, 1, {width:_local2, ease:Back.easeOut});
_txt.text = Math.floor(_playerData.life).toString();
if (Math.floor(_playerData.life) <= 0){
_txt.text = "";
};
}
}
}//package com.veltive.cityinvasion.ui
Section 79
//MusicMc (com.veltive.cityinvasion.ui.MusicMc)
package com.veltive.cityinvasion.ui {
import flash.display.*;
import gs.*;
import gs.easing.*;
public class MusicMc extends Sprite {
public function MusicMc(){
this.y = 50;
this.x = -(this.width);
this.cacheAsBitmap = true;
TweenLite.to(this, 4, {x:5, ease:Back.easeOut, onComplete:appear});
}
public function clear(){
this.parent.removeChild(this);
}
private function appear(){
TweenLite.to(this, 2, {x:-(this.width), ease:Back.easeOut, onComplete:clear});
}
}
}//package com.veltive.cityinvasion.ui
Section 80
//MyButton (com.veltive.cityinvasion.ui.MyButton)
package com.veltive.cityinvasion.ui {
import gs.*;
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import flash.text.*;
import flash.filters.*;
public class MyButton extends MovieClip {
public var bg:MovieClip;
private var _blur;// = 3
public var arrow:MovieClip;
private var _bg:Sprite;
public var txt:TextField;
private var _txt:TextField;
public function MyButton(_arg1:String="Button"){
_bg = this.bg;
_txt = this.txt;
_txt.autoSize = "center";
_txt.selectable = false;
this.addEventListener(MouseEvent.MOUSE_OVER, over);
this.addEventListener(MouseEvent.MOUSE_OUT, out);
this.addEventListener(MouseEvent.MOUSE_DOWN, down);
label = _arg1;
type = 1;
}
public function set enable(_arg1:Boolean){
if (!_arg1){
TweenLite.to(this._txt, 0, {tint:0x999999, ease:null});
this.mouseChildren = false;
this.mouseEnabled = false;
} else {
TweenLite.to(this._txt, 0, {tint:0xCCCCCC, ease:null});
this.mouseChildren = true;
this.mouseEnabled = true;
};
}
private function out(_arg1){
TweenLite.to(this, 0.3, {scaleX:1, scaleY:1, blur:3, ease:null});
arrow.play();
}
private function over(_arg1){
TweenLite.to(this, 0.3, {scaleX:1.1, scaleY:1.01, blur:0, ease:null});
new GameSound(new BtnSound()).resume();
arrow.stop();
}
public function set blur(_arg1){
_blur = _arg1;
}
public function set autoSize(_arg1:Boolean){
if (_arg1){
arrow.x = (_txt.width / 2);
_bg.width = (_txt.width + 20);
_bg.x = ((-(_txt.width) / 2) - 10);
} else {
arrow.x = (_txt.width / 2);
_bg.width = (_txt.width + 16);
_bg.x = (-(_bg.width) / 2);
};
}
public function set label(_arg1:String){
var _local2:* = 10;
txt.text = _arg1;
_bg.width = 180;
arrow.x = (_txt.width / 2);
_bg.x = (-(_bg.width) / 2);
}
private function down(_arg1){
this.gotoAndStop("down");
}
public function get blur():Number{
return (_blur);
}
public function get label():String{
return (txt.text);
}
public function set selected(_arg1:Boolean){
if (_arg1){
this.filters = [new GlowFilter(0xFF0000, 1, 5, 5, 3)];
} else {
this.filters = null;
};
}
public function set type(_arg1:int){
if (_arg1 == 2){
arrow.visible = true;
bg.visible = false;
} else {
if (_arg1 == 1){
arrow.visible = false;
bg.visible = true;
} else {
arrow.visible = false;
bg.visible = false;
};
};
}
}
}//package com.veltive.cityinvasion.ui
Section 81
//ProduceBtn (com.veltive.cityinvasion.ui.ProduceBtn)
package com.veltive.cityinvasion.ui {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
public class ProduceBtn extends MovieClip implements IGameObject {
private var _level:int;// = 10
private var _layerMc:Sprite;
private var _unitName:String;// = ""
private var _buildModulus:Number;// = 1
public var alphaMc:MovieClip;
private var _credit:Number;
public var clockMask:MovieClip;
private var _clockMask:DisplayObject;
private var _enable:Boolean;// = false
public var maskMc:MovieClip;
private var _txt:TextField;
private var _unitInfo:UnitInfo;
private var _maskMc:DisplayObject;
public var layerMc:MovieClip;
private var _activited:Boolean;// = false
private var _bit:BitmapData;
private var _order:int;// = 0
private var _alphaMc:DisplayObject;
private var _ammoName:String;// = ""
private var _bitmap:Bitmap;
private var _clickable:Boolean;// = true
private var _clockDrawer:ClockDrawer;
public var txt:TextField;
private var _duration:Number;
public static const PRODUCED:String = "produced";
public static const PRODUCE:String = "produce";
public function ProduceBtn(){
addFrameScript(0, frame1);
_layerMc = Sprite(Sprite(this).getChildByName("layerMc"));
_maskMc = Sprite(this).getChildByName("maskMc");
_clockMask = Sprite(this).getChildByName("clockMask");
_alphaMc = Sprite(this).getChildByName("alphaMc");
_txt = TextField(Sprite(this).getChildByName("txt"));
_txt.selectable = false;
_txt.visible = false;
selected = false;
this.addEventListener(MouseEvent.MOUSE_OVER, overHandle);
this.addEventListener(MouseEvent.MOUSE_OUT, outHandle);
this.addEventListener(MouseEvent.MOUSE_MOVE, moveHandle);
}
public function set ammoName(_arg1:String){
_ammoName = _arg1;
}
public function get enable():Boolean{
return (_enable);
}
public function get level():int{
return (_level);
}
public function set enable(_arg1:Boolean):void{
if (_arg1 == true){
this.buttonMode = true;
this.addEventListener(MouseEvent.CLICK, clickHandle);
} else {
this.buttonMode = false;
this.removeEventListener(MouseEvent.CLICK, clickHandle);
};
_enable = _arg1;
}
private function outHandle(_arg1){
var e = _arg1;
try {
gotoAndStop(1);
_unitInfo.parent.removeChild(_unitInfo);
_unitInfo = null;
} catch(e) {
};
}
private function createClock(){
var _local1:* = (_clockDrawer = new ClockDrawer(_duration));
addChild(_local1);
_local1.radius = 200;
_local1.x = (_maskMc.width / 2);
_local1.y = (_maskMc.height / 2);
_local1.mask = _clockMask;
_local1.addEventListener(Event.COMPLETE, completeHandle);
}
public function set level(_arg1:int){
_level = _arg1;
}
public function resume():void{
_clockDrawer.resume();
}
public function set duration(_arg1:Number){
this._duration = _arg1;
createClock();
}
public function set thumb(_arg1:BitmapData){
if (((((_bitmap) && (_bit))) && (_bitmap.parent))){
_bit.dispose();
removeChild(_bitmap);
};
if (_arg1 == null){
enable = false;
return;
};
_bit = _arg1;
_bitmap = new Bitmap(_bit);
_bitmap.width = _maskMc.width;
_bitmap.height = _maskMc.height;
_bitmap.x = _maskMc.x;
_bitmap.y = _maskMc.y;
addChildAt(_bitmap, 1);
_bitmap.mask = _maskMc;
}
public function set selected(_arg1:Boolean){
if (_arg1){
_alphaMc.alpha = 1;
} else {
_alphaMc.alpha = 0;
};
}
public function get unitName(){
return (_unitName);
}
private function completeHandle(_arg1){
this.addEventListener(MouseEvent.CLICK, clickHandle);
this.buttonMode = true;
new glowMc(this);
produce();
}
private function overHandle(_arg1){
if ((((this.unitName == null)) || ((this.unitName == "")))){
return;
};
if (_bitmap == null){
return;
};
outHandle(_arg1);
_unitInfo = new UnitInfo(this.unitName);
this.parent.addChild(_unitInfo);
_unitInfo.x = this.x;
if ((this.x + this.parent.x) > (GameVariables.STAGE_WIDTH / 2)){
_unitInfo.x = ((this.x - _unitInfo.width) + this.width);
};
if (((_enable) && (_bitmap))){
new glowMc(_bitmap);
};
_unitInfo.y = (this.y - 10);
}
public function clear():void{
_clockDrawer.clear();
this.addEventListener(MouseEvent.CLICK, clickHandle);
this.buttonMode = true;
enable = true;
}
private function clickHandle(_arg1){
produceOrder();
}
public function get activated():Boolean{
return (_activited);
}
public function set buildModulus(_arg1:Number){
_buildModulus = _arg1;
}
public function set clickable(_arg1:Boolean){
_clickable = _arg1;
this.buttonMode = _arg1;
}
public function get buildModulus(){
return (_buildModulus);
}
private function moveHandle(_arg1){
if (_unitInfo){
if (_unitInfo.currentLabel == "over"){
outHandle(_arg1);
} else {
_unitInfo.gotoAndPlay(1);
};
};
}
public function set activated(_arg1:Boolean){
this.visible = _arg1;
this._activited = _arg1;
}
public function set unitName(_arg1:String){
_unitName = _arg1;
}
function frame1(){
stop();
}
public function get timeTxt():TextField{
return (_txt);
}
private function produce(){
if (_activited){
dispatchEvent(new Event(PRODUCED));
//unresolved jump
};
}
public function get clickable():Boolean{
return (_clickable);
}
public function set credit(_arg1){
_credit = _arg1;
}
public function pause():void{
_clockDrawer.pause();
}
public function get ammoName(){
return (_ammoName);
}
public function start(_arg1:Boolean=false){
this.buttonMode = false;
this.removeEventListener(MouseEvent.CLICK, clickHandle);
_clockDrawer.start(_arg1);
enable = false;
}
public function produceOrder():Boolean{
if (((((!(_enable)) || (!(_activited)))) || (!(_clickable)))){
return (false);
};
dispatchEvent(new Event(PRODUCE));
return (true);
}
}
}//package com.veltive.cityinvasion.ui
import gs.*;
import flash.display.*;
import gs.easing.*;
class glowMc extends Sprite {
private var _mc;
private function glowMc(_arg1){
_arg1.alpha = 0.3;
TweenLite.to(_arg1, 1.5, {alpha:1, ease:Back.easeOut});
}
}
Section 82
//ScoreMc (com.veltive.cityinvasion.ui.ScoreMc)
package com.veltive.cityinvasion.ui {
import flash.display.*;
import flash.text.*;
public class ScoreMc extends MovieClip {
public var s_txt:TextField;
public var t_txt:TextField;
public var o_txt:TextField;
public var n_txt:TextField;
public function set order(_arg1:Number){
this.o_txt.text = _arg1.toString();
}
public function set score(_arg1:Number){
this.s_txt.text = _arg1.toString();
}
public function set user(_arg1:String){
this.n_txt.text = _arg1;
}
public function set date(_arg1:String){
this.t_txt.text = _arg1;
}
}
}//package com.veltive.cityinvasion.ui
Section 83
//SubmitBox (com.veltive.cityinvasion.ui.SubmitBox)
package com.veltive.cityinvasion.ui {
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import flash.text.*;
import com.veltive.cityinvasion.pages.*;
public class SubmitBox extends Sprite {
private var input_name:String;
public var sBtn:MyButton;
public var s_txt:TextField;
private var score:String;
public var input_txt:TextField;
public function SubmitBox(){
input_name = LanguageManager.getStr(FinalPage.PAGE_NAME, "in");
score = LanguageManager.getStr(FinalPage.PAGE_NAME, "score");
sBtn.addEventListener(MouseEvent.CLICK, submit);
sBtn.type = 1;
sBtn.label = LanguageManager.getStr(FinalPage.PAGE_NAME, "ss");
sBtn.autoSize = false;
appear();
}
private function toInput(_arg1){
if (input_txt.text == input_name){
input_txt.text = "";
};
}
public function appear(){
this.input_txt.text = input_name;
input_txt.borderColor = 0;
this.s_txt.text = ((score + ": ") + String(LocalFile.GET_CURRENT_SCORE()));
this.input_txt.addEventListener(MouseEvent.CLICK, toInput);
}
private function submit(_arg1){
if (((!((input_txt.text == ""))) && (!((input_txt.text == input_name))))){
close(_arg1);
LocalFile.SUBMIT_SCORE(input_txt.text);
dispatchEvent(new Event(Event.CLOSE));
} else {
input_txt.borderColor = 0xFF0000;
this.input_txt.text = input_name;
};
}
private function close(_arg1){
sBtn.removeEventListener(MouseEvent.CLICK, close);
}
}
}//package com.veltive.cityinvasion.ui
Section 84
//UnitInfo (com.veltive.cityinvasion.ui.UnitInfo)
package com.veltive.cityinvasion.ui {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import flash.text.*;
import com.veltive.cityinvasion.pages.*;
public class UnitInfo extends MovieClip {
public var maskMc:MovieClip;
public var nameTxt:TextField;
public var infoTxt:TextField;
public function UnitInfo(_arg1:String){
addFrameScript(17, frame18);
var _local2:* = {};
switch (_arg1){
case UnitFactory.CIVILIAN_WITH_ROCK:
_local2.life = 100;
_local2.price = 200;
_local2.damage = 36;
_local2.speed = 4;
_local2.name = LanguageManager.getStr(IntroPage.PAGE_NAME, "un2");
_local2.info = LanguageManager.getStr(IntroPage.PAGE_NAME, "ue2_2");
break;
case UnitFactory.COP_WITH_SHIELD:
_local2.life = 300;
_local2.price = 300;
_local2.damage = 50;
_local2.speed = 3;
_local2.name = LanguageManager.getStr(IntroPage.PAGE_NAME, "un3");
_local2.info = LanguageManager.getStr(IntroPage.PAGE_NAME, "ue3_2");
break;
case AmmoFactory.EXTEND_AMMO:
_local2.name = LanguageManager.getStr(IntroPage.PAGE_NAME, "pn4");
_local2.info = LanguageManager.getStr(IntroPage.PAGE_NAME, "pe4");
break;
case UnitFactory.SNIPER:
_local2.name = LanguageManager.getStr(IntroPage.PAGE_NAME, "un4");
_local2.info = LanguageManager.getStr(IntroPage.PAGE_NAME, "ue4_2");
break;
case UnitFactory.COP_WITH_SHOTGUN:
_local2.name = LanguageManager.getStr(IntroPage.PAGE_NAME, "un1");
_local2.info = LanguageManager.getStr(IntroPage.PAGE_NAME, "ue1_2");
break;
case UnitFactory.ROCKET_SOLIDER:
_local2.name = LanguageManager.getStr(IntroPage.PAGE_NAME, "un5");
_local2.info = LanguageManager.getStr(IntroPage.PAGE_NAME, "ue5_2");
break;
case UnitFactory.ROBOT:
_local2.name = LanguageManager.getStr(IntroPage.PAGE_NAME, "un6");
_local2.info = LanguageManager.getStr(IntroPage.PAGE_NAME, "ue6_2");
break;
case UnitFactory.TANK:
_local2.name = LanguageManager.getStr(IntroPage.PAGE_NAME, "un7");
_local2.info = LanguageManager.getStr(IntroPage.PAGE_NAME, "ue7_2");
break;
case "mobilization order":
_local2.name = LanguageManager.getStr(IntroPage.PAGE_NAME, "pn1");
_local2.info = LanguageManager.getStr(IntroPage.PAGE_NAME, "pe1");
break;
case AmmoFactory.TIME_BOMB:
_local2.name = LanguageManager.getStr(IntroPage.PAGE_NAME, "pn3");
_local2.info = LanguageManager.getStr(IntroPage.PAGE_NAME, "pe3");
break;
case UnitFactory.SUICIDE_CAR:
_local2.name = LanguageManager.getStr(IntroPage.PAGE_NAME, "pn2");
_local2.info = LanguageManager.getStr(IntroPage.PAGE_NAME, "pe2");
break;
case UnitFactory.YURI:
_local2.name = LanguageManager.getStr(IntroPage.PAGE_NAME, "pn5");
_local2.info = LanguageManager.getStr(IntroPage.PAGE_NAME, "pe5");
break;
default:
_local2.name = "Unknown";
_local2.info = "Secret weapon ?";
break;
};
setValue(_local2);
maskMc.cacheAsBitmap = true;
this.mask = maskMc;
}
function frame18(){
stop();
}
private function setValue(_arg1){
nameTxt.text = _arg1.name;
infoTxt.text = _arg1.info;
}
}
}//package com.veltive.cityinvasion.ui
Section 85
//AbstractUnit (com.veltive.cityinvasion.units.AbstractUnit)
package com.veltive.cityinvasion.units {
import com.veltive.cityinvasion.battlefield.*;
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.effects.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import com.veltive.cityinvasion.*;
import flash.geom.*;
import flash.filters.*;
public class AbstractUnit extends MovieClip implements IUnit {
private var _direction:int;// = 1
private var _currentAction:Function;
protected var _credit:Number;// = 100
private var _attacking:Boolean;// = false
private var _bloodBar:BloodBar;
protected var _rangeMin:Number;// = 0
protected var _faintInterval:Number;// = 55
private var _dead:Boolean;// = false
protected var _unitH:Number;// = 35
protected var _rangeMax:Number;// = 200
protected var _unbeatable:Boolean;// = false
protected var _attackInterval:Number;// = 45
private var _disappearing:Boolean;// = false
protected var _originalLife:Number;// = 100
protected var _unitW:Number;// = 15
private var _faintEffect:FaintEffect;
protected var _dieEffectName:String;// = null
protected var _coolingModulus;// = 1
private var _group:Number;
private var _damageAmmo:String;
protected var _level:uint;// = 1
protected var _endAmmoX:Number;// = 0
protected var _endAmmoY:Number;// = 0
private var _state:Number;
protected var _unitName:String;
protected var _initAmmoX:Number;// = 0
protected var _initAmmoY:Number;// = 0
private var _coolingTime:Number;// = 0
private var _ammo:AbstractAmmo;
private var _target:AbstractUnit;
private var _faintTime:Number;// = 0
private var _lane:Lane;
protected var _dieSound:GameSound;
protected var _ammoName:String;// = "stone"
protected var _life:Number;// = 50
protected var _spd:Number;// = 1
protected var _fireSound:GameSound;
protected var _shootEffectName:String;// = null
public static const DIE = "die";
public static const LIFE_CHANGE = "life changed";
public static const BETRAY = "I am the betrayer";
public function AbstractUnit(_arg1:AbstractUnit=null):void{
_dieSound = new GameSound(DieSoundFactory.getSound());
super();
if (_arg1 != this){
throw (new Error("this is a abstract class"));
};
state = UnitStateFactory.MOVE;
_endAmmoY = -(((this.height / 2) + ((Math.random() * this.height) / 3)));
_coolingTime = 1000;
this.mouseEnabled = false;
this.mouseChildren = false;
}
public function get life():Number{
return (_life);
}
public function set group(_arg1:int):void{
this._group = _arg1;
if (_arg1 == UnitGroup.GROUP_ENEMY){
_direction = -1;
this.scaleX = -1;
this.x = (BattleField.BATTLE_FIELD_WIDTH - Lane.START_POINT);
this.filters = [new ColorMatrixFilter(ChangeColor.getSaturationArray(0.3))];
} else {
_direction = 1;
this.scaleX = 1;
this.x = Lane.START_POINT;
this.filters = [new ColorMatrixFilter(ChangeColor.getSaturationArray(1))];
};
}
protected function shooted(_arg1):void{
this.removeEventListener(GameVariables.SHOOTED, shooted);
_attacking = false;
this.gotoAndStop("attack");
this.state = UnitStateFactory.ATTACK;
}
private function clearFaint(){
if (_faintEffect){
_faintEffect.clear();
_faintEffect = null;
};
}
protected function subFuc():void{
}
private function changeFriendCredit():void{
if (this.group == UnitGroup.GROUP_ENEMY){
GameVariables.PLAYER_ENEMY.changeCredit(this._credit);
} else {
GameVariables.PLAYER_FRIEND.changeCredit(this._credit);
};
}
public function get initAmmoX():Number{
var _local1 = 1;
if ((this._group == UnitGroup.GROUP_ENEMY)){
_local1 = -1;
} else {
_local1 = 1;
};
return ((_initAmmoX * _local1));
}
private function enterframeHandle(_arg1:Event):void{
_currentAction();
checkIsCollide();
subFuc();
}
public function set state(_arg1:int):void{
if (this._state == _arg1){
return;
};
this._state = _arg1;
switch (this._state){
case UnitStateFactory.MOVE:
_currentAction = move;
this.gotoAndPlay("move");
_attacking = false;
break;
case UnitStateFactory.DIE:
die();
_currentAction = stand;
break;
case UnitStateFactory.ATTACK:
_attacking = false;
_currentAction = startAttack;
this.gotoAndStop("attack");
break;
case UnitStateFactory.STAND:
_currentAction = stand;
break;
case UnitStateFactory.FAINT:
_faintTime = 0;
if ((((_faintInterval <= 0)) || ((this._state == UnitStateFactory.DIE)))){
return;
};
addFaintEffect();
_currentAction = faint;
this.gotoAndStop("move");
if (((_ammo) && (!(_ammo.sparateWithUnit)))){
_ammo.clear();
};
break;
case UnitStateFactory.FADEOUT:
_currentAction = fadeOut;
_disappearing = true;
break;
case UnitStateFactory.CHEER:
clearFaint();
_currentAction = stand;
this.gotoAndPlay("cheer");
break;
case UnitStateFactory.SILENT_DIE:
silentDie();
_currentAction = stand;
break;
};
}
private function dispose(){
this.stop();
this.removeEventListener(GameVariables.SHOOTING, shoot);
this.removeEventListener(GameVariables.SHOOTED, shooted);
this.removeEventListener(GameVariables.DEAD, dieAnimationFinished);
pause();
clearFaint();
clearBloodBar();
clearSound();
}
public function get initAmmoY():Number{
return (_initAmmoY);
}
public function resume():void{
this.addEventListener(Event.ENTER_FRAME, enterframeHandle);
if (this._disappearing == false){
this.play();
};
}
protected function shoot(_arg1):void{
this.removeEventListener("shoot", shoot);
if (_ammo){
};
var _local2:AbstractAmmo = (_ammo = AmmoFactory.getAmmo(_ammoName, this, _target));
_lane.addAmmo(_local2);
if (_fireSound != null){
_fireSound.resume();
//unresolved jump
};
this.state = UnitStateFactory.STAND;
}
public function get endAmmoX():Number{
var _local1 = 1;
if ((this._group == UnitGroup.GROUP_ENEMY)){
_local1 = -1;
} else {
_local1 = 1;
};
return ((_endAmmoX * _local1));
}
public function set target(_arg1:AbstractUnit):void{
_target = _arg1;
}
private function fadeOut(){
if (GameVariables.LEAVE_BODY == false){
this.alpha = (this.alpha - 0.01);
if ((this.alpha <= 0)){
clear();
//unresolved jump
};
} else {
dispose();
};
}
public function clearBloodBar(_arg1=null){
if (_bloodBar){
_bloodBar.clear();
_bloodBar = null;
};
}
public function get unitName():String{
return (_unitName);
}
public function get endAmmoY():Number{
return (_endAmmoY);
}
public function get unitH():Number{
return (_unitH);
}
private function startAttack(){
if (((!(_attacking)) && (((_coolingTime = (_coolingTime + ((1 * _coolingModulus) * GameVariables.GAME_SPD))) >= _attackInterval)))){
attacking();
_coolingTime = 0;
};
findTarget();
}
private function faint():void{
if ((_faintTime = (_faintTime + (1 * GameVariables.GAME_SPD))) > _faintInterval){
state = UnitStateFactory.ATTACK;
clearFaint();
};
}
public function clear():void{
dispose();
if (this.parent.root){
this.parent.removeChild(this);
//unresolved jump
};
}
public function get unitW():Number{
return (_unitW);
}
public function get dead():Boolean{
return (_dead);
}
public function get originalLife():Number{
return (_originalLife);
}
protected function dieAnimationFinished(_arg1):void{
this.removeEventListener(GameVariables.DEAD, dieAnimationFinished);
state = UnitStateFactory.FADEOUT;
}
public function addBloodBar(_arg1=null):void{
clearBloodBar();
_bloodBar = new BloodBar(this);
this.parent.addChild(_bloodBar);
}
public function get group():int{
return (_group);
}
protected function die():void{
var _local1:AbstractEffect = EffectFactory.getEffect(_dieEffectName, this.x, this.y);
_lane.addEffect(_local1);
if (_dieSound){
_dieSound.resume();
//unresolved jump
};
dispatchEvent(new Event(DIE));
_currentAction = stand;
clearFaint();
clearBloodBar();
this.mouseEnabled = false;
this.mouseChildren = false;
_dead = true;
this.addEventListener(GameVariables.DEAD, dieAnimationFinished);
this.gotoAndPlay(FallFactory.getFall(this._damageAmmo));
if (damageAmmo == AmmoFactory.MOLOTOV){
this.filters = [new ColorMatrixFilter(ChangeColor.getSaturationArray(1))];
};
}
public function set coolingModulus(_arg1:Number){
_coolingModulus = _arg1;
}
public function get target():AbstractUnit{
return (_target);
}
public function get direction():int{
return (_direction);
}
private function attacking():void{
this.addEventListener(GameVariables.SHOOTING, shoot);
this.addEventListener(GameVariables.SHOOTED, shooted);
this.gotoAndPlay("attack");
_attacking = true;
}
public function addFaintEffect():void{
clearFaint();
_faintEffect = new FaintEffect(this.x, (this.y - this.height));
this.parent.addChild(_faintEffect);
}
private function findTarget(){
var _local1:* = TargetScaner.findTarget(this);
_target = _local1;
if (_target != null){
state = UnitStateFactory.ATTACK;
} else {
state = UnitStateFactory.MOVE;
};
}
private function checkIsOut(){
}
protected function checkIsCollide():void{
if (((((this._target) && (!(_dead)))) && ((this._target._dead == false)))){
if (((((this.x - this._unitW) < this._target.x)) && ((_group == UnitGroup.GROUP_ENEMY)))){
if (this.x >= ((BattleField.BATTLE_FIELD_WIDTH - Lane.START_POINT) - this._spd)){
return;
};
this.x = (this.x + (this._spd * GameVariables.GAME_SPD));
} else {
if (((((this.x + this._unitW) > this._target.x)) && ((_group == UnitGroup.GROUP_FRIEND)))){
if (this.x <= (this._spd + Lane.START_POINT)){
return;
};
this.x = (this.x - (this._spd * GameVariables.GAME_SPD));
};
};
};
}
public function set damageAmmo(_arg1:String){
_damageAmmo = _arg1;
}
public function changeLife(_arg1:Number, _arg2:String):void{
var _local3:Number;
if (dead == true){
return;
};
if (_unbeatable){
return;
};
dispatchEvent(new Event(LIFE_CHANGE));
_damageAmmo = _arg2;
if (this.group == GameVariables.HUMAN_GROUP){
_local3 = GameVariables.GIVE_UP_RATE;
} else {
_local3 = (1 / GameVariables.GIVE_UP_RATE);
};
this._life = (this._life + ((_arg1 * Restriction.HurtRate(this._unitName, _arg2)) * _local3));
if (this._life <= 0){
state = UnitStateFactory.DIE;
};
}
private function move():void{
this.x = (this.x + ((_direction * _spd) * GameVariables.GAME_SPD));
findTarget();
checkIsOut();
}
public function get rangeMin():Number{
return (_rangeMin);
}
private function stand():void{
}
private function clearSound(){
if (_dieSound != null){
_dieSound.clear();
_dieSound = null;
};
if (_fireSound != null){
_fireSound.clear();
_fireSound = null;
};
}
public function get damageAmmo():String{
return (_damageAmmo);
}
public function set lane(_arg1:Lane):void{
this._lane = _arg1;
}
private function changeEnemyCredit():void{
if (this.group == UnitGroup.GROUP_FRIEND){
GameVariables.PLAYER_ENEMY.changeCredit(this._credit);
} else {
GameVariables.PLAYER_FRIEND.changeCredit(this._credit);
};
}
protected function get ammo():AbstractAmmo{
return (_ammo);
}
public function get rangeMax():Number{
return (_rangeMax);
}
protected function silentDie():void{
var _local1:AbstractEffect = EffectFactory.getEffect(_dieEffectName, this.x, this.y);
_lane.addEffect(_local1);
dispatchEvent(new Event(DIE));
_currentAction = stand;
clearFaint();
clearBloodBar();
this.mouseEnabled = false;
this.mouseChildren = false;
_dead = true;
this.addEventListener(GameVariables.DEAD, dieAnimationFinished);
this.gotoAndPlay(FallFactory.getFall(this._damageAmmo));
if (damageAmmo == AmmoFactory.MOLOTOV){
this.filters = [new ColorMatrixFilter(ChangeColor.getSaturationArray(1))];
};
}
public function get lane():Lane{
return (_lane);
}
public function pause():void{
this.removeEventListener(Event.ENTER_FRAME, enterframeHandle);
this.stop();
}
public function betray():void{
if (this.dead){
return;
};
if (((_ammo) && (!(_ammo.sparateWithUnit)))){
_ammo.clear();
};
var _local1:Point = new Point(this.x, this.y);
dispatchEvent(new Event(DIE));
if (this._group == UnitGroup.GROUP_ENEMY){
group = UnitGroup.GROUP_FRIEND;
} else {
group = UnitGroup.GROUP_ENEMY;
};
this.lane.addUnit(this);
this.x = _local1.x;
this.y = _local1.y;
_attacking = false;
dispatchEvent(new Event(BETRAY));
}
}
}//package com.veltive.cityinvasion.units
import flash.display.*;
import flash.geom.*;
class ChangeColor {
private function ChangeColor(_arg1:DisplayObject, _arg2=0, _arg3=0, _arg4=0){
var _local5:ColorTransform = _arg1.transform.colorTransform;
_local5.redOffset = _arg2;
_local5.greenOffset = _arg3;
_local5.blueOffset = _arg4;
_arg1.transform.colorTransform = _local5;
}
public static function getSaturationArray(_arg1:Number):Array{
var _local2:Number = 0.3086;
var _local3:Number = 0.6094;
var _local4:Number = 0.082;
var _local5:Number = (((1 - _arg1) * _local2) + _arg1);
var _local6:Number = ((1 - _arg1) * _local3);
var _local7:Number = ((1 - _arg1) * _local4);
var _local8:Number = ((1 - _arg1) * _local2);
var _local9:Number = (((1 - _arg1) * _local3) + _arg1);
var _local10:Number = ((1 - _arg1) * _local4);
var _local11:Number = ((1 - _arg1) * _local2);
var _local12:Number = ((1 - _arg1) * _local3);
var _local13:Number = (((1 - _arg1) * _local4) + _arg1);
return ([_local5, _local6, _local7, 0, 0, _local8, _local9, _local10, 0, 0, _local11, _local12, _local13, 0, 0, 0, 0, 0, 1, 0]);
}
}
Section 86
//BloodBar (com.veltive.cityinvasion.units.BloodBar)
package com.veltive.cityinvasion.units {
import flash.events.*;
import flash.display.*;
import com.veltive.cityinvasion.*;
public class BloodBar extends Sprite implements IGameObject {
private var _unit:AbstractUnit;
private var _bar:Sprite;
public static const H = 3;
public static const W = 15;
public function BloodBar(_arg1:AbstractUnit):void{
_unit = _arg1;
_unit.addEventListener(AbstractUnit.LIFE_CHANGE, showBlood);
this.addEventListener(Event.ADDED_TO_STAGE, added);
this.addEventListener(Event.ENTER_FRAME, enterframe);
draw();
showBlood(null);
}
private function added(_arg1){
this.x = (((-(this.width) / 2) * this.scaleX) + _unit.x);
this.y = ((-(_unit.unitH) - 8) + _unit.y);
}
private function draw(){
_bar = new Sprite();
addChild(_bar);
_bar.graphics.lineStyle(1, 0, 0);
_bar.graphics.beginFill(0x33CC00, 1);
_bar.graphics.drawRect(0, 0, W, H);
_bar.graphics.endFill();
var _local1:Shape = new Shape();
addChild(_local1);
_local1.graphics.lineStyle(0.1, 0);
_local1.graphics.drawRect(0, 0, W, H);
}
private function showBlood(_arg1){
var _local2:Number = (_unit.life / _unit.originalLife);
if ((_local2 < 0)){
_local2 = 0;
//unresolved jump
};
_bar.scaleX = _local2;
var _local3:* = ((1 - _local2) * 0xFF);
}
public function clear():void{
_unit.removeEventListener(AbstractUnit.LIFE_CHANGE, showBlood);
this.removeEventListener(Event.ENTER_FRAME, enterframe);
this.removeEventListener(Event.ADDED_TO_STAGE, added);
_unit = null;
if (this.parent){
this.parent.removeChild(this);
};
}
private function enterframe(_arg1){
added(_arg1);
}
public function resume():void{
}
public function pause():void{
}
}
}//package com.veltive.cityinvasion.units
Section 87
//CivilianWithRock (com.veltive.cityinvasion.units.CivilianWithRock)
package com.veltive.cityinvasion.units {
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
public class CivilianWithRock extends AbstractUnit {
public function CivilianWithRock(_arg1:int){
var _local2:Object;
addFrameScript(17, frame18, 46, frame47, 55, frame56, 113, frame114, 155, frame156, 192, frame193, 226, frame227, 269, frame270, 317, frame318, 364, frame365, 408, frame409);
super(this);
group = _arg1;
_unitName = UnitFactory.CIVILIAN_WITH_ROCK;
_local2 = Attribute.getUnitAttribute(_unitName);
_spd = _local2._spd;
_rangeMax = (_local2._rangeMax + ((_local2._rangeMax / 6) * Math.random()));
_rangeMin = _local2._rangeMin;
_attackInterval = _local2._attackInterval;
_faintInterval = _local2._faintInterval;
_originalLife = (_life = _local2._life);
_credit = _local2._credit;
_ammoName = AmmoFactory.MOLOTOV;
_initAmmoX = 15;
_initAmmoY = -40;
resume();
}
function frame47(){
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).SHOOTING));
};
}
function frame365(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame18(){
gotoAndPlay("move");
}
function frame156(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame270(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame114(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame227(){
gotoAndPlay("cheer");
}
function frame318(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame193(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame56(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).SHOOTED));
};
}
function frame409(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
}
}//package com.veltive.cityinvasion.units
Section 88
//CopWithShield (com.veltive.cityinvasion.units.CopWithShield)
package com.veltive.cityinvasion.units {
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
public class CopWithShield extends AbstractUnit {
public function CopWithShield(_arg1:int){
var _local2:Object;
addFrameScript(21, frame22, 60, frame61, 74, frame75, 120, frame121, 166, frame167, 226, frame227, 251, frame252, 278, frame279, 330, frame331, 374, frame375, 421, frame422, 466, frame467);
super(this);
group = _arg1;
_unitName = UnitFactory.COP_WITH_SHIELD;
_local2 = Attribute.getUnitAttribute(_unitName);
_spd = _local2._spd;
_rangeMax = (this._unitW + 2);
_rangeMin = _local2._rangeMin;
_attackInterval = _local2._attackInterval;
_faintInterval = _local2._faintInterval;
_originalLife = (_life = _local2._life);
_credit = _local2._credit;
_ammoName = AmmoFactory.CLOSEWEAPON;
_initAmmoX = 15;
_initAmmoY = -40;
_fireSound = new GameSound(new CloseWapeonSound(), 1);
resume();
}
function frame252(){
gotoAndPlay("surrender");
}
function frame121(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame331(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame167(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame279(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame61(){
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).SHOOTING));
};
}
function frame227(){
gotoAndPlay("cheer");
}
function frame75(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).SHOOTED));
};
}
function frame22(){
gotoAndPlay("move");
}
function frame422(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame467(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame375(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
}
}//package com.veltive.cityinvasion.units
Section 89
//CopWithShotgun (com.veltive.cityinvasion.units.CopWithShotgun)
package com.veltive.cityinvasion.units {
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
public class CopWithShotgun extends AbstractUnit {
public function CopWithShotgun(_arg1:int){
var _local2:Object;
addFrameScript(17, frame18, 41, frame42, 70, frame71, 94, frame95, 132, frame133, 170, frame171, 198, frame199, 219, frame220, 263, frame264, 307, frame308, 351, frame352, 400, frame401, 448, frame449);
super(this);
group = _arg1;
_unitName = UnitFactory.COP_WITH_SHOTGUN;
_local2 = Attribute.getUnitAttribute(_unitName);
_spd = _local2._spd;
_rangeMax = (_local2._rangeMax + ((_local2._rangeMax / 6) * Math.random()));
_rangeMin = _local2._rangeMin;
_attackInterval = _local2._attackInterval;
_faintInterval = _local2._faintInterval;
_originalLife = (_life = _local2._life);
_credit = _local2._credit;
_ammoName = AmmoFactory.RIFLE;
_initAmmoX = 15;
_initAmmoY = -40;
_fireSound = new GameSound(new RifleSound(), 1);
resume();
}
function frame352(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame199(){
gotoAndStop("wating");
}
function frame71(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).SHOOTED));
};
}
function frame401(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame95(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame264(){
gotoAndPlay("surrender");
}
function frame42(){
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).SHOOTING));
};
}
function frame449(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame308(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame220(){
gotoAndPlay("cheer");
}
function frame18(){
gotoAndPlay("move");
}
function frame133(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame171(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
}
}//package com.veltive.cityinvasion.units
Section 90
//FallFactory (com.veltive.cityinvasion.units.FallFactory)
package com.veltive.cityinvasion.units {
import com.veltive.cityinvasion.ammos.*;
public class FallFactory {
public static function getFall(_arg1:String):String{
switch (_arg1){
case AmmoFactory.CLOSEWEAPON:
case AmmoFactory.STONE:
case null:
return ("die1");
case AmmoFactory.BULLET:
return ("die2");
case AmmoFactory.RIFLE:
return ("die3");
case AmmoFactory.MOLOTOV:
return ("die5");
case AmmoFactory.EXTEND_AMMO:
case AmmoFactory.TIME_BOMB:
case AmmoFactory.ROCKET:
case AmmoFactory.EXPLODE_SUICIDE_CAR:
return ("die4");
case AmmoFactory.LASER:
return ("die6");
case AmmoFactory.BOLT:
return ("die7");
};
return ("die1");
}
}
}//package com.veltive.cityinvasion.units
Section 91
//FlyRobot (com.veltive.cityinvasion.units.FlyRobot)
package com.veltive.cityinvasion.units {
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import com.veltive.cityinvasion.*;
public class FlyRobot extends AbstractUnit {
private var waitTime;// = 75
private var waitTimeLeft;
public function FlyRobot(_arg1:int){
var _local2:Object;
waitTimeLeft = waitTime;
addFrameScript(14, frame15, 34, frame35, 38, frame39, 91, frame92, 119, frame120);
super(this);
group = _arg1;
_unitName = UnitFactory.FLY_ROBOT;
_local2 = Attribute.getUnitAttribute(_unitName);
_spd = _local2._spd;
_rangeMax = (_local2._rangeMax + ((_local2._rangeMax / 6) * Math.random()));
_rangeMin = _local2._rangeMin;
_attackInterval = _local2._attackInterval;
_faintInterval = _local2._faintInterval;
_originalLife = (_life = _local2._life);
_credit = _local2._credit;
_unitH = 45;
_ammoName = AmmoFactory.SHORT_LASER;
_initAmmoX = 10;
_initAmmoY = -20;
_fireSound = new GameSound(new ShortLaserSound(), 1);
_dieSound = new GameSound(new ExplodeSound2());
_unbeatable = true;
this.visible = false;
resume();
}
override protected function die():void{
super.die();
this.gotoAndPlay("die1");
}
function frame92(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame35(){
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).SHOOTING));
};
}
function frame15(){
gotoAndPlay("move");
}
override protected function subFuc():void{
if (waitTimeLeft > 0){
waitTimeLeft--;
state = UnitStateFactory.STAND;
} else {
if (waitTimeLeft == 0){
this.visible = true;
waitTimeLeft = -10;
_unbeatable = false;
state = UnitStateFactory.MOVE;
};
};
if (GameVariables.IN_BATTLE == false){
state = UnitStateFactory.DIE;
};
}
override protected function dieAnimationFinished(_arg1):void{
super.dieAnimationFinished(_arg1);
this.visible = false;
}
function frame39(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).SHOOTED));
};
}
function frame120(){
gotoAndPlay("cheer");
}
}
}//package com.veltive.cityinvasion.units
Section 92
//Headquarters (com.veltive.cityinvasion.units.Headquarters)
package com.veltive.cityinvasion.units {
import com.veltive.cityinvasion.utils.*;
import com.veltive.cityinvasion.*;
public class Headquarters extends AbstractUnit {
public function Headquarters(_arg1:int){
super(this);
group = _arg1;
_unitName = UnitFactory.HEADQUARTERS;
_spd = 0;
_rangeMax = 300;
_rangeMax = (_rangeMax + ((_rangeMax / 6) * Math.random()));
_rangeMin = 0;
_attackInterval = 30;
_faintInterval = 0;
_originalLife = (_life = 500);
_ammoName = null;
_credit = 50;
_initAmmoX = 15;
_initAmmoY = -15;
_endAmmoX = 0;
_endAmmoY = 0;
resume();
}
override public function changeLife(_arg1:Number, _arg2:String):void{
var _local3:Number;
damageAmmo = _arg2;
if (this.group == GameVariables.HUMAN_GROUP){
_local3 = GameVariables.GIVE_UP_RATE;
} else {
_local3 = (1 / GameVariables.GIVE_UP_RATE);
};
_arg1 = ((_arg1 * Restriction.HurtRate(this.unitName, _arg2)) * _local3);
changePlayerLife(_arg1);
}
final private function changePlayerLife(_arg1):void{
if (this.group == UnitGroup.GROUP_ENEMY){
GameVariables.PLAYER_ENEMY.changeLife(_arg1);
} else {
GameVariables.PLAYER_FRIEND.changeLife(_arg1);
};
}
}
}//package com.veltive.cityinvasion.units
Section 93
//IUnit (com.veltive.cityinvasion.units.IUnit)
package com.veltive.cityinvasion.units {
import com.veltive.cityinvasion.*;
public interface IUnit extends IGameObject {
function set state(_arg1:int):void;
function changeLife(_arg1:Number, _arg2:String):void;
function set group(_arg1:int):void;
}
}//package com.veltive.cityinvasion.units
Section 94
//Robot (com.veltive.cityinvasion.units.Robot)
package com.veltive.cityinvasion.units {
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import com.veltive.cityinvasion.*;
public class Robot extends AbstractUnit {
public function Robot(_arg1:int){
var _local2:Object;
addFrameScript(22, frame23, 60, frame61, 67, frame68, 154, frame155, 247, frame248);
super(this);
group = _arg1;
_unitName = UnitFactory.ROBOT;
_local2 = Attribute.getUnitAttribute(_unitName);
_spd = _local2._spd;
_rangeMax = (_local2._rangeMax + ((_local2._rangeMax / 6) * Math.random()));
_rangeMin = _local2._rangeMin;
_attackInterval = _local2._attackInterval;
_faintInterval = _local2._faintInterval;
_originalLife = (_life = _local2._life);
_credit = _local2._credit;
_unitH = 45;
_ammoName = AmmoFactory.LASER;
_initAmmoX = 10;
_initAmmoY = -26;
_fireSound = new GameSound(new LaserSound(), 1);
_dieSound = new GameSound(new ExplodeSound2());
resume();
}
override protected function die():void{
super.die();
this.gotoAndPlay("die1");
var _local1:AbstractUnit = Command.addUnit(UnitFactory.FLY_ROBOT, this.group, this.lane.dex);
_local1.x = (this.x - 5);
_local1.y = this.y;
var _local2:AbstractUnit = Command.addUnit(UnitFactory.FLY_ROBOT, this.group, this.lane.dex);
_local2.x = (_local1.x - (this.direction * 10));
_local2.y = this.y;
}
function frame155(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
override protected function dieAnimationFinished(_arg1):void{
super.dieAnimationFinished(_arg1);
this.visible = false;
}
function frame61(){
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).SHOOTING));
};
}
function frame248(){
gotoAndPlay("cheer");
}
function frame23(){
gotoAndPlay("move");
}
function frame68(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).SHOOTED));
};
}
}
}//package com.veltive.cityinvasion.units
Section 95
//RocketSoldier (com.veltive.cityinvasion.units.RocketSoldier)
package com.veltive.cityinvasion.units {
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
public class RocketSoldier extends AbstractUnit {
public function RocketSoldier(_arg1:int){
var _local2:Object;
addFrameScript(17, frame18, 43, frame44, 67, frame68, 99, frame100, 132, frame133, 156, frame157, 189, frame190, 227, frame228, 273, frame274, 319, frame320, 364, frame365);
super(this);
group = _arg1;
_unitName = UnitFactory.ROCKET_SOLIDER;
_local2 = Attribute.getUnitAttribute(_unitName);
_spd = _local2._spd;
_rangeMax = (_local2._rangeMax + ((_local2._rangeMax / 6) * Math.random()));
_rangeMin = _local2._rangeMin;
_attackInterval = _local2._attackInterval;
_faintInterval = _local2._faintInterval;
_originalLife = (_life = _local2._life);
_credit = _local2._credit;
_ammoName = AmmoFactory.ROCKET;
_initAmmoX = 15;
_initAmmoY = -30;
_fireSound = new GameSound(new RocketSound(), 1);
resume();
}
function frame320(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame190(){
gotoAndPlay("cheer");
}
function frame133(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame365(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame157(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame274(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame228(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame18(){
gotoAndPlay("move");
}
function frame100(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame44(){
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).SHOOTING));
};
}
function frame68(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).SHOOTED));
};
}
}
}//package com.veltive.cityinvasion.units
Section 96
//Sniper (com.veltive.cityinvasion.units.Sniper)
package com.veltive.cityinvasion.units {
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
public class Sniper extends AbstractUnit {
public function Sniper(_arg1:int){
var _local2:Object;
addFrameScript(17, frame18, 51, frame52, 77, frame78, 125, frame126, 165, frame166, 191, frame192, 230, frame231, 262, frame263, 304, frame305, 351, frame352, 409, frame410, 454, frame455);
super(this);
group = _arg1;
_unitName = UnitFactory.SNIPER;
_local2 = Attribute.getUnitAttribute(_unitName);
_spd = _local2._spd;
_rangeMax = (_local2._rangeMax + ((_local2._rangeMax / 6) * Math.random()));
_rangeMin = _local2._rangeMin;
_attackInterval = _local2._attackInterval;
_faintInterval = _local2._faintInterval;
_originalLife = (_life = _local2._life);
_credit = _local2._credit;
_ammoName = AmmoFactory.BULLET;
_initAmmoX = 40;
_initAmmoY = -23;
_fireSound = new GameSound(new BulletSound(), 1);
resume();
}
function frame263(){
gotoAndPlay("cheer");
}
function frame231(){
gotoAndPlay("wating");
}
function frame166(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame410(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame455(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame126(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame352(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame305(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame78(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).SHOOTED));
};
}
function frame52(){
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).SHOOTING));
};
}
function frame18(){
gotoAndPlay("move");
}
function frame192(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
}
}//package com.veltive.cityinvasion.units
Section 97
//SuicideCar (com.veltive.cityinvasion.units.SuicideCar)
package com.veltive.cityinvasion.units {
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.effects.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import com.veltive.cityinvasion.*;
public class SuicideCar extends AbstractUnit {
public function SuicideCar(_arg1:int){
var _local2:Object;
addFrameScript(32, frame33, 94, frame95, 118, frame119);
super(this);
group = _arg1;
_unitName = UnitFactory.SUICIDE_CAR;
_local2 = Attribute.getUnitAttribute(_unitName);
_spd = _local2._spd;
_rangeMax = (_local2._rangeMax + ((_local2._rangeMax / 6) * Math.random()));
_rangeMin = _local2._rangeMin;
_attackInterval = _local2._attackInterval;
_faintInterval = _local2._faintInterval;
_originalLife = (_life = _local2._life);
_credit = _local2._credit;
_ammoName = AmmoFactory.EXPLODE_SUICIDE_CAR;
_initAmmoX = 40;
_initAmmoY = -23;
_endAmmoX = 40;
_dieSound = new GameSound(new ExplodeSound2());
resume();
}
override protected function die():void{
super.die();
this.gotoAndPlay("die1");
target = this;
shoot(null);
Command.shack();
}
override protected function subFuc():void{
var _local3:*;
var _local1:Array = this.lane.getEnemyArr(this);
var _local2:* = 0;
while (_local2 < _local1.length) {
_local3 = _local1[_local2];
if (dead == true){
return;
};
if (this.group == UnitGroup.GROUP_FRIEND){
if ((this.x + this.initAmmoX) > (_local3.endAmmoX + _local3.x)){
collide(_local3);
break;
};
} else {
if ((this.x + this.initAmmoX) < (_local3.endAmmoX + _local3.x)){
collide(_local3);
break;
};
};
_local2++;
};
}
private function dieHandle(_arg1){
this.removeEventListener(DIE, dieHandle);
}
function frame95(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame119(){
stop();
}
function frame33(){
gotoAndPlay("move");
}
private function collide(_arg1):void{
target = _arg1;
shoot(null);
changeLife(-1000000000, this.ammo.ammoName);
}
}
}//package com.veltive.cityinvasion.units
Section 98
//Tank (com.veltive.cityinvasion.units.Tank)
package com.veltive.cityinvasion.units {
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import com.veltive.cityinvasion.*;
public class Tank extends AbstractUnit {
private var waitTime;// = 75
private var waitTimeLeft;
public function Tank(_arg1:int){
var _local2:Object;
waitTimeLeft = waitTime;
addFrameScript(35, frame36, 73, frame74, 78, frame79, 132, frame133, 209, frame210);
super(this);
group = _arg1;
_unitName = UnitFactory.TANK;
_local2 = Attribute.getUnitAttribute(_unitName);
_spd = _local2._spd;
_rangeMax = (_local2._rangeMax + ((_local2._rangeMax / 6) * Math.random()));
_rangeMin = _local2._rangeMin;
_attackInterval = _local2._attackInterval;
_faintInterval = _local2._faintInterval;
_originalLife = (_life = _local2._life);
_credit = _local2._credit;
_unitH = 45;
_ammoName = AmmoFactory.BOLT;
_initAmmoX = 0;
_initAmmoY = -35;
_endAmmoX = 30;
_endAmmoY = -10;
_fireSound = new GameSound(new BoltSound(), 1);
_dieSound = new GameSound(new ExplodeSound2());
resume();
this.mouseChildren = false;
this.mouseEnabled = false;
}
override protected function die():void{
super.die();
this.gotoAndPlay("die1");
Command.shack();
}
function frame36(){
gotoAndPlay("move");
}
function frame74(){
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).SHOOTING));
};
}
function frame133(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame210(){
gotoAndPlay("cheer1");
}
function frame79(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).SHOOTED));
};
}
}
}//package com.veltive.cityinvasion.units
Section 99
//UnitFactory (com.veltive.cityinvasion.units.UnitFactory)
package com.veltive.cityinvasion.units {
public class UnitFactory {
public static const CIVILIAN_WITH_ROCK:String = "CivilianWithRock";
public static const SUICIDE_CAR = "suicide car";
public static const FLY_ROBOT = "fly robot";
public static const HEADQUARTERS = "headquarters";
public static const COP_WITH_SHOTGUN:String = "CivilianWithShotgun";
public static const ROBOT = "robot";
public static const ROCKET_SOLIDER = "rocket solider";
public static const COP_WITH_SHIELD:String = "CivilianWithShield";
public static const SNIPER:String = "sniper";
public static const TANK = "tank";
public static const YURI = "yuri";
public static function getUnit(_arg1:String, _arg2:int):AbstractUnit{
switch (_arg1){
case CIVILIAN_WITH_ROCK:
return (new CivilianWithRock(_arg2));
case COP_WITH_SHIELD:
return (new CopWithShield(_arg2));
case SNIPER:
return (new Sniper(_arg2));
case HEADQUARTERS:
return (new Headquarters(_arg2));
case COP_WITH_SHOTGUN:
return (new CopWithShotgun(_arg2));
case ROCKET_SOLIDER:
return (new RocketSoldier(_arg2));
case ROBOT:
return (new Robot(_arg2));
case FLY_ROBOT:
return (new FlyRobot(_arg2));
case TANK:
return (new Tank(_arg2));
case SUICIDE_CAR:
return (new SuicideCar(_arg2));
case YURI:
return (new Yuri(_arg2));
};
return (null);
}
}
}//package com.veltive.cityinvasion.units
Section 100
//UnitGroup (com.veltive.cityinvasion.units.UnitGroup)
package com.veltive.cityinvasion.units {
public class UnitGroup {
public static const GROUP_ENEMY:int = 2;
public static const GROUP_FRIEND:int = 1;
}
}//package com.veltive.cityinvasion.units
Section 101
//UnitStateFactory (com.veltive.cityinvasion.units.UnitStateFactory)
package com.veltive.cityinvasion.units {
public class UnitStateFactory {
public static const DIE = 4;
public static const ATTACK = 2;
public static const CHEER = 8;
public static const MOVE = 1;
public static const FADEOUT = 7;
public static const FAINT = 5;
public static const STAND = 3;
public static const OTHER = 6;
public static const WATING = 9;
public static const SILENT_DIE = 10;
}
}//package com.veltive.cityinvasion.units
Section 102
//Yuri (com.veltive.cityinvasion.units.Yuri)
package com.veltive.cityinvasion.units {
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import com.veltive.cityinvasion.effects.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
public class Yuri extends AbstractUnit {
public function Yuri(_arg1:int){
var _local2:Object;
addFrameScript(16, frame17, 44, frame45, 50, frame51, 77, frame78, 103, frame104, 132, frame133, 164, frame165, 210, frame211, 254, frame255, 303, frame304, 351, frame352);
super(this);
group = _arg1;
_unitName = UnitFactory.YURI;
_local2 = Attribute.getUnitAttribute(_unitName);
_spd = _local2._spd;
_rangeMax = (_local2._rangeMax + ((_local2._rangeMax / 6) * Math.random()));
_rangeMin = _local2._rangeMin;
_attackInterval = _local2._attackInterval;
_faintInterval = _local2._faintInterval;
_originalLife = (_life = _local2._life);
_credit = _local2._credit;
_ammoName = AmmoFactory.MIND;
_initAmmoX = 8;
_initAmmoY = -30;
_dieSound = new GameSound(new ExplodeSound2());
resume();
this.mouseChildren = false;
this.mouseEnabled = false;
}
function frame304(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame165(){
gotoAndPlay("cheer");
}
function frame17(){
gotoAndPlay("move");
}
function frame133(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame45(){
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).SHOOTING));
};
}
function frame104(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame51(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).SHOOTED));
};
}
function frame352(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame211(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame255(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
function frame78(){
stop();
if (this.root){
dispatchEvent(new Event(MovieClip(this.root).DEAD));
};
}
}
}//package com.veltive.cityinvasion.units
Section 103
//AI (com.veltive.cityinvasion.utils.AI)
package com.veltive.cityinvasion.utils {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ui.*;
import com.veltive.cityinvasion.battlefield.*;
import com.veltive.cityinvasion.player.*;
import flash.events.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
import flash.utils.*;
public class AI implements IGameObject {
private var _timer:Timer;
private var _controler:Controler;
private var _cheating;// = true
private var _dex;// = 0
private var _cheatTimeLeft;
private var _safeLaneNum:int;// = 0
private var _cheatInterval;// = 30
public static var _ai:AI;
public function AI(){
_cheatTimeLeft = _cheatInterval;
super();
_controler = new Controler();
_timer = new Timer(100);
_timer.addEventListener(TimerEvent.TIMER, tick);
}
private function getTargetEnemy(_arg1){
if (this._controler.group != UnitGroup.GROUP_FRIEND){
return (_arg1.targetFriend);
};
return (_arg1.targetEnemy);
}
private function getTargetFriend(_arg1){
if (this._controler.group == UnitGroup.GROUP_FRIEND){
return (_arg1.targetFriend);
};
return (_arg1.targetEnemy);
}
public function get controler():Controler{
return (_controler);
}
public function clear():void{
pause();
_controler.clear();
}
private function AICheat(_arg1){
var _local3:Lane;
var _local4:AbstractUnit;
var _local5:*;
var _local6:int;
if (GameVariables.LEVEL <= 3){
return;
};
var _local2:* = 0;
for (;_local2 < _arg1.length;Command.addRush(_local5, this._controler.group, _local3.dex, _local6), _local2++) {
_local3 = _arg1[_local2];
_local4 = getTargetEnemy(_local3);
_local5 = Restriction.getFavoured(_local4.unitName);
if (_local5 == null){
_local5 = _controler.btnArr[int((Math.random() * _controler.btnArr.length))].unitName;
};
//unresolved if
_local6 = int(((GameVariables.LEVEL + 1) / 2));
if ((_safeLaneNum <= (5 - _local6))){
_local6 = 0;
continue;
};
};
}
private function getHighRiskLane(_arg1:Array):int{
var _local5:Lane;
if (_arg1.length < 1){
return (int((Math.random() * GameVariables.LANES_NUM)));
};
var _local2:* = 0;
var _local3:* = _arg1[int((Math.random() * _arg1.length))];
var _local4:* = 0;
while (_local4 < _arg1.length) {
_local5 = _arg1[_local4];
if (_local5.getFriendArr(GameVariables.HUMAN_GROUP).length > _local2){
_local3 = _local5;
_local2 = _local5.getFriendArr(GameVariables.HUMAN_GROUP).length;
};
_local4++;
};
return (_local3.dex);
}
private function tick(_arg1){
var _local5:ProduceBtn;
if (this._controler.playerData.life < PlayerData.PLAYER_LIFE){
_cheating = true;
} else {
_cheating = false;
};
var _local2:Array = _controler.btnArr;
var _local3:Boolean = ProduceBtn(_local2[_dex]).produceOrder();
if (_local3 == true){
_dex++;
if ((((((_local2[_dex] == null)) || ((_dex > (_local2.length - 1))))) || ((_local2[_dex].activated == false)))){
_dex = 0;
};
};
if (_cheatTimeLeft-- <= 0){
_cheatTimeLeft = _cheatInterval;
produce(null);
};
var _local4:* = 0;
while (_local4 < _controler.sBtnArr.length) {
_local5 = ProduceBtn(_controler.sBtnArr[_local4]);
ProduceBtn(_local5).produceOrder();
_local4++;
};
}
private function produce(_arg1){
var _local7:Lane;
var _local8:AbstractUnit;
var _local9:AbstractUnit;
var _local2:BattleField = BattleField.getInstance();
var _local3:Array = _local2.lanes;
var _local4:* = [];
var _local5:* = [];
var _local6:* = 0;
while (_local6 < _local3.length) {
_local7 = _local3[_local6];
_local8 = getTargetFriend(_local7);
_local9 = getTargetEnemy(_local7);
if ((((_local8 is Headquarters)) && (!((_local9 is Headquarters))))){
_local4.push(_local7);
} else {
if ((_local9 is Headquarters)){
_local5.push(_local7);
};
};
_local6++;
};
if (_local4.length < 1){
GameVariables.LANE_DEX_AI = getHighRiskLane(_local3);
} else {
GameVariables.LANE_DEX_AI = getHighRiskLane(_local4);
};
_safeLaneNum = _local5.length;
if (_cheating){
AICheat(_local4);
};
}
public function start(){
_dex = 0;
resume();
}
public function resume():void{
_controler.resume();
_timer.start();
}
public function pause():void{
_timer.stop();
_controler.pause();
}
public static function getInstance():AI{
if (_ai == null){
_ai = new (AI);
};
return (_ai);
}
}
}//package com.veltive.cityinvasion.utils
Section 104
//AI_TUTO (com.veltive.cityinvasion.utils.AI_TUTO)
package com.veltive.cityinvasion.utils {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ui.*;
import com.veltive.cityinvasion.battlefield.*;
import gs.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
import flash.utils.*;
import gs.easing.*;
import com.veltive.cityinvasion.pages.*;
import flash.system.*;
import flash.filters.*;
public class AI_TUTO implements IGameObject {
private var _timer:Timer;
private var _controler:Controler;
private var _currentTween:TweenLite;
private var _box;
private var _dex;// = 0
private var _tweenGroup:TweenGroup;
private var toMc:MovieClip;
private var _skip_btn:MyButton;
public static const PAGE_NAME = "tutopage";
public static var _ai:AI_TUTO;
public static var showSkip:Boolean = false;
public function AI_TUTO(){
_controler = new Controler();
_timer = new Timer(100);
_timer.addEventListener(TimerEvent.TIMER, tick);
}
private function step5(_arg1){
var close:Function;
var e = _arg1;
close = function (_arg1){
step6(null);
};
Controler(GamePage.getInstance().ControlerMc).enable = false;
toMc.gotoAndStop(6);
e.currentTarget.removeEventListener(AbstractUnit.DIE, step5);
var box:* = new MsBox();
box.btn.label = LanguageManager.getStr(ScorePage.PAGE_NAME, "continue");
box.visible = false;
_box = box;
box.message = LanguageManager.getStr(PAGE_NAME, "step5");
GameVariables.STAGE.addChild(box);
box.addEventListener(Event.CLOSE, close);
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).btnArr[0]).clickable = true;
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).btnArr[1]).clickable = true;
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).btnArr[2]).clickable = true;
}
public function start(){
_dex = 0;
resume();
begin();
GameVariables.GIVE_UP_RATE = 1;
}
private function skipHandle(_arg1){
var yesHandle:Function;
var e = _arg1;
yesHandle = function (_arg1){
GamePage.getInstance().skip(_arg1);
_skip_btn.removeEventListener(MouseEvent.CLICK, skipHandle);
};
var cPage:ChoosePage = ChoosePage.getInstance();
GameVariables.STAGE.addChild(cPage);
cPage.appear();
cPage.addEventListener(ChoosePage.YES, yesHandle);
}
public function get controler():Controler{
return (_controler);
}
public function clear():void{
pause();
_controler.clear();
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).btnArr[0]).clickable = true;
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).btnArr[1]).clickable = true;
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).btnArr[2]).clickable = true;
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).sBtnArr[0]).clickable = true;
try {
GameVariables.STAGE.removeChild(toMc);
toMc = null;
} catch(e) {
};
this.controler.playerData.invincible = false;
Controler(GamePage.getInstance().ControlerMc).playerData.invincible = false;
TweenLite.removeTween(_currentTween);
GameMenu.getInstance().retryBtn.enable = true;
if (((_box) && (_box.parent))){
_box.clear(null);
};
BattleField.getInstance().enableLane(true);
if (((_skip_btn) && (_skip_btn.parent))){
_skip_btn.parent.removeChild(_skip_btn);
};
}
private function fight(){
var _local1:Array = _controler.btnArr;
var _local2:Boolean = ProduceBtn(_local1[_dex]).produceOrder();
if (_local2 == true){
_dex++;
if ((((((_local1[_dex] == null)) || ((_dex > (_local1.length - 1))))) || ((_local1[_dex].activated == false)))){
_dex = 0;
};
};
}
private function step0_1(_arg1=null){
var close:Function;
var e = _arg1;
close = function (_arg1){
step1();
};
var box:* = new MsBox();
box.btn.label = LanguageManager.getStr(ScorePage.PAGE_NAME, "continue");
_box = box;
box.visible = false;
box.message = LanguageManager.getStr(PAGE_NAME, "step0_1");
GameVariables.STAGE.addChild(box);
box.addEventListener(Event.CLOSE, close);
}
public function set nothing(_arg1:Number){
}
public function get nothing():Number{
return (1);
}
private function tick(_arg1){
}
private function step0(){
var me:*;
var close:Function;
var glow:GlowFilter;
close = function (_arg1){
me.step0_1();
};
me = this;
toMc = new ToMc();
toMc.mouseChildren = false;
toMc.mouseEnabled = false;
GameVariables.STAGE.addChild(toMc);
if (showSkip){
_skip_btn = new MyButton(LanguageManager.getStr(PAGE_NAME, "st"));
GameVariables.STAGE.addChild(_skip_btn);
_skip_btn.type = 2;
_skip_btn.x = (GameVariables.STAGE_WIDTH - 150);
_skip_btn.y = 10;
glow = new GlowFilter();
_skip_btn.filters = [glow];
_skip_btn.addEventListener(MouseEvent.CLICK, skipHandle);
};
var box:* = new MsBox();
box.btn.label = LanguageManager.getStr(ScorePage.PAGE_NAME, "continue");
box.visible = false;
_box = box;
box.message = LanguageManager.getStr(PAGE_NAME, "step0");
GameVariables.STAGE.addChild(box);
Controler(GamePage.getInstance().ControlerMc).enable = false;
box.addEventListener(Event.CLOSE, close);
this.controler.playerData.invincible = true;
Controler(GamePage.getInstance().ControlerMc).playerData.invincible = true;
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).sBtnArr[0]).clickable = false;
}
private function step1(_arg1=null){
var show:Function;
var e = _arg1;
show = function (_arg1){
toMc.txt1.htmlText = LanguageManager.getStr(PAGE_NAME, "step1");
};
var unit:AbstractUnit = Command.addUnit(UnitFactory.CIVILIAN_WITH_ROCK, 2, 0);
unit.addEventListener(AbstractUnit.DIE, step2);
toMc.gotoAndStop(2);
var timer:TextTimer = new TextTimer(100, show);
GameVariables.STAGE.focus = GamePage.getInstance().ControlerMc;
BattleField.getInstance().setLaneDex(0);
BattleField.getInstance().enableLane(false);
Controler(GamePage.getInstance().ControlerMc).enable = true;
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).btnArr[0]).clickable = true;
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).btnArr[1]).clickable = false;
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).btnArr[2]).clickable = false;
}
private function step3(_arg1){
var show:Function;
var e = _arg1;
show = function (_arg1){
toMc.txt1.htmlText = LanguageManager.getStr(PAGE_NAME, "step3");
};
toMc.gotoAndStop(4);
var timer:TextTimer = new TextTimer(100, show);
Controler(GamePage.getInstance().ControlerMc).enable = true;
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).btnArr[0]).clickable = false;
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).btnArr[1]).clickable = true;
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).btnArr[2]).clickable = false;
}
private function step4(_arg1){
var show:Function;
var e = _arg1;
show = function (_arg1){
toMc.txt1.htmlText = LanguageManager.getStr(PAGE_NAME, "step4");
};
toMc.gotoAndStop(5);
var timer:TextTimer = new TextTimer(100, show);
e.currentTarget.removeEventListener(AbstractUnit.DIE, step4);
var unit:AbstractUnit = Command.addUnit(UnitFactory.COP_WITH_SHOTGUN, 2, 1);
unit.addEventListener(AbstractUnit.DIE, step5);
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).btnArr[0]).clickable = false;
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).btnArr[1]).clickable = false;
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).btnArr[2]).clickable = true;
}
private function begin(){
_currentTween = TweenLite.to(this, 2, {nothing:1, ease:null, onComplete:step0});
_tweenGroup = new TweenGroup([_currentTween]);
_tweenGroup.align = TweenGroup.ALIGN_START;
GameMenu.getInstance().retryBtn.enable = false;
}
private function step6(_arg1){
var show:Function;
var nextStep:Function;
var e = _arg1;
show = function (_arg1){
toMc.txt1.htmlText = LanguageManager.getStr(PAGE_NAME, "step6");
};
nextStep = function (_arg1){
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).sBtnArr[0]).removeEventListener(ProduceBtn.PRODUCE, nextStep);
step7();
};
GameVariables.STAGE.focus = GamePage.getInstance().ControlerMc;
Controler(GamePage.getInstance().ControlerMc).enable = true;
toMc.gotoAndStop(7);
var timer:TextTimer = new TextTimer(100, show);
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).sBtnArr[0]).clickable = true;
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).sBtnArr[0]).addEventListener(ProduceBtn.PRODUCE, nextStep);
}
private function step7(){
var show:Function;
show = function (_arg1){
toMc.txt1.htmlText = LanguageManager.getStr(PAGE_NAME, "step7");
};
toMc.gotoAndStop(8);
var timer:TextTimer = new TextTimer(100, show);
_currentTween = TweenLite.to(this, 8, {nothing:1, ease:null, onComplete:step8});
_tweenGroup = new TweenGroup([_currentTween]);
}
private function step8(){
var show:Function;
show = function (_arg1){
toMc.txt1.htmlText = LanguageManager.getStr(PAGE_NAME, "step8");
toMc.txt2.htmlText = LanguageManager.getStr(PAGE_NAME, "step8_1");
};
Controler(GamePage.getInstance().ControlerMc).enable = false;
toMc.gotoAndStop(9);
var timer:TextTimer = new TextTimer(100, show);
_currentTween = TweenLite.to(this, 15, {nothing:1, ease:null, onComplete:step9});
_tweenGroup = new TweenGroup([_currentTween]);
}
private function step2(_arg1){
var show:Function;
var nextStep:Function;
var e = _arg1;
show = function (_arg1){
toMc.txt1.htmlText = LanguageManager.getStr(PAGE_NAME, "step2");
toMc.txt2.htmlText = LanguageManager.getStr(PAGE_NAME, "step2_1");
};
nextStep = function (_arg1){
if (GameVariables.LANE_DEX == 4){
step3(null);
BattleField.getInstance().removeEventListener(BattleField.LANE_CHANGE, nextStep);
};
};
e.currentTarget.removeEventListener(AbstractUnit.DIE, step4);
var unit:AbstractUnit = Command.addUnit(UnitFactory.COP_WITH_SHIELD, 2, 4);
unit.addEventListener(AbstractUnit.DIE, step4);
toMc.gotoAndStop(3);
var timer:TextTimer = new TextTimer(100, show);
BattleField.getInstance().enableLane(true);
Controler(GamePage.getInstance().ControlerMc).enable = true;
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).btnArr[0]).clickable = false;
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).btnArr[1]).clickable = false;
ProduceBtn(Controler(GamePage.getInstance().ControlerMc).btnArr[2]).clickable = false;
BattleField.getInstance().addEventListener(BattleField.LANE_CHANGE, nextStep);
}
private function step10(){
var close:Function;
close = function (_arg1){
setp11();
};
toMc.gotoAndStop(11);
var box:* = new MsBox();
box.btn.label = LanguageManager.getStr(ScorePage.PAGE_NAME, "continue");
box.visible = false;
_box = box;
box.message = LanguageManager.getStr(PAGE_NAME, "step10");
GameVariables.STAGE.addChild(box);
box.addEventListener(Event.CLOSE, close);
}
private function step9(){
var show:Function;
show = function (_arg1){
toMc.txt1.htmlText = LanguageManager.getStr(PAGE_NAME, "step9");
};
toMc.gotoAndStop(10);
var timer:TextTimer = new TextTimer(100, show);
_currentTween = TweenLite.to(this, 8, {nothing:1, ease:null, onComplete:step9_1});
_tweenGroup = new TweenGroup([_currentTween]);
}
private function setp11(){
Controler(GamePage.getInstance().ControlerMc).enable = true;
this.controler.playerData.invincible = false;
GamePage.getInstance().exit(null);
}
private function step9_1(){
var close:Function;
close = function (_arg1){
step10();
};
toMc.gotoAndStop(11);
var box:* = new MsBox();
box.btn.label = LanguageManager.getStr(ScorePage.PAGE_NAME, "continue");
box.visible = false;
_box = box;
box.message = LanguageManager.getStr(PAGE_NAME, "step9_1");
GameVariables.STAGE.addChild(box);
box.addEventListener(Event.CLOSE, close);
}
public function resume():void{
_controler.resume();
if (_tweenGroup){
_tweenGroup.resume();
};
}
public function pause():void{
_timer.stop();
_controler.pause();
if (_tweenGroup){
_tweenGroup.pause();
};
}
public static function getInstance():AI_TUTO{
if (_ai == null){
_ai = new (AI_TUTO);
};
return (_ai);
}
}
}//package com.veltive.cityinvasion.utils
Section 105
//Attribute (com.veltive.cityinvasion.utils.Attribute)
package com.veltive.cityinvasion.utils {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ammos.*;
public class Attribute {
public static function getAmmoAttribute(_arg1:String):Object{
var _local2:Object = {};
switch (_arg1){
case AmmoFactory.MOLOTOV:
_local2._damage = 20;
_local2._spd = 20;
_local2._damageRange = 45;
_local2._hurtFriend = true;
_local2._stunProbability = 0;
return (_local2);
case AmmoFactory.CLOSEWEAPON:
_local2._damage = 15;
_local2._spd = 0;
_local2._damageRange = 0;
_local2._hurtFriend = false;
_local2._stunProbability = 0.1;
return (_local2);
case AmmoFactory.RIFLE:
_local2._damage = 25;
_local2._spd = 120;
_local2._damageRange = 45;
_local2._hurtFriend = false;
_local2._stunProbability = 0;
return (_local2);
case AmmoFactory.BULLET:
_local2._damage = 100;
_local2._spd = 120;
_local2._damageRange = 0;
_local2._hurtFriend = false;
_local2._stunProbability = 0;
return (_local2);
case AmmoFactory.ROCKET:
_local2._damage = 75;
_local2._spd = 2;
_local2._damageRange = 45;
_local2._hurtFriend = false;
_local2._stunProbability = 0;
return (_local2);
case AmmoFactory.EXPLODE:
_local2._damage = 250;
_local2._spd = 0;
_local2._damageRange = 62;
_local2._hurtFriend = true;
_local2._stunProbability = 0;
return (_local2);
case AmmoFactory.EXTEND_AMMO:
_local2._damage = 300;
_local2._spd = 0;
_local2._damageRange = 500;
_local2._hurtFriend = false;
_local2._stunProbability = 1;
return (_local2);
case AmmoFactory.MIND:
_local2._damage = 0;
_local2._spd = 0;
_local2._damageRange = 0;
_local2._hurtFriend = 0;
_local2._stunProbability = 0;
return (_local2);
case AmmoFactory.TIME_BOMB:
_local2._damage = 800;
_local2._spd = 0;
_local2._damageRange = 150;
_local2._hurtFriend = true;
_local2._stunProbability = 0;
return (_local2);
case AmmoFactory.LASER:
_local2._damage = 2;
_local2._spd = 65;
_local2._damageRange = 0;
_local2._hurtFriend = false;
_local2._stunProbability = 0;
return (_local2);
case AmmoFactory.SHORT_LASER:
_local2._damage = 8;
_local2._spd = 30;
_local2._damageRange = 0;
_local2._hurtFriend = false;
_local2._stunProbability = 0;
return (_local2);
case AmmoFactory.BOLT:
_local2._damage = 100;
_local2._spd = 0;
_local2._damageRange = 100;
_local2._hurtFriend = false;
_local2._stunProbability = 0;
return (_local2);
case AmmoFactory.EXPLODE_SUICIDE_CAR:
_local2._damage = 300;
_local2._spd = 0;
_local2._damageRange = 100;
_local2._hurtFriend = true;
_local2._stunProbability = 0;
return (_local2);
};
return (null);
}
public static function getUnitAttribute(_arg1:String):Object{
var _local2:* = {};
switch (_arg1){
case UnitFactory.CIVILIAN_WITH_ROCK:
_local2._spd = 3;
_local2._rangeMax = 250;
_local2._rangeMin = 0;
_local2._attackInterval = 5;
_local2._faintInterval = 55;
_local2._life = 100;
_local2._credit = 50;
return (_local2);
case UnitFactory.COP_WITH_SHIELD:
_local2._spd = 1.5;
_local2._rangeMax = 15;
_local2._rangeMin = 0;
_local2._attackInterval = 0;
_local2._faintInterval = 55;
_local2._life = 300;
_local2._credit = 50;
return (_local2);
case UnitFactory.COP_WITH_SHOTGUN:
_local2._spd = 3;
_local2._rangeMax = 150;
_local2._rangeMin = 0;
_local2._attackInterval = 5;
_local2._faintInterval = 55;
_local2._life = 100;
_local2._credit = 50;
return (_local2);
case UnitFactory.SNIPER:
_local2._spd = 2;
_local2._rangeMax = 500;
_local2._rangeMin = 0;
_local2._attackInterval = 60;
_local2._faintInterval = 30;
_local2._life = 50;
_local2._credit = 50;
return (_local2);
case UnitFactory.HEADQUARTERS:
_local2._spd = 1.5;
_local2._rangeMax = 15;
_local2._rangeMin = 0;
_local2._attackInterval = 10;
_local2._faintInterval = 0;
_local2._life = int.MAX_VALUE;
_local2._credit = 50;
return (_local2);
case UnitFactory.ROCKET_SOLIDER:
_local2._spd = 1.5;
_local2._rangeMax = 400;
_local2._rangeMin = 0;
_local2._attackInterval = 30;
_local2._faintInterval = 55;
_local2._life = 100;
_local2._credit = 50;
return (_local2);
case UnitFactory.ROBOT:
_local2._spd = 1.5;
_local2._rangeMax = 200;
_local2._rangeMin = 0;
_local2._attackInterval = 50;
_local2._faintInterval = 0;
_local2._life = 300;
_local2._credit = 30;
return (_local2);
case UnitFactory.FLY_ROBOT:
_local2._spd = 3;
_local2._rangeMax = 150;
_local2._rangeMin = 0;
_local2._attackInterval = 0;
_local2._faintInterval = 0;
_local2._life = 150;
_local2._credit = 50;
return (_local2);
case UnitFactory.TANK:
_local2._spd = 1.5;
_local2._rangeMax = 220;
_local2._rangeMin = 0;
_local2._attackInterval = 30;
_local2._faintInterval = 0;
_local2._life = 1000;
_local2._credit = 50;
return (_local2);
case UnitFactory.SUICIDE_CAR:
_local2._spd = 4;
_local2._rangeMax = 0;
_local2._rangeMin = 0;
_local2._attackInterval = 30;
_local2._faintInterval = 0;
_local2._life = 300;
_local2._credit = 50;
return (_local2);
case UnitFactory.YURI:
_local2._spd = 2;
_local2._rangeMax = 350;
_local2._rangeMin = 0;
_local2._attackInterval = 30;
_local2._faintInterval = 0;
_local2._life = 300;
_local2._credit = 50;
return (_local2);
};
return (null);
}
}
}//package com.veltive.cityinvasion.utils
Section 106
//DieSoundFactory (com.veltive.cityinvasion.utils.DieSoundFactory)
package com.veltive.cityinvasion.utils {
import flash.media.*;
public class DieSoundFactory {
public static function getSound(_arg1:int=-1):Sound{
if (_arg1 < 0){
_arg1 = (int((Math.random() * 4)) + 2);
};
switch (_arg1){
case 1:
break;
case 2:
return (new Die2());
case 3:
return (new Die3());
case 4:
return (new Die4());
case 5:
return (new Die5());
case 6:
break;
};
return (null);
}
}
}//package com.veltive.cityinvasion.utils
Section 107
//GameSound (com.veltive.cityinvasion.utils.GameSound)
package com.veltive.cityinvasion.utils {
import gs.*;
import flash.events.*;
import flash.media.*;
import com.veltive.cityinvasion.*;
import gs.easing.*;
public class GameSound implements IGameObject {
private var _loop:int;
private var _channel:SoundChannel;
private var _paused:Boolean;
private var _pos:Number;// = 0
private var _maxVol:Number;// = 1
private var _s:Sound;
public function GameSound(_arg1:Sound, _arg2:int=0){
if (_arg1 != null){
this._s = _arg1;
_loop = _arg2;
Volume.getInstance().addEventListener(Event.CHANGE, setVolume);
};
}
public function fadeIn(_arg1:int=10){
volume = 0;
TweenLite.to(this, _arg1, {volume:_maxVol, ease:null});
}
public function set volume(_arg1:Number){
var _local2:SoundTransform;
if (_arg1 > 1){
_arg1 = 1;
};
if (_channel){
_local2 = new SoundTransform();
_local2.volume = _arg1;
_channel.soundTransform = _local2;
};
}
public function get volume():Number{
if (_channel){
return (_channel.soundTransform.volume);
};
return (0);
}
private function setVolume(_arg1){
var _local2:* = 1;
if ((_s is TypeSound)){
_local2 = (_local2 / 3);
};
if ((_s is StartSound)){
};
if (((((((((((!((_s is BackgroundSound))) && (!((_s is FinalSound))))) && (!((_s is LoseSound))))) && (!((_s is StartSound))))) && (!((_s is WinSound))))) && (!((_s is BtnSound))))){
if ((_s is RifleSound)){
_local2 = (_local2 / 2);
} else {
_local2 = (_local2 * (2 / 3));
};
};
if ((((((_s is BackgroundSound)) || ((_s is StartSound)))) || ((_s is WinSound)))){
_maxVol = (volume = (GameVariables.MUSIC_VOLUME * _local2));
} else {
volume = (GameVariables.SOUND_VOLUME * _local2);
};
}
public function clear():void{
if ((((_s == null)) || ((_channel == null)))){
return;
};
pause();
try {
_s.close();
} catch(e) {
};
_s = null;
}
public function set pos(_arg1:Number){
_pos = _arg1;
}
public function fadeOut(_arg1:int=3){
TweenLite.to(this, _arg1, {volume:0, ease:null, onComplete:clear});
}
public function resume():void{
try {
_channel = _s.play(_pos);
setVolume(null);
_channel.addEventListener(Event.SOUND_COMPLETE, onComplete);
_paused = false;
} catch(e) {
trace("sound error");
};
}
public function get paused():Boolean{
return (_paused);
}
public function pause():void{
if (_channel){
_pos = _channel.position;
_paused = true;
_channel.removeEventListener(Event.SOUND_COMPLETE, onComplete);
_channel.stop();
_channel = null;
};
}
private function onComplete(_arg1){
if (_channel == null){
return;
};
_channel.removeEventListener(Event.SOUND_COMPLETE, onComplete);
if (_loop == 0){
clear();
} else {
if (_loop == 1){
} else {
if (_loop == 2){
_pos = 0;
resume();
};
};
};
}
}
}//package com.veltive.cityinvasion.utils
Section 108
//Language (com.veltive.cityinvasion.utils.Language)
package com.veltive.cityinvasion.utils {
import com.veltive.cityinvasion.*;
public class Language {
public static var language15:XML = <languages>
<startpage>
<txt id="ngBtn">开始新游戏</txt>
<txt id="cgBtn">继续游戏</txt>
<txt id="htpBtn">玩法说明</txt>
<txt id="tuBtn">试玩教程</txt>
<txt id="scoreBtn">排行榜</txt>
<txt id="optBtn">选项</txt>
<txt id="playMore">更多的战略游戏尽在</txt>
</startpage>
<learnpage>
<txt id="topTxt"><![CDATA[欢迎来到City Invasion,争取在敌人击垮你的总部之前先击垮敌人的总部。]]></txt>
<txt id="cBtn">后退</txt>
<txt id="unitExp"><![CDATA[按<font color="#FFFFFF">Space</font>键或者点击某个道具以建造新道具。按<font color="#FFFFFF">左右</font>键来选择不同的道具(红色边框突出的为被选的道具)。]]></txt>
<txt id="specialExp"><![CDATA[按<font color="#FFFFFF">Space</font>键或者点击某个道具以建造新道具。按<font color="#FFFFFF">左右</font>键来选择不同的道具(红色边框突出的为被选的道具)。]]></txt>
<txt id="lifeBarExp">显示总部的生命值</txt>
<txt id="menuExp">点击这个按钮或按P键进入菜单</txt>
<txt id="lanesExp"><![CDATA[战场上有5条通道。箭头所示为你所在的通道。点击不同通道或使用<font color="#FFFFFF">上下</font>键来改变通道。]]></txt>
<txt id="showLifeExp"><![CDATA[点击<font color="#FFFFFF">Shift</font>显示当前道具的生命值]]></txt>
</learnpage>
<scorepage>
<txt id="continue">继续</txt>
<txt id="a10">更多战略尽在</txt>
</scorepage>
<optpage>
<txt id="options">选项</txt>
<txt id="vq">视觉质量</txt>
<txt id="se">音效</txt>
<txt id="m">音乐</txt>
<txt id="back">后退</txt>
<txt id="high">高</txt>
<txt id="medium">中</txt>
<txt id="low">低</txt>
<txt id="on">开</txt>
<txt id="off">关</txt>
</optpage>
<choosepage>
<txt id="txt">你确定要退出教程直接进入战斗么?</txt>
<txt id="yes">是</txt>
<txt id="no">不是</txt>
</choosepage>
<tutopage>
<txt id="st">退出教程</txt>
<txt id="step0"><![CDATA[欢迎来到City Invasion,指挥官!<br>首府Yokimado刚刚遭遇了地震的破坏。外敌想要趁机占领这座城市。你将代表这座城市的守卫者来抵御入侵。]]></txt>
<txt id="step0_1"><![CDATA[<br><br>在进入正式战斗之前,这个教程会给你演示所有的基本功能!]]></txt>
<txt id="step1"><![CDATA[敌人的总部送出一伙拿着<font color="#FFFF00">燃烧瓶的街霸</font>,我们需要防御。点击这个图标或者按<font color="#FFFF00">Space</font>键来创建带着<font color="#FFFF00">机关枪的士兵</font>。<font color="#FFFF00">机关枪士兵</font>是带着<font color="#FFFF00">燃烧瓶的街霸</font>的最好对手。]]></txt>
<txt id="step2"><![CDATA[箭头指示你目前所在的通道。现在敌人出现在最下方的通道,所以我们也要换到那个通道。请用鼠标点击屏幕中最下方通道的位置或者使用<font color="#FFFF00">上下</font>键来选择通道。]]></txt>
<txt id="step2_1">选择这个通道</txt>
<txt id="step3"><![CDATA[很好!现在敌人派出了<font color="#FFFF00">有盾牌的士兵</font>。<font color="#FFFF00">带着燃烧瓶的街霸</font>是最好的选择。请点击这个图标(或者同时使用<font color="#FFFF00">左右键</font>和<font color="#FFFF00">Space</font>键)来创建他。]]></txt>
<txt id="step4"><![CDATA[请选择新的敌人出现的通道。创建一个<font color="#FFFF00">带盾牌的士兵</font>去迎战<font color="#FFFF00">带机关枪的士兵</font>。]]></txt>
<txt id="step5">相信你已可以看出,了解每个道具的强弱对赢取战斗至关重要!</txt>
<txt id="step6"><![CDATA[这是一个特殊道具叫做-<font color="#FFFF00">总动员</font>。点击这个图标来创建它。在一小段时间内,它能提高你创建各种道具的能力。试试它!]]></txt>
<txt id="step7">试着创建一些道具以看出创建速度有多快!</txt>
<txt id="step8">这是你的总部的生命值。如果它降到0,这场战役你就输了。</txt>
<txt id="step8_1">这是敌人总部的生命值。如果它降到0,你就赢得了这场战役。</txt>
<txt id="step9"><![CDATA[你可以点击这个按钮或者按<font color="#FFFF00">P</font>键来暂停游戏并打开菜单。]]></txt>
<txt id="step9_1">请注意每进一级就会增加一些新道具和特殊能量。</txt>
<txt id="step10">好了,指挥官,我们已向你介绍完所有基本技巧。祝你幸运!</txt>
</tutopage>
<intropage>
<txt id="bu">基本道具</txt>
<txt id="sp">特殊能量/道具</txt>
<txt id="un1">机关枪士兵</txt>
<txt id="ue1">能有效打击带着燃烧瓶的街霸</txt>
<txt id="ue1_1">不能对付带盾牌的士兵</txt>
<txt id="ue1_2">对机关枪士兵有基础攻击性</txt>
<txt id="un2">带着燃烧瓶的街霸</txt>
<txt id="ue2">能有效打击带盾牌的士兵</txt>
<txt id="ue2_1">不能对付机关枪士兵</txt>
<txt id="ue2_2">四处飞溅的破坏,对周围所有事物都能有所破坏,很能对付敌人总部</txt>
<txt id="un3">带盾牌的士兵</txt>
<txt id="ue3">能有效打击机关枪士兵</txt>
<txt id="ue3_1">不能对付带着燃烧瓶的街霸</txt>
<txt id="ue3_2">反骚乱部队,拥有很强防御能力,近距离作用很大</txt>
<txt id="un4">狙击兵</txt>
<txt id="ue4">对付所有敌人都有效</txt>
<txt id="ue4_1">对敌方总部攻击比较弱</txt>
<txt id="ue4_2">擅长远距离重度破坏</txt>
<txt id="un5">火箭兵</txt>
<txt id="ue5">有效打击坦克和敌方总部</txt>
<txt id="ue5_1">对狙击手攻击很弱</txt>
<txt id="ue5_2">火箭兵能很好的对付集群的敌人</txt>
<txt id="un6">机器人</txt>
<txt id="ue6">对敌方机器人能造成有效伤害</txt>
<txt id="ue6_1">对坦克作用不大</txt>
<txt id="ue6_2">拥有激光枪,能随时间变化增强破坏性。如被破坏,会飞出两个小机器人</txt>
<txt id="un7">闪亮坦克</txt>
<txt id="ue7">对所有敌军都能有效攻击</txt>
<txt id="ue7_1">对总部攻击性较弱</txt>
<txt id="ue7_2">粗造的实验车拥有强有力的闪电枪</txt>
<txt id="pn1">总动员</txt>
<txt id="pe1">在一段短时间内降低创建道具所需时间</txt>
<txt id="pn2">自杀袭击车</txt>
<txt id="pe2">发怒的汽车在碰撞造成剧烈破坏</txt>
<txt id="pn3">定时炸弹</txt>
<txt id="pe3">在任何地方都可放置的强大的定时炸弹</txt>
<txt id="pn4">空袭部队</txt>
<txt id="pe4">大量倾泄具有高爆炸性的弹药,就算再有经验的士兵见了也双腿发软</txt>
<txt id="pn5">精神控制</txt>
<txt id="pe5">能对敌军洗脑</txt>
<txt id="m1">使命 1/5</txt>
<txt id="m1_1">Yokobushi 购物街 </txt>
<txt id="m2">使命 2/5</txt>
<txt id="m2_1">北部地铁站 </txt>
<txt id="m3">使命 3/5</txt>
<txt id="m3_1">金色中心公园 </txt>
<txt id="m4">使命 4/5</txt>
<txt id="m4_1">西部桥 </txt>
<txt id="m5">使命 5/5</txt>
<txt id="m5_1">边界 </txt>
</intropage>
<menupage>
<txt id="options">选项</txt>
<txt id="retry">重试</txt>
<txt id="exit">退出</txt>
<txt id="htp">玩法说明</txt>
<txt id="resume">恢复</txt>
</menupage>
<gamepage>
<txt id="menu">菜单</txt>
<txt id="eh">敌人的总部</txt>
<txt id="yh">你的总部</txt>
</gamepage>
<losepage>
<txt id="mf">任务失败</txt>
<txt id="du">时间段:</txt>
<txt id="cu">创建的道具数:</txt>
<txt id="ku">毁灭的道具数:</txt>
<txt id="lu">失去的道具:</txt>
<txt id="li">生命值:</txt>
<txt id="sc">分数:</txt>
<txt id="re">重试</txt>
<txt id="mm">主菜单</txt>
<txt id="mc">任务完成</txt>
</losepage>
<finalpage>
<txt id="cong"><![CDATA[恭喜!<br>你拯救了我们的城市Yokimado。谢谢你卓越的指挥。]]></txt>
<txt id="score">分数</txt>
<txt id="in">输入名字</txt>
<txt id="ss">上传分数</txt>
<txt id="cr">特别鸣谢</txt>
<txt id="new">新分数</txt>
<txt id="gd">游戏编剧</txt>
<txt id="aw">美工</txt>
<txt id="pg">程序员</txt>
<txt id="close">关闭</txt>
</finalpage>
</languages>
;
public static var language13:XML = <languages>
<startpage>
<txt id="ngBtn">Permainan Baru</txt>
<txt id="cgBtn">Melanjutkan Permainan</txt>
<txt id="htpBtn">Cara bermain</txt>
<txt id="tuBtn">Ajaran tambahan</txt>
<txt id="scoreBtn">Nilai tertinggi</txt>
<txt id="optBtn">Pilihan</txt>
<txt id="playMore">Mainkan permainan strategi lainnya di</txt>
</startpage>
<learnpage>
<txt id="topTxt">Selamat datang di City Invasion! Kemenangan terletak pada kehancuran markas musuh sebelum markas anda dihancurkan.</txt>
<txt id="cBtn">Kembali</txt>
<txt id="unitExp">Tekan panah Kiri/Kanan untuk melihat pilihan-pilihan (ditandai dengan sebuah garis batas berwarna merah). Klik sebuah gambar atau tekan Spasi untuk membentuk sebuah unit atau menggunakan sebuah kekuatan khusus.</txt>
<txt id="specialExp">Tekan panah Kiri/Kanan untuk melihat pilihan-pilihan (ditandai dengan sebuah garis batas berwarna merah). Klik sebuah gambar atau tekan Spasi untuk membentuk sebuah unit atau menggunakan sebuah kekuatan khusus.</txt>
<txt id="lifeBarExp">Menunjukkan nyawa markas anda.</txt>
<txt id="menuExp">Klik tombol ini atau tekan 'P' untuk masuk ke Menu Pilihan.</txt>
<txt id="lanesExp">Terdapat lima jalur dalam medan peperangan. Tanda panah menunjukkan jalur dimana anda berada. Klik pada medan peperangan atau tekan panah Atas/Bawah untuk mengganti jalur.</txt>
<txt id="showLifeExp">Tekan Shift untuk menunjukkan batangan nyawa daripada semua unit.</txt>
</learnpage>
<scorepage>
<txt id="continue">Melanjutkan</txt>
<txt id="a10">Strategi lainnya di </txt>
</scorepage>
<optpage>
<txt id="options">Pilihan</txt>
<txt id="vq">KUALITAS VISUIL</txt>
<txt id="se">EFEK SUARA</txt>
<txt id="m">MUSIK</txt>
<txt id="back">Kembali</txt>
<txt id="high">TERBAIK</txt>
<txt id="medium">NORMAL</txt>
<txt id="low">BURUK</txt>
<txt id="on">HIDUPKAN</txt>
<txt id="off">MATIKAN</txt>
</optpage>
<choosepage>
<txt id="txt">Apakah anda yakin untuk melewatkan pelatihan dan menuju ke peperangan pertama?</txt>
<txt id="yes">Ya</txt>
<txt id="no">Tidak</txt>
</choosepage>
<tutopage>
<txt id="st">Lewati pelatihan</txt>
<txt id="step0">Selamat datang di City Invasion, Komandan! Ibukota Yokimado telah dihancurkan oleh gempa bumi. Orang luar sedang mencoba untuk mengambil ahli kota tersebut. Tergantung pada anda untuk memimpin pasukan dan mempertahankan kota!</txt>
<txt id="step0_1"><![CDATA[<br><br>Pelatihan ini akan menuntun anda melewati fundamental-fundamental sebelum anda terjun ke medan perang!]]></txt>
<txt id="step1">Markas musuh telah mengirim sekelompok pasukan dengan Mercusuar untuk menyerang kami. Untuk mempertahankan markas kami, klik pada Tentara yang bersenjata atau tekan Spasi untuk membentuk unit pertahanan. Tentara-tentara yang bersenjata sangatlah efektif melawan pasukan bermercusuar.</txt>
<txt id="step2">Tanda panah ini mengindikasikan jalur keberadaan anda. Unit musuh telah muncul di jalur bawah. Cobalah untuk klik bagian bawah medan peperangan atau pergunakan tombol panah Atas/Bawah untuk memilih jalur itu.</txt>
<txt id="step2_1">Pilih jalur ini</txt>
<txt id="step3">Kerja yang bagus! Musuh mengirim Tentara Berperisai. Pasukan Mercusuar ialah unit pertahanan terbaik. Klik gambarnya (atau pergunakan kombinasi panah Kiri/Kanan dengan Spasi) untuk membentuknya.</txt>
<txt id="step4">Pertama-tama, pilihlah jalur yang benar. Bentuklah Tentara Berperisai untuk berhadapan dengan Tentara bersenjata milik musuh. Tekan Shift untuk melihat nyawa semua unit.</txt>
<txt id="step5">Seperti yang bisa anda lihat, sangatlah penting untuk mengerti kekuatan dan kelemahan setiap unit!</txt>
<txt id="step6">Kekuatan khusus ini disebut sebagai Perintah Mobilisasi. Klik gambar ini untuk meningkatkan kecepatan pembentukan anda dalam jangka waktu yang singkat. Cobalah!</txt>
<txt id="step7">Sekarang, bentuklah beberapa unit dan lihatlah kecepatannya!</txt>
<txt id="step8">Ini ialah nyawa markas anda. Jika mencapai angka 0, maka anda akan kalah dalam peperangan.</txt>
<txt id="step8_1">Ini ialah nyawa markas musuh. Jika mencapai angka 0, maka anda akan memenangkan peperangan.</txt>
<txt id="step9">Klik tombol ini atau tekan P untuk memberhentikan permainannya sebentar dan membuka menu.</txt>
<txt id="step9_1">Perhatikanlah bahwa unit-unit baru dan kekuatan khusus akan diperkenalkan dalam tiap level baru.</txt>
<txt id="step10">Sekian, Komandan! Sekarang anda telah mengetahui dasar-dasarnya! Semoga beruntung!</txt>
</tutopage>
<intropage>
<txt id="bu">Unit Dasar</txt>
<txt id="sp">Kekuatan khusus</txt>
<txt id="un1">Tentara Bersenjata</txt>
<txt id="ue1">Efektif melawan Pasukan Mercusuar</txt>
<txt id="ue1_1">Lemah melawan Tentara Berperisai</txt>
<txt id="ue1_2">Serangan unit dasar dengan kekuatan senjata.</txt>
<txt id="un2">Pasukan Mercusuar</txt>
<txt id="ue2">Efektif melawan Tentara Berperisai</txt>
<txt id="ue2_1">Lemah melawan Tentara Bersenjata</txt>
<txt id="ue2_2">Kerusakan Ceburan--menyakiti semua orang yang berada di dekatnya, bagus untuk kerusakan Markas.</txt>
<txt id="un3">Tentara Berperisai</txt>
<txt id="ue3">Efektif melawan Tentara Bersenjata</txt>
<txt id="ue3_1">Lemah melawan Pasukan Mercusuar</txt>
<txt id="ue3_2">Anti-keributan dengan pertahanan yang kuat, berkekuatan penuh untuk jarak dekat.</txt>
<txt id="un4">Penembak Tersembunyi</txt>
<txt id="ue4">Efektif melawan semua tentara</txt>
<txt id="ue4_1">Lemah melawan markas</txt>
<txt id="ue4_2">Jarak jauh dan penderitaan kerusakan tinggi</txt>
<txt id="un5">Tentara Panah Api</txt>
<txt id="ue5">Efektif melawan markas & tangki api.</txt>
<txt id="ue5_1">Lemah melawan Penembak Tersembunyi</txt>
<txt id="ue5_2">Unit anti-kenderaan dengan kerusakan ceburan atau tumpukan musuh.</txt>
<txt id="un6">Robot</txt>
<txt id="ue6">Efektif melawan robot musuh</txt>
<txt id="ue6_1">Lemah melawan tangki</txt>
<txt id="ue6_2">Tiang laser yang menyebabkan banyak kerusakan. Saat dihancurkan, dua robot yang lebih kecil akan bergabung.</txt>
<txt id="un7">Tangki Api</txt>
<txt id="ue7">Efektif melawan semua unit</txt>
<txt id="ue7_1">Lemah melawan markas</txt>
<txt id="ue7_2">Kendaraan percobaan yang kasar dengan kekuatan senjata baut api.</txt>
<txt id="pn1">Perintah Mobilisasi</txt>
<txt id="pe1">Mengurangi waktu produksi untuk jangka waktu yang singkat.</txt>
<txt id="pn2">Truk Bunuh Diri</txt>
<txt id="pe2">Truk Amukan yang meledak dalam tubrukan.</txt>
<txt id="pn3">Bom Waktu</txt>
<txt id="pe3">Berkekuatan penuh yang meledak berdasarkan waktu yang diatur yang bisa ditempatkan dimana saja.</txt>
<txt id="pn4">Pukulan Udara</txt>
<txt id="pe4">Bahan peledak tempurung yang berjumlah besar, yang mampu melumpuhkan para prajurit yang paling berpengalaman sekalipun.</txt>
<txt id="pn5">Jagoan Pikiran</txt>
<txt id="pe5">Komandan elit yang mencuci otak unit-unit musuh.</txt>
<txt id="m1">Misi 1/5</txt>
<txt id="m1_1">Daerah Perbelanjaan Yokobushi</txt>
<txt id="m2">Misi 2/5</txt>
<txt id="m2_1">Kereta api bawah tanah bagian utara</txt>
<txt id="m3">Misi 3/5</txt>
<txt id="m3_1">Taman Pusat Golden</txt>
<txt id="m4">Misi 4/5</txt>
<txt id="m4_1">Jembatan Barat</txt>
<txt id="m5">Misi 5/5</txt>
<txt id="m5_1">Daerah pinggiran</txt>
</intropage>
<menupage>
<txt id="options">Pilihan</txt>
<txt id="retry">Coba lagi</txt>
<txt id="exit">Keluar</txt>
<txt id="htp">Cara bermain</txt>
<txt id="resume">Mulai lagi</txt>
</menupage>
<gamepage>
<txt id="menu">Menu</txt>
<txt id="eh">Markas Musuh</txt>
<txt id="yh">Markas Anda</txt>
</gamepage>
<losepage>
<txt id="mf">Misi Gagal</txt>
<txt id="du">Durasi</txt>
<txt id="cu">Unit Terbentuk:</txt>
<txt id="ku">Unit Terbunuh:</txt>
<txt id="lu">Unit yang Hilang:</txt>
<txt id="li">Nyawa:</txt>
<txt id="sc">Skor:</txt>
<txt id="re">Coba lagi</txt>
<txt id="mm">Menu utama</txt>
<txt id="mc">Misi Selesai</txt>
</losepage>
<finalpage>
<txt id="cong"><![CDATA[Selamat!<br> Kota Yokimado telah diselamatkan, terima kasih atas kepemimpinan anda yang sangat luar biasa.]]></txt>
<txt id="score">Skor</txt>
<txt id="in">Masukkan nama anda</txt>
<txt id="ss">Kumpulkan skor</txt>
<txt id="cr">Kredit</txt>
<txt id="new">Baru</txt>
<txt id="gd">Desain Permainan</txt>
<txt id="aw">Hasil Seni</txt>
<txt id="pg">Program</txt>
<txt id="close">Tutup</txt>
</finalpage>
</languages>
;
public static var language14:XML = <languages>
<startpage>
<txt id="ngBtn">新ゲーム</txt>
<txt id="cgBtn">ゲームを続ける</txt>
<txt id="htpBtn">遊び方</txt>
<txt id="tuBtn">チュートリアル</txt>
<txt id="scoreBtn">ハイスコア</txt>
<txt id="optBtn">オプション</txt>
<txt id="playMore">で他の戦略ゲームをプレイする</txt>
</startpage>
<learnpage>
<txt id="topTxt"><![CDATA[City Invasionへようこそ!自軍の司令部を守りながら、敵の司令部を破壊して勝利をつかみましょう!]]></txt>
<txt id="cBtn">戻る</txt>
<txt id="unitExp"><![CDATA[<font color="#FFFFFF">左/右</font>矢印キーを押して(赤い枠で囲まれた)オプションを選択します。アイコンをクリックするかスペースキーを押して部隊を配置したり、特殊パワーを使用したりしましょう。]]></txt>
<txt id="specialExp"><![CDATA[<font color="#FFFFFF">左/右</font>矢印キーを押して(赤い枠で囲まれた)オプションを選択します。アイコンをクリックするかスペースキーを押して部隊を配置したり、特殊パワーを使用したりしましょう。]]></txt>
<txt id="lifeBarExp">敵の司令部のライフゲージを表示します。</txt>
<txt id="menuExp">このボタンをクリックまたはPキーを押すと、オプションメニューに移動します。</txt>
<txt id="lanesExp"><![CDATA[戦場には5つのレーンがあります。戦場の矢印はあなたがどのレーンにいるかを示しています。戦場をクリックするか<font color="#FFFFFF">上/下</font>矢印キーを押してレーンを変更しましょう。]]></txt>
<txt id="showLifeExp">シフトキーを押すと全ユニットのライフゲージが表示されます。</txt>
</learnpage>
<scorepage>
<txt id="continue">次へ進む</txt>
<txt id="a10">戦略ゲームなら</txt>
</scorepage>
<optpage>
<txt id="options">オプション</txt>
<txt id="vq">ヴィジュアルクオリティ</txt>
<txt id="se">サウンド</txt>
<txt id="m">ミュージック</txt>
<txt id="back">戻る</txt>
<txt id="high">高</txt>
<txt id="medium">標準</txt>
<txt id="low">低</txt>
<txt id="on">オン</txt>
<txt id="off">オフ</txt>
</optpage>
<choosepage>
<txt id="txt">チュートリアルをスキップして最初の戦闘に挑みますか?</txt>
<txt id="yes">はい</txt>
<txt id="no">いいえ</txt>
</choosepage>
<tutopage>
<txt id="st">チュートリアルをスキップ</txt>
<txt id="step0">司令官閣下、City Invasionへようこそ!世界の主要都市ヨキマドが大地震により破壊されてしまいました。それに乗じて侵略者らがこの都市を支配しようと企んでいます。あなたの指揮のもと、軍隊を率いてこの都市を守りましょう!</txt>
<txt id="step0_1"><![CDATA[<br><br>戦闘に入る前に、このチュートリアルで基本的な戦闘方法を学びましょう。]]></txt>
<txt id="step1">敵の司令部が火炎瓶兵を送り込み、我々を攻撃しようとしています。我々の司令部を防衛するために、ショットガン兵のアイコンをクリックするかスペースキーを押して、防衛ユニットを配置しましょう。ショットガン兵は火炎瓶兵との戦闘を得意としています。</txt>
<txt id="step2">この矢印はあなたがいるレーンを示しています。敵の部隊は一番下のレーンにいます。戦場の下側をクリックするか上/下矢印キーを使用して、レーンを選択して下さい。</txt>
<txt id="step2_1">このレーンを選択する</txt>
<txt id="step3">上出来です!さて、今度は敵がシールド兵を送り込んできました。この場合、火炎瓶兵で対抗するのがベストです。火炎瓶兵のアイコンをクリック(または左/右矢印キーとスペースキーを使用)して戦場に配置しましょう。</txt>
<txt id="step4">まず始めに敵がいるレーンを選択します。次に自軍のシールド兵を敵のショットガン兵と戦うように配置します。シフトキーを押して全ユニットのライフゲージを表示しましょう。</txt>
<txt id="step5">各ユニットの強みと弱点を知ることは非常に重要です!</txt>
<txt id="step6">この特殊パワーは「動員令」といいます。このアイコンをクリックすると、短時間でユニットを配置することができます。試してみましょう!</txt>
<txt id="step7">さぁ、どれだけ短時間でユニットが配置できるか見てみましょう!</txt>
<txt id="step8">これは自軍の司令部のライフゲージです。ライフゲージが0になると、我々の敗北です。</txt>
<txt id="step8_1">これは敵の司令部のライフゲージです。ライフゲージが0になると、我々の勝利です。</txt>
<txt id="step9">このボタンをクリックするかPキーを押してゲームを一時停止し、メニュー画面を表示することができます。</txt>
<txt id="step9_1">レベルが進むたびに、新たなユニットや特殊パワーが紹介されます。</txt>
<txt id="step10">チュートリアルはこれで終了です。基本的な戦闘方法が身についたはずです。では司令官殿、健闘を祈ります!</txt>
</tutopage>
<intropage>
<txt id="bu">基本ユニット</txt>
<txt id="sp">特殊パワー</txt>
<txt id="un1">ショットガン兵</txt>
<txt id="ue1">火炎瓶兵に効果的</txt>
<txt id="ue1_1">シールド兵に弱い</txt>
<txt id="ue1_2">強力なショットガンを使う基本の攻撃ユニット</txt>
<txt id="un2">火炎瓶兵</txt>
<txt id="ue2">シールド兵に効果的</txt>
<txt id="ue2_1">ショットガン兵に弱い</txt>
<txt id="ue2_2">広範囲を攻撃し、近くにいる全ての敵にダメージを与えます。司令部を攻撃するのに効果的です。</txt>
<txt id="un3">シールド兵</txt>
<txt id="ue3">ショットガン兵に効果的</txt>
<txt id="ue3_1">火炎瓶兵に弱い</txt>
<txt id="ue3_2">強い防御力をもつ鎮圧ユニットで、近距離の敵に効果的です。</txt>
<txt id="un4">狙撃手</txt>
<txt id="ue4">全ての敵に効果的</txt>
<txt id="ue4_1">司令部の攻撃に弱い</txt>
<txt id="ue4_2">遠くにいる敵に大きなダメージを与える</txt>
<txt id="un5">バズーカ兵</txt>
<txt id="ue5">司令部と電撃タンクの攻撃に弱い</txt>
<txt id="ue5_1">狙撃手に弱い</txt>
<txt id="ue5_2">密集した敵に広範囲のダメージを与えるユニット</txt>
<txt id="un6">ロボット</txt>
<txt id="ue6">敵のロボットに効果的</txt>
<txt id="ue6_1">タンクに弱い</txt>
<txt id="ue6_2">より大きなダメージを与えるレーザービームを発する。破壊されると、小さなロボットが2体現れる。</txt>
<txt id="un7">電撃タンク</txt>
<txt id="ue7">全てのユニットに効果的</txt>
<txt id="ue7_1">司令部の攻撃に弱い</txt>
<txt id="ue7_2">強力な電撃銃を備えた頑丈なタンク</txt>
<txt id="pn1">動員令</txt>
<txt id="pe1">ユニット配置時間を短縮する</txt>
<txt id="pn2">自爆特攻車</txt>
<txt id="pe2">衝撃に反応して爆発する特攻車</txt>
<txt id="pn3">時限爆弾</txt>
<txt id="pe3">時限装置付きでどこにでも置ける強力な爆弾</txt>
<txt id="pn4">空爆</txt>
<txt id="pe4">破壊力の高い爆弾を複数落とす。最も経験を積んだ兵士でも太刀打ちできない。</txt>
<txt id="pn5">ブレインマスター</txt>
<txt id="pe5">敵のユニットを洗脳するエリート司令官</txt>
<txt id="m1">任務1/5</txt>
<txt id="m1_1">ヨコブシ商店街 </txt>
<txt id="m2">任務2/5</txt>
<txt id="m2_1">北部地下鉄 </txt>
<txt id="m3">任務3/5</txt>
<txt id="m3_1">ゴールデン中央広場 </txt>
<txt id="m4">任務4/5</txt>
<txt id="m4_1">ウェストブリッジ </txt>
<txt id="m5">任務5/5</txt>
<txt id="m5_1">郊外 </txt>
</intropage>
<menupage>
<txt id="options">オプション</txt>
<txt id="retry">もう1度トライしますか</txt>
<txt id="exit">終了する</txt>
<txt id="htp">遊び方</txt>
<txt id="resume">再開する</txt>
</menupage>
<gamepage>
<txt id="menu">メニュー</txt>
<txt id="eh">敵の司令部</txt>
<txt id="yh">自軍の司令部</txt>
</gamepage>
<losepage>
<txt id="mf">任務失敗</txt>
<txt id="du">戦闘時間</txt>
<txt id="cu">配置したユニット:</txt>
<txt id="ku">倒したユニット:</txt>
<txt id="lu">失ったユニット:</txt>
<txt id="li">ライフ:</txt>
<txt id="sc">スコア:</txt>
<txt id="re">もう1度トライしますか</txt>
<txt id="mm">メインメニュー</txt>
<txt id="mc">任務達成</txt>
</losepage>
<finalpage>
<txt id="cong"><![CDATA[おめでとうございます!<br>あなたの素晴らしい指揮のおかげでヨキマドの街は救われました!]]></txt>
<txt id="score">スコア</txt>
<txt id="in">あなたの名前を入力して下さい</txt>
<txt id="ss">スコアを登録する</txt>
<txt id="cr">クレジット</txt>
<txt id="new">新</txt>
<txt id="gd">ゲームデザイン</txt>
<txt id="aw">アート制作</txt>
<txt id="pg">プログラミング</txt>
<txt id="close">閉じる</txt>
</finalpage>
</languages>
;
public static var _languageBox:Array = new Array();
public static var language1:XML = <languages>
<startpage>
<txt id="ngBtn">New Game</txt>
<txt id="cgBtn">Continue Game</txt>
<txt id="htpBtn">How to play</txt>
<txt id="tuBtn">Tutorial</txt>
<txt id="scoreBtn">High Scores</txt>
<txt id="optBtn">Options</txt>
<txt id="playMore">Play more strategy games at</txt>
</startpage>
<learnpage>
<txt id="topTxt"><![CDATA[Welcome to City Invasion! Victory will be yours if you destroy the<br> enemy Headquarters before they destroy yours.]]></txt>
<txt id="cBtn">Back</txt>
<txt id="unitExp"><![CDATA[Press <font color="#FFFFFF">Left/Right</font> to scroll through options (indicated with a red border line). Click an icon or press <font color="#FFFFFF">Space</font> to create a unit or use a special power.]]></txt>
<txt id="specialExp"><![CDATA[Press <font color="#FFFFFF">Left/Right</font> to scroll through options (indicated with a red border line). Click an icon or press <font color="#FFFFFF">Space</font> to create a unit or use a special power.]]></txt>
<txt id="lifeBarExp">Shows your headquarters' life bar.</txt>
<txt id="menuExp">Click this button or press 'P' to enter the Options menu.</txt>
<txt id="lanesExp"><![CDATA[There are five lanes in the battlefield. The arrows show in which lane you are. Click the battlefield or press <font color="#FFFFFF">Up/Down</font> to change lanes.]]></txt>
<txt id="showLifeExp"><![CDATA[Press <font color="#FFFFFF">Shift</font> to show the lifebar of all units.]]></txt>
</learnpage>
<scorepage>
<txt id="continue">Continue</txt>
<txt id="a10">More strategy at </txt>
</scorepage>
<optpage>
<txt id="options">Options</txt>
<txt id="vq">VISUAL QUALITY</txt>
<txt id="se">SOUND EFFECTS</txt>
<txt id="m">MUSIC</txt>
<txt id="back">Back</txt>
<txt id="high">HIGH</txt>
<txt id="medium">NORMAL</txt>
<txt id="low">LOW</txt>
<txt id="on">ON</txt>
<txt id="off">OFF</txt>
</optpage>
<choosepage>
<txt id="txt">Are you sure you want to skip the tutorial and move on to the first battle?</txt>
<txt id="yes">Yes</txt>
<txt id="no">No</txt>
</choosepage>
<tutopage>
<txt id="st">Skip Tutorial</txt>
<txt id="step0"><![CDATA[Welcome to City Invasion, Commander! <br>The global capital of Yokimado has been devastated by an earthquake. Outsiders are trying to take control over the city. It's up to you to lead the troops and defend the city!]]></txt>
<txt id="step0_1"><![CDATA[<br><br>This tutorial will guide you through the basics before you go to battle!]]></txt>
<txt id="step1"><![CDATA[The Enemy Headquarters have sent a <font color="#FFFF00">Molotov Cocktail Thrower</font> to attack us. To defend our headquarter, click the <font color="#FFFF00">Soldier-with-Shotgun</font>-icon or press <font color="#FFFF00">Space</font> to create a defense unit. <font color="#FFFF00">Soldiers with Shotguns</font> are very effective against <font color="#FFFF00">Molotov Cocktail Throwers</font>.]]></txt>
<txt id="step2"><![CDATA[These arrows indicate in which lane you are. The enemy unit has appeared in the bottom lane. Try to click the bottom of the battlefield or use <font color="#FFFF00">Up/Down</font> to select that lane.]]></txt>
<txt id="step2_1">Select this lane</txt>
<txt id="step3"><![CDATA[Great job! <br>The enemy sent a <font color="#FFFF00">Soldier with Shield</font>. A <font color="#FFFF00">Molotov Cocktail Thrower</font> would be the best defense unit. Click his icon (or use <font color="#FFFF00">Left/Right</font> in combination with <font color="#FFFF00">Space</font>) to create it.]]></txt>
<txt id="step4"><![CDATA[First, select the correct lane. Create a <font color="#FFFF00">Soldier with Shield</font> to meet the enemy <font color="#FFFF00">Soldier with Shotgun</font>. <br><br>Press <font color="#FFFF00">Shift</font> to see all units' life bars.]]></txt>
<txt id="step5">As you can see, it's very important to understand every unit's strengths and weaknesses!</txt>
<txt id="step6"><![CDATA[This special power is called <font color="#FFFF00">Mobilization Order</font>. <br>Click this icon to increase your building speed for a short amount of time. Try it!]]></txt>
<txt id="step7">Now, create some units and see how fast it goes!</txt>
<txt id="step8">This is your Headquarters' life bar. If it reaches 0, you will lose the battle.</txt>
<txt id="step8_1">This is the Enemy Headquarters' life bar. If it reaches 0, you will win the battle.</txt>
<txt id="step9"><![CDATA[Click this button or press <font color="#FFFF00">P</font> to pause the game and open the menu.]]></txt>
<txt id="step9_1">Note that new units and special powers will be introduced in each new level.</txt>
<txt id="step10">That's all, Commander! Now you know the basics. Good Luck!</txt>
</tutopage>
<intropage>
<txt id="bu">Basic Unit</txt>
<txt id="sp">Special Power</txt>
<txt id="un1">Soldier with Shotgun</txt>
<txt id="ue1">Effective against Molotov Cocktail Thrower</txt>
<txt id="ue1_1">Weak against Soldier with Shield</txt>
<txt id="ue1_2">Basic attack unit with a powerful shotgun</txt>
<txt id="un2">Molotov Cocktail Thrower</txt>
<txt id="ue2">Effective against Soldier with Shield</txt>
<txt id="ue2_1">Weak against Soldier with Shotgun</txt>
<txt id="ue2_2">Splash damage--hurts everyone nearby, good at damaging Headquarters</txt>
<txt id="un3">Soldier with Shield</txt>
<txt id="ue3">Effective against Soldier with Shotgun</txt>
<txt id="ue3_1">Weak against Molotov Cocktail Thrower</txt>
<txt id="ue3_2">Anti-riot unit with a strong defense, powerful at close range</txt>
<txt id="un4">Sniper</txt>
<txt id="ue4">Effective against all soldiers</txt>
<txt id="ue4_1">Weak against Headquarters</txt>
<txt id="ue4_2">Long range and high damage infliction</txt>
<txt id="un5">Bazooka Soldier</txt>
<txt id="ue5">Effective against Headquarters & Lightning Tank</txt>
<txt id="ue5_1">Weak against Sniper</txt>
<txt id="ue5_2">Anti-vehicle unit with splash damage on clustered enemies</txt>
<txt id="un6">Robot</txt>
<txt id="ue6">Effective against enemy Robot</txt>
<txt id="ue6_1">Weak against Tank</txt>
<txt id="ue6_2">Laser beam that causes more damage over time. When destroyed, two smaller robots emerge</txt>
<txt id="un7">Lightning Tank</txt>
<txt id="ue7">Effective against all units</txt>
<txt id="ue7_1">Weak against Headquarters</txt>
<txt id="ue7_2">Rugged experimental vehicle with powerful lightning-bolt gun</txt>
<txt id="pn1">Mobilization Order</txt>
<txt id="pe1">Reduces production time for a short period</txt>
<txt id="pn2">Suicide Truck</txt>
<txt id="pe2">Rampaging truck that detonates on impact</txt>
<txt id="pn3">Time Bomb</txt>
<txt id="pe3">Powerful timed explosive that can be placed anywhere</txt>
<txt id="pn4">Air Strike</txt>
<txt id="pe4">A large number of high-explosive shells, bringing even the most experienced soldiers to their knees</txt>
<txt id="pn5">Mind Master</txt>
<txt id="pe5">Elite commander that brainwashes enemy units</txt>
<txt id="m1">Mission 1/5</txt>
<txt id="m1_1">Yokobushi Shopping District</txt>
<txt id="m2">Mission 2/5</txt>
<txt id="m2_1">Northern Subway</txt>
<txt id="m3">Mission 3/5</txt>
<txt id="m3_1">Golden Center Park</txt>
<txt id="m4">Mission 4/5</txt>
<txt id="m4_1">West Bridge</txt>
<txt id="m5">Mission 5/5</txt>
<txt id="m5_1">Outskirts</txt>
</intropage>
<menupage>
<txt id="options">Options</txt>
<txt id="retry">Retry</txt>
<txt id="exit">Exit</txt>
<txt id="htp">How to play</txt>
<txt id="resume">Resume</txt>
</menupage>
<gamepage>
<txt id="menu">Menu</txt>
<txt id="eh">Enemy Headquarters</txt>
<txt id="yh">Your Headquarters</txt>
</gamepage>
<losepage>
<txt id="mf">Mission Failed</txt>
<txt id="du">Duration:</txt>
<txt id="cu">Created Units:</txt>
<txt id="ku">Killed Units:</txt>
<txt id="lu">Lost Units:</txt>
<txt id="li">Life:</txt>
<txt id="sc">Score:</txt>
<txt id="re">Retry</txt>
<txt id="mm">Main Menu</txt>
<txt id="mc">Mission Completed</txt>
</losepage>
<finalpage>
<txt id="cong"><![CDATA[Congratulations! <br>The city of Yokimado was saved thanks to your exceptional leadership.]]></txt>
<txt id="score">Score</txt>
<txt id="in">Enter Your Name</txt>
<txt id="ss">Submit Score</txt>
<txt id="cr">Credits</txt>
<txt id="new">New</txt>
<txt id="gd">Game Design</txt>
<txt id="aw">Artwork</txt>
<txt id="pg">Programming </txt>
<txt id="close">Close</txt>
</finalpage>
</languages>
;
public static var language2:XML = <languages>
<startpage>
<txt id="ngBtn">New Game</txt>
<txt id="cgBtn">Continue Game</txt>
<txt id="htpBtn">How to play</txt>
<txt id="tuBtn">Tutorial</txt>
<txt id="scoreBtn">High Scores</txt>
<txt id="optBtn">Options</txt>
<txt id="playMore">Play more strategy games at</txt>
</startpage>
<learnpage>
<txt id="topTxt"><![CDATA[Welcome to City Invasion! Victory will be yours if you destroy the<br> enemy Headquarters before they destroy yours.]]></txt>
<txt id="cBtn">Back</txt>
<txt id="unitExp"><![CDATA[Press <font color="#FFFFFF">Left/Right</font> to scroll through the options (shown by a red border). Click an icon or press the <font color="#FFFFFF">spacebar</font> to create a unit or use a special power.]]></txt>
<txt id="specialExp"><![CDATA[Press <font color="#FFFFFF">Left/Right</font> to scroll through the options (shown by a red border). Click an icon or press the <font color="#FFFFFF">spacebar</font> to create a unit or use a special power.]]></txt>
<txt id="lifeBarExp">Shows the life bar of your Headquarters.</txt>
<txt id="menuExp">Click this button or press 'P' to enter the Options menu.</txt>
<txt id="lanesExp"><![CDATA[There are five lanes in the battlefield. The arrows show in which lane you are. Click the battlefield or press <font color="#FFFFFF">Up/Down</font> to change lanes.]]></txt>
<txt id="showLifeExp"><![CDATA[Press <font color="#FFFFFF">Shift</font> to show the life bar of all the units.]]></txt>
</learnpage>
<scorepage>
<txt id="continue">Continue</txt>
<txt id="a10">More strategy at </txt>
</scorepage>
<optpage>
<txt id="options">Options</txt>
<txt id="vq">VISUAL QUALITY</txt>
<txt id="se">SFX</txt>
<txt id="m">MUSIC</txt>
<txt id="back">Back</txt>
<txt id="high">HIGH</txt>
<txt id="medium">NORMAL</txt>
<txt id="low">LOW</txt>
<txt id="on">ON</txt>
<txt id="off">OFF</txt>
</optpage>
<choosepage>
<txt id="txt">Are you sure you want to skip the tutorial and proceed to the first battle?</txt>
<txt id="yes">Yes</txt>
<txt id="no">No</txt>
</choosepage>
<tutopage>
<txt id="st">Skip tutorial</txt>
<txt id="step0"><![CDATA[Welcome to City Invasion, Commander! <br>The global capital of Yokimado has been devastated by an earthquake and outsiders are attempting to take control of the city. <br>You must command the troops and defend the city!]]></txt>
<txt id="step0_1"><![CDATA[<br><br>This tutorial will guide you through the basics before you enter into battle!]]></txt>
<txt id="step1"><![CDATA[The enemy Headquarters have sent a <font color="#FFFF00">Molotov Cocktail Thrower</font> to attack us. To defend our Headquarters, click the <font color="#FFFF00">Soldier with Shotgun</font> icon or press the spacebar to create a defence unit. <font color="#FFFF00">Soldiers with Shotguns</font> are very effective against <font color="#FFFF00">Molotov Cocktail Throwers</font>.]]></txt>
<txt id="step2"><![CDATA[These arrows indicate which lane you are in. The enemy unit has appeared in the bottom lane. Try to click the bottom of the battlefield or use <font color="#FFFF00">Up/Down</font> to select that lane.]]></txt>
<txt id="step2_1">Select this lane</txt>
<txt id="step3"><![CDATA[Good work! The enemy sent a <font color="#FFFF00">Soldier with Shield</font>. A <font color="#FFFF00">Molotov Cocktail Thrower</font> would be the best defence unit. Click the icon (or use <font color="#FFFF00">Left/Right</font> in combination with the <font color="#FFFF00">spacebar</font>) to create it.]]></txt>
<txt id="step4"><![CDATA[First, select the correct lane. Create a <font color="#FFFF00">Soldier with Shield</font> to confront the enemy <font color="#FFFF00">Soldier with Shotgun</font>. Press <font color="#FFFF00">Shift</font> to view the life bars of all the units.]]></txt>
<txt id="step5">As you can see, it's very important to understand the strengths and weaknesses of every unit!</txt>
<txt id="step6"><![CDATA[This special power is called a <font color="#FFFF00">Mobilisation Order</font>. Click this icon to increase your building speed for a short period of time. Try it!]]></txt>
<txt id="step7">Now create some units and see how fast it is!</txt>
<txt id="step8">This is the life bar of your Headquarters; you lose the battle if it drops to zero!</txt>
<txt id="step8_1">This is the life bar of the enemy Headquarters; you win the battle if it drops to zero!</txt>
<txt id="step9"><![CDATA[Click this button or press <font color="#FFFF00">P</font> to pause the game and open the menu.]]></txt>
<txt id="step9_1">Note that new units and special powers will be introduced in each new level.</txt>
<txt id="step10">That's all, Commander! Now you know the basics. Good Luck!</txt>
</tutopage>
<intropage>
<txt id="bu">Basic Unit</txt>
<txt id="sp">Special Power</txt>
<txt id="un1">Soldier with Shotgun</txt>
<txt id="ue1">Effective against Molotov Cocktail Thrower</txt>
<txt id="ue1_1">Weak against Soldier with Shield</txt>
<txt id="ue1_2">Basic attack unit with a powerful shotgun</txt>
<txt id="un2">Molotov Cocktail Thrower</txt>
<txt id="ue2">Effective against Soldier with Shield</txt>
<txt id="ue2_1">Weak against Soldier with Shotgun</txt>
<txt id="ue2_2">Splash damage; injures everyone in the vicinity, good at damaging Headquarters</txt>
<txt id="un3">Soldier with Shield</txt>
<txt id="ue3">Effective against Soldier with Shotgun</txt>
<txt id="ue3_1">Weak against Molotov Cocktail Thrower</txt>
<txt id="ue3_2">Anti-riot unit with a strong defensive capability; powerful at close range</txt>
<txt id="un4">Sniper</txt>
<txt id="ue4">Effective against all soldiers</txt>
<txt id="ue4_1">Weak against Headquarters</txt>
<txt id="ue4_2">Inflicts heavy damage at long range</txt>
<txt id="un5">Bazooka Soldier</txt>
<txt id="ue5">Effective against Headquarters and Lightning Tanks</txt>
<txt id="ue5_1">Weak against Snipers</txt>
<txt id="ue5_2">Anti-vehicle unit with splash damage on clustered enemies</txt>
<txt id="un6">Robot</txt>
<txt id="ue6">Effective against enemy Robots</txt>
<txt id="ue6_1">Weak against Tanks</txt>
<txt id="ue6_2">Laser beam that inflicts more damage over time. When destroyed, two smaller robots emerge from it</txt>
<txt id="un7">Lightning Tank</txt>
<txt id="ue7">Effective against all units</txt>
<txt id="ue7_1">Weak against Headquarters</txt>
<txt id="ue7_2">Rugged experimental vehicle with a powerful lightning bolt gun</txt>
<txt id="pn1">Mobilization Order</txt>
<txt id="pe1">Reduces production time for a short period</txt>
<txt id="pn2">Suicide Truck</txt>
<txt id="pe2">Rampaging truck that detonates on impact</txt>
<txt id="pn3">Time Bomb</txt>
<txt id="pe3">Powerful timed explosive that can be placed anywhere</txt>
<txt id="pn4">Air Strike</txt>
<txt id="pe4">A large number of high-explosive shells that bring even the most experienced soldiers to their knees</txt>
<txt id="pn5">Mind Master</txt>
<txt id="pe5">Elite commander that brainwashes enemy units</txt>
<txt id="m1">Mission 1/5</txt>
<txt id="m1_1">Yokobushi Shopping District</txt>
<txt id="m2">Mission 2/5</txt>
<txt id="m2_1">Northern Subway</txt>
<txt id="m3">Mission 3/5</txt>
<txt id="m3_1">Golden Center Park</txt>
<txt id="m4">Mission 4/5</txt>
<txt id="m4_1">West Bridge</txt>
<txt id="m5">Mission 5/5</txt>
<txt id="m5_1">Outskirts</txt>
</intropage>
<menupage>
<txt id="options">Options</txt>
<txt id="retry">Retry</txt>
<txt id="exit">Exit</txt>
<txt id="htp">How to play</txt>
<txt id="resume">Resume</txt>
</menupage>
<gamepage>
<txt id="menu">Menu</txt>
<txt id="eh">Enemy Headquarters</txt>
<txt id="yh">Your Headquarters</txt>
</gamepage>
<losepage>
<txt id="mf">Mission Failed</txt>
<txt id="du">Duration</txt>
<txt id="cu">Units Created:</txt>
<txt id="ku">Units Killed:</txt>
<txt id="lu">Units Lost:</txt>
<txt id="li">Life:</txt>
<txt id="sc">Score:</txt>
<txt id="re">Retry</txt>
<txt id="mm">Main Menu</txt>
<txt id="mc">Mission Completed</txt>
</losepage>
<finalpage>
<txt id="cong"><![CDATA[Congratulations! <br>The city of Yokimado was saved thanks to your outstanding leadership.]]></txt>
<txt id="score">Score</txt>
<txt id="in">Enter Your Name</txt>
<txt id="ss">Submit Score</txt>
<txt id="cr">Credits</txt>
<txt id="new">New</txt>
<txt id="gd">Game Design</txt>
<txt id="aw">Artwork</txt>
<txt id="pg">Programming </txt>
<txt id="close">Close</txt>
</finalpage>
</languages>
;
public static var language3:XML = <languages>
<startpage>
<txt id="ngBtn">Nieuw spel</txt>
<txt id="cgBtn">Doorspelen</txt>
<txt id="htpBtn">Instructies</txt>
<txt id="tuBtn">Tutorial</txt>
<txt id="scoreBtn">Topscores</txt>
<txt id="optBtn">Opties</txt>
<txt id="playMore">Speel meer strategiespellen op</txt>
</startpage>
<learnpage>
<txt id="topTxt">Welkom bij City Invasion! Alleen als je het hoofdkwartier van de vijand vernietigt voordat de vijand jouw hoofdkwartier vernietigt, zal je zegevieren.</txt>
<txt id="cBtn">Terug</txt>
<txt id="unitExp"><![CDATA[Druk op de pijltjes naar <font color="#FFFFFF">links/rechts</font> om de opties te zien (aangegeven met een rode rand). Klik op een icoontje of druk op de <font color="#FFFFFF">spatiebalk</font> om een eenheid aan te maken of een speciale kracht te gebruiken.]]></txt>
<txt id="specialExp"><![CDATA[Druk op de pijltjes naar <font color="#FFFFFF">links/rechts</font> om de opties te zien (aangegeven met een rode rand). Klik op een icoontje of druk op de <font color="#FFFFFF">spatiebalk</font> om een eenheid aan te maken of een speciale kracht te gebruiken.]]></txt>
<txt id="lifeBarExp">Toont de levensbalk van je hoofdkwartier.</txt>
<txt id="menuExp">Klik op deze knop of druk op P om naar het optiemenu te gaan. </txt>
<txt id="lanesExp"><![CDATA[Het strijdveld bestaat uit vijf paden. De pijlen geven aan op welk pad je staat. Klik op het strijdveld of druk op het pijltje <font color="#FFFFFF">omhoog/omlaag</font> om van pad te veranderen.]]></txt>
<txt id="showLifeExp"><![CDATA[Druk op <font color="#FFFFFF">Shift</font> om de levensbalk van alle eenheden te tonen.]]></txt>
</learnpage>
<scorepage>
<txt id="continue">Doorgaan</txt>
<txt id="a10">Meer strategie bij </txt>
</scorepage>
<optpage>
<txt id="options">Opties</txt>
<txt id="vq">BEELDKWALITEIT</txt>
<txt id="se">GELUIDSEFFECTEN</txt>
<txt id="m">MUZIEK</txt>
<txt id="back">Terug</txt>
<txt id="high">HOOG</txt>
<txt id="medium">NORMAAL</txt>
<txt id="low">LAAG</txt>
<txt id="on">AAN</txt>
<txt id="off">UIT</txt>
</optpage>
<gamepage>
<txt id="menu">Menu</txt>
<txt id="eh">Vijandelijk hoofdkwartier</txt>
<txt id="yh">Jouw hoofdkwartier</txt>
</gamepage>
<choosepage>
<txt id="txt">De tutorial overslaan en doorgaan naar het eerste gevecht?</txt>
<txt id="yes">Ja</txt>
<txt id="no">Nee</txt>
</choosepage>
<tutopage>
<txt id="st">Tutorial overslaan</txt>
<txt id="step0"><![CDATA[Welkom bij City Invasion, commandant!<br>De wereldhoofdstad Yokimado is verwoest door een aardbeving. Vreemdelingen proberen de stad in handen te krijgen. De stad moet verdedigd worden!]]></txt>
<txt id="step0_1"><![CDATA[<br><br>Hier worden de basisbeginselen van de strijd uitgelegd!]]></txt>
<txt id="step1"><![CDATA[Het vijandelijke hoofdkwartier heeft een <font color="#FFFF00">molotovcocktailwerper</font> gestuurd om ons aan te vallen. Klik op het icoontje van een <font color="#FFFF00">soldaat met jachtgeweer</font> om ons hoofdkwartier te verdedigen, of druk je op de spatiebalk om een verdedigingseenheid aan te maken. <font color="#FFFF00">Soldaten met jachtgeweren</font> zijn bijzonder effectief tegen <font color="#FFFF00">molotovcocktailwerpers</font>.]]></txt>
<txt id="step2"><![CDATA[Deze pijlen geven aan in welk pad je eenheden kunt inzetten. De vijandelijke eenheid is verschenen in het onderste pad. Klik onderin het strijdveld of gebruik de pijltjes <font color="#FFFF00">omhoog/omlaag</font> om het pad te selecteren.]]></txt>
<txt id="step2_1">Selecteer dit pad</txt>
<txt id="step3"><![CDATA[Goed gedaan! <br>De vijand heeft een <font color="#FFFF00">soldaat met schild</font> gestuurd. Een <font color="#FFFF00">molotovcocktailwerper</font> zou de beste verdedigingseenheid zijn. Klik op het symbool (of gebruik pijltjes naar <font color="#FFFF00">links/rechts</font> in combinatie met de <font color="#FFFF00">spatiebalk</font>) om die eenheid aan te maken.]]></txt>
<txt id="step4"><![CDATA[Selecteer eerst het juiste pad. Maak een <font color="#FFFF00">soldaat met schild</font> aan om de confrontatie met de vijandelijke <font color="#FFFF00">soldaat met jachtgeweer</font> aan te gaan. <br>Druk op <font color="#FFFF00">Shift</font> om de levensbalken van alle eenheden te tonen.]]></txt>
<txt id="step5">Het is bijzonder belangrijk om de sterke en zwakke punten van alle eenheden te kennen! </txt>
<txt id="step6"><![CDATA[Deze speciale kracht heet <font color="#FFFF00">bevel tot mobilisatie</font>. Klik op dit icoontje om de bouwsnelheid tijdelijk te verhogen. Probeer het maar!]]></txt>
<txt id="step7">Maak nu wat eenheden aan en kijk hoe snel het gaat!</txt>
<txt id="step8">Dit is de levensbalk van het hoofdkwartier. Als deze de 0 bereikt, hebben we de strijd verloren!</txt>
<txt id="step8_1">Dit is de levensbalk van het vijandelijke hoofdkwartier. Bereikt deze de 0, dan winnen we!</txt>
<txt id="step9"><![CDATA[Klik op deze knop of druk op <font color="#FFFF00">P</font> om het spel te pauzeren en het menu te openen.]]></txt>
<txt id="step9_1">In elk nieuw level worden er nieuwe eenheden en speciale krachten geintroduceerd.</txt>
<txt id="step10">Dat is alles, commandant! De basisbeginselen zijn nu bekend. Veel succes!</txt>
</tutopage>
<intropage>
<txt id="bu">Basiseenheid</txt>
<txt id="sp">Speciale kracht</txt>
<txt id="un1">soldaat met jachtgeweer</txt>
<txt id="ue1">Effectief tegen molotovcocktailwerper</txt>
<txt id="ue1_1">Zwak tegen soldaat met schild</txt>
<txt id="ue1_2">Normale aanvalseenheid met krachtig jachtgeweer</txt>
<txt id="un2">Molotovcocktailwerper </txt>
<txt id="ue2">Effectief tegen soldaat met schild</txt>
<txt id="ue2_1">Zwak tegen soldaat met jachtgeweer</txt>
<txt id="ue2_2">Nevenschade--raakt iedereen in de buurt, goed voor het beschadigen van het hoofdkwartier</txt>
<txt id="un3">Soldaat met schild</txt>
<txt id="ue3">Effectief tegen soldaat met jachtgeweer</txt>
<txt id="ue3_1">Zwak tegen molotovcocktailwerper</txt>
<txt id="ue3_2">Mobiele eenheid met een sterke verdediging, sterk op korte afstand</txt>
<txt id="un4">Sluipschutter</txt>
<txt id="ue4">Effectief tegen alle soldaten</txt>
<txt id="ue4_1">Zwak tegen hoofdkwartier</txt>
<txt id="ue4_2">Lange afstand, brengt veel schade toe</txt>
<txt id="un5">Bazookasoldaat</txt>
<txt id="ue5">Effectief tegen hoofdkwartier en bliksemtank</txt>
<txt id="ue5_1">Zwak tegen sluipschutter</txt>
<txt id="ue5_2">Antivoertuigeenheid met nevenschade bij gegroepeerde vijanden</txt>
<txt id="un6">Robot</txt>
<txt id="ue6">Effectief tegen vijandelijke robot</txt>
<txt id="ue6_1">Zwak tegen tank</txt>
<txt id="ue6_2">Laserstraal die meer schade aanricht naarmate de tijd verstrijkt. Als de eenheid wordt vernietigd, verschijnen er twee kleinere robots. </txt>
<txt id="un7">Bliksemtank</txt>
<txt id="ue7">Effectief tegen alle eenheden</txt>
<txt id="ue7_1">Zwak tegen hoofdkwartier</txt>
<txt id="ue7_2">Robuust experimenteel voertuig met krachtig bliksemkanon</txt>
<txt id="pn1">Bevel tot mobilisatie</txt>
<txt id="pe1">Verkort tijdelijk de productietijd</txt>
<txt id="pn2">Zelfmoordtruck</txt>
<txt id="pe2">Op hol geslagen truck die bij contact ontploft</txt>
<txt id="pn3">Tijdbom</txt>
<txt id="pe3">Krachtige tijdbom die overal kan worden geplaatst</txt>
<txt id="pn4">Luchtaanval</txt>
<txt id="pe4">Een groot aantal bijzonder explosieve granaten die zelfs de meest ervaren soldaten op hun knieen krijgen</txt>
<txt id="pn5">Manipulator</txt>
<txt id="pe5">Elitecommandant die vijandelijke eenheden hersenspoelt</txt>
<txt id="m1">Missie 1/5</txt>
<txt id="m1_1">Winkelcentrum van Yokobushi</txt>
<txt id="m2">Missie 2/5</txt>
<txt id="m2_1">Noordelijke metro</txt>
<txt id="m3">Missie 3/5</txt>
<txt id="m3_1">Gulden Centrumpark</txt>
<txt id="m4">Missie 4/5</txt>
<txt id="m4_1">Westerbrug</txt>
<txt id="m5">Missie 5/5</txt>
<txt id="m5_1">Buitenwijken</txt>
</intropage>
<menupage>
<txt id="options">Opties</txt>
<txt id="retry">Opnieuw</txt>
<txt id="exit">Afsluiten</txt>
<txt id="htp">Het spel</txt>
<txt id="resume">Doorspelen</txt>
</menupage>
<losepage>
<txt id="mf">Missie mislukt</txt>
<txt id="du">Duur</txt>
<txt id="cu">Aangemaakte eenheden:</txt>
<txt id="ku">Gedode eenheden:</txt>
<txt id="lu">Verloren eenheden:</txt>
<txt id="li">Leven:</txt>
<txt id="sc">Score:</txt>
<txt id="re">Opnieuw</txt>
<txt id="mm">Hoofdmenu</txt>
<txt id="mc">Missie volbracht</txt>
</losepage>
<finalpage>
<txt id="cong"><![CDATA[Gefeliciteerd! <br>Yokimado is gered dankzij jouw uitzonderlijke leiderschap.]]></txt>
<txt id="score">Score</txt>
<txt id="in">Vul je naam in</txt>
<txt id="ss">Score verzenden</txt>
<txt id="cr">De makers</txt>
<txt id="new">Nieuw</txt>
<txt id="gd">Spelontwerp</txt>
<txt id="aw">Vormgeving</txt>
<txt id="pg">Programmeerwerk</txt>
<txt id="close">Sluiten</txt>
</finalpage>
</languages>
;
public static var language4:XML = <languages>
<startpage>
<txt id="ngBtn">Nouveau jeu</txt>
<txt id="cgBtn">Continuer le jeu</txt>
<txt id="htpBtn">Instructions</txt>
<txt id="tuBtn">Cours d'instructions</txt>
<txt id="scoreBtn">Meilleurs scores</txt>
<txt id="optBtn">Options</txt>
<txt id="playMore">Jouer à plus de jeux de stratégie sur</txt>
</startpage>
<learnpage>
<txt id="topTxt">Bienvenue à City Invasion ! Pour gagner, il faut détruire le Quartier Général de l'ennemi avant qu'il ne détruise le vôtre.</txt>
<txt id="cBtn">Retour</txt>
<txt id="unitExp"><![CDATA[Appuyez sur les flèches de <font color="#FFFFFF">gauche/droite</font> pour faire défiler les options (indiquées par un cadre rouge). Cliquez sur une icône ou bien appuyez sur la <font color="#FFFFFF">barre d'espace</font> pour créer une unité ou pour utiliser des pouvoirs spéciaux.]]></txt>
<txt id="specialExp"><![CDATA[Appuyez sur les flèches de <font color="#FFFFFF">gauche/droite</font> pour faire défiler les options (indiquées par un cadre rouge). Cliquez sur une icône ou bien appuyez sur la <font color="#FFFFFF">barre d'espace</font> pour créer une unité ou pour utiliser des pouvoirs spéciaux.]]></txt>
<txt id="lifeBarExp">Indique les points de vie de votre QG.</txt>
<txt id="menuExp">Cliquez sur ce bouton ou bien appuyez sur 'P' pour accéder au menu d'options.</txt>
<txt id="lanesExp"><![CDATA[Le champ de bataille a cinq passages. Les flèches indiquent celui où vous vous trouvez. Cliquez sur le champ de bataille ou bien cliquez sur les flèches <font color="#FFFFFF">haut/bas</font> pour changer de passage.]]></txt>
<txt id="showLifeExp"><![CDATA[Appuyez sur la touche <font color="#FFFFFF">maj</font> pour voir les points de vie des différentes unités.]]></txt>
</learnpage>
<scorepage>
<txt id="continue">Continuer</txt>
<txt id="a10">Plus de stratégie sur </txt>
</scorepage>
<optpage>
<txt id="options">Options</txt>
<txt id="vq">QUALITé VISUELLE</txt>
<txt id="se">EFFETS SONORES</txt>
<txt id="m">MUSIQUE</txt>
<txt id="back">Retour</txt>
<txt id="high">HAUTE</txt>
<txt id="medium">NORMALE</txt>
<txt id="low">BASSE</txt>
<txt id="on">ACTIVé</txt>
<txt id="off">DéSACTIVé</txt>
</optpage>
<choosepage>
<txt id="txt">Êtes-vous sûr(e) de vouloir passer le cours d'instructions et engager la première bataille ?</txt>
<txt id="yes">Oui</txt>
<txt id="no">Non</txt>
</choosepage>
<tutopage>
<txt id="st">Passer le cours d'instructions</txt>
<txt id="step0">Bienvenue à City Invasion, mon Commandant ! La capitale mondiale Yokimado a été détruite par un tremblement de terre. Des intrus essayent de prendre le contrôle sur la ville. C'est à vous de prendre la direction des troupes et de défendre la ville !</txt>
<txt id="step0_1">Ce cours d'instructions vous guidera à travers les notions fondamentales avant que vous vous engagiez dans la bataille !</txt>
<txt id="step1"><![CDATA[Le QG des ennemis a envoyé un <font color="#FFFF00">lanceur de cocktails Molotov</font> pour nous attaquer. Pour défendre notre QG, cliquez sur l'icône du <font color="#FFFF00">soldat à fusil à pompe</font> ou bien appuyez sur la <font color="#FFFF00">barre d'espace</font> pour créer une unité de défense. <font color="#FFFF00">Les soldats à fusil à pompe</font> sont très efficaces contre <font color="#FFFF00">les lanceurs de cocktails Molotov</font>.]]></txt>
<txt id="step2"><![CDATA[Ces flèches indiquent dans quel passage vous vous trouvez. L'unité ennemie est apparue sur le passage tout en bas. Essayez de cliquer sur le bas du champ de bataille ou bien utilisez les flèches du <font color="#FFFF00">bas/haut</font> pour sélectionner ce passage.]]></txt>
<txt id="step2_1">Sélectionnez ce passage</txt>
<txt id="step3"><![CDATA[Bien joué ! L'ennemi a envoyé un <font color="#FFFF00">soldat avec un bouclier</font>. Un <font color="#FFFF00">lanceur de cocktails Molotov</font> serait la meilleure unité de défense. Pour la créer, cliquez sur son icône (ou bien appuyez sur les flèches de <font color="#FFFF00">gauche/droite</font> en combinaison avec la <font color="#FFFF00">barre d'espace</font>)]]>.</txt>
<txt id="step4"><![CDATA[Commencez par sélectionner le bon passage. Créez un soldat à bouclier pour affronter le <font color="#FFFF00">soldat ennemi à fusil à pompe</font>. Appuyez sur la touche <font color="#FFFF00">maj</font> pour voir tous les points de vie des unités ennemies.]]></txt>
<txt id="step5">Comme vous voyez, il est très important de comprendre toutes les forces et les faiblesses de chaque unité !</txt>
<txt id="step6"><![CDATA[Ce pouvoir spécial est appelé <font color="#FFFF00">Ordre de mobilisation</font>. Cliquez sur cette icône pour augmenter votre vitesse de création pour une courte période. Essayez donc !]]></txt>
<txt id="step7">Maintenant, créez quelques unités pour voir comme ça va vite !</txt>
<txt id="step8">Voici la barre de points de vie de votre QG. Si elle tombe à 0, vous avez perdu la bataille.</txt>
<txt id="step8_1">Voici la barre de points de vie du QG de l'ennemi. Si elle tombe à 0, vous avez gagné la bataille.</txt>
<txt id="step9"><![CDATA[Cliquez sur ce bouton ou bien appuyez sur <font color="#FFFF00">'P'</font> pour faire une pause et ouvrir le menu.]]></txt>
<txt id="step9_1">Remarquez qu'il y aura de nouvelles unités et de nouveaux pouvoirs spéciaux à chaque nouveau niveau. </txt>
<txt id="step10">Et voilà tout, mon Commandant ! Vous connaissez maintenant les principes de base. Bonne chance !</txt>
</tutopage>
<intropage>
<txt id="bu">Unité de base</txt>
<txt id="sp">Pouvoirs spéciaux</txt>
<txt id="un1">Soldat à fusil à pompe</txt>
<txt id="ue1">Efficace contre les lanceurs de cocktails Molotov</txt>
<txt id="ue1_1">Peu efficace contre les soldats à bouclier</txt>
<txt id="ue1_2">Attaque de base à l'aide d'un fusil à pompe puissant</txt>
<txt id="un2">Lanceur de cocktails Molotov</txt>
<txt id="ue2">Efficace contre les soldats à bouclier</txt>
<txt id="ue2_1">Peu efficace contre les soldats à fusil à pompe</txt>
<txt id="ue2_2">Dégats de zone--blesse tous ceux qui se trouvent dans les parages, bien pour causer des dégats au QG</txt>
<txt id="un3">Soldat à bouclier</txt>
<txt id="ue3">Efficace contre les soldats à fusil à pompe</txt>
<txt id="ue3_1">Peu efficace contre les lanceurs de cocktails Molotov</txt>
<txt id="ue3_2">Unité anti-émeute avec une forte défense, puissante à courte distance</txt>
<txt id="un4">Tireur d'élite</txt>
<txt id="ue4">Efficace contre tous les soldats</txt>
<txt id="ue4_1">Peu efficace contre les QG</txt>
<txt id="ue4_2">Inflige à long terme des dommages importants</txt>
<txt id="un5">Soldat à bazooka</txt>
<txt id="ue5">Efficace contre les QG et contre les tanks éclairs</txt>
<txt id="ue5_1">Peu efficace contre les tireurs d'élite</txt>
<txt id="ue5_2">Unité anti-véhicule avec dégat de zone sur les groupes d'ennemis</txt>
<txt id="un6">Robot</txt>
<txt id="ue6">Efficace contre les robots ennemis</txt>
<txt id="ue6_1">Peu efficace contre les tanks</txt>
<txt id="ue6_2">Rayon laser qui cause plus de dégats avec le temps. Lorsqu'il est détruit, deux petits robots apparaissent.</txt>
<txt id="un7">Tank éclair</txt>
<txt id="ue7">Efficace contre toutes les unités</txt>
<txt id="ue7_1">Peu efficace contre les QG</txt>
<txt id="ue7_2">Véhicule expérimental robuste avec un puissant canon à éclairs</txt>
<txt id="pn1">Ordre de mobilisation</txt>
<txt id="pe1">Réduit le temps de création pendant un court moment</txt>
<txt id="pn2">Camion suicide</txt>
<txt id="pe2">Camion saccageur qui explose sur impact</txt>
<txt id="pn3">Bombe à retardement</txt>
<txt id="pe3">Explosif à retardement puissant qui peut être placé n'importe où</txt>
<txt id="pn4">Raid aérien</txt>
<txt id="pe4">Un grand nombre d'obus hautement explosifs capables de faire tomber même les soldats les plus aguerris</txt>
<txt id="pn5">Maître à penser</txt>
<txt id="pe5">Commandant d'élite qui soumet les unités ennemies à un lavage de cerveau</txt>
<txt id="m1">Mission 1/5</txt>
<txt id="m1_1">Zone commerciale Yokobushi </txt>
<txt id="m2">Mission 2/5</txt>
<txt id="m2_1">Métro du Nord </txt>
<txt id="m3">Mission 3/5</txt>
<txt id="m3_1">Parc central doré </txt>
<txt id="m4">Mission 4/5</txt>
<txt id="m4_1">Pont occidental </txt>
<txt id="m5">Mission 5/5</txt>
<txt id="m5_1">Banlieue </txt>
</intropage>
<menupage>
<txt id="options">Options</txt>
<txt id="retry">Réessayer</txt>
<txt id="exit">Sortir</txt>
<txt id="htp">Instructions</txt>
<txt id="resume">Reprendre</txt>
</menupage>
<gamepage>
<txt id="menu">Menu</txt>
<txt id="eh">QG de l'ennemi</txt>
<txt id="yh">Votre QG</txt>
</gamepage>
<losepage>
<txt id="mf">Mission échouée</txt>
<txt id="du">Durée</txt>
<txt id="cu">Unités créées:</txt>
<txt id="ku">Unités détruites:</txt>
<txt id="lu">Unités perdues:</txt>
<txt id="li">Points de vie:</txt>
<txt id="sc">Score:</txt>
<txt id="re">Réessayer</txt>
<txt id="mm">Menu principal</txt>
<txt id="mc">Mission accomplie</txt>
</losepage>
<finalpage>
<txt id="cong"><![CDATA[Félicitations ! <br>Vous avez sauvé la ville de Yokimado grâce à votre stratégie exceptionnelle.]]></txt>
<txt id="score">Score</txt>
<txt id="in">Entrez votre nom</txt>
<txt id="ss">Enregistrer le score</txt>
<txt id="cr">Crédits</txt>
<txt id="new">Nouveau</txt>
<txt id="gd">Conception du jeu</txt>
<txt id="aw">Présentation graphique</txt>
<txt id="pg">Programmation</txt>
<txt id="close">Fermer</txt>
</finalpage>
</languages>
;
public static var language5:XML = <languages>
<startpage>
<txt id="ngBtn">Neues Spiel</txt>
<txt id="cgBtn">Spiel fortsetzen</txt>
<txt id="htpBtn">Anleitung</txt>
<txt id="tuBtn">Handbuch</txt>
<txt id="scoreBtn">Highscores</txt>
<txt id="optBtn">Optionen</txt>
<txt id="playMore">Spiele mehr Strategiespiele auf</txt>
</startpage>
<learnpage>
<txt id="topTxt">Willkommen bei City Invasion! Um zu gewinnen, musst du das feindliche Hauptquartier zerstören, bevor deins zerstört wird.</txt>
<txt id="cBtn">Zurück</txt>
<txt id="unitExp"><![CDATA[Drücke die Pfeiltasten <font color="#FFFFFF">links/rechts</font>, um durch die Optionen zu blättern (mit einem roten Rand hinterlegt). Klicke ein Symbol an oder drücke die <font color="#FFFFFF">Leertaste</font>, um eine Einheit zu bilden oder eine Spezialfähigkeit einzusetzen.]]></txt>
<txt id="specialExp"><![CDATA[Drücke die Pfeiltasten <font color="#FFFFFF">links/rechts</font>, um durch die Optionen zu blättern (mit einem roten Rand hinterlegt). Klicke ein Symbol an oder drücke die <font color="#FFFFFF">Leertaste</font>, um eine Einheit zu bilden oder eine Spezialfähigkeit einzusetzen.]]></txt>
<txt id="lifeBarExp">Zeigt den Zustand deines Hauptquartiers an.</txt>
<txt id="menuExp">Klicke diesen Button oder drücke "P", um das Optionsmenü zu öffnen.</txt>
<txt id="lanesExp"><![CDATA[Auf dem Schlachtfeld gibt es 5 Marschrouten. Die Pfeile zeigen an, auf welcher Route du dich gerade befindest. Klicke das Schlachtfeld an oder drücke die Pfeiltasten <font color="#FFFFFF">oben/unten</font>, um die Route zu ändern.]]></txt>
<txt id="showLifeExp"><![CDATA[Drücke <font color="#FFFFFF">Shift</font>, um dir den Zustand aller Einheiten anzusehen.]]></txt>
</learnpage>
<scorepage>
<txt id="continue">Weiter</txt>
<txt id="a10">Mehr Strategiespiele auf</txt>
</scorepage>
<optpage>
<txt id="options">Optionen</txt>
<txt id="vq">GRAFIKQUALITÄT</txt>
<txt id="se">SOUNDEFFEKTE</txt>
<txt id="m">MUSIK</txt>
<txt id="back">Zurück</txt>
<txt id="high">HOCH</txt>
<txt id="medium">NORMAL</txt>
<txt id="low">NIEDRIG</txt>
<txt id="on">AN</txt>
<txt id="off">AUS</txt>
</optpage>
<choosepage>
<txt id="txt">Sind Sie sicher, dass Sie das Tutorial überspringen und direkt zum Schlachtfeld gehen möchten?</txt>
<txt id="yes">Ja</txt>
<txt id="no">Nein</txt>
</choosepage>
<tutopage>
<txt id="st">Tutorial überspringen</txt>
<txt id="step0">Willkommen bei City Invasion, Commander! Die Welthauptstadt Yokimado wurde von einem Erdbeben zerstört. Aufständische versuchen, die Stadt unter ihre Kontrolle zu bringen. Sie müssen die Truppen anführen und die Stadt verteidigen!</txt>
<txt id="step0_1"><![CDATA[<br><br>Dieses Tutorial erläutert Ihnen die Grundlagen, damit Sie gut vorbereitet in die Schlacht ziehen können!]]></txt>
<txt id="step1"><![CDATA[Das feindliche Hauptquartier hat einen <font color="#FFFF00">Molotowcocktail-Werfer</font> geschickt, um uns anzugreifen. Um unser Hauptquartier zu verteidigen, müssen Sie das Symbol "<font color="#FFFF00">Soldat mit Gewehr</font>" anklicken oder die <font color="#FFFF00">Leertaste</font> drücken, um eine Verteidigungseinheit zu bilden. <font color="#FFFF00">Soldaten mit Gewehren</font> sind sehr effektiv gegen <font color="#FFFF00">Molotowcocktail-Werfer</font>.]]></txt>
<txt id="step2"><![CDATA[Diese Pfeile zeigen die aktuelle Marschroute an. Die feindliche Einheit ist auf der unteren Marschroute erschienen. Klicken Sie das untere Ende des Bildschirms an oder wählen Sie die Marschroute über die Pfeiltasten <font color="#FFFF00">oben/unten</font> aus.]]></txt>
<txt id="step2_1">Diese Marschroute auswählen</txt>
<txt id="step3"><![CDATA[Gut gemacht! Der Feind hat einen <font color="#FFFF00">Soldaten mit Schutzschild</font> geschickt. Ein <font color="#FFFF00">Molotowcocktail-Werfer</font> wäre hierfür die beste Verteidigungseinheit. Klicken Sie das betreffende Symbol an (oder drücken Sie die Pfeiltasten <font color="#FFFF00">links/rechts</font> zusammen mit der <font color="#FFFF00">Leertaste</font>), um diese Einheit zu bilden.]]></txt>
<txt id="step4"><![CDATA[Wählen Sie zuerst die korrekte Marschroute aus. Bilden Sie eine Einheit "<font color="#FFFF00">Soldat mit Schutzschild</font>" zur Verteidigung gegen den feindlichen <font color="#FFFF00">Soldaten mit Gewehr</font>. Drücken Sie <font color="#FFFF00">Shift</font>, um sich die Zustände aller Einheiten anzusehen.]]></txt>
<txt id="step5">Wie Sie sehen, ist es sehr wichtig, die Stärken und Schwächen jeder Einheit zu kennen!</txt>
<txt id="step6"><![CDATA[Diese Spezialfähigkeit nennt sich <font color="#FFFF00">"Mobilisierungsbefehl"</font>. Wenn Sie dieses Symbol anklicken, werden Einheiten für einen kurzen Zeitraum schneller gebildet. Probieren Sie es aus!]]></txt>
<txt id="step7">Bilden Sie nun einige Einheiten und sehen Sie selbst, wie schnell es geht!</txt>
<txt id="step8">Dies ist die Zustandsanzeige Ihres Hauptquartiers. Wenn sie auf 0 sinkt, haben Sie die Schlacht verloren.</txt>
<txt id="step8_1">Dies ist die Zustandsanzeige des feindlichen Hauptquartiers. Wenn sie auf 0 sinkt, haben Sie die Schlacht gewonnen.</txt>
<txt id="step9"><![CDATA[Klicken Sie diesen Button oder drücken Sie <font color="#FFFF00">P</font>, um das Spiel anzuhalten und das Menü zu öffnen.]]></txt>
<txt id="step9_1">Hinweis: In jedem Level werden neue Einheiten und Spezialfähigkeiten vorgestellt.</txt>
<txt id="step10">Das ist alles, Commander! Jetzt wissen Sie, was Sie wissen müssen. Viel Glück!</txt>
</tutopage>
<intropage>
<txt id="bu">Einfache Einheit</txt>
<txt id="sp">Spezialfähigkeit</txt>
<txt id="un1">Soldat mit Gewehr</txt>
<txt id="ue1">Effektiv gegen Molotowcocktail-Werfer</txt>
<txt id="ue1_1">Schwach gegen Soldat mit Schutzschild</txt>
<txt id="ue1_2">Einfache Angriffseinheit mit durchschlagskräftigem Gewehr</txt>
<txt id="un2">Molotowcocktail-Werfer</txt>
<txt id="ue2">Effektiv gegen Soldat mit Schutzschild</txt>
<txt id="ue2_1">Schwach gegen Soldat mit Gewehr</txt>
<txt id="ue2_2">Flächenschaden - verletzt alle, die in unmittelbarer Umgebung stehen, eignet sich gut für den Angriff auf das Hauptquartier</txt>
<txt id="un3">Soldat mit Schutzschild</txt>
<txt id="ue3">Effektiv gegen Soldat mit Gewehr</txt>
<txt id="ue3_1">Schwach gegen Molotowcocktail-Werfer</txt>
<txt id="ue3_2">Einheit zur Bekämpfung von Unruhen mit starkem Verteidigungswert, auf kurze Reichweite effektiv</txt>
<txt id="un4">Scharfschütze</txt>
<txt id="ue4">Effektiv gegen alle Soldaten</txt>
<txt id="ue4_1">Schwach gegen Hauptquartiere</txt>
<txt id="ue4_2">Große Reichweite und hoher Schaden</txt>
<txt id="un5">Soldat mit Bazooka</txt>
<txt id="ue5">Effektiv gegen Hauptquartiere und Blitzpanzer</txt>
<txt id="ue5_1">Schwach gegen Scharfschützen</txt>
<txt id="ue5_2">Einheit zur Bekämpfung von Fahrzeugen mit Flächenschaden bei Gruppen von Feinden</txt>
<txt id="un6">Roboter</txt>
<txt id="ue6">Effektiv gegen feindliche Roboter</txt>
<txt id="ue6_1">Schwach gegen Panzer</txt>
<txt id="ue6_2">Laserstrahl, der mit der Zeit immer mehr Schaden anrichtet. Wenn er zerstört wird, entstehen zwei kleinere Roboter</txt>
<txt id="un7">Blitzpanzer</txt>
<txt id="ue7">Effektiv gegen alle Einheiten</txt>
<txt id="ue7_1">Schwach gegen Hauptquartiere</txt>
<txt id="ue7_2">Robustes experimentelles Fahrzeug mit durchschlagskräftiger Blitzkanone</txt>
<txt id="pn1">Mobilisierungsbefehl</txt>
<txt id="pe1">Reduziert kurzfristig die Produktionszeit</txt>
<txt id="pn2">Park am Goldzentrum</txt>
<txt id="pe2">Lastwagen, der bei Kontakt detoniert</txt>
<txt id="pn3">Zeitbombe</txt>
<txt id="pe3">Durchschlagskräftige Zeitbombe, die überall platziert werden kann</txt>
<txt id="pn4">Luftangriff</txt>
<txt id="pe4">Eine große Anzahl hoch explosiver Granaten zwingt auch die erfahrensten Soldaten in die Knie</txt>
<txt id="pn5">Gehirnwäscher</txt>
<txt id="pe5">Elite-Commander, der bei feindlichen Einheiten eine Gehirnwäsche durchführt</txt>
<txt id="m1">Mission 1/5</txt>
<txt id="m1_1">Einkaufszentrum Yokobushi</txt>
<txt id="m2">Mission 2/5</txt>
<txt id="m2_1">Nördliche U-Bahn</txt>
<txt id="m3">Mission 3/5</txt>
<txt id="m3_1">Park am Goldzentrum</txt>
<txt id="m4">Mission 4/5</txt>
<txt id="m4_1">Westliche Brücke</txt>
<txt id="m5">Mission 5/5</txt>
<txt id="m5_1">Außenbezirke</txt>
</intropage>
<menupage>
<txt id="options">Optionen</txt>
<txt id="retry">Nochmal versuchen</txt>
<txt id="exit">Exit</txt>
<txt id="htp">Anleitung</txt>
<txt id="resume">Weitermachen</txt>
</menupage>
<gamepage>
<txt id="menu">Menü</txt>
<txt id="eh">Feindliches Hauptquartier</txt>
<txt id="yh">Dein Hauptquartier</txt>
</gamepage>
<losepage>
<txt id="mf">Mission fehlgeschlagen</txt>
<txt id="du">Dauer</txt>
<txt id="cu">Gebildete Einheiten:</txt>
<txt id="ku">Getötete Einheiten:</txt>
<txt id="lu">Verlorene Einheiten:</txt>
<txt id="li">Leben:</txt>
<txt id="sc">Punkte:</txt>
<txt id="re">Nochmal versuchen</txt>
<txt id="mm">Hauptmenü</txt>
<txt id="mc">Mission beendet</txt>
</losepage>
<finalpage>
<txt id="cong"><![CDATA[Glückwunsch! <br>Die Stadt Yokimado konnte dank Ihrer großartigen strategischen Führung gerettet werden.]]></txt>
<txt id="score">Punkte</txt>
<txt id="in">Gib deinen Namen ein</txt>
<txt id="ss">Punkte eintragen</txt>
<txt id="cr">Credits</txt>
<txt id="new">Neu</txt>
<txt id="gd">Spieldesign</txt>
<txt id="aw">Bildgestaltung</txt>
<txt id="pg">Programmierung</txt>
<txt id="close">Schließen</txt>
</finalpage>
</languages>
;
public static var language6:XML = <languages>
<startpage>
<txt id="ngBtn">Nueva partida</txt>
<txt id="cgBtn">Continuar partida</txt>
<txt id="htpBtn">Cómo jugar</txt>
<txt id="tuBtn">Tutorial</txt>
<txt id="scoreBtn">Puntuaciones máximas</txt>
<txt id="optBtn">Opciones</txt>
<txt id="playMore">Juega a más juegos de estrategia en</txt>
</startpage>
<learnpage>
<txt id="topTxt">¡Bienvenido a City Invasion! La victoria reside en destruir el cuartel enemigo antes de que destruyan el tuyo.</txt>
<txt id="cBtn">Atrás</txt>
<txt id="unitExp"><![CDATA[Pulsa <font color="#FFFFFF">izquierda/derecha</font> para ver las opciones (marcadas con un borde rojo). Haz clic en un icono o pulsa <font color="#FFFFFF">espacio</font> para crear una unidad o usar un poder especial.]]></txt>
<txt id="specialExp"><![CDATA[Pulsa <font color="#FFFFFF">izquierda/derecha</font> para ver las opciones (marcadas con un borde rojo). Haz clic en un icono o pulsa <font color="#FFFFFF">espacio</font> para crear una unidad o usar un poder especial.]]></txt>
<txt id="lifeBarExp">Muestra la barra de vida de tu cuartel.</txt>
<txt id="menuExp">Haz clic en este botón o pulsa 'P' para ir al menú de opciones.</txt>
<txt id="lanesExp"><![CDATA[En el campo de batalla hay cinco franjas. Las flechas muestran en qué franja estás. Haz clic en el campo de batalla o pulsa <font color="#FFFFFF">arriba/abajo</font> para cambiar de franja.]]></txt>
<txt id="showLifeExp"><![CDATA[Pulsa <font color="#FFFFFF">Mayús</font> para ver la barra de vida de todas las unidades.]]></txt>
</learnpage>
<scorepage>
<txt id="continue">Continuar</txt>
<txt id="a10">Más estrategia en</txt>
</scorepage>
<optpage>
<txt id="options">Opciones</txt>
<txt id="vq">CALIDAD VISUAL</txt>
<txt id="se">EFECTOS DE SONIDO</txt>
<txt id="m">MÚSICA</txt>
<txt id="back">Atrás</txt>
<txt id="high">ALTA</txt>
<txt id="medium">NORMAL</txt>
<txt id="low">BAJA</txt>
<txt id="on">SÍ</txt>
<txt id="off">NO</txt>
</optpage>
<choosepage>
<txt id="txt">¿Seguro que quieres saltar el tutorial e ir directamente a la primera batalla?</txt>
<txt id="yes">Sí</txt>
<txt id="no">No</txt>
</choosepage>
<tutopage>
<txt id="st">Saltar tutorial</txt>
<txt id="step0">¡Bienvenido a City Invasion, Comandante! Toda la ciudad de Yokimado ha sido devastada por un terremoto. Hay invasores intentando hacerse con el control de la ciudad. ¡Tu misión es dirigir las tropas y defender la ciudad!</txt>
<txt id="step0_1">¡Este tutorial te enseñará lo básico antes de entrar en combate!</txt>
<txt id="step1"><![CDATA[¡El cuartel enemigo ha enviado a un <font color="#FFFF00">lanzador de cóctel molotov</font> para atacarnos! Para defender nuestro cuartel, haz clic en el icono del <font color="#FFFF00">soldado con escopeta</font> o pulsa <font color="#FFFF00">espacio</font> para crear una unidad de defensa. <font color="#FFFF00">Los soldados con escopeta</font> son muy efectivos contra los <font color="#FFFF00">lanzadores de cóctel molotov</font>.]]></txt>
<txt id="step2"><![CDATA[Estas flechas indican en qué franja te encuentras. La unidad enemiga ha aparecido en la franja inferior. Intenta hacer clic en la parte inferior del campo de batalla o usa <font color="#FFFF00">arriba/abajo</font> para seleccionar esa franja.]]></txt>
<txt id="step2_1">Selecciona esta franja.</txt>
<txt id="step3"><![CDATA[¡Buen trabajo! El enemigo ha enviado a un <font color="#FFFF00">soldado con escudo</font>. Un <font color="#FFFF00">lanzador de cóctel molotov</font> sería la mejor unidad de defensa. Haz clic en su icono (o usa <font color="#FFFF00">izquierda/derecha</font> junto con <font color="#FFFF00">espacio</font>) para crearla.]]></txt>
<txt id="step4"><![CDATA[Primero selecciona la franja correcta. Crea un <font color="#FFFF00">soldado con escudo</font> para enfrentarse al <font color="#FFFF00">soldado con escopeta</font> enemigo. Pulsa <font color="#FFFF00">Mayús</font> para ver las barras de vida de todas las unidades.]]></txt>
<txt id="step5">Como puedes ver, es muy importante conocer los puntos débiles y fuertes de cada unidad.</txt>
<txt id="step6"><![CDATA[Este poder especial se llama <font color="#FFFF00">Orden de movilización</font>. Haz clic en este icono para aumentar la velocidad de creación durante un corto periodo. ¡Pruébalo!]]></txt>
<txt id="step7">¡Ahora crea algunas unidades y mira lo rápido que van!</txt>
<txt id="step8">Esta es la barra de vida de tu cuartel. Si llega a 0, perderás la batalla.</txt>
<txt id="step8_1">Esta es la barra de vida del cuartel enemigo. Si llega a 0, ganarás la batalla.</txt>
<txt id="step9"><![CDATA[Haz clic en este botón o pulsa <font color="#FFFF00">'P'</font> para pausar el juego y abrir el menú.]]></txt>
<txt id="step9_1">Fíjate que en cada nivel aparecerán unidades y poderes especiales nuevos. </txt>
<txt id="step10">¡Eso es todo, Comandante! Ya sabes lo básico. ¡Buena suerte!</txt>
</tutopage>
<intropage>
<txt id="bu">Unidad básica</txt>
<txt id="sp">Poder especial</txt>
<txt id="un1">Soldado con escopeta</txt>
<txt id="ue1">Efectivo contra lanzador de cóctel molotov</txt>
<txt id="ue1_1">Débil contra soldado con escudo</txt>
<txt id="ue1_2">Unidad de ataque básica con una poderosa escopeta</txt>
<txt id="un2">Lanzador de cóctel molotov</txt>
<txt id="ue2">Efectivo contra soldado con escudo</txt>
<txt id="ue2_1">Débil contra soldado con escopeta</txt>
<txt id="ue2_2">Daña a todo el que se encuentre en su área de alcance. Bueno para dañar cuarteles.</txt>
<txt id="un3">Soldado con escudo</txt>
<txt id="ue3">Efectivo contra soldado con escopeta</txt>
<txt id="ue3_1">Débil contra lanzador de cóctel molotov</txt>
<txt id="ue3_2">Unidad antidisturbios con una defensa fuerte, poderosa a corta distancia.</txt>
<txt id="un4">Francotirador</txt>
<txt id="ue4">Efectivo contra todos los soldados.</txt>
<txt id="ue4_1">Débil contra cuarteles.</txt>
<txt id="ue4_2">Gran alcance e inflige mucho daño.</txt>
<txt id="un5">Soldado con bazuca</txt>
<txt id="ue5">Efectivo contra cuarteles y tanques de rayos.</txt>
<txt id="ue5_1">Débil contra francotiradores.</txt>
<txt id="ue5_2">Unidad antivehículo que causa daño a grupos de enemigos.</txt>
<txt id="un6">Robot</txt>
<txt id="ue6">Efectivo contra cualquier robot enemigo.</txt>
<txt id="ue6_1">Débil contra tanques.</txt>
<txt id="ue6_2">Rayo láser que causa más daño con el tiempo. Cuando se destruye, emergen dos robots más pequeños.</txt>
<txt id="un7">Tanque de rayos</txt>
<txt id="ue7">Efectivo contra todas las unidades.</txt>
<txt id="ue7_1">Débil contra cuarteles.</txt>
<txt id="ue7_2">Vehículo experimental que dispara poderosos rayos.</txt>
<txt id="pn1">Orden de movilización</txt>
<txt id="pe1">Reduce el tiempo de producción durante un corto periodo</txt>
<txt id="pn2">Camión suicida</txt>
<txt id="pe2">Camión devastador que detona con el impacto.</txt>
<txt id="pn3">Bomba de tiempo</txt>
<txt id="pe3">Poderoso explosivo temporizado que puede colocarse en cualquier parte.</txt>
<txt id="pn4">Ataque aéreo</txt>
<txt id="pe4">Un gran número de proyectiles de alto poder explosivo que harán temblar hasta a los soldados más experimentados.</txt>
<txt id="pn5">Mente maestra</txt>
<txt id="pe5">Comandante de élite que lava el cerebro de las unidades enemigas.</txt>
<txt id="m1">Misión 1/5</txt>
<txt id="m1_1">Distrito comercial Yokobushi</txt>
<txt id="m2">Misión 2/5</txt>
<txt id="m2_1">Metro norte</txt>
<txt id="m3">Misión 3/5</txt>
<txt id="m3_1">Parque central dorado</txt>
<txt id="m4">Misión 4/5</txt>
<txt id="m4_1">Puente oeste</txt>
<txt id="m5">Misión 5/5</txt>
<txt id="m5_1">Afueras</txt>
</intropage>
<menupage>
<txt id="options">Opciones</txt>
<txt id="retry">Volver a intentar</txt>
<txt id="exit">Salir</txt>
<txt id="htp">Cómo jugar</txt>
<txt id="resume">Reanudar</txt>
</menupage>
<gamepage>
<txt id="menu">Menú</txt>
<txt id="eh">Cuartel enemigo</txt>
<txt id="yh">Tu cuartel</txt>
</gamepage>
<losepage>
<txt id="mf">Misión fallida</txt>
<txt id="du">Duración</txt>
<txt id="cu">Unidades creadas:</txt>
<txt id="ku">Unidades eliminadas:</txt>
<txt id="lu">Unidades perdidas:</txt>
<txt id="li">Vida:</txt>
<txt id="sc">Puntuación:</txt>
<txt id="re">Volver a intentar</txt>
<txt id="mm">Menú principal</txt>
<txt id="mc">Misión cumplida</txt>
</losepage>
<finalpage>
<txt id="cong"><![CDATA[¡Enhorabuena! <br>La ciudad de Yokimado se ha salvado gracias a tu excepcional liderazgo.]]></txt>
<txt id="score">Puntuación</txt>
<txt id="in">Escribe tu nombre</txt>
<txt id="ss">Enviar puntuación</txt>
<txt id="cr">Créditos</txt>
<txt id="new">Nuevo</txt>
<txt id="gd">Diseño del juego</txt>
<txt id="aw">Diseño</txt>
<txt id="pg">Programación</txt>
<txt id="close">Cerrar</txt>
</finalpage>
</languages>
;
public static var language7:XML = <languages>
<startpage>
<txt id="ngBtn">Novo jogo</txt>
<txt id="cgBtn">Continuar jogo</txt>
<txt id="htpBtn">Como jogar</txt>
<txt id="tuBtn">Instruções</txt>
<txt id="scoreBtn">Recordes</txt>
<txt id="optBtn">Opções</txt>
<txt id="playMore">Experimente mais jogos de estratégia em</txt>
</startpage>
<learnpage>
<txt id="topTxt">Bem-vindo a City Invasion! Seja vitorioso destruindo o quartel-general dos inimigos antes que destruam o seu.</txt>
<txt id="cBtn">Anterior</txt>
<txt id="unitExp"><![CDATA[Pressione <font color="#FFFFFF">Esquerda/Direita</font> para navegar pelas opções (indicadas com um contorno vermelho). Clique em um ícone ou pressione a barra de <font color="#FFFFFF">espaço</font> para criar uma unidade ou usar um poder especial.]]></txt>
<txt id="specialExp"><![CDATA[Pressione <font color="#FFFFFF">Esquerda/Direita</font> para navegar pelas opções (indicadas com um contorno vermelho). Clique em um ícone ou pressione a barra de <font color="#FFFFFF">espaço</font> para criar uma unidade ou usar um poder especial.]]></txt>
<txt id="lifeBarExp">Mostra a barra de vida do seu quartel-general.</txt>
<txt id="menuExp">Clique neste botão ou pressione "P" para entrar no menu de opções.</txt>
<txt id="lanesExp"><![CDATA[Existem marcadores no campo de batalha. As setas mostram em que posição você está. Clique no campo de batalha ou pressione <font color="#FFFFFF">Para cima/Para baixo</font> para mudar de posição.]]></txt>
<txt id="showLifeExp"><![CDATA[Pressione <font color="#FFFFFF">Shift</font> para mostrar a barra de vida de todas as unidades.]]></txt>
</learnpage>
<scorepage>
<txt id="continue">Continuar</txt>
<txt id="a10">Mais estratégia em</txt>
</scorepage>
<optpage>
<txt id="options">Opções</txt>
<txt id="vq">QUALIDADE</txt>
<txt id="se">EFEITOS SONOROS</txt>
<txt id="m">MÚSICA</txt>
<txt id="back">Anterior</txt>
<txt id="high">ÓTIMA</txt>
<txt id="medium">NORMAL</txt>
<txt id="low">POBRE</txt>
<txt id="on">LIGADO</txt>
<txt id="off">DESLIGADO</txt>
</optpage>
<choosepage>
<txt id="txt">Tem certeza de que deseja pular o tutorial e seguir para a primeira batalha?</txt>
<txt id="yes">Sim</txt>
<txt id="no">Não</txt>
</choosepage>
<tutopage>
<txt id="st">Pular tutorial</txt>
<txt id="step0">Bem-vindo a City Invasion, comandante! A capital de Yokimado foi destruída por um terremoto. Forasteiros estão tentando tomar conta da cidade. Cabe a você liderar as tropas e defender a cidade!</txt>
<txt id="step0_1">Este tutorial ensinará os comandos básicos antes de você iniciar a batalha!</txt>
<txt id="step1"><![CDATA[O quartel-general inimigo enviou um atirador de <font color="#FFFF00">coquetel molotov</font> para nos atacar. Para defender nosso quartel-general, clique no ícone do <font color="#FFFF00">soldado com fuzil</font> ou pressione a <font color="#FFFF00">barra de espaço</font> para criar uma unidade de defesa. Os <font color="#FFFF00">soldados com fuzis</font> são muito úteis contra os atiradores de <font color="#FFFF00">coquetel molotov</font>.]]></txt>
<txt id="step2"><![CDATA[Estas setas indicam em que posição você está. A unidade inimiga apareceu na parte inferior. Tente clicar na parte inferior do campo de batalha ou use <font color="#FFFF00">Para cima/Para baixo</font> para selecionar uma posição.]]></txt>
<txt id="step2_1">Selecionar esta posição</txt>
<txt id="step3"><![CDATA[Bom trabalho! O inimigo enviou um <font color="#FFFF00">soldado com escudo</font>. Um atirador de <font color="#FFFF00">coquetel molotov</font> seria a melhor defesa. Clique no ícone desse personagem (ou use <font color="#FFFF00">Esquerda/Direita</font> junto com a <font color="#FFFF00">barra de espaço</font>) para criá-lo.]]></txt>
<txt id="step4"><![CDATA[Primeiro, selecione a posição correta. Crie um <font color="#FFFF00">soldado com escudo</font> para combater o <font color="#FFFF00">soldado com fuzil</font>. Pressione <font color="#FFFF00">Shift</font> para ver as barras de vida de todas as unidades.]]></txt>
<txt id="step5">Como você pode ver, é muito importante compreender todos os pontos fortes e as fraquezas de cada unidade!</txt>
<txt id="step6"><![CDATA[Este poder especial se chama <font color="#FFFF00">Ordem de Mobilização</font>. Clique no ícone para aumentar sua velocidade de construção por um breve período de tempo. Experimente!]]></txt>
<txt id="step7">Agora, crie algumas unidades e veja como tudo acontece rápido!</txt>
<txt id="step8">Esta é a barra de vida do seu quartel-general. Se chegar a 0, você perderá a batalha.</txt>
<txt id="step8_1">Esta é a barra de vida do quartel-general inimigo. Se chegar a 0, você vencerá a batalha.</txt>
<txt id="step9"><![CDATA[Clique neste botão ou pressione <font color="#FFFF00">P</font> para pausar o jogo e abrir o menu.]]></txt>
<txt id="step9_1">Observe que novas unidades e poderes especiais serão introduzidos a cada nível.</txt>
<txt id="step10">É isso, comandante! Agora você já conhece os comandos básicos. Boa sorte!</txt>
</tutopage>
<intropage>
<txt id="bu">Unidade básica</txt>
<txt id="sp">Poder especial</txt>
<txt id="un1">Soldado com fuzil</txt>
<txt id="ue1">Útil contra atiradores de coquetel molotov</txt>
<txt id="ue1_1">Fraco contra soldados com escudo</txt>
<txt id="ue1_2">Unidade básica de ataque com um fuzil potente</txt>
<txt id="un2">Atirador de coquetel molotov</txt>
<txt id="ue2">Útil contra soldados com escudo</txt>
<txt id="ue2_1">Fraco contra soldados com fuzil</txt>
<txt id="ue2_2">Dano por estilhaço. Pode ferir qualquer um que estiver por perto. Bom para destruir quartéis-generais.</txt>
<txt id="un3">Soldado com escudo</txt>
<txt id="ue3">Útil contra soldados com fuzil</txt>
<txt id="ue3_1">Fraco contra atiradores de coquetel molotov</txt>
<txt id="ue3_2">Unidade anti-invasão com uma boa defesa. Perfeita para combates de perto.</txt>
<txt id="un4">Atirador de elite</txt>
<txt id="ue4">Útil contra qualquer soldado</txt>
<txt id="ue4_1">Fraco contra quartéis-generais</txt>
<txt id="ue4_2">Longo alcance e dano elevado</txt>
<txt id="un5">Soldado com bazuca</txt>
<txt id="ue5">Útil contra quartéis-generais e tanques de raios</txt>
<txt id="ue5_1">Fraco contra atiradores de elite</txt>
<txt id="ue5_2">Unidade antiveículos com dano por estilhaço contra inimigos reunidos</txt>
<txt id="un6">Robô</txt>
<txt id="ue6">Útil contra os robôs inimigos</txt>
<txt id="ue6_1">Fraco contra tanques</txt>
<txt id="ue6_2">Laser que causa mais dano com o passar do tempo. Quando destruído, surgem dois robôs menores</txt>
<txt id="un7">Tanque de raios</txt>
<txt id="ue7">Útil contra todas as unidades</txt>
<txt id="ue7_1">Fraco contra quartéis-generais</txt>
<txt id="ue7_2">Veículo experimental resistente com uma poderosa arma que dispara raios</txt>
<txt id="pn1">Ordem de Mobilização</txt>
<txt id="pe1">Reduz o tempo de produção por um breve período</txt>
<txt id="pn2">Caminhão Suicida</txt>
<txt id="pe2">Caminhão de invasão que explode com o impacto</txt>
<txt id="pn3">Bomba-relógio</txt>
<txt id="pe3">Explosivo potente com contador de tempo que pode ser colocado em qualquer lugar</txt>
<txt id="pn4">Ataque Aéreo</txt>
<txt id="pe4">Um grande número de explosivos que deixa até mesmo o mais experiente entre os soldados de joelhos</txt>
<txt id="pn5">Paranormal</txt>
<txt id="pe5">Comandante de elite que faz uma lavagem cerebral nas unidades inimigas</txt>
<txt id="m1">Missão 1/5</txt>
<txt id="m1_1">Distrito de compras de Yokobushi</txt>
<txt id="m2">Missão 2/5</txt>
<txt id="m2_1">Metrô Norte</txt>
<txt id="m3">Missão 3/5</txt>
<txt id="m3_1">Parque Central</txt>
<txt id="m4">Missão 4/5</txt>
<txt id="m4_1">Ponte Oeste</txt>
<txt id="m5">Missão 5/5</txt>
<txt id="m5_1">Fronteira</txt>
</intropage>
<menupage>
<txt id="options">Opções</txt>
<txt id="retry">Tentar novamente</txt>
<txt id="exit">Sair</txt>
<txt id="htp">Como jogar</txt>
<txt id="resume">Retornar</txt>
</menupage>
<gamepage>
<txt id="menu">Menu</txt>
<txt id="eh">Quartel-general inimigo</txt>
<txt id="yh">Seu quartel-general</txt>
</gamepage>
<losepage>
<txt id="mf">Missão fracassada</txt>
<txt id="du">Duração</txt>
<txt id="cu">Unidades criadas:</txt>
<txt id="ku">Unidades mortas:</txt>
<txt id="lu">Unidades perdidas:</txt>
<txt id="li">Vida:</txt>
<txt id="sc">Pontuação:</txt>
<txt id="re">Tentar novamente</txt>
<txt id="mm">Menu principal</txt>
<txt id="mc">Missão cumprida</txt>
</losepage>
<finalpage>
<txt id="cong"><![CDATA[Parabéns!<br> A cidade de Yokimado foi salva graças à sua excelente liderança.]]></txt>
<txt id="score">Pontuação</txt>
<txt id="in">Digite seu nome</txt>
<txt id="ss">Enviar pontuação</txt>
<txt id="cr">Créditos</txt>
<txt id="new">Novo</txt>
<txt id="gd">Projeto</txt>
<txt id="aw">Arte</txt>
<txt id="pg">Programação</txt>
<txt id="close">Fechar</txt>
</finalpage>
</languages>
;
public static var language8:XML = <languages>
<startpage>
<txt id="ngBtn">Novo jogo</txt>
<txt id="cgBtn">Continuar jogo</txt>
<txt id="htpBtn">Como jogar</txt>
<txt id="tuBtn">Instruções</txt>
<txt id="scoreBtn">Pontuações mais altas</txt>
<txt id="optBtn">Opções</txt>
<txt id="playMore">Jogue mais jogos de estratégia em</txt>
</startpage>
<learnpage>
<txt id="topTxt">Bem-vindo(a) a City Invasion! Vence se conseguir destruir o Quartel General do Inimigo antes que este destrua o seu.</txt>
<txt id="cBtn">Retroceder</txt>
<txt id="unitExp"><![CDATA[Prima a <font color="#FFFFFF">Esquerda/Direita</font> para navegar pelas várias opções (assinaladas com uma linha vermelha). Clique num ícone ou prima a barra de <font color="#FFFFFF">espaços</font> para criar uma unidade ou usar um dos poderes especiais.]]></txt>
<txt id="specialExp"><![CDATA[Prima a <font color="#FFFFFF">Esquerda/Direita</font> para navegar pelas várias opções (assinaladas com uma linha vermelha). Clique num ícone ou prima a barra de <font color="#FFFFFF">espaços</font> para criar uma unidade ou usar um dos poderes especiais.]]></txt>
<txt id="lifeBarExp">Mostra a barra de vidas do seu quartel.</txt>
<txt id="menuExp">Clique neste botão ou prima 'P' para aceder ao menu de opções.</txt>
<txt id="lanesExp"><![CDATA[Existem várias avenidas no campo de batalha. As setas indicam aquela em que está. Clique no campo de batalha ou prima a <font color="#FFFFFF">Cima/Baixo</font> para mudar de rua.]]></txt>
<txt id="showLifeExp"><![CDATA[Prima <font color="#FFFFFF">Shift</font> para mostrar a barra de vidas de todas as unidades.]]></txt>
</learnpage>
<scorepage>
<txt id="continue">Continuar</txt>
<txt id="a10">Mais estratégia em</txt>
</scorepage>
<optpage>
<txt id="options">Opções</txt>
<txt id="vq">QUALIDADE VISUAL</txt>
<txt id="se">EFEITOS SONOROS</txt>
<txt id="m">MÚSICA</txt>
<txt id="back">Retroceder</txt>
<txt id="high">ÓPTIMA</txt>
<txt id="medium">NORMAL </txt>
<txt id="low">BAIXA</txt>
<txt id="on">LIGADO</txt>
<txt id="off">DESLIGADO</txt>
</optpage>
<choosepage>
<txt id="txt">Tem a certeza de que pretende mesmo passar o tutorial e iniciar directamente a sua primeira batalha?</txt>
<txt id="yes">Sim</txt>
<txt id="no">Não</txt>
</choosepage>
<tutopage>
<txt id="st">Passar tutorial</txt>
<txt id="step0">Bem-vindo(a) a City Invasion, Comandante! A capital global de Yokimado foi devastada por um tremor de terra. Um grupo de desconhecidos está a tentar controlar a cidade. Compete-lhe a si liderar as tropas e defendê-la!</txt>
<txt id="step0_1">Este tutorial explicar-lhe-à o básico do jogo antes de iniciar a batalha!</txt>
<txt id="step1"><![CDATA[O Quartel General inimigo enviou um Lançador de <font color="#FFFF00">Cocktails Molotov</font> para nos atacar. Para defender o nosso quartel general, clique no ícone do <font color="#FFFF00">Soldado com Espingarda</font> ou prima a <font color="#FFFF00">barra de espaços</font> para criar uma unidade de defesa. Os <font color="#FFFF00">Soldados com Espingarda</font> são muito eficientes contra os Lançadores de <font color="#FFFF00">Cocktails Molotov</font>.]]></txt>
<txt id="step2"><![CDATA[Estas setas indicam em que avenida se encontra. A unidade inimiga surgiu no fundo dessa rua. Tente clicar na base do campo de batalha ou use <font color="#FFFF00">Cima/Baixo</font> para seleccionar essa rua.]]></txt>
<txt id="step2_1">Seleccione esta rua</txt>
<txt id="step3"><![CDATA[Bom trabalho! O inimigo enviou um <font color="#FFFF00">Soldado com Escudo</font> de Protecção. Um Lançador de <font color="#FFFF00">Cocktails Molotov</font> seria a melhor unidade de defesa. Clique no seu ícone (ou use Esquerda/Direita em combinação com a <font color="#FFFF00">barra de espaços</font>) para o criar.]]></txt>
<txt id="step4"><![CDATA[Primeiro, seleccione a avenida correcta. Crie um <font color="#FFFF00">Soldado com Escudo</font> de Protecção para ir ao encontro do <font color="#FFFF00">Soldado com Espingarda</font>. Prima <font color="#FFFF00">Shift</font> para ver as barras de vida de todas as unidades.]]></txt>
<txt id="step5">Como pode constatar, é muito importante conhecer as forças e as fraquezas de cada uma das unidades!</txt>
<txt id="step6"><![CDATA[Este poder especial chama-se <font color="#FFFF00">Ordem de Mobilização</font>. Clique neste ícone para aumentar a sua velocidade de construção durante um curto espaço de tempo. Experimente!]]></txt>
<txt id="step7">Agora, crie algumas unidades e veja a rapidez com que funciona!</txt>
<txt id="step8">Esta é a barra da vida do seu quartel. Se chegar a 0, perderá a batalha.</txt>
<txt id="step8_1">Esta é a barra da vida do quartel general inimigo. Se chegar a 0, você ganhará a batalha.</txt>
<txt id="step9"><![CDATA[Clique neste botão ou prima <font color="#FFFF00">P</font> para fazer uma pausa no jogo e aceder ao menu de opções.]]></txt>
<txt id="step9_1">Tenha em conta que serão introduzidas novas unidades e novos poderes especiais em cada novo nível. </txt>
<txt id="step10">É tudo, Comandante! Agora já conhece as regras básicas. Boa sorte!</txt>
</tutopage>
<intropage>
<txt id="bu">Unidade Básica</txt>
<txt id="sp">Poder Especial</txt>
<txt id="un1">Soldado com Espingarda</txt>
<txt id="ue1">Eficiente contra o Lançador de Cocktails Molotov</txt>
<txt id="ue1_1">Fraco contra Soldado com Escudo de Protecção</txt>
<txt id="ue1_2">Unidade básica de ataque com uma poderosa arma</txt>
<txt id="un2">Lançador de Cocktails Molotov</txt>
<txt id="ue2">Eficiente contra o Soldado com Escudo de Protecção</txt>
<txt id="ue2_1">Fraco contra o Soldado com Espingarda</txt>
<txt id="ue2_2">Danos extensos. Magoa todos os que estiverem por perto. Bom para danificar quartéis.</txt>
<txt id="un3">Soldado com Escudo de Protecção</txt>
<txt id="ue3">Eficiente contra o Soldado com Espingarda</txt>
<txt id="ue3_1">Fraco contra o Lançador de Cocktails Molotov</txt>
<txt id="ue3_2">Unidade anti-motim com grande capacidade de defesa. Poderosa num raio de acção curto.</txt>
<txt id="un4">Franco-atirador</txt>
<txt id="ue4">Eficiente contra todos os soldados</txt>
<txt id="ue4_1">Fraco contra os quartéis generais</txt>
<txt id="ue4_2">Longo poder de alcance e grande capacidade de infligir dano.</txt>
<txt id="un5">Soldado Bazuca</txt>
<txt id="ue5">Eficiente contra os quartéis generais e o Tanque Relâmpago</txt>
<txt id="ue5_1">Fraco contra os Franco-atirador</txt>
<txt id="ue5_2">Unidade anti-veículo que causa danos variados em grupos inimigos</txt>
<txt id="un6">Robô</txt>
<txt id="ue6">Eficiente contra os inimigos robôs</txt>
<txt id="ue6_1">Fraco contra os tanques</txt>
<txt id="ue6_2">Feixe luminoso que vai causando mais danos à medida que o tempo vai passando. Quando é destruído, surgem dois robôs mais pequenos</txt>
<txt id="un7">Tanque Relâmpago</txt>
<txt id="ue7">Eficiente contra todas as unidades</txt>
<txt id="ue7_1">Fraco contra os quartéis generais</txt>
<txt id="ue7_2">Veículo experimental e rude com uma poderosa arma de feixes de luz</txt>
<txt id="pn1">Ordem de Mobilização</txt>
<txt id="pe1">Reduz o período de produção durante um curto período</txt>
<txt id="pn2">Camião suicida</txt>
<txt id="pe2">Veículo violento que explode com um impacto</txt>
<txt id="pn3">Bomba do Tempo</txt>
<txt id="pe3">Poderoso explosivo controlado que pode ser colocado em qualquer ponto</txt>
<txt id="pn4">Ataque Aéreo</txt>
<txt id="pe4">Um grande número de conchas altamente explosivas, que dão cabo até dos soldados mais experientes</txt>
<txt id="pn5">Mestre da Mente</txt>
<txt id="pe5">Comandante de elite que faz uma lavagem ao cérebro a todas as unidades inimigas</txt>
<txt id="m1">Missão 1/5</txt>
<txt id="m1_1">Yokobushi Shopping District</txt>
<txt id="m2">Missão 2/5</txt>
<txt id="m2_1">Metropolitano do Norte</txt>
<txt id="m3">Missão 3/5</txt>
<txt id="m3_1">Parque Central</txt>
<txt id="m4">Missão 4/5</txt>
<txt id="m4_1">Ponte Ocidental</txt>
<txt id="m5">Missão 5/5</txt>
<txt id="m5_1">Subúrbios</txt>
</intropage>
<menupage>
<txt id="options">Opções</txt>
<txt id="retry">Tentar novamente</txt>
<txt id="exit">Sair</txt>
<txt id="htp">Como jogar</txt>
<txt id="resume">Retomar</txt>
</menupage>
<gamepage>
<txt id="menu">Menu</txt>
<txt id="eh">O Quartel General do Inimigo</txt>
<txt id="yh">O seu Quartel General</txt>
</gamepage>
<losepage>
<txt id="mf">Missão falhada</txt>
<txt id="du">Duração</txt>
<txt id="cu">Unidades criadas:</txt>
<txt id="ku">Unidades mortas:</txt>
<txt id="lu">Unidades perdidas:</txt>
<txt id="li">Vida:</txt>
<txt id="sc">Pontuação:</txt>
<txt id="re">Tentar novamente</txt>
<txt id="mm">Menu principal</txt>
<txt id="mc">Missão concluída</txt>
</losepage>
<finalpage>
<txt id="cong"><![CDATA[Parabéns! <br>A cidade de Yokimado foi salva graças à sua liderança excepcional.]]></txt>
<txt id="score">Pontuação</txt>
<txt id="in">Escreva o seu nome</txt>
<txt id="ss">Enviar pontuação</txt>
<txt id="cr">Créditos</txt>
<txt id="new">Novo</txt>
<txt id="gd">Design do jogo</txt>
<txt id="aw">Arte(Produção)</txt>
<txt id="pg">Programação</txt>
<txt id="close">Fechar</txt>
</finalpage>
</languages>
;
public static var language9:XML = <languages>
<startpage>
<txt id="ngBtn">Nuovo gioco</txt>
<txt id="cgBtn">Continua il gioco</txt>
<txt id="htpBtn">Come giocare</txt>
<txt id="tuBtn">Tutorial</txt>
<txt id="scoreBtn">Punteggi più alti</txt>
<txt id="optBtn">Opzioni</txt>
<txt id="playMore">Gioca più giochi di strategia su</txt>
</startpage>
<learnpage>
<txt id="topTxt">Benvenuto su City Invasion! La vittoria consiste nel distruggere i quartieri generali nemici prima che loro distruggano i tuoi.</txt>
<txt id="cBtn">Indietro</txt>
<txt id="unitExp"><![CDATA[Premi i tasti freccia <font color="#FFFFFF">sinistra/destra</font> per far scorrere le opzioni (indicate con una linea di contorno rossa). Clicca su un'icona o premi la barra <font color="#FFFFFF">spaziatrice</font> per creare un'unità od usare un potere speciale.]]></txt>
<txt id="specialExp"><![CDATA[Premi i tasti freccia <font color="#FFFFFF">sinistra/destra</font> per far scorrere le opzioni (indicate con una linea di contorno rossa). Clicca su un'icona o premi la barra <font color="#FFFFFF">spaziatrice</font> per creare un'unità od usare un potere speciale.]]></txt>
<txt id="lifeBarExp">Mostra la barra della vita dei tuoi quartieri generali. </txt>
<txt id="menuExp">Clicca su questo tasto o premi 'P' per entrare nel menu delle opzioni.</txt>
<txt id="lanesExp"><![CDATA[Ci sono cinque corsie nel campo di battaglia. Le frecce ti mostrano su corsia che ti trovi. Clicca sul campo di battaglia o premi i tasti freccia <font color="#FFFFFF">su/giù</font> per cambiare corsia.]]></txt>
<txt id="showLifeExp"><![CDATA[Premi il tasto delle <font color="#FFFFFF">maiuscole</font> per mostrare la barra della vita di tutte le unità.]]></txt>
</learnpage>
<scorepage>
<txt id="continue">Continua</txt>
<txt id="a10">Più strategia su</txt>
</scorepage>
<optpage>
<txt id="options">Opzioni</txt>
<txt id="vq">QUALITÀ VISIVA</txt>
<txt id="se">EFFETTI SONORI</txt>
<txt id="m">MUSICA</txt>
<txt id="back">Indietro</txt>
<txt id="high">MIGLIORE</txt>
<txt id="medium">NORMALE</txt>
<txt id="low">BASSA</txt>
<txt id="on">ON</txt>
<txt id="off">OFF</txt>
</optpage>
<choosepage>
<txt id="txt">Sei sicuro di voler saltare il tutorial e passare alla prima battaglia?</txt>
<txt id="yes">Sì</txt>
<txt id="no">No</txt>
</choosepage>
<tutopage>
<txt id="st">Salta il tutorial</txt>
<txt id="step0">Benvenuto su City Invasion, Comandante! La capitale di Yokimado è stata devastata da un terremoto. Dei forestieri stanno cercando di esercitare il loro controllo sulla città. Tocca a te condurre le truppe e difendere la città!</txt>
<txt id="step0_1"><![CDATA[<br><br>Questo tutorial ti guiderà attraverso le basi prima che tu vada in battaglia!]]></txt>
<txt id="step1"><![CDATA[I quartieri generali nemici hanno mandato un <font color="#FFFF00">lanciatore di bottiglie Molotov</font> ad attaccarci. Per difendere i nostri quartieri generali, clicca sul <font color="#FFFF00">soldato con l'icona del fucile</font> da caccia o premi la <font color="#FFFF00">barra spaziatrice</font> per creare un'unità di difesa. I <font color="#FFFF00">soldati con il fucile</font> da caccia sono molto efficaci contro i <font color="#FFFF00">lanciatori di bottiglie Molotov</font>.]]></txt>
<txt id="step2"><![CDATA[Queste frecce indicano in che corsia ti trovi. L'unità nemica è apparsa nella corsia in basso. Cerca di cliccare nella parte inferiore del campo di battaglia o usa i tasti freccia <font color="#FFFF00">su/giù</font> per selezionare quella corsia.]]></txt>
<txt id="step2_1">Seleziona questa corsia</txt>
<txt id="step3"><![CDATA[Ottimo lavoro! Il nemico ha inviato un <font color="#FFFF00">soldato con lo scudo</font>. Un <font color="#FFFF00">lanciatore di bottiglie Molotov</font> sarebbe la migliore unità difensiva. Per crearlo, clicca sulla sua icona (o usa i tasti freccia sinistra/destra in combinazione con la <font color="#FFFF00">barra spaziatrice</font>).]]></txt>
<txt id="step4"><![CDATA[Per prima cosa, seleziona la corsia giusta. Crea un soldato con lo scudo per affrontare il <font color="#FFFF00">soldato nemico con il fucile</font> da caccia. Premi il tasto delle <font color="#FFFF00">maiuscole</font> per vedere le barre della vita di tutte le unità.]]></txt>
<txt id="step5">Come puoi vedere, è molto importante riuscire ad individuare i lati forti e deboli di ogni unità!</txt>
<txt id="step6"><![CDATA[Questo potere speciale viene chiamato <font color="#FFFF00">ordine di mobilitazione</font>. Clicca su quest'icona per aumentare la tua velocità di costruzione per un breve lasso di tempo. Provaci!]]></txt>
<txt id="step7">Ora, crea alcune unità e guarda come si fa in fretta!</txt>
<txt id="step8">Questa è la barra della vita dei tuoi quartieri generali. Se arriva a 0, perderai la battaglia.</txt>
<txt id="step8_1">Questa è la barra della vita dei quartieri generali nemici. Se raggiunge 0, vincerai la battaglia.</txt>
<txt id="step9"><![CDATA[Clicca su questo tasto o premi <font color="#FFFF00">P</font> per fermare il gioco ed aprire il menu.]]></txt>
<txt id="step9_1">Nota che delle nuove unità e poteri speciali verranno introdotti ad ogni nuovo livello.</txt>
<txt id="step10">Questo è tutto, Comandante! Ora conosci le basi. Buona fortuna!</txt>
</tutopage>
<intropage>
<txt id="bu">Unità di base</txt>
<txt id="sp">Potere speciale</txt>
<txt id="un1">Soldato con il fucile da caccia</txt>
<txt id="ue1">Efficace contro il lanciatore di bottiglie Molotov.</txt>
<txt id="ue1_1">Debole contro il soldato con lo scudo.</txt>
<txt id="ue1_2">Unità di attacco di base con un fucile da caccia potente.</txt>
<txt id="un2">Lanciatore di bottiglie Molotov</txt>
<txt id="ue2">Efficace contro il soldato con lo scudo.</txt>
<txt id="ue2_1">Debole contro il soldato con il fucile da caccia.</txt>
<txt id="ue2_2">Danno splash--ferisce tutti coloro che sono in prossimità, buono per danneggiare i quartieri generali.</txt>
<txt id="un3">Soldato con lo scudo</txt>
<txt id="ue3">Efficace contro il soldato con il fucile da caccia.</txt>
<txt id="ue3_1">Debole contro il lanciatore di bottiglie Molotov.</txt>
<txt id="ue3_2">Unità anti-rissa con una difesa forte, potente a distanza ravvicinata.</txt>
<txt id="un4">Cecchino</txt>
<txt id="ue4">Efficace contro tutti i soldati.</txt>
<txt id="ue4_1">Debole contro i quartieri generali.</txt>
<txt id="ue4_2">Spara a lungo raggio e provoca danni elevati.</txt>
<txt id="un5">Soldato bazooka</txt>
<txt id="ue5">Efficace contro i quartieri generali & il carro armato fulminante.</txt>
<txt id="ue5_1">Debole contro il cecchino</txt>
<txt id="ue5_2">Unità anti-veicolo con danno splash sui nemici raggruppati.</txt>
<txt id="un6">Robot</txt>
<txt id="ue6">Efficace contro i robot nemici.</txt>
<txt id="ue6_1">Debole contro il carro armato.</txt>
<txt id="ue6_2">Raggio laser che provoca più danni con il passare del tempo. Quando viene distrutto, compaiono due robot più piccoli.</txt>
<txt id="un7">Carro armato fulminante</txt>
<txt id="ue7">Efficace contro tutte le unità.</txt>
<txt id="ue7_1">Debole contro i quartieri generali.</txt>
<txt id="ue7_2">Un robusto veicolo sperimentale con una potente pistola fulminante.</txt>
<txt id="pn1">Ordine di mobilitazione</txt>
<txt id="pe1">Riduce il tempo di costruzione per un breve periodo di tempo.</txt>
<txt id="pn2">Macchina suicida</txt>
<txt id="pe2">Auto impazzita che esplode con l'impatto.</txt>
<txt id="pn3">Bomba a tempo</txt>
<txt id="pe3">Potente esplosivo a tempo che può essere messo dovunque.</txt>
<txt id="pn4">Attacco aereo</txt>
<txt id="pe4">Un grande numero di granate ad alto potenziale esplosivo che mettono in ginocchio persino i soldati più esperti.</txt>
<txt id="pn5">Maestro di menti</txt>
<txt id="pe5">Comandante scelto che fa il lavaggio del cervello alle unità nemiche.</txt>
<txt id="m1">Missione 1/5</txt>
<txt id="m1_1">Distretto commerciale di Yokobushi </txt>
<txt id="m2">Missione 2/5</txt>
<txt id="m2_1">Metropolitana settentrionale </txt>
<txt id="m3">Missione 3/5</txt>
<txt id="m3_1">Parco del Centro Dorato </txt>
<txt id="m4">Missione 4/5</txt>
<txt id="m4_1">Ponte occidentale </txt>
<txt id="m5">Missione 5/5</txt>
<txt id="m5_1">Periferia </txt>
</intropage>
<menupage>
<txt id="options">Opzioni</txt>
<txt id="retry">Riprova</txt>
<txt id="exit">Esci</txt>
<txt id="htp">Come giocare</txt>
<txt id="resume">Riprendi</txt>
</menupage>
<gamepage>
<txt id="menu">Menu</txt>
<txt id="eh">I quartieri generali nemici</txt>
<txt id="yh">I tuoi quartieri generali</txt>
</gamepage>
<losepage>
<txt id="mf">Missione fallita</txt>
<txt id="du">Durata</txt>
<txt id="cu">Unità create:</txt>
<txt id="ku">Unità uccise:</txt>
<txt id="lu">Unità perse:</txt>
<txt id="li">Vita:</txt>
<txt id="sc">Punteggio:</txt>
<txt id="re">Riprova</txt>
<txt id="mm">Menu principale</txt>
<txt id="mc">Missione completata</txt>
</losepage>
<finalpage>
<txt id="cong"><![CDATA[Complimenti! <br>La città di Yokimado è stata salvata grazie alla tua straordinaria capacità di comando.]]></txt>
<txt id="score">Punteggio</txt>
<txt id="in">Digita il tuo nome</txt>
<txt id="ss">Invia punteggio</txt>
<txt id="cr">Crediti</txt>
<txt id="new">Nuovo</txt>
<txt id="gd">Progettazione</txt>
<txt id="aw">Grafica</txt>
<txt id="pg">Programmazione</txt>
<txt id="close">Chiudi</txt>
</finalpage>
</languages>
;
public static var language10:XML = <languages>
<startpage>
<txt id="ngBtn">Nytt spel</txt>
<txt id="cgBtn">Fortsätta spel</txt>
<txt id="htpBtn">Instruktioner</txt>
<txt id="tuBtn">Lektion</txt>
<txt id="scoreBtn">Toppoäng</txt>
<txt id="optBtn">Alternativ</txt>
<txt id="playMore">Spela fler strategispel på</txt>
</startpage>
<learnpage>
<txt id="topTxt">Välkommen till City Invasion! Du segrar genom att förinta fiendens högkvarter innan de slår ut ditt.</txt>
<txt id="cBtn">Bakåt</txt>
<txt id="unitExp"><![CDATA[Tryck <font color="#FFFFFF">vänster/höger</font> för att bläddra bland alternativen (med röd ram). Klicka på en ikon eller tryck <font color="#FFFFFF">mellanslag</font> för att skapa en enhet eller använda en specialkraft.]]></txt>
<txt id="specialExp"><![CDATA[Tryck <font color="#FFFFFF">vänster/höger</font> för att bläddra bland alternativen (med röd ram). Klicka på en ikon eller tryck <font color="#FFFFFF">mellanslag</font> för att skapa en enhet eller använda en specialkraft.]]></txt>
<txt id="lifeBarExp">Visa ditt högkvarters livmätare.</txt>
<txt id="menuExp">Klicka på denna knapp eller tryck P för att öppna alternativmenyn.</txt>
<txt id="lanesExp"><![CDATA[Det finns fem filer på slagfältet. Pilarna visar i vilken fil du befinner dig. Klicka på slagfältet eller tryck <font color="#FFFFFF">upp/ned</font> för att byta fil.]]></txt>
<txt id="showLifeExp"><![CDATA[Tryck <font color="#FFFFFF">skift</font> för att visa alla enheters livmätare.]]></txt>
</learnpage>
<scorepage>
<txt id="continue">Fortsätt</txt>
<txt id="a10">Mer strategi på</txt>
</scorepage>
<optpage>
<txt id="options">Alternativ</txt>
<txt id="vq">BILDKVALITET</txt>
<txt id="se">LJUDEFFEKTER</txt>
<txt id="m">MUSIK</txt>
<txt id="back">Bakåt</txt>
<txt id="high">HÖG</txt>
<txt id="medium">NORMAL</txt>
<txt id="low">LÅG</txt>
<txt id="on">PÅ</txt>
<txt id="off">AV</txt>
</optpage>
<choosepage>
<txt id="txt">Vill du verkligen hoppa över lektionen och gå direkt till den första striden?</txt>
<txt id="yes">Ja</txt>
<txt id="no">Nej</txt>
</choosepage>
<tutopage>
<txt id="st">Skippa lektion</txt>
<txt id="step0">Välkommen till City Invasion, befälhavare! Huvudstaden Yokimado har skadats av en jordbävning. Främlingar utifrån försöker ta kontroll över staden. Det är upp till dig att leda trupperna och försvara staden!</txt>
<txt id="step0_1"><![CDATA[<br><br>Den här lektionen visar dig grunderna innan du börjar strida!]]></txt>
<txt id="step1"><![CDATA[Fienden har skickat en <font color="#FFFF00">molotovcocktail-kastare</font> mot oss. Försvara högkvarteret genom att klicka på ''<font color="#FFFF00">soldat med hagelgevär</font>''-ikonen eller tryck <font color="#FFFF00">mellanslag</font> för att skapa en försvarsenhet.
<font color="#FFFF00">Soldater med hagelgevär</font> är mycket effektiva mot <font color="#FFFF00">molotovcocktail-kastare</font>.]]></txt>
<txt id="step2"><![CDATA[Pilarna visar i vilken fil du befinner dig. Fiendens enhet befinner sig i filen längst ned. Pröva att klicka längst ned på slagfältet eller använd <font color="#FFFF00">upp/ned</font> för att välja den filen.]]></txt>
<txt id="step2_1">Välj den här filen.</txt>
<txt id="step3"><![CDATA[Bra jobbat! Fienden har skickat en <font color="#FFFF00">soldat med sköld</font>. En <font color="#FFFF00">molotovcocktail-kastare</font> är den bästa försvarsenheten. Klicka på ikonen (eller <font color="#FFFF00">vänster/höger</font> och <font color="#FFFF00">mellanslag</font>) för att skapa enheten.]]></txt>
<txt id="step4"><![CDATA[Välj först rätt fil. Skapa en <font color="#FFFF00">soldat med sköld</font> för att anfalla <font color="#FFFF00">fiendesoldaten med hagelgevär</font>. Tryck ned <font color="#FFFF00">skift</font> för att se alla enheters livmätare.]]></txt>
<txt id="step5">Som du förstår är det mycket viktigt att veta varje enhets styrkor och svagheter!</txt>
<txt id="step6"><![CDATA[Den här specialkraften kallas <font color="#FFFF00">mobiliseringorder</font>. Klicka på den här ikonen för att öka din bygghastighet under en kort tid. Prova!]]></txt>
<txt id="step7">Skapa nu några enheter och se så snabbt det går!</txt>
<txt id="step8">Det här är ditt högkvarters livmätare. Om den når 0 förlorar du slaget.</txt>
<txt id="step8_1">Det här är fiendens högkvarters livmätare. Om den når 0 vinner du slaget.</txt>
<txt id="step9"><![CDATA[Klicka på den här knappen eller tryck <font color="#FFFF00">P</font> för att pausa spelet och öppna menyn.]]></txt>
<txt id="step9_1">Observera att nya enheter och specialkrafter blir tillgängliga på varje ny nivå.</txt>
<txt id="step10">Det var allt, befälhavare! Nu kan du grunderna. Lycka till!</txt>
</tutopage>
<intropage>
<txt id="bu">Grundenheter</txt>
<txt id="sp">Specialkrafter</txt>
<txt id="un1">Soldat med hagelgevär</txt>
<txt id="ue1">Effektiv mot molotovcocktail-kastare</txt>
<txt id="ue1_1">Dålig mot soldat med sköld</txt>
<txt id="ue1_2">Enkel attackenhet med kraftigt hagelgevär</txt>
<txt id="un2">Molotovcocktail-kastare</txt>
<txt id="ue2">Effektiv mot soldat med sköld</txt>
<txt id="ue2_1">Dålig mot soldat med hagelgevär</txt>
<txt id="ue2_2">Skvättskador - skadar alla i närheten. Skadar effektivt högkvarter.</txt>
<txt id="un3">Soldat med sköld</txt>
<txt id="ue3">Effektiv mot soldat med hagelgevär</txt>
<txt id="ue3_1">Dålig mot molotovcocktail-kastare</txt>
<txt id="ue3_2">Kravallenhet med starkt försvar. Effektiv på nära håll.</txt>
<txt id="un4">Prickskytt</txt>
<txt id="ue4">Effektiv mot alla soldater</txt>
<txt id="ue4_1">Dålig mot högkvarter</txt>
<txt id="ue4_2">Lång räckvidd och orsakar stor skada</txt>
<txt id="un5">Bazookasoldat</txt>
<txt id="ue5">Effektiv mot högkvarter & blixtbil</txt>
<txt id="ue5_1">Dålig mot prickskyttar</txt>
<txt id="ue5_2">Anti-fordon-enhet som orsakar splitterskador på fiender i grupp.</txt>
<txt id="un6">Robot</txt>
<txt id="ue6">Effektiv mot fiendens robotar</txt>
<txt id="ue6_1">Dålig mot fordon</txt>
<txt id="ue6_2">Laserstråle som orsakar större skada över tid. När den förstörts framträder två mindre robotar.</txt>
<txt id="un7">Blixtbil</txt>
<txt id="ue7">Effektiv mot alla enheter</txt>
<txt id="ue7_1">Dålig mot högkvarter</txt>
<txt id="ue7_2">Kraftigt experimentellt fordon med en mäktig blixtkanon.</txt>
<txt id="pn1">Mobiliseringsorder</txt>
<txt id="pe1">Ökar din bygghastighet under en kort tid</txt>
<txt id="pn2">Självmordsbil</txt>
<txt id="pe2">Bil som sprängs vid krock</txt>
<txt id="pn3">Tidsbomb</txt>
<txt id="pe3">Kraftfull tidsinställd bomb som kan placeras överallt.</txt>
<txt id="pn4">Luftanfall</txt>
<txt id="pe4">Ett stort antal högexplosiva granater får även de tuffaste soldaterna på knä.</txt>
<txt id="pn5">Hjärnmästare</txt>
<txt id="pe5">Elitsoldat som hjärntvättar fiendens enheter</txt>
<txt id="m1">Uppdrag 1/5</txt>
<txt id="m1_1">Yokobushis shoppingområde</txt>
<txt id="m2">Uppdrag 2/5</txt>
<txt id="m2_1">Norra tunnelbanan</txt>
<txt id="m3">Uppdrag 3/5</txt>
<txt id="m3_1">Guldparken</txt>
<txt id="m4">Uppdrag 4/5</txt>
<txt id="m4_1">Västra bron</txt>
<txt id="m5">Uppdrag 5/5</txt>
<txt id="m5_1">Yttre området</txt>
</intropage>
<menupage>
<txt id="options">Alternativ</txt>
<txt id="retry">Försök igen</txt>
<txt id="exit">Avsluta</txt>
<txt id="htp">Instruktioner</txt>
<txt id="resume">Återgå</txt>
</menupage>
<gamepage>
<txt id="menu">Meny</txt>
<txt id="eh">Fiendens högkvarter</txt>
<txt id="yh">Ditt högkvarter</txt>
</gamepage>
<losepage>
<txt id="mf">Uppdrag misslyckat</txt>
<txt id="du">Tid</txt>
<txt id="cu">Skapade enheter:</txt>
<txt id="ku">Dödade enheter:</txt>
<txt id="lu">Förlorade enheter:</txt>
<txt id="li">Liv:</txt>
<txt id="sc">Poäng:</txt>
<txt id="re">Försök igen</txt>
<txt id="mm">Huvudmeny</txt>
<txt id="mc">Uppdrag klarat</txt>
</losepage>
<finalpage>
<txt id="cong"><![CDATA[Gratulerar! <br>Staden Yokimado är räddad tack vare ditt fantastiska ledarskap.]]></txt>
<txt id="score">Poäng</txt>
<txt id="in">Ange ditt namn</txt>
<txt id="ss">Skicka poäng</txt>
<txt id="cr">Tacklista</txt>
<txt id="new">Ny</txt>
<txt id="gd">Speldesign</txt>
<txt id="aw">Form</txt>
<txt id="pg">Programmering</txt>
<txt id="close">Stäng</txt>
</finalpage>
</languages>
;
public static var language11:XML = <languages>
<startpage>
<txt id="ngBtn">Nowa gra</txt>
<txt id="cgBtn">Kontynuuj grę</txt>
<txt id="htpBtn">Jak grać</txt>
<txt id="tuBtn">Tutorial</txt>
<txt id="scoreBtn">Ranking</txt>
<txt id="optBtn">Opcje</txt>
<txt id="playMore">Zagraj w więcej gier strategicznych na</txt>
</startpage>
<learnpage>
<txt id="topTxt">Witamy w grze City Invasion! Aby zwyciężyć, należy zniszczyć kwaterę główną wroga, zanim on zrobi to samo z twoją.</txt>
<txt id="cBtn">Powrót</txt>
<txt id="unitExp"><![CDATA[Naciskaj strzałkę <font color="#FFFFFF">w lewo/w prawo</font>, aby przeglądać opcje (zaznaczone czerwoną otoczką). Kliknij na ikonkę lub naciśnij <font color="#FFFFFF">spację</font>, aby stworzyć jednostkę lub użyć broni specjalnej.]]></txt>
<txt id="specialExp"><![CDATA[Naciskaj strzałkę <font color="#FFFFFF">w lewo/w prawo</font>, aby przeglądać opcje (zaznaczone czerwoną otoczką). Kliknij na ikonkę lub naciśnij <font color="#FFFFFF">spację</font>, aby stworzyć jednostkę lub użyć broni specjalnej.]]></txt>
<txt id="lifeBarExp">Pokazuje wskaźnik energii twojej kwatery głównej.</txt>
<txt id="menuExp">Kliknij na ten przycisk lub naciśnij 'P', aby wejść w menu opcji.</txt>
<txt id="lanesExp"><![CDATA[Na polu bitwy jest pięć tras. Strzałki pokazują, na której trasie jesteś. Kliknij na pole bitwy lub naciśnij strzałkę <font color="#FFFFFF">w górę/w dół</font>, aby zmienić trasy.]]></txt>
<txt id="showLifeExp"><![CDATA[Naciśnij <font color="#FFFFFF">Shift</font>, aby zobaczyć wskaźnik energii wszystkich jednostek.]]></txt>
</learnpage>
<scorepage>
<txt id="continue">Kontynuuj</txt>
<txt id="a10">Więcej strategii na</txt>
</scorepage>
<optpage>
<txt id="options">Opcje</txt>
<txt id="vq">JAKOŚĆ GRAFIKI</txt>
<txt id="se">EFEKTY DŹWIĘKOWE</txt>
<txt id="m">MUZYKA</txt>
<txt id="back">Powrót</txt>
<txt id="high">DOBRA</txt>
<txt id="medium">ŚREDNIA</txt>
<txt id="low">NISKA</txt>
<txt id="on">WŁĄCZ</txt>
<txt id="off">WYŁĄCZ</txt>
</optpage>
<choosepage>
<txt id="txt">Jesteś pewny, że chcesz pominąć tutorial i przejść do pierwszej bitwy?</txt>
<txt id="yes">Tak</txt>
<txt id="no">Nie</txt>
</choosepage>
<tutopage>
<txt id="st">Pomiń tutorial</txt>
<txt id="step0">Witaj w grze City Invasion, dowódco! Światowa stolica, Yokimado, została spustoszona przez trzęsienie ziemi. Przybysze z zewnątrz próbują przejąć kontrolę nad miastem. Musisz przejąć dowództwo nad oddziałami i obronić stolicę!</txt>
<txt id="step0_1"><![CDATA[<br><br>Ten tutorial przeprowadzi cię przez podstawy, zanim przystąpisz do bitwy!]]></txt>
<txt id="step1"><![CDATA[Kwatera główna wroga wysłała <font color="#FFFF00">miotacz koktajli Mołotowa</font>, aby nas zaatakować. Aby obronić naszą kwaterę, kliknij na ikonkę <font color="#FFFF00">żołnierza z karabinem</font> albo naciśnij <font color="#FFFF00">spację</font>, aby stworzyć jednostkę obronną. <font color="#FFFF00">Żołnierze z karabinem</font> są bardzo skuteczni przeciwko <font color="#FFFF00">miotaczom koktajli Mołotowa</font>.]]></txt>
<txt id="step2"><![CDATA[Te strzałki pokazują, na której trasie jesteś. Jednostka wroga pojawiła się na trasie dolnej. Aby wybrać tę trasę, kliknij u dołu pola bitwy albo użyj strzałek <font color="#FFFF00">w górę/w dół.</font>]]></txt>
<txt id="step2_1">Wybierz tę trasę</txt>
<txt id="step3"><![CDATA[Świetnie! Wróg wysłał <font color="#FFFF00">żołnierza z tarczą</font>. Najlepszą jednostką obronną będzie <font color="#FFFF00">miotacz koktajli Mołotowa</font>. Kliknij na jego ikonkę (lub użyj strzałki <font color="#FFFF00">w lewo/w prawo</font> razem ze <font color="#FFFF00">spacją</font>), aby stworzyć tę jednostkę.]]></txt>
<txt id="step4"><![CDATA[Najpierw wybierz właściwą trasę. Stwórz <font color="#FFFF00">żółnierza z tarczą</font> i skonfrontuj go z <font color="#FFFF00">żołnierzem z karabinem</font>. Naciśnij <font color="#FFFF00">Shift</font>, aby zobaczyć wskaźniki energii wszystkich jednostek.]]></txt>
<txt id="step5">Jak widzisz, to bardzo ważne, aby znać mocne i słabe punkty każdej jednostki!</txt>
<txt id="step6"><![CDATA[Ta broń specjalna to <font color="#FFFF00">Rozkaz mobilizacji</font>. Kliknij na tę ikonkę, aby na krótki okres czasu zwiększyć prędkość produkcji. Spróbuj!]]></txt>
<txt id="step7">Teraz stwórz kilka jednostek i przekonaj się, jak szybko się z tym uporasz!</txt>
<txt id="step8">To jest wskaźnik energii twojej kwatery głównej. Jeśli osiągnie 0, przegrasz bitwę.</txt>
<txt id="step8_1">To jest wskaźnik energii kwatery głównej wroga. Jeśli osiągnie 0, wygrasz bitwę.</txt>
<txt id="step9"><![CDATA[Kliknij na ten przycisk lub naciśnij <font color="#FFFF00">P</font>, aby włączyć pauzę i otworzyć menu.]]></txt>
<txt id="step9_1">Pamiętaj, że nowe jednostki i bronie specjalne będą wprowadzane na każdym nowym poziomie.</txt>
<txt id="step10">To wszystko, dowódco! Teraz znasz podstawy. Powodzenia!</txt>
</tutopage>
<intropage>
<txt id="bu">Jednostka podstawowa</txt>
<txt id="sp">Broń specjalna</txt>
<txt id="un1">Żołnierz z karabinem</txt>
<txt id="ue1">Skuteczny przeciwko miotaczowi koktajli Mołotowa</txt>
<txt id="ue1_1">Pokonywany przez żołnierza z tarczą</txt>
<txt id="ue1_2">Podstawowa jednostka ataku z mocnym karabinem</txt>
<txt id="un2">Miotacz koktajli Mołotowa</txt>
<txt id="ue2">Skuteczny przeciwko żołnierzowi z tarczą</txt>
<txt id="ue2_1">Pokonywany przez żołnierza z karabinem</txt>
<txt id="ue2_2">Rozbryzgi powodują uszkodzenia u każdego obiektu, który znajdzie się w pobliżu, dobry do powodowania zniszczeń kwatery głównej</txt>
<txt id="un3">Żołnierz z tarczą</txt>
<txt id="ue3">Skuteczny przeciwko żołnierzowi z karabinem</txt>
<txt id="ue3_1">Pokonywany przez miotacz koktajli Mołotowa</txt>
<txt id="ue3_2">Jednostka prewencyjna zdolna do skutecznej obrony, bardzo efektywna przy bliskiej odległości</txt>
<txt id="un4">Snajper</txt>
<txt id="ue4">Skuteczny przeciwko wszystkim żołnierzom</txt>
<txt id="ue4_1">Pokonywany przez kwaterę główną</txt>
<txt id="ue4_2">Daleki zasięg, zadaje bardzo poważne uszkodzenia</txt>
<txt id="un5">Żołnierz z bazooką</txt>
<txt id="ue5">Skuteczny przeciwko kwaterze głównej i czołgowi z działem elektrycznym</txt>
<txt id="ue5_1">Pokonywany przez snajpera</txt>
<txt id="ue5_2">Jednostka antypojazdowa, odłamki powodują uszkodzenia u jednostek wroga skupionych w grupy</txt>
<txt id="un6">Robot</txt>
<txt id="ue6">Skuteczny przeciwko wrogiemu robotowi</txt>
<txt id="ue6_1">Pokonywany przez czołg</txt>
<txt id="ue6_2">Promień laserowy, który powoduje tym większe uszkodzenia, im dłuższy czas ekspozycji. Po zniszczeniu rozpada się na dwa mniejsze roboty</txt>
<txt id="un7">Czołg z działem elektrycznym</txt>
<txt id="ue7">Skuteczny przeciwko wszystkim jednostkom</txt>
<txt id="ue7_1">Pokonywany przez kwaterę główną</txt>
<txt id="ue7_2">Solidny, eksperymentalny pojazd z mocnym działkiem elektrycznym</txt>
<txt id="pn1">Rozkaz mobilizacji</txt>
<txt id="pe1">Skraca na chwilę czas produkcji</txt>
<txt id="pn2">Ciężarówka-samobójca</txt>
<txt id="pe2">Siejąca zniszczenia ciężarówka, która wybucha w momencie zderzenia</txt>
<txt id="pn3">Bomba czasowa</txt>
<txt id="pe3">Mocny ładunek wybuchowy z zapalnikiem czasowym, który można podłożyć w dowolnym miejscu</txt>
<txt id="pn4">Ostrzał z powietrza</txt>
<txt id="pe4">Duża ilość pocisków wybuchowych, która powali na kolana nawet najbardziej doświadczonych żołnierzy</txt>
<txt id="pn5">Władca umysłów</txt>
<txt id="pe5">Elitarny dowódca, który przeprowadza pranie mózgu u jednostek wroga.</txt>
<txt id="m1">Misja 1/5</txt>
<txt id="m1_1">Dzielnica Handlowa Yokobushi</txt>
<txt id="m2">Misja 2/5</txt>
<txt id="m2_1">Metro w północnej części miasta</txt>
<txt id="m3">Misja 3/5</txt>
<txt id="m3_1">Park w Centrum</txt>
<txt id="m4">Misja 4/5</txt>
<txt id="m4_1">Most zachodni</txt>
<txt id="m5">Misja 5/5</txt>
<txt id="m5_1">Przedmieścia</txt>
</intropage>
<menupage>
<txt id="options">Opcje</txt>
<txt id="retry">Spróbuj jeszcze raz</txt>
<txt id="exit">Wyjście</txt>
<txt id="htp">Jak grać</txt>
<txt id="resume">Kontynuuj</txt>
</menupage>
<gamepage>
<txt id="menu">Menu</txt>
<txt id="eh">Kwatera główna wroga</txt>
<txt id="yh">Twoja kwatera główna</txt>
</gamepage>
<losepage>
<txt id="mf">Misja nie powiodła się</txt>
<txt id="du">Czas trwania:</txt>
<txt id="cu">CStworzone jednostki:</txt>
<txt id="ku">Zabite jednostki:</txt>
<txt id="lu">Stracone jednostki:</txt>
<txt id="li">Życie:</txt>
<txt id="sc">Wynik:</txt>
<txt id="re">Jeszcze raz</txt>
<txt id="mm">Menu główne</txt>
<txt id="mc">Misja ukończona</txt>
</losepage>
<finalpage>
<txt id="cong"><![CDATA[Gratulacje! <br>Dzięki twojemu znakomitemu dowództwu miasto Yokimado zostało ocalone!]]></txt>
<txt id="score">Wynik</txt>
<txt id="in">Wpisz swoje imię</txt>
<txt id="ss">Zapisz wynik</txt>
<txt id="cr">Autorzy</txt>
<txt id="new">Nowy</txt>
<txt id="gd">Projekt gry</txt>
<txt id="aw">Opracowanie graficzne</txt>
<txt id="pg">Programowanie</txt>
<txt id="close">Zamknij</txt>
</finalpage>
</languages>
;
public static var language12:XML = <languages>
<startpage>
<txt id="ngBtn">Новая игра</txt>
<txt id="cgBtn">Продолжить игру</txt>
<txt id="htpBtn">Как играть</txt>
<txt id="tuBtn">Тренировка</txt>
<txt id="scoreBtn">Рекорды</txt>
<txt id="optBtn">Настройки</txt>
<txt id="playMore">Сыграйте в другие стратегии на</txt>
</startpage>
<learnpage>
<txt id="topTxt"><![CDATA[Примите участие в City Invasion! Чтобы одержать победу, необходимо уничтожить штаб противника, прежде чем враг уничтожит ваш штаб.]]></txt>
<txt id="cBtn">Обратно</txt>
<txt id="unitExp"><![CDATA[Чтобы выбрать нужный значок, нажимайте клавиши <font color="#FFFFFF">"влево"/"вправо"</font> (выбранный значок выделяется красной рамкой). Чтобы создать бойца или использовать особые возможности, щелкните мышью по значку или нажмите <font color="#FFFFFF">пробел</font>.]]></txt>
<txt id="specialExp"><![CDATA[Чтобы выбрать нужный значок, нажимайте клавиши <font color="#FFFFFF">"влево"/"вправо"</font> (выбранный значок выделяется красной рамкой). Чтобы создать бойца или использовать особые возможности, щелкните мышью по значку или нажмите <font color="#FFFFFF">пробел</font>.]]></txt>
<txt id="lifeBarExp">Показывает запас прочности ("жизни") вашего штаба.</txt>
<txt id="menuExp">Щелкните мышью по этой кнопке или нажмите 'P', чтобы вызвать меню настроек.</txt>
<txt id="lanesExp"><![CDATA[На поле боя имеется пять дорожек. Стрелки показывают, на какой дорожке вы находитесь. Чтобы выбрать дорожку, щелкните мышью на поле боя или нажмите клавиши <font color="#FFFFFF">"вверх"/"вниз"</font>.]]></txt>
<txt id="showLifeExp"><![CDATA[Нажмите <font color="#FFFFFF">Shift</font>, чтобы увидеть индикатор здоровья всех боевых единиц.]]></txt>
</learnpage>
<scorepage>
<txt id="continue">Продолжать</txt>
<txt id="a10">Другие стратегии на</txt>
</scorepage>
<optpage>
<txt id="options">Настройки</txt>
<txt id="vq">КАЧЕСТВО ГРАФИКИ</txt>
<txt id="se">ЗВУК</txt>
<txt id="m">МУЗЫКА</txt>
<txt id="back">Обратно</txt>
<txt id="high">ВЫСОКОЕ</txt>
<txt id="medium">СРЕДНЕЕ</txt>
<txt id="low">НИЗКОЕ</txt>
<txt id="on">ВКЛ.</txt>
<txt id="off">ВЫКЛ.</txt>
</optpage>
<choosepage>
<txt id="txt">Вы уверены, что хотите пропустить тренировку и сразу начать свой первый бой?</txt>
<txt id="yes">Да</txt>
<txt id="no">Нет</txt>
</choosepage>
<tutopage>
<txt id="st">Пропустить тренировку</txt>
<txt id="step0">Здравия желаю, товарищ командир! Докладываю: в столице мира, городе-герое Москве была отменена регистрация приезжих. Преступные группировки пытаются захватить город! Ваша задача – возглавить бригаду ОМОНа и защитить столицу!</txt>
<txt id="step0_1"><![CDATA[<br><br>Эта тренировка поможет вам освоить основы командования войсками перед боем.]]></txt>
<txt id="step1"><![CDATA[Враг направил <font color="#FFFF00">бойца с напалмовыми гранатами</font>, чтобы атаковать наш штаб. Чтобы защитить штаб, выберите изображение <font color="#FFFF00">бойца с дробовиком</font> или нажмите <font color="#FFFF00">пробел</font>, создав защитника. <font color="#FFFF00">Боец с дробовиком</font> прекрасно справляется с <font color="#FFFF00">бойцами с напалмовыми гранатами</font>]]>. </txt>
<txt id="step2"><![CDATA[Эти стрелки указывают, на какой дорожке вы находитесь. Вражеский боец появился на нижней дорожке. Чтобы выбрать эту дорожку, щелкните мышью в нижней части поля боя или используйте для выбора клавиши <font color="#FFFF00">"вверх"/"вниз"</font>.]]></txt>
<txt id="step2_1">Выберите эту дорожку</txt>
<txt id="step3"><![CDATA[Отлично! Противник направил <font color="#FFFF00">бойца со щитом</font>. В этом случае лучшим защитником будет <font color="#FFFF00">боец с напалмовыми гранатами</font>. Чтобы создать его, щелкните по соответствующему значку (или используйте клавиши <font color="#FFFF00">"влево"/"вправо"</font> и <font color="#FFFF00">пробел</font>).]]></txt>
<txt id="step4"><![CDATA[Сначала выберите нужную дорожку. Создайте <font color="#FFFF00">бойца со щитом</font>, чтобы отразить атаку вражеского <font color="#FFFF00">бойца с дробовиком</font>. Чтобы увидеть индикаторы жизни всех бойцов, нажмите <font color="#FFFF00">Shift</font>.]]></txt>
<txt id="step5">Как видите, важно знать сильные и слабые стороны каждой боевой единицы.</txt>
<txt id="step6"><![CDATA[Эта особая возможность называется <font color="#FFFF00">"Приказ о мобилизации"</font>. Щелкните по этому значку, чтобы ненадолго ускорить создание бойцов. Попробуйте!]]></txt>
<txt id="step7">А теперь создайте несколько бойцов и увидите, насколько быстро пойдет дело!</txt>
<txt id="step8">Это индикатор "жизни" вашего штаба. Если он достигнет нуля, вы проиграли. </txt>
<txt id="step8_1">Это индикатор "жизни" вражеского штаба. Если он достигнет нуля, вы выиграли бой.</txt>
<txt id="step9"><![CDATA[Щелкните мышью по этой кнопке или нажмите <font color="#FFFF00">'P'</font>, чтобы остановить игру и открыть меню.]]></txt>
<txt id="step9_1">На каждом из уровней вы будете получать доступ к новым боевым единицам и особым возможностям.</txt>
<txt id="step10">Вот и все, товарищ командир! Теперь вы знаете, что делать. Удачи в бою!</txt>
</tutopage>
<intropage>
<txt id="bu">Основные боевые единицы</txt>
<txt id="sp">Особые возможности</txt>
<txt id="un1">Боец с дробовиком</txt>
<txt id="ue1">Эффективен против бойца с напалмовыми гранатами</txt>
<txt id="ue1_1">Слаб против бойца со щитом</txt>
<txt id="ue1_2">Основная боевая единица. Вооружен мощным дробовиком.</txt>
<txt id="un2">Боец с напалм. гранатами</txt>
<txt id="ue2">Эффективен против бойца со щитом</txt>
<txt id="ue2_1">Слаб против бойца с дробовиком</txt>
<txt id="ue2_2">Взрыв наносит повреждения всем находящимся поблизости бойцам. Хорошо действует против штаба.</txt>
<txt id="un3">Боец со щитом</txt>
<txt id="ue3">Эффективен против бойца с дробовиком</txt>
<txt id="ue3_1">Слаб против бойца с напалмовыми гранатами</txt>
<txt id="ue3_2">Омоновец, привыкший разгонять демонстрации. Хорошо защищен, силен в рукопашной.</txt>
<txt id="un4">Снайпер</txt>
<txt id="ue4">Эффективен против любых бойцов</txt>
<txt id="ue4_1">Слаб против штаба</txt>
<txt id="ue4_2">Высокая дальность стрельбы. Наносит серьезные повреждения.</txt>
<txt id="un5">Гранатометчик</txt>
<txt id="ue5">Эффективен против штаба и танка "Громобой"</txt>
<txt id="ue5_1">Слаб против снайпера</txt>
<txt id="ue5_2">Истребитель техники. Взрыв гранаты наносит повреждения скоплениям противника.</txt>
<txt id="un6">Робот</txt>
<txt id="ue6">Эффективен против вражеских роботов</txt>
<txt id="ue6_1">Слаб против танков</txt>
<txt id="ue6_2">Вооружен лазером, наносящим со временем все большие повреждения. В случае уничтожения превращается в двух роботов поменьше.</txt>
<txt id="un7">Танк "Громобой"</txt>
<txt id="ue7">Эффективен против любых бойцов и техники</txt>
<txt id="ue7_1">Слаб против штаба</txt>
<txt id="ue7_2">Экспериментальный образец бронетехники, вооруженный мощным электроразрядником.</txt>
<txt id="pn1">Приказ о мобилизации</txt>
<txt id="pe1">Позволяет ненадолго ускорить производство</txt>
<txt id="pn2">Машина камикадзе</txt>
<txt id="pe2">Маньяк за рулем! При столкновении взрывается.</txt>
<txt id="pn3">Часовая бомба</txt>
<txt id="pe3">Мощный фугас с часовым механизмом, который можно заложить где угодно. </txt>
<txt id="pn4">Бомбардировка</txt>
<txt id="pe4">Фугасные бомбы, сбрасываемые со штурмовика, смертельно опасны даже для отборных бойцов.</txt>
<txt id="pn5">Замполит-гипнотизер</txt>
<txt id="pe5">Профессиональный пропагандист, промывающий мозги вражеским бойцам.</txt>
<txt id="m1">Задание 1/5</txt>
<txt id="m1_1">Охотный Ряд </txt>
<txt id="m2">Задание 2/5</txt>
<txt id="m2_1">Оборона метро</txt>
<txt id="m3">Задание 3/5</txt>
<txt id="m3_1">Битцевский парк</txt>
<txt id="m4">Задание 4/5</txt>
<txt id="m4_1">Мост через Москву-реку</txt>
<txt id="m5">Задание 5/5</txt>
<txt id="m5_1">Подмосковье</txt>
</intropage>
<menupage>
<txt id="options">Опции</txt>
<txt id="retry">Еще раз</txt>
<txt id="exit">Выход</txt>
<txt id="htp">Как играть</txt>
<txt id="resume">Продолжать</txt>
</menupage>
<gamepage>
<txt id="menu">Меню</txt>
<txt id="eh">Штаб противника</txt>
<txt id="yh">Ваш штаб</txt>
</gamepage>
<losepage>
<txt id="mf">Задание провалено</txt>
<txt id="du">Время</txt>
<txt id="cu">Создано бойцов:</txt>
<txt id="ku">Уничтожено:</txt>
<txt id="lu">Боевые потери:</txt>
<txt id="li">Жизнь:</txt>
<txt id="sc">Счет:</txt>
<txt id="re">Еще раз</txt>
<txt id="mm">Главное меню</txt>
<txt id="mc">Задание выполнено!</txt>
</losepage>
<finalpage>
<txt id="cong"><![CDATA[Поздравляем! <br>Город-герой Москва был спасен благодаря вашему умелым действиям!]]></txt>
<txt id="score">Счет</txt>
<txt id="in">Введите имя</txt>
<txt id="ss">Сохранить результат</txt>
<txt id="cr">Авторы</txt>
<txt id="new">Новый</txt>
<txt id="gd">Дизайн игры</txt>
<txt id="aw">Оформление</txt>
<txt id="pg">Программирование</txt>
<txt id="close">Закрыть</txt>
</finalpage>
</languages>
;
public static function getLanguageXML(_arg1:String):XML{
switch (_arg1){
case "us":
language.Language = 1;
return (language1);
case "us2":
language.Language = 17;
return (language1);
case "uk":
language.Language = 13;
return (language2);
case "dutch":
language.Language = 3;
return (language3);
case "french":
language.Language = 4;
return (language4);
case "german":
language.Language = 5;
return (language5);
case "spanish":
language.Language = 9;
return (language6);
case "brazilian":
language.Language = 10;
GameVariables.txtDistance = 12;
return (language7);
case "portuguese":
language.Language = 14;
return (language8);
case "italian":
language.Language = 8;
GameVariables.txtDistance = 11;
return (language9);
case "swedish":
language.Language = 7;
return (language10);
case "polish":
language.Language = 6;
GameVariables.txtDistance = 12;
return (language11);
case "russian":
language.Language = 12;
return (language12);
case "indonesian":
language.Language = 11;
GameVariables.txtDistance = 11;
return (language13);
case "japanese":
language.Language = 15;
return (language14);
case "chinese":
language.Language = 2;
return (language15);
};
return (null);
}
}
}//package com.veltive.cityinvasion.utils
Section 109
//LanguageManager (com.veltive.cityinvasion.utils.LanguageManager)
package com.veltive.cityinvasion.utils {
import flash.display.*;
public class LanguageManager extends MovieClip {
private static var _xml:XML;
public static function loadLanguageXML(_arg1:String="us"):void{
_xml = Language.getLanguageXML(_arg1);
}
public static function getStr(_arg1:String, _arg2:String):String{
var str:String;
var page = _arg1;
var id = _arg2;
str = _xml.elements(page)[0].elements().(@id == id);
return (str);
}
}
}//package com.veltive.cityinvasion.utils
Section 110
//LocalFile (com.veltive.cityinvasion.utils.LocalFile)
package com.veltive.cityinvasion.utils {
import com.veltive.cityinvasion.*;
import flash.net.*;
public class LocalFile {
private static var SO:SharedObject = SharedObject.getLocal("CI");
public static var LATEST_RECORD;
private static var _currentAccount:Object;
private static function addScore(_arg1:Object){
var _local2:SharedObject = SO;
if (_local2.data.scoreArr == undefined){
_local2.data.scoreArr = [];
_local2.data.scoreArr.push(_arg1);
LATEST_RECORD = 0;
return;
};
var _local3:Array = _local2.data.scoreArr;
var _local4:* = 0;
while (_local4 < _local3.length) {
if (_arg1.score >= _local3[_local4].score){
_local3.splice(_local4, 0, _arg1);
LATEST_RECORD = _local4;
if (_local3.length > GameVariables.MAX_RECORDS){
_local3.length = GameVariables.MAX_RECORDS;
};
return;
};
_local4++;
};
_local3.push(_arg1);
LATEST_RECORD = 0;
if (_local3.length > GameVariables.MAX_RECORDS){
_local3.length = GameVariables.MAX_RECORDS;
};
}
public static function get LEVEL(){
var _local1:SharedObject = SO;
var _local2:* = _local1.data.level;
return (_local2);
}
public static function GET_CURRENT_SCORE():Number{
var _local1:SharedObject = SO;
var _local2:* = ((((_local1.data[("score" + 1)] + _local1.data[("score" + 2)]) + _local1.data[("score" + 3)]) + _local1.data[("score" + 4)]) + _local1.data[("score" + 5)]);
return (_local2);
}
public static function GET_HIGH_SCORE_ARR():Array{
var _local1:SharedObject = SO;
if (_local1.data.scoreArr != undefined){
return (_local1.data.scoreArr);
};
return (new Array());
}
public static function set LEVEL(_arg1:int){
var _local2:SharedObject = SO;
var _local3:* = LEVEL;
_local2.data.level = _arg1;
if (((_local3) && ((_local3 > _arg1)))){
_local2.data.level = _local3;
};
_local2.flush();
}
public static function set HIGH_SCORE(_arg1:Number){
var _local2:SharedObject = SO;
if (((((!((_local2.data[("score" + GameVariables.LEVEL)] == undefined))) && ((_arg1 > _local2.data[("score" + GameVariables.LEVEL)])))) || (!(_local2.data[("score" + GameVariables.LEVEL)])))){
_local2.data[("score" + GameVariables.LEVEL)] = _arg1;
};
_local2.flush();
}
public static function SUBMIT_SCORE(_arg1:String):Boolean{
RESET();
var _local2:SharedObject = SO;
var _local3:* = {};
_local3.score = ((((_local2.data[("score" + 1)] + _local2.data[("score" + 2)]) + _local2.data[("score" + 3)]) + _local2.data[("score" + 4)]) + _local2.data[("score" + 5)]);
var _local4:Date = new Date();
_local3.date = ((((((_local4.getFullYear() + "-") + (_local4.getMonth() + 1)) + "-") + _local4.getDate()) + " ") + _local4.toLocaleTimeString());
_local3.user = _arg1;
addScore(_local3);
if (_local2.data.scoreArr.indexOf(_local3) <= GameVariables.MAX_RECORDS){
return (true);
};
return (false);
}
private static function RESET(){
GameVariables.LEVEL = 0;
LocalFile.CURRENT_LEVEL = 1;
LocalFile.LEVEL = 1;
GameVariables.SAVED_LEVEL = 1;
GameVariables.LEVEL = 1;
}
public static function CLEAR_RECORDS(){
var _local1:SharedObject = SO;
_local1.data.scoreArr = [];
}
public static function CREATE_ACCOUNT(){
RESET();
var _local1:Date = new Date();
var _local2:* = ("PLAYER_" + int((Math.random() * 1000000)));
var _local3:SharedObject = SO;
var _local4:* = {};
_local4.score = 0;
_local4.user = _local2;
_local3.data.currentAccount = _local4;
var _local5:* = 1;
while (_local5 <= GameVariables.MAX_LEVEL) {
_local3.data[("score" + _local5)] = 0;
_local5++;
};
GameVariables.LEVEL = 1;
}
public static function get HIGH_SCORE():Number{
var _local1:SharedObject = SO;
var _local2:* = _local1.data[("score" + GameVariables.LEVEL)];
if ((((_local2 == undefined)) || ((_local2 == null)))){
_local2 = 0;
};
return (_local2);
}
public static function CREATE_DEFAULT_SCORES(){
var _local5:*;
var _local1:SharedObject = SO;
if (_local1.data._isNotFirstTime1 == undefined){
_local1.data._isNotFirstTime1 = true;
} else {
return;
};
_local1.data.scoreArr = [];
var _local2:* = ["Leon", "David", "James", "Hugo", "Alexander", "Harrison", "Candy", "Nobert", "Steven", "Thomas"];
var _local3:* = ["2009-2-10 11:00:59 AM", "2009-1-16 11:05:59 AM", "2009-2-3 11:00:55 PM", "2009-1-15 11:10:59 AM", "2009-1-21 11:00:59 PM", "2009-2-11 10:01:55 AM", "2009-2-10 11:06:59 AM", "2009-2-11 11:00:59 AM", "2009-2-11 11:02:59 AM", "2009-2-11 11:04:59 AM"];
var _local4:* = 0;
while (_local4 < GameVariables.MAX_RECORDS) {
_local5 = {};
_local5.score = int((200000 * Math.random()));
_local5.user = _local2[_local4];
_local5.date = _local3[_local4];
addScore(_local5);
_local4++;
};
}
public static function get FIRST_PLAY():Boolean{
var _local1:SharedObject = SO;
if (_local1.data.first_play5 == undefined){
_local1.data.first_play5 = false;
return (true);
};
return (false);
}
public static function set CURRENT_LEVEL(_arg1:int){
var _local2:SharedObject = SO;
_local2.data.level = _arg1;
_local2.flush();
}
public static function CHECK_SCORE():Boolean{
var _local1:SharedObject = SO;
var _local2:* = ((((_local1.data[("score" + 1)] + _local1.data[("score" + 2)]) + _local1.data[("score" + 3)]) + _local1.data[("score" + 4)]) + _local1.data[("score" + 5)]);
var _local3:* = _local1.data.scoreArr;
if (((!(_local3)) || ((_local3.length < GameVariables.MAX_RECORDS)))){
return (true);
};
if (_local3[(_local3.length - 1)].score >= _local2){
return (false);
};
return (true);
}
}
}//package com.veltive.cityinvasion.utils
Section 111
//Restriction (com.veltive.cityinvasion.utils.Restriction)
package com.veltive.cityinvasion.utils {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ammos.*;
public class Restriction {
public static function getFavoured(_arg1:String):String{
if (_arg1 == UnitFactory.COP_WITH_SHOTGUN){
return (UnitFactory.COP_WITH_SHIELD);
};
if (_arg1 == UnitFactory.COP_WITH_SHIELD){
return (UnitFactory.COP_WITH_SHIELD);
};
if (_arg1 == UnitFactory.ROCKET_SOLIDER){
return (UnitFactory.SNIPER);
};
if (_arg1 == UnitFactory.CIVILIAN_WITH_ROCK){
return (UnitFactory.COP_WITH_SHOTGUN);
};
if (_arg1 == UnitFactory.SNIPER){
return (UnitFactory.SNIPER);
};
if (_arg1 == UnitFactory.TANK){
return (UnitFactory.ROCKET_SOLIDER);
};
if (_arg1 == UnitFactory.ROBOT){
return (UnitFactory.CIVILIAN_WITH_ROCK);
};
return (UnitFactory.COP_WITH_SHIELD);
}
public static function HurtRate(_arg1:String, _arg2:String):Number{
if ((((_arg1 == UnitFactory.HEADQUARTERS)) && ((_arg2 == AmmoFactory.BULLET)))){
return (0.1);
};
if ((((_arg1 == UnitFactory.HEADQUARTERS)) && ((_arg2 == AmmoFactory.EXTEND_AMMO)))){
return (0);
};
if ((((_arg1 == UnitFactory.COP_WITH_SHIELD)) && ((_arg2 == AmmoFactory.RIFLE)))){
return (0.5);
};
if ((((_arg1 == UnitFactory.COP_WITH_SHIELD)) && ((_arg2 == AmmoFactory.MOLOTOV)))){
return (3);
};
if ((((_arg1 == UnitFactory.COP_WITH_SHIELD)) && ((_arg2 == AmmoFactory.ROCKET)))){
return (2);
};
if ((((_arg1 == UnitFactory.HEADQUARTERS)) && ((_arg2 == AmmoFactory.MOLOTOV)))){
return (1.5);
};
if ((((_arg1 == UnitFactory.COP_WITH_SHOTGUN)) && ((_arg2 == AmmoFactory.MOLOTOV)))){
return (0.5);
};
if ((((_arg1 == UnitFactory.SNIPER)) && ((_arg2 == AmmoFactory.ROCKET)))){
return (0.3);
};
if ((((_arg1 == UnitFactory.HEADQUARTERS)) && ((_arg2 == AmmoFactory.MIND)))){
return (0);
};
if ((((_arg1 == UnitFactory.HEADQUARTERS)) && ((_arg2 == AmmoFactory.TIME_BOMB)))){
return (0.3);
};
if ((((_arg1 == UnitFactory.HEADQUARTERS)) && ((_arg2 == AmmoFactory.BOLT)))){
return (0.1);
};
if ((((_arg1 == UnitFactory.TANK)) && ((_arg2 == AmmoFactory.ROCKET)))){
return (3);
};
if ((((_arg1 == UnitFactory.TANK)) && ((_arg2 == AmmoFactory.BOLT)))){
return (2);
};
if ((((_arg1 == UnitFactory.TANK)) && ((_arg2 == AmmoFactory.TIME_BOMB)))){
return (2);
};
if ((((_arg1 == UnitFactory.TANK)) && ((_arg2 == AmmoFactory.LASER)))){
return (0.5);
};
if ((((_arg1 == UnitFactory.TANK)) && ((_arg2 == AmmoFactory.BULLET)))){
return (0.2);
};
if ((((_arg1 == UnitFactory.ROCKET_SOLIDER)) && ((_arg2 == AmmoFactory.BOLT)))){
return (0.5);
};
if ((((_arg1 == UnitFactory.HEADQUARTERS)) && ((_arg2 == AmmoFactory.EXPLODE_SUICIDE_CAR)))){
return (0.5);
};
if ((((_arg1 == UnitFactory.TANK)) && ((_arg2 == AmmoFactory.MIND)))){
return (5);
};
if ((((_arg1 == UnitFactory.FLY_ROBOT)) && ((_arg2 == AmmoFactory.MIND)))){
return (0);
};
if ((((_arg1 == UnitFactory.ROBOT)) && ((_arg2 == AmmoFactory.MIND)))){
return (0);
};
if ((((_arg1 == UnitFactory.SUICIDE_CAR)) && ((_arg2 == AmmoFactory.MIND)))){
return (0);
};
if ((((_arg1 == UnitFactory.SUICIDE_CAR)) && ((_arg2 == AmmoFactory.BULLET)))){
return (0.3);
};
if ((((_arg1 == UnitFactory.SUICIDE_CAR)) && ((_arg2 == AmmoFactory.ROCKET)))){
return (3);
};
return (1);
}
}
}//package com.veltive.cityinvasion.utils
Section 112
//TargetScaner (com.veltive.cityinvasion.utils.TargetScaner)
package com.veltive.cityinvasion.utils {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.battlefield.*;
public class TargetScaner {
public static function findTarget(_arg1:AbstractUnit):AbstractUnit{
var _local3:AbstractUnit;
var _local2:Lane = Lane(_arg1.lane);
if (_arg1.group == UnitGroup.GROUP_FRIEND){
_local3 = _local2.targetEnemy;
} else {
_local3 = _local2.targetFriend;
};
if (((_local3) && ((Math.abs((((_local3.x + _local3.endAmmoX) - _arg1.x) - _arg1.initAmmoX)) < _arg1.rangeMax)))){
return (_local3);
};
return (null);
}
}
}//package com.veltive.cityinvasion.utils
Section 113
//TextTimer (com.veltive.cityinvasion.utils.TextTimer)
package com.veltive.cityinvasion.utils {
import flash.utils.*;
public class TextTimer {
public function TextTimer(_arg1:Number, _arg2:Function){
var _local3:Timer = new Timer(_arg1, 1);
_local3.addEventListener("timer", _arg2);
_local3.start();
}
}
}//package com.veltive.cityinvasion.utils
Section 114
//TimeKeeper (com.veltive.cityinvasion.utils.TimeKeeper)
package com.veltive.cityinvasion.utils {
import flash.events.*;
import flash.utils.*;
public class TimeKeeper {
private var _duration;// = 0
var _timer:Timer;
public function start(){
_timer = new Timer(1000);
_timer.addEventListener(TimerEvent.TIMER, tick);
_timer.start();
}
function tick(_arg1){
_duration++;
}
public function clear(){
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, tick);
}
public function get duration():Number{
return (_duration);
}
}
}//package com.veltive.cityinvasion.utils
Section 115
//TypeWriter (com.veltive.cityinvasion.utils.TypeWriter)
package com.veltive.cityinvasion.utils {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class TypeWriter extends Sprite {
private var _rowTypewriter;
private var _currentNum;// = 0
private var rowH;// = 30
private var _StrArr:Array;
private var _isCenter:Boolean;
public function TypeWriter(_arg1:Boolean=true){
_StrArr = [];
_isCenter = _arg1;
}
public function start(){
createRow();
}
public function set interval(_arg1:int){
_rowTypewriter._interval = int;
}
function createRow(_arg1=null){
_rowTypewriter = new RowTypewriter(_StrArr[_currentNum], _isCenter);
_rowTypewriter.y = (rowH * _currentNum);
if (_currentNum == (_StrArr.length - 1)){
};
_rowTypewriter.addEventListener(Event.COMPLETE, finished);
addChild(_rowTypewriter);
}
public function addString(_arg1:String):void{
_StrArr.push(_arg1);
_currentNum = 0;
}
public function clear(){
var _local2:*;
var _local1:* = 0;
while (_local1 < this.numChildren) {
_local2 = this.getChildAt(_local1);
if ((_local2 is RowTypewriter)){
_local2.removeEventListener(Event.COMPLETE, createRow);
_local2.clear();
_local1--;
};
_local1++;
};
}
function finished(_arg1){
_arg1.currentTarget.removeEventListener(Event.COMPLETE, createRow);
_currentNum++;
if (_currentNum < _StrArr.length){
createRow();
} else {
dispatchEvent(new Event(Event.COMPLETE));
};
}
}
}//package com.veltive.cityinvasion.utils
import flash.events.*;
import flash.display.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
import flash.utils.*;
class RowTypewriter extends Sprite {
private var _timer:Timer;
public var _startDelayLeft;// = 10
private var _block;
private var _txtContainer:Sprite;
public var _interval;// = 4
private var _time:Number;// = 0
public var _endDelayLeft;// = 20
private var _str:String;// = "Missiion 1"
private var _wordNum;
private var _currentNum;// = 0
private var _isCenter:Boolean;// = true
private function RowTypewriter(_arg1:String, _arg2:Boolean=true):void{
var _local4:String;
_block = new TypeBlock();
super();
_str = _arg1;
_isCenter = _arg2;
_wordNum = _str.length;
_txtContainer = new Sprite();
addChild(_txtContainer);
var _local3:* = 0;
while (_local3 < _wordNum) {
_local4 = _str.substr(_local3, 1);
type(_local3, _local4);
_local3++;
};
if (_isCenter){
_txtContainer.x = ((700 - _txtContainer.width) / 2);
};
_timer = new Timer(10);
_timer.addEventListener(TimerEvent.TIMER, tick);
_timer.start();
}
private function type(_arg1, _arg2){
var _local4:*;
var _local3:* = new TypeTxt();
_local3.txt.text = _arg2;
_local3.txt.selectable = false;
_local3.name = _arg1;
_local3.txt.autoSize = "left";
_local3.visible = false;
_txtContainer.addChild(_local3);
if (_arg1 == 0){
} else {
_local4 = _txtContainer.getChildByName(String((_arg1 - 1)));
_local3.x = (_local4.x + GameVariables.txtDistance);
};
}
public function clear():void{
_block.stop();
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, tick);
if (this.parent){
this.parent.removeChild(this);
};
}
private function checkEndDelay():Boolean{
if (_endDelayLeft-- <= 0){
return (true);
};
return (false);
}
private function tick(_arg1){
var _local2:*;
var _local3:GameSound;
_time++;
if (_currentNum <= (_wordNum - 1)){
_local2 = _txtContainer.getChildByName(String(_currentNum));
_txtContainer.addChild(_block);
_block.x = _local2.x;
_block.y = (_local2.y + 3);
};
if ((_time % _interval) == 0){
_time = 0;
if (checkStartDelay() == false){
return;
};
if (_currentNum <= (_wordNum - 1)){
_local2.visible = true;
_currentNum++;
if (_local2.txt.text != " "){
_local3 = new GameSound(new TypeSound());
_local3.resume();
};
} else {
if (checkEndDelay() == true){
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, tick);
dispatchEvent(new Event(Event.COMPLETE));
_block.stop();
_txtContainer.removeChild(_block);
};
};
};
}
private function checkStartDelay():Boolean{
if (_startDelayLeft-- <= 0){
return (true);
};
return (false);
}
}
Section 116
//Volume (com.veltive.cityinvasion.utils.Volume)
package com.veltive.cityinvasion.utils {
import flash.events.*;
import flash.display.*;
public class Volume extends Sprite {
private static var _volume;
public function change(){
dispatchEvent(new Event(Event.CHANGE));
}
public static function getInstance(){
if (_volume == null){
_volume = new (Volume);
};
return (_volume);
}
}
}//package com.veltive.cityinvasion.utils
Section 117
//Command (com.veltive.cityinvasion.Command)
package com.veltive.cityinvasion {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ui.*;
import com.veltive.cityinvasion.battlefield.*;
import com.veltive.cityinvasion.player.*;
import flash.events.*;
import com.veltive.cityinvasion.ammos.*;
import flash.text.*;
import com.veltive.cityinvasion.commands.*;
public class Command {
private static var AppointArr:Array = [];
public static function getPlayerData(_arg1:int):PlayerData{
if (GameVariables.PLAYER_FRIEND.group == _arg1){
return (GameVariables.PLAYER_FRIEND);
};
return (GameVariables.PLAYER_ENEMY);
}
public static function getLane(_arg1):Lane{
var _local2:BattleField = BattleField.getInstance();
var _local3:int = _arg1;
if (_arg1 < 0){
_local3 = Math.floor((Math.random() * GameVariables.LANES_NUM));
};
var _local4:Lane = _local2.lanes[_local3];
return (_local4);
}
public static function addUnit(_arg1:String, _arg2:int, _arg3:int=-1, _arg4:int=1):AbstractUnit{
if ((_arg4 < 0)){
_arg4 = 0;
//unresolved jump
};
var _local5:* = getLane(_arg3);
var _local6:AbstractUnit = UnitFactory.getUnit(_arg1, _arg2);
_local5.addUnit(_local6);
return (_local6);
}
private static function cmdRemoved(_arg1){
var _local2:Appoint = _arg1.currentTarget;
var _local3:* = AppointArr.indexOf(_local2);
if (_local3 != -1){
AppointArr.splice(_local3, 1);
} else {
trace("cmd not in the list?");
};
_local2.removeEventListener(Event.REMOVED, cmdRemoved);
}
public static function cheer(_arg1:int=1){
var _local4:Lane;
var _local5:Array;
var _local6:Array;
var _local7:*;
var _local2:* = 0;
var _local3:* = 0;
while (_local3 < BattleField.getInstance().lanes.length) {
_local4 = BattleField.getInstance().lanes[_local3];
_local5 = [];
_local6 = [];
if (_arg1 == -1){
_local5 = _local4.getFriendArr(GameVariables.HUMAN_GROUP);
_local6 = _local4.getEnemyArr(GameVariables.HUMAN_GROUP);
} else {
_local6 = _local4.getFriendArr(GameVariables.HUMAN_GROUP);
_local5 = _local4.getEnemyArr(GameVariables.HUMAN_GROUP);
};
_local7 = 0;
while (_local7 < _local6.length) {
_local6[_local7].state = UnitStateFactory.CHEER;
_local7++;
};
_local7 = 0;
while (_local7 < _local5.length) {
if (_local5[_local7]){
if (_local2 < 2){
_local5[_local7].state = UnitStateFactory.DIE;
_local2++;
} else {
_local5[_local7].state = UnitStateFactory.SILENT_DIE;
};
_local7--;
};
_local7++;
};
_local3++;
};
}
public static function clear(){
while (AppointArr.length) {
AppointArr[0].clear();
};
}
public static function AddMobilisation(_arg1:ProduceBtn):void{
var _local2:Mobilisation = new Mobilisation(_arg1);
AppointArr.push(_local2);
_local2.addEventListener(Event.REMOVED, cmdRemoved);
_local2.resume();
}
public static function shack(){
var _local1:* = new Shake();
AppointArr.push(_local1);
_local1.addEventListener(Event.REMOVED, cmdRemoved);
_local1.resume();
}
public static function clearBloodBar(){
var _local2:Lane;
var _local3:Array;
var _local4:Array;
var _local5:*;
var _local1:* = 0;
while (_local1 < BattleField.getInstance().lanes.length) {
_local2 = BattleField.getInstance().lanes[_local1];
_local3 = [];
_local4 = [];
_local4 = _local2.getFriendArr(GameVariables.HUMAN_GROUP);
_local3 = _local2.getEnemyArr(GameVariables.HUMAN_GROUP);
_local5 = 0;
while (_local5 < _local4.length) {
AbstractUnit(_local4[_local5]).clearBloodBar();
_local5++;
};
_local5 = 0;
while (_local5 < _local3.length) {
AbstractUnit(_local3[_local5]).clearBloodBar();
_local5++;
};
_local1++;
};
}
public static function pause(){
var _local1:* = 0;
while (_local1 < AppointArr.length) {
AppointArr[_local1].pause();
_local1++;
};
}
public static function addBombRain(_arg1:String, _arg2:int, _arg3:int=-1, _arg4:int=1):void{
var _local5:BombRain = new BombRain(_arg1, _arg2, _arg3, _arg4);
AppointArr.push(_local5);
_local5.addEventListener(Event.REMOVED, cmdRemoved);
_local5.resume();
}
public static function addRush(_arg1:String, _arg2:int, _arg3:int=-1, _arg4:int=1):void{
var _local5:Rush = new Rush(_arg1, _arg2, _arg3, _arg4);
AppointArr.push(_local5);
_local5.addEventListener(Event.REMOVED, cmdRemoved);
_local5.resume();
}
public static function addBloodBar(){
var _local2:Lane;
var _local3:Array;
var _local4:Array;
var _local5:*;
var _local1:* = 0;
while (_local1 < BattleField.getInstance().lanes.length) {
_local2 = BattleField.getInstance().lanes[_local1];
_local3 = [];
_local4 = [];
_local4 = _local2.getFriendArr(GameVariables.HUMAN_GROUP);
_local3 = _local2.getEnemyArr(GameVariables.HUMAN_GROUP);
_local5 = 0;
while (_local5 < _local4.length) {
if (!(_local4[_local5] is Headquarters)){
AbstractUnit(_local4[_local5]).addBloodBar();
};
_local5++;
};
_local5 = 0;
while (_local5 < _local3.length) {
if (!(_local4[_local5] is Headquarters)){
AbstractUnit(_local3[_local5]).addBloodBar();
};
_local5++;
};
_local1++;
};
}
public static function resume(){
var _local1:* = 0;
while (_local1 < AppointArr.length) {
AppointArr[_local1].resume();
_local1++;
};
}
public static function putAmmo(_arg1:String, _arg2:int, _arg3:int=-1, _arg4:int=1, _arg5:ProduceBtn=null):void{
var _local6:PutAmmo = new PutAmmo(_arg1, _arg2, _arg3, _arg4, _arg5);
AppointArr.push(_local6);
_local6.addEventListener(Event.REMOVED, cmdRemoved);
_local6.resume();
}
}
}//package com.veltive.cityinvasion
Section 118
//GameVariables (com.veltive.cityinvasion.GameVariables)
package com.veltive.cityinvasion {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ui.*;
import com.veltive.cityinvasion.player.*;
import com.veltive.cityinvasion.utils.*;
import com.veltive.cityinvasion.pages.*;
public class GameVariables {
public static const STAGE_WIDTH = 700;
public static const LANES_NUM:int = 5;
public static const PLAYER_ENEMY = new PlayerData(UnitGroup.GROUP_ENEMY);
public static const FRAME_RATE = 31;
public static const PLAYER_LIFE:Number = 100;
public static const MAX_RECORDS = 10;
public static const STAGE_HEIGHT = 480;
public static const PLAYER_FRIEND = new PlayerData(UnitGroup.GROUP_FRIEND);
public static const SHOOTED = "shooted";
public static const SHOOTING = "shooting";
public static const DEAD = "dead";
public static var AI_GROUP:int;
public static var SAVED_LEVEL:int;
public static var AI_LEVEL = 0;
public static var unitsNum = 0;
public static var IN_BATTLE:Boolean = false;
public static var txtDistance:Number = 13;
public static var LANE_DEX_AI = 0;
public static var MAX_LEVEL:int = 5;
public static var LANE_DEX = 0;
public static var HUMAN_GROUP:int;
public static var CURRENT_PAGE:AbstractPage;
public static var MUSIC_VOLUME:Number = 1;
public static var GAME_SPD:Number = 0.5;
public static var LEAVE_BODY = false;
public static var GIVE_UP_RATE = 0.1;
public static var STAGE;
public static var SOUND_VOLUME:Number = 1;
public static var LEVEL:int;
public static function set soundVol(_arg1:Number){
SOUND_VOLUME = _arg1;
Volume.getInstance().change();
}
public static function set humanGroup(_arg1:int){
HUMAN_GROUP = _arg1;
if (_arg1 == UnitGroup.GROUP_FRIEND){
AI_GROUP = UnitGroup.GROUP_ENEMY;
} else {
AI_GROUP = UnitGroup.GROUP_FRIEND;
};
if (_arg1 == UnitGroup.GROUP_FRIEND){
Controler(GamePage.getInstance().ControlerMc).group = UnitGroup.GROUP_FRIEND;
Controler(AI.getInstance().controler).group = UnitGroup.GROUP_ENEMY;
Controler(AI_TUTO.getInstance().controler).group = UnitGroup.GROUP_ENEMY;
} else {
Controler(GamePage.getInstance().ControlerMc).group = UnitGroup.GROUP_ENEMY;
Controler(AI.getInstance().controler).group = UnitGroup.GROUP_FRIEND;
Controler(AI_TUTO.getInstance().controler).group = UnitGroup.GROUP_FRIEND;
};
}
public static function set musicVol(_arg1:Number){
MUSIC_VOLUME = _arg1;
Volume.getInstance().change();
}
}
}//package com.veltive.cityinvasion
Section 119
//IGameObject (com.veltive.cityinvasion.IGameObject)
package com.veltive.cityinvasion {
public interface IGameObject {
function clear():void;
function resume():void;
function pause():void;
}
}//package com.veltive.cityinvasion
Section 120
//IndeterminateBar (fl.controls.progressBarClasses.IndeterminateBar)
package fl.controls.progressBarClasses {
import flash.display.*;
import fl.core.*;
import flash.events.*;
public class IndeterminateBar extends UIComponent {
protected var bar:Sprite;
protected var barMask:Sprite;
protected var patternBmp:BitmapData;
protected var animationCount:uint;// = 0
private static var defaultStyles:Object = {indeterminateSkin:"ProgressBar_indeterminateSkin"};
public function IndeterminateBar(){
animationCount = 0;
super();
setSize(0, 0);
startAnimation();
}
protected function drawBar():void{
var _local1:Graphics;
if (patternBmp == null){
return;
};
_local1 = bar.graphics;
_local1.clear();
_local1.beginBitmapFill(patternBmp);
_local1.drawRect(0, 0, (_width + patternBmp.width), _height);
_local1.endFill();
}
protected function drawMask():void{
var _local1:Graphics;
_local1 = barMask.graphics;
_local1.clear();
_local1.beginFill(0, 0);
_local1.drawRect(0, 0, _width, _height);
_local1.endFill();
}
override public function get visible():Boolean{
return (super.visible);
}
override public function set visible(_arg1:Boolean):void{
if (_arg1){
startAnimation();
} else {
stopAnimation();
};
super.visible = _arg1;
}
protected function startAnimation():void{
addEventListener(Event.ENTER_FRAME, handleEnterFrame, false, 0, true);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
drawPattern();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawBar();
drawMask();
};
super.draw();
}
override protected function configUI():void{
bar = new Sprite();
addChild(bar);
barMask = new Sprite();
addChild(barMask);
bar.mask = barMask;
}
protected function stopAnimation():void{
removeEventListener(Event.ENTER_FRAME, handleEnterFrame);
}
protected function drawPattern():void{
var _local1:DisplayObject;
_local1 = getDisplayObjectInstance(getStyleValue("indeterminateSkin"));
if (patternBmp){
patternBmp.dispose();
};
patternBmp = new BitmapData((_local1.width << 0), (_local1.height << 0), true, 0);
patternBmp.draw(_local1);
}
protected function handleEnterFrame(_arg1:Event):void{
if (patternBmp == null){
return;
};
animationCount = ((animationCount + 2) % patternBmp.width);
bar.x = -(animationCount);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls.progressBarClasses
Section 121
//BaseButton (fl.controls.BaseButton)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import flash.utils.*;
import fl.events.*;
public class BaseButton extends UIComponent {
protected var _selected:Boolean;// = false
private var unlockedMouseState:String;
protected var pressTimer:Timer;
protected var mouseState:String;
protected var background:DisplayObject;
private var _mouseStateLocked:Boolean;// = false
protected var _autoRepeat:Boolean;// = false
private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35};
public function BaseButton(){
_selected = false;
_autoRepeat = false;
_mouseStateLocked = false;
super();
buttonMode = true;
mouseChildren = false;
useHandCursor = false;
setupMouseEvents();
setMouseState("up");
pressTimer = new Timer(1, 0);
pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true);
}
protected function endPress():void{
pressTimer.reset();
}
public function set mouseStateLocked(_arg1:Boolean):void{
_mouseStateLocked = _arg1;
if (_arg1 == false){
setMouseState(unlockedMouseState);
} else {
unlockedMouseState = mouseState;
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
mouseEnabled = _arg1;
}
public function get selected():Boolean{
return (_selected);
}
protected function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_DOWN){
setMouseState("down");
startPress();
} else {
if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){
setMouseState("over");
endPress();
} else {
if (_arg1.type == MouseEvent.ROLL_OUT){
setMouseState("up");
endPress();
};
};
};
}
public function setMouseState(_arg1:String):void{
if (_mouseStateLocked){
unlockedMouseState = _arg1;
return;
};
if (mouseState == _arg1){
return;
};
mouseState = _arg1;
invalidate(InvalidationType.STATE);
}
protected function startPress():void{
if (_autoRepeat){
pressTimer.delay = Number(getStyleValue("repeatDelay"));
pressTimer.start();
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
protected function buttonDown(_arg1:TimerEvent):void{
if (!_autoRepeat){
endPress();
return;
};
if (pressTimer.currentCount == 1){
pressTimer.delay = Number(getStyleValue("repeatInterval"));
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
public function set selected(_arg1:Boolean):void{
if (_selected == _arg1){
return;
};
_selected = _arg1;
invalidate(InvalidationType.STATE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function setupMouseEvents():void{
addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true);
}
protected function drawLayout():void{
background.width = width;
background.height = height;
}
protected function drawBackground():void{
var _local1:String;
var _local2:DisplayObject;
_local1 = (enabled) ? mouseState : "disabled";
if (selected){
_local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1));
};
_local1 = (_local1 + "Skin");
_local2 = background;
background = getDisplayObjectInstance(getStyleValue(_local1));
addChildAt(background, 0);
if (((!((_local2 == null))) && (!((_local2 == background))))){
removeChild(_local2);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 122
//Button (fl.controls.Button)
package fl.controls {
import flash.display.*;
import fl.core.*;
import fl.managers.*;
public class Button extends LabelButton implements IFocusManagerComponent {
protected var emphasizedBorder:DisplayObject;
protected var _emphasized:Boolean;// = false
private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2};
public static var createAccessibilityImplementation:Function;
public function Button(){
_emphasized = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
var _local3:*;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("emphasizedPadding"));
if ((((_local2 < 0)) || (!(_emphasized)))){
_local2 = 0;
};
_local3 = getStyleValue("focusRectPadding");
_local3 = ((_local3)==null) ? 2 : _local3;
_local3 = (_local3 + _local2);
uiFocusRect.x = -(_local3);
uiFocusRect.y = -(_local3);
uiFocusRect.width = (width + (_local3 * 2));
uiFocusRect.height = (height + (_local3 * 2));
};
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
invalidate(InvalidationType.STYLES);
}
override protected function draw():void{
if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){
drawEmphasized();
};
super.draw();
if (emphasizedBorder != null){
setChildIndex(emphasizedBorder, (numChildren - 1));
};
}
public function get emphasized():Boolean{
return (_emphasized);
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
protected function drawEmphasized():void{
var _local1:Object;
var _local2:Number;
if (emphasizedBorder != null){
removeChild(emphasizedBorder);
};
emphasizedBorder = null;
if (!_emphasized){
return;
};
_local1 = getStyleValue("emphasizedSkin");
if (_local1 != null){
emphasizedBorder = getDisplayObjectInstance(_local1);
};
if (emphasizedBorder != null){
addChildAt(emphasizedBorder, 0);
_local2 = Number(getStyleValue("emphasizedPadding"));
emphasizedBorder.x = (emphasizedBorder.y = -(_local2));
emphasizedBorder.width = (width + (_local2 * 2));
emphasizedBorder.height = (height + (_local2 * 2));
};
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles));
}
}
}//package fl.controls
Section 123
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement)
package fl.controls {
public class ButtonLabelPlacement {
public static const TOP:String = "top";
public static const LEFT:String = "left";
public static const BOTTOM:String = "bottom";
public static const RIGHT:String = "right";
}
}//package fl.controls
Section 124
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.ui.*;
public class LabelButton extends BaseButton implements IFocusManagerComponent {
protected var _labelPlacement:String;// = "right"
protected var _toggle:Boolean;// = false
protected var icon:DisplayObject;
protected var oldMouseState:String;
protected var mode:String;// = "center"
public var textField:TextField;
protected var _label:String;// = "Label"
private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function LabelButton(){
_labelPlacement = ButtonLabelPlacement.RIGHT;
_toggle = false;
_label = "Label";
mode = "center";
super();
}
protected function toggleSelected(_arg1:MouseEvent):void{
selected = !(selected);
dispatchEvent(new Event(Event.CHANGE, true));
}
public function get labelPlacement():String{
return (_labelPlacement);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
if (oldMouseState == null){
oldMouseState = mouseState;
};
setMouseState("down");
startPress();
};
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
setMouseState(oldMouseState);
oldMouseState = null;
endPress();
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
}
override public function get selected():Boolean{
return ((_toggle) ? _selected : false);
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set toggle(_arg1:Boolean):void{
if (((!(_arg1)) && (super.selected))){
selected = false;
};
_toggle = _arg1;
if (_toggle){
addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true);
} else {
removeEventListener(MouseEvent.CLICK, toggleSelected);
};
invalidate(InvalidationType.STATE);
}
public function get label():String{
return (_label);
}
override public function set selected(_arg1:Boolean):void{
_selected = _arg1;
if (_toggle){
invalidate(InvalidationType.STATE);
};
}
override protected function draw():void{
if (textField.text != _label){
label = _label;
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
drawIcon();
drawTextFormat();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
public function get toggle():Boolean{
return (_toggle);
}
override protected function configUI():void{
super.configUI();
textField = new TextField();
textField.type = TextFieldType.DYNAMIC;
textField.selectable = false;
addChild(textField);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement;
textField.height = (textField.textHeight + 4);
_local3 = (textField.textWidth + 4);
_local4 = (textField.textHeight + 4);
_local5 = ((icon)==null) ? 0 : (icon.width + _local1);
_local6 = ((icon)==null) ? 0 : (icon.height + _local1);
textField.visible = (label.length > 0);
if (icon != null){
icon.x = Math.round(((width - icon.width) / 2));
icon.y = Math.round(((height - icon.height) / 2));
};
if (textField.visible == false){
textField.width = 0;
textField.height = 0;
} else {
if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){
_local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1))));
if ((height - 2) > _local4){
_local8 = _local4;
} else {
_local8 = (height - 2);
};
_local3 = _local7;
textField.width = _local3;
_local4 = _local8;
textField.height = _local4;
textField.x = Math.round(((width - _local3) / 2));
textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0));
if (icon != null){
icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1));
};
} else {
_local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1))));
_local3 = _local7;
textField.width = _local3;
textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0));
textField.y = Math.round(((height - textField.height) / 2));
if (icon != null){
icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1));
};
};
};
super.drawLayout();
}
override protected function initializeAccessibility():void{
if (LabelButton.createAccessibilityImplementation != null){
LabelButton.createAccessibilityImplementation(this);
};
}
protected function drawIcon():void{
var _local1:DisplayObject;
var _local2:String;
var _local3:Object;
_local1 = icon;
_local2 = (enabled) ? mouseState : "disabled";
if (selected){
_local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1));
};
_local2 = (_local2 + "Icon");
_local3 = getStyleValue(_local2);
if (_local3 == null){
_local3 = getStyleValue("icon");
};
if (_local3 != null){
icon = getDisplayObjectInstance(_local3);
};
if (icon != null){
addChildAt(icon, 1);
};
if (((!((_local1 == null))) && (!((_local1 == icon))))){
removeChild(_local1);
};
}
public function set label(_arg1:String):void{
_label = _arg1;
if (textField.text != _label){
textField.text = _label;
dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE));
};
invalidate(InvalidationType.SIZE);
invalidate(InvalidationType.STYLES);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition()));
}
}
}//package fl.controls
Section 125
//ProgressBar (fl.controls.ProgressBar)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.controls.progressBarClasses.*;
public class ProgressBar extends UIComponent {
protected var _direction:String;// = "right"
protected var _mode:String;// = "event"
protected var _value:Number;// = 0
protected var _indeterminate:Boolean;// = true
protected var _minimum:Number;// = 0
protected var _maximum:Number;// = 0
protected var determinateBar:DisplayObject;
protected var _loaded:Number;
protected var _source:Object;
protected var track:DisplayObject;
protected var indeterminateBar:UIComponent;
private static var defaultStyles:Object = {trackSkin:"ProgressBar_trackSkin", barSkin:"ProgressBar_barSkin", indeterminateSkin:"ProgressBar_indeterminateSkin", indeterminateBar:IndeterminateBar, barPadding:0};
public function ProgressBar(){
_direction = ProgressBarDirection.RIGHT;
_indeterminate = true;
_mode = ProgressBarMode.EVENT;
_minimum = 0;
_maximum = 0;
_value = 0;
super();
}
public function get minimum():Number{
return (_minimum);
}
public function get source():Object{
return (_source);
}
public function set minimum(_arg1:Number):void{
if (_mode != ProgressBarMode.MANUAL){
return;
};
_minimum = _arg1;
invalidate(InvalidationType.DATA);
}
public function get maximum():Number{
return (_maximum);
}
protected function drawBars():void{
var _local1:DisplayObject;
var _local2:DisplayObject;
_local1 = determinateBar;
_local2 = indeterminateBar;
determinateBar = getDisplayObjectInstance(getStyleValue("barSkin"));
addChild(determinateBar);
indeterminateBar = (getDisplayObjectInstance(getStyleValue("indeterminateBar")) as UIComponent);
indeterminateBar.setStyle("indeterminateSkin", getStyleValue("indeterminateSkin"));
addChild(indeterminateBar);
if (((!((_local1 == null))) && (!((_local1 == determinateBar))))){
removeChild(_local1);
};
if (((!((_local2 == null))) && (!((_local2 == determinateBar))))){
removeChild(_local2);
};
}
protected function setupSourceEvents():void{
_source.addEventListener(ProgressEvent.PROGRESS, handleProgress, false, 0, true);
_source.addEventListener(Event.COMPLETE, handleComplete, false, 0, true);
}
public function set maximum(_arg1:Number):void{
setProgress(_value, _arg1);
}
public function set source(_arg1:Object):void{
if (_source == _arg1){
return;
};
if (_mode != ProgressBarMode.MANUAL){
resetProgress();
};
_source = _arg1;
if (_source == null){
return;
};
if (_mode == ProgressBarMode.EVENT){
setupSourceEvents();
} else {
if (_mode == ProgressBarMode.POLLED){
addEventListener(Event.ENTER_FRAME, pollSource, false, 0, true);
};
};
}
protected function drawTrack():void{
var _local1:DisplayObject;
_local1 = track;
track = getDisplayObjectInstance(getStyleValue("trackSkin"));
addChildAt(track, 0);
if (((!((_local1 == null))) && (!((_local1 == track))))){
removeChild(_local1);
};
}
protected function handleProgress(_arg1:ProgressEvent):void{
_setProgress(_arg1.bytesLoaded, _arg1.bytesTotal, true);
}
public function set sourceName(_arg1:String):void{
var _local2:DisplayObject;
if (!componentInspectorSetting){
return;
};
if (_arg1 == ""){
return;
};
_local2 = (parent.getChildByName(_arg1) as DisplayObject);
if (_local2 == null){
throw (new Error((("Source clip '" + _arg1) + "' not found on parent.")));
};
source = _local2;
}
protected function resetProgress():void{
if ((((_mode == ProgressBarMode.EVENT)) && (!((_source == null))))){
cleanupSourceEvents();
} else {
if (_mode == ProgressBarMode.POLLED){
removeEventListener(Event.ENTER_FRAME, pollSource);
} else {
if (_source != null){
_source = null;
};
};
};
_minimum = (_maximum = (_value = 0));
}
public function get percentComplete():Number{
return (((((_maximum <= _minimum)) || ((_value <= _minimum)))) ? 0 : Math.max(0, Math.min(100, (((_value - _minimum) / (_maximum - _minimum)) * 100))));
}
public function setProgress(_arg1:Number, _arg2:Number):void{
if (_mode != ProgressBarMode.MANUAL){
return;
};
_setProgress(_arg1, _arg2);
}
protected function pollSource(_arg1:Event):void{
if (_source == null){
return;
};
_setProgress(_source.bytesLoaded, _source.bytesTotal, true);
if ((((_maximum > 0)) && ((_maximum == _value)))){
removeEventListener(Event.ENTER_FRAME, pollSource);
dispatchEvent(new Event(Event.COMPLETE));
};
}
public function get indeterminate():Boolean{
return (_indeterminate);
}
public function set value(_arg1:Number):void{
setProgress(_arg1, _maximum);
}
public function set direction(_arg1:String):void{
_direction = _arg1;
invalidate(InvalidationType.DATA);
}
protected function _setProgress(_arg1:Number, _arg2:Number, _arg3:Boolean=false):void{
if ((((_arg1 == _value)) && ((_arg2 == _maximum)))){
return;
};
_value = _arg1;
_maximum = _arg2;
if (((!((_value == _loaded))) && (_arg3))){
dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, _value, _maximum));
_loaded = _value;
};
if (_mode != ProgressBarMode.MANUAL){
setIndeterminate((_arg2 == 0));
};
invalidate(InvalidationType.DATA);
}
public function set mode(_arg1:String):void{
if (_mode == _arg1){
return;
};
resetProgress();
_mode = _arg1;
if ((((_arg1 == ProgressBarMode.EVENT)) && (!((_source == null))))){
setupSourceEvents();
} else {
if (_arg1 == ProgressBarMode.POLLED){
addEventListener(Event.ENTER_FRAME, pollSource, false, 0, true);
};
};
setIndeterminate(!((_mode == ProgressBarMode.MANUAL)));
}
public function reset():void{
var _local1:Object;
_setProgress(0, 0);
_local1 = _source;
_source = null;
source = _local1;
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
drawTrack();
drawBars();
invalidate(InvalidationType.STATE, false);
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.STATE)){
indeterminateBar.visible = _indeterminate;
determinateBar.visible = !(_indeterminate);
invalidate(InvalidationType.DATA, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
invalidate(InvalidationType.DATA, false);
};
if (((isInvalid(InvalidationType.DATA)) && (!(_indeterminate)))){
drawDeterminateBar();
};
super.draw();
}
override protected function configUI():void{
super.configUI();
}
protected function drawDeterminateBar():void{
var _local1:Number;
var _local2:Number;
_local1 = (percentComplete / 100);
_local2 = Number(getStyleValue("barPadding"));
determinateBar.width = Math.round(((width - (_local2 * 2)) * _local1));
determinateBar.x = ((_direction)==ProgressBarDirection.LEFT) ? ((width - _local2) - determinateBar.width) : _local2;
}
public function get value():Number{
return (_value);
}
public function set indeterminate(_arg1:Boolean):void{
if (((!((_mode == ProgressBarMode.MANUAL))) || ((_indeterminate == _arg1)))){
return;
};
setIndeterminate(_arg1);
}
protected function setIndeterminate(_arg1:Boolean):void{
if (_indeterminate == _arg1){
return;
};
_indeterminate = _arg1;
invalidate(InvalidationType.STATE);
}
protected function handleComplete(_arg1:Event):void{
_setProgress(_maximum, _maximum, true);
dispatchEvent(_arg1);
}
protected function drawLayout():void{
var _local1:Number;
_local1 = Number(getStyleValue("barPadding"));
track.width = width;
track.height = height;
indeterminateBar.setSize((width - (_local1 * 2)), (height - (_local1 * 2)));
indeterminateBar.move(_local1, _local1);
indeterminateBar.drawNow();
determinateBar.height = (height - (_local1 * 2));
determinateBar.y = _local1;
}
public function get direction():String{
return (_direction);
}
public function get mode():String{
return (_mode);
}
protected function cleanupSourceEvents():void{
_source.removeEventListener(ProgressEvent.PROGRESS, handleProgress);
_source.removeEventListener(Event.COMPLETE, handleComplete);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 126
//ProgressBarDirection (fl.controls.ProgressBarDirection)
package fl.controls {
public class ProgressBarDirection {
public static const RIGHT:String = "right";
public static const LEFT:String = "left";
}
}//package fl.controls
Section 127
//ProgressBarMode (fl.controls.ProgressBarMode)
package fl.controls {
public class ProgressBarMode {
public static const MANUAL:String = "manual";
public static const EVENT:String = "event";
public static const POLLED:String = "polled";
}
}//package fl.controls
Section 128
//Slider (fl.controls.Slider)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.ui.*;
public class Slider extends UIComponent implements IFocusManagerComponent {
protected var _direction:String;
protected var _liveDragging:Boolean;// = false
protected var _value:Number;// = 0
protected var _snapInterval:Number;// = 0
protected var _minimum:Number;// = 0
protected var _maximum:Number;// = 10
protected var track:BaseButton;
protected var _tickInterval:Number;// = 0
protected var tickContainer:Sprite;
protected var thumb:BaseButton;
protected static const TICK_STYLES:Object = {upSkin:"tickSkin"};
protected static const TRACK_STYLES:Object = {upSkin:"sliderTrackSkin", overSkin:"sliderTrackSkin", downSkin:"sliderTrackSkin", disabledSkin:"sliderTrackDisabledSkin"};
protected static const THUMB_STYLES:Object = {upSkin:"thumbUpSkin", overSkin:"thumbOverSkin", downSkin:"thumbDownSkin", disabledSkin:"thumbDisabledSkin"};
protected static var defaultStyles:Object = {thumbUpSkin:"SliderThumb_upSkin", thumbOverSkin:"SliderThumb_overSkin", thumbDownSkin:"SliderThumb_downSkin", thumbDisabledSkin:"SliderThumb_disabledSkin", sliderTrackSkin:"SliderTrack_skin", sliderTrackDisabledSkin:"SliderTrack_disabledSkin", tickSkin:"SliderTick_skin", focusRectSkin:null, focusRectPadding:null};
public function Slider(){
_direction = SliderDirection.HORIZONTAL;
_minimum = 0;
_maximum = 10;
_value = 0;
_tickInterval = 0;
_snapInterval = 0;
_liveDragging = false;
super();
setStyles();
}
public function get minimum():Number{
return (_minimum);
}
public function set minimum(_arg1:Number):void{
_minimum = _arg1;
this.value = Math.max(_arg1, this.value);
invalidate(InvalidationType.DATA);
}
public function get maximum():Number{
return (_maximum);
}
protected function positionThumb():void{
thumb.x = ((((_direction)==SliderDirection.VERTICAL) ? ((maximum - minimum) - value) : (value - minimum) / (maximum - minimum)) * _width);
}
protected function clearTicks():void{
if (((!(tickContainer)) || (!(tickContainer.parent)))){
return;
};
removeChild(tickContainer);
}
protected function onTrackClick(_arg1:MouseEvent):void{
calculateValue(track.mouseX, InteractionInputType.MOUSE, SliderEventClickTarget.TRACK);
if (!liveDragging){
dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, SliderEventClickTarget.TRACK, InteractionInputType.MOUSE));
};
}
public function set maximum(_arg1:Number):void{
_maximum = _arg1;
this.value = Math.min(_arg1, this.value);
invalidate(InvalidationType.DATA);
}
public function get liveDragging():Boolean{
return (_liveDragging);
}
protected function doDrag(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:Number;
_local2 = (_width / snapInterval);
_local3 = track.mouseX;
calculateValue(_local3, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB);
dispatchEvent(new SliderEvent(SliderEvent.THUMB_DRAG, value, SliderEventClickTarget.THUMB, InteractionInputType.MOUSE));
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:uint;
var _local3:Number;
var _local4:Boolean;
if (!enabled){
return;
};
_local2 = ((snapInterval)>0) ? snapInterval : 1;
_local4 = (direction == SliderDirection.HORIZONTAL);
if ((((((_arg1.keyCode == Keyboard.DOWN)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.LEFT)) && (_local4))))){
_local3 = (value - _local2);
} else {
if ((((((_arg1.keyCode == Keyboard.UP)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.RIGHT)) && (_local4))))){
_local3 = (value + _local2);
} else {
if ((((((_arg1.keyCode == Keyboard.PAGE_DOWN)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.HOME)) && (_local4))))){
_local3 = minimum;
} else {
if ((((((_arg1.keyCode == Keyboard.PAGE_UP)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.END)) && (_local4))))){
_local3 = maximum;
};
};
};
};
if (!isNaN(_local3)){
_arg1.stopPropagation();
doSetValue(_local3, InteractionInputType.KEYBOARD, null, _arg1.keyCode);
};
}
override public function set enabled(_arg1:Boolean):void{
if (enabled == _arg1){
return;
};
super.enabled = _arg1;
track.enabled = (thumb.enabled = _arg1);
}
protected function thumbPressHandler(_arg1:MouseEvent):void{
stage.addEventListener(MouseEvent.MOUSE_MOVE, doDrag, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true);
dispatchEvent(new SliderEvent(SliderEvent.THUMB_PRESS, value, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB));
}
public function get snapInterval():Number{
return (_snapInterval);
}
protected function thumbReleaseHandler(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, doDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler);
dispatchEvent(new SliderEvent(SliderEvent.THUMB_RELEASE, value, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB));
dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, SliderEventClickTarget.THUMB, InteractionInputType.MOUSE));
}
public function set liveDragging(_arg1:Boolean):void{
_liveDragging = _arg1;
}
public function set value(_arg1:Number):void{
doSetValue(_arg1);
}
public function set direction(_arg1:String):void{
var _local2:Boolean;
_direction = _arg1;
_local2 = (_direction == SliderDirection.VERTICAL);
if (isLivePreview){
if (_local2){
setScaleY(-1);
y = track.height;
} else {
setScaleY(1);
y = 0;
};
positionThumb();
return;
};
if (((_local2) && (componentInspectorSetting))){
if ((rotation % 90) == 0){
setScaleY(-1);
};
};
if (!componentInspectorSetting){
rotation = (_local2) ? 90 : 0;
};
}
public function set tickInterval(_arg1:Number):void{
_tickInterval = _arg1;
invalidate(InvalidationType.SIZE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
setStyles();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
track.setSize(_width, track.height);
track.drawNow();
thumb.drawNow();
};
if (tickInterval > 0){
drawTicks();
} else {
clearTicks();
};
positionThumb();
super.draw();
}
override protected function configUI():void{
super.configUI();
thumb = new BaseButton();
thumb.setSize(13, 13);
thumb.autoRepeat = false;
addChild(thumb);
thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true);
track = new BaseButton();
track.move(0, 0);
track.setSize(80, 4);
track.autoRepeat = false;
track.useHandCursor = false;
track.addEventListener(MouseEvent.CLICK, onTrackClick, false, 0, true);
addChildAt(track, 0);
}
public function set snapInterval(_arg1:Number):void{
_snapInterval = _arg1;
}
public function get value():Number{
return (_value);
}
public function get direction():String{
return (_direction);
}
public function get tickInterval():Number{
return (_tickInterval);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
if ((((_direction == SliderDirection.VERTICAL)) && (!(isLivePreview)))){
super.setSize(_arg2, _arg1);
} else {
super.setSize(_arg1, _arg2);
};
invalidate(InvalidationType.SIZE);
}
protected function drawTicks():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:uint;
var _local5:DisplayObject;
clearTicks();
tickContainer = new Sprite();
_local1 = ((maximum)<1) ? (tickInterval / 100) : tickInterval;
_local2 = ((maximum - minimum) / _local1);
_local3 = (_width / _local2);
_local4 = 0;
while (_local4 <= _local2) {
_local5 = getDisplayObjectInstance(getStyleValue("tickSkin"));
_local5.x = (_local3 * _local4);
_local5.y = ((track.y - _local5.height) - 2);
tickContainer.addChild(_local5);
_local4++;
};
addChild(tickContainer);
}
protected function calculateValue(_arg1:Number, _arg2:String, _arg3:String, _arg4:int=undefined):void{
var _local5:Number;
_local5 = ((_arg1 / _width) * (maximum - minimum));
if (_direction == SliderDirection.VERTICAL){
_local5 = (maximum - _local5);
} else {
_local5 = (minimum + _local5);
};
doSetValue(_local5, _arg2, _arg3, _arg4);
}
protected function getPrecision(_arg1:Number):Number{
var _local2:String;
_local2 = _arg1.toString();
if (_local2.indexOf(".") == -1){
return (0);
};
return (_local2.split(".").pop().length);
}
protected function doSetValue(_arg1:Number, _arg2:String=null, _arg3:String=null, _arg4:int=undefined):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local5 = _value;
if (((!((_snapInterval == 0))) && (!((_snapInterval == 1))))){
_local6 = Math.pow(10, getPrecision(snapInterval));
_local7 = (_snapInterval * _local6);
_local8 = Math.round((_arg1 * _local6));
_local9 = (Math.round((_local8 / _local7)) * _local7);
_arg1 = (_local9 / _local6);
_value = Math.max(minimum, Math.min(maximum, _arg1));
} else {
_value = Math.max(minimum, Math.min(maximum, Math.round(_arg1)));
};
if (((!((_local5 == _value))) && (((((liveDragging) && (!((_arg3 == null))))) || ((_arg2 == InteractionInputType.KEYBOARD)))))){
dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, _arg3, _arg2, _arg4));
};
positionThumb();
}
protected function setStyles():void{
copyStylesToChild(thumb, THUMB_STYLES);
copyStylesToChild(track, TRACK_STYLES);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 129
//SliderDirection (fl.controls.SliderDirection)
package fl.controls {
public class SliderDirection {
public static var HORIZONTAL:String = "horizontal";
public static var VERTICAL:String = "vertical";
}
}//package fl.controls
Section 130
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 131
//InvalidationType (fl.core.InvalidationType)
package fl.core {
public class InvalidationType {
public static const SIZE:String = "size";
public static const ALL:String = "all";
public static const DATA:String = "data";
public static const SCROLL:String = "scroll";
public static const STATE:String = "state";
public static const STYLES:String = "styles";
public static const SELECTED:String = "selected";
public static const RENDERER_STYLES:String = "rendererStyles";
}
}//package fl.core
Section 132
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import flash.utils.*;
import fl.events.*;
import flash.text.*;
import flash.system.*;
public class UIComponent extends Sprite {
protected var _enabled:Boolean;// = true
private var _mouseFocusEnabled:Boolean;// = true
protected var startHeight:Number;
protected var _height:Number;
protected var _oldIMEMode:String;// = null
protected var startWidth:Number;
public var focusTarget:IFocusManagerComponent;
protected var errorCaught:Boolean;// = false
protected var uiFocusRect:DisplayObject;
protected var _width:Number;
public var version:String;// = "3.0.0.15"
protected var isFocused:Boolean;// = false
protected var callLaterMethods:Dictionary;
private var _focusEnabled:Boolean;// = true
private var tempText:TextField;
protected var invalidateFlag:Boolean;// = false
protected var _inspector:Boolean;// = false
protected var sharedStyles:Object;
protected var invalidHash:Object;
protected var isLivePreview:Boolean;// = false
protected var _imeMode:String;// = null
protected var instanceStyles:Object;
protected var _x:Number;
protected var _y:Number;
public static var inCallLaterPhase:Boolean = false;
private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)};
public static var createAccessibilityImplementation:Function;
private static var focusManagers:Dictionary = new Dictionary(false);
public function UIComponent(){
version = "3.0.0.15";
isLivePreview = false;
invalidateFlag = false;
_enabled = true;
isFocused = false;
_focusEnabled = true;
_mouseFocusEnabled = true;
_imeMode = null;
_oldIMEMode = null;
errorCaught = false;
_inspector = false;
super();
instanceStyles = {};
sharedStyles = {};
invalidHash = {};
callLaterMethods = new Dictionary();
StyleManager.registerInstance(this);
configUI();
invalidate(InvalidationType.ALL);
tabEnabled = (this is IFocusManagerComponent);
focusRect = false;
if (tabEnabled){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
initializeFocusManager();
addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true);
}
public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
isFocused = _arg1;
if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){
removeChild(uiFocusRect);
uiFocusRect = null;
};
if (_arg1){
uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite);
if (uiFocusRect == null){
return;
};
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = -(_local2);
uiFocusRect.y = -(_local2);
uiFocusRect.width = (width + (_local2 * 2));
uiFocusRect.height = (height + (_local2 * 2));
addChildAt(uiFocusRect, 0);
};
}
private function callLaterDispatcher(_arg1:Event):void{
var _local2:Dictionary;
var _local3:Object;
if (_arg1.type == Event.ADDED_TO_STAGE){
removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher);
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
return;
};
_arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
return;
};
inCallLaterPhase = true;
_local2 = callLaterMethods;
for (_local3 in _local2) {
_local3();
delete _local2[_local3];
};
inCallLaterPhase = false;
}
private function addedHandler(_arg1:Event):void{
removeEventListener("addedToStage", addedHandler);
initializeFocusManager();
}
protected function getStyleValue(_arg1:String):Object{
return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]);
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
override public function get scaleX():Number{
return ((width / startWidth));
}
override public function get scaleY():Number{
return ((height / startHeight));
}
override public function set height(_arg1:Number):void{
if (_height == _arg1){
return;
};
setSize(width, _arg1);
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus((_arg1.target as DisplayObject))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
isFocused = true;
};
};
}
public function setStyle(_arg1:String, _arg2:Object):void{
if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
instanceStyles[_arg1] = _arg2;
invalidate(InvalidationType.STYLES);
}
override public function get visible():Boolean{
return (super.visible);
}
public function get componentInspectorSetting():Boolean{
return (_inspector);
}
override public function get x():Number{
return ((isNaN(_x)) ? super.x : _x);
}
override public function get y():Number{
return ((isNaN(_y)) ? super.y : _y);
}
protected function setIMEMode(_arg1:Boolean){
var enabled = _arg1;
if (_imeMode != null){
if (enabled){
IME.enabled = true;
_oldIMEMode = IME.conversionMode;
try {
if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _imeMode;
};
errorCaught = false;
} catch(e:Error) {
errorCaught = true;
throw (new Error(("IME mode not supported: " + _imeMode)));
};
} else {
if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _oldIMEMode;
};
IME.enabled = false;
};
};
}
public function set enabled(_arg1:Boolean):void{
if (_arg1 == _enabled){
return;
};
_enabled = _arg1;
invalidate(InvalidationType.STATE);
}
public function setSharedStyle(_arg1:String, _arg2:Object):void{
if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
sharedStyles[_arg1] = _arg2;
if (instanceStyles[_arg1] == null){
invalidate(InvalidationType.STYLES);
};
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
override public function set scaleX(_arg1:Number):void{
setSize((startWidth * _arg1), height);
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
override public function set scaleY(_arg1:Number):void{
setSize(width, (startHeight * _arg1));
}
protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{
var classDef:Object;
var skin = _arg1;
classDef = null;
if ((skin is Class)){
return ((new (skin) as DisplayObject));
};
if ((skin is DisplayObject)){
(skin as DisplayObject).x = 0;
(skin as DisplayObject).y = 0;
return ((skin as DisplayObject));
};
try {
classDef = getDefinitionByName(skin.toString());
} catch(e:Error) {
try {
classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object);
} catch(e:Error) {
};
};
if (classDef == null){
return (null);
};
return ((new (classDef) as DisplayObject));
}
protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{
var _local3:String;
for (_local3 in _arg2) {
_arg1.setStyle(_local3, getStyleValue(_arg2[_local3]));
};
}
protected function beforeComponentParameters():void{
}
protected function callLater(_arg1:Function):void{
if (inCallLaterPhase){
return;
};
callLaterMethods[_arg1] = true;
if (stage != null){
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
} else {
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
};
}
protected function createFocusManager():void{
if (focusManagers[stage] == null){
focusManagers[stage] = new FocusManager(stage);
};
}
override public function set visible(_arg1:Boolean):void{
var _local2:String;
if (super.visible == _arg1){
return;
};
super.visible = _arg1;
_local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE;
dispatchEvent(new ComponentEvent(_local2, true));
}
protected function hookAccessibility(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, hookAccessibility);
initializeAccessibility();
}
public function set componentInspectorSetting(_arg1:Boolean):void{
_inspector = _arg1;
if (_inspector){
beforeComponentParameters();
} else {
afterComponentParameters();
};
}
override public function set x(_arg1:Number):void{
move(_arg1, _y);
}
public function drawNow():void{
draw();
}
override public function set y(_arg1:Number):void{
move(_x, _arg1);
}
protected function checkLivePreview():Boolean{
var className:String;
if (parent == null){
return (false);
};
try {
className = getQualifiedClassName(parent);
} catch(e:Error) {
};
return ((className == "fl.livepreview::LivePreviewParent"));
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus((_arg1.target as DisplayObject))){
drawFocus(false);
isFocused = false;
};
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
public function getFocus():InteractiveObject{
if (stage){
return (stage.focus);
};
return (null);
}
protected function validate():void{
invalidHash = {};
}
override public function get height():Number{
return (_height);
}
public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{
invalidHash[_arg1] = true;
if (_arg2){
this.callLater(draw);
};
}
public function get enabled():Boolean{
return (_enabled);
}
protected function getScaleX():Number{
return (super.scaleX);
}
protected function getScaleY():Number{
return (super.scaleY);
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
protected function afterComponentParameters():void{
}
protected function draw():void{
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
protected function configUI():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
isLivePreview = checkLivePreview();
_local1 = rotation;
rotation = 0;
_local2 = super.width;
_local3 = super.height;
var _local4 = 1;
super.scaleY = _local4;
super.scaleX = _local4;
setSize(_local2, _local3);
move(super.x, super.y);
rotation = _local1;
startWidth = _local2;
startHeight = _local3;
if (numChildren > 0){
removeChildAt(0);
};
}
protected function setScaleX(_arg1:Number):void{
super.scaleX = _arg1;
}
protected function setScaleY(_arg1:Number):void{
super.scaleY = _arg1;
}
private function initializeFocusManager():void{
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true);
} else {
createFocusManager();
};
}
public function set focusManager(_arg1:IFocusManager):void{
UIComponent.focusManagers[this] = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
protected function isInvalid(_arg1:String, ... _args):Boolean{
if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){
return (true);
};
while (_args.length > 0) {
if (invalidHash[_args.pop()]){
return (true);
};
};
return (false);
}
public function setSize(_arg1:Number, _arg2:Number):void{
_width = _arg1;
_height = _arg2;
invalidate(InvalidationType.SIZE);
dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false));
}
override public function set width(_arg1:Number):void{
if (_width == _arg1){
return;
};
setSize(_arg1, height);
}
public function setFocus():void{
if (stage){
stage.focus = this;
};
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
public function get focusManager():IFocusManager{
var _local1:DisplayObject;
_local1 = this;
while (_local1) {
if (UIComponent.focusManagers[_local1] != null){
return (IFocusManager(UIComponent.focusManagers[_local1]));
};
_local1 = _local1.parent;
};
return (null);
}
override public function get width():Number{
return (_width);
}
public function move(_arg1:Number, _arg2:Number):void{
_x = _arg1;
_y = _arg2;
super.x = Math.round(_arg1);
super.y = Math.round(_arg2);
dispatchEvent(new ComponentEvent(ComponentEvent.MOVE));
}
public function validateNow():void{
invalidate(InvalidationType.ALL, false);
draw();
}
public function getStyle(_arg1:String):Object{
return (instanceStyles[_arg1]);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
public static function mergeStyles(... _args):Object{
var _local2:Object;
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:String;
_local2 = {};
_local3 = _args.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _args[_local4];
for (_local6 in _local5) {
if (_local2[_local6] != null){
} else {
_local2[_local6] = _args[_local4][_local6];
};
};
_local4++;
};
return (_local2);
}
}
}//package fl.core
Section 133
//ComponentEvent (fl.events.ComponentEvent)
package fl.events {
import flash.events.*;
public class ComponentEvent extends Event {
public static const HIDE:String = "hide";
public static const BUTTON_DOWN:String = "buttonDown";
public static const MOVE:String = "move";
public static const RESIZE:String = "resize";
public static const ENTER:String = "enter";
public static const LABEL_CHANGE:String = "labelChange";
public static const SHOW:String = "show";
public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function toString():String{
return (formatToString("ComponentEvent", "type", "bubbles", "cancelable"));
}
override public function clone():Event{
return (new ComponentEvent(type, bubbles, cancelable));
}
}
}//package fl.events
Section 134
//InteractionInputType (fl.events.InteractionInputType)
package fl.events {
public class InteractionInputType {
public static const MOUSE:String = "mouse";
public static const KEYBOARD:String = "keyboard";
}
}//package fl.events
Section 135
//SliderEvent (fl.events.SliderEvent)
package fl.events {
import flash.events.*;
public class SliderEvent extends Event {
protected var _triggerEvent:String;
protected var _keyCode:Number;
protected var _value:Number;
protected var _clickTarget:String;
public static const CHANGE:String = "change";
public static const THUMB_PRESS:String = "thumbPress";
public static const THUMB_DRAG:String = "thumbDrag";
public static const THUMB_RELEASE:String = "thumbRelease";
public function SliderEvent(_arg1:String, _arg2:Number, _arg3:String, _arg4:String, _arg5:int=0){
_value = _arg2;
_keyCode = _arg5;
_triggerEvent = _arg4;
_clickTarget = _arg3;
super(_arg1);
}
public function get clickTarget():String{
return (_clickTarget);
}
override public function clone():Event{
return (new SliderEvent(type, _value, _clickTarget, _triggerEvent, _keyCode));
}
override public function toString():String{
return (formatToString("SliderEvent", "type", "value", "bubbles", "cancelable", "keyCode", "triggerEvent", "clickTarget"));
}
public function get triggerEvent():String{
return (_triggerEvent);
}
public function get value():Number{
return (_value);
}
public function get keyCode():Number{
return (_keyCode);
}
}
}//package fl.events
Section 136
//SliderEventClickTarget (fl.events.SliderEventClickTarget)
package fl.events {
public class SliderEventClickTarget {
public static const TRACK:String = "track";
public static const THUMB:String = "thumb";
}
}//package fl.events
Section 137
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
import fl.core.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
public class FocusManager implements IFocusManager {
private var focusableObjects:Dictionary;
private var _showFocusIndicator:Boolean;// = true
private var defButton:Button;
private var focusableCandidates:Array;
private var _form:DisplayObjectContainer;
private var _defaultButtonEnabled:Boolean;// = true
private var activated:Boolean;// = false
private var _defaultButton:Button;
private var calculateCandidates:Boolean;// = true
private var lastFocus:InteractiveObject;
private var lastAction:String;
public function FocusManager(_arg1:DisplayObjectContainer){
activated = false;
calculateCandidates = true;
_showFocusIndicator = true;
_defaultButtonEnabled = true;
super();
focusableObjects = new Dictionary(true);
if (_arg1 != null){
_form = _arg1;
addFocusables(DisplayObject(_arg1));
_arg1.addEventListener(Event.ADDED, addedHandler);
_arg1.addEventListener(Event.REMOVED, removedHandler);
activate();
};
}
public function get showFocusIndicator():Boolean{
return (_showFocusIndicator);
}
private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{
var _local5:int;
var _local6:int;
var _local7:DisplayObject;
var _local8:IFocusManagerGroup;
var _local9:int;
var _local10:DisplayObject;
var _local11:IFocusManagerGroup;
_local5 = focusableCandidates.length;
_local6 = _arg1;
while (true) {
if (_arg2){
_arg1--;
} else {
_arg1++;
};
if (_arg3){
if (((_arg2) && ((_arg1 < 0)))){
break;
};
if (((!(_arg2)) && ((_arg1 == _local5)))){
break;
};
} else {
_arg1 = ((_arg1 + _local5) % _local5);
if (_local6 == _arg1){
break;
};
};
if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){
_local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1]));
if ((_local7 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local7);
_local9 = 0;
while (_local9 < focusableCandidates.length) {
_local10 = focusableCandidates[_local9];
if ((_local10 is IFocusManagerGroup)){
_local11 = IFocusManagerGroup(_local10);
if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){
_arg1 = _local9;
break;
};
};
_local9++;
};
};
return (_arg1);
};
};
return (_arg1);
}
public function set form(_arg1:DisplayObjectContainer):void{
_form = _arg1;
}
private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{
var focusable:IFocusManagerComponent;
var io:InteractiveObject;
var doc:DisplayObjectContainer;
var i:int;
var child:DisplayObject;
var o = _arg1;
var skipTopLevel = _arg2;
if (!skipTopLevel){
if ((o is IFocusManagerComponent)){
focusable = IFocusManagerComponent(o);
if (focusable.focusEnabled){
if (((focusable.tabEnabled) && (isTabVisible(o)))){
focusableObjects[o] = true;
calculateCandidates = true;
};
o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
} else {
if ((o is InteractiveObject)){
io = (o as InteractiveObject);
if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){
focusableObjects[io] = true;
calculateCandidates = true;
};
io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){
i = 0;
while (i < doc.numChildren) {
try {
child = doc.getChildAt(i);
if (child != null){
addFocusables(doc.getChildAt(i));
};
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
return (_arg1.getChildIndex(_arg2));
}
private function mouseFocusChangeHandler(_arg1:FocusEvent):void{
if ((_arg1.relatedObject is TextField)){
return;
};
_arg1.preventDefault();
}
private function focusOutHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
_local2 = (_arg1.target as InteractiveObject);
}
private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{
var _local3:IFocusManagerGroup;
if (!isEnabledAndVisible(_arg1)){
return (false);
};
if ((_arg1 is IFocusManagerGroup)){
_local3 = IFocusManagerGroup(_arg1);
if (_arg2 == _local3.groupName){
return (false);
};
};
return (true);
}
public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{
var _local2:InteractiveObject;
_local2 = _arg1;
while (_arg1) {
if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
};
return (_local2);
}
private function sortFocusableObjectsTabIndex():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){
focusableCandidates.push(_local2);
};
};
focusableCandidates.sort(sortByTabIndex);
}
private function removeFocusables(_arg1:DisplayObject):void{
var _local2:Object;
var _local3:DisplayObject;
if ((_arg1 is DisplayObjectContainer)){
_arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
_arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
for (_local2 in focusableObjects) {
_local3 = DisplayObject(_local2);
if (DisplayObjectContainer(_arg1).contains(_local3)){
if (_local3 == lastFocus){
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local2];
calculateCandidates = true;
};
};
};
}
private function addedHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target);
if (_local2.stage){
addFocusables(DisplayObject(_arg1.target));
};
}
private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{
while (_arg1 != InteractiveObject(form)) {
if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
if (_arg1 == null){
break;
};
};
return (null);
}
private function tabChildrenChangeHandler(_arg1:Event):void{
var _local2:DisplayObjectContainer;
if (_arg1.target != _arg1.currentTarget){
return;
};
calculateCandidates = true;
_local2 = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
addFocusables(_local2, true);
} else {
removeFocusables(_local2);
};
}
public function sendDefaultButtonEvent():void{
defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
public function getFocus():InteractiveObject{
var _local1:InteractiveObject;
_local1 = form.stage.focus;
return (findFocusManagerComponent(_local1));
}
private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
var _local3:TextField;
var _local4:SimpleButton;
_local2 = DisplayObject(form).parent;
while (_arg1 != _local2) {
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).enabled){
return (false);
};
} else {
if ((_arg1 is TextField)){
_local3 = TextField(_arg1);
if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){
return (false);
};
} else {
if ((_arg1 is SimpleButton)){
_local4 = SimpleButton(_arg1);
if (!_local4.enabled){
return (false);
};
};
};
};
if (!_arg1.visible){
return (false);
};
_arg1 = _arg1.parent;
};
return (true);
}
public function set defaultButton(_arg1:Button):void{
var _local2:Button;
_local2 = (_arg1) ? Button(_arg1) : null;
if (_local2 != _defaultButton){
if (_defaultButton){
_defaultButton.emphasized = false;
};
if (defButton){
defButton.emphasized = false;
};
_defaultButton = _local2;
defButton = _local2;
if (_local2){
_local2.emphasized = true;
};
};
}
private function deactivateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
public function setFocus(_arg1:InteractiveObject):void{
if ((_arg1 is IFocusManagerComponent)){
IFocusManagerComponent(_arg1).setFocus();
} else {
form.stage.focus = _arg1;
};
}
private function setFocusToNextObject(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
if (!hasFocusableObjects()){
return;
};
_local2 = getNextFocusManagerComponent(_arg1.shiftKey);
if (_local2){
setFocus(_local2);
};
}
private function hasFocusableObjects():Boolean{
var _local1:Object;
for (_local1 in focusableObjects) {
return (true);
};
return (false);
}
private function tabIndexChangeHandler(_arg1:Event):void{
calculateCandidates = true;
}
private function sortFocusableObjects():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){
sortFocusableObjectsTabIndex();
return;
};
focusableCandidates.push(_local2);
};
focusableCandidates.sort(sortByDepth);
}
private function keyFocusChangeHandler(_arg1:FocusEvent):void{
showFocusIndicator = true;
if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){
setFocusToNextObject(_arg1);
_arg1.preventDefault();
};
}
private function getIndexOfFocusedObject(_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = focusableCandidates.length;
_local3 = 0;
_local3 = 0;
while (_local3 < _local2) {
if (focusableCandidates[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function hideFocus():void{
}
private function removedHandler(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:InteractiveObject;
_local3 = DisplayObject(_arg1.target);
if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){
if (_local3 == lastFocus){
IFocusManagerComponent(lastFocus).drawFocus(false);
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local3];
calculateCandidates = true;
} else {
if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){
_local4 = (_local3 as InteractiveObject);
if (_local4){
if (_local4 == lastFocus){
lastFocus = null;
};
delete focusableObjects[_local4];
calculateCandidates = true;
};
_local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
};
};
removeFocusables(_local3);
}
private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:DisplayObject;
var _local10:DisplayObject;
_local3 = "";
_local4 = "";
_local8 = "0000";
_local9 = DisplayObject(_arg1);
_local10 = DisplayObject(_arg2);
while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) {
_local5 = getChildIndex(_local9.parent, _local9);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local3 = (_local7 + _local3);
_local9 = _local9.parent;
};
while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) {
_local5 = getChildIndex(_local10.parent, _local10);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local4 = (_local7 + _local4);
_local10 = _local10.parent;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0);
}
public function get defaultButton():Button{
return (_defaultButton);
}
private function activateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
if (lastFocus){
if ((lastFocus is IFocusManagerComponent)){
IFocusManagerComponent(lastFocus).setFocus();
} else {
form.stage.focus = lastFocus;
};
};
lastAction = "ACTIVATE";
}
public function showFocus():void{
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
_defaultButtonEnabled = _arg1;
}
public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{
var _local2:DisplayObject;
var _local3:String;
var _local4:int;
var _local5:Boolean;
var _local6:int;
var _local7:int;
var _local8:IFocusManagerGroup;
if (!hasFocusableObjects()){
return (null);
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
_local2 = form.stage.focus;
_local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2)));
_local3 = "";
if ((_local2 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local2);
_local3 = _local8.groupName;
};
_local4 = getIndexOfFocusedObject(_local2);
_local5 = false;
_local6 = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = focusableCandidates.length;
};
_local5 = true;
};
_local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3);
return (findFocusManagerComponent(focusableCandidates[_local7]));
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:InteractiveObject;
if (_arg1.isDefaultPrevented()){
return;
};
_local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target));
if (!_local2){
return;
};
showFocusIndicator = false;
if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){
setFocus(_local2);
};
lastAction = "MOUSEDOWN";
}
private function isTabVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
_local2 = _arg1.parent;
while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) {
if (!_local2.tabChildren){
return (false);
};
_local2 = _local2.parent;
};
return (true);
}
public function get nextTabIndex():int{
return (0);
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.TAB){
lastAction = "KEY";
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){
sendDefaultButtonEvent();
};
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
var _local3:Button;
_local2 = InteractiveObject(_arg1.target);
if (form.contains(_local2)){
lastFocus = findFocusManagerComponent(InteractiveObject(_local2));
if ((lastFocus is Button)){
_local3 = Button(lastFocus);
if (defButton){
defButton.emphasized = false;
defButton = _local3;
_local3.emphasized = true;
};
} else {
if (((defButton) && (!((defButton == _defaultButton))))){
defButton.emphasized = false;
defButton = _defaultButton;
_defaultButton.emphasized = true;
};
};
};
}
private function tabEnabledChangeHandler(_arg1:Event):void{
var _local2:InteractiveObject;
var _local3:Boolean;
calculateCandidates = true;
_local2 = InteractiveObject(_arg1.target);
_local3 = (focusableObjects[_local2] == true);
if (_local2.tabEnabled){
if (((!(_local3)) && (isTabVisible(_local2)))){
if (!(_local2 is IFocusManagerComponent)){
_local2.focusRect = false;
};
focusableObjects[_local2] = true;
};
} else {
if (_local3){
delete focusableObjects[_local2];
};
};
}
public function set showFocusIndicator(_arg1:Boolean):void{
_showFocusIndicator = _arg1;
}
public function get form():DisplayObjectContainer{
return (_form);
}
private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{
return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2));
}
public function activate():void{
if (activated){
return;
};
form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = true;
if (lastFocus){
setFocus(lastFocus);
};
}
public function deactivate():void{
form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.removeEventListener(Event.ACTIVATE, activateHandler);
form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = false;
}
public function get defaultButtonEnabled():Boolean{
return (_defaultButtonEnabled);
}
}
}//package fl.managers
Section 138
//IFocusManager (fl.managers.IFocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
public interface IFocusManager {
function getFocus():InteractiveObject;
function deactivate():void;
function set defaultButton(_arg1:Button):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function get nextTabIndex():int;
function get defaultButton():Button;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:InteractiveObject):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject;
function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject;
}
}//package fl.managers
Section 139
//IFocusManagerComponent (fl.managers.IFocusManagerComponent)
package fl.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package fl.managers
Section 140
//IFocusManagerGroup (fl.managers.IFocusManagerGroup)
package fl.managers {
public interface IFocusManagerGroup {
function set groupName(_arg1:String):void;
function set selected(_arg1:Boolean):void;
function get groupName():String;
function get selected():Boolean;
}
}//package fl.managers
Section 141
//StyleManager (fl.managers.StyleManager)
package fl.managers {
import fl.core.*;
import flash.utils.*;
import flash.text.*;
public class StyleManager {
private var globalStyles:Object;
private var classToDefaultStylesDict:Dictionary;
private var styleToClassesHash:Object;
private var classToStylesDict:Dictionary;
private var classToInstancesDict:Dictionary;
private static var _instance:StyleManager;
public function StyleManager(){
styleToClassesHash = {};
classToInstancesDict = new Dictionary(true);
classToStylesDict = new Dictionary(true);
classToDefaultStylesDict = new Dictionary(true);
globalStyles = UIComponent.getStyleDefinition();
}
public static function clearComponentStyle(_arg1:Object, _arg2:String):void{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){
delete _local4[_arg2];
invalidateComponentStyle(_local3, _arg2);
};
}
private static function getClassDef(_arg1:Object):Class{
var component = _arg1;
if ((component is Class)){
return ((component as Class));
};
try {
return ((getDefinitionByName(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
if ((component is UIComponent)){
try {
return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
};
};
};
return (null);
}
public static function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Class;
var _local5:Object;
_local4 = getClassDef(_arg1);
_local5 = getInstance().classToStylesDict[_local4];
if (_local5 == null){
_local5 = (getInstance().classToStylesDict[_local4] = {});
};
if (_local5 == _arg3){
return;
};
_local5[_arg2] = _arg3;
invalidateComponentStyle(_local4, _arg2);
}
private static function setSharedStyles(_arg1:UIComponent):void{
var _local2:StyleManager;
var _local3:Class;
var _local4:Object;
var _local5:String;
_local2 = getInstance();
_local3 = getClassDef(_arg1);
_local4 = _local2.classToDefaultStylesDict[_local3];
for (_local5 in _local4) {
_arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5));
};
}
public static function getComponentStyle(_arg1:Object, _arg2:String):Object{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
return (((_local4)==null) ? null : _local4[_arg2]);
}
private static function getInstance(){
if (_instance == null){
_instance = new (StyleManager);
};
return (_instance);
}
private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{
var _local3:Dictionary;
var _local4:Object;
var _local5:UIComponent;
_local3 = getInstance().classToInstancesDict[_arg1];
if (_local3 == null){
return;
};
for (_local4 in _local3) {
_local5 = (_local4 as UIComponent);
if (_local5 == null){
} else {
_local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2));
};
};
}
private static function invalidateStyle(_arg1:String):void{
var _local2:Dictionary;
var _local3:Object;
_local2 = getInstance().styleToClassesHash[_arg1];
if (_local2 == null){
return;
};
for (_local3 in _local2) {
invalidateComponentStyle(Class(_local3), _arg1);
};
}
public static function registerInstance(_arg1:UIComponent):void{
var inst:StyleManager;
var classDef:Class;
var target:Class;
var defaultStyles:Object;
var styleToClasses:Object;
var n:String;
var instance = _arg1;
inst = getInstance();
classDef = getClassDef(instance);
if (classDef == null){
return;
};
if (inst.classToInstancesDict[classDef] == null){
inst.classToInstancesDict[classDef] = new Dictionary(true);
target = classDef;
while (defaultStyles == null) {
if (target["getStyleDefinition"] != null){
defaultStyles = target["getStyleDefinition"]();
break;
};
try {
target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class);
} catch(err:Error) {
try {
target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class);
} catch(e:Error) {
defaultStyles = UIComponent.getStyleDefinition();
break;
};
};
};
styleToClasses = inst.styleToClassesHash;
for (n in defaultStyles) {
if (styleToClasses[n] == null){
styleToClasses[n] = new Dictionary(true);
};
styleToClasses[n][classDef] = true;
};
inst.classToDefaultStylesDict[classDef] = defaultStyles;
inst.classToStylesDict[classDef] = {};
};
inst.classToInstancesDict[classDef][instance] = true;
setSharedStyles(instance);
}
public static function getStyle(_arg1:String):Object{
return (getInstance().globalStyles[_arg1]);
}
private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{
var _local3:Class;
var _local4:StyleManager;
var _local5:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance();
_local5 = _local4.classToStylesDict[_local3][_arg2];
if (_local5 != null){
return (_local5);
};
_local5 = _local4.globalStyles[_arg2];
if (_local5 != null){
return (_local5);
};
return (_local4.classToDefaultStylesDict[_local3][_arg2]);
}
public static function setStyle(_arg1:String, _arg2:Object):void{
var _local3:Object;
_local3 = getInstance().globalStyles;
if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
_local3[_arg1] = _arg2;
invalidateStyle(_arg1);
}
}
}//package fl.managers
Section 142
//Back (gs.easing.Back)
package gs.easing {
public class Back {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2));
};
_arg1 = (_arg1 - 2);
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2));
}
}
}//package gs.easing
Section 143
//OverwriteManager (gs.OverwriteManager)
package gs {
import flash.utils.*;
import flash.errors.*;
public class OverwriteManager {
public static const ALL:int = 1;
public static const NONE:int = 0;
public static const AUTO:int = 2;
public static const CONCURRENT:int = 3;
public static const version:Number = 1;
public static var mode:int;
public static var enabled:Boolean;
public static function killVars(_arg1:Object, _arg2:Object, _arg3:Array, _arg4:Array, _arg5:Array):void{
var _local6:int;
var _local7:String;
_local6 = (_arg4.length - 1);
while (_local6 > -1) {
if (_arg1[_arg4[_local6].name] != undefined){
_arg4.splice(_local6, 1);
};
_local6--;
};
_local6 = (_arg3.length - 1);
while (_local6 > -1) {
if (_arg1[_arg3[_local6][4]] != undefined){
_arg3.splice(_local6, 1);
};
_local6--;
};
_local6 = (_arg5.length - 1);
while (_local6 > -1) {
if (_arg1[_arg5[_local6].name] != undefined){
_arg5.splice(_local6, 1);
};
_local6--;
};
for (_local7 in _arg1) {
delete _arg2[_local7];
};
}
public static function manageOverwrites(_arg1:TweenLite, _arg2:Array):void{
var _local7:int;
var _local8:TweenLite;
var _local9:Object;
var _local10:String;
var _local3:Object = _arg1.vars;
var _local4:int = ((_local3.overwrite)==undefined) ? mode : int(_local3.overwrite);
if ((((_local4 < 2)) || ((_arg2 == null)))){
return;
};
var _local5:Number = _arg1.startTime;
var _local6:Array = [];
_local7 = (_arg2.length - 1);
while (_local7 > -1) {
_local8 = _arg2[_local7];
if (((((!((_local8 == _arg1))) && ((_local8.startTime <= _local5)))) && (((_local8.startTime + ((_local8.duration * 1000) / _local8.combinedTimeScale)) > _local5)))){
_local6[_local6.length] = _local8;
};
_local7--;
};
if (_local6.length == 0){
return;
};
if (_local4 == AUTO){
if (_local3.isTV == true){
_local3 = _local3.exposedProps;
};
_local9 = {};
for (_local10 in _local3) {
if ((((((((((((((((((((((((((((((((((((((((((((_local10 == "ease")) || ((_local10 == "delay")))) || ((_local10 == "overwrite")))) || ((_local10 == "onComplete")))) || ((_local10 == "onCompleteParams")))) || ((_local10 == "runBackwards")))) || ((_local10 == "persist")))) || ((_local10 == "onUpdate")))) || ((_local10 == "onUpdateParams")))) || ((_local10 == "timeScale")))) || ((_local10 == "onStart")))) || ((_local10 == "onStartParams")))) || ((_local10 == "renderOnStart")))) || ((_local10 == "proxiedEase")))) || ((_local10 == "easeParams")))) || ((_local10 == "onCompleteAll")))) || ((_local10 == "onCompleteAllParams")))) || ((_local10 == "yoyo")))) || ((_local10 == "loop")))) || ((_local10 == "onCompleteListener")))) || ((_local10 == "onStartListener")))) || ((_local10 == "onUpdateListener")))){
} else {
_local9[_local10] = 1;
if (_local10 == "shortRotate"){
_local9.rotation = 1;
} else {
if (_local10 == "removeTint"){
_local9.tint = 1;
} else {
if (_local10 == "autoAlpha"){
_local9.alpha = 1;
_local9.visible = 1;
};
};
};
};
};
_local7 = (_local6.length - 1);
while (_local7 > -1) {
_local6[_local7].killVars(_local9);
_local7--;
};
} else {
_local7 = (_local6.length - 1);
while (_local7 > -1) {
_local6[_local7].enabled = false;
_local7--;
};
};
}
public static function init(_arg1:int=2):int{
if (TweenLite.version < 9.29){
trace("TweenLite warning: Your TweenLite class needs to be updated to work with OverwriteManager (or you may need to clear your ASO files). Please download and install the latest version from http://www.tweenlite.com.");
};
TweenLite.overwriteManager = OverwriteManager;
mode = _arg1;
enabled = true;
return (mode);
}
}
}//package gs
Section 144
//TweenGroup (gs.TweenGroup)
package gs {
import flash.events.*;
import flash.utils.*;
public dynamic class TweenGroup extends Proxy implements IEventDispatcher {
protected var _align:String;
protected var _tweens:Array;
protected var _reversed:Boolean;
public var loop:Number;
public var expired:Boolean;
public var yoyo:Number;
public var onComplete:Function;
protected var _dispatcher:EventDispatcher;
public var endTime:Number;
protected var _startTime:Number;
protected var _initTime:Number;
public var onCompleteParams:Array;
protected var _pauseTime:Number;
protected var _stagger:Number;
protected var _repeatCount:Number;
public static const ALIGN_END:String = "end";
public static const ALIGN_START:String = "start";
public static const ALIGN_INIT:String = "init";
public static const ALIGN_NONE:String = "none";
public static const version:Number = 0.996;
public static const ALIGN_SEQUENCE:String = "sequence";
protected static var _prevTime:uint = 0;
protected static var _unexpired:Array = [];
protected static var _classInitted:Boolean;
protected static var _TweenMax:Class;
public function TweenGroup(_arg1:Array=null, _arg2:Class=null, _arg3:String="none", _arg4:Number=0){
var overwriteMode:int;
var $tweens = _arg1;
var $DefaultTweenClass = _arg2;
var $align = _arg3;
var $stagger = _arg4;
super();
if (!_classInitted){
if (TweenLite.version < 9.29){
trace("TweenGroup error! Please update your TweenLite class or try deleting your ASO files. TweenGroup requires a more recent version. Download updates at http://www.TweenLite.com.");
};
try {
_TweenMax = (getDefinitionByName("gs.TweenMax") as Class);
} catch($e:Error) {
_TweenMax = Array;
};
overwriteMode = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init(2);
TweenLite.timingSprite.addEventListener(Event.ENTER_FRAME, checkExpiration, false, -1, true);
_classInitted = true;
};
this.expired = true;
_repeatCount = 0;
_align = $align;
_stagger = $stagger;
_dispatcher = new EventDispatcher(this);
if ($tweens != null){
_tweens = parse($tweens, $DefaultTweenClass);
updateTimeSpan();
realign();
} else {
_tweens = [];
_initTime = (_startTime = (this.endTime = 0));
};
}
protected function offsetTime(_arg1:Array, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
var _local5:Array;
var _local6:Boolean;
var _local7:TweenLite;
var _local8:Boolean;
var _local9:Number;
var _local10:Number;
var _local11:int;
var _local12:Array;
if (_arg1.length != 0){
_local3 = (_arg2 * 1000);
_local4 = (isNaN(_pauseTime)) ? TweenLite.currentTime : _pauseTime;
_local5 = getRenderOrder(_arg1, _local4);
_local12 = [];
_local11 = (_local5.length - 1);
while (_local11 > -1) {
_local7 = _local5[_local11];
_local5[_local11].initTime = (_local7.initTime + _local3);
_local6 = Boolean((_local7.startTime == 999999999999999));
_local9 = (_local7.initTime + (_local7.delay * (1000 / _local7.combinedTimeScale)));
_local10 = getEndTime(_local7);
_local8 = (((((_local9 <= _local4)) || (((_local9 - _local3) <= _local4)))) && ((((_local10 >= _local4)) || (((_local10 - _local3) >= _local4)))));
if (((isNaN(_pauseTime)) && ((_local10 >= _local4)))){
_local7.enabled = true;
};
if (!_local6){
_local7.startTime = _local9;
};
if (_local9 >= _local4){
if (!_local7.active){
_local8 = false;
};
_local7.active = false;
};
if (_local8){
_local12[_local12.length] = _local7;
};
_local11--;
};
_local11 = (_local12.length - 1);
while (_local11 > -1) {
renderTween(_local12[_local11], _local4);
_local11--;
};
this.endTime = (this.endTime + _local3);
_startTime = (_startTime + _local3);
_initTime = (_initTime + _local3);
if (((this.expired) && ((this.endTime > _local4)))){
this.expired = false;
_unexpired[_unexpired.length] = this;
};
};
}
protected function renderTween(_arg1:TweenLite, _arg2:Number):void{
var _local4:Number;
var _local5:Boolean;
var _local6:Boolean;
var _local7:Number;
var _local3:Number = getEndTime(_arg1);
if (_arg1.startTime == 999999999999999){
_arg1.startTime = (_arg1.initTime + (_arg1.delay * (1000 / _arg1.combinedTimeScale)));
_local5 = true;
};
if (!_arg1.initted){
_local6 = _arg1.active;
_arg1.active = false;
if (_local5){
_arg1.initTweenVals();
if (_arg1.vars.onStart != null){
_arg1.vars.onStart.apply(null, _arg1.vars.onStartParams);
};
} else {
_arg1.activate();
};
_arg1.active = _local6;
};
if (_arg1.startTime > _arg2){
_local4 = _arg1.startTime;
} else {
if (_local3 < _arg2){
_local4 = _local3;
} else {
_local4 = _arg2;
};
};
if (_local4 < 0){
_local7 = _arg1.startTime;
_arg1.startTime = (_arg1.startTime - _local4);
_arg1.render(0);
_arg1.startTime = _local7;
} else {
_arg1.render(_local4);
};
if (_local5){
_arg1.startTime = 999999999999999;
};
}
public function get align():String{
return (_align);
}
public function set align(_arg1:String):void{
_align = _arg1;
realign();
}
public function set reversed(_arg1:Boolean):void{
if (_reversed != _arg1){
reverse(true);
};
}
public function willTrigger(_arg1:String):Boolean{
return (_dispatcher.willTrigger(_arg1));
}
public function restart(_arg1:Boolean=false):void{
setProgress(0, _arg1);
_repeatCount = 0;
resume();
}
protected function getEndTime(_arg1:TweenLite):Number{
return ((_arg1.initTime + ((_arg1.delay + _arg1.duration) * (1000 / _arg1.combinedTimeScale))));
}
public function get duration():Number{
if (_tweens.length == 0){
return (0);
};
return (((this.endTime - _startTime) / 1000));
}
protected function getStartTime(_arg1:TweenLite):Number{
return ((_arg1.initTime + ((_arg1.delay * 1000) / _arg1.combinedTimeScale)));
}
protected function pauseTween(_arg1:TweenLite):void{
if ((_arg1 is _TweenMax)){
(_arg1 as Object).pauseTime = _pauseTime;
};
_arg1.startTime = 999999999999999;
_arg1.enabled = false;
}
protected function getRenderOrder(_arg1:Array, _arg2:Number):Array{
var _local3:int;
var _local4:TweenLite;
var _local5:Number;
var _local6:Array = [];
var _local7:Array = [];
var _local8:Array = [];
_local3 = (_arg1.length - 1);
while (_local3 > -1) {
_local5 = getStartTime(_arg1[_local3]);
if (_local5 >= _arg2){
_local6[_local6.length] = {start:_local5, tween:_arg1[_local3]};
} else {
_local7[_local7.length] = {end:getEndTime(_arg1[_local3]), tween:_arg1[_local3]};
};
_local3--;
};
_local6.sortOn("start", Array.NUMERIC);
_local7.sortOn("end", Array.NUMERIC);
_local3 = (_local6.length - 1);
while (_local3 > -1) {
_local8[_local3] = _local6[_local3].tween;
_local3--;
};
_local3 = (_local7.length - 1);
while (_local3 > -1) {
_local8[_local8.length] = _local7[_local3].tween;
_local3--;
};
return (_local8);
}
protected function getProgress(_arg1:Boolean=false):Number{
var _local2:Number;
var _local3:Number;
var _local4:Number;
if (_tweens.length == 0){
return (0);
};
_local2 = (isNaN(_pauseTime)) ? TweenLite.currentTime : _pauseTime;
_local3 = (_arg1) ? _initTime : _startTime;
_local4 = ((_local2 - _local3) / (this.endTime - _local3));
if (_local4 < 0){
return (0);
};
if (_local4 > 1){
return (1);
};
return (_local4);
}
protected function setTweenStartTime(_arg1:TweenLite, _arg2:Number):void{
var _local3:Number = (_arg2 - getStartTime(_arg1));
_arg1.initTime = (_arg1.initTime + _local3);
if (_arg1.startTime != 999999999999999){
_arg1.startTime = _arg2;
};
}
public function mergeGroup(_arg1:TweenGroup, _arg2:Number=NaN):void{
var _local5:int;
if (((isNaN(_arg2)) || ((_arg2 > _tweens.length)))){
_arg2 = _tweens.length;
};
var _local3:Array = _arg1.tweens;
var _local4:uint = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_tweens.splice((_arg2 + _local5), 0, _local3[_local5]);
_local5++;
};
realign();
}
public function get durationWithDelay():Number{
if (_tweens.length == 0){
return (0);
};
return (((this.endTime - _initTime) / 1000));
}
public function handleCompletion():void{
if (((!(isNaN(this.yoyo))) && ((((_repeatCount < this.yoyo)) || ((this.yoyo == 0)))))){
_repeatCount++;
reverse(true);
} else {
if (((!(isNaN(this.loop))) && ((((_repeatCount < this.loop)) || ((this.loop == 0)))))){
_repeatCount++;
setProgress(0, true);
};
};
if (this.onComplete != null){
this.onComplete.apply(null, this.onCompleteParams);
};
_dispatcher.dispatchEvent(new Event(Event.COMPLETE));
}
public function resume():void{
var _local2:int;
var _local4:Number;
var _local1:Array = [];
var _local3:Number = TweenLite.currentTime;
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
if (_tweens[_local2].startTime == 999999999999999){
resumeTween(_tweens[_local2]);
_local1[_local1.length] = _tweens[_local2];
};
if ((((_tweens[_local2].startTime >= _local3)) && (!(_tweens[_local2].enabled)))){
_tweens[_local2].enabled = true;
_tweens[_local2].active = false;
};
_local2--;
};
if (!isNaN(_pauseTime)){
_local4 = ((TweenLite.currentTime - _pauseTime) / 1000);
_pauseTime = NaN;
offsetTime(_local1, _local4);
};
}
public function get paused():Boolean{
return (!(isNaN(_pauseTime)));
}
public function updateTimeSpan():void{
var _local1:int;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:TweenLite;
if (_tweens.length == 0){
this.endTime = (_startTime = (_initTime = 0));
} else {
_local5 = _tweens[0];
_initTime = _local5.initTime;
_startTime = (_initTime + (_local5.delay * (1000 / _local5.combinedTimeScale)));
this.endTime = (_startTime + (_local5.duration * (1000 / _local5.combinedTimeScale)));
_local1 = (_tweens.length - 1);
while (_local1 > 0) {
_local5 = _tweens[_local1];
_local3 = _local5.initTime;
_local2 = (_local3 + (_local5.delay * (1000 / _local5.combinedTimeScale)));
_local4 = (_local2 + (_local5.duration * (1000 / _local5.combinedTimeScale)));
if (_local3 < _initTime){
_initTime = _local3;
};
if (_local2 < _startTime){
_startTime = _local2;
};
if (_local4 > this.endTime){
this.endTime = _local4;
};
_local1--;
};
if (((this.expired) && ((this.endTime > TweenLite.currentTime)))){
this.expired = false;
_unexpired[_unexpired.length] = this;
};
};
}
public function get progressWithDelay():Number{
return (getProgress(true));
}
protected function realign():void{
var _local1:uint;
var _local2:int;
var _local3:Number;
if (((!((_align == ALIGN_NONE))) && ((_tweens.length > 1)))){
_local1 = _tweens.length;
_local3 = (_stagger * 1000);
if (_align == ALIGN_SEQUENCE){
setTweenInitTime(_tweens[0], _initTime);
_local2 = 1;
while (_local2 < _local1) {
setTweenInitTime(_tweens[_local2], (getEndTime(_tweens[(_local2 - 1)]) + _local3));
_local2++;
};
} else {
if (_align == ALIGN_INIT){
_local2 = 0;
while (_local2 < _local1) {
setTweenInitTime(_tweens[_local2], (_initTime + (_local3 * _local2)));
_local2++;
};
} else {
if (_align == ALIGN_START){
_local2 = 0;
while (_local2 < _local1) {
setTweenStartTime(_tweens[_local2], (_startTime + (_local3 * _local2)));
_local2++;
};
} else {
_local2 = 0;
while (_local2 < _local1) {
setTweenInitTime(_tweens[_local2], ((this.endTime - (((_tweens[_local2].delay + _tweens[_local2].duration) * 1000) / _tweens[_local2].combinedTimeScale)) - (_local3 * _local2)));
_local2++;
};
};
};
};
};
updateTimeSpan();
}
public function get progress():Number{
return (getProgress(false));
}
protected function setProgress(_arg1:Number, _arg2:Boolean=false):void{
var _local3:Number;
var _local4:Number;
if (_tweens.length != 0){
_local3 = (isNaN(_pauseTime)) ? TweenLite.currentTime : _pauseTime;
_local4 = (_arg2) ? _initTime : _startTime;
offsetTime(_tweens, ((_local3 - (_local4 + ((this.endTime - _local4) * _arg1))) / 1000));
};
}
protected function resumeTween(_arg1:TweenLite):void{
if ((_arg1 is _TweenMax)){
(_arg1 as Object).pauseTime = NaN;
};
_arg1.startTime = (_arg1.initTime + (_arg1.delay * (1000 / _arg1.combinedTimeScale)));
}
public function dispatchEvent(_arg1:Event):Boolean{
return (_dispatcher.dispatchEvent(_arg1));
}
public function get stagger():Number{
return (_stagger);
}
public function get reversed():Boolean{
return (_reversed);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
return (_tweens[_arg1]);
}
public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
_dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
_dispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function callProperty(_arg1, ... _args){
var _local3:* = _tweens[_arg1].apply(null, _args);
realign();
if (!isNaN(_pauseTime)){
pause();
};
return (_local3);
}
protected function setTweenInitTime(_arg1:TweenLite, _arg2:Number):void{
var _local3:Number = (_arg2 - _arg1.initTime);
_arg1.initTime = _arg2;
if (_arg1.startTime != 999999999999999){
_arg1.startTime = (_arg1.startTime + _local3);
};
}
public function set progress(_arg1:Number):void{
setProgress(_arg1, false);
}
public function set progressWithDelay(_arg1:Number):void{
setProgress(_arg1, true);
}
public function set stagger(_arg1:Number):void{
_stagger = _arg1;
realign();
}
public function reverse(_arg1:Boolean=true):void{
var _local2:int;
var _local3:TweenLite;
var _local4:ReverseProxy;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_reversed = !(_reversed);
var _local10:Number = 0;
var _local11:Boolean;
var _local12:Number = (isNaN(_pauseTime)) ? TweenLite.currentTime : _pauseTime;
if (this.endTime <= _local12){
_local10 = (int((this.endTime - _local12)) + 1);
_local11 = true;
};
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
_local3 = _tweens[_local2];
if ((_local3 is _TweenMax)){
_local6 = _local3.startTime;
_local7 = _local3.initTime;
(_local3 as Object).reverse(false, false);
_local3.startTime = _local6;
_local3.initTime = _local7;
} else {
if (_local3.ease != _local3.vars.ease){
_local3.ease = _local3.vars.ease;
} else {
_local4 = new ReverseProxy(_local3);
_local3.ease = _local4.reverseEase;
};
};
_local9 = _local3.combinedTimeScale;
_local8 = (((((_local12 - _local3.initTime) / 1000) - (_local3.delay / _local9)) / _local3.duration) * _local9);
_local6 = int(((_local12 - ((((1 - _local8) * _local3.duration) * 1000) / _local9)) + _local10));
_local3.initTime = int((_local6 - (_local3.delay * (1000 / _local9))));
if (_local3.startTime != 999999999999999){
_local3.startTime = _local6;
};
if (_local3.startTime > _local12){
_local3.enabled = true;
_local3.active = false;
};
_local2--;
};
updateTimeSpan();
if (_arg1){
if (_local11){
setProgress(0, true);
};
resume();
};
}
public function clear(_arg1:Boolean=true):void{
var _local2:int = (_tweens.length - 1);
while (_local2 > -1) {
if (_arg1){
TweenLite.removeTween(_tweens[_local2], true);
};
_tweens[_local2] = null;
_tweens.splice(_local2, 1);
_local2--;
};
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
onSetProperty(_arg1, _arg2);
}
public function get tweens():Array{
return (_tweens.slice());
}
public function set paused(_arg1:Boolean):void{
if (_arg1){
pause();
} else {
resume();
};
}
public function get length():uint{
return (_tweens.length);
}
public function hasEventListener(_arg1:String):Boolean{
return (_dispatcher.hasEventListener(_arg1));
}
public function pause():void{
if (isNaN(_pauseTime)){
_pauseTime = TweenLite.currentTime;
};
var _local1:int = (_tweens.length - 1);
while (_local1 > -1) {
if (_tweens[_local1].startTime != 999999999999999){
pauseTween(_tweens[_local1]);
};
_local1--;
};
}
protected function onSetProperty(_arg1, _arg2):void{
if (((!(isNaN(_arg1))) && (!((_arg2 is TweenLite))))){
trace("TweenGroup error: an attempt was made to add a non-TweenLite element.");
} else {
_tweens[_arg1] = _arg2;
realign();
if (((!(isNaN(_pauseTime))) && ((_arg2 is TweenLite)))){
pauseTween((_arg2 as TweenLite));
};
};
}
public function getActive():Array{
var _local2:int;
var _local3:Number;
var _local1:Array = [];
if (isNaN(_pauseTime)){
_local3 = TweenLite.currentTime;
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
if ((((_tweens[_local2].startTime <= _local3)) && ((getEndTime(_tweens[_local2]) >= _local3)))){
_local1[_local1.length] = _tweens[_local2];
};
_local2--;
};
};
return (_local1);
}
public static function allFrom(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Class=null):TweenGroup{
_arg3.runBackwards = true;
return (allTo(_arg1, _arg2, _arg3, _arg4));
}
protected static function checkExpiration(_arg1:Event):void{
var _local4:TweenGroup;
var _local5:int;
var _local2:uint = TweenLite.currentTime;
var _local3:Array = _unexpired;
_local5 = (_local3.length - 1);
while (_local5 > -1) {
_local4 = _local3[_local5];
if ((((((_local4.endTime > _prevTime)) && ((_local4.endTime <= _local2)))) && (!(_local4.paused)))){
_local3.splice(_local5, 1);
_local4.expired = true;
_local4.handleCompletion();
};
_local5--;
};
_prevTime = _local2;
}
public static function parse(_arg1:Array, _arg2:Class=null):Array{
var _local4:int;
var _local5:Object;
var _local6:Number;
if (_arg2 == null){
_arg2 = TweenLite;
};
var _local3:Array = [];
_local4 = 0;
while (_local4 < _arg1.length) {
if ((_arg1[_local4] is TweenLite)){
_local3[_local3.length] = _arg1[_local4];
} else {
_local5 = _arg1[_local4].target;
_local6 = _arg1[_local4].time;
delete _arg1[_local4].target;
delete _arg1[_local4].time;
_local3[_local3.length] = new _arg2(_local5, _local6, _arg1[_local4]);
};
_local4++;
};
return (_local3);
}
public static function allTo(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Class=null):TweenGroup{
var _local5:int;
var _local6:Object;
var _local7:Object;
var _local8:String;
if (_arg4 == null){
_arg4 = TweenLite;
};
var _local9:TweenGroup = new TweenGroup(null, _arg4, ALIGN_INIT, ((_arg3.stagger) || (0)));
_local9.onComplete = _arg3.onCompleteAll;
_local9.onCompleteParams = _arg3.onCompleteAllParams;
delete _arg3.stagger;
delete _arg3.onCompleteAll;
delete _arg3.onCompleteAllParams;
_local5 = 0;
while (_local5 < _arg1.length) {
_local7 = {};
for (_local8 in _arg3) {
_local7[_local8] = _arg3[_local8];
};
_local9[_local9.length] = new _arg4(_arg1[_local5], _arg2, _local7);
_local5++;
};
if (_local9.stagger < 0){
_local9.progressWithDelay = 0;
};
return (_local9);
}
}
}//package gs
class ReverseProxy {
private var _tween:TweenLite;
private function ReverseProxy(_arg1:TweenLite){
_tween = _arg1;
}
public function reverseEase(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (_tween.vars.ease((_arg4 - _arg1), _arg2, _arg3, _arg4));
}
}
Section 145
//TweenLite (gs.TweenLite)
package gs {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
public class TweenLite {
public var started:Boolean;
public var delay:Number;
protected var _hasUpdate:Boolean;
protected var _subTweens:Array;
public var initted:Boolean;
public var active:Boolean;
public var startTime:Number;
public var target:Object;
public var duration:Number;
protected var _hst:Boolean;
public var gc:Boolean;
protected var _isDisplayObject:Boolean;
public var tweens:Array;
public var vars:Object;
public var ease:Function;
protected var _specialVars:Object;
public var initTime:Number;
public var combinedTimeScale:Number;
private static var _timer:Timer = new Timer(2000);
private static var _classInitted:Boolean;
public static var defaultEase:Function = TweenLite.easeOut;
public static var version:Number = 9.29;
public static var masterList:Dictionary = new Dictionary(false);
public static var currentTime:uint;
public static var overwriteManager:Object;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public static var timingSprite:Sprite = new Sprite();
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
if (_arg1 == null){
return;
};
if (!_classInitted){
currentTime = getTimer();
timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
_timer.addEventListener("timer", killGarbage, false, 0, true);
_timer.start();
_classInitted = true;
};
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
this.combinedTimeScale = ((_arg3.timeScale) || (1));
this.active = Boolean((((_arg2 == 0)) && ((this.delay == 0))));
this.target = _arg1;
_isDisplayObject = Boolean((_arg1 is DisplayObject));
if (!(this.vars.ease is Function)){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
this.ease = this.vars.ease;
if (!isNaN(Number(this.vars.autoAlpha))){
this.vars.alpha = Number(this.vars.autoAlpha);
this.vars.visible = Boolean((this.vars.alpha > 0));
};
_specialVars = ((this.vars.isTV)==true) ? this.vars.exposedProps : this.vars;
this.tweens = [];
_subTweens = [];
_hst = (this.initted = false);
this.initTime = currentTime;
this.startTime = (this.initTime + (this.delay * 1000));
var _local4:int = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
if ((((masterList[_arg1] == undefined)) || (((!((_arg1 == null))) && ((_local4 == 1)))))){
masterList[_arg1] = [];
};
masterList[_arg1].push(this);
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (this.active))){
initTweenVals();
if (this.active){
render((this.startTime + 1));
} else {
render(this.startTime);
};
if (((((!((_specialVars.visible == null))) && ((this.vars.runBackwards == true)))) && (_isDisplayObject))){
this.target.visible = _specialVars.visible;
};
};
}
public function get enabled():Boolean{
return ((this.gc) ? false : true);
}
public function render(_arg1:uint):void{
var _local3:Number;
var _local4:Object;
var _local5:int;
var _local2:Number = ((_arg1 - this.startTime) * 0.001);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0;
} else {
_local3 = this.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4[0][_local4[1]] = (_local4[2] + (_local3 * _local4[3]));
_local5--;
};
if (_hst){
_local5 = (_subTweens.length - 1);
while (_local5 > -1) {
_subTweens[_local5].proxy(_subTweens[_local5], _local2);
_local5--;
};
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
public function set enabled(_arg1:Boolean):void{
var _local2:Array;
var _local3:Boolean;
var _local4:int;
if (_arg1){
if (masterList[this.target] == undefined){
masterList[this.target] = [this];
} else {
_local2 = masterList[this.target];
_local4 = (_local2.length - 1);
while (_local4 > -1) {
if (_local2[_local4] == this){
_local3 = true;
break;
};
_local4--;
};
if (!_local3){
masterList[this.target].push(this);
};
};
};
this.gc = (_arg1) ? false : true;
if (this.gc){
this.active = false;
} else {
this.active = this.started;
};
}
public function activate():void{
this.started = (this.active = true);
if (!this.initted){
initTweenVals();
};
if (this.vars.onStart != null){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
}
public function clear():void{
this.tweens = [];
_subTweens = [];
this.vars = {};
_hst = (_hasUpdate = false);
}
protected function addSubTween(_arg1:String, _arg2:Function, _arg3:Object, _arg4:Object, _arg5:Object=null):void{
var _local6:String;
_subTweens[_subTweens.length] = {name:_arg1, proxy:_arg2, target:_arg3, info:_arg5};
for (_local6 in _arg4) {
if (typeof(_arg4[_local6]) == "number"){
this.tweens[this.tweens.length] = [_arg3, _local6, _arg3[_local6], (_arg4[_local6] - _arg3[_local6]), _arg1];
} else {
this.tweens[this.tweens.length] = [_arg3, _local6, _arg3[_local6], Number(_arg4[_local6]), _arg1];
};
};
_hst = true;
}
public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{
var _local3:String;
var _local4:int;
var _local5:Array;
var _local6:ColorTransform;
var _local7:ColorTransform;
var _local8:Object;
if (((!(_arg1)) && (overwriteManager.enabled))){
overwriteManager.manageOverwrites(this, masterList[this.target]);
};
if ((this.target is Array)){
_local5 = ((this.vars.endArray) || ([]));
_local4 = 0;
while (_local4 < _local5.length) {
if (((!((this.target[_local4] == _local5[_local4]))) && (!((this.target[_local4] == undefined))))){
this.tweens[this.tweens.length] = [this.target, _local4.toString(), this.target[_local4], (_local5[_local4] - this.target[_local4]), _local4.toString()];
};
_local4++;
};
} else {
if (((((!((typeof(_specialVars.tint) == "undefined"))) || ((this.vars.removeTint == true)))) && (_isDisplayObject))){
_local6 = this.target.transform.colorTransform;
_local7 = new ColorTransform();
if (_specialVars.alpha != undefined){
_local7.alphaMultiplier = _specialVars.alpha;
delete _specialVars.alpha;
} else {
_local7.alphaMultiplier = this.target.alpha;
};
if (((!((this.vars.removeTint == true))) && (((((!((_specialVars.tint == null))) && (!((_specialVars.tint == ""))))) || ((_specialVars.tint == 0)))))){
_local7.color = _specialVars.tint;
};
addSubTween("tint", tintProxy, {progress:0}, {progress:1}, {target:this.target, color:_local6, endColor:_local7});
};
if (((!((_specialVars.frame == null))) && (_isDisplayObject))){
addSubTween("frame", frameProxy, {frame:this.target.currentFrame}, {frame:_specialVars.frame}, {target:this.target});
};
if (((!(isNaN(this.vars.volume))) && (this.target.hasOwnProperty("soundTransform")))){
addSubTween("volume", volumeProxy, this.target.soundTransform, {volume:this.vars.volume}, {target:this.target});
};
if (((!((_specialVars.visible == null))) && (_isDisplayObject))){
addSubTween("visible", visibleProxy, {}, {}, {tween:this});
};
for (_local3 in _specialVars) {
if ((((((((((((((((((((((((((((((((((((((_local3 == "ease")) || ((_local3 == "delay")))) || ((_local3 == "overwrite")))) || ((_local3 == "onComplete")))) || ((_local3 == "onCompleteParams")))) || ((_local3 == "runBackwards")))) || ((_local3 == "visible")))) || ((_local3 == "autoOverwrite")))) || ((_local3 == "persist")))) || ((_local3 == "onUpdate")))) || ((_local3 == "onUpdateParams")))) || ((_local3 == "autoAlpha")))) || ((((_local3 == "timeScale")) && (!((this.target is TweenLite))))))) || ((_local3 == "onStart")))) || ((_local3 == "onStartParams")))) || ((_local3 == "renderOnStart")))) || ((_local3 == "proxiedEase")))) || ((_local3 == "easeParams")))) || (((_arg1) && (!((_arg2.indexOf(((" " + _local3) + " ")) == -1))))))){
} else {
if (((!(((_isDisplayObject) && ((((((_local3 == "tint")) || ((_local3 == "removeTint")))) || ((_local3 == "frame"))))))) && (!((((_local3 == "volume")) && (this.target.hasOwnProperty("soundTransform"))))))){
if (typeof(_specialVars[_local3]) == "number"){
this.tweens[this.tweens.length] = [this.target, _local3, this.target[_local3], (_specialVars[_local3] - this.target[_local3]), _local3];
} else {
this.tweens[this.tweens.length] = [this.target, _local3, this.target[_local3], Number(_specialVars[_local3]), _local3];
};
};
};
};
};
if (this.vars.runBackwards == true){
_local4 = (this.tweens.length - 1);
while (_local4 > -1) {
_local8 = this.tweens[_local4];
_local8[2] = (_local8[2] + _local8[3]);
_local8[3] = (_local8[3] * -1);
_local4--;
};
};
if (this.vars.onUpdate != null){
_hasUpdate = true;
};
this.initted = true;
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public function killVars(_arg1:Object):void{
if (overwriteManager.enabled){
overwriteManager.killVars(_arg1, this.vars, this.tweens, _subTweens, []);
};
}
public function complete(_arg1:Boolean=false):void{
if (!_arg1){
if (!this.initted){
initTweenVals();
};
this.startTime = (currentTime - ((this.duration * 1000) / this.combinedTimeScale));
render(currentTime);
return;
};
if (this.vars.persist != true){
this.enabled = false;
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
};
}
public static function frameProxy(_arg1:Object, _arg2:Number=0):void{
_arg1.info.target.gotoAndStop(Math.round(_arg1.target.frame));
}
public static function removeTween(_arg1:TweenLite, _arg2:Boolean=true):void{
if (_arg1 != null){
if (_arg2){
_arg1.clear();
};
_arg1.enabled = false;
};
}
public static function visibleProxy(_arg1:Object, _arg2:Number):void{
var _local3:TweenLite = _arg1.info.tween;
if (_local3.duration == _arg2){
if (((!((_local3.vars.runBackwards == true))) && ((_local3.ease == _local3.vars.ease)))){
_local3.target.visible = _local3.vars.visible;
};
} else {
if (_local3.target.visible != true){
_local3.target.visible = true;
};
};
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Array;
var _local4:int;
var _local5:TweenLite;
if (((!((_arg1 == null))) && (!((masterList[_arg1] == undefined))))){
_local3 = masterList[_arg1];
_local4 = (_local3.length - 1);
while (_local4 > -1) {
_local5 = _local3[_local4];
if (((_arg2) && (!(_local5.gc)))){
_local5.complete(false);
};
_local5.clear();
_local4--;
};
delete masterList[_arg1];
};
}
public static function updateAll(_arg1:Event=null):void{
var _local4:Array;
var _local5:int;
var _local6:TweenLite;
var _local2:uint = (currentTime = getTimer());
var _local3:Dictionary = masterList;
for each (_local4 in _local3) {
_local5 = (_local4.length - 1);
while (_local5 > -1) {
_local6 = _local4[_local5];
if (_local6 == null){
} else {
if (_local6.active){
_local6.render(_local2);
} else {
if (_local6.gc){
_local4.splice(_local5, 1);
} else {
if (_local2 >= _local6.startTime){
_local6.activate();
_local6.render(_local2);
};
};
};
};
_local5--;
};
};
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0}));
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function tintProxy(_arg1:Object, _arg2:Number=0):void{
var _local3:Number = _arg1.target.progress;
var _local4:Number = (1 - _local3);
var _local5:Object = _arg1.info.color;
var _local6:Object = _arg1.info.endColor;
_arg1.info.target.transform.colorTransform = new ColorTransform(((_local5.redMultiplier * _local4) + (_local6.redMultiplier * _local3)), ((_local5.greenMultiplier * _local4) + (_local6.greenMultiplier * _local3)), ((_local5.blueMultiplier * _local4) + (_local6.blueMultiplier * _local3)), ((_local5.alphaMultiplier * _local4) + (_local6.alphaMultiplier * _local3)), ((_local5.redOffset * _local4) + (_local6.redOffset * _local3)), ((_local5.greenOffset * _local4) + (_local6.greenOffset * _local3)), ((_local5.blueOffset * _local4) + (_local6.blueOffset * _local3)), ((_local5.alphaOffset * _local4) + (_local6.alphaOffset * _local3)));
}
public static function volumeProxy(_arg1:Object, _arg2:Number=0):void{
_arg1.info.target.soundTransform = _arg1.target;
}
protected static function killGarbage(_arg1:TimerEvent):void{
var _local3:Object;
var _local4:Array;
var _local2:Dictionary = masterList;
for (_local3 in _local2) {
if (_local2[_local3].length == 0){
delete _local2[_local3];
};
};
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 146
//AirStrike (AirStrike)
package {
import flash.media.*;
public dynamic class AirStrike extends Sound {
}
}//package
Section 147
//Arrow (Arrow)
package {
import flash.display.*;
public dynamic class Arrow extends MovieClip {
}
}//package
Section 148
//BackgroundSound (BackgroundSound)
package {
import flash.media.*;
public dynamic class BackgroundSound extends Sound {
}
}//package
Section 149
//BoltSound (BoltSound)
package {
import flash.media.*;
public dynamic class BoltSound extends Sound {
}
}//package
Section 150
//BoltSound2 (BoltSound2)
package {
import flash.media.*;
public dynamic class BoltSound2 extends Sound {
}
}//package
Section 151
//BtnSound (BtnSound)
package {
import flash.media.*;
public dynamic class BtnSound extends Sound {
}
}//package
Section 152
//BulletSound (BulletSound)
package {
import flash.media.*;
public dynamic class BulletSound extends Sound {
}
}//package
Section 153
//Button_disabledSkin (Button_disabledSkin)
package {
import flash.display.*;
public dynamic class Button_disabledSkin extends MovieClip {
}
}//package
Section 154
//Button_downSkin (Button_downSkin)
package {
import flash.display.*;
public dynamic class Button_downSkin extends MovieClip {
}
}//package
Section 155
//Button_emphasizedSkin (Button_emphasizedSkin)
package {
import flash.display.*;
public dynamic class Button_emphasizedSkin extends MovieClip {
}
}//package
Section 156
//Button_overSkin (Button_overSkin)
package {
import flash.display.*;
public dynamic class Button_overSkin extends MovieClip {
}
}//package
Section 157
//Button_selectedDisabledSkin (Button_selectedDisabledSkin)
package {
import flash.display.*;
public dynamic class Button_selectedDisabledSkin extends MovieClip {
}
}//package
Section 158
//Button_selectedDownSkin (Button_selectedDownSkin)
package {
import flash.display.*;
public dynamic class Button_selectedDownSkin extends MovieClip {
}
}//package
Section 159
//Button_selectedOverSkin (Button_selectedOverSkin)
package {
import flash.display.*;
public dynamic class Button_selectedOverSkin extends MovieClip {
}
}//package
Section 160
//Button_selectedUpSkin (Button_selectedUpSkin)
package {
import flash.display.*;
public dynamic class Button_selectedUpSkin extends MovieClip {
}
}//package
Section 161
//Button_upSkin (Button_upSkin)
package {
import flash.display.*;
public dynamic class Button_upSkin extends MovieClip {
}
}//package
Section 162
//CheerSound (CheerSound)
package {
import flash.media.*;
public dynamic class CheerSound extends Sound {
}
}//package
Section 163
//CloseWapeonSound (CloseWapeonSound)
package {
import flash.media.*;
public dynamic class CloseWapeonSound extends Sound {
}
}//package
Section 164
//Coords (Coords)
package {
import flash.display.*;
public dynamic class Coords extends MovieClip {
}
}//package
Section 165
//Crater (Crater)
package {
import com.veltive.cityinvasion.effects.*;
public dynamic class Crater extends AbstractEffect {
}
}//package
Section 166
//Dida (Dida)
package {
import flash.media.*;
public dynamic class Dida extends Sound {
}
}//package
Section 167
//Die2 (Die2)
package {
import flash.media.*;
public dynamic class Die2 extends Sound {
}
}//package
Section 168
//Die3 (Die3)
package {
import flash.media.*;
public dynamic class Die3 extends Sound {
}
}//package
Section 169
//Die4 (Die4)
package {
import flash.media.*;
public dynamic class Die4 extends Sound {
}
}//package
Section 170
//Die5 (Die5)
package {
import flash.media.*;
public dynamic class Die5 extends Sound {
}
}//package
Section 171
//establishSound (establishSound)
package {
import flash.media.*;
public dynamic class establishSound extends Sound {
}
}//package
Section 172
//ExplodeSound1 (ExplodeSound1)
package {
import flash.media.*;
public dynamic class ExplodeSound1 extends Sound {
}
}//package
Section 173
//ExplodeSound2 (ExplodeSound2)
package {
import flash.media.*;
public dynamic class ExplodeSound2 extends Sound {
}
}//package
Section 174
//FarView (FarView)
package {
import flash.display.*;
public dynamic class FarView extends MovieClip {
}
}//package
Section 175
//FinalSound (FinalSound)
package {
import flash.media.*;
public dynamic class FinalSound extends Sound {
}
}//package
Section 176
//FinishSound (FinishSound)
package {
import flash.media.*;
public dynamic class FinishSound extends Sound {
}
}//package
Section 177
//focusRectSkin (focusRectSkin)
package {
import flash.display.*;
public dynamic class focusRectSkin extends MovieClip {
}
}//package
Section 178
//GlassSound (GlassSound)
package {
import flash.media.*;
public dynamic class GlassSound extends Sound {
}
}//package
Section 179
//Ground (Ground)
package {
import flash.display.*;
public dynamic class Ground extends MovieClip {
public function Ground(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 180
//language (language)
package {
import flash.net.*;
public class language {
public static var localConnection = new LocalConnection();
public static var _languageNum:uint = 0;
public static var _languageBox:Array = new Array();
public static var SpillGroupUrl:Array = new Array();
public static function get url2():String{
var _local1:int;
while (_local1 < SpillGroupUrl.length) {
if (localConnection.domain == SpillGroupUrl[_local1]){
return (_languageBox[_languageNum].url2);
};
_local1++;
};
return (_languageBox[_languageNum].url2);
}
public static function get language_nr():int{
return (_languageBox[_languageNum].language_nr);
}
public static function set Language(_arg1:Object):void{
var domainextention:int;
var domainname:int;
var languageVersion = _arg1;
var returnDomain:Function = function (_arg1:String):String{
var _local2:String = new String();
var _local3:uint = 7;
while (_local3 < _arg1.length) {
if (_arg1.charAt(_local3) == "/"){
break;
};
_local2 = (_local2 + _arg1.charAt(_local3));
_local3++;
};
return (_local2);
};
var hostingdomain = "";
var myList:String = localConnection.domain;
var myArray:Array = myList.split(".");
if (myArray.length <= 3){
domainextention = (myArray.length - 1);
domainname = (myArray.length - 2);
hostingdomain = ((myArray[domainname] + ".") + myArray[domainextention]);
} else {
hostingdomain = localConnection.domain;
};
var language1:* = new languageItem();
language1.url1 = ("http://www.agame.com/moregames/?utm_medium=brandedgames_external&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language1.url2 = ("http://www.agame.com/moregames/?utm_medium=brandedgames_internal&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language1.language_nr = 1;
language1.branding_nr = 1;
_languageBox.push(language1);
var language2:* = new languageItem();
language2.url1 = "http://www.game.com.cn/moregames/";
language2.url2 = "http://www.game.com.cn/downloads/";
language2.language_nr = 2;
language2.branding_nr = 2;
_languageBox.push(language2);
var language3:* = new languageItem();
language3.url1 = ("http://www.spel.nl/moregames/?utm_medium=brandedgames_external&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language3.url2 = ("http://www.spel.nl/moregames/?utm_medium=brandedgames_internal&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language3.language_nr = 3;
language3.branding_nr = 4;
_languageBox.push(language3);
var language4:* = new languageItem();
language4.url1 = ("http://www.jeu.fr/moregames/?utm_medium=brandedgames_external&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language4.url2 = ("http://www.jeu.fr/moregames/?utm_medium=brandedgames_internal&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language4.language_nr = 4;
language4.branding_nr = 5;
_languageBox.push(language4);
var language5:* = new languageItem();
language5.url1 = ("http://www.spielen.com/moregames/?utm_medium=brandedgames_external&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language5.url2 = ("http://www.spielen.com/moregames/?utm_medium=brandedgames_internal&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language5.language_nr = 5;
language5.branding_nr = 6;
_languageBox.push(language5);
var language6:* = new languageItem();
language6.url1 = ("http://www.minigry.pl/moregames/?utm_medium=brandedgames_external&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language6.url2 = ("http://www.minigry.pl/moregames/?utm_medium=brandedgames_internal&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language6.language_nr = 6;
language6.branding_nr = 14;
_languageBox.push(language6);
var language7:* = new languageItem();
language7.url1 = ("http://www.spel.se/moregames/?utm_medium=brandedgames_external&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language7.url2 = ("http://www.spel.se/moregames/?utm_medium=brandedgames_internal&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language7.language_nr = 7;
language7.branding_nr = 9;
_languageBox.push(language7);
var language8:* = new languageItem();
language8.url1 = ("http://www.giocaregratis.it/moregames/?utm_medium=brandedgames_external&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language8.url2 = ("http://www.giocaregratis.it/moregames/?utm_medium=brandedgames_internal&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language8.language_nr = 8;
language8.branding_nr = 8;
_languageBox.push(language8);
var language9:* = new languageItem();
language9.url1 = ("http://www.zapjuegos.com/moregames/?utm_medium=brandedgames_external&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language9.url2 = ("http://www.zapjuegos.com/moregames/?utm_medium=brandedgames_internal&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language9.language_nr = 4;
language9.branding_nr = 3;
_languageBox.push(language9);
var language10:* = new languageItem();
language10.url1 = ("http://www.clickjogos.com/moregames/?utm_medium=brandedgames_external&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language10.url2 = ("http://www.clickjogos.com/moregames/?utm_medium=brandedgames_internal&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language10.language_nr = 11;
language10.branding_nr = 7;
_languageBox.push(language10);
var language11:* = new languageItem();
language11.url1 = ("http://www.games.co.id/moregames/?utm_medium=brandedgames_external&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language11.url2 = ("http://www.games.co.id/moregames/?utm_medium=brandedgames_internal&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language11.language_nr = 13;
language11.branding_nr = 13;
_languageBox.push(language11);
var language12:* = new languageItem();
language12.url1 = ("http://www.flashgames.ru/moregames/?utm_medium=brandedgames_external&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language12.url2 = ("http://www.flashgames.ru/moregames/?utm_medium=brandedgames_internal&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language12.language_nr = 12;
language12.branding_nr = 11;
_languageBox.push(language12);
var language13:* = new languageItem();
language13.url1 = ("http://www.mygames.co.uk/moregames/?utm_medium=brandedgames_external&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language13.url2 = ("http://www.mygames.co.uk/moregames/?utm_medium=brandedgames_internal&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language13.language_nr = 16;
language13.branding_nr = 10;
_languageBox.push(language13);
var language14:* = new languageItem();
language14.url1 = ("http://www.ojogos.pt/moregames/?utm_medium=brandedgames_external&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language14.url2 = ("http://www.ojogos.pt/moregames/?utm_medium=brandedgames_internal&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language14.language_nr = 10;
language14.branding_nr = 42;
_languageBox.push(language14);
var language15:* = new languageItem();
language15.url1 = ("http://www.egames.jp/moregames/?utm_medium=brandedgames_external&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language15.url2 = ("http://www.egames.jp/moregames/?utm_medium=brandedgames_internal&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language15.language_nr = 17;
language15.branding_nr = 44;
_languageBox.push(language15);
var language16:* = new languageItem();
language16.url1 = ("http://www.game.co.in/moregames/?utm_medium=brandedgames_external&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language16.url2 = ("http://www.game.co.in/moregames/?utm_medium=brandedgames_internal&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language16.language_nr = 16;
language16.branding_nr = 12;
_languageBox.push(language16);
var language17:* = new languageItem();
language17.url1 = ("http://www.a10.com/moregames/?utm_medium=brandedgames_external&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language17.url2 = ("http://www.a10.com/moregames/?utm_medium=brandedgames_internal&utm_campaign=city_invasion&utm_source=" + hostingdomain);
language17.language_nr = 1;
language17.branding_nr = 45;
_languageBox.push(language17);
SpillGroupUrl.push("localhost");
SpillGroupUrl.push("www8.agame.com");
SpillGroupUrl.push("gamedev.dev.spilgames.com");
if ((((((languageVersion is Number)) || ((languageVersion is uint)))) || ((languageVersion is int)))){
_languageNum = (Number(languageVersion) - 1);
};
}
public static function get url1():String{
var _local1:int;
while (_local1 < SpillGroupUrl.length) {
if (localConnection.domain == SpillGroupUrl[_local1]){
return (_languageBox[_languageNum].url2);
};
_local1++;
};
return (_languageBox[_languageNum].url1);
}
public static function get branding_nr():int{
return (_languageBox[_languageNum].branding_nr);
}
}
}//package
class languageItem {
public var url1:String;
public var url2:String;
public var branding_nr:int;
public var language_nr:int;
private function languageItem(){
}
}
Section 181
//LaserSound (LaserSound)
package {
import flash.media.*;
public dynamic class LaserSound extends Sound {
}
}//package
Section 182
//LogoMc2 (LogoMc2)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
public dynamic class LogoMc2 extends MovieClip {
public var txt:TextField;
public var logo:MovieClip;
public var request:URLRequest;
public function LogoMc2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
logo.gotoAndStop(language.branding_nr);
this.addEventListener(MouseEvent.CLICK, onCLick3);
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
public function enterFrameHandler(_arg1):void{
logo.x = (-(logo.width) / 2);
}
public function onCLick3(_arg1:Event){
if (language.language_nr == 2){
request = new URLRequest(language.url1);
} else {
request = new URLRequest((language.url1 + "&utm_content=preload"));
};
navigateToURL(request, "_blank");
}
}
}//package
Section 183
//LoseSound (LoseSound)
package {
import flash.media.*;
public dynamic class LoseSound extends Sound {
}
}//package
Section 184
//Main (Main)
package {
import com.veltive.cityinvasion.units.*;
import com.veltive.cityinvasion.ui.*;
import com.veltive.cityinvasion.battlefield.*;
import flash.events.*;
import com.veltive.cityinvasion.utils.*;
import flash.display.*;
import flash.text.*;
import com.veltive.cityinvasion.*;
import flash.utils.*;
import com.veltive.cityinvasion.pages.*;
public class Main extends MovieClip {
private var oldTime:int;// = 0
public function Main(){
GameVariables.humanGroup = UnitGroup.GROUP_FRIEND;
GameVariables.LEVEL = 1;
addEventListener(Event.ENTER_FRAME, frameChick);
}
private function toIntroPage(_arg1){
addChild(IntroPage.getInstance());
IntroPage.getInstance().appear();
IntroPage.getInstance().addEventListener(IntroPage.CONTINUE, toGamePage);
}
private function toShowScore(_arg1){
this.addChild(ScorePage.getInstance());
ScorePage.getInstance().appear(1);
ScorePage.getInstance().showNewIcon = true;
ScorePage.getInstance().addEventListener(ScorePage.CONTINUE, toStartPage);
}
public function start(){
toStartPage(null);
stage.stageFocusRect = false;
}
private function showMenu(_arg1){
this.stage.addChild(GameMenu.getInstance());
GameMenu.getInstance().appear(0.5);
}
private function toTutoPage(_arg1){
toGamePage(_arg1);
AI_TUTO.showSkip = true;
}
private function toOptPage(_arg1){
this.stage.addChild(OptPage.getInstance());
OptPage.getInstance().appear(0.5);
}
private function toFinalPage(_arg1){
addChild(FinalPage.getInstance());
FinalPage.getInstance().appear();
FinalPage.getInstance().addEventListener(FinalPage.CONTINUE, toStartPage);
FinalPage.getInstance().addEventListener(FinalPage.TO_HIGHSCORE, toShowScore);
FinalPage.getInstance().addEventListener(FinalPage.TO_HIGHSCORE_WITHOUT_NEW, toShowScoreWithoutNew);
}
private function toTutoPage2(_arg1){
toGamePage(_arg1);
AI_TUTO.showSkip = false;
}
private function frameChick(_arg1):void{
var _local2:int = (getTimer() - oldTime);
GameVariables.GAME_SPD = ((0.5 * _local2) / 32);
oldTime = getTimer();
}
private function toWinPage(_arg1){
addChild(WinPage.getInstance());
WinPage.getInstance().appear();
WinPage.getInstance().addEventListener(WinPage.CONTINUE, toIntroPage);
WinPage.getInstance().addEventListener(WinPage.GAME_OVER, toFinalPage);
WinPage.getInstance().addEventListener(WinPage.BACK_MAIN, toStartPage);
}
private function toShowScoreWithoutNew(_arg1){
this.addChild(ScorePage.getInstance());
ScorePage.getInstance().appear(1);
ScorePage.getInstance().showNewIcon = false;
ScorePage.getInstance().addEventListener(ScorePage.CONTINUE, toStartPage);
}
private function clearOptPage(_arg1){
}
private function toStartPage(_arg1){
if (StartPage.getInstance().root != null){
return;
};
addChild(StartPage.getInstance());
StartPage.getInstance().appear();
StartPage.getInstance().addEventListener(StartPage.TO_INTRO_PAGE, toIntroPage);
StartPage.getInstance().addEventListener(StartPage.TO_INTRO_PAGE, toIntroPage);
StartPage.getInstance().addEventListener(StartPage.TO_OPT_PAGE, toOptPage);
StartPage.getInstance().addEventListener(StartPage.TO_LEARN_PAGE, toLearnPage);
StartPage.getInstance().addEventListener(StartPage.TO_TUTO_PAGE, toTutoPage);
StartPage.getInstance().addEventListener(StartPage.TO_TUTO_PAGE_WITHOUT_SKIP, toTutoPage2);
StartPage.getInstance().addEventListener(StartPage.SHOW_SOCRE, toShowScoreWithoutNew);
}
private function toLearnPage(_arg1){
this.stage.addChild(LearnPage.getInstance());
LearnPage.getInstance().appear(2);
}
private function toGamePage(_arg1){
addChild(GamePage.getInstance());
GamePage.getInstance().appear();
GamePage.getInstance().addEventListener(GamePage.EXIT, toStartPage);
GamePage.getInstance().addEventListener(GamePage.SKIP, toIntroPage);
GamePage.getInstance().addEventListener(GamePage.SHOW_MENU, showMenu);
GamePage.getInstance().addEventListener(GamePage.LOSE, toLosePage);
GamePage.getInstance().addEventListener(GamePage.WIN, toWinPage);
GamePage.getInstance().addEventListener(GamePage.RETRY, toIntroPage);
GamePage.getInstance().addEventListener(GamePage.SHOW_HELP, toLearnPage);
GamePage.getInstance().addEventListener(GamePage.TUTO_FINISHED, toStartPage);
GamePage.getInstance().addEventListener(GamePage.TO_OPT_PAGE, toOptPage);
}
private function toLosePage(_arg1){
addChild(LosePage.getInstance());
LosePage.getInstance().appear();
LosePage.getInstance().addEventListener(LosePage.CONTINUE, toStartPage);
LosePage.getInstance().addEventListener(LosePage.RETRY, toIntroPage);
}
public static function get utmContent():String{
return (GameVariables.CURRENT_PAGE.UTM);
}
}
}//package
Section 185
//MsBox (MsBox)
package {
import com.veltive.cityinvasion.ui.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
public dynamic class MsBox extends MovieClip {
public var txt:TextField;
public var btn:MyButton;
public function MsBox(){
addFrameScript(0, frame1);
}
function frame1(){
btn.type = 2;
txt.selectable = false;
btn.addEventListener(MouseEvent.CLICK, continueHandle);
this.x = ((this.stage.stageWidth - this.width) / 2);
this.y = ((this.stage.stageHeight - this.height) / 2);
this.visible = true;
}
public function clear(_arg1){
if (this.parent){
this.parent.removeChild(this);
};
btn.removeEventListener(MouseEvent.CLICK, continueHandle);
}
public function set message(_arg1:String):void{
this.txt.htmlText = _arg1;
}
public function continueHandle(_arg1){
dispatchEvent(new Event(Event.CLOSE));
if (this.parent){
this.parent.removeChild(this);
};
btn.removeEventListener(MouseEvent.CLICK, continueHandle);
}
}
}//package
Section 186
//ProgressBar_barSkin (ProgressBar_barSkin)
package {
import flash.display.*;
public dynamic class ProgressBar_barSkin extends MovieClip {
}
}//package
Section 187
//ProgressBar_indeterminateSkin (ProgressBar_indeterminateSkin)
package {
import flash.display.*;
public dynamic class ProgressBar_indeterminateSkin extends MovieClip {
}
}//package
Section 188
//ProgressBar_trackSkin (ProgressBar_trackSkin)
package {
import flash.display.*;
public dynamic class ProgressBar_trackSkin extends MovieClip {
}
}//package
Section 189
//RifleSound (RifleSound)
package {
import flash.media.*;
public dynamic class RifleSound extends Sound {
}
}//package
Section 190
//RocketSound (RocketSound)
package {
import flash.media.*;
public dynamic class RocketSound extends Sound {
}
}//package
Section 191
//s1 (s1)
package {
import flash.display.*;
public dynamic class s1 extends BitmapData {
public function s1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 192
//s2 (s2)
package {
import flash.display.*;
public dynamic class s2 extends BitmapData {
public function s2(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 193
//s3 (s3)
package {
import flash.display.*;
public dynamic class s3 extends BitmapData {
public function s3(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 194
//s4 (s4)
package {
import flash.display.*;
public dynamic class s4 extends BitmapData {
public function s4(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 195
//s5 (s5)
package {
import flash.display.*;
public dynamic class s5 extends BitmapData {
public function s5(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 196
//ShortLaserSound (ShortLaserSound)
package {
import flash.media.*;
public dynamic class ShortLaserSound extends Sound {
}
}//package
Section 197
//SliderThumb_disabledSkin (SliderThumb_disabledSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_disabledSkin extends MovieClip {
}
}//package
Section 198
//SliderThumb_downSkin (SliderThumb_downSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_downSkin extends MovieClip {
}
}//package
Section 199
//SliderThumb_overSkin (SliderThumb_overSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_overSkin extends MovieClip {
}
}//package
Section 200
//SliderThumb_upSkin (SliderThumb_upSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_upSkin extends MovieClip {
}
}//package
Section 201
//SliderTick_skin (SliderTick_skin)
package {
import flash.display.*;
public dynamic class SliderTick_skin extends MovieClip {
}
}//package
Section 202
//SliderTrack_disabledSkin (SliderTrack_disabledSkin)
package {
import flash.display.*;
public dynamic class SliderTrack_disabledSkin extends MovieClip {
}
}//package
Section 203
//SliderTrack_skin (SliderTrack_skin)
package {
import flash.display.*;
public dynamic class SliderTrack_skin extends MovieClip {
}
}//package
Section 204
//StartSound (StartSound)
package {
import flash.media.*;
public dynamic class StartSound extends Sound {
}
}//package
Section 205
//t1 (t1)
package {
import flash.display.*;
public dynamic class t1 extends BitmapData {
public function t1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 206
//t2 (t2)
package {
import flash.display.*;
public dynamic class t2 extends BitmapData {
public function t2(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 207
//t3 (t3)
package {
import flash.display.*;
public dynamic class t3 extends BitmapData {
public function t3(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 208
//t4 (t4)
package {
import flash.display.*;
public dynamic class t4 extends BitmapData {
public function t4(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 209
//t5 (t5)
package {
import flash.display.*;
public dynamic class t5 extends BitmapData {
public function t5(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 210
//t6 (t6)
package {
import flash.display.*;
public dynamic class t6 extends BitmapData {
public function t6(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 211
//t7 (t7)
package {
import flash.display.*;
public dynamic class t7 extends BitmapData {
public function t7(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 212
//TerminateSound (TerminateSound)
package {
import flash.media.*;
public dynamic class TerminateSound extends Sound {
}
}//package
Section 213
//TimeBombThumb (TimeBombThumb)
package {
import flash.display.*;
public dynamic class TimeBombThumb extends BitmapData {
public function TimeBombThumb(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 214
//ToMc (ToMc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class ToMc extends MovieClip {
public var txt1:TextField;
public var txt2:TextField;
public function ToMc(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 215
//TypeBlock (TypeBlock)
package {
import flash.display.*;
public dynamic class TypeBlock extends MovieClip {
}
}//package
Section 216
//TypeSound (TypeSound)
package {
import flash.media.*;
public dynamic class TypeSound extends Sound {
}
}//package
Section 217
//TypeTxt (TypeTxt)
package {
import flash.display.*;
import flash.text.*;
public dynamic class TypeTxt extends MovieClip {
public var txt:TextField;
}
}//package
Section 218
//WinSound (WinSound)
package {
import flash.media.*;
public dynamic class WinSound extends Sound {
}
}//package