Section 1
//Arrow (com.macrojoy.zgd.display.Arrow)
package com.macrojoy.zgd.display {
public class Arrow extends BasicBulletMC {
}
}//package com.macrojoy.zgd.display
Section 2
//Arrowhead (com.macrojoy.zgd.display.Arrowhead)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Arrowhead extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 3
//ArrowIn (com.macrojoy.zgd.display.ArrowIn)
package com.macrojoy.zgd.display {
public class ArrowIn extends WeaponInMC {
}
}//package com.macrojoy.zgd.display
Section 4
//Ax (com.macrojoy.zgd.display.Ax)
package com.macrojoy.zgd.display {
public class Ax extends BasicBulletMC {
}
}//package com.macrojoy.zgd.display
Section 5
//Ax_Hand (com.macrojoy.zgd.display.Ax_Hand)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Ax_Hand extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 6
//AxIn (com.macrojoy.zgd.display.AxIn)
package com.macrojoy.zgd.display {
public class AxIn extends WeaponInMC {
}
}//package com.macrojoy.zgd.display
Section 7
//Bag (com.macrojoy.zgd.display.Bag)
package com.macrojoy.zgd.display {
public class Bag extends BasicThingMC {
override public function hited(_arg1:String, _arg2:uint, _arg3:int, _arg4:uint):void{
toStopFrame("hited");
_speedX = (_arg4 * _arg3);
}
}
}//package com.macrojoy.zgd.display
Section 8
//BasicBulletMC (com.macrojoy.zgd.display.BasicBulletMC)
package com.macrojoy.zgd.display {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.geom.*;
public class BasicBulletMC extends BasicMoveableObjectMC {
private var _power:Number;// = 50
protected var _timer:uint;
public var speedYAdd:int;
protected var _rotate:uint;
protected var _gravity:Number;// = 0
protected var _speed:Number;
protected var _hitTargets:Array;
public var targetCamp:uint;
protected var _back:Boolean;
protected var _angleSpeedX:int;
protected var _angleSpeedY:int;
public var speedXAdd:int;
public function BasicBulletMC(){
_power = 50;
_gravity = 0;
super();
}
private function createGrassEffect():void{
if (name == "Detonator"){
createHitedEffect("Blast");
Method.playSound(Data.BLAST, 7, 1, Global.soundVolume);
Method.createEffect("BoomMC", ((x + (Math.random() * 40)) - 20), (y + (Math.random() * 20)));
shakeScreen([3]);
Method.whiteScreen();
} else {
if (name == "Bullet"){
Method.playSound("HitBag", 7, 1, Global.soundVolume);
} else {
if (name == "Bottle"){
loseWeapon(name, myX, myY);
Method.playSound("HitBag", 7, 1, Global.soundVolume);
} else {
if (name == "BottleUp"){
Method.playSound("HitBag", 7, 1, Global.soundVolume);
} else {
if (name == "Stick"){
loseWeapon(name, myX, myY);
Method.playSound("HitBag", 7, 1, Global.soundVolume);
} else {
Method.playSound("HitBag", 7, 1, Global.soundVolume);
};
};
};
};
Method.createEffect("BumpMC", ((x + (Math.random() * 40)) - 20), (y + (Math.random() * 20)));
};
}
protected function checkLandform():void{
var _local1:String;
var _local2:int;
var _local3:Sprite;
_local1 = Method.getColorStr(myX, myY);
if ((((((space == "in")) && (((((((!((_local1 == "0"))) && (!((_local1 == "ff000000"))))) && (!((_local1 == "ff0099ff"))))) && (!((_local1 == "ffff0000"))))))) || ((((_local1 == "ffffffff")) && ((space == "out")))))){
_remove = true;
if (_speedX == 0){
_local2 = scaleX;
} else {
_local2 = Math.floor((Math.abs(_speedX) / _speedX));
};
if (space == "in"){
_local3 = Global.roleCTN;
} else {
_local3 = Global.effectCTN;
};
adjustXToWall(-(_local2));
if (name == "Detonator"){
createHitedEffect("Blast");
Method.playSound(Data.BLAST, 7, 1, Global.soundVolume);
Method.createEffect("BoomMC", ((x + (Math.random() * 40)) - 20), (y + (Math.random() * 20)));
shakeScreen([3]);
Method.whiteScreen();
} else {
createHitedEffect("Hit");
if (name == "Bullet"){
Method.playSound(Data.SHOOTED2, 7, 1, Global.soundVolume);
} else {
if (name == "Bottle"){
loseWeapon("BottleUp", (myX - 20), myY);
loseWeapon("BottleDown", (myX + 20), myY);
Method.playSound(Data.BOTTLE_BREAK, 7, 1, Global.soundVolume);
} else {
if (name == "BottleUp"){
Method.playSound(Data.BOTTLE_BREAK, 7, 1, Global.soundVolume);
} else {
if ((((((name == "Knife")) || ((name == "Ax")))) || ((name == "Arrow")))){
Method.playSound(Data.KNIFE_IN, 7, 1, Global.soundVolume);
Method.createEffect((name + "In"), myX, myY, _local2, _local3, rotation);
} else {
if (name == "Dart"){
Method.playSound(Data.DART_IN, 7, 1, Global.soundVolume);
Method.createEffect((name + "In"), myX, myY, _local2, _local3, rotation);
} else {
if (name == "Stick"){
loseWeapon(name, myX, myY);
Method.playSound(Data.HITED, 7, 1, Global.soundVolume);
} else {
Method.playSound(Data.KNIFE_HIT3, 7, 1, Global.soundVolume);
};
};
};
};
};
};
Method.createEffect("BumpMC", ((x + (Math.random() * 40)) - 20), (y + (Math.random() * 20)));
};
};
}
protected function checkThings():void{
var _local1:Sprite;
var _local2:int;
var _local3:MovieClip;
var _local4:BasicThingMC;
var _local5:GrassMC;
_local1 = Global.thingsCTN;
_local2 = (_local1.numChildren - 1);
while (_local2 >= 0) {
_local3 = (_local1.getChildAt(_local2) as MovieClip);
if (Math.abs((myX - _local3.x)) < (width + _local3.width)){
if (Math.abs((myY - _local3.y)) < (height + _local3.height)){
if ((_local3 is BasicThingMC)){
_local4 = (_local3 as BasicThingMC);
if (hitTestObject(_local4.hit)){
_remove = true;
if (_local4.name == "grass"){
if (name == "Detonator"){
_local5 = (_local4 as GrassMC);
_local5.toFire();
};
createGrassEffect();
} else {
createEffect();
};
break;
};
} else {
if (_local3.name == "light"){
if (targetCamp == 2){
if (hitTestObject(_local3)){
_remove = true;
createEffect();
Global.thingsCTN.removeChild(_local3);
Method.deleteElement(Global.loadedThings, _local3);
Method.createPresent(_local3.x, _local3.y, 0.33, 0, 1);
break;
};
};
};
};
};
};
_local2--;
};
}
private function checkPole():void{
var _local1:Sprite;
var _local2:int;
var _local3:MovieClip;
var _local4:MovieClip;
var _local5:Point;
var _local6:Point;
_local1 = (Global.foreGroundCTN as Sprite);
_local2 = (_local1.numChildren - 1);
while (_local2 >= 0) {
_local3 = (_local1.getChildAt(_local2) as MovieClip);
if (_local3.name == "PolePresent"){
_local4 = (_local3.getChildByName("present") as MovieClip);
if (_local4 != null){
if (hitTestObject(_local4)){
_remove = true;
createEffect();
_local5 = _local3.localToGlobal(new Point(_local4.x, _local4.y));
_local6 = Global.roleCTN.globalToLocal(_local5);
Method.createPresent(_local6.x, _local6.y, 0.33, 0, 1);
_local3.removeChild(_local4);
break;
};
};
};
_local2--;
};
}
private function adjustXToWall(_arg1:int):void{
var _local2:String;
var _local3:uint;
var _local4:String;
_local2 = "level";
_local4 = Method.getColorStr(myX, myY);
rotation = 0;
while (((((((!((_local4 == "0"))) && (!((_local4 == "ff000000"))))) && (!((_local4 == "ff0099ff"))))) && (!((_local4 == "ffff0000"))))) {
if (_local2 == "level"){
myX = (myX + _arg1);
_local3++;
_local4 = Method.getColorStr(myX, myY);
if (_local3 > 100){
myX = (myX - (_local3 * _arg1));
_local2 = "vertical";
rotation = 90;
};
} else {
myY--;
_local4 = Method.getColorStr(myX, myY);
};
};
}
public function myInit(_arg1:Boolean=true):void{
var _local2:String;
if (targetCamp == 2){
_local2 = "HERO";
} else {
_local2 = "ENEMY";
};
_speed = Data[(((_local2 + "_") + name.toUpperCase()) + "_SPEED")];
if (_arg1){
_speed = Math.round((_speed * ((Math.random() * 0.4) + 0.8)));
};
_power = Data[(((_local2 + "_") + name.toUpperCase()) + "_POWER")];
if (name == "Stick"){
_rotate = 20;
_gravity = 0.4;
} else {
if (name == "Dart"){
_rotate = 45;
_gravity = 0;
_back = true;
Global.dartNum++;
if (Global.dartNum == 1){
Method.playSound(Data.DART_FLY, 8, int.MAX_VALUE, Global.soundVolume);
};
} else {
if (name == "Arrow"){
_gravity = 0.1;
} else {
if (name == "Ax"){
_rotate = 20;
if (targetCamp == 1){
_gravity = 1;
} else {
_gravity = 0.6;
};
} else {
if (name == "Card"){
_rotate = 45;
} else {
if (name == "Bottle"){
_rotate = 20;
_gravity = 0.6;
} else {
if (name == "Detonator"){
_rotate = 20;
_gravity = 0.6;
} else {
_gravity = 0;
};
};
};
};
};
};
};
_angleSpeedX = (_speedX = ((scaleX * _speed) * Math.cos(((rotation / 180) * Math.PI))));
_angleSpeedY = (_speedY = ((scaleX * _speed) * Math.sin(((rotation / 180) * Math.PI))));
if ((_speedY * speedYAdd) > 0){
_speedY = (_speedY + speedYAdd);
};
if ((_speedX * speedXAdd) > 0){
_speedX = (_speedX + speedXAdd);
if (_speedX > 20){
_speedX = 20;
} else {
if (_speedX < -20){
_speedX = -20;
};
};
};
}
override protected function updatePlayEvt():void{
super.updatePlayEvt();
if (Global.gameStatus == "playing"){
checkEnemys();
checkLandform();
checkThings();
checkPole();
checkWeapon();
};
rotation = (rotation + (_rotate * scaleX));
_speedY = (_speedY + _gravity);
if (_rotate == 0){
rotation = ((Math.atan((_speedY / _speedX)) / Math.PI) * 180);
};
checkRemove();
if (name == "Dart"){
_timer++;
if (targetCamp == 2){
if ((_timer * Math.abs(_speedX)) >= 400){
if ((((((((((((((((((((((((Global.hero.currentLabel == "stand")) || ((Global.hero.currentLabel == "show_gun")))) || ((Global.hero.currentLabel == "walk")))) || ((Global.hero.currentLabel == "run")))) || ((Global.hero.currentLabel == "recharge")))) || ((Global.hero.currentLabel == "jump")))) || ((Global.hero.currentLabel == "j_up")))) || ((Global.hero.currentLabel == "j_down")))) || ((Global.hero.currentLabel == "j_pre")))) || ((Global.hero.currentLabel == "j_over")))) || ((Global.hero.currentLabel == "go_down")))) || ((Global.hero.currentLabel == "crouch")))){
if (Global.hero.getWeaponName() == null){
if (this.hitTestObject(Global.hero)){
Global.hero.getWeapon("Dart");
_remove = true;
};
};
};
};
};
};
if (_back){
if (Math.abs((_timer * Math.abs(_speedX))) >= 400){
_hitTargets = new Array();
_speedX = (_speedX * -1);
_speedY = (_speedY * -1);
_back = false;
};
};
}
protected function createHitedEffect(_arg1:String):void{
var _local2:Class;
var _local3:MovieClip;
var _local4:DetonatorMC;
_local2 = Method.getClass1((_arg1 + "Effect"));
_local3 = (Method.createDisplayObj(_local2, Global.effectCTN, -1, myX, myY) as MovieClip);
_local3.scaleX = -(scaleX);
_local4 = (_local3 as DetonatorMC);
if (_local4 != null){
_local4.power = _power;
};
}
override public function init():void{
super.init();
}
protected function checkEnemys():void{
var _local1:Array;
var _local2:BasicCreatureMC;
var _local3:int;
_local1 = Global[(("camp" + targetCamp.toString()) + "Arr")];
for each (_local2 in _local1) {
if (_local2.space == space){
if ((((Math.abs((myX - _local2.myX)) < (width + _local2.width))) || ((_local2.type == "fly")))){
if ((((Math.abs((myY - _local2.myY)) < (height + _local2.height))) || ((_local2.type == "fly")))){
if (!_local2.unbreak){
if (_local2.getHp() > 0){
if (_hitTargets == null){
_hitTargets = new Array();
};
if (_hitTargets.indexOf(_local2) == -1){
if (((((((((((((!((_local2.currentLabel == "fall"))) && (!((_local2.currentLabel == "f_down"))))) && (!((_local2.currentLabel == "f_earth"))))) && (!((_local2.currentLabel == "empty"))))) && (!((_local2.currentLabel == "disappear"))))) && (!((_local2.currentLabel == "appear1"))))) && (!((_local2.currentLabel == "divide"))))){
if (this.hitTestObject(_local2["hit"])){
_hitTargets.push(_local2);
if (_speedX == 0){
_local3 = scaleX;
} else {
_local3 = Math.floor((Math.abs(_speedX) / _speedX));
};
if (name == "Detonator"){
if (Global.hero == _local2){
_local2.hited("fall", Data.DETONATOR_TO_HERO, _local3, 8);
} else {
_local2.hited("fall", (_power * 2), _local3, 8);
};
createHitedEffect("Blast");
Method.playSound(Data.BLAST, 7, 1, Global.soundVolume);
Method.createEffect("BoomMC", ((x + (Math.random() * 40)) - 20), (y + (Math.random() * 20)));
shakeScreen([5]);
Method.whiteScreen();
_power = 0;
} else {
_local2.hited("hited", _power, _local3, 5);
createHitedEffect("Blood");
if (name == "Bullet"){
Method.playSound(Data.SHOOTED1, 7, 1, Global.soundVolume);
} else {
if (name == "Bottle"){
Method.playSound(Data.BOTTLE_BREAK, 7, 1, Global.soundVolume);
createHitedEffect("Hit");
loseWeapon("BottleUp", (myX - 20), myY);
loseWeapon("BottleDown", (myX + 20), myY);
} else {
if (name == "Stick"){
Method.playSound(Data.BOXING1, 7, 1, Global.soundVolume);
createHitedEffect("Hit");
loseWeapon(name, myX, myY);
} else {
Method.playSound(Data.KNIFE_HIT1, 7, 1, Global.soundVolume);
};
};
};
Method.createEffect("BlamMC", ((x + (Math.random() * 40)) - 20), (y + (Math.random() * 20)));
};
if (name != "Dart"){
_remove = true;
};
if (targetCamp == 2){
switch (name){
case "Bullet":
Method.addScore(Data.SHOOT_VALUE);
break;
case "Bottle":
Method.addScore(Data.BOTTLE_VALUE);
break;
case "Knife":
case "BottleUp":
Method.addScore(Data.KNIFE_VALUE);
break;
case "Ax":
Method.addScore(Data.AX_VALUE);
break;
case "Dart":
Method.addScore(Data.DART_VALUE);
break;
case "Detonator":
Method.addScore(Data.DETONATOR_VALUE);
break;
};
};
break;
};
};
};
};
};
};
};
};
};
}
private function checkWeapon():void{
var _local1:Sprite;
var _local2:int;
var _local3:BasicBulletMC;
_local1 = (parent as Sprite);
_local2 = (_local1.numChildren - 1);
while (_local2 >= 0) {
_local3 = (_local1.getChildAt(_local2) as BasicBulletMC);
if (((((((!((_local3 == null))) && (!((_local3 == this))))) && ((space == _local3.space)))) && (!((targetCamp == _local3.targetCamp))))){
if (Math.abs((myX - _local3.x)) < (width + _local3.width)){
if (Math.abs((myY - _local3.y)) < (height + _local3.height)){
if (hitTestObject(_local3)){
Method.playSound(Data.WEAPON_HIT, 7, 1, Global.soundVolume);
_local3.hitWeapon();
hitWeapon();
break;
};
};
};
};
_local2--;
};
}
function hitWeapon():void{
_remove = true;
switch (name){
case "Stick":
case "Dart":
case "Ax":
case "Knife":
case "Arrow":
case "BottleUp":
loseWeapon(name, myX, myY);
break;
case "Detonator":
createHitedEffect("Blast");
Method.playSound(Data.BLAST, 7, 1, Global.soundVolume);
break;
case "Bottle":
loseWeapon("BottleUp", (myX - 20), myY);
loseWeapon("BottleDown", (myX + 20), myY);
break;
default:
createHitedEffect("Hit");
break;
};
}
private function loseWeapon(_arg1:String, _arg2:Number, _arg3:Number):void{
var _local4:Class;
var _local5:WeaponMC;
_local4 = Method.getClass1("FallWeapon");
_local5 = (Method.createDisplayObj(_local4, Global.roleCTN, -1, _arg2, _arg3) as WeaponMC);
_local5.name = "Weapon";
_local5.gotoAndStop(_arg1);
if (rotation == 0){
_local5.speedX = (-2 * scaleX);
} else {
_local5.speedX = (2 * scaleX);
};
_local5.init();
_local5.status = "rotate";
_local5.ableTimer++;
_local5.toflash();
}
protected function checkRemove():void{
_gPoint = parent.localToGlobal(new Point(myX, myY));
if ((((((((_gPoint.x < -10)) || ((_gPoint.x > (Data.STAGE_WIDTH + 10))))) || ((_gPoint.y < -100)))) || ((_gPoint.y > ((height + Data.STAGE_HEIGHT) + 10))))){
if (name == "Dart"){
if ((_timer * Math.abs(_speed)) > 800){
_remove = true;
};
} else {
_remove = true;
};
};
}
private function createEffect():void{
if (name == "Detonator"){
createHitedEffect("Blast");
Method.playSound(Data.BLAST, 7, 1, Global.soundVolume);
Method.createEffect("BoomMC", ((x + (Math.random() * 40)) - 20), (y + (Math.random() * 20)));
shakeScreen([3]);
Method.whiteScreen();
} else {
createHitedEffect("Hit");
if (name == "Bullet"){
Method.playSound(Data.SHOOTED2, 7, 1, Global.soundVolume);
} else {
if (name == "Bottle"){
loseWeapon("BottleUp", (myX - 20), myY);
loseWeapon("BottleDown", (myX + 20), myY);
Method.playSound(Data.BOTTLE_BREAK, 7, 1, Global.soundVolume);
} else {
if (name == "BottleUp"){
Method.playSound(Data.BOTTLE_BREAK, 7, 1, Global.soundVolume);
} else {
if (name == "Stick"){
loseWeapon(name, myX, myY);
Method.playSound(Data.HITED, 7, 1, Global.soundVolume);
} else {
Method.playSound(Data.KNIFE_HIT3, 7, 1, Global.soundVolume);
};
};
};
};
Method.createEffect("BumpMC", ((x + (Math.random() * 40)) - 20), (y + (Math.random() * 20)));
};
}
override public function removeSelf():void{
super.removeSelf();
if (name == "Dart"){
Global.dartNum--;
if (Global.dartNum == 0){
Method.playSound(null, 8, 0, 0);
};
};
}
}
}//package com.macrojoy.zgd.display
Section 9
//BasicCarriage (com.macrojoy.zgd.display.BasicCarriage)
package com.macrojoy.zgd.display {
import flash.display.*;
public class BasicCarriage extends Sprite {
public var train:Sprite;
public var ladder:Sprite;
public var side:Sprite;
public var step:Sprite;
public var step1:Sprite;
public var step2:Sprite;
public var window:Sprite;
public var rope:Sprite;
}
}//package com.macrojoy.zgd.display
Section 10
//BasicChipMC (com.macrojoy.zgd.display.BasicChipMC)
package com.macrojoy.zgd.display {
public class BasicChipMC extends BasicLandMC {
private var _standTime:uint;
private var _standTimer:uint;
override protected function toStandHandler():void{
_standTimer++;
switch (_standTimer){
case 1:
_speedY = -10;
_status = "jump";
break;
case 2:
_speedY = -5;
_status = "jump";
break;
case 3:
_speedX = 0;
break;
};
}
override protected function brinkHandler():void{
_status = "fall";
}
override protected function updatePlayEvt():void{
super.updatePlayEvt();
if (_status == "stand"){
_standTime++;
if (_standTime >= (35 * 2)){
removeSelf();
} else {
if (_standTime >= (35 * 1)){
alpha = ((alpha)==1) ? 0.5 : 1;
};
};
};
}
}
}//package com.macrojoy.zgd.display
Section 11
//BasicCreatureMC (com.macrojoy.zgd.display.BasicCreatureMC)
package com.macrojoy.zgd.display {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.geom.*;
public class BasicCreatureMC extends BasicMoveableObjectMC {
public var unbreak:uint;
protected var _checkTimes:Boolean;
protected var _attacking:Boolean;
public var type:String;
protected var _myWeaponName:String;
protected var _hitTargets:Array;
protected var _hp:int;
protected var _hpTotal:int;
protected function hitHandler():void{
}
function playSound(_arg1:Array):void{
Method.playSound(_arg1[0], _arg1[1], _arg1[2], Global.soundVolume);
}
protected function unbreakHandler():void{
if (unbreak > 0){
unbreak--;
if ((((_hp > 0)) && (!((_status == "die"))))){
alpha = ((alpha)==1) ? 0.7 : 1;
};
if (unbreak == 0){
alpha = 1;
};
};
}
function changeSpeed(_arg1:Array):void{
_speedX = _arg1[0];
_speedY = _arg1[1];
}
function nearAttack(_arg1:Array):void{
var _local2:uint;
var _local3:Array;
var _local4:Sprite;
var _local5:int;
var _local6:BasicCreatureMC;
var _local7:uint;
var _local8:BasicThingMC;
if (Global.gameStatus != "playing"){
return;
};
if ((this is BasicHeroMC)){
_local2 = 2;
} else {
_local2 = 1;
};
_local3 = Global[(("camp" + _local2.toString()) + "Arr")];
if (_local3 != null){
for each (_local6 in _local3) {
if (_local6 != null){
if ((((Math.abs((myX - _local6.myX)) < (width + _local6.width))) || ((_local6.type == "fly")))){
if ((((Math.abs((myY - _local6.myY)) < Math.max(height, _local6.height))) || ((_local6.type == "fly")))){
if (_hitTargets != null){
if (_hitTargets.indexOf(_local6) == -1){
if (((((((((((((((!((_local6.currentLabel == "fall"))) && (!((_local6.currentLabel == "f_down"))))) && (!((_local6.currentLabel == "f_earth"))))) && (!((_local6.currentLabel == "empty"))))) && (!((_local6.currentLabel == "disappear"))))) && (!((_local6.currentLabel == "appear1"))))) && (!((_local6.currentLabel == "divide"))))) && (!((_local6._status == "ride"))))){
if (!_local6.unbreak){
if (_local6.getHp() > 0){
if (mc["hit"].hitTestObject(_local6.hit)){
Method.createEffect("BlamMC", (myX + ((scaleX * width) * Math.random())), (myY - (height * Math.random())));
Method.playSound(_arg1[1][0], 7, 1, Global.soundVolume);
if (_arg1[1][2] != null){
Method.createEffect(_arg1[1][3], _local6.myX, (myY - _arg1[1][2]), -(scaleX));
};
shakeScreen([2]);
_hitTargets.push(_local6);
_local7 = _arg1[4];
toStill(_local7);
_local6.toStill(_local7);
if (_arg1[5] != null){
_stillEndEvt = ["moveTarget", [_local6, (_arg1[5] * scaleX)]];
};
_local6.hited(_arg1[0], _arg1[2], scaleX, _arg1[3]);
if ((((_myWeaponName == "Bottle")) && ((Math.random() > 0.6)))){
_myWeaponName = "BottleUp";
Global.GIPanel.showWeapon(_myWeaponName);
loseWeapon("BottleDown", (myX + (50 * scaleX)), (myY - 70));
Method.playSound(Data.BOTTLE_BREAK, 11, 1, Global.soundVolume);
};
if (_local2 == 2){
switch (_arg1[2]){
case Data.BOXING_POWER:
Method.addScore(Data.BOXING1_VALUE);
break;
case Data.BOXING2_POWER:
Method.addScore(Data.BOXING2_VALUE);
break;
case Data.KICK2_POWER:
Method.addScore(Data.KICK_VALUE);
break;
case Data.KICK_POWER:
Method.addScore(Data.JUMP_KICK_VALUE);
break;
default:
Method.addScore(30);
};
};
};
};
};
};
};
};
};
};
};
};
};
_local4 = Global.thingsCTN;
_local5 = (_local4.numChildren - 1);
while (_local5 >= 0) {
_local8 = (_local4.getChildAt(_local5) as BasicThingMC);
if (_local8 != null){
if (Math.abs((myX - _local8.myX)) < (width + _local8.width)){
if (Math.abs((myY - _local8.myY)) < Math.max(height, _local8.height)){
if (_hitTargets != null){
if (_hitTargets.indexOf(_local8) == -1){
if (mc["hit"].hitTestObject(_local8.hit)){
_hitTargets.push(_local8);
Method.createEffect("BumpMC", (myX + ((scaleX * width) * Math.random())), (myY - (height * Math.random())));
if ((((_local8.name == "bag")) || ((_local8.name == "grass")))){
Method.playSound("HitBag", 11, 1, Global.soundVolume);
} else {
Method.playSound(_arg1[1][1], 11, 1, Global.soundVolume);
};
if (_myWeaponName == "Bottle"){
_myWeaponName = "BottleUp";
Global.GIPanel.showWeapon(_myWeaponName);
loseWeapon("BottleDown", (myX + (50 * scaleX)), (myY - 70));
Method.playSound(Data.BOTTLE_BREAK, 11, 1, Global.soundVolume);
};
if (((!((_arg1[1][2] == null))) && (!((_local8.name == "grass"))))){
Method.createEffect("HitEffect", _local8.myX, (myY - _arg1[1][2]), -(scaleX));
};
_local8.hited("hited", 1, scaleX, _arg1[3]);
if (Math.abs(_speedX) >= Math.abs(_local8.speedX)){
_speedX = _local8.speedX;
};
break;
};
};
};
};
};
};
_local5--;
};
if (_checkTimes){
if (_hitTargets.length > 0){
hitHandler();
_checkTimes = false;
};
};
}
function changeXY(_arg1:Array):void{
myX = (myX + _arg1[0]);
myY = (myY + _arg1[1]);
}
protected function renewTimer():void{
}
function moveTarget(_arg1:Array):void{
var _local2:BasicMoveableObjectMC;
var _local3:Number;
_local2 = (_arg1[0] as BasicMoveableObjectMC);
_local3 = (_local2.myX + _arg1[1]);
if (!checkTurnBlock(_local3, _local2.myY, _local2)){
_local2.myX = _local3;
};
}
function throwAttack():void{
}
public function getHpTotal():int{
return (_hpTotal);
}
public function getHp():int{
return (_hp);
}
override protected function updatePlayEvt():void{
super.updatePlayEvt();
unbreakHandler();
}
function resetMcFrame():void{
_mcCurrentFrame = 0;
}
function nextAction(_arg1:Array):void{
toStopFrame(_arg1[0]);
}
protected function renewHitStatus():void{
if (((!((_hitTargets == null))) && ((_hitTargets.length == 0)))){
renewTimer();
};
_hitTargets = new Array();
_checkTimes = false;
}
function mcEnd():void{
_mcEnd = true;
}
public function hited(_arg1:String, _arg2:uint, _arg3:int, _arg4:uint):void{
}
protected function loseWeapon(_arg1:String, _arg2:Number, _arg3:Number):void{
var _local4:String;
var _local5:Class;
var _local6:WeaponMC;
if ((((_arg1 == "BottleUp")) || ((_arg1 == "BottleDown")))){
_local4 = "FallWeapon";
} else {
_local4 = "Weapon";
};
_local5 = Method.getClass1(_local4);
_local6 = (Method.createDisplayObj(_local5, Global.roleCTN, -1, _arg2, _arg3) as WeaponMC);
_local6.name = "Weapon";
_local6.gotoAndStop(_arg1);
_local6.speedX = (1 * scaleX);
_local6.init();
_local6.status = "rotate";
if ((((_arg1 == "Dart")) || ((_arg1 == "BottleDown")))){
_local6.ableTimer++;
_local6.toflash();
};
}
protected function fallAction():void{
toStopFrame("fall");
}
function mcReady():void{
_mcReady = true;
}
function changeStatus(_arg1:Array):void{
_status = _arg1[0];
}
protected function checkTurnBlock(_arg1:Number, _arg2:Number, _arg3:BasicMoveableObjectMC=null):Boolean{
var _local4:int;
var _local5:Number;
var _local6:Number;
var _local7:String;
var _local8:uint;
var _local9:int;
var _local10:int;
var _local11:Point;
var _local12:uint;
var _local13:BasicThingMC;
if (_arg3 == null){
_arg3 = (this as BasicMoveableObjectMC);
};
_local4 = scaleX;
_local8 = 20;
_local9 = 20;
_local10 = _local9;
while (_local10 <= (_arg3.hit.height + 5)) {
if (_local10 == 20){
_local5 = (_arg1 + (20 * _local4));
} else {
_local5 = (_arg1 + ((_arg3.hit.width / 2) * _local4));
};
_local6 = (_arg2 - _local10);
_local7 = Method.getColorStr(_local5, _local6);
if (((!((_local7 == "0"))) && (!((_local7 == "ffffffff"))))){
return (true);
};
_local11 = parent.localToGlobal(new Point(_local5, _local6));
_local12 = 0;
while (_local12 < Global.thingsCTN.numChildren) {
_local13 = (Global.thingsCTN.getChildAt(_local12) as BasicThingMC);
if (_local13 != null){
if (Math.abs((_arg3.myX - _local13.myX)) <= ((_arg3.width + _local13.width) / 2)){
if (Math.abs((_arg3.myY - _local13.myY)) <= Math.max(_arg3.height, _local13.height)){
if (_local13.hit.hitTestPoint(_local11.x, _local11.y)){
if (Math.abs((_arg1 - _local13.x)) > (_local13.hit.width / 2)){
return (true);
};
};
};
};
};
_local12++;
};
_local10 = (_local10 + _local8);
};
return (false);
}
}
}//package com.macrojoy.zgd.display
Section 12
//BasicEnemyMC (com.macrojoy.zgd.display.BasicEnemyMC)
package com.macrojoy.zgd.display {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.geom.*;
import flash.utils.*;
public class BasicEnemyMC extends BasicLandMC {
protected var _walkable:Boolean;
var _appear_FI:Array;
protected var _actionOdds:Number;
protected var _noBody:Boolean;
protected var _dizzyable:Boolean;
protected var _jumpHeight:uint;
protected var _hpUI:int;
private var _bossShowMC:MovieClip;
protected var _rollable:Boolean;
private var _escapeTime:uint;
private var _order:uint;
protected var _slothing:Boolean;
protected var _attackMTP:Number;// = 1
protected var _slothOdds:Number;
private var _hpBarLength:Number;
protected var _runable:Boolean;
protected var _attackOdds:uint;
protected var _twinkleTimer:uint;
protected var _moving:Boolean;
private var _hpBarMC:MovieClip;
public var bornInfo:Array;
protected var _attackDisY:uint;// = 55
protected var _attackDisX:uint;// = 70
private var _showHpTimer:uint;
var _dizzy_FI:Array;
protected var _moveDis:uint;// = 650
protected var _flashable:Boolean;
protected var _jumpable:Boolean;
private var _hitedTime:uint;
private var _wantedMC:MovieClip;
public function BasicEnemyMC(){
var _local1:String;
var _local2:Object;
_moveDis = 650;
_attackDisX = 70;
_attackDisY = 55;
_attackMTP = 1;
_appear_FI = [[10, [["changeSpeed", [0, -20]], ["changeStatus", ["jump"]]]]];
_dizzy_FI = [[10, [["halveSpeed"]]], [20, [["standAction"]]]];
super();
_local1 = getQualifiedClassName(this).replace("com.macrojoy.zgd.display::MC", "");
_order = Number(_local1.replace("Enemy", ""));
_local2 = Data.getObjData((_local1.toLowerCase() + "Obj"));
_hpUI = (_hpTotal = (_hp = _local2.hp));
if (((!((_local2.type == undefined))) && ((_local2.type == "boss")))){
_hpUI = (_hpTotal = (_hp = (_local2.hp * Global.bossHpMultiple)));
} else {
_hpUI = (_hpTotal = (_hp = _local2.hp));
};
switch (Global.difficulty){
case 1:
_slothOdds = (_local2.slothOdds * 2);
break;
case 2:
_attackOdds = _local2.slothOdds;
break;
case 3:
_attackOdds = (_local2.slothOdds / 3);
break;
};
_jumpSpeed = _local2.jumpSpeed;
_walkSpeed = (_runSpeed = _local2.moveSpeed);
}
protected function updateHpUI():void{
var _local1:Sprite;
var _local2:uint;
if (_hpBarMC != null){
_hpBarMC.x = myX;
_hpBarMC.y = ((myY - hit.height) - 15);
_local1 = (_hpBarMC.getChildByName("hpBar") as Sprite);
_local2 = Math.floor(((_hpUI / _hpTotal) * _hpBarLength));
_local1.width = _local2;
};
}
protected function autoAI():void{
if ((((((_status == "stand")) && ((Global.gameStatus == "over")))) && (!(Global.gameResult)))){
if (currentLabel != "stand"){
standAction();
};
} else {
if (_mcEnd){
_actionTimer++;
if ((((_actionTimer >= 15)) || ((Global.gameStatus == "over")))){
if (_status == "stand"){
if ((((currentLabel == "stand")) || ((currentLabel == "breath")))){
if (Global.gameStatus == "over"){
scaleX = -(checkDir1());
bornInfo[1] = ((-1000 * checkDir1()) + Global.hero.myX);
moveAction();
} else {
standAI();
};
} else {
moveAI();
};
} else {
if (_status == "rope"){
ropeAI();
} else {
if (_status == "ride"){
rideAI();
};
};
};
};
};
};
}
private function checkJumpTrain():Boolean{
var _local1:Boolean;
var _local2:Number;
var _local3:Number;
var _local4:String;
var _local5:Boolean;
_local2 = (myX - 40);
_local3 = (myY - _jumpHeight);
_local4 = Method.getColorStr(_local2, _local3);
if (_local4 != "ffffcc00"){
_local1 = true;
};
while (_local3 <= myY) {
_local3 = (_local3 + 10);
_local4 = Method.getColorStr(_local2, _local3);
if (_local4 == "ffffcc00"){
_local5 = true;
break;
};
};
if (((_local1) && (_local5))){
return (true);
};
return (false);
}
protected function attack():void{
}
protected function checkDis():String{
var _local1:int;
var _local2:int;
var _local3:Number;
_local1 = Math.abs(Math.round((Global.hero.myX - myX)));
_local2 = Math.abs(Math.round((Global.hero.myX - bornInfo[1])));
_local3 = (Global.hero.hit.width / 2);
if ((((((((((Global.gameStatus == "playing")) && ((Global.hero.getHp() > 0)))) && (!(Global.hero.unbreak)))) && (!((Global.hero.status == "caught"))))) && ((_local2 < _moveDis)))){
if (((((((myY - Global.hero.myY) <= _jumpHeight)) && (_jumpable))) || (!(_jumpable)))){
if (((((myY - Global.hero.myY) < 55)) && (((Global.hero.myY - myY) < 25)))){
if ((((_local1 < (_attackDisX + _local3))) && (((!((type == "boss"))) || ((((type == "boss")) && ((_local1 > 5)))))))){
if (Global.hero.space == space){
return ("inDis");
};
return ("outDis");
} else {
return ("outDis");
};
} else {
return ("outDis");
};
} else {
return ("noTarget");
};
//unresolved jump
};
return ("noTarget");
}
override protected function firedHandler():void{
var _local1:Class;
var _local2:uint;
_local1 = Method.getClass1("FiredMC");
_local2 = Global.roleCTN.getChildIndex(this);
Method.createDisplayObj(_local1, Global.roleCTN, _local2, myX, myY);
removeSelf();
if (_hp > 0){
_hp = 0;
if (!_noBody){
Method.reduceEnemyNum((type == "boss"));
};
Method.playSound("Dead4", 9, 1, Global.soundVolume);
};
if (Global.channel12 == null){
Method.playSound("Burning", 12, 1, Global.soundVolume);
};
}
private function standAI():void{
var _local1:String;
if (_slothing){
if (_actionTimer >= 20){
_actionTimer = 0;
standAction();
_slothing = false;
};
if (checkDir() < 0){
turnAction();
};
} else {
if ((((Math.random() < _slothOdds)) && (!(Global.isBonusMission)))){
_slothing = true;
toStopFrame("breath");
_actionTimer = 0;
} else {
checkCeiling();
switch (checkDis()){
case "inDis":
if (checkDir() >= 0){
_attacking = true;
attack();
renewHitStatus();
} else {
turnAction();
_speedX = (_speedX * -1);
};
break;
case "outDis":
if (checkDir() >= 0){
if (!_block){
moveAction();
_actionTimer = 0;
} else {
if (((_jumpable) && (_canUp))){
_local1 = Method.getColorStr(((myX + (25 * scaleX)) + (_runSpeed * scaleX)), (myY - _jumpHeight));
if (_local1 == "0"){
_jumpSpeedX = (Math.floor((((_runSpeed - 2) * Math.random()) + 2)) * scaleX);
_jumpSpeedY = Math.floor((((_jumpSpeed + 20) * Math.random()) - 20));
jumpPreAction();
_actionTimer = 0;
};
} else {
attackBlock();
renewHitStatus();
_attacking = true;
};
};
} else {
turnAction();
_speedX = (_speedX * -1);
};
break;
case "noTarget":
if (!_block){
if (Math.abs((myX - bornInfo[1])) > 20){
if ((myX * scaleX) > (bornInfo[1] * scaleX)){
turnAction();
};
moveAction();
};
} else {
if (((_jumpable) && (_canUp))){
_local1 = Method.getColorStr(((myX + (25 * scaleX)) + (_runSpeed * scaleX)), (myY - _jumpHeight));
if (_local1 == "0"){
_jumpSpeedX = (Math.floor((((_runSpeed - 2) * Math.random()) + 2)) * scaleX);
_jumpSpeedY = _jumpSpeed;
jumpPreAction();
_actionTimer = 0;
};
} else {
attackBlock();
renewHitStatus();
_attacking = true;
};
};
break;
};
};
};
}
private function checkDir():int{
var _local1:int;
var _local2:int;
_local1 = (Global.hero.myX - myX);
_local2 = 0;
if (_local1 != 0){
_local2 = ((Math.abs(_local1) / _local1) * scaleX);
};
return (_local2);
}
override function dieStatus():void{
if (_mcReady){
alpha = ((alpha)==1) ? 0.5 : 1;
_twinkleTimer++;
if (_twinkleTimer >= 20){
_remove = true;
};
};
}
function releaseHero():void{
standAction();
Global.hero.released();
}
private function ropeAI():void{
if (currentLabel == "s_rope"){
ropeAction();
_speedX = (4 * scaleX);
} else {
if (currentLabel == "c_rope"){
if ((((checkDis() == "inDis")) && ((checkDir() > 0)))){
_speedX = 0;
toStopFrame("c_attack");
} else {
if (_block){
_jumpSpeedX = speedX;
_jumpSpeedY = -25;
jumpAction();
};
};
} else {
toStopFrame("c_rope");
_speedX = (4 * scaleX);
};
};
}
private function escape():void{
var _local1:int;
var _local2:Number;
var _local3:uint;
var _local4:Array;
var _local5:Array;
_escapeTime++;
if (Global.enemyArr.length > 0){
_local3 = 0;
while (_local3 < Global.enemyArr.length) {
_local5 = Global.enemyArr[_local3];
if (_local3 == 0){
_local1 = _local3;
_local2 = Math.abs((_local5[1] - bornInfo[1]));
} else {
if (Math.abs((_local5[1] - bornInfo[1])) < _local2){
_local1 = _local3;
_local2 = Math.abs((_local5[1] - bornInfo[1]));
};
};
_local3++;
};
_local4 = Global.enemyArr[_local1];
if ((Global.hero.myX - _local4[1]) >= 0){
if ((((_local4[0] == 4)) || ((_local4[0] == 3)))){
bornInfo[0] = 5;
bornInfo[2] = -550;
} else {
if ((((_local4[0] == 1)) || ((_local4[0] == 2)))){
bornInfo[0] = 1;
bornInfo[2] = _local4[2];
} else {
if ((((_local4[0] == 5)) || ((_local4[0] == 6)))){
bornInfo[0] = 5;
bornInfo[2] = _local4[2];
};
};
};
} else {
if ((((_local4[0] == 4)) || ((_local4[0] == 3)))){
bornInfo[0] = 6;
bornInfo[2] = -550;
} else {
if ((((_local4[0] == 1)) || ((_local4[0] == 2)))){
bornInfo[0] = 2;
bornInfo[2] = _local4[2];
} else {
if ((((_local4[0] == 5)) || ((_local4[0] == 6)))){
bornInfo[0] = 6;
bornInfo[2] = _local4[2];
};
};
};
};
bornInfo[1] = _local4[1];
};
}
override protected function toStandHandler():void{
if ((((currentLabel == "f_down")) || ((((type == "boss")) && ((_hp <= 0)))))){
toStopFrame("f_earth");
_speedX = 0;
Method.playSound(Data.FALL, 5, 1, Global.soundVolume);
} else {
if (currentLabel != "fall"){
jumpOverAction();
_speedX = 0;
};
};
if (_jAttack){
_jAttack = false;
};
}
protected function createHpUI():void{
var _local1:Class;
var _local2:Sprite;
if (_hpBarMC == null){
_local1 = Method.getClass1("BossHpMC");
_hpBarMC = (Method.createDisplayObj(_local1, parent, -1, myX, ((myY - hit.height) - 15)) as MovieClip);
_local2 = (_hpBarMC.getChildByName("hpBar") as Sprite);
_hpBarLength = _local2.width;
updateHpUI();
};
}
override protected function fallingHandler():void{
if (_ropeable){
checkRope();
};
}
override protected function checkAngle():int{
var _local1:uint;
var _local2:BasicCreatureMC;
var _local3:Point;
var _local4:int;
var _local5:uint;
_gPoint = parent.localToGlobal(new Point(myX, myY));
_local2 = Global.hero;
_local3 = Global.mainBgCTN.localToGlobal(new Point(_local2.myX, _local2.myY));
_local4 = Math.floor((_gPoint.y - _local3.y));
_local5 = Math.abs(Math.floor((_gPoint.x - _local3.x)));
_local1 = Math.floor(((Math.atan2(_local4, _local5) * 180) / Math.PI));
return (_local1);
}
override protected function brinkHandler():void{
if (currentLabel == "hited"){
if (type != "boss"){
fallAction();
};
} else {
if (currentLabel != "fall"){
downAction();
};
};
_status = "fall";
}
override protected function updatePlayEvt():void{
super.updatePlayEvt();
autoAI();
if (type == "boss"){
if (_hpUI > _hp){
if ((_hpUI - 2) > _hp){
_hpUI = (_hpUI - 2);
} else {
_hpUI = _hp;
};
};
if (_showHpTimer > 0){
_showHpTimer--;
if ((((((_showHpTimer == 0)) || ((_hp <= 0)))) || ((currentLabel == "empty")))){
parent.removeChild(_hpBarMC);
_hpBarMC = null;
_showHpTimer = 0;
} else {
if (_showHpTimer < 35){
_hpBarMC.alpha = (_hpBarMC.alpha - 0.03);
} else {
_hpBarMC.alpha = 1;
};
};
};
updateHpUI();
if (_wantedMC != null){
_wantedMC.x = myX;
_wantedMC.y = ((myY - hit.height) - 35);
if (_wantedMC.parent == null){
_wantedMC = null;
};
};
checkShowBoss();
} else {
checkFire();
};
}
private function checkDir1():int{
var _local1:int;
var _local2:int;
_local1 = (Global.hero.myX - myX);
_local2 = 0;
if (_local1 != 0){
_local2 = (Math.abs(_local1) / _local1);
};
return (_local2);
}
override public function init():void{
var _local1:uint;
var _local2:Class;
super.init();
if (bornInfo[4] != undefined){
_hpUI = (_hp = bornInfo[4]);
};
if ((((((type == "boss")) && (!(_noBody)))) && ((_hp == _hpTotal)))){
_local2 = Method.getClass1("WantedMC");
_wantedMC = (Method.createDisplayObj(_local2, parent, -1, myX, ((myY - hit.height) - 35)) as MovieClip);
};
if (type == "boss"){
_hited_FI = [[10, [["halveSpeed"]]], [15, [["standAction"]]]];
};
if (((!((bornInfo == null))) && (!(_noBody)))){
switch (uint(bornInfo[0])){
case 4:
rideAction();
break;
case 3:
toStopFrame("appear");
_jumpSpeedY = -20;
break;
default:
_status = "stand";
_mcEnd = true;
};
};
_local1 = Math.round((-(_jumpSpeed) / Data.GRIVATY));
_jumpHeight = (((_local1 + 1) * -(_jumpSpeed)) - (((_local1 / 2) * (_local1 + 1)) * Data.GRIVATY));
}
override protected function checkReborn():void{
var _local1:String;
var _local2:Number;
if (_hp > 0){
if (((!((bornInfo == null))) && (!(_noBody)))){
if (type == "boss"){
bornInfo[4] = _hp;
};
Global.enemyArr.push(bornInfo);
};
bornInfo = null;
} else {
if ((((type == "boss")) && (!(_noBody)))){
givePresents();
} else {
_local1 = getQualifiedClassName(this).replace("com.macrojoy.zgd.display::MC", "");
_local1 = _local1.replace("Enemy", "");
_local2 = Data[(("ENEMY" + _local1) + "_PRESENT_ODDS")];
if (Math.random() < _local2){
if (Global.isBonusMission){
Method.createPresent(x, y, 0, 0, 1);
} else {
Method.createPresent(x, y, 0.33, 0.5, 1);
};
};
};
};
}
private function rideAI():void{
var _local1:uint;
var _local2:int;
if (currentLabel == "r_stand"){
_jumpSpeedX = _speedX;
_jumpSpeedY = _jumpSpeed;
_jumpFromHorse = true;
jumpAction();
Global.roleCTN.addChild(this);
myVehicle.target = null;
myVehicle.changeSpeed([-5, 0]);
myVehicle = null;
} else {
if ((((Math.abs((myX - bornInfo[1])) < _moveDis)) && (checkJumpTrain()))){
toStopFrame("r_rise");
myVehicle.changeSpeed([0, 0]);
} else {
if ((((((((((((Global.hero.myX >= myX)) && ((Global.gameStatus == "playing")))) && ((Global.hero.getHp() > 0)))) && (!((currentLabel == "fall"))))) && (!((currentLabel == "f_down"))))) && (!((currentLabel == "f_earth"))))){
if (!Math.floor((Math.random() * 10))){
_local2 = checkAngle();
if (_local2 >= 68){
_local1 = 1;
} else {
_local1 = 2;
};
toStopFrame(("r_attack" + _local1.toString()));
};
};
};
};
}
private function checkShowBoss():void{
var _local1:MovieClip;
if ((((_gPoint.x < -10)) || ((_gPoint.x > (Data.STAGE_WIDTH + 10))))){
if (_bossShowMC == null){
_bossShowMC = (Method.createDisplayObj(BossShowMC, Global.GIPanel) as MovieClip);
_local1 = (_bossShowMC.getChildByName("mc") as MovieClip);
_local1.gotoAndStop((_order - 12));
};
_local1 = (_bossShowMC.getChildByName("mc") as MovieClip);
if ((Global.hero.myX - myX) > 0){
_bossShowMC.x = 0;
_bossShowMC.scaleX = (_local1.scaleX = -1);
} else {
_bossShowMC.x = Data.STAGE_WIDTH;
_bossShowMC.scaleX = (_local1.scaleX = 1);
};
_bossShowMC.y = (_gPoint.y - 50);
} else {
if (_bossShowMC != null){
_bossShowMC.parent.removeChild(_bossShowMC);
_bossShowMC = null;
};
};
}
protected function rollAction():void{
_status = "stand";
toStopFrame("roll");
}
protected function attackBlock():void{
}
override protected function outScreen():void{
_remove = true;
}
private function givePresents():void{
var _local1:uint;
_local1 = (6 + Math.floor((Math.random() * 5)));
while (_local1 > 0) {
_local1--;
Method.createPresent(myX, myY, 0.1, 0.1, 1, true);
};
}
protected function moveAction():void{
if (_runable){
runAction();
_speedX = (_runSpeed * scaleX);
} else {
if (_walkable){
walkAction();
_speedX = (_walkSpeed * scaleX);
} else {
if (_rollable){
rollAction();
_speedX = (_runSpeed * scaleX);
} else {
if (_flashable){
_moving = true;
toStopFrame("disappear");
_speedX = (_runSpeed * scaleX);
} else {
if (_jumpable){
_jumpSpeedX = (Math.floor((((_runSpeed - 2) * Math.random()) + 2)) * scaleX);
_jumpSpeedY = Math.floor((((_jumpSpeed + 20) * Math.random()) - 20));
jumpPreAction();
};
};
};
};
};
_actionTimer = 0;
}
override public function hited(_arg1:String, _arg2:uint, _arg3:int, _arg4:uint):void{
var _local5:uint;
var _local6:Boolean;
if (Global.isBonusMission){
if (_hp > 2){
_hp = Math.floor((Math.random() * 2));
} else {
_hp = 0;
};
if (_hp == 0){
Method.addScore(1000);
Method.showScore(myX, (myY - 150), 1000);
Method.playSound(Data.SCORE, 7, 1, Global.soundVolume);
Global.enemyNum++;
Global.GIPanel.updateEnemyCount();
};
} else {
if ((((currentLabel == "hited")) || ((currentLabel == "dizzy")))){
_hitedTime++;
} else {
_hitedTime = 0;
};
_hp = (_hp - _arg2);
if ((((type == "boss")) && (!(_noBody)))){
if (Math.random() < 0.25){
escape();
};
};
if (_status == "ride"){
_hp = 0;
myVehicle.target = null;
myVehicle.changeSpeed([-5, 0]);
myVehicle = null;
};
if (_hp <= 0){
_hp = 0;
if (!_noBody){
Method.reduceEnemyNum((type == "boss"));
};
_local5 = (Math.floor((Math.random() * 7)) + 1);
if (type == "boss"){
Method.playSound("BossDie", 9, 1, Global.soundVolume);
} else {
Method.playSound(("Dead" + _local5.toString()), 9, 1, Global.soundVolume);
};
} else {
if ((((type == "boss")) && (!(_noBody)))){
createHpUI();
_showHpTimer = 100;
if (_hitedTime >= 3){
unbreak = 70;
};
};
};
};
if (_hp <= 0){
if ((((_status == "stand")) || ((_status == "crouch")))){
_speedY = 0;
_status = "stand";
if (type == "boss"){
toStopFrame("f_earth");
_speedX = 0;
} else {
toStopFrame("fall");
if (_arg1 == "fly"){
_speedY = -15;
_status = "jump";
};
_speedX = (_arg4 * _arg3);
scaleX = -(_arg3);
};
} else {
if (type != "boss"){
toStopFrame("fall");
_speedX = (_arg4 * _arg3);
scaleX = -(_arg3);
_speedY = 1;
};
_status = "fall";
};
} else {
if (type != "boss"){
if (_status == "stand"){
if ((((_arg1 == "fall")) || ((_hitedTime >= 3)))){
toStopFrame("fall");
} else {
if ((((_arg1 == "dizzy")) && (_dizzyable))){
toStopFrame("dizzy");
} else {
if (_arg1 == "fly"){
toStopFrame("fall");
_speedY = -15;
_status = "jump";
} else {
toStopFrame("hited");
};
};
};
} else {
fallAction();
_status = "fall";
_speedY = 1;
};
_speedX = (_arg4 * _arg3);
scaleX = -(_arg3);
} else {
switch (Global.difficulty){
case 1:
_local6 = true;
break;
case 2:
if (!Math.floor((Math.random() * 2))){
_local6 = true;
};
break;
};
if (((((!((_status == "jump"))) && (!((_status == "fall"))))) && (((((!(_attacking)) || ((_arg1 == "fly")))) || (_local6))))){
toStopFrame("hited");
_status = "stand";
_speedX = (_arg4 * _arg3);
scaleX = -(_arg3);
};
};
};
}
function catchHero(_arg1:Array):void{
Global.hero.caught((myX + (_arg1[0] * scaleX)), (myY - _arg1[1]), -(scaleX));
}
private function moveAI():void{
var _local1:String;
if (Global.isBonusMission){
if (Math.random() < 0.5){
_jumpSpeedX = (Math.floor((((_runSpeed - 2) * Math.random()) + 5)) * scaleX);
_jumpSpeedY = Math.floor((((_jumpSpeed + 20) * Math.random()) - 23));
jumpPreAction();
return;
};
};
if (_block){
switch (checkDis()){
case "noTarget":
if ((((Global.gameStatus == "over")) && (Global.gameResult))){
alpha = ((alpha)==1) ? 0.5 : 1;
_twinkleTimer++;
if (_twinkleTimer >= 60){
_remove = true;
};
} else {
if (Math.abs((myX - bornInfo[1])) <= 20){
standAction();
_speedX = 0;
_actionTimer = 0;
} else {
if ((myX * scaleX) > (bornInfo[1] * scaleX)){
turnAction();
_speedX = (_speedX * -1);
} else {
if (((_jumpable) && (_canUp))){
_local1 = Method.getColorStr(((myX + (25 * scaleX)) + (_runSpeed * scaleX)), (myY - _jumpHeight));
if (_local1 == "0"){
_jumpSpeedX = (Math.floor((((_runSpeed - 2) * Math.random()) + 2)) * scaleX);
_jumpSpeedY = _jumpSpeed;
jumpPreAction();
_actionTimer = 0;
};
} else {
attackBlock();
renewHitStatus();
_attacking = true;
};
};
};
};
break;
case "inDis":
if (checkDir() < 0){
turnAction();
};
standAction();
_actionTimer = 0;
break;
case "outDis":
if (checkDir() < 0){
turnAction();
standAction();
_actionTimer = 0;
} else {
if (((_jumpable) && (_canUp))){
_local1 = Method.getColorStr(((myX + (25 * scaleX)) + (_runSpeed * scaleX)), (myY - _jumpHeight));
if (_local1 == "0"){
_jumpSpeedX = (Math.floor((((_runSpeed - 2) * Math.random()) + 2)) * scaleX);
_jumpSpeedY = Math.floor((((_jumpSpeed + 20) * Math.random()) - 20));
jumpPreAction();
_actionTimer = 0;
};
} else {
attackBlock();
renewHitStatus();
_attacking = true;
};
};
break;
};
} else {
switch (checkDis()){
case "noTarget":
if (Global.gameStatus == "over"){
scaleX = -(checkDir1());
bornInfo[1] = ((-1000 * checkDir1()) + Global.hero.myX);
} else {
if (Math.abs((myX - bornInfo[1])) <= 20){
standAction();
_speedX = 0;
_actionTimer = 0;
} else {
if ((myX * scaleX) > (bornInfo[1] * scaleX)){
turnAction();
_speedX = (_speedX * -1);
};
};
};
break;
case "inDis":
if (checkDir() < 0){
turnAction();
};
standAction();
_actionTimer = 0;
break;
case "outDis":
if (checkDir() < 0){
turnAction();
standAction();
_actionTimer = 0;
};
break;
};
};
}
override public function removeSelf():void{
super.removeSelf();
Method.deleteElement(Global.camp2Arr, this);
if (_hpBarMC != null){
_hpBarMC.parent.removeChild(_hpBarMC);
_hpBarMC = null;
_showHpTimer = 0;
};
if (_bossShowMC != null){
_bossShowMC["arr"] = bornInfo;
Global.bossShowMCArr.push(_bossShowMC);
_bossShowMC = null;
};
}
public function set moveDis(_arg1:uint):void{
_moveDis = _arg1;
}
}
}//package com.macrojoy.zgd.display
Section 13
//BasicFlyMC (com.macrojoy.zgd.display.BasicFlyMC)
package com.macrojoy.zgd.display {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.geom.*;
public class BasicFlyMC extends BasicCreatureMC {
private const FLY_SPEED:Number = 9;
var _turn_up_FI:Array;
var _fall_FI:Array;
private var _rushTimer:uint;
private var _ay:Number;
private var _ax:Number;
private var _speedRushX:Number;
private var _speedRushY:Number;
private var _turnTimer:uint;
private var _rushPoint:Point;
var _turn_down_FI:Array;
public function BasicFlyMC(){
_turn_up_FI = [[16, [["turnUpOver"]]]];
_turn_down_FI = [[16, [["turnDownOver"]]]];
_fall_FI = [[10, [["nextAction", ["f_down"]]]]];
super();
space = "out";
}
function fly3Status():void{
var _local1:Point;
if (myX > _rushPoint.x){
if ((Math.abs(_speedX) * scaleX) < (11 * scaleX)){
_speedX = (_speedX + (1 * scaleX));
} else {
_speedX = (FLY_SPEED * scaleX);
};
if (_speedY > -4){
_speedY = (_speedY + -2);
} else {
_speedY = -4;
};
} else {
if (Math.abs(_speedX) < _speedRushX){
_speedX = (_speedX + (1 * scaleX));
} else {
_speedX = (_speedRushX * scaleX);
};
if (Math.abs(_speedY) < _speedRushY){
_speedY = (_speedY + 0.8);
};
};
if (space == Global.hero.space){
if (this.hit.hitTestObject(Global.hero.hit)){
if (Global.hero.getHp() > 0){
if (!Global.hero.unbreak){
if (((((!((Global.hero.currentLabel == "fall"))) && (!((Global.hero.currentLabel == "f_down"))))) && (!((Global.hero.currentLabel == "f_earth"))))){
if (Global.gameStatus == "playing"){
_local1 = parent.localToGlobal(new Point(myX, myY));
_local1 = Global.roleCTN.globalToLocal(_local1);
Global.hero.hited("hited", Data.ENEMY12_POWER, scaleX, 5);
Method.createEffect("BlamMC", Global.hero.myX, (_local1.y - 30));
Method.playSound(Data.KNIFE_HIT2, 7, 1, Global.soundVolume);
createHitedEffect("Blood");
};
};
};
};
};
};
}
function turnDownOver():void{
var _local1:Point;
var _local2:uint;
var _local3:uint;
var _local4:uint;
scaleX = (scaleX * -1);
toStopFrame("fly");
if ((((((((((((Global.hero.space == space)) && ((Global.hero.getHp() > 0)))) && (!((Global.hero.currentLabel == "fall"))))) && (!((Global.hero.currentLabel == "f_down"))))) && (!((Global.hero.currentLabel == "f_earth"))))) && ((Global.gameStatus == "playing")))){
_status = "fly3";
_local1 = Global.hero.parent.localToGlobal(new Point(Global.hero.myX, (Global.hero.myY - 90)));
_rushPoint = parent.globalToLocal(_local1);
_local2 = Math.floor((_rushPoint.x - myX));
_local3 = Math.floor((_rushPoint.y - myY));
_local4 = Math.sqrt((Math.pow(_local2, 2) + Math.pow(_local3, 2)));
_rushTimer = Math.floor((_local4 / 15));
_speedRushX = ((_local2 / _local4) * 15);
_speedRushY = ((_local3 / _local4) * 15);
_ax = ((_local2 / _local4) * 1);
_ay = ((_local3 / _local4) * 1);
} else {
_speedY = 4;
_status = "fly1";
};
}
function turnStatus():void{
_speedX = (_speedX + (-0.8 * scaleX));
}
function fly2Status():void{
if (Math.abs(_speedX) < 11){
_speedX = (_speedX + (0.8 * scaleX));
} else {
_speedX = (FLY_SPEED * scaleX);
};
_speedY = (_speedY + 0.2);
if (_turnTimer < 2){
if (_speedY >= 4){
toStopFrame("turn_down");
_status = "turn";
_turnTimer++;
};
};
}
function turnUpOver():void{
scaleX = (scaleX * -1);
toStopFrame("fly");
_speedY = -4;
_status = "fly2";
}
override protected function updatePlayEvt():void{
super.updatePlayEvt();
checkRemove();
}
protected function createHitedEffect(_arg1:String):void{
var _local2:Class;
var _local3:MovieClip;
_local2 = Method.getClass1((_arg1 + "Effect"));
_local3 = (Method.createDisplayObj(_local2, Global.effectCTN, -1, x, y) as MovieClip);
_local3.scaleX = -(scaleX);
}
override public function init():void{
super.init();
_status = "fly1";
_speedX = (FLY_SPEED * scaleX);
_speedY = 4;
}
function fallStatus():void{
if (_speedY < 20){
_speedY = (_speedY + Data.GRIVATY);
};
}
override public function hited(_arg1:String, _arg2:uint, _arg3:int, _arg4:uint):void{
var _local5:Point;
_hp = 0;
toStopFrame("fall");
_status = "fall";
_local5 = Global.mainBgCTN.globalToLocal(new Point(myX, myY));
if (Global.isBonusMission){
Method.createPresent(_local5.x, (_local5.y + 150), 0, 0, 1);
Method.addScore(1000);
Method.showScore(_local5.x, (_local5.y + 150), 1000);
Method.playSound(Data.SCORE, 7, 1, Global.soundVolume);
Global.enemyNum++;
Global.GIPanel.updateEnemyCount();
} else {
Method.createPresent(_local5.x, (_local5.y + 150), 0.33, 0.5, 1);
};
}
function fly1Status():void{
if (Math.abs(_speedX) < FLY_SPEED){
_speedX = (_speedX + (0.8 * scaleX));
} else {
_speedX = (FLY_SPEED * scaleX);
};
_speedY = (_speedY - 0.2);
if (_speedY <= -4){
toStopFrame("turn_up");
_status = "turn";
};
}
private function checkRemove():void{
_gPoint = new Point(myX, myY);
if ((((((((_gPoint.y > (Data.STAGE_HEIGHT + 200))) || ((_gPoint.y < -200)))) || ((_gPoint.x < -200)))) || ((_gPoint.x > (Data.STAGE_WIDTH + 200))))){
_remove = true;
};
}
override public function removeSelf():void{
super.removeSelf();
Method.deleteElement(Global.camp2Arr, this);
}
}
}//package com.macrojoy.zgd.display
Section 14
//BasicHeroMC (com.macrojoy.zgd.display.BasicHeroMC)
package com.macrojoy.zgd.display {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.geom.*;
public class BasicHeroMC extends BasicLandMC {
private var _ladderJumpLeftLock:Boolean;
private var _recharge:Boolean;
private var _attackTimes:uint;
private var _attackTimer:uint;
private var _screenY:int;
private var _adjustedY:Boolean;// = true
private var _keyArrAA:Array;
private var _keyArrAS:Array;
private var _keyArr:Array;
private var _victory:Boolean;
private var _keyArrDD:Array;
private var _keyArrDS:Array;
private var _ladderJumpRightLock:Boolean;
private var _keyAttackLocked:Boolean;
private var _ladder:Sprite;
private var _resumeTimer:int;
public var MouseIsDown:Boolean;
private var _keyBuffer:uint;
protected var _foodValue:uint;
private var _idleTimer:uint;
public var KeyRightIsDown:Boolean;
private var _controlable:Boolean;
private var _keyJumpLocked:Boolean;
private var _ladderTimer:uint;
private var _keyArrSA:Array;
private var _keyArrSD:Array;
private var _keyArrSS:Array;
public var KeyUpIsDown:Boolean;
private var _keySlideLock1:Boolean;
private var _keySlideLock2:Boolean;
protected var _hpable:int;
public var KeyLeftIsDown:Boolean;
private var _sideSpeed:uint;
public var KeyDownIsDown:Boolean;
public function BasicHeroMC(){
_keyArr = [0, 0];
_keyArrAA = ["A", "A"];
_keyArrDD = ["D", "D"];
_keyArrSS = ["S", "S"];
_keyArrAS = ["A", "S"];
_keyArrSA = ["S", "A"];
_keyArrDS = ["D", "S"];
_keyArrSD = ["S", "D"];
_adjustedY = true;
super();
_ropeable = true;
_hpTotal = (_hp = (_hpable = Data.HP));
_jumpSpeed = Data.JUMP_SPEED;
_runSpeed = Data.RUN_SPEED;
_walkSpeed = Data.WALK_SPEED;
_sideSpeed = Data.SIDE_SPEED;
}
function sideStatus():void{
var _local1:uint;
var _local2:Sprite;
if (currentLabel != "s_up"){
_block = false;
_local1 = 0;
while (_local1 < Global.thingsCTN.numChildren) {
_local2 = (Global.thingsCTN.getChildAt(_local1) as Sprite);
if (_local2.name == "side"){
if (_local2.hitTestObject(this)){
if (myY < ((_local2.y - 1) + 120)){
if ((myY + _speedY) >= (_local2.y + 120)){
_speedY = 0;
myY = ((_local2.y - 1) + 120);
sideNormalAction();
};
} else {
if (((((myX + (25 * scaleX)) < _local2.x)) || (((myX + (25 * scaleX)) >= (_local2.x + _local2.width))))){
_block = true;
};
};
};
};
_local1++;
};
};
}
override protected function checkBullet():void{
Global.bulletableNum--;
Global.GIPanel.updateBulletUI(Global.bulletableNum);
if (Global.bulletPreNum > 0){
_recharge = true;
};
}
override protected function hitHandler():void{
if (_attackTimes < 3){
_attackTimes++;
} else {
_attackTimes = 0;
};
_attackTimer = 30;
}
private function updateWeapon():void{
var _local1:MovieClip;
var _local2:Class;
if (mc != null){
_local1 = (mc.getChildByName("ctnMC") as MovieClip);
if (_local1 != null){
if (_myWeaponName != null){
if (_local1.numChildren == 0){
_local2 = Method.getClass1((_myWeaponName + "_Hand"));
Method.createDisplayObj(_local2, _local1);
};
} else {
if (_local1.numChildren > 0){
_local1.removeChildAt(0);
};
};
};
};
}
private function moveScreenX(_arg1:Number):void{
var _local2:Sprite;
var _local3:Number;
var _local4:Number;
_gPoint = parent.localToGlobal(new Point(myX, myY));
_local2 = (Global.mainBgCTN as Sprite);
if (_local2 == null){
return;
};
_local3 = Data.getArrData("screenCenter")[0];
_local4 = (_local2.x + Math.round((((_local3 - ((((myX * 2) + Global.stage.mouseX) - _local2.x) / 3)) - _local2.x) / 10)));
if (_local4 >= 100){
_local4 = 100;
};
_arg1 = (_local2.x - _local4);
_local2.x = _local4;
Global.lensSpeed = (Data.LENS_SPEED + _arg1);
SceneControl.updateTrain();
}
private function moveScreenY():void{
var _local1:int;
_local1 = Math.round((_screenY - Global.gameCTN.y));
Global.gameCTN.y = (Global.gameCTN.y + (_local1 / 10));
if (Math.abs(_local1) <= 1){
_adjustedY = true;
Global.gameCTN.y = _screenY;
};
}
function caught(_arg1:Number, _arg2:Number, _arg3:int):void{
_status = "caught";
toStopFrame("caught");
_speedX = 0;
_speedY = 0;
myX = _arg1;
myY = (_arg2 + 76);
scaleX = _arg3;
}
override function dieStatus():void{
if (((_mcReady) && (Global.GIPanel.lifeUiIsOK()))){
_myPause = int.MAX_VALUE;
if (Global.gameStatus == "playing"){
if (Global.isBonusMission){
GameDesign.bonusOver();
} else {
Global.gameResult = 0;
GameDesign.gameOver();
};
};
};
}
override protected function toStandHandler():void{
if (_victory){
toStopFrame("victory");
_status = "win";
} else {
if (currentLabel == "f_down"){
toStopFrame("f_earth");
Method.playSound(Data.FALL, 5, 1, Global.soundVolume);
_status = "stand";
} else {
if (currentLabel != "fall"){
jumpOverAction();
_status = "stand";
Method.playSound("FallToStand", 5, 1, Global.soundVolume);
};
};
};
_speedX = 0;
}
override protected function renewTimer():void{
_attackTimes = 0;
_attackTimer = 0;
}
private function idleTime():void{
if (_myWeaponName == null){
if (currentLabel == "stand"){
_idleTimer++;
if (_idleTimer >= 35){
if (Global.bulletableNum > 0){
showGunAction();
};
_idleTimer = 0;
};
} else {
_idleTimer = 0;
};
};
}
private function firedAction():void{
_status = "die";
toStopFrame("fired");
}
private function resumeLife():void{
var _local1:uint;
_resumeTimer++;
if (_resumeTimer >= (35 * Data.RESUME_TIME)){
_resumeTimer = 0;
_local1 = Math.floor((_hpTotal * Data.RESUME_PERCENT));
if ((_hp + _local1) < _hpable){
_hp = (_hp + _local1);
} else {
_hp = _hpable;
};
};
}
override protected function brinkHandler():void{
if (currentLabel == "hited"){
fallAction();
} else {
if (currentLabel != "fall"){
downAction();
};
};
_status = "fall";
}
public function pushKey(_arg1:String):void{
_keyArr.push(_arg1);
_keyArr.shift();
_keyBuffer = 8;
}
private function ladderAction():void{
myX = (_ladder.x + 10);
toStopFrame("c_ladder");
_status = "ladder";
}
override protected function updatePlayEvt():void{
super.updatePlayEvt();
GameDesign.updateEnemys();
if (_controlable){
if (_status != "caught"){
conmandHandler();
};
} else {
comeOutAI();
};
keyBufferHandler();
checkRecharge();
checkFire();
idleTime();
if (_foodValue > 0){
foodResumeLife();
} else {
resumeLife();
};
if (!Global.isBonusMission){
moveScreenX(_speedX);
};
if (!_adjustedY){
moveScreenY();
};
updateWindow();
if ((((_status == "jump")) || ((_status == "fall")))){
if (((!(KeyRightIsDown)) && (!(KeyLeftIsDown)))){
if ((((Math.abs(_speedX) == _runSpeed)) || ((Math.abs(_speedX) == _walkSpeed)))){
_speedX = (_speedX / 2);
};
};
};
if (((_mcReady) && ((_attackTimer > 0)))){
_attackTimer--;
if (_attackTimer == 0){
_attackTimes = 0;
};
};
updateWeapon();
}
public function getWeapon(_arg1:String):void{
_myWeaponName = _arg1;
Global.GIPanel.showWeapon(_arg1);
if ((((currentLabel == "show_gun")) || ((currentLabel == "recharge")))){
toStopFrame("stand");
};
}
override public function init():void{
super.init();
if (!Global.isBonusMission){
rideAction();
} else {
standAction();
space = "out";
_controlable = true;
_screenY = 150;
_adjustedY = false;
};
Global.screenCenter = (this as Sprite);
unbreak = 30;
}
private function showGunAction():void{
_status = "stand";
toStopFrame("show_gun");
}
private function sideNormalAction():void{
_status = "side";
toStopFrame("s_train");
}
override protected function checkeToSide():void{
var _local1:uint;
var _local2:Sprite;
if (((!((currentLabel == "fall"))) && (!((currentLabel == "f_down"))))){
_local1 = 0;
while (_local1 < Global.thingsCTN.numChildren) {
_local2 = (Global.thingsCTN.getChildAt(_local1) as Sprite);
if (_local2.name == "side"){
if ((((((space == "out")) && ((myX > (_local2.x + (_local2.width / 2)))))) && ((scaleX < 0)))){
if (_local2.hitTestObject(this)){
if ((((myY < ((_local2.y - 1) + 120))) && (((myY + _speedY) >= (_local2.y + 120))))){
_speedX = 0;
_speedY = 0;
_status = "side";
myY = ((_local2.y - 1) + 120);
if (myX > ((_local2.x + _local2.width) - 20)){
myX = ((_local2.x + _local2.width) - 20);
};
sideNormalAction();
};
};
};
};
_local1++;
};
};
}
override protected function firedHandler2():void{
var _local1:ColorTransform;
if (_inFire == 1){
if (_hp <= 0){
transform.colorTransform = new ColorTransform();
} else {
if ((_myTimer % 4) == 2){
_local1 = transform.colorTransform;
_local1.redOffset = 50;
transform.colorTransform = _local1;
} else {
if ((_myTimer % 4) == 0){
transform.colorTransform = new ColorTransform();
};
};
};
_walkSpeed = (Data.WALK_SPEED / 2);
_runSpeed = (Data.RUN_SPEED / 2);
} else {
if (_inFire == 2){
_walkSpeed = Data.WALK_SPEED;
_runSpeed = Data.RUN_SPEED;
transform.colorTransform = new ColorTransform();
Method.playSound(null, 12, 99, Global.soundVolume);
};
};
}
function released():void{
if (currentLabel == "caught"){
_status = "fall";
toStopFrame("j_down");
};
}
override protected function outScreen():void{
if (_hp > 0){
_status = "die";
_hp = (_hpable = 0);
_mcReady = true;
_speedX = 0;
_speedY = 0;
shakeScreen([3]);
Method.playSound(Data.FALL, 5, 1, Global.soundVolume);
Method.playSound("Dead9", 2, 1, Global.soundVolume);
};
}
public function getHpable():int{
return (_hpable);
}
private function jumpWindowAction():void{
_status = "fall";
toStopFrame("j_window");
}
private function caughtAction():void{
}
override protected function checkMoveable():Boolean{
if (((((_gPoint.x + _speedX) <= 20)) || (((_gPoint.x + _speedX) >= (Data.STAGE_WIDTH - 20))))){
return (false);
};
return (true);
}
override public function removeSelf():void{
var _local1:int;
super.removeSelf();
_local1 = Global.camp1Arr.indexOf(this);
if (_local1 != -1){
Global.camp1Arr.splice(_local1, 1);
};
}
private function updateWindow():void{
var _local1:Boolean;
var _local2:uint;
var _local3:Sprite;
var _local4:Sprite;
_local2 = 0;
while (_local2 < Global.upTrainCTN.numChildren) {
_local3 = (Global.upTrainCTN.getChildAt(_local2) as Sprite);
if (_local3.name == "window"){
_local4 = (_local3.getChildByName("wall") as Sprite);
if (((!((_status == "side"))) && (_local3.hitTestObject(this["hit"])))){
_local4.visible = false;
_local1 = true;
} else {
_local4.visible = true;
};
};
_local2++;
};
if (_local1){
if (Global.mainBgCTN.getChildIndex(Global.hero) > Global.mainBgCTN.getChildIndex(Global.upTrainCTN)){
Global.mainBgCTN.swapChildren(Global.hero, Global.upTrainCTN);
};
} else {
if (Global.mainBgCTN.getChildIndex(Global.hero) < Global.mainBgCTN.getChildIndex(Global.upTrainCTN)){
Global.mainBgCTN.swapChildren(Global.hero, Global.upTrainCTN);
};
};
}
private function keyADHandler(_arg1:int):void{
var _local2:Boolean;
var _local3:Number;
var _local4:Boolean;
if (_status == "ladder"){
checkLadder();
if (_ladder != null){
if (((!(_ladderJumpLeftLock)) && (KeyLeftIsDown))){
_local2 = true;
_local3 = -5;
if (scaleX != _arg1){
turnAction();
_speedX = (_speedX * -1);
};
} else {
if (((!(_ladderJumpRightLock)) && (KeyRightIsDown))){
_local2 = true;
_local3 = _jumpSpeed;
};
};
if (_local2){
checkCeiling();
if (_canUp){
_jumpSpeedX = _speedX;
if (_status == "stand"){
jumpPreAction();
Method.playSound(Data.JUMP, 2, 1, Global.soundVolume);
} else {
jumpAction();
Method.playSound(Data.JUMP, 2, 1, Global.soundVolume);
};
};
};
};
};
if (_mcEnd){
_local4 = false;
if (((((!((_status == "jump"))) && (!((_status == "fall"))))) && (!((_status == "ladder"))))){
if (scaleX != _arg1){
turnAction();
_local4 = true;
_speedX = (_speedX * -1);
};
};
};
if (_status == "stand"){
if (currentLabel == "run"){
if (_local4){
_speedX = (_walkSpeed * scaleX);
walkAction();
};
} else {
if ((((_keyArr.toString() == _keyArrAA.toString())) || ((_keyArr.toString() == _keyArrDD.toString())))){
runAction();
_speedX = (_runSpeed * scaleX);
createSmokeEffect("RunEffect");
} else {
if (currentLabel != "walk"){
if (currentLabel == "show_gun"){
walkAction();
_speedX = (_walkSpeed * scaleX);
createSmokeEffect("FallEffect");
} else {
if (((_mcEnd) || ((currentLabel == "recharge")))){
walkAction();
_speedX = (_walkSpeed * scaleX);
createSmokeEffect("FallEffect");
};
};
};
};
};
} else {
if (_status == "side"){
if (currentLabel != "c_train"){
trainAction();
_speedX = (_sideSpeed * scaleX);
};
} else {
if (_status == "rope"){
if (currentLabel != "c_rope"){
ropeAction();
_speedX = (_sideSpeed * scaleX);
};
} else {
if ((((_status == "jump")) || ((_status == "fall")))){
if ((((((Math.abs(_speedX) == 0)) || (_local4))) || (!((_arg1 == scaleX))))){
_speedX = (_walkSpeed * _arg1);
} else {
_speedX = (Math.abs(_speedX) * _arg1);
};
};
};
};
};
}
private function sideDownAction():void{
_status = "side";
toStopFrame("s_down");
_block = false;
}
private function trainAction():void{
_status = "side";
toStopFrame("c_train");
}
private function checkDir(_arg1:BasicMoveableObjectMC):int{
var _local2:int;
var _local3:int;
_local2 = (_arg1.myX - myX);
_local3 = 1;
if (_local2 != 0){
_local3 = ((Math.abs(_local2) / _local2) * scaleX);
};
return (_local3);
}
override protected function firedHandler():void{
_hp = (_hp - 30);
_hpable = (_hpable - 15);
if (_hp <= 0){
_hp = 0;
_hpable = 0;
firedAction();
_speedX = 0;
Method.playSound("Dead9", 2, 1, Global.soundVolume);
};
if (Global.channel12 == null){
Method.playSound("Burning", 12, 99, Global.soundVolume);
};
}
private function keyVerticalHandler():void{
var _local1:String;
if (KeyDownIsDown){
_local1 = _keyArr.toString();
if (_local1 == _keyArrSS.toString()){
if (checkSideDown()){
sideDownAction();
};
};
renewTimer();
if ((((_status == "stand")) || ((_status == "crouch")))){
if (((((!(_keySlideLock1)) || (!(_keySlideLock2)))) && (((KeyLeftIsDown) || (KeyRightIsDown))))){
_keySlideLock1 = true;
_keySlideLock2 = true;
slideAction();
renewHitStatus();
_speedX = (_runSpeed * scaleX);
} else {
if (_status == "stand"){
goDownAction();
_speedX = 0;
};
};
} else {
if (_status == "ladder"){
if (currentLabel != "c_ladder"){
ladderAction();
};
checkRoad(_speedY);
if (_canStand){
myX = (_ladder.x - 5);
Method.adjustY(this);
Method.adjustY(this);
standAction();
_idleTimer = 0;
} else {
_speedY = Data.LADDER_SPEED;
};
} else {
if (_status == "side"){
if (checkWindow()){
jumpWindowAction();
Method.playSound(Data.JUMP, 2, 1, Global.soundVolume);
};
} else {
if (_status == "rope"){
downAction();
_speedY = 5;
};
};
};
};
} else {
if (_keySlideLock2 == true){
_keySlideLock2 = false;
};
if (_status == "crouch"){
standAction();
_idleTimer = 0;
};
if (KeyUpIsDown){
renewTimer();
checkLadder();
if (_status != "ladder"){
if (_ladder != null){
if ((((_status == "jump")) || ((_status == "fall")))){
_ladderTimer = 0;
_speedY = 0;
} else {
_ladderTimer = 10;
_speedY = -(Data.LADDER_SPEED);
};
ladderAction();
_speedX = 0;
} else {
if (!_keyJumpLocked){
if (_status == "side"){
sideUpAction();
_speedX = 0;
} else {
if (((!((_status == "jump"))) && (!((_status == "fall"))))){
checkCeiling();
if (_canUp){
_jumpSpeedX = _speedX;
_jumpSpeedY = _jumpSpeed;
if (_status == "stand"){
jumpPreAction();
Method.playSound(Data.JUMP, 2, 1, Global.soundVolume);
} else {
jumpAction();
Method.playSound(Data.JUMP, 2, 1, Global.soundVolume);
};
};
};
};
};
};
} else {
_ladderTimer++;
if (_ladder != null){
if (_ladderTimer >= 10){
if (currentLabel != "c_ladder"){
ladderAction();
};
_speedY = -(Data.LADDER_SPEED);
} else {
toStopFrame("s_ladder");
_speedY = 0;
};
} else {
_jumpSpeedX = ((_walkSpeed / 2) * scaleX);
_jumpSpeedY = (_jumpSpeed + 2);
jumpAction();
Method.playSound(Data.JUMP, 2, 1, Global.soundVolume);
};
};
_keyJumpLocked = true;
} else {
if (((((!((_status == "jump"))) && (!((_status == "fall"))))) && (_keyJumpLocked))){
_keyJumpLocked = false;
};
if (_status == "ladder"){
toStopFrame("s_ladder");
_speedY = 0;
};
};
};
}
function recharge():void{
var _local1:MovieClip;
Global.bulletableNum++;
Global.bulletPreNum--;
Global.GIPanel.updateBulletUI(Global.bulletableNum);
Global.GIPanel.updateClipUI(Global.bulletPreNum);
Method.createEffect("KaMC", (myX + ((scaleX * width) * Math.random())), (myY - height));
if ((((Global.bulletPreNum == 0)) || ((Global.bulletableNum >= 6)))){
_local1 = (getChildByName("mc") as MovieClip);
_local1.gotoAndStop(75);
_mcCurrentFrame = 75;
_recharge = false;
};
}
public function getWeaponName():String{
return (_myWeaponName);
}
override protected function fallingHandler():void{
checkRope();
}
override protected function clearWeapon():void{
_myWeaponName = null;
Global.GIPanel.showWeapon("gun");
}
private function keyBufferHandler():void{
if (_keyBuffer > 0){
_keyBuffer--;
if (_keyBuffer == 0){
_keyArr = [0, 0];
};
};
}
private function conmandHandler():void{
if (_mcReady){
if (((((((((!((currentLabel == "fall"))) && (!((currentLabel == "f_down"))))) && (!((currentLabel == "f_earth"))))) && (!((currentLabel == "rise"))))) && (!((_status == "die"))))){
keyLevelHandler();
keyVerticalHandler();
keyAttackHandler();
};
};
}
public function victoryAction():void{
if ((((_status == "stand")) || ((_status == "crouch")))){
toStopFrame("victory");
_status = "win";
_speedX = 0;
} else {
_victory = true;
};
}
public function addLifeNum(_arg1:uint):void{
if ((_hpable + _arg1) < _hpTotal){
_foodValue = (_foodValue + _arg1);
_hpable = (_hpable + _arg1);
} else {
_foodValue = (_hpTotal - _hp);
_hpable = _hpTotal;
};
}
private function keyLevelHandler():void{
if (KeyLeftIsDown){
keyADHandler(-1);
_ladderJumpLeftLock = true;
} else {
if (KeyRightIsDown){
keyADHandler(1);
_ladderJumpRightLock = true;
} else {
keyADUpHandler();
};
};
if (!KeyRightIsDown){
if (_ladderJumpRightLock){
_ladderJumpRightLock = false;
};
};
if (!KeyLeftIsDown){
if (_ladderJumpLeftLock){
_ladderJumpLeftLock = false;
};
};
}
private function sideUpAction():void{
_status = "side";
toStopFrame("s_up");
}
private function checkWindow():Boolean{
var _local1:String;
_local1 = Method.getColorStr(myX, (myY - 120));
if ((((_status == "side")) && ((_local1 == "ffff0000")))){
return (true);
};
return (false);
}
private function comeOutAI():void{
unbreak = 30;
if (myX > 100){
if (currentLabel == "ride"){
toStopFrame("r_rise");
myVehicle.changeSpeed([0, 0]);
} else {
if (currentLabel == "r_stand"){
_jumpSpeedX = _speedX;
_jumpSpeedY = (_jumpSpeed + 5);
jumpAction();
Method.playSound(Data.JUMP, 2, 1, Global.soundVolume);
myVehicle.target = null;
Global.effectCTN.addChildAt(myVehicle, 0);
myVehicle.changeSpeed([-5, 0]);
myVehicle = null;
} else {
if (_status == "stand"){
_controlable = true;
UserControl.control(this);
_screenY = 150;
_adjustedY = false;
};
};
};
};
}
private function sildeKickAction():void{
_status = "stand";
toStopFrame("kick3");
}
private function slideAction():void{
_status = "stand";
toStopFrame("slide");
hit.scaleY = 0.3;
}
private function checkLadder():void{
var _local1:uint;
var _local2:Sprite;
_ladder = null;
if (scaleX == 1){
_gPoint = parent.localToGlobal(new Point(myX, myY));
_local1 = 0;
while (_local1 < Global.thingsCTN.numChildren) {
_local2 = (Global.thingsCTN.getChildAt(_local1) as Sprite);
if (_local2.name == "ladder"){
if (_local2.hitTestPoint((_gPoint.x + 10), ((_gPoint.y - height) + 20), true)){
_ladder = _local2;
break;
};
};
_local1++;
};
};
}
override public function hited(_arg1:String, _arg2:uint, _arg3:int, _arg4:uint):void{
_attackTimes = 0;
if (_arg2 >= 50){
Method.createEffect("SpangMC", (myX + ((scaleX * width) * Math.random())), (myY - (height * Math.random())));
};
if (!unbreak){
_arg2 = (_arg2 * Global.difficulty);
switch (Global.difficulty){
case 1:
unbreak = 140;
break;
case 2:
unbreak = 105;
break;
case 3:
unbreak = 70;
break;
};
Global.hitedNum++;
_foodValue = 0;
_hpable = _hp;
_hp = (_hp - _arg2);
_hpable = (_hpable - (_arg2 * 0.6));
};
if (_hp <= 0){
_hp = 0;
_hpable = 0;
Method.playSound("Dead9", 2, 1, Global.soundVolume);
if ((((_status == "stand")) || ((_status == "crouch")))){
_speedY = 0;
_status = "stand";
} else {
_speedY = 1;
if (_status == "side"){
_sideFall = true;
};
_status = "fall";
};
fallAction();
} else {
if (_status == "stand"){
toStopFrame(_arg1);
} else {
if (_status == "side"){
_sideFall = true;
};
fallAction();
_status = "fall";
_speedY = 1;
};
};
_speedX = (_arg4 * _arg3);
scaleX = -(_arg3);
if (_myWeaponName != null){
loseWeapon(_myWeaponName, (myX + (20 * scaleX)), (myY - 70));
clearWeapon();
};
}
function createMyEffect():void{
createSmokeEffect("SlideEffect");
}
private function keyADUpHandler():void{
if (_keySlideLock1 == true){
_keySlideLock1 = false;
};
if (_status == "stand"){
if (_mcEnd){
if (currentLabel != "stand"){
standAction();
_idleTimer = 0;
Global.lensSpeed = Data.LENS_SPEED;
};
};
} else {
if (_status == "side"){
if (currentLabel == "c_train"){
sideNormalAction();
_speedX = 0;
};
} else {
if (_status == "rope"){
if (currentLabel == "c_rope"){
ropeNormalAction();
_speedX = 0;
};
};
};
};
}
private function checkEnemyNear():Boolean{
var _local1:Array;
var _local2:BasicCreatureMC;
var _local3:Sprite;
var _local4:int;
var _local5:BasicThingMC;
_local1 = Global.camp2Arr;
for each (_local2 in _local1) {
if (_local2.getHp() > 0){
if (((((((((!((_local2.currentLabel == "fall"))) && (!((_local2.currentLabel == "f_down"))))) && (!((_local2.currentLabel == "f_earth"))))) && (!((_local2.currentLabel == "empty"))))) && (!((_status == "ride"))))){
if (_local2.space == space){
if (checkDir(_local2) >= 0){
if ((((((((Math.abs((_local2.myX - myX)) <= (55 + (_local2.hit.width / 2)))) && ((_attackTimes <= 1)))) || ((((Math.abs((_local2.myX - myX)) <= (70 + (_local2.hit.width / 2)))) && ((_attackTimes == 2)))))) || ((((Math.abs((_local2.myX - myX)) <= (90 + (_local2.hit.width / 2)))) && ((_attackTimes == 3)))))){
if (Math.abs((myY - _local2.myY)) <= 20){
return (true);
};
};
};
};
};
};
};
_local3 = Global.thingsCTN;
_local4 = (_local3.numChildren - 1);
while (_local4 >= 0) {
_local5 = (_local3.getChildAt(_local4) as BasicThingMC);
if (((((!((_local5 == null))) && (!((_local5.name == "bag"))))) && (!((_local5.name == "grass"))))){
if (_local5.space == space){
if (checkDir(_local5) >= 0){
if ((((((((Math.abs((_local5.myX - myX)) <= (55 + (_local5.hit.width / 2)))) && ((_attackTimes <= 1)))) || ((((Math.abs((_local5.myX - myX)) <= (70 + (_local5.hit.width / 2)))) && ((_attackTimes == 2)))))) || ((((Math.abs((_local5.myX - myX)) <= (90 + (_local5.hit.width / 2)))) && ((_attackTimes == 3)))))){
if (Math.abs((myY - _local5.myY)) <= 20){
return (true);
};
};
};
};
};
_local4--;
};
return (false);
}
private function keyAttackHandler():void{
var _local1:Array;
var _local2:int;
var _local3:WeaponMC;
var _local4:int;
if (MouseIsDown){
if (!_keyAttackLocked){
_keyAttackLocked = true;
renewHitStatus();
if ((((_myWeaponName == null)) || (!(checkEnemyNear())))){
_local2 = (Global.roleCTN.numChildren - 1);
while (_local2 >= 0) {
_local3 = (Global.roleCTN.getChildAt(_local2) as WeaponMC);
if (_local3 != null){
if (((((_local3.hitTestObject(this)) && ((_local3.status == "stand")))) && ((_local3.ableTimer < 1)))){
_speedX = 0;
_local1 = getShootAngle();
toStopFrame("pick");
if (_myWeaponName != null){
loseWeapon(_myWeaponName, (myX + (20 * scaleX)), (myY - 70));
Global.itemNum--;
};
_myWeaponName = _local3.currentLabel;
Global.GIPanel.showWeapon(_myWeaponName);
Global.itemNum++;
_local3.removeSelf();
return;
};
};
_local2--;
};
};
if (Global.mouseUI != null){
if (Global.mouseUI.currentLabel != "attack"){
Global.mouseUI.gotoAndStop("attack");
};
};
if (_status == "rope"){
_local1 = getShootAngle();
renewTimer();
_status = "fall";
if (_myWeaponName != null){
toStopFrame("j_throw");
} else {
if (Global.bulletableNum){
_angle = _local1[0];
shootAction(_local1[1], "j_");
} else {
toStopFrame("kick");
};
};
} else {
if (_status == "crouch"){
_local1 = getShootAngle();
renewTimer();
if (_myWeaponName != null){
if ((((_myWeaponName == "Knife")) || ((_myWeaponName == "BottleUp")))){
toStopFrame("stab");
} else {
if ((((_myWeaponName == "Dart")) || ((_myWeaponName == "Detonator")))){
toStopFrame("throw");
} else {
toStopFrame("knock");
};
};
_status = "stand";
} else {
if (Global.bulletableNum){
shootAction(3, "c_");
} else {
slideAction();
_speedX = (_runSpeed * scaleX);
};
};
} else {
if ((((_status == "jump")) || ((_status == "fall")))){
_local1 = getShootAngle();
renewTimer();
_local4 = scaleX;
if (KeyLeftIsDown){
_local4 = -1;
} else {
if (KeyRightIsDown){
_local4 = 1;
};
};
if (scaleX != _local4){
turnAction();
_speedX = (Math.abs(_speedX) * _local4);
};
if (_myWeaponName != null){
toStopFrame("j_throw");
} else {
if (Global.bulletableNum){
_angle = _local1[0];
shootAction(_local1[1], "j_");
} else {
toStopFrame("kick");
};
};
} else {
if (_status == "stand"){
_local1 = getShootAngle();
if (currentLabel == "run"){
renewTimer();
if (_myWeaponName != null){
shootAttack([52, 83, 0, _myWeaponName]);
clearWeapon();
} else {
sildeKickAction();
_speedX = ((_runSpeed * scaleX) * 0.75);
};
} else {
if (_myWeaponName != null){
renewTimer();
if ((((_myWeaponName == "Knife")) || ((_myWeaponName == "BottleUp")))){
toStopFrame("stab");
} else {
if ((((_myWeaponName == "Dart")) || ((_myWeaponName == "Detonator")))){
toStopFrame("throw");
} else {
if (_myWeaponName == "Ax"){
toStopFrame("chop");
} else {
toStopFrame("knock");
};
};
};
_speedX = 0;
} else {
if (((Global.bulletableNum) && (!(checkEnemyNear())))){
renewTimer();
_speedX = 0;
_angle = _local1[0];
shootAction(_local1[1]);
} else {
_speedX = 0;
switch (_attackTimes){
case 0:
case 1:
_checkTimes = true;
toStopFrame("boxing2");
break;
case 2:
_checkTimes = true;
toStopFrame("boxing");
break;
case 3:
_checkTimes = true;
toStopFrame("kick2");
break;
};
};
};
};
};
};
};
};
};
} else {
_keyAttackLocked = false;
if (Global.mouseUI != null){
if (Global.mouseUI.currentLabel != "aim"){
Global.mouseUI.gotoAndStop("aim");
};
};
};
}
private function foodResumeLife():void{
var _local1:uint;
_resumeTimer++;
if (_resumeTimer >= Math.floor(((35 * Data.RESUME_TIME) * Data.FOOD_RESUME_QUOTIETY))){
_resumeTimer = 0;
_local1 = Math.floor((_hpTotal * Data.RESUME_PERCENT));
if ((_hp + _local1) < _hpable){
_hp = (_hp + _local1);
if ((_foodValue - _local1) >= 0){
_foodValue = (_foodValue - _local1);
} else {
_foodValue = 0;
};
} else {
_hp = _hpable;
_foodValue = 0;
};
};
}
private function checkSideDown():Boolean{
var _local1:int;
var _local2:int;
var _local3:String;
_local1 = Math.round(myX);
_local2 = Math.round(myY);
_local3 = Method.getColorStr(_local1, _local2);
if (_local3 == "ff33cc00"){
return (true);
};
return (false);
}
private function checkRecharge():void{
if (_myWeaponName == null){
if (currentLabel == "stand"){
if (_mcReady){
if (_recharge){
toStopFrame("recharge");
};
};
};
};
}
function createMyEffect1():void{
createSmokeEffect("FallEffect");
}
private function getShootAngle():Array{
var _local1:Point;
var _local2:Number;
var _local3:int;
var _local4:Number;
var _local5:uint;
var _local6:uint;
_local1 = parent.globalToLocal(new Point(Global.stage.mouseX, Global.stage.mouseY));
_local2 = (_local1.x - x);
if (_local2 > 0){
_local3 = 1;
} else {
if (_local2 < 0){
_local3 = -1;
};
};
if (scaleX != _local3){
turnAction();
_speedX = (_speedX * -1);
};
_local4 = ((-(Math.atan(((_local1.y - (y - 80)) / Math.abs(_local2)))) * 180) / Math.PI);
_local5 = 10;
if ((((_local4 < (90 - _local5))) && ((_local4 > 57)))){
_local4 = (90 - _local5);
} else {
if ((((_local4 <= 57)) && ((_local4 > (23 + _local5))))){
_local4 = (23 + _local5);
} else {
if ((((_local4 < (23 - _local5))) && ((_local4 > 12)))){
_local4 = (23 - _local5);
} else {
if ((((_local4 <= 12)) && ((_local4 > _local5)))){
_local4 = _local5;
} else {
if ((((_local4 < -(_local5))) && ((_local4 >= -14)))){
_local4 = -(_local5);
} else {
if ((((_local4 < -14)) && ((_local4 > (-28 + _local5))))){
_local4 = (-28 + _local5);
} else {
if ((((_local4 < (-28 - _local5))) && ((_local4 >= -59)))){
_local4 = (-28 - _local5);
} else {
if ((((_local4 < -59)) && ((_local4 > (-90 + _local5))))){
_local4 = (-90 + _local5);
};
};
};
};
};
};
};
};
if (_local4 >= (90 - _local5)){
_local6 = 1;
} else {
if ((((_local4 <= (23 + _local5))) && ((_local4 >= (23 - _local5))))){
_local6 = 2;
} else {
if ((((_local4 <= _local5)) && ((_local4 >= -(_local5))))){
_local6 = 3;
} else {
if ((((_local4 <= (-28 + _local5))) && ((_local4 >= (-28 - _local5))))){
_local6 = 4;
} else {
if (_local4 <= (-90 + _local5)){
_local6 = 5;
};
};
};
};
};
return ([_local4, _local6]);
}
public function getBullet():void{
if ((Global.bulletPreNum + 12) <= (Data.BULLET_NUM - 6)){
Global.bulletPreNum = (Global.bulletPreNum + 12);
} else {
Global.bulletPreNum = (Data.BULLET_NUM - 6);
};
_recharge = false;
Global.bulletableNum = 6;
Global.GIPanel.updateBulletUI(Global.bulletableNum);
Global.GIPanel.updateClipUI(Global.bulletPreNum);
}
}
}//package com.macrojoy.zgd.display
Section 15
//BasicLandMC (com.macrojoy.zgd.display.BasicLandMC)
package com.macrojoy.zgd.display {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.geom.*;
public class BasicLandMC extends BasicCreatureMC {
var _hited_FI:Array;
protected var _jAttack:Boolean;
protected var _inFire:uint;// = 0
var _f_earth_FI:Array;
protected var _jumpSpeedY:int;
protected var _jumpSpeedX:int;
protected var _walkSpeed:uint;
protected var _ropeable:Boolean;
var _j_pre_FI:Array;
var _rise_FI:Array;
var _fall_FI:Array;
protected var _sideFall:Boolean;
protected var _actionTimer:uint;
var _jump_FI:Array;
protected var _canStand:Boolean;
protected var _jumpSpeed:int;
protected var _canUp:Boolean;
public var _step:Sprite;
var _r_rise_FI:Array;
var _j_over_FI:Array;
protected var _jumpFromHorse:Boolean;
protected var _angle:Number;// = 100
protected var _runSpeed:uint;
protected var myVehicle:BasicNPCMC;
public function BasicLandMC(){
_angle = 100;
_inFire = 0;
_f_earth_FI = [[30, [["checkRise"]]], [80, [["mcEnd"]]]];
_fall_FI = [[15, [["checkFall"]]]];
_hited_FI = [[10, [["halveSpeed"]]], [20, [["standAction"]]]];
_r_rise_FI = [[12, [["nextAction", ["r_stand"]]]]];
_rise_FI = [[8, [["standAction"]]]];
_jump_FI = [[4, [["nextAction", ["j_up"]]]]];
_j_pre_FI = [[2, [["jumpAction"]]]];
_j_over_FI = [[2, [["standAction"]]]];
super();
}
function jumpAction():void{
_status = "jump";
toStopFrame("jump");
_speedX = _jumpSpeedX;
_speedY = _jumpSpeedY;
createSmokeEffect("JumpEffect");
}
protected function ropeNormalAction():void{
_status = "rope";
toStopFrame("s_rope");
}
protected function jAttackAction():void{
_status = "fall";
toStopFrame("j_attack");
}
function jumpPreAction():void{
_status = "stand";
toStopFrame("j_pre");
}
protected function checkRope():void{
var _local1:uint;
var _local2:Sprite;
if (((((((!((currentLabel == "fall"))) && (!((currentLabel == "f_down"))))) && (!((currentLabel == "f_earth"))))) && (!((currentLabel == "hited"))))){
_local1 = 0;
while (_local1 < Global.thingsCTN.numChildren) {
_local2 = (Global.thingsCTN.getChildAt(_local1) as Sprite);
if (_local2.name == "rope"){
if ((((_local2.x < myX)) && (((_local2.x + _local2.width) > myX)))){
if (myY < (_local2.y + 135)){
if ((myY + _speedY) >= (_local2.y + 135)){
_speedY = 0;
_speedX = 0;
myY = (_local2.y + 135);
ropeNormalAction();
};
};
};
};
_local1++;
};
};
}
protected function JumpAttack():void{
_jumpSpeedX = (4 * scaleX);
_jumpSpeedY = -20;
_jAttack = true;
}
protected function checkRoad(_arg1:int):void{
var _local2:Number;
var _local3:Number;
var _local4:Array;
var _local5:uint;
var _local6:String;
var _local7:Point;
var _local8:uint;
var _local9:BasicThingMC;
_canStand = false;
_step = null;
_local2 = myX;
_local3 = myY;
_local4 = [10, _arg1];
if (_local4[1] <= 10){
_local4 = [10];
};
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = Method.getColorStr(_local2, (_local3 + _local4[_local5]));
if ((((((_local6 == "ffffcc00")) || ((_local6 == "ffcc33cf")))) || ((_local6 == "ff33cc00")))){
_canStand = true;
if (_local6 == "ffcc33cf"){
space = "in";
} else {
space = "out";
};
return;
};
_local7 = parent.localToGlobal(new Point(_local2, _local3));
_local8 = 0;
while (_local8 < Global.thingsCTN.numChildren) {
_local9 = (Global.thingsCTN.getChildAt(_local8) as BasicThingMC);
if (((!((_local9 == null))) && (!((_local9 == this))))){
if (Math.abs((myX - _local9.myX)) <= ((width + _local9.width) / 2)){
if ((((_local9.myY > myY)) && ((_local9.myY < ((myY + _local9.hit.height) + _local4[_local5]))))){
if (((_local9.hit.hitTestPoint(_local7.x, (_local7.y + _local4[_local5]))) || ((((this is BasicThingMC)) && (((_local9.hit.hitTestPoint(((_local7.x - (hit.width / 2)) + 20), (_local7.y + _local4[_local5]))) || (_local9.hit.hitTestPoint(((_local7.x + (hit.width / 2)) - 20), (_local7.y + _local4[_local5]))))))))){
_canStand = true;
_step = _local9.hit;
space = _local9.space;
return;
};
};
};
};
_local8++;
};
_local5++;
};
}
protected function checkBullet():void{
}
override protected function checkBlock():void{
if (((!((_status == "side"))) && (!((this is BasicNPCMC))))){
checkStandBlock();
};
}
protected function firedHandler():void{
}
protected function goDownAction():void{
_status = "crouch";
toStopFrame("go_down");
hit.scaleY = 0.6;
}
protected function standHandler():void{
if (_step != null){
adjustYStep();
} else {
Method.adjustY(this);
};
}
protected function checkCeiling():void{
var _local1:String;
_canUp = true;
_local1 = Method.getColorStr(myX, ((myY - height) - 30));
if ((((_local1 == "ff0099ff")) || ((_local1 == "ffffcc00")))){
_canUp = false;
return;
};
_local1 = Method.getColorStr(myX, (myY - height));
if ((((_local1 == "ff0099ff")) || ((_local1 == "ffffcc00")))){
_canUp = false;
return;
};
}
protected function adjustYStep():void{
myY = (_step.parent.y - _step.height);
}
function dieStatus():void{
}
protected function runAction():void{
_status = "stand";
toStopFrame("run");
}
protected function attackAction():void{
}
protected function toStandHandler():void{
}
function checkFall():void{
if (_canStand){
_speedX = 0;
_speedY = 0;
toStopFrame("f_earth");
Method.playSound(Data.FALL, 5, 1, Global.soundVolume);
if (_hp <= 0){
_status = "die";
} else {
_status = "stand";
};
} else {
toStopFrame("f_down");
_status = "fall";
};
}
protected function clearWeapon():void{
}
protected function fallingHandler():void{
}
protected function checkAngle():int{
return (0);
}
protected function brinkHandler():void{
}
function halveSpeed():void{
_speedX = (_speedX / 2);
}
override protected function updatePlayEvt():void{
super.updatePlayEvt();
if (!_remove){
checkRemove();
};
}
protected function turnAction():void{
scaleX = (scaleX * -1);
}
protected function jumpOverAction():void{
_status = "stand";
toStopFrame("j_over");
}
protected function createBullet(_arg1:int, _arg2:int, _arg3:int, _arg4:String):BasicBulletMC{
var tempClass:Class;
var tX:Number;
var tY:Number;
var bullet:BasicBulletMC;
var pX = _arg1;
var pY = _arg2;
var pRotation = _arg3;
var tName = _arg4;
tempClass = Method.getClass1(tName);
tX = (myX + (pX * scaleX));
tY = (myY - pY);
bullet = (Method.createDisplayObj(tempClass, Global.effectCTN, -1, tX, tY) as BasicBulletMC);
var _local6 = bullet;
with (_local6) {
scaleX = this.scaleX;
rotation = (-(pRotation) * scaleX);
name = tName;
space = this.space;
if ((this is BasicHeroMC)){
targetCamp = 2;
} else {
targetCamp = 1;
};
speedXAdd = _speedX;
if ((this is MCEnemy15)){
speedXAdd = (speedXAdd + (Data.ENEMY_BULLET_SPEED * scaleX));
};
if ((this is BasicHeroMC)){
speedYAdd = _speedY;
};
init();
if ((((((this is MCEnemy13)) || ((this is MCEnemy16)))) || ((this is MCEnemy19)))){
myInit(false);
} else {
myInit();
};
};
return (bullet);
}
protected function checkeToSide():void{
}
protected function shootAction(_arg1:uint, _arg2:String=""):void{
toStopFrame(((_arg2 + "shoot") + _arg1.toString()));
}
protected function firedHandler2():void{
}
function shootAttack(_arg1:Array):void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:String;
var _local6:BasicBulletMC;
_local2 = _arg1[0];
_local3 = _arg1[1];
_local4 = _arg1[2];
_local5 = "Bullet";
if (((!((_myWeaponName == null))) && ((((currentLabel == "throw")) || ((currentLabel == "j_throw")))))){
_local5 = _myWeaponName;
if ((((((_local5 == "Detonator")) || ((_local5 == "Bottle")))) || ((_local5 == "Stick")))){
_local4 = 45;
};
clearWeapon();
} else {
if (_arg1[3] != null){
_local5 = _arg1[3];
};
};
if (((((((((!((_local5 == "Bullet"))) && (!((_local5 == "Arrow"))))) && (!((_local5 == "Knife"))))) && (!((_local5 == "Ax"))))) && (!((_local5 == "Card"))))){
_local4 = (_local4 + checkAngle());
if (_local4 > 45){
_local4 = (35 + Math.floor(((Math.random() * 3) * 10)));
} else {
if (_local4 < -45){
_local4 = (-35 - Math.floor(((Math.random() * 3) * 10)));
};
};
};
if (_angle != 100){
_local4 = _angle;
_angle = 100;
};
if (_local5 == "Bullet"){
createFireEffect(_local2, _local3, _local4);
};
_local6 = createBullet(_local2, _local3, _local4, _local5);
if (_arg1[5] != null){
_local6.speedX = (_local6.speedX + (_arg1[5] * scaleX));
};
if (_local5 == "Bullet"){
checkBullet();
};
if (_arg1[4] != null){
Method.createEffect(_arg1[4], (myX + (_local2 * scaleX)), ((myY - _local3) - 30));
};
}
protected function createSmokeEffect(_arg1:String):MovieClip{
var _local2:Class;
var _local3:MovieClip;
_local2 = Method.getClass1(_arg1);
_local3 = (Method.createDisplayObj(_local2, Global.roleCTN, -1, myX, myY) as MovieClip);
_local3.scaleX = scaleX;
return (_local3);
}
function fallStatus():void{
if (_speedY < 25){
_speedY = (_speedY + Data.GRIVATY);
} else {
_speedY = 25;
};
checkRoad(_speedY);
if (((_canStand) && (!(_sideFall)))){
_speedY = 0;
if (_step != null){
adjustYStep();
} else {
Method.adjustY(this);
Method.adjustY(this);
Method.adjustY(this);
};
createSmokeEffect("FallEffect");
_status = "stand";
toStandHandler();
} else {
fallingHandler();
};
if (!Global.isBonusMission){
checkeToSide();
};
}
protected function rideAction():void{
var _local1:Class;
var _local2:uint;
toStopFrame("ride");
_status = "ride";
space = "out";
_local1 = Method.getClass1("BasicNPCMC");
_local2 = parent.getChildIndex(this);
myVehicle = (Method.createDisplayObj(_local1, parent, _local2, myX, myY) as BasicNPCMC);
myVehicle.target = this;
myVehicle.init();
if ((this is BasicEnemyMC)){
Global.effectCTN.addChildAt(this, 0);
Global.effectCTN.addChildAt(myVehicle, 0);
};
myY = (myY - 92);
updateXY();
}
protected function walkAction():void{
_status = "stand";
toStopFrame("walk");
}
protected function outScreen():void{
}
protected function checkFire():void{
var _local1:Boolean;
var _local2:uint;
var _local3:MovieClip;
if ((_myTimer % 5) == 1){
if (_status == "stand"){
_local2 = 0;
while (_local2 < Global.thingsCTN.numChildren) {
_local3 = (Global.thingsCTN.getChildAt(_local2) as MovieClip);
if (_local3.name == "fire"){
if (Math.abs((myX - _local3.x)) < (width + _local3.width)){
if (Math.abs((myY - _local3.y)) < (height + _local3.height)){
if (_local3.hitTestObject(hit)){
_local1 = true;
firedHandler();
break;
};
};
};
};
_local2++;
};
};
if (_local1){
_inFire = 1;
} else {
if (_inFire == 1){
_inFire = 2;
} else {
_inFire = 0;
};
};
};
firedHandler2();
}
function standStatus():void{
var _local1:Boolean;
if (((((!((_speedX == 0))) && (((_myTimer % 3) == 1)))) || ((((_speedX == 0)) && (((_myTimer % 5) == 1)))))){
checkRoad(10);
_local1 = true;
if ((this is BasicThingMC)){
if (((((myX + width) >= (-(Global.mainBgCTN.x) + Data.STAGE_WIDTH))) || (((myX - width) <= -(Global.mainBgCTN.x))))){
_local1 = false;
};
};
if (_local1){
if (!_canStand){
brinkHandler();
} else {
standHandler();
};
};
};
}
protected function downAction():void{
_status = "fall";
toStopFrame("j_down");
}
protected function checkStandBlock():void{
var _local1:int;
var _local2:Number;
var _local3:Number;
var _local4:String;
var _local5:uint;
var _local6:int;
var _local7:int;
var _local8:uint;
var _local9:uint;
var _local10:Point;
var _local11:uint;
var _local12:BasicThingMC;
_block = false;
if (_speedX == 0){
_local1 = scaleX;
} else {
_local1 = Math.floor((Math.abs(_speedX) / _speedX));
};
_local5 = 20;
if ((((_status == "stand")) || ((_status == "crouch")))){
_local6 = 20;
} else {
_local6 = 0;
};
_local7 = _local6;
_local8 = (Math.floor((height - (10 / _local5))) + 1);
_local9 = 0;
while (_local9 < _local8) {
if (_local7 > (height - 10)){
_local7 = (height - 10);
};
if ((((_local6 == 20)) && ((_local7 == 20)))){
_local2 = (myX + (20 * _local1));
} else {
if (hit != null){
_local2 = ((myX + ((hit.width / 2) * _local1)) + _speedX);
} else {
_local2 = ((myX + ((width / 2) * _local1)) + _speedX);
};
};
_local3 = (myY - _local7);
_local4 = Method.getColorStr(_local2, _local3);
if (((((((((!((_local4 == "0"))) && (!((_local4 == "ffffffff"))))) && (!((_local4 == "ffff0000"))))) && (!((_local4 == "ff33cc00"))))) && (!((_local4 == "ff0099ff"))))){
_block = true;
return;
};
_local10 = parent.localToGlobal(new Point(_local2, _local3));
if ((((_local9 == 0)) || ((_local9 == (_local8 - 1))))){
_local11 = 0;
while (_local11 < Global.thingsCTN.numChildren) {
_local12 = (Global.thingsCTN.getChildAt(_local11) as BasicThingMC);
if (((!((_local12 == null))) && (!((_local12 == this))))){
if (Math.abs((myX - _local12.myX)) <= ((width + _local12.width) / 2)){
if (Math.abs((myY - _local12.myY)) <= Math.max(height, _local12.height)){
if (_local12.hit.hitTestPoint(_local10.x, _local10.y)){
if (Math.abs((myX - _local12.x)) > (_local12.hit.width / 2)){
_block = true;
return;
};
};
};
};
};
_local11++;
};
};
_local7 = (_local7 + _local5);
_local9++;
};
}
protected function createFireEffect(_arg1:int, _arg2:int, _arg3:int):MovieClip{
var tempClass:Class;
var tX:Number;
var tY:Number;
var fireEffect:MovieClip;
var pX = _arg1;
var pY = _arg2;
var pRotation = _arg3;
tempClass = Method.getClass1("FireEffect");
tX = (myX + (pX * scaleX));
tY = (myY - pY);
fireEffect = (Method.createDisplayObj(tempClass, Global.effectCTN, -1, tX, tY) as MovieClip);
var _local5 = fireEffect;
with (_local5) {
scaleX = this.scaleX;
rotation = (-(pRotation) * scaleX);
};
return (fireEffect);
}
function standAction():void{
_speedX = 0;
_speedY = 0;
_status = "stand";
if ((((((currentLabel == "hited")) || ((currentLabel == "dizzy")))) || (Global.isBonusMission))){
_actionTimer = 15;
} else {
_actionTimer = 0;
};
toStopFrame("stand");
hit.scaleY = 1;
_attacking = false;
}
protected function checkRemove():void{
_gPoint = parent.localToGlobal(new Point(myX, myY));
if ((((((_gPoint.x < -(Data.STAGE_WIDTH))) || ((_gPoint.x > (Data.STAGE_WIDTH * 2))))) || ((_gPoint.y > (Data.STAGE_HEIGHT + height))))){
outScreen();
};
}
protected function ropeAction():void{
_status = "rope";
toStopFrame("c_rope");
}
function jumpStatus():void{
_speedY = (_speedY + Data.GRIVATY);
if (_speedY < 0){
checkCeiling();
if (((!(_canUp)) && (!(_jumpFromHorse)))){
_speedY = 0;
if (currentLabel == "fall"){
_status = "fall";
} else {
downAction();
};
};
} else {
_jumpFromHorse = false;
if (currentLabel == "j_up"){
if (_jAttack){
jAttackAction();
_status = "fall";
} else {
downAction();
};
} else {
_status = "fall";
};
fallStatus();
};
}
function checkRise():void{
if (_hp > 0){
toStopFrame("rise");
} else {
_status = "die";
_mcReady = true;
};
}
}
}//package com.macrojoy.zgd.display
Section 16
//BasicMoveableObjectMC (com.macrojoy.zgd.display.BasicMoveableObjectMC)
package com.macrojoy.zgd.display {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.geom.*;
public class BasicMoveableObjectMC extends MovieClip implements IEnterframeObject {
public var space:String;
protected var _speedX:Number;// = 0
protected var _speedY:Number;// = 0
public var myX:Number;// = 0
public var myY:Number;// = 0
protected var _status:String;
protected var _mcCurrentFrame:uint;
protected var _stillEndEvt:Array;
protected var _mcEnd:Boolean;
protected var _myPause:uint;
protected var _mcReady:Boolean;// = true
protected var _mcFrameEvent:Array;
protected var _block:Boolean;
protected var _gPoint:Point;
public var hit:MovieClip;
public var mc:MovieClip;
protected var _myTimer:uint;
protected var _remove:Boolean;
public function BasicMoveableObjectMC(){
_mcReady = true;
myX = 0;
myY = 0;
_speedX = 0;
_speedY = 0;
super();
stop();
}
public function get speedY():Number{
return (_speedY);
}
protected function updatePlayEvt():void{
_myTimer++;
if (mc != null){
mc.play();
};
statusHandler();
mcFrameEventHandler();
moveXHandler();
moveYHandler();
updateXY();
}
function shakeScreen(_arg1:Array):void{
Global.shakeTimer = 10;
Global.shakeDis = _arg1[0];
}
protected function statusHandler():void{
if (_status != null){
try {
var _local2 = this;
_local2[(_status + "Status")]();
} catch(err:Error) {
};
};
}
protected function checkReborn():void{
}
public function set speedY(_arg1:Number):void{
_speedY = _arg1;
}
public function init():void{
myX = x;
myY = y;
Method.addEnterframeObj(this);
}
protected function mcFrameEventHandler():void{
var _local1:uint;
var _local2:Boolean;
var _local3:Boolean;
var _local4:Array;
var _local5:uint;
if (_mcFrameEvent != null){
_local1 = 0;
while (_local1 < _mcFrameEvent.length) {
_local2 = false;
_local3 = false;
if ((_mcFrameEvent[_local1][0] is Array)){
if ((((_mcFrameEvent[_local1][0][0] <= _mcCurrentFrame)) && ((_mcFrameEvent[_local1][0][1] >= _mcCurrentFrame)))){
_local2 = true;
};
} else {
if (_mcFrameEvent[_local1][0] == _mcCurrentFrame){
_local3 = true;
};
};
if (((_local2) || (_local3))){
_local4 = _mcFrameEvent[_local1][1];
_local5 = 0;
while (_local5 < _local4.length) {
if (_local4[_local5][1] == null){
var _local6 = this;
_local6[_local4[_local5][0]]();
} else {
_local6 = this;
_local6[_local4[_local5][0]](_local4[_local5][1]);
};
_local5++;
};
break;
};
_local1++;
};
};
_mcCurrentFrame++;
}
public function updateEvent():void{
if (!Global.gamePause){
if (!_myPause){
updatePlayEvt();
} else {
stillHandler();
};
if (_remove){
removeSelf();
checkReborn();
};
} else {
if (mc != null){
mc.stop();
};
};
}
protected function moveYHandler():void{
myY = (myY + _speedY);
}
public function set status(_arg1:String):void{
_status = _arg1;
}
protected function updateXY():void{
x = Math.round(myX);
y = Math.round(myY);
}
protected function stillHandler():void{
_myPause--;
if (_myPause == 0){
if (_stillEndEvt != null){
if (_stillEndEvt[1] == null){
var _local1 = this;
_local1[_stillEndEvt[0]]();
} else {
_local1 = this;
_local1[_stillEndEvt[0]](_stillEndEvt[1]);
};
_stillEndEvt = null;
};
};
if (_status == "fall"){
myX = (myX + (Math.pow(-1, _myPause) * 2));
};
if (mc != null){
if (_myPause > 0){
mc.stop();
} else {
mc.play();
};
};
}
protected function toStopFrame(_arg1:String):void{
var targetFrame = _arg1;
if (currentLabel != targetFrame){
gotoAndStop(targetFrame);
} else {
if (mc != null){
mc.gotoAndPlay(1);
};
};
_mcCurrentFrame = 1;
try {
_mcFrameEvent = this[(("_" + targetFrame) + "_FI")];
} catch(err:Error) {
_mcFrameEvent = null;
};
if (_mcFrameEvent != null){
_mcReady = false;
_mcEnd = false;
} else {
_mcReady = true;
_mcEnd = true;
};
}
protected function checkBlock():void{
}
protected function moveXHandler():void{
if (_speedX != 0){
checkBlock();
if (((!(_block)) && (checkMoveable()))){
myX = (myX + _speedX);
};
} else {
_block = false;
};
}
protected function checkMoveable():Boolean{
return (true);
}
public function set speedX(_arg1:Number):void{
_speedX = _arg1;
}
public function toStill(_arg1:uint):void{
_myPause = _arg1;
}
public function get speedX():Number{
return (_speedX);
}
public function get status():String{
return (_status);
}
public function removeSelf():void{
Method.removeEnterframeObj(this);
parent.removeChild(this);
}
}
}//package com.macrojoy.zgd.display
Section 17
//BasicNPCMC (com.macrojoy.zgd.display.BasicNPCMC)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class BasicNPCMC extends BasicLandMC {
private var _target:BasicCreatureMC;
private var _waverInfo:Array;
public function BasicNPCMC(){
_waverInfo = [[0, 92], [-2, 97], [0, 98], [3, 100], [5, 98], [2, 97], [0, 93]];
super();
_speedX = 4;
Global.horseNum++;
if (Global.horseNum == 1){
Method.playSound(Data.HORSE_RUN, 4, int.MAX_VALUE, Global.soundVolume, 0);
};
}
function adjustTarget():void{
var _local1:Array;
if (_target != null){
_local1 = _waverInfo[Math.floor(((mc.currentFrame - 1) / 2))];
_target.myX = (myX + _local1[0]);
_target.myY = (myY - _local1[1]);
};
}
override protected function updatePlayEvt():void{
super.updatePlayEvt();
adjustTarget();
}
public function set target(_arg1:BasicCreatureMC):void{
_target = _arg1;
}
override protected function outScreen():void{
_remove = true;
}
override public function removeSelf():void{
super.removeSelf();
Global.horseNum--;
if (Global.horseNum == 0){
Method.playSound(null, 4, 0, 0, 0);
};
}
}
}//package com.macrojoy.zgd.display
Section 18
//BasicPresentMC (com.macrojoy.zgd.display.BasicPresentMC)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class BasicPresentMC extends BasicLandMC {
public var bonusCount:Boolean;
private var _timer:uint;
protected var _rotDir:int;
private var _rotate:Boolean;
override protected function standHandler():void{
}
public function toflash():void{
_timer = 210;
}
override protected function toStandHandler():void{
_speedX = 0;
rotation = 0;
}
override protected function brinkHandler():void{
_status = "fall";
}
protected function checkEffect():void{
}
override protected function updatePlayEvt():void{
super.updatePlayEvt();
_timer++;
if ((((((alpha >= 1)) && (!((name == "Weapon"))))) && (Global.hero.hit.hitTestObject(this)))){
_remove = true;
Method.createEffect("POut", myX, myY);
checkEffect();
} else {
if (_timer >= 280){
_remove = true;
} else {
if (_timer >= 210){
alpha = ((alpha)==1) ? 0.5 : 1;
} else {
if (alpha < 1){
alpha = (alpha + 0.1);
};
};
};
};
}
override public function init():void{
super.init();
_rotDir = (Math.abs(_speedX) / _speedX);
}
override protected function outScreen():void{
_remove = true;
}
}
}//package com.macrojoy.zgd.display
Section 19
//BasicThingMC (com.macrojoy.zgd.display.BasicThingMC)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class BasicThingMC extends BasicLandMC {
protected var _chipName:String;
protected var _givePresent:Boolean;// = true
var _break_FI:Array;
public function BasicThingMC(){
_break_FI = [[3, [["remove"]]]];
_givePresent = true;
super();
_status = "stand";
type = "thing";
}
protected function autoAI():void{
if (_speedX != 0){
checkHitRole();
};
if (_status == "stand"){
if (_block){
if (currentLabel == "roll"){
_givePresent = false;
toStopFrame("break");
};
};
};
}
function remove():void{
_remove = true;
if (_givePresent){
if (Global.isBonusMission){
Method.createPresent(x, y, 0, 0, 1);
} else {
Method.createPresent(x, y, 0.33, 0.5, 1);
};
};
createChip(_chipName);
Method.playSound(Data.CHEST_BREAK, 7, 1, Global.soundVolume);
shakeScreen([3]);
}
protected function checkHitRole():void{
var _local1:Array;
var _local2:Array;
var _local3:BasicCreatureMC;
var _local4:int;
_local1 = [];
_local1.push(Global.camp1Arr);
_local1.push(Global.camp2Arr);
for each (_local2 in _local1) {
_local4 = Math.floor((Math.abs(_speedX) / _speedX));
for each (_local3 in _local2) {
if (Math.abs((myX - _local3.myX)) > (hit.width / 2)){
if ((_local3.myX * _local4) > (myX * _local4)){
if (Math.abs((_local3.myY - myY)) < 5){
if (_local3.getHp() > 0){
if (((((((!((_local3.currentLabel == "fall"))) && (!((_local3.currentLabel == "f_down"))))) && (!((_local3.currentLabel == "f_earth"))))) && (!((_local3.currentLabel == "hited"))))){
if (hit.hitTestObject(_local3.hit)){
_local3.hited("hited", 10, _local4, Math.abs(_speedX));
Method.createEffect("BlamMC", _local3.myX, ((myY - hit.height) - 30));
Method.playSound(Data.KICK, 7, 1, Global.soundVolume);
Method.createEffect("HitEffect", _local3.myX, (myY - hit.height));
};
};
};
};
};
};
};
};
}
override protected function toStandHandler():void{
if (currentLabel != "roll"){
_speedX = 0;
};
}
override protected function brinkHandler():void{
_status = "fall";
}
override protected function updatePlayEvt():void{
super.updatePlayEvt();
autoAI();
}
protected function createChip(_arg1:String):void{
var _local2:Class;
var _local3:BasicChipMC;
var _local4:BasicChipMC;
_local2 = Method.getClass1((_arg1 + "DownMC"));
_local3 = (Method.createDisplayObj(_local2, Global.thingsCTN, -1, myX, myY) as BasicChipMC);
_local3.status = "jump";
_local3.speedX = _speedX;
_local3.speedY = -20;
_local3.init();
_local2 = Method.getClass1((_arg1 + "UpMC"));
_local4 = (Method.createDisplayObj(_local2, Global.thingsCTN, -1, myX, (_local3.myY - _local3.height)) as BasicChipMC);
_local4.status = "jump";
_local4.speedX = _speedX;
_local4.speedY = -20;
_local4.init();
}
}
}//package com.macrojoy.zgd.display
Section 20
//BlamMC (com.macrojoy.zgd.display.BlamMC)
package com.macrojoy.zgd.display {
public class BlamMC extends EffectMC {
}
}//package com.macrojoy.zgd.display
Section 21
//BlastEffect (com.macrojoy.zgd.display.BlastEffect)
package com.macrojoy.zgd.display {
public class BlastEffect extends DetonatorMC {
}
}//package com.macrojoy.zgd.display
Section 22
//BloodEffect (com.macrojoy.zgd.display.BloodEffect)
package com.macrojoy.zgd.display {
public class BloodEffect extends EffectMC {
}
}//package com.macrojoy.zgd.display
Section 23
//BoomMC (com.macrojoy.zgd.display.BoomMC)
package com.macrojoy.zgd.display {
public class BoomMC extends EffectMC {
}
}//package com.macrojoy.zgd.display
Section 24
//BossHpMC (com.macrojoy.zgd.display.BossHpMC)
package com.macrojoy.zgd.display {
import flash.display.*;
public class BossHpMC extends MovieClip {
public var hpBar:MovieClip;
}
}//package com.macrojoy.zgd.display
Section 25
//Bottle (com.macrojoy.zgd.display.Bottle)
package com.macrojoy.zgd.display {
public class Bottle extends BasicBulletMC {
}
}//package com.macrojoy.zgd.display
Section 26
//Bottle_Hand (com.macrojoy.zgd.display.Bottle_Hand)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Bottle_Hand extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 27
//BottleUp (com.macrojoy.zgd.display.BottleUp)
package com.macrojoy.zgd.display {
public class BottleUp extends BasicBulletMC {
}
}//package com.macrojoy.zgd.display
Section 28
//BottleUp_Hand (com.macrojoy.zgd.display.BottleUp_Hand)
package com.macrojoy.zgd.display {
import flash.display.*;
public class BottleUp_Hand extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 29
//Bullet (com.macrojoy.zgd.display.Bullet)
package com.macrojoy.zgd.display {
public class Bullet extends BasicBulletMC {
}
}//package com.macrojoy.zgd.display
Section 30
//BumpMC (com.macrojoy.zgd.display.BumpMC)
package com.macrojoy.zgd.display {
public class BumpMC extends EffectMC {
}
}//package com.macrojoy.zgd.display
Section 31
//Card (com.macrojoy.zgd.display.Card)
package com.macrojoy.zgd.display {
public class Card extends BasicBulletMC {
}
}//package com.macrojoy.zgd.display
Section 32
//Carriage1 (com.macrojoy.zgd.display.Carriage1)
package com.macrojoy.zgd.display {
public class Carriage1 extends BasicCarriage {
}
}//package com.macrojoy.zgd.display
Section 33
//Carriage10 (com.macrojoy.zgd.display.Carriage10)
package com.macrojoy.zgd.display {
public class Carriage10 extends BasicCarriage {
}
}//package com.macrojoy.zgd.display
Section 34
//Carriage10MC (com.macrojoy.zgd.display.Carriage10MC)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Carriage10MC extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 35
//Carriage11 (com.macrojoy.zgd.display.Carriage11)
package com.macrojoy.zgd.display {
public class Carriage11 extends BasicCarriage {
}
}//package com.macrojoy.zgd.display
Section 36
//Carriage11MC (com.macrojoy.zgd.display.Carriage11MC)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Carriage11MC extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 37
//Carriage12 (com.macrojoy.zgd.display.Carriage12)
package com.macrojoy.zgd.display {
public class Carriage12 extends BasicCarriage {
}
}//package com.macrojoy.zgd.display
Section 38
//Carriage12MC (com.macrojoy.zgd.display.Carriage12MC)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Carriage12MC extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 39
//Carriage13 (com.macrojoy.zgd.display.Carriage13)
package com.macrojoy.zgd.display {
public class Carriage13 extends BasicCarriage {
}
}//package com.macrojoy.zgd.display
Section 40
//Carriage13MC (com.macrojoy.zgd.display.Carriage13MC)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Carriage13MC extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 41
//Carriage14 (com.macrojoy.zgd.display.Carriage14)
package com.macrojoy.zgd.display {
public class Carriage14 extends BasicCarriage {
}
}//package com.macrojoy.zgd.display
Section 42
//Carriage14MC (com.macrojoy.zgd.display.Carriage14MC)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Carriage14MC extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 43
//Carriage15 (com.macrojoy.zgd.display.Carriage15)
package com.macrojoy.zgd.display {
public class Carriage15 extends BasicCarriage {
}
}//package com.macrojoy.zgd.display
Section 44
//Carriage15MC (com.macrojoy.zgd.display.Carriage15MC)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Carriage15MC extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 45
//Carriage1MC (com.macrojoy.zgd.display.Carriage1MC)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Carriage1MC extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 46
//Carriage2 (com.macrojoy.zgd.display.Carriage2)
package com.macrojoy.zgd.display {
public class Carriage2 extends BasicCarriage {
}
}//package com.macrojoy.zgd.display
Section 47
//Carriage2MC (com.macrojoy.zgd.display.Carriage2MC)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Carriage2MC extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 48
//Carriage3 (com.macrojoy.zgd.display.Carriage3)
package com.macrojoy.zgd.display {
public class Carriage3 extends BasicCarriage {
}
}//package com.macrojoy.zgd.display
Section 49
//Carriage3MC (com.macrojoy.zgd.display.Carriage3MC)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Carriage3MC extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 50
//Carriage4 (com.macrojoy.zgd.display.Carriage4)
package com.macrojoy.zgd.display {
public class Carriage4 extends BasicCarriage {
}
}//package com.macrojoy.zgd.display
Section 51
//Carriage4MC (com.macrojoy.zgd.display.Carriage4MC)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Carriage4MC extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 52
//Carriage5 (com.macrojoy.zgd.display.Carriage5)
package com.macrojoy.zgd.display {
public class Carriage5 extends BasicCarriage {
}
}//package com.macrojoy.zgd.display
Section 53
//Carriage5MC (com.macrojoy.zgd.display.Carriage5MC)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Carriage5MC extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 54
//Carriage6 (com.macrojoy.zgd.display.Carriage6)
package com.macrojoy.zgd.display {
public class Carriage6 extends BasicCarriage {
}
}//package com.macrojoy.zgd.display
Section 55
//Carriage6MC (com.macrojoy.zgd.display.Carriage6MC)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Carriage6MC extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 56
//Carriage7 (com.macrojoy.zgd.display.Carriage7)
package com.macrojoy.zgd.display {
public class Carriage7 extends BasicCarriage {
}
}//package com.macrojoy.zgd.display
Section 57
//Carriage7MC (com.macrojoy.zgd.display.Carriage7MC)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Carriage7MC extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 58
//Carriage8 (com.macrojoy.zgd.display.Carriage8)
package com.macrojoy.zgd.display {
public class Carriage8 extends BasicCarriage {
}
}//package com.macrojoy.zgd.display
Section 59
//Carriage8MC (com.macrojoy.zgd.display.Carriage8MC)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Carriage8MC extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 60
//Carriage9 (com.macrojoy.zgd.display.Carriage9)
package com.macrojoy.zgd.display {
public class Carriage9 extends BasicCarriage {
}
}//package com.macrojoy.zgd.display
Section 61
//Carriage9MC (com.macrojoy.zgd.display.Carriage9MC)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Carriage9MC extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 62
//Cask (com.macrojoy.zgd.display.Cask)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class Cask extends BasicThingMC {
public function Cask(){
if (Global.isBonusMission){
_hp = 1;
} else {
_hp = 3;
};
_chipName = "Cask";
}
override public function hited(_arg1:String, _arg2:uint, _arg3:int, _arg4:uint):void{
_hp = (_hp - _arg2);
if (_hp < 0){
_hp = 0;
};
if (_hp == 1){
if (currentLabel != "roll"){
Method.deleteElement(Global.loadedThings, this);
toStopFrame("roll");
hit.scaleY = 0.6;
};
_speedX = (10 * _arg3);
} else {
if (_hp <= 0){
if (currentLabel != "break"){
Method.deleteElement(Global.loadedThings, this);
toStopFrame("break");
if (Global.isBonusMission){
Method.addScore(1000);
Method.showScore(myX, (myY - 150), 1000);
Method.playSound(Data.SCORE, 7, 1, Global.soundVolume);
Global.enemyNum++;
Global.GIPanel.updateEnemyCount();
};
};
_speedX = (_arg4 * _arg3);
} else {
toStopFrame("hited");
_speedX = (_arg4 * _arg3);
};
};
}
public function bonusCask(_arg1:int):void{
toStopFrame("roll");
hit.scaleY = 0.6;
_speedX = (5 * _arg1);
}
}
}//package com.macrojoy.zgd.display
Section 63
//CaskDownMC (com.macrojoy.zgd.display.CaskDownMC)
package com.macrojoy.zgd.display {
public class CaskDownMC extends BasicChipMC {
}
}//package com.macrojoy.zgd.display
Section 64
//CaskUpMC (com.macrojoy.zgd.display.CaskUpMC)
package com.macrojoy.zgd.display {
public class CaskUpMC extends BasicChipMC {
}
}//package com.macrojoy.zgd.display
Section 65
//Chest (com.macrojoy.zgd.display.Chest)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class Chest extends BasicThingMC {
public function Chest(){
if (Global.isBonusMission){
_hp = Math.floor(((Math.random() * 2) + 2));
} else {
_hp = 3;
};
_chipName = "Chest";
}
override public function hited(_arg1:String, _arg2:uint, _arg3:int, _arg4:uint):void{
_hp = (_hp - _arg2);
if (_hp < 0){
_hp = 0;
};
_speedX = (_arg4 * _arg3);
if (_hp <= 0){
if (currentLabel != "break"){
Method.deleteElement(Global.loadedThings, this);
toStopFrame("break");
if (Global.isBonusMission){
Method.addScore(1000);
Method.showScore(myX, (myY - 150), 1000);
Method.playSound(Data.SCORE, 7, 1, Global.soundVolume);
Global.enemyNum++;
Global.GIPanel.updateEnemyCount();
};
};
} else {
toStopFrame("hited");
};
}
override protected function checkMoveable():Boolean{
if (((((_gPoint.x + _speedX) <= 20)) || (((_gPoint.x + _speedX) >= (Data.STAGE_WIDTH - 20))))){
return (false);
};
return (true);
}
}
}//package com.macrojoy.zgd.display
Section 66
//ChestDownMC (com.macrojoy.zgd.display.ChestDownMC)
package com.macrojoy.zgd.display {
public class ChestDownMC extends BasicChipMC {
}
}//package com.macrojoy.zgd.display
Section 67
//ChestUpMC (com.macrojoy.zgd.display.ChestUpMC)
package com.macrojoy.zgd.display {
public class ChestUpMC extends BasicChipMC {
}
}//package com.macrojoy.zgd.display
Section 68
//Clew (com.macrojoy.zgd.display.Clew)
package com.macrojoy.zgd.display {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.text.*;
public class Clew extends Sprite implements IEnterframeObject {
private var _timer:uint;
private var _totalTime:uint;
public function Clew(_arg1:String, _arg2:uint=125){
var _local3:TextField;
var _local4:TextFormat;
super();
_totalTime = _arg2;
_local3 = new TextField();
_local3.selectable = false;
_local3.autoSize = TextFieldAutoSize.CENTER;
_local3.multiline = true;
_local3.background = true;
_local3.backgroundColor = 0xFFFFFF;
_local3.border = true;
_local3.borderColor = 0xFF0000;
_local3.htmlText = (("<font color='#FF0000'>" + _arg1) + "</font>");
_local4 = new TextFormat();
_local4.size = 12;
_local4.font = "Arial CE";
_local4.align = "center";
_local3.setTextFormat(_local4);
addChild(_local3);
_local3.x = (-(_local3.width) / 2);
Method.addEnterframeObj(this);
}
public function updateEvent():void{
_timer++;
if (_timer > _totalTime){
removeSelf();
};
}
public function removeSelf():void{
Method.removeEnterframeObj(this);
parent.removeChild(this);
}
}
}//package com.macrojoy.zgd.display
Section 69
//CostUI (com.macrojoy.zgd.display.CostUI)
package com.macrojoy.zgd.display {
import flash.display.*;
public class CostUI extends EffectMC {
public var num1:MovieClip;
public var num3:MovieClip;
public var num4:MovieClip;
public var num5:MovieClip;
public var num2:MovieClip;
}
}//package com.macrojoy.zgd.display
Section 70
//Dart (com.macrojoy.zgd.display.Dart)
package com.macrojoy.zgd.display {
public class Dart extends BasicBulletMC {
}
}//package com.macrojoy.zgd.display
Section 71
//Dart_Hand (com.macrojoy.zgd.display.Dart_Hand)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Dart_Hand extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 72
//DartIn (com.macrojoy.zgd.display.DartIn)
package com.macrojoy.zgd.display {
public class DartIn extends WeaponInMC {
}
}//package com.macrojoy.zgd.display
Section 73
//Detonator (com.macrojoy.zgd.display.Detonator)
package com.macrojoy.zgd.display {
public class Detonator extends BasicBulletMC {
}
}//package com.macrojoy.zgd.display
Section 74
//Detonator_Hand (com.macrojoy.zgd.display.Detonator_Hand)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Detonator_Hand extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 75
//DetonatorMC (com.macrojoy.zgd.display.DetonatorMC)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class DetonatorMC extends EffectMC {
public var power:uint;
public function DetonatorMC(){
addFrameScript(2, checkHitRole);
}
protected function checkHitRole():void{
var _local1:Array;
var _local2:Array;
var _local3:BasicCreatureMC;
var _local4:int;
_local1 = [];
_local1.push(Global.camp1Arr);
_local1.push(Global.camp2Arr);
for each (_local2 in _local1) {
for each (_local3 in _local2) {
if (hitTestObject(_local3.hit)){
if (_local3.getHp() > 0){
if (((((!((_local3.currentLabel == "fall"))) && (!((_local3.currentLabel == "f_down"))))) && (!((_local3.currentLabel == "f_earth"))))){
_local4 = (Math.floor((Math.random() * 2))) ? -1 : 1;
if (Global.hero == _local3){
_local3.hited("fall", Data.DETONATOR_TO_HERO, _local4, 15);
} else {
_local3.hited("fall", power, _local4, 15);
};
};
};
};
};
};
}
}
}//package com.macrojoy.zgd.display
Section 76
//Earth (com.macrojoy.zgd.display.Earth)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Earth extends Sprite {
}
}//package com.macrojoy.zgd.display
Section 77
//EffectMC (com.macrojoy.zgd.display.EffectMC)
package com.macrojoy.zgd.display {
import flash.display.*;
public class EffectMC extends MovieClip {
public function EffectMC(){
addFrameScript((totalFrames - 1), removeSelf);
}
private function removeSelf():void{
stop();
if (parent != null){
parent.removeChild(this);
};
}
}
}//package com.macrojoy.zgd.display
Section 78
//enemyMC_1 (com.macrojoy.zgd.display.enemyMC_1)
package com.macrojoy.zgd.display {
import flash.display.*;
public class enemyMC_1 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 79
//enemyMC_10 (com.macrojoy.zgd.display.enemyMC_10)
package com.macrojoy.zgd.display {
import flash.display.*;
public class enemyMC_10 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 80
//enemyMC_11 (com.macrojoy.zgd.display.enemyMC_11)
package com.macrojoy.zgd.display {
import flash.display.*;
public class enemyMC_11 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 81
//enemyMC_13 (com.macrojoy.zgd.display.enemyMC_13)
package com.macrojoy.zgd.display {
import flash.display.*;
public class enemyMC_13 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 82
//enemyMC_14 (com.macrojoy.zgd.display.enemyMC_14)
package com.macrojoy.zgd.display {
import flash.display.*;
public class enemyMC_14 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 83
//enemyMC_15 (com.macrojoy.zgd.display.enemyMC_15)
package com.macrojoy.zgd.display {
import flash.display.*;
public class enemyMC_15 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 84
//enemyMC_16 (com.macrojoy.zgd.display.enemyMC_16)
package com.macrojoy.zgd.display {
import flash.display.*;
public class enemyMC_16 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 85
//enemyMC_17 (com.macrojoy.zgd.display.enemyMC_17)
package com.macrojoy.zgd.display {
import flash.display.*;
public class enemyMC_17 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 86
//enemyMC_18 (com.macrojoy.zgd.display.enemyMC_18)
package com.macrojoy.zgd.display {
import flash.display.*;
public class enemyMC_18 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 87
//enemyMC_19 (com.macrojoy.zgd.display.enemyMC_19)
package com.macrojoy.zgd.display {
import flash.display.*;
public class enemyMC_19 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 88
//enemyMC_2 (com.macrojoy.zgd.display.enemyMC_2)
package com.macrojoy.zgd.display {
import flash.display.*;
public class enemyMC_2 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 89
//enemyMC_3 (com.macrojoy.zgd.display.enemyMC_3)
package com.macrojoy.zgd.display {
import flash.display.*;
public class enemyMC_3 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 90
//enemyMC_4 (com.macrojoy.zgd.display.enemyMC_4)
package com.macrojoy.zgd.display {
import flash.display.*;
public class enemyMC_4 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 91
//enemyMC_5 (com.macrojoy.zgd.display.enemyMC_5)
package com.macrojoy.zgd.display {
import flash.display.*;
public class enemyMC_5 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 92
//enemyMC_6 (com.macrojoy.zgd.display.enemyMC_6)
package com.macrojoy.zgd.display {
import flash.display.*;
public class enemyMC_6 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 93
//enemyMC_7 (com.macrojoy.zgd.display.enemyMC_7)
package com.macrojoy.zgd.display {
import flash.display.*;
public class enemyMC_7 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 94
//enemyMC_8 (com.macrojoy.zgd.display.enemyMC_8)
package com.macrojoy.zgd.display {
import flash.display.*;
public class enemyMC_8 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 95
//enemyMC_9 (com.macrojoy.zgd.display.enemyMC_9)
package com.macrojoy.zgd.display {
import flash.display.*;
public class enemyMC_9 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 96
//FallEffect (com.macrojoy.zgd.display.FallEffect)
package com.macrojoy.zgd.display {
public class FallEffect extends EffectMC {
}
}//package com.macrojoy.zgd.display
Section 97
//FallWeapon (com.macrojoy.zgd.display.FallWeapon)
package com.macrojoy.zgd.display {
public class FallWeapon extends WeaponMC {
}
}//package com.macrojoy.zgd.display
Section 98
//Fire1 (com.macrojoy.zgd.display.Fire1)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Fire1 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 99
//Fire2 (com.macrojoy.zgd.display.Fire2)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Fire2 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 100
//Fire3 (com.macrojoy.zgd.display.Fire3)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Fire3 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 101
//FiredMC (com.macrojoy.zgd.display.FiredMC)
package com.macrojoy.zgd.display {
public class FiredMC extends EffectMC {
}
}//package com.macrojoy.zgd.display
Section 102
//FireEffect (com.macrojoy.zgd.display.FireEffect)
package com.macrojoy.zgd.display {
public class FireEffect extends EffectMC {
}
}//package com.macrojoy.zgd.display
Section 103
//GFire1 (com.macrojoy.zgd.display.GFire1)
package com.macrojoy.zgd.display {
public class GFire1 extends GrassFire {
}
}//package com.macrojoy.zgd.display
Section 104
//GFire2 (com.macrojoy.zgd.display.GFire2)
package com.macrojoy.zgd.display {
public class GFire2 extends GrassFire {
}
}//package com.macrojoy.zgd.display
Section 105
//GFire3 (com.macrojoy.zgd.display.GFire3)
package com.macrojoy.zgd.display {
public class GFire3 extends GrassFire {
}
}//package com.macrojoy.zgd.display
Section 106
//Grass1 (com.macrojoy.zgd.display.Grass1)
package com.macrojoy.zgd.display {
public class Grass1 extends GrassMC {
}
}//package com.macrojoy.zgd.display
Section 107
//Grass2 (com.macrojoy.zgd.display.Grass2)
package com.macrojoy.zgd.display {
public class Grass2 extends GrassMC {
}
}//package com.macrojoy.zgd.display
Section 108
//Grass3 (com.macrojoy.zgd.display.Grass3)
package com.macrojoy.zgd.display {
public class Grass3 extends GrassMC {
}
}//package com.macrojoy.zgd.display
Section 109
//GrassFire (com.macrojoy.zgd.display.GrassFire)
package com.macrojoy.zgd.display {
import flash.display.*;
public class GrassFire extends MovieClip {
public var hit:Sprite;
public function GrassFire(){
addFrameScript((totalFrames - 1), lastFrameScript);
}
private function lastFrameScript():void{
stop();
}
}
}//package com.macrojoy.zgd.display
Section 110
//GrassMC (com.macrojoy.zgd.display.GrassMC)
package com.macrojoy.zgd.display {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.utils.*;
public class GrassMC extends BasicThingMC {
override public function init():void{
super.init();
}
public function toFire():void{
var _local1:String;
var _local2:String;
var _local3:Class;
var _local4:MovieClip;
Method.deleteElement(Global.loadedThings, this);
_local1 = getQualifiedClassName(this).replace("com.macrojoy.zgd.display::", "");
_local2 = _local1.charAt((_local1.length - 1));
_local3 = Method.getClass1(("GFire" + _local2));
_local4 = (Method.createDisplayObj(_local3, parent, 0, myX, myY) as MovieClip);
_local4.name = "fire";
Global.loadedThings.push(_local4);
_remove = true;
}
}
}//package com.macrojoy.zgd.display
Section 111
//Hill (com.macrojoy.zgd.display.Hill)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Hill extends Sprite {
}
}//package com.macrojoy.zgd.display
Section 112
//Hill_Edit (com.macrojoy.zgd.display.Hill_Edit)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Hill_Edit extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 113
//HitEffect (com.macrojoy.zgd.display.HitEffect)
package com.macrojoy.zgd.display {
public class HitEffect extends EffectMC {
}
}//package com.macrojoy.zgd.display
Section 114
//JumpEffect (com.macrojoy.zgd.display.JumpEffect)
package com.macrojoy.zgd.display {
public class JumpEffect extends EffectMC {
}
}//package com.macrojoy.zgd.display
Section 115
//KaMC (com.macrojoy.zgd.display.KaMC)
package com.macrojoy.zgd.display {
public class KaMC extends EffectMC {
}
}//package com.macrojoy.zgd.display
Section 116
//Knife (com.macrojoy.zgd.display.Knife)
package com.macrojoy.zgd.display {
public class Knife extends BasicBulletMC {
}
}//package com.macrojoy.zgd.display
Section 117
//Knife_Hand (com.macrojoy.zgd.display.Knife_Hand)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Knife_Hand extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 118
//KnifeIn (com.macrojoy.zgd.display.KnifeIn)
package com.macrojoy.zgd.display {
public class KnifeIn extends WeaponInMC {
}
}//package com.macrojoy.zgd.display
Section 119
//Ladder1 (com.macrojoy.zgd.display.Ladder1)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Ladder1 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 120
//Ladder2 (com.macrojoy.zgd.display.Ladder2)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Ladder2 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 121
//Light (com.macrojoy.zgd.display.Light)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Light extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 122
//LoadingMC (com.macrojoy.zgd.display.LoadingMC)
package com.macrojoy.zgd.display {
import flash.display.*;
public class LoadingMC extends MovieClip {
public var maskMC:MovieClip;
}
}//package com.macrojoy.zgd.display
Section 123
//MCEnemy1 (com.macrojoy.zgd.display.MCEnemy1)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class MCEnemy1 extends BasicEnemyMC {
var _r_attack2_FI:Array;
var _attack_FI:Array;
var _r_attack1_FI:Array;
public function MCEnemy1(){
_attack_FI = [[20, [["nearAttack", ["fall", [Data.KNIFE_HIT2, Data.KNIFE_HIT3, 40, "BloodEffect"], Data.ENEMY1_CHOP_POWER, 8, 7]], ["playSound", [Data.KNIFE, 3, 1]]]], [37, [["standAction"]]]];
_r_attack1_FI = [[20, [["shootAttack", [-3, 98, 90, "Arrow"]], ["playSound", [Data.BOW2, 3, 1]]]], [25, [["nextAction", ["ride"]]]]];
_r_attack2_FI = [[14, [["shootAttack", [30, 80, 45, "Arrow"]], ["playSound", [Data.BOW1, 3, 1]]]], [17, [["nextAction", ["ride"]]]]];
super();
_attackDisX = 75;
_dizzyable = true;
_runable = true;
_jumpable = true;
}
override protected function attack():void{
toStopFrame("attack");
}
override protected function attackBlock():void{
toStopFrame("attack");
}
}
}//package com.macrojoy.zgd.display
Section 124
//MCEnemy10 (com.macrojoy.zgd.display.MCEnemy10)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class MCEnemy10 extends BasicEnemyMC {
var _attack_FI;
public function MCEnemy10(){
_attack_FI = [[18, [["playSound", [Data.STICK, 3, 1]]]], [19, [["nearAttack", ["fall", [Data.BOXING1, Data.HITED, 50, "HitEffect"], Data.ENEMY10_KNOCK_POWER, 8, 7]]]], [25, [["standAction"]]]];
super();
_attackDisX = 85;
_walkable = true;
_jumpable = true;
}
override protected function attack():void{
toStopFrame("attack");
}
override protected function attackBlock():void{
toStopFrame("attack");
}
}
}//package com.macrojoy.zgd.display
Section 125
//MCEnemy11 (com.macrojoy.zgd.display.MCEnemy11)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class MCEnemy11 extends BasicEnemyMC {
var _throw_FI:Array;
public function MCEnemy11(){
_throw_FI = [[18, [["playSound", [Data.STICK, 3, 1]]]], [19, [["shootAttack", [52, 75, 0, "Stick"]]]], [37, [["standAction"]]]];
super();
_attackDisX = 300;
_walkable = true;
_jumpable = true;
}
override protected function attack():void{
toStopFrame("throw");
}
}
}//package com.macrojoy.zgd.display
Section 126
//MCEnemy12 (com.macrojoy.zgd.display.MCEnemy12)
package com.macrojoy.zgd.display {
public class MCEnemy12 extends BasicFlyMC {
public function MCEnemy12(){
_hp = 1;
type = "fly";
}
}
}//package com.macrojoy.zgd.display
Section 127
//MCEnemy13 (com.macrojoy.zgd.display.MCEnemy13)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class MCEnemy13 extends BasicEnemyMC {
var _c_shoot3_FI:Array;
var _bump_FI:Array;
var _summon_FI:Array;
var _shoot3_FI:Array;
public function MCEnemy13(){
_shoot3_FI = [[11, [["shakeScreen", [3]], ["shootAttack", [72, 111, 0]], ["shootAttack", [72, 91, 0]], ["shootAttack", [72, 71, 0]], ["shootAttack", [72, 51, 0]], ["shootAttack", [72, 31, 0]], ["playSound", [Data.GUN_SOUND3, 3, 1]]]], [27, [["standAction"]]]];
_bump_FI = [[[2, 12], [["nearAttack", ["fall", [Data.BOXING1, Data.HITED, 55, "HitEffect"], 50, 8, 7]]]], [13, [["standAction"], ["changeSpeed", [0, 0]]]]];
_summon_FI = [[5, [["playSound", [Data.WHISTLE, 5, 1]]]], [26, [["summonHelp"]]], [30, [["standAction"]]]];
_c_shoot3_FI = [[11, [["shakeScreen", [3]], ["shootAttack", [68, 91, 0]], ["shootAttack", [68, 71, 0]], ["shootAttack", [68, 51, 0]], ["shootAttack", [68, 31, 0]], ["shootAttack", [68, 11, 0]], ["playSound", [Data.GUN_SOUND3, 3, 1]]]], [30, [["standAction"]]]];
super();
_jumpable = true;
_runable = true;
_attackDisX = 300;
}
override protected function attack():void{
if (Math.random() < 0.7){
toStopFrame("shoot3");
} else {
if (Math.random() < 0.7){
toStopFrame("c_shoot3");
} else {
toStopFrame("summon");
_attacking = false;
};
};
}
override protected function attackBlock():void{
toStopFrame("bump");
}
function summonHelp():void{
GameDesign.summon();
}
}
}//package com.macrojoy.zgd.display
Section 128
//MCEnemy14 (com.macrojoy.zgd.display.MCEnemy14)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class MCEnemy14 extends BasicEnemyMC {
var _catch_FI;
var _j_attack_FI;
var _whip_FI;
public function MCEnemy14(){
_whip_FI = [[14, [["playSound", [Data.WHIP, 3, 1]]]], [[13, 21], [["nearAttack", ["fall", [Data.BOXING1, Data.HITED, 100, "HitEffect"], Data.ENEMY14_WHIP_POWER, 8, 7]]]], [30, [["standAction"]]]];
_j_attack_FI = [[6, [["playSound", [Data.WHIP, 3, 1]]]], [[7, 11], [["nearAttack", ["fall", [Data.BOXING1, Data.HITED, 0, "HitEffect"], Data.ENEMY14_WHIP_POWER, 8, 7]]]], [13, [["nextAction", ["j_down"]]]]];
_catch_FI = [[4, [["catchHero", [50, 93]]]], [16, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 55, "HitEffect"], Data.ENEMY14_CATCH_POWER, 8, 7]]]], [40, [["releaseHero"]]]];
super();
_attackDisX = 200;
_jumpable = true;
_runable = true;
}
override protected function attack():void{
var _local1:int;
var _local2:Number;
var _local3:int;
_local1 = Math.abs((Global.hero.myX - myX));
_local2 = (Global.hero.hit.width / 2);
_local3 = Math.abs((Global.hero.myY - myY));
if ((((_local1 < (_local2 + 50))) && ((_local3 <= 30)))){
toStopFrame("catch");
} else {
if (_local1 < (_local2 + 150)){
toStopFrame("whip");
} else {
if (_canUp){
jumpPreAction();
JumpAttack();
} else {
if (_block){
attackBlock();
} else {
moveAction();
};
};
};
};
}
override protected function attackBlock():void{
toStopFrame("whip");
}
}
}//package com.macrojoy.zgd.display
Section 129
//MCEnemy15 (com.macrojoy.zgd.display.MCEnemy15)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class MCEnemy15 extends BasicEnemyMC {
var _attack3_FI;
var _c_shoot_FI;
var _attack1_FI;
var _attack2_FI;
public function MCEnemy15(){
_attack1_FI = [[11, [["shootAttack", [-10, 117, 90]], ["shootAttack", [11, 117, 90]], ["playSound", [Data.GUN_SOUND2, 3, 1]]]], [25, [["standAction"]]]];
_attack2_FI = [[11, [["shootAttack", [17, 114, 45]], ["shootAttack", [37, 114, 45]], ["playSound", [Data.GUN_SOUND2, 3, 1]]]], [25, [["standAction"]]]];
_attack3_FI = [[11, [["shootAttack", [31, 76, 0]], ["shootAttack", [53, 81, 0]], ["playSound", [Data.GUN_SOUND2, 3, 1]]]], [25, [["standAction"]]]];
_c_shoot_FI = [[11, [["shootAttack", [23, 49, 0]], ["shootAttack", [48, 54, 0]], ["playSound", [Data.GUN_SOUND2, 3, 1]]]], [25, [["standAction"]]]];
super();
_attackDisX = 300;
_rollable = true;
_jumpable = true;
}
override protected function attack():void{
var _local1:String;
var _local2:int;
_local2 = checkAngle();
if (_local2 >= 68){
_local1 = "attack1";
} else {
if (_local2 >= 23){
_local1 = "attack2";
} else {
if (Math.round(Math.random())){
_local1 = "attack3";
} else {
_local1 = "c_shoot";
};
};
};
toStopFrame(_local1);
}
}
}//package com.macrojoy.zgd.display
Section 130
//MCEnemy16 (com.macrojoy.zgd.display.MCEnemy16)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class MCEnemy16 extends BasicEnemyMC {
var _j_attack_FI;
var _attack_FI;
public function MCEnemy16(){
_attack_FI = [[8, [["nearAttack", ["fall", [Data.KNIFE_HIT2, Data.KNIFE_HIT3, 45, "BloodEffect"], Data.ENEMY16_CHOP_POWER, 8, 7]], ["playSound", [Data.KNIFE, 3, 1]]]], [19, [["standAction"]]]];
_j_attack_FI = [[3, [["shootAttack", [79, 96, 0, "Ax", null, 4]], ["shootAttack", [79, 86, 0, "Ax"]], ["shootAttack", [79, 76, 0, "Ax", null, -4]], ["shootAttack", [79, 76, 0, "Ax", null, -8]], ["playSound", [Data.KNIFE, 3, 1]]]], [14, [["nextAction", ["j_down"]]]]];
super();
_attackDisX = 300;
_jumpable = true;
_runable = true;
}
override protected function attack():void{
var _local1:int;
var _local2:Number;
_local1 = Math.abs((Global.hero.myX - myX));
_local2 = (Global.hero.hit.width / 2);
if (_local1 < (_local2 + 75)){
toStopFrame("attack");
} else {
if (_canUp){
jumpPreAction();
JumpAttack();
_jumpSpeedY = -25;
} else {
if (_block){
attackBlock();
} else {
moveAction();
};
};
};
}
override protected function attackBlock():void{
toStopFrame("attack");
}
}
}//package com.macrojoy.zgd.display
Section 131
//MCEnemy17 (com.macrojoy.zgd.display.MCEnemy17)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class MCEnemy17 extends BasicEnemyMC {
var _throw_FI;
var _attack_FI;
public function MCEnemy17(){
_attack_FI = [[12, [["nearAttack", ["hited", [Data.KNIFE_HIT2, Data.KNIFE_HIT3, 60, "BloodEffect"], Data.ENEMY17_STAB_POWER, 1, 5, 15]], ["playSound", [Data.KNIFE, 3, 1]]]], [24, [["standAction"]]]];
_throw_FI = [[11, [["throwAttack17"], ["playSound", [Data.KNIFE, 3, 1]]]], [17, [["standAction"]]]];
super();
_attackDisX = 300;
_jumpable = true;
_runable = true;
}
override protected function attack():void{
var _local1:int;
var _local2:Number;
_local1 = Math.abs((Global.hero.myX - myX));
_local2 = (Global.hero.hit.width / 2);
if (_local1 < (_local2 + 70)){
toStopFrame("attack");
} else {
toStopFrame("throw");
};
}
override protected function attackBlock():void{
toStopFrame("attack");
}
function throwAttack17():void{
if (Math.random() < 0.5){
shootAttack([44, 91, 0, "Detonator"]);
} else {
switch (Global.difficulty){
case 1:
shootAttack([44, 91, 0, "Knife"]);
break;
case 2:
shootAttack([44, 91, -10, "Knife"]);
shootAttack([44, 91, 10, "Knife"]);
break;
case 3:
shootAttack([44, 91, 0, "Knife"]);
shootAttack([44, 91, -10, "Knife"]);
shootAttack([44, 91, 10, "Knife"]);
break;
};
};
}
}
}//package com.macrojoy.zgd.display
Section 132
//MCEnemy18 (com.macrojoy.zgd.display.MCEnemy18)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class MCEnemy18 extends BasicEnemyMC {
var _throw_FI;
var _attack_FI;
public function MCEnemy18(){
_attack_FI = [[12, [["nearAttack", ["hited", [Data.KNIFE_HIT2, Data.KNIFE_HIT3, 60, "BloodEffect"], Data.ENEMY17_STAB_POWER, 1, 5, 15]], ["playSound", [Data.KNIFE, 3, 1]]]], [24, [["standAction"]]]];
_throw_FI = [[11, [["throwAttack17"], ["playSound", [Data.KNIFE, 3, 1]]]], [17, [["standAction"]]]];
super();
_attackDisX = 300;
_jumpable = true;
_runable = true;
}
override protected function attack():void{
var _local1:int;
var _local2:Number;
_local1 = Math.abs((Global.hero.myX - myX));
_local2 = (Global.hero.hit.width / 2);
if (_local1 < (_local2 + 70)){
toStopFrame("attack");
} else {
toStopFrame("throw");
};
}
override protected function attackBlock():void{
toStopFrame("attack");
}
function throwAttack17():void{
if (Math.random() < 0.5){
shootAttack([44, 91, 0, "Detonator"]);
} else {
switch (Global.difficulty){
case 1:
shootAttack([44, 91, 0, "Knife"]);
break;
case 2:
shootAttack([44, 91, -10, "Knife"]);
shootAttack([44, 91, 10, "Knife"]);
break;
case 3:
shootAttack([44, 91, 0, "Knife"]);
shootAttack([44, 91, -10, "Knife"]);
shootAttack([44, 91, 10, "Knife"]);
break;
};
};
}
}
}//package com.macrojoy.zgd.display
Section 133
//MCEnemy19 (com.macrojoy.zgd.display.MCEnemy19)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
import flash.geom.*;
public class MCEnemy19 extends BasicEnemyMC {
var _throw_FI;
var _catch_FI;
private var _liveTimer:uint;
var _empty_FI;
var _mainBody:MCEnemy19;
var _appear1_FI;
var _j_attack_FI;
private var _myBody:Array;
var _divide_FI;
var _disappear_FI;
var _cat_att_FI;
public function MCEnemy19(){
_throw_FI = [[9, [["shootAttack", [43, 100, 40, "Card"]], ["shootAttack", [43, 100, 20, "Card"]], ["shootAttack", [43, 100, 0, "Card"]], ["shootAttack", [43, 100, -20, "Card"]], ["shootAttack", [43, 100, -40, "Card"]], ["playSound", [Data.KNIFE, 3, 1]], ["playSound", [Data.THROW_CARD, 3, 1]]]], [20, [["standAction"]]]];
_j_attack_FI = [[6, [["shootAttack", [43, 100, -60, "Card"]], ["shootAttack", [43, 100, -80, "Card"]], ["shootAttack", [43, 100, 0, "Card"]], ["shootAttack", [43, 100, -20, "Card"]], ["shootAttack", [43, 100, -40, "Card"]], ["playSound", [Data.KNIFE, 3, 1]], ["playSound", [Data.THROW_CARD, 3, 1]]]], [12, [["nextAction", ["j_down"]]]]];
_catch_FI = [[4, [["catchHero", [43, 80]]]], [16, [["instantTurn"]]]];
_cat_att_FI = [[11, [["nearAttack", ["fall", [Data.KNIFE_HIT2, Data.KNIFE_HIT3, 82, "BloodEffect"], Data.ENEMY19_CATCH_POWER, 8, 7]]]], [17, [["releaseHero"]]]];
_disappear_FI = [[9, [["playSound", [Data.DISAPPEAR, 3, 1]]]], [22, [["nextAction", ["empty"]], ["changeSpeed", [0, 0]]]]];
_appear1_FI = [[22, [["standAction"]]]];
_empty_FI = [[10, [["appear"]]]];
_divide_FI = [[9, [["playSound", [Data.DISAPPEAR, 3, 1]]]], [34, [["divide"]]]];
super();
_attackDisX = 300;
_jumpable = true;
_flashable = true;
}
override protected function attack():void{
var _local1:int;
var _local2:Number;
var _local3:int;
_local1 = Math.abs((Global.hero.myX - myX));
_local2 = (Global.hero.hit.width / 2);
_local3 = Math.abs((Global.hero.myY - myY));
if (((((!(_noBody)) && ((((_myBody == null)) || ((_myBody.length < 1)))))) && ((Math.random() < Data.DIVIDE_ODDS)))){
toStopFrame("divide");
} else {
if ((((((_local1 < (_local2 + 40))) && (!(Global.hero.unbreak)))) && ((_local3 <= 30)))){
toStopFrame("catch");
} else {
if (_local1 < (_local2 + 150)){
toStopFrame("throw");
} else {
jumpPreAction();
JumpAttack();
};
};
};
}
function divide():void{
var _local1:Class;
var _local2:MCEnemy19;
_local1 = Method.getClass1("MCEnemy19");
_local2 = (new (_local1) as MCEnemy19);
Global.roleCTN.addChild(_local2);
_local2.alpha = 0.7;
_local2.type = "boss";
_local2.bornInfo = Method.duplicateArr(bornInfo);
_local2._mainBody = this;
_local2.myX = myX;
_local2.myY = myY;
_speedX = (Math.pow(-1, Math.round(Math.random())) * 5);
_local2.speedX = -(_speedX);
if (_myBody == null){
_myBody = new Array();
};
_myBody.push(_local2);
toStopFrame("appear1");
_local2.bodyAppear();
}
override protected function updatePlayEvt():void{
super.updatePlayEvt();
if (_noBody){
_liveTimer++;
if (_liveTimer == (35 * Data.DIVIDE_TIME)){
killSelf();
};
};
}
function appear():void{
var _local1:int;
var _local2:Point;
var _local3:Point;
var _local4:int;
if (_hp <= 0){
_remove = true;
return;
};
if (_moving){
if (checkDis() == "noTarget"){
_local2 = new Point(0, 0);
_local3 = Global.roleCTN.globalToLocal(_local2);
_local3.x = bornInfo[1];
} else {
_local2 = new Point(0, (Math.floor((Math.random() * 350)) + 100));
_local3 = Global.roleCTN.globalToLocal(_local2);
_local1 = (150 - Math.floor((Math.random() * 300)));
_local3.x = (Global.hero.myX + _local1);
};
} else {
_local1 = (Math.floor((Math.random() * (Data.STAGE_WIDTH - 100))) + 50);
_local2 = new Point(_local1, 0);
_local3 = Global.roleCTN.globalToLocal(_local2);
};
_local4 = Method.getStandY(_local3.x, _local3.y);
myX = _local3.x;
myY = _local4;
_gPoint = parent.localToGlobal(new Point(myX, myY));
if (_gPoint.y > Data.STAGE_HEIGHT){
appear();
} else {
bornInfo[1] = myX;
toStopFrame("appear1");
_moving = false;
};
}
private function checkTurn(_arg1:Number, _arg2:Number):Boolean{
if (checkStand((myX + (scaleX * 86)), myY)){
if (!checkTurnBlock((myX + (scaleX * 86)), myY)){
return (true);
};
};
return (false);
}
function killSelf():void{
toStopFrame("disappear");
_hp = 0;
}
private function checkStand(_arg1:Number, _arg2:Number):Boolean{
var _local3:String;
var _local4:Point;
var _local5:uint;
var _local6:BasicThingMC;
_local3 = Method.getColorStr(_arg1, _arg2);
if ((((((_local3 == "ffffcc00")) || ((_local3 == "ffcc33cf")))) || ((_local3 == "ff33cc00")))){
return (true);
};
_local4 = parent.localToGlobal(new Point(_arg1, _arg2));
_local5 = 0;
while (_local5 < Global.thingsCTN.numChildren) {
_local6 = (Global.thingsCTN.getChildAt(_local5) as BasicThingMC);
if (_local6 != null){
if (_local6.hit.hitTestPoint(_local4.x, _local4.y)){
return (true);
};
};
_local5++;
};
return (false);
}
function bodyAppear():void{
updateXY();
_noBody = true;
_hpUI = (_hp = (_hpTotal = Data.DIVIDE_HP));
init();
toStopFrame("appear1");
_status = "stand";
Global.camp2Arr.push(this);
}
override public function removeSelf():void{
var _local1:int;
var _local2:MCEnemy19;
if (_noBody){
_mainBody.deleteBody(this);
_mainBody = null;
} else {
if (((!((_myBody == null))) && ((_myBody.length > 0)))){
_local1 = 0;
while (_local1 < _myBody.length) {
_local2 = (_myBody[_local1] as MCEnemy19);
_local2.killSelf();
_local1++;
};
};
};
super.removeSelf();
}
function deleteBody(_arg1:MCEnemy19):void{
Method.deleteElement(_myBody, _arg1);
}
function instantTurn():void{
var _local1:Number;
if (checkTurn((myX + (scaleX * 86)), myY)){
myX = (myX + (scaleX * 86));
} else {
if (checkTurn(Global.hero.myX, myY)){
_local1 = Global.hero.myX;
Global.hero.myX = myX;
myX = _local1;
} else {
Global.hero.myX = (myX + (43 * -(scaleX)));
};
};
toStopFrame("cat_att");
turnAction();
}
}
}//package com.macrojoy.zgd.display
Section 134
//MCEnemy2 (com.macrojoy.zgd.display.MCEnemy2)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class MCEnemy2 extends BasicEnemyMC {
var _r_attack2_FI:Array;
var _attack3_FI:Array;
var _attack4_FI:Array;
var _attack2_FI:Array;
var _r_attack1_FI:Array;
public function MCEnemy2(){
_attack2_FI = [[19, [["shootAttack", [30, 107, 45, "Arrow"]], ["playSound", [Data.BOW1, 3, 1]]]], [36, [["standAction"]]]];
_attack3_FI = [[19, [["shootAttack", [35, 82, 0, "Arrow"]], ["playSound", [Data.BOW2, 3, 1]]]], [35, [["standAction"]]]];
_attack4_FI = [[19, [["shootAttack", [34, 50, -30, "Arrow"]], ["playSound", [Data.BOW1, 3, 1]]]], [36, [["standAction"]]]];
_r_attack1_FI = [[20, [["shootAttack", [-3, 98, 90, "Arrow"]], ["playSound", [Data.BOW2, 3, 1]]]], [25, [["nextAction", ["ride"]]]]];
_r_attack2_FI = [[14, [["shootAttack", [30, 80, 45, "Arrow"]], ["playSound", [Data.BOW1, 3, 1]]]], [17, [["nextAction", ["ride"]]]]];
super();
_attackDisX = 300;
_dizzyable = true;
_runable = true;
_jumpable = true;
}
override protected function attack():void{
var _local1:uint;
var _local2:int;
_local2 = checkAngle();
if (_local2 >= 23){
_local1 = 2;
} else {
if (_local2 >= -23){
_local1 = 3;
} else {
_local1 = 4;
};
};
toStopFrame(("attack" + _local1.toString()));
}
}
}//package com.macrojoy.zgd.display
Section 135
//MCEnemy3 (com.macrojoy.zgd.display.MCEnemy3)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class MCEnemy3 extends BasicEnemyMC {
var _throw_FI:Array;
var _r_attack2_FI:Array;
var _r_attack1_FI:Array;
public function MCEnemy3(){
_throw_FI = [[16, [["shootAttack", [55, 90, 0, "Dart"]]]], [83, [["standAction"]]]];
_r_attack1_FI = [[20, [["shootAttack", [-3, 98, 90, "Arrow"]], ["playSound", [Data.BOW2, 3, 1]]]], [25, [["nextAction", ["ride"]]]]];
_r_attack2_FI = [[14, [["shootAttack", [30, 80, 45, "Arrow"]], ["playSound", [Data.BOW1, 3, 1]]]], [17, [["nextAction", ["ride"]]]]];
super();
_attackDisX = 300;
_dizzyable = true;
_runable = true;
_jumpable = true;
}
override protected function attack():void{
toStopFrame("throw");
}
}
}//package com.macrojoy.zgd.display
Section 136
//MCEnemy4 (com.macrojoy.zgd.display.MCEnemy4)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class MCEnemy4 extends BasicEnemyMC {
var _r_attack2_FI:Array;
var _attack_FI:Array;
var _r_attack1_FI:Array;
var _c_attack_FI:Array;
public function MCEnemy4(){
_attack_FI = [[17, [["playSound", [Data.KNIFE, 3, 1]]]], [19, [["nearAttack", ["hited", [Data.KNIFE_HIT2, Data.KNIFE_HIT3, 60, "BloodEffect"], Data.ENEMY4_STAB_POWER, 1, 5, 15]]]], [26, [["standAction"]]]];
_c_attack_FI = [[21, [["shootAttack", [37, 92, 0]], ["playSound", [Data.GUN_SOUND2, 3, 1]]]], [34, [["mcEnd"]]]];
_r_attack1_FI = [[6, [["shootAttack", [6, 85, 90]], ["playSound", [Data.GUN_SOUND2, 3, 1]]]], [18, [["nextAction", ["ride"]]]]];
_r_attack2_FI = [[6, [["shootAttack", [36, 63, 45]], ["playSound", [Data.GUN_SOUND2, 3, 1]]]], [18, [["nextAction", ["ride"]]]]];
super();
_ropeable = true;
_attackDisX = 75;
_dizzyable = true;
_runable = true;
_jumpable = true;
}
override protected function attack():void{
toStopFrame("attack");
}
override protected function attackBlock():void{
toStopFrame("attack");
}
}
}//package com.macrojoy.zgd.display
Section 137
//MCEnemy5 (com.macrojoy.zgd.display.MCEnemy5)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class MCEnemy5 extends BasicEnemyMC {
var _throw_FI:Array;
var _r_attack2_FI:Array;
var _r_attack1_FI:Array;
var _c_attack_FI:Array;
public function MCEnemy5(){
_throw_FI = [[16, [["shootAttack", [55, 65, 0, "Knife"]], ["playSound", [Data.KNIFE, 3, 1]]]], [23, [["standAction"]]]];
_c_attack_FI = [[21, [["shootAttack", [37, 92, 0]], ["playSound", [Data.GUN_SOUND2, 3, 1]]]], [34, [["mcEnd"]]]];
_r_attack1_FI = [[6, [["shootAttack", [6, 85, 90]], ["playSound", [Data.GUN_SOUND2, 3, 1]]]], [18, [["nextAction", ["ride"]]]]];
_r_attack2_FI = [[6, [["shootAttack", [36, 63, 45]], ["playSound", [Data.GUN_SOUND2, 3, 1]]]], [18, [["nextAction", ["ride"]]]]];
super();
_ropeable = true;
_attackDisX = 300;
_dizzyable = true;
_runable = true;
_jumpable = true;
}
override protected function attack():void{
toStopFrame("throw");
}
}
}//package com.macrojoy.zgd.display
Section 138
//MCEnemy6 (com.macrojoy.zgd.display.MCEnemy6)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class MCEnemy6 extends BasicEnemyMC {
var _r_attack2_FI:Array;
var _attack3_FI:Array;
var _attack4_FI:Array;
var _attack1_FI:Array;
var _c_attack_FI:Array;
var _attack2_FI:Array;
var _r_attack1_FI:Array;
public function MCEnemy6(){
_attack1_FI = [[21, [["shootAttack", [1, 113, 90]], ["playSound", [Data.GUN_SOUND2, 3, 1]]]], [37, [["standAction"]]]];
_attack2_FI = [[21, [["shootAttack", [36, 109, 45]], ["playSound", [Data.GUN_SOUND2, 3, 1]]]], [37, [["standAction"]]]];
_attack3_FI = [[21, [["shootAttack", [22, 63, 0]], ["playSound", [Data.GUN_SOUND2, 3, 1]]]], [37, [["standAction"]]]];
_attack4_FI = [[21, [["shootAttack", [20, 44, -45]], ["playSound", [Data.GUN_SOUND2, 3, 1]]]], [37, [["standAction"]]]];
_c_attack_FI = [[21, [["shootAttack", [37, 92, 0]], ["playSound", [Data.GUN_SOUND2, 3, 1]]]], [34, [["mcEnd"]]]];
_r_attack1_FI = [[6, [["shootAttack", [6, 85, 90]], ["playSound", [Data.GUN_SOUND2, 3, 1]]]], [18, [["nextAction", ["ride"]]]]];
_r_attack2_FI = [[6, [["shootAttack", [36, 63, 45]], ["playSound", [Data.GUN_SOUND2, 3, 1]]]], [18, [["nextAction", ["ride"]]]]];
super();
_ropeable = true;
_attackDisX = 300;
_dizzyable = true;
_runable = true;
_jumpable = true;
}
override protected function attack():void{
var _local1:uint;
var _local2:int;
_local2 = checkAngle();
if (_local2 >= 68){
_local1 = 1;
} else {
if (_local2 >= 23){
_local1 = 2;
} else {
if (_local2 >= -23){
_local1 = 3;
} else {
_local1 = 4;
};
};
};
toStopFrame(("attack" + _local1.toString()));
}
}
}//package com.macrojoy.zgd.display
Section 139
//MCEnemy7 (com.macrojoy.zgd.display.MCEnemy7)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class MCEnemy7 extends BasicEnemyMC {
var _r_attack2_FI:Array;
var _attack3_FI:Array;
var _c_shoot_FI:Array;
var _attack1_FI:Array;
var _attack2_FI:Array;
var _r_attack1_FI:Array;
public function MCEnemy7(){
_attack1_FI = [[21, [["shootAttack", [8, 132, 90]], ["playSound", [Data.GUN_SOUND3, 3, 1]]]], [36, [["standAction"]]]];
_attack2_FI = [[18, [["shootAttack", [43, 123, 45]], ["playSound", [Data.GUN_SOUND3, 3, 1]]]], [35, [["standAction"]]]];
_attack3_FI = [[15, [["shootAttack", [54, 73, 0]], ["playSound", [Data.GUN_SOUND3, 3, 1]]]], [33, [["standAction"]]]];
_c_shoot_FI = [[19, [["shootAttack", [88, 59, 0]], ["playSound", [Data.GUN_SOUND3, 3, 1]]]], [36, [["standAction"]]]];
_r_attack1_FI = [[6, [["shootAttack", [20, 89, 90]], ["playSound", [Data.GUN_SOUND3, 3, 1]]]], [18, [["nextAction", ["ride"]]]]];
_r_attack2_FI = [[6, [["shootAttack", [55, 74, 45]], ["playSound", [Data.GUN_SOUND3, 3, 1]]]], [18, [["nextAction", ["ride"]]]]];
super();
_attackDisX = 300;
_dizzyable = true;
_runable = true;
_jumpable = true;
}
override protected function attack():void{
var _local1:String;
var _local2:int;
_local2 = checkAngle();
if (_local2 >= 68){
_local1 = "attack1";
} else {
if (_local2 >= 23){
_local1 = "attack2";
} else {
if (Math.round(Math.random())){
_local1 = "attack3";
} else {
_local1 = "c_shoot";
};
};
};
toStopFrame(_local1);
}
}
}//package com.macrojoy.zgd.display
Section 140
//MCEnemy8 (com.macrojoy.zgd.display.MCEnemy8)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class MCEnemy8 extends BasicEnemyMC {
var _r_attack2_FI:Array;
var _attack_FI:Array;
var _r_attack1_FI:Array;
public function MCEnemy8(){
_attack_FI = [[2, [["playSound", [Data.LASH, 3, 1]]]], [[3, 13], [["nearAttack", ["fall", [Data.LASHED, Data.LASHED, 60, "HitEffect"], Data.ENEMY8_LASH_POWER, 8, 7]]]], [15, [["standAction"]]]];
_r_attack1_FI = [[6, [["shootAttack", [20, 89, 90]], ["playSound", [Data.GUN_SOUND3, 3, 1]]]], [18, [["nextAction", ["ride"]]]]];
_r_attack2_FI = [[6, [["shootAttack", [55, 74, 45]], ["playSound", [Data.GUN_SOUND3, 3, 1]]]], [18, [["nextAction", ["ride"]]]]];
super();
_attackDisX = 160;
_dizzyable = true;
_runable = true;
_jumpable = true;
}
override protected function attack():void{
toStopFrame("attack");
}
override protected function attackBlock():void{
toStopFrame("attack");
}
}
}//package com.macrojoy.zgd.display
Section 141
//MCEnemy9 (com.macrojoy.zgd.display.MCEnemy9)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class MCEnemy9 extends BasicEnemyMC {
var _j_attack_FI:Array;
public function MCEnemy9(){
_j_attack_FI = [[2, [["playSound", [Data.KNIFE, 3, 1]]]], [[3, 17], [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.ENEMY9_KICK_POWER, 8, 7]]]], [19, [["nextAction", ["j_down"]]]]];
super();
_attackDisX = 65;
_rollable = true;
_jumpable = true;
}
override protected function attack():void{
jumpPreAction();
JumpAttack();
}
public function bonusJumper():void{
bornInfo[1] = (bornInfo[1] - (Data.STAGE_WIDTH * 5));
space = "out";
}
}
}//package com.macrojoy.zgd.display
Section 142
//MCHero1 (com.macrojoy.zgd.display.MCHero1)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class MCHero1 extends BasicHeroMC {
var _run_FI:Array;
var _kick_FI:Array;
var _s_down_FI:Array;
var _shoot5_FI:Array;
var _boxing2_FI:Array;
var _boxing_FI:Array;
var _c_shoot3_FI:Array;
var _throw_FI:Array;
var _j_shoot5_FI:Array;
var _j_throw_FI:Array;
var _pick_FI:Array;
var _kick2_FI:Array;
var _stab_FI:Array;
var _shoot1_FI:Array;
var _go_down_FI:Array;
var _s_up_FI:Array;
var _j_shoot1_FI:Array;
var _kick3_FI:Array;
var _shoot2_FI:Array;
var _j_shoot2_FI:Array;
var _fired_FI:Array;
var _knock_FI:Array;
var _chop_FI:Array;
var _shoot3_FI:Array;
var _slide_FI:Array;
var _j_shoot3_FI:Array;
var _recharge_FI:Array;
var _shoot4_FI:Array;
var _show_gun_FI:Array;
var _j_shoot4_FI:Array;
public function MCHero1(){
_run_FI = [[1, [["mcReady"], ["mcEnd"], ["playSound", [Data.RUN1_SOUND, 10, 1]]]], [4, [["playSound", [Data.RUN2_SOUND, 10, 1]]]], [7, [["playSound", [Data.RUN3_SOUND, 10, 1]]]], [10, [["playSound", [Data.RUN4_SOUND, 10, 1]]]], [12, [["resetMcFrame"]]]];
_go_down_FI = [[4, [["nextAction", ["crouch"]]]]];
_slide_FI = [[3, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_POWER, 8, 5]], ["createMyEffect"], ["playSound", [Data.KNIFE, 2, 1]]]], [4, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_POWER, 8, 5]]]], [5, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_POWER, 8, 5]], ["createMyEffect"]]], [6, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_POWER, 8, 5]]]], [7, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_POWER, 8, 5]], ["createMyEffect"]]], [8, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_POWER, 8, 5]]]], [9, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_POWER, 8, 5]], ["createMyEffect"]]], [10, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_POWER, 8, 5]]]], [11, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_POWER, 8, 5]], ["createMyEffect"]]], [12, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_POWER, 8, 5]]]], [13, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_POWER, 8, 5]], ["createMyEffect"]]], [14, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_POWER, 8, 5]]]], [15, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_POWER, 8, 5]], ["createMyEffect"]]], [16, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_POWER, 8, 5]]]], [17, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_POWER, 8, 5]], ["createMyEffect"]]], [18, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_POWER, 8, 5]]]], [19, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_POWER, 8, 5]], ["createMyEffect"]]], [21, [["mcReady"], ["mcEnd"]]]];
_kick3_FI = [[3, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_KICK_POWER, 18, 5]], ["createMyEffect1"], ["playSound", [Data.KNIFE, 2, 1]]]], [4, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_KICK_POWER, 18, 5]]]], [5, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_KICK_POWER, 18, 5]], ["createMyEffect1"]]], [6, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_KICK_POWER, 18, 5]]]], [7, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_KICK_POWER, 18, 5]], ["createMyEffect1"]]], [8, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_KICK_POWER, 18, 5]]]], [9, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_KICK_POWER, 18, 5]], ["createMyEffect1"]]], [10, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_KICK_POWER, 18, 5]]]], [11, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_KICK_POWER, 18, 5]], ["createMyEffect1"]]], [12, [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.SLIDE_KICK_POWER, 18, 5]]]], [13, [["createMyEffect1"]]], [15, [["createMyEffect1"]]], [17, [["createMyEffect1"]]], [18, [["mcReady"], ["mcEnd"]]]];
_s_down_FI = [[12, [["nextAction", ["s_down1"]], ["changeSpeed", [0, 10]], ["changeXY", [0, 120]]]]];
_s_up_FI = [[15, [["changeXY", [0, -120]], ["jumpAction"], ["changeSpeed", [0, -20]]]]];
_show_gun_FI = [[1, [["mcReady"]]], [28, [["mcEnd"]]]];
_c_shoot3_FI = [[3, [["shootAttack", [50, 63, 0, "Bullet", "BoomMC"]], ["playSound", [Data.GUN_SOUND1, 2, 1]], ["shakeScreen", [1]]]], [4, [["mcReady"]]], [15, [["mcEnd"], ["nextAction", ["crouch"]]]]];
_j_shoot1_FI = [[3, [["shootAttack", [8, 129, 90, "Bullet", "BoomMC"]], ["playSound", [Data.GUN_SOUND1, 2, 1]], ["shakeScreen", [1]]]], [4, [["mcReady"]]], [15, [["mcEnd"]]]];
_j_shoot2_FI = [[3, [["shootAttack", [46, 105, 23, "Bullet", "BoomMC"]], ["playSound", [Data.GUN_SOUND1, 2, 1]], ["shakeScreen", [1]]]], [4, [["mcReady"]]], [15, [["mcEnd"]]]];
_j_shoot3_FI = [[3, [["shootAttack", [56, 82, 0, "Bullet", "BoomMC"]], ["playSound", [Data.GUN_SOUND1, 2, 1]], ["shakeScreen", [1]]]], [4, [["mcReady"]]], [15, [["mcEnd"]]]];
_j_shoot4_FI = [[3, [["shootAttack", [52, 53, -28, "Bullet", "BoomMC"]], ["playSound", [Data.GUN_SOUND1, 2, 1]], ["shakeScreen", [1]]]], [4, [["mcReady"]]], [15, [["mcEnd"]]]];
_j_shoot5_FI = [[3, [["shootAttack", [-8, 19, -90, "Bullet", "BoomMC"]], ["playSound", [Data.GUN_SOUND1, 2, 1]], ["shakeScreen", [1]]]], [4, [["mcReady"]]], [15, [["mcEnd"]]]];
_shoot1_FI = [[2, [["shootAttack", [-6, 141, 90, "Bullet", "BoomMC"]], ["playSound", [Data.GUN_SOUND1, 2, 1]], ["shakeScreen", [1]]]], [3, [["mcReady"]]], [13, [["mcEnd"]]]];
_shoot2_FI = [[2, [["shootAttack", [37, 116, 23, "Bullet", "BoomMC"]], ["playSound", [Data.GUN_SOUND1, 2, 1]], ["shakeScreen", [1]]]], [3, [["mcReady"]]], [13, [["mcEnd"]]]];
_shoot3_FI = [[2, [["shootAttack", [45, 90, 0, "Bullet", "BoomMC"]], ["playSound", [Data.GUN_SOUND1, 2, 1]], ["shakeScreen", [1]]]], [3, [["mcReady"]]], [13, [["mcEnd"]]]];
_shoot4_FI = [[2, [["shootAttack", [47, 55, -28, "Bullet", "BoomMC"]], ["playSound", [Data.GUN_SOUND1, 2, 1]], ["shakeScreen", [1]]]], [3, [["mcReady"]]], [13, [["mcEnd"]]]];
_shoot5_FI = [[2, [["shootAttack", [-11, 24, -90, "Bullet", "BoomMC"]], ["playSound", [Data.GUN_SOUND1, 2, 1]], ["shakeScreen", [1]]]], [3, [["mcReady"]]], [13, [["mcEnd"]]]];
_boxing_FI = [[4, [["playSound", [Data.KNIFE, 2, 1]]]], [5, [["nearAttack", ["hited", [Data.BOXING1, Data.HITED, 80, "HitEffect"], Data.BOXING_POWER, 0, 5, 10]]]], [6, [["mcReady"]]], [10, [["mcEnd"]]]];
_boxing2_FI = [[2, [["playSound", [Data.KNIFE, 2, 1]]]], [3, [["nearAttack", ["hited", [Data.BOXING2, Data.HITED, 80, "HitEffect"], Data.BOXING2_POWER, 0, 1, 5]]]], [4, [["mcReady"]]], [8, [["mcEnd"]]]];
_kick2_FI = [[5, [["playSound", [Data.KNIFE, 2, 1]]]], [6, [["nearAttack", ["fly", [Data.KICK, Data.HITED, 65, "HitEffect"], Data.KICK2_POWER, 20, 3]]]], [14, [["mcReady"], ["mcEnd"]]]];
_stab_FI = [[7, [["nearAttack", ["hited", [Data.KNIFE_HIT2, Data.KNIFE_HIT3, 75, "BloodEffect"], Data.STAB_POWER, 1, 5, 15]], ["playSound", [Data.KNIFE, 2, 1]]]], [11, [["mcReady"]]], [17, [["mcEnd"]]]];
_knock_FI = [[7, [["nearAttack", ["dizzy", [Data.BOXING1, Data.HITED, 60, "HitEffect"], Data.KNOCK_POWER, 2, 4]], ["playSound", [Data.KNIFE, 2, 1]]]], [10, [["mcReady"]]], [16, [["mcEnd"]]]];
_chop_FI = [[7, [["nearAttack", ["dizzy", [Data.KNIFE_HIT2, Data.KNIFE_HIT3, 60, "BloodEffect"], Data.CHOP_POWER, 2, 4]], ["playSound", [Data.KNIFE, 2, 1]]]], [10, [["mcReady"]]], [16, [["mcEnd"]]]];
_throw_FI = [[5, [["shootAttack", [32, 83, 0, null]], ["playSound", [Data.KNIFE, 2, 1]]]], [12, [["mcReady"], ["mcEnd"]]]];
_j_throw_FI = [[5, [["shootAttack", [32, 83, 0, null]], ["playSound", [Data.KNIFE, 2, 1]]]], [12, [["mcReady"], ["mcEnd"]]]];
_recharge_FI = [[1, [["mcReady"]]], [14, [["recharge"], ["playSound", [Data.RECHARGE, 2, 1]]]], [26, [["recharge"], ["playSound", [Data.RECHARGE, 2, 1]]]], [38, [["recharge"], ["playSound", [Data.RECHARGE, 2, 1]]]], [50, [["recharge"], ["playSound", [Data.RECHARGE, 2, 1]]]], [62, [["recharge"], ["playSound", [Data.RECHARGE, 2, 1]]]], [74, [["recharge"], ["playSound", [Data.RECHARGE, 2, 1]]]], [90, [["standAction"]]]];
_kick_FI = [[2, [["playSound", [Data.KNIFE, 2, 1]]]], [[3, 19], [["nearAttack", ["fall", [Data.KICK, Data.HITED, 10, "HitEffect"], Data.KICK_POWER, 8, 7]]]]];
_fired_FI = [[55, [["mcReady"], ["mcEnd"]]]];
_pick_FI = [[5, [["mcReady"], ["mcEnd"]]]];
super();
}
}
}//package com.macrojoy.zgd.display
Section 143
//Plant (com.macrojoy.zgd.display.Plant)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Plant extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 144
//PoleHit0 (com.macrojoy.zgd.display.PoleHit0)
package com.macrojoy.zgd.display {
import flash.display.*;
public class PoleHit0 extends MovieClip {
public var hit:Sprite;
}
}//package com.macrojoy.zgd.display
Section 145
//PoleHit1 (com.macrojoy.zgd.display.PoleHit1)
package com.macrojoy.zgd.display {
import flash.display.*;
public class PoleHit1 extends MovieClip {
public var hit:Sprite;
}
}//package com.macrojoy.zgd.display
Section 146
//PoleHit2 (com.macrojoy.zgd.display.PoleHit2)
package com.macrojoy.zgd.display {
import flash.display.*;
public class PoleHit2 extends MovieClip {
public var hit:Sprite;
}
}//package com.macrojoy.zgd.display
Section 147
//PolePresent (com.macrojoy.zgd.display.PolePresent)
package com.macrojoy.zgd.display {
import flash.display.*;
public class PolePresent extends MovieClip {
public var present:MovieClip;
}
}//package com.macrojoy.zgd.display
Section 148
//POut (com.macrojoy.zgd.display.POut)
package com.macrojoy.zgd.display {
public class POut extends EffectMC {
}
}//package com.macrojoy.zgd.display
Section 149
//Present (com.macrojoy.zgd.display.Present)
package com.macrojoy.zgd.display {
public class Present extends PresentMC {
}
}//package com.macrojoy.zgd.display
Section 150
//PresentMC (com.macrojoy.zgd.display.PresentMC)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class PresentMC extends BasicPresentMC {
override protected function checkEffect():void{
var _local1:Array;
var _local2:Array;
_local1 = Data.getArrData("presentArr");
for each (_local2 in _local1) {
if (_local2[0] == currentLabel){
Method.addScore(_local2[1]);
Method.showScore(myX, (myY - 60), _local2[1]);
Method.playSound(Data.SCORE, 7, 1, Global.soundVolume);
if (bonusCount){
Global.enemyNum++;
Global.GIPanel.updateEnemyCount();
};
break;
};
};
}
}
}//package com.macrojoy.zgd.display
Section 151
//Rope14 (com.macrojoy.zgd.display.Rope14)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Rope14 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 152
//Rope15 (com.macrojoy.zgd.display.Rope15)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Rope15 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 153
//RunEffect (com.macrojoy.zgd.display.RunEffect)
package com.macrojoy.zgd.display {
public class RunEffect extends EffectMC {
}
}//package com.macrojoy.zgd.display
Section 154
//Side10 (com.macrojoy.zgd.display.Side10)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Side10 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 155
//Side11 (com.macrojoy.zgd.display.Side11)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Side11 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 156
//Side7 (com.macrojoy.zgd.display.Side7)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Side7 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 157
//Sky1 (com.macrojoy.zgd.display.Sky1)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Sky1 extends Sprite {
}
}//package com.macrojoy.zgd.display
Section 158
//Sky2 (com.macrojoy.zgd.display.Sky2)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Sky2 extends Sprite {
}
}//package com.macrojoy.zgd.display
Section 159
//Sky3 (com.macrojoy.zgd.display.Sky3)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Sky3 extends Sprite {
}
}//package com.macrojoy.zgd.display
Section 160
//SlideEffect (com.macrojoy.zgd.display.SlideEffect)
package com.macrojoy.zgd.display {
public class SlideEffect extends EffectMC {
}
}//package com.macrojoy.zgd.display
Section 161
//SpangMC (com.macrojoy.zgd.display.SpangMC)
package com.macrojoy.zgd.display {
public class SpangMC extends EffectMC {
}
}//package com.macrojoy.zgd.display
Section 162
//Stick (com.macrojoy.zgd.display.Stick)
package com.macrojoy.zgd.display {
public class Stick extends BasicBulletMC {
}
}//package com.macrojoy.zgd.display
Section 163
//Stick_Hand (com.macrojoy.zgd.display.Stick_Hand)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Stick_Hand extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 164
//Supply (com.macrojoy.zgd.display.Supply)
package com.macrojoy.zgd.display {
public class Supply extends SupplyMC {
}
}//package com.macrojoy.zgd.display
Section 165
//SupplyMC (com.macrojoy.zgd.display.SupplyMC)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class SupplyMC extends BasicPresentMC {
override protected function checkEffect():void{
var _local1:Array;
var _local2:Array;
_local1 = Data.getArrData("supplyArr");
for each (_local2 in _local1) {
if (_local2[0] == currentLabel){
if (currentLabel == "bullet"){
if ((Global.bulletableNum + Global.bulletPreNum) >= Data.BULLET_NUM){
Method.addScore(500);
Method.showScore(myX, (myY - 150), 500);
Method.playSound(Data.SCORE, 7, 1, Global.soundVolume);
} else {
Global.hero.getBullet();
Method.playSound(Data.GET_BULLET, 7, 1, Global.soundVolume);
};
break;
} else {
if (Global.hero.getHp() == Global.hero.getHpTotal()){
Method.addScore((_local2[1] * 4));
Method.showScore(myX, (myY - 150), (_local2[1] * 4));
Method.playSound(Data.SCORE, 7, 1, Global.soundVolume);
} else {
Global.hero.addLifeNum(_local2[1]);
Method.playSound(Data.FOOD, 7, 1, Global.soundVolume);
};
break;
};
Global.itemNum++;
};
};
}
}
}//package com.macrojoy.zgd.display
Section 166
//WantedMC (com.macrojoy.zgd.display.WantedMC)
package com.macrojoy.zgd.display {
public class WantedMC extends EffectMC {
}
}//package com.macrojoy.zgd.display
Section 167
//Weapon (com.macrojoy.zgd.display.Weapon)
package com.macrojoy.zgd.display {
public class Weapon extends WeaponMC {
}
}//package com.macrojoy.zgd.display
Section 168
//WeaponInMC (com.macrojoy.zgd.display.WeaponInMC)
package com.macrojoy.zgd.display {
import flash.display.*;
import com.macrojoy.zgd.*;
public class WeaponInMC extends Sprite implements IEnterframeObject, IObject {
private var _timer:uint;
public function WeaponInMC(){
Method.addEnterframeObj(this);
}
public function updateEvent():void{
_timer++;
if (_timer > (35 * 5)){
removeSelf();
} else {
if (_timer > (35 * 3)){
alpha = ((alpha)==1) ? 0.5 : 1;
};
};
}
public function removeSelf():void{
Method.removeEnterframeObj(this);
parent.removeChild(this);
}
}
}//package com.macrojoy.zgd.display
Section 169
//WeaponMC (com.macrojoy.zgd.display.WeaponMC)
package com.macrojoy.zgd.display {
import com.macrojoy.zgd.*;
public class WeaponMC extends BasicPresentMC {
public var ableTimer:uint;
private var _rotateTimer:uint;
override protected function checkEffect():void{
Global.hero.getWeapon(currentLabel);
}
override protected function fallingHandler():void{
rotation = (rotation + (60 * scaleX));
}
function rotateStatus():void{
_rotateTimer++;
if (_rotateTimer >= 12){
_status = "fall";
} else {
fallingHandler();
};
}
}
}//package com.macrojoy.zgd.display
Section 170
//Wheel1 (com.macrojoy.zgd.display.Wheel1)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Wheel1 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 171
//Wheel2 (com.macrojoy.zgd.display.Wheel2)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Wheel2 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 172
//Wheel3 (com.macrojoy.zgd.display.Wheel3)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Wheel3 extends MovieClip {
}
}//package com.macrojoy.zgd.display
Section 173
//WhiteMC (com.macrojoy.zgd.display.WhiteMC)
package com.macrojoy.zgd.display {
public class WhiteMC extends EffectMC {
}
}//package com.macrojoy.zgd.display
Section 174
//Window11 (com.macrojoy.zgd.display.Window11)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Window11 extends MovieClip {
public var wall:MovieClip;
}
}//package com.macrojoy.zgd.display
Section 175
//Window12 (com.macrojoy.zgd.display.Window12)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Window12 extends MovieClip {
public var wall:MovieClip;
}
}//package com.macrojoy.zgd.display
Section 176
//Window2 (com.macrojoy.zgd.display.Window2)
package com.macrojoy.zgd.display {
import flash.display.*;
public class Window2 extends MovieClip {
public var wall:MovieClip;
}
}//package com.macrojoy.zgd.display
Section 177
//BackGround (com.macrojoy.zgd.scene.BackGround)
package com.macrojoy.zgd.scene {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.geom.*;
public class BackGround extends Sprite implements IEnterframeObject {
private var _screenBMD2:BitmapData;
private var _screenBMD1:BitmapData;
private var _hillBMD2:BitmapData;
private var _speedMultiplier2:Number;// = 0.2
private var _hillRect:Rectangle;
private var _skyX:int;// = 0
private var _hillX:int;// = 0
private var _hillBMD1:BitmapData;
private var _skyBMD2:BitmapData;
private var _skyRect:Rectangle;
private var _skyBMD1:BitmapData;
private var _speedMultiplier1:Number;// = 0.1
private var _earthX:int;// = 0
private var _bgCTN2:Sprite;
private var _bitMap1:Bitmap;
private var _bgCTN1:Sprite;
private var _earthBMD1:BitmapData;
private var _earthRect:Rectangle;
private var _earthBMD2:BitmapData;
public function BackGround(){
_skyX = 0;
_hillX = 0;
_earthX = 0;
_speedMultiplier1 = 0.1;
_speedMultiplier2 = 0.2;
super();
initBg();
Method.addEnterframeObj(this);
}
public function toChangeSky():void{
var _local1:Bitmap;
_screenBMD2 = new BitmapData(Data.STAGE_WIDTH, Data.STAGE_HEIGHT, true, 0);
_bgCTN2 = new Sprite();
addChild(_bgCTN2);
_bgCTN2.alpha = 0;
_local1 = new Bitmap(_screenBMD2);
_bgCTN2.addChild(_local1);
saveData(2, Global.skyOrder);
}
public function setColor(_arg1:uint):void{
if (_bgCTN1 != null){
saveData(1, _arg1);
};
if (_bgCTN2 != null){
saveData(2, _arg1);
};
_screenBMD1.copyPixels(_skyBMD1, _skyRect, new Point(0, 0), null, null, true);
if (_bgCTN2 != null){
_screenBMD2.copyPixels(_skyBMD2, _skyRect, new Point(0, 0), null, null, true);
};
_screenBMD1.copyPixels(_hillBMD1, _hillRect, new Point(0, (45 + Global.gameCTN.y)), null, null, true);
if (_bgCTN2 != null){
_screenBMD2.copyPixels(_hillBMD2, _hillRect, new Point(0, (45 + Global.gameCTN.y)), null, null, true);
};
_screenBMD1.copyPixels(_earthBMD1, _earthRect, new Point(0, (247 + Global.gameCTN.y)), null, null, true);
if (_bgCTN2 != null){
_screenBMD2.copyPixels(_earthBMD2, _earthRect, new Point(0, (247 + Global.gameCTN.y)), null, null, true);
};
}
private function initBg():void{
var _local1:Bitmap;
saveData(1, Global.skyOrder);
_screenBMD1 = new BitmapData(Data.STAGE_WIDTH, Data.STAGE_HEIGHT, true, 0);
_bgCTN1 = new Sprite();
addChild(_bgCTN1);
_local1 = new Bitmap(_screenBMD1);
_bgCTN1.addChild(_local1);
_skyRect = new Rectangle(0, (150 - Global.gameCTN.y), Data.STAGE_WIDTH, 300);
_screenBMD1.copyPixels(_skyBMD1, _skyRect, new Point(0, 0), null, null, true);
_hillRect = new Rectangle(0, 0, Data.STAGE_WIDTH, 235);
_screenBMD1.copyPixels(_hillBMD1, _hillRect, new Point(0, (45 + Global.gameCTN.y)), null, null, true);
_earthRect = new Rectangle(0, 0, Data.STAGE_WIDTH, 253);
_screenBMD1.copyPixels(_earthBMD1, _earthRect, new Point(0, (247 + Global.gameCTN.y)), null, null, true);
}
private function saveData(_arg1:uint, _arg2:uint):void{
var _local3:Class;
var _local4:Sprite;
var _local5:Sprite;
var _local6:Sprite;
_local3 = Method.getClass1(("Sky" + Global.skyOrder.toString()));
_local4 = (new (_local3) as Sprite);
if (this[("_skyBMD" + _arg1)] != null){
this[("_skyBMD" + _arg1)].dispose();
};
this[("_skyBMD" + _arg1)] = new BitmapData(_local4.width, _local4.height, true, 0);
this[("_skyBMD" + _arg1)].draw(_local4);
_local3 = Method.getClass1("Hill");
_local5 = (new (_local3) as Sprite);
Method.setColor(_local5.getChildAt(0), _arg2);
if (this[("_hillBMD" + _arg1)] != null){
this[("_hillBMD" + _arg1)].dispose();
};
this[("_hillBMD" + _arg1)] = new BitmapData(_local5.width, _local4.height, true, 0);
this[("_hillBMD" + _arg1)].draw(_local5);
_local3 = Method.getClass1("Earth");
_local6 = (new (_local3) as Sprite);
Method.setColor(_local6.getChildAt(0), _arg2);
if (this[("_earthBMD" + _arg1)] != null){
this[("_earthBMD" + _arg1)].dispose();
};
this[("_earthBMD" + _arg1)] = new BitmapData(_local6.width, _local6.height, true, 0);
this[("_earthBMD" + _arg1)].draw(_local6);
}
public function updateEvent():void{
if (!Global.gamePause){
_skyX = (_skyX + Math.floor((Global.lensSpeed * _speedMultiplier1)));
if (_skyX >= Data.STAGE_WIDTH){
_skyX = (_skyX - Data.STAGE_WIDTH);
};
_skyRect.y = (150 - Global.gameCTN.y);
_skyRect.x = _skyX;
_screenBMD1.copyPixels(_skyBMD1, _skyRect, new Point(0, 0), null, null, true);
if (_bgCTN2 != null){
_screenBMD2.copyPixels(_skyBMD2, _skyRect, new Point(0, 0), null, null, true);
};
_hillX = (_hillX + Math.floor((Global.lensSpeed * _speedMultiplier2)));
if (_hillX >= (Data.STAGE_WIDTH * 2)){
_hillX = (_hillX - (Data.STAGE_WIDTH * 2));
};
_hillRect.x = _hillX;
_screenBMD1.copyPixels(_hillBMD1, _hillRect, new Point(0, (45 + Global.gameCTN.y)), null, null, true);
if (_bgCTN2 != null){
_screenBMD2.copyPixels(_hillBMD2, _hillRect, new Point(0, (45 + Global.gameCTN.y)), null, null, true);
};
_earthX = (_earthX + Math.floor(Global.lensSpeed));
if (_earthX >= Data.STAGE_WIDTH){
_earthX = (_earthX - Data.STAGE_WIDTH);
};
_earthRect.x = _earthX;
_screenBMD1.copyPixels(_earthBMD1, _earthRect, new Point(0, (247 + Global.gameCTN.y)), null, null, true);
if (_bgCTN2 != null){
_screenBMD2.copyPixels(_earthBMD2, _earthRect, new Point(0, (247 + Global.gameCTN.y)), null, null, true);
_bgCTN2.alpha = (_bgCTN2.alpha + 0.01);
if (_bgCTN2.alpha >= 1){
removeChild(_bgCTN1);
_skyBMD1.dispose();
_hillBMD1.dispose();
_earthBMD1.dispose();
_screenBMD1.dispose();
_bgCTN1 = _bgCTN2;
_skyBMD1 = _skyBMD2;
_hillBMD1 = _hillBMD2;
_earthBMD1 = _earthBMD2;
_screenBMD1 = _screenBMD2;
_bgCTN2 = null;
_skyBMD2 = null;
_hillBMD2 = null;
_earthBMD2 = null;
_screenBMD2 = null;
};
};
};
}
public function removeSelf():void{
Method.removeEnterframeObj(this);
parent.removeChild(this);
_skyBMD1.dispose();
_hillBMD1.dispose();
_earthBMD1.dispose();
_screenBMD1.dispose();
}
}
}//package com.macrojoy.zgd.scene
Section 178
//ForeGround (com.macrojoy.zgd.scene.ForeGround)
package com.macrojoy.zgd.scene {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.geom.*;
import com.macrojoy.zgd.display.*;
public class ForeGround extends Sprite implements IEnterframeObject {
private var _speedMultiplier:Number;// = 1
private var _poleWarningMC:MovieClip;
private var _plantX:uint;
private var _dis:uint;// = 130
private var _polePX:uint;
private var _poleHX:uint;
public function ForeGround(){
var _local1:Array;
_dis = 130;
_speedMultiplier = 1;
super();
_local1 = Data.getArrData("multiplierArr");
initLoad();
Method.addEnterframeObj(this);
}
private function initLoad():void{
var _local1:uint;
_local1 = Global.plantDis;
while (_local1 < Data.STAGE_WIDTH) {
if (Global.stage.quality.toLowerCase() == "high"){
addPlant("Plant", _local1);
};
_plantX = (_local1 + Global.plantDis);
_local1 = (_local1 + Global.plantDis);
};
_polePX = Global.polePDis;
_poleHX = 1500;
}
private function addPlant(_arg1:String, _arg2:int):void{
var _local3:Class;
var _local4:MovieClip;
var _local5:uint;
_local3 = Method.getClass1(_arg1);
_local4 = (new (_local3) as MovieClip);
addChild(_local4);
_local4.x = _arg2;
_local4.name = _arg1;
_local5 = 1;
if (_arg1 == "Plant"){
_local4.scaleX = (_local4.scaleY = ((Math.random() * 0.5) + 0.5));
_local5 = (Math.floor((Math.random() * _local4.totalFrames)) + 1);
};
_local4.gotoAndStop(_local5);
}
public function updateEvent():void{
if (!Global.gamePause){
moveChild();
};
}
private function moveChild():void{
var _local1:int;
var _local2:MovieClip;
var _local3:MovieClip;
var _local4:uint;
var _local5:BasicEnemyMC;
var _local6:Point;
x = (x + (Math.floor((Global.lensSpeed * _speedMultiplier)) * Global.lensDir));
_local1 = (numChildren - 1);
while (_local1 >= 0) {
_local2 = (getChildAt(_local1) as MovieClip);
if ((((((_local2.name == "PoleHit0")) || ((_local2.name == "PoleHit1")))) || ((_local2.name == "PoleHit2")))){
_local3 = (_local2.getChildByName("hit") as MovieClip);
_local4 = 0;
while (_local4 < Global.camp2Arr.length) {
_local5 = (Global.camp2Arr[_local4] as BasicEnemyMC);
if (((((((((((((((((((!((_local5 == null))) && ((_local5.getHp() > 0)))) && (!((_local5.currentLabel == "fall"))))) && (!((_local5.currentLabel == "f_down"))))) && (!((_local5.currentLabel == "f_earth"))))) && (!((_local5.currentLabel == "empty"))))) && (!((_local5.currentLabel == "disappear"))))) && (!((_local5.currentLabel == "appear1"))))) && (!((Global.hero.currentLabel == "divide"))))) && ((Global.gameStatus == "playing")))){
if (_local3.hitTestObject(_local5.hit)){
_local5.moveDis = int.MAX_VALUE;
_local5.hited("fall", Data.POLE_HIT_POWER, -1, 20);
Method.playSound(Data.KICK, 7, 1, Global.soundVolume);
Method.createEffect("HitEffect", _local5.myX, (_local5.myY - 60));
};
};
_local4++;
};
if (((((((((((((((((((!((Global.hero == null))) && ((Global.hero.getHp() > 0)))) && (!((Global.hero.currentLabel == "fall"))))) && (!((Global.hero.currentLabel == "f_down"))))) && (!((Global.hero.currentLabel == "f_earth"))))) && (!((Global.hero.currentLabel == "empty"))))) && (!((Global.hero.currentLabel == "disappear"))))) && (!((Global.hero.currentLabel == "appear1"))))) && (!((Global.hero.currentLabel == "divide"))))) && ((Global.gameStatus == "playing")))){
if (_local3.hitTestObject(Global.hero.hit)){
Global.hero.hited("fall", Data.POLE_HIT_POWER, -1, 20);
Method.playSound(Data.KICK, 7, 1, Global.soundVolume);
Method.createEffect("HitEffect", Global.hero.myX, (Global.hero.myY - 60));
Global.gamePauseTimer = 3;
Method.gamePause();
};
};
};
if (-(x) >= (_local2.x + _local2.width)){
removeChild(_local2);
if ((((((_local2.name == "PoleHit0")) || ((_local2.name == "PoleHit1")))) || ((_local2.name == "PoleHit2")))){
if (Global.isBonusMission){
_local6 = Global.mainBgCTN.globalToLocal(new Point(((Math.random() * 500) + 45), -50));
Method.createPresent(_local6.x, _local6.y, 0, 0, 1).bonusCount = true;
};
};
};
_local1--;
};
if ((-(x) + Data.STAGE_WIDTH) >= _plantX){
if (Global.stage.quality.toLowerCase() == "high"){
addPlant("Plant", _plantX);
};
_plantX = (_plantX + Global.plantDis);
};
if ((-(x) + Data.STAGE_WIDTH) >= _polePX){
addPlant("PolePresent", _polePX);
_polePX = (_polePX + Global.polePDis);
};
if ((-(x) + Data.STAGE_WIDTH) >= _poleHX){
if (_poleHX > 1500){
addPlant(("PoleHit" + Math.floor((Math.random() * 3)).toString()), _poleHX);
if (_poleWarningMC != null){
_poleWarningMC.parent.removeChild(_poleWarningMC);
_poleWarningMC = null;
};
};
_poleHX = (_poleHX + (Global.poleHDis * 2));
} else {
if ((-(x) + Data.STAGE_WIDTH) >= (_poleHX - Data.STAGE_WIDTH)){
if ((((((((_poleWarningMC == null)) && (!((Global.GIPanel == null))))) && ((_poleHX > 1500)))) && (!(Global.isBonusMission)))){
_poleWarningMC = (Method.createDisplayObj(PoleWarningMC, Global.GIPanel, -1, (Data.STAGE_WIDTH - 100), 150) as MovieClip);
};
};
};
}
public function removeSelf():void{
Method.removeEnterframeObj(this);
parent.removeChild(this);
}
}
}//package com.macrojoy.zgd.scene
Section 179
//AuthorWindow (com.macrojoy.zgd.ui.AuthorWindow)
package com.macrojoy.zgd.ui {
import flash.display.*;
import flash.text.*;
public class AuthorWindow extends Sprite {
public var closeBtn:SimpleButton;
public var inputTxt:TextField;
public var dragBtn:MovieClip;
public var okBtn:SimpleButton;
}
}//package com.macrojoy.zgd.ui
Section 180
//BonusOverPanel (com.macrojoy.zgd.ui.BonusOverPanel)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
public class BonusOverPanel extends MovieClip {
public function BonusOverPanel(){
addFrameScript(70, stopFrameScript);
addFrameScript((totalFrames - 1), lastFrameScript);
}
private function lastFrameScript():void{
stop();
removeSelf();
GameDesign.clearGame();
if (Global.testBonus){
Method.stopAllSound();
UIControl.createPanel("PanelMission");
Method.playSound("Title", 0, int.MAX_VALUE, Global.musicVolume);
} else {
GameDesign.newGame();
};
Global.retryTimes = 0;
}
private function stopFrameScript():void{
UserControl.stopControl();
Global.hero.victoryAction();
}
private function removeSelf():void{
if (parent != null){
parent.removeChild(this);
};
}
}
}//package com.macrojoy.zgd.ui
Section 181
//BonusShowPanel (com.macrojoy.zgd.ui.BonusShowPanel)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
public class BonusShowPanel extends MovieClip implements IObject {
public function BonusShowPanel(){
addFrameScript((totalFrames - 1), lastFrameScript);
}
private function lastFrameScript(){
stop();
removeSelf();
UserControl.control(Global.hero);
Global.GIPanel.startTimer();
}
public function removeSelf():void{
if (parent != null){
parent.removeChild(this);
};
}
}
}//package com.macrojoy.zgd.ui
Section 182
//CountDownPanel (com.macrojoy.zgd.ui.CountDownPanel)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
public class CountDownPanel extends MovieClip implements IObject {
public function CountDownPanel(){
super();
addFrameScript((totalFrames - 1), lastFrameScript);
addFrameScript(38, function (){
Method.playSound(Data.GUN_SOUND1, 2, 1, Global.soundVolume);
});
addFrameScript(40, function (){
Method.playSound(Data.GUN_SOUND1, 2, 1, Global.soundVolume);
});
addFrameScript(42, function (){
Method.playSound(Data.GUN_SOUND1, 2, 1, Global.soundVolume);
});
addFrameScript(44, function (){
Method.playSound(Data.GUN_SOUND1, 2, 1, Global.soundVolume);
});
addFrameScript(46, function (){
Method.playSound(Data.GUN_SOUND1, 2, 1, Global.soundVolume);
});
addFrameScript(48, function (){
Method.playSound(Data.GUN_SOUND1, 2, 1, Global.soundVolume);
});
addFrameScript(50, function (){
Method.playSound(Data.GUN_SOUND1, 2, 1, Global.soundVolume);
});
addFrameScript(52, function (){
Method.playSound(Data.GUN_SOUND1, 2, 1, Global.soundVolume);
});
}
private function lastFrameScript(){
removeSelf();
Global.GIPanel.startTimer();
}
public function removeSelf():void{
stop();
if (parent != null){
parent.removeChild(this);
};
}
}
}//package com.macrojoy.zgd.ui
Section 183
//KeyItem (com.macrojoy.zgd.ui.KeyItem)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.events.*;
import flash.text.*;
public class KeyItem extends MovieClip {
private var _targetName:String;
public var txt:TextField;
public function KeyItem(){
init();
buttonMode = true;
mouseChildren = false;
}
private function init():void{
_targetName = name;
currentKey();
}
function currentKey():void{
var _local1:uint;
_local1 = Global[(("key" + _targetName) + "Code")];
txt.text = getKeyName(_local1);
Global.stage.removeEventListener(KeyboardEvent.KEY_DOWN, checkKey);
}
private function checkKey(_arg1:KeyboardEvent):void{
var _local2:uint;
var _local3:Array;
var _local4:Boolean;
var _local5:uint;
var _local6:uint;
Method.playSound(Data.CLICK3, 2, 1, Global.soundVolume);
_local2 = _arg1.keyCode;
_local3 = Data.getArrData("keyNameArr");
_local4 = false;
_local5 = 0;
while (_local5 < _local3.length) {
if (_local3[_local5] != _targetName){
_local6 = Global[(("key" + _local3[_local5]) + "Code")];
if (_local6 == _local2){
_local4 = true;
break;
};
};
_local5++;
};
if (!_local4){
Method.setKey(_local2, _targetName);
txt.text = getKeyName(_local2);
Global.stage.removeEventListener(KeyboardEvent.KEY_DOWN, checkKey);
} else {
txt.text = "KEY USED";
};
}
private function getKeyName(_arg1:uint):String{
var _local2:Array;
var _local3:uint;
_local2 = Data.getArrData("keyInfoArr");
_local3 = 0;
while (_local3 < _local2.length) {
if (_local2[_local3][1] == _arg1){
return (_local2[_local3][0]);
};
_local3++;
};
return (null);
}
function defaultThis():void{
var _local1:uint;
_local1 = Data.getObjData("keyCode")[_targetName.toLowerCase()];
Method.setKey(_local1, _targetName);
txt.text = getKeyName(_local1);
}
function listen():void{
txt.text = "PRESS A KEY";
Global.stage.addEventListener(KeyboardEvent.KEY_DOWN, checkKey);
}
}
}//package com.macrojoy.zgd.ui
Section 184
//LosePanel (com.macrojoy.zgd.ui.LosePanel)
package com.macrojoy.zgd.ui {
public class LosePanel extends OverPanel {
}
}//package com.macrojoy.zgd.ui
Section 185
//NoisePanel (com.macrojoy.zgd.ui.NoisePanel)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
public class NoisePanel extends Sprite implements IEnterframeObject {
private var _bitMap:Bitmap;
private var _bitmapData:BitmapData;
private var _timer:uint;
public function NoisePanel(){
alpha = 70;
_bitmapData = new BitmapData(650, 500, false, 0xCCCCCC);
_bitMap = new Bitmap(_bitmapData);
addChild(_bitMap);
Method.addEnterframeObj(this);
}
public function updateEvent():void{
_bitmapData.noise((Math.random() * 128), 0, 225, 1, true);
_timer++;
if (_timer > 2){
_bitmapData.dispose();
Method.removeEnterframeObj(this);
removeSelf();
};
}
private function removeSelf():void{
parent.removeChild(this);
}
}
}//package com.macrojoy.zgd.ui
Section 186
//OverPanel (com.macrojoy.zgd.ui.OverPanel)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
public class OverPanel extends MovieClip {
public function OverPanel(){
addFrameScript((totalFrames - 1), lastFrameScript);
}
private function lastFrameScript():void{
stop();
removeSelf();
UIControl.createPanel("PanelResult");
}
private function removeSelf():void{
if (parent != null){
parent.removeChild(this);
};
}
}
}//package com.macrojoy.zgd.ui
Section 187
//PanelAuthor (com.macrojoy.zgd.ui.PanelAuthor)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.geom.*;
import flash.events.*;
public class PanelAuthor extends Sprite {
public var authorCTN:AuthorWindow;
private var _target:PanelEditor;
private function init():void{
authorCTN.inputTxt.text = "";
Global.stage.focus = authorCTN.inputTxt;
authorCTN.closeBtn.addEventListener(MouseEvent.CLICK, closeEvent);
authorCTN.dragBtn.addEventListener(MouseEvent.MOUSE_DOWN, dragBtnEvt);
authorCTN.okBtn.addEventListener(MouseEvent.CLICK, okEvt);
}
private function dragBtnEvt(_arg1:MouseEvent):void{
var _local2:Rectangle;
_local2 = new Rectangle(0, 0, (Data.STAGE_WIDTH - 239), (Data.STAGE_HEIGHT - 56));
authorCTN.startDrag(false, _local2);
Global.stage.addEventListener(MouseEvent.MOUSE_UP, upEvt);
}
private function upEvt(_arg1:MouseEvent):void{
authorCTN.stopDrag();
Global.stage.removeEventListener(MouseEvent.MOUSE_UP, upEvt);
}
private function okEvt(_arg1:MouseEvent):void{
if (authorCTN.inputTxt.text.length > 0){
removeSelf();
_target.creteEdit(authorCTN.inputTxt.text);
} else {
Global.stage.focus = authorCTN.inputTxt;
};
}
private function closeEvent(_arg1:MouseEvent):void{
removeSelf();
}
public function setTarget(_arg1:Sprite):void{
_target = (_arg1 as PanelEditor);
init();
}
public function removeSelf():void{
authorCTN.closeBtn.removeEventListener(MouseEvent.CLICK, closeEvent);
authorCTN.dragBtn.removeEventListener(MouseEvent.MOUSE_DOWN, dragBtnEvt);
authorCTN.okBtn.removeEventListener(MouseEvent.CLICK, okEvt);
parent.removeChild(this);
}
}
}//package com.macrojoy.zgd.ui
Section 188
//PanelEditEnemys (com.macrojoy.zgd.ui.PanelEditEnemys)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.geom.*;
import flash.events.*;
import flash.text.*;
public class PanelEditEnemys extends Sprite {
public var scrollBar:ScrollBar;
public var itemCTN:Sprite;
public var closeBtn:SimpleButton;
public var itemBtn:SimpleButton;
private var _clewTxt:TextField;
public var carriageCTN:Sprite;
public var enemyCTN:Sprite;
public var carriageBtn:SimpleButton;
private var _target:PanelEditTrain;
public var bgMC:MovieClip;
public var dragBtn:MovieClip;
public var enemyBtn:SimpleButton;
public function PanelEditEnemys(){
_target = (parent as PanelEditTrain);
init();
}
private function init():void{
closeBtn.addEventListener(MouseEvent.CLICK, closeEvent);
dragBtn.addEventListener(MouseEvent.MOUSE_DOWN, dragBtnEvt);
enemyEvt("add");
itemEvt("add");
carriageEvt("add");
showItem("carriage");
enemyBtn.addEventListener(MouseEvent.MOUSE_DOWN, menuBtnEvt);
itemBtn.addEventListener(MouseEvent.MOUSE_DOWN, menuBtnEvt);
carriageBtn.addEventListener(MouseEvent.MOUSE_DOWN, menuBtnEvt);
}
private function mouseOver(_arg1:MouseEvent):void{
var _local2:MovieClip;
var _local3:Array;
var _local4:uint;
var _local5:Point;
var _local6:TextFormat;
_local2 = (_arg1.currentTarget as MovieClip);
_local3 = _local2.name.split("_");
_local4 = uint(_local3[2]);
if (_clewTxt == null){
_clewTxt = new TextField();
_clewTxt.mouseEnabled = false;
addChild(_clewTxt);
_clewTxt.textColor = 0;
_clewTxt.background = true;
_clewTxt.backgroundColor = 16777185;
_clewTxt.border = true;
_clewTxt.borderColor = 0;
_clewTxt.autoSize = TextFieldAutoSize.LEFT;
_local6 = new TextFormat();
_local6.size = 12;
_local6.font = "Arial CE";
_clewTxt.setTextFormat(_local6);
};
switch (_local4){
case 1:
_clewTxt.text = " RUN OUT FROM LEFT SIDE ";
break;
case 2:
_clewTxt.text = " RUN OUT FROM RIGHT SIDE ";
break;
case 3:
_clewTxt.text = " CLIMB OUT FROM BEHIND THE TRAIN ";
break;
case 4:
_clewTxt.text = " RUN OUT FROM LEFT SIDE ON A HORSE ";
break;
case 5:
_clewTxt.text = " JUMP DOWN FROM LEFT SIDE ";
break;
case 6:
_clewTxt.text = " JUMP DOWN FROM RIGHT SIDE ";
break;
};
_clewTxt.x = ((_local2.x - (_local2.width / 2)) - 13);
_clewTxt.y = (_local2.y + enemyCTN.y);
_local5 = _clewTxt.parent.localToGlobal(new Point(_clewTxt.x, _clewTxt.y));
if ((_local5.x + _clewTxt.width) > (Data.STAGE_WIDTH - 20)){
_clewTxt.x = (_clewTxt.x - ((_local5.x + _clewTxt.width) - (Data.STAGE_WIDTH - 20)));
};
if ((_local5.y + _clewTxt.height) > (Data.STAGE_HEIGHT - 20)){
_clewTxt.y = (_clewTxt.y - ((_local5.y + _clewTxt.height) - (Data.STAGE_HEIGHT - 20)));
};
}
private function menuBtnEvt(_arg1:MouseEvent):void{
var _local2:String;
_local2 = _arg1.currentTarget.name;
_local2 = _local2.replace("Btn", "");
showItem(_local2);
}
private function enemyEvt(_arg1:String):void{
var _local2:uint;
var _local3:MovieClip;
var _local4:Array;
_local2 = 0;
while (_local2 < enemyCTN.numChildren) {
_local3 = (enemyCTN.getChildAt(_local2) as MovieClip);
if (_local3 != null){
_local4 = _local3.name.split("_");
_local3.gotoAndStop(_local4[2]);
_local3.buttonMode = true;
var _local5 = _local3;
_local5[(_arg1 + "EventListener")](MouseEvent.CLICK, enemyBtnEvt);
_local5 = _local3;
_local5[(_arg1 + "EventListener")](MouseEvent.MOUSE_OVER, mouseOver);
_local5 = _local3;
_local5[(_arg1 + "EventListener")](MouseEvent.MOUSE_OUT, mouseOut);
};
_local2++;
};
}
private function carriageEvt(_arg1:String):void{
var _local2:uint;
var _local3:SimpleButton;
_local2 = 0;
while (_local2 < carriageCTN.numChildren) {
_local3 = (carriageCTN.getChildAt(_local2) as SimpleButton);
if (_local3 != null){
var _local4 = _local3;
_local4[(_arg1 + "EventListener")](MouseEvent.CLICK, itemBtnEvt);
};
_local2++;
};
}
private function upEvt(_arg1:MouseEvent):void{
this.stopDrag();
Global.stage.removeEventListener(MouseEvent.MOUSE_UP, upEvt);
}
private function mouseOut(_arg1:MouseEvent):void{
removeChild(_clewTxt);
_clewTxt = null;
}
private function dragBtnEvt(_arg1:MouseEvent):void{
var _local2:Rectangle;
_local2 = new Rectangle(0, 0, (Data.STAGE_WIDTH - 528), (Data.STAGE_HEIGHT - 458));
this.startDrag(false, _local2);
Global.stage.addEventListener(MouseEvent.MOUSE_UP, upEvt);
}
private function closeEvent(_arg1:MouseEvent):void{
_target.showMiniMC();
visible = false;
_target.showButton();
_target.mouseable();
_target.moveable = true;
}
private function enemyBtnEvt(_arg1:MouseEvent):void{
var _local2:MovieClip;
var _local3:Array;
_local2 = (_arg1.currentTarget as MovieClip);
_local3 = _local2.name.split("_");
_target.createEnemys(_local3[1], _local3[2]);
visible = false;
_target.showMiniMC();
_target.mouseable();
_target.moveable = true;
}
private function showItem(_arg1:String):void{
switch (_arg1){
case "enemy":
bgMC.gotoAndStop("enemy");
enemyCTN.visible = true;
carriageCTN.visible = false;
itemCTN.visible = false;
scrollBar.init(enemyCTN, 10);
break;
case "carriage":
bgMC.gotoAndStop("carriage");
enemyCTN.visible = false;
carriageCTN.visible = true;
itemCTN.visible = false;
scrollBar.init(carriageCTN, 10);
break;
case "item":
bgMC.gotoAndStop("item");
enemyCTN.visible = false;
carriageCTN.visible = false;
itemCTN.visible = true;
scrollBar.init(itemCTN, 10);
break;
};
}
private function itemEvt(_arg1:String):void{
var _local2:uint;
var _local3:SimpleButton;
_local2 = 0;
while (_local2 < itemCTN.numChildren) {
_local3 = (itemCTN.getChildAt(_local2) as SimpleButton);
if (_local3 != null){
var _local4 = _local3;
_local4[(_arg1 + "EventListener")](MouseEvent.CLICK, itemBtnEvt);
};
_local2++;
};
}
private function itemBtnEvt(_arg1:MouseEvent):void{
var _local2:String;
_local2 = _arg1.currentTarget.name;
_target.createItem(_local2);
visible = false;
_target.showMiniMC();
_target.mouseable();
_target.moveable = true;
}
public function removeSelf():void{
closeBtn.removeEventListener(MouseEvent.CLICK, closeEvent);
_target = null;
enemyEvt("remove");
itemEvt("remove");
carriageEvt("remove");
scrollBar.removeEvent();
parent.removeChild(this);
}
}
}//package com.macrojoy.zgd.ui
Section 189
//PanelEditor (com.macrojoy.zgd.ui.PanelEditor)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.events.*;
import flash.text.*;
public class PanelEditor extends Sprite {
public var backBtn:SimpleButton;
public var loadEditBtn:SimpleButton;
public var mission3MC:MovieClip;
public var mission2MC:MovieClip;
public var mission6MC:MovieClip;
public var mission1MC:MovieClip;
public var inputTxt:TextField;
public var mission5MC:MovieClip;
public var mission4MC:MovieClip;
public var loadPlayBtn:SimpleButton;
public var tipTxt:TextField;
public var loadSaveBtn:SimpleButton;
public function PanelEditor(){
init();
}
private function backEvent(_arg1:MouseEvent):void{
removeSelf();
UIControl.createPanel("PanelTitle");
Method.shineScreen();
Method.playSound("Title", 0, int.MAX_VALUE, Global.musicVolume);
}
private function inputAuthor(_arg1:MouseEvent):void{
var _local2:MovieClip;
var _local3:uint;
var _local4:PanelAuthor;
_local2 = (_arg1.currentTarget as MovieClip);
_local3 = Number(_local2.name.charAt(7));
Global.currentMission = (_local3 + Data.MISSION_NUM);
_local4 = (UIControl.createPanel("PanelAuthor") as PanelAuthor);
_local4.setTarget(this);
}
private function init():void{
var _local1:uint;
var _local2:MovieClip;
backBtn.addEventListener(MouseEvent.CLICK, backEvent);
_local1 = 1;
while (_local1 <= 6) {
_local2 = (getChildByName((("mission" + _local1.toString()) + "MC")) as MovieClip);
if (Global[("myMission" + _local1)] == null){
showCreate(_local2);
} else {
showEdit(_local2);
};
_local1++;
};
disableButton(loadEditBtn);
disableButton(loadSaveBtn);
disableButton(loadPlayBtn);
inputTxt.text = "";
Global.stage.focus = inputTxt;
inputTxt.addEventListener(Event.CHANGE, textChange);
}
private function saveLoad():void{
var _local1:uint;
var _local2:MovieClip;
_local1 = 1;
while (_local1 <= 6) {
if (Global[("myMission" + _local1)] == null){
if (Number(inputTxt.text) <= Data.MISSION_NUM){
Method.saveMissionData(Data[(("mission" + inputTxt.text) + "Str")], _local1);
} else {
Method.saveMissionData(inputTxt.text, _local1);
};
_local2 = (getChildByName((("mission" + _local1.toString()) + "MC")) as MovieClip);
showEdit(_local2);
break;
};
_local1++;
};
inputTxt.text = "";
textChange(null);
Global.stage.focus = inputTxt;
}
private function editLoad():void{
var _local1:String;
if (Number(inputTxt.text) <= Data.MISSION_NUM){
_local1 = Data[(("mission" + inputTxt.text) + "Str")];
} else {
_local1 = inputTxt.text;
};
Global.currentMission = (7 + Data.MISSION_NUM);
startEdit(_local1, null);
}
private function editMission(_arg1:MouseEvent):void{
var _local2:SimpleButton;
var _local3:MovieClip;
var _local4:uint;
_local2 = (_arg1.currentTarget as SimpleButton);
_local3 = (_local2.parent.parent as MovieClip);
_local4 = Number(_local3.name.charAt(7));
switch (_local2.name){
case "deleteBtn":
showCreate(_local3);
Method.saveMissionData(null, _local4);
textChange(null);
_arg1.stopPropagation();
break;
case "editBtn":
Global.currentMission = (_local4 + Data.MISSION_NUM);
startEdit(Global[("myMission" + _local4)], null);
break;
case "playBtn":
Global.missionData = Global[("myMission" + _local4)];
removeSelf();
Global.currentMission = (_local4 + Data.MISSION_NUM);
Global.difficulty = 2;
Global.score = 0;
GameDesign.newGame();
break;
};
}
private function ableButton(_arg1:SimpleButton):void{
_arg1.enabled = true;
_arg1.alpha = 1;
_arg1.addEventListener(MouseEvent.CLICK, buttonClick);
}
private function playLoad():void{
removeSelf();
Global.currentMission = (7 + Data.MISSION_NUM);
Global.missionData = inputTxt.text;
if (Number(inputTxt.text) <= Data.MISSION_NUM){
Global.missionData = Data[(("mission" + inputTxt.text) + "Str")];
} else {
Global.missionData = inputTxt.text;
};
Global.difficulty = 2;
Global.score = 0;
GameDesign.newGame();
}
private function textChange(_arg1:Event):void{
var _local2:String;
var _local3:Boolean;
var _local4:Array;
_local2 = inputTxt.text;
_local4 = Method.resolveMissionStr(_local2);
if (_local2 == ""){
tipTxt.text = "";
} else {
if (((((((Data.GAME_TESTING) && ((_local2.length <= 2)))) && ((uint(_local2) > 0)))) && ((uint(_local2) <= Data.MISSION_NUM)))){
tipTxt.text = "EDIT OFFICIAL MISSION";
_local3 = true;
} else {
if (_local4 != null){
if (_local4[5] != Data.VERSION){
tipTxt.text = "VERSION ERROR";
} else {
tipTxt.text = "";
_local3 = true;
};
} else {
tipTxt.text = "WRONG LEVEL INFORMATION";
};
};
};
if (_local3){
ableButton(loadEditBtn);
ableButton(loadPlayBtn);
if ((((((((((((Global.myMission1 == null)) || ((Global.myMission2 == null)))) || ((Global.myMission3 == null)))) || ((Global.myMission4 == null)))) || ((Global.myMission5 == null)))) || ((Global.myMission6 == null)))){
ableButton(loadSaveBtn);
} else {
tipTxt.text = "NO MORE SAVE SLOT";
};
} else {
disableButton(loadEditBtn);
disableButton(loadSaveBtn);
disableButton(loadPlayBtn);
};
}
private function disableButton(_arg1:SimpleButton):void{
_arg1.enabled = false;
_arg1.alpha = 0.5;
_arg1.removeEventListener(MouseEvent.CLICK, buttonClick);
}
function creteEdit(_arg1:String):void{
startEdit(null, _arg1);
}
private function buttonClick(_arg1:MouseEvent):void{
var _local2:SimpleButton;
_local2 = (_arg1.currentTarget as SimpleButton);
switch (_local2.name){
case "loadEditBtn":
editLoad();
break;
case "loadSaveBtn":
saveLoad();
break;
case "loadPlayBtn":
playLoad();
break;
};
}
private function showCreate(_arg1:MovieClip):void{
var _local2:SimpleButton;
var _local3:MovieClip;
var _local4:SimpleButton;
var _local5:SimpleButton;
var _local6:SimpleButton;
_arg1.addEventListener(MouseEvent.CLICK, inputAuthor);
_local2 = (_arg1.getChildByName("createBtn") as SimpleButton);
_local3 = (_arg1.getChildByName("editMC") as MovieClip);
_local2.visible = true;
_local3.visible = false;
_local4 = (_local3.getChildByName("deleteBtn") as SimpleButton);
_local5 = (_local3.getChildByName("editBtn") as SimpleButton);
_local6 = (_local3.getChildByName("playBtn") as SimpleButton);
_local4.removeEventListener(MouseEvent.CLICK, editMission);
_local5.removeEventListener(MouseEvent.CLICK, editMission);
_local6.removeEventListener(MouseEvent.CLICK, editMission);
}
private function showEdit(_arg1:MovieClip):void{
var _local2:SimpleButton;
var _local3:MovieClip;
var _local4:TextField;
var _local5:uint;
var _local6:Array;
var _local7:TextField;
var _local8:SimpleButton;
var _local9:SimpleButton;
var _local10:SimpleButton;
_arg1.removeEventListener(MouseEvent.CLICK, inputAuthor);
_local2 = (_arg1.getChildByName("createBtn") as SimpleButton);
_local3 = (_arg1.getChildByName("editMC") as MovieClip);
_local2.visible = false;
_local3.visible = true;
_local4 = (_local3.getChildByName("authorTxt") as TextField);
_local5 = Number(_arg1.name.charAt(7));
_local6 = Method.resolveMissionStr(Global[("myMission" + _local5)]);
_local4.text = _local6[4];
_local7 = (_local3.getChildByName("timeTxt") as TextField);
_local7.text = _local6[6];
_local8 = (_local3.getChildByName("deleteBtn") as SimpleButton);
_local9 = (_local3.getChildByName("editBtn") as SimpleButton);
_local10 = (_local3.getChildByName("playBtn") as SimpleButton);
_local8.addEventListener(MouseEvent.CLICK, editMission);
_local9.addEventListener(MouseEvent.CLICK, editMission);
_local10.addEventListener(MouseEvent.CLICK, editMission);
}
private function startEdit(_arg1:String, _arg2:String):void{
var _local3:Array;
var _local4:PanelEditTrain;
removeSelf();
Method.deleteMask();
_local3 = Method.resolveMissionStr(_arg1);
_local4 = (UIControl.createPanel("PanelEditTrain") as PanelEditTrain);
_local4.init(_local3, _arg2);
}
public function removeSelf():void{
backBtn.removeEventListener(MouseEvent.CLICK, backEvent);
parent.removeChild(this);
}
}
}//package com.macrojoy.zgd.ui
Section 190
//PanelEditorTrace (com.macrojoy.zgd.ui.PanelEditorTrace)
package com.macrojoy.zgd.ui {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class PanelEditorTrace extends Sprite {
public var closeBtn:SimpleButton;
public var txt:TextField;
public function PanelEditorTrace(){
init();
}
private function init():void{
closeBtn.addEventListener(MouseEvent.CLICK, closeEvent);
}
private function closeEvent(_arg1:MouseEvent):void{
dispatchEvent(new Event("closed"));
removeSelf();
}
public function removeSelf():void{
closeBtn.removeEventListener(MouseEvent.CLICK, closeEvent);
parent.removeChild(this);
}
public function myTrace(_arg1:String):void{
txt.text = _arg1;
}
}
}//package com.macrojoy.zgd.ui
Section 191
//PanelEditScene (com.macrojoy.zgd.ui.PanelEditScene)
package com.macrojoy.zgd.ui {
import fl.controls.*;
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.geom.*;
import flash.events.*;
public class PanelEditScene extends Sprite {
private var _radioGroup:RadioButtonGroup;
public var pole2CBox:ComboBox;
private var _labelArr:Array;
public var closeBtn:SimpleButton;
private var _initData:Array;
public var plantCBox:ComboBox;
public var pole1CBox:ComboBox;
private var _timeLabel:Array;
private var _target:PanelEditTrain;
public var dragBtn:MovieClip;
public var timeCBox:ComboBox;
public var radioBtn2:RadioButton;
public var radioBtn1:RadioButton;
public var radioBtn3:RadioButton;
public function PanelEditScene(){
_labelArr = ["3", "2", "1", "0"];
_timeLabel = ["6 MINS", "9 MINS", "12 MINS", "15 MINS", "18 MINS", "21 MINS", "24 MINS"];
super();
getChildren();
}
private function init():void{
closeBtn.addEventListener(MouseEvent.CLICK, closeEvent);
radioBtn1.value = 1;
radioBtn1.label = "";
radioBtn2.value = 2;
radioBtn2.label = "";
radioBtn3.value = 3;
radioBtn3.label = "";
_radioGroup.addEventListener(MouseEvent.CLICK, skyEvt);
_radioGroup.selection = RadioButton(this[("radioBtn" + _initData[0])]);
dragBtn.addEventListener(MouseEvent.MOUSE_DOWN, dragBtnEvt);
addItems(plantCBox, _initData[1], _labelArr);
addItems(pole1CBox, _initData[2], _labelArr);
addItems(pole2CBox, _initData[3], _labelArr);
addItems(timeCBox, _initData[4], _timeLabel);
}
private function skyEvt(_arg1:MouseEvent):void{
_target.setSky(uint(_radioGroup.selection.value));
}
private function upEvt(_arg1:MouseEvent):void{
this.stopDrag();
Global.stage.removeEventListener(MouseEvent.MOUSE_UP, upEvt);
}
private function dragBtnEvt(_arg1:MouseEvent):void{
var _local2:Rectangle;
_local2 = new Rectangle(-104, -20, (Data.STAGE_WIDTH - 443), (Data.STAGE_HEIGHT - 419));
this.startDrag(false, _local2);
Global.stage.addEventListener(MouseEvent.MOUSE_UP, upEvt);
}
private function getChildren():void{
_radioGroup = radioBtn1.group;
}
private function comboBoxEvt(_arg1:Event):void{
var _local2:ComboBox;
var _local3:uint;
_local2 = (_arg1.currentTarget as ComboBox);
if (_local2.name == "plantCBox"){
_local3 = _labelArr.indexOf(_local2.selectedLabel);
_target.setPlant(_local3);
} else {
if (_local2.name == "pole1CBox"){
_local3 = _labelArr.indexOf(_local2.selectedLabel);
_target.setPole1(_local3);
} else {
if (_local2.name == "pole2CBox"){
_local3 = _labelArr.indexOf(_local2.selectedLabel);
_target.setPole2(_local3);
} else {
if (_local2.name == "timeCBox"){
_local3 = _timeLabel.indexOf(_local2.selectedLabel);
_target.setTime(_local3);
};
};
};
};
}
private function closeEvent(_arg1:MouseEvent):void{
removeSelf();
Global.stage.focus = null;
_target.showButton();
_target.mouseable();
_target.moveable = true;
}
public function setTarget(_arg1:Sprite, _arg2:Array):void{
_target = (_arg1 as PanelEditTrain);
_initData = _arg2;
init();
}
private function addItems(_arg1:ComboBox, _arg2:uint, _arg3:Array):void{
var _local4:uint;
_local4 = 0;
while (_local4 < _arg3.length) {
_arg1.addItem({label:_arg3[_local4]});
_local4++;
};
_arg1.selectedIndex = _arg2;
_arg1.addEventListener(Event.CHANGE, comboBoxEvt);
}
public function removeSelf():void{
closeBtn.removeEventListener(MouseEvent.CLICK, closeEvent);
_radioGroup.removeEventListener(MouseEvent.CLICK, skyEvt);
plantCBox.removeEventListener(Event.CHANGE, comboBoxEvt);
pole1CBox.removeEventListener(Event.CHANGE, comboBoxEvt);
pole2CBox.removeEventListener(Event.CHANGE, comboBoxEvt);
_radioGroup = null;
parent.removeChild(this);
}
}
}//package com.macrojoy.zgd.ui
Section 192
//PanelEditTrain (com.macrojoy.zgd.ui.PanelEditTrain)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.geom.*;
import com.macrojoy.zgd.display.*;
import flash.events.*;
import flash.text.*;
import flash.system.*;
import flash.filters.*;
import flash.ui.*;
public class PanelEditTrain extends Sprite implements IEnterframeObject {
private var _bgNum:uint;
private var _scalePoint:Point;
private var _skyOrder:uint;// = 2
private var _pole2Dis:uint;// = 5000
private var _COrderArr:Array;
private var _enemysNum:uint;
public var miniMC:MovieClip;
public var sceneBtn:SimpleButton;
private var _skyCTN:Sprite;
private var _trainCTN:Sprite;
private var _editCTN:Sprite;
private var _miniIsDrag:Boolean;
private var _miniDragBtn:MovieClip;
private var _roleCTN:Sprite;
private var _trainArr:Array;
private var _MouseUI:MovieClip;
public var moveable:Boolean;
public var deleteBtn:SimpleButton;
private var _author:String;
private var _delete:Boolean;
private var _earthCTN:Sprite;
public var traceBtn:SimpleButton;
private var _hillCTN:Sprite;
private var _enemysArr:Array;
private var _arrowheadMC:MovieClip;
private var _plantCTN:Sprite;
private var _carriageNum:uint;
private var _timeArr:Array;
private var _enemyTxt:TextField;
public var menuMC:PanelEditEnemys;
private var _dragPoint:Point;
private var _gameTime:uint;// = 6
private var _trainLength:uint;
private var _plantArr:Array;
private var _thingsArr:Array;
private var _maxBtn:SimpleButton;
private var _plantDis:uint;// = 600
private var _dragTarget:Sprite;
private var _pole1Arr:Array;
private var _dragAdjust:Point;
private var _bossNum:uint;
public var quitBtn:SimpleButton;
public var saveBtn:SimpleButton;
private var _vergeTimer:uint;
private var _pole1Dis:uint;// = 3000
private var _dir:int;
private var _pole2Arr:Array;
private var _rectangle:Rectangle;
public function PanelEditTrain(){
_trainArr = [[0, 13], [400, 12]];
_enemysArr = [];
_thingsArr = [];
_skyOrder = 2;
_plantDis = 600;
_plantArr = [500, 600, 700, int.MAX_VALUE];
_pole1Dis = 3000;
_pole1Arr = [2000, 3000, 4000, int.MAX_VALUE];
_pole2Dis = 5000;
_pole2Arr = [3000, 5000, 7000, int.MAX_VALUE];
_gameTime = Data.GAME_TIME;
_timeArr = [6, 9, 12, 15, 18, 21, 24];
_scalePoint = new Point(325, 250);
_COrderArr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15];
super();
Method.addEnterframeObj(this);
moveable = true;
}
function createEnemys(_arg1:uint, _arg2:uint):void{
var _local3:String;
var _local4:Class;
var _local5:MovieClip;
_local3 = ("enemyMC_" + _arg1.toString());
_local4 = Method.getClass1(_local3);
_local5 = (Method.createDisplayObj(_local4, _roleCTN, -1, _trainCTN.mouseX, _trainCTN.mouseY) as MovieClip);
_local5.gotoAndStop(_arg2);
_local5.name = ((_local3 + "_") + _arg2.toString());
_dragTarget = _local5;
_dragAdjust = new Point((_dragTarget.x - _dragTarget.parent.mouseX), (_dragTarget.y - _dragTarget.parent.mouseY));
_local5.buttonMode = true;
_local5.mouseChildren = false;
addGlow(_local5);
_local5.addEventListener(MouseEvent.CLICK, clickEvt);
}
private function updateThingsIndex():void{
var _local1:Array;
var _local2:Array;
var _local3:Array;
var _local4:BasicThingMC;
var _local5:uint;
var _local6:BasicThingMC;
var _local7:Number;
var _local8:Array;
var _local9:uint;
var _local10:uint;
var _local11:MovieClip;
var _local12:Array;
var _local13:uint;
_local1 = new Array();
_local2 = new Array();
_local3 = new Array();
_local5 = 0;
while (_local5 < _roleCTN.numChildren) {
_local11 = (_roleCTN.getChildAt(_local5) as MovieClip);
if ((_local11 is BasicThingMC)){
_local1.push(_local11);
} else {
_local12 = _local11.name.split("_");
if ((((_local12.length > 1)) && ((uint(_local12[2]) == 3)))){
_local2.push(_local11);
};
};
_local5++;
};
if (_local1.length == 0){
return;
};
_local1.sortOn("y", Array.NUMERIC);
_local6 = (_local1[0] as BasicThingMC);
_local7 = _local6.y;
_local8 = new Array();
_local9 = 0;
while (_local9 < _local1.length) {
_local4 = (_local1[_local9] as BasicThingMC);
if (Math.abs((_local4.y - _local7)) < 25){
_local8.push(_local4);
} else {
_local8.sortOn("x", Array.NUMERIC);
_local13 = 0;
while (_local13 < _local8.length) {
_local3.push(_local8[_local13]);
_local13++;
};
_local8 = [];
_local8.push(_local4);
_local7 = _local4.y;
};
_local9++;
};
_local8.sortOn("x", Array.NUMERIC);
_local10 = 0;
while (_local10 < _local8.length) {
_local3.push(_local8[_local10]);
_local10++;
};
_local3.reverse();
_local3 = _local2.concat(_local3);
_local5 = 0;
while (_local5 < _local3.length) {
_roleCTN.setChildIndex(_local3[_local5], _local5);
_local5++;
};
}
private function checkEnemyFull(_arg1:Sprite):Boolean{
var _local2:Sprite;
var _local3:Array;
var _local4:uint;
var _local5:int;
_local4 = 0;
_local5 = (_roleCTN.numChildren - 1);
while (_local5 >= 0) {
_local2 = (_roleCTN.getChildAt(_local5) as Sprite);
if (_local2 != _arg1){
_local3 = _local2.name.split("_");
if (_local3.length > 1){
if (Math.abs((_local2.x - _arg1.x)) <= (Data.STAGE_WIDTH / 2)){
_local4++;
};
};
};
_local5--;
};
if (_local4 >= 10){
showTip(Data.PHRASE3);
return (true);
};
_local3 = _arg1.name.split("_");
if (_local3[1] >= 13){
if (_bossNum >= 6){
showTip(Data.PHRASE2);
return (true);
};
};
return (false);
}
private function mouseMove(_arg1:MouseEvent):void{
var _local2:Boolean;
var _local3:Sprite;
var _local4:int;
var _local5:Class;
if (_dragTarget != null){
if (_dragTarget.name == "carriage"){
_local4 = (_trainCTN.numChildren - 1);
while (_local4 >= 0) {
_local3 = (_trainCTN.getChildAt(_local4) as Sprite);
if (_local3 != _dragTarget){
if ((((((_trainCTN.mouseX <= (_local3.x + 200))) && ((_trainCTN.mouseX >= (_local3.x - 100))))) && ((_trainCTN.mouseX > 200)))){
if (_local3.name == "carriage"){
_local2 = true;
break;
};
};
};
_local4--;
};
if (_local2){
if (_arrowheadMC == null){
_local5 = Method.getClass1("Arrowhead");
_arrowheadMC = (Method.createDisplayObj(_local5, _trainCTN, -1, (_local3.x + 50), -100) as MovieClip);
_arrowheadMC.mouseChildren = false;
_arrowheadMC.mouseEnabled = false;
};
_arrowheadMC.x = (_local3.x + 50);
} else {
if (_arrowheadMC != null){
_trainCTN.removeChild(_arrowheadMC);
_arrowheadMC = null;
};
};
};
};
}
private function initLoad():void{
var _local1:TextFormat;
_trainCTN = (Method.createDisplayObj(Sprite, _editCTN, -1, 0, 375) as Sprite);
_roleCTN = (Method.createDisplayObj(Sprite, _editCTN, -1, 0, 375) as Sprite);
Method.setColor(_trainCTN, _skyOrder);
Method.setColor(_roleCTN, _skyOrder);
loadTrain();
loadScene();
loadEnemys();
loadThings();
updateThingsIndex();
_enemyTxt = new TextField();
_enemyTxt.selectable = false;
_enemyTxt.autoSize = "right";
_enemyTxt.background = true;
_enemyTxt.backgroundColor = 0;
_enemyTxt.htmlText = (("<font color='#FFFFFF'> ENEMY : " + _enemysNum.toString()) + " </font>");
_local1 = new TextFormat();
_local1.size = 12;
_local1.font = "Arial CE";
_local1.align = "right";
_enemyTxt.setTextFormat(_local1);
addChild(_enemyTxt);
_enemyTxt.x = (Data.STAGE_WIDTH - _enemyTxt.width);
}
private function getMissionData():String{
var _local1:String;
var _local2:String;
var _local3:String;
var _local4:String;
var _local5:String;
var _local6:Sprite;
var _local7:int;
var _local8:Array;
var _local9:String;
var _local10:String;
var _local11:Date;
var _local12:String;
var _local13:Array;
_local1 = new String();
_local2 = new String();
_local2 = (_local2 + (((((((((_skyOrder.toString() + ",") + _plantDis.toString()) + ",") + _pole1Dis) + ",") + _pole2Dis) + ",") + _gameTime) + ";"));
_local3 = new String();
_local4 = new String();
_local5 = new String();
_local7 = (_trainCTN.numChildren - 1);
while (_local7 >= 0) {
_local6 = (_trainCTN.getChildAt(_local7) as Sprite);
if (_local6.name == "carriage"){
_local3 = (_local3 + (((((_local6.x.toString() + ",") + _local6.getChildAt(0).name) + ",") + _local6.width) + "_"));
};
_local7--;
};
_local7 = (_roleCTN.numChildren - 1);
while (_local7 >= 0) {
_local6 = (_roleCTN.getChildAt(_local7) as Sprite);
_local13 = _local6.name.split("_");
if (_local13.length == 3){
_local4 = (_local4 + (((((((_local13[2] + ",") + _local6.x) + ",") + _local6.y) + ",") + _local13[1]) + "_"));
} else {
_local5 = (_local5 + (((((((_local6.name + ",") + _local6.x) + ",") + _local6.y) + ",") + _local6.width) + "_"));
};
_local7--;
};
_local2 = (_local2 + (_local3.substr(0, (_local3.length - 1)) + ";"));
_local2 = (_local2 + (_local4.substr(0, (_local4.length - 1)) + ";"));
_local2 = (_local2 + (_local5.substr(0, (_local5.length - 1)) + ";"));
_local8 = Data.VERSION.split(".");
_local9 = ((_local8[0] + ".") + _local8[1]);
_local10 = Method.getCheckCode(_local2, _author, _local9);
_local2 = (_local2 + (_local10 + ";"));
_local11 = new Date();
_local12 = ((((_local11.date.toString() + "/") + (_local11.month + 1).toString()) + "/") + _local11.fullYear.toString());
_local2 = (_local2 + _local12);
_local2 = escape(_local2);
_local2 = Method.myEscape(_local2);
_local1 = (((((("<AUTHOR:" + _author) + "><VERSION:") + Data.VERSION) + "><DATA:") + _local2) + ">");
System.setClipboard(_local1);
return (_local1);
}
private function putToCarr(_arg1:Sprite):void{
var _local2:Point;
var _local3:int;
var _local4:Sprite;
var _local5:Sprite;
var _local6:Sprite;
var _local7:Sprite;
var _local8:Sprite;
var _local9:Boolean;
_local2 = _roleCTN.localToGlobal(new Point(_arg1.x, _arg1.y));
if (_arg1.name.split("_").length <= 1){
_local9 = true;
_local8 = (_arg1.getChildByName("hit") as Sprite);
};
_local3 = (_trainCTN.numChildren - 1);
while (_local3 >= 0) {
_local4 = (_trainCTN.getChildAt(_local3) as Sprite);
if (_local4 != _arg1){
if (_local4.name == "carriage"){
_local5 = (_local4.getChildAt(0) as Sprite);
_local6 = (_local5.getChildByName("step1") as Sprite);
if (((!((_local6 == null))) && (((_local6.hitTestPoint(_local2.x, _local2.y, true)) || (((_local9) && (((_local6.hitTestPoint(((_local2.x - (_local8.width / 2)) + 20), _local2.y, true)) || (_local6.hitTestPoint(((_local2.x + (_local8.width / 2)) - 20), _local2.y, true)))))))))){
_arg1.y = (_arg1.y - 1);
putToCarr(_arg1);
return;
};
};
};
_local3--;
};
_local3 = (_roleCTN.numChildren - 1);
while (_local3 >= 0) {
_local4 = (_roleCTN.getChildAt(_local3) as Sprite);
if (_local4 != _arg1){
if ((_local4 is BasicThingMC)){
_local7 = (_local4.getChildByName("hit") as MovieClip);
if (((_local7.hitTestPoint(_local2.x, _local2.y)) || (((_local9) && (((_local7.hitTestPoint(((_local2.x - (_local8.width / 2)) + 20), _local2.y)) || (_local7.hitTestPoint(((_local2.x + (_local8.width / 2)) - 20), _local2.y)))))))){
_arg1.y = ((_local4.y - _local7.height) - 1);
putToCarr(_arg1);
return;
};
};
};
_local3--;
};
_local3 = (_trainCTN.numChildren - 1);
while (_local3 >= 0) {
_local4 = (_trainCTN.getChildAt(_local3) as Sprite);
if (_local4 != _arg1){
if (_local4.name == "carriage"){
_local5 = (_local4.getChildAt(0) as Sprite);
_local6 = (_local5.getChildByName("step1") as Sprite);
if (((!((_local6 == null))) && (((_local6.hitTestPoint(_local2.x, (_local2.y + 1), true)) || (((_local9) && (((_local6.hitTestPoint(((_local2.x - (_local8.width / 2)) + 20), (_local2.y + 1), true)) || (_local6.hitTestPoint(((_local2.x + (_local8.width / 2)) - 20), (_local2.y + 1), true)))))))))){
_arg1.y = (_arg1.y + 1);
if (((_local9) && (((_arg1.y - _local8.height) < -350)))){
deleteBasic(_arg1);
showTip(Data.PHRASE7);
return;
};
return;
};
};
};
_local3--;
};
_local3 = (_roleCTN.numChildren - 1);
while (_local3 >= 0) {
_local4 = (_roleCTN.getChildAt(_local3) as Sprite);
if (_local4 != _arg1){
if ((_local4 is BasicThingMC)){
_local7 = (_local4.getChildByName("hit") as MovieClip);
if (((_local7.hitTestPoint(_local2.x, (_local2.y + 1))) || (((_local9) && (((_local7.hitTestPoint(((_local2.x - (_local8.width / 2)) + 20), (_local2.y + 1))) || (_local7.hitTestPoint(((_local2.x + (_local8.width / 2)) - 20), (_local2.y + 1))))))))){
_arg1.y = (_arg1.y + 1);
if (((_local9) && (((_arg1.y - _local8.height) < -350)))){
deleteBasic(_arg1);
showTip(Data.PHRASE7);
return;
};
if (_arg1.name.indexOf("Grass") != -1){
deleteBasic(_arg1);
showTip(Data.PHRASE1);
return;
};
return;
};
};
};
_local3--;
};
_arg1.y = (_arg1.y + (20 * _dir));
if (_arg1.y > 36){
_dir = -1;
};
if (_arg1.y < -550){
deleteBasic(_arg1);
showTip(Data.PHRASE1);
} else {
putToCarr(_arg1);
};
}
private function doubleClickEvt(_arg1:MouseEvent):void{
var _local2:Sprite;
_local2 = (_arg1.currentTarget as Sprite);
if (_local2 != null){
if (_local2.name == "carriage"){
changeCarr(_local2);
};
};
}
function createItem(_arg1:String):void{
var _local2:String;
var _local3:String;
var _local4:Class;
var _local5:Sprite;
var _local6:Sprite;
_local2 = _arg1.substr(0, 8);
_local3 = _arg1;
if (_local2 == "Carriage"){
_local4 = Method.getClass1((_local3 + "MC"));
_local6 = (Method.createDisplayObj(Sprite, _trainCTN, -1, _trainCTN.mouseX, _trainCTN.mouseY) as Sprite);
_local5 = (Method.createDisplayObj(_local4, _local6) as Sprite);
_local6.x = (_local6.x - (_local6.width / 2));
_local6.y = (_local6.y - (_local6.height / 2));
_local6.name = "carriage";
_local5.name = _arg1.replace("Carriage", "");
addGlow(_local6);
hideButton();
_local6.addEventListener(MouseEvent.CLICK, clickEvt);
_dragTarget = _local6;
_dragAdjust = new Point((_dragTarget.x - _dragTarget.parent.mouseX), (_dragTarget.y - _dragTarget.parent.mouseY));
} else {
_local4 = Method.getClass1(_local3);
_local5 = (Method.createDisplayObj(_local4, _roleCTN, -1, _trainCTN.mouseX, _trainCTN.mouseY) as Sprite);
_local5.buttonMode = true;
_local5.mouseChildren = false;
hideButton();
_local5.addEventListener(MouseEvent.CLICK, clickEvt);
_dragTarget = (_local5 as Sprite);
_dragAdjust = new Point((_dragTarget.x - _dragTarget.parent.mouseX), (_dragTarget.y - _dragTarget.parent.mouseY));
_local5.name = _local3;
addGlow(_local5);
};
}
function setPole1(_arg1:uint):void{
_pole1Dis = _pole1Arr[_arg1];
loadPlant();
}
private function dragBtnEvt(_arg1:MouseEvent):void{
var _local2:Rectangle;
cancelDelete();
moveable = false;
_local2 = new Rectangle(0, 0, (Data.STAGE_WIDTH - miniMC.width), (Data.STAGE_HEIGHT - miniMC.height));
miniMC.startDrag(false, _local2);
_miniIsDrag = true;
}
private function showMouseUI(_arg1:String):void{
var _local2:Class;
if (_MouseUI == null){
_local2 = Method.getClass1("MouseUI");
_MouseUI = (Method.createDisplayObj(_local2, this, -1, mouseX, mouseY) as MovieClip);
_MouseUI.mouseChildren = false;
_MouseUI.mouseEnabled = false;
};
_MouseUI.gotoAndStop(_arg1);
Mouse.hide();
}
function setPole2(_arg1:uint):void{
_pole2Dis = _pole2Arr[_arg1];
loadPlant();
}
private function addPlant(_arg1:String, _arg2:Boolean, _arg3:uint, _arg4:uint):void{
var _local5:uint;
var _local6:uint;
var _local7:String;
var _local8:Class;
var _local9:MovieClip;
_local5 = Math.floor((_trainCTN.width / _arg3));
_local6 = 1;
while (_local6 <= _local5) {
_local7 = _arg1;
if (_arg1 == "PoleHit"){
_local7 = (_arg1 + Math.floor((Math.random() * 3)).toString());
};
_local8 = Method.getClass1(_local7);
_local9 = (new (_local8) as MovieClip);
_plantCTN.addChild(_local9);
_local9.x = (_arg4 + (_arg3 * _local6));
if (_arg2){
_local9.gotoAndStop((Math.floor((Math.random() * 2)) + 1));
_local9.scaleX = (_local9.scaleY = (0.5 + (Math.random() * 0.5)));
} else {
_local9.gotoAndStop(1);
};
_local6++;
};
}
private function deleteEvt(_arg1:MouseEvent):void{
if (!_delete){
_delete = true;
showMouseUI("delete");
} else {
cancelDelete();
};
}
private function loadHill():void{
var _local1:uint;
if (_hillCTN != null){
_editCTN.removeChild(_hillCTN);
};
_hillCTN = (Method.createDisplayObj(Sprite, _editCTN, 1, 0, 45) as Sprite);
Method.setColor(_hillCTN, _skyOrder);
_local1 = 1;
while (_local1 <= _bgNum) {
addBg(_local1, "Hill_Edit", _hillCTN);
_local1++;
};
}
private function loadSky(_arg1:uint):void{
var _local2:uint;
if (_skyCTN != null){
_editCTN.removeChild(_skyCTN);
};
_skyCTN = (Method.createDisplayObj(Sprite, _editCTN, 0, 0, -150) as Sprite);
_local2 = 1;
while (_local2 <= _bgNum) {
addBg(_local2, ("Sky" + _arg1.toString()), _skyCTN);
_local2++;
};
}
private function showTip(_arg1:String):void{
var _local2:Clew;
_local2 = new Clew(_arg1);
addChild(_local2);
_local2.x = (Data.STAGE_WIDTH / 2);
_local2.y = (Data.STAGE_HEIGHT / 2);
}
function setTime(_arg1:uint):void{
_gameTime = _timeArr[_arg1];
}
private function mouseUpEvent(_arg1:MouseEvent):void{
if (_dragTarget == _editCTN){
_dragTarget = null;
};
if (_miniIsDrag){
miniMC.stopDrag();
moveable = true;
_miniIsDrag = false;
};
}
private function traceEvent(_arg1:MouseEvent):void{
var _local2:PanelEditorTrace;
cancelDelete();
_local2 = (UIControl.createPanel("PanelEditorTrace") as PanelEditorTrace);
_local2.myTrace(getMissionData());
_local2.addEventListener("closed", windowClosed);
moveable = false;
showTip(Data.PHRASE8);
}
private function loadEnemys():void{
var _local1:Array;
var _local2:uint;
var _local3:uint;
var _local4:String;
var _local5:Class;
var _local6:MovieClip;
for each (_local1 in _enemysArr) {
_local2 = _local1[3];
_enemysNum++;
if (_local2 >= 13){
_bossNum++;
};
_local3 = _local1[0];
_local4 = ("enemyMC_" + _local2.toString());
_local5 = Method.getClass1(_local4);
_local6 = (Method.createDisplayObj(_local5, _roleCTN, -1, _local1[1], _local1[2]) as MovieClip);
_local6.gotoAndStop(_local3);
_local6.name = ((_local4 + "_") + _local3.toString());
_local6.buttonMode = true;
_local6.mouseChildren = false;
_local6.addEventListener(MouseEvent.CLICK, clickEvt);
};
}
private function mouseWheelEvent(_arg1:MouseEvent):void{
var _local2:Point;
var _local3:Point;
var _local4:uint;
if (moveable){
_local2 = _editCTN.globalToLocal(_scalePoint);
if (_arg1.delta > 0){
if (_editCTN.scaleX < 2){
_editCTN.scaleX = (_editCTN.scaleY = (_editCTN.scaleY + 0.1));
};
} else {
if (_editCTN.scaleX > 0.2){
_editCTN.scaleX = (_editCTN.scaleY = (_editCTN.scaleY - 0.1));
};
};
_local3 = _editCTN.globalToLocal(_scalePoint);
_editCTN.x = (_editCTN.x + ((_local3.x - _local2.x) * _editCTN.scaleX));
_editCTN.y = (_editCTN.y + ((_local3.y - _local2.y) * _editCTN.scaleX));
_local4 = Math.floor(_editCTN.scaleX);
if (_local4 == 1){
_editCTN.y = 54;
};
};
}
private function checkBoss(_arg1:Sprite, _arg2:Boolean):void{
var _local3:Array;
_local3 = _arg1.name.split("_");
if (_local3.length > 1){
if (_arg2){
_enemysNum++;
} else {
_enemysNum--;
};
if (_local3[1] >= 13){
if (_arg2){
_bossNum++;
} else {
_bossNum--;
};
};
};
showEnemysNum();
}
function showButton():void{
miniMC.alpha = 1;
deleteBtn.alpha = 1;
sceneBtn.alpha = 1;
traceBtn.alpha = 1;
quitBtn.alpha = 1;
deleteBtn.mouseEnabled = true;
sceneBtn.mouseEnabled = true;
traceBtn.mouseEnabled = true;
quitBtn.mouseEnabled = true;
miniMC.mouseChildren = true;
miniMC.mouseEnabled = true;
_miniDragBtn.addEventListener(MouseEvent.MOUSE_DOWN, dragBtnEvt);
_maxBtn.addEventListener(MouseEvent.CLICK, enemysBtnEvt);
deleteBtn.addEventListener(MouseEvent.CLICK, deleteEvt);
sceneBtn.addEventListener(MouseEvent.CLICK, sceneEvt);
traceBtn.addEventListener(MouseEvent.CLICK, traceEvent);
quitBtn.addEventListener(MouseEvent.CLICK, quitEvent);
if (((((((((((((!((Global.currentMission == (7 + Data.MISSION_NUM)))) || ((Global.myMission1 == null)))) || ((Global.myMission2 == null)))) || ((Global.myMission3 == null)))) || ((Global.myMission4 == null)))) || ((Global.myMission5 == null)))) || ((Global.myMission6 == null)))){
saveBtn.alpha = 1;
saveBtn.mouseEnabled = true;
saveBtn.addEventListener(MouseEvent.CLICK, saveEvent);
};
}
function mousedisable():void{
_editCTN.mouseChildren = false;
_earthCTN.mouseEnabled = false;
}
private function cancelDelete():void{
if (_delete){
_delete = false;
Mouse.show();
removeChild(_MouseUI);
_MouseUI = null;
};
}
private function addBg(_arg1:uint, _arg2:String, _arg3:Sprite):void{
var _local4:Class;
var _local5:Sprite;
_local4 = Method.getClass1(_arg2);
_local5 = (new (_local4) as Sprite);
_arg3.addChild(_local5);
_local5.x = ((Data.STAGE_WIDTH * 2) * (_arg1 - 1));
}
private function loadTrain():void{
var _local1:uint;
var _local2:Array;
var _local3:Sprite;
var _local4:Class;
var _local5:Sprite;
var _local6:Sprite;
var _local7:Sprite;
var _local8:Sprite;
_local1 = 0;
while (_local1 < _trainArr.length) {
_local2 = _trainArr[_local1];
_local3 = (Method.createDisplayObj(Sprite, _trainCTN, 0, _local2[0]) as Sprite);
_local4 = Method.getClass1(("Carriage" + String(_local2[1])));
_local5 = (Method.createDisplayObj(_local4, _local3) as Sprite);
Method.controlMC(_local5, "stop");
_local6 = (_local5.getChildByName("step") as Sprite);
if (_local6 != null){
_local6.visible = false;
};
_local6 = (_local5.getChildByName("step1") as Sprite);
if (_local6 != null){
_local6.visible = false;
};
_local6 = (_local5.getChildByName("step2") as Sprite);
if (_local6 != null){
_local6.visible = false;
};
_local7 = (_local5.getChildByName("window") as Sprite);
if (_local7 != null){
_local8 = (_local7.getChildByName("wall") as Sprite);
_local8.visible = false;
};
_local3.name = "carriage";
_local5.name = String(_local2[1]);
_carriageNum++;
if (_COrderArr.indexOf(_local2[1]) != -1){
_local3.buttonMode = true;
_local3.mouseChildren = false;
_local3.addEventListener(MouseEvent.CLICK, clickEvt);
_local3.doubleClickEnabled = true;
_local3.addEventListener(MouseEvent.DOUBLE_CLICK, doubleClickEvt);
};
_local1++;
};
}
private function putCarr(_arg1:Sprite):void{
var _local2:Array;
var _local3:Sprite;
var _local4:uint;
var _local5:Class;
var _local6:Sprite;
var _local7:int;
var _local8:Sprite;
var _local9:Number;
var _local10:Number;
var _local11:Sprite;
var _local12:int;
var _local13:Sprite;
var _local14:Sprite;
_arg1.y = 0;
_local2 = Data.getArrData("carriageArr");
_local3 = (_arg1.getChildAt(0) as Sprite);
_local4 = uint(_local3.name);
_local5 = Method.getClass1(("Carriage" + _local4));
_arg1.removeChild(_local3);
_local3 = (Method.createDisplayObj(_local5, _arg1) as Sprite);
_local3.name = _local4.toString();
Method.controlMC(_local3, "stop");
_local6 = (_local3.getChildByName("step") as Sprite);
if (_local6 != null){
_local6.visible = false;
};
_local6 = (_local3.getChildByName("step1") as Sprite);
if (_local6 != null){
_local6.visible = false;
};
_local6 = (_local3.getChildByName("step2") as Sprite);
if (_local6 != null){
_local6.visible = false;
};
_local7 = Method.getIndex(_local4, _local2, 0);
_local9 = _local2[_local7][1];
_local12 = (_trainCTN.numChildren - 1);
while (_local12 >= 0) {
_local11 = (_trainCTN.getChildAt(_local12) as Sprite);
if (_local11 != _arg1){
if ((((((_trainCTN.mouseX <= (_local11.x + 200))) && ((_trainCTN.mouseX >= (_local11.x - 100))))) && ((_trainCTN.mouseX > 200)))){
if (_local11.name == "carriage"){
if (_local8 == null){
_local8 = _local11;
_local10 = _local8.x;
};
};
};
};
_local12--;
};
if (_local8 != null){
_local12 = (_trainCTN.numChildren - 1);
while (_local12 >= 0) {
_local11 = (_trainCTN.getChildAt(_local12) as Sprite);
if (_local11 != _arg1){
if (_local11.x >= _local10){
_local11.x = (_local11.x + _local9);
};
};
_local12--;
};
_local12 = (_roleCTN.numChildren - 1);
while (_local12 >= 0) {
_local11 = (_roleCTN.getChildAt(_local12) as Sprite);
if (_local11 != _arg1){
if (_local11.x >= _local10){
_local11.x = (_local11.x + _local9);
};
};
_local12--;
};
_arg1.x = _local10;
_local7 = (_trainCTN.getChildIndex(_local8) + 1);
_trainCTN.setChildIndex(_arg1, _local7);
_arg1.buttonMode = true;
_arg1.mouseChildren = false;
_arg1.addEventListener(MouseEvent.CLICK, clickEvt);
_arg1.doubleClickEnabled = true;
_arg1.addEventListener(MouseEvent.DOUBLE_CLICK, doubleClickEvt);
_carriageNum++;
loadScene();
_local13 = (_local3.getChildByName("window") as Sprite);
if (_local13 != null){
_local14 = (_local13.getChildByName("wall") as Sprite);
_local14.visible = false;
};
} else {
deleteBasic(_arg1);
showTip(Data.PHRASE1);
};
if (_arrowheadMC != null){
_trainCTN.removeChild(_arrowheadMC);
_arrowheadMC = null;
};
}
private function changeCarr(_arg1:Sprite):void{
var _local2:Array;
var _local3:uint;
var _local4:int;
var _local5:Number;
var _local6:Class;
var _local7:Sprite;
var _local8:Sprite;
var _local9:Sprite;
var _local10:Number;
var _local11:Number;
var _local12:Sprite;
var _local13:int;
var _local14:Sprite;
_local2 = Data.getArrData("carriageArr");
_local3 = uint(_arg1.getChildAt(0).name);
_local4 = Method.getIndex(_local3, _local2, 0);
_local5 = _local2[_local4][1];
_local4 = _COrderArr.indexOf(_local3);
if ((_local4 + 1) < _COrderArr.length){
_local3 = _COrderArr[(_local4 + 1)];
} else {
_local3 = _COrderArr[0];
};
_arg1.removeChildAt(0);
_local6 = Method.getClass1(("Carriage" + String(_local3)));
_local7 = (Method.createDisplayObj(_local6, _arg1) as Sprite);
Method.controlMC(_local7, "stop");
_local7.name = String(_local3);
_local8 = (_local7.getChildByName("step") as Sprite);
if (_local8 != null){
_local8.visible = false;
};
_local8 = (_local7.getChildByName("step1") as Sprite);
if (_local8 != null){
_local8.visible = false;
};
_local8 = (_local7.getChildByName("step2") as Sprite);
if (_local8 != null){
_local8.visible = false;
};
_local9 = (_local7.getChildByName("window") as Sprite);
if (_local9 != null){
_local14 = (_local9.getChildByName("wall") as Sprite);
_local14.visible = false;
};
_local4 = Method.getIndex(_local3, _local2, 0);
_local10 = _local2[_local4][1];
_local11 = (_local10 - _local5);
_local13 = (_trainCTN.numChildren - 1);
while (_local13 >= 0) {
_local12 = (_trainCTN.getChildAt(_local13) as Sprite);
if (_local12 != _arg1){
if (_local12.x >= _arg1.x){
if (_local12.x < (_arg1.x + _local5)){
deleteBasic(_local12);
} else {
_local12.x = (_local12.x + _local11);
};
};
};
_local13--;
};
_local13 = (_roleCTN.numChildren - 1);
while (_local13 >= 0) {
_local12 = (_roleCTN.getChildAt(_local13) as Sprite);
if (_local12 != _arg1){
if (_local12.x >= _arg1.x){
if (_local12.x < (_arg1.x + _local5)){
deleteBasic(_local12);
} else {
_local12.x = (_local12.x + _local11);
};
};
};
_local13--;
};
loadScene();
}
private function putToTop(_arg1:Sprite):void{
var _local2:Point;
var _local3:int;
var _local4:Sprite;
var _local5:Sprite;
var _local6:Sprite;
var _local7:MovieClip;
var _local8:int;
_local2 = _roleCTN.localToGlobal(new Point(_arg1.x, _arg1.y));
_local3 = (_trainCTN.numChildren - 1);
while (_local3 >= 0) {
_local4 = (_trainCTN.getChildAt(_local3) as Sprite);
if (_local4 != _arg1){
if (_local4.name == "carriage"){
_local5 = (_local4.getChildAt(0) as Sprite);
_local6 = (_local5.getChildByName("step2") as Sprite);
if (((!((_local6 == null))) && (_local6.hitTestPoint(_local2.x, _local2.y, true)))){
_arg1.y = (_arg1.y - 1);
putToTop(_arg1);
return;
};
};
};
_local3--;
};
_local3 = (_trainCTN.numChildren - 1);
while (_local3 >= 0) {
_local4 = (_trainCTN.getChildAt(_local3) as Sprite);
if (_local4 != _arg1){
if (_local4.name == "carriage"){
_local5 = (_local4.getChildAt(0) as Sprite);
_local6 = (_local5.getChildByName("step2") as Sprite);
if (((!((_local6 == null))) && (_local6.hitTestPoint(_local2.x, (_local2.y + 1), true)))){
_arg1.y = (_arg1.y + 1);
_local8 = (_roleCTN.numChildren - 1);
while (_local8 >= 0) {
_local4 = (_roleCTN.getChildAt(_local8) as Sprite);
if (_local4 != _arg1){
if ((_local4 is BasicThingMC)){
_local7 = (_local4.getChildByName("hit") as MovieClip);
if (_local7.hitTestPoint(_local2.x, _local2.y, true)){
deleteBasic(_arg1);
showTip(Data.PHRASE1);
return;
};
};
};
_local8--;
};
return;
};
};
};
_local3--;
};
_arg1.y = (_arg1.y + (20 * _dir));
if (_arg1.y > 36){
_dir = -1;
};
if (_arg1.y < -550){
deleteBasic(_arg1);
showTip(Data.PHRASE1);
} else {
putToTop(_arg1);
};
}
private function hideButton():void{
miniMC.alpha = 0.5;
deleteBtn.alpha = 0.5;
sceneBtn.alpha = 0.5;
traceBtn.alpha = 0.5;
quitBtn.alpha = 0.5;
deleteBtn.mouseEnabled = false;
sceneBtn.mouseEnabled = false;
traceBtn.mouseEnabled = false;
quitBtn.mouseEnabled = false;
miniMC.mouseChildren = false;
miniMC.mouseEnabled = false;
_miniDragBtn.removeEventListener(MouseEvent.MOUSE_DOWN, dragBtnEvt);
_maxBtn.removeEventListener(MouseEvent.CLICK, enemysBtnEvt);
deleteBtn.removeEventListener(MouseEvent.CLICK, deleteEvt);
sceneBtn.removeEventListener(MouseEvent.CLICK, sceneEvt);
traceBtn.removeEventListener(MouseEvent.CLICK, traceEvent);
quitBtn.removeEventListener(MouseEvent.CLICK, quitEvent);
if (((((((((((((!((Global.currentMission == (7 + Data.MISSION_NUM)))) || (!((Global.myMission1 == null))))) || (!((Global.myMission2 == null))))) || (!((Global.myMission3 == null))))) || (!((Global.myMission4 == null))))) || (!((Global.myMission5 == null))))) || (!((Global.myMission6 == null))))){
saveBtn.alpha = 0.5;
saveBtn.mouseEnabled = false;
saveBtn.removeEventListener(MouseEvent.CLICK, saveEvent);
};
}
function init(_arg1:Array, _arg2:String):void{
var _local3:Array;
menuMC.visible = false;
_maxBtn = (miniMC.getChildByName("maxBtn") as SimpleButton);
_miniDragBtn = (miniMC.getChildByName("dragBtn") as MovieClip);
if (_arg1 != null){
_local3 = _arg1[0];
_skyOrder = _local3[0];
_plantDis = _local3[1];
_pole1Dis = _local3[2];
_pole2Dis = _local3[3];
_gameTime = _local3[4];
_trainArr = _arg1[1];
_enemysArr = _arg1[2];
_thingsArr = _arg1[3];
_author = _arg1[4];
} else {
_author = _arg2;
};
if ((((((((((((((Global.currentMission == (7 + Data.MISSION_NUM))) && (!((Global.myMission1 == null))))) && (!((Global.myMission2 == null))))) && (!((Global.myMission3 == null))))) && (!((Global.myMission4 == null))))) && (!((Global.myMission5 == null))))) && (!((Global.myMission6 == null))))){
saveBtn.alpha = 0.5;
saveBtn.enabled = false;
} else {
saveBtn.addEventListener(MouseEvent.CLICK, saveEvent);
};
deleteBtn.addEventListener(MouseEvent.CLICK, deleteEvt);
quitBtn.addEventListener(MouseEvent.CLICK, quitEvent);
traceBtn.addEventListener(MouseEvent.CLICK, traceEvent);
sceneBtn.addEventListener(MouseEvent.CLICK, sceneEvt);
_maxBtn.addEventListener(MouseEvent.CLICK, enemysBtnEvt);
_miniDragBtn.addEventListener(MouseEvent.MOUSE_DOWN, dragBtnEvt);
Global.stage.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelEvent);
_editCTN = (Method.createDisplayObj(Sprite, this, 1, 0, 54) as Sprite);
_editCTN.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownEvent);
Global.stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpEvent);
Global.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
Global.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
initLoad();
}
private function loadEarth():void{
var _local1:uint;
if (_earthCTN != null){
_editCTN.removeChild(_earthCTN);
};
_earthCTN = (Method.createDisplayObj(Sprite, _editCTN, 2, 0, (Data.STAGE_HEIGHT - 253)) as Sprite);
Method.setColor(_earthCTN, _skyOrder);
_local1 = 1;
while (_local1 <= _bgNum) {
addBg(_local1, "Earth", _earthCTN);
_local1++;
};
}
private function showEnemysNum():void{
_enemyTxt.htmlText = (("<font color='#FFFFFF'> ENEMY : " + _enemysNum.toString()) + " </font>");
}
private function loadPlant():void{
if (_plantCTN != null){
_editCTN.removeChild(_plantCTN);
};
_plantCTN = (Method.createDisplayObj(Sprite, _editCTN, -1, 0, (Data.STAGE_HEIGHT - 54)) as Sprite);
_plantCTN.mouseChildren = false;
_plantCTN.mouseEnabled = false;
addPlant("Plant", true, _plantDis, 0);
addPlant("PolePresent", false, _pole1Dis, 500);
addPlant("PoleHit", false, (_pole2Dis * 2), 1000);
}
function setPlant(_arg1:uint):void{
_plantDis = _plantArr[_arg1];
loadPlant();
}
private function saveEvent(_arg1:MouseEvent):void{
var _local2:uint;
cancelDelete();
if (Global.currentMission == (7 + Data.MISSION_NUM)){
_local2 = 1;
while (_local2 <= 6) {
if (Global[("myMission" + _local2)] == null){
Method.saveMissionData(getMissionData(), _local2);
Global.currentMission = (_local2 + Data.MISSION_NUM);
break;
};
_local2++;
};
} else {
Method.saveMissionData(getMissionData(), (Global.currentMission - Data.MISSION_NUM));
};
showTip(Data.PHRASE4);
}
private function clickEvt(_arg1:MouseEvent):void{
var _local2:Sprite;
_local2 = (_arg1.currentTarget as Sprite);
if (_local2 != null){
if (_delete){
_delete = false;
removeChild(_MouseUI);
Mouse.show();
_MouseUI = null;
if (_local2.name == "carriage"){
if (_carriageNum > 2){
if (_COrderArr.indexOf(uint(_local2.getChildAt(0).name)) != -1){
deleteCarr(_local2);
};
};
} else {
if ((_local2 is MovieClip)){
deleteBasic(_local2);
};
};
} else {
if (_dragTarget == null){
if (_local2.name != "carriage"){
if ((((Math.abs((_editCTN.x - _dragPoint.x)) < 2)) && ((Math.abs((_editCTN.y - _dragPoint.y)) < 2)))){
_dragTarget = _local2;
_dragAdjust = new Point((_dragTarget.x - _dragTarget.parent.mouseX), (_dragTarget.y - _dragTarget.parent.mouseY));
_roleCTN.setChildIndex(_local2, (_roleCTN.numChildren - 1));
addGlow(_local2);
hideButton();
checkBoss(_local2, false);
};
};
} else {
if (((!((_dragTarget == null))) && ((_dragTarget == _local2)))){
if (_local2.name == "carriage"){
putCarr(_local2);
} else {
putMoveThing(_local2);
updateThingsIndex();
};
_local2.filters = new Array();
_dragTarget = null;
showButton();
};
};
};
};
}
private function deleteBasic(_arg1:Sprite):void{
checkBoss(_arg1, false);
_arg1.removeEventListener(MouseEvent.CLICK, clickEvt);
_arg1.parent.removeChild(_arg1);
}
private function putMoveThing(_arg1:Sprite):void{
var _local2:MovieClip;
var _local3:Array;
var _local4:Boolean;
if (((((_arg1.x - (_arg1.width / 2)) < 30)) || (((_arg1.x + (_arg1.width / 2)) > (_trainLength - 100))))){
deleteBasic(_arg1);
showTip(Data.PHRASE1);
return;
};
_local3 = _arg1.name.split("_");
if (_local3.length > 1){
checkBoss(_arg1, true);
if (checkEnemyFull(_arg1)){
deleteBasic(_arg1);
return;
};
switch (uint(_local3[2])){
case 1:
if ((_arg1.x + (_arg1.width / 2)) > (_trainLength - Data.STAGE_WIDTH)){
_local2 = (_arg1 as MovieClip);
_local2.gotoAndStop(2);
_local2.name = (("Enemy_" + _local3[1]) + "_2");
};
_local4 = true;
break;
case 2:
if ((_arg1.x - (_arg1.width / 2)) < Data.STAGE_WIDTH){
_local2 = (_arg1 as MovieClip);
_local2.gotoAndStop(1);
_local2.name = (("Enemy_" + _local3[1]) + "_1");
};
_local4 = true;
break;
case 3:
_dir = 1;
_roleCTN.setChildIndex(_arg1, 0);
putToTop(_arg1);
break;
case 4:
_arg1.y = 36;
break;
case 5:
if ((_arg1.x + (_arg1.width / 2)) > (_trainLength - 300)){
_local2 = (_arg1 as MovieClip);
_local2.gotoAndStop(6);
_local2.name = (("Enemy_" + _local3[1]) + "_6");
};
_arg1.y = -400;
break;
case 6:
if ((_arg1.x - (_arg1.width / 2)) < 300){
_local2 = (_arg1 as MovieClip);
_local2.gotoAndStop(5);
_local2.name = (("Enemy_" + _local3[1]) + "_5");
};
_arg1.y = -400;
break;
};
} else {
_local4 = true;
};
if (_local4 == true){
_dir = 1;
putToCarr(_arg1);
};
_arg1.addEventListener(MouseEvent.CLICK, clickEvt);
}
public function updateEvent():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:String;
var _local8:Point;
if (_delete){
Mouse.hide();
if (_MouseUI != null){
_MouseUI.x = mouseX;
_MouseUI.y = mouseY;
};
} else {
if (moveable){
if (_dragTarget == _editCTN){
_local1 = (_dragTarget.parent.mouseX + _dragAdjust.x);
_local2 = ((_dragTarget.parent.mouseX + _dragAdjust.x) + (_rectangle.width * _editCTN.scaleX));
if ((((_local1 < _scalePoint.x)) && ((_local2 > _scalePoint.x)))){
_dragTarget.x = (_dragTarget.parent.mouseX + _dragAdjust.x);
};
_local3 = ((_dragTarget.parent.mouseY + _dragAdjust.y) + (_rectangle.y * _editCTN.scaleY));
_local4 = (((_dragTarget.parent.mouseY + _dragAdjust.y) + (_rectangle.y * _editCTN.scaleY)) + (_rectangle.height * _editCTN.scaleX));
if ((((_local3 < _scalePoint.y)) && ((_local4 > _scalePoint.y)))){
_dragTarget.y = (_dragTarget.parent.mouseY + _dragAdjust.y);
};
} else {
if (_dragTarget != null){
_dragTarget.x = (_dragTarget.parent.mouseX + _dragAdjust.x);
_dragTarget.y = (_dragTarget.parent.mouseY + _dragAdjust.y);
};
_local8 = new Point((-((stage.stageWidth - Data.STAGE_WIDTH)) / 2), (-((stage.stageHeight - Data.STAGE_HEIGHT)) / 2));
if (mouseX > ((_local8.x + stage.stageWidth) - 15)){
_local5 = Math.round((((_local8.x + stage.stageWidth) - mouseX) - 15));
_local7 = "right";
} else {
if (mouseX < (_local8.x + 15)){
_local5 = Math.round(((_local8.x + 15) - mouseX));
_local7 = "left";
};
};
if (mouseY > ((_local8.y + stage.stageHeight) - 15)){
_local6 = Math.round((((_local8.y + stage.stageHeight) - mouseY) - 15));
_local7 = "down";
} else {
if (mouseY < (_local8.y + 15)){
_local6 = Math.round(((_local8.y + 15) - mouseY));
_local7 = "up";
};
};
if (((isNaN(_local5)) && (isNaN(_local6)))){
if (_MouseUI != null){
removeChild(_MouseUI);
_MouseUI = null;
Mouse.show();
};
_vergeTimer = 0;
} else {
_vergeTimer++;
if (_vergeTimer > 10){
if (!isNaN(_local5)){
_local1 = (_editCTN.x + (_local5 * _editCTN.scaleX));
_local2 = ((_editCTN.x + (_local5 * _editCTN.scaleX)) + (_rectangle.width * _editCTN.scaleX));
if ((((_local1 < _scalePoint.x)) && ((_local2 > _scalePoint.x)))){
_editCTN.x = (_editCTN.x + (_local5 * _editCTN.scaleX));
};
};
if (!isNaN(_local6)){
_local3 = (_editCTN.y + ((_rectangle.y + _local6) * _editCTN.scaleY));
_local4 = ((_editCTN.y + ((_rectangle.y + _local6) * _editCTN.scaleY)) + (_rectangle.height * _editCTN.scaleX));
if ((((_local3 < _scalePoint.y)) && ((_local4 > _scalePoint.y)))){
_editCTN.y = (_editCTN.y + (_local6 * _editCTN.scaleY));
};
};
} else {
if (_vergeTimer > 5){
showMouseUI(_local7);
};
};
};
if (_dragTarget != null){
glowShine(_dragTarget);
};
};
};
};
}
function setSky(_arg1:uint):void{
_skyOrder = _arg1;
loadSky(_skyOrder);
Method.setColor(_hillCTN, _skyOrder);
Method.setColor(_earthCTN, _skyOrder);
Method.setColor(_trainCTN, _skyOrder);
}
private function deleteCarr(_arg1:Sprite):void{
var _local2:Array;
var _local3:int;
var _local4:Number;
var _local5:Sprite;
var _local6:int;
_local2 = Data.getArrData("carriageArr");
_local3 = Method.getIndex(uint(_arg1.getChildAt(0).name), _local2, 0);
_local4 = _local2[_local3][1];
_arg1.removeEventListener(MouseEvent.DOUBLE_CLICK, doubleClickEvt);
deleteBasic(_arg1);
_carriageNum--;
_local6 = (_trainCTN.numChildren - 1);
while (_local6 >= 0) {
_local5 = (_trainCTN.getChildAt(_local6) as Sprite);
if (_local5 != _arg1){
if (_local5.x >= (_arg1.x + _local4)){
_local5.x = (_local5.x - _local4);
} else {
if (_local5.x >= _arg1.x){
deleteBasic(_local5);
};
};
};
_local6--;
};
_local6 = (_roleCTN.numChildren - 1);
while (_local6 >= 0) {
_local5 = (_roleCTN.getChildAt(_local6) as Sprite);
if (_local5 != _arg1){
if (_local5.x >= (_arg1.x + _local4)){
_local5.x = (_local5.x - _local4);
} else {
if (_local5.x >= _arg1.x){
deleteBasic(_local5);
};
};
};
_local6--;
};
loadScene();
}
private function loadScene():void{
_bgNum = (Math.floor((_trainCTN.width / (Data.STAGE_WIDTH * 2))) + 1);
loadSky(_skyOrder);
loadHill();
loadEarth();
loadPlant();
_rectangle = _editCTN.getBounds(_editCTN);
_trainLength = Math.floor(_trainCTN.width);
}
private function windowClosed(_arg1:Event):void{
var _local2:Sprite;
_local2 = (_arg1.currentTarget as Sprite);
moveable = true;
_local2.removeEventListener("closed", windowClosed);
}
function mouseable():void{
_editCTN.mouseChildren = true;
_earthCTN.mouseEnabled = true;
}
function showMiniMC():void{
miniMC.visible = true;
}
private function quitEvent(_arg1:MouseEvent):void{
cancelDelete();
removeSelf();
Method.createMask();
UIControl.createPanel("PanelEditor");
}
private function keyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 32){
_editCTN.scaleX = (_editCTN.scaleY = 1);
_editCTN.x = 0;
_editCTN.y = 54;
};
}
private function enemysBtnEvt(_arg1:MouseEvent):void{
cancelDelete();
menuMC.visible = true;
miniMC.visible = false;
hideButton();
mousedisable();
moveable = false;
}
private function sceneEvt(_arg1:MouseEvent):void{
var _local2:PanelEditScene;
var _local3:Array;
cancelDelete();
_local2 = (UIControl.createPanel("PanelEditScene") as PanelEditScene);
_local3 = [_skyOrder, _plantArr.indexOf(_plantDis), _pole1Arr.indexOf(_pole1Dis), _pole2Arr.indexOf(_pole2Dis), _timeArr.indexOf(_gameTime)];
_local2.setTarget(this, _local3);
hideButton();
mousedisable();
moveable = false;
}
private function loadThings():void{
var _local1:Array;
var _local2:Class;
var _local3:MovieClip;
for each (_local1 in _thingsArr) {
_local2 = Method.getClass1(_local1[0]);
_local3 = (Method.createDisplayObj(_local2, _roleCTN, -1, _local1[1], _local1[2]) as MovieClip);
_local3.name = _local1[0];
_local3.buttonMode = true;
_local3.mouseChildren = false;
_local3.addEventListener(MouseEvent.CLICK, clickEvt);
};
}
private function addGlow(_arg1:Sprite):void{
var _local2:Array;
var _local3:GlowFilter;
_local2 = _arg1.filters;
_local3 = new GlowFilter();
_local3.color = 0xFFFFFF;
_local2.push(_local3);
_arg1.filters = _local2;
}
private function glowShine(_arg1:Sprite):void{
var _local2:Array;
var _local3:GlowFilter;
var _local4:uint;
_local2 = _arg1.filters;
_local4 = 0;
while (_local4 < _local2.length) {
if ((_local2[_local4] is GlowFilter)){
_local3 = _local2[_local4];
break;
};
_local4++;
};
_local3.blurX = (_local3.blurY = ((_local3.blurX)==6) ? 10 : 6);
_arg1.filters = _local2;
}
private function mouseDownEvent(_arg1:MouseEvent):void{
var _local2:Sprite;
_local2 = (_arg1.currentTarget as Sprite);
if (_dragTarget == null){
_dragTarget = _local2;
_dragAdjust = new Point((_dragTarget.x - _dragTarget.parent.mouseX), (_dragTarget.y - _dragTarget.parent.mouseY));
_dragPoint = new Point(_dragTarget.x, _dragTarget.y);
};
}
public function removeSelf():void{
deleteBtn.removeEventListener(MouseEvent.CLICK, deleteEvt);
saveBtn.removeEventListener(MouseEvent.CLICK, saveEvent);
quitBtn.removeEventListener(MouseEvent.CLICK, quitEvent);
traceBtn.removeEventListener(MouseEvent.CLICK, traceEvent);
sceneBtn.removeEventListener(MouseEvent.CLICK, sceneEvt);
_miniDragBtn.removeEventListener(MouseEvent.MOUSE_DOWN, dragBtnEvt);
_maxBtn.removeEventListener(MouseEvent.CLICK, enemysBtnEvt);
Global.stage.removeEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelEvent);
_editCTN.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownEvent);
Global.stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
Global.stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpEvent);
Global.stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDown);
parent.removeChild(this);
Method.removeEnterframeObj(this);
}
}
}//package com.macrojoy.zgd.ui
Section 193
//PanelGI (com.macrojoy.zgd.ui.PanelGI)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.geom.*;
import com.macrojoy.zgd.display.*;
import flash.events.*;
public class PanelGI extends Sprite implements IEnterframeObject {
private const JUMPER_TIME:uint = 30;
private const CASK_TIME:uint = 25;
private const BIRD_TIME:uint = 25;
private var _clipSpt:Sprite;
public var missionName:String;
public var bulletMC:Sprite;
private var _barLength:uint;
private var _spaceTime:uint;
public var menuBtn:SimpleButton;
private var __hpBar2:Sprite;
private var _handSpt:Sprite;
private var __hpBar1:Sprite;
public var numTitleMC:MovieClip;
public var scoreMC:Sprite;
public var watchMC:Sprite;
public var hpMC:Sprite;
public var weaponMC:MovieClip;
private var _totalTime:uint;
private var _slugSpt:Sprite;
private var _startTime:uint;
private var _angle:uint;// = 5
public var countMC:Sprite;
public function PanelGI(){
_angle = 5;
super();
getChildren();
_spaceTime = Math.floor((((_angle * Global.gameTimer) / 360) / 35));
if (_spaceTime == 0){
_angle = ((360 * 35) / Global.gameTimer);
_spaceTime = 1;
};
_startTime = Global.gameTimer;
_totalTime = getTotalTime(Global.skyOrder);
menuBtn.addEventListener(MouseEvent.CLICK, menuEvt);
menuBtn.addEventListener(MouseEvent.MOUSE_OVER, menuOver);
menuBtn.addEventListener(MouseEvent.MOUSE_OUT, menuOut);
}
private function menuEvt(_arg1:MouseEvent):void{
Method.gamePause();
(UIControl.createPanel("PanelPause") as PanelPause);
Global.clickButton = false;
}
public function updateClipUI(_arg1:uint):void{
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:MovieClip;
_local2 = Math.floor((_arg1 / 6));
_local3 = (_arg1 % 6);
_local4 = 1;
while (_local4 <= _clipSpt.numChildren) {
_local5 = (_clipSpt.getChildByName(("clip" + _local4)) as MovieClip);
if (_local4 <= _local2){
_local5.gotoAndStop(7);
} else {
if (_local4 == (_local2 + 1)){
_local5.gotoAndStop((_local3 + 1));
} else {
_local5.gotoAndStop(1);
};
};
_local4++;
};
}
public function startTimer():void{
Method.addEnterframeObj(this);
}
public function updateEnemyCount():void{
Method.showNumber(countMC, Global.enemyNum, true);
}
public function init(_arg1:String):void{
missionName = _arg1;
_barLength = Math.floor((__hpBar1.getChildAt(0) as Shape).width);
updateScoreUI();
updateBulletUI(6);
updateClipUI((Data.BULLET_NUM - 6));
updateEnemyCount();
showWeapon("gun");
numTitleMC.gotoAndStop(missionName);
}
public function lifeUiIsOK():Boolean{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:uint;
var _local5:uint;
_local1 = Global.hero.getHp();
_local2 = Global.hero.getHpable();
_local3 = Global.hero.getHpTotal();
_local4 = Math.floor(((_local1 / _local3) * _barLength));
_local5 = Math.floor(((_local2 / _local3) * _barLength));
if ((((__hpBar1.width == _local4)) && ((__hpBar2.width == _local5)))){
return (true);
};
return (false);
}
private function bonusMission3():void{
}
private function bonusMission4():void{
if ((Global.gameTimer % BIRD_TIME) == 0){
GameDesign.createBird();
};
}
private function bonusMission5():void{
var _local1:int;
var _local2:Point;
var _local3:MCEnemy9;
if ((Global.gameTimer % JUMPER_TIME) == 0){
_local1 = Math.floor((Math.random() * 2));
_local2 = Global.mainBgCTN.globalToLocal(new Point((Data.STAGE_WIDTH + 200), 200));
_local3 = (Method.createDisplayObj(MCEnemy9, Global.roleCTN, -1, _local2.x, -92) as MCEnemy9);
_local3.bornInfo = [2, _local2.x, -92, 9];
_local3.init();
_local3.bonusJumper();
Global.camp2Arr.push(_local3);
};
}
private function getChildren():void{
_handSpt = (watchMC.getChildByName("handMC") as Sprite);
__hpBar1 = (hpMC.getChildByName("hpBar1") as Sprite);
__hpBar2 = (hpMC.getChildByName("hpBar2") as Sprite);
_clipSpt = (bulletMC.getChildByName("clipMC") as Sprite);
_slugSpt = (bulletMC.getChildByName("slugMC") as Sprite);
}
private function menuOut(_arg1:MouseEvent):void{
Global.clickButton = false;
}
private function getTotalTime(_arg1:uint):uint{
var _local2:uint;
switch (_arg1){
case 1:
case 3:
_local2 = Math.round(((((5 / 12) * Data.GAME_TIME) * 60) * 35));
break;
case 2:
_local2 = Math.round(((((2 / 12) * Data.GAME_TIME) * 60) * 35));
break;
};
return (_local2);
}
public function updateEvent():void{
var testNum1:int;
if (((!(Global.gamePause)) && ((Global.gameStatus == "playing")))){
Global.gameTimer--;
if (Global.gameTimer == ((3 * _spaceTime) * 35)){
Method.playSound(Data.WARNING, 6, int.MAX_VALUE, Global.soundVolume);
} else {
if (Global.gameTimer < ((3 * _spaceTime) * 35)){
watchMC.alpha = ((watchMC.alpha)==1) ? 0.5 : 1;
};
};
testNum1 = Math.floor((Global.gameTimer % (_spaceTime * 35)));
if (testNum1 == 0){
_handSpt.rotation = (_handSpt.rotation + _angle);
};
if (Global.gameTimer <= 0){
watchMC.alpha = 1;
Method.playSound(null, 6, 0, 0);
if (Global.enemyNum == 0){
Global.gameResult = 1;
} else {
Global.gameResult = 0;
};
if (Global.isBonusMission){
GameDesign.bonusOver();
} else {
GameDesign.gameOver();
};
} else {
try {
var _local2 = this;
_local2[missionName]();
} catch(err:ReferenceError) {
};
};
updateLifeUI();
};
}
public function showWeapon(_arg1:String):void{
weaponMC.gotoAndStop(_arg1);
}
public function updateScoreUI():void{
Method.showNumber(scoreMC, Global.score, false);
}
private function normalMission():void{
var _local1:int;
SceneControl.updateCTNColor();
SceneControl.updateMusic();
if ((_startTime - Global.gameTimer) >= _totalTime){
if (Global.skyOrder < 3){
Global.skyOrder++;
} else {
Global.skyOrder = 1;
};
switch (Global.skyOrder){
case 1:
Method.playSound(Data.COCK, 6, 1, Global.soundVolume);
break;
case 3:
Method.playSound(Data.WOLF, 6, 1, Global.soundVolume);
break;
};
SceneControl.changeSky();
_startTime = Global.gameTimer;
_totalTime = getTotalTime(Global.skyOrder);
};
_local1 = Math.floor((Global.gameTimer % ((12 * _spaceTime) * 35)));
if (_local1 == 0){
if (Global.skyOrder != 3){
GameDesign.createBird();
};
};
}
private function bonusMission1():void{
var _local1:int;
var _local2:Point;
var _local3:Cask;
if ((Global.gameTimer % CASK_TIME) == 0){
_local1 = Math.floor((Math.random() * 2));
if (_local1){
_local2 = Global.mainBgCTN.globalToLocal(new Point(0, 200));
} else {
_local2 = Global.mainBgCTN.globalToLocal(new Point(Data.STAGE_WIDTH, 200));
};
_local3 = (Method.createDisplayObj(Cask, Global.thingsCTN, -1, _local2.x, -315) as Cask);
_local3.name = "cask";
if (_local1){
_local3.bonusCask(1);
} else {
_local3.bonusCask(-1);
};
_local3.init();
Global.loadedThings.push(_local3);
};
}
private function bonusMission2():void{
}
private function updateLifeUI():void{
var _local1:Number;
var _local2:Number;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:uint;
var _local7:uint;
_local1 = 2;
_local2 = 1;
_local3 = Global.hero.getHp();
_local4 = Global.hero.getHpable();
_local5 = Global.hero.getHpTotal();
if (_local3 <= 0){
_local1 = (_local1 * 4);
_local2 = (_local2 * 4);
};
_local6 = Math.floor(((_local3 / _local5) * _barLength));
if ((__hpBar1.width - _local1) > _local6){
__hpBar1.width = (__hpBar1.width - _local1);
} else {
_local6 = Math.floor(((_local3 / _local5) * _barLength));
__hpBar1.width = _local6;
};
_local7 = Math.floor(((_local4 / _local5) * _barLength));
if (_local7 == _barLength){
__hpBar2.width = _local7;
} else {
if ((__hpBar2.width - _local2) > _local7){
__hpBar2.width = (__hpBar2.width - _local2);
} else {
if ((__hpBar2.width + _local2) < _local7){
__hpBar2.width = (__hpBar2.width + _local2);
} else {
__hpBar2.width = _local7;
};
};
};
}
private function menuOver(_arg1:MouseEvent):void{
Global.clickButton = true;
}
public function removeSelf():void{
Method.removeEnterframeObj(this);
parent.removeChild(this);
}
public function updateBulletUI(_arg1:uint):void{
var _local2:uint;
var _local3:MovieClip;
_local2 = 1;
while (_local2 <= _slugSpt.numChildren) {
_local3 = (_slugSpt.getChildByName(("bullet" + _local2)) as MovieClip);
if (_local2 <= _arg1){
_local3.gotoAndStop(1);
} else {
_local3.gotoAndStop(2);
};
_local2++;
};
}
}
}//package com.macrojoy.zgd.ui
Section 194
//PanelHelp (com.macrojoy.zgd.ui.PanelHelp)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.events.*;
public class PanelHelp extends Sprite {
public var backBtn:SimpleButton;
public function PanelHelp(){
init();
}
private function init():void{
backBtn.addEventListener(MouseEvent.CLICK, back);
}
private function back(_arg1:MouseEvent):void{
removeSelf();
Method.shineScreen();
Method.playSound(Data.CLICK1, 2, 1, Global.soundVolume);
}
public function removeSelf():void{
backBtn.removeEventListener(MouseEvent.CLICK, back);
parent.removeChild(this);
}
}
}//package com.macrojoy.zgd.ui
Section 195
//PanelMission (com.macrojoy.zgd.ui.PanelMission)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.events.*;
import flash.text.*;
public class PanelMission extends MovieClip {
public var backBtn:SimpleButton;
public var testBtn2:SimpleButton;
public var testBtn3:SimpleButton;
public var testBtn5:SimpleButton;
public var missionMC:Sprite;
public var testBtn1:SimpleButton;
public var testBtn4:SimpleButton;
private var _unlockMission:uint;
public function PanelMission(){
stop();
init();
addFrameScript((totalFrames - 1), lastFrameEvt);
}
private function testEvt(_arg1:MouseEvent):void{
var _local2:String;
_local2 = _arg1.currentTarget.name;
_local2 = _local2.replace("testBtn", "");
removeSelf();
stop();
GameDesign.bonusLevel(uint(_local2));
Global.testBonus = true;
Global.difficulty = 1;
}
private function mouseClick(_arg1:MouseEvent):void{
var _local2:MovieClip;
Method.stopAllSound();
Method.playSound(Data.CLICK2, 6, 1, Global.soundVolume, 100);
_local2 = (_arg1.currentTarget as MovieClip);
Global.currentMission = uint(_local2.name.replace("mission", ""));
play();
Global.testBonus = false;
}
private function lastFrameEvt():void{
removeSelf();
stop();
if (Global.mcLoader.isLoading){
Global.mcLoader.addEventListener(Event.COMPLETE, loadOver);
Global.mcLoader.showLoadingMC();
} else {
Global.score = 0;
GameDesign.newGame();
};
}
private function init():void{
backBtn.addEventListener(MouseEvent.CLICK, back);
initMission();
test();
}
private function initMission():void{
var _local1:uint;
var _local2:MovieClip;
var _local3:MovieClip;
var _local4:Sprite;
var _local5:TextField;
var _local6:String;
var _local7:Array;
var _local8:int;
if (Data.GAME_TESTING){
_unlockMission = missionMC.numChildren;
} else {
_unlockMission = (Global.missionRank.length + 1);
};
_local1 = 1;
while (_local1 <= missionMC.numChildren) {
_local2 = (missionMC.getChildByName(("mission" + _local1)) as MovieClip);
if (_local1 <= _unlockMission){
_local2.gotoAndStop("unlock");
_local2.buttonMode = true;
_local2.addEventListener(MouseEvent.CLICK, mouseClick);
_local3 = (_local2.getChildByName("headMC") as MovieClip);
_local3.mouseEnabled = false;
_local3.mouseChildren = false;
_local3.gotoAndStop(_local1);
_local4 = (_local2.getChildByName("rankMC") as Sprite);
_local4.mouseEnabled = false;
_local4.mouseChildren = false;
_local5 = (_local4.getChildAt(0) as TextField);
if (Global.missionRank[(_local1 - 1)] != null){
_local6 = Global.missionRank[(_local1 - 1)];
_local7 = Data.getArrData("rankNameArr");
_local8 = _local7.indexOf(_local6);
if (_local8 == 0){
_local5.textColor = Data.RANK_S_COLOUR;
} else {
if ((((_local8 >= 1)) && ((_local8 <= 3)))){
_local5.textColor = Data.RANK_A_COLOUR;
} else {
if ((((_local8 >= 4)) && ((_local8 <= 6)))){
_local5.textColor = Data.RANK_B_COLOUR;
} else {
if ((((_local8 >= 7)) && ((_local8 <= 9)))){
_local5.textColor = Data.RANK_C_COLOUR;
};
};
};
};
_local5.text = _local6;
};
} else {
_local2.gotoAndStop("lock");
};
_local1++;
};
}
private function test():void{
testBtn1.addEventListener(MouseEvent.CLICK, testEvt);
testBtn2.addEventListener(MouseEvent.CLICK, testEvt);
testBtn3.addEventListener(MouseEvent.CLICK, testEvt);
testBtn4.addEventListener(MouseEvent.CLICK, testEvt);
testBtn5.addEventListener(MouseEvent.CLICK, testEvt);
}
private function loadOver(_arg1:Event):void{
Global.mcLoader.removeEventListener(Event.COMPLETE, loadOver);
Global.score = 0;
GameDesign.newGame();
}
private function back(_arg1:MouseEvent):void{
removeSelf();
UIControl.createPanel("PanelTitle");
Method.shineScreen();
Method.playSound(Data.CLICK1, 6, 1, Global.soundVolume);
}
public function removeSelf():void{
var _local1:uint;
var _local2:MovieClip;
backBtn.removeEventListener(MouseEvent.CLICK, back);
_local1 = 1;
while (_local1 <= missionMC.numChildren) {
_local2 = (missionMC.getChildByName(("mission" + _local1)) as MovieClip);
if (_local1 <= _unlockMission){
_local2.removeEventListener(MouseEvent.CLICK, mouseClick);
};
_local1++;
};
parent.removeChild(this);
}
}
}//package com.macrojoy.zgd.ui
Section 196
//PanelOptions (com.macrojoy.zgd.ui.PanelOptions)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.events.*;
public class PanelOptions extends Sprite {
public var backBtn:SimpleButton;
public var Right:MovieClip;
private var _keyGroupArr:Array;
public var Left:MovieClip;
public var SoundBarMC:SoundBar;
private var _qualityGroupArr:Array;
public var defaultBtn:SimpleButton;
public var Jump:MovieClip;
public var Attack:MovieClip;
public var Up:MovieClip;
public var Down:MovieClip;
public var highMC:MovieClip;
public var mediumMC:MovieClip;
public var MusicBarMC:SoundBar;
public var lowMC:MovieClip;
private var _qualityNameArr:Array;
public function PanelOptions(){
_qualityNameArr = ["low", "medium", "high"];
super();
init();
}
private function initQualityGroup():void{
var _local1:uint;
var _local2:MovieClip;
_qualityGroupArr = new Array();
_local1 = 0;
while (_local1 < _qualityNameArr.length) {
_local2 = (getChildByName((_qualityNameArr[_local1] + "MC")) as MovieClip);
_local2.buttonMode = true;
if (_qualityNameArr[_local1] == Global.stage.quality.toLowerCase()){
_local2.gotoAndStop(1);
} else {
_local2.gotoAndStop(2);
};
_qualityGroupArr.push(_local2);
_local2.addEventListener(MouseEvent.CLICK, trySetQuality);
_local1++;
};
}
private function init():void{
backBtn.addEventListener(MouseEvent.CLICK, backToMenu);
defaultBtn.addEventListener(MouseEvent.CLICK, defaultOption);
initQualityGroup();
initKeyGroup();
}
private function defaultOption(_arg1:MouseEvent):void{
Method.shineScreen();
SoundBarMC.defaultAll();
MusicBarMC.defaultAll();
defaultKey();
defaultQulity();
Method.playSound(Data.CLICK1, 2, 1, Global.soundVolume);
}
private function removeKeyEvent():void{
var _local1:uint;
var _local2:KeyItem;
_local1 = 0;
while (_local1 < _keyGroupArr.length) {
_local2 = (_keyGroupArr[_local1] as KeyItem);
_local2.removeEventListener(MouseEvent.CLICK, keyMCDown);
_local2.currentKey();
_local1++;
};
}
private function removeQulityEvent():void{
var _local1:uint;
_local1 = 0;
while (_local1 < _qualityGroupArr.length) {
MovieClip(_qualityGroupArr[_local1]).removeEventListener(MouseEvent.CLICK, trySetQuality);
_local1++;
};
}
private function backToMenu(_arg1:MouseEvent):void{
removeSelf();
if (Global.gameStatus != "playing"){
Method.shineScreen();
};
Method.playSound(Data.CLICK1, 2, 1, Global.soundVolume);
}
private function setQuality(_arg1:String):void{
var _local2:uint;
var _local3:uint;
_local2 = _qualityNameArr.indexOf(_arg1);
_local3 = 0;
while (_local3 < _qualityGroupArr.length) {
if (_local2 == _local3){
MovieClip(_qualityGroupArr[_local3]).gotoAndStop(1);
} else {
MovieClip(_qualityGroupArr[_local3]).gotoAndStop(2);
};
_local3++;
};
Method.setQuality(_arg1);
}
private function trySetQuality(_arg1:MouseEvent):void{
var _local2:MovieClip;
var _local3:String;
var _local4:String;
_local2 = (_arg1.currentTarget as MovieClip);
_local3 = _local2.name;
_local4 = _local3.replace("MC", "");
setQuality(_local4);
Method.playSound(Data.CLICK3, 2, 1, Global.soundVolume);
}
private function keyMCDown(_arg1:MouseEvent):void{
var _local2:uint;
var _local3:KeyItem;
Method.playSound(Data.CLICK3, 2, 1, Global.soundVolume);
_local2 = 0;
while (_local2 < _keyGroupArr.length) {
_local3 = (_keyGroupArr[_local2] as KeyItem);
if (_local3 == _arg1.currentTarget){
_local3.listen();
} else {
_local3.currentKey();
};
_local2++;
};
}
private function defaultQulity():void{
setQuality(Data.QUALITY);
}
private function initKeyGroup():void{
var _local1:Array;
var _local2:uint;
var _local3:KeyItem;
_keyGroupArr = new Array();
_local1 = Data.getArrData("keyNameArr");
_local2 = 0;
while (_local2 < _local1.length) {
_local3 = (getChildByName(_local1[_local2]) as KeyItem);
_local3.buttonMode;
_keyGroupArr.push(_local3);
_local3.addEventListener(MouseEvent.CLICK, keyMCDown);
_local2++;
};
}
private function defaultKey():void{
var _local1:uint;
var _local2:KeyItem;
_local1 = 0;
while (_local1 < _keyGroupArr.length) {
_local2 = (_keyGroupArr[_local1] as KeyItem);
_local2.defaultThis();
_local1++;
};
}
private function removeSelf():void{
parent.removeChild(this);
backBtn.removeEventListener(MouseEvent.CLICK, backToMenu);
defaultBtn.removeEventListener(MouseEvent.CLICK, defaultOption);
removeQulityEvent();
removeKeyEvent();
SoundBarMC.removeEvent();
MusicBarMC.removeEvent();
Global.stage.focus = null;
}
}
}//package com.macrojoy.zgd.ui
Section 197
//PanelPause (com.macrojoy.zgd.ui.PanelPause)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.events.*;
public class PanelPause extends MovieClip {
public var optionBtn:SimpleButton;
public var quitBtn:SimpleButton;
public var resumeBtn:SimpleButton;
public function PanelPause(){
init();
}
private function init():void{
resumeBtn.addEventListener(MouseEvent.CLICK, resumeHandler);
optionBtn.addEventListener(MouseEvent.CLICK, optionHandler);
quitBtn.addEventListener(MouseEvent.CLICK, tryQuitGame);
}
private function optionHandler(_arg1:MouseEvent):void{
UIControl.createPanel("PanelOptions");
Method.playSound(Data.CLICK1, 2, 1, Global.soundVolume, 100);
}
public function resumeHandler(_arg1:MouseEvent):void{
stage.focus = null;
removeSelf();
Method.gameOn();
Method.playSound(Data.CLICK1, 2, 1, Global.soundVolume, 100);
}
public function tryQuitGame(_arg1:MouseEvent):void{
var _local2:PanelSure;
_local2 = (UIControl.createPanel("PanelSure") as PanelSure);
_local2.addEventListener("delete", quitGame);
Method.playSound(Data.CLICK1, 2, 1, Global.soundVolume, 100);
}
public function quitGame(_arg1:Event):void{
removeSelf();
Method.stopAllSound();
GameDesign.clearGame();
if (Global.currentMission <= Data.MISSION_NUM){
UIControl.createPanel("PanelMission");
Method.shineScreen();
Method.playSound("Title", 0, int.MAX_VALUE, Global.musicVolume);
} else {
UIControl.createPanel("PanelEditor");
};
Global.retryTimes = 0;
Method.playSound(Data.CLICK1, 2, 1, Global.soundVolume, 100);
}
public function removeSelf():void{
parent.removeChild(this);
resumeBtn.removeEventListener(MouseEvent.CLICK, resumeHandler);
optionBtn.removeEventListener(MouseEvent.CLICK, optionHandler);
quitBtn.removeEventListener(MouseEvent.CLICK, tryQuitGame);
}
}
}//package com.macrojoy.zgd.ui
Section 198
//PanelResult (com.macrojoy.zgd.ui.PanelResult)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.events.*;
import com.miniclip.highscores.*;
import flash.ui.*;
public class PanelResult extends MovieClip {
public var backBtn:SimpleButton;
var myHighscores:HighscoresLoader;
public var submitBtn:SimpleButton;
public var nextBtn:SimpleButton;
public var mc:MovieClip;
public var retryBtn:SimpleButton;
private var _titleMC:MovieClip;
public function PanelResult(){
addFrameScript((totalFrames - 1), lastFrameScript);
getChildren();
init();
}
private function keyEvt(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.SPACE){
if (nextBtn.parent != null){
nextHandler(null);
};
};
}
private function init():void{
var _local1:MovieClip;
var _local2:MovieClip;
var _local3:uint;
var _local4:MovieClip;
var _local5:MovieClip;
var _local6:uint;
var _local7:MovieClip;
var _local8:uint;
var _local9:MovieClip;
var _local10:uint;
var _local11:MovieClip;
var _local12:uint;
var _local13:uint;
var _local14:MovieClip;
var _local15:MovieClip;
_local1 = (mc.getChildByName("enemyNumMC") as MovieClip);
Method.showNumber(_local1, Global.killNum, false);
_local2 = (mc.getChildByName("enemyScoreMC") as MovieClip);
_local3 = (Global.killNum * Data.ENEMY_VALUE);
Global.score = (Global.score + _local3);
Method.showNumber(_local2, _local3, false);
_local4 = (mc.getChildByName("itemNumMC") as MovieClip);
Method.showNumber(_local4, Global.itemNum, false);
_local5 = (mc.getChildByName("itemScoreMC") as MovieClip);
_local6 = (Global.itemNum * Data.ITEM_VALUE);
Global.score = (Global.score + _local6);
Method.showNumber(_local5, _local6, false);
_local7 = (mc.getChildByName("bulletNumMC") as MovieClip);
_local8 = (Global.bulletableNum + Global.bulletPreNum);
Method.showNumber(_local7, _local8, false);
_local9 = (mc.getChildByName("bulletScoreMC") as MovieClip);
_local10 = (_local8 * Data.BULLET_VALUE);
Global.score = (Global.score + _local10);
Method.showNumber(_local9, _local10, false);
_local11 = (mc.getChildByName("timeScoreMC") as MovieClip);
_local12 = Math.floor((Global.gameTimer / 35));
_local13 = (_local12 * Data.TIME_VALUE);
Global.score = (Global.score + _local13);
Method.showNumber(_local11, _local13, false);
_local14 = (mc.getChildByName("totalScoreMC") as MovieClip);
Method.showNumber(_local14, Global.score, false);
_local15 = (mc.getChildByName("rankMC") as MovieClip);
if (Global.gameResult){
if (Global.hitedNum < 9){
_local15.gotoAndStop((Global.hitedNum + 2));
} else {
_local15.gotoAndStop(11);
};
removeChild(retryBtn);
if (Global.currentMission < Data.MISSION_NUM){
_titleMC.gotoAndStop(2);
removeChild(submitBtn);
} else {
if (Global.currentMission == Data.MISSION_NUM){
_titleMC.gotoAndStop(3);
removeChild(nextBtn);
} else {
_titleMC.gotoAndStop(2);
removeChild(nextBtn);
removeChild(submitBtn);
};
};
} else {
_local15.gotoAndStop(1);
_titleMC.gotoAndStop(1);
removeChild(nextBtn);
if (Global.currentMission <= Data.MISSION_NUM){
} else {
removeChild(submitBtn);
};
};
}
private function submitHandler(_arg1:MouseEvent=null):void{
Method.playSound(Data.CLICK1, 2, 1, Global.soundVolume, 100);
myHighscores = Method.submitScore(stage, Global.score);
myHighscores.addEventListener("close", getBackPress);
}
private function lastFrameScript(){
stop();
backBtn.addEventListener(MouseEvent.CLICK, backToMenu);
if (nextBtn.parent != null){
nextBtn.addEventListener(MouseEvent.CLICK, nextHandler);
Global.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyEvt);
};
if (submitBtn.parent != null){
submitBtn.addEventListener(MouseEvent.CLICK, submitHandler);
};
if (retryBtn.parent != null){
retryBtn.addEventListener(MouseEvent.CLICK, retryHandler);
};
GameDesign.clearGame();
}
private function backToMenu(_arg1:MouseEvent=null):void{
removeSelf();
Method.stopAllSound();
Global.retryTimes = 0;
if (Global.currentMission <= Data.MISSION_NUM){
UIControl.createPanel("PanelMission");
Method.playSound("Title", 0, int.MAX_VALUE, Global.musicVolume);
} else {
UIControl.createPanel("PanelEditor");
};
}
private function getChildren():void{
_titleMC = (mc.getChildByName("titleMC") as MovieClip);
}
private function retryHandler(_arg1:MouseEvent=null):void{
Global.retryTimes++;
removeSelf();
Method.stopAllSound();
Global.score = 0;
GameDesign.newGame();
Method.playSound(Data.CLICK1, 2, 1, Global.soundVolume, 100);
}
private function nextHandler(_arg1:MouseEvent=null):void{
var _local2:Array;
var _local3:Boolean;
var _local4:uint;
var _local5:Array;
removeSelf();
Method.stopAllSound();
_local2 = Data.getArrData("bonusMissionArr");
_local4 = 0;
while (_local4 < _local2.length) {
_local5 = _local2[_local4];
if (_local5[0] == Global.currentMission){
GameDesign.bonusLevel(_local5[1]);
_local3 = true;
break;
};
_local4++;
};
Global.currentMission++;
if (!_local3){
GameDesign.newGame();
};
Global.retryTimes = 0;
Method.playSound(Data.CLICK1, 2, 1, Global.soundVolume, 100);
}
private function getBackPress(_arg1:Event=null):void{
if (myHighscores){
myHighscores.removeEventListener("close", getBackPress);
};
backToMenu();
}
public function removeSelf():void{
parent.removeChild(this);
backBtn.removeEventListener(MouseEvent.CLICK, backToMenu);
submitBtn.removeEventListener(MouseEvent.CLICK, submitHandler);
nextBtn.removeEventListener(MouseEvent.CLICK, nextHandler);
retryBtn.removeEventListener(MouseEvent.CLICK, retryHandler);
Global.stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyEvt);
}
}
}//package com.macrojoy.zgd.ui
Section 199
//PanelSure (com.macrojoy.zgd.ui.PanelSure)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.events.*;
public class PanelSure extends Sprite {
private var _yesBtn:SimpleButton;
public var mc:MovieClip;
private var _noBtn:SimpleButton;
public function PanelSure(){
init();
}
private function init():void{
getChildren();
_noBtn.addEventListener(MouseEvent.CLICK, cancel);
_yesBtn.addEventListener(MouseEvent.CLICK, deleteUser);
}
private function deleteUser(_arg1:MouseEvent):void{
removeSelf();
dispatchEvent(new Event("delete"));
}
private function getChildren():void{
_noBtn = (mc.getChildByName("noBtn") as SimpleButton);
_yesBtn = (mc.getChildByName("yesBtn") as SimpleButton);
}
private function cancel(_arg1:MouseEvent):void{
removeSelf();
}
public function removeSelf():void{
parent.removeChild(this);
_noBtn.removeEventListener(MouseEvent.CLICK, cancel);
_yesBtn.removeEventListener(MouseEvent.CLICK, deleteUser);
Global.stage.focus = null;
}
}
}//package com.macrojoy.zgd.ui
Section 200
//PanelTitle (com.macrojoy.zgd.ui.PanelTitle)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.events.*;
import flash.text.*;
public class PanelTitle extends Sprite {
public var helpBtn:SimpleButton;
public var versionTxt:TextField;
public var playBtn:SimpleButton;
public var editorBtn:SimpleButton;
public var optionsBtn:SimpleButton;
public function PanelTitle(){
init();
}
private function init():void{
playBtn.addEventListener(MouseEvent.CLICK, playEvent);
helpBtn.addEventListener(MouseEvent.CLICK, helpEvent);
optionsBtn.addEventListener(MouseEvent.CLICK, optionsEvent);
editorBtn.addEventListener(MouseEvent.CLICK, editEvent);
versionTxt.text = Data.VERSION;
}
private function checkLocalSave():Boolean{
var result:String;
try {
result = Global.localInfo.flush(1000);
if (result == "pending"){
return (false);
} else {
if (result == "flushed"){
return (true);
};
};
} catch(err:Error) {
return (false);
};
return (false);
}
private function editEvent(_arg1:MouseEvent):void{
if (checkLocalSave()){
removeSelf();
UIControl.createPanel("PanelEditor");
Method.shineScreen();
};
Method.playSound(null, 0, 0, 0, 0);
Method.playSound(Data.CLICK1, 6, 1, Global.soundVolume, 100);
}
private function optionsEvent(_arg1:MouseEvent):void{
UIControl.createPanel("PanelOptions");
Method.playSound(Data.CLICK1, 2, 1, Global.soundVolume);
Method.shineScreen();
}
private function playEvent(_arg1:MouseEvent):void{
if (checkLocalSave()){
removeSelf();
UIControl.createPanel("PanelMission");
Method.shineScreen();
Method.playSound(Data.CLICK1, 2, 1, Global.soundVolume);
};
}
private function helpEvent(_arg1:MouseEvent):void{
UIControl.createPanel("PanelHelp");
Method.shineScreen();
Method.playSound(Data.CLICK1, 2, 1, Global.soundVolume);
}
public function removeSelf():void{
playBtn.removeEventListener(MouseEvent.CLICK, playEvent);
helpBtn.removeEventListener(MouseEvent.CLICK, helpEvent);
optionsBtn.removeEventListener(MouseEvent.CLICK, optionsEvent);
editorBtn.removeEventListener(MouseEvent.CLICK, editEvent);
parent.removeChild(this);
}
}
}//package com.macrojoy.zgd.ui
Section 201
//PanelWin (com.macrojoy.zgd.ui.PanelWin)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
public class PanelWin extends MovieClip {
public function PanelWin(){
addFrameScript(105, stopFrameScript);
addFrameScript((totalFrames - 1), lastFrameScript);
}
private function lastFrameScript():void{
stop();
removeSelf();
UIControl.createPanel("PanelResult");
}
private function stopFrameScript():void{
UserControl.stopControl();
Global.hero.victoryAction();
}
private function removeSelf():void{
if (parent != null){
parent.removeChild(this);
};
}
}
}//package com.macrojoy.zgd.ui
Section 202
//ScrollBar (com.macrojoy.zgd.ui.ScrollBar)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.events.*;
import flash.utils.*;
public class ScrollBar extends Sprite {
public var dirUp:SimpleButton;
private var _scrollHeight:int;
public var bg:Sprite;
private var _times:uint;
private var _adjustY:Number;
private var _timer:Timer;
private var _targetY:Number;
public var block:Sprite;
private var _target:Sprite;
private var _scrollSpeed:int;
private var _dir:int;
public var dirDown:SimpleButton;
public function ScrollBar(){
_timer = new Timer(100, int.MAX_VALUE);
}
function init(_arg1:Sprite, _arg2:uint):void{
_target = _arg1;
_scrollSpeed = _arg2;
_scrollHeight = (Math.floor((((_arg1.height + 20) - bg.height) / _scrollSpeed)) + 1);
if (_scrollHeight <= 0){
visible = false;
removeEvent();
} else {
visible = true;
addControl();
_targetY = 57;
block.height = Math.round((((bg.height - dirUp.height) - dirDown.height) - _scrollHeight));
block.y = Math.floor(((((_targetY - _target.y) * _scrollHeight) / ((_target.height + 20) - bg.height)) + dirUp.height));
};
}
private function upEvt(_arg1:MouseEvent):void{
_dir = 1;
_times = 0;
_timer.addEventListener(TimerEvent.TIMER, moveOn);
_timer.start();
moveOn(null);
}
private function moveblock(_arg1:MouseEvent):void{
if ((mouseY + _adjustY) < dirUp.height){
block.y = dirUp.height;
} else {
if (((mouseY + _adjustY) + block.height) < (bg.height - dirDown.height)){
block.y = (mouseY + _adjustY);
} else {
block.y = ((bg.height - dirDown.height) - block.height);
};
};
_target.y = Math.floor((_targetY - ((((_target.height + 20) - bg.height) * (block.y - dirUp.height)) / _scrollHeight)));
}
private function stopMoveBlock(_arg1:MouseEvent):void{
Global.stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveblock);
_timer.removeEventListener(TimerEvent.TIMER, moveOn);
}
private function addControl():void{
block.buttonMode = true;
block.addEventListener(MouseEvent.MOUSE_DOWN, startMoveBlock);
dirUp.addEventListener(MouseEvent.MOUSE_DOWN, upEvt);
dirDown.addEventListener(MouseEvent.MOUSE_DOWN, downEvt);
Global.stage.addEventListener(MouseEvent.MOUSE_UP, stopMoveBlock);
Global.stage.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelEvent);
}
private function mouseWheelEvent(_arg1:MouseEvent):void{
if (parent.visible){
if (_arg1.delta > 0){
_dir = 1;
if ((_target.y + (10 * _dir)) < _targetY){
_target.y = (_target.y + (10 * _dir));
} else {
_target.y = _targetY;
};
} else {
_dir = -1;
if ((_target.y + (10 * _dir)) > (((_targetY + bg.height) - _target.height) - 20)){
_target.y = (_target.y + (10 * _dir));
} else {
_target.y = (((_targetY + bg.height) - _target.height) - 20);
};
};
block.y = Math.floor(((((_targetY - _target.y) * _scrollHeight) / ((_target.height + 20) - bg.height)) + dirUp.height));
};
}
private function moveOn(_arg1:TimerEvent):void{
if ((((_times == 0)) || ((_times >= 3)))){
if (_dir < 0){
if ((_target.y + (10 * _dir)) > (((_targetY + bg.height) - _target.height) - 20)){
_target.y = (_target.y + (10 * _dir));
} else {
_target.y = (((_targetY + bg.height) - _target.height) - 20);
_timer.removeEventListener(TimerEvent.TIMER, moveOn);
};
} else {
if ((_target.y + (10 * _dir)) < _targetY){
_target.y = (_target.y + (10 * _dir));
} else {
_target.y = _targetY;
_timer.removeEventListener(TimerEvent.TIMER, moveOn);
};
};
block.y = Math.floor(((((_targetY - _target.y) * _scrollHeight) / ((_target.height + 20) - bg.height)) + dirUp.height));
};
_times++;
}
public function removeEvent():void{
block.removeEventListener(MouseEvent.MOUSE_DOWN, startMoveBlock);
dirUp.removeEventListener(MouseEvent.MOUSE_DOWN, upEvt);
dirDown.removeEventListener(MouseEvent.MOUSE_DOWN, downEvt);
Global.stage.removeEventListener(MouseEvent.MOUSE_UP, stopMoveBlock);
Global.stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveblock);
Global.stage.removeEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelEvent);
_target = null;
}
private function downEvt(_arg1:MouseEvent):void{
_dir = -1;
_times = 0;
_timer.addEventListener(TimerEvent.TIMER, moveOn);
_timer.start();
moveOn(null);
}
private function startMoveBlock(_arg1:MouseEvent):void{
Global.stage.addEventListener(MouseEvent.MOUSE_MOVE, moveblock);
_adjustY = (block.y - mouseY);
}
}
}//package com.macrojoy.zgd.ui
Section 203
//SoundBar (com.macrojoy.zgd.ui.SoundBar)
package com.macrojoy.zgd.ui {
import flash.display.*;
import com.macrojoy.zgd.*;
import flash.events.*;
public class SoundBar extends Sprite {
public var bar:MovieClip;
private var _targetName:String;
private var _totalLength:uint;
public var block:MovieClip;
public function SoundBar(){
init();
}
private function init():void{
var _local1:Number;
_totalLength = Math.floor((bar.width - block.width));
block.buttonMode = true;
_targetName = name.replace("BarMC", "");
_local1 = Global[(_targetName.toLowerCase() + "Volume")];
block.x = (_local1 * _totalLength);
addEventListener(MouseEvent.MOUSE_DOWN, moveblock);
block.addEventListener(MouseEvent.MOUSE_DOWN, startMoveBlock);
Global.stage.addEventListener(MouseEvent.MOUSE_UP, stopMoveBlock);
}
private function moveblock(_arg1:MouseEvent):void{
var _local2:Number;
if (_arg1.type == "mouseDown"){
Method.playSound(Data.CLICK3, 2, 1, Global.soundVolume);
};
if (mouseX < 0){
block.x = 0;
} else {
if (mouseX > _totalLength){
block.x = _totalLength;
} else {
block.x = mouseX;
};
};
if (_targetName != null){
_local2 = (Math.floor(((block.x / _totalLength) * 100)) / 100);
Method.setVolume(_local2, _targetName);
};
}
private function stopMoveBlock(_arg1:MouseEvent):void{
Global.stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveblock);
}
public function removeEvent():void{
removeEventListener(MouseEvent.MOUSE_DOWN, moveblock);
block.removeEventListener(MouseEvent.MOUSE_DOWN, startMoveBlock);
Global.stage.removeEventListener(MouseEvent.MOUSE_UP, stopMoveBlock);
Global.stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveblock);
}
public function defaultAll():void{
var _local1:Number;
_local1 = Data[_targetName.toUpperCase()];
block.x = (_local1 * _totalLength);
Method.setVolume(_local1, _targetName);
}
private function startMoveBlock(_arg1:MouseEvent):void{
Method.playSound(Data.CLICK3, 2, 1, Global.soundVolume);
Global.stage.addEventListener(MouseEvent.MOUSE_MOVE, moveblock);
}
}
}//package com.macrojoy.zgd.ui
Section 204
//TimeOverPanel (com.macrojoy.zgd.ui.TimeOverPanel)
package com.macrojoy.zgd.ui {
public class TimeOverPanel extends OverPanel {
}
}//package com.macrojoy.zgd.ui
Section 205
//Data (com.macrojoy.zgd.Data)
package com.macrojoy.zgd {
public class Data {
public static const ENEMY10_PRESENT_ODDS:Number = 0.5;
public static const BOSS_HP_MULTIPLE_3:Number = 0.67;
public static const BOSS_HP_MULTIPLE_4:Number = 0.58;
public static const BOSS_HP_MULTIPLE_5:Number = 0.5;
public static const BOSS_HP_MULTIPLE_2:Number = 0.75;
public static const ENEMY19_CATCH_POWER:uint = 35;
public static const BOSS_HP_MULTIPLE_1:Number = 1;
public static const mission2Str:String = "<AUTHOR:mission2><VERSION:1.0.238><DATA:2%2(41)600%2(41)2147483647%2(41)5000%2(41)9%3(4)0%2(41)13%2(41)460(48)400%2(41)10%2(41)919(14)5(48)1239%2(41)7%2(41)839(14)5(48)2020%2(41)7%2(41)839(14)5(48)2801%2(41)10%2(41)919(14)5(48)3640%2(41)12%2(41)1017%3(4)6%2(41)3394%2(41)(29)400%2(41)7(48)5%2(41)3239%2(41)(29)400%2(41)7(48)6%2(41)2489%2(41)(29)400%2(41)6(48)5%2(41)2257%2(41)(29)400%2(41)6(48)2%2(41)1529%2(41)(29)361%2(41)8(48)1%2(41)3079%2(41)(29)337%2(41)7(48)1%2(41)3036%2(41)(29)337%2(41)7(48)2%2(41)2599%2(41)(29)322%2(41)7(48)2%2(41)2724%2(41)(29)322%2(41)7(48)2%2(41)3582%2(41)(29)337%2(41)7(48)2%2(41)3629%2(41)(29)337%2(41)7(48)2%2(41)4135%2(41)(29)93%2(41)13(48)1%2(41)3739%2(41)(29)93%2(41)13(48)2%2(41)4109%2(41)(29)249%2(41)7(48)3%2(41)1095%2(41)(29)365%2(41)4(48)3%2(41)704%2(41)(29)365%2(41)4(48)3%2(41)1900%2(41)(29)344%2(41)5(48)3%2(41)1737%2(41)(29)344%2(41)5%3(4)(41)(2)(30)(17)%2(41)3946%2(41)(29)152%2(41)57(48)(41)(2)(30)(17)%2(41)4366%2(41)(29)175%2(41)57(48)(41)(2)(30)(17)%2(41)4487%2(41)(29)175%2(41)57(48)(41)(13)(0)(30)(32)%2(41)329%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)287%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)369%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)3910%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)3974%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)4339%2(41)(29)116%2(41)57(48)(41)(2)(30)(17)%2(41)4399%2(41)(29)116%2(41)57(48)(41)(2)(30)(17)%2(41)4459%2(41)(29)116%2(41)57(48)(41)(2)(30)(17)%2(41)4518%2(41)(29)116%2(41)57%3(4)2219625%3(4)23(8)10(8)2009>";
public static const ENEMY_CARD_POWER:uint = 30;
public static const GRIVATY:Number = 2;
public static const HERO_BOTTLEUP_SPEED:uint = 10;
public static const mission17Str:String = "<AUTHOR:mission17><VERSION:1.0.226><DATA:2%2(41)600%2(41)3000%2(41)5000%2(41)15%3(4)0%2(41)13%2(41)460(48)400%2(41)5%2(41)669(48)1008%2(41)5%2(41)669(48)1616%2(41)5%2(41)669(48)2224%2(41)8%2(41)791(48)2954%2(41)8%2(41)791(48)3684%2(41)8%2(41)791(48)4414%2(41)8%2(41)791(48)5144%2(41)8%2(41)791(48)5874%2(41)9%2(41)463(14)90000000000003(48)6274%2(41)9%2(41)463(14)90000000000003(48)6674%2(41)5%2(41)669(48)7282%2(41)8%2(41)791(48)8012%2(41)5%2(41)669(48)8620%2(41)8%2(41)791(48)9350%2(41)8%2(41)791(48)10080%2(41)5%2(41)669(48)10688%2(41)5%2(41)669(48)11296%2(41)9%2(41)463(14)90000000000003(48)11696%2(41)9%2(41)463(14)90000000000003(48)12096%2(41)9%2(41)463(14)90000000000003(48)12496%2(41)5%2(41)669(48)13104%2(41)8%2(41)791(48)13834%2(41)12%2(41)1017%3(4)4%2(41)640%2(41)36%2(41)1(48)4%2(41)718%2(41)36%2(41)2(48)4%2(41)1304%2(41)36%2(41)2(48)4%2(41)1389%2(41)36%2(41)3(48)2%2(41)3276%2(41)(29)92%2(41)2(48)2%2(41)3465%2(41)(29)92%2(41)2(48)2%2(41)3806%2(41)(29)92%2(41)6(48)2%2(41)3980%2(41)(29)92%2(41)6(48)2%2(41)4310%2(41)(29)92%2(41)7(48)2%2(41)4601%2(41)(29)92%2(41)7(48)6%2(41)4684%2(41)(29)400%2(41)14(48)6%2(41)4868%2(41)(29)400%2(41)14(48)2%2(41)4768%2(41)(29)92%2(41)8(48)2%2(41)5026%2(41)(29)92%2(41)8(48)2%2(41)5528%2(41)(29)92%2(41)10(48)2%2(41)5671%2(41)(29)342%2(41)9(48)2%2(41)6116%2(41)(29)343%2(41)2(48)2%2(41)5883%2(41)(29)93%2(41)2(48)2%2(41)6455%2(41)(29)342(14)65000000000003%2(41)2(48)2%2(41)6732%2(41)(29)93%2(41)1(48)2%2(41)7569%2(41)(29)92%2(41)4(48)2%2(41)7743%2(41)(29)92%2(41)6(48)2%2(41)7818%2(41)(29)92%2(41)6(48)2%2(41)7893%2(41)(29)92%2(41)6(48)2%2(41)8134%2(41)(29)343(14)75%2(41)2(48)2%2(41)8736%2(41)(29)92%2(41)2(48)2%2(41)9476%2(41)(29)92%2(41)1(48)2%2(41)9096%2(41)(29)142%2(41)6(48)2%2(41)9978%2(41)(29)342%2(41)5(48)2%2(41)10338%2(41)(29)343%2(41)6(48)2%2(41)10614%2(41)(29)93%2(41)7(48)2%2(41)10877%2(41)(29)343%2(41)7(48)2%2(41)11231%2(41)(29)343%2(41)9(48)2%2(41)11641%2(41)(29)344%2(41)9(48)2%2(41)11989%2(41)(29)343%2(41)9(48)2%2(41)12478%2(41)(29)93%2(41)10(48)2%2(41)12685%2(41)(29)343%2(41)8(48)2%2(41)13030%2(41)(29)343%2(41)7(48)2%2(41)13341%2(41)(29)327%2(41)7(48)2%2(41)7103%2(41)(29)93%2(41)4(48)2%2(41)7448%2(41)(29)92%2(41)4(48)2%2(41)14011%2(41)(29)93%2(41)19(48)6%2(41)14163%2(41)(29)400%2(41)18(48)5%2(41)13862%2(41)(29)400%2(41)17(48)2%2(41)13606%2(41)(29)92%2(41)10%3(4)(41)(13)(0)(30)(32)%2(41)2534(14)9500000000003%2(41)(29)292(14)1%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2600(14)4500000000003%2(41)(29)292(14)45%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2986(14)05%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3060(14)5%2(41)(29)292(14)2%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3380%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3603%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3666%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3895%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4163%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4389%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4685%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4873%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4939%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5373%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5674%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5741%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6096(14)150000000001%2(41)(29)293%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6161(14)1%2(41)(29)294%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6442%2(41)(29)292(14)65000000000003%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6504%2(41)(29)293%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8129(14)55%2(41)(29)293(14)75%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8198(14)9%2(41)(29)293%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8534%2(41)(29)293%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8812%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8961%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9241%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9308%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9602%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9672%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9986%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10312%2(41)(29)293%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10380%2(41)(29)293%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10806%2(41)(29)293%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10881%2(41)(29)293%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11235%2(41)(29)293%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11631(14)75%2(41)(29)294%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11696(14)050000000001%2(41)(29)293%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12011(14)75%2(41)(29)293%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12076(14)050000000001%2(41)(29)291(14)85%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12332%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12399(14)35%2(41)(29)292(14)7%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12682%2(41)(29)293%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13033%2(41)(29)293%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13267%2(41)(29)292%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13340%2(41)(29)277%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13406%2(41)(29)277%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2500(14)4500000000003%2(41)(29)242(14)10000000000002%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2620(14)4500000000003%2(41)(29)242(14)45000000000002%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2939(14)4%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3099(14)4%2(41)(29)242(14)20000000000002%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3376%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3558%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3707%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3893%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4118%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4392%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4685%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4873%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4973%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5330%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5644%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5767%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6064(14)450000000001%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6184(14)450000000001%2(41)(29)243(14)65%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6406%2(41)(29)242(14)65%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6521%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8128%2(41)(29)243(14)75%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8239(14)6%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8481%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8577%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8813%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8961%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9240%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9351%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9560%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9706%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9943%2(41)(29)242%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10046%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10310%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10426%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10806%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10931%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11197%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11283%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11600(14)35%2(41)(29)244%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11733(14)2%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11977(14)5%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12093(14)2%2(41)(29)241(14)85000000000002%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12319(14)800000000001%2(41)(29)242(14)70000000000002%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12431(14)6%2(41)(29)242(14)70000000000002%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12639%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12728%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12989%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13266%2(41)(29)242%2(41)81(48)(4)(2)(57)%2(41)13341%2(41)(29)251%2(41)69(48)(4)(2)(57)%2(41)13404%2(41)(29)251%2(41)69(48)(41)(13)(0)(30)(32)%2(41)2459(14)3500000000004%2(41)(29)192(14)10000000000002%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2667(14)15%2(41)(29)192(14)45000000000002%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2896(14)05%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3137(14)15%2(41)(29)192(14)20000000000002%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3376%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3561%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3710%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3888%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4077%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4391%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4690%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4864%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4926%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5299%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5611%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5805%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6021(14)150000000001%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6214(14)450000000001%2(41)(29)193(14)65%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6377%2(41)(29)192(14)65%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6552%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8132%2(41)(29)193(14)75%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8197(14)35%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8457%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8532%2(41)(29)178%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8605%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8812%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8955%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9238%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9311%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9538%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9742%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9917%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9998%2(41)(29)177%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10071%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10308%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10456%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10801%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10887%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11164%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11248%2(41)(29)178%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11320%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11566(14)050000000001%2(41)(29)194%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11767(14)45%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11944(14)650000000001%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12117(14)5%2(41)(29)192(14)70000000000002%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12324(14)050000000001%2(41)(29)192(14)70000000000002%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12387(14)800000000001%2(41)(29)192(14)70000000000002%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12611%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12692%2(41)(29)178%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12761%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12967%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13086%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13267%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13336%2(41)(29)201%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13407%2(41)(29)201%2(41)81(48)(41)(13)(0)(30)(32)%2(41)548%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)945%2(41)(29)143%2(41)81(48)(41)(2)(30)(17)%2(41)1152%2(41)(29)152%2(41)57(48)(41)(2)(30)(17)%2(41)1219%2(41)(29)152%2(41)57(48)(41)(2)(30)(17)%2(41)1543%2(41)(29)152%2(41)57(48)(41)(13)(0)(30)(32)%2(41)2412(14)7000000000003%2(41)(29)142(14)1%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2707(14)15%2(41)(29)142(14)45000000000002%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2861(14)6000000000004%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3169(14)4%2(41)(29)142(14)20000000000002%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3373%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3559%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3708%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3894%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4054%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4386%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4687%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4878%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5272%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5642%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5773%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5991(14)150000000001%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6242(14)8%2(41)(29)143(14)65%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6350%2(41)(29)142(14)65%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6587%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8130(14)6%2(41)(29)143(14)75%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8243(14)550000000001%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8426%2(41)(29)143%2(41)81(48)(4)(2)(57)%2(41)8534%2(41)(29)152%2(41)69(48)(41)(13)(0)(30)(32)%2(41)8630%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8813%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8958%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9241%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9351%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9570%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9726%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9890%2(41)(29)142%2(41)81(48)(4)(2)(57)%2(41)10006%2(41)(29)151%2(41)69(48)(41)(13)(0)(30)(32)%2(41)10101%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10307%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10420%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10804%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10933%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11132%2(41)(29)143%2(41)81(48)(4)(2)(57)%2(41)11246%2(41)(29)152%2(41)69(48)(41)(13)(0)(30)(32)%2(41)11347%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11533(14)35%2(41)(29)144%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11803(14)150000000001%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11913(14)2%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12147(14)5%2(41)(29)142(14)70000000000002%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12344(14)2%2(41)(29)142(14)70000000000002%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12586%2(41)(29)143%2(41)81(48)(4)(2)(57)%2(41)12683%2(41)(29)152%2(41)69(48)(41)(13)(0)(30)(32)%2(41)12782%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12971%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13122%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13269%2(41)(29)142%2(41)81(48)(41)(2)(30)(17)%2(41)13341%2(41)(29)142%2(41)57(48)(41)(2)(30)(17)%2(41)13407%2(41)(29)142%2(41)57(48)(41)(13)(0)(30)(32)%2(41)512%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)578%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)794%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)902%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)966%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)1123%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)1186%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)1246%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)1506%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)1568%2(41)(29)93%2(41)57(48)(45)(28)(2)(30)(30)1%2(41)1761%2(41)(29)93%2(41)197(48)(45)(28)(2)(30)(30)2%2(41)1914%2(41)(29)93%2(41)205(48)(45)(28)(2)(30)(30)1%2(41)2071%2(41)(29)93%2(41)197(48)(45)(28)(2)(30)(30)3%2(41)2193%2(41)(29)93%2(41)162(48)(41)(13)(0)(30)(32)%2(41)2410(14)4500000000003%2(41)(29)92(14)10000000000001%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2749(14)3500000000004%2(41)(29)92(14)45%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2820(14)5%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3170(14)3%2(41)(29)92(14)2%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3372%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3558%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3704%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3891%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4097%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4171%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4232%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4389%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4458%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4526%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4687%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4873%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5122%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5314%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5378%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5440%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5670%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5734%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5978%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6261(14)1%2(41)(29)93(14)65%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6329(14)450000000001%2(41)(29)92(14)65%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6609%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8130(14)75%2(41)(29)92(14)95%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8283(14)800000000001%2(41)(29)91(14)9%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8401%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)8536%2(41)(29)93%2(41)57(48)(41)(13)(0)(30)(32)%2(41)8657%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8814%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8962%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9033%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9095%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9243%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9398%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9607%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9679%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9873%2(41)(29)92%2(41)81(48)(41)(2)(30)(17)%2(41)10002%2(41)(29)92%2(41)57(48)(41)(13)(0)(30)(32)%2(41)10130%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10310%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10375%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10808%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10972%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11109%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)11242%2(41)(29)93%2(41)57(48)(41)(13)(0)(30)(32)%2(41)11380%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11528(14)7%2(41)(29)94%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11820(14)300000000001%2(41)(29)92(14)7%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11887(14)45%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12173(14)2%2(41)(29)92(14)7%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12332(14)5%2(41)(29)92(14)7%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12562%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)12681%2(41)(29)93%2(41)57(48)(41)(13)(0)(30)(32)%2(41)12802%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13013%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13081%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13274%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13341%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13411%2(41)(29)92%2(41)81%3(4)316575449%3(4)6(8)10(8)2009>";
public static const ENEMY3_PRESENT_ODDS:Number = 0.2;
public static const JUMP:String = "Jump";
public static const HERO_DETONATOR_SPEED:uint = 10;
public static const ENEMY_KNIFE_POWER:uint = 20;
public static const ENEMY8_PRESENT_ODDS:Number = 0.3;
public static const RUN4_SOUND:String = "Run4";
public static const ENEMY16_CHOP_POWER:uint = 25;
public static const FOOD:String = "Food";
public static const CHOP_POWER:uint = 45;
public static const STICK:String = "Stick";
private static const _bonusMissionArr:Array = [[3, 1], [6, 2], [9, 3], [12, 4], [15, 5]];
public static const ENEMY_DETONATOR_POWER:uint = 100;
public static const mission18Str:String = "<AUTHOR:mission18><VERSION:1.0.226><DATA:1%2(41)500%2(41)2000%2(41)3000%2(41)18%3(4)0%2(41)13%2(41)460(48)400%2(41)11%2(41)969(14)5(48)1304%2(41)11%2(41)969(14)5(48)2208%2(41)11%2(41)969(14)5(48)3112%2(41)11%2(41)969(14)5(48)4016%2(41)8%2(41)791(48)4746%2(41)15%2(41)2479(14)5(48)7144%2(41)15%2(41)2479(14)5(48)9542%2(41)8%2(41)791(48)10272%2(41)8%2(41)791(48)11002%2(41)6%2(41)669(48)11610%2(41)5%2(41)669(48)12218%2(41)2%2(41)487(48)12643%2(41)2%2(41)487(48)13068%2(41)1%2(41)487(48)13493%2(41)9%2(41)463(14)90000000000003(48)13893%2(41)7%2(41)839(14)5(48)14674%2(41)11%2(41)969(14)5(48)15578%2(41)10%2(41)919(14)5(48)16417%2(41)11%2(41)969(14)5(48)17321%2(41)15%2(41)2479(14)5(48)19719%2(41)9%2(41)463(14)90000000000003(48)20119%2(41)12%2(41)1017%3(4)4%2(41)16994(14)25%2(41)36%2(41)3(48)2%2(41)782(14)45%2(41)(29)91(14)9%2(41)4(48)4%2(41)1803(14)3500000000001%2(41)36%2(41)5(48)5%2(41)8281(14)45%2(41)(29)400%2(41)6(48)5%2(41)8178(14)6%2(41)(29)400%2(41)6(48)5%2(41)8087(14)150000000001%2(41)(29)400%2(41)6(48)6%2(41)8395(14)75%2(41)(29)400%2(41)6(48)6%2(41)8494(14)300000000001%2(41)(29)400%2(41)6(48)6%2(41)8701(14)45%2(41)(29)400%2(41)6(48)6%2(41)8607(14)15%2(41)(29)400%2(41)6(48)2%2(41)6490(14)05%2(41)(29)336(14)15000000000003%2(41)5(48)5%2(41)5688(14)55%2(41)(29)400%2(41)5(48)5%2(41)6074(14)3%2(41)(29)400%2(41)6(48)6%2(41)6317(14)150000000001%2(41)(29)400%2(41)6(48)6%2(41)6225(14)700000000001%2(41)(29)400%2(41)5(48)6%2(41)5915(14)700000000001%2(41)(29)400%2(41)4(48)6%2(41)5820%2(41)(29)400%2(41)4(48)2%2(41)3601%2(41)(29)93%2(41)3(48)2%2(41)3492%2(41)(29)93%2(41)3(48)2%2(41)2705(14)05%2(41)(29)91(14)65%2(41)5(48)2%2(41)2595(14)05%2(41)(29)92(14)30000000000001%2(41)5(48)2%2(41)1751(14)7%2(41)(29)92%2(41)6(48)2%2(41)1641(14)7%2(41)(29)92(14)35000000000001%2(41)6(48)2%2(41)890%2(41)(29)92%2(41)4(48)4%2(41)16896(14)45%2(41)36%2(41)3(48)4%2(41)16793(14)95%2(41)36%2(41)3(48)4%2(41)15256(14)400000000001%2(41)36%2(41)2(48)4%2(41)15160(14)150000000001%2(41)36%2(41)2(48)4%2(41)15065(14)150000000001%2(41)36%2(41)2(48)4%2(41)3618%2(41)36%2(41)1(48)4%2(41)3520%2(41)36%2(41)1(48)4%2(41)3418%2(41)36%2(41)1(48)4%2(41)2806%2(41)36%2(41)6(48)4%2(41)2716%2(41)36%2(41)6(48)4%2(41)2624%2(41)36%2(41)6(48)4%2(41)1892%2(41)36%2(41)5(48)4%2(41)1992%2(41)36%2(41)5(48)4%2(41)928%2(41)36%2(41)4(48)4%2(41)832%2(41)36%2(41)4(48)4%2(41)724%2(41)36%2(41)4(48)2%2(41)10933(14)75%2(41)(29)92(14)5%2(41)15(48)1%2(41)10424(14)85%2(41)(29)92%2(41)15(48)2%2(41)12402%2(41)(29)93%2(41)9(48)2%2(41)12488%2(41)(29)93%2(41)9(48)2%2(41)12580%2(41)(29)93%2(41)9(48)2%2(41)12804%2(41)(29)93%2(41)9(48)2%2(41)12900%2(41)(29)93%2(41)9(48)2%2(41)13008%2(41)(29)93%2(41)9(48)2%2(41)13330%2(41)(29)195%2(41)9(48)6%2(41)13388%2(41)(29)400%2(41)9(48)6%2(41)13718%2(41)(29)400%2(41)9(48)6%2(41)13850%2(41)(29)400%2(41)9(48)5%2(41)13550%2(41)(29)400%2(41)9(48)2%2(41)13722%2(41)(29)93%2(41)9(48)2%2(41)15042%2(41)(29)93%2(41)11(48)2%2(41)15350%2(41)(29)93%2(41)11(48)2%2(41)17618%2(41)(29)337%2(41)4(48)2%2(41)19140%2(41)(29)337%2(41)5(48)6%2(41)20540%2(41)(29)400%2(41)19(48)2%2(41)20484%2(41)(29)93%2(41)19(48)2%2(41)17059%2(41)(29)93%2(41)10(48)2%2(41)16734%2(41)(29)93%2(41)10(48)2%2(41)5011(14)450000000001%2(41)(29)336(14)85%2(41)6(48)3%2(41)17154%2(41)(29)337%2(41)3(48)3%2(41)16944%2(41)(29)337%2(41)3(48)3%2(41)16698%2(41)(29)337%2(41)3(48)3%2(41)15406%2(41)(29)337%2(41)2(48)3%2(41)15038%2(41)(29)337%2(41)2(48)3%2(41)1168(14)55%2(41)(29)335(14)75%2(41)4(48)3%2(41)1029(14)3500000000001%2(41)(29)336(14)45000000000005%2(41)4(48)3%2(41)2061(14)4%2(41)(29)335(14)40000000000003%2(41)6(48)3%2(41)1517(14)15%2(41)(29)335(14)90000000000003%2(41)6(48)3%2(41)2961(14)4500000000003%2(41)(29)335(14)70000000000005%2(41)5(48)3%2(41)2678(14)6000000000004%2(41)(29)335(14)85%2(41)5(48)3%2(41)3662(14)55%2(41)(29)336%2(41)2(48)3%2(41)3830(14)05%2(41)(29)335(14)5%2(41)2(48)3%2(41)8914(14)35%2(41)(29)363(14)1%2(41)6(48)3%2(41)9015(14)75%2(41)(29)363(14)70000000000005%2(41)6%3(4)(41)(13)(0)(30)(32)%2(41)9958(14)95%2(41)(29)192(14)25%2(41)81(48)(41)(13)(0)(30)(32)%2(41)20868%2(41)(29)168%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4670%2(41)(29)141(14)3%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9730(14)050000000001%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9792(14)300000000001%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9925(14)650000000001%2(41)(29)142(14)25%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9991(14)2%2(41)(29)142(14)25%2(41)81(48)(41)(2)(30)(17)%2(41)10637(14)85%2(41)(29)151(14)45000000000002%2(41)57(48)(41)(2)(30)(17)%2(41)10740(14)050000000001%2(41)(29)151(14)75%2(41)57(48)(41)(13)(0)(30)(32)%2(41)11811(14)7%2(41)(29)143(14)3%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13620%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13878%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)19952%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)11777(14)1%2(41)(29)93(14)30000000000001%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12075(14)150000000001%2(41)(29)93(14)25%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12142(14)650000000001%2(41)(29)93(14)25%2(41)81(48)(41)(13)(0)(30)(32)%2(41)20834%2(41)(29)117%2(41)81(48)(41)(13)(0)(30)(32)%2(41)20922%2(41)(29)118%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4183(14)5%2(41)(29)91(14)65%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4248(14)6%2(41)(29)91(14)45%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4560%2(41)(29)91(14)30000000000001%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4632(14)900000000001%2(41)(29)91(14)30000000000001%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4694(14)3%2(41)(29)91(14)7%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9682(14)300000000001%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9752(14)300000000001%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9816(14)75%2(41)(29)92(14)7%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9887(14)85%2(41)(29)92(14)25%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9958(14)95%2(41)(29)92(14)25%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10024(14)5%2(41)(29)92(14)35000000000001%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10165(14)6%2(41)(29)91(14)9%2(41)81(48)(41)(13)(0)(30)(32)%2(41)10230(14)050000000001%2(41)(29)92(14)10000000000001%2(41)81(48)(41)(2)(30)(17)%2(41)10603(14)400000000001%2(41)(29)92(14)45%2(41)57(48)(41)(2)(30)(17)%2(41)10656(14)7%2(41)(29)92(14)75%2(41)57(48)(41)(2)(30)(17)%2(41)10713(14)400000000001%2(41)(29)91(14)9%2(41)57(48)(41)(2)(30)(17)%2(41)10770(14)050000000001%2(41)(29)92(14)75%2(41)57(48)(41)(13)(0)(30)(32)%2(41)11843(14)35%2(41)(29)92(14)80000000000001%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12007(14)650000000001%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13636%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13864%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)19848%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)19916%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)19984%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)20250%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)20302%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)20358%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)20410(14)9%2(41)(29)92(14)15%2(41)57%3(4)44827273%3(4)6(8)10(8)2009>";
public static const BOXING2_POWER:uint = 10;
public static const mission3Str:String = "<AUTHOR:mission3><VERSION:1.0.226><DATA:3%2(41)500%2(41)2000%2(41)2147483647%2(41)9%3(4)0%2(41)13%2(41)460(48)400%2(41)1%2(41)487(48)825%2(41)1%2(41)487(48)1250%2(41)9%2(41)463(14)90000000000003(48)1650%2(41)6%2(41)669(48)2258%2(41)4%2(41)487(48)2683%2(41)4%2(41)487(48)3108%2(41)5%2(41)669(48)3716%2(41)1%2(41)487(48)4141%2(41)4%2(41)487(48)4566%2(41)12%2(41)1017%3(4)2%2(41)4933%2(41)(29)143%2(41)16(48)4%2(41)4518%2(41)36%2(41)3(48)4%2(41)4284%2(41)36%2(41)3(48)2%2(41)4077%2(41)(29)194%2(41)3(48)2%2(41)3941%2(41)(29)194%2(41)3(48)2%2(41)3009%2(41)(29)230%2(41)3(48)2%2(41)2890%2(41)(29)230%2(41)3(48)1%2(41)2550%2(41)(29)230%2(41)2(48)1%2(41)2442%2(41)(29)230%2(41)2(48)2%2(41)2140%2(41)(29)194%2(41)2(48)2%2(41)1935%2(41)(29)194%2(41)2(48)2%2(41)911%2(41)(29)93%2(41)1(48)2%2(41)701%2(41)(29)194%2(41)1(48)4%2(41)1137%2(41)36%2(41)1(48)4%2(41)2061%2(41)36%2(41)2(48)4%2(41)2533%2(41)36%2(41)2(48)3%2(41)4283%2(41)(29)256%2(41)3(48)3%2(41)4472%2(41)(29)256%2(41)3(48)3%2(41)1103%2(41)(29)194%2(41)1(48)3%2(41)4820%2(41)(29)155%2(41)3%3(4)(41)(2)(30)(17)%2(41)1390%2(41)(29)152%2(41)57(48)(41)(2)(30)(17)%2(41)1589%2(41)(29)152%2(41)57(48)(41)(13)(0)(30)(32)%2(41)3354%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3434%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4696%2(41)(29)143%2(41)81(48)(45)(28)(2)(30)(30)1%2(41)260%2(41)(29)93%2(41)197(48)(45)(28)(2)(30)(30)3%2(41)382%2(41)(29)93%2(41)162(48)(41)(2)(30)(17)%2(41)1360%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)1416%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)1557%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)1619%2(41)(29)93%2(41)57(48)(41)(13)(0)(30)(32)%2(41)3312%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3393%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3472%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)3553%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)3611%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)3671%2(41)(29)93%2(41)57(48)(41)(13)(0)(30)(32)%2(41)4661%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4726%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4791%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4937%2(41)(29)93%2(41)81%3(4)4324001%3(4)5(8)10(8)2009>";
public static const DART_VALUE:uint = 50;
public static const HERO_BOTTLE_SPEED:uint = 10;
public static const PHRASE1:String = " WRONG POSITION ! ";
public static const PHRASE2:String = " CAN'T ADD MORE THAN 5 BOSSES IN ONE LEVEL ! ";
public static const PHRASE3:String = " CAN'T ADD MORE THAN 10 ENEMIES IN A SAME CARRIAGE ! ";
public static const PHRASE4:String = " LEVEL DATA SAVED ! ";
public static const PHRASE5:String = " PLEASE SET QUALITY TO MEDIUM ";
public static const ENEMY_DART_SPEED:uint = 8;
public static const PHRASE8:String = " GAME DATA AUTO COPIED TO CLIPBOARD ";
public static const KNIFE_HIT2:String = "KnifeHit2";
public static const KNIFE_HIT3:String = "KnifeHit3";
public static const ENEMY1_CHOP_POWER:uint = 20;
public static const PHRASE6:String = " PLEASE SET QUALITY TO LOW ";
public static const PHRASE7:String = " CAN'T PLACE IT TO THIS HIGH POSITION ";
public static const KNIFE_HIT1:String = "KnifeHit1";
public static const STAB_POWER:uint = 25;
public static const LASHED:String = "Lashed";
public static const ENEMY12_POWER:uint = 5;
public static const SLIDE_POWER:uint = 5;
public static const VERSION:String = "1.1.93";
public static const ENEMY8_LASH_POWER:uint = 10;
public static const HERO_AX_SPEED:uint = 10;
public static const HERO_DART_SPEED:uint = 10;
public static const JUMP_SPEED:int = -25;
public static const ENEMY9_KICK_POWER:uint = 15;
public static const BOXING2:String = "Boxing2";
public static const BOXING_POWER:uint = 15;
public static const QUALITY:String = "medium";
public static const BOXING1:String = "Boxing1";
public static const ENEMY10_KNOCK_POWER:uint = 30;
public static const mission4Str:String = "<AUTHOR:mission4><VERSION:1.0.226><DATA:1%2(41)600%2(41)4000%2(41)7000%2(41)12%3(4)0%2(41)13%2(41)460(48)400%2(41)2%2(41)487(48)825%2(41)2%2(41)487(48)1250%2(41)2%2(41)487(48)1675%2(41)3%2(41)487(48)2100%2(41)3%2(41)487(48)2525%2(41)2%2(41)487(48)2950%2(41)2%2(41)487(48)3375%2(41)3%2(41)487(48)3800%2(41)2%2(41)487(48)4225%2(41)3%2(41)487(48)4650%2(41)12%2(41)1017%3(4)2%2(41)2764(14)25%2(41)(29)92(14)15%2(41)16(48)2%2(41)5015%2(41)(29)93%2(41)16(48)2%2(41)4380%2(41)(29)210%2(41)1(48)2%2(41)4530%2(41)(29)210%2(41)1(48)6%2(41)3623%2(41)(29)400%2(41)2(48)6%2(41)3746%2(41)(29)400%2(41)2(48)2%2(41)3324%2(41)(29)93%2(41)3(48)2%2(41)2689%2(41)(29)93%2(41)1(48)4%2(41)782%2(41)36%2(41)2(48)4%2(41)1142%2(41)36%2(41)2(48)4%2(41)2456%2(41)36%2(41)2(48)4%2(41)2018%2(41)36%2(41)3(48)1%2(41)2267%2(41)(29)210%2(41)2(48)1%2(41)2412%2(41)(29)210%2(41)2(48)2%2(41)738%2(41)(29)93%2(41)2(48)2%2(41)1022%2(41)(29)93%2(41)2(48)2%2(41)3518%2(41)(29)210%2(41)3(48)2%2(41)5392%2(41)(29)116%2(41)2(48)3%2(41)554%2(41)(29)246%2(41)2(48)3%2(41)1008%2(41)(29)246%2(41)2(48)3%2(41)1934%2(41)(29)250%2(41)1(48)3%2(41)3101%2(41)(29)246%2(41)3(48)3%2(41)3234%2(41)(29)246%2(41)3(48)3%2(41)4016%2(41)(29)246%2(41)3%3(4)(41)(13)(0)(30)(32)%2(41)1484%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1566%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1447%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1528%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1610%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2881%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4150%2(41)(29)143%2(41)81(48)(41)(2)(30)(17)%2(41)4770%2(41)(29)152%2(41)57(48)(41)(2)(30)(17)%2(41)4832%2(41)(29)152%2(41)57(48)(45)(28)(2)(30)(30)1%2(41)252%2(41)(29)93%2(41)197(48)(45)(28)(2)(30)(30)2%2(41)379%2(41)(29)93%2(41)205(48)(45)(28)(2)(30)(30)2%2(41)606%2(41)(29)93%2(41)205(48)(41)(2)(30)(17)%2(41)808%2(41)(29)93%2(41)57(48)(45)(28)(2)(30)(30)1%2(41)1168%2(41)(29)93%2(41)197(48)(41)(13)(0)(30)(32)%2(41)1409%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1488%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1565%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1641%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2840%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2918%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)3099%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)3159%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)3223%2(41)(29)93%2(41)57(48)(41)(13)(0)(30)(32)%2(41)3959%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4115%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4190%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)4734%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)4800%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)4864%2(41)(29)93%2(41)57(48)(41)(13)(0)(30)(32)%2(41)5505%2(41)(29)116%2(41)81%3(4)7251958%3(4)5(8)10(8)2009>";
public static const HERO_BOTTLEUP_POWER:uint = 40;
public static const BOXING2_VALUE:uint = 40;
public static const SOUND:Number = 1;
public static const THROW_CARD:String = "ThrowCard";
public static const ENEMY4_STAB_POWER:uint = 15;
public static const ENEMY1_PRESENT_ODDS:Number = 0.3;
public static const STAGE_WIDTH:uint = 650;
public static const HP:uint = 500;
public static const HERO_DETONATOR_POWER:uint = 100;
public static const SHOOT_VALUE:uint = 10;
public static const ENEMY6_PRESENT_ODDS:Number = 0.2;
public static const SLIDE_KICK_POWER:uint = 20;
public static const FOOD_RESUME_QUOTIETY:Number = 0.1;
public static const ENEMY_AX_SPEED:uint = 3;
public static const GUN_SOUND1:String = "Gun1";
public static const GUN_SOUND3:String = "Gun3";
public static const ITEM_VALUE:uint = 100;
public static const RUN3_SOUND:String = "Run3";
public static const HERO_KNIFE_SPEED:uint = 15;
public static const DIVIDE_ODDS:Number = 0.25;
public static const KNIFE_IN:String = "KnifeIn";
public static const GUN_SOUND2:String = "Gun2";
public static const BOTTLE_BREAK:String = "BottleBreak";
public static const ENEMY_STICK_SPEED:uint = 10;
public static const mission5Str:String = "<AUTHOR:mission5><VERSION:1.0.226><DATA:2%2(41)500%2(41)4000%2(41)2147483647%2(41)12%3(4)0%2(41)13%2(41)460(48)400%2(41)11%2(41)969(14)5(48)1304%2(41)11%2(41)969(14)5(48)2208%2(41)5%2(41)669(48)2816%2(41)11%2(41)969(14)5(48)3720%2(41)11%2(41)969(14)5(48)4624%2(41)9%2(41)463(14)90000000000003(48)5024%2(41)11%2(41)969(14)5(48)5928%2(41)11%2(41)969(14)5(48)6832%2(41)12%2(41)1017%3(4)1%2(41)6279%2(41)(29)93%2(41)8(48)5%2(41)6252%2(41)(29)400%2(41)9(48)4%2(41)892%2(41)36%2(41)7(48)2%2(41)847%2(41)(29)93%2(41)9(48)2%2(41)1053%2(41)(29)93%2(41)8(48)4%2(41)5299%2(41)36%2(41)8(48)4%2(41)3058%2(41)36%2(41)7(48)6%2(41)6628%2(41)(29)400%2(41)9(48)6%2(41)4508%2(41)(29)400%2(41)9(48)2%2(41)4098%2(41)(29)93%2(41)9(48)2%2(41)3175%2(41)(29)93%2(41)9(48)2%2(41)1951%2(41)(29)313%2(41)9(48)2%2(41)1609%2(41)(29)313%2(41)9(48)2%2(41)1929%2(41)(29)93%2(41)9(48)2%2(41)1685%2(41)(29)93%2(41)9(48)4%2(41)6953%2(41)36%2(41)7(48)2%2(41)6578%2(41)(29)93%2(41)8(48)2%2(41)5648%2(41)(29)93%2(41)8(48)2%2(41)5466%2(41)(29)93%2(41)8(48)2%2(41)5678%2(41)(29)313%2(41)7(48)2%2(41)5321%2(41)(29)313%2(41)7(48)2%2(41)4210%2(41)(29)313%2(41)8(48)2%2(41)3306%2(41)(29)313%2(41)7(48)6%2(41)3585%2(41)(29)400%2(41)7(48)4%2(41)4612%2(41)36%2(41)8(48)4%2(41)3710%2(41)36%2(41)8(48)4%2(41)2174%2(41)36%2(41)7(48)2%2(41)928%2(41)(29)313%2(41)8(48)2%2(41)1104%2(41)(29)313%2(41)8(48)2%2(41)7003%2(41)(29)243%2(41)15%3(4)(41)(13)(0)(30)(32)%2(41)7009%2(41)(29)193%2(41)81(48)(41)(2)(30)(17)%2(41)362%2(41)(29)152%2(41)57(48)(41)(13)(0)(30)(32)%2(41)2384%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2460%2(41)(29)143%2(41)81(48)(41)(2)(30)(17)%2(41)2666%2(41)(29)152%2(41)57(48)(41)(2)(30)(17)%2(41)2729%2(41)(29)152%2(41)57(48)(41)(13)(0)(30)(32)%2(41)4785%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6969%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)7053%2(41)(29)143%2(41)81(48)(41)(2)(30)(17)%2(41)329%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)389%2(41)(29)93%2(41)57(48)(41)(13)(0)(30)(32)%2(41)2342%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2418%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2493%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)2627%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)2692%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)2754%2(41)(29)93%2(41)57(48)(41)(13)(0)(30)(32)%2(41)4747%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4823%2(41)(29)93%2(41)81(48)(45)(28)(2)(30)(30)2%2(41)4952%2(41)(29)93%2(41)205(48)(41)(13)(0)(30)(32)%2(41)6929%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)7005%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)7087%2(41)(29)93%2(41)81%3(4)6608180%3(4)5(8)10(8)2009>";
public static const HERO_BOTTLE_POWER:uint = 20;
public static const POLE_HIT_POWER:uint = 10;
public static const RUN_SPEED:uint = 13;
public static const ENEMY_DART_POWER:uint = 15;
public static const TIME_VALUE:uint = 20;
public static const HERO_AX_POWER:uint = 35;
public static const mission10Str:String = "<AUTHOR:mission10><VERSION:1.0.226><DATA:2%2(41)600%2(41)4000%2(41)7000%2(41)21%3(4)0%2(41)13%2(41)460(48)400%2(41)15%2(41)2479(14)5(48)2798%2(41)8%2(41)791(48)3528%2(41)14%2(41)2022(14)5(48)5473%2(41)6%2(41)669(48)6081%2(41)14%2(41)2022(14)5(48)8026%2(41)11%2(41)969(14)5(48)8930%2(41)1%2(41)487(48)9355%2(41)12%2(41)1017%3(4)2%2(41)8723(14)85%2(41)(29)93(14)25%2(41)11(48)2%2(41)8418(14)85%2(41)(29)93%2(41)11(48)2%2(41)7895(14)150000000001%2(41)(29)321(14)5%2(41)1(48)2%2(41)7763(14)900000000001%2(41)(29)321(14)5%2(41)1(48)5%2(41)8496(14)7%2(41)(29)400%2(41)18(48)1%2(41)8499(14)45%2(41)(29)313(14)15000000000003%2(41)17(48)2%2(41)5010%2(41)(29)361%2(41)3(48)2%2(41)4902%2(41)(29)361%2(41)3(48)6%2(41)3794%2(41)(29)400%2(41)3(48)4%2(41)3429%2(41)36%2(41)3(48)1%2(41)3027%2(41)(29)127%2(41)2(48)2%2(41)3306%2(41)(29)192%2(41)1(48)2%2(41)3402%2(41)(29)142%2(41)1(48)2%2(41)2491%2(41)(29)337%2(41)1(48)2%2(41)2580%2(41)(29)337%2(41)2(48)2%2(41)9783%2(41)(29)93%2(41)17(48)6%2(41)9786%2(41)(29)400%2(41)17(48)1%2(41)1196%2(41)(29)337%2(41)1(48)1%2(41)1107%2(41)(29)337%2(41)1(48)6%2(41)1503%2(41)(29)400%2(41)4(48)5%2(41)1671%2(41)(29)400%2(41)4(48)6%2(41)1906%2(41)(29)400%2(41)4(48)3%2(41)716%2(41)(29)364%2(41)1(48)3%2(41)589%2(41)(29)364%2(41)1(48)3%2(41)2198%2(41)(29)364%2(41)3(48)3%2(41)2295%2(41)(29)364%2(41)3(48)3%2(41)4097%2(41)(29)344%2(41)3(48)3%2(41)5714(14)3%2(41)(29)195(14)60000000000002%2(41)1(48)3%2(41)5922(14)900000000001%2(41)(29)196%2(41)1(48)3%2(41)6578(14)85%2(41)(29)344(14)25%2(41)3(48)3%2(41)6720(14)1%2(41)(29)344(14)75%2(41)3(48)3%2(41)9218(14)85%2(41)(29)192(14)75%2(41)6%3(4)(41)(13)(0)(30)(32)%2(41)3220%2(41)(29)192%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3185%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3261%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3327%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9483(14)85%2(41)(29)143(14)25%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9557(14)6%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)300(14)05%2(41)(29)92(14)35000000000001%2(41)81(48)(41)(13)(0)(30)(32)%2(41)374%2(41)(29)93%2(41)81(48)(45)(28)(2)(30)(30)2%2(41)3017%2(41)(29)92%2(41)205(48)(41)(13)(0)(30)(32)%2(41)3152%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3214%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3277%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3341%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3409%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9450(14)1%2(41)(29)93(14)25%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9517(14)6%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9586(14)35%2(41)(29)92(14)75%2(41)81(48)(41)(13)(0)(30)(32)%2(41)9663(14)9%2(41)(29)92(14)75%2(41)81(48)(41)(2)(30)(17)%2(41)10063(14)95%2(41)(29)115(14)5%2(41)57(48)(41)(2)(30)(17)%2(41)10132(14)7%2(41)(29)115(14)25%2(41)57%3(4)7269710%3(4)5(8)10(8)2009>";
public static const HERO_DART_POWER:uint = 25;
public static const BOTTLE_VALUE:uint = 20;
public static const KICK2_POWER:uint = 20;
public static const KNOCK_POWER:uint = 30;
public static const LENS_SPEED:uint = 15;
public static const mission6Str:String = "<AUTHOR:mission6><VERSION:1.0.226><DATA:1%2(41)600%2(41)3000%2(41)5000%2(41)15%3(4)0%2(41)13%2(41)460(48)400%2(41)8%2(41)791(48)1130%2(41)3%2(41)487(48)1555%2(41)2%2(41)487(48)1980%2(41)3%2(41)487(48)2405%2(41)4%2(41)487(48)2830%2(41)8%2(41)791(48)3560%2(41)1%2(41)487(48)3985%2(41)7%2(41)839(14)5(48)4766%2(41)10%2(41)919(14)5(48)5605%2(41)9%2(41)463(14)90000000000003(48)6005%2(41)11%2(41)969(14)5(48)6909%2(41)12%2(41)1017%3(4)2%2(41)5994%2(41)(29)93%2(41)9(48)2%2(41)5723%2(41)(29)93%2(41)9(48)6%2(41)6246%2(41)(29)400%2(41)9(48)5%2(41)6425%2(41)(29)400%2(41)9(48)5%2(41)6498%2(41)(29)400%2(41)9(48)2%2(41)6768%2(41)(29)313%2(41)10(48)2%2(41)6594%2(41)(29)93%2(41)10(48)2%2(41)6770%2(41)(29)93%2(41)10(48)2%2(41)6123%2(41)(29)93%2(41)10(48)6%2(41)5552%2(41)(29)400%2(41)9(48)4%2(41)5818%2(41)36%2(41)6(48)4%2(41)3806%2(41)36%2(41)4(48)2%2(41)3492%2(41)(29)122%2(41)11(48)2%2(41)3267%2(41)(29)92%2(41)11(48)2%2(41)903%2(41)(29)92%2(41)9(48)2%2(41)1093%2(41)(29)92%2(41)10(48)2%2(41)7215%2(41)(29)93%2(41)15(48)2%2(41)4659%2(41)(29)322%2(41)6(48)2%2(41)4468%2(41)(29)322%2(41)5(48)4%2(41)4828%2(41)36%2(41)5(48)1%2(41)3885%2(41)(29)194%2(41)5(48)1%2(41)3768%2(41)(29)194%2(41)5(48)2%2(41)1871%2(41)(29)93%2(41)5(48)2%2(41)1501%2(41)(29)210%2(41)4(48)2%2(41)1327%2(41)(29)210%2(41)4(48)2%2(41)771%2(41)(29)127%2(41)9(48)2%2(41)7342%2(41)(29)249%2(41)15(48)3%2(41)2128%2(41)(29)250%2(41)5(48)3%2(41)2249%2(41)(29)250%2(41)5(48)3%2(41)2546%2(41)(29)256%2(41)5(48)3%2(41)2627%2(41)(29)256%2(41)5(48)3%2(41)5100%2(41)(29)365%2(41)6(48)3%2(41)5219%2(41)(29)365%2(41)6(48)3%2(41)5332%2(41)(29)365%2(41)6%3(4)(41)(13)(0)(30)(32)%2(41)349%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1001%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1775%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3068%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5860%2(41)(29)143%2(41)81(48)(41)(2)(30)(17)%2(41)7041%2(41)(29)152%2(41)57(48)(41)(2)(30)(17)%2(41)7104%2(41)(29)152%2(41)57(48)(41)(13)(0)(30)(32)%2(41)316%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)385%2(41)(29)93%2(41)81(48)(45)(28)(2)(30)(30)1%2(41)562%2(41)(29)92%2(41)197(48)(45)(28)(2)(30)(30)2%2(41)773%2(41)(29)92%2(41)205(48)(41)(13)(0)(30)(32)%2(41)999%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1727%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1809%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1940%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2949%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3026%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3106%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3185%2(41)(29)92%2(41)81(48)(45)(28)(2)(30)(30)2%2(41)3373%2(41)(29)92%2(41)205(48)(45)(28)(2)(30)(30)3%2(41)3492%2(41)(29)92%2(41)162(48)(41)(13)(0)(30)(32)%2(41)5824%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5903%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)7006%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)7068%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)7132%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)7285%2(41)(29)93%2(41)57%3(4)8907261%3(4)5(8)10(8)2009>";
public static const STAGE_HEIGHT:uint = 500;
public static const BOXING1_VALUE:uint = 30;
public static const ENEMY11_PRESENT_ODDS:Number = 0.4;
public static const ENEMY_VALUE:uint = 100;
public static const KICK_POWER:uint = 15;
public static const LADDER_SPEED:uint = 5;
public static const COCK:String = "Cock";
public static const RUN2_SOUND:String = "Run2";
public static const BLAST:String = "Blast";
private static const _grayMatrixArr:Array = [0.3086, 0.6094, 0.082, 0, 0, 0.3086, 0.6094, 0.082, 0, 0, 0.3086, 0.6094, 0.082, 0, 0, 0, 0, 0, 1, 0];
public static const ENEMY4_PRESENT_ODDS:Number = 0.3;
public static const ENEMY_AX_POWER:uint = 25;
public static const mission11Str:String = "<AUTHOR:mission11><VERSION:1.0.226><DATA:2%2(41)600%2(41)3000%2(41)5000%2(41)18%3(4)0%2(41)13%2(41)460(48)400%2(41)11%2(41)969(14)5(48)1304%2(41)11%2(41)969(14)5(48)2208%2(41)3%2(41)487(48)2633%2(41)2%2(41)487(48)3058%2(41)3%2(41)487(48)3483%2(41)2%2(41)487(48)3908%2(41)2%2(41)487(48)4333%2(41)11%2(41)969(14)5(48)5237%2(41)5%2(41)669(48)5845%2(41)3%2(41)487(48)6270%2(41)2%2(41)487(48)6695%2(41)2%2(41)487(48)7120%2(41)3%2(41)487(48)7545%2(41)12%2(41)1017%3(4)6%2(41)7972%2(41)(29)400%2(41)7(48)6%2(41)8082%2(41)(29)400%2(41)7(48)1%2(41)7696%2(41)(29)193%2(41)7(48)2%2(41)7917%2(41)(29)143%2(41)7(48)2%2(41)8091%2(41)(29)93%2(41)7(48)4%2(41)7720%2(41)36%2(41)8(48)4%2(41)7613%2(41)36%2(41)8(48)2%2(41)7045%2(41)(29)93%2(41)9(48)2%2(41)6413%2(41)(29)93%2(41)9(48)2%2(41)6009%2(41)(29)210%2(41)9(48)2%2(41)5656%2(41)(29)93%2(41)19(48)2%2(41)5116(14)900000000001%2(41)(29)95(14)7%2(41)8(48)2%2(41)5003(14)55%2(41)(29)94(14)7%2(41)8(48)2%2(41)4743(14)5%2(41)(29)93(14)7%2(41)8(48)2%2(41)4623(14)5%2(41)(29)93(14)7%2(41)8(48)2%2(41)4262(14)5%2(41)(29)122(14)75%2(41)9(48)2%2(41)3835%2(41)(29)93%2(41)9(48)2%2(41)3247%2(41)(29)210%2(41)10(48)2%2(41)3010%2(41)(29)93%2(41)9(48)6%2(41)990%2(41)(29)400%2(41)9(48)5%2(41)1611%2(41)(29)400%2(41)9(48)6%2(41)1939%2(41)(29)400%2(41)9(48)5%2(41)2128%2(41)(29)400%2(41)9(48)2%2(41)2361%2(41)(29)210%2(41)11(48)2%2(41)1824%2(41)(29)93%2(41)11(48)2%2(41)1545%2(41)(29)93%2(41)10(48)2%2(41)1334%2(41)(29)93%2(41)10(48)6%2(41)787%2(41)(29)400%2(41)9(48)2%2(41)859%2(41)(29)93%2(41)11(48)2%2(41)696%2(41)(29)93%2(41)11(48)3%2(41)3647%2(41)(29)246%2(41)6(48)3%2(41)3739%2(41)(29)246%2(41)6%3(4)(41)(13)(0)(30)(32)%2(41)330%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2829%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5472%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5768%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6521%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)7701%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)300%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)365%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2791%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2852%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2918%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)3630%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)3686%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)3741%2(41)(29)93%2(41)57(48)(45)(28)(2)(30)(30)1%2(41)4106(14)400000000001%2(41)(29)92(14)80000000000001%2(41)197(48)(45)(28)(2)(30)(30)3%2(41)4249(14)1%2(41)(29)92(14)75%2(41)162(48)(41)(13)(0)(30)(32)%2(41)5370%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5443%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5512%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5582%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5734%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5801%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6487%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6557%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6623%2(41)(29)93%2(41)81(48)(4)(2)(57)%2(41)6850%2(41)(29)93%2(41)69(48)(4)(2)(57)%2(41)6978%2(41)(29)93%2(41)69(48)(41)(13)(0)(30)(32)%2(41)7670%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)7732%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)7799%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)7923%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)8246%2(41)(29)116%2(41)57(48)(41)(2)(30)(17)%2(41)8297%2(41)(29)116%2(41)57%3(4)11321985%3(4)5(8)10(8)2009>";
public static const HERO_KNIFE_POWER:uint = 20;
public static const RANK_S_COLOUR:uint = 0xCC0000;
public static const DART_IN:String = "DartIn";
public static const ENEMY9_PRESENT_ODDS:Number = 0.25;
public static const ENEMY17_STAB_POWER:uint = 30;
public static const ENEMY_ARROW_SPEED:uint = 10;
public static const ENEMY_STICK_POWER:uint = 30;
public static const CHEST_BREAK:String = "ChestBreak";
public static const MUSIC:Number = 1;
public static const mission7Str:String = "<AUTHOR:mission7><VERSION:1.0.226><DATA:2%2(41)500%2(41)4000%2(41)7000%2(41)12%3(4)0%2(41)13%2(41)460(48)400%2(41)14%2(41)2022(14)5(48)2345%2(41)15%2(41)2479(14)5(48)4743%2(41)5%2(41)669(48)5351%2(41)15%2(41)2479(14)5(48)7749%2(41)14%2(41)2022(14)5(48)9694%2(41)5%2(41)669(48)10302%2(41)15%2(41)2479(14)5(48)12700%2(41)14%2(41)2022(14)5(48)14645%2(41)12%2(41)1017%3(4)6%2(41)14570%2(41)(29)400%2(41)7(48)6%2(41)14415%2(41)(29)400%2(41)7(48)6%2(41)13851%2(41)(29)400%2(41)5(48)5%2(41)13616%2(41)(29)400%2(41)5(48)2%2(41)12241%2(41)(29)337%2(41)7(48)2%2(41)12508%2(41)(29)337%2(41)7(48)2%2(41)13271%2(41)(29)322%2(41)6(48)5%2(41)11818%2(41)(29)400%2(41)5(48)5%2(41)11696%2(41)(29)400%2(41)5(48)6%2(41)11514%2(41)(29)400%2(41)6(48)6%2(41)11384%2(41)(29)400%2(41)6(48)2%2(41)10991%2(41)(29)337%2(41)7(48)2%2(41)10804%2(41)(29)337%2(41)7(48)6%2(41)8965%2(41)(29)400%2(41)5(48)6%2(41)8881%2(41)(29)400%2(41)5(48)6%2(41)8798%2(41)(29)400%2(41)5(48)2%2(41)8348%2(41)(29)322%2(41)10(48)2%2(41)7688%2(41)(29)337%2(41)7(48)2%2(41)7538%2(41)(29)337%2(41)7(48)2%2(41)7364%2(41)(29)337%2(41)8(48)2%2(41)7223%2(41)(29)337%2(41)8(48)6%2(41)6906%2(41)(29)400%2(41)5(48)5%2(41)6647%2(41)(29)400%2(41)6(48)5%2(41)6497%2(41)(29)400%2(41)6(48)5%2(41)6356%2(41)(29)400%2(41)6(48)2%2(41)6066%2(41)(29)337%2(41)4(48)2%2(41)5918%2(41)(29)337%2(41)4(48)6%2(41)3864%2(41)(29)400%2(41)5(48)6%2(41)3717%2(41)(29)400%2(41)5(48)6%2(41)3580%2(41)(29)400%2(41)6(48)6%2(41)3430%2(41)(29)400%2(41)6(48)6%2(41)3016%2(41)(29)400%2(41)9(48)6%2(41)2799%2(41)(29)400%2(41)9(48)2%2(41)2284%2(41)(29)322%2(41)9(48)2%2(41)2091%2(41)(29)322%2(41)9(48)2%2(41)14987%2(41)(29)93%2(41)14(48)6%2(41)1606%2(41)(29)400%2(41)5(48)6%2(41)1518%2(41)(29)400%2(41)5(48)5%2(41)1265%2(41)(29)400%2(41)5(48)5%2(41)1340%2(41)(29)400%2(41)5(48)3%2(41)4196%2(41)(29)364%2(41)6(48)3%2(41)4355%2(41)(29)364%2(41)6(48)3%2(41)4505%2(41)(29)364%2(41)5(48)3%2(41)4653%2(41)(29)364%2(41)5(48)3%2(41)5615%2(41)(29)364%2(41)4(48)3%2(41)5729%2(41)(29)364%2(41)4(48)3%2(41)9496%2(41)(29)344%2(41)4(48)3%2(41)9631%2(41)(29)344%2(41)4%3(4)(41)(2)(30)(17)%2(41)14829%2(41)(29)211%2(41)57(48)(41)(13)(0)(30)(32)%2(41)5188%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5272%2(41)(29)143%2(41)81(48)(41)(2)(30)(17)%2(41)9898%2(41)(29)152%2(41)57(48)(41)(2)(30)(17)%2(41)10164%2(41)(29)152%2(41)57(48)(41)(2)(30)(17)%2(41)10230%2(41)(29)152%2(41)57(48)(41)(2)(30)(17)%2(41)14795%2(41)(29)152%2(41)57(48)(41)(2)(30)(17)%2(41)14856%2(41)(29)152%2(41)57(48)(41)(2)(30)(17)%2(41)303%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)368%2(41)(29)93%2(41)57(48)(41)(13)(0)(30)(32)%2(41)4938%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5015%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5162%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5234%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5315%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)9861%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)9922%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)9985%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)10137%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)10197%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)10261%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)14760%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)14820%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)14886%2(41)(29)93%2(41)57(48)(41)(13)(0)(30)(32)%2(41)15374%2(41)(29)116%2(41)81%3(4)11456584%3(4)5(8)10(8)2009>";
public static const RESUME_PERCENT:Number = 0.01;
public static const KICK_VALUE:uint = 50;
public static const MISSION_NUM:uint = 18;
public static const ENEMY_BULLET_SPEED:uint = 10;
public static const GET_BULLET:String = "GetBullet";
public static const bonusMission1Str:String = "<AUTHOR:1><VERSION:1.0.245><DATA:1%2(41)2147483647%2(41)2147483647%2(41)2147483647%2(41)6%3(4)0%2(41)13%2(41)460(48)400%2(41)11%2(41)969(14)5(48)1304%2(41)9%2(41)463(14)90000000000003(48)1704%2(41)11%2(41)969(14)5(48)2608%2(41)12%2(41)1017%3(4)%3(4)%3(4)50265%3(4)18(8)11(8)2009>";
public static const WALK_SPEED:uint = 6;
public static const RANK_A_COLOUR:uint = 0xAA6600;
public static const mission12Str:String = "<AUTHOR:mission12><VERSION:1.0.226><DATA:2%2(41)500%2(41)2000%2(41)3000%2(41)12%3(4)0%2(41)13%2(41)460(48)400%2(41)10%2(41)919(14)5(48)1239%2(41)7%2(41)839(14)5(48)2020%2(41)10%2(41)919(14)5(48)2859%2(41)7%2(41)839(14)5(48)3640%2(41)10%2(41)919(14)5(48)4479%2(41)10%2(41)919(14)5(48)5318%2(41)7%2(41)839(14)5(48)6099%2(41)7%2(41)839(14)5(48)6880%2(41)7%2(41)839(14)5(48)7661%2(41)10%2(41)919(14)5(48)8500%2(41)7%2(41)839(14)5(48)9281%2(41)10%2(41)919(14)5(48)10120%2(41)10%2(41)919(14)5(48)10959%2(41)10%2(41)919(14)5(48)11798%2(41)11%2(41)969(14)5(48)12702%2(41)8%2(41)791(48)13432%2(41)12%2(41)1017%3(4)2%2(41)9107(14)65%2(41)(29)326(14)3%2(41)9(48)2%2(41)7463(14)5%2(41)(29)322%2(41)3(48)2%2(41)6752(14)900000000001%2(41)(29)321(14)45000000000005%2(41)9(48)2%2(41)4164(14)3%2(41)(29)337(14)3%2(41)9(48)2%2(41)865(14)75%2(41)(29)337(14)55%2(41)3(48)2%2(41)13789(14)7%2(41)(29)92(14)65%2(41)19(48)1%2(41)12817(14)25%2(41)(29)92%2(41)19(48)2%2(41)12408%2(41)(29)93%2(41)11(48)2%2(41)12225%2(41)(29)93%2(41)10(48)6%2(41)12417%2(41)(29)400%2(41)10(48)6%2(41)12174%2(41)(29)400%2(41)10(48)3%2(41)1851(14)45%2(41)(29)343%2(41)3(48)3%2(41)2390%2(41)(29)364%2(41)3(48)3%2(41)3407(14)15%2(41)(29)342(14)45000000000005%2(41)2(48)3%2(41)4968(14)55%2(41)(29)364(14)45000000000005%2(41)5(48)3%2(41)5845(14)75%2(41)(29)343%2(41)6(48)3%2(41)8074(14)8%2(41)(29)361(14)85%2(41)2(48)3%2(41)9726(14)300000000001%2(41)(29)362(14)15000000000003%2(41)2(48)3%2(41)10746(14)2%2(41)(29)362(14)45000000000005%2(41)5(48)3%2(41)11479(14)1%2(41)(29)362(14)3%2(41)6%3(4)(41)(13)(0)(30)(32)%2(41)12978%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13137%2(41)(29)142%2(41)81(48)(41)(2)(30)(17)%2(41)13362%2(41)(29)151%2(41)57(48)(41)(13)(0)(30)(32)%2(41)13644%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)12949%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13021%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13095%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13162%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13235%2(41)(29)92%2(41)81(48)(41)(2)(30)(17)%2(41)13332%2(41)(29)92%2(41)57(48)(41)(2)(30)(17)%2(41)13399%2(41)(29)92%2(41)57(48)(41)(13)(0)(30)(32)%2(41)13542%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13613%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)13688%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)14132%2(41)(29)116%2(41)57(48)(41)(2)(30)(17)%2(41)14191%2(41)(29)116%2(41)57%3(4)5407138%3(4)5(8)10(8)2009>";
public static const CASK_TIME:uint = 25;
public static const KICK:String = "Kick";
public static const WOLF:String = "Wolf";
public static const mission8Str:String = "<AUTHOR:mission8><VERSION:1.0.226><DATA:2%2(41)600%2(41)3000%2(41)5000%2(41)12%3(4)0%2(41)13%2(41)460(48)400%2(41)5%2(41)669(48)1008%2(41)5%2(41)669(48)1616%2(41)5%2(41)669(48)2224%2(41)6%2(41)669(48)2832%2(41)6%2(41)669(48)3440%2(41)1%2(41)487(48)3865%2(41)8%2(41)791(48)4595%2(41)8%2(41)791(48)5325%2(41)8%2(41)791(48)6055%2(41)9%2(41)463(14)90000000000003(48)6455%2(41)9%2(41)463(14)90000000000003(48)6855%2(41)14%2(41)2022(14)5(48)8800%2(41)12%2(41)1017%3(4)6%2(41)9193(14)75%2(41)(29)400%2(41)14(48)2%2(41)9202%2(41)(29)93(14)10000000000001%2(41)14(48)4%2(41)787(14)6%2(41)36%2(41)4(48)4%2(41)911%2(41)36%2(41)4(48)4%2(41)1339%2(41)36%2(41)5(48)4%2(41)1453%2(41)36%2(41)5(48)4%2(41)1977%2(41)36%2(41)6(48)4%2(41)2089%2(41)36%2(41)6(48)4%2(41)2764%2(41)36%2(41)7(48)4%2(41)2867%2(41)36%2(41)7(48)4%2(41)3457%2(41)36%2(41)8(48)4%2(41)3552%2(41)36%2(41)8(48)2%2(41)4103%2(41)(29)192%2(41)9(48)2%2(41)4363%2(41)(29)192%2(41)9(48)5%2(41)4785%2(41)(29)400%2(41)10(48)5%2(41)4884%2(41)(29)400%2(41)10(48)6%2(41)5150%2(41)(29)400%2(41)10(48)6%2(41)5236%2(41)(29)400%2(41)10(48)2%2(41)5732%2(41)(29)192%2(41)11(48)5%2(41)6002%2(41)(29)400%2(41)11(48)5%2(41)6095%2(41)(29)400%2(41)11(48)6%2(41)6324%2(41)(29)400%2(41)11(48)6%2(41)6420%2(41)(29)400%2(41)11(48)2%2(41)6598%2(41)(29)123%2(41)11(48)2%2(41)6776%2(41)(29)128%2(41)11(48)6%2(41)7724(14)3%2(41)(29)400%2(41)6(48)6%2(41)8008(14)6%2(41)(29)400%2(41)6(48)6%2(41)8090(14)05%2(41)(29)400%2(41)6(48)6%2(41)7635(14)75%2(41)(29)400%2(41)6(48)3%2(41)8682(14)9%2(41)(29)343(14)45000000000005%2(41)6(48)3%2(41)8554(14)35%2(41)(29)343(14)75%2(41)6(48)3%2(41)7407(14)200000000001%2(41)(29)343(14)6%2(41)6%3(4)(41)(13)(0)(30)(32)%2(41)906%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1330%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1409%2(41)(29)143%2(41)81(48)(41)(2)(30)(17)%2(41)2173%2(41)(29)152%2(41)57(48)(41)(13)(0)(30)(32)%2(41)4106%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4368%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5727%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8955(14)800000000001%2(41)(29)142(14)55%2(41)81(48)(45)(28)(2)(30)(30)1%2(41)579%2(41)(29)93%2(41)197(48)(45)(28)(2)(30)(30)1%2(41)732%2(41)(29)93%2(41)197(48)(41)(13)(0)(30)(32)%2(41)868%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)951%2(41)(29)93%2(41)81(48)(45)(28)(2)(30)(30)3%2(41)1150%2(41)(29)93%2(41)162(48)(41)(13)(0)(30)(32)%2(41)1288%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1358%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1433%2(41)(29)93%2(41)81(48)(45)(28)(2)(30)(30)2%2(41)1550%2(41)(29)93%2(41)205(48)(45)(28)(2)(30)(30)1%2(41)1768%2(41)(29)93%2(41)197(48)(45)(28)(2)(30)(30)2%2(41)1917%2(41)(29)93%2(41)205(48)(45)(28)(2)(30)(30)3%2(41)2050%2(41)(29)93%2(41)162(48)(41)(2)(30)(17)%2(41)2148%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)2202%2(41)(29)93%2(41)57(48)(41)(13)(0)(30)(32)%2(41)4007%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4078%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4143%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4332%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4403%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4472%2(41)(29)92%2(41)81(48)(45)(28)(2)(30)(30)1%2(41)4748%2(41)(29)92%2(41)197(48)(45)(28)(2)(30)(30)1%2(41)4913%2(41)(29)92%2(41)197(48)(45)(28)(2)(30)(30)2%2(41)5076%2(41)(29)92%2(41)205(48)(45)(28)(2)(30)(30)3%2(41)5239%2(41)(29)92%2(41)162(48)(41)(13)(0)(30)(32)%2(41)5405%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5486%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5565%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5693%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5758%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5829%2(41)(29)92%2(41)81(48)(45)(28)(2)(30)(30)1%2(41)5978%2(41)(29)92%2(41)197(48)(45)(28)(2)(30)(30)1%2(41)6179%2(41)(29)93%2(41)197(48)(45)(28)(2)(30)(30)1%2(41)6340%2(41)(29)93%2(41)197(48)(45)(28)(2)(30)(30)1%2(41)6595%2(41)(29)93%2(41)197(48)(45)(28)(2)(30)(30)2%2(41)6763%2(41)(29)93%2(41)205(48)(41)(13)(0)(30)(32)%2(41)8925(14)75%2(41)(29)92(14)55000000000001%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8998(14)65%2(41)(29)92(14)4%2(41)81%3(4)16528544%3(4)5(8)10(8)2009>";
public static const SCORE:String = "Score";
public static const KNIFE:String = "Knife";
public static const DIVIDE_HP:uint = 80;
public static const LASH:String = "Lash";
public static const BIRD_TIME:uint = 25;
public static const RUN1_SOUND:String = "Run1";
public static const bonusMission2Str:String = "<AUTHOR:1><VERSION:1.0.245><DATA:2%2(41)2147483647%2(41)2147483647%2(41)2147483647%2(41)6%3(4)0%2(41)13%2(41)460(48)400%2(41)5%2(41)669(48)1008%2(41)5%2(41)669(48)1616%2(41)12%2(41)1017%3(4)%3(4)(41)(13)(0)(30)(32)%2(41)891%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1235%2(41)(29)243%2(41)81(48)(41)(13)(0)(30)(32)%2(41)859%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)922%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1198%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1262%2(41)(29)193%2(41)81(48)(41)(13)(0)(30)(32)%2(41)826%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)888%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)952%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1164%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1227%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1289%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)789%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)852%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)916%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)979%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1134%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1197%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1260%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1323%2(41)(29)93%2(41)81%3(4)1376043%3(4)18(8)11(8)2009>";
public static const ENEMY2_PRESENT_ODDS:Number = 0.2;
public static const GAME_TESTING:Boolean = false;
public static const RECHARGE:String = "Recharge";
public static const BULLET_NUM:uint = 30;
public static const mission13Str:String = "<AUTHOR:mission13><VERSION:1.0.226><DATA:3%2(41)600%2(41)3000%2(41)5000%2(41)12%3(4)0%2(41)13%2(41)460(48)400%2(41)11%2(41)969(14)5(48)1304%2(41)9%2(41)463(14)90000000000003(48)1704%2(41)11%2(41)969(14)5(48)2608%2(41)14%2(41)2022(14)5(48)4553%2(41)15%2(41)2479(14)5(48)6951%2(41)12%2(41)1017%3(4)2%2(41)839%2(41)(29)93%2(41)13(48)2%2(41)767%2(41)(29)93%2(41)5(48)2%2(41)919%2(41)(29)93%2(41)4(48)2%2(41)696%2(41)(29)93%2(41)6(48)2%2(41)989%2(41)(29)93%2(41)6(48)2%2(41)2209%2(41)(29)93%2(41)16(48)2%2(41)2118%2(41)(29)93%2(41)1(48)2%2(41)2293%2(41)(29)93%2(41)1(48)4%2(41)1656%2(41)36%2(41)1(48)2%2(41)2027%2(41)(29)93%2(41)3(48)2%2(41)2380%2(41)(29)93%2(41)3(48)4%2(41)1078%2(41)36%2(41)6(48)6%2(41)3654%2(41)(29)400%2(41)4(48)6%2(41)3760%2(41)(29)400%2(41)4(48)5%2(41)5620%2(41)(29)400%2(41)4(48)5%2(41)5709%2(41)(29)400%2(41)6(48)5%2(41)5797%2(41)(29)400%2(41)6(48)5%2(41)5888%2(41)(29)400%2(41)6(48)2%2(41)7388%2(41)(29)249%2(41)14(48)5%2(41)6362%2(41)(29)400%2(41)9(48)5%2(41)6458%2(41)(29)400%2(41)9(48)2%2(41)6754%2(41)(29)337%2(41)9(48)2%2(41)6855%2(41)(29)337%2(41)9(48)2%2(41)7235%2(41)(29)93%2(41)15(48)3%2(41)5346%2(41)(29)364%2(41)3(48)3%2(41)5255%2(41)(29)364%2(41)3(48)3%2(41)5032%2(41)(29)364%2(41)3(48)3%2(41)4935%2(41)(29)364%2(41)3(48)3%2(41)4412%2(41)(29)344%2(41)5(48)3%2(41)4313%2(41)(29)344%2(41)5(48)3%2(41)2369%2(41)(29)336%2(41)3(48)3%2(41)1989%2(41)(29)336%2(41)2(48)3%2(41)1089%2(41)(29)336%2(41)6(48)3%2(41)1005%2(41)(29)336%2(41)5(48)3%2(41)914%2(41)(29)336%2(41)4%3(4)(41)(2)(30)(17)%2(41)7729%2(41)(29)175%2(41)57(48)(41)(13)(0)(30)(32)%2(41)353%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1439%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1522%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)7091%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)317%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)388%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1411%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1475%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1545%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1663%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)7058%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)7129%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)7325%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)7653%2(41)(29)116%2(41)57(48)(41)(2)(30)(17)%2(41)7703%2(41)(29)116%2(41)57(48)(41)(2)(30)(17)%2(41)7754%2(41)(29)116%2(41)57%3(4)5620360%3(4)6(8)10(8)2009>";
public static const HAND_MOVE_TIME:uint = 5;
public static const ENEMY_ARROW_POWER:uint = 20;
public static const mission9Str:String = "<AUTHOR:mission9><VERSION:1.0.226><DATA:2%2(41)600%2(41)3000%2(41)5000%2(41)15%3(4)0%2(41)13%2(41)460(48)400%2(41)8%2(41)791(48)1130%2(41)9%2(41)463(14)90000000000003(48)1530%2(41)2%2(41)487(48)1955%2(41)8%2(41)791(48)2685%2(41)9%2(41)463(14)90000000000003(48)3085%2(41)11%2(41)969(14)5(48)3989%2(41)8%2(41)791(48)4719%2(41)9%2(41)463(14)90000000000003(48)5119%2(41)2%2(41)487(48)5544%2(41)8%2(41)791(48)6274%2(41)9%2(41)463(14)90000000000003(48)6674%2(41)11%2(41)969(14)5(48)7578%2(41)12%2(41)1017%3(4)2%2(41)7322%2(41)(29)93%2(41)17(48)1%2(41)7055%2(41)(29)93%2(41)18(48)2%2(41)905%2(41)(29)92(14)35000000000001%2(41)8(48)2%2(41)1020(14)0500000000001%2(41)(29)92(14)35000000000001%2(41)8(48)2%2(41)1480%2(41)(29)93%2(41)8(48)2%2(41)2152(14)55%2(41)(29)91(14)5%2(41)7(48)2%2(41)2278(14)8%2(41)(29)92(14)25%2(41)7(48)4%2(41)2355(14)05%2(41)36%2(41)8(48)4%2(41)2475(14)05%2(41)36%2(41)8(48)4%2(41)2580%2(41)36%2(41)8(48)6%2(41)3232(14)55%2(41)(29)400%2(41)9(48)6%2(41)3316(14)3%2(41)(29)400%2(41)9(48)5%2(41)3828(14)8500000000004%2(41)(29)400%2(41)9(48)5%2(41)3911(14)3500000000004%2(41)(29)400%2(41)9(48)2%2(41)3476(14)3%2(41)(29)93(14)5%2(41)11(48)2%2(41)3726(14)3%2(41)(29)93%2(41)11(48)2%2(41)4545(14)05%2(41)(29)91(14)5%2(41)11(48)2%2(41)4665(14)1%2(41)(29)91(14)25%2(41)11(48)2%2(41)4320(14)05%2(41)(29)292(14)25%2(41)9(48)2%2(41)4892(14)55%2(41)(29)93%2(41)8(48)2%2(41)5052(14)55%2(41)(29)92(14)5%2(41)8(48)2%2(41)5496(14)3%2(41)(29)92(14)5%2(41)9(48)2%2(41)5768(14)85%2(41)(29)91(14)5%2(41)4(48)2%2(41)5900(14)1%2(41)(29)92%2(41)4(48)4%2(41)6408(14)85%2(41)36%2(41)4(48)4%2(41)6492(14)6%2(41)36%2(41)4(48)3%2(41)7020(14)1%2(41)(29)336(14)25%2(41)4(48)3%2(41)7176(14)35%2(41)(29)336(14)5%2(41)4(48)3%2(41)7350(14)150000000001%2(41)(29)336(14)5%2(41)5(48)3%2(41)2915(14)05%2(41)(29)154(14)25%2(41)6(48)3%2(41)1790%2(41)(29)246%2(41)6(48)3%2(41)1666%2(41)(29)246%2(41)6%3(4)(41)(13)(0)(30)(32)%2(41)4320(14)05%2(41)(29)242(14)25%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4270(14)05%2(41)(29)192(14)25%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4372(14)55%2(41)(29)191(14)75%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1272%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1353%2(41)(29)143%2(41)81(48)(41)(2)(30)(17)%2(41)1848%2(41)(29)152%2(41)57(48)(41)(2)(30)(17)%2(41)1904%2(41)(29)152%2(41)57(48)(41)(2)(30)(17)%2(41)2451(14)25%2(41)(29)151%2(41)57(48)(41)(2)(30)(17)%2(41)2572(14)5%2(41)(29)151(14)25%2(41)57(48)(41)(13)(0)(30)(32)%2(41)4228(14)8%2(41)(29)142(14)25%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4390(14)05%2(41)(29)141(14)75%2(41)81(48)(41)(2)(30)(17)%2(41)5317(14)55%2(41)(29)152%2(41)57(48)(41)(2)(30)(17)%2(41)5376(14)3%2(41)(29)152(14)25%2(41)57(48)(41)(13)(0)(30)(32)%2(41)6166(14)35%2(41)(29)141(14)75%2(41)81(48)(41)(13)(0)(30)(32)%2(41)7734%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)7812%2(41)(29)143%2(41)81(48)(41)(2)(30)(17)%2(41)7944%2(41)(29)152%2(41)57(48)(45)(28)(2)(30)(30)2%2(41)602%2(41)(29)92%2(41)205(48)(45)(28)(2)(30)(30)2%2(41)762%2(41)(29)92%2(41)205(48)(41)(13)(0)(30)(32)%2(41)1239%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1312%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1386%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)1819%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)1875%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)1927%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)2415%2(41)(29)91(14)75%2(41)57(48)(41)(2)(30)(17)%2(41)2476(14)25%2(41)(29)92%2(41)57(48)(41)(2)(30)(17)%2(41)2540%2(41)(29)92(14)25%2(41)57(48)(41)(2)(30)(17)%2(41)2598(14)75%2(41)(29)91(14)75%2(41)57(48)(45)(28)(2)(30)(30)1%2(41)2848(14)75%2(41)(29)93%2(41)197(48)(45)(28)(2)(30)(30)2%2(41)3008(14)75%2(41)(29)93(14)5%2(41)205(48)(41)(13)(0)(30)(32)%2(41)4120(14)05%2(41)(29)92(14)25%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4195(14)05%2(41)(29)92(14)25%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4280(14)05%2(41)(29)91(14)25%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4352(14)55%2(41)(29)91(14)75%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4417(14)55%2(41)(29)91(14)75%2(41)81(48)(41)(2)(30)(17)%2(41)5283(14)8%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)5343(14)8%2(41)(29)93(14)25%2(41)57(48)(41)(2)(30)(17)%2(41)5407(14)55%2(41)(29)92(14)75%2(41)57(48)(41)(13)(0)(30)(32)%2(41)6045(14)1%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6126(14)35%2(41)(29)91(14)75%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6210(14)1%2(41)(29)91(14)5%2(41)81(48)(45)(28)(2)(30)(30)1%2(41)6458(14)85%2(41)(29)93(14)25%2(41)197(48)(45)(28)(2)(30)(30)3%2(41)6596(14)35%2(41)(29)92(14)75%2(41)162(48)(41)(13)(0)(30)(32)%2(41)7696%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)7769%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)7837%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)7913%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)7972%2(41)(29)93%2(41)57(48)(41)(13)(0)(30)(32)%2(41)8296%2(41)(29)116%2(41)81(48)(41)(13)(0)(30)(32)%2(41)8369%2(41)(29)116%2(41)81%3(4)23031462%3(4)5(8)10(8)2009>";
public static const BONUS_TIME2:uint = 20;
public static const BONUS_TIME3:uint = 30;
public static const ENEMY7_PRESENT_ODDS:Number = 0.2;
public static const BONUS_TIME5:uint = 45;
public static const JUMP_KICK_VALUE:uint = 30;
public static const BONUS_TIME1:uint = 30;
public static const HERO_BULLET_SPEED:uint = 20;
public static const WEAPON_HIT:String = "WeaponHit";
public static const ENEMY14_WHIP_POWER:uint = 30;
public static const DIVIDE_TIME:uint = 30;
public static const BONUS_TIME4:uint = 40;
public static const HERO_STICK_SPEED:uint = 10;
public static const ENEMY_BULLET_POWER:uint = 30;
public static const HORSE_RUN:String = "HorseRun";
public static const bonusMission3Str:String = "<AUTHOR:1><VERSION:1.0.245><DATA:3%2(41)2147483647%2(41)2147483647%2(41)250%2(41)6%3(4)0%2(41)13%2(41)460(48)400%2(41)10%2(41)919(14)5(48)1239%2(41)12%2(41)1017%3(4)%3(4)%3(4)19624%3(4)18(8)11(8)2009>";
public static const GAME_TIME:uint = 6;
public static const mission14Str:String = "<AUTHOR:mission14><VERSION:1.0.226><DATA:3%2(41)500%2(41)2000%2(41)3000%2(41)6%3(4)0%2(41)13%2(41)460(48)400%2(41)4%2(41)487(48)825%2(41)4%2(41)487(48)1250%2(41)1%2(41)487(48)1675%2(41)1%2(41)487(48)2100%2(41)6%2(41)669(48)2708%2(41)4%2(41)487(48)3133%2(41)4%2(41)487(48)3558%2(41)12%2(41)1017%3(4)1%2(41)1652(14)7%2(41)(29)193(14)65%2(41)17(48)5%2(41)1506(14)3500000000001%2(41)(29)400%2(41)18(48)4%2(41)3548(14)4%2(41)36%2(41)6(48)2%2(41)3461(14)75%2(41)(29)230(14)70000000000002%2(41)7(48)2%2(41)3336(14)75%2(41)(29)230(14)35000000000002%2(41)7(48)2%2(41)3058(14)4%2(41)(29)230(14)70000000000002%2(41)8(48)2%2(41)2938(14)4%2(41)(29)230(14)70000000000002%2(41)8(48)2%2(41)2638(14)4%2(41)(29)193(14)35000000000002%2(41)11(48)2%2(41)2513(14)3500000000004%2(41)(29)194%2(41)11(48)2%2(41)1978(14)4%2(41)(29)193(14)35000000000002%2(41)10(48)2%2(41)2056(14)65%2(41)(29)193(14)05%2(41)11(48)6%2(41)3697(14)05%2(41)(29)400%2(41)14(48)2%2(41)3693(14)75%2(41)(29)94(14)35000000000001%2(41)19(48)2%2(41)2271(14)7000000000003%2(41)(29)194(14)25%2(41)15(48)3%2(41)631(14)6500000000001%2(41)(29)255(14)70000000000002%2(41)6(48)3%2(41)1070%2(41)(29)255(14)35000000000002%2(41)6%3(4)(41)(13)(0)(30)(32)%2(41)353(14)35%2(41)(29)144(14)35%2(41)81(48)(41)(2)(30)(17)%2(41)3880(14)05%2(41)(29)153(14)35%2(41)57(48)(41)(13)(0)(30)(32)%2(41)236(14)70000000000002%2(41)(29)94(14)35000000000001%2(41)81(48)(41)(13)(0)(30)(32)%2(41)316(14)70000000000005%2(41)(29)94(14)35000000000001%2(41)81(48)(41)(13)(0)(30)(32)%2(41)388(14)35%2(41)(29)94%2(41)81(48)(41)(2)(30)(17)%2(41)3788(14)4%2(41)(29)93(14)65%2(41)57(48)(41)(2)(30)(17)%2(41)3846(14)7000000000003%2(41)(29)94(14)35000000000001%2(41)57(48)(41)(2)(30)(17)%2(41)3903(14)4%2(41)(29)93(14)65%2(41)57(48)(41)(2)(30)(17)%2(41)3960%2(41)(29)92(14)65%2(41)57(48)(41)(13)(0)(30)(32)%2(41)4296(14)75%2(41)(29)115(14)05000000000001%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4381(14)75%2(41)(29)115(14)7%2(41)81%3(4)3248686%3(4)5(8)10(8)2009>";
public static const SHOOTED1:String = "Shooted1";
public static const SHOOTED2:String = "Shooted2";
public static const LOSE:String = "Lose";
public static const KNIFE_VALUE:uint = 30;
public static const RANK_B_COLOUR:uint = 27312;
public static const JUMPER_TIME:uint = 30;
public static const WHISTLE:String = "Whistle";
public static const SIDE_SPEED:uint = 4;
public static const AX_VALUE:uint = 40;
public static const bonusMission4Str:String = "<AUTHOR:1><VERSION:1.0.245><DATA:2%2(41)2147483647%2(41)2147483647%2(41)2147483647%2(41)6%3(4)0%2(41)13%2(41)460(48)400%2(41)15%2(41)2479(14)5(48)2798%2(41)12%2(41)1017%3(4)%3(4)%3(4)24844%3(4)18(8)11(8)2009>";
public static const DETONATOR_TO_HERO:uint = 30;
public static const mission15Str:String = "<AUTHOR:mission15><VERSION:1.0.226><DATA:3%2(41)500%2(41)2147483647%2(41)2147483647%2(41)9%3(4)0%2(41)13%2(41)460(48)400%2(41)15%2(41)2479(14)5(48)2798%2(41)5%2(41)669(48)3406%2(41)5%2(41)669(48)4014%2(41)14%2(41)2022(14)5(48)5959%2(41)8%2(41)791(48)6689%2(41)12%2(41)1017%3(4)4%2(41)6655(14)6%2(41)36%2(41)3(48)4%2(41)6562%2(41)36%2(41)3(48)4%2(41)6466%2(41)36%2(41)2(48)4%2(41)6370%2(41)36%2(41)1(48)6%2(41)5267%2(41)(29)400%2(41)6(48)6%2(41)5186%2(41)(29)400%2(41)6(48)6%2(41)5014%2(41)(29)400%2(41)6(48)6%2(41)4932%2(41)(29)400%2(41)6(48)2%2(41)4040%2(41)(29)93%2(41)9(48)2%2(41)3881%2(41)(29)93%2(41)9(48)2%2(41)3789%2(41)(29)193%2(41)9(48)2%2(41)3496%2(41)(29)93%2(41)11(48)2%2(41)3601%2(41)(29)93%2(41)11(48)2%2(41)3391%2(41)(29)93%2(41)11(48)2%2(41)2261%2(41)(29)337%2(41)6(48)2%2(41)2174%2(41)(29)337%2(41)6(48)5%2(41)1659%2(41)(29)400%2(41)5(48)5%2(41)1736%2(41)(29)400%2(41)5(48)5%2(41)1957%2(41)(29)400%2(41)6(48)5%2(41)1881%2(41)(29)400%2(41)6(48)5%2(41)1492%2(41)(29)400%2(41)4(48)5%2(41)1407%2(41)(29)400%2(41)4(48)2%2(41)3277%2(41)(29)93%2(41)13(48)6%2(41)3346%2(41)(29)400%2(41)17(48)6%2(41)3423%2(41)(29)400%2(41)18(48)2%2(41)7016%2(41)(29)93%2(41)15(48)1%2(41)6547%2(41)(29)92%2(41)15(48)3%2(41)623%2(41)(29)364%2(41)1(48)3%2(41)725%2(41)(29)364%2(41)1(48)3%2(41)1096%2(41)(29)364%2(41)4(48)3%2(41)1187%2(41)(29)364%2(41)4(48)3%2(41)2561%2(41)(29)364%2(41)2(48)3%2(41)2651%2(41)(29)364%2(41)2(48)3%2(41)2742%2(41)(29)364%2(41)2(48)3%2(41)4706%2(41)(29)344%2(41)3(48)3%2(41)4624%2(41)(29)344%2(41)3(48)3%2(41)4539%2(41)(29)344%2(41)3(48)3%2(41)5756%2(41)(29)344%2(41)2(48)3%2(41)5833%2(41)(29)344%2(41)2(48)3%2(41)5911%2(41)(29)344%2(41)2%3(4)(41)(13)(0)(30)(32)%2(41)290%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2960%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3084%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3708%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3784%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6126%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6201%2(41)(29)142%2(41)81(48)(41)(2)(30)(17)%2(41)6824%2(41)(29)152%2(41)57(48)(41)(2)(30)(17)%2(41)6884%2(41)(29)152%2(41)57(48)(41)(13)(0)(30)(32)%2(41)254%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)326%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2920%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2987%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3057%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3124%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3671%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3737%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3804%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)3947%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6083%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6154%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)6226%2(41)(29)92%2(41)81(48)(45)(28)(2)(30)(30)1%2(41)6394%2(41)(29)92%2(41)197(48)(41)(2)(30)(17)%2(41)6789%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)6850%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)6911%2(41)(29)93%2(41)57(48)(41)(13)(0)(30)(32)%2(41)7418%2(41)(29)116%2(41)81%3(4)9226935%3(4)6(8)10(8)2009>";
public static const HITED:String = "Hited";
public static const POLE_DIS:uint = 500;
public static const ENEMY_CARD_SPEED:uint = 10;
public static const ENEMY5_PRESENT_ODDS:Number = 0.2;
public static const WARNING:String = "Warning";
public static const FALL:String = "Fall";
public static const DISAPPEAR:String = "Disappear";
public static const HERO_BULLET_POWER:uint = 40;
public static const HERO_STICK_POWER:uint = 30;
public static const DART_FLY:String = "DartFly";
public static const ENEMY_KNIFE_SPEED:uint = 12;
public static const RESUME_TIME:Number = 2;
public static const ENEMY14_CATCH_POWER:uint = 20;
public static const bonusMission5Str:String = "<AUTHOR:1><VERSION:1.0.245><DATA:1%2(41)2147483647%2(41)2147483647%2(41)2147483647%2(41)6%3(4)0%2(41)13%2(41)460(48)400%2(41)8%2(41)791(48)1130%2(41)12%2(41)1017%3(4)%3(4)(41)(13)(0)(30)(32)%2(41)661%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)828%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)990%2(41)(29)92%2(41)81%3(4)83247%3(4)19(8)11(8)2009>";
public static const WHIP:String = "Whip";
public static const ENEMY_DETONATOR_SPEED:uint = 10;
public static const DETONATOR_VALUE:uint = 60;
public static const WIN:String = "Win";
public static const mission16Str:String = "<AUTHOR:mission16><VERSION:1.0.226><DATA:2%2(41)600%2(41)3000%2(41)5000%2(41)6%3(4)0%2(41)13%2(41)460(48)400%2(41)1%2(41)487(48)825%2(41)1%2(41)487(48)1250%2(41)2%2(41)487(48)1675%2(41)2%2(41)487(48)2100%2(41)3%2(41)487(48)2525%2(41)3%2(41)487(48)2950%2(41)6%2(41)669(48)3558%2(41)2%2(41)487(48)3983%2(41)2%2(41)487(48)4408%2(41)12%2(41)1017%3(4)2%2(41)4770%2(41)(29)93%2(41)9(48)2%2(41)1823(14)3500000000001%2(41)(29)92(14)7%2(41)16(48)2%2(41)1633(14)3500000000001%2(41)(29)92(14)35000000000001%2(41)16(48)2%2(41)3929%2(41)(29)93%2(41)14(48)2%2(41)4139%2(41)(29)93%2(41)17(48)2%2(41)4215%2(41)(29)93%2(41)18(48)2%2(41)1538%2(41)(29)143%2(41)1(48)2%2(41)1441%2(41)(29)192(14)60000000000002%2(41)1(48)6%2(41)2011%2(41)(29)400%2(41)3(48)5%2(41)3117%2(41)(29)400%2(41)9(48)5%2(41)3212%2(41)(29)400%2(41)9(48)2%2(41)3476%2(41)(29)194%2(41)9(48)2%2(41)3374%2(41)(29)194%2(41)9(48)2%2(41)3755%2(41)(29)211%2(41)11(48)2%2(41)4339%2(41)(29)211%2(41)11(48)2%2(41)4851%2(41)(29)249%2(41)9(48)2%2(41)4959%2(41)(29)249%2(41)9(48)3%2(41)2801%2(41)(29)250%2(41)6(48)3%2(41)2718%2(41)(29)250%2(41)6(48)3%2(41)2634%2(41)(29)250%2(41)6(48)3%2(41)2344%2(41)(29)250%2(41)2(48)3%2(41)2244%2(41)(29)250%2(41)2(48)3%2(41)1914%2(41)(29)246%2(41)2(48)3%2(41)1823%2(41)(29)246%2(41)2(48)3%2(41)1071%2(41)(29)194%2(41)1(48)3%2(41)1165%2(41)(29)194%2(41)1(48)3%2(41)738%2(41)(29)194%2(41)1(48)3%2(41)640%2(41)(29)194%2(41)1%3(4)(41)(13)(0)(30)(32)%2(41)1444%2(41)(29)142(14)6%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2024%2(41)(29)143%2(41)81(48)(41)(2)(30)(17)%2(41)3752%2(41)(29)152%2(41)57(48)(41)(2)(30)(17)%2(41)4338%2(41)(29)152%2(41)57(48)(41)(13)(0)(30)(32)%2(41)4627%2(41)(29)143%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1413(14)8000000000002%2(41)(29)92(14)60000000000001%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1483(14)3000000000002%2(41)(29)93(14)35000000000001%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1551%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1928%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1992%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)2059%2(41)(29)93%2(41)81(48)(41)(2)(30)(17)%2(41)3714%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)3777%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)3839%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)4308%2(41)(29)93%2(41)57(48)(41)(2)(30)(17)%2(41)4364%2(41)(29)93%2(41)57(48)(41)(13)(0)(30)(32)%2(41)4520%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4588%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4653%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)4929%2(41)(29)93%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5144%2(41)(29)116%2(41)81(48)(41)(13)(0)(30)(32)%2(41)5215%2(41)(29)116%2(41)81%3(4)6414134%3(4)6(8)10(8)2009>";
public static const BOW1:String = "Bow1";
public static const BOW2:String = "Bow2";
public static const CLICK1:String = "Click1";
public static const CLICK3:String = "DartIn";
public static const mission1Str:String = "<AUTHOR:mission1><VERSION:1.0.225><DATA:1%2(41)700%2(41)2147483647%2(41)2147483647%2(41)6%3(4)0%2(41)13%2(41)460(48)400%2(41)8%2(41)791(48)1130%2(41)8%2(41)791(48)1860%2(41)8%2(41)791(48)2590%2(41)12%2(41)1017%3(4)2%2(41)3082%2(41)(29)93%2(41)13(48)4%2(41)2673%2(41)36%2(41)6(48)4%2(41)1838%2(41)36%2(41)5(48)4%2(41)1081%2(41)36%2(41)4(48)2%2(41)906%2(41)(29)192%2(41)4(48)2%2(41)1642%2(41)(29)269%2(41)5(48)2%2(41)1169%2(41)(29)92%2(41)4(48)2%2(41)1476%2(41)(29)92%2(41)5(48)2%2(41)1877%2(41)(29)92%2(41)5(48)2%2(41)2246%2(41)(29)92%2(41)6(48)2%2(41)2359%2(41)(29)92%2(41)6(48)2%2(41)2763%2(41)(29)93%2(41)6%3(4)(41)(13)(0)(30)(32)%2(41)605%2(41)(29)192%2(41)81(48)(41)(2)(30)(17)%2(41)1311%2(41)(29)210%2(41)57(48)(41)(2)(30)(17)%2(41)1642%2(41)(29)210%2(41)57(48)(41)(2)(30)(17)%2(41)1716%2(41)(29)210%2(41)57(48)(41)(13)(0)(30)(32)%2(41)606%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)674%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)910%2(41)(29)142%2(41)81(48)(41)(13)(0)(30)(32)%2(41)995%2(41)(29)142%2(41)81(48)(41)(2)(30)(17)%2(41)1281%2(41)(29)151%2(41)57(48)(41)(2)(30)(17)%2(41)1346%2(41)(29)151%2(41)57(48)(41)(2)(30)(17)%2(41)1611%2(41)(29)151%2(41)57(48)(41)(2)(30)(17)%2(41)1675%2(41)(29)151%2(41)57(48)(41)(2)(30)(17)%2(41)1738%2(41)(29)151%2(41)57(48)(4)(2)(57)%2(41)1998%2(41)(29)118%2(41)69(48)(4)(2)(57)%2(41)2044%2(41)(29)118%2(41)69(48)(4)(2)(57)%2(41)2088%2(41)(29)118%2(41)69(48)(4)(2)(57)%2(41)2134%2(41)(29)118%2(41)69(48)(4)(2)(57)%2(41)2472%2(41)(29)118%2(41)69(48)(4)(2)(57)%2(41)2533%2(41)(29)118%2(41)69(48)(41)(13)(0)(30)(32)%2(41)498%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)606%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)675%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)888%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)967%2(41)(29)92%2(41)81(48)(41)(13)(0)(30)(32)%2(41)1041%2(41)(29)92%2(41)81(48)(41)(2)(30)(17)%2(41)1251%2(41)(29)92%2(41)57(48)(41)(2)(30)(17)%2(41)1315%2(41)(29)92%2(41)57(48)(41)(2)(30)(17)%2(41)1382%2(41)(29)92%2(41)57(48)(41)(2)(30)(17)%2(41)1580%2(41)(29)92%2(41)57(48)(41)(2)(30)(17)%2(41)1641%2(41)(29)92%2(41)57(48)(41)(2)(30)(17)%2(41)1705%2(41)(29)92%2(41)57(48)(41)(2)(30)(17)%2(41)1770%2(41)(29)92%2(41)57(48)(4)(2)(57)%2(41)1975%2(41)(29)92%2(41)69(48)(4)(2)(57)%2(41)2026%2(41)(29)92%2(41)69(48)(4)(2)(57)%2(41)2073%2(41)(29)92%2(41)69(48)(4)(2)(57)%2(41)2116%2(41)(29)92%2(41)69(48)(4)(2)(57)%2(41)2165%2(41)(29)92%2(41)69(48)(4)(2)(57)%2(41)2446%2(41)(29)92%2(41)69(48)(4)(2)(57)%2(41)2501%2(41)(29)92%2(41)69(48)(4)(2)(57)%2(41)2558%2(41)(29)92%2(41)69%3(4)6581101%3(4)24(8)8(8)2009>";
public static const BULLET_VALUE:uint = 50;
public static const CLICK2:String = "Click2";
public static const RANK_C_COLOUR:uint = 0x8400;
private static var _enemy9Obj:Object = {hp:60, moveSpeed:10, jumpSpeed:-25, slothOdds:0.2};
private static var _enemy17Obj:Object = {hp:700, moveSpeed:8, jumpSpeed:-33, slothOdds:0, type:"boss"};
private static var _rankNameArr:Array = ["RANK : S", "RANK : A+", "RANK : A", "RANK : A-", "RANK : B+", "RANK : B", "RANK : B-", "RANK : C+", "RANK : C", "RANK : C-"];
private static var _enemy18Obj:Object = {hp:700, moveSpeed:8, jumpSpeed:-33, slothOdds:0, type:"boss"};
private static var _enemy19Obj:Object = {hp:1500, moveSpeed:12, jumpSpeed:-35, slothOdds:0, type:"boss"};
private static var _enemy1Obj:Object = {hp:80, moveSpeed:8, jumpSpeed:-25, slothOdds:0.2};
private static var _keyInfoArr:Array = [["A", 65], ["B", 66], ["C", 67], ["D", 68], ["E", 69], ["F", 70], ["G", 71], ["H", 72], ["I", 73], ["J", 74], ["K", 75], ["L", 76], ["M", 77], ["N", 78], ["O", 79], ["P", 80], ["Q", 81], ["R", 82], ["S", 83], ["T", 84], ["U", 85], ["V", 86], ["W", 87], ["X", 88], ["Y", 89], ["Z", 90], ["0", 48], ["1", 49], ["2", 50], ["3", 51], ["4", 52], ["5", 53], ["6", 54], ["7", 55], ["8", 56], ["9", 57], ["NUMBER 0", 96], ["NUMBER 1", 97], ["NUMBER 2", 98], ["NUMBER 3", 99], ["NUMBER 4", 100], ["NUMBER 5", 101], ["NUMBER 6", 102], ["NUMBER 7", 103], ["NUMBER 8", 104], ["NUMBER 9", 105], ["*", 106], ["+", 107], ["-", 109], [".", 110], ["/", 111], ["F1", 112], ["F2", 113], ["F3", 114], ["F4", 115], ["F5", 116], ["F6", 117], ["F7", 118], ["F8", 119], ["F9", 120], ["F11", 122], ["F12", 123], ["BACKSPACE", 8], ["TAB", 9], ["ENTER", 13], ["SHIFT", 16], ["CONTROL", 17], ["CAPS LOCK", 20], ["ESC", 27], ["SPACE", 32], ["PAGE UP", 33], ["PAGE DOWN", 34], ["END", 35], ["HOME", 36], ["←", 37], ["↑", 38], ["→", 39], ["↓", 40], ["INSERT", 45], ["DELETE", 46], ["NUM LOCK", 144], ["SCRLK", 145], ["PAUSE/BREAK", 19], ["; :", 186], ["= +", 187], ["- _", 189], ["/ ?", 191], ["` ~", 192], ["[ {", 219], [" |", 220], ["] }", 221], ["” ’", 222], [", <", 188], [". >", 190]];
private static var _presentArr:Array = [["money", 1000], ["badge", 100], ["clevis", 200], ["cap", 300], ["shoes", 400], ["bag", 500], ["coin", 750]];
private static var _colorArr:Array = ["ffffcc00", "ffcc33cf", "ff33cc00", "ffffffff", "ff0099ff", "ffff0000", "ff000000"];
private static var _enemy10Obj:Object = {hp:200, moveSpeed:6, jumpSpeed:-20, slothOdds:0.2};
private static var _supplyArr:Array = [["bullet"], ["blood1", 25], ["blood2", 50], ["blood3", 75], ["blood4", 100], ["blood5", 125], ["blood6", 150], ["blood7", 175], ["blood8", 200], ["blood9", 225]];
private static var _enemy2Obj:Object = {hp:80, moveSpeed:8, jumpSpeed:-25, slothOdds:0.15};
private static var _screenCenter:Array = [325, 400];
private static var _resourceArr:Array = ["resource"];
private static var _enemy3Obj:Object = {hp:80, moveSpeed:8, jumpSpeed:-25, slothOdds:0.15};
private static var _enemy11Obj:Object = {hp:200, moveSpeed:6, jumpSpeed:-20, slothOdds:0.15};
private static var _keyNameArr:Array = ["Left", "Right", "Up", "Down", "Attack", "Jump"];
private static var _enemy4Obj:Object = {hp:60, moveSpeed:7, jumpSpeed:-24, slothOdds:0.2};
private static var _enemy5Obj:Object = {hp:60, moveSpeed:7, jumpSpeed:-24, slothOdds:0.15};
private static var _enemy13Obj:Object = {hp:600, moveSpeed:10, jumpSpeed:-32, slothOdds:0, type:"boss"};
private static var _multiplierArr:Array = [["sky", 0.1], ["hill", 0.3], ["earth", 1], ["plant", 1]];
private static var _enemy6Obj:Object = {hp:60, moveSpeed:7, jumpSpeed:-24, slothOdds:0.15};
private static var _enemy14Obj:Object = {hp:900, moveSpeed:9, jumpSpeed:-32, slothOdds:0, type:"boss"};
private static var _enemy15Obj:Object = {hp:1200, moveSpeed:7, jumpSpeed:-32, slothOdds:0, type:"boss"};
private static var _enemy7Obj:Object = {hp:100, moveSpeed:9, jumpSpeed:-22, slothOdds:0.15};
private static var _noEscapeArr:Array = ["e", "P", "a", "+", "B", "u", "b", "c", "/", "O", "j", "X", "f", "h", ".", "i", "U", "k", "M", "N", "*", "V", "l", "W", "m", "@", "n", "q", "r", "-", "s", "p", "t", "Q", "v", "Z", "w", "x", "d", "y", "A", "C", "D", "E", "F", "G", "H", "I", "_", "J", "K", "L", "R", "z", "S", "T", "Y", "g", "o"];
private static var _enemy16Obj:Object = {hp:1200, moveSpeed:12, jumpSpeed:-35, slothOdds:0, type:"boss"};
private static var _keyCode:Object = {left:65, right:68, up:87, down:83, attack:74, jump:75};
private static var _enemy8Obj:Object = {hp:100, moveSpeed:9, jumpSpeed:-22, slothOdds:0.2};
private static var _carriageArr:Array = [[1, 425], [2, 425], [3, 425], [4, 425], [5, 608], [6, 608], [7, 781], [8, 730], [9, 400], [10, 839], [11, 904], [13, 400], [14, 1945], [15, 2398]];
public static function getObjData(_arg1:String):Object{
var _local2:Object;
_local2 = Data[("_" + _arg1)];
return (Method.clone(_local2));
}
public static function getArrData(_arg1:String):Array{
var _local2:Array;
_local2 = Data[("_" + _arg1)];
return (Method.duplicateArr(_local2));
}
}
}//package com.macrojoy.zgd
Section 206
//DocumentClass (com.macrojoy.zgd.DocumentClass)
package com.macrojoy.zgd {
import flash.display.*;
import flash.events.*;
import com.miniclip.gatekeeper.*;
import flash.ui.*;
public class DocumentClass extends Sprite {
private var _myTimer:uint;
public function DocumentClass():void{
if (stage){
loading();
} else {
addEventListener(Event.ADDED_TO_STAGE, loading);
};
}
private function checkDomain(_arg1:Event=null):void{
var _local2:GatekeeperLoader;
_local2 = new GatekeeperLoader(stage);
_local2.addEventListener("valid", handleValidDomain);
_local2.addEventListener("invalid", handleInvalidDomain);
_local2.start();
}
private function init():void{
Method.initOptions();
stage.addEventListener(Event.ENTER_FRAME, enterframe);
UIControl.createUICTN();
Method.createDisplayObj(FPSShow, stage);
Global.soundInfo = new Array();
Method.playSound("Title", 0, int.MAX_VALUE, Global.musicVolume);
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.showDefaultContextMenu = false;
}
private function loading(_arg1:Event=null):void{
removeEventListener(Event.ADDED_TO_STAGE, loading);
loaderInfo.addEventListener(Event.COMPLETE, startLoad);
}
private function loadComplete(_arg1:Event):void{
var _local2:MCLoader;
_local2 = (_arg1.target as MCLoader);
_local2.removeEventListener(Event.COMPLETE, loadComplete);
init();
}
function handleInvalidDomain(_arg1:Event):void{
}
private function startLoad(_arg1:Event=null):void{
Global.stage = stage;
Global.swf = this;
Method.createMask();
Global.mcLoader = new MCLoader(this);
Global.mcLoader.loadItem("resource");
init();
}
private function enterframe(_arg1:Event):void{
var _local2:Array;
var _local3:int;
var _local4:IEnterframeObject;
if (((!((Global.mouseUI == null))) && (!((Global.GIPanel == null))))){
Global.mouseUI.x = Global.GIPanel.mouseX;
Global.mouseUI.y = Global.GIPanel.mouseY;
Mouse.hide();
} else {
Mouse.show();
};
if (Global.scoreTimer > 0){
Global.scoreTimer--;
};
GameDesign.updateBossShow();
_myTimer++;
_local2 = Global.eventArr;
if (_local2 != null){
_local3 = (_local2.length - 1);
while (_local3 >= 0) {
_local4 = _local2[_local3];
_local4.updateEvent();
_local3--;
};
};
if (((!(Global.gamePause)) && ((Global.gameStatus == "playing")))){
if ((_myTimer % 3) == 1){
SceneControl.updateThingsIndex();
};
};
if (Global.channel0 != null){
Global.channel0.position;
};
if (Global.channel1 != null){
Global.channel1.position;
};
if (Global.channel2 != null){
Global.channel2.position;
};
if (Global.channel3 != null){
Global.channel3.position;
};
if (Global.channel4 != null){
Global.channel4.position;
};
if (Global.channel5 != null){
Global.channel5.position;
};
if (Global.channel6 != null){
Global.channel6.position;
};
if (Global.shakeTimer > 0){
Global.swf.x = ((Global.swf.x)==Global.shakeDis) ? 0 : Global.shakeDis;
Global.swf.y = ((Global.swf.y)==Global.shakeDis) ? 0 : Global.shakeDis;
Global.shakeTimer--;
if (Global.shakeTimer == 0){
Global.swf.x = 0;
Global.swf.y = 0;
};
};
if (Global.gamePauseTimer > 2){
Global.gamePauseTimer++;
if (Global.gamePauseTimer >= 7){
Method.gameOn();
Global.gamePauseTimer = 0;
};
};
}
function handleValidDomain(_arg1:Event):void{
startLoad();
}
}
}//package com.macrojoy.zgd
Section 207
//FPSShow (com.macrojoy.zgd.FPSShow)
package com.macrojoy.zgd {
import flash.display.*;
import com.macrojoy.zgd.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
public class FPSShow extends Sprite {
private var count:int;// = 0
private var txt:TextField;
private var _timer:uint;
private var _clew:Clew;
private var _totalCount:uint;
public function FPSShow(){
count = 0;
super();
mouseChildren = false;
mouseEnabled = false;
init();
}
private function init():void{
var _local1:uint;
var _local2:Timer;
var _local3:Timer;
if (Data.GAME_TESTING){
txt = new TextField();
txt.textColor = 0xFFFFFF;
txt.background = true;
txt.backgroundColor = 0;
txt.autoSize = TextFieldAutoSize.LEFT;
addChild(txt);
_local3 = new Timer(1000);
_local3.addEventListener("timer", timerHandler);
_local3.start();
};
_local2 = new Timer(10000);
_local2.addEventListener("timer", timerHandler2);
_local2.start();
addEventListener("enterFrame", countHandler);
}
private function countHandler(_arg1:Event):void{
if (Data.GAME_TESTING){
count++;
};
_totalCount++;
if (((!((_clew == null))) && ((_clew.parent == null)))){
_clew = null;
};
}
private function timerHandler(_arg1:TimerEvent):void{
txt.text = ("FPS:" + count.toString());
count = 0;
}
private function timerHandler2(_arg1:TimerEvent):void{
if (_totalCount <= 250){
switch (stage.quality.toLowerCase()){
case "high":
if (_clew == null){
_clew = new Clew(Data.PHRASE5);
addChild(_clew);
_clew.x = (Data.STAGE_WIDTH - _clew.width);
_clew.y = ((Data.STAGE_HEIGHT - _clew.height) - 20);
};
break;
case "medium":
if (_clew == null){
_clew = new Clew(Data.PHRASE6);
addChild(_clew);
_clew.x = (Data.STAGE_WIDTH - _clew.width);
_clew.y = ((Data.STAGE_HEIGHT - _clew.height) - 20);
};
break;
};
};
_totalCount = 0;
}
}
}//package com.macrojoy.zgd
Section 208
//GameDesign (com.macrojoy.zgd.GameDesign)
package com.macrojoy.zgd {
import flash.display.*;
import flash.geom.*;
import com.macrojoy.zgd.display.*;
import flash.events.*;
import com.macrojoy.zgd.ui.*;
public class GameDesign {
public static function initBonusLevel5():void{
Global.missionData = Data.bonusMission5Str;
Method.initMissionData();
Global.gameTimer = (Data.BONUS_TIME5 * 35);
Global.GIPanel = (UIControl.createPanel("PanelGI") as PanelGI);
Global.GIPanel.init("bonusMission5");
Global.mainBgCTN.x = -480;
Global.hero.x = 600;
Global.hero.y = -92;
}
public static function summon():void{
var _local1:Point;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:uint;
var _local7:uint;
var _local8:uint;
_local1 = Global.roleCTN.globalToLocal(new Point(0, 0));
_local2 = (_local1.x + 50);
if (_local2 <= 50){
_local2 = 50;
};
_local3 = _local1.y;
_local4 = ((_local1.x + Data.STAGE_WIDTH) - 50);
if (_local4 >= (Global.trainLength - 150)){
_local4 = (Global.trainLength - 150);
};
_local5 = _local1.y;
_local6 = (Math.floor((Math.random() * 5)) + 4);
_local7 = (Math.floor((Math.random() * 5)) + 4);
_local8 = 5;
createEnemy(_local6, _local2, _local3, 1, [_local8, _local2, _local3, _local6]);
createEnemy(_local7, _local4, _local5, -1, [_local8, _local4, _local5, _local7]);
Global.enemyNum = (Global.enemyNum + 2);
Global.GIPanel.updateEnemyCount();
}
public static function bonusLevel(_arg1:uint):void{
var _local2:Class;
Method.stopAllSound();
Global.isBonusMission = true;
Global.gameStatus = "playing";
Global.gameCTN = (Method.createDisplayObj(Sprite, Global.swf, 0, 0, 54) as Sprite);
Global.mainBgCTN = (Method.createDisplayObj(Sprite, Global.gameCTN, -1, 100, 375) as Sprite);
Global.belowWheelCTN = (Method.createDisplayObj(Sprite, Global.mainBgCTN) as Sprite);
Global.trainCTN = (Method.createDisplayObj(Sprite, Global.mainBgCTN) as Sprite);
Global.thingsCTN = (Method.createDisplayObj(Sprite, Global.mainBgCTN) as Sprite);
Global.roleCTN = (Method.createDisplayObj(Sprite, Global.mainBgCTN) as Sprite);
_local2 = Method.getClass1("MCHero1");
Global.hero = (Method.createDisplayObj(_local2, Global.mainBgCTN, -1, -100, 50) as BasicHeroMC);
var _local3 = GameDesign;
_local3[("initBonusLevel" + _arg1)]();
Method.setColor(Global.gameCTN, Global.skyOrder);
Global.hero.init();
Global.camp1Arr.push(Global.hero);
Global.upTrainCTN = (Method.createDisplayObj(Sprite, Global.mainBgCTN) as Sprite);
Global.effectCTN = (Method.createDisplayObj(Sprite, Global.mainBgCTN) as Sprite);
Method.playSound("BonusBG", 0, int.MAX_VALUE, Global.musicVolume);
createScene();
UIControl.createPanel("BonusShowPanel");
}
public static function gameOver():void{
var _local1:Array;
var _local2:String;
var _local3:uint;
Method.stopAllSound();
if (Global.gameResult){
if (!Data.GAME_TESTING){
if (Global.currentMission <= Data.MISSION_NUM){
_local1 = Data.getArrData("rankNameArr");
if (Global.hitedNum < _local1.length){
_local2 = _local1[Global.hitedNum];
} else {
_local2 = _local1[(_local1.length - 1)];
};
if (Global.missionRank[(Global.currentMission - 1)] == null){
Global.missionRank[(Global.currentMission - 1)] = _local2;
} else {
_local3 = _local1.indexOf(Global.missionRank[(Global.currentMission - 1)]);
if (Global.hitedNum < _local3){
Global.missionRank[(Global.currentMission - 1)] = _local2;
};
};
};
};
UIControl.createPanel("PanelWin");
Method.playSound(Data.WIN, 0, 1, Global.musicVolume);
} else {
UserControl.stopControl();
if (Global.gameTimer <= 0){
UIControl.createPanel("TimeOverPanel");
} else {
UIControl.createPanel("LosePanel");
};
Method.playSound(Data.LOSE, 0, 1, Global.musicVolume);
};
Global.gameStatus = "over";
if (Data.GAME_TESTING){
Global.stage.removeEventListener(KeyboardEvent.KEY_DOWN, nextMission);
};
}
private static function createEnemys():void{
var _local1:Array;
var _local2:Array;
var _local3:int;
var _local4:int;
_local1 = Global.enemyArr;
for each (_local2 in _local1) {
if (_local2[1] <= 550){
_local3 = _local2[2];
if (_local2[0] >= 5){
_local3 = -550;
};
createEnemy(_local2[3], _local2[1], _local3, 1, _local2);
_local4 = _local1.indexOf(_local2);
_local1.splice(_local4, 1);
};
};
}
public static function setColor(_arg1:uint):void{
Method.setColor(Global.gameCTN, _arg1);
SceneControl.setColor(_arg1);
}
private static function createEnemy(_arg1:uint, _arg2:int, _arg3:int, _arg4:int, _arg5:Array):void{
var _local6:String;
var _local7:Class;
var _local8:BasicEnemyMC;
var _local9:int;
var _local10:MovieClip;
var _local11:MovieClip;
_local6 = "enemys";
if (_arg1 >= 13){
_local6 = "boss";
};
_local7 = Method.getClass1(("MCEnemy" + _arg1.toString()));
_local8 = (Method.createDisplayObj(_local7, Global.roleCTN, -1, _arg2, _arg3) as BasicEnemyMC);
_local8.scaleX = _arg4;
if (_arg5 != null){
_local8.bornInfo = _arg5;
};
if (_arg1 >= 13){
_local8.type = "boss";
_local9 = (Global.bossShowMCArr.length - 1);
while (_local9 >= 0) {
_local11 = (Global.bossShowMCArr[_local9] as MovieClip);
if (_local11["arr"].toString() == _arg5.toString()){
Method.deleteElement(Global.bossShowMCArr, _local11);
_local11.parent.removeChild(_local11);
};
_local9--;
};
};
_local8.init();
Global.camp2Arr.push(_local8);
}
private static function createBossShow():void{
var _local1:uint;
var _local2:int;
var _local3:MovieClip;
var _local4:MovieClip;
_local1 = 130;
Global.bossShowMCArr = new Array();
_local2 = (Global.bossArr.length - 1);
while (_local2 >= 0) {
_local4 = (Method.createDisplayObj(BossShowMC, Global.GIPanel) as MovieClip);
_local3 = (_local4.getChildByName("mc") as MovieClip);
_local3.gotoAndStop((Global.bossArr[_local2][3] - 12));
if ((Global.hero.myX - Global.bossArr[_local2][1]) >= 0){
_local4.x = 0;
_local4.scaleX = (_local3.scaleX = -1);
} else {
_local4.x = Data.STAGE_WIDTH;
_local4.scaleX = (_local3.scaleX = 1);
};
_local4.y = _local1;
_local1 = (_local1 + 50);
_local4["arr"] = Global.bossArr[_local2];
Global.bossShowMCArr.push(_local4);
_local2--;
};
Global.bossArr = null;
}
public static function initBonusLevel4():void{
Global.missionData = Data.bonusMission4Str;
Method.initMissionData();
Global.gameTimer = (Data.BONUS_TIME4 * 35);
Global.GIPanel = (UIControl.createPanel("PanelGI") as PanelGI);
Global.GIPanel.init("bonusMission4");
Global.mainBgCTN.x = -1320;
Global.hero.x = 1636;
Global.hero.y = -237;
}
private static function createMission():void{
Method.playSound(("BG" + Global.skyOrder.toString()), 0, int.MAX_VALUE, Global.musicVolume);
Global.gameCTN = (Method.createDisplayObj(Sprite, Global.swf, 0, 0, 54) as Sprite);
Method.setColor(Global.gameCTN, Global.skyOrder);
Global.mainBgCTN = (Method.createDisplayObj(Sprite, Global.gameCTN, -1, 100, 375) as Sprite);
Global.belowWheelCTN = (Method.createDisplayObj(Sprite, Global.mainBgCTN) as Sprite);
Global.trainCTN = (Method.createDisplayObj(Sprite, Global.mainBgCTN) as Sprite);
Global.thingsCTN = (Method.createDisplayObj(Sprite, Global.mainBgCTN) as Sprite);
Global.roleCTN = (Method.createDisplayObj(Sprite, Global.mainBgCTN) as Sprite);
createHero();
Global.upTrainCTN = (Method.createDisplayObj(Sprite, Global.mainBgCTN) as Sprite);
Global.effectCTN = (Method.createDisplayObj(Sprite, Global.mainBgCTN) as Sprite);
createScene();
createEnemys();
createBossShow();
}
public static function newGame():void{
Method.stopAllSound();
Method.initMissionData();
Global.gameStatus = "playing";
Global.GIPanel = (UIControl.createPanel("PanelGI") as PanelGI);
Global.GIPanel.init("normalMission");
createMission();
UIControl.createPanel("CountDownPanel");
if (Data.GAME_TESTING){
Global.stage.addEventListener(KeyboardEvent.KEY_DOWN, nextMission);
};
}
public static function bonusOver():void{
UIControl.createPanel("BonusOverPanel");
Global.gameStatus = "over";
}
public static function updateEnemys():void{
var _local1:Array;
var _local2:int;
var _local3:Array;
var _local4:Boolean;
var _local5:int;
var _local6:int;
var _local7:Number;
var _local8:int;
_local1 = Global.enemyArr;
_local2 = (_local1.length - 1);
while (_local2 >= 0) {
_local3 = _local1[_local2];
if (Global.hero != null){
_local6 = _local3[2];
switch (uint(_local3[0])){
case 5:
_local5 = 1;
_local6 = -550;
_local4 = Boolean(((((Global.hero.myX - _local3[1]) <= 200)) && (((Global.hero.myX - _local3[1]) >= 160))));
break;
case 6:
_local5 = -1;
_local6 = -550;
_local4 = Boolean(((((_local3[1] - Global.hero.myX) <= 200)) && (((_local3[1] - Global.hero.myX) >= 160))));
break;
case 3:
_local7 = (Global.hero.myX - _local3[1]);
if (_local7 < 0){
_local5 = -1;
} else {
_local5 = 1;
};
_local4 = Boolean((Math.abs(_local7) <= 100));
break;
case 1:
case 4:
_local5 = 1;
_local4 = Boolean(((((Global.hero.myX - _local3[1]) <= 375)) && (((Global.hero.myX - _local3[1]) >= 325))));
break;
case 2:
_local5 = -1;
_local4 = Boolean(((((_local3[1] - Global.hero.myX) <= 375)) && (((_local3[1] - Global.hero.myX) >= 325))));
break;
};
if (_local4){
createEnemy(_local3[3], _local3[1], _local6, _local5, _local3);
_local8 = _local1.indexOf(_local3);
_local1.splice(_local8, 1);
};
};
_local2--;
};
}
public static function createBird():void{
var _local1:Point;
var _local2:int;
var _local3:String;
var _local4:Class;
var _local5:BasicFlyMC;
_local1 = Global.gameCTN.globalToLocal(new Point(0, 100));
_local2 = 1;
_local3 = "enemys";
_local4 = Method.getClass1("MCEnemy12");
_local5 = (Method.createDisplayObj(_local4, Global.gameCTN, -1, _local1.x, _local1.y) as BasicFlyMC);
_local5.scaleX = _local2;
_local5.init();
Global.camp2Arr.push(_local5);
}
private static function createHero():void{
var _local1:Class;
_local1 = Method.getClass1("MCHero1");
Global.hero = (Method.createDisplayObj(_local1, Global.mainBgCTN, -1, -100, 50) as BasicHeroMC);
Global.hero.init();
Global.camp1Arr.push(Global.hero);
}
private static function createScene():void{
SceneControl.newBg();
}
private static function nextMission(_arg1:KeyboardEvent):void{
if (!Global.gamePause){
if (Global.currentMission <= Data.MISSION_NUM){
if (_arg1.keyCode == 39){
clearGame();
if (Global.currentMission < Data.MISSION_NUM){
Global.currentMission++;
} else {
Global.currentMission = 1;
};
newGame();
} else {
if (_arg1.keyCode == 37){
clearGame();
if (Global.currentMission > 1){
Global.currentMission--;
} else {
Global.currentMission = Data.MISSION_NUM;
};
newGame();
};
};
};
if (_arg1.keyCode == 38){
clearGame();
newGame();
};
};
}
public static function updateBossShow():void{
var _local1:uint;
var _local2:int;
var _local3:MovieClip;
var _local4:MovieClip;
var _local5:Point;
if (((!((Global.bossShowMCArr == null))) && ((Global.bossShowMCArr.length > 0)))){
_local1 = 130;
_local2 = (Global.bossShowMCArr.length - 1);
while (_local2 >= 0) {
_local4 = (Global.bossShowMCArr[_local2] as MovieClip);
_local3 = (_local4.getChildByName("mc") as MovieClip);
if (Global.hero != null){
if ((Global.hero.myX - _local4["arr"][1]) >= 0){
_local4.x = 0;
_local4.scaleX = (_local3.scaleX = -1);
} else {
_local4.x = Data.STAGE_WIDTH;
_local4.scaleX = (_local3.scaleX = 1);
};
};
_local4.y = _local1;
_local1 = (_local1 + 50);
_local5 = Global.mainBgCTN.localToGlobal(new Point(_local4["arr"][1], _local4["arr"][2]));
_local4.visible = Boolean((((_local5.x <= 0)) || ((_local5.x >= Data.STAGE_WIDTH))));
_local2--;
};
};
}
public static function initBonusLevel1():void{
Global.missionData = Data.bonusMission1Str;
Method.initMissionData();
Global.gameTimer = (Data.BONUS_TIME1 * 35);
Global.GIPanel = (UIControl.createPanel("PanelGI") as PanelGI);
Global.GIPanel.init("bonusMission1");
Global.mainBgCTN.x = -1220;
Global.hero.x = 1530;
Global.hero.y = -92;
}
public static function initBonusLevel2():void{
Global.missionData = Data.bonusMission2Str;
Method.initMissionData();
Global.gameTimer = (Data.BONUS_TIME2 * 35);
Global.GIPanel = (UIControl.createPanel("PanelGI") as PanelGI);
Global.GIPanel.init("bonusMission2");
Global.mainBgCTN.x = -730;
Global.hero.x = 1050;
Global.hero.y = -92;
}
public static function initBonusLevel3():void{
Global.missionData = Data.bonusMission3Str;
Method.initMissionData();
Global.poleHDis = (Data.POLE_DIS / 2);
Global.gameTimer = (Data.BONUS_TIME3 * 35);
Global.GIPanel = (UIControl.createPanel("PanelGI") as PanelGI);
Global.GIPanel.init("bonusMission3");
Global.mainBgCTN.x = -550;
Global.hero.x = 606;
Global.hero.y = -337;
}
public static function clearGame():void{
var _local1:BasicCreatureMC;
Global.gameStatus = "over";
Global.bossShowMCArr = null;
Global.eventArr = [];
for each (_local1 in Global.camp2Arr) {
_local1.removeSelf();
};
Global.hero.removeSelf();
Global.hero = null;
if (Global.GIPanel != null){
Global.GIPanel.removeSelf();
Global.GIPanel = null;
};
SceneControl.clearScene();
Global.swf.removeChild(Global.gameCTN);
Global.effectCTN = null;
Global.roleCTN = null;
Global.mainBgCTN = null;
Global.gameCTN = null;
UserControl.stopControl();
Global.isBonusMission = false;
}
}
}//package com.macrojoy.zgd
Section 209
//Global (com.macrojoy.zgd.Global)
package com.macrojoy.zgd {
import flash.display.*;
import com.macrojoy.zgd.display.*;
import flash.media.*;
import com.macrojoy.zgd.ui.*;
import com.macrojoy.zgd.scene.*;
import flash.net.*;
public class Global {
public static var myMission2:String;
public static var scoreY:Number;
public static var soundVolume:Number;
public static var myMission5:String;
public static var trainLength:Number;
public static var testBonus:Boolean;
public static var belowWheelCTN:Sprite;
public static var hitedNum:uint;
public static var keyLeftCode:uint;
public static var keyAttackCode:uint;
public static var mainSpeed:Number;
public static var gamePause:Boolean;
public static var keyDownCode:uint;
public static var plantDis:uint;
public static var trainArr:Array;
public static var clickButton:Boolean;
public static var GIPanel:PanelGI;
public static var bossShowMCArr:Array;
public static var killNum:uint;
public static var mcLoader:MCLoader;
public static var missionData:String;
public static var soundInfo:Array;
public static var mainBgCTN:Sprite;
public static var channel10:SoundChannel;
public static var channel11:SoundChannel;
public static var channel12:SoundChannel;
public static var eventArr:Array;
public static var horseNum:uint;
public static var keyUpCode:uint;
public static var camp1Arr:Array;
public static var firing:Boolean;
public static var lockScreen:Boolean;
public static var itemNum:uint;
public static var retryTimes:uint;
public static var swf:DocumentClass;
public static var bossHpMultiple:Number;
public static var dartNum:uint;
public static var gamePauseTimer:uint;
public static var keyRightCode:uint;
public static var gameStatus:String;
public static var bulletPreNum:uint;
public static var channel0:SoundChannel;
public static var channel2:SoundChannel;
public static var channel3:SoundChannel;
public static var channel4:SoundChannel;
public static var channel6:SoundChannel;
public static var channel7:SoundChannel;
public static var channel1:SoundChannel;
public static var thingsCTN:Sprite;
public static var channel5:SoundChannel;
public static var channel8:SoundChannel;
public static var channel9:SoundChannel;
public static var score:uint;
public static var bulletableNum:uint;
public static var musicVolume:Number;
public static var shakeDis:uint;
public static var loadedThings:Array;
public static var skyOrder:uint;
public static var lensDir:int;
public static var upTrainCTN:Sprite;
public static var landformArr:Array;
public static var bossArr:Array;
public static var gameResult:uint;
public static var earthArr:Array;
public static var enemyArr:Array;
public static var difficulty:uint;
public static var localInfo:SharedObject;
public static var foreGroundCTN:ForeGround;
public static var roleCTN:Sprite;
public static var keyJumpCode:uint;
public static var gameCTN:Sprite;
public static var effectCTN:Sprite;
public static var isBonusMission:Boolean;
public static var camp2Arr:Array;
public static var currentMission:uint;
public static var polePDis:uint;
public static var missionRank:Array;
public static var scoreTimer:uint;
public static var thingsArr:Array;
public static var poleHDis:uint;
public static var shakeTimer:uint;
public static var bossNum:uint;
public static var enemyNum:uint;
public static var screenCenter:Sprite;
public static var uiCTN:Sprite;
public static var lensSpeed:Number;
public static var myMission1:String;
public static var myMission3:String;
public static var trainCTN:Sprite;
public static var myMission6:String;
public static var gameTimer:int;
public static var mouseUI:MovieClip;
public static var hero:BasicHeroMC;
public static var myMission4:String;
public static var stage:Stage;
}
}//package com.macrojoy.zgd
Section 210
//IEnterframeObject (com.macrojoy.zgd.IEnterframeObject)
package com.macrojoy.zgd {
public interface IEnterframeObject {
function updateEvent():void;
}
}//package com.macrojoy.zgd
Section 211
//IObject (com.macrojoy.zgd.IObject)
package com.macrojoy.zgd {
public interface IObject {
function removeSelf():void;
}
}//package com.macrojoy.zgd
Section 212
//MCLoader (com.macrojoy.zgd.MCLoader)
package com.macrojoy.zgd {
import flash.display.*;
import com.macrojoy.zgd.display.*;
import flash.events.*;
import flash.net.*;
import com.miniclip.gamemanager.*;
import flash.system.*;
public class MCLoader extends EventDispatcher {
private var _totalResourceNum:uint;
private var _textParent:Sprite;
public var loadersObj:Object;
private var _loadingMC:LoadingMC;
public var isLoading:Boolean;
private var _resourceArr:Array;
private var _currentResourceNum:int;// = -1
public function MCLoader(_arg1:Sprite){
loadersObj = {};
_currentResourceNum = -1;
super();
_resourceArr = new Array();
_textParent = _arg1;
}
private function loadProgress(_arg1:ProgressEvent):void{
var _local2:LoaderInfo;
var _local3:Number;
if (_loadingMC != null){
_local2 = (_arg1.target as LoaderInfo);
_local3 = (Math.floor(((_local2.bytesLoaded / _local2.bytesTotal) * 10000)) / 100);
_loadingMC.maskMC.scaleX = (_local3 / 100);
};
}
public function checkLoaded(_arg1:String):Boolean{
if (_resourceArr.indexOf(_arg1) != -1){
return (true);
};
return (false);
}
private function completeHandler(_arg1:Event):void{
loadersObj[(_resourceArr[_currentResourceNum] + "Loader")].contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler);
loadResource();
}
public function loadItem(_arg1):void{
if ((_arg1 is String)){
_resourceArr.push(_arg1);
} else {
if ((_arg1 is Array)){
_resourceArr = _resourceArr.concat(_arg1);
};
};
_totalResourceNum = _resourceArr.length;
if (!isLoading){
isLoading = true;
loadResource();
};
}
private function loadResource():void{
var _local1:String;
var _local2:LoaderContext;
var _local3:URLRequest;
_currentResourceNum++;
if (_currentResourceNum < _totalResourceNum){
_local1 = (("resource/" + _resourceArr[_currentResourceNum]) + ".swf");
loadersObj[(_resourceArr[_currentResourceNum] + "Loader")] = new Loader();
loadersObj[(_resourceArr[_currentResourceNum] + "Loader")].contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loadersObj[(_resourceArr[_currentResourceNum] + "Loader")].contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
if (Security.sandboxType != Security.REMOTE){
_local2 = new LoaderContext(false, ApplicationDomain.currentDomain, null);
} else {
_local2 = new LoaderContext(false, ApplicationDomain.currentDomain, SecurityDomain.currentDomain);
};
_local3 = new URLRequest(absoluteURI(_local1));
loadersObj[(_resourceArr[_currentResourceNum] + "Loader")].load(_local3, _local2);
} else {
dispatchEvent(new Event(Event.COMPLETE));
removeLoadingMC();
isLoading = false;
_currentResourceNum--;
};
}
public function showLoadingMC():void{
if (_loadingMC == null){
_loadingMC = new LoadingMC();
_textParent.addChild(_loadingMC);
_loadingMC.maskMC.scaleX = 0;
};
}
public function removeLoadingMC():void{
if (_loadingMC != null){
_textParent.removeChild(_loadingMC);
_loadingMC = null;
};
}
}
}//package com.macrojoy.zgd
Section 213
//Method (com.macrojoy.zgd.Method)
package com.macrojoy.zgd {
import flash.display.*;
import flash.geom.*;
import com.macrojoy.zgd.display.*;
import flash.events.*;
import com.miniclip.highscores.*;
import flash.utils.*;
import flash.media.*;
import com.macrojoy.zgd.ui.*;
import flash.net.*;
import flash.filters.*;
public class Method {
public static function addScore(_arg1:uint):void{
Global.score = (Global.score + _arg1);
Global.GIPanel.updateScoreUI();
}
public static function addEnterframeObj(_arg1:IEnterframeObject):void{
if (Global.eventArr == null){
Global.eventArr = new Array();
};
if (Global.eventArr.indexOf(_arg1) == -1){
Global.eventArr.push(_arg1);
};
}
public static function getClass(_arg1:String, _arg2:String):Class{
var _local3:Loader;
var _local4:Class;
_local3 = Global.mcLoader.loadersObj[(_arg1 + "Loader")];
_local4 = (_local3.contentLoaderInfo.applicationDomain.getDefinition(_arg2) as Class);
return (_local4);
}
public static function getColorStr(_arg1:Number, _arg2:Number):String{
var _local3:int;
var _local4:BitmapData;
var _local5:uint;
var _local6:String;
var _local7:Array;
var _local8:int;
_arg1 = Math.round(_arg1);
_arg2 = Math.round(_arg2);
_local3 = Math.floor((_arg1 / 2880));
_local4 = Global.landformArr[_local3];
if (_local4 == null){
return ("0");
};
_arg1 = (_arg1 % 2880);
_arg2 = (_arg2 + _local4.height);
_local5 = _local4.getPixel32(_arg1, _arg2);
_local6 = _local5.toString(16);
_local7 = Data.getArrData("colorArr");
_local8 = _local7.indexOf(_local6);
if (_local8 == -1){
_local6 = "0";
};
return (_local6);
}
public static function myUnEscape(_arg1:String):String{
var _local2:Array;
var _local3:uint;
_local2 = Data.getArrData("noEscapeArr");
_local3 = 0;
while (_local3 < _local2.length) {
while (_arg1.indexOf((("(" + _local3.toString()) + ")")) != -1) {
_arg1 = _arg1.replace((("(" + _local3.toString()) + ")"), _local2[_local3]);
};
_local3++;
};
return (_arg1);
}
public static function setSoundVolume(_arg1:Number):void{
var _local2:uint;
var _local3:SoundChannel;
var _local4:SoundTransform;
Global.soundVolume = _arg1;
_local2 = 2;
while (_local2 <= 12) {
_local3 = Global[("channel" + _local2)];
if (_local3 != null){
_local4 = _local3.soundTransform;
_local4.volume = Global.soundVolume;
_local3.soundTransform = _local4;
};
if (Global.soundInfo != null){
if (Global.soundInfo[_local2] != null){
Global.soundInfo[_local2][2] = Global.soundVolume;
};
};
_local2++;
};
}
public static function createMask():void{
var _local1:Shape;
_local1 = new Shape();
_local1.graphics.beginFill(0);
_local1.graphics.drawRect(0, 0, Data.STAGE_WIDTH, Data.STAGE_HEIGHT);
_local1.graphics.endFill();
Global.swf.mask = _local1;
Global.swf.addChild(_local1);
}
public static function createPresent(_arg1:int, _arg2:int, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Boolean=false):BasicPresentMC{
var _local7:String;
var _local8:BasicPresentMC;
var _local9:Class;
if (Math.random() < _arg3){
_local7 = "Supply";
} else {
if (Math.random() < _arg4){
_local7 = "Weapon";
} else {
if (Math.random() < _arg5){
_local7 = "Present";
};
};
};
if (_local7 != null){
createEffect("POut", _arg1, _arg2);
_local9 = getClass1(_local7);
_local8 = (Method.createDisplayObj(_local9, Global.roleCTN, -1, _arg1, _arg2) as BasicPresentMC);
if (_arg6){
_local8.speedX = ((Math.random() * 15) * Math.pow(-1, Math.round(Math.random())));
_local8.speedY = ((-(Math.random()) * 8) - 15);
_local8.status = "jump";
} else {
_local8.status = "stand";
};
_local8.init();
_local8.alpha = 0.1;
_local8.name = _local7;
_local8.gotoAndStop((Math.floor((Math.random() * _local8.totalFrames)) + 1));
};
return (_local8);
}
public static function myEscape(_arg1:String):String{
var _local2:String;
var _local3:uint;
var _local4:String;
var _local5:Array;
var _local6:int;
_local2 = new String();
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = _arg1.charAt(_local3);
_local5 = Data.getArrData("noEscapeArr");
_local6 = _local5.indexOf(_local4);
if (_local6 != -1){
_local2 = (_local2 + (("(" + _local6.toString()) + ")"));
} else {
_local2 = (_local2 + _local4);
};
_local3++;
};
return (_local2);
}
public static function shineScreen():void{
createDisplayObj(NoisePanel, Global.swf);
}
public static function stopAllSound():void{
var _local1:uint;
SoundMixer.stopAll();
Global.soundInfo = new Array();
_local1 = 0;
while (_local1 <= 12) {
Global[("channel" + _local1)] = null;
_local1++;
};
}
public static function resolveMissionStr(_arg1:String):Array{
var _local2:int;
var _local3:int;
var _local4:String;
var _local5:String;
var _local6:Array;
var _local7:String;
var _local8:Array;
var _local9:Array;
var _local10:String;
var _local11:String;
var _local12:uint;
var _local13:String;
var _local14:String;
var _local15:Array;
var _local16:Array;
var _local17:String;
var _local18:Array;
var _local19:String;
var _local20:Array;
var _local21:String;
var _local22:Array;
var _local23:String;
var _local24:Array;
var _local25:String;
var _local26:Array;
var _local27:String;
var _local28:Array;
var _local29:Array;
var _local30:Array;
if (_arg1 == null){
return (null);
};
_local2 = _arg1.indexOf("<", 0);
if (_local2 == -1){
return (null);
};
_local3 = _arg1.lastIndexOf("><VERSION");
_local4 = _arg1.substring(_local2, (_local3 + 1));
_arg1 = _arg1.replace(_local4, "");
_local4 = _local4.replace("<AUTHOR:", "");
_local4 = _local4.replace(">", "");
_local2 = _arg1.lastIndexOf("<VERSION");
_local3 = _arg1.lastIndexOf("><DATA");
_local5 = _arg1.substring(_local2, (_local3 + 1));
_arg1 = _arg1.replace(_local5, "");
_local5 = _local5.replace("<VERSION:", "");
_local5 = _local5.replace(">", "");
_local6 = _local5.split(".");
_local7 = ((_local6[0] + ".") + _local6[1]);
_arg1 = _arg1.replace("<DATA:", "");
_arg1 = _arg1.replace(">", "");
_arg1 = myUnEscape(_arg1);
_arg1 = unescape(_arg1);
_local8 = new Array();
_local9 = _arg1.split(";");
if (_local9.length != 6){
return (null);
};
_local10 = _local9[5];
_local11 = _local9[4];
_local12 = (((_arg1.length - _local11.length) - _local10.length) - 1);
_arg1 = _arg1.slice(0, _local12);
_local13 = getCheckCode(_arg1, _local4, _local7);
if (_local11 != _local13){
return (null);
};
_local14 = _local9[0];
_local15 = _local14.split(",");
arrToNumber(_local15);
if (_local15.length != 5){
return (null);
};
_local8.push(_local15);
_local16 = new Array();
_local17 = _local9[1];
_local18 = _local17.split("_");
if (_local18.length < 2){
return (null);
};
for each (_local19 in _local18) {
_local28 = _local19.split(",");
arrToNumber(_local28);
if (_local28.length == 3){
_local16.push(_local28);
};
};
_local8.push(_local16);
_local20 = new Array();
_local21 = _local9[2];
_local22 = _local21.split("_");
for each (_local23 in _local22) {
_local29 = _local23.split(",");
arrToNumber(_local29);
if (_local29.length == 4){
_local20.push(_local29);
};
};
_local8.push(_local20);
_local24 = new Array();
_local25 = _local9[3];
_local26 = _local25.split("_");
for each (_local27 in _local26) {
_local30 = _local27.split(",");
arrToNumber(_local30, 0);
if (_local30.length == 4){
_local24.push(_local30);
};
};
_local8.push(_local24);
_local8.push(_local4);
_local8.push(_local5);
_local8.push(_local10);
return (_local8);
}
public static function showScore(_arg1:Number, _arg2:Number, _arg3:uint):void{
var _local4:String;
var _local5:uint;
var _local6:Class;
var _local7:MovieClip;
var _local8:Point;
var _local9:uint;
var _local10:uint;
var _local11:MovieClip;
_local4 = _arg3.toString();
_local5 = _local4.length;
_local6 = getClass1("CostUI");
_local7 = (new (_local6) as MovieClip);
Global.effectCTN.addChild(_local7);
_local7.x = ((_arg1 - 35) - (7 * (5 - _local5)));
if (Global.scoreTimer > 0){
_local7.y = (Global.scoreY - 25);
} else {
_local7.y = _arg2;
};
_local8 = Global.effectCTN.localToGlobal(new Point(0, _local7.y));
if (_local8.y < 50){
_local7.y = _arg2;
};
Global.scoreY = _local7.y;
Global.scoreTimer = 65;
_local9 = 1;
while (_local9 <= 5) {
_local10 = 1;
if ((_local5 - _local9) >= 0){
_local10 = (uint(_local4.charAt((_local5 - _local9))) + 1);
};
_local11 = (_local7.getChildByName(("num" + _local9)) as MovieClip);
_local11.gotoAndStop(_local10);
if (_local9 > _local5){
_local11.visible = false;
};
_local9++;
};
}
public static function duplicateArr(_arg1:Array):Array{
var _local2:Array;
var _local3:uint;
_local2 = [];
_local3 = 0;
while (_local3 < _arg1.length) {
if ((_arg1[_local3] is Array)){
_local2[_local3] = duplicateArr(_arg1[_local3]);
} else {
_local2[_local3] = _arg1[_local3];
};
_local3++;
};
return (_local2);
}
public static function deleteElement(_arg1:Array, _arg2:Object):void{
var _local3:int;
_local3 = _arg1.indexOf(_arg2);
if (_local3 != -1){
_arg1.splice(_local3, 1);
};
}
public static function deleteMask():void{
if (Global.swf.mask != null){
Global.swf.removeChild(Global.swf.mask);
Global.swf.mask = null;
};
}
public static function submitScore(_arg1:Stage, _arg2:int):HighscoresLoader{
var _local3:HighscoresLoader;
_local3 = HighscoresLoader.start(_arg1, _arg2);
return (_local3);
}
public static function initOptions():void{
var _local1:SharedObject;
var _local2:uint;
Global.localInfo = SharedObject.getLocal(("MACROJOY_RAIL_ROAD_RAMPAGE_" + Data.VERSION));
_local1 = Global.localInfo;
if (_local1.data.quality == undefined){
_local1.data.quality = Data.QUALITY;
};
Global.stage.quality = _local1.data.quality;
if (_local1.data.SoundVolume == undefined){
_local1.data.SoundVolume = Data.SOUND;
};
setSoundVolume(_local1.data.SoundVolume);
if (_local1.data.MusicVolume == undefined){
_local1.data.MusicVolume = Data.MUSIC;
};
setMusicVolume(_local1.data.MusicVolume);
if (_local1.data.keyCode == undefined){
_local1.data.keyCode = Data.getObjData("keyCode");
};
Global.keyLeftCode = _local1.data.keyCode.left;
Global.keyRightCode = _local1.data.keyCode.right;
Global.keyUpCode = _local1.data.keyCode.up;
Global.keyDownCode = _local1.data.keyCode.down;
Global.keyAttackCode = _local1.data.keyCode.attack;
Global.keyJumpCode = _local1.data.keyCode.jump;
if (_local1.data.missionRank == undefined){
_local1.data.missionRank = new Array();
};
Global.missionRank = _local1.data.missionRank;
_local2 = 1;
while (_local2 <= 6) {
if (_local1.data[("myMission" + _local2)] != undefined){
Global[("myMission" + _local2)] = _local1.data[("myMission" + _local2)];
};
_local2++;
};
}
public static function getIndex(_arg1, _arg2:Array, _arg3:uint):int{
var _local4:uint;
_local4 = 0;
while (_local4 < _arg2.length) {
if (_arg2[_local4][_arg3] == _arg1){
return (_local4);
};
_local4++;
};
return (-1);
}
public static function clone(_arg1:Object):Object{
var _local2:Object;
var _local3:String;
_local2 = new Object();
for (_local3 in _arg1) {
_local2[_local3] = _arg1[_local3];
};
return (_local2);
}
public static function grayDisplay(_arg1:DisplayObject):void{
_arg1.filters = [new ColorMatrixFilter(Data.getArrData("grayMatrixArr"))];
}
public static function saveMissionData(_arg1:String, _arg2:uint):void{
Global[("myMission" + _arg2)] = _arg1;
Global.localInfo.data[("myMission" + _arg2)] = Global[("myMission" + _arg2)];
}
public static function setColor(_arg1:DisplayObject, _arg2:uint):void{
if (_arg1 != null){
_arg1.transform.colorTransform = getTransform(_arg2);
};
}
public static function setVolume(_arg1:Number, _arg2:String):void{
var _local3:SharedObject;
_local3 = Global.localInfo;
_local3.data[(_arg2 + "Volume")] = _arg1;
var _local4 = Method;
_local4[(("set" + _arg2) + "Volume")](_arg1);
}
public static function gamePause():void{
var _local1:MovieClip;
var _local2:uint;
var _local3:SoundChannel;
var _local4:SoundTransform;
if (Global.mouseUI != null){
Global.mouseUI.parent.removeChild(Global.mouseUI);
Global.mouseUI = null;
};
Global.gamePause = true;
_local2 = 0;
while (_local2 < Global.belowWheelCTN.numChildren) {
_local1 = (Global.belowWheelCTN.getChildAt(_local2) as MovieClip);
if (_local1.name == "wheel"){
_local1.stop();
};
_local2++;
};
_local2 = 0;
while (_local2 < Global.upTrainCTN.numChildren) {
_local1 = (Global.upTrainCTN.getChildAt(_local2) as MovieClip);
if (_local1.name == "wheel"){
_local1.stop();
};
_local2++;
};
_local2 = 0;
while (_local2 < Global.thingsCTN.numChildren) {
_local1 = (Global.thingsCTN.getChildAt(_local2) as MovieClip);
if (_local1 != null){
if (_local1.name == "fire"){
_local1.stop();
};
};
_local2++;
};
if (Global.gamePauseTimer == 0){
_local2 = 0;
while (_local2 <= 12) {
_local3 = Global[("channel" + _local2)];
if (_local3 != null){
Global.soundInfo[_local2][1] = _local3.position;
_local4 = _local3.soundTransform;
Global.soundInfo[_local2][2] = _local4.volume;
_local3.stop();
};
_local2++;
};
};
}
public static function arrToNumber(_arg1:Array, _arg2:int=-1):void{
var _local3:uint;
_local3 = 0;
while (_local3 < _arg1.length) {
if (_local3 != _arg2){
_arg1[_local3] = Number(_arg1[_local3]);
};
_local3++;
};
}
public static function initMissionData():void{
var _local1:String;
var _local2:Array;
var _local3:Array;
var _local4:uint;
if (Global.currentMission <= 6){
Global.difficulty = 1;
} else {
if (Global.currentMission <= 12){
Global.difficulty = 2;
} else {
Global.difficulty = 3;
};
};
Global.channel0 = null;
Global.channel1 = null;
Global.channel2 = null;
Global.channel3 = null;
Global.channel4 = null;
Global.channel5 = null;
Global.channel6 = null;
Global.channel7 = null;
Global.channel8 = null;
Global.lensSpeed = Data.LENS_SPEED;
Global.gamePause = false;
Global.lensDir = -1;
Global.mainSpeed = 0;
Global.loadedThings = new Array();
Global.earthArr = new Array();
Global.camp1Arr = new Array();
Global.camp2Arr = new Array();
Global.bulletableNum = 6;
Global.bulletPreNum = (Data.BULLET_NUM - 6);
Global.horseNum = 0;
Global.dartNum = 0;
Global.hitedNum = Global.retryTimes;
if (((!(Global.isBonusMission)) && ((Global.currentMission <= Data.MISSION_NUM)))){
Global.missionData = Data[(("mission" + Global.currentMission) + "Str")];
};
_local1 = Global.missionData;
_local2 = resolveMissionStr(_local1);
_local3 = _local2[0];
if (Global.isBonusMission){
Global.skyOrder = Math.floor(((Math.random() * 3) + 1));
} else {
Global.skyOrder = _local3[0];
};
Global.plantDis = _local3[1];
Global.polePDis = _local3[2];
Global.poleHDis = _local3[3];
Global.gameTimer = ((_local3[4] * 60) * 35);
Global.trainArr = _local2[1];
Global.enemyArr = _local2[2];
Global.enemyNum = Global.enemyArr.length;
Global.bossNum = 0;
Global.bossArr = new Array();
_local4 = 0;
while (_local4 < Global.enemyArr.length) {
if (Global.enemyArr[_local4][3] >= 13){
Global.bossNum++;
Global.bossArr.push(Global.enemyArr[_local4]);
};
_local4++;
};
Global.bossHpMultiple = Data[("BOSS_HP_MULTIPLE_" + Global.bossNum)];
Global.killNum = 0;
Global.landformArr = new Array();
Global.thingsArr = new Array();
Global.thingsArr = _local2[3];
}
public static function soundComplete(_arg1:Event):void{
var _local2:SoundChannel;
var _local3:uint;
var _local4:SoundChannel;
var _local5:Array;
_local2 = (_arg1.target as SoundChannel);
if (_local2 != null){
_local3 = 0;
while (_local3 <= 12) {
_local4 = Global[("channel" + _local3)];
if (_local4 != null){
if (_local4 == _local2){
if (Global.soundInfo != null){
_local5 = Global.soundInfo[_local3];
var _local6 = _local5;
var _local7 = 3;
var _local8 = (_local6[_local7] - 1);
_local6[_local7] = _local8;
if (_local5[3] > 0){
playSound(_local5[0], _local3, _local5[3], _local5[2], 0);
} else {
_local5[0] = null;
Global[("channel" + _local3)] = null;
};
break;
};
};
};
_local3++;
};
};
}
public static function adjustY(_arg1:BasicMoveableObjectMC):void{
var _local2:uint;
var _local3:int;
var _local4:int;
var _local5:String;
_local2 = 0;
_local3 = Math.round(_arg1.myX);
_local4 = Math.round(_arg1.myY);
_local5 = Method.getColorStr(_local3, _local4);
while (((((!((_local5 == "ffffcc00"))) && (!((_local5 == "ffcc33cf"))))) && (!((_local5 == "ff33cc00"))))) {
_arg1.myY++;
_local4++;
_local5 = Method.getColorStr(_local3, _local4);
_local2++;
if (_local2 >= 5){
break;
};
};
_local2 = 0;
_local5 = Method.getColorStr(_local3, (_local4 - 1));
while ((((((_local5 == "ffffcc00")) || ((_local5 == "ffcc33cf")))) || ((_local5 == "ff33cc00")))) {
_arg1.myY--;
_local4--;
_local5 = Method.getColorStr(_local3, (_local4 - 1));
_local2++;
if (_local2 >= 5){
break;
};
};
}
public static function reduceEnemyNum(_arg1:Boolean=false):void{
if (Global.gameStatus == "playing"){
Global.enemyNum--;
if (_arg1){
Global.bossNum--;
};
Global.killNum++;
Global.GIPanel.updateEnemyCount();
if (Global.bossNum == 0){
Global.gameResult = 1;
GameDesign.gameOver();
};
};
}
public static function setKey(_arg1:uint, _arg2:String):void{
var _local3:SharedObject;
_local3 = Global.localInfo;
_local3.data.keyCode[_arg2.toLowerCase()] = _arg1;
Global[(("key" + _arg2) + "Code")] = _arg1;
}
public static function showNumber(_arg1:Sprite, _arg2:uint, _arg3:Boolean=true):void{
var _local4:String;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:MovieClip;
_local4 = _arg2.toString();
_local5 = _local4.length;
if (_local5 > _arg1.numChildren){
_local5 = _arg1.numChildren;
_local4 = "";
_local7 = 0;
while (_local7 < _local5) {
_local4 = (_local4 + "9");
_local7++;
};
};
_local6 = 1;
while (_local6 <= _arg1.numChildren) {
_local8 = 1;
if ((_local5 - _local6) >= 0){
_local8 = (uint(_local4.charAt((_local5 - _local6))) + 1);
};
_local9 = (_arg1.getChildByName(("num" + _local6)) as MovieClip);
_local9.gotoAndStop(_local8);
_local9.visible = true;
if (_local6 > _local5){
if (_arg3){
_local9.visible = false;
};
_local9.gotoAndStop(1);
};
_local6++;
};
}
public static function getCheckCode(_arg1:String, _arg2:String, _arg3:String):String{
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:uint;
_arg2 = escape(_arg2);
_arg2 = myEscape(_arg2);
_arg1 = escape(_arg1);
_arg1 = myEscape(_arg1);
_local4 = 1;
_local5 = 1;
_local6 = 1;
while (_local8 < _arg2.length) {
_local7 = uint(_arg2.charAt(_local8));
if (_local7 != 0){
_local4 = (_local4 + (_local7 * (_local8 + 1)));
};
_local8++;
};
_local8 = 0;
while (_local8 < _arg1.length) {
_local7 = uint(_arg1.charAt(_local8));
if (_local7 != 0){
_local5 = (_local5 + (_local7 * (_local8 + 1)));
};
_local8++;
};
_local8 = 0;
while (_local8 < _arg3.length) {
_local7 = uint(_arg3.charAt(_local8));
if (_local7 != 0){
_local6 = (_local6 + (_local7 * (_local8 + 1)));
};
_local8++;
};
_local9 = ((_local4 + _local5) + _local6);
return (_local9.toString());
}
public static function getClass1(_arg1:String, _arg2:String="display"):Class{
var _local3:Class;
_local3 = (getDefinitionByName(((("com.macrojoy.zgd." + _arg2) + ".") + _arg1)) as Class);
return (_local3);
}
public static function createDisplayObj(_arg1:Class, _arg2:DisplayObjectContainer, _arg3:int=-1, _arg4:Number=0, _arg5:Number=0):DisplayObject{
var _local6:DisplayObject;
_local6 = (new (_arg1) as DisplayObject);
if (_arg3 < 0){
_arg2.addChild(_local6);
} else {
_arg2.addChildAt(_local6, _arg3);
};
_local6.x = _arg4;
_local6.y = _arg5;
return (_local6);
}
public static function controlMC(_arg1:Sprite, _arg2:String):void{
var _local3:uint;
var _local4:MovieClip;
_local3 = 0;
while (_local3 < _arg1.numChildren) {
_local4 = (_arg1.getChildAt(_local3) as MovieClip);
if (_local4 != null){
var _local5 = _local4;
_local5[_arg2]();
};
_local3++;
};
}
public static function createEffect(_arg1:String, _arg2:int, _arg3:int, _arg4:int=1, _arg5:Sprite=null, _arg6:int=0):void{
var _local7:Class;
var _local8:DisplayObject;
if (_arg5 == null){
_arg5 = Global.effectCTN;
};
_local7 = Method.getClass1(_arg1);
_local8 = Method.createDisplayObj(_local7, _arg5, -1, _arg2, _arg3);
_local8.scaleX = _arg4;
_local8.rotation = (_arg6 * _arg4);
}
public static function setMusicVolume(_arg1:Number):void{
var _local2:SoundChannel;
var _local3:SoundTransform;
Global.musicVolume = _arg1;
_local2 = Global.channel0;
if (_local2 != null){
_local3 = _local2.soundTransform;
_local3.volume = Global.musicVolume;
_local2.soundTransform = _local3;
};
if (Global.soundInfo != null){
if (Global.soundInfo[0] != null){
Global.soundInfo[0][2] = Global.musicVolume;
};
};
}
public static function getTransform(_arg1:uint):ColorTransform{
var _local2:ColorTransform;
var _local3:String;
_local2 = new ColorTransform();
_local3 = Global.stage.quality.toLowerCase();
if ((((_local3 == "low")) || ((_local3 == "medium")))){
return (_local2);
};
switch (_arg1){
case 2:
_local2.redOffset = 50;
break;
case 3:
_local2.blueOffset = 50;
break;
};
return (_local2);
}
public static function colorDisplay(_arg1:DisplayObject):void{
_arg1.filters = null;
}
public static function gameOn():void{
var _local1:MovieClip;
var _local2:uint;
var _local3:SoundChannel;
var _local4:Array;
if ((((Global.mouseUI == null)) && (!((Global.GIPanel == null))))){
Global.mouseUI = (Method.createDisplayObj(MouseUI, Global.GIPanel, -1, Global.GIPanel.mouseX, Global.GIPanel.mouseY) as MovieClip);
Global.mouseUI.gotoAndStop("aim");
Global.mouseUI.mouseChildren = false;
Global.mouseUI.mouseEnabled = false;
};
Global.gamePause = false;
_local2 = 0;
while (_local2 < Global.belowWheelCTN.numChildren) {
_local1 = (Global.belowWheelCTN.getChildAt(_local2) as MovieClip);
if (_local1.name == "wheel"){
_local1.play();
};
_local2++;
};
_local2 = 0;
while (_local2 < Global.upTrainCTN.numChildren) {
_local1 = (Global.upTrainCTN.getChildAt(_local2) as MovieClip);
if (_local1.name == "wheel"){
_local1.play();
};
_local2++;
};
_local2 = 0;
while (_local2 < Global.thingsCTN.numChildren) {
_local1 = (Global.thingsCTN.getChildAt(_local2) as MovieClip);
if (_local1 != null){
if (_local1.name == "fire"){
_local1.play();
};
};
_local2++;
};
if (Global.gamePauseTimer == 0){
_local2 = 0;
while (_local2 <= 12) {
_local3 = Global[("channel" + _local2)];
if (_local3 != null){
_local4 = Global.soundInfo[_local2];
playSound(_local4[0], _local2, _local4[3], _local4[2], _local4[1]);
};
_local2++;
};
};
}
public static function getStandY(_arg1:int, _arg2:int):int{
var _local3:uint;
var _local4:String;
var _local5:Point;
var _local6:uint;
var _local7:BasicThingMC;
_local3 = 1;
_local4 = getColorStr(_arg1, _arg2);
while ((_local3 * 10) < Data.STAGE_HEIGHT) {
if ((((((_local4 == "ffffcc00")) || ((_local4 == "ffcc33cf")))) || ((_local4 == "ff33cc00")))){
break;
};
_local5 = Global.roleCTN.localToGlobal(new Point(_arg1, _arg2));
_local6 = 0;
while (_local6 < Global.thingsCTN.numChildren) {
_local7 = (Global.thingsCTN.getChildAt(_local6) as BasicThingMC);
if (_local7 != null){
if (_local7.hit.hitTestPoint(_local5.x, _local5.y)){
_arg2 = (_local7.y - _local7.hit.height);
return (_arg2);
};
};
_local6++;
};
_local3++;
_arg2 = (_arg2 + 10);
_local4 = getColorStr(_arg1, _arg2);
};
return (_arg2);
}
public static function playSound(_arg1:String, _arg2:uint, _arg3:uint, _arg4:Number, _arg5:Number=0):void{
var _local6:Class;
var _local7:Sound;
var _local8:SoundChannel;
var _local9:SoundTransform;
if (Global[("channel" + _arg2)] != null){
Global[("channel" + _arg2)].stop();
Global[("channel" + _arg2)] = null;
if (Global.soundInfo != null){
Global.soundInfo[_arg2] = [null, 0, _arg4, _arg3];
};
};
if (_arg1 == null){
return;
};
_local6 = (getDefinitionByName(_arg1) as Class);
_local7 = (new (_local6) as Sound);
_arg5 = ((_arg5)>=_local7.length) ? 0 : _arg5;
Global[("channel" + _arg2)] = _local7.play(_arg5, 1);
_local8 = Global[("channel" + _arg2)];
_local8.addEventListener(Event.SOUND_COMPLETE, soundComplete);
_local9 = _local8.soundTransform;
_local9.volume = _arg4;
_local8.soundTransform = _local9;
if (Global.soundInfo != null){
Global.soundInfo[_arg2] = [_arg1, _arg5, _arg4, _arg3];
};
}
public static function whiteScreen():void{
var _local1:Class;
_local1 = Method.getClass1("WhiteMC");
createDisplayObj(_local1, Global.swf);
}
public static function setQuality(_arg1:String):void{
var _local2:SharedObject;
_local2 = Global.localInfo;
_local2.data.quality = _arg1;
Global.stage.quality = _arg1;
if (Global.gameStatus == "playing"){
GameDesign.setColor(Global.skyOrder);
if (_arg1 == "low"){
SceneControl.removeBg();
} else {
SceneControl.loadBg();
};
};
}
public static function removeEnterframeObj(_arg1:IEnterframeObject):void{
var _local2:int;
if (Global.eventArr != null){
_local2 = Global.eventArr.indexOf(_arg1);
if (_local2 != -1){
Global.eventArr.splice(_local2, 1);
};
};
}
getQualifiedClassName(MCHero1);
getQualifiedClassName(BasicNPCMC);
getQualifiedClassName(MCEnemy1);
getQualifiedClassName(MCEnemy2);
getQualifiedClassName(MCEnemy3);
getQualifiedClassName(MCEnemy4);
getQualifiedClassName(MCEnemy5);
getQualifiedClassName(MCEnemy6);
getQualifiedClassName(MCEnemy7);
getQualifiedClassName(MCEnemy8);
getQualifiedClassName(MCEnemy9);
getQualifiedClassName(MCEnemy10);
getQualifiedClassName(MCEnemy11);
getQualifiedClassName(MCEnemy12);
getQualifiedClassName(MCEnemy13);
getQualifiedClassName(MCEnemy14);
getQualifiedClassName(MCEnemy15);
getQualifiedClassName(MCEnemy16);
getQualifiedClassName(MCEnemy17);
getQualifiedClassName(MCEnemy18);
getQualifiedClassName(MCEnemy19);
getQualifiedClassName(Carriage1);
getQualifiedClassName(Carriage2);
getQualifiedClassName(Carriage3);
getQualifiedClassName(Carriage4);
getQualifiedClassName(Carriage5);
getQualifiedClassName(Carriage6);
getQualifiedClassName(Carriage7);
getQualifiedClassName(Carriage8);
getQualifiedClassName(Carriage9);
getQualifiedClassName(Carriage10);
getQualifiedClassName(Carriage11);
getQualifiedClassName(Carriage12);
getQualifiedClassName(Carriage13);
getQualifiedClassName(Carriage14);
getQualifiedClassName(Carriage15);
getQualifiedClassName(Bag);
getQualifiedClassName(CaskDownMC);
getQualifiedClassName(Cask);
getQualifiedClassName(CaskUpMC);
getQualifiedClassName(ChestDownMC);
getQualifiedClassName(Chest);
getQualifiedClassName(ChestUpMC);
getQualifiedClassName(Earth);
getQualifiedClassName(Fire1);
getQualifiedClassName(Fire2);
getQualifiedClassName(Fire3);
getQualifiedClassName(GFire1);
getQualifiedClassName(GFire2);
getQualifiedClassName(GFire3);
getQualifiedClassName(Grass1);
getQualifiedClassName(Grass2);
getQualifiedClassName(Grass3);
getQualifiedClassName(Hill);
getQualifiedClassName(Hill_Edit);
getQualifiedClassName(Ladder1);
getQualifiedClassName(Ladder2);
getQualifiedClassName(Light);
getQualifiedClassName(Plant);
getQualifiedClassName(PoleHit0);
getQualifiedClassName(PoleHit1);
getQualifiedClassName(PoleHit2);
getQualifiedClassName(PolePresent);
getQualifiedClassName(Rope14);
getQualifiedClassName(Rope15);
getQualifiedClassName(Side7);
getQualifiedClassName(Side10);
getQualifiedClassName(Side11);
getQualifiedClassName(Sky1);
getQualifiedClassName(Sky2);
getQualifiedClassName(Sky3);
getQualifiedClassName(Wheel1);
getQualifiedClassName(Wheel2);
getQualifiedClassName(Wheel3);
getQualifiedClassName(Window2);
getQualifiedClassName(Window11);
getQualifiedClassName(Window12);
getQualifiedClassName(Arrowhead);
getQualifiedClassName(BossHpMC);
getQualifiedClassName(CostUI);
getQualifiedClassName(Carriage1MC);
getQualifiedClassName(Carriage2MC);
getQualifiedClassName(Carriage3MC);
getQualifiedClassName(Carriage4MC);
getQualifiedClassName(Carriage5MC);
getQualifiedClassName(Carriage6MC);
getQualifiedClassName(Carriage7MC);
getQualifiedClassName(Carriage8MC);
getQualifiedClassName(Carriage9MC);
getQualifiedClassName(Carriage10MC);
getQualifiedClassName(Carriage11MC);
getQualifiedClassName(Carriage12MC);
getQualifiedClassName(Carriage13MC);
getQualifiedClassName(Carriage14MC);
getQualifiedClassName(Carriage15MC);
getQualifiedClassName(ArrowIn);
getQualifiedClassName(AxIn);
getQualifiedClassName(BlamMC);
getQualifiedClassName(BlastEffect);
getQualifiedClassName(BloodEffect);
getQualifiedClassName(BoomMC);
getQualifiedClassName(BumpMC);
getQualifiedClassName(DartIn);
getQualifiedClassName(FallEffect);
getQualifiedClassName(FiredMC);
getQualifiedClassName(FireEffect);
getQualifiedClassName(HitEffect);
getQualifiedClassName(JumpEffect);
getQualifiedClassName(KaMC);
getQualifiedClassName(KnifeIn);
getQualifiedClassName(POut);
getQualifiedClassName(RunEffect);
getQualifiedClassName(SlideEffect);
getQualifiedClassName(SpangMC);
getQualifiedClassName(WantedMC);
getQualifiedClassName(WhiteMC);
getQualifiedClassName(enemyMC_1);
getQualifiedClassName(enemyMC_2);
getQualifiedClassName(enemyMC_3);
getQualifiedClassName(enemyMC_4);
getQualifiedClassName(enemyMC_5);
getQualifiedClassName(enemyMC_6);
getQualifiedClassName(enemyMC_7);
getQualifiedClassName(enemyMC_8);
getQualifiedClassName(enemyMC_9);
getQualifiedClassName(enemyMC_10);
getQualifiedClassName(enemyMC_11);
getQualifiedClassName(enemyMC_13);
getQualifiedClassName(enemyMC_14);
getQualifiedClassName(enemyMC_15);
getQualifiedClassName(enemyMC_16);
getQualifiedClassName(enemyMC_17);
getQualifiedClassName(enemyMC_18);
getQualifiedClassName(enemyMC_19);
getQualifiedClassName(FallWeapon);
getQualifiedClassName(MouseUI);
getQualifiedClassName(Present);
getQualifiedClassName(Supply);
getQualifiedClassName(Weapon);
getQualifiedClassName(Arrow);
getQualifiedClassName(Ax);
getQualifiedClassName(Bottle);
getQualifiedClassName(BottleUp);
getQualifiedClassName(Bullet);
getQualifiedClassName(Card);
getQualifiedClassName(Dart);
getQualifiedClassName(Detonator);
getQualifiedClassName(Knife);
getQualifiedClassName(Stick);
getQualifiedClassName(Ax_Hand);
getQualifiedClassName(Bottle_Hand);
getQualifiedClassName(BottleUp_Hand);
getQualifiedClassName(Dart_Hand);
getQualifiedClassName(Detonator_Hand);
getQualifiedClassName(Knife_Hand);
getQualifiedClassName(Stick_Hand);
getQualifiedClassName(AuthorWindow);
getQualifiedClassName(PanelAuthor);
getQualifiedClassName(CountDownPanel);
getQualifiedClassName(BonusShowPanel);
getQualifiedClassName(PanelEditEnemys);
getQualifiedClassName(PanelEditor);
getQualifiedClassName(PanelEditorTrace);
getQualifiedClassName(PanelEditScene);
getQualifiedClassName(PanelEditTrain);
getQualifiedClassName(PanelGI);
getQualifiedClassName(PanelHelp);
getQualifiedClassName(PanelMission);
getQualifiedClassName(PanelOptions);
getQualifiedClassName(PanelPause);
getQualifiedClassName(PanelResult);
getQualifiedClassName(PanelSure);
getQualifiedClassName(LosePanel);
getQualifiedClassName(PanelTitle);
getQualifiedClassName(TimeOverPanel);
getQualifiedClassName(PanelWin);
getQualifiedClassName(KeyItem);
getQualifiedClassName(ScrollBar);
getQualifiedClassName(SoundBar);
}
}//package com.macrojoy.zgd
Section 214
//SceneControl (com.macrojoy.zgd.SceneControl)
package com.macrojoy.zgd {
import flash.display.*;
import flash.geom.*;
import com.macrojoy.zgd.display.*;
import flash.utils.*;
import flash.media.*;
import com.macrojoy.zgd.scene.*;
public class SceneControl {
private static var _timer:uint;
private static var _colorTransForm:ColorTransform;
private static var _blueNum:int;
private static var _redNum:int;
private static var _trainBitmap:Bitmap;
private static var _bgCTN:BackGround;
private static var _trainBmd:BitmapData;
private static function loadTrain():void{
saveLandform();
saveThings();
saveTrainBmd();
initTrain();
updateTrain();
}
public static function updateThingsIndex():void{
var _local1:Array;
var _local2:Array;
var _local3:BasicThingMC;
var _local4:uint;
var _local5:BasicThingMC;
var _local6:Number;
var _local7:Array;
var _local8:uint;
var _local9:uint;
var _local10:uint;
_local1 = new Array();
_local2 = new Array();
_local4 = 0;
while (_local4 < Global.thingsCTN.numChildren) {
_local3 = (Global.thingsCTN.getChildAt(_local4) as BasicThingMC);
if (_local3 != null){
_local1.push(_local3);
};
_local4++;
};
if (_local1.length == 0){
return;
};
_local1.sortOn("myY", Array.NUMERIC);
_local5 = (_local1[0] as BasicThingMC);
_local6 = _local5.myY;
_local7 = new Array();
_local8 = 0;
while (_local8 < _local1.length) {
_local3 = (_local1[_local8] as BasicThingMC);
if (Math.abs((_local3.myY - _local6)) < 25){
_local7.push(_local3);
} else {
_local7.sortOn("myX", Array.NUMERIC);
_local10 = 0;
while (_local10 < _local7.length) {
_local2.push(_local7[_local10]);
_local10++;
};
_local7 = [];
_local7.push(_local3);
_local6 = _local3.myY;
};
_local8++;
};
_local7.sortOn("myX", Array.NUMERIC);
_local9 = 0;
while (_local9 < _local7.length) {
_local2.push(_local7[_local9]);
_local9++;
};
_local2.reverse();
_local4 = 0;
while (_local4 < _local2.length) {
Global.thingsCTN.setChildIndex(_local2[_local4], _local4);
_local4++;
};
}
public static function newBg():void{
if (Global.stage.quality.toLowerCase() != "low"){
loadBg();
};
loadTrain();
loadPlant();
}
public static function loadBg():void{
if (_bgCTN == null){
_bgCTN = (Method.createDisplayObj(BackGround, Global.swf, 0) as BackGround);
};
}
public static function clearScene():void{
Global.foreGroundCTN.removeSelf();
Global.foreGroundCTN = null;
Global.trainCTN = null;
if (_bgCTN != null){
_bgCTN.removeSelf();
_bgCTN = null;
};
_trainBmd.dispose();
disposeBmd(Global.landformArr);
disposeBmd(Global.trainArr);
}
public static function changeSky():void{
var _local1:ColorTransform;
if (_bgCTN != null){
_bgCTN.toChangeSky();
};
_colorTransForm = Method.getTransform(Global.skyOrder);
_local1 = Global.gameCTN.transform.colorTransform;
_redNum = (Math.abs((_colorTransForm.redOffset - _local1.redOffset)) / (_colorTransForm.redOffset - _local1.redOffset));
_blueNum = (Math.abs((_colorTransForm.blueOffset - _local1.blueOffset)) / (_colorTransForm.blueOffset - _local1.blueOffset));
Method.playSound(("BG" + Global.skyOrder.toString()), 1, int.MAX_VALUE, 0, 0);
}
private static function saveLandform():void{
var _local1:Sprite;
var _local2:Array;
var _local3:Array;
var _local4:Rectangle;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:Class;
var _local9:Sprite;
var _local10:BitmapData;
var _local11:Matrix;
_local1 = new Sprite();
_local2 = Global.trainArr;
for each (_local3 in _local2) {
_local8 = Method.getClass1(("Carriage" + String(_local3[1])));
_local9 = (Method.createDisplayObj(_local8, _local1, -1, _local3[0]) as Sprite);
removeOther(_local9, "step");
};
_local4 = _local1.getBounds(_local1);
_local5 = Math.abs(_local4.y);
_local6 = (Math.floor((_local1.width / 2881)) + 1);
_local7 = 0;
while (_local7 < _local6) {
_local10 = new BitmapData(2880, _local5, true, 0);
_local11 = new Matrix();
_local11.tx = (-2880 * _local7);
_local11.ty = _local5;
_local10.draw(_local1, _local11);
Global.landformArr.push(_local10);
_local7++;
};
}
private static function addThings():void{
var _local1:String;
var _local2:Array;
var _local3:int;
var _local4:Array;
var _local5:Class;
var _local6:MovieClip;
var _local7:BasicMoveableObjectMC;
var _local8:uint;
_local2 = Global.thingsArr;
_local3 = (_local2.length - 1);
while (_local3 >= 0) {
_local4 = _local2[_local3];
_local1 = String(_local4[0]).substr(0, 3);
if (((!((_local1 == "Whe"))) || ((((_local1 == "Whe")) && ((_local4[2] < (((-(Global.gameCTN.y) - 375) + Data.STAGE_HEIGHT) - 20))))))){
if ((_local4[1] + _local4[3]) > -(Global.mainBgCTN.x)){
if ((_local4[1] - (_local4[3] / 2)) < (-(Global.mainBgCTN.x) + Data.STAGE_WIDTH)){
_local5 = Method.getClass1(_local4[0]);
_local6 = (new (_local5) as MovieClip);
_local6.x = _local4[1];
_local6.y = _local4[2];
switch (_local1){
case "Lad":
Global.thingsCTN.addChildAt(_local6, 0);
_local6.name = "ladder";
break;
case "Whe":
_local8 = uint(String(_local4[0]).charAt(5));
if (_local8 == 1){
Global.belowWheelCTN.addChild(_local6);
} else {
Global.upTrainCTN.addChild(_local6);
};
_local6.name = "wheel";
break;
case "Win":
Global.upTrainCTN.addChild(_local6);
_local6.name = "window";
break;
case "Lig":
Global.thingsCTN.addChild(_local6);
_local6.name = "light";
break;
case "Sid":
Global.thingsCTN.addChild(_local6);
_local6.name = "side";
break;
case "Rop":
Global.thingsCTN.addChild(_local6);
_local6.name = "rope";
break;
case "Fir":
Global.thingsCTN.addChild(_local6);
_local6.name = "fire";
break;
case "Cas":
Global.thingsCTN.addChild(_local6);
_local6.name = "cask";
break;
case "Che":
Global.thingsCTN.addChild(_local6);
_local6.name = "chest";
break;
case "Bag":
Global.thingsCTN.addChild(_local6);
_local6.name = "bag";
break;
case "Gra":
Global.thingsCTN.addChild(_local6);
_local6.name = "grass";
break;
case "GFi":
Global.thingsCTN.addChild(_local6);
_local6.name = "fire";
_local6.gotoAndStop("fire");
break;
default:
trace(_local4[0]);
};
_local2.splice(_local3, 1);
_local7 = (_local6 as BasicMoveableObjectMC);
if (_local7 != null){
_local7.init();
};
Global.loadedThings.push(_local6);
};
};
};
_local3--;
};
}
public static function updateMusic():void{
var _local1:SoundTransform;
if (Global.channel1 != null){
_local1 = Global.channel0.soundTransform;
_local1.volume = (_local1.volume - 0.01);
Global.channel0.soundTransform = _local1;
_local1 = Global.channel1.soundTransform;
_local1.volume = (_local1.volume + 0.011);
Global.channel1.soundTransform = _local1;
if (_local1.volume >= Global.musicVolume){
Global.channel0.stop();
Global.channel0 = Global.channel1;
Global.channel1 = null;
_local1.volume = Global.musicVolume;
Global.channel0.soundTransform = _local1;
Global.soundInfo[0] = Global.soundInfo[1];
Global.soundInfo[0][2] = Global.musicVolume;
Global.soundInfo[1] = [null, 0, 0, 0];
};
};
}
private static function initTrain():void{
var _local1:BitmapData;
_local1 = (Global.trainArr[0] as BitmapData);
_trainBmd = new BitmapData(Data.STAGE_WIDTH, _local1.height, true, 0);
_trainBitmap = new Bitmap(_trainBmd);
Global.trainCTN.addChild(_trainBitmap);
_trainBitmap.y = -(_trainBitmap.height);
}
public static function setColor(_arg1:uint):void{
if (_bgCTN != null){
_bgCTN.setColor(_arg1);
};
}
private static function drawTrain():void{
var _local1:int;
var _local2:int;
var _local3:Rectangle;
var _local4:Array;
var _local5:uint;
var _local6:BitmapData;
var _local7:BitmapData;
var _local8:int;
var _local9:int;
var _local10:int;
_local1 = -(Math.round(Global.mainBgCTN.x));
_local2 = (_local1 + Data.STAGE_WIDTH);
_trainBitmap.x = _local1;
if (_local1 < 0){
_local6 = new BitmapData(100, _trainBitmap.height, true, 0);
_local3 = new Rectangle(0, 0, 100, _local6.height);
_trainBmd.copyPixels(_local6, _local3, new Point(0, 0));
};
_local4 = Global.trainArr;
_local5 = 0;
while (_local5 < _local4.length) {
_local7 = (Global.trainArr[_local5] as BitmapData);
_local8 = (2880 * _local5);
_local9 = (_local8 + _local7.width);
if ((((_local8 < _local2)) && ((_local9 > _local1)))){
_local10 = (_local1 - _local8);
_local3 = new Rectangle(_local10, 0, Data.STAGE_WIDTH, _local7.height);
_trainBmd.copyPixels(_local7, _local3, new Point(0, 0));
};
_local5++;
};
}
private static function loadPlant():void{
Global.foreGroundCTN = (new ForeGround() as ForeGround);
Global.gameCTN.addChild(Global.foreGroundCTN);
Global.foreGroundCTN.y = (Data.STAGE_HEIGHT - 54);
}
public static function removeBg():void{
if (_bgCTN != null){
_bgCTN.removeSelf();
_bgCTN = null;
};
}
private static function removeOther(_arg1:Sprite, _arg2:String):void{
var _local3:int;
var _local4:DisplayObject;
_local3 = (_arg1.numChildren - 1);
while (_local3 >= 0) {
_local4 = (_arg1.getChildAt(_local3) as DisplayObject);
if (_local4.name != _arg2){
_arg1.removeChild(_local4);
};
_local3--;
};
}
private static function saveTrainBmd():void{
var _local1:Sprite;
var _local2:Array;
var _local3:Array;
var _local4:Rectangle;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:Class;
var _local9:Sprite;
var _local10:BitmapData;
var _local11:Matrix;
_local1 = new Sprite();
_local2 = Global.trainArr;
for each (_local3 in _local2) {
_local8 = Method.getClass1(("Carriage" + String(_local3[1])));
_local9 = (Method.createDisplayObj(_local8, _local1, 0, _local3[0]) as Sprite);
removeOther(_local9, "train");
};
Global.trainLength = _local1.width;
Global.trainArr = new Array();
_local4 = _local1.getBounds(_local1);
_local5 = Math.abs(Math.round(_local4.y));
_local6 = (Math.floor((_local1.width / 2881)) + 1);
_local7 = 0;
while (_local7 < _local6) {
_local10 = new BitmapData(2880, _local5, true, 0);
_local11 = new Matrix();
_local11.tx = (-2880 * _local7);
_local11.ty = _local5;
_local10.draw(_local1, _local11);
Global.trainArr.push(_local10);
_local7++;
};
}
public static function updateCTNColor():void{
var _local1:Boolean;
var _local2:Boolean;
var _local3:ColorTransform;
if (_colorTransForm != null){
_timer++;
if ((_timer % 2) == 0){
_local3 = Global.gameCTN.transform.colorTransform;
if (Math.abs((_local3.redOffset - _colorTransForm.redOffset)) > 1){
_local3.redOffset = (_local3.redOffset + _redNum);
} else {
_local1 = true;
_local3.redOffset = _colorTransForm.redOffset;
};
if (Math.abs((_local3.blueOffset - _colorTransForm.blueOffset)) > 1){
_local3.blueOffset = (_local3.blueOffset + _blueNum);
} else {
_local2 = true;
_local3.blueOffset = _colorTransForm.blueOffset;
};
if (((_local1) && (_local2))){
_colorTransForm = null;
_timer = 0;
};
Global.gameCTN.transform.colorTransform = _local3;
};
};
}
private static function saveThings():void{
var _local1:Sprite;
var _local2:Array;
var _local3:Array;
var _local4:Class;
var _local5:Sprite;
var _local6:MovieClip;
var _local7:String;
var _local8:int;
var _local9:int;
var _local10:uint;
var _local11:Array;
var _local12:int;
var _local13:DisplayObject;
_local1 = new Sprite();
_local2 = Global.trainArr;
for each (_local3 in _local2) {
_local4 = Method.getClass1(("Carriage" + String(_local3[1])));
_local5 = (Method.createDisplayObj(_local4, _local1, -1, _local3[0]) as Sprite);
_local12 = (_local5.numChildren - 1);
while (_local12 >= 0) {
_local13 = (_local5.getChildAt(_local12) as DisplayObject);
if (((((((!((_local13.name == "train"))) && (!((_local13.name == "step"))))) && (!((_local13.name == "step1"))))) && (!((_local13.name == "step2"))))){
_local6 = (_local13 as MovieClip);
_local7 = getQualifiedClassName(_local6).replace("com.macrojoy.zgd.display::", "");
_local8 = Math.round((_local5.x + _local6.x));
_local9 = Math.round(_local6.y);
_local10 = Math.round(_local6.width);
_local11 = [_local7, _local8, _local9, _local10];
Global.thingsArr.push(_local11);
};
_local12--;
};
};
}
private static function removeThings():void{
var _local1:String;
var _local2:Array;
var _local3:int;
var _local4:MovieClip;
var _local5:String;
var _local6:int;
var _local7:int;
var _local8:uint;
var _local9:Array;
var _local10:BasicMoveableObjectMC;
_local2 = Global.loadedThings;
_local3 = (_local2.length - 1);
while (_local3 >= 0) {
_local4 = (_local2[_local3] as MovieClip);
_local1 = getQualifiedClassName(_local4).replace("com.macrojoy.zgd.display::", "");
_local5 = _local1.substr(0, 3);
if (((((((_local4.x + _local4.width) < -(Global.mainBgCTN.x))) || (((_local4.x - (_local4.width / 2)) > (-(Global.mainBgCTN.x) + Data.STAGE_WIDTH))))) || ((((_local5 == "Whe")) && ((_local4.y >= (((-(Global.gameCTN.y) - 375) + Data.STAGE_HEIGHT) - 20))))))){
_local6 = Math.round(_local4.x);
_local7 = Math.round(_local4.y);
_local8 = Math.round(_local4.width);
_local9 = [_local1, _local6, _local7, _local8];
_local10 = (_local4 as BasicMoveableObjectMC);
if (_local10 != null){
_local10.removeSelf();
} else {
_local4.parent.removeChild(_local4);
};
_local2.splice(_local3, 1);
Global.thingsArr.push(_local9);
};
_local3--;
};
}
private static function disposeBmd(_arg1:Array):void{
var _local2:int;
var _local3:BitmapData;
_local2 = (_arg1.length - 1);
while (_local2 >= 0) {
_local3 = (_arg1[_local2] as BitmapData);
_local3.dispose();
_local2--;
};
}
public static function updateTrain():void{
drawTrain();
addThings();
removeThings();
}
}
}//package com.macrojoy.zgd
Section 215
//UIControl (com.macrojoy.zgd.UIControl)
package com.macrojoy.zgd {
import flash.display.*;
public class UIControl {
public static function createPanel(_arg1:String):Sprite{
var _local2:Class;
var _local3:Sprite;
_local2 = Method.getClass1(_arg1, "ui");
_local3 = (Method.createDisplayObj(_local2, Global.uiCTN) as Sprite);
return (_local3);
}
public static function createUICTN():void{
Global.uiCTN = (Method.createDisplayObj(Sprite, Global.swf) as Sprite);
createPanel("PanelTitle");
}
public static function clearCTN():void{
var _local1:int;
var _local2:IObject;
_local1 = (Global.uiCTN.numChildren - 1);
while (_local1 >= 0) {
_local2 = (Global.uiCTN.getChildAt(0) as IObject);
_local2.removeSelf();
_local1--;
};
}
}
}//package com.macrojoy.zgd
Section 216
//UserControl (com.macrojoy.zgd.UserControl)
package com.macrojoy.zgd {
import flash.display.*;
import com.macrojoy.zgd.display.*;
import flash.events.*;
import com.macrojoy.zgd.ui.*;
public class UserControl {
private static const KEY_MENU_CODE1:uint = 27;
private static const KEY_MENU_CODE2:uint = 80;
private static var _hero:BasicHeroMC;
private static function loseFocus(_arg1:Event):void{
if (_hero != null){
_hero.KeyLeftIsDown = false;
_hero.KeyRightIsDown = false;
_hero.KeyUpIsDown = false;
_hero.KeyDownIsDown = false;
_hero.MouseIsDown = false;
};
}
private static function keyDownHandler(_arg1:KeyboardEvent):void{
if (_hero == null){
return;
};
switch (_arg1.keyCode){
case Global.keyLeftCode:
if (!_hero.KeyLeftIsDown){
_hero.pushKey("A");
};
_hero.KeyLeftIsDown = true;
break;
case Global.keyRightCode:
if (!_hero.KeyRightIsDown){
_hero.pushKey("D");
};
_hero.KeyRightIsDown = true;
break;
case Global.keyUpCode:
_hero.KeyUpIsDown = true;
break;
case Global.keyDownCode:
if (!_hero.KeyDownIsDown){
_hero.pushKey("S");
};
_hero.KeyDownIsDown = true;
break;
case KEY_MENU_CODE1:
case KEY_MENU_CODE2:
pauseHandler();
break;
};
}
private static function mouseEvtHandler(_arg1:MouseEvent):void{
if (_hero == null){
return;
};
if (!Global.clickButton){
switch (_arg1.type){
case MouseEvent.MOUSE_DOWN:
if (((Global.gamePause) || (!((Global.gameStatus == "playing"))))){
return;
};
_hero.MouseIsDown = true;
break;
case MouseEvent.MOUSE_UP:
_hero.MouseIsDown = false;
break;
};
};
}
private static function addControlListener():void{
Global.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
Global.stage.addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
Global.stage.addEventListener(Event.DEACTIVATE, loseFocus);
Global.stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseEvtHandler);
Global.stage.addEventListener(MouseEvent.MOUSE_UP, mouseEvtHandler);
Global.stage.focus = null;
}
private static function pauseHandler():void{
var _local1:PanelPause;
if (Global.gameStatus == "playing"){
if (!Global.gamePause){
Method.gamePause();
(UIControl.createPanel("PanelPause") as PanelPause);
} else {
_local1 = (Global.uiCTN.getChildAt((Global.uiCTN.numChildren - 1)) as PanelPause);
if (_local1 != null){
Method.gameOn();
_local1.removeSelf();
};
};
};
}
private static function keyUpHandler(_arg1:KeyboardEvent):void{
if (_hero == null){
return;
};
switch (_arg1.keyCode){
case Global.keyLeftCode:
_hero.KeyLeftIsDown = false;
break;
case Global.keyRightCode:
_hero.KeyRightIsDown = false;
break;
case Global.keyUpCode:
_hero.KeyUpIsDown = false;
break;
case Global.keyDownCode:
_hero.KeyDownIsDown = false;
break;
};
}
public static function stopControl():void{
loseFocus(null);
_hero = null;
Global.stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
Global.stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
Global.stage.removeEventListener(Event.DEACTIVATE, loseFocus);
Global.stage.removeEventListener(MouseEvent.MOUSE_DOWN, mouseEvtHandler);
if (Global.mouseUI != null){
Global.mouseUI.parent.removeChild(Global.mouseUI);
Global.mouseUI = null;
};
}
public static function control(_arg1:BasicHeroMC):void{
_hero = _arg1;
addControlListener();
if ((((Global.mouseUI == null)) && (!((Global.GIPanel == null))))){
Global.mouseUI = (Method.createDisplayObj(MouseUI, Global.GIPanel, -1, Global.GIPanel.mouseX, Global.GIPanel.mouseY) as MovieClip);
Global.mouseUI.gotoAndStop("aim");
Global.mouseUI.mouseChildren = false;
Global.mouseUI.mouseEnabled = false;
};
}
}
}//package com.macrojoy.zgd
Section 217
//absoluteURI (com.miniclip.gamemanager.absoluteURI)
package com.miniclip.gamemanager {
import flash.utils.*;
import core.*;
import flash.system.*;
public var absoluteURI:Function = function (_arg1:String, _arg2=null):String{
var root:uri;
var BlackBox:Object;
var MGM:Object;
var known:Array;
var ext:String;
var found_known_ext:Boolean;
var found_unknown_ext:Boolean;
var c:Array;
var path = _arg1;
var option = _arg2;
trace(("AbsoluteURI - path = " + path));
if (Security.sandboxType != Security.REMOTE){
return (path);
};
var found:Boolean;
var done:Boolean;
try {
trace("AbsoluteURI - Found the GameManager");
BlackBox = getDefinitionByName("com.miniclip.blackbox.BlackBox");
MGM = getDefinitionByName("com.miniclip.MiniclipGameManager");
root = new uri(BlackBox.current.url.toString());
trace(("AbsoluteURI - BlackBox.current.url = " + root.toString()));
} catch(e:ReferenceError) {
trace("AbsoluteURI - Not Loaded by the GameManager");
found = false;
};
if (option != null){
if ((option is String)){
found = true;
root = new uri(option);
};
};
if (found){
root.fragment = "";
root.query = "";
if (root.path == ""){
root.path = "/";
};
known = ["html", ".htm", ".swf", ".xml"];
ext = root.path.substr((root.path.length - 4));
found_known_ext = false;
found_unknown_ext = false;
if (known.indexOf(ext) > -1){
found_known_ext = true;
} else {
if (ext.indexOf(".") > -1){
found_unknown_ext = true;
};
};
if (((((!((root.path == "/"))) && (!((root.path.charAt((root.path.length - 1)) == "/"))))) && (((found_known_ext) || (found_unknown_ext))))){
root.path = root.path.substr(0, (root.path.lastIndexOf("/") + 1));
} else {
if (((!((root.path == "/"))) && (!((root.path.charAt((root.path.length - 1)) == "/"))))){
root.path = (root.path + "/");
};
};
c = path.split("");
if (c[0] == "/"){
root.path = path;
done = true;
};
if ((c[0] + c[1]) == "./"){
path = path.substr(2);
};
if ((((((c[0] + c[1]) + c[2]) == "../")) && (!(done)))){
if (root.path == "/"){
throw (new Error((((("Can not navigate to parent directory \"" + path) + "\"\nwhen there is no parent \"") + root.toString()) + "\"")));
};
if (root.path.charAt((root.path.length - 1)) == "/"){
root.path = root.path.substr(0, (root.path.length - 1));
};
while ((((((((c[0] + c[1]) + c[2]) == "../")) && ((root.path.length > 1)))) && (!((root.path == "/"))))) {
path = path.substr(3);
c = path.split("");
root.path = root.path.substr(0, root.path.lastIndexOf("/"));
};
if (((!((root.path == "/"))) && (!((root.path.charAt((root.path.length - 1)) == "/"))))){
root.path = (root.path + "/");
};
root.path = (root.path + path);
done = true;
};
if (!done){
root.path = (root.path + path);
};
} else {
trace(("AbsoluteURI - return path = " + path));
return (path);
};
trace(("AbsoluteURI - return uri = " + root.toString()));
return (root.toString());
};
}//package com.miniclip.gamemanager
Section 218
//GatekeeperLoader (com.miniclip.gatekeeper.GatekeeperLoader)
package com.miniclip.gatekeeper {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
public class GatekeeperLoader extends EventDispatcher {
protected const _OFFSITE_URL:String = "http://www.miniclip.com/swfcontent/components/game_offsite.swf";
protected const _GATEKEEPER_URL:String = "http://www.miniclip.com/swfcontent/components/gatekeeper.swf";
protected var _ldr:Loader;
protected var _stage:Stage;
public function GatekeeperLoader(_arg1:Stage){
trace("GatekeeperLoader...");
applySecurity(getAllowedDomains());
_stage = _arg1;
}
private function loadAlert():void{
var _local1:Loader;
_local1 = new Loader();
_local1.load(new URLRequest(_OFFSITE_URL));
_stage.addChild(_local1);
}
private function onGatekeeperLoaded(_arg1:Event):void{
var _local2:*;
var _local3:Boolean;
var _local4:String;
_local2 = _ldr.content;
_local3 = false;
if (_stage.loaderInfo.url.substr(0, 7) == "file://"){
_local3 = true;
} else {
trace("validating domain...");
if (ExternalInterface.available){
_local4 = ExternalInterface.call(" function(){ return document.location.href.toString();} ");
_local3 = _local2.validateDomain(_local4, _stage.loaderInfo.url);
};
};
if (_local3){
dispatchEvent(new Event("valid"));
} else {
loadAlert();
dispatchEvent(new Event("invalid"));
};
}
public function start():void{
var _local1:String;
_ldr = new Loader();
_ldr.contentLoaderInfo.addEventListener(Event.INIT, onGatekeeperLoaded);
_local1 = _GATEKEEPER_URL;
if ((((_stage.loaderInfo.url.indexOf("://cms.miniclip.com/") == 4)) || ((_stage.loaderInfo.url.indexOf("://developers.miniclip.com/") == 4)))){
_local1 = _local1.replace("://www.miniclip.com/", "://cms.miniclip.com/");
};
_ldr.load(new URLRequest(_local1));
}
private function getAllowedDomains():Array{
var _local1:Array;
_local1 = new Array();
_local1.push("developers.miniclip.com");
_local1.push("www.miniclip.com");
_local1.push("cms.miniclip.com");
return (_local1);
}
private function applySecurity(_arg1:Array):void{
var _local2:uint;
_local2 = 0;
while (_local2 < _arg1.length) {
Security.allowDomain(_arg1[_local2]);
_local2++;
};
}
}
}//package com.miniclip.gatekeeper
Section 219
//HighscoresLoader (com.miniclip.highscores.HighscoresLoader)
package com.miniclip.highscores {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class HighscoresLoader extends EventDispatcher {
private static const OFFSITE_SWF:String = "highscores_offsite.swf";
private static const ALLOWED_DOMAINS:Array = [".miniclip.com"];
private static const HIGHSCORESBOX_SWF:String = "highscoresbox_v3.swf";
public static var ldr:Loader;
private static var URL_PREFIX:String;
public static var level:Number;
public static var target:DisplayObjectContainer;
public static var score:Number;
private static var localConnectionID:String;
private static var firstrun:Boolean = true;
private static var objLocalConnection:LocalConnection;
private static var singleInstance:HighscoresLoader;
public function HighScoresLoader(){
}
protected static function buildQueryString():String{
var _local1:String;
var _local2:String;
var _local3:String;
_local1 = "?";
_local2 = "";
for (_local3 in target.stage.loaderInfo.parameters) {
_local1 = (_local1 + (((_local2 + _local3) + "=") + escape(target.stage.loaderInfo.parameters[_local3])));
_local2 = "&";
};
_local1 = (_local1 + ("&mc_lcid=" + localConnectionID));
return (_local1);
}
private static function handleTargetRemoved(_arg1:Event):void{
target = null;
}
protected static function validateDomain():Boolean{
var _local1:Boolean;
var _local2:String;
var _local3:String;
var _local4:Number;
_local1 = false;
_local2 = target.stage.loaderInfo.url;
_local3 = getDomainName(_local2);
if (_local3 != ""){
_local4 = 0;
while (_local4 < ALLOWED_DOMAINS.length) {
if (_local3.indexOf(ALLOWED_DOMAINS[_local4]) >= (_local3.length - ALLOWED_DOMAINS[_local4].length)){
_local1 = true;
};
_local4++;
};
};
if (getDomainName(_local2).indexOf("/swfcontent/webmastergames/") != -1){
_local1 = false;
};
return (_local1);
}
public static function hsbready():void{
sendScore();
}
private static function initialize():void{
var _local1:String;
objLocalConnection = new LocalConnection();
objLocalConnection.client = HighscoresLoader;
objLocalConnection.allowDomain("www.miniclip.com", "cms.miniclip.com", "developers.miniclip.com");
objLocalConnection.connect((localConnectionID + "back"));
if (validateDomain()){
_local1 = buildQueryString();
ldr.load(new URLRequest(((URL_PREFIX + HIGHSCORESBOX_SWF) + _local1)));
} else {
if (target.loaderInfo.parameters["mc_gamename"] != undefined){
_local1 = (("?msg=Play " + target.loaderInfo.parameters["mc_gamename"]) + " on Miniclip.com");
} else {
_local1 = "?msg=Play this game on Miniclip.com";
};
_local1 = (_local1 + ("&lcid=" + localConnectionID));
ldr.contentLoaderInfo.addEventListener(Event.INIT, handleOffsiteInit);
ldr.load(new URLRequest(((URL_PREFIX + OFFSITE_SWF) + _local1)));
trace(((URL_PREFIX + OFFSITE_SWF) + _local1));
};
}
private static function handleOffsiteInit(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
_local2 = 328;
_local3 = 204;
ldr.x = ((target.stage.stageWidth - _local2) / 2);
ldr.y = ((target.stage.stageHeight - _local3) / 2);
}
public static function hsbhidden():void{
target.removeChild(ldr);
singleInstance.dispatchEvent(new Event("close"));
}
protected static function getDomainName(_arg1:String):String{
var _local2:String;
var _local3:Number;
var _local4:String;
var _local5:Array;
_local2 = "";
_local3 = _arg1.indexOf("://");
if (_local3 > 0){
_local4 = _arg1.substr((_local3 + 3));
_local5 = _local4.split("/");
if (_local5.length > 0){
_local2 = _local5[0];
};
};
return (_local2);
}
private static function onLCStatus(_arg1:Event):void{
}
public static function sendScore():void{
var _local1:LocalConnection;
target.addChild(ldr);
_local1 = new LocalConnection();
_local1.addEventListener(StatusEvent.STATUS, onLCStatus);
_local1.send(localConnectionID, "setScore", score, level);
}
public static function start(_arg1:Stage, _arg2:Number=undefined, _arg3:Number=undefined):HighscoresLoader{
trace(((("HighscoresLoader.start (AS3)/ score:" + _arg2) + " level:") + _arg3));
URL_PREFIX = ((_arg1.loaderInfo.url.substring(0, 8))=="file:///") ? "http://www.miniclip.com/swfcontent/components/" : "/swfcontent/components/";
HighscoresLoader.score = (isNaN(_arg2)) ? undefined : Number(_arg2);
HighscoresLoader.level = (isNaN(_arg3)) ? undefined : Math.max(0, Number(_arg3));
if (target == null){
target = _arg1;
target.addEventListener(Event.REMOVED_FROM_STAGE, handleTargetRemoved);
if (firstrun){
singleInstance = new (HighscoresLoader);
localConnectionID = ("LC" + String(Math.floor((Math.random() * 1000000))));
ldr = new Loader();
initialize();
} else {
sendScore();
};
} else {
sendScore();
};
firstrun = false;
return (singleInstance);
}
}
}//package com.miniclip.highscores
Section 220
//uri (core.uri)
package core {
public class uri {
private var _source:String;// = ""
private var _scheme:String;// = ""
private var _host:String;// = ""
private var _username:String;// = ""
private var _password:String;// = ""
private var _port:int;// = -1
private var _path:String;// = ""
private var _query:String;// = ""
private var _fragment:String;// = ""
private var _r:RegExp;
public function uri(_arg1:String){
_r = /\\/g;
super();
_source = _arg1;
_parse(_arg1);
}
private function _parseUnixAbsoluteFilePath(_arg1:String):void{
this.scheme = "file";
_port = -1;
_fragment = "";
_query = "";
_host = "";
_path = "";
if (_arg1.substr(0, 2) == "//"){
while (_arg1.charAt(0) == "/") {
_arg1 = _arg1.substr(1);
};
_path = ("/" + _arg1);
};
if (!_path){
_path = _arg1;
};
}
private function _parseWindowsAbsoluteFilePath(_arg1:String):void{
if ((((((_arg1.length > 2)) && (!((_arg1.charAt(2) == "\\"))))) && (!((_arg1.charAt(2) == "/"))))){
return;
};
this.scheme = "file";
_port = -1;
_fragment = "";
_query = "";
_host = "";
_path = ("/" + _arg1.replace(_r, "/"));
}
private function _parseWindowsUNC(_arg1:String):void{
this.scheme = "file";
_port = -1;
_fragment = "";
_query = "";
while (_arg1.charAt(0) == "\\") {
_arg1 = _arg1.substr(1);
};
var _local2:int = _arg1.indexOf("\\");
if (_local2 > 0){
_path = _arg1.substring(_local2);
_host = _arg1.substring(0, _local2);
} else {
_host = _arg1;
_path = "";
};
_path = _path.replace(_r, "/");
}
private function _parse(_arg1:String):void{
var _local5:String;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:int;
var _local10:String;
var _local11:Boolean;
var _local2:int = _arg1.indexOf(":");
if (_local2 < 0){
if (_arg1.charAt(0) == "/"){
_parseUnixAbsoluteFilePath(_arg1);
} else {
if (_arg1.substr(0, 2) == "\\\\"){
_parseWindowsUNC(_arg1);
};
};
return;
} else {
if (_local2 == 1){
_parseWindowsAbsoluteFilePath(_arg1);
return;
};
};
var _local3:RegExp = new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)([?]([^#]*))?(#(.*))?", null);
var _local4:Object = _local3.exec(_arg1);
if (((_local4[1]) && (_local4[2]))){
this.scheme = _local4[2];
};
if (_local4[3]){
_local5 = _local4[4];
_local6 = "";
if (_local5.indexOf("@") > -1){
_local7 = _local5.split("@")[0];
_local6 = _local5.split("@")[1];
if (_local7.indexOf(":") != -1){
_username = _local7.split(":")[0];
_password = _local7.split(":")[1];
} else {
_username = _local7;
};
} else {
_local6 = _local5;
};
if (_local6.indexOf(":") > -1){
_local8 = _local6.split(":")[1];
_local11 = true;
_local9 = 0;
while (_local9 < _local8.length) {
_local10 = _local8.charAt(_local9);
if (!((("0" <= _local10)) && ((_local10 <= "9")))){
_local11 = false;
};
_local9++;
};
if (_local11){
_local6 = _local6.split(":")[0];
if (((_local8) && ((_local8.length > 0)))){
this.port = parseInt(_local8);
};
};
};
this.host = _local6;
};
if (_local4[5]){
this.path = _local4[5];
};
if (_local4[6]){
_query = _local4[7];
};
if (_local4[8]){
_fragment = _local4[9];
};
}
public function get authority():String{
var _local1 = "";
if (userinfo){
_local1 = (_local1 + (userinfo + "@"));
};
_local1 = (_local1 + host);
if (((!((host == ""))) && ((port > -1)))){
_local1 = (_local1 + (":" + port));
};
return (_local1);
}
public function get fragment():String{
return (_fragment);
}
public function set fragment(_arg1:String):void{
_fragment = _arg1;
}
public function get host():String{
return (_host);
}
public function set host(_arg1:String):void{
_host = _arg1;
}
public function get path():String{
return (_path);
}
public function set path(_arg1:String):void{
_path = _arg1;
}
public function get port():int{
return (_port);
}
public function set port(_arg1:int):void{
_port = _arg1;
}
public function get scheme():String{
return (_scheme);
}
public function set scheme(_arg1:String):void{
_scheme = _arg1;
}
public function get source():String{
return (_source);
}
public function get userinfo():String{
if (!_username){
return ("");
};
var _local1 = "";
_local1 = (_local1 + _username);
_local1 = (_local1 + (":" + _password));
return (_local1);
}
public function get query():String{
return (_query);
}
public function set query(_arg1:String):void{
_query = _arg1;
}
public function toString():String{
var _local1 = "";
if (scheme){
_local1 = (_local1 + (scheme + ":"));
};
if (authority){
_local1 = (_local1 + ("//" + authority));
};
if ((((authority == "")) && ((scheme == "file")))){
_local1 = (_local1 + "//");
};
_local1 = (_local1 + path);
if (query){
_local1 = (_local1 + ("?" + query));
};
if (fragment){
_local1 = (_local1 + ("#" + fragment));
};
return (_local1);
}
public function valueOf():String{
return (toString());
}
}
}//package core
Section 221
//BaseScrollPane (fl.containers.BaseScrollPane)
package fl.containers {
import fl.core.*;
import fl.controls.*;
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import fl.events.*;
public class BaseScrollPane extends UIComponent {
protected var defaultLineScrollSize:Number;// = 4
protected var _maxHorizontalScrollPosition:Number;// = 0
protected var vScrollBar:Boolean;
protected var disabledOverlay:Shape;
protected var hScrollBar:Boolean;
protected var availableWidth:Number;
protected var _verticalPageScrollSize:Number;// = 0
protected var vOffset:Number;// = 0
protected var _verticalScrollBar:ScrollBar;
protected var useFixedHorizontalScrolling:Boolean;// = false
protected var contentWidth:Number;// = 0
protected var contentHeight:Number;// = 0
protected var _horizontalPageScrollSize:Number;// = 0
protected var background:DisplayObject;
protected var _useBitmpScrolling:Boolean;// = false
protected var contentPadding:Number;// = 0
protected var availableHeight:Number;
protected var _horizontalScrollBar:ScrollBar;
protected var contentScrollRect:Rectangle;
protected var _horizontalScrollPolicy:String;
protected var _verticalScrollPolicy:String;
protected static const SCROLL_BAR_STYLES:Object = {upArrowDisabledSkin:"upArrowDisabledSkin", upArrowDownSkin:"upArrowDownSkin", upArrowOverSkin:"upArrowOverSkin", upArrowUpSkin:"upArrowUpSkin", downArrowDisabledSkin:"downArrowDisabledSkin", downArrowDownSkin:"downArrowDownSkin", downArrowOverSkin:"downArrowOverSkin", downArrowUpSkin:"downArrowUpSkin", thumbDisabledSkin:"thumbDisabledSkin", thumbDownSkin:"thumbDownSkin", thumbOverSkin:"thumbOverSkin", thumbUpSkin:"thumbUpSkin", thumbIcon:"thumbIcon", trackDisabledSkin:"trackDisabledSkin", trackDownSkin:"trackDownSkin", trackOverSkin:"trackOverSkin", trackUpSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
private static var defaultStyles:Object = {repeatDelay:500, repeatInterval:35, skin:"ScrollPane_upSkin", contentPadding:0, disabledAlpha:0.5};
public function BaseScrollPane(){
contentWidth = 0;
contentHeight = 0;
contentPadding = 0;
vOffset = 0;
_maxHorizontalScrollPosition = 0;
_horizontalPageScrollSize = 0;
_verticalPageScrollSize = 0;
defaultLineScrollSize = 4;
useFixedHorizontalScrolling = false;
_useBitmpScrolling = false;
super();
}
protected function handleWheel(_arg1:MouseEvent):void{
if (((((!(enabled)) || (!(_verticalScrollBar.visible)))) || ((contentHeight <= availableHeight)))){
return;
};
_verticalScrollBar.scrollPosition = (_verticalScrollBar.scrollPosition - (_arg1.delta * verticalLineScrollSize));
setVerticalScrollPosition(_verticalScrollBar.scrollPosition);
dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, _arg1.delta, horizontalScrollPosition));
}
public function get verticalScrollPosition():Number{
return (_verticalScrollBar.scrollPosition);
}
protected function drawDisabledOverlay():void{
if (enabled){
if (contains(disabledOverlay)){
removeChild(disabledOverlay);
};
} else {
disabledOverlay.x = (disabledOverlay.y = contentPadding);
disabledOverlay.width = availableWidth;
disabledOverlay.height = availableHeight;
disabledOverlay.alpha = (getStyleValue("disabledAlpha") as Number);
addChild(disabledOverlay);
};
}
public function set verticalScrollPosition(_arg1:Number):void{
drawNow();
_verticalScrollBar.scrollPosition = _arg1;
setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false);
}
protected function setContentSize(_arg1:Number, _arg2:Number):void{
if ((((((contentWidth == _arg1)) || (useFixedHorizontalScrolling))) && ((contentHeight == _arg2)))){
return;
};
contentWidth = _arg1;
contentHeight = _arg2;
invalidate(InvalidationType.SIZE);
}
public function get horizontalScrollPosition():Number{
return (_horizontalScrollBar.scrollPosition);
}
public function get horizontalScrollBar():ScrollBar{
return (_horizontalScrollBar);
}
override public function set enabled(_arg1:Boolean):void{
if (enabled == _arg1){
return;
};
_verticalScrollBar.enabled = _arg1;
_horizontalScrollBar.enabled = _arg1;
super.enabled = _arg1;
}
public function get verticalLineScrollSize():Number{
return (_verticalScrollBar.lineScrollSize);
}
public function get horizontalScrollPolicy():String{
return (_horizontalScrollPolicy);
}
protected function calculateAvailableSize():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = ScrollBar.WIDTH;
_local2 = (contentPadding = Number(getStyleValue("contentPadding")));
_local3 = ((height - (2 * _local2)) - vOffset);
vScrollBar = (((_verticalScrollPolicy == ScrollPolicy.ON)) || ((((_verticalScrollPolicy == ScrollPolicy.AUTO)) && ((contentHeight > _local3)))));
_local4 = ((width - (vScrollBar) ? _local1 : 0) - (2 * _local2));
_local5 = (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - _local4);
hScrollBar = (((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_local5 > 0)))));
if (hScrollBar){
_local3 = (_local3 - _local1);
};
if (((((((hScrollBar) && (!(vScrollBar)))) && ((_verticalScrollPolicy == ScrollPolicy.AUTO)))) && ((contentHeight > _local3)))){
vScrollBar = true;
_local4 = (_local4 - _local1);
};
availableHeight = (_local3 + vOffset);
availableWidth = _local4;
}
public function get maxVerticalScrollPosition():Number{
drawNow();
return (Math.max(0, (contentHeight - availableHeight)));
}
public function set horizontalScrollPosition(_arg1:Number):void{
drawNow();
_horizontalScrollBar.scrollPosition = _arg1;
setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false);
}
public function get horizontalLineScrollSize():Number{
return (_horizontalScrollBar.lineScrollSize);
}
public function set verticalPageScrollSize(_arg1:Number):void{
_verticalPageScrollSize = _arg1;
invalidate(InvalidationType.SIZE);
}
public function get verticalScrollPolicy():String{
return (_verticalScrollPolicy);
}
protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
}
public function get useBitmapScrolling():Boolean{
return (_useBitmpScrolling);
}
protected function handleScroll(_arg1:ScrollEvent):void{
if (_arg1.target == _verticalScrollBar){
setVerticalScrollPosition(_arg1.position);
} else {
setHorizontalScrollPosition(_arg1.position);
};
}
public function set verticalLineScrollSize(_arg1:Number):void{
_verticalScrollBar.lineScrollSize = _arg1;
}
public function get verticalScrollBar():ScrollBar{
return (_verticalScrollBar);
}
protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
}
public function set horizontalPageScrollSize(_arg1:Number):void{
_horizontalPageScrollSize = _arg1;
invalidate(InvalidationType.SIZE);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
setStyles();
drawBackground();
if (contentPadding != getStyleValue("contentPadding")){
invalidate(InvalidationType.SIZE, false);
};
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STATE)){
drawLayout();
};
updateChildren();
super.draw();
}
public function set horizontalScrollPolicy(_arg1:String):void{
_horizontalScrollPolicy = _arg1;
invalidate(InvalidationType.SIZE);
}
override protected function configUI():void{
var _local1:Graphics;
super.configUI();
contentScrollRect = new Rectangle(0, 0, 85, 85);
_verticalScrollBar = new ScrollBar();
_verticalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true);
_verticalScrollBar.visible = false;
_verticalScrollBar.lineScrollSize = defaultLineScrollSize;
addChild(_verticalScrollBar);
copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES);
_horizontalScrollBar = new ScrollBar();
_horizontalScrollBar.direction = ScrollBarDirection.HORIZONTAL;
_horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true);
_horizontalScrollBar.visible = false;
_horizontalScrollBar.lineScrollSize = defaultLineScrollSize;
addChild(_horizontalScrollBar);
copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES);
disabledOverlay = new Shape();
_local1 = disabledOverlay.graphics;
_local1.beginFill(0xFFFFFF);
_local1.drawRect(0, 0, width, height);
_local1.endFill();
addEventListener(MouseEvent.MOUSE_WHEEL, handleWheel, false, 0, true);
}
protected function calculateContentWidth():void{
}
public function get verticalPageScrollSize():Number{
if (isNaN(availableHeight)){
drawNow();
};
return (((((_verticalPageScrollSize == 0)) && (!(isNaN(availableHeight))))) ? availableHeight : _verticalPageScrollSize);
}
protected function drawLayout():void{
calculateAvailableSize();
calculateContentWidth();
background.width = width;
background.height = height;
if (vScrollBar){
_verticalScrollBar.visible = true;
_verticalScrollBar.x = ((width - ScrollBar.WIDTH) - contentPadding);
_verticalScrollBar.y = contentPadding;
_verticalScrollBar.height = availableHeight;
} else {
_verticalScrollBar.visible = false;
};
_verticalScrollBar.setScrollProperties(availableHeight, 0, (contentHeight - availableHeight), verticalPageScrollSize);
setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false);
if (hScrollBar){
_horizontalScrollBar.visible = true;
_horizontalScrollBar.x = contentPadding;
_horizontalScrollBar.y = ((height - ScrollBar.WIDTH) - contentPadding);
_horizontalScrollBar.width = availableWidth;
} else {
_horizontalScrollBar.visible = false;
};
_horizontalScrollBar.setScrollProperties(availableWidth, 0, (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - availableWidth), horizontalPageScrollSize);
setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false);
drawDisabledOverlay();
}
protected function drawBackground():void{
var _local1:DisplayObject;
_local1 = background;
background = getDisplayObjectInstance(getStyleValue("skin"));
background.width = width;
background.height = height;
addChildAt(background, 0);
if (((!((_local1 == null))) && (!((_local1 == background))))){
removeChild(_local1);
};
}
public function set horizontalLineScrollSize(_arg1:Number):void{
_horizontalScrollBar.lineScrollSize = _arg1;
}
public function get horizontalPageScrollSize():Number{
if (isNaN(availableWidth)){
drawNow();
};
return (((((_horizontalPageScrollSize == 0)) && (!(isNaN(availableWidth))))) ? availableWidth : _horizontalPageScrollSize);
}
public function get maxHorizontalScrollPosition():Number{
drawNow();
return (Math.max(0, (contentWidth - availableWidth)));
}
protected function setStyles():void{
copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES);
copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES);
}
protected function updateChildren():void{
_verticalScrollBar.enabled = (_horizontalScrollBar.enabled = enabled);
_verticalScrollBar.drawNow();
_horizontalScrollBar.drawNow();
}
public function set verticalScrollPolicy(_arg1:String):void{
_verticalScrollPolicy = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set useBitmapScrolling(_arg1:Boolean):void{
_useBitmpScrolling = _arg1;
invalidate(InvalidationType.STATE);
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, ScrollBar.getStyleDefinition()));
}
}
}//package fl.containers
Section 222
//CellRenderer (fl.controls.listClasses.CellRenderer)
package fl.controls.listClasses {
import fl.controls.*;
import flash.events.*;
public class CellRenderer extends LabelButton implements ICellRenderer {
protected var _data:Object;
protected var _listData:ListData;
private static var defaultStyles:Object = {upSkin:"CellRenderer_upSkin", downSkin:"CellRenderer_downSkin", overSkin:"CellRenderer_overSkin", disabledSkin:"CellRenderer_disabledSkin", selectedDisabledSkin:"CellRenderer_selectedDisabledSkin", selectedUpSkin:"CellRenderer_selectedUpSkin", selectedDownSkin:"CellRenderer_selectedDownSkin", selectedOverSkin:"CellRenderer_selectedOverSkin", textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5};
public function CellRenderer():void{
toggle = true;
focusEnabled = false;
}
override protected function toggleSelected(_arg1:MouseEvent):void{
}
override public function get selected():Boolean{
return (super.selected);
}
public function set listData(_arg1:ListData):void{
_listData = _arg1;
label = _listData.label;
setStyle("icon", _listData.icon);
}
override public function set selected(_arg1:Boolean):void{
super.selected = _arg1;
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
public function get listData():ListData{
return (_listData);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
super.setSize(_arg1, _arg2);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = 0;
if (icon != null){
icon.x = _local1;
icon.y = Math.round(((height - icon.height) >> 1));
_local2 = (icon.width + _local1);
};
if (label.length > 0){
textField.visible = true;
_local3 = Math.max(0, ((width - _local2) - (_local1 * 2)));
textField.width = _local3;
textField.height = (textField.textHeight + 4);
textField.x = (_local2 + _local1);
textField.y = Math.round(((height - textField.height) >> 1));
} else {
textField.visible = false;
};
background.width = width;
background.height = height;
}
public function get data():Object{
return (_data);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls.listClasses
Section 223
//ICellRenderer (fl.controls.listClasses.ICellRenderer)
package fl.controls.listClasses {
public interface ICellRenderer {
function setSize(_arg1:Number, _arg2:Number):void;
function get listData():ListData;
function get data():Object;
function setMouseState(_arg1:String):void;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function set data(_arg1:Object):void;
function set selected(_arg1:Boolean):void;
function set listData(_arg1:ListData):void;
function get selected():Boolean;
}
}//package fl.controls.listClasses
Section 224
//ListData (fl.controls.listClasses.ListData)
package fl.controls.listClasses {
import fl.core.*;
public class ListData {
protected var _index:uint;
protected var _owner:UIComponent;
protected var _label:String;
protected var _icon:Object;// = null
protected var _row:uint;
protected var _column:uint;
public function ListData(_arg1:String, _arg2:Object, _arg3:UIComponent, _arg4:uint, _arg5:uint, _arg6:uint=0){
_icon = null;
super();
_label = _arg1;
_icon = _arg2;
_owner = _arg3;
_index = _arg4;
_row = _arg5;
_column = _arg6;
}
public function get owner():UIComponent{
return (_owner);
}
public function get label():String{
return (_label);
}
public function get row():uint{
return (_row);
}
public function get index():uint{
return (_index);
}
public function get icon():Object{
return (_icon);
}
public function get column():uint{
return (_column);
}
}
}//package fl.controls.listClasses
Section 225
//BaseButton (fl.controls.BaseButton)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.events.*;
import flash.utils.*;
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 226
//Button (fl.controls.Button)
package fl.controls {
import fl.core.*;
import flash.display.*;
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 227
//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 228
//ComboBox (fl.controls.ComboBox)
package fl.controls {
import fl.controls.listClasses.*;
import fl.core.*;
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import fl.data.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.ui.*;
public class ComboBox extends UIComponent implements IFocusManagerComponent {
protected var _dropdownWidth:Number;
protected var highlightedCell:int;// = -1
protected var _prompt:String;
protected var isOpen:Boolean;// = false
protected var list:List;
protected var _rowCount:uint;// = 5
protected var currentIndex:int;
protected var isKeyDown:Boolean;// = false
protected var _labels:Array;
protected var background:BaseButton;
protected var inputField:TextInput;
protected var listOverIndex:uint;
protected var editableValue:String;
protected var _editable:Boolean;// = false
private var collectionItemImport:SimpleCollectionItem;
protected static const BACKGROUND_STYLES:Object = {overSkin:"overSkin", downSkin:"downSkin", upSkin:"upSkin", disabledSkin:"disabledSkin", repeatInterval:"repeatInterval"};
protected static const LIST_STYLES:Object = {upSkin:"comboListUpSkin", overSkin:"comboListOverSkin", downSkin:"comobListDownSkin", disabledSkin:"comboListDisabledSkin", downArrowDisabledSkin:"downArrowDisabledSkin", downArrowDownSkin:"downArrowDownSkin", downArrowOverSkin:"downArrowOverSkin", downArrowUpSkin:"downArrowUpSkin", upArrowDisabledSkin:"upArrowDisabledSkin", upArrowDownSkin:"upArrowDownSkin", upArrowOverSkin:"upArrowOverSkin", upArrowUpSkin:"upArrowUpSkin", thumbDisabledSkin:"thumbDisabledSkin", thumbDownSkin:"thumbDownSkin", thumbOverSkin:"thumbOverSkin", thumbUpSkin:"thumbUpSkin", thumbIcon:"thumbIcon", trackDisabledSkin:"trackDisabledSkin", trackDownSkin:"trackDownSkin", trackOverSkin:"trackOverSkin", trackUpSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval", textFormat:"textFormat", disabledAlpha:"disabledAlpha", skin:"listSkin"};
private static var defaultStyles:Object = {upSkin:"ComboBox_upSkin", downSkin:"ComboBox_downSkin", overSkin:"ComboBox_overSkin", disabledSkin:"ComboBox_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:3, buttonWidth:24, disabledAlpha:null, listSkin:null};
public static var createAccessibilityImplementation:Function;
public function ComboBox(){
_rowCount = 5;
_editable = false;
isOpen = false;
highlightedCell = -1;
isKeyDown = false;
super();
}
protected function drawList():void{
list.rowCount = Math.max(0, Math.min(_rowCount, list.dataProvider.length));
}
public function set imeMode(_arg1:String):void{
inputField.imeMode = _arg1;
}
public function get dropdown():List{
return (list);
}
public function get dropdownWidth():Number{
return (list.width);
}
public function sortItemsOn(_arg1:String, _arg2:Object=null){
return (list.sortItemsOn(_arg1, _arg2));
}
protected function onEnter(_arg1:ComponentEvent):void{
_arg1.stopPropagation();
}
public function removeItemAt(_arg1:uint):void{
list.removeItemAt(_arg1);
invalidate(InvalidationType.DATA);
}
public function open():void{
currentIndex = selectedIndex;
if (((isOpen) || ((length == 0)))){
return;
};
dispatchEvent(new Event(Event.OPEN));
isOpen = true;
addEventListener(Event.ENTER_FRAME, addCloseListener, false, 0, true);
positionList();
list.scrollToSelected();
stage.addChild(list);
}
public function get selectedItem():Object{
return (list.selectedItem);
}
public function set text(_arg1:String):void{
if (!editable){
return;
};
inputField.text = _arg1;
}
public function get labelField():String{
return (list.labelField);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:int;
var _local3:uint;
var _local4:Number;
var _local5:int;
isKeyDown = true;
if (_arg1.ctrlKey){
switch (_arg1.keyCode){
case Keyboard.UP:
if (highlightedCell > -1){
selectedIndex = highlightedCell;
dispatchEvent(new Event(Event.CHANGE));
};
close();
break;
case Keyboard.DOWN:
open();
break;
};
return;
};
_arg1.stopPropagation();
_local2 = Math.max(((calculateAvailableHeight() / list.rowHeight) << 0), 1);
_local3 = selectedIndex;
_local4 = ((highlightedCell)==-1) ? selectedIndex : highlightedCell;
_local5 = -1;
switch (_arg1.keyCode){
case Keyboard.SPACE:
if (isOpen){
close();
} else {
open();
};
return;
case Keyboard.ESCAPE:
if (isOpen){
if (highlightedCell > -1){
selectedIndex = selectedIndex;
};
close();
};
return;
case Keyboard.UP:
_local5 = Math.max(0, (_local4 - 1));
break;
case Keyboard.DOWN:
_local5 = Math.min((length - 1), (_local4 + 1));
break;
case Keyboard.PAGE_UP:
_local5 = Math.max((_local4 - _local2), 0);
break;
case Keyboard.PAGE_DOWN:
_local5 = Math.min((_local4 + _local2), (length - 1));
break;
case Keyboard.HOME:
_local5 = 0;
break;
case Keyboard.END:
_local5 = (length - 1);
break;
case Keyboard.ENTER:
if (((_editable) && ((highlightedCell == -1)))){
editableValue = inputField.text;
selectedIndex = -1;
} else {
if (((isOpen) && ((highlightedCell > -1)))){
editableValue = null;
selectedIndex = highlightedCell;
dispatchEvent(new Event(Event.CHANGE));
};
};
dispatchEvent(new ComponentEvent(ComponentEvent.ENTER));
close();
return;
default:
if (editable){
break;
};
_local5 = list.getNextIndexAtLetter(String.fromCharCode(_arg1.keyCode), _local4);
break;
};
if (_local5 > -1){
if (isOpen){
highlightCell(_local5);
inputField.text = list.itemToLabel(getItemAt(_local5));
} else {
highlightCell();
selectedIndex = _local5;
dispatchEvent(new Event(Event.CHANGE));
};
};
}
public function set dropdownWidth(_arg1:Number):void{
_dropdownWidth = _arg1;
invalidate(InvalidationType.SIZE);
}
public function get editable():Boolean{
return (_editable);
}
override protected function focusInHandler(_arg1:FocusEvent):void{
super.focusInHandler(_arg1);
if (editable){
stage.focus = inputField.textField;
};
}
protected function onStageClick(_arg1:MouseEvent):void{
if (!isOpen){
return;
};
if (((!(contains((_arg1.target as DisplayObject)))) && (!(list.contains((_arg1.target as DisplayObject)))))){
if (highlightedCell != -1){
selectedIndex = highlightedCell;
dispatchEvent(new Event(Event.CHANGE));
};
close();
};
}
protected function handleDataChange(_arg1:DataChangeEvent):void{
invalidate(InvalidationType.DATA);
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
isKeyDown = false;
}
protected function onListItemUp(_arg1:MouseEvent):void{
var _local2:*;
stage.removeEventListener(MouseEvent.MOUSE_UP, onListItemUp);
if (((!((_arg1.target is ICellRenderer))) || (!(list.contains((_arg1.target as DisplayObject)))))){
return;
};
editableValue = null;
_local2 = selectedIndex;
selectedIndex = _arg1.target.listData.index;
if (_local2 != selectedIndex){
dispatchEvent(new Event(Event.CHANGE));
};
close();
}
public function removeAll():void{
list.removeAll();
inputField.text = "";
invalidate(InvalidationType.DATA);
}
public function set selectedItem(_arg1:Object):void{
list.selectedItem = _arg1;
invalidate(InvalidationType.SELECTED);
}
protected function highlightCell(_arg1:int=-1):void{
var _local2:ICellRenderer;
if (highlightedCell > -1){
_local2 = list.itemToCellRenderer(getItemAt(highlightedCell));
if (_local2 != null){
_local2.setMouseState("up");
};
};
if (_arg1 == -1){
return;
};
list.scrollToIndex(_arg1);
list.drawNow();
_local2 = list.itemToCellRenderer(getItemAt(_arg1));
if (_local2 != null){
_local2.setMouseState("over");
highlightedCell = _arg1;
};
}
public function itemToLabel(_arg1:Object):String{
if (_arg1 == null){
return ("");
};
return (list.itemToLabel(_arg1));
}
public function addItemAt(_arg1:Object, _arg2:uint):void{
list.addItemAt(_arg1, _arg2);
invalidate(InvalidationType.DATA);
}
public function replaceItemAt(_arg1:Object, _arg2:uint):Object{
return (list.replaceItemAt(_arg1, _arg2));
}
protected function showPrompt():void{
inputField.text = _prompt;
}
public function set rowCount(_arg1:uint):void{
_rowCount = _arg1;
invalidate(InvalidationType.SIZE);
}
public function get restrict():String{
return (inputField.restrict);
}
protected function setEmbedFonts():void{
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
inputField.textField.embedFonts = _local1;
};
}
public function sortItems(... _args){
return (list.sortItems.apply(list, _args));
}
public function set labelField(_arg1:String):void{
list.labelField = _arg1;
invalidate(InvalidationType.DATA);
}
public function set editable(_arg1:Boolean):void{
_editable = _arg1;
drawTextField();
}
public function set prompt(_arg1:String):void{
if (_arg1 == ""){
_prompt = null;
} else {
_prompt = _arg1;
};
invalidate(InvalidationType.STATE);
}
public function get length():int{
return (list.length);
}
protected function drawTextField():void{
inputField.setStyle("upSkin", "");
inputField.setStyle("disabledSkin", "");
inputField.enabled = enabled;
inputField.editable = _editable;
inputField.textField.selectable = ((enabled) && (_editable));
inputField.mouseEnabled = (inputField.mouseChildren = ((enabled) && (_editable)));
inputField.focusEnabled = false;
if (_editable){
inputField.addEventListener(FocusEvent.FOCUS_IN, onInputFieldFocus, false, 0, true);
inputField.addEventListener(FocusEvent.FOCUS_OUT, onInputFieldFocusOut, false, 0, true);
} else {
inputField.removeEventListener(FocusEvent.FOCUS_IN, onInputFieldFocus);
inputField.removeEventListener(FocusEvent.FOCUS_OUT, onInputFieldFocusOut);
};
}
protected function onInputFieldFocusOut(_arg1:FocusEvent):void{
inputField.removeEventListener(ComponentEvent.ENTER, onEnter);
selectedIndex = selectedIndex;
}
protected function passEvent(_arg1:Event):void{
dispatchEvent(_arg1);
}
public function get imeMode():String{
return (inputField.imeMode);
}
public function get labelFunction():Function{
return (list.labelFunction);
}
protected function calculateAvailableHeight():Number{
var _local1:Number;
_local1 = Number(getStyleValue("contentPadding"));
return ((list.height - (_local1 * 2)));
}
public function get selectedIndex():int{
return (list.selectedIndex);
}
override protected function focusOutHandler(_arg1:FocusEvent):void{
isKeyDown = false;
if (isOpen){
if (((!(_arg1.relatedObject)) || (!(list.contains(_arg1.relatedObject))))){
if (((!((highlightedCell == -1))) && (!((highlightedCell == selectedIndex))))){
selectedIndex = highlightedCell;
dispatchEvent(new Event(Event.CHANGE));
};
close();
};
};
super.focusOutHandler(_arg1);
}
public function get selectedLabel():String{
if (editableValue != null){
return (editableValue);
};
if (selectedIndex == -1){
return (null);
};
return (itemToLabel(selectedItem));
}
public function get text():String{
return (inputField.text);
}
protected function onListChange(_arg1:Event):void{
editableValue = null;
dispatchEvent(_arg1);
invalidate(InvalidationType.SELECTED);
if (isKeyDown){
return;
};
close();
}
protected function onToggleListVisibility(_arg1:MouseEvent):void{
_arg1.stopPropagation();
dispatchEvent(_arg1);
if (isOpen){
close();
} else {
open();
stage.addEventListener(MouseEvent.MOUSE_UP, onListItemUp, false, 0, true);
};
}
override protected function draw():void{
var _local1:*;
_local1 = selectedIndex;
if ((((_local1 == -1)) && (((((!((prompt == null))) || (editable))) || ((length == 0)))))){
_local1 = Math.max(-1, Math.min(_local1, (length - 1)));
} else {
editableValue = null;
_local1 = Math.max(0, Math.min(_local1, (length - 1)));
};
if (list.selectedIndex != _local1){
list.selectedIndex = _local1;
invalidate(InvalidationType.SELECTED, false);
};
if (isInvalid(InvalidationType.STYLES)){
setStyles();
setEmbedFonts();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.DATA, InvalidationType.STATE)){
drawTextFormat();
drawLayout();
invalidate(InvalidationType.DATA);
};
if (isInvalid(InvalidationType.DATA)){
drawList();
invalidate(InvalidationType.SELECTED, true);
};
if (isInvalid(InvalidationType.SELECTED)){
if ((((_local1 == -1)) && (!((editableValue == null))))){
inputField.text = editableValue;
} else {
if (_local1 > -1){
if (length > 0){
inputField.horizontalScrollPosition = 0;
inputField.text = itemToLabel(list.selectedItem);
};
} else {
if ((((_local1 == -1)) && (!((_prompt == null))))){
showPrompt();
} else {
inputField.text = "";
};
};
};
if (((((editable) && ((selectedIndex > -1)))) && ((stage.focus == inputField.textField)))){
inputField.setSelection(0, inputField.length);
};
};
drawTextField();
super.draw();
}
public function addItem(_arg1:Object):void{
list.addItem(_arg1);
invalidate(InvalidationType.DATA);
}
public function get rowCount():uint{
return (_rowCount);
}
override protected function configUI():void{
super.configUI();
background = new BaseButton();
background.focusEnabled = false;
copyStylesToChild(background, BACKGROUND_STYLES);
background.addEventListener(MouseEvent.MOUSE_DOWN, onToggleListVisibility, false, 0, true);
addChild(background);
inputField = new TextInput();
inputField.focusTarget = (this as IFocusManagerComponent);
inputField.focusEnabled = false;
inputField.addEventListener(Event.CHANGE, onTextInput, false, 0, true);
addChild(inputField);
list = new List();
list.focusEnabled = false;
copyStylesToChild(list, LIST_STYLES);
list.addEventListener(Event.CHANGE, onListChange, false, 0, true);
list.addEventListener(ListEvent.ITEM_CLICK, onListChange, false, 0, true);
list.addEventListener(ListEvent.ITEM_ROLL_OUT, passEvent, false, 0, true);
list.addEventListener(ListEvent.ITEM_ROLL_OVER, passEvent, false, 0, true);
list.verticalScrollBar.addEventListener(Event.SCROLL, passEvent, false, 0, true);
}
protected function positionList():void{
var _local1:Point;
_local1 = localToGlobal(new Point(0, 0));
list.x = _local1.x;
if (((_local1.y + height) + list.height) > stage.stageHeight){
list.y = (_local1.y - list.height);
} else {
list.y = (_local1.y + height);
};
}
public function get value():String{
var _local1:Object;
if (editableValue != null){
return (editableValue);
};
_local1 = selectedItem;
if (((!(_editable)) && (!((_local1.data == null))))){
return (_local1.data);
};
return (itemToLabel(_local1));
}
public function get prompt():String{
return (_prompt);
}
public function set dataProvider(_arg1:DataProvider):void{
_arg1.addEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange, false, 0, true);
list.dataProvider = _arg1;
invalidate(InvalidationType.DATA);
}
public function set restrict(_arg1:String):void{
if (((componentInspectorSetting) && ((_arg1 == "")))){
_arg1 = null;
};
if (!_editable){
return;
};
inputField.restrict = _arg1;
}
protected function onTextInput(_arg1:Event):void{
_arg1.stopPropagation();
if (!_editable){
return;
};
editableValue = inputField.text;
selectedIndex = -1;
dispatchEvent(new Event(Event.CHANGE));
}
protected function onInputFieldFocus(_arg1:FocusEvent):void{
inputField.addEventListener(ComponentEvent.ENTER, onEnter, false, 0, true);
close();
}
public function getItemAt(_arg1:uint):Object{
return (list.getItemAt(_arg1));
}
override protected function initializeAccessibility():void{
if (ComboBox.createAccessibilityImplementation != null){
ComboBox.createAccessibilityImplementation(this);
};
}
protected function drawLayout():void{
var _local1:Number;
var _local2:Number;
_local1 = (getStyleValue("buttonWidth") as Number);
_local2 = (getStyleValue("textPadding") as Number);
background.setSize(width, height);
inputField.x = (inputField.y = _local2);
inputField.setSize(((width - _local1) - _local2), (height - _local2));
list.width = (isNaN(_dropdownWidth)) ? width : _dropdownWidth;
background.enabled = enabled;
background.drawNow();
}
public function removeItem(_arg1:Object):Object{
return (list.removeItem(_arg1));
}
private function addCloseListener(_arg1:Event){
removeEventListener(Event.ENTER_FRAME, addCloseListener);
if (!isOpen){
return;
};
stage.addEventListener(MouseEvent.MOUSE_DOWN, onStageClick, false, 0, true);
}
public function get dataProvider():DataProvider{
return (list.dataProvider);
}
public function get textField():TextInput{
return (inputField);
}
protected function setStyles():void{
copyStylesToChild(background, BACKGROUND_STYLES);
copyStylesToChild(list, LIST_STYLES);
}
public function set labelFunction(_arg1:Function):void{
list.labelFunction = _arg1;
invalidate(InvalidationType.DATA);
}
protected function drawTextFormat():void{
var _local1:TextFormat;
_local1 = (getStyleValue((_enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local1 == null){
_local1 = new TextFormat();
};
inputField.textField.defaultTextFormat = _local1;
inputField.textField.setTextFormat(_local1);
setEmbedFonts();
}
public function set selectedIndex(_arg1:int):void{
list.selectedIndex = _arg1;
highlightCell();
invalidate(InvalidationType.SELECTED);
}
public function close():void{
highlightCell();
highlightedCell = -1;
if (!isOpen){
return;
};
dispatchEvent(new Event(Event.CLOSE));
stage.removeEventListener(MouseEvent.MOUSE_DOWN, onStageClick);
isOpen = false;
stage.removeChild(list);
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, List.getStyleDefinition()));
}
}
}//package fl.controls
Section 229
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import fl.core.*;
import flash.display.*;
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 230
//List (fl.controls.List)
package fl.controls {
import fl.controls.listClasses.*;
import fl.core.*;
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import fl.managers.*;
import flash.utils.*;
import flash.ui.*;
public class List extends SelectableList implements IFocusManagerComponent {
protected var _labelField:String;// = "label"
protected var _rowHeight:Number;// = 20
protected var _cellRenderer:Object;
protected var _iconField:String;// = "icon"
protected var _labelFunction:Function;
protected var _iconFunction:Function;
private static var defaultStyles:Object = {focusRectSkin:null, focusRectPadding:null};
public static var createAccessibilityImplementation:Function;
public function List(){
_rowHeight = 20;
_labelField = "label";
_iconField = "icon";
super();
}
public function get iconField():String{
return (_iconField);
}
protected function doKeySelection(_arg1:int, _arg2:Boolean, _arg3:Boolean):void{
var _local4:Boolean;
var _local5:int;
var _local6:Array;
var _local7:int;
var _local8:int;
_local4 = false;
if (_arg2){
_local6 = [];
_local7 = lastCaretIndex;
_local8 = _arg1;
if (_local7 == -1){
_local7 = ((caretIndex)!=-1) ? caretIndex : _arg1;
};
if (_local7 > _local8){
_local8 = _local7;
_local7 = _arg1;
};
_local5 = _local7;
while (_local5 <= _local8) {
_local6.push(_local5);
_local5++;
};
selectedIndices = _local6;
caretIndex = _arg1;
_local4 = true;
} else {
selectedIndex = _arg1;
caretIndex = (lastCaretIndex = _arg1);
_local4 = true;
};
if (_local4){
dispatchEvent(new Event(Event.CHANGE));
};
invalidate(InvalidationType.DATA);
}
override protected function drawList():void{
var _local1:Rectangle;
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:ICellRenderer;
var _local7:Dictionary;
var _local8:Dictionary;
var _local9:Boolean;
var _local10:String;
var _local11:Object;
var _local12:Sprite;
var _local13:String;
listHolder.x = (listHolder.y = contentPadding);
_local1 = listHolder.scrollRect;
_local1.x = _horizontalScrollPosition;
_local1.y = (Math.floor(_verticalScrollPosition) % rowHeight);
listHolder.scrollRect = _local1;
listHolder.cacheAsBitmap = useBitmapScrolling;
_local2 = Math.floor((_verticalScrollPosition / rowHeight));
_local3 = Math.min(length, ((_local2 + rowCount) + 1));
_local7 = (renderedItems = new Dictionary(true));
_local4 = _local2;
while (_local4 < _local3) {
_local7[_dataProvider.getItemAt(_local4)] = true;
_local4++;
};
_local8 = new Dictionary(true);
while (activeCellRenderers.length > 0) {
_local6 = (activeCellRenderers.pop() as ICellRenderer);
_local5 = _local6.data;
if ((((_local7[_local5] == null)) || ((invalidItems[_local5] == true)))){
availableCellRenderers.push(_local6);
} else {
_local8[_local5] = _local6;
invalidItems[_local5] = true;
};
list.removeChild((_local6 as DisplayObject));
};
invalidItems = new Dictionary(true);
_local4 = _local2;
while (_local4 < _local3) {
_local9 = false;
_local5 = _dataProvider.getItemAt(_local4);
if (_local8[_local5] != null){
_local9 = true;
_local6 = _local8[_local5];
delete _local8[_local5];
} else {
if (availableCellRenderers.length > 0){
_local6 = (availableCellRenderers.pop() as ICellRenderer);
} else {
_local6 = (getDisplayObjectInstance(getStyleValue("cellRenderer")) as ICellRenderer);
_local12 = (_local6 as Sprite);
if (_local12 != null){
_local12.addEventListener(MouseEvent.CLICK, handleCellRendererClick, false, 0, true);
_local12.addEventListener(MouseEvent.ROLL_OVER, handleCellRendererMouseEvent, false, 0, true);
_local12.addEventListener(MouseEvent.ROLL_OUT, handleCellRendererMouseEvent, false, 0, true);
_local12.addEventListener(Event.CHANGE, handleCellRendererChange, false, 0, true);
_local12.doubleClickEnabled = true;
_local12.addEventListener(MouseEvent.DOUBLE_CLICK, handleCellRendererDoubleClick, false, 0, true);
if (_local12["setStyle"] != null){
for (_local13 in rendererStyles) {
var _local16 = _local12;
_local16["setStyle"](_local13, rendererStyles[_local13]);
};
};
};
};
};
list.addChild((_local6 as Sprite));
activeCellRenderers.push(_local6);
_local6.y = (rowHeight * (_local4 - _local2));
_local6.setSize((availableWidth + _maxHorizontalScrollPosition), rowHeight);
_local10 = itemToLabel(_local5);
_local11 = null;
if (_iconFunction != null){
_local11 = _iconFunction(_local5);
} else {
if (_iconField != null){
_local11 = _local5[_iconField];
};
};
if (!_local9){
_local6.data = _local5;
};
_local6.listData = new ListData(_local10, _local11, this, _local4, _local4, 0);
_local6.selected = !((_selectedIndices.indexOf(_local4) == -1));
if ((_local6 is UIComponent)){
(_local6 as UIComponent).drawNow();
};
_local4++;
};
}
public function get iconFunction():Function{
return (_iconFunction);
}
public function set iconField(_arg1:String):void{
if (_arg1 == _iconField){
return;
};
_iconField = _arg1;
invalidate(InvalidationType.DATA);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:int;
if (!selectable){
return;
};
switch (_arg1.keyCode){
case Keyboard.UP:
case Keyboard.DOWN:
case Keyboard.END:
case Keyboard.HOME:
case Keyboard.PAGE_UP:
case Keyboard.PAGE_DOWN:
moveSelectionVertically(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection)));
break;
case Keyboard.LEFT:
case Keyboard.RIGHT:
moveSelectionHorizontally(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection)));
break;
case Keyboard.SPACE:
if (caretIndex == -1){
caretIndex = 0;
};
doKeySelection(caretIndex, _arg1.shiftKey, _arg1.ctrlKey);
scrollToSelected();
break;
default:
_local2 = getNextIndexAtLetter(String.fromCharCode(_arg1.keyCode), selectedIndex);
if (_local2 > -1){
selectedIndex = _local2;
scrollToSelected();
};
break;
};
_arg1.stopPropagation();
}
override public function itemToLabel(_arg1:Object):String{
if (_labelFunction != null){
return (String(_labelFunction(_arg1)));
};
return (((_arg1[_labelField])!=null) ? String(_arg1[_labelField]) : "");
}
public function get labelField():String{
return (_labelField);
}
override protected function moveSelectionVertically(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{
var _local4:int;
var _local5:int;
var _local6:int;
_local4 = Math.max(Math.floor((calculateAvailableHeight() / rowHeight)), 1);
_local5 = -1;
_local6 = 0;
switch (_arg1){
case Keyboard.UP:
if (caretIndex > 0){
_local5 = (caretIndex - 1);
};
break;
case Keyboard.DOWN:
if (caretIndex < (length - 1)){
_local5 = (caretIndex + 1);
};
break;
case Keyboard.PAGE_UP:
if (caretIndex > 0){
_local5 = Math.max((caretIndex - _local4), 0);
};
break;
case Keyboard.PAGE_DOWN:
if (caretIndex < (length - 1)){
_local5 = Math.min((caretIndex + _local4), (length - 1));
};
break;
case Keyboard.HOME:
if (caretIndex > 0){
_local5 = 0;
};
break;
case Keyboard.END:
if (caretIndex < (length - 1)){
_local5 = (length - 1);
};
break;
};
if (_local5 >= 0){
doKeySelection(_local5, _arg2, _arg3);
scrollToSelected();
};
}
public function set labelField(_arg1:String):void{
if (_arg1 == _labelField){
return;
};
_labelField = _arg1;
invalidate(InvalidationType.DATA);
}
public function set rowCount(_arg1:uint):void{
var _local2:Number;
var _local3:Number;
_local2 = Number(getStyleValue("contentPadding"));
_local3 = ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_maxHorizontalScrollPosition > 0)))))) ? 15 : 0;
height = (((rowHeight * _arg1) + (2 * _local2)) + _local3);
}
override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
list.x = -(_arg1);
super.setHorizontalScrollPosition(_arg1, true);
}
public function set iconFunction(_arg1:Function):void{
if (_iconFunction == _arg1){
return;
};
_iconFunction = _arg1;
invalidate(InvalidationType.DATA);
}
public function get labelFunction():Function{
return (_labelFunction);
}
override protected function moveSelectionHorizontally(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{
}
override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
invalidate(InvalidationType.SCROLL);
super.setVerticalScrollPosition(_arg1, true);
}
protected function calculateAvailableHeight():Number{
var _local1:Number;
_local1 = Number(getStyleValue("contentPadding"));
return (((height - (_local1 * 2)) - ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_maxHorizontalScrollPosition > 0)))))) ? 15 : 0));
}
override protected function draw():void{
var _local1:Boolean;
_local1 = !((contentHeight == (rowHeight * length)));
contentHeight = (rowHeight * length);
if (isInvalid(InvalidationType.STYLES)){
setStyles();
drawBackground();
if (contentPadding != getStyleValue("contentPadding")){
invalidate(InvalidationType.SIZE, false);
};
if (_cellRenderer != getStyleValue("cellRenderer")){
_invalidateList();
_cellRenderer = getStyleValue("cellRenderer");
};
};
if (((isInvalid(InvalidationType.SIZE, InvalidationType.STATE)) || (_local1))){
drawLayout();
};
if (isInvalid(InvalidationType.RENDERER_STYLES)){
updateRendererStyles();
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.SIZE, InvalidationType.DATA, InvalidationType.SCROLL, InvalidationType.SELECTED)){
drawList();
};
updateChildren();
validate();
}
override protected function configUI():void{
useFixedHorizontalScrolling = true;
_horizontalScrollPolicy = ScrollPolicy.AUTO;
_verticalScrollPolicy = ScrollPolicy.AUTO;
super.configUI();
}
override public function get rowCount():uint{
return (Math.ceil((calculateAvailableHeight() / rowHeight)));
}
override protected function initializeAccessibility():void{
if (List.createAccessibilityImplementation != null){
List.createAccessibilityImplementation(this);
};
}
override public function scrollToIndex(_arg1:int):void{
var _local2:uint;
var _local3:uint;
drawNow();
_local2 = (Math.floor(((_verticalScrollPosition + availableHeight) / rowHeight)) - 1);
_local3 = Math.ceil((_verticalScrollPosition / rowHeight));
if (_arg1 < _local3){
verticalScrollPosition = (_arg1 * rowHeight);
} else {
if (_arg1 > _local2){
verticalScrollPosition = (((_arg1 + 1) * rowHeight) - availableHeight);
};
};
}
public function get rowHeight():Number{
return (_rowHeight);
}
public function set labelFunction(_arg1:Function):void{
if (_labelFunction == _arg1){
return;
};
_labelFunction = _arg1;
invalidate(InvalidationType.DATA);
}
public function set rowHeight(_arg1:Number):void{
_rowHeight = _arg1;
invalidate(InvalidationType.SIZE);
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, SelectableList.getStyleDefinition()));
}
}
}//package fl.controls
Section 231
//RadioButton (fl.controls.RadioButton)
package fl.controls {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import flash.ui.*;
public class RadioButton extends LabelButton implements IFocusManagerGroup {
protected var _value:Object;
protected var defaultGroupName:String;// = "RadioButtonGroup"
protected var _group:RadioButtonGroup;
private static var defaultStyles:Object = {icon:null, upIcon:"RadioButton_upIcon", downIcon:"RadioButton_downIcon", overIcon:"RadioButton_overIcon", disabledIcon:"RadioButton_disabledIcon", selectedDisabledIcon:"RadioButton_selectedDisabledIcon", selectedUpIcon:"RadioButton_selectedUpIcon", selectedDownIcon:"RadioButton_selectedDownIcon", selectedOverIcon:"RadioButton_selectedOverIcon", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5};
public static var createAccessibilityImplementation:Function;
public function RadioButton(){
defaultGroupName = "RadioButtonGroup";
super();
mode = "border";
groupName = defaultGroupName;
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = (background.x - _local2);
uiFocusRect.y = (background.y - _local2);
uiFocusRect.width = (background.width + (_local2 * 2));
uiFocusRect.height = (background.height + (_local2 * 2));
};
}
private function setThis():void{
var _local1:RadioButtonGroup;
_local1 = _group;
if (_local1 != null){
if (_local1.selection != this){
_local1.selection = this;
};
} else {
super.selected = true;
};
}
override public function get autoRepeat():Boolean{
return (false);
}
override public function set autoRepeat(_arg1:Boolean):void{
}
protected function handleClick(_arg1:MouseEvent):void{
if (_group == null){
return;
};
_group.dispatchEvent(new MouseEvent(MouseEvent.CLICK, true));
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case Keyboard.DOWN:
setNext(!(_arg1.ctrlKey));
_arg1.stopPropagation();
break;
case Keyboard.UP:
setPrev(!(_arg1.ctrlKey));
_arg1.stopPropagation();
break;
case Keyboard.LEFT:
setPrev(!(_arg1.ctrlKey));
_arg1.stopPropagation();
break;
case Keyboard.RIGHT:
setNext(!(_arg1.ctrlKey));
_arg1.stopPropagation();
break;
case Keyboard.SPACE:
setThis();
_toggle = false;
default:
super.keyDownHandler(_arg1);
break;
};
}
private function setNext(_arg1:Boolean=true):void{
var _local2:RadioButtonGroup;
var _local3:IFocusManager;
var _local4:int;
var _local5:Number;
var _local6:int;
var _local7:*;
_local2 = _group;
if (_local2 == null){
return;
};
_local3 = focusManager;
if (_local3){
_local3.showFocusIndicator = true;
};
_local4 = _local2.getRadioButtonIndex(this);
_local5 = _local2.numRadioButtons;
_local6 = _local4;
if (_local4 != -1){
do {
_local6++;
_local6 = ((_local6)>(_local2.numRadioButtons - 1)) ? 0 : _local6;
_local7 = _local2.getRadioButtonAt(_local6);
if (((_local7) && (_local7.enabled))){
if (_arg1){
_local2.selection = _local7;
};
_local7.setFocus();
return;
};
if (((_arg1) && (!((_local2.getRadioButtonAt(_local6) == _local2.selection))))){
_local2.selection = this;
};
this.drawFocus(true);
} while (_local6 != _local4);
};
}
public function get group():RadioButtonGroup{
return (_group);
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
super.keyUpHandler(_arg1);
if ((((_arg1.keyCode == Keyboard.SPACE)) && (!(_toggle)))){
_toggle = true;
};
}
override public function get selected():Boolean{
return (super.selected);
}
override public function set toggle(_arg1:Boolean):void{
throw (new Error("Warning: You cannot change a RadioButtons toggle."));
}
public function set value(_arg1:Object):void{
_value = _arg1;
}
public function set group(_arg1:RadioButtonGroup):void{
groupName = _arg1.name;
}
override public function set selected(_arg1:Boolean):void{
if ((((_arg1 == false)) || (selected))){
return;
};
if (_group != null){
_group.selection = this;
} else {
super.selected = _arg1;
};
}
override protected function draw():void{
super.draw();
}
override public function get toggle():Boolean{
return (true);
}
override protected function configUI():void{
var _local1:Shape;
var _local2:Graphics;
super.configUI();
super.toggle = true;
_local1 = new Shape();
_local2 = _local1.graphics;
_local2.beginFill(0, 0);
_local2.drawRect(0, 0, 100, 100);
_local2.endFill();
background = (_local1 as DisplayObject);
addChildAt(background, 0);
addEventListener(MouseEvent.CLICK, handleClick, false, 0, true);
}
public function set groupName(_arg1:String):void{
if (_group != null){
_group.removeRadioButton(this);
_group.removeEventListener(Event.CHANGE, handleChange);
};
_group = ((_arg1)==null) ? null : RadioButtonGroup.getGroup(_arg1);
if (_group != null){
_group.addRadioButton(this);
_group.addEventListener(Event.CHANGE, handleChange, false, 0, true);
};
}
public function get value():Object{
return (_value);
}
override protected function drawLayout():void{
var _local1:Number;
super.drawLayout();
_local1 = Number(getStyleValue("textPadding"));
switch (_labelPlacement){
case ButtonLabelPlacement.RIGHT:
icon.x = _local1;
textField.x = (icon.x + (icon.width + _local1));
background.width = ((textField.x + textField.width) + _local1);
background.height = (Math.max(textField.height, icon.height) + (_local1 * 2));
break;
case ButtonLabelPlacement.LEFT:
icon.x = ((width - icon.width) - _local1);
textField.x = (((width - icon.width) - (_local1 * 2)) - textField.width);
background.width = ((textField.width + icon.width) + (_local1 * 3));
background.height = (Math.max(textField.height, icon.height) + (_local1 * 2));
break;
case ButtonLabelPlacement.TOP:
case ButtonLabelPlacement.BOTTOM:
background.width = (Math.max(textField.width, icon.width) + (_local1 * 2));
background.height = ((textField.height + icon.height) + (_local1 * 3));
break;
};
background.x = Math.min((icon.x - _local1), (textField.x - _local1));
background.y = Math.min((icon.y - _local1), (textField.y - _local1));
}
override protected function drawBackground():void{
}
override protected function initializeAccessibility():void{
if (RadioButton.createAccessibilityImplementation != null){
RadioButton.createAccessibilityImplementation(this);
};
}
public function get groupName():String{
return (((_group)==null) ? null : _group.name);
}
private function setPrev(_arg1:Boolean=true):void{
var _local2:RadioButtonGroup;
var _local3:IFocusManager;
var _local4:int;
var _local5:int;
var _local6:*;
_local2 = _group;
if (_local2 == null){
return;
};
_local3 = focusManager;
if (_local3){
_local3.showFocusIndicator = true;
};
_local4 = _local2.getRadioButtonIndex(this);
_local5 = _local4;
if (_local4 != -1){
do {
--_local5;
_local5 = ((_local5)==-1) ? (_local2.numRadioButtons - 1) : _local5;
_local6 = _local2.getRadioButtonAt(_local5);
if (((_local6) && (_local6.enabled))){
if (_arg1){
_local2.selection = _local6;
};
_local6.setFocus();
return;
};
if (((_arg1) && (!((_local2.getRadioButtonAt(_local5) == _local2.selection))))){
_local2.selection = this;
};
this.drawFocus(true);
} while (_local5 != _local4);
};
}
protected function handleChange(_arg1:Event):void{
super.selected = (_group.selection == this);
dispatchEvent(new Event(Event.CHANGE, true));
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 232
//RadioButtonGroup (fl.controls.RadioButtonGroup)
package fl.controls {
import flash.events.*;
public class RadioButtonGroup extends EventDispatcher {
protected var _selection:RadioButton;
protected var radioButtons:Array;
protected var _name:String;
private static var groups:Object;
private static var groupCount:uint = 0;
public function RadioButtonGroup(_arg1:String){
_name = _arg1;
radioButtons = [];
registerGroup(this);
}
public function getRadioButtonIndex(_arg1:RadioButton):int{
var _local2:int;
var _local3:RadioButton;
_local2 = 0;
while (_local2 < radioButtons.length) {
_local3 = (radioButtons[_local2] as RadioButton);
if (_local3 == _arg1){
return (_local2);
};
_local2++;
};
return (-1);
}
public function get numRadioButtons():int{
return (radioButtons.length);
}
public function get name():String{
return (_name);
}
public function get selection():RadioButton{
return (_selection);
}
public function set selection(_arg1:RadioButton):void{
if ((((((_selection == _arg1)) || ((_arg1 == null)))) || ((getRadioButtonIndex(_arg1) == -1)))){
return;
};
_selection = _arg1;
dispatchEvent(new Event(Event.CHANGE, true));
}
public function set selectedData(_arg1:Object):void{
var _local2:int;
var _local3:RadioButton;
_local2 = 0;
while (_local2 < radioButtons.length) {
_local3 = (radioButtons[_local2] as RadioButton);
if (_local3.value == _arg1){
selection = _local3;
return;
};
_local2++;
};
}
public function removeRadioButton(_arg1:RadioButton):void{
var _local2:int;
_local2 = getRadioButtonIndex(_arg1);
if (_local2 != -1){
radioButtons.splice(_local2, 1);
};
if (_selection == _arg1){
_selection = null;
};
}
public function addRadioButton(_arg1:RadioButton):void{
if (_arg1.groupName != name){
_arg1.groupName = name;
return;
};
radioButtons.push(_arg1);
if (_arg1.selected){
selection = _arg1;
};
}
public function getRadioButtonAt(_arg1:int):RadioButton{
return (RadioButton(radioButtons[_arg1]));
}
public function get selectedData():Object{
var _local1:RadioButton;
_local1 = _selection;
return (((_local1)==null) ? null : _local1.value);
}
public static function getGroup(_arg1:String):RadioButtonGroup{
var _local2:RadioButtonGroup;
if (groups == null){
groups = {};
};
_local2 = (groups[_arg1] as RadioButtonGroup);
if (_local2 == null){
_local2 = new RadioButtonGroup(_arg1);
if ((++groupCount % 20) == 0){
cleanUpGroups();
};
};
return (_local2);
}
private static function registerGroup(_arg1:RadioButtonGroup):void{
if (groups == null){
groups = {};
};
groups[_arg1.name] = _arg1;
}
private static function cleanUpGroups():void{
var _local1:String;
var _local2:RadioButtonGroup;
for (_local1 in groups) {
_local2 = (groups[_local1] as RadioButtonGroup);
if (_local2.radioButtons.length == 0){
delete groups[_local1];
};
};
}
}
}//package fl.controls
Section 233
//ScrollBar (fl.controls.ScrollBar)
package fl.controls {
import fl.core.*;
import flash.events.*;
import fl.events.*;
public class ScrollBar extends UIComponent {
private var _direction:String;// = "vertical"
protected var inDrag:Boolean;// = false
protected var upArrow:BaseButton;
private var _pageScrollSize:Number;// = 0
protected var downArrow:BaseButton;
private var _pageSize:Number;// = 10
private var thumbScrollOffset:Number;
private var _maxScrollPosition:Number;// = 0
private var _scrollPosition:Number;// = 0
protected var track:BaseButton;
private var _minScrollPosition:Number;// = 0
private var _lineScrollSize:Number;// = 1
protected var thumb:LabelButton;
protected static const THUMB_STYLES:Object = {disabledSkin:"thumbDisabledSkin", downSkin:"thumbDownSkin", overSkin:"thumbOverSkin", upSkin:"thumbUpSkin", icon:"thumbIcon", textPadding:0};
public static const WIDTH:Number = 15;
protected static const DOWN_ARROW_STYLES:Object = {disabledSkin:"downArrowDisabledSkin", downSkin:"downArrowDownSkin", overSkin:"downArrowOverSkin", upSkin:"downArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
protected static const UP_ARROW_STYLES:Object = {disabledSkin:"upArrowDisabledSkin", downSkin:"upArrowDownSkin", overSkin:"upArrowOverSkin", upSkin:"upArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
protected static const TRACK_STYLES:Object = {disabledSkin:"trackDisabledSkin", downSkin:"trackDownSkin", overSkin:"trackOverSkin", upSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
private static var defaultStyles:Object = {downArrowDisabledSkin:"ScrollArrowDown_disabledSkin", downArrowDownSkin:"ScrollArrowDown_downSkin", downArrowOverSkin:"ScrollArrowDown_overSkin", downArrowUpSkin:"ScrollArrowDown_upSkin", thumbDisabledSkin:"ScrollThumb_upSkin", thumbDownSkin:"ScrollThumb_downSkin", thumbOverSkin:"ScrollThumb_overSkin", thumbUpSkin:"ScrollThumb_upSkin", trackDisabledSkin:"ScrollTrack_skin", trackDownSkin:"ScrollTrack_skin", trackOverSkin:"ScrollTrack_skin", trackUpSkin:"ScrollTrack_skin", upArrowDisabledSkin:"ScrollArrowUp_disabledSkin", upArrowDownSkin:"ScrollArrowUp_downSkin", upArrowOverSkin:"ScrollArrowUp_overSkin", upArrowUpSkin:"ScrollArrowUp_upSkin", thumbIcon:"ScrollBar_thumbIcon", repeatDelay:500, repeatInterval:35};
public function ScrollBar(){
_pageSize = 10;
_pageScrollSize = 0;
_lineScrollSize = 1;
_minScrollPosition = 0;
_maxScrollPosition = 0;
_scrollPosition = 0;
_direction = ScrollBarDirection.VERTICAL;
inDrag = false;
super();
setStyles();
focusEnabled = false;
}
public function get minScrollPosition():Number{
return (_minScrollPosition);
}
public function set minScrollPosition(_arg1:Number):void{
setScrollProperties(_pageSize, _arg1, _maxScrollPosition);
}
public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{
var _local3:Number;
_local3 = scrollPosition;
_scrollPosition = Math.max(_minScrollPosition, Math.min(_maxScrollPosition, _arg1));
if (_local3 == _scrollPosition){
return;
};
if (_arg2){
dispatchEvent(new ScrollEvent(_direction, (scrollPosition - _local3), scrollPosition));
};
updateThumb();
}
public function set scrollPosition(_arg1:Number):void{
setScrollPosition(_arg1, true);
}
public function get pageScrollSize():Number{
return (((_pageScrollSize)==0) ? _pageSize : _pageScrollSize);
}
public function set pageSize(_arg1:Number):void{
if (_arg1 > 0){
_pageSize = _arg1;
};
}
public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{
this.pageSize = _arg1;
_minScrollPosition = _arg2;
_maxScrollPosition = _arg3;
if (_arg4 >= 0){
_pageScrollSize = _arg4;
};
enabled = (_maxScrollPosition > _minScrollPosition);
setScrollPosition(_scrollPosition, false);
updateThumb();
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
downArrow.enabled = (track.enabled = (thumb.enabled = (upArrow.enabled = ((enabled) && ((_maxScrollPosition > _minScrollPosition))))));
updateThumb();
}
protected function updateThumb():void{
var _local1:Number;
_local1 = ((_maxScrollPosition - _minScrollPosition) + _pageSize);
if ((((((track.height <= 12)) || ((_maxScrollPosition <= _minScrollPosition)))) || ((((_local1 == 0)) || (isNaN(_local1)))))){
thumb.height = 12;
thumb.visible = false;
} else {
thumb.height = Math.max(13, ((_pageSize / _local1) * track.height));
thumb.y = (track.y + ((track.height - thumb.height) * ((_scrollPosition - _minScrollPosition) / (_maxScrollPosition - _minScrollPosition))));
thumb.visible = enabled;
};
}
protected function thumbPressHandler(_arg1:MouseEvent):void{
inDrag = true;
thumbScrollOffset = (mouseY - thumb.y);
thumb.mouseStateLocked = true;
mouseChildren = false;
stage.addEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true);
}
protected function thumbReleaseHandler(_arg1:MouseEvent):void{
inDrag = false;
mouseChildren = true;
thumb.mouseStateLocked = false;
stage.removeEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler);
}
public function set pageScrollSize(_arg1:Number):void{
if (_arg1 >= 0){
_pageScrollSize = _arg1;
};
}
protected function handleThumbDrag(_arg1:MouseEvent):void{
var _local2:Number;
_local2 = Math.max(0, Math.min((track.height - thumb.height), ((mouseY - track.y) - thumbScrollOffset)));
setScrollPosition((((_local2 / (track.height - thumb.height)) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition));
}
public function set direction(_arg1:String):void{
var _local2:Boolean;
if (_direction == _arg1){
return;
};
_direction = _arg1;
if (isLivePreview){
return;
};
setScaleY(1);
_local2 = (_direction == ScrollBarDirection.HORIZONTAL);
if (((_local2) && (componentInspectorSetting))){
if (rotation == 90){
return;
};
setScaleX(-1);
rotation = -90;
};
if (!componentInspectorSetting){
if (((_local2) && ((rotation == 0)))){
rotation = -90;
setScaleX(-1);
} else {
if (((!(_local2)) && ((rotation == -90)))){
rotation = 0;
setScaleX(1);
};
};
};
invalidate(InvalidationType.SIZE);
}
public function set lineScrollSize(_arg1:Number):void{
if (_arg1 > 0){
_lineScrollSize = _arg1;
};
}
override public function get height():Number{
return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.width : super.height);
}
protected function scrollPressHandler(_arg1:ComponentEvent):void{
var _local2:Number;
var _local3:Number;
_arg1.stopImmediatePropagation();
if (_arg1.currentTarget == upArrow){
setScrollPosition((_scrollPosition - _lineScrollSize));
} else {
if (_arg1.currentTarget == downArrow){
setScrollPosition((_scrollPosition + _lineScrollSize));
} else {
_local2 = (((track.mouseY / track.height) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition);
_local3 = ((pageScrollSize)==0) ? pageSize : pageScrollSize;
if (_scrollPosition < _local2){
setScrollPosition(Math.min(_local2, (_scrollPosition + _local3)));
} else {
if (_scrollPosition > _local2){
setScrollPosition(Math.max(_local2, (_scrollPosition - _local3)));
};
};
};
};
}
public function get pageSize():Number{
return (_pageSize);
}
public function set maxScrollPosition(_arg1:Number):void{
setScrollProperties(_pageSize, _minScrollPosition, _arg1);
}
public function get scrollPosition():Number{
return (_scrollPosition);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
var _local1:Number;
if (isInvalid(InvalidationType.SIZE)){
_local1 = super.height;
downArrow.move(0, Math.max(upArrow.height, (_local1 - downArrow.height)));
track.setSize(WIDTH, Math.max(0, (_local1 - (downArrow.height + upArrow.height))));
updateThumb();
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
setStyles();
};
downArrow.drawNow();
upArrow.drawNow();
track.drawNow();
thumb.drawNow();
validate();
}
override protected function configUI():void{
super.configUI();
track = new BaseButton();
track.move(0, 14);
track.useHandCursor = false;
track.autoRepeat = true;
track.focusEnabled = false;
addChild(track);
thumb = new LabelButton();
thumb.label = "";
thumb.setSize(WIDTH, 15);
thumb.move(0, 15);
thumb.focusEnabled = false;
addChild(thumb);
downArrow = new BaseButton();
downArrow.setSize(WIDTH, 14);
downArrow.autoRepeat = true;
downArrow.focusEnabled = false;
addChild(downArrow);
upArrow = new BaseButton();
upArrow.setSize(WIDTH, 14);
upArrow.move(0, 0);
upArrow.autoRepeat = true;
upArrow.focusEnabled = false;
addChild(upArrow);
upArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
downArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
track.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true);
enabled = false;
}
public function get direction():String{
return (_direction);
}
public function get lineScrollSize():Number{
return (_lineScrollSize);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
if (_direction == ScrollBarDirection.HORIZONTAL){
super.setSize(_arg2, _arg1);
} else {
super.setSize(_arg1, _arg2);
};
}
public function get maxScrollPosition():Number{
return (_maxScrollPosition);
}
override public function get width():Number{
return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.height : super.width);
}
protected function setStyles():void{
copyStylesToChild(downArrow, DOWN_ARROW_STYLES);
copyStylesToChild(thumb, THUMB_STYLES);
copyStylesToChild(track, TRACK_STYLES);
copyStylesToChild(upArrow, UP_ARROW_STYLES);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 234
//ScrollBarDirection (fl.controls.ScrollBarDirection)
package fl.controls {
public class ScrollBarDirection {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
}
}//package fl.controls
Section 235
//ScrollPolicy (fl.controls.ScrollPolicy)
package fl.controls {
public class ScrollPolicy {
public static const OFF:String = "off";
public static const ON:String = "on";
public static const AUTO:String = "auto";
}
}//package fl.controls
Section 236
//SelectableList (fl.controls.SelectableList)
package fl.controls {
import fl.controls.listClasses.*;
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.data.*;
import fl.managers.*;
import fl.events.*;
import flash.utils.*;
import fl.containers.*;
import flash.ui.*;
public class SelectableList extends BaseScrollPane implements IFocusManagerComponent {
protected var invalidItems:Dictionary;
protected var renderedItems:Dictionary;
protected var listHolder:Sprite;
protected var _allowMultipleSelection:Boolean;// = false
protected var lastCaretIndex:int;// = -1
protected var _selectedIndices:Array;
protected var availableCellRenderers:Array;
protected var list:Sprite;
protected var caretIndex:int;// = -1
protected var updatedRendererStyles:Object;
protected var preChangeItems:Array;
protected var activeCellRenderers:Array;
protected var rendererStyles:Object;
protected var _verticalScrollPosition:Number;
protected var _dataProvider:DataProvider;
protected var _horizontalScrollPosition:Number;
private var collectionItemImport:SimpleCollectionItem;
protected var _selectable:Boolean;// = true
private static var defaultStyles:Object = {skin:"List_skin", cellRenderer:CellRenderer, contentPadding:null, disabledAlpha:null};
public static var createAccessibilityImplementation:Function;
public function SelectableList(){
_allowMultipleSelection = false;
_selectable = true;
caretIndex = -1;
lastCaretIndex = -1;
super();
activeCellRenderers = [];
availableCellRenderers = [];
invalidItems = new Dictionary(true);
renderedItems = new Dictionary(true);
_selectedIndices = [];
if (dataProvider == null){
dataProvider = new DataProvider();
};
verticalScrollPolicy = ScrollPolicy.AUTO;
rendererStyles = {};
updatedRendererStyles = {};
}
protected function drawList():void{
}
public function set allowMultipleSelection(_arg1:Boolean):void{
if (_arg1 == _allowMultipleSelection){
return;
};
_allowMultipleSelection = _arg1;
if (((!(_arg1)) && ((_selectedIndices.length > 1)))){
_selectedIndices = [_selectedIndices.pop()];
invalidate(InvalidationType.DATA);
};
}
public function sortItemsOn(_arg1:String, _arg2:Object=null){
return (_dataProvider.sortOn(_arg1, _arg2));
}
public function removeItemAt(_arg1:uint):Object{
return (_dataProvider.removeItemAt(_arg1));
}
public function get selectedItem():Object{
return (((_selectedIndices.length)==0) ? null : _dataProvider.getItemAt(selectedIndex));
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!selectable){
return;
};
switch (_arg1.keyCode){
case Keyboard.UP:
case Keyboard.DOWN:
case Keyboard.END:
case Keyboard.HOME:
case Keyboard.PAGE_UP:
case Keyboard.PAGE_DOWN:
moveSelectionVertically(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection)));
_arg1.stopPropagation();
break;
case Keyboard.LEFT:
case Keyboard.RIGHT:
moveSelectionHorizontally(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection)));
_arg1.stopPropagation();
break;
};
}
public function get selectable():Boolean{
return (_selectable);
}
public function itemToCellRenderer(_arg1:Object):ICellRenderer{
var _local2:*;
var _local3:ICellRenderer;
if (_arg1 != null){
for (_local2 in activeCellRenderers) {
_local3 = (activeCellRenderers[_local2] as ICellRenderer);
if (_local3.data == _arg1){
return (_local3);
};
};
};
return (null);
}
public function getNextIndexAtLetter(_arg1:String, _arg2:int=-1):int{
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:Object;
var _local7:String;
if (length == 0){
return (-1);
};
_arg1 = _arg1.toUpperCase();
_local3 = (length - 1);
_local4 = 0;
while (_local4 < _local3) {
_local5 = ((_arg2 + 1) + _local4);
if (_local5 > (length - 1)){
_local5 = (_local5 - length);
};
_local6 = getItemAt(_local5);
if (_local6 == null){
break;
};
_local7 = itemToLabel(_local6);
if (_local7 == null){
} else {
if (_local7.charAt(0).toUpperCase() == _arg1){
return (_local5);
};
};
_local4++;
};
return (-1);
}
public function invalidateList():void{
_invalidateList();
invalidate(InvalidationType.DATA);
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
list.mouseChildren = _enabled;
}
public function get selectedIndices():Array{
return (_selectedIndices.concat());
}
public function set selectable(_arg1:Boolean):void{
if (_arg1 == _selectable){
return;
};
if (!_arg1){
selectedIndices = [];
};
_selectable = _arg1;
}
public function itemToLabel(_arg1:Object):String{
return (_arg1["label"]);
}
public function addItemAt(_arg1:Object, _arg2:uint):void{
_dataProvider.addItemAt(_arg1, _arg2);
invalidateList();
}
public function replaceItemAt(_arg1:Object, _arg2:uint):Object{
return (_dataProvider.replaceItemAt(_arg1, _arg2));
}
protected function handleDataChange(_arg1:DataChangeEvent):void{
var _local2:int;
var _local3:int;
var _local4:String;
var _local5:uint;
_local2 = _arg1.startIndex;
_local3 = _arg1.endIndex;
_local4 = _arg1.changeType;
if (_local4 == DataChangeType.INVALIDATE_ALL){
clearSelection();
invalidateList();
} else {
if (_local4 == DataChangeType.INVALIDATE){
_local5 = 0;
while (_local5 < _arg1.items.length) {
invalidateItem(_arg1.items[_local5]);
_local5++;
};
} else {
if (_local4 == DataChangeType.ADD){
_local5 = 0;
while (_local5 < _selectedIndices.length) {
if (_selectedIndices[_local5] >= _local2){
_selectedIndices[_local5] = (_selectedIndices[_local5] + (_local2 - _local3));
};
_local5++;
};
} else {
if (_local4 == DataChangeType.REMOVE){
_local5 = 0;
while (_local5 < _selectedIndices.length) {
if (_selectedIndices[_local5] >= _local2){
if (_selectedIndices[_local5] <= _local3){
delete _selectedIndices[_local5];
} else {
_selectedIndices[_local5] = (_selectedIndices[_local5] - ((_local2 - _local3) + 1));
};
};
_local5++;
};
} else {
if (_local4 == DataChangeType.REMOVE_ALL){
clearSelection();
} else {
if (_local4 == DataChangeType.REPLACE){
} else {
selectedItems = preChangeItems;
preChangeItems = null;
};
};
};
};
};
};
invalidate(InvalidationType.DATA);
}
protected function _invalidateList():void{
availableCellRenderers = [];
while (activeCellRenderers.length > 0) {
list.removeChild((activeCellRenderers.pop() as DisplayObject));
};
}
protected function updateRendererStyles():void{
var _local1:Array;
var _local2:uint;
var _local3:uint;
var _local4:String;
_local1 = availableCellRenderers.concat(activeCellRenderers);
_local2 = _local1.length;
_local3 = 0;
while (_local3 < _local2) {
if (_local1[_local3].setStyle == null){
} else {
for (_local4 in updatedRendererStyles) {
_local1[_local3].setStyle(_local4, updatedRendererStyles[_local4]);
};
_local1[_local3].drawNow();
};
_local3++;
};
updatedRendererStyles = {};
}
public function set selectedItem(_arg1:Object):void{
var _local2:int;
_local2 = _dataProvider.getItemIndex(_arg1);
selectedIndex = _local2;
}
public function sortItems(... _args){
return (_dataProvider.sort.apply(_dataProvider, _args));
}
public function removeAll():void{
_dataProvider.removeAll();
}
protected function handleCellRendererChange(_arg1:Event):void{
var _local2:ICellRenderer;
var _local3:uint;
_local2 = (_arg1.currentTarget as ICellRenderer);
_local3 = _local2.listData.index;
_dataProvider.invalidateItemAt(_local3);
}
protected function moveSelectionVertically(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{
}
override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
var _local3:Number;
if (_arg1 == _horizontalScrollPosition){
return;
};
_local3 = (_arg1 - _horizontalScrollPosition);
_horizontalScrollPosition = _arg1;
if (_arg2){
dispatchEvent(new ScrollEvent(ScrollBarDirection.HORIZONTAL, _local3, _arg1));
};
}
public function scrollToSelected():void{
scrollToIndex(selectedIndex);
}
public function invalidateItem(_arg1:Object):void{
if (renderedItems[_arg1] == null){
return;
};
invalidItems[_arg1] = true;
invalidate(InvalidationType.DATA);
}
protected function handleCellRendererClick(_arg1:MouseEvent):void{
var _local2:ICellRenderer;
var _local3:uint;
var _local4:int;
var _local5:int;
var _local6:uint;
if (!_enabled){
return;
};
_local2 = (_arg1.currentTarget as ICellRenderer);
_local3 = _local2.listData.index;
if (((!(dispatchEvent(new ListEvent(ListEvent.ITEM_CLICK, false, true, _local2.listData.column, _local2.listData.row, _local3, _local2.data)))) || (!(_selectable)))){
return;
};
_local4 = selectedIndices.indexOf(_local3);
if (!_allowMultipleSelection){
if (_local4 != -1){
return;
};
_local2.selected = true;
_selectedIndices = [_local3];
lastCaretIndex = (caretIndex = _local3);
} else {
if (_arg1.shiftKey){
_local6 = ((_selectedIndices.length)>0) ? _selectedIndices[0] : _local3;
_selectedIndices = [];
if (_local6 > _local3){
_local5 = _local6;
while (_local5 >= _local3) {
_selectedIndices.push(_local5);
_local5--;
};
} else {
_local5 = _local6;
while (_local5 <= _local3) {
_selectedIndices.push(_local5);
_local5++;
};
};
caretIndex = _local3;
} else {
if (_arg1.ctrlKey){
if (_local4 != -1){
_local2.selected = false;
_selectedIndices.splice(_local4, 1);
} else {
_local2.selected = true;
_selectedIndices.push(_local3);
};
caretIndex = _local3;
} else {
_selectedIndices = [_local3];
lastCaretIndex = (caretIndex = _local3);
};
};
};
dispatchEvent(new Event(Event.CHANGE));
invalidate(InvalidationType.DATA);
}
public function get length():uint{
return (_dataProvider.length);
}
public function get allowMultipleSelection():Boolean{
return (_allowMultipleSelection);
}
protected function onPreChange(_arg1:DataChangeEvent):void{
switch (_arg1.changeType){
case DataChangeType.REMOVE:
case DataChangeType.ADD:
case DataChangeType.INVALIDATE:
case DataChangeType.REMOVE_ALL:
case DataChangeType.REPLACE:
case DataChangeType.INVALIDATE_ALL:
break;
default:
preChangeItems = selectedItems;
break;
};
}
public function getRendererStyle(_arg1:String, _arg2:int=-1):Object{
return (rendererStyles[_arg1]);
}
override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
var _local3:Number;
if (_arg1 == _verticalScrollPosition){
return;
};
_local3 = (_arg1 - _verticalScrollPosition);
_verticalScrollPosition = _arg1;
if (_arg2){
dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, _local3, _arg1));
};
}
protected function moveSelectionHorizontally(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{
}
public function set selectedIndices(_arg1:Array):void{
if (!_selectable){
return;
};
_selectedIndices = ((_arg1)==null) ? [] : _arg1.concat();
invalidate(InvalidationType.SELECTED);
}
public function get selectedIndex():int{
return (((_selectedIndices.length)==0) ? -1 : _selectedIndices[(_selectedIndices.length - 1)]);
}
override protected function draw():void{
super.draw();
}
override protected function configUI():void{
super.configUI();
listHolder = new Sprite();
addChild(listHolder);
listHolder.scrollRect = contentScrollRect;
list = new Sprite();
listHolder.addChild(list);
}
public function addItem(_arg1:Object):void{
_dataProvider.addItem(_arg1);
invalidateList();
}
protected function handleCellRendererMouseEvent(_arg1:MouseEvent):void{
var _local2:ICellRenderer;
var _local3:String;
_local2 = (_arg1.target as ICellRenderer);
_local3 = ((_arg1.type)==MouseEvent.ROLL_OVER) ? ListEvent.ITEM_ROLL_OVER : ListEvent.ITEM_ROLL_OUT;
dispatchEvent(new ListEvent(_local3, false, false, _local2.listData.column, _local2.listData.row, _local2.listData.index, _local2.data));
}
public function clearRendererStyle(_arg1:String, _arg2:int=-1):void{
delete rendererStyles[_arg1];
updatedRendererStyles[_arg1] = null;
invalidate(InvalidationType.RENDERER_STYLES);
}
protected function handleCellRendererDoubleClick(_arg1:MouseEvent):void{
var _local2:ICellRenderer;
var _local3:uint;
if (!_enabled){
return;
};
_local2 = (_arg1.currentTarget as ICellRenderer);
_local3 = _local2.listData.index;
dispatchEvent(new ListEvent(ListEvent.ITEM_DOUBLE_CLICK, false, true, _local2.listData.column, _local2.listData.row, _local3, _local2.data));
}
public function get rowCount():uint{
return (0);
}
public function isItemSelected(_arg1:Object):Boolean{
return ((selectedItems.indexOf(_arg1) > -1));
}
public function set dataProvider(_arg1:DataProvider):void{
if (_dataProvider != null){
_dataProvider.removeEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange);
_dataProvider.removeEventListener(DataChangeEvent.PRE_DATA_CHANGE, onPreChange);
};
_dataProvider = _arg1;
_dataProvider.addEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange, false, 0, true);
_dataProvider.addEventListener(DataChangeEvent.PRE_DATA_CHANGE, onPreChange, false, 0, true);
clearSelection();
invalidateList();
}
override protected function drawLayout():void{
super.drawLayout();
contentScrollRect = listHolder.scrollRect;
contentScrollRect.width = availableWidth;
contentScrollRect.height = availableHeight;
listHolder.scrollRect = contentScrollRect;
}
public function getItemAt(_arg1:uint):Object{
return (_dataProvider.getItemAt(_arg1));
}
override protected function initializeAccessibility():void{
if (SelectableList.createAccessibilityImplementation != null){
SelectableList.createAccessibilityImplementation(this);
};
}
public function scrollToIndex(_arg1:int):void{
}
public function removeItem(_arg1:Object):Object{
return (_dataProvider.removeItem(_arg1));
}
public function get dataProvider():DataProvider{
return (_dataProvider);
}
public function set maxHorizontalScrollPosition(_arg1:Number):void{
_maxHorizontalScrollPosition = _arg1;
invalidate(InvalidationType.SIZE);
}
public function setRendererStyle(_arg1:String, _arg2:Object, _arg3:uint=0):void{
if (rendererStyles[_arg1] == _arg2){
return;
};
updatedRendererStyles[_arg1] = _arg2;
rendererStyles[_arg1] = _arg2;
invalidate(InvalidationType.RENDERER_STYLES);
}
public function invalidateItemAt(_arg1:uint):void{
var _local2:Object;
_local2 = _dataProvider.getItemAt(_arg1);
if (_local2 != null){
invalidateItem(_local2);
};
}
public function set selectedItems(_arg1:Array):void{
var _local2:Array;
var _local3:uint;
var _local4:int;
if (_arg1 == null){
selectedIndices = null;
return;
};
_local2 = [];
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = _dataProvider.getItemIndex(_arg1[_local3]);
if (_local4 != -1){
_local2.push(_local4);
};
_local3++;
};
selectedIndices = _local2;
}
public function clearSelection():void{
selectedIndex = -1;
}
override public function get maxHorizontalScrollPosition():Number{
return (_maxHorizontalScrollPosition);
}
public function get selectedItems():Array{
var _local1:Array;
var _local2:uint;
_local1 = [];
_local2 = 0;
while (_local2 < _selectedIndices.length) {
_local1.push(_dataProvider.getItemAt(_selectedIndices[_local2]));
_local2++;
};
return (_local1);
}
public function set selectedIndex(_arg1:int):void{
selectedIndices = ((_arg1)==-1) ? null : [_arg1];
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseScrollPane.getStyleDefinition()));
}
}
}//package fl.controls
Section 237
//TextInput (fl.controls.TextInput)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.ui.*;
public class TextInput extends UIComponent implements IFocusManagerComponent {
protected var _html:Boolean;// = false
protected var _savedHTML:String;
protected var background:DisplayObject;
protected var _editable:Boolean;// = true
public var textField:TextField;
private static var defaultStyles:Object = {upSkin:"TextInput_upSkin", disabledSkin:"TextInput_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:0, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function TextInput(){
_editable = true;
_html = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
if (focusTarget != null){
focusTarget.drawFocus(_arg1);
return;
};
super.drawFocus(_arg1);
}
public function set imeMode(_arg1:String):void{
_imeMode = _arg1;
}
override protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((((_arg1 == textField)) || (super.isOurFocus(_arg1))));
}
protected function handleKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.ENTER){
dispatchEvent(new ComponentEvent(ComponentEvent.ENTER, true));
};
}
public function set text(_arg1:String):void{
textField.text = _arg1;
_html = false;
invalidate(InvalidationType.DATA);
invalidate(InvalidationType.STYLES);
}
protected function updateTextFieldType():void{
textField.type = (((enabled) && (editable))) ? TextFieldType.INPUT : TextFieldType.DYNAMIC;
textField.selectable = enabled;
}
public function get selectionEndIndex():int{
return (textField.selectionEndIndex);
}
public function get editable():Boolean{
return (_editable);
}
override protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (_arg1.target == this){
stage.focus = textField;
};
_local2 = focusManager;
if (((editable) && (_local2))){
_local2.showFocusIndicator = true;
if (((textField.selectable) && ((textField.selectionBeginIndex == textField.selectionBeginIndex)))){
setSelection(0, textField.length);
};
};
super.focusInHandler(_arg1);
if (editable){
setIMEMode(true);
};
}
public function get selectionBeginIndex():int{
return (textField.selectionBeginIndex);
}
public function set alwaysShowSelection(_arg1:Boolean):void{
textField.alwaysShowSelection = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
updateTextFieldType();
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
public function get horizontalScrollPosition():int{
return (textField.scrollH);
}
public function set condenseWhite(_arg1:Boolean):void{
textField.condenseWhite = _arg1;
}
public function set displayAsPassword(_arg1:Boolean):void{
textField.displayAsPassword = _arg1;
}
public function set horizontalScrollPosition(_arg1:int):void{
textField.scrollH = _arg1;
}
public function get restrict():String{
return (textField.restrict);
}
public function get textWidth():Number{
return (textField.textWidth);
}
public function get textHeight():Number{
return (textField.textHeight);
}
public function set editable(_arg1:Boolean):void{
_editable = _arg1;
updateTextFieldType();
}
public function get maxChars():int{
return (textField.maxChars);
}
public function get length():int{
return (textField.length);
}
public function getLineMetrics(_arg1:int):TextLineMetrics{
return (textField.getLineMetrics(_arg1));
}
public function get imeMode():String{
return (_imeMode);
}
override protected function focusOutHandler(_arg1:FocusEvent):void{
super.focusOutHandler(_arg1);
if (editable){
setIMEMode(false);
};
}
public function set htmlText(_arg1:String):void{
if (_arg1 == ""){
text = "";
return;
};
_html = true;
_savedHTML = _arg1;
textField.htmlText = _arg1;
invalidate(InvalidationType.DATA);
invalidate(InvalidationType.STYLES);
}
public function get text():String{
return (textField.text);
}
override public function get enabled():Boolean{
return (super.enabled);
}
public function get condenseWhite():Boolean{
return (textField.condenseWhite);
}
public function get alwaysShowSelection():Boolean{
return (textField.alwaysShowSelection);
}
override protected function draw():void{
var _local1:Object;
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawTextFormat();
drawBackground();
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function handleTextInput(_arg1:TextEvent):void{
_arg1.stopPropagation();
dispatchEvent(new TextEvent(TextEvent.TEXT_INPUT, true, false, _arg1.text));
}
override protected function configUI():void{
super.configUI();
tabChildren = true;
textField = new TextField();
addChild(textField);
updateTextFieldType();
textField.addEventListener(TextEvent.TEXT_INPUT, handleTextInput, false, 0, true);
textField.addEventListener(Event.CHANGE, handleChange, false, 0, true);
textField.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown, false, 0, true);
}
public function setSelection(_arg1:int, _arg2:int):void{
textField.setSelection(_arg1, _arg2);
}
public function get displayAsPassword():Boolean{
return (textField.displayAsPassword);
}
public function appendText(_arg1:String):void{
textField.appendText(_arg1);
}
public function set restrict(_arg1:String):void{
if (((componentInspectorSetting) && ((_arg1 == "")))){
_arg1 = null;
};
textField.restrict = _arg1;
}
public function get htmlText():String{
return (textField.htmlText);
}
protected function drawBackground():void{
var _local1:DisplayObject;
var _local2:String;
_local1 = background;
_local2 = (enabled) ? "upSkin" : "disabledSkin";
background = getDisplayObjectInstance(getStyleValue(_local2));
if (background == null){
return;
};
addChildAt(background, 0);
if (((((!((_local1 == null))) && (!((_local1 == background))))) && (contains(_local1)))){
removeChild(_local1);
};
}
override public function setFocus():void{
stage.focus = textField;
}
protected function drawLayout():void{
var _local1:Number;
_local1 = Number(getStyleValue("textPadding"));
if (background != null){
background.width = width;
background.height = height;
};
textField.width = (width - (2 * _local1));
textField.height = (height - (2 * _local1));
textField.x = (textField.y = _local1);
}
public function set maxChars(_arg1:int):void{
textField.maxChars = _arg1;
}
public function get maxHorizontalScrollPosition():int{
return (textField.maxScrollH);
}
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();
if (_html){
textField.htmlText = _savedHTML;
};
}
protected function handleChange(_arg1:Event):void{
_arg1.stopPropagation();
dispatchEvent(new Event(Event.CHANGE, true));
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 238
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 239
//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 240
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.utils.*;
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 241
//DataProvider (fl.data.DataProvider)
package fl.data {
import flash.events.*;
import fl.events.*;
public class DataProvider extends EventDispatcher {
protected var data:Array;
public function DataProvider(_arg1:Object=null){
if (_arg1 == null){
data = [];
} else {
data = getDataFromObject(_arg1);
};
}
protected function dispatchPreChangeEvent(_arg1:String, _arg2:Array, _arg3:int, _arg4:int):void{
dispatchEvent(new DataChangeEvent(DataChangeEvent.PRE_DATA_CHANGE, _arg1, _arg2, _arg3, _arg4));
}
public function invalidateItemAt(_arg1:int):void{
checkIndex(_arg1, (data.length - 1));
dispatchChangeEvent(DataChangeType.INVALIDATE, [data[_arg1]], _arg1, _arg1);
}
public function getItemIndex(_arg1:Object):int{
return (data.indexOf(_arg1));
}
protected function getDataFromObject(_arg1:Object):Array{
var _local2:Array;
var _local3:Array;
var _local4:uint;
var _local5:Object;
var _local6:XML;
var _local7:XMLList;
var _local8:XML;
var _local9:XMLList;
var _local10:XML;
var _local11:XMLList;
var _local12:XML;
if ((_arg1 is Array)){
_local3 = (_arg1 as Array);
if (_local3.length > 0){
if ((((_local3[0] is String)) || ((_local3[0] is Number)))){
_local2 = [];
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = {label:String(_local3[_local4]), data:_local3[_local4]};
_local2.push(_local5);
_local4++;
};
return (_local2);
};
};
return (_arg1.concat());
//unresolved jump
};
if ((_arg1 is DataProvider)){
return (_arg1.toArray());
};
if ((_arg1 is XML)){
_local6 = (_arg1 as XML);
_local2 = [];
_local7 = _local6.*;
for each (_local8 in _local7) {
_arg1 = {};
_local9 = _local8.attributes();
for each (_local10 in _local9) {
_arg1[_local10.localName()] = _local10.toString();
};
_local11 = _local8.*;
for each (_local12 in _local11) {
if (_local12.hasSimpleContent()){
_arg1[_local12.localName()] = _local12.toString();
};
};
_local2.push(_arg1);
};
return (_local2);
//unresolved jump
};
throw (new TypeError((("Error: Type Coercion failed: cannot convert " + _arg1) + " to Array or DataProvider.")));
}
public function removeItemAt(_arg1:uint):Object{
var _local2:Array;
checkIndex(_arg1, (data.length - 1));
dispatchPreChangeEvent(DataChangeType.REMOVE, data.slice(_arg1, (_arg1 + 1)), _arg1, _arg1);
_local2 = data.splice(_arg1, 1);
dispatchChangeEvent(DataChangeType.REMOVE, _local2, _arg1, _arg1);
return (_local2[0]);
}
public function addItem(_arg1:Object):void{
dispatchPreChangeEvent(DataChangeType.ADD, [_arg1], (data.length - 1), (data.length - 1));
data.push(_arg1);
dispatchChangeEvent(DataChangeType.ADD, [_arg1], (data.length - 1), (data.length - 1));
}
public function sortOn(_arg1:Object, _arg2:Object=null){
var _local3:Array;
dispatchPreChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
_local3 = data.sortOn(_arg1, _arg2);
dispatchChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
return (_local3);
}
public function sort(... _args){
var _local2:Array;
dispatchPreChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
_local2 = data.sort.apply(data, _args);
dispatchChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
return (_local2);
}
public function addItems(_arg1:Object):void{
addItemsAt(_arg1, data.length);
}
public function concat(_arg1:Object):void{
addItems(_arg1);
}
public function clone():DataProvider{
return (new DataProvider(data));
}
public function toArray():Array{
return (data.concat());
}
public function get length():uint{
return (data.length);
}
public function addItemAt(_arg1:Object, _arg2:uint):void{
checkIndex(_arg2, data.length);
dispatchPreChangeEvent(DataChangeType.ADD, [_arg1], _arg2, _arg2);
data.splice(_arg2, 0, _arg1);
dispatchChangeEvent(DataChangeType.ADD, [_arg1], _arg2, _arg2);
}
public function getItemAt(_arg1:uint):Object{
checkIndex(_arg1, (data.length - 1));
return (data[_arg1]);
}
override public function toString():String{
return ((("DataProvider [" + data.join(" , ")) + "]"));
}
public function invalidateItem(_arg1:Object):void{
var _local2:uint;
_local2 = getItemIndex(_arg1);
if (_local2 == -1){
return;
};
invalidateItemAt(_local2);
}
protected function dispatchChangeEvent(_arg1:String, _arg2:Array, _arg3:int, _arg4:int):void{
dispatchEvent(new DataChangeEvent(DataChangeEvent.DATA_CHANGE, _arg1, _arg2, _arg3, _arg4));
}
protected function checkIndex(_arg1:int, _arg2:int):void{
if ((((_arg1 > _arg2)) || ((_arg1 < 0)))){
throw (new RangeError((((("DataProvider index (" + _arg1) + ") is not in acceptable range (0 - ") + _arg2) + ")")));
};
}
public function addItemsAt(_arg1:Object, _arg2:uint):void{
var _local3:Array;
checkIndex(_arg2, data.length);
_local3 = getDataFromObject(_arg1);
dispatchPreChangeEvent(DataChangeType.ADD, _local3, _arg2, ((_arg2 + _local3.length) - 1));
data.splice.apply(data, [_arg2, 0].concat(_local3));
dispatchChangeEvent(DataChangeType.ADD, _local3, _arg2, ((_arg2 + _local3.length) - 1));
}
public function replaceItem(_arg1:Object, _arg2:Object):Object{
var _local3:int;
_local3 = getItemIndex(_arg2);
if (_local3 != -1){
return (replaceItemAt(_arg1, _local3));
};
return (null);
}
public function removeItem(_arg1:Object):Object{
var _local2:int;
_local2 = getItemIndex(_arg1);
if (_local2 != -1){
return (removeItemAt(_local2));
};
return (null);
}
public function merge(_arg1:Object):void{
var _local2:Array;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:Object;
_local2 = getDataFromObject(_arg1);
_local3 = _local2.length;
_local4 = data.length;
dispatchPreChangeEvent(DataChangeType.ADD, data.slice(_local4, data.length), _local4, (this.data.length - 1));
_local5 = 0;
while (_local5 < _local3) {
_local6 = _local2[_local5];
if (getItemIndex(_local6) == -1){
data.push(_local6);
};
_local5++;
};
if (data.length > _local4){
dispatchChangeEvent(DataChangeType.ADD, data.slice(_local4, data.length), _local4, (this.data.length - 1));
} else {
dispatchChangeEvent(DataChangeType.ADD, [], -1, -1);
};
}
public function replaceItemAt(_arg1:Object, _arg2:uint):Object{
var _local3:Array;
checkIndex(_arg2, (data.length - 1));
_local3 = [data[_arg2]];
dispatchPreChangeEvent(DataChangeType.REPLACE, _local3, _arg2, _arg2);
data[_arg2] = _arg1;
dispatchChangeEvent(DataChangeType.REPLACE, _local3, _arg2, _arg2);
return (_local3[0]);
}
public function invalidate():void{
dispatchEvent(new DataChangeEvent(DataChangeEvent.DATA_CHANGE, DataChangeType.INVALIDATE_ALL, data.concat(), 0, data.length));
}
public function removeAll():void{
var _local1:Array;
_local1 = data.concat();
dispatchPreChangeEvent(DataChangeType.REMOVE_ALL, _local1, 0, _local1.length);
data = [];
dispatchChangeEvent(DataChangeType.REMOVE_ALL, _local1, 0, _local1.length);
}
}
}//package fl.data
Section 242
//SimpleCollectionItem (fl.data.SimpleCollectionItem)
package fl.data {
public dynamic class SimpleCollectionItem {
public var label:String;
public var data:String;
public function toString():String{
return ((((("[SimpleCollectionItem: " + label) + ",") + data) + "]"));
}
}
}//package fl.data
Section 243
//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 244
//DataChangeEvent (fl.events.DataChangeEvent)
package fl.events {
import flash.events.*;
public class DataChangeEvent extends Event {
protected var _items:Array;
protected var _endIndex:uint;
protected var _changeType:String;
protected var _startIndex:uint;
public static const PRE_DATA_CHANGE:String = "preDataChange";
public static const DATA_CHANGE:String = "dataChange";
public function DataChangeEvent(_arg1:String, _arg2:String, _arg3:Array, _arg4:int=-1, _arg5:int=-1):void{
super(_arg1);
_changeType = _arg2;
_startIndex = _arg4;
_items = _arg3;
_endIndex = ((_arg5)==-1) ? _startIndex : _arg5;
}
public function get changeType():String{
return (_changeType);
}
public function get startIndex():uint{
return (_startIndex);
}
public function get items():Array{
return (_items);
}
override public function clone():Event{
return (new DataChangeEvent(type, _changeType, _items, _startIndex, _endIndex));
}
override public function toString():String{
return (formatToString("DataChangeEvent", "type", "changeType", "startIndex", "endIndex", "bubbles", "cancelable"));
}
public function get endIndex():uint{
return (_endIndex);
}
}
}//package fl.events
Section 245
//DataChangeType (fl.events.DataChangeType)
package fl.events {
public class DataChangeType {
public static const ADD:String = "add";
public static const REMOVE:String = "remove";
public static const REMOVE_ALL:String = "removeAll";
public static const CHANGE:String = "change";
public static const REPLACE:String = "replace";
public static const INVALIDATE:String = "invalidate";
public static const INVALIDATE_ALL:String = "invalidateAll";
public static const SORT:String = "sort";
}
}//package fl.events
Section 246
//ListEvent (fl.events.ListEvent)
package fl.events {
import flash.events.*;
public class ListEvent extends Event {
protected var _index:int;
protected var _item:Object;
protected var _columnIndex:int;
protected var _rowIndex:int;
public static const ITEM_DOUBLE_CLICK:String = "itemDoubleClick";
public static const ITEM_ROLL_OUT:String = "itemRollOut";
public static const ITEM_ROLL_OVER:String = "itemRollOver";
public static const ITEM_CLICK:String = "itemClick";
public function ListEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:int=-1, _arg6:int=-1, _arg7:Object=null){
super(_arg1, _arg2, _arg3);
_rowIndex = _arg5;
_columnIndex = _arg4;
_index = _arg6;
_item = _arg7;
}
public function get rowIndex():Object{
return (_rowIndex);
}
public function get index():int{
return (_index);
}
public function get item():Object{
return (_item);
}
public function get columnIndex():int{
return (_columnIndex);
}
override public function clone():Event{
return (new ListEvent(type, bubbles, cancelable, _columnIndex, _rowIndex));
}
override public function toString():String{
return (formatToString("ListEvent", "type", "bubbles", "cancelable", "columnIndex", "rowIndex", "index", "item"));
}
}
}//package fl.events
Section 247
//ScrollEvent (fl.events.ScrollEvent)
package fl.events {
import flash.events.*;
public class ScrollEvent extends Event {
private var _position:Number;
private var _direction:String;
private var _delta:Number;
public static const SCROLL:String = "scroll";
public function ScrollEvent(_arg1:String, _arg2:Number, _arg3:Number){
super(ScrollEvent.SCROLL, false, false);
_direction = _arg1;
_delta = _arg2;
_position = _arg3;
}
override public function clone():Event{
return (new ScrollEvent(_direction, _delta, _position));
}
public function get position():Number{
return (_position);
}
override public function toString():String{
return (formatToString("ScrollEvent", "type", "bubbles", "cancelable", "direction", "delta", "position"));
}
public function get delta():Number{
return (_delta);
}
public function get direction():String{
return (_direction);
}
}
}//package fl.events
Section 248
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import fl.core.*;
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
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 249
//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 250
//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 251
//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 252
//StyleManager (fl.managers.StyleManager)
package fl.managers {
import fl.core.*;
import flash.text.*;
import flash.utils.*;
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 253
//bulletMCCTN_141 (game_fla.bulletMCCTN_141)
package game_fla {
import flash.display.*;
public dynamic class bulletMCCTN_141 extends MovieClip {
public var bullet2:MovieClip;
public var bullet3:MovieClip;
public var bullet1:MovieClip;
public var bullet6:MovieClip;
public var bullet4:MovieClip;
public var bullet5:MovieClip;
}
}//package game_fla
Section 254
//bulletUIMC_138 (game_fla.bulletUIMC_138)
package game_fla {
import flash.display.*;
public dynamic class bulletUIMC_138 extends MovieClip {
public var slugMC:MovieClip;
public var clipMC:MovieClip;
}
}//package game_fla
Section 255
//clipMCCTN_139 (game_fla.clipMCCTN_139)
package game_fla {
import flash.display.*;
public dynamic class clipMCCTN_139 extends MovieClip {
public var clip3:MovieClip;
public var clip4:MovieClip;
public var clip1:MovieClip;
public var clip2:MovieClip;
}
}//package game_fla
Section 256
//EnemyCountUI_145 (game_fla.EnemyCountUI_145)
package game_fla {
import flash.display.*;
public dynamic class EnemyCountUI_145 extends MovieClip {
public var num1:MovieClip;
public var num2:MovieClip;
}
}//package game_fla
Section 257
//lifeUI_134 (game_fla.lifeUI_134)
package game_fla {
import flash.display.*;
public dynamic class lifeUI_134 extends MovieClip {
public var hpBar1:MovieClip;
public var hpBar2:MovieClip;
}
}//package game_fla
Section 258
//Mission1MC_114 (game_fla.Mission1MC_114)
package game_fla {
import flash.display.*;
public dynamic class Mission1MC_114 extends MovieClip {
public var headMC:MovieClip;
public var rankMC:MovieClip;
}
}//package game_fla
Section 259
//MissionMC_113 (game_fla.MissionMC_113)
package game_fla {
import flash.display.*;
public dynamic class MissionMC_113 extends MovieClip {
public var mission1:MovieClip;
public var mission5:MovieClip;
public var mission7:MovieClip;
public var mission8:MovieClip;
public var mission9:MovieClip;
public var mission3:MovieClip;
public var mission6:MovieClip;
public var mission2:MovieClip;
public var mission4:MovieClip;
public var mission11:MovieClip;
public var mission12:MovieClip;
public var mission14:MovieClip;
public var mission15:MovieClip;
public var mission16:MovieClip;
public var mission18:MovieClip;
public var mission13:MovieClip;
public var mission17:MovieClip;
public var mission10:MovieClip;
}
}//package game_fla
Section 260
//number5_126 (game_fla.number5_126)
package game_fla {
import flash.display.*;
public dynamic class number5_126 extends MovieClip {
public var num1:MovieClip;
public var num3:MovieClip;
public var num6:MovieClip;
public var num7:MovieClip;
public var num4:MovieClip;
public var num5:MovieClip;
public var num2:MovieClip;
public var num8:MovieClip;
}
}//package game_fla
Section 261
//number6_124 (game_fla.number6_124)
package game_fla {
import flash.display.*;
public dynamic class number6_124 extends MovieClip {
public var num1:MovieClip;
public var num2:MovieClip;
}
}//package game_fla
Section 262
//number7_127 (game_fla.number7_127)
package game_fla {
import flash.display.*;
public dynamic class number7_127 extends MovieClip {
public var num1:MovieClip;
public var num3:MovieClip;
public var num6:MovieClip;
public var num7:MovieClip;
public var num4:MovieClip;
public var num5:MovieClip;
public var num2:MovieClip;
public var num8:MovieClip;
}
}//package game_fla
Section 263
//resultMC_121 (game_fla.resultMC_121)
package game_fla {
import flash.display.*;
public dynamic class resultMC_121 extends MovieClip {
public var enemyScoreMC:MovieClip;
public var timeScoreMC:MovieClip;
public var itemScoreMC:MovieClip;
public var enemyNumMC:MovieClip;
public var itemNumMC:MovieClip;
public var bulletScoreMC:MovieClip;
public var bulletNumMC:MovieClip;
public var rankMC:MovieClip;
public var totalScoreMC:MovieClip;
public var titleMC:MovieClip;
}
}//package game_fla
Section 264
//scoreMC_136 (game_fla.scoreMC_136)
package game_fla {
import flash.display.*;
public dynamic class scoreMC_136 extends MovieClip {
public var num1:MovieClip;
public var num3:MovieClip;
public var num6:MovieClip;
public var num7:MovieClip;
public var num4:MovieClip;
public var num5:MovieClip;
public var num2:MovieClip;
public var num8:MovieClip;
}
}//package game_fla
Section 265
//SureMC_185 (game_fla.SureMC_185)
package game_fla {
import flash.display.*;
public dynamic class SureMC_185 extends MovieClip {
public var yesBtn:SimpleButton;
public var noBtn:SimpleButton;
}
}//package game_fla
Section 266
//watch_143 (game_fla.watch_143)
package game_fla {
import flash.display.*;
public dynamic class watch_143 extends MovieClip {
public var handMC:MovieClip;
}
}//package game_fla
Section 267
//BG1 (BG1)
package {
import flash.media.*;
public dynamic class BG1 extends Sound {
}
}//package
Section 268
//BG2 (BG2)
package {
import flash.media.*;
public dynamic class BG2 extends Sound {
}
}//package
Section 269
//BG3 (BG3)
package {
import flash.media.*;
public dynamic class BG3 extends Sound {
}
}//package
Section 270
//Blast (Blast)
package {
import flash.media.*;
public dynamic class Blast extends Sound {
}
}//package
Section 271
//BonusBG (BonusBG)
package {
import flash.media.*;
public dynamic class BonusBG extends Sound {
}
}//package
Section 272
//BossDie (BossDie)
package {
import flash.media.*;
public dynamic class BossDie extends Sound {
}
}//package
Section 273
//BossShowMC (BossShowMC)
package {
import flash.display.*;
public dynamic class BossShowMC extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 274
//BottleBreak (BottleBreak)
package {
import flash.media.*;
public dynamic class BottleBreak extends Sound {
}
}//package
Section 275
//Bow1 (Bow1)
package {
import flash.media.*;
public dynamic class Bow1 extends Sound {
}
}//package
Section 276
//Bow2 (Bow2)
package {
import flash.media.*;
public dynamic class Bow2 extends Sound {
}
}//package
Section 277
//Boxing1 (Boxing1)
package {
import flash.media.*;
public dynamic class Boxing1 extends Sound {
}
}//package
Section 278
//Boxing2 (Boxing2)
package {
import flash.media.*;
public dynamic class Boxing2 extends Sound {
}
}//package
Section 279
//Burning (Burning)
package {
import flash.media.*;
public dynamic class Burning extends Sound {
}
}//package
Section 280
//CellRenderer_disabledSkin (CellRenderer_disabledSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_disabledSkin extends MovieClip {
}
}//package
Section 281
//CellRenderer_downSkin (CellRenderer_downSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_downSkin extends MovieClip {
}
}//package
Section 282
//CellRenderer_overSkin (CellRenderer_overSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_overSkin extends MovieClip {
}
}//package
Section 283
//CellRenderer_selectedDisabledSkin (CellRenderer_selectedDisabledSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedDisabledSkin extends MovieClip {
}
}//package
Section 284
//CellRenderer_selectedDownSkin (CellRenderer_selectedDownSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedDownSkin extends MovieClip {
}
}//package
Section 285
//CellRenderer_selectedOverSkin (CellRenderer_selectedOverSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedOverSkin extends MovieClip {
}
}//package
Section 286
//CellRenderer_selectedUpSkin (CellRenderer_selectedUpSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedUpSkin extends MovieClip {
}
}//package
Section 287
//CellRenderer_upSkin (CellRenderer_upSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_upSkin extends MovieClip {
}
}//package
Section 288
//ChestBreak (ChestBreak)
package {
import flash.media.*;
public dynamic class ChestBreak extends Sound {
}
}//package
Section 289
//Click1 (Click1)
package {
import flash.media.*;
public dynamic class Click1 extends Sound {
}
}//package
Section 290
//Click2 (Click2)
package {
import flash.media.*;
public dynamic class Click2 extends Sound {
}
}//package
Section 291
//Cock (Cock)
package {
import flash.media.*;
public dynamic class Cock extends Sound {
}
}//package
Section 292
//ComboBox_disabledSkin (ComboBox_disabledSkin)
package {
import flash.display.*;
public dynamic class ComboBox_disabledSkin extends MovieClip {
}
}//package
Section 293
//ComboBox_downSkin (ComboBox_downSkin)
package {
import flash.display.*;
public dynamic class ComboBox_downSkin extends MovieClip {
}
}//package
Section 294
//ComboBox_overSkin (ComboBox_overSkin)
package {
import flash.display.*;
public dynamic class ComboBox_overSkin extends MovieClip {
}
}//package
Section 295
//ComboBox_upSkin (ComboBox_upSkin)
package {
import flash.display.*;
public dynamic class ComboBox_upSkin extends MovieClip {
}
}//package
Section 296
//DartFly (DartFly)
package {
import flash.media.*;
public dynamic class DartFly extends Sound {
}
}//package
Section 297
//DartIn (DartIn)
package {
import flash.media.*;
public dynamic class DartIn extends Sound {
}
}//package
Section 298
//Dead1 (Dead1)
package {
import flash.media.*;
public dynamic class Dead1 extends Sound {
}
}//package
Section 299
//Dead2 (Dead2)
package {
import flash.media.*;
public dynamic class Dead2 extends Sound {
}
}//package
Section 300
//Dead3 (Dead3)
package {
import flash.media.*;
public dynamic class Dead3 extends Sound {
}
}//package
Section 301
//Dead4 (Dead4)
package {
import flash.media.*;
public dynamic class Dead4 extends Sound {
}
}//package
Section 302
//Dead5 (Dead5)
package {
import flash.media.*;
public dynamic class Dead5 extends Sound {
}
}//package
Section 303
//Dead6 (Dead6)
package {
import flash.media.*;
public dynamic class Dead6 extends Sound {
}
}//package
Section 304
//Dead7 (Dead7)
package {
import flash.media.*;
public dynamic class Dead7 extends Sound {
}
}//package
Section 305
//Dead9 (Dead9)
package {
import flash.media.*;
public dynamic class Dead9 extends Sound {
}
}//package
Section 306
//Disappear (Disappear)
package {
import flash.media.*;
public dynamic class Disappear extends Sound {
}
}//package
Section 307
//Fall (Fall)
package {
import flash.media.*;
public dynamic class Fall extends Sound {
}
}//package
Section 308
//FallToStand (FallToStand)
package {
import flash.media.*;
public dynamic class FallToStand extends Sound {
}
}//package
Section 309
//focusRectSkin (focusRectSkin)
package {
import flash.display.*;
public dynamic class focusRectSkin extends MovieClip {
}
}//package
Section 310
//Food (Food)
package {
import flash.media.*;
public dynamic class Food extends Sound {
}
}//package
Section 311
//GetBullet (GetBullet)
package {
import flash.media.*;
public dynamic class GetBullet extends Sound {
}
}//package
Section 312
//Gun1 (Gun1)
package {
import flash.media.*;
public dynamic class Gun1 extends Sound {
}
}//package
Section 313
//Gun2 (Gun2)
package {
import flash.media.*;
public dynamic class Gun2 extends Sound {
}
}//package
Section 314
//Gun3 (Gun3)
package {
import flash.media.*;
public dynamic class Gun3 extends Sound {
}
}//package
Section 315
//HitBag (HitBag)
package {
import flash.media.*;
public dynamic class HitBag extends Sound {
}
}//package
Section 316
//Hited (Hited)
package {
import flash.media.*;
public dynamic class Hited extends Sound {
}
}//package
Section 317
//HorseRun (HorseRun)
package {
import flash.media.*;
public dynamic class HorseRun extends Sound {
}
}//package
Section 318
//Jump (Jump)
package {
import flash.media.*;
public dynamic class Jump extends Sound {
}
}//package
Section 319
//Kick (Kick)
package {
import flash.media.*;
public dynamic class Kick extends Sound {
}
}//package
Section 320
//Knife (Knife)
package {
import flash.media.*;
public dynamic class Knife extends Sound {
}
}//package
Section 321
//KnifeHit1 (KnifeHit1)
package {
import flash.media.*;
public dynamic class KnifeHit1 extends Sound {
}
}//package
Section 322
//KnifeHit2 (KnifeHit2)
package {
import flash.media.*;
public dynamic class KnifeHit2 extends Sound {
}
}//package
Section 323
//KnifeHit3 (KnifeHit3)
package {
import flash.media.*;
public dynamic class KnifeHit3 extends Sound {
}
}//package
Section 324
//KnifeIn (KnifeIn)
package {
import flash.media.*;
public dynamic class KnifeIn extends Sound {
}
}//package
Section 325
//Lash (Lash)
package {
import flash.media.*;
public dynamic class Lash extends Sound {
}
}//package
Section 326
//Lashed (Lashed)
package {
import flash.media.*;
public dynamic class Lashed extends Sound {
}
}//package
Section 327
//List_skin (List_skin)
package {
import flash.display.*;
public dynamic class List_skin extends MovieClip {
}
}//package
Section 328
//Lose (Lose)
package {
import flash.media.*;
public dynamic class Lose extends Sound {
}
}//package
Section 329
//MouseUI (MouseUI)
package {
import flash.display.*;
public dynamic class MouseUI extends MovieClip {
}
}//package
Section 330
//PoleWarningMC (PoleWarningMC)
package {
import flash.display.*;
public dynamic class PoleWarningMC extends MovieClip {
}
}//package
Section 331
//RadioButton_disabledIcon (RadioButton_disabledIcon)
package {
import flash.display.*;
public dynamic class RadioButton_disabledIcon extends MovieClip {
}
}//package
Section 332
//RadioButton_downIcon (RadioButton_downIcon)
package {
import flash.display.*;
public dynamic class RadioButton_downIcon extends MovieClip {
}
}//package
Section 333
//RadioButton_overIcon (RadioButton_overIcon)
package {
import flash.display.*;
public dynamic class RadioButton_overIcon extends MovieClip {
}
}//package
Section 334
//RadioButton_selectedDisabledIcon (RadioButton_selectedDisabledIcon)
package {
import flash.display.*;
public dynamic class RadioButton_selectedDisabledIcon extends MovieClip {
}
}//package
Section 335
//RadioButton_selectedDownIcon (RadioButton_selectedDownIcon)
package {
import flash.display.*;
public dynamic class RadioButton_selectedDownIcon extends MovieClip {
}
}//package
Section 336
//RadioButton_selectedOverIcon (RadioButton_selectedOverIcon)
package {
import flash.display.*;
public dynamic class RadioButton_selectedOverIcon extends MovieClip {
}
}//package
Section 337
//RadioButton_selectedUpIcon (RadioButton_selectedUpIcon)
package {
import flash.display.*;
public dynamic class RadioButton_selectedUpIcon extends MovieClip {
}
}//package
Section 338
//RadioButton_upIcon (RadioButton_upIcon)
package {
import flash.display.*;
public dynamic class RadioButton_upIcon extends MovieClip {
}
}//package
Section 339
//Recharge (Recharge)
package {
import flash.media.*;
public dynamic class Recharge extends Sound {
}
}//package
Section 340
//Run1 (Run1)
package {
import flash.media.*;
public dynamic class Run1 extends Sound {
}
}//package
Section 341
//Run2 (Run2)
package {
import flash.media.*;
public dynamic class Run2 extends Sound {
}
}//package
Section 342
//Run3 (Run3)
package {
import flash.media.*;
public dynamic class Run3 extends Sound {
}
}//package
Section 343
//Run4 (Run4)
package {
import flash.media.*;
public dynamic class Run4 extends Sound {
}
}//package
Section 344
//Score (Score)
package {
import flash.media.*;
public dynamic class Score extends Sound {
}
}//package
Section 345
//ScrollArrowDown_disabledSkin (ScrollArrowDown_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_disabledSkin extends MovieClip {
}
}//package
Section 346
//ScrollArrowDown_downSkin (ScrollArrowDown_downSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_downSkin extends MovieClip {
}
}//package
Section 347
//ScrollArrowDown_overSkin (ScrollArrowDown_overSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_overSkin extends MovieClip {
}
}//package
Section 348
//ScrollArrowDown_upSkin (ScrollArrowDown_upSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_upSkin extends MovieClip {
}
}//package
Section 349
//ScrollArrowUp_disabledSkin (ScrollArrowUp_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_disabledSkin extends MovieClip {
}
}//package
Section 350
//ScrollArrowUp_downSkin (ScrollArrowUp_downSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_downSkin extends MovieClip {
}
}//package
Section 351
//ScrollArrowUp_overSkin (ScrollArrowUp_overSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_overSkin extends MovieClip {
}
}//package
Section 352
//ScrollArrowUp_upSkin (ScrollArrowUp_upSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_upSkin extends MovieClip {
}
}//package
Section 353
//ScrollBar_thumbIcon (ScrollBar_thumbIcon)
package {
import flash.display.*;
public dynamic class ScrollBar_thumbIcon extends MovieClip {
}
}//package
Section 354
//ScrollThumb_downSkin (ScrollThumb_downSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_downSkin extends MovieClip {
}
}//package
Section 355
//ScrollThumb_overSkin (ScrollThumb_overSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_overSkin extends MovieClip {
}
}//package
Section 356
//ScrollThumb_upSkin (ScrollThumb_upSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_upSkin extends MovieClip {
}
}//package
Section 357
//ScrollTrack_skin (ScrollTrack_skin)
package {
import flash.display.*;
public dynamic class ScrollTrack_skin extends MovieClip {
}
}//package
Section 358
//Shooted1 (Shooted1)
package {
import flash.media.*;
public dynamic class Shooted1 extends Sound {
}
}//package
Section 359
//Shooted2 (Shooted2)
package {
import flash.media.*;
public dynamic class Shooted2 extends Sound {
}
}//package
Section 360
//Stick (Stick)
package {
import flash.media.*;
public dynamic class Stick extends Sound {
}
}//package
Section 361
//TextInput_disabledSkin (TextInput_disabledSkin)
package {
import flash.display.*;
public dynamic class TextInput_disabledSkin extends MovieClip {
}
}//package
Section 362
//TextInput_upSkin (TextInput_upSkin)
package {
import flash.display.*;
public dynamic class TextInput_upSkin extends MovieClip {
}
}//package
Section 363
//ThrowCard (ThrowCard)
package {
import flash.media.*;
public dynamic class ThrowCard extends Sound {
}
}//package
Section 364
//Title (Title)
package {
import flash.media.*;
public dynamic class Title extends Sound {
}
}//package
Section 365
//Train (Train)
package {
import flash.media.*;
public dynamic class Train extends Sound {
}
}//package
Section 366
//Warning (Warning)
package {
import flash.media.*;
public dynamic class Warning extends Sound {
}
}//package
Section 367
//WeaponHit (WeaponHit)
package {
import flash.media.*;
public dynamic class WeaponHit extends Sound {
}
}//package
Section 368
//Whip (Whip)
package {
import flash.media.*;
public dynamic class Whip extends Sound {
}
}//package
Section 369
//Whistle (Whistle)
package {
import flash.media.*;
public dynamic class Whistle extends Sound {
}
}//package
Section 370
//Win (Win)
package {
import flash.media.*;
public dynamic class Win extends Sound {
}
}//package
Section 371
//Wolf (Wolf)
package {
import flash.media.*;
public dynamic class Wolf extends Sound {
}
}//package