Section 1
//Ball (src.entity.Ball)
package src.entity {
import src.*;
import flash.display.*;
public class Ball extends Entity {
public var rotOffset:Number;
public var lightMc:MovieClip;
public var powerupTime:int;// = 0
public var powerupMc:MovieClip;
public var animFrames:int;
public var gapCount:int;// = 0
public var shadow:MovieClip;
public var dirty:Boolean;// = true
public var color:int;
public var powerup:int;// = 0
public var gapBonus:int;// = 0
public var ballMc:MovieClip;
public static var POWERUP_DURATION:int = 450;
public function Ball(_arg1:int){
this.color = _arg1;
switch (_arg1){
case 0:
ballMc = new Ball0();
break;
case 1:
ballMc = new Ball1();
break;
case 2:
ballMc = new Ball2();
break;
case 3:
ballMc = new Ball3();
break;
case 4:
ballMc = new Ball4();
break;
case 5:
ballMc = new Ball5();
break;
};
animFrames = (ballMc.totalFrames - 4);
addChild(ballMc);
ballMc.x = -16;
ballMc.y = -16;
setRotOffset((Math.random() * animFrames));
}
public function setRotOffset(_arg1:Number):void{
this.rotOffset = _arg1;
var _local2:int = int(_arg1);
ballMc.gotoAndStop(((_local2 % animFrames) + 5));
}
public function setPowerup(_arg1:int):void{
this.powerup = _arg1;
if (powerupMc != null){
removeChild(lightMc);
removeChild(powerupMc);
lightMc = null;
powerupMc = null;
};
if (_arg1 != 0){
lightMc = new BonusLight();
lightMc.blendMode = BlendMode.ADD;
powerupMc = new BonusLight();
powerupMc.blendMode = BlendMode.ADD;
addChild(powerupMc);
powerupMc.gotoAndStop(_arg1);
addChild(lightMc);
lightMc.gotoAndStop(5);
};
powerupTime = POWERUP_DURATION;
dirty = true;
}
public function setRollFrame(_arg1:Number):void{
var _local2:int = int((((_arg1 * animFrames) / (16 * 3.1416)) + rotOffset));
ballMc.gotoAndStop(((_local2 % animFrames) + 5));
}
}
}//package src.entity
Section 2
//Coin (src.entity.Coin)
package src.entity {
import src.*;
import src.sound.*;
import src.particle.*;
public class Coin extends Entity {
public var collected:Boolean;// = false
public var yp:Number;
public var xp:Number;
private var life:int;
private var infiniteLife:Boolean;// = false
public static var LIFE_SPAN:int = 400;
public function Coin(_arg1:Number=-1, _arg2:Number=-1){
if ((((_arg1 == -1)) && ((_arg2 == -1)))){
_arg1 = x;
_arg2 = y;
infiniteLife = true;
};
this.xp = (x = _arg1);
this.yp = (y = _arg2);
life = 0;
gotoAndStop(1);
}
public function collect(){
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:*;
var _local5:TextParticle;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:SparkleParticle;
if (collected){
return;
};
if (gameArea.level != null){
_local1 = gameArea.level.gatheredBalls;
gameArea.level.gatheredBalls = (gameArea.level.gatheredBalls + int((gameArea.level.targetBalls / 16)));
if ((((_local1 < gameArea.level.targetBalls)) && ((gameArea.level.gatheredBalls >= gameArea.level.targetBalls)))){
Sounds.levelCleared.play();
};
gameArea.setProgress((gameArea.level.gatheredBalls / gameArea.level.targetBalls));
_local2 = 30;
if (GameArea.FANCY_EFFECTS){
_local2 = 50;
};
_local3 = 0;
while (_local3 < _local2) {
_local6 = (((Math.random() * Math.random()) * 8) + 4);
if (GameArea.FANCY_EFFECTS){
_local6 = (((Math.random() * Math.random()) * 8) + 1);
};
_local7 = (Math.sin((((_local3 / _local2) * Math.PI) * 2)) * _local6);
_local8 = (Math.cos((((_local3 / _local2) * Math.PI) * 2)) * _local6);
_local9 = new SparkleParticle(x, y, _local7, _local8, 0xFFFF00);
if (GameArea.FANCY_EFFECTS){
_local9.scaleX = (_local9.scaleY = ((Math.random() * 0.5) + 0.3));
_local9.alpha = ((Math.random() * 0.7) + 0.3);
} else {
_local9.scaleX = (_local9.scaleY = 0.3);
};
gameArea.addParticle(_local9);
_local3++;
};
gameArea.incScore(500);
gameArea.levelStats.score = (gameArea.levelStats.score + 500);
gameArea.levelStats.coins++;
_local4 = "BONUS +[0]".split("[0]").join("500");
_local5 = new TextParticle(_local4, 0xFFFF00, xp, yp);
gameArea.addParticle(_local5);
gameArea.sendDebug(((((("get_coin " + true) + " ") + xp) + " ") + yp));
} else {
gameArea.sendDebug(((((("get_coin " + false) + " ") + xp) + " ") + yp));
};
Sounds.coinGrab.play(xp, yp);
collected = true;
}
override public function removed():void{
super.removed();
if (gameArea.level != null){
gameArea.level.treasure = null;
};
}
override public function render(_arg1:int, _arg2:Number):void{
var _local3:Number = (((life + _arg2) * 25) / 30);
var _local4:int = ((int(_local3) % 29) + 1);
gotoAndStop(_local4);
}
override public function tick(_arg1:int):Boolean{
life++;
if (infiniteLife){
return (true);
};
if (life >= LIFE_SPAN){
Sounds.coinVanish.play(xp, yp);
};
return ((((life < LIFE_SPAN)) && (!(collected))));
}
}
}//package src.entity
Section 3
//Frog (src.entity.Frog)
package src.entity {
import src.*;
import src.level.*;
import src.math.*;
import flash.events.*;
import src.sound.*;
import flash.display.*;
import src.particle.*;
import flash.geom.*;
public class Frog extends Entity {
private var loseTime:int;// = -1
public var tongue:MovieClip;
private var reloadTime:int;
private var loseRot:Number;// = 0
public var xFakeAim:int;// = -1
private var fakeFrog:Boolean;// = false
private var yPos:int;
private var hadAccuracy:Boolean;// = false
private var lastXd:Number;// = -1
private var nextColor:int;
private var xPos:int;
private var lastYd:Number;// = -1
private var aimLight:Shape;
private var dirty:Boolean;// = true
public var nextBallDot:MovieClip;
public var aimHolder:MovieClip;
public var eyes:MovieClip;
private var currentColor:int;
public var noAnim:Boolean;// = false
private var reloadType:int;
public var yFakeAim:int;// = -1
private var ball:Ball;
private static var RELOAD_DURATION:int = 6;
private static var random:MtRandom = new MtRandom(48483);
public function Frog(_arg1:int=-1, _arg2:int=-1){
if ((((_arg1 == -1)) && ((_arg2 == -1)))){
_arg1 = int(this.x);
_arg2 = int(this.y);
fakeFrog = true;
currentColor = random.nextInt(4);
nextColor = random.nextInt(4);
setBallColor(currentColor);
setNextColor(nextColor);
};
this.xPos = _arg1;
this.yPos = _arg2;
this.x = _arg1;
this.y = _arg2;
eyes.gotoAndStop(1);
aimLight = new Shape();
aimLight.graphics.moveTo(-12, 0);
aimLight.graphics.beginFill(2162687, 0.333);
aimLight.graphics.lineTo(12, 0);
aimLight.graphics.lineTo(0, 1000);
aimLight.graphics.lineTo(-12, 0);
aimLight.graphics.endFill();
aimLight.y = 18;
aimHolder.addChild(aimLight);
aimLight.visible = false;
reloadTime = 0;
}
public function clearBalls(){
currentColor = -1;
nextColor = -1;
setBallColor(currentColor);
setNextColor(nextColor);
}
override public function init(_arg1:GameArea):void{
super.init(_arg1);
clearBalls();
}
public function lose(){
clearBalls();
loseTime = 0;
loseRot = rotation;
}
override public function render(_arg1:int, _arg2:Number):void{
var _local6:Number;
var _local7:*;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local3:Number = 0;
var _local4:Number = 0;
var _local5:Boolean = ((((!((gameArea == null))) && ((gameArea.level.accuracyCount > 0)))) && ((currentColor >= 0)));
if (fakeFrog){
_local3 = (xFakeAim - x);
_local4 = (yFakeAim - y);
} else {
if (((!((parent.mouseX == 0))) && (!((parent.mouseY == 0))))){
_local3 = (parent.mouseX - x);
_local4 = (parent.mouseY - y);
};
};
if (((((((!(dirty)) && ((_local3 == lastXd)))) && ((_local4 == lastYd)))) && ((_local5 == hadAccuracy)))){
return;
};
hadAccuracy = _local5;
lastXd = _local3;
lastYd = _local4;
dirty = false;
if (reloadTime > 0){
_local6 = ((reloadTime - _arg2) / RELOAD_DURATION);
tongue.y = (-(_local6) * 48);
if (reloadType == 0){
_local9 = (Math.sin((_local6 * 3.1416)) * 8);
_local10 = ((Math.sin(((rotation * Math.PI) / 180)) * _local6) * _local9);
_local11 = ((-(Math.cos(((rotation * Math.PI) / 180))) * _local6) * _local9);
x = (xPos + _local10);
y = (yPos + _local11);
if (GameArea.FANCY_EFFECTS){
scaleY = (1 - (_local6 * 0.1));
scaleX = (1 + (_local6 * 0.1));
};
};
_local7 = int(((Math.sin((_local6 * 3.1416)) * 3) + 1));
if (_local7 < 1){
_local7 = 1;
};
if (_local7 > 3){
_local7 = 3;
};
eyes.gotoAndStop(_local7);
nextBallDot.alpha = (1 - Math.sin((_local6 * 3.1416)));
_local8 = -(_local6);
if (_local6 >= 0.5){
_local8 = (1 - _local6);
};
nextBallDot.y = (-33 + (_local8 * 10));
};
if (loseTime >= 0){
_local12 = (loseTime + _arg2);
rotation = ((loseRot + ((_local12 * _local12) / 20)) + (_local12 * 10));
aimLight.visible = false;
return;
};
rotation = (((Math.atan2(_local4, _local3) * 180) / 3.1416) - 90);
if (_local5){
aimLight.visible = true;
findClosestCollision();
} else {
aimLight.visible = false;
};
}
override public function tick(_arg1:int):Boolean{
var _local2:*;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:int;
var _local8:*;
if ((((loseTime >= 0)) && (!(noAnim)))){
_local2 = 0;
while (_local2 < 4) {
_local3 = ((Math.random() * 3.1415) * 2);
_local4 = 20;
_local5 = Math.sin(_local3);
_local6 = Math.cos(_local3);
_local7 = int((Math.random() * 16777216));
_local8 = new SparkleParticle((x + (_local5 * 30)), (y + (_local6 * 30)), (_local5 * _local4), (_local6 * _local4), _local7);
gameArea.addParticle(_local8);
_local2++;
};
loseTime++;
dirty = true;
};
if (((!((gameArea == null))) && ((currentColor >= 0)))){
if (!gameArea.isColorValid(currentColor)){
currentColor = gameArea.getRandomShooterColor();
setBallColor(currentColor);
dirty = true;
};
if (!gameArea.isColorValid(nextColor)){
nextColor = gameArea.getRandomShooterColor();
if (((((!(GameArea.FANCY_EFFECTS)) || ((reloadTime == 0)))) || ((reloadTime > int((RELOAD_DURATION / 2)))))){
setNextColor(nextColor);
};
dirty = true;
};
};
if (reloadTime > 0){
reloadTime--;
};
if (reloadTime == int((RELOAD_DURATION / 2))){
setNextColor(nextColor);
dirty = true;
};
if (reloadTime == 0){
tongue.y = 0;
x = xPos;
y = yPos;
eyes.gotoAndStop(1);
if (GameArea.FANCY_EFFECTS){
scaleY = 1;
};
nextBallDot.y = -33;
nextBallDot.alpha = 1;
dirty = true;
};
return (true);
}
public function reload(){
currentColor = nextColor;
setBallColor(currentColor);
if (fakeFrog){
nextColor = random.nextInt(4);
} else {
nextColor = gameArea.getRandomShooterColor();
};
reloadTime = RELOAD_DURATION;
reloadType = 0;
if (gameArea != null){
gameArea.sendDebug(((("reload " + currentColor) + " ") + nextColor));
};
}
public function findClosestCollision():void{
var _local8:Array;
var _local9:int;
var _local10:PathBall;
var _local11:Number;
var _local1:Array = gameArea.level.paths;
var _local2:Number = 1;
var _local3:PathBall;
var _local4:Number = (parent.mouseX - x);
var _local5:Number = (parent.mouseY - y);
if ((((_local4 == 0)) && ((_local5 == 0)))){
_local5 = 1;
};
var _local6:Number = Math.sqrt(((_local4 * _local4) + (_local5 * _local5)));
_local4 = ((_local4 / _local6) * 1000);
_local5 = ((_local5 / _local6) * 1000);
var _local7:int;
while (_local7 < _local1.length) {
_local8 = _local1[_local7].balls;
_local9 = 0;
while (_local9 < _local8.length) {
_local10 = _local8[_local9];
if (((_local10.inTunnel) || (_local10.destroyed))){
} else {
_local11 = VecMath.collide2(x, y, _local10.xp, _local10.yp, _local4, _local5, _local10.xd, _local10.yd, 16, 16);
if ((((_local11 >= 0)) && ((_local11 < _local2)))){
_local2 = _local11;
_local3 = _local10;
};
};
_local9++;
};
_local7++;
};
if (_local3 != null){
aimLight.scaleY = _local2;
} else {
aimLight.scaleY = 1;
};
}
public function shootAt(_arg1:int, _arg2:int):void{
if (currentColor == -1){
return;
};
if (((!((reloadTime == 0))) && ((reloadType == 0)))){
return;
};
var _local3:Number = 18;
if (!fakeFrog){
Sounds.launchBall.play(x, y);
if (gameArea.level.accuracyCount > 0){
_local3 = 25;
};
};
var _local4:Number = 16;
var _local5:Number = (_arg1 - xPos);
var _local6:Number = (_arg2 - yPos);
var _local7:Number = Math.sqrt(((_local5 * _local5) + (_local6 * _local6)));
_local5 = (_local5 / _local7);
_local6 = (_local6 / _local7);
var _local8:ShotBall = new ShotBall(currentColor, (xPos + (_local5 * _local4)), (yPos + (_local6 * _local4)), (_local5 * _local3), (_local6 * _local3));
if (gameArea != null){
gameArea.sendDebug(((((((((("shoot " + currentColor) + " ") + (xPos + (_local5 * _local4))) + " ") + (yPos + (_local6 * _local4))) + " ") + (_local5 * _local3)) + " ") + (_local6 * _local3)));
};
_local8.setRotOffset(ball.rotOffset);
rotation = (((Math.atan2(_local6, _local5) * 180) / 3.1416) - 90);
_local8.rotation = rotation;
if (fakeFrog){
Instructions(parent).addEntity(_local8);
Instructions(parent).ballLayer.addChild(_local8);
} else {
gameArea.addEntity(_local8);
gameArea.ballLayer2.addChild(_local8);
};
reload();
}
public function levelStart(){
currentColor = gameArea.getRandomShooterColor();
nextColor = gameArea.getRandomShooterColor();
setBallColor(currentColor);
setNextColor(nextColor);
}
public function setBallColor(_arg1:int):void{
if (ball != null){
tongue.removeChild(ball);
ball = null;
};
if (_arg1 >= 0){
ball = new Ball(_arg1);
ball.x = 16;
ball.y = 24;
tongue.addChild(ball);
};
dirty = true;
}
public function setMouse(_arg1:int, _arg2:int):void{
}
public function toggleColor():void{
if (currentColor == -1){
return;
};
if (((!((reloadTime == 0))) && ((reloadType == 0)))){
return;
};
if (nextColor == currentColor){
return;
};
dirty = true;
if (!fakeFrog){
Sounds.swapBalls.play(x, y);
};
var _local1:int = currentColor;
currentColor = nextColor;
nextColor = _local1;
setBallColor(currentColor);
if (GameArea.FANCY_EFFECTS){
reloadTime = RELOAD_DURATION;
reloadType = 1;
} else {
setNextColor(nextColor);
};
if (gameArea != null){
gameArea.sendDebug(((("toggle_color " + currentColor) + " ") + nextColor));
};
}
public function setNextColor(_arg1:int):void{
if (_arg1 < 0){
nextBallDot.gotoAndStop(7);
} else {
nextBallDot.gotoAndStop((_arg1 + 1));
};
dirty = true;
}
}
}//package src.entity
Section 4
//PathBall (src.entity.PathBall)
package src.entity {
import src.*;
import src.level.*;
import flash.events.*;
import src.sound.*;
import flash.display.*;
import src.particle.*;
import flash.geom.*;
public class PathBall extends Ball {
private var lastX:Number;// = -1
private var lastY:Number;// = -1
public var yd:Number;
public var isRenderedInTunnel:Boolean;
public var insertSpeed:Number;// = 0.15
public var yp:Number;
public var destroyed:Boolean;// = false
public var xInsertFrom:Number;// = 0
public var yo:Number;
public var insertTime:Number;// = 1
public var path:Path;
public var backwardsSpeed:Number;// = 0
public var rotInsertFrom:Number;// = 0
public var bm:Bitmap;// = null
public var pos:Number;// = 0
public var yInsertFrom:Number;// = 0
public var lastPos:Number;
private var deathTime;// = 0
public var suckCount:Number;// = 0
public var xd:Number;
public var inTunnel:Boolean;// = false
public var connectBack:Boolean;// = false
public var xo:Number;
public var xp:Number;
public var backwardsCount:Number;// = 0
public static var USE_BITMAPS:Boolean = true;
public static var DEATH_DURATION:int = 13;
public function PathBall(_arg1:Path, _arg2:int, _arg3:Number){
super(_arg2);
this.pos = _arg3;
this.path = _arg1;
isRenderedInTunnel = false;
this.lastPos = _arg3;
if (USE_BITMAPS){
removeChild(ballMc);
bm = new Bitmap(BitmapCache.ballBitmaps[0][0][0], PixelSnapping.ALWAYS, false);
addChild(bm);
};
}
public function remove():void{
destroyed = true;
deathTime = DEATH_DURATION;
}
override public function init(_arg1:GameArea):void{
super.init(_arg1);
lastPos = pos;
var _local2:int = int(pos);
var _local3:Number = (pos - _local2);
var _local4:Node = path.getNode((_local2 - 1));
var _local5:Node = path.getNode(_local2);
xo = (xp = (_local4.x + ((_local5.x - _local4.x) * _local3)));
yo = (yp = (_local4.y + ((_local5.y - _local4.y) * _local3)));
}
override public function tick(_arg1:int):Boolean{
if ((((powerupTime > 0)) && ((powerup > 0)))){
powerupTime--;
if (powerupTime <= 0){
setPowerup(0);
};
};
if (insertTime < 1){
insertTime = (insertTime + insertSpeed);
if (insertTime >= 1){
insertTime = 1;
path.ballInserted(this);
};
};
if (destroyed){
deathTime++;
if (deathTime >= DEATH_DURATION){
if (path != null){
path.removeBall(this);
};
return (false);
};
};
xo = xp;
yo = yp;
lastPos = pos;
var _local2:int = int(pos);
var _local3:Number = (pos - _local2);
var _local4:Node = path.getNode((_local2 - 1));
var _local5:Node = path.getNode(_local2);
xp = (_local4.x + ((_local5.x - _local4.x) * _local3));
yp = (_local4.y + ((_local5.y - _local4.y) * _local3));
xd = (xp - xo);
yd = (yp - yo);
inTunnel = ((_local5.inTunnel) || (_local4.inTunnel));
return (true);
}
override public function render(_arg1:int, _arg2:Number):void{
var pp:Number;
var i:int;
var pa:Number;
var p:Node;
var n:Node;
var newX:Number;
var newY:Number;
var insertA:*;
var rt:Number;
var rot:Number;
var frame:int;
var rotFrame:int;
var step:int;
var rFrame:int;
var ppa:*;
var time:Number;
var tickNum = _arg1;
var a = _arg2;
try {
pp = (lastPos + ((pos - lastPos) * a));
i = int(pp);
pa = (pp - i);
p = path.getNode((i - 1));
n = path.getNode(i);
newX = (xp - (xd * (1 - a)));
newY = (yp - (yd * (1 - a)));
insertA = (insertTime + (insertSpeed * a));
if (insertA < 1){
newX = (xInsertFrom + ((newX - xInsertFrom) * insertA));
newY = (yInsertFrom + ((newY - yInsertFrom) * insertA));
};
if ((((((((lastX == newX)) && ((lastY == newY)))) && ((powerup == 0)))) && (!(dirty)))){
return;
};
dirty = false;
lastX = newX;
lastY = newY;
if (n.renderInTunnel != isRenderedInTunnel){
dirty = true;
isRenderedInTunnel = n.renderInTunnel;
gameArea.setBallLayer(this, isRenderedInTunnel);
};
visible = ((!(n.hidden)) && (!(destroyed)));
if (USE_BITMAPS){
rotation = 0;
rt = (n.rot - p.rot);
while (rt >= 180) {
rt = (rt - 360);
};
while (rt < -180) {
rt = (rt + 360);
};
rot = (p.rot + (rt * pa));
if (insertA < 1){
rt = (rot - rotInsertFrom);
while (rt >= 180) {
rt = (rt - 360);
};
while (rt < -180) {
rt = (rt + 360);
};
rot = (rotInsertFrom + (rt * insertA));
};
frame = int(((((pp + 1000) * animFrames) / (16 * 3.1416)) + rotOffset));
frame = ((frame % animFrames) + 4);
if (powerup != 0){
frame = (powerup - 1);
powerupMc.rotation = (rot - 90);
rot = (rot - 90);
};
rotFrame = ((((rot / 90) * BitmapCache.dirs) - 0.5) & ((BitmapCache.dirs * 4) - 1));
step = (rotFrame / BitmapCache.dirs);
rFrame = (rotFrame & (BitmapCache.dirs - 1));
bm.rotation = int((step * 90));
bm.y = ((((step == 2)) || ((step == 3)))) ? 16 : -16;
bm.x = ((((step == 1)) || ((step == 2)))) ? 16 : -16;
x = int(newX);
y = int(newY);
bm.bitmapData = BitmapCache.ballBitmaps[color][frame][rFrame];
} else {
x = newX;
y = newY;
setRollFrame(pp);
rt = (n.rot - p.rot);
while (rt >= 180) {
rt = (rt - 360);
};
while (rt < -180) {
rt = (rt + 360);
};
rotation = (p.rot + (rt * pa));
if (insertA < 1){
rt = (rotation - rotInsertFrom);
while (rt >= 180) {
rt = (rt - 360);
};
while (rt < -180) {
rt = (rt + 360);
};
rotation = (rotInsertFrom + (rt * insertA));
if (GameArea.FANCY_EFFECTS){
scaleY = (insertA + 0.5);
scaleX = (1 / ((scaleY * 0.5) + 0.5));
if (scaleY > 1){
scaleY = 1;
};
};
} else {
scaleX = (scaleY = 1);
};
if (shadow != null){
shadow.x = (x - 3);
shadow.y = (y + 4);
};
if (powerup != 0){
ballMc.gotoAndStop(powerup);
rotation = (rotation - 90);
};
};
if (powerup != 0){
dirty = true;
ppa = (1 - (((POWERUP_DURATION - powerupTime) + a) * 0.04));
if (ppa < 0){
ppa = 0;
};
if (ppa > 1){
ppa = 1;
};
lightMc.alpha = (ppa * 0.5);
time = (tickNum + a);
powerupMc.alpha = (((Math.sin((time * 0.3)) * 0.5) + 0.5) * 0.75);
};
} catch(e) {
trace(e);
};
}
override public function removed():void{
super.removed();
if (shadow != null){
shadow.parent.removeChild(shadow);
};
}
public function blowUp():void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:SparkleParticle;
dirty = true;
gameArea.addParticle(new BallExplosion(this));
var _local1 = 10;
if (GameArea.FANCY_EFFECTS){
_local1 = 20;
};
var _local2:int;
while (_local2 < _local1) {
_local3 = (((Math.random() * Math.random()) * 5) + 4);
if (GameArea.FANCY_EFFECTS){
_local3 = (((Math.random() * Math.random()) * 8) + 1);
};
_local4 = (Math.sin((((_local2 / _local1) * Math.PI) * 2)) * _local3);
_local5 = (Math.cos((((_local2 / _local1) * Math.PI) * 2)) * _local3);
_local6 = new SparkleParticle(x, y, _local4, _local5, GameArea.textBallColors[color]);
if (GameArea.FANCY_EFFECTS){
_local6.scaleX = (_local6.scaleY = ((Math.random() * 0.5) + 0.3));
_local6.alpha = ((Math.random() * 0.7) + 0.3);
} else {
_local6.scaleX = (_local6.scaleY = 0.3);
};
gameArea.addParticle(_local6);
_local2++;
};
destroyed = true;
visible = false;
}
}
}//package src.entity
Section 5
//PitCover (src.entity.PitCover)
package src.entity {
import src.*;
import src.level.*;
import flash.display.*;
public class PitCover extends Entity {
private var node:Node;
public var light:MovieClip;
private var alertTime:int;
public static var ALERT_DURATION:int = 14;
public function PitCover(_arg1:Node=null){
light.visible = false;
if (_arg1 == null){
return;
};
alertTime = -1;
this.node = _arg1;
x = _arg1.x;
y = _arg1.y;
gotoAndStop(1);
rotation = (_arg1.rot + 180);
}
override public function tick(_arg1:int):Boolean{
if (alertTime > 0){
alertTime--;
if (alertTime == 0){
light.visible = false;
};
};
return (true);
}
override public function render(_arg1:int, _arg2:Number):void{
var _local3:Number;
if (alertTime > 0){
_local3 = ((alertTime - _arg2) / ALERT_DURATION);
light.alpha = (Math.sin((_local3 * 3.14)) * 0.3);
};
}
public function warn():void{
light.visible = true;
light.alpha = 0;
alertTime = ALERT_DURATION;
}
}
}//package src.entity
Section 6
//ShotBall (src.entity.ShotBall)
package src.entity {
import src.*;
import src.level.*;
import src.math.*;
import src.sound.*;
import src.particle.*;
public class ShotBall extends Ball {
private var yd:Number;
private var shootTime:int;
private var yp:Number;
private var xp:Number;
private var xd:Number;
private static var MAX_GAP_SIZE:Number = 300;
public function ShotBall(_arg1:int, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number){
super(_arg1);
this.xp = _arg2;
this.yp = _arg3;
this.xd = _arg4;
this.yd = _arg5;
shootTime = 0;
}
private function hit(_arg1:PathBall, _arg2:Number):void{
xp = (xp + (xd * _arg2));
yp = (yp + (yd * _arg2));
Sounds.ballHit.play(xp, yp);
var _local3:Path = _arg1.path;
var _local4:PathBall = gameArea.addBall(_local3, _arg1.pos, color);
_local4.insertTime = 0;
_local4.xInsertFrom = xp;
_local4.yInsertFrom = yp;
_local4.gapBonus = (gapBonus * gapCount);
_local4.gapCount = gapCount;
_local4.rotInsertFrom = rotation;
_local3.insert(_local4, _arg1, isInFront(_arg1, xp, yp));
}
override public function render(_arg1:int, _arg2:Number):void{
var _local3:Number;
if (GameArea.FANCY_EFFECTS){
_local3 = (shootTime + _arg2);
scaleX = (1 - (0.4 / ((_local3 * 0.4) + 1)));
scaleY = (1 / scaleX);
};
x = (xp - (xd * (1 - _arg2)));
y = (yp - (yd * (1 - _arg2)));
}
private function checkGapBonuses(_arg1:Number){
var _local4:Array;
var _local5:int;
var _local6:PathBall;
var _local7:*;
var _local8:PathBall;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:int;
var _local23:int;
var _local2:Array = gameArea.level.paths;
var _local3:int;
while (_local3 < _local2.length) {
_local4 = _local2[_local3].balls;
_local5 = 1;
while (_local5 < _local4.length) {
_local6 = _local4[_local5];
if (((_local6.inTunnel) || (_local6.destroyed))){
} else {
_local7 = (_local5 - 1);
if (((_local6.connectBack) && (!(_local4[_local7].destroyed)))){
} else {
while ((((_local7 > 0)) && (_local4[_local7].destroyed))) {
_local7--;
};
_local8 = _local4[_local7];
if (((_local8.inTunnel) || (_local8.destroyed))){
} else {
_local9 = ((_local6.pos - _local8.pos) - 32);
if (_local9 > MAX_GAP_SIZE){
} else {
_local10 = (_local8.xp - _local6.xp);
_local11 = (_local8.yp - _local6.yp);
_local12 = (xp - _local6.xp);
_local13 = (yp - _local6.yp);
_local14 = ((xp + xd) - _local6.xp);
_local15 = ((yp + yd) - _local6.yp);
_local16 = ((_local13 * _local10) - (_local12 * _local11));
_local17 = ((_local15 * _local10) - (_local14 * _local11));
if ((((((_local16 < 0)) && ((_local17 > 0)))) || ((((_local16 > 0)) && ((_local17 < 0)))))){
_local18 = (_local17 - _local16);
_local19 = ((0 - _local16) / _local18);
if (_local19 < _arg1){
_local20 = (xp + (xd * _local19));
_local21 = (yp + (yd * _local19));
if (((isInFront(_local8, _local20, _local21)) && (!(isInFront(_local6, _local20, _local21))))){
_local22 = 500;
_local23 = int(((_local22 * (MAX_GAP_SIZE - _local9)) / MAX_GAP_SIZE));
if (GameArea.EVEN_SCORES){
_local23 = (int((_local23 / 10)) * 10);
};
if (_local23 < 10){
_local23 = 10;
};
gapCount++;
if (_local23 > gapBonus){
gapBonus = _local23;
};
gameArea.sendDebug(("gap_bonus " + _local23));
};
};
};
};
};
};
};
_local5++;
};
_local3++;
};
}
override public function checkCollisions():Boolean{
var _local6:Array;
var _local7:int;
var _local8:PathBall;
var _local9:Number;
var _local1:Array = gameArea.level.paths;
var _local2:Number = 1;
var _local3:PathBall;
var _local4:int;
while (_local4 < _local1.length) {
_local6 = _local1[_local4].balls;
_local7 = 0;
while (_local7 < _local6.length) {
_local8 = _local6[_local7];
if (((((_local8.inTunnel) || (_local8.destroyed))) || ((_local8.pos < 0)))){
} else {
_local9 = VecMath.collide2(xp, yp, _local8.xp, _local8.yp, xd, yd, _local8.xd, _local8.yd, 16, 16);
if (_local9 < _local2){
_local2 = _local9;
_local3 = _local8;
};
};
_local7++;
};
_local4++;
};
var _local5:Coin = gameArea.level.treasure;
if (_local5 != null){
_local9 = VecMath.collide2(xp, yp, _local5.xp, _local5.yp, xd, yd, 0, 0, 16, 16);
if (_local9 < _local2){
gameArea.level.treasure.collect();
return (false);
};
};
checkGapBonuses(_local2);
if (_local3 != null){
gameArea.sendDebug(((("collision " + _local3.pos) + " ") + _local2));
hit(_local3, _local2);
return (false);
};
return (true);
}
private function isInFront(_arg1:PathBall, _arg2:Number, _arg3:Number):Boolean{
var _local4:Path = _arg1.path;
var _local5:Node = _local4.getNode((_arg1.pos - 16));
var _local6:Node = _local4.getNode((_arg1.pos + 16));
var _local7:Node = _local4.getNode(_arg1.pos);
var _local8:Number = (_local6.x - _local5.x);
var _local9:Number = (_local6.y - _local5.y);
var _local10:Number = ((_local8 * (_arg2 - _local7.x)) + (_local9 * (_arg3 - _local7.y)));
return ((_local10 > 0));
}
override public function tick(_arg1:int):Boolean{
shootTime++;
xp = (xp + xd);
yp = (yp + yd);
if (((((((((xp + xd) > -32)) && (((yp + yd) > -32)))) && (((xp + xd) < (640 + 32))))) && (((yp + yd) < (480 + 32))))){
return (true);
};
if (gameArea != null){
gameArea.numClearsInARow = 0;
};
return (false);
}
}
}//package src.entity
Section 7
//Base64Lzw (src.level.Base64Lzw)
package src.level {
public class Base64Lzw {
public var encodingChars:String;
public var initialDictionary:String;
public static var BASE64_ENCODING_CHARS:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-";
public static var DEFAULT_DICTIONARY:String = " !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
public static var EXTENDED_ENCODING_CHARS:String = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.,;:-+\/!#%&()[]_";
public function Base64Lzw(){
encodingChars = BASE64_ENCODING_CHARS;
initialDictionary = DEFAULT_DICTIONARY;
super();
}
public function encode(_arg1:String):String{
var _local6:String;
var _local7:String;
var _local2:Array = buildInitialDictionary();
var _local3 = "";
var _local4 = "";
var _local5:int;
while (_local5 < _arg1.length) {
_local6 = _arg1.charAt(_local5);
_local7 = (_local4 + _local6);
if (_local2.indexOf(_local7) >= 0){
_local4 = _local7;
} else {
_local3 = (_local3 + addPosition(_local2, _local4));
_local4 = _local6;
_local2.push(_local7);
};
_local5++;
};
_local3 = (_local3 + addPosition(_local2, _local4));
return (_local3);
}
private function addPosition(_arg1:Array, _arg2:String):String{
var _local3:int = _arg1.indexOf(_arg2);
var _local4 = "";
var _local5 = 1;
while (_local5 <= _arg1.length) {
_local4 = (_local4 + encodingChars.charAt(((_local3 / _local5) % encodingChars.length)));
_local5 = (_local5 * encodingChars.length);
};
return (_local4);
}
private function buildInitialDictionary():Array{
var _local1:Array = new Array();
var _local2:int;
while (_local2 < initialDictionary.length) {
_local1.push(initialDictionary.charAt(_local2));
_local2++;
};
return (_local1);
}
public function decode(_arg1:String):String{
var _local7:int;
var _local8:int;
var _local9:String;
var _local2:Array = buildInitialDictionary();
var _local3 = "";
var _local4 = "";
var _local5:Boolean;
var _local6:int;
while (_local6 < _arg1.length) {
_local7 = 0;
_local8 = 1;
while (_local8 <= (_local2.length + 1)) {
var _temp1 = _local6;
_local6 = (_local6 + 1);
_local7 = (_local7 + (encodingChars.indexOf(_arg1.charAt(_temp1)) * _local8));
_local8 = (_local8 * encodingChars.length);
};
if (_local7 == _local2.length){
_local9 = (_local4 + _local4.charAt(0));
} else {
_local9 = _local2[_local7];
};
if (!_local5){
_local2.push((_local4 + _local9.charAt(0)));
};
_local3 = (_local3 + _local9);
_local4 = _local9;
_local5 = false;
};
return (_local3);
}
}
}//package src.level
Section 8
//Level (src.level.Level)
package src.level {
import src.*;
import src.entity.*;
import src.math.*;
import src.sound.*;
import src.particle.*;
public class Level {
public var hasCutout:Boolean;
public var losing:Boolean;// = false
public var numColors:int;// = 4
public var gatheredBalls:int;// = 0
public var id:String;
public var accuracyCount:int;// = 0
public var gameArea:GameArea;
public var treasures:Array;
public var won:Boolean;// = false
public var lost:Boolean;// = false
public var treasure:Coin;
private var coinRandom:MtRandom;
public var ballRepeatOdds:int;
public var targetBalls:int;// = 100
public var speed:Number;// = 0.5
public var yShooter:int;
private var appearAnimationComplete:Boolean;// = false
public var shouldWarn:Boolean;// = false
public var passedTime:int;
private var nextCoinIn:int;// = 0
public var warnUrgency:Number;// = 1
public var displayName:String;
public var paths:Array;
private var shooterRandom:MtRandom;
public var xShooter:int;
public var timeLimit:int;
private var topRandom:MtRandom;
private var lastTimeString:String;// = ""
private static var COIN_TIME_RANDOM:int = 300;
public static var levelGroups = [["claw", "spiral", "riverbed", "tiltspiral", "inversespiral", "turnaround"], ["warshak", "loopy", "targetglyph", "triangle", "longrange"], ["snakepit", "coaster", "groovefest", "underover", "squaresville"], ["serpents", "overunder", "spaceinvaders", "blackswirley", "tunnellevel"]];
private static var TIME_BONUS:int = 10000;
public function Level(_arg1:int, _arg2:Boolean, _arg3:MtRandom, _arg4:GameArea){
var _local10:int;
var _local11:int;
var _local12:Boolean;
var _local13:String;
var _local14:Path;
var _local15:int;
var _local16:int;
var _local17:Node;
super();
this.topRandom = _arg3;
var _local5:int = findLevelId(_arg1, _arg2);
targetBalls = (70 + ((_arg1 - 1) * 20));
timeLimit = ((60 + ((_arg1 - 1) * 20)) * GameArea.TICKS_PER_SECOND);
numColors = ((4 + _arg1) - 2);
if (numColors < 4){
numColors = 4;
};
if (numColors > 6){
numColors = 6;
};
speed = (0.6 + ((_arg1 - 1) * 0.08));
ballRepeatOdds = (60 - ((_arg1 - 1) * 9));
passedTime = 0;
if (((GameArea.DEBUG_MODE) && (GameArea.DEBUG_EASY))){
targetBalls = 80;
numColors = 1;
};
coinRandom = new MtRandom(_arg3.nextInt(268435456));
shooterRandom = new MtRandom(_arg3.nextInt(268435456));
this.gameArea = _arg4;
var _local6:XMLList = LevelData.xml.child("level");
var _local7:XMLList = _local6[_local5].child("path");
var _local8:XMLList = _local6[_local5].child("treasure");
id = _local6[_local5].attribute("id").toString();
displayName = _local6[_local5].attribute("displayName").toString();
xShooter = parseInt(_local6[_local5].attribute("xShooter").toString());
yShooter = parseInt(_local6[_local5].attribute("yShooter").toString());
hasCutout = (_local6[_local5].attribute("hasCutout").toString() == "true");
paths = new Array();
var _local9:int;
while (_local9 < _local7.length()) {
_local10 = parseInt(_local7[_local9].attribute("x").toString());
_local11 = parseInt(_local7[_local9].attribute("y").toString());
_local12 = (_local7[_local9].attribute("inTunnel").toString() == "true");
_local13 = _local7[_local9].text().toString();
_local14 = new Path(_arg4, this, _arg3.nextInt(268435456));
_local14.parsePathData(decode(_local13), _local10, _local11, _local12);
paths.push(_local14);
_local9++;
};
treasures = new Array();
_local9 = 0;
while (_local9 < _local8.length()) {
_local15 = parseInt(_local8[_local9].attribute("x").toString());
_local16 = parseInt(_local8[_local9].attribute("y").toString());
_local17 = new Node(_local15, _local16, false, false);
_local17.dists[0] = parseInt(_local8[_local9].attribute("dist1").toString());
_local17.dists[1] = parseInt(_local8[_local9].attribute("dist2").toString());
treasures.push(_local17);
_local9++;
};
treasure = null;
}
public function getParBonus():int{
if (GameData.relaxMode){
return (0);
};
var _local1:Number = passedTime;
var _local2:Number = timeLimit;
var _local3:int = int(((1 - (_local1 / _local2)) * TIME_BONUS));
if (GameArea.EVEN_SCORES){
_local3 = (int((_local3 / 100)) * 100);
};
return ((100 + _local3));
}
public function canLose():Boolean{
var _local2:*;
var _local1:int;
while (_local1 < gameArea.entities.objects.length) {
_local2 = gameArea.entities.objects[_local1];
if ((_local2 is ShotBall)){
return (false);
};
_local1++;
};
_local1 = 0;
while (_local1 < paths.length) {
if (!paths[_local1].canLose()){
return (false);
};
_local1++;
};
return (true);
}
public function winLevel(){
won = true;
gameArea.frog.clearBalls();
gameArea.levelCompleted();
}
public function startLosing(){
gameArea.frog.lose();
losing = true;
}
public function warn(){
var _local1:int;
while (_local1 < paths.length) {
if (paths[_local1].shouldWarn){
paths[_local1].warn();
};
_local1++;
};
if ((timeLimit - passedTime) < (GameArea.TICKS_PER_SECOND * 15)){
gameArea.gui.timeMeter.warn();
};
}
public function getRandomShooterColor():int{
var _local1:* = -1;
do {
_local1 = shooterRandom.nextInt(numColors);
} while (!(isColorValid(_local1)));
return (_local1);
}
public function lose(){
Sounds.rollingBalls.play();
lost = true;
}
public function isColorValid(_arg1:int):Boolean{
var _local2:Boolean;
var _local3:int;
while (_local3 < paths.length) {
if (paths[_local3].hasPossibleColor()){
_local2 = true;
};
_local3++;
};
if (!_local2){
return (true);
};
_local3 = 0;
while (_local3 < paths.length) {
if (paths[_local3].isColorValid(_arg1)){
return (true);
};
_local3++;
};
return (false);
}
private function findLevelByName(_arg1:String):int{
var _local2:XMLList = LevelData.xml.child("level");
var _local3:int;
while (_local3 < _local2.length()) {
if (_local2[_local3].attribute("id").toString() == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function tick(){
var _local3:Number;
var _local4:Boolean;
var _local5:int;
var _local6:Node;
var _local7:*;
shouldWarn = false;
warnUrgency = 1;
if (!appearAnimationComplete){
if (!doAppearAnimation()){
return;
};
gameArea.frog.levelStart();
gameArea.levelStarted();
};
var _local1:int;
var _local2:int;
while (_local2 < paths.length) {
paths[_local2].tick();
if (paths[_local2].shouldWarn){
if (paths[_local2].warnUrgency < warnUrgency){
warnUrgency = paths[_local2].warnUrgency;
};
shouldWarn = true;
};
_local1 = (_local1 + paths[_local2].balls.length);
_local2++;
};
if ((timeLimit - passedTime) < (GameArea.TICKS_PER_SECOND * 15)){
shouldWarn = true;
_local3 = ((timeLimit - passedTime) / (GameArea.TICKS_PER_SECOND * 15));
if (_local3 < warnUrgency){
warnUrgency = _local3;
};
};
if (((((lost) || (won))) || (losing))){
if (won){
losing = false;
};
accuracyCount = 0;
shouldWarn = false;
if (((((!(lost)) && (losing))) && (canLose()))){
lose();
};
return;
};
if (accuracyCount > 0){
accuracyCount = (accuracyCount - 2);
};
if ((((gatheredBalls >= targetBalls)) && ((_local1 == 0)))){
gameArea.gui.quitButton.enabled = false;
shouldWarn = false;
gameArea.frog.clearBalls();
_local4 = doWinAnimation();
if (_local4){
winLevel();
};
return;
};
if (!GameData.relaxMode){
passedTime++;
};
if (passedTime > timeLimit){
gameArea.sendDebug("start_losing out of time");
startLosing();
if (canLose()){
lose();
};
};
updateTimeMeter((timeLimit - passedTime));
if (--nextCoinIn <= 0){
nextCoinIn = (coinRandom.nextInt(COIN_TIME_RANDOM) + Coin.LIFE_SPAN);
_local5 = coinRandom.nextInt(treasures.length);
if ((((treasure == null)) && ((treasures.length > 0)))){
_local6 = treasures[_local5];
treasure = new Coin(_local6.x, _local6.y);
_local2 = 0;
while (_local2 < paths.length) {
if (_local6.dists[_local2] != -999){
_local7 = paths[_local2].getFarthestBallPercent();
if (_local7 < _local6.dists[_local2]){
treasure = null;
break;
};
};
_local2++;
};
if (treasure != null){
Sounds.coinAppear.play(_local6.x, _local6.y);
gameArea.coinLayer.addChild(treasure);
gameArea.addEntity(treasure);
};
};
};
}
public function activateBomb(_arg1:PathBall):void{
var _local6:Number;
var _local7:Number;
var _local8:*;
var _local9:*;
var _local2 = 100;
var _local3:Number = 42;
var _local4:int;
while (_local4 < _local2) {
_local6 = (_local3 / _local4);
_local7 = 0;
while (_local7 < (Math.PI * 2)) {
_local8 = Math.sin(_local7);
_local9 = Math.cos(_local7);
if (GameArea.FANCY_EFFECTS){
gameArea.addParticle(new ExplosionParticle((_arg1.xp + (_local8 * _local4)), (_arg1.yp + (_local9 * _local4)), ((_local8 * _local4) * 0.1), ((_local9 * _local4) * 0.1)));
} else {
gameArea.addParticle(new ExplosionParticle((_arg1.xp + (_local8 * _local4)), (_arg1.yp + (_local9 * _local4)), _local8, _local9));
};
_local7 = (_local7 + _local6);
};
_local4 = (_local4 + _local3);
};
var _local5:int;
while (_local5 < paths.length) {
paths[_local5].activateBomb(_arg1);
_local5++;
};
}
public function checkPowerups(){
var _local1:int;
while (_local1 < paths.length) {
paths[_local1].checkPowerups();
_local1++;
};
}
private function doWinAnimation():Boolean{
var _local1:int;
while (_local1 < paths.length) {
if (!paths[_local1].doWinAnimation()){
return (false);
};
_local1++;
};
return (true);
}
private function findLevelId(_arg1:int, _arg2:Boolean):int{
if (GameData.relaxMode){
_arg1 = (((_arg1 - 1) % 4) + 1);
};
var _local3:Array = levelGroups[(_arg1 - 1)];
var _local4:int = topRandom.nextInt((_arg2) ? 2 : _local3.length);
return (findLevelByName(_local3[_local4]));
}
public function start():void{
nextCoinIn = (coinRandom.nextInt(COIN_TIME_RANDOM) + Coin.LIFE_SPAN);
passedTime = 0;
updateTimeMeter(timeLimit);
var _local1:int;
while (_local1 < paths.length) {
paths[_local1].start();
_local1++;
};
}
public function formatTime(_arg1:int):String{
var _local2:int = int(((_arg1 / GameArea.TICKS_PER_SECOND) + 0.5));
var _local3:int = int((_local2 / 60));
_local2 = (_local2 % 60);
var _local4:* = (_local3 + ":");
if (_local2 < 10){
_local4 = (_local4 + "0");
};
return ((_local4 + _local2));
}
private function doAppearAnimation():Boolean{
if (appearAnimationComplete){
return (true);
};
var _local1:int;
while (_local1 < paths.length) {
if (!paths[_local1].doAppearAnimation()){
return (false);
};
_local1++;
};
appearAnimationComplete = true;
Sounds.rollingBalls.play();
return (true);
}
private function updateTimeMeter(_arg1:int):void{
var _local2:String = formatTime(_arg1);
if (GameData.relaxMode){
_local2 = "";
};
if (_local2 != lastTimeString){
gameArea.gui.timeMeter.text.text = _local2;
lastTimeString = _local2;
};
}
private function decode(_arg1:String):String{
var _local2:Base64Lzw = new Base64Lzw();
_local2.encodingChars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.,;:-+\\/!#%&()[]_";
_local2.initialDictionary = "fgbcnolmkhiwsrqz";
return (_local2.decode(_arg1));
}
}
}//package src.level
Section 9
//LevelArtLoader (src.level.LevelArtLoader)
package src.level {
import src.*;
public class LevelArtLoader {
public var tunnelImage:RetryLoader;
public var bgImage:RetryLoader;
public function isComplete():Boolean{
return ((getProgress() == 100));
}
public function getErrorMessage():String{
var _local1:String = bgImage.lastError;
var _local2 = "";
if (tunnelImage != null){
_local2 = tunnelImage.lastError;
};
if (((!((_local2 == ""))) && ((_local1 == "")))){
_local1 = _local2;
};
if (((!((_local2 == ""))) && (!((_local1 == _local2))))){
_local1 = (_local1 + (" & " + _local2));
};
return (_local1);
}
private function loadImage(_arg1:String):RetryLoader{
var _local2:RetryLoader = new RetryLoader((GameData.imageServer + _arg1));
_local2.load();
return (_local2);
}
public function isFailed():Boolean{
var _local1:Boolean = bgImage.failed;
if (tunnelImage != null){
_local1 = ((_local1) || (tunnelImage.failed));
};
return (_local1);
}
public function getProgress():int{
var _local1:* = bgImage.progress;
if (tunnelImage != null){
_local1 = int(((_local1 + tunnelImage.progress) / 2));
};
return (_local1);
}
public function load(_arg1:Level):void{
bgImage = loadImage((_arg1.id + ".jpg"));
if (_arg1.hasCutout){
tunnelImage = loadImage((_arg1.id + "_cutout.png"));
} else {
tunnelImage = null;
};
}
}
}//package src.level
Section 10
//LevelData (src.level.LevelData)
package src.level {
public class LevelData {
public static var xml:XML = <levels>
<level id="tiltspiral" name="When Spirals Attack" xShooter="242" yShooter="248" hasCutout="false">
<path x="296" y="-11" inTunnel="false">4c4gjh4djkihnooc7lhyqwqpgBxk7pGnzHMzvGzLumJEOXJFjdPZyF\yrkTr#/FL0)0g001w011c0L031c0914141Q0d1m0a1g1h1c1b191d141017121y071)0d18161q1u1f1u1)0s1:0f1D1:0G1E161w1G1J1:070L1d0G1R161w0Q161V1Q1R1Z1.1,1;1Y1X1-1\1/1\1e0!1Q1%1#1-1)1d0_1)1e0O122(16232%1528202927092d06092b2e082%1h20260o2m2k2g2k2e2e0p2h2l2h2v2h2x2k2A2w2G2D2C2w2t2J2A2M2w2C2g2M2C2M2e260T2P2Y2W2P2x2X2W2T2+2,2/2-2+2N2.2#2,2(2#2%2]2_203)22353[25383938380a3d39310e3-2g3a3j353l3#2n3i3_2p3l37060n3w3q3W2l3A3y3j310u3D3z3H3v3v3F3H3G390J3J3g3g370R3Q3K3V3R3T3P3Y3U3,3X3Z3U390;360O3R3E3\3;3%3v3%3(3,3g3/314#334107414O344%3/3d410/3T3c464e4g4b4g4o490h4m4p4e4u4E3v4q4u4z4A4m4y4A4D4F4G4H4y4a0G4K4J4D4M490M4a070q4R4U4Q4W49040X4X4K4M4.4:4;4T4\4:470#4S4#4&4Q4K4+4_4]4a0)405_4Z4:4+455858505e55540f5&4h5)4k5.4h5o5Q4o5a0n5s5u5i085o5r5n5y5s5B5i0C5Z4E5i0y5J5K5L5I5I5C5N5Q5t0R5N5l0Q5V5I5X5S5.5X5;5U5-5Y5I0S5V5#5+5t0%5t0s0U0C0_5o0s0Y0U036U0%0W0Q0D0a6P0,0%091;0.0P0c6X0S0k0k6w1!0S0r6;0s6h1V0g6D1p6e1y6p191C6p6F1h1s1z1U1g1:0Q0M6n0L1N6M1I1R1E1S1+1.1W1Y1Z6&1;6Y1_162Q1e2\6520202!6f2j2l2(6k2l2B2q2t2K2y2I2K2H267a7N2c7w2V2Z2Z2g7]2Z2\2u3!2\24313%2737333u7q7h3_2w7y3y7r3k383p3P3o3D7I7B7#3K7H7H7B3I3Q7O3P7R7R7Z3.3M3W2]3X3.7V3Q3+3.3\7:3;3!7K3!3]384M7)3J3/31808g4v35444T394n4(3j4l4r4x4s490i4z4C4C4y4m8I4p8,4O4s8Y4V4]4;4W4)4x8z895;4B8a5&4i545+4h5d5j5I8d5t5r5M8z5x5z5S4z5D5y5G5C5P5.8N5,8Q5P5H5T5/8!8!8Z5W5R5Z5:5I5]5)5(506U0B0_5G02679u0I0Y0x0,0.09640e6H096j9o6+0h6g6o6(0c6A6g0A6x6t1C1z1N1M1J1O1M1W6X6,6,6X6:6:670</path>
<treasure x="576" y="431" dist1="20" dist2="-999"/>
<treasure x="77" y="423" dist1="35" dist2="-999"/>
<treasure x="70" y="57" dist1="45" dist2="-999"/>
</level>
<level id="underover" name="Mud Slide" xShooter="334" yShooter="247" hasCutout="true">
<path x="667" y="13" inTunnel="false">66egijlmke7nghru7omtzkA6qxzCGoEsFHBiwyFOrqfSRvXIup;uzd-,tQNLU.(%0B0W0!0C0&0T0_0k051+0.0/0!061k0c171)0\0Y0_0A0K0#0]0:0p1;0q0h1o1n1r1m1u1x091C0A1k021t0F0/0X0D1C1l0c1i0x0i0N1G1g0I1S1Q1V160U1O1Q0e0p0O1:1O1I1/1Q1;1d0:1&1d0)1]1[1e0[122c02232[17042d092b2a2[140d242h2d082g2a2f2i2c0k2i2n2h2q2a2f0p2o2q242n2a2x2d240y2c0t2H2m2g2s282h2M2H2N2d0F2m2A2V2x2c0n2F2X2F2N2;2H2F2f2\2Q2Y2%2/2&2Y2S2)24082!2!2702323p253Y22313\28340\2b393c393h3j3e3g3e3c3p3p3h3q3s3q3e3u3w3o3z3o3x3A3D3D3C3z3a0E3J3K3o3I3L3H3O3N3E3R3D3T3M3S3U3Y3P3W3,3e3T3R390;3N3R3!3:3:343%340%3N3\3]32424!370_334\3I3a4246444]3d4a0a4g4]394k44494a064I390h4q4q4s440s4s4v4a0z4B4B4y4E4x4E4y4J4K4L490N4I4N4Q4R4S4T49010U4N4W4S4Z4R4,4Y4;4+4Q4:4Z470V4/4\4&4-4]4Z4,410%405-4459060[4W4a5V435&4a570b5f5h575e525j560h5g5V4m5r5k510W485v5u5w5t5x5w5a5x5V4C5g5D5G5r5I5H5v5x5o575v5M5m510o5T5T585o5o5V5R5.5m5-5W5V5V5-5g5\5.5:5(5;5g0!50626/536#5#5.586V5q076c6s0768636h6e6s0j6k6l6m6k6f6o6r6s6t6u6v6k6B0o6y6y0i1B661G0g1e1i1X0B1.0:1l0P1D0O1S1Y1X1Z1h0w0Q6I1.1;1Y1-1W6,6-612#1+1!1,6(1;1w0&112%6/0)1(6\6&1,6)1573777]1(1a702d7e7f7521252j7k7l792j7n7[192k2q762d2l2a270l2i2u2O2l2s2x7J2X2K2V2I7X2X2R2.2:2K7Z2#2T2O7+2,2V2T7%2]2-2&2]2%213;7_2.7;76303_2-7%7\2.7d3;2i3y328p3S238r3z3s3u3x3C3G3G398O3h8F3&3i8L3V3.3A3n8V3r8o834k8u8+3/3v8[33454k8[3#3D8)3D8k870</path>
<treasure x="76" y="431" dist1="32" dist2="-999"/>
<treasure x="590" y="437" dist1="50" dist2="-999"/>
<treasure x="584" y="100" dist1="60" dist2="-999"/>
</level>
<level id="longrange" name="Long Range" xShooter="450" yShooter="240" hasCutout="false">
<path x="676" y="52" inTunnel="false">6g61hgjkinmkqhslnvwutwABxDEFCHHzJk8MPPLQ6eTWXXVZP.F:w+n/g#%\)!]k0/0+0110141h0:0e07061a1b1U0c171e1g070.0f1d1(0l1j191j1m1V0.0d0(0q1s1p1d1x1s1v1u1B181E1D1d1d0B1J1U0i1s1D1F1V0L1e0P1D1P1N1V1R1e0Q1Y160J1F1-1X1,1!1u1-1J1i1J1[1:1T102%112T1(14212[18281d082c2d2b242b2h2i2j2k2l2i2c0m2o2j2q2h2s2d0s2w2b2q2q240y2C2o2A2v2G2c070c0E2d040L2N2v2B2K2J2c0R2I2K2R2P2N2W2.2T2N2:2W2U2,2X2M2/2!2-2X2/2J2N203%2]2/213033343U2%263_28340c363B203g3U2f3i343h3m340p3q3U2i3o3r3u3t3u3x3q3A3q3_2s3B3y3y3C3z3H3B3J3E3F3M3I3I3z3P3Q3M3U3V3W3T3G3Z3X3W3S3-3;3/3.3!3!3a0%3M3(3;3]3W304q324402464[3B304a434e354c4e4]3]390g4e45470a0(3(3j4o440r4a0n4o4n490x4a0z4C4C47090G4H49010J4L4i01070j0m0R4T02151:1b1k1n1g1m1%091l1c1,4_0Y0W08070O0o0J0S0I0y0F0]4S035D0s0:44505p095r0a5c5_4q0s0g5C0m0P4x0S4)4m090o5r5O4o0Q4l0l5v5j0q5y5i0x5o0A5u560F5Q4D5z5N4E5M5A5O410z5R5P4K4i0J4Q5X5P4L4V5,5M4:5:5.5L4!5K4G4%5!5&5I4(5]5I416062626B44666G4B4F486B466d6j4C4f6t4d6j6z4j6B454m6z4v4A4o6t6u4w4j6p654s6q4p4y6C6g4n4k4s6I6e3D6h4c4j4l4D6Q6L6f4N6S6e470W6b4l4,6.6H6f4+6749484!6%6+6,6)6)6-6(6[6174427_357146777Z3371707d7e7c7f7g7h7i7&6)387+3Z3S3L3p3I2g3b3&2Y2o2R2G2i212_1Q1_1z1g0H1Z4,4Y4-4\4i1V4\4M7Q731/4+4Q7W7&0Y7[0P7X7.7V7#0+7:7X7:4-7/7U4P7(7\4[7[7M1K7+4q128n1:44888d1O7G7G7O7B1z1e868E1F1g8.1U0W1m8\102+13270[1g2w8m2y8x2G2J2H2Q2H2V2T2T2\2h3#24323)2j3f333s7q3a3S8x3Y6t3r7J3R3Y3:3q7d4:8p7/8!8\3#8&8(8/3o7%3]8m7/350;819596987799949a9c9W370</path>
<treasure x="73" y="71" dist1="0" dist2="-999"/>
<treasure x="73" y="241" dist1="60" dist2="-999"/>
<treasure x="342" y="125" dist1="82" dist2="-999"/>
</level>
<level id="claw" name="Osprey Talon" xShooter="333" yShooter="235" hasCutout="false">
<path x="-20" y="133" inTunnel="false">4a4gjj9ihhlimponj7ukuxzvpsvjt4mCIg7HGyaOMRnTQYkKUiCkB-/Mwk&#pG(:0&0K0]0&03141617181[001815101a1b1d1g1f1g1:0j1k1i1n1p1p150q1:0c0t1v1g1x101d001z1i0D1z1F1u1I140G1E1i070x1P1M1K1M1B1S1Q1v1B1W140Y1V1O1v1-1O1V1,1X1-1.1K1+1c0)1%1d0_112S102K1Y1c0:1.1-14242c0b2[1:1Y1e2i2#1j2B102d2d2920202O1r2o2m2u2r2s2d2y2A2C2d0E2A2y2F2E2d070J2c0b0J2P2Q2d0e0R2e0L2S2J2T2X2T2T270e0,2S2:2T260,2#2d0#260S2)2e060#2:213)243034383108313a360d3f3e36070a310a390e3m3p310j31090r3t3w3n3u3z3x36090A3D3B3F3z3A3j3H3x3y3x3t3z3C3M3w3K3O3y3E3v3X3U3t3R3A3;3p3n3w3v3q3s3R3e3\3(3h3,3k3v3]3%3m3]3h3)3541454h3h3j3c3e4f4b4g4i443d3b3m4k4m473n4p4n4q463b3u453v483x4B4A470A4F4G413u4J4H4K4I4z423N4y473q4S4Q43353U4X4I4E4Y4;4)2W403;433U4\4,4_2)2(2\4)4(4V2]403[4%425[4)465_2/223-2&2#21535\445/2[4]2S2!2n5(2.2l5+2q5+2Z2Z2[2w5E2z5A5Y2D5K2C5Q2Z2R2J5Q2O2K5H2P2.1P2G2O5G2U5M2I2X5Q5v2x2z2I2v2q2o2t2o272v2k2#1#5e2(582c262\1[1&1_1V1;1Z166&1S1R1L1R1b6e6f640\1b1D1J1y1t1h6o6M1s1q6t6n6u6w6c1x6e1x6m1o1t1C6l1p1m1I6b1f1a1M6G6O6J0]0[0)0R6W0_0W6S6G021T6-0t0X0;6v0,0L0B0u0s0o0x0(6a0o0F090o0S027)6J0]6)6s01717x0D3a0D3a7f7h7I3I3P3Y3B3w3R3!3&3l3d4k3t754n3b4g3g4l4b3l4x4O4q4(2Z4(4c5Z41505!455a5d535f5K7-2O7[2T745X7d5Z7M7V7\4S7+7!4U7Q7N7#4X4+4N4Y4X7I718R4H4Q4w4r47888B7C7m4a8h4j4e8c4j4B7j8o4l8h4z7e3E4k3f4r8v7r8)3u7l364v8A8z8[3y8u3p8l3!3s3m7-3k7D370j7P8i7P3i7h730f7S8T8Y8Z8.8f770</path>
<treasure x="76" y="52" dist1="0" dist2="-999"/>
<treasure x="584" y="63" dist1="20" dist2="-999"/>
<treasure x="34" y="444" dist1="60" dist2="-999"/>
</level>
<level id="triangle" name="Landing Pad" xShooter="369" yShooter="277" hasCutout="false">
<path x="87" y="-33" inTunnel="false">dggehhjkdmkph6nourluvwzxyzACFiIGHIDqNFOLPMnSOXVWRQ.,:;\-U#EB)[%_001(0K0J0c0F051d051c070c05140c1b1d1f1c14081e1k1m1c0m1q140r1s1u1p1u1x1y1z1A1B140a0C1F1G1z1w1H1K1H1E1L1L1N1O1z1Q1R1y150U1X1O1T1X1J1Y1S1:1+1X1.1\1u1W1U1!1A1;1#1K1)1u1.1T1Q1N190s1E1N1927092D1a0c2e2c2f2a0a072l2k2c290o2n2q290q2p2t2x2y2u2x210A2A2C2u2F2C260G290C2M270M2L2L2O2K2N2P2P2J2H2Q2X2Q2U2Q2Z2,2-2V2R2/210S2W2+2I2)290.2(2V2&2,233[21013+203!2)253b3]2.293:2/2J2]2%2l390d3N2l333h3P2\2]2p3_2T2v3Y2a363,2C3O2;273y3I3X2I2U2M3L2L3G3%273X260S3V3X31060.3Z3.3,3:3+3\3/3!3+3e0%3:3d0.3&360&3_3e0701414440404441494b4j084&3o0f4[3g454a4t0k404h4h4j0k434e0e4s4n4u4w4j4r4q4v4a4a4z4B404z4z4m4C4J4G4F4v4n4y4y4a4B4k4D4u4o0H4H4p4E4v4I4x4w4;4-4K4Q4A4t4V4:4;4.4W4y4[3.4]4s405%42555v4#425)4p4g5+4h5z4T4D4j5\4f5b5q5s4o070A0r0Y0K071g0z59181b181D5c1d0e1a1j1l1p1M5m1I5o1s1J1;1]1]1_1X5Y5Z5K1W5.5A1.1&1y1;5X512:5C1%5&5x1)5[5[1R1_5y1322266D186m2E1t2b6x2l2D2f6E2D2K2k6Y2S2+2+2s3u3[2o6Y2S3z3s6j3c3I3H3!283K3,2v6N3A3G6b3A6p3M6u6K6h3f3R6#270S6z6c3r3T6Z6t3H6V3P3P3M3Z3%2Y3:3;3#3:3_384]394f484j464R4!4(4U4R4b5p514Y465d7i575]4a7a595:435m7j7o7l7x4p7s7r7f7)4Z4[4+4X4_4i7g7r5n7j7,4V4,4W445A74415n4r5t5+470</path>
<treasure x="26" y="128" dist1="0" dist2="-999"/>
<treasure x="563" y="108" dist1="45" dist2="-999"/>
<treasure x="177" y="87" dist1="55" dist2="-999"/>
</level>
<level id="inversespiral" name="Zumaic Exodus" xShooter="424" yShooter="263" hasCutout="true">
<path x="244" y="169" inTunnel="true">dghbhhcknodmpssrsetdxhA6zze7eeD6JJL6OPQRNRVUVYSZ.TYUGPNMOzDIg(kA0p0f001y041n0v0j0u0p070v0q0l0g0r0m0c040q0c0b1i1l1n14040i1r1q1t1q1s1q1d0u1w1A1u1x1C1B1F1C150C1E1H1M1N1O1P1Q1R1N1a0S1V1W1R1U1X1D1.1N1J1H1Z1;1/1C1\1!1q1%1u1%1\1U170U12240U19052726292409092c2a0c2g2f2g2j2k2h2l2n2o2p2q2c230l210r2w2x2o2v2y2B2C2u2D2F2k2i2y2A2E2g2A2N290v260P2P2R2101070V260W210Z2;290;2+2,2+2!2/2P0%2&2,0!2,0(2[2132333435363X06393a3b3Z083c32380f333e3i3i303l393k3X0+0:0L070O0!0w3H0w3u3M0G0C3H0J0F0H0H3x0A0L3_051B0O3Q3R3R3c1S3V3W3X3E0Y3p081Y3U3.3o0-3p0/3U3v0r0j1d1h1z1k1q0m1z1h124r1m0r1q08464b1a4n1o1t1s1f4v1j4E1L1G1&1o4V1)1p4s440-1t4w4j4x4z4A4P1r4B4X1D442F1)1]1[1L4(1N4H44270H432Q4222212429042a012a0,4:4Z462f2-492i2#4d2)4I2)4m2l2]4n225C245G275M285a5t2H2a555e5g5C2K2F2j5c2j5O2m5P270S2S2v2Q2t5S2U2T2t5U2.2,2T2V2X2;2.2H5)2#2v3K5V0n363h3R0P5o3U5N5V5X5Y523k3Z5g333T5;5c3,5\5\5!5l383+5f3&5t3W016Q0x3D3L0G366F3D3x0L0z0F3&0E0c6K3d0]0Z30131g0n651p6T3+3t6N3u6w6i0P3x6A6!3B6D6E6w670</path>
<treasure x="319" y="419" dist1="15" dist2="-999"/>
<treasure x="600" y="446" dist1="22" dist2="-999"/>
<treasure x="603" y="56" dist1="30" dist2="-999"/>
</level>
<level id="loopy" name="Mouth of Centeotl" xShooter="325" yShooter="114" hasCutout="true">
<path x="697" y="413" inTunnel="false">6ghehgjk6mkpinotrlnwuyvBDqEsFGAHILNxG7KMTJCtXe8X,z,O-+\/!%:%,1)_0]0_06011%041-061t081n0a1g0c131X0a1h1b1j1h061m1l1o1d160704111u1q1f190q1v1]0y1A160C1f110F1]010s1J1s131K110M1Q131C1P1B1J1C1U1Y1T1W1V190;1s1-1P1/1y1-1&1E1H1[1%1]1]1\1H1&14232H1\19042a23292c2d292g2e2g2f2j2l2m2m232a0n2r2n2q2s290u2m2x2j2z292B2D2l2z2G2A2I2C29070w2g2x2P2K2N2S2a0M2u2W2K2u240T2,2.2X2q2U2+2N2\2!290:2w2#2q240+2\213_2&2a0_2634070535070c040e3d3g3c0c3i3c0c0d0k3m3m340d0n3t3m3n3c3s3p3y3A3t3d0x3C3v3F3s3C3J3G3r3B3K3I3O3I3G3S3P3T3R370N3G3Q3.3V3t3E3H3B3v3/3s3M3!3H3m3E3z3u3d0%3(3x3!3q3(3w344t314]3k3_394u3c4p3r3l3j3i440q3h3c3m4q404d3q4g370u4f3y4q4r3z4t4t4A4E4G4e3z4I4A4K4I453I4&2e3O4S4R4U46393V4T473O4Q4Z453T4X4T4T443U453#4-4.263a0\2_2&415:2_293&4_445w233751343a5)265e5]2+2:2]2)2&2n5(2_493%2q5N2u5+2V2%2v5,2X2.2B5R2q2s5,2I5,2y5S2R2M5O5B2O5J2v2N5T5R5U5U5Q2N5G5Z5X2t5t5j573M4D4B4g3s4d3n3i4o3s494p3g4[5_3i4n336p334u3a6/3c6C36684a664w3+3&3V3i3\3R3U3q6s6t6N3r6P3x6J3y6A6s3e0B6I3D6x6G6C6P3I6G660J6d0G6Q6P670R6D6e0T6P6P6W6V6P6N6e0.6Z6T6D6o0d0o0!6(6.6j0;6-6T6&6/6o01707j077%67747a767u0]6e7u097g7i7a757g7W6n7x0i7A0a747s7P0m0p0y7r1S0r0z0(0X0f0p0e1g1J7k0n1p1f1O7v1E1z1G1N1Q1L1)1!1V702_1/122H1X7,7W1(1.7)1&1Y7&7\742%702M2.7(152&1f072]1)7784862%1)7e8%7e8[118b8d2828812n8f2a8c8f848k8m8u8c8w8s8s8E1k2A8D892w8x8F8H8E8&122F8M8</path>
<treasure x="65" y="439" dist1="20" dist2="-999"/>
<treasure x="31" y="59" dist1="36" dist2="-999"/>
<treasure x="524" y="277" dist1="60" dist2="-999"/>
</level>
<level id="turnaround" name="Switchback" xShooter="300" yShooter="230" hasCutout="false">
<path x="69" y="495" inTunnel="false">9gh91ihkljognlsiumqwrozpBEtyFvIxGMJKLPOqRTVoaWhYq,i:g+9+#.-.7\&!0_0:0,0,040]001310170Y081Y051b101e171a1f140k1b1e1a0j190l1!0s1l1p1a0a051v1z1x1B1l1u1y1G140a1E1H1r1K1E1l1J1N1y1E1J1S1H1O1M1V140O1Z1.1S1:1.1+170\1O1#1\1-1.150&1&1)1_1223232124272\1c08222a232d2_1f2#1h2i2c2l2g2e2m2&1j2.1r240t2v2n2I1s2q2k292B2z2C2F2E2H2u2D2d2!1d2f2N2E2N2M2J2J2a2c070V2z2W2Y2c0.2U2X2V2+2u2d0u2.2&2d0a2)2]240]213d023335353e063d08333b3a373c33360g3e3k3b3e070m3l3e3i3e3p383o3j3p3j3z363d3934333c053G33303I3G3M3#2F3]2(2M3X2Q3)2T3N3W2U323I3P3D393C3k3z3m370\383y3b3i3u3r3g3&3d0[3a38334e0[3n3e054b49474b460d4g4i3i4a4j4k4k470n4i4r47460g4p4t4s4u4r4A4x4B4z474p4D4u4C4x4J4z4I4M4C4A4N4M4Q4R4O4S4U4W4P4W4.4Z4.4:4M410-4/4!4#4X4%4(4)4,4!4\4[4W48010708060G4u40595+4z405e5b560\470f5f5h5h5j5b5\4j0m5j045k0n0C0610191f1b1q1w1G1r1H1y1Q1;1-1)1M502_162(1b2S5T542t2b2W5p282Y5A2U5T2:5+522Q5O552/5&5#5)5+1[5%106L5R5T1K5N1U1G17696x1j1E5r1!0k1]0%0I0w59060D010k0m6v5l6r6q6v5j5v6v5x6p0v6A6A0s0s0m6Q0I0/0_0z5817190a1N6w1f6!0P6g6B5T6N6z5Z6W0w5[0y6l6t5w6s6u5\4#6s5m5k575l5l5m5g51727i547c5678737a5452737e7f7g7h7d7W4a5/4l715j7[4;4-4;4Z4P4v7S4L4E4V4A7Q4K4z7u424R4D7y4r4G7e4H7v4n4t47424M7e4o3n4S7g494g4S7b4r3146454q3\7]3t3#3d3(7-3:3]7;363,34328,358H35303.35370</path>
<treasure x="45" y="53" dist1="0" dist2="-999"/>
<treasure x="595" y="68" dist1="35" dist2="-999"/>
<treasure x="587" y="435" dist1="45" dist2="-999"/>
</level>
<level id="squaresville" name="Codex of Mixtec" xShooter="324" yShooter="284" hasCutout="false">
<path x="660" y="60" inTunnel="false">6ghijklmnopqo1ruvwxweu8yDEhAFIJkHKNptlCOIQTEMWZrYjYHA\7\ed6de%()0d0011131%0d0c0318171613171714011c0d170h1f1c040m1n140q1p1r1t1u140a0v1y1z1A1B1v1x1r1o1C1H1I1A1E1J1M1C150N1w1Q1S1T1L1T1W1X1W1V1Y1,1B1P1K1;1\1Y1.1v1G1A1&1o1m1d0n1c0j1d1_1b152g1816282a2a1a2d2e2f2g2h2d251i2l2h2b0m291p2r2s2t2u2v2k2v282x24181k251%0%0!0)0e0!0]0#07060\0G0Q2L0.0x0V0D0;0T2m0S0m0X2Y2F0;2r0V2:2!2!2.2#2I0+2z0T2M0/2q0/2V0Q05370t010t090a3939060b390g3i310h3h3k3l3o3n3o3r3s3t3u3v3l3q3w3z3A3B3C3m3D3r3a0F3I3z330s3y3x3h370r3N390L3B3H3P3W3H3Z390a070a0H3R1;3x1E1#3t1#1q1(3H1&1I1_3C114/1X1[3U1X1-144a4b4c4+1d4N1644094f4N134(1t1o1_1k1b132d0j1b2m2o2e2c2y2B4C4s2A2D4G4m2F4i2E211F2(0M2O2g0M0;0[2:0:213(2u0H0&2T0X4Y4-4l0:4+4,0J0,4U0k0t0N253g08360107325b3f3d335j3O3u3S3s3W3J3g5e5F3U3h5l5I370</path>
<treasure x="610" y="230" dist1="37" dist2="-999"/>
<treasure x="610" y="374" dist1="42" dist2="-999"/>
<treasure x="25" y="137" dist1="67" dist2="-999"/>
</level>
<level id="warshak" name="Rorschach" xShooter="305" yShooter="338" hasCutout="false">
<path x="439" y="-27" inTunnel="false">cdc4hhjgikonmhc7rvnxhzucndmgGFtAnHKsHENDLpJRWVPdk.SVC+v,E:UR!E(Z0V0;0+0#0[0k021g031Y0315111N0d1#0A061]081g0!0i1g1n161m18161t1s1u1,0o1x1v1t1z1x1C1D1E1F1G1H1D1A1J1M1N1O1O1e0M1R1D1T1,0V1R170T1R1.1d0e0Z1:1R160\1!1e060&1d0(1]1_160122232221012626090726062d270d2c2a2d2i210f210i29062p2n29210n2l2v2p2a2y2x2l2A290D2p2f2E2n2y2K2J2n2H2L2E2P2I2S290O2J2K2R2X2W2.2Q292Q2,2T2X2Z2Q2!2-2&2U2%2\2+2]2(2[2C2%2+253I270T2M2R2t2S2x2H2B2z2g3c3v2f3A2f3k3B2n3G2B2j3o2s2x2h2v3p2t2w2u2m2m2t2h2c2q2H392c2H3f2L3I3g2e2O3L3L3a2S3T38282c270b2;3T35242Z332/342+3%3(3)322&1[3_33214121454]34474Z1_1_3&1)184d4!1]1g4[1j4g4-1e0d4Z1d4k4n4)1r4(1:1w4w4u4n4\1q4:1D4t4E4,1/1:1\1[1K4J4o4H4N4F4Q4P4%1K4%1,1M4Y4B4Y4z4R4N4W4+4Y4+1.4,0V4Y4T4W1-4%4Y105W1#4K4\4)4;455.470/4]4V4+465]4f5-195h5;1l5,0b5V155x1q5s5P1u5O1L1d0b0x1b5L1s1E5/0r0Q040o0J540L5N5O5M5Q5R5Q5a0M5U5409040U5a0a070,5X5U590a0/5;5!5!5/5)5:5)5_5_5(50626!58326068676a6#2b6Q2d696E2]5E2f646e6m6j6n6o6U2l6q6g6t6s6v6h6w6z6p6(54666q6C6_5+5)5C6]5&5%5J6:5&5Y5Q6Z5/5P6/5+5%5!5T6\5,5V6Z5Y6R6Y6+5T6-6:5%6.5#6)6\5Z5V507X527W557T51777702777R5W5S5e7S5h7i7j7i7i0S5m7M5o7q7p7s7J5v0s7i0K5x7u7D0A7q0J5F0D0x0C0Q0l0;0M0[0\0r001T0-0y0X0e1X0s0f1j0f1n1r1y1F5w1y1J0:7I1v1%7K1F1A1D5M1y5J108t5H1t5q5;1p5k5R425(4k4a8,1F4V4z4G4G4z4X4D4y4U4o4a4q8o4(1r8i4v8i4h4b484026484,302B824[3J8(3#3-3N8Z3Y3;382V3g2S3l2V8L3N3Q3Z8O3Z8e2Q3i2.3u2G3j2M3u2k2m2u3]8q2w3D2M2V2R2s2(2a30313/2b9a9#2e9f9e976c6h9j9Q2X5F6n6G616E6J6o656Q6S6t9N6M6L6z9+6[6Z6;6.5R6(607_6676787Y5c787h7g7k7k750U9S570</path>
<treasure x="551" y="314" dist1="25" dist2="-999"/>
<treasure x="66" y="82" dist1="40" dist2="-999"/>
<treasure x="70" y="375" dist1="60" dist2="-999"/>
</level>
<level id="overunder" name="Sun Stone" xShooter="307" yShooter="278" hasCutout="true">
<path x="-20" y="184" inTunnel="false">44agijlhgh749mnukvoi7kwBytD4AFEJLuIMCKuSwSORtYZXo,;-+\;U/g5%)[]_00111g0c0215161014171a1%0(0b14091e1o0g1i1-0g141q09141p13140d0f1v141u1q1f170z1c0c0B1w1y1A1D1v1d0z1L1K1C1H1E1J1x1M1f1q1B1W1S1H1L1T1t1T1c0y1L1\1+1+1u1/1(1%1(1d0_1[1_12232425252e062d08242b232d2_1f2a272j2c2l222e070g2q2i2b28260s2a27082z2d060A2o2e0A2v2z2E2s2y2G2z2H2E2e0C2L2C2v2T2Q2T2B2W2Z2T2T2y260,2.2+2-2o2,2/2&2.270(2!2_2+2[2W2]203%233Q2[253a3-2%2c3b3e3e333g3g380j3m3n3h3o3q3n3i3r3u3c3t3v3y3z3d3q3x3s3A3F3m310g3I3-2K3I3M370N3N3P3601090T3I390R310Q3S3X3N3T3;3W3\310P3-3V3.3+3)3#3)3Y3T3(3_3U3W3(3Y3%384.3Y384c4U3U3c46090e4j4f490P3k4e4o4g4m4#3k4s4V3p4m4r4c4p4i4y4j4B4g4l4F4g470I4J4F4M4O4P4Q4S4Q4a0T4F4f0V4U4.4O4Z4j4:490+4:4/4F4!4%4n4\4-4(4]4[41515a0L4Z46505V445[47595n4d5d5r0f5A0b5s0g5\495A0o5a0q595h545r5h5p0w5i0v5m0Y4X0#0!0h1[0j1H5K5%0F581e1d1L511N5R5U5H5T5V5W5_0Q5I5_0J5v1g0o1;0m1s1%5r1E1w1w1F1Y1q1!1:1+1:1/146)1/1f0+1B186%1b6e622121292e2m2i2n6t2p2t2w2x2D2i2y2w2J2D2w6I2A6i2H2K2D2y6D6w2C2J6x670f0F2F6L6D2E6z2C6u2x6B2M6P6G2Z6;6z6r6W6u6H6p6/6V6t6a2y6P2P2S2P2R2F2X2V24757Z2:257439773w3e7f7b3t3D3D3g7y3k7G3o7A3K3p7n3r7s7v7e3l3j3u7e3V3L3D7M3[3T3H7_3/3,3]334%3%3i4.3942454t4Q7h4v4A4f4Z7c4,7s4o4v4l4+7w4w4x4E4G4I4L4%7H4%7)7M4+7P4H4B4R490f068N4W4d8;4,4052575j535]46555k5b5j5c5r8q8r5[4u5\4p5l5\4u5p5r0h0A5I0D5G0.0a1X5U5M8Y5]0O871-5P5h1T8P8%0W8M5X8,8)0Z8%5!5\8&5%5Q1x1V1!1&1g6d0a6h642j6m6n6(6Z6U6P6K6Q2N2a2O2H2e9d9d9c937h9F2L2o2O6P2Y2l9Q2)6L2r9t9m999j9q9a9O2v9C9u9.6E9j970</path>
<treasure x="50" y="66" dist1="0" dist2="-999"/>
<treasure x="55" y="434" dist1="38" dist2="-999"/>
<treasure x="546" y="328" dist1="66" dist2="-999"/>
</level>
<level id="spaceinvaders" name="Lair of the Mud Snake" xShooter="271" yShooter="358" hasCutout="true">
<path x="37" y="503" inTunnel="false">9ghijklmni1orstuvoqtawl3BgAuGmIiKFjA7hKITLNW9GPZW,Y94N,A\-A#&-\(0Y070(0)03121(061+0(0_0a08140a1Y0e191c1a0a0_0h1e1l1i1\0e1o1r1l1v121s1l1e1x1y140C1A1s1D1z1z1G1J1J1G1N1B1H1D1N1S1S1M1T1W1Q1R1Z1.1Z1V1c0,1+1+1-1\140!1/1(1,1&1Z1]1D10212[142.122%152_192a2b2c2)1f2d262#182j272h2#1m2j2q2r2\1V1;1,1M1L1R1v140x1I1n1v1i1+0Y041X0M0p0h0y0q070q010q060R2609010U2W2Y2Y2Z2;29060Z2\2;2/2\2%2&2#2&2(2]203[20333!243635373432393]2b3c3)2f3h3#280h3l3m3a3n3p343e0q3t3h3s3n3w373y333A3B3c3C3r3E3z363f0F3L303C3A3P3&2y3S3R36070T360w3Z3Y3V3s3.3:3W3,3s3d0/3e0W3!3:3#3e0d0)3_3600444&3_3448494a4d0c4d4e4d0c0f4h4c4j4h470h4o4g4d040q4c0c0n4g4s4u4n4z4u4y4%1r4B4%1v4-1C4F482F4J4B2O4O4%1n432U4V4i2s2.1f0u2Y4X1#1,4t2s2+4.1!4Y1-4j2+4[4+1u205w225v2#45565z275&4a5b5,4%4;4l2o2\1p2p2R1j5g2k2o5!1T4k2!1R4L4Q4s482J4T4z5C4-1x4D5J4I4E4H4A4I4L5N4A4g4O5E4o4y4q4T5p4v4t4k4Z5q4q470.5,5d4j4f4+5!5-5%5!5/5(5]5_5d474e42694267476c476:586c6d0W35454b6g6Y3h6_3e024046424n6(334:3\2v663+2:2:2Q2Y2+2S2E610C6X2I6H6F6T2X2O6L6P6O6J6O2g0y0S6U6J6X6R6W2R6Q6R2X2.2O6.2R2Q2X2-6N6S2K6I6U2\6(607]6F6U2L6D6,2.277Q2c7a787B6f7U2d7a7j7i7Z2E653;2L6/2l7s7A6t7j7x7z7A7z6%2#2E7d3G7g3I7J7K78333e3L7u3I363F3,3]2O3V7\2\3w6U3U7.3Y3Z7v6+3\734Y3!3%7u6u614f6)304u6l6j6g6m6#3968468_78898c8f6c8b446g806i806m8_5b0c470</path>
<treasure x="212" y="136" dist1="60" dist2="-999"/>
<treasure x="602" y="163" dist1="70" dist2="-999"/>
<treasure x="516" y="265" dist1="85" dist2="-999"/>
</level>
<level id="coaster" name="Altar of Tlaloc" xShooter="325" yShooter="240" hasCutout="true">
<path x="-15" y="63" inTunnel="false">4a4gihjk7mgopsitucuwixA4BxdDHFIc7xNGODLQccPSVDdUM.P:VL+d:%V#V7)#001(001%031_05131217141a111c1e151b0f101e0e1k1a1m131m1]0j1c1o1e1h1u161c191.0r14121(0F161/0\0_0F1;0J1Y0!040.0Y0\0Q1U0U1D0M0N0Y1H0P0I0Q1:1B0;1E0,1C0!1I0o0&1N0C0X1H0_1[1z0C0M042_1128292a2c2b2y0B0y0f2h2j2e2k2i2m2o2p272q2s2v0t2k2l0q2x2h2z2u0B2z2E2C2G2p0h070h0l0M2j0a0o0L2O2K2O2q0R2P2a0R290g0h0.2Y24090L2:2\2g0\2K2a0!2)2X2]2.2\223]270339063&223a3)2a3d3c373f3d32353g373m3i3m3h3p3n3s3o3t3v3t3a0309010w3C3s3B3C3F3t3H3m3J37310k3M3n3J3H3S3K3P3A37360V3B3.3A353,310Y3-37010.3!3B360.3\3N3#3]3\324#3!3)390)3+3_3845494Y3)3f4+374d4+3)3c460g4n4a4f4o4r474s4k4w4p4n454r4k4r4B4n4D4D4+370y4F4G4K4L4N4O4F4C4Q4T4M4U4L480L4e0W4,460.4;4:4+4-4U4!4F4%4\46070!4_4n405)4)4-4e0J445159585[455b5d5]485.4.4g5i595f0j5d5\4d565q545k5q5k5i5x5z5e0.4d0i565B560D5H5i5I5I5k1C5O5F5N5J5Q5d0S5U5D5N5]4N5W5.5F5D5#0.5D5]0m1#5s101n5p1[5&5+5]5+5C1u146_5-5_556861676!5b67666i15191E1d1D1_0;0&0H161U1K1K1]0N1:0s6\0M1X0-0F0T0X0X1V1J0]1F6Z1!1L6+1-1O6-1]1:1G0:1V6;112M6i062Y642g2-6n202a2g2e2#6d2&6d2r2k2)6m207v2l23757p2504767a7o2B2b7d7w2c7g7A2j7y0F2k0y0.2n7q7m0x2N2m0p7u7x7+2n7N2J2W2S2D7:2j0:2L2(2+2/2%2;2Y2[213P7)2L7b3K28303W7X7l3,7+2e3r3,7\7o3q3/7s3#7D3C3f3L3)7D3_7v328U3G36838w328_7L3R358W3;3f8F3T3V3f8l8B3:3k8i8Z3g8-390f0(3W3w8#3i4A3]3&334i464o4k4u4C4S4&4M89555v5l5Q8\4U5l5k1t5F5q5U8:4.8W8B5Z5V5J506!87121)571x1h6k6&0v6!0x6!0z649B1G1J1G0p629b9d0o6l6i1h1n101r196f6%576#5d6%5W8-5.5/8-8N5T5,8O5,8:4Q5J5T8V8S8Y8H9V895U5X8a5Y8e5P9z4p535V9(4(4+4Z9.9V4Q4L8:9W4-9P4!9L8K8R4(9l4v4g4J4j434f4i4h4842aB8(344048a4aD8A3_39aB8x8A8/3jamaN3m8e8d8E3)748%7v3#7q3h3za+7)253c3Eal3EaZ703_223L7T743Y2_2K7#2Y2Ra,2V2VaG7;2U2ZaD7P2U2s7r7:av0f7H2o287b7)a70</path>
<treasure x="35" y="108" dist1="0" dist2="-999"/>
<treasure x="602" y="446" dist1="22" dist2="-999"/>
<treasure x="585" y="50" dist1="32" dist2="-999"/>
</level>
<level id="spiral" name="Spiral of Doom" xShooter="327" yShooter="233" hasCutout="false">
<path x="523" y="-39" inTunnel="false">dghijklmh7nqrstuvwscxhbADgeEtGvJqLlNjPhRdRPNXSd7J;FUd6-Ge,#+/(%]0\0]0,0+0G06021e0(0[051U0b18111U0[0a1h15181&061m1_0e0n1q181/061q111w1v1r1616111B1_0E1A1q1G1\0G1B1M1q1,060N1Q1I1M1U1T1U1X1P1Q1.1W1.1:1;180:1/1.110!1/1%1!1)1Q170]1Q11232#1:1]172225260909260)1f2e270e2j2g2c2%1n2h2o2%1m2j290q202o2u2t2n2m210w2e2m2B2D2u2C21010F2r2K202I2P2K2c2u2U2J2V2u2P2X2X2Z2L2L2U2+2L2R290.2L2b2\2#2:2#2+2(2+223-2_243[2_28323939363b3e390a0f3_2h3b3k3j3n3o3g3#2k3k370h3s3r3q39040q3v3r3u3B3z3C3h3A3v3a0E3v3J3g3O3a0Q3L3K3M3T3g3W3R3X3G3P3X3u3T3a0+3J340/3%3A3#3)3Z3[3[3u340_304)334R354L324747454d4c4c4d4a424j4i4k4m4j4g4m4c0n4s440r4s4v4k4x4u4q4j4c070C4F4A424v4J4u4E4r4N4I470O4N4Q4O4d0A4r4d0R4V4N4.4u4;4z0u4D4c0X4,4\4T4/4)4.4Y440Y4_415!4Q435Y45565z055z065150515g5c5i5g0f5j5g0m5g5p5c575h0r5p5n5n0u5x0T0+0i0Y0-0E5B5:0U0p0H5:0G031(041N5P501C1k1)0#0a1&0x1m1g1k1p1r1s1o1o1u1t1F1+5#5B1P1s1M1D1L1I1T1%0V1-16676/1;1&1,1&112b6j2(1h6a2g6k6826002d2g2k2n6o2r6s2x2e2r2x6b2x2A2N2E2E2N2J2&2:2W2G6T2S2K6&2X2A6Q6%2U2(2-2W673Y62313Z653i3:6-6y330i3m370x383m3[6o3w3g3E3F3v3&6K3z3F3#3q397I3N3:3\3,3R3c7+3G3%3-3!3Z3h7n7#314\3r7b404v7v754z384l4e4k4p4p4E7t4y4t4z4x4v4Q4I4P7H4K4;4W4A4O7R405U7X4U7.4S4N4.745!4:4!7!4]4:4\7+4Y4z0/46505_7358538h5p0m5r5a8t5j0y5w5I0O0Q0Z0J5E5K5-0/041p8Q5#0Y5d1c1t8Y5v1&0o1x1!5B1,5S1C826)5]5R1L1Z1H8F8c6P8!1a662b642p622i2q6v2g2D6n2o6K2A6p2O2+8y2Q2S2F6K6M2Y2]2:2!2]2Y233c3\6d3\699i370</path>
<treasure x="574" y="403" dist1="0" dist2="-999"/>
<treasure x="75" y="400" dist1="30" dist2="-999"/>
<treasure x="71" y="93" dist1="40" dist2="-999"/>
</level>
<level id="blackswirley" name="Dark Vortex" xShooter="320" yShooter="240" hasCutout="false">
<path x="-36" y="56" inTunnel="false">4ghhailkljo7gno4ti5vusAzAwmCDuFiKpCMBEHPIJSHUoTNXY;.O;//Fc!(h&!]0A001o021i04151C0617111u041d1a14001h1[0g0h1r0]0n1k1p1g1g0d0r1u1&0w1m1r1x1w1z170B1c0t1B1d0H1J1r1I1g1c0D1&0G1O1c0T1P140M1I1S1U1T1t1Y1P1I1-1Z1I1;1F1%1W1%1+1F1!1)1W1_1d0!142F1D1324292]19232b2d28282e2f2g2h2k2g2i2m2l2p2r2g2e0r2u2t282w2d0w2e070A232u2B2E270G2E2E260E2K2A2J2O2Q2K2G2R2G2C2U2N2G2.2Y2u260-2e0:2.2+2!2d0%2N2)2Y2%2J2+223A223_2e0531373a37053d39323e3a360d3g3_2l3j373n313o3s3t3g3u3v3j3x3y3p3y3C3w3D3C3B3F3G3I3D3H3K3E3N3P3A3F310Q3U3y3T3V3X3K3Z3S3I3,3j3-360-3!3C3,3&3W3%3)3c3Z3X304+3344490/344T314701474T3649474f4h4/394b4l410e494f410m46090o4t4v4s4o4v4u410f4v4E4D4z4H4v4b4F4D4K4J4M490F4L4F4U4N4U4X4Y4Z4R4R4W4,4-4+4+4a0\4,4!4/4-4&4R4[4[440]4%42590&4!4a07065555595b5k0e5857515a0!4v055j5h5l5q5q590v0p5j5u595x5k0k5y5A515z0A5C5F5g0t5D5I5v0r0L5n0Q5J5Q0R5D0U5t5T5Q0V5,0t0X5Z5U0K0P0+0+0,0)0L0/0y0l091c1b151r0j1f1u1q1766621i1q1]0D1c6v1k1e6o1x1z1l6i6l6S1p1Q1o6G1L1w1R1P1/1(1S1Y1#12212)122!1D2b2e2i2o2L6n2k2N6s2R6F2x2T6V6C2L2H2H2N2S2-2S2+2M2,2\26383i3d3m3a3C2(6[2p3&617y3(2u3H377L397J3a7b7F3M3K3f7V3i7P3h7j7m7\374[3)3r744p7p724b434c4z4d4C4k4x7D4k4E4/3B4y4G464Q4H470V4,4:4.4#4U7[4U7X79070</path>
<path x="687" y="426" inTunnel="false">6ghgeiiklhnoqroju6slypwABuDvFwxi8EtCPQOITUzJGGKRW,;:-JH/1/&()l%[0h0_0J021]0u041g07191i041c1b111e181g07021_0k1f160l1n190h1o1s1p1r1t1p1_0r1%0B1o1j1x1D1C110j1C190B1J1o1A1I110%0L1Q1S1R1J1A1L160L1Y1W110T1j1T1r1,1-1O1-1%1#1,1.1[1(170[1,142-1!14282628290b2d2c2a2c2h2i2j2e2a0k2n2k2m2p2r2h2q2c2u2w2v22290q2m2B2v29040E2C2A270I2C2K2A2O240I2G2a0m2S2U2C2a0N2a0V2S2V2K2T2-2-2;2W2Y2T2!2%2Q2F2.2W2[2Q2Q2)2_2/253_223]223.2a3b3Q2K240e3b370i3.223n3F2n3m3m3q3h3n3v3n3g3u3w3s3h3B3C3z3u3D3G3F3F3H3J3E3M3O3M3s350P3T3U3V3W340c0X3J3Z3U3;3M3-3z3\3Y3F3\3&3u3c0k3#3h3;3-314044440d05434;374Z39464#3c4e4g4[3c0c470c4Z3d0g4p4Y3b4j4o4c4b4t4x4v4u4p4m4c0C4k4F4p4E464E4L474p4d0O4E4O464O4U4U4R4V4Y4Z4.4P4;4X4;4+4\4/4+4e0!4/4%4!4)4;4]4d005%47015P4)475656570%4c5556055%4f5e0h5d5x0d0x0k5n5j5b5k0k5m5K0u5k0q5w5f5A5y5A5A5b5.0t5v0e070H5H0n0O5L5M5N5N0s0q0U5h0G5m0\0!0Z5+0S001.5+560M0+57131(551[5n1L5a1s126m136n1I1u186t1t1w1y181E1H1.1F1U1b6M1R1.1B1Z1+1R1;1s6U1#1\1(1c2n652,1w6f2D692E672G6I6j2g2i2u2s2E2P6D2O2J2D2M2L2]2O2%2C2:2+2T2Z6!263G233f38373t3c3E3r3N3p3]6v3s337z3D3L3L3w3J38757X3b7W3e7,3.354O3!3/3+3n7m7)3p7_3[344d4j4f4h4u4K4B4v4W4P4[3:4&4,4b0H7K7L770</path>
<treasure x="589" y="62" dist1="0" dist2="-999"/>
<treasure x="48" y="441" dist1="0" dist2="-999"/>
<treasure x="46" y="118" dist1="-999" dist2="40"/>
</level>
<level id="serpents" name="Mirror Serpent" xShooter="339" yShooter="271" hasCutout="true">
<path x="658" y="43" inTunnel="false">6ghijklmnopepstug1vyzvrAj8DoCGJixKNOPyIJFQVjf6MWP.DSiSIr#7#6deed0)0_0_0[0d0514161817191b161c0c1f1g1a1h1j1e1j1m1n1o181f0p1b1b0s1v1h131w1z1f1y1A1d1s1l191G1d0G1l1L1d070e1P1J140J1d040c0e1V1S1c0Y1c0O1,1Y1S140+1.1+1%1#1%1)1/1(1/1[10202_122526272829212a2c2d2e2f242f2i2j2k28250l2o2c2a0p2s2t2r2t2w2q2d2v222A2/1A2v2F2D24090H2a0r2J2L270O2L290a0N290S2W2X2I2V2T2V2X2;2;2,2-2/2!2#2%2&29020(2]2_203\290100353_243%22363b3(283!2e333;28343k37033l31043Z090Z0x033Z0w370x0M0z3h0A3h0s3C3L0k0:0H3o0J3A0M3t0U0-0,0S3u0+0T3T3f0V3K0:0Q3D0O3N0!060&060(0[011_0115131C1C1]3D1v1I13434Y364o1u1H194E1c1I1G1O151M1T1X1J1X1P1V1:1.1s440:1)1h2h2x292C2k2n2z452B4E47270</path>
<path x="-46" y="87" inTunnel="false">4ghijklmn47orstuuavyzi5AAxDGHIgcJMNoFCOSJLTWjFXDVk;h-\+K#4Vd&[Lc070_040d0_04131c0c0)041b1b101c1f191d0i1h1i1l1k1l1o1f1p1r1s1t1q1u1w1x1y1b0y1B1C1D1E1m1F1H1I1p1e0J1s1L1w1O1o1Q1d0O1U1T1d070L1e0L160Z160T1;1e0Y1;1#1/1%160#1[1[1e06070]13202)132728292)15262d2b2e2g2d2c2h2k2l262j2m2p2q210h280q2v2w2x2y2d2s2z2C2a2D2F2e2B2G2d2u2J262f0o2q2P2M2h2I2)1I2B29060s2.27010s290:2Y2+290!210#2!2(2&2(2_2]2_2233343536390a073a3b3c3b3f093d35313h3k3c3g330l3p3b3g3m3(2934083x340a0a070x0D3g0F0B3F3i0Z0J3s0K3z0R0k0N3.0X0R3j0-0S3S3W3I3X3m0P3Y0,3z0Z3s0/3i0#3[0l0/0&011]0710181b111c1h1k1n1n1v1G1y1a4M1y1S1c4f4C1h4R1K1l1V1L1Y1T1,1s4-10202d0(15252y4n2g2R2k2F4z2L2S2E4K4M4v270</path>
<treasure x="26" y="274" dist1="34" dist2="-999"/>
<treasure x="38" y="433" dist1="40" dist2="-999"/>
<treasure x="123" y="125" dist1="-999" dist2="72"/>
</level>
<level id="groovefest" name="Sand Garden" xShooter="227" yShooter="236" hasCutout="true">
<path x="655" y="58" inTunnel="false">6g68hklmnleorqotkvgxve7yD6tGF67qLIdILKFqOLUTSKTVYe:Z6d,-:\S\M/N(0X0M0_0H0I051A0g0C0x051s0o010r0h0e1k0h1g1k1g0j1h1o1m1g090q160e1p110C0v1q1o170w1A1J0D1u1A1y1t1p1K1g1C0H1l1t1l0j1f1U1c1m0a1z0w0h071E061J041\1y0R0P0D0X0%111%1U0I0f0[111Q0L032&0%0]0B0%0e0W0+092d2:0g2a2#0c2F0U0]0/0j2n2k2r2t2m2l2c2w2/0/0Z0z2)0z2a2E2A2x2G2O0z2L2c2M2d0P2N270L2P2Q2U2W2X2b0W2c0U2S2P2,2.2U2+2d0+2%2-2P240#2]2]2c070,233d0404313c0332333[293b353c3,263g313f093d36383c0[2p3s3n3k36323t3g363o3r383B3r3A3D3u3F3J3I3E3r3F3y3O3M3y3K3B3A3U3O3W3I3B3B3T3.3R340,353\3+3,3,3O3(3\3s3#3]3&3)32414&364748494a4]33454e4e4d4f4i4\3a0j4m414l4n4p4f4r454t4]3v4x4u4o4A4k44070C4F440r4p4I4F4l470J4L4C4M4l4O4S4E4S4H4H4N4X4U4W4l490;4N4,4S490X4-4H4#4a0a0\440-4]4[405[4\4)415N4&4-485a0b5:4d5g595g590-4i5k5j5l5b5q5d5n5k5q5v5t5u5x5y5A5B5C5D5y510E5G5A5I5F5J5M5L5O590C1P5K5T5k5I5W5k560V590X5G5Z5,5+5:5\5/5G5:5%5s1(5u1,5Z5f010&5_5,5x126C1&5669686Z5v146v166]5u1a6i6e1_576g6C1j6q626Z5H1&5v6c6m6v6u1s6v1s6x6A6D6z1p1)5E1B6h116P1L1x1P6M1T6P1u6R1T1Y6i1S1m0T1R1,6f1:6V1d1!6a1!6u0U1&6:1.1p01707_6Z1,137Z19167:141-1I0#1%1d7q0R0H0G0j7&1F0m742)1p772q7#0;0;0.0m2x7j2B2v2)0F2h2E7H2G2D2N2I2K0T2L7U2N2V2X2S7T7X2!2W7Y7(2.723.7_243]2;7+743d3(28303i30353#2a393#2f3q3#2d3(7G3v3e3b8i3c8q3C3k3b3u398x3n3d8l8I368G3t3N3p3Q3V3K3t8r8M3L3P3+3p8[3D3E4A8P3X3(3H8[3N8Z304Q8%3!3N844Q8V8W874r3E4Y8c4m4h4n450n4j4v4z4e4%8r4,8v4f0t4y4w43949X459O4k4V44989O4#4.4Q4Z4W4)4/44525j545z5w5K5+5\5R5%5d6a6y6K6z6z1O6H1s1S6F9n181H9V6J9F9P6J1G9P1z9D9A6n6x926f6+5d6s9X5s9.5E5-9b570v5s5j5s5l9l5[4j9h9:469896959-8g414)3:3:8N8I3v8x8M8A8H3l8K3q8iav3F3N3oaQ3f8n8q8g370</path>
<treasure x="427" y="103" dist1="0" dist2="-999"/>
<treasure x="587" y="438" dist1="44" dist2="-999"/>
<treasure x="32" y="88" dist1="69" dist2="-999"/>
</level>
<level id="riverbed" name="Riverbed Mosaic" xShooter="274" yShooter="264" hasCutout="false">
<path x="586" y="504" inTunnel="false">9ghijklmnopqrlasvwxuxp3Aq1DnFrIlKiMhOQjMF7gTPYWZ9IK1V:;.!+%!;7F_0!060(0U001_0]0%0F0215171_0a1;0+0_0g1;0a1g110l1]010a160p1j1p1l1r1w1]0w1p1z160y1w1E1A1E1H1I1G160I1L17000L1Q170L11080Q1W1T1X1Z1M1.1;1W1e0;1+1X1/1L1#170#1#160/1)1Q1_112%1C102]1427292+1(1822272b222e2+1e0S1h242k2f2n2]1l2p272d0t2j2c2j2u2q2k2z2+1v2e0D2y2A2z2d0D260F2x2j2C2f2F2]1T2e0V2X2]1E2Z2N2P2j2Y2G2(1:2;2u2-2,2L2U2Z2/2#2W2]2\2G2C253O2F2L2/2)2L2C2c3(1c3v2L2b3W213k393G2i3;2e3m313i333u3h3s3x3w3k2w3C3B3W2i3G3H3F3H3d0L3J3L3O3P3P3c0Q3S3L3U3d040V3d0U3S3;370.3+3c0c070;3X3%340;3!3/3&3&3]3/3#3)314Y3)3c0749434b4)3a4e4b470g4j444d4k494e4j4p4944440r4u4p4x4y4o4w4A4u4C4B4w4G4E4D4G4K4I4F4K4H4O4N4Q4y4Q4M4L4S4X4O4M4a0Y4;4w4,4:4+4Q4/4K4#4-4O4&4[4G4/4#4,4i4+405u445658570757540,49085b5d535d5g540f5h5n5k5e5,4s5a5r5d5a0u5u5m5a0x5B590C5u0d5E5E5u5I5A5L5u0O5J5I5P5C5g0P5I5W5x5U5h0z0Z5j0,5o0-5A0O0w0I0C0H0p0!5#0S0L090V0,0]546-0,0/0#0&001(0[051113190e1m1c1k1q1K1%1a3U2m3z3D3M3O3E3v6u6y6I3x6z6B3A6y6J3F3H6L3N2G3r6H6f3L6F6z6K6I6Q6E6w6P6X6W2f3T6s3-3M6p3P6k3:6\693A3n3A3.6j3j36323E2&237[2H2M2g2w282v2a2328292d7g7h7Z1[1:1;1n6Z1n7Y1X1n6s7W1K1v7C1H1G1z7Q1A1A7H1h6y7q7u1L1h6I7s1r1M7m1m6K7t1j111h1c1T7b1b6Z726X0+5:5.5;5z0/7V0V5S5a5R5f5R5T5r5G5O5A5A5v5E5H5w5n5F538a818C5w5z5c8g8g8p568B5z598b8p5d8i8B578s5q8w8q5x8v8y8w5m5C8o8F8C8e8s5D8s5e5q5k5q8O8l5I8N8x5T885f5k5Y8c555a5_4:8Z4F4S354%3+3Q3+3N3L3O6,6Q6W6_8P6]8Y6[8</path>
<treasure x="577" y="54" dist1="0" dist2="-999"/>
<treasure x="97" y="70" dist1="30" dist2="-999"/>
<treasure x="67" y="432" dist1="40" dist2="-999"/>
</level>
<level id="snakepit" name="Snake Pit" xShooter="318" yShooter="240" hasCutout="false">
<path x="494" y="-10" inTunnel="false">cc7g4dgihc4ordqctvqlkmgwzlsyBxvJEKAxlFiRKlnQoXVUUSUX7ZQ!vtd#(%!)0(0_0]0S011]0[01171816191a181c1d1e151h1g1j1l1m1n1(0e0l1q1e1s1p111u1x1v1(060d0s1D1v1e070E1q1q1B1J1C1d0L1N1G1J1K1C1T1e0V1R1J1L1Y1H1W1;1;1,1W1L160K1/1C1#1;1)1/1Y1#1B1#1e0]11242(142726212O1b292H160e2h2O142b21222l2p2h2q212g2n2n2l2v2x2z2h2u2v2y2h2r2F2G2F2x2I2H2K2L2J2H2M2Q2R2S2Q2N2U2X2Y2Z2.2Q210Y2:2;2\2F2+2h2#2&2!270%2]260+213_290]22303037023:2:29373b36043f310d310b3k3j3b3o303o3:290b3h3s3w39310h3u3g3l3z3u3F3x3I3H343u3M3t3A3P393N3G3P3N3R3S3A3g3S3.3D390M3-3A3+39070-3%3&3:3:3\390a0)3)304_3:304a070a06440_340a0b4d4g4h4i440k4l4l4p0q040i0u0W0y0Z0v041%0y4i1#0x491-0Y0v4(0A0v4C4P0C0L4+0M4&0C0O0D0p0X0O0n0W4j0M0U4u0A0s4p0B0p4o0/4k0#4+4q4(4#4p4p4r4k4o4o4_425n4m455658595b5c5d5f5g585e4h5k4j5b5m5m4o5l5i5s5l4o5v5p5k484u5A5r5C5m5j5E570h4F5D5r5z5J5g4j590I5O5f4S5e474V5g4Q5X5c4V5Z5d4Z5W5\5\5Q5_364#534&544241414]3Z3U3Y356q363_2D2L2p2[2m2q242g292G2R1w2c2i2o2e2h6j6q6i6G1i2k6i2d2t6r2q6e6u2f6I2y6I2s2A2)1O2J6P2S2W2,2U2#2H2S6(29663h35373k3e3z373w3D3-6E3l3D3x3%6L3P3Y3/3Q3.3\327)326471606]36706b7)370</path>
<path x="137" y="485" inTunnel="false">19g6gihk71k96mrhmov1sqAnklq1oByhIyxGOvAKHTLgVuqKL,X-;+9v#/u#)X[!0)0_0011141]07031]030!070a18131f1g190a0h1f1j1l1n1b1m1!0m1q1s101u1a071w1r1i170z1x1j1F1B1G1j140I1C1F1M1i140i1E1P1R1M1E1W1W1M1Q1a0K190K1W1;1K1\1,1J1#1:1#1.1/1E1]1Q102,1(122C1/1024202K162a2,1/1:172e2i240h27072h2k2n2e2q2p2r2x1t2p2n2k2r2z2x2B2C2y2E2A2E2I2w2J2k2c0L2O240N2L2R2C2T2p2V2Q2U2x2V2T2,2W2M2-2M2m2R2#2\2N2R2d0+2Y2%2c0!2Y2_2Q2700353(2_26343[2(21393c0d3Q2f3j3b3h3j340d0(2d3f3N2q3Q2d3v3n3h3u3c0t363A3p3C3E3x3z3q3J3v3L3n3q3A363O3q3S3A3U3T3h3L3p3T3L3:3Z3L370:3d0#3!3%3(3e0)3#3[3d0[3[36024601444e070e06044d4c4b4c4h4h4z0c4z0o0j0z0h0C0Z0K0s0:0!0/0u4%0w4A4%071.0E4x0V0S0J0P0p0R0t0r4O4k0C0M0j0q4i0V4H0p0A0T4o4Z4p4z0p4,4X4j0!4r0-4#4!4&4H0)4l4!4!4n415k455j475c4r08505i4k4i415f5b5h5j5k5k5g4j580a460p5f5n5i4u5e4h4w5u5A5v5y5C5f4D5f470F5x5g4n5L5J594K5e4N544I5b4N5N5d0F5W5q5.5V5d494:5b474V5,5/584a4V5Y5e0+534_5]514)5462634149604[3a4_3(396&3Y3E38333-2H2D2o272g2)1d2c2)132B2v662j2_1v612s6B68222b2H6F6G6A6/1z6o2,1u6p6j2c2p6s2o6F2n6n6C2.6S2P2l6.2Z2\6\2]2b3]233%2)640m3+2(207u3_2t3p3j3J3G3f3O3V3;3P3#3Z3+3i7f6+3%3l7f6(3n7o770</path>
<treasure x="591" y="426" dist1="22" dist2="-999"/>
<treasure x="53" y="59" dist1="-999" dist2="22"/>
</level>
<level id="targetglyph" name="Breath of Ehecatl" xShooter="369" yShooter="222" hasCutout="false">
<path x="650" y="410" inTunnel="false">6ghh1ih8gkljqlpsovxy6evBiDge7hFKGMAG7DBSgdOTVTBYWAIZOQO;OV#RP!)]0J011[0N021E0x0F0z091q0n0a1d1w0e1u0v0h1i0j1f1k1q0j1h110I0r0t1m1q1u1u0y1w0I0p0C1f1k0p090w0D1G160F1I160H1L1Q1k0H1M1F170U1L1W1R1O1R1r1U1T1L1+110/1T1:1V110S1F190]1\1L1&1&1W1!12252T1_1O1)182&192!1[1_1W1_1g2j2g2H1_1p262p2q2i2!1t2t2j2w2v2A290o2C2B2E2C2s2I2I2v2H2L2G2H2O2P2J2P2N2R2S2V2U2V2X2Z2,2;2H2a0:2R2+2Z2!2/2&2P2%290+270]2-2C2!24313904013+2+283a0b3]2a070d3g3a040d3h340l3o3o3k340c0q3o3u3w3t3t370u3C3B3u3d0c0c0B3G3c0d0d040G3M3L3P3M3Q3T3V3W3X3Y3d0e0Z3T3,3Z3-3Y3\3W3!3#3;3.3(3)3[3:3_3[3R3X334U3T334R384G370S3L394b4f4e4J3e4g4P3L3O3H3P3o4q4k4F3i4p4I3w4r4u4x4n4H3E3N3D4H3o4t3F4B4A3H4G3z3O4u4P4C3J4z3F3t3D3T4L4T4F4y3W4x3T4z3O3y3/4+4q3&4#4B3v3x3/4#415350545v365_47535(4a5c5d5f5g575s3h5j5a5l5r3i5v3l573o5t5j5s3w5o5n3p3p3x5g3B5A5j3E5G5d383B5I5j3k3]2p3P5b3m3J5R5P5V5l3N573T5S5.5;5Z5O5,5]2h3a3#513c3e3a3!5]5%506(5336353!5562363a6%2[2c6H203d6V2[296\2l6:2Y2N2p6M2Q2F2!1m2O2n2O1t2r2n2A6l2g2:1k282\1[1&1b2K6a262)1,1P6N6b2Q1%1Y1F1:1R1/1W6.1.6M1Z1D1Q1/6p0Z1/6&6z1v1x1i0P1(6n1u1m127z0l1e17187815141!0e7_0]0-0N0_0)0/0(0M0H001)0H0r7%0;0s7A0.0W0Y0y7e0s7.0S0.3A0Y0A7I7E760.3D7G7N7Q0Q7C7.3Q0,3s7)3,3M7W7)3.7]3,7V0M3-3!7/704]3U7%7[7]7_708+3W354Z348S374V3a464d474c4f4c894e8m4q4j8x4K3E4B4F4O4n8p4J4C3q8v8U4G4x8G4X4]4N4V4M4F8W4F8V470J8&4x3N3%4#4)4/4P815055555b5e5f5Y8,8h5-8q5g5n5l5v5q3%8A5K5F5o5x5K5C5o5.5_8l3n3k3897969J5O5Y5b999c9#5c3l3:5#5N5&5Y5.5_5-5j3f3h3u906c393v906A9868393468690v9G9K9L9(2m6Y2r6T2R9w6s6y2B2n2v6x6z6b2u2g2,9I6+9N6%152W6(1M1:6+6;6N1-6M1!6/6P1\6)62au1%647aay0l1b7l0c1q0ea2170c1m761nae7f741k7i7k7\0+0D0,0X0Z0V7:0C7.7x7BaG7Z7IaD7D7GaC7Ma70</path>
<treasure x="73" y="142" dist1="30" dist2="-999"/>
<treasure x="595" y="350" dist1="50" dist2="-999"/>
<treasure x="580" y="55" dist1="60" dist2="-999"/>
</level>
<level id="tunnellevel" name="Shrine of Quetzalcoatl" xShooter="215" yShooter="240" hasCutout="true">
<path x="493" y="-29" inTunnel="false">dghijkld7mpqrstdcuxyzscbAEFgeGJyIKKfvNjMDRrMtXSkZXeodMI!\7#6!)6d0]0e01160&0606121617191b1]0c1e1c181f1i161f010j1n1o180o1r1s1t1u1v1v1h1w1j1m1z1o1l1w1B1n1G1c1I161K1I1N1L1P160m170m1U110T1R190m1Z1,1W1,1-190\110\1#1%1&1(1/1)1]1_130_122324252\1f090a062b2b2a2c2f2g252!14212h2(1e2n29070a2s2a0r240a0u2a040w2A2z2C2A2F2D2F2G2I2K2L2I2H2M2P2L2c0Q2T2U2V2F2S2W2U2O2T2f0Y2M250Z2/2U2-2!2&2(2!2%2P2,2)2L203V23313E240\2]2V2]2S270A2Y2g3f340S2c070k3j3m3k3d0j3r3w0c0l3u3v0m3Q0A3B3g0w0N0f0Z0E3V0J3E0Z0r0I3i0U0B0L0l0;0+0/0\0H0%0#021X321I0)0-0:391y1C1R1%3(3)3a1t1q1[3]3J11444546444#3)30464K174g1C1d4e45494H1s1O1Q1U1R1X110W1s49060Z1j2t4[1+1j2A4%1C432F4m2o2m2%1J4K4K4M4G4b2l2f2H462U4c2W4f2P4p2&1J4o2o24092\1s2/4\4s2w290w2y2B2D2H2D2e3A2\253i3/2a363b575b5!2d5e563a5h55513g595[2R2X2f3e3n3w0s3S2Q0E3z5g0z3i0O3j0E5m0Q3C3x0G5K3M5F0M3z0L5N5J0P5;0Y3;3&0[0\0]00181:544B1.1R1.1!1z4y4D4U4Y4D4N4m270</path>
<treasure x="536" y="243" dist1="10" dist2="-999"/>
<treasure x="312" y="420" dist1="60" dist2="-999"/>
</level>
</levels>
;
}
}//package src.level
Section 11
//LevelStats (src.level.LevelStats)
package src.level {
public class LevelStats {
public var coins:int;// = 0
public var numGaps:int;// = 0
public var maxCombo:int;// = 0
public var numCombos:int;// = 0
public var score:int;// = 0
public var maxChain:int;// = 0
}
}//package src.level
Section 12
//Node (src.level.Node)
package src.level {
public class Node {
public var renderInTunnel:Boolean;
public var hidden:Boolean;
public var inTunnel:Boolean;
public var rot:Number;
public var x:Number;
public var y:Number;
public var dists:Array;
public function Node(_arg1:Number, _arg2:Number, _arg3:Boolean, _arg4:Boolean){
dists = new Array(3);
super();
this.x = _arg1;
this.y = _arg2;
this.inTunnel = _arg3;
this.renderInTunnel = _arg4;
hidden = false;
}
}
}//package src.level
Section 13
//Path (src.level.Path)
package src.level {
import src.*;
import src.entity.*;
import src.math.*;
import src.sound.*;
import src.particle.*;
public class Path {
private var mLastPowerUpFrame:Array;
private var winPoint:Number;// = 0
private var slowDistance:int;// = 0
private var xBlowupCenter:Number;
private var comboCount:int;// = 0
public var firstBallMovedBackwards:Boolean;// = false
public var nodeCount:int;
private var loseSpeed:Number;// = 0
private var dangerPoint:int;// = 0
private var maxSpeed:Number;// = 100
private var speed:Number;// = 0.5
private var gotBomb:Boolean;// = false
private var powerupRandom:MtRandom;
private var loseTick:int;// = 0
public var balls:Array;
private var lastColor:int;// = -1
private var accelerationRate:Number;// = 0
private var level:Level;
private var colorCounts:Array;
public var slowCount:int;// = 0
private var yBlowupCenter:Number;
private var gameArea:GameArea;
private var totalColorCounts:int;// = 0
private var gotAccuracy:Boolean;// = false
private var slowFactor:Number;// = 3
public var nodes:Array;
private var gotReverse:Boolean;// = false
private var warnPoint:int;// = 0
private var random:MtRandom;
private var winStep:int;// = 0
private var gotSlowdown:Boolean;// = false
private var accelTime:int;// = 0
public var shouldWarn:Boolean;// = false
private var pitCover:PitCover;
private var curAcceleration:Number;// = 0
public var warnUrgency:Number;// = 0
private var advanceSpeed:Number;// = 0
public var backwardCount:int;// = 0
public var stopTime:int;// = 0
private var appearPoint:Number;// = 0
private static var DANGER_DISTANCE:int = 600;
private static var SLOW_DISTANCE:int = 500;
private static var SPEED_SCALE:int = 3;
public function Path(_arg1:GameArea, _arg2:Level, _arg3:int){
colorCounts = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
mLastPowerUpFrame = [0, 0, 0, 0];
super();
this.gameArea = _arg1;
this.level = _arg2;
random = new MtRandom(_arg3);
powerupRandom = new MtRandom(random.nextInt(268435456));
nodeCount = 0;
nodes = new Array();
balls = new Array();
speed = _arg2.speed;
advanceSpeed = (0.5 * 8);
loseSpeed = 4;
}
public function canLose():Boolean{
var _local1:int;
while (_local1 < balls.length) {
if (((!(balls[_local1].destroyed)) && ((balls[_local1].insertTime < 1)))){
return (false);
};
_local1++;
};
return (true);
}
private function getString(_arg1:String):String{
return (GameData.text(_arg1));
}
public function checkCollision(_arg1:PathBall):Boolean{
var _local5:int;
var _local6:int;
var _local7:Number;
if (_arg1.destroyed){
return (false);
};
var _local2:int = countSame(balls.indexOf(_arg1));
var _local3:PathBall;
var _local4:int = balls.indexOf(_arg1);
if (_local2 >= 3){
blowupSame(_local4);
_local5 = 0;
if (_arg1.suckCount > 0){
comboCount++;
_local5 = comboCount;
};
_local6 = _local5;
if (_local6 > 4){
_local6 = 4;
};
Sounds.destroyBalls[_local6].play(xBlowupCenter, yBlowupCenter);
Sounds.chime.play(xBlowupCenter, yBlowupCenter);
doScoring(_arg1.color, xBlowupCenter, yBlowupCenter, _local2, _local5, _arg1.gapBonus, _arg1.gapCount);
while (((balls[_local4].destroyed) && ((_local4 > 0)))) {
_local4--;
};
if ((((((_local4 >= 0)) && (!(balls[_local4].destroyed)))) && ((((_local4 >= (balls.length - 1))) || (balls[(_local4 + 1)].connectBack))))){
_local3 = balls[_local4];
};
} else {
while (connectsBack((_local4 + 1))) {
_local4++;
};
_local3 = balls[_local4];
};
_arg1.gapCount = 0;
_arg1.gapBonus = 0;
if ((((_arg1.suckCount > 0)) && (!((_local3 == null))))){
_arg1.suckCount = 0;
if (_local3.backwardsCount <= 0){
_local3.backwardsCount = 30;
_local7 = (comboCount * 2);
if (_local7 <= 0.5){
_local7 = 0.5;
};
_local3.backwardsSpeed = _local7;
};
};
return ((_local2 >= 3));
}
public function countSame(_arg1:int):int{
if (balls[_arg1].destroyed){
return (0);
};
var _local2:int = balls[_arg1].color;
var _local3:int;
while (((connectsBack(_arg1)) && ((getChainColor((_arg1 - 1)) == _local2)))) {
_arg1--;
};
do {
_local3++;
} while (((connectsBack((_arg1 + _local3))) && ((getChainColor((_arg1 + _local3)) == _local2))));
return (_local3);
}
private function getChainColor(_arg1:int):int{
if ((((_arg1 < 0)) || ((_arg1 >= balls.length)))){
return (-1);
};
if (balls[_arg1].destroyed){
return (-1);
};
return (balls[_arg1].color);
}
public function isColorValid(_arg1:int):Boolean{
return ((colorCounts[_arg1] > 0));
}
public function getFarthestBallPercent():Number{
if (balls.length == 0){
return (0);
};
return (((balls[(balls.length - 1)].pos * 100) / nodeCount));
}
public function ballInserted(_arg1:PathBall):void{
if (((gameArea.lost) || (gameArea.won))){
return;
};
if (checkCollision(_arg1)){
gameArea.numClearsInARow++;
} else {
gameArea.numClearsInARow = 0;
};
}
public function activateBomb(_arg1:PathBall):void{
var _local5:PathBall;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local2:Number = ((45 + 16) + 32);
var _local3:int;
var _local4:int;
while (_local4 < balls.length) {
_local5 = balls[_local4];
if (!_local5.destroyed){
_local6 = (_local5.xp - _arg1.xp);
_local7 = (_local5.yp - _arg1.yp);
_local8 = ((_local6 * _local6) + (_local7 * _local7));
if (_local8 < (_local2 * _local2)){
_local3++;
pop(_local4);
};
};
_local4++;
};
gameArea.sendDebug(((((("bomb " + _arg1.xp) + " ") + _arg1.yp) + " ") + _local3));
}
public function addBall():void{
var _local1:Number = 0;
if (balls.length > 0){
if (balls[0].pos <= 32){
_local1 = (balls[0].pos - 32);
balls[0].connectBack = true;
};
};
var _local2:PathBall = gameArea.addBall(this, _local1, nextBallColor());
balls.splice(0, 0, _local2);
var _local3 = colorCounts;
var _local4 = _local2.color;
var _local5 = (_local3[_local4] + 1);
_local3[_local4] = _local5;
totalColorCounts++;
}
public function updateSuckingBalls():void{
var _local3:int;
var _local1:Boolean;
var _local2:int;
while (_local2 < (balls.length - 1)) {
if (_local1){
_local3 = (_local2 + 1);
while ((((((_local3 < (balls.length - 1))) && (balls[_local3].destroyed))) && (balls[_local3].connectBack))) {
_local3++;
};
_local3--;
if ((((((_local3 < (balls.length - 1))) && (!((_local3 == _local2))))) && ((balls[_local3].color == balls[_local2].color)))){
_local1 = false;
};
};
if (((((((!(connectsBack((_local2 + 1)))) && (!(balls[_local2].destroyed)))) && (!(balls[(_local2 + 1)].destroyed)))) && ((balls[(_local2 + 1)].color == balls[_local2].color)))){
balls[(_local2 + 1)].suckCount++;
suckBack((_local2 + 1));
_local1 = false;
};
_local2++;
};
if (_local1){
comboCount = 0;
};
}
public function parsePathData(_arg1:String, _arg2:int, _arg3:int, _arg4:Boolean):void{
var _local11:int;
var _local12:int;
var _local13:*;
var _local14:*;
var _local5:int = int("a".charCodeAt(_local11));
var _local6:int = _arg2;
var _local7:int = _arg3;
var _local8:Boolean = _arg4;
var _local9:int = (_local8) ? 16 : 0;
var _local10:Node = new Node(_local6, _local7, _local8, _local8);
if (_local9 > 0){
_local10.hidden = true;
_local9--;
};
nodes.push(_local10);
_local11 = 0;
while (_local11 < _arg1.length) {
if (_arg1.charAt(_local11) == "z"){
_local8 = !(_local8);
} else {
_local12 = (int(_arg1.charCodeAt(_local11)) - _local5);
_local13 = ((_local12 % 5) - 2);
_local14 = (int((_local12 / 5)) - 2);
_local6 = (_local6 + _local13);
_local7 = (_local7 + _local14);
_local10 = new Node(_local6, _local7, _local8, _local8);
if (_local9 > 0){
_local10.hidden = true;
_local9--;
};
nodes.push(_local10);
nodeCount++;
};
_local11++;
};
smoothRenderInTunnel(40);
calcRotation();
slowDistance = SLOW_DISTANCE;
dangerPoint = (nodes.length - DANGER_DISTANCE);
}
public function doWinAnimation():Boolean{
if (winPoint >= (nodeCount + (60 * 20))){
return (true);
};
if (winPoint >= nodeCount){
winPoint = (winPoint + 60);
return (false);
};
winStep = (1 - winStep);
if (winStep == 0){
return (false);
};
var _local1 = 100;
gameArea.incScore(_local1);
gameArea.levelStats.score = (gameArea.levelStats.score + _local1);
var _local2:Node = getNode(winPoint);
var _local3:TextParticle = new TextParticle(("+" + _local1), 0xFFFF00, _local2.x, _local2.y);
gameArea.addParticle(_local3);
Sounds.endLevelPop.play(_local2.x, _local2.y);
gameArea.addParticle(new ExplosionParticle(_local2.x, _local2.y, 0, 0), (_local2.renderInTunnel) ? 1 : 0);
winPoint = (winPoint + 60);
return (false);
}
public function smoothRotation():void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local1:Array = new Array(nodeCount);
var _local2:int;
while (_local2 < nodeCount) {
_local3 = getNode((_local2 - 1)).rot;
_local4 = getNode(_local2).rot;
_local5 = getNode((_local2 + 1)).rot;
while ((_local4 - _local3) >= 180) {
_local3 = (_local3 + 360);
};
while ((_local4 - _local3) < -180) {
_local3 = (_local3 - 360);
};
while ((_local5 - _local4) >= 180) {
_local5 = (_local5 - 360);
};
while ((_local5 - _local4) < -180) {
_local5 = (_local5 + 360);
};
_local1[_local2] = ((((_local4 * 2) + _local3) + _local5) / 4);
_local2++;
};
_local2 = 0;
while (_local2 < nodeCount) {
nodes[_local2].rot = _local1[_local2];
_local2++;
};
}
private function connectsBack(_arg1:int):Boolean{
if ((((_arg1 <= 0)) || ((_arg1 >= balls.length)))){
return (false);
};
if (balls[_arg1].destroyed){
return (false);
};
return (balls[_arg1].connectBack);
}
private function pop(_arg1:int):void{
if (balls[_arg1].destroyed){
return;
};
var _local2 = colorCounts;
var _local3 = balls[_arg1].color;
var _local4 = (_local2[_local3] - 1);
_local2[_local3] = _local4;
totalColorCounts--;
level.gatheredBalls++;
if (level.gatheredBalls == level.targetBalls){
Sounds.levelCleared.play();
};
gameArea.setProgress((level.gatheredBalls / level.targetBalls));
balls[_arg1].blowUp();
}
public function checkPowerups():void{
var _local2:int;
if (balls.length == 0){
return;
};
var _local1:int;
while (_local1 < 4) {
if ((((_local1 == 2)) && ((balls.length < 30)))){
} else {
_local2 = 400;
var _local3 = mLastPowerUpFrame;
var _local4 = _local1;
var _local5 = (_local3[_local4] + 1);
_local3[_local4] = _local5;
if ((((((_local2 > 0)) && ((powerupRandom.nextInt(_local2) == 0)))) && ((mLastPowerUpFrame[_local1] > _local2)))){
addPowerup(_local1);
mLastPowerUpFrame[_local1] = 0;
};
};
_local1++;
};
}
private function doPowerup(_arg1:PathBall):void{
gameArea.sendDebug(((((("powerup " + _arg1.pos) + " ") + _arg1.powerup) + " ") + _arg1.powerupTime));
if (_arg1.powerup == 1){
gotAccuracy = true;
Sounds.accuracy.play(_arg1.x, _arg1.y);
level.accuracyCount = 2000;
};
if (_arg1.powerup == 2){
gotReverse = true;
Sounds.reverse.play(_arg1.x, _arg1.y);
if (balls.length > 0){
backwardCount = 300;
};
};
if (_arg1.powerup == 3){
gotBomb = true;
Sounds.bomb.play(_arg1.x, _arg1.y);
level.activateBomb(_arg1);
};
if (_arg1.powerup == 4){
gotSlowdown = true;
Sounds.slowdown.play(_arg1.x, _arg1.y);
if (slowCount < 1000){
slowCount = 800;
};
};
}
public function suckBack(_arg1:int):void{
var _local2:int = _arg1;
var _local3:Number = ((balls[_arg1].pos - balls[(_arg1 - 1)].pos) - 32);
var _local4:Number = ((balls[_arg1].suckCount / 3) * SPEED_SCALE);
do {
balls[_arg1].pos = (balls[_arg1].pos - _local4);
_arg1++;
} while (connectsBack(_arg1));
}
public function doAppearAnimation():Boolean{
var _local3:*;
var _local4:Node;
if (appearPoint >= (nodeCount + (50 * 10))){
return (true);
};
if (appearPoint >= (nodeCount - 32)){
appearPoint = (appearPoint + 30);
return (false);
};
var _local1:Node = getNode(appearPoint);
if ((appearPoint % (30 * 10)) == 0){
Sounds.appear.play(_local1.x, _local1.y);
};
var _local2:int;
while (_local2 < 30) {
_local1 = getNode((appearPoint + _local2));
_local3 = new SparkleParticle(_local1.x, _local1.y, 0, 0, 0xFFFF00);
_local3.animSpeed = 2;
gameArea.addParticle(_local3, (_local1.renderInTunnel) ? 1 : 0);
_local2 = (_local2 + 10);
};
appearPoint = (appearPoint + 30);
if (appearPoint >= (nodeCount - 32)){
_local4 = getNode(appearPoint);
pitCover.warn();
Sounds.levelStart.play(_local4.x, _local4.y);
};
return (false);
}
public function start():void{
var _local1:int;
while (_local1 < 4) {
mLastPowerUpFrame[_local1] = 250;
_local1++;
};
accelTime = int((20 / speed));
var _local2:Node = nodes[(nodes.length - 2)];
pitCover = new PitCover(_local2);
gameArea.ballLayer1.addChild(pitCover);
gameArea.addEntity(pitCover);
if (((GameArea.DEBUG_MODE) && (GameArea.DEBUG_EASY))){
_local1 = 0;
while (_local1 < 79) {
addBall();
_local1++;
};
} else {
_local1 = 0;
while (_local1 < 8) {
addBall();
_local1++;
};
};
}
public function getNode(_arg1:Number):Node{
var _local2:int = int(_arg1);
if (_local2 < 0){
_local2 = 0;
};
if (_local2 >= nodeCount){
_local2 = (nodeCount - 1);
};
return (nodes[_local2]);
}
public function addPowerup(_arg1:int):void{
var _local2:int = powerupRandom.nextInt(balls.length);
if (balls[_local2].powerup == 0){
balls[_local2].setPowerup(_arg1);
};
}
public function addSpecificBall(_arg1:int):void{
var _local2:Number = 0;
if (balls.length > 0){
if (balls[0].pos <= 32){
_local2 = (balls[0].pos - 32);
balls[0].connectBack = true;
};
};
var _local3:PathBall = gameArea.addBall(this, _local2, _arg1);
balls.splice(0, 0, _local3);
var _local4 = colorCounts;
var _local5 = _local3.color;
var _local6 = (_local4[_local5] + 1);
_local4[_local5] = _local6;
totalColorCounts++;
}
public function tick():void{
var _local1:int;
var _local2:PathBall;
var _local3:Number;
var _local4:int;
if (warnPoint > 0){
doWarnAnimation();
};
if (stopTime > 0){
stopTime = (stopTime - 2);
};
if (slowCount > 0){
slowCount = (slowCount - 2);
};
if (backwardCount > 0){
backwardCount = (backwardCount - 2);
};
if (accelTime > 0){
accelerationRate = 2;
accelTime--;
} else {
accelerationRate = 0;
};
if (level.lost){
if ((loseTick % 10) == 0){
Sounds.appear.play();
};
loseTick++;
pitCover.gotoAndStop(13);
_local1 = 0;
while (_local1 < balls.length) {
if (balls[_local1].pos >= nodeCount){
balls[_local1].remove();
};
balls[_local1].pos = (balls[_local1].pos + loseSpeed);
_local1++;
};
loseSpeed++;
if ((((balls.length == 0)) && ((loseTick > 40)))){
gameArea.lose();
};
return;
};
advanceBackwardBalls();
updateSuckingBalls();
advanceBalls();
if (level.gatheredBalls < level.targetBalls){
while ((((balls.length == 0)) || ((balls[0].pos > 0)))) {
addBall();
};
};
pitCover.gotoAndStop(1);
shouldWarn = false;
warnUrgency = 1;
if (balls.length > 0){
_local2 = balls[(balls.length - 1)];
winPoint = _local2.pos;
if (_local2.pos > nodeCount){
gameArea.sendDebug("start_losing ball in pit");
level.startLosing();
} else {
if (_local2.pos > dangerPoint){
_local3 = ((_local2.pos - dangerPoint) / (nodeCount - dangerPoint));
_local4 = int(((_local3 * 12) + 2));
if (_local4 < 2){
_local4 = 2;
};
if (_local4 > 13){
_local4 = 13;
};
pitCover.gotoAndStop(_local4);
shouldWarn = true;
warnUrgency = (1 - _local3);
};
};
};
}
public function warn():void{
var _local1:PathBall = balls[(balls.length - 1)];
if (_local1 != null){
warnPoint = (_local1.pos + 16);
};
}
public function removeBall(_arg1:PathBall):void{
var i:int;
var ball = _arg1;
try {
i = balls.indexOf(ball);
balls.splice(i, 1);
if (i < balls.length){
balls[i].connectBack = false;
};
} catch(e) {
trace("Exception in removeball");
trace(e);
};
}
private function doScoring(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int){
var _local12:int;
if (_arg4 == 0){
return;
};
var _local8 = "";
var _local9:int = (((_arg4 * 10) + _arg6) + (_arg5 * 100));
var _local10:Boolean;
if ((((gameArea.numClearsInARow > 4)) && ((_arg5 == 0)))){
_local10 = true;
_local12 = (100 + (10 * (gameArea.numClearsInARow - 5)));
_local9 = (_local9 + _local12);
gameArea.curInARowBonus = (gameArea.curInARowBonus + _local12);
};
gameArea.curComboScore = (gameArea.curComboScore + _local9);
gameArea.incScore(_local9);
gameArea.levelStats.score = (gameArea.levelStats.score + _local9);
if (_arg5 > 0){
if (_arg5 > gameArea.levelStats.maxCombo){
gameArea.levelStats.maxCombo = _arg5;
};
gameArea.levelStats.numCombos++;
} else {
if (gameArea.numClearsInARow > gameArea.levelStats.maxChain){
gameArea.levelStats.maxChain = gameArea.numClearsInARow;
};
};
if (_arg6 > 0){
gameArea.levelStats.numGaps++;
Sounds.gap.play();
};
_local8 = (_local8 + ("+" + _local9));
if (_arg5 > 0){
_local8 = (_local8 + ("\r" + getString("combo").split("[0]").join(("" + (_arg5 + 1)))));
};
if (_arg6 > 0){
if (_arg7 > 1){
if (_arg7 > 2){
_local8 = (_local8 + ("\r" + getString("gap_bonus_3")));
} else {
_local8 = (_local8 + ("\r" + getString("gap_bonus_2")));
};
} else {
_local8 = (_local8 + ("\r" + getString("gap_bonus")));
};
};
if (_local10){
_local8 = (_local8 + ("\r" + getString("chain_bonus").split("[0]").join(("" + gameArea.numClearsInARow))));
Sounds.chain.play(_arg2, _arg3);
};
if (gotSlowdown){
_local8 = (_local8 + ("\r" + getString("powerup_slowdown")));
};
if (gotReverse){
_local8 = (_local8 + ("\r" + getString("powerup_backwards")));
};
if (gotAccuracy){
_local8 = (_local8 + ("\r" + getString("powerup_accuracy")));
};
gotBomb = false;
gotReverse = false;
gotAccuracy = false;
gotSlowdown = false;
var _local11:TextParticle = new TextParticle(_local8, GameArea.textBallColors[_arg1], _arg2, _arg3);
gameArea.addParticle(_local11);
}
public function insert(_arg1:PathBall, _arg2:PathBall, _arg3:Boolean):void{
if (_arg3){
_arg1.connectBack = true;
_arg1.backwardsSpeed = _arg2.backwardsSpeed;
_arg1.backwardsCount = _arg2.backwardsCount;
_arg2.backwardsSpeed = 0;
_arg2.backwardsCount = 0;
_arg1.pos = (_arg2.pos + 32);
balls.splice((balls.indexOf(_arg2) + 1), 0, _arg1);
} else {
_arg1.connectBack = _arg2.connectBack;
_arg1.suckCount = _arg2.suckCount;
_arg2.suckCount = 0;
_arg2.connectBack = true;
_arg1.pos = _arg2.pos;
balls.splice(balls.indexOf(_arg2), 0, _arg1);
};
var _local4 = colorCounts;
var _local5 = _arg1.color;
var _local6 = (_local4[_local5] + 1);
_local4[_local5] = _local6;
totalColorCounts++;
}
public function doWarnAnimation():Boolean{
var _local3:*;
if (warnPoint >= nodeCount){
pitCover.warn();
warnPoint = 0;
return (true);
};
var _local1:Node = getNode(warnPoint);
var _local2:int;
while (_local2 < 30) {
_local1 = getNode((warnPoint + _local2));
_local3 = new SparkleParticle(_local1.x, _local1.y, 0, 0, 0xFFFF00);
_local3.animSpeed = 2;
gameArea.addParticle(_local3, (_local1.renderInTunnel) ? 1 : 0);
_local2 = (_local2 + 10);
};
warnPoint = (warnPoint + 30);
return (false);
}
public function advanceBackwardBalls():void{
var _local2:PathBall;
var _local3:Number;
firstBallMovedBackwards = false;
if (balls.length == 0){
return;
};
if (backwardCount > 0){
balls[(balls.length - 1)].backwardsSpeed = 1;
balls[(balls.length - 1)].backwardsCount = 1;
};
var _local1:int = (balls.length - 1);
while (_local1 >= 0) {
_local2 = balls[_local1];
if (_local2.backwardsCount > 0){
_local3 = (_local2.backwardsSpeed * SPEED_SCALE);
_local2.backwardsCount = (_local2.backwardsCount - SPEED_SCALE);
balls[_local1].pos = (balls[_local1].pos - _local3);
while ((((_local1 > 0)) && (balls[_local1].connectBack))) {
_local1--;
balls[_local1].pos = (balls[_local1].pos - _local3);
};
if (_local1 == 0){
firstBallMovedBackwards = true;
};
};
_local1--;
};
if (firstBallMovedBackwards){
advanceSpeed = 0;
if (stopTime < 20){
stopTime = 20;
};
};
}
public function blowupSame(_arg1:int):void{
if (balls[_arg1].destroyed){
return;
};
var _local2:int = balls[_arg1].color;
var _local3:int;
while (((connectsBack(_arg1)) && ((getChainColor((_arg1 - 1)) == _local2)))) {
_arg1--;
};
var _local4:Array = new Array();
xBlowupCenter = 0;
yBlowupCenter = 0;
do {
xBlowupCenter = (xBlowupCenter + balls[(_arg1 + _local3)].x);
yBlowupCenter = (yBlowupCenter + balls[(_arg1 + _local3)].y);
if (balls[(_arg1 + _local3)].powerup > 0){
_local4.push(balls[(_arg1 + _local3)]);
};
pop((_arg1 + _local3));
_local3++;
} while (((connectsBack((_arg1 + _local3))) && ((getChainColor((_arg1 + _local3)) == _local2))));
var _local5:int;
while (_local5 < _local4.length) {
doPowerup(_local4[_local5]);
_local5++;
};
xBlowupCenter = (xBlowupCenter / _local3);
yBlowupCenter = (yBlowupCenter / _local3);
}
private function nextBallColor(){
if ((((lastColor < 0)) || ((random.nextInt(100) >= level.ballRepeatOdds)))){
lastColor = random.nextInt(level.numColors);
};
return (lastColor);
}
public function advanceBalls():void{
var _local6:Number;
var _local7:Number;
var _local8:PathBall;
var _local9:PathBall;
var _local10:Number;
if (balls.length == 0){
return;
};
var _local1:Number = 0;
var _local2:Number = speed;
if (accelerationRate != 0){
curAcceleration = (curAcceleration + accelerationRate);
_local2 = (_local2 + curAcceleration);
if (_local2 > maxSpeed){
_local2 = maxSpeed;
};
};
var _local3:Number = 0;
var _local4:int;
while ((((_local4 < balls.length)) && ((((_local4 == 0)) || (balls[_local4].connectBack))))) {
_local4++;
};
_local3 = balls[(_local4 - 1)].pos;
if (slowCount > 0){
_local2 = (_local2 / 4);
};
if (_local3 < (dangerPoint - slowDistance)){
} else {
if (_local3 < dangerPoint){
_local6 = ((_local3 - (dangerPoint - slowDistance)) / slowDistance);
_local2 = (((1 - _local6) * _local2) + ((_local6 * _local2) / slowFactor));
} else {
_local2 = (_local2 / slowFactor);
};
};
_local7 = getFarthestBallPercent();
if (_local7 < 30){
_local2 = (_local2 + ((((30 - _local7) * _local2) * 3) / 30));
if (advanceSpeed < _local2){
advanceSpeed = (advanceSpeed + 0.03);
};
};
if (advanceSpeed > _local2){
advanceSpeed = (advanceSpeed - 0.1);
};
if (advanceSpeed < _local2){
advanceSpeed = (advanceSpeed + 0.005);
if (advanceSpeed >= _local2){
advanceSpeed = _local2;
};
};
_local1 = advanceSpeed;
if (((((!(firstBallMovedBackwards)) && ((stopTime <= 0)))) && ((balls.length > 0)))){
balls[0].pos = (balls[0].pos + (_local1 * SPEED_SCALE));
};
var _local5:Array = new Array();
_local4 = 0;
while (_local4 < (balls.length - 1)) {
_local8 = balls[_local4];
_local9 = balls[(_local4 + 1)];
_local10 = (_local8.insertTime * 32);
if (_local9.pos <= (_local8.pos + _local10)){
if (!_local9.connectBack){
_local9.connectBack = true;
Sounds.ballsConnect.play(((_local8.x + _local9.x) / 2), ((_local8.y + _local9.y) / 2));
if (_local8.color == _local9.color){
_local5.push(_local9);
} else {
_local9.suckCount = 0;
};
};
_local9.pos = (_local8.pos + _local10);
};
_local4++;
};
_local4 = 0;
while (_local4 < _local5.length) {
if (!_local5[_local4].destroyed){
checkCollision(_local5[_local4]);
};
_local4++;
};
}
private function calcRotation(){
var _local2:Node;
var _local3:Node;
var _local4:Number;
var _local5:Number;
var _local1:int;
while (_local1 < nodeCount) {
_local2 = getNode((_local1 - 16));
_local3 = getNode((_local1 + 16));
_local4 = (_local3.x - _local2.x);
_local5 = (_local3.y - _local2.y);
nodes[_local1].rot = (((Math.atan2(_local5, _local4) * 180) / 3.1416) - 90);
_local1++;
};
_local1 = 0;
while (_local1 < 10) {
smoothRotation();
_local1++;
};
}
private function smoothRenderInTunnel(_arg1:int){
var _local4:int;
var _local5:Node;
var _local2:Array = new Array(nodeCount);
var _local3:int;
while (_local3 < nodeCount) {
_local4 = -(_arg1);
while (_local4 <= _arg1) {
_local5 = getNode((_local3 + _local4));
if (_local5.renderInTunnel){
_local2[_local3] = true;
};
_local4++;
};
_local3++;
};
_local3 = 0;
while (_local3 < nodeCount) {
nodes[_local3].renderInTunnel = _local2[_local3];
_local3++;
};
}
public function hasPossibleColor():Boolean{
return ((totalColorCounts > 0));
}
}
}//package src.level
Section 14
//RetryLoader (src.level.RetryLoader)
package src.level {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.system.*;
import flash.net.*;
public class RetryLoader {
public var verbose:Boolean;// = false
public var failed:Boolean;
public var lastHttpStatus:int;
public var maxFails:int;// = 10
public var lastError:String;
public var loader:Loader;
private var failCount:int;
private var url:String;
public var progress:int;
private var retryTimer:Timer;
public function RetryLoader(_arg1:String){
progress = 0;
failed = false;
failCount = 0;
lastError = "";
this.url = _arg1;
}
public function ioError(_arg1:IOErrorEvent):void{
fail(_arg1.text);
}
private function fail(_arg1:String):void{
trace(("Fail: " + _arg1));
if (loader == null){
return;
};
loader = null;
failCount++;
if (verbose){
trace(((("fail #" + failCount) + ": ") + _arg1));
};
if (failCount >= maxFails){
failed = true;
} else {
lastError = _arg1;
retryTimer = new Timer(1500, 1);
retryTimer.addEventListener(TimerEvent.TIMER_COMPLETE, retry);
retryTimer.start();
};
}
public function httpStatus(_arg1:HTTPStatusEvent):void{
lastHttpStatus = _arg1.status;
if (_arg1.status == 0){
lastHttpStatus = 200;
};
}
public function retry(_arg1:TimerEvent):void{
if (verbose){
trace(("retry: " + _arg1));
};
retryTimer = null;
load();
}
public function load():void{
var loaderContext:LoaderContext;
if (verbose){
trace(("Loading " + url));
};
try {
loaderContext = new LoaderContext(true);
loaderContext.checkPolicyFile = true;
if (Security.sandboxType == Security.REMOTE){
loaderContext.applicationDomain = ApplicationDomain.currentDomain;
loaderContext.securityDomain = SecurityDomain.currentDomain;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.contentLoaderInfo.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatus);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressEvent);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
loader.load(new URLRequest(url), loaderContext);
} catch(e) {
fail(("" + e));
};
}
public function complete(_arg1:Event):void{
if (int((lastHttpStatus / 100)) != 2){
fail(("Bad server reply: " + lastHttpStatus));
return;
};
lastError = ("Loaded: " + loader.contentLoaderInfo.bytesTotal);
if (verbose){
trace(("complete: " + _arg1));
};
progress = 100;
}
public function progressEvent(_arg1:ProgressEvent):void{
progress = ((_arg1.bytesLoaded * 100) / _arg1.bytesTotal);
if (progress > 99){
progress = 99;
};
}
}
}//package src.level
Section 15
//MtRandom (src.math.MtRandom)
package src.math {
import flash.utils.*;
public class MtRandom {
private var mti:uint;
private var mt:Array;
public static var MATRIX_A:uint = 2567483615;
public static var UPPER_MASK:uint = 2147483648;
public static var LOWER_MASK:uint = 2147483647;
public static var M:int = 397;
public static var N:int = 624;
private static var mag01:Array = [uint(0), uint(MATRIX_A)];
public function MtRandom(_arg1:uint=0){
mti = (N + 1);
super();
if (_arg1 == 0){
_arg1 = getTimer();
};
mt = new Array(N);
init_genrand(_arg1);
}
private function genrand_int32():uint{
var _local1:Number;
var _local2:uint;
if (mti >= N){
if (mti == (N + 1)){
init_genrand(5489);
};
_local2 = 0;
while (_local2 < (N - M)) {
_local1 = ((mt[_local2] & UPPER_MASK) | (mt[(_local2 + 1)] & LOWER_MASK));
mt[_local2] = ((mt[(_local2 + M)] ^ (_local1 >>> 1)) ^ mag01[uint((_local1 & 1))]);
_local2++;
};
while (_local2 < (N - 1)) {
_local1 = ((mt[_local2] & UPPER_MASK) | (mt[(_local2 + 1)] & LOWER_MASK));
mt[_local2] = ((mt[(_local2 + (M - N))] ^ (_local1 >>> 1)) ^ mag01[uint((_local1 & 1))]);
_local2++;
};
_local1 = ((mt[(N - 1)] & UPPER_MASK) | (mt[0] & LOWER_MASK));
mt[(N - 1)] = ((mt[(M - 1)] ^ (_local1 >>> 1)) ^ mag01[uint((_local1 & 1))]);
mti = 0;
};
_local1 = mt[mti++];
_local1 = (_local1 ^ (_local1 >>> 11));
_local1 = (_local1 ^ ((_local1 << 7) & 2636928640));
_local1 = (_local1 ^ ((_local1 << 15) & 4022730752));
_local1 = (_local1 ^ (_local1 >>> 18));
return (uint(_local1));
}
private function next(_arg1:uint):uint{
return ((genrand_int32() & ((uint(1) << _arg1) - uint(1))));
}
private function init_genrand(_arg1:uint){
var _local2:uint;
var _local3:uint;
mt[0] = uint(_arg1);
mti = 1;
while (mti < N) {
_local2 = (mt[(mti - 1)] ^ (mt[(mti - 1)] >>> 30));
_local3 = uint((_local2 * 1289));
_local3 = uint((_local3 * 1406077));
_local3 = uint((_local3 + mti));
mt[mti] = _local3;
mti++;
};
}
public function nextFloat():Number{
return ((next(24) / 16777216));
}
public function setSeed(_arg1:uint):void{
init_genrand(_arg1);
}
public function nextDouble():Number{
return ((next(24) / 16777216));
}
public function nextInt(_arg1:uint):uint{
return (((genrand_int32() & 2147483647) % _arg1));
}
}
}//package src.math
Section 16
//VecMath (src.math.VecMath)
package src.math {
public class VecMath {
public static function collide2(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number, _arg10:Number):Number{
var _local11:* = (_arg1 - _arg3);
var _local12:* = (_arg2 - _arg4);
var _local13:* = (_arg7 - _arg5);
var _local14:* = (_arg8 - _arg6);
var _local15:* = (_arg9 + _arg10);
if (((_local13 * _local13) + (_local14 * _local14)) == 0){
return (1);
};
var _local16:* = ((_local13 * _local11) + (_local14 * _local12));
if (_local16 < 0){
return (1);
};
var _local17:* = Math.sqrt(((_local13 * _local13) + (_local14 * _local14)));
var _local18:* = (_arg9 + _arg10);
var _local19:* = (((_local11 * _local11) + (_local12 * _local12)) - (_local18 * _local18));
var _local20:* = Math.sqrt(((_local13 * _local13) + (_local14 * _local14)));
_local13 = (_local13 / _local20);
_local14 = (_local14 / _local20);
var _local21:* = ((_local13 * _local11) + (_local14 * _local12));
_local16 = ((((_local13 * _local11) + (_local14 * _local12)) * _local21) - _local19);
if (_local16 <= 0){
return (1);
};
var _local22:* = ((_local21 - Math.sqrt(_local16)) / _local17);
return (_local22);
}
public static function simpleCollide(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number, _arg10:Number):Boolean{
var _local11:* = (_arg1 - _arg3);
var _local12:* = (_arg2 - _arg4);
var _local13:* = (_arg7 - _arg5);
var _local14:* = (_arg8 - _arg6);
if (((_local13 * _local13) + (_local14 * _local14)) == 0){
return (false);
};
var _local15:* = ((_local13 * _local11) + (_local14 * _local12));
if (_local15 < 0){
return (false);
};
var _local16:* = ((_local13 * _local13) + (_local14 * _local14));
var _local17:* = (_arg9 + _arg10);
var _local18:* = (((_local11 * _local11) + (_local12 * _local12)) - (_local17 * _local17));
var _local19:* = Math.sqrt(((_local13 * _local13) + (_local14 * _local14)));
_local13 = (_local13 / _local19);
_local14 = (_local14 / _local19);
var _local20:* = ((_local13 * _local11) + (_local14 * _local12));
_local15 = ((((_local13 * _local11) + (_local14 * _local12)) * _local20) - _local18);
if (_local15 <= 0){
return (false);
};
var _local21:* = (_local20 - Math.sqrt(_local15));
if (((_local20 - Math.sqrt(_local15)) * _local21) > _local16){
return (false);
};
return (true);
}
public static function collide(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number, _arg10:Number):Number{
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local11:Number = (_arg1 - _arg3);
var _local12:Number = (_arg2 - _arg4);
var _local13:Number = (_arg5 - _arg7);
var _local14:Number = (_arg6 - _arg8);
if (((_local11 * _local13) + (_local12 * _local14)) >= 0){
return (1);
};
var _local15:Number = (_arg9 + _arg10);
var _local16:Number = ((_local13 * _local13) + (_local14 * _local14));
var _local17:Number = (((_local13 * _local11) + (_local14 * _local12)) * 2);
var _local18:Number = (((_local11 * _local11) + (_local12 * _local12)) - (_local15 * _local15));
var _local19:Number = ((_local17 * _local17) - ((4 * _local16) * _local18));
if (_local19 >= 0){
_local20 = Math.sqrt(_local19);
_local21 = (_local16 * 2);
_local22 = ((-(_local17) - _local20) / _local21);
_local23 = ((-(_local17) + _local20) / _local21);
if (_local23 < _local22){
_local22 = _local23;
};
return (_local22);
};
return (1);
}
}
}//package src.math
Section 17
//BallExplosion (src.particle.BallExplosion)
package src.particle {
import src.*;
import src.level.*;
import src.entity.*;
import flash.geom.*;
public class BallExplosion extends Entity {
private var pathBall:Ball;
private var animSpeed:Number;
private var animStep:Number;
public function BallExplosion(_arg1:Ball){
this.pathBall = _arg1;
x = _arg1.x;
y = _arg1.y;
animStep = -1;
animSpeed = 1;
var _local2:int = GameArea.brightBallColors[_arg1.color];
var _local3:* = (((_local2 >> 16) & 0xFF) / 0xFF);
var _local4:* = (((_local2 >> 8) & 0xFF) / 0xFF);
var _local5:* = ((_local2 & 0xFF) / 0xFF);
var _local6:* = 1;
this.transform.colorTransform = new ColorTransform(_local3, _local4, _local5, _local6);
}
override public function tick(_arg1:int):Boolean{
animStep = (animStep + animSpeed);
var _local2:int = (int(animStep) + 1);
return ((_local2 < 15));
}
override public function render(_arg1:int, _arg2:Number):void{
var _local4:Number;
var _local5:Number;
x = pathBall.x;
y = pathBall.y;
var _local3:int = (int((animStep + (animSpeed * _arg2))) + 1);
rotation = ((animStep + (animSpeed * _arg2)) * 2);
if (_local3 > 13){
visible = false;
} else {
if (GameArea.FANCY_EFFECTS){
_local4 = ((animStep + (animSpeed * _arg2)) / 13);
_local5 = (1 - _local4);
scaleX = (1 + (1 - (_local5 * _local5)));
scaleY = (1 + ((1 - (_local5 * _local5)) * 0.3));
alpha = (1 - (_local4 * _local4));
rotation = pathBall.rotation;
};
if (_local3 < 1){
_local3 = 1;
};
gotoAndStop(_local3);
};
}
}
}//package src.particle
Section 18
//ExplosionParticle (src.particle.ExplosionParticle)
package src.particle {
import src.*;
import flash.display.*;
public class ExplosionParticle extends Entity {
private var animStep:Number;
private var yd:Number;
private var xd:Number;
private var yp:Number;
private var xp:Number;
private var animSpeed:Number;
public function ExplosionParticle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
animStep = -1;
animSpeed = (0.8 + (Math.random() * 0.4));
this.xp = _arg1;
this.yp = _arg2;
this.xd = _arg3;
this.yd = _arg4;
if (GameArea.FANCY_EFFECTS){
scaleX = (scaleY = (0.5 + Math.random()));
rotation = (Math.random() * 360);
_arg3 = (_arg3 + ((Math.random() * 16) - 8));
_arg4 = (_arg4 + ((Math.random() * 16) - 8));
};
scaleX = (scaleY = (scaleY * 1.5));
this.blendMode = BlendMode.ADD;
}
override public function render(_arg1:int, _arg2:Number):void{
x = (xp + (xd * _arg2));
y = (yp + (yd * _arg2));
var _local3:int = (int((animStep + (animSpeed * _arg2))) + 1);
if (_local3 > 17){
visible = false;
} else {
if (_local3 < 1){
_local3 = 1;
};
gotoAndStop(_local3);
};
}
override public function tick(_arg1:int):Boolean{
xd = (xd * 0.9);
yd = (yd * 0.9);
xp = (xp + xd);
yp = (yp + yd);
animStep = (animStep + animSpeed);
var _local2:int = (int(animStep) + 1);
return ((_local2 < 20));
}
}
}//package src.particle
Section 19
//SparkleParticle (src.particle.SparkleParticle)
package src.particle {
import src.*;
import flash.display.*;
import flash.geom.*;
public class SparkleParticle extends Entity {
private var animStep:Number;
private var yd:Number;
private var xd:Number;
private var yp:Number;
private var xp:Number;
public var animSpeed:Number;
public function SparkleParticle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:int){
animStep = -1;
animSpeed = 1;
this.xp = _arg1;
this.yp = _arg2;
this.xd = _arg3;
this.yd = _arg4;
var _local6:* = (((_arg5 >> 16) & 0xFF) / 0xFF);
var _local7:* = (((_arg5 >> 8) & 0xFF) / 0xFF);
var _local8:* = ((_arg5 & 0xFF) / 0xFF);
var _local9:* = 1;
this.transform.colorTransform = new ColorTransform(_local6, _local7, _local8, _local9);
this.blendMode = BlendMode.ADD;
}
override public function render(_arg1:int, _arg2:Number):void{
x = (xp + (xd * _arg2));
y = (yp + (yd * _arg2));
var _local3:int = (int((animStep + (animSpeed * _arg2))) + 1);
if (_local3 > 14){
visible = false;
} else {
if (_local3 < 1){
_local3 = 1;
};
gotoAndStop(_local3);
};
}
override public function tick(_arg1:int):Boolean{
if (GameArea.FANCY_EFFECTS){
xd = (xd * 0.9);
yd = (yd * 0.9);
xp = (xp + xd);
yp = (yp + yd);
} else {
xp = (xp + (xd * 0.5));
yp = (yp + (yd * 0.5));
};
animStep = (animStep + animSpeed);
var _local2:int = (int(animStep) + 1);
return ((_local2 < 16));
}
}
}//package src.particle
Section 20
//TextParticle (src.particle.TextParticle)
package src.particle {
import src.*;
import flash.text.*;
import flash.geom.*;
public class TextParticle extends Entity {
private var yStart:int;
private var xStart:int;
public var text:TextField;
private var animSpeed:Number;
private var life:Number;
private var animStep:Number;
private static var MARGIN = 24;
public function TextParticle(_arg1:String, _arg2:int, _arg3:int, _arg4:int){
var _local13:TextLineMetrics;
super();
animStep = 0;
animSpeed = 1;
life = 50;
this.text.autoSize = TextFieldAutoSize.CENTER;
this.text.text = _arg1;
var _local5:int = _arg1.split("\r").length;
var _local6:int;
var _local7:int;
var _local8:int;
while (_local8 < _local5) {
_local13 = this.text.getLineMetrics(_local8);
_local7 = (_local7 + _local13.height);
if (_local6 < _local13.width){
_local6 = _local13.width;
};
_local8++;
};
if (_arg3 < ((_local6 / 2) + MARGIN)){
_arg3 = ((_local6 / 2) + MARGIN);
};
if (_arg4 < ((_local7 / 2) + MARGIN)){
_arg4 = ((_local7 / 2) + MARGIN);
};
if (_arg3 > ((640 - (_local6 / 2)) - MARGIN)){
_arg3 = ((640 - (_local6 / 2)) - MARGIN);
};
if (_arg4 > ((480 - (_local7 / 2)) - MARGIN)){
_arg4 = ((480 - (_local7 / 2)) - MARGIN);
};
var _local9:* = (((_arg2 >> 16) & 0xFF) / 0xFF);
var _local10:* = (((_arg2 >> 8) & 0xFF) / 0xFF);
var _local11:* = ((_arg2 & 0xFF) / 0xFF);
var _local12:* = 1;
this.transform.colorTransform = new ColorTransform(_local9, _local10, _local11, _local12);
this.xStart = _arg3;
this.yStart = _arg4;
}
override public function tick(_arg1:int):Boolean{
animStep = (animStep + animSpeed);
return ((animStep < life));
}
override public function render(_arg1:int, _arg2:Number):void{
var _local3:* = ((animStep + (animSpeed * _arg2)) / life);
var _local4:* = (1 - ((1 - _local3) * (1 - _local3)));
var _local5:* = ((20 * _local3) * 2);
x = xStart;
y = (yStart - _local5);
}
}
}//package src.particle
Section 21
//Sounds (src.sound.Sounds)
package src.sound {
import flash.media.*;
public class Sounds {
public var sound:Sound;
public static var swapBalls:Sounds = new Sounds(new BallSwapSound());
;
public static var levelCleared:Sounds = new Sounds(new LevelClearedSound());
;
public static var button:Sounds = new Sounds(new ButtonClickSound());
;
public static var coinAppear:Sounds = new Sounds(new CoinAppearSound());
;
public static var rollingBalls:Sounds = new Sounds(new RollingBallSound());
;
public static var launchBall:Sounds = new Sounds(new BallLaunchSound());
;
public static var isSoundOn:Boolean = true;
public static var ballHit:Sounds = new Sounds(new BallHitSound());
;
public static var appear:Sounds = new Sounds(new AppearSound());
;
public static var gap:Sounds = new Sounds(new GapSound());
;
public static var chain:Sounds = new Sounds(new ChainSound());
;
public static var warning:Sounds = new Sounds(new WarningSound());
;
public static var slowdown:Sounds = new Sounds(new SlowdownSound());
;
public static var bomb:Sounds = new Sounds(new BombSound());
;
public static var endLevelPop:Sounds = new Sounds(new EndLevelPopSound());
;
public static var reverse:Sounds = new Sounds(new ReverseSound());
;
public static var ballsConnect:Sounds = new Sounds(new BallConnectSound());
;
public static var accuracy:Sounds = new Sounds(new AccuracySound());
;
public static var destroyBalls:Array = [new Sounds(new BallDestroySound1()), new Sounds(new BallDestroySound2()), new Sounds(new BallDestroySound3()), new Sounds(new BallDestroySound4()), new Sounds(new BallDestroySound5())];
public static var coinVanish:Sounds = new Sounds(new CoinVanishSound());
;
public static var chime:Sounds = new Sounds(new ChimeSound());
;
public static var coinGrab:Sounds = new Sounds(new CoinGrabSound());
;
public static var levelStart:Sounds = new Sounds(new LevelStartSound());
;
public function Sounds(_arg1:Sound){
this.sound = _arg1;
}
public function play(_arg1:Number=320, _arg2:Number=240, _arg3:Number=1){
if (Sounds.isSoundOn){
sound.play(0, 1, Sounds.getSoundTransform(_arg1, _arg3));
};
}
public static function soundOn(){
isSoundOn = true;
}
public static function getSoundTransform(_arg1:Number, _arg2:Number){
var _local3:Number = ((_arg1 - 320) / 640);
if (_arg2 > 1){
_arg2 = 1;
};
if (_arg2 < 0){
_arg2 = 0;
};
return (new SoundTransform(_arg2, _local3));
}
public static function soundOff(){
isSoundOn = false;
}
}
}//package src.sound
Section 22
//Ball0 (src.Ball0)
package src {
import flash.display.*;
public dynamic class Ball0 extends MovieClip {
}
}//package src
Section 23
//Ball1 (src.Ball1)
package src {
import flash.display.*;
public dynamic class Ball1 extends MovieClip {
}
}//package src
Section 24
//Ball2 (src.Ball2)
package src {
import flash.display.*;
public dynamic class Ball2 extends MovieClip {
}
}//package src
Section 25
//Ball3 (src.Ball3)
package src {
import flash.display.*;
public dynamic class Ball3 extends MovieClip {
}
}//package src
Section 26
//Ball4 (src.Ball4)
package src {
import flash.display.*;
public dynamic class Ball4 extends MovieClip {
}
}//package src
Section 27
//Ball5 (src.Ball5)
package src {
import flash.display.*;
public dynamic class Ball5 extends MovieClip {
}
}//package src
Section 28
//BitmapCache (src.BitmapCache)
package src {
import flash.display.*;
import flash.geom.*;
public class BitmapCache {
public static var bitmapCount:int = 0;
public static var color:int = 0;
public static var ballBitmaps:Array = new Array(6);
public static var dirs:int = 8;
public static var frame:int = 0;
public static var dir:int = 0;
private static var ballMc:MovieClip = null;
public static function init():Boolean{
var _local2:BitmapData;
var _local3:Matrix;
if (color == 6){
return (true);
};
if (ballMc == null){
switch (color){
case 0:
ballMc = new Ball0();
break;
case 1:
ballMc = new Ball1();
break;
case 2:
ballMc = new Ball2();
break;
case 3:
ballMc = new Ball3();
break;
case 4:
ballMc = new Ball4();
break;
case 5:
ballMc = new Ball5();
break;
};
ballBitmaps[color] = new Array(ballMc.totalFrames);
};
var _local1 = 10;
while ((((frame < ballMc.totalFrames)) && ((_local1 > 0)))) {
ballMc.gotoAndStop((frame + 1));
ballBitmaps[color][frame] = new Array(dirs);
while (dir < dirs) {
_local2 = new BitmapData(32, 32, true, 0);
_local3 = new Matrix();
_local3.translate(-16, -16);
_local3.rotate((((dir * Math.PI) * 2) / (dirs * 4)));
_local3.translate(16, 16);
_local2.draw(ballMc, _local3);
ballBitmaps[color][frame][dir] = _local2;
bitmapCount++;
dir++;
};
if (dir == dirs){
dir = 0;
_local1--;
frame++;
};
};
if (frame == ballMc.totalFrames){
ballMc = null;
frame = 0;
color++;
if (color == 6){
trace((((bitmapCount + " bitmaps, for ") + ((((bitmapCount * 32) * 32) * 4) / 0x0400)) + " kb"));
return (true);
};
};
return (false);
}
}
}//package src
Section 29
//DebugGameData (src.DebugGameData)
package src {
public class DebugGameData {
public static var gameData:XML = <gamedata randomseed="551643350" timelimit="300" relaxMode="true">
<image_server>http://www.king.com/beta/zuma/</image_server>
<gametype>normal</gametype>
<text id="combo">COMBO x[0]</text>
<text id="chain_bonus">CHAIN BONUS x[0]</text>
<text id="gap_bonus">GAP BONUS</text>
<text id="gap_bonus_2">DOUBLE BONUS</text>
<text id="gap_bonus_3">TRIPLE BONUS</text>
<text id="powerup_slowdown">SLOWDOWN Ball</text>
<text id="powerup_backwards">BACKWARDS Ball</text>
<text id="powerup_accuracy">ACCURACY Ball</text>
<text id="level_short">lvl [0]</text>
<text id="points">POINTS</text>
<text id="combos">COMBOS</text>
<text id="coins">COINS</text>
<text id="gaps">GAPS</text>
<text id="max_chain">MAX CHAIN</text>
<text id="max_combo">MAX COMBO</text>
<text id="ace_time">ACE TIME</text>
<text id="your_time">YOUR TIME</text>
<text id="time_bonus">TIME BONUS</text>
<text id="ok">OK</text>
<text id="instructions">INSTRUCTIONS</text>
<text id="instr_1">SHOOT BALLS BY CLICKING ON SCREEN WHERE YOU WANT THE BALL TO GO.</text>
<text id="instr_2">THE GEM IN THE BACK OF THE FROG SHOWS THE COLOR OF THE NEXT BALL.</text>
<text id="instr_3">CLEAR BALLS BY GETTING THREE OR MORE OF THE SAME COLOR IN A ROW.</text>
<text id="instr_4">LIKE COLORED BALLS ATTRACT AND CAN CREATE CHAIN REACTIONS!</text>
<text id="instr_5">DON'T LET THE BALLS REACH THE SKULL!</text>
<text id="instr_6">SHOOT COIN FOR EXTRA POINTS!</text>
<text id="instr_7">SPACE WILL SWAP THE BALLS.</text>
<text id="game_starts_in">GAME STARTS IN [0]</text>
<text id="game_ends_in">GAME ENDS IN [0]</text>
<text id="next_level_in">NEXT LEVEL IN [0]</text>
<text id="sound_on">SOUND ON</text>
<text id="sound_off">SOUND OFF</text>
<text id="quit_game">QUIT GAME</text>
<text id="level_completed">LEVEL COMPLETED</text>
<text id="game_won">GAME OVER</text>
<text id="game_lost">GAME OVER</text>
<text id="error">ERROR</text>
<text id="failed_to_download">FAILED TO DOWNLOAD LEVEL DATA</text>
<text id="teaser_title">GAME OVER</text>
<text id="teaser_text">SIGN UP TO PLAY THE FULL GAME</text>
<text id="total_score">TOTAL SCORE</text>
</gamedata>
;
}
}//package src
Section 30
//Entity (src.Entity)
package src {
import flash.display.*;
public class Entity extends MovieClip implements GameObject {
public var gameArea:GameArea;
public function removed():void{
parent.removeChild(this);
}
public function render(_arg1:int, _arg2:Number):void{
}
public function init(_arg1:GameArea):void{
this.gameArea = _arg1;
}
public function checkCollisions():Boolean{
return (true);
}
public function tick(_arg1:int):Boolean{
return (true);
}
}
}//package src
Section 31
//GameArea (src.GameArea)
package src {
import src.level.*;
import src.entity.*;
import src.math.*;
import flash.media.*;
import flash.events.*;
import src.sound.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import src.particle.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
import flash.external.*;
public class GameArea extends MovieClip {
public var curComboScore:int;// = 0
private var teaserTicks:int;// = -1
private var isTeaser:Boolean;// = false
private var statTimerText:String;
public var soundButton:SimpleButton;
public var soundLabel:TextField;
public var particleLayer2:MovieClip;
public var lost:Boolean;
private var hasSentLevelStart:Boolean;// = false
public var soundButton2:SimpleButton;
private var levelArtLoader:LevelArtLoader;
public var gui:Menu;
public var shadowLayer1:MovieClip;
public var shadowLayer2:MovieClip;
private var warnTick:int;// = 0
private var timer:Timer;
public var coinLayer:MovieClip;
private var oldFg:Loader;// = null
public var nextLevel:Level;
public var loaderScreen:MovieClip;
public var winScreen:MovieClip;
public var particleLayer:MovieClip;
public var instructionsScreen:Instructions;
public var tickCount:int;// = 0
private var topRandom:MtRandom;
public var levelStats:LevelStats;
public var updateColumn:int;// = 0
public var level:Level;
private var isPractice:Boolean;// = false
private var crashed:Boolean;// = false
public var numClearsInARow:int;// = 0
private var score:int;// = 0
public var won:Boolean;
private var currentLevel:int;// = 0
private var initialDelay:int;
public var frog:Frog;
public var levelTunnelLayer:MovieClip;
private var frames:int;// = 0
private var remainingSeconds:int;
private var particles:GameObjectList;
private var levelLoaded:Boolean;// = true
private var shouldQuit:Boolean;// = false
public var entities:GameObjectList;
private var showStatScreenIn:int;// = 0
private var isSoundOn:Boolean;// = true
private var hasSentQuit:Boolean;// = false
private var oldBg:Loader;// = null
public var ballLayer1:MovieClip;
public var statScreen:MovieClip;
public var curInARowBonus:int;// = 0
public var ballLayer2:MovieClip;
public var levelBgLayer:MovieClip;
private var fps:int;// = 0
private var lastSentScore:int;// = 0
public var versionLabel:TextField;
private static var PLAYDATA_CMD_DEBUG = 411;
public static var TICKS_PER_SECOND:Number = 30;
public static var SHOW_FPS:Boolean = DEBUG_MODE;
public static var textBallColors:Array = [0xFF0000, 2984959, 0xFF00, 0xFFFF00, 0xFF00FF, 0xFFFFFF];
public static var RENDER_SHADOWS:Boolean = false;
private static var PLAYDATA_CMD_GAME_LOST = 883;
public static var FANCY_EFFECTS:Boolean = false;
public static var ballColors:Array = [0xFF0000, 1671423, 0xFF00, 0xFFFF00, 0xFF00FF, 0xFFFFFF];
private static var PLAYDATA_CMD_LEVEL_COMPLETED = 564;
public static var DEBUG_EASY:Boolean = false;
public static var STAT_SCREEN_DURATION:int = (TICKS_PER_SECOND * 10);
private static var PLAYDATA_CMD_START_LEVEL = 384;
private static var PLAYDATA_CMD_TOGGLE_COLOR = 101;
public static var brightBallColors:Array = [16755370, 8454143, 8454016, 16777024, 16744703, 0xFFFFFF];
private static var PLAYDATA_CMD_QUIT_GAME = 993;
public static var darkBallColors:Array = [10489620, 2299513, 2114594, 6312202, 5641795, 3676962];
public static var EVEN_SCORES:Boolean = false;
public static var DEBUG_MODE:Boolean = false;
public static var DEBUG_REPLAY:Boolean = ((false) && (DEBUG_MODE));
private static var PLAYDATA_CMD_INFO = 993;
private static var VERSION_STRING:String = "Version 1.0.24";
private static var PLAYDATA_CMD_SHOOT = 402;
public function GameArea(){
if (!SHOW_FPS){
gui.fpsMeter.text = "";
};
versionLabel.text = VERSION_STRING;
tabEnabled = true;
enabled = true;
removeContextMenu();
addEventListener(Event.ENTER_FRAME, firstFrame);
addEventListener(MouseEvent.MOUSE_DOWN, mouseClicked);
addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
stage.quality = StageQuality.MEDIUM;
if (DEBUG_MODE){
stage.quality = StageQuality.HIGH;
};
soundButton2.visible = false;
timer = new Timer(TICKS_PER_SECOND);
if (((DEBUG_MODE) && (DEBUG_REPLAY))){
timer = new Timer((TICKS_PER_SECOND * 2));
};
entities = new GameObjectList();
particles = new GameObjectList();
statScreen.okButton.addEventListener(MouseEvent.CLICK, statOkClicked);
statScreen.visible = false;
winScreen.visible = false;
gui.quitButton.enabled = false;
gui.quitButton.alpha = 0.5;
focusRect = new Object();
initialDelay = (getTimer() + 1200);
gameStart();
}
public function hideInstructions():void{
removeChild(instructionsScreen);
instructionsScreen = null;
gui.quitButton.enabled = true;
gui.quitButton.alpha = 1;
fscommand("gameStart");
}
private function showError(_arg1:String, _arg2:String=null):void{
trace(((("Error: " + _arg1) + " / ") + _arg2));
if (_arg2 == null){
_arg2 = _arg1;
};
if (!DEBUG_MODE){
ExternalInterface.call("playData", (((("666," + tickCount) + " ") + _arg2) + "=0"));
};
showQuitDisplay(GameData.text("error"), _arg1);
}
public function getRandomShooterColor():int{
return (level.getRandomShooterColor());
}
public function lose():void{
sendPlayData(PLAYDATA_CMD_GAME_LOST);
lost = true;
frog.noAnim = true;
showStatScreen(0);
}
public function soundClicked(_arg1:MouseEvent):void{
if (isSoundOn){
Sounds.soundOff();
} else {
Sounds.soundOn();
};
isSoundOn = !(isSoundOn);
soundButton.visible = isSoundOn;
soundButton2.visible = !(isSoundOn);
soundLabel.text = (isSoundOn) ? GameData.text("sound_on") : GameData.text("sound_off");
}
public function isColorValid(_arg1:int):Boolean{
return (level.isColorValid(_arg1));
}
public function levelCompleted():void{
incScore(level.getParBonus());
won = (currentLevel == 4);
if (GameData.relaxMode){
won = false;
};
showStatScreen(level.getParBonus());
if (won){
winScreen.visible = true;
showStatScreenIn = (TICKS_PER_SECOND * 2);
statScreen.visible = false;
};
sendPlayData(PLAYDATA_CMD_LEVEL_COMPLETED);
}
private function showQuitDisplay(_arg1:String, _arg2:String):void{
statScreen.visible = true;
gui.quitButton.enabled = false;
gui.quitButton.alpha = 0.5;
statScreen.page1.visible = false;
statScreen.page2.visible = true;
statScreen.gotoAndStop(2);
statScreen.title.text = _arg1;
statScreen.page2.text.text = _arg2;
remainingSeconds = (GameArea.TICKS_PER_SECOND * 4);
var _local3:int = int(((remainingSeconds / GameArea.TICKS_PER_SECOND) + 0.99));
statTimerText = GameData.text("game_ends_in");
statScreen.gameStartsIn.text = statTimerText.split("[0]").join(_local3);
fscommand("gameEnd", ("" + score));
lost = true;
}
public function startLevel():void{
numClearsInARow = 0;
hasSentLevelStart = false;
warnTick = 0;
currentLevel++;
gui.levelMeter.text = GameData.text("level_short").split("[0]").join(currentLevel);
entities.clear();
particles.clear();
if (oldBg != null){
levelBgLayer.removeChild(oldBg);
};
if (oldFg != null){
levelTunnelLayer.removeChild(oldFg);
};
oldBg = (oldFg = null);
level = nextLevel;
levelStats = new LevelStats();
loaderScreen.visible = false;
oldBg = levelArtLoader.bgImage.loader;
levelBgLayer.addChild(levelArtLoader.bgImage.loader);
if (levelArtLoader.tunnelImage != null){
oldFg = levelArtLoader.tunnelImage.loader;
levelTunnelLayer.addChild(levelArtLoader.tunnelImage.loader);
};
frog = new Frog(level.xShooter, level.yShooter);
ballLayer2.addChild(frog);
addEntity(frog);
level.start();
if ((((currentLevel < 4)) || (GameData.relaxMode))){
loadLevel((currentLevel + 1));
};
setProgress(0);
}
public function loadLevel(_arg1:int):void{
var _local2:MtRandom = new MtRandom(topRandom.nextInt(268435456));
nextLevel = new Level(_arg1, isPractice, _local2, this);
levelArtLoader = new LevelArtLoader();
levelArtLoader.load(nextLevel);
}
public function setBallLayer(_arg1:PathBall, _arg2:Boolean):void{
if (!_arg2){
if (_arg1.shadow != null){
shadowLayer1.removeChild(_arg1.shadow);
shadowLayer2.addChild(_arg1.shadow);
};
ballLayer1.removeChild(_arg1);
ballLayer2.addChild(_arg1);
} else {
if (_arg1.shadow != null){
shadowLayer2.removeChild(_arg1.shadow);
shadowLayer1.addChild(_arg1.shadow);
};
ballLayer2.removeChild(_arg1);
ballLayer1.addChild(_arg1);
};
}
public function incScore(_arg1:int):void{
score = (score + _arg1);
gui.score.text = ("" + score);
}
public function addParticle(_arg1:Entity, _arg2:int=0){
particles.add(_arg1);
if (_arg2 == 0){
particleLayer.addChild(_arg1);
} else {
particleLayer2.addChild(_arg1);
};
_arg1.init(this);
_arg1.render(0, 0);
}
public function levelStarted():void{
if ((((currentLevel == 2)) && (isTeaser))){
teaserTicks = (GameArea.TICKS_PER_SECOND * 3);
};
}
public function addBall(_arg1:Path, _arg2:Number, _arg3:int):PathBall{
var _local5:BallShadow;
var _local4:PathBall = new PathBall(_arg1, _arg3, _arg2);
ballLayer2.addChild(_local4);
if (RENDER_SHADOWS){
_local5 = new BallShadow();
_local4.shadow = _local5;
shadowLayer2.addChild(_local5);
};
addEntity(_local4);
return (_local4);
}
public function advanceTime(_arg1:Event):void{
var ticks:*;
var beforeTick:Number;
var i:*;
var afterTick:Number;
var beforeRender:Number;
var afterRender:Number;
var tickTime:Number;
var renderTime:Number;
var e = _arg1;
try {
stage.focus = this;
ticks = timer.advanceTime();
if (crashed){
levelLoaded = true;
};
if (!levelLoaded){
updateLevelLoad();
};
if (levelLoaded){
beforeTick = getTimer();
i = 0;
while (i < ticks) {
tickCount++;
if ((tickCount % TICKS_PER_SECOND) == 0){
fps = frames;
if (SHOW_FPS){
gui.fpsMeter.text = ("" + fps);
};
frames = 0;
};
tick(tickCount);
i = (i + 1);
};
afterTick = getTimer();
frames++;
beforeRender = getTimer();
render(tickCount, timer.alpha);
afterRender = getTimer();
tickTime = (afterTick - beforeTick);
renderTime = (afterRender - beforeRender);
};
} catch(e) {
showError("Internal error", ("Internal error in advanceTime: " + e));
trace(e.getStackTrace());
trace(e);
};
}
public function hideStats():void{
if (((!(won)) && (!(lost)))){
levelLoaded = false;
statScreen.visible = false;
gui.quitButton.enabled = true;
gui.quitButton.alpha = 1;
} else {
if (!hasSentQuit){
fscommand("gameQuit");
hasSentQuit = true;
};
};
}
public function gameStart(){
var _local1:Object;
var _local2:String;
if (DEBUG_MODE){
GameData.parse(DebugGameData.gameData);
topRandom = new MtRandom();
versionLabel.text = VERSION_STRING;
if (DEBUG_REPLAY){
};
} else {
versionLabel.text = "";
_local1 = ExternalInterface.call("getGameData");
if ((((_local1 == null)) || (!(_local1.success)))){
crashed = true;
fscommand("gameStart");
GameData.setText("error", "ERROR");
GameData.setText("game_ends_in", "GAME ENDS IN [0]");
showError("Failed to read game data");
return;
};
_local2 = _local1.message;
GameData.parse(new XML(_local2));
topRandom = new MtRandom(GameData.randomSeed);
};
gui.quitLabel.text = GameData.text("quit_game");
soundLabel.text = GameData.text("sound_on");
soundLabel.mouseEnabled = false;
gui.quitButton.addEventListener(MouseEvent.CLICK, quitClicked);
soundButton.addEventListener(MouseEvent.CLICK, soundClicked);
soundButton2.addEventListener(MouseEvent.CLICK, soundClicked);
instructionsScreen.init(this);
isPractice = !((GameData.gameType == GameData.GAMETYPE_NORMAL));
isTeaser = (GameData.gameType == GameData.GAMETYPE_TEASER);
loadLevel((currentLevel + 1));
levelLoaded = false;
currentLevel = 0;
}
private function removeContextMenu():void{
contextMenu = new ContextMenu();
contextMenu.hideBuiltInItems();
}
public function firstFrame(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, firstFrame);
addEventListener(Event.ENTER_FRAME, advanceTime);
}
public function sendDebug(_arg1:String=""){
var _local2:String = ((PLAYDATA_CMD_DEBUG + ",") + tickCount);
if (_arg1 != null){
_local2 = (_local2 + (" " + _arg1));
};
var _local3:int = (score - lastSentScore);
lastSentScore = score;
_local2 = (_local2 + ("=" + _local3));
if (!DEBUG_MODE){
ExternalInterface.call("playData", _local2);
};
}
private function tick(_arg1:int):void{
var _local2:int;
var _local3:*;
if (showStatScreenIn > 0){
showStatScreenIn--;
if (showStatScreenIn == 0){
statScreen.visible = true;
};
};
if (teaserTicks >= 0){
teaserTicks--;
if (teaserTicks == 0){
showTeaser();
};
};
if (statScreen.visible){
remainingSeconds--;
if (remainingSeconds == 0){
hideStats();
};
if (remainingSeconds < 0){
remainingSeconds = 0;
};
_local2 = int(((remainingSeconds / GameArea.TICKS_PER_SECOND) + 0.99));
statScreen.gameStartsIn.text = statTimerText.split("[0]").join(_local2);
};
if (crashed){
return;
};
if (instructionsScreen != null){
instructionsScreen.tick(_arg1);
return;
};
if (((!(won)) && (!(lost)))){
if (!hasSentLevelStart){
sendPlayData(PLAYDATA_CMD_START_LEVEL);
hasSentLevelStart = true;
};
if (((((level.shouldWarn) && (!(level.lost)))) && (!(level.won)))){
if (warnTick == 0){
level.warn();
Sounds.warning.play();
};
warnTick++;
_local3 = int(((level.warnUrgency * 50) + 20));
if (warnTick >= _local3){
warnTick = 0;
};
};
level.checkPowerups();
if (shouldQuit){
sendPlayData(PLAYDATA_CMD_QUIT_GAME);
lose();
};
level.tick();
};
if (((((!(won)) && (!(lost)))) && (!(level.lost)))){
entities.checkCollisions();
};
entities.tick(_arg1);
particles.tick(_arg1);
}
private function render(_arg1:int, _arg2:Number):void{
if (crashed){
return;
};
if (instructionsScreen != null){
instructionsScreen.render(_arg1, _arg2);
return;
};
updateColumn = (updateColumn + 2);
if (updateColumn == 4){
updateColumn = 1;
};
if (updateColumn == 5){
updateColumn = 0;
};
entities.render(_arg1, _arg2);
particles.render(_arg1, _arg2);
}
private function showTeaser():void{
showQuitDisplay(GameData.text("teaser_title"), GameData.text("teaser_text"));
}
public function sendPlayData(_arg1:int, _arg2:String=""){
var _local3:String = ((_arg1 + ",") + tickCount);
if (_arg2 != null){
_local3 = (_local3 + (" " + _arg2));
};
var _local4:int = (score - lastSentScore);
lastSentScore = score;
_local3 = (_local3 + ("=" + _local4));
trace(_local3);
if (!DEBUG_MODE){
ExternalInterface.call("playData", _local3);
};
}
public function setProgress(_arg1:Number):void{
if (_arg1 < 0){
_arg1 = 0;
};
if (_arg1 > 1){
_arg1 = 1;
};
gui.progressGauge.gotoAndStop(((_arg1 < 1)) ? 1 : 2);
gui.progressGauge.progressMask.scaleX = _arg1;
}
public function statOkClicked(_arg1:MouseEvent):void{
if (((DEBUG_MODE) && (DEBUG_REPLAY))){
return;
};
Sounds.button.play();
remainingSeconds = 0;
hideStats();
}
private function showStatScreen(_arg1:int){
statScreen.visible = true;
gui.quitButton.enabled = false;
gui.quitButton.alpha = 0.5;
statScreen.page1.visible = true;
statScreen.page2.visible = false;
statScreen.page1.totalScoreLabel.text = GameData.text("total_score");
statScreen.page1.totalScoreValue.text = ("" + score);
statScreen.page1.scoreLabels.text = ((((((((((GameData.text("points") + "\r") + GameData.text("combos")) + "\r") + GameData.text("coins")) + "\r") + GameData.text("gaps")) + "\r") + GameData.text("max_chain")) + "\r") + GameData.text("max_combo"));
statScreen.page1.scoreValues.text = ((((((((((("" + levelStats.score) + "\r") + levelStats.numCombos) + "\r") + levelStats.coins) + "\r") + levelStats.numGaps) + "\r") + levelStats.maxChain) + "\r") + (levelStats.maxCombo + 1));
statScreen.page1.timeLabels.text = ((GameData.text("your_time") + "\r") + GameData.text("ace_time"));
statScreen.page1.timeValues.text = ((("" + level.formatTime(level.passedTime)) + "\r") + level.formatTime(level.timeLimit));
statScreen.page1.timeBonusText.text = GameData.text("time_bonus");
statScreen.page1.timeBonusValue.text = _arg1;
if (GameData.relaxMode){
statScreen.page1.dividerLine.visible = false;
statScreen.page1.timeLabels.visible = false;
statScreen.page1.timeValues.visible = false;
statScreen.page1.timeBonusText.visible = false;
statScreen.page1.timeBonusValue.visible = false;
};
remainingSeconds = STAT_SCREEN_DURATION;
var _local2:int = int(((remainingSeconds / GameArea.TICKS_PER_SECOND) + 0.99));
if (lost){
statScreen.title.text = GameData.text("game_lost");
} else {
if (won){
statScreen.title.text = GameData.text("game_won");
} else {
statScreen.title.text = GameData.text("level_completed");
};
};
if (((lost) || (won))){
statTimerText = GameData.text("game_ends_in");
fscommand("gameEnd", ("" + score));
trace("GAME END!");
} else {
statTimerText = GameData.text("next_level_in");
};
statScreen.gameStartsIn.text = statTimerText.split("[0]").join(_local2);
}
public function keyPressed(_arg1:KeyboardEvent){
var e = _arg1;
if (((DEBUG_MODE) && (DEBUG_REPLAY))){
return;
};
try {
if ((((((((level == null)) || (level.lost))) || (statScreen.visible))) || (!((instructionsScreen == null))))){
return;
};
sendPlayData(PLAYDATA_CMD_TOGGLE_COLOR);
frog.toggleColor();
} catch(e) {
showError("Internal error", ("Internal error in keyPressed: " + e));
trace(e.getStackTrace());
trace(e);
};
}
public function mouseClicked(_arg1:MouseEvent){
var x:int;
var y:int;
var e = _arg1;
if (((DEBUG_MODE) && (DEBUG_REPLAY))){
return;
};
try {
if ((((((((level == null)) || (level.lost))) || (statScreen.visible))) || (!((instructionsScreen == null))))){
return;
};
if ((((((((mouseX < 0)) || ((mouseY < 0)))) || ((mouseX >= 640)))) || ((mouseY >= 480)))){
return;
};
x = int(mouseX);
y = int(mouseY);
sendPlayData(PLAYDATA_CMD_SHOOT, ((("" + x) + " ") + y));
frog.shootAt(x, y);
} catch(e) {
showError("Internal error", ("Internal error in mouseClicked: " + e));
trace(e.getStackTrace());
trace(e);
};
}
public function quitClicked(_arg1:MouseEvent):void{
if (!gui.quitButton.enabled){
return;
};
if (level == null){
return;
};
if (level.won){
return;
};
if (level.lost){
return;
};
if (level.losing){
return;
};
shouldQuit = true;
}
public function updateLevelLoad(){
var msg:String;
var toReport:String;
if (PathBall.USE_BITMAPS){
try {
if (!BitmapCache.init()){
return;
};
} catch(e) {
trace(e.getStackTrace());
PathBall.USE_BITMAPS = false;
};
};
loaderScreen.visible = true;
loaderScreen.progressMask.scaleX = (levelArtLoader.getProgress() / 100);
if (levelArtLoader.isFailed()){
levelLoaded = true;
msg = GameData.text("failed_to_download");
toReport = (((GameData.text("failed_to_download") + "\r(") + levelArtLoader.getErrorMessage()) + ")");
showError(msg, toReport);
} else {
if ((((levelArtLoader.getProgress() == 100)) && ((getTimer() > initialDelay)))){
levelLoaded = true;
startLevel();
};
};
}
public function addEntity(_arg1:Entity){
entities.add(_arg1);
_arg1.init(this);
_arg1.render(0, 0);
}
}
}//package src
Section 32
//GameData (src.GameData)
package src {
public class GameData {
public static var GAMETYPE_TEASER = 2;
public static var GAMETYPE_LIMITED = 1;
public static var relaxMode:Boolean;
public static var gameType:int = GAMETYPE_NORMAL;
private static var textArray:Array = new Array();
public static var GAMETYPE_NORMAL = 0;
public static var randomSeed:int;
public static var imageServer:String;
public static function text(_arg1:String):String{
if (textArray[_arg1] == null){
return ((("[" + _arg1) + "]"));
};
return (textArray[_arg1]);
}
public static function setText(_arg1:String, _arg2:String):void{
textArray[_arg1] = _arg2;
}
public static function parse(_arg1:XML){
var _local5:String;
GameData.randomSeed = parseInt(_arg1.attribute("randomseed").toString());
GameData.relaxMode = (_arg1.attribute("relaxMode").toString() == "true");
var _local2:XMLList = _arg1.child("text");
var _local3:String = _arg1.child("gametype").text().toString();
GameData.imageServer = _arg1.child("image_server").text().toString();
if (_local3 == "normal"){
GameData.gameType = GAMETYPE_NORMAL;
};
if (_local3 == "limited"){
GameData.gameType = GAMETYPE_LIMITED;
};
if (_local3 == "teaser"){
GameData.gameType = GAMETYPE_TEASER;
};
var _local4:int;
while (_local4 < _local2.length()) {
_local5 = _local2[_local4].attribute("id").toString();
GameData.textArray[_local5] = _local2[_local4].text().toString();
_local4++;
};
}
}
}//package src
Section 33
//GameObject (src.GameObject)
package src {
public interface GameObject {
function removed():void;
function checkCollisions():Boolean;
function tick(_arg1:int):Boolean;
function render(_arg1:int, _arg2:Number):void;
}
}//package src
Section 34
//GameObjectList (src.GameObjectList)
package src {
public class GameObjectList implements GameObject {
public var objects:Array;
public function GameObjectList(){
objects = new Array();
}
public function removed():void{
}
public function add(_arg1:GameObject){
objects.push(_arg1);
}
public function remove(_arg1:GameObject){
objects.splice(objects.indexOf(_arg1), 1);
}
public function checkCollisions():Boolean{
var _local2:Boolean;
var _local3:*;
var _local1:int;
while (_local1 < objects.length) {
_local2 = objects[_local1].checkCollisions();
if (!_local2){
_local3 = objects[_local1];
objects.splice(_local1, 1);
_local1--;
_local3.removed();
};
_local1++;
};
return (true);
}
public function tick(_arg1:int):Boolean{
var _local3:Boolean;
var _local4:*;
var _local2:int;
while (_local2 < objects.length) {
_local3 = objects[_local2].tick(_arg1);
if (!_local3){
_local4 = objects[_local2];
objects.splice(_local2, 1);
_local2--;
_local4.removed();
};
_local2++;
};
return (true);
}
public function clear(){
var _local1:Array = objects;
objects = new Array();
var _local2:int;
while (_local2 < _local1.length) {
_local1[_local2].removed();
_local2++;
};
}
public function render(_arg1:int, _arg2:Number):void{
var _local3:int;
while (_local3 < objects.length) {
objects[_local3].render(_arg1, _arg2);
_local3++;
};
}
}
}//package src
Section 35
//Instructions (src.Instructions)
package src {
import src.entity.*;
import flash.events.*;
import src.sound.*;
import flash.display.*;
import flash.text.*;
import src.particle.*;
public class Instructions extends Entity {
private var aimerPaused:Boolean;// = false
public var frog1:Frog;
public var frog2:Frog;
public var coin:Coin;
public var ballLayer:MovieClip;
private var aimerTime:int;// = 0
public var text1:TextField;
public var text2:TextField;
public var text3:TextField;
public var text4:TextField;
public var text5:TextField;
public var text6:TextField;
public var text7:TextField;
public var okButton:SimpleButton;
private var pathTrainBalls:Array;
private var renderAnimTime:int;// = 0
private var remainingSeconds:int;
public var pointer:MovieClip;
private var entities:Array;
public var title:TextField;
public var skull:PitCover;
private var pathShotBall:Ball;
public var ballLayer2:MovieClip;
public var gameStartsIn:TextField;
private var pathCount:int;// = 0
public function Instructions(){
entities = new Array();
remainingSeconds = (GameArea.TICKS_PER_SECOND * 20);
super();
}
override public function init(_arg1:GameArea):void{
this.gameArea = _arg1;
skull.gotoAndStop(1);
entities.push(coin);
entities.push(frog1);
entities.push(frog2);
var _local2:int;
while (_local2 < entities.length) {
entities[_local2].render(0, 0);
_local2++;
};
okButton.addEventListener(MouseEvent.CLICK, exitScreen);
var _local3:int = int(((remainingSeconds / GameArea.TICKS_PER_SECOND) + 0.99));
gameStartsIn.text = GameData.text("game_starts_in").split("[0]").join(_local3);
title.text = GameData.text("instructions");
text1.text = GameData.text("instr_1");
text2.text = GameData.text("instr_2");
text3.text = GameData.text("instr_3");
text4.text = GameData.text("instr_4");
text5.text = GameData.text("instr_5");
text6.text = GameData.text("instr_6");
text7.text = GameData.text("instr_7");
setupPath();
}
override public function render(_arg1:int, _arg2:Number):void{
renderPath(_arg2);
var _local3:Number = (aimerTime + (aimerPaused) ? 0 : _arg2);
pointer.x = (frog1.xFakeAim = 240);
pointer.y = (frog1.yFakeAim = ((102 + 50) + (Math.sin((_local3 * 0.1)) * 50)));
var _local4:int;
while (_local4 < entities.length) {
entities[_local4].render(_arg1, _arg2);
_local4++;
};
}
override public function tick(_arg1:int):Boolean{
var _local4:Number;
var _local5:int;
var _local6:int;
var _local7:Boolean;
var _local8:Entity;
remainingSeconds--;
if (remainingSeconds == 0){
gameArea.hideInstructions();
};
var _local2:int = int(((remainingSeconds / GameArea.TICKS_PER_SECOND) + 0.99));
gameStartsIn.text = GameData.text("game_starts_in").split("[0]").join(_local2);
if ((_arg1 % 60) == 0){
frog2.toggleColor();
};
tickPath();
if (!aimerPaused){
aimerTime++;
};
if ((_arg1 % 50) == 40){
_local4 = aimerTime;
_local5 = 240;
_local6 = int(((102 + 50) + (Math.sin((_local4 * 0.1)) * 50)));
frog1.shootAt(_local5, _local6);
};
aimerPaused = ((_arg1 % 50) >= 40);
var _local3:int;
while (_local3 < entities.length) {
_local7 = entities[_local3].tick(_arg1);
if (!_local7){
_local8 = entities[_local3];
entities.splice(_local3, 1);
_local3--;
_local8.removed();
};
_local3++;
};
return (true);
}
private function exitScreen(_arg1:MouseEvent):void{
Sounds.button.play();
gameArea.hideInstructions();
}
private function setupPath(){
var _local4:*;
var _local5:int;
var _local6:Ball;
if (pathShotBall != null){
ballLayer2.removeChild(pathShotBall);
_local4 = 0;
while (_local4 < pathTrainBalls.length) {
ballLayer2.removeChild(pathTrainBalls[_local4]);
_local4++;
};
};
var _local1:int = int((Math.random() * 6));
var _local2:int = int((Math.random() * 6));
var _local3:int = int((Math.random() * 6));
while (_local2 == _local1) {
_local2 = int((Math.random() * 6));
};
while ((((_local3 == _local1)) || ((_local3 == _local2)))) {
_local3 = int((Math.random() * 6));
};
pathCount++;
if ((pathCount % 2) == 0){
_local3 = _local1;
};
pathShotBall = new Ball(_local2);
pathShotBall.x = (480 - 150);
pathShotBall.y = (170 - 150);
pathShotBall.rotation = (-90 + 45);
ballLayer2.addChild(pathShotBall);
pathTrainBalls = new Array();
_local4 = 0;
while (_local4 < 6) {
_local5 = 0;
if (_local4 < 2){
_local5 = _local1;
} else {
if (_local4 < 5){
_local5 = _local2;
} else {
_local5 = _local3;
};
};
_local6 = new Ball(_local5);
_local6.x = (394 + (_local4 * 32));
_local6.y = 170;
_local6.rotation = -90;
ballLayer2.addChild(_local6);
pathTrainBalls.push(_local6);
_local4++;
};
renderAnimTime = 0;
}
public function addEntity(_arg1:Entity){
entities.push(_arg1);
}
private function tickPath(){
var _local1:int;
var _local2:Ball;
renderAnimTime++;
if (renderAnimTime == (32 + 4)){
pathShotBall.x = ((394 + (2 * 32)) + 16);
pathShotBall.y = 170;
popBall(pathShotBall);
_local1 = 2;
while (_local1 < 5) {
_local2 = pathTrainBalls[_local1];
if (_local1 < 3){
_local2.x = ((394 + (_local1 * 32)) - 16);
} else {
_local2.x = ((394 + (_local1 * 32)) + 16);
};
popBall(_local2);
_local1++;
};
};
if ((((renderAnimTime == (((32 + 4) + 15) + 20))) && (((pathCount % 2) == 0)))){
_local1 = 0;
while (_local1 < 6) {
_local2 = pathTrainBalls[_local1];
if ((((_local1 >= 2)) && ((_local1 < 5)))){
} else {
if (_local1 < 3){
_local2.x = ((394 + (_local1 * 32)) - 16);
} else {
_local2.x = ((394 + ((_local1 - 3) * 32)) - 16);
};
popBall(_local2);
};
_local1++;
};
};
if (renderAnimTime == 100){
setupPath();
};
}
private function popBall(_arg1:Ball):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:SparkleParticle;
_arg1.visible = false;
var _local2:BallExplosion = new BallExplosion(_arg1);
ballLayer2.addChild(_local2);
entities.push(_local2);
var _local3 = 10;
if (GameArea.FANCY_EFFECTS){
_local3 = 20;
};
var _local4:int;
while (_local4 < _local3) {
_local5 = (((Math.random() * Math.random()) * 5) + 4);
if (GameArea.FANCY_EFFECTS){
_local5 = (((Math.random() * Math.random()) * 8) + 1);
};
_local6 = (Math.sin((((_local4 / _local3) * Math.PI) * 2)) * _local5);
_local7 = (Math.cos((((_local4 / _local3) * Math.PI) * 2)) * _local5);
_local8 = new SparkleParticle(_arg1.x, _arg1.y, _local6, _local7, GameArea.textBallColors[_arg1.color]);
if (GameArea.FANCY_EFFECTS){
_local8.scaleX = (_local8.scaleY = ((Math.random() * 0.5) + 0.3));
_local8.alpha = ((Math.random() * 0.7) + 0.3);
} else {
_local8.scaleX = (_local8.scaleY = 0.3);
};
ballLayer2.addChild(_local8);
entities.push(_local8);
_local4++;
};
}
private function renderPath(_arg1:Number){
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:*;
var _local11:Ball;
var _local2:Number = (renderAnimTime + _arg1);
var _local3:Number = 0;
var _local4:Number = 0;
if (_local2 < 32){
pathShotBall.x = ((480 - 150) + (_local2 * 4));
pathShotBall.y = ((170 - 150) + (_local2 * 4));
} else {
if (_local2 < (32 + 4)){
_local6 = ((480 - 150) + (32 * 4));
_local7 = ((170 - 150) + (32 * 4));
_local8 = ((394 + (2 * 32)) + 16);
_local9 = 170;
_local10 = ((_local2 - 32) / 4);
pathShotBall.x = (_local6 + ((_local8 - _local6) * _local10));
pathShotBall.y = (_local7 + ((_local9 - _local7) * _local10));
pathShotBall.rotation = (-90 + (45 * (1 - _local10)));
_local3 = (_local10 * 16);
} else {
_local3 = 16;
};
};
if ((((_local2 > ((32 + 4) + 15))) && (((pathCount % 2) == 0)))){
_local4 = (_local2 - ((32 + 4) + 15));
_local4 = (((((_local2 - ((32 + 4) + 15)) * _local4) * 0.3) + _local4) * 1);
if (_local4 > (4 * 32)){
_local4 = (4 * 32);
};
};
var _local5:int;
while (_local5 < 6) {
_local11 = pathTrainBalls[_local5];
if (_local5 < 3){
_local11.x = ((394 + (_local5 * 32)) - _local3);
} else {
_local11.x = (((394 + (_local5 * 32)) + _local3) - _local4);
};
_local11.setRollFrame(_local11.x);
_local5++;
};
}
}
}//package src
Section 36
//TimeMeter (src.TimeMeter)
package src {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
public class TimeMeter extends MovieClip {
private var warnTime:int;// = 0
public var text:TextField;
public static var WARN_DURATION:int = 300;
public function warn(){
warnTime = getTimer();
addEventListener(Event.ENTER_FRAME, enterFrame);
}
public function enterFrame(_arg1:Event):void{
var _local2:Number = (1 - ((getTimer() - warnTime) / WARN_DURATION));
if (_local2 < 0){
_local2 = 0;
};
scaleX = (scaleY = (1 + (Math.sin((_local2 * 3.1415)) * 0.5)));
if (_local2 == 0){
removeEventListener(Event.ENTER_FRAME, enterFrame);
};
}
}
}//package src
Section 37
//Timer (src.Timer)
package src {
import flash.utils.*;
public class Timer {
private var unprocessedTime:Number;// = 0
private var lastTime:Number;// = -1
public var passedTime:Number;// = 0
private var msPerTick:Number;
private var ticksPerSecond:Number;
public var timeScale:Number;// = 1
public var alpha:Number;// = 0
public static var currentTime:Number = 0;
public function Timer(_arg1:Number){
this.ticksPerSecond = _arg1;
msPerTick = (1000 / _arg1);
}
public function advanceTime(){
if (lastTime == -1){
lastTime = getTimer();
};
var _local1:* = getTimer();
passedTime = (_local1 - lastTime);
passedTime = (passedTime * timeScale);
currentTime = (currentTime + passedTime);
lastTime = _local1;
unprocessedTime = (unprocessedTime + passedTime);
var _local2:int = int((unprocessedTime / msPerTick));
unprocessedTime = (unprocessedTime - (_local2 * msPerTick));
alpha = (unprocessedTime / msPerTick);
return (_local2);
}
}
}//package src
Section 38
//AccuracySound (AccuracySound)
package {
import flash.media.*;
public dynamic class AccuracySound extends Sound {
}
}//package
Section 39
//AppearSound (AppearSound)
package {
import flash.media.*;
public dynamic class AppearSound extends Sound {
}
}//package
Section 40
//BallConnectSound (BallConnectSound)
package {
import flash.media.*;
public dynamic class BallConnectSound extends Sound {
}
}//package
Section 41
//BallDestroySound1 (BallDestroySound1)
package {
import flash.media.*;
public dynamic class BallDestroySound1 extends Sound {
}
}//package
Section 42
//BallDestroySound2 (BallDestroySound2)
package {
import flash.media.*;
public dynamic class BallDestroySound2 extends Sound {
}
}//package
Section 43
//BallDestroySound3 (BallDestroySound3)
package {
import flash.media.*;
public dynamic class BallDestroySound3 extends Sound {
}
}//package
Section 44
//BallDestroySound4 (BallDestroySound4)
package {
import flash.media.*;
public dynamic class BallDestroySound4 extends Sound {
}
}//package
Section 45
//BallDestroySound5 (BallDestroySound5)
package {
import flash.media.*;
public dynamic class BallDestroySound5 extends Sound {
}
}//package
Section 46
//BallHitSound (BallHitSound)
package {
import flash.media.*;
public dynamic class BallHitSound extends Sound {
}
}//package
Section 47
//BallLaunchSound (BallLaunchSound)
package {
import flash.media.*;
public dynamic class BallLaunchSound extends Sound {
}
}//package
Section 48
//BallShadow (BallShadow)
package {
import flash.display.*;
public dynamic class BallShadow extends MovieClip {
}
}//package
Section 49
//BallSwapSound (BallSwapSound)
package {
import flash.media.*;
public dynamic class BallSwapSound extends Sound {
}
}//package
Section 50
//BombSound (BombSound)
package {
import flash.media.*;
public dynamic class BombSound extends Sound {
}
}//package
Section 51
//BonusLight (BonusLight)
package {
import flash.display.*;
public dynamic class BonusLight extends MovieClip {
}
}//package
Section 52
//ButtonClickSound (ButtonClickSound)
package {
import flash.media.*;
public dynamic class ButtonClickSound extends Sound {
}
}//package
Section 53
//ChainSound (ChainSound)
package {
import flash.media.*;
public dynamic class ChainSound extends Sound {
}
}//package
Section 54
//ChimeSound (ChimeSound)
package {
import flash.media.*;
public dynamic class ChimeSound extends Sound {
}
}//package
Section 55
//CoinAppearSound (CoinAppearSound)
package {
import flash.media.*;
public dynamic class CoinAppearSound extends Sound {
}
}//package
Section 56
//CoinGrabSound (CoinGrabSound)
package {
import flash.media.*;
public dynamic class CoinGrabSound extends Sound {
}
}//package
Section 57
//CoinVanishSound (CoinVanishSound)
package {
import flash.media.*;
public dynamic class CoinVanishSound extends Sound {
}
}//package
Section 58
//EndLevelPopSound (EndLevelPopSound)
package {
import flash.media.*;
public dynamic class EndLevelPopSound extends Sound {
}
}//package
Section 59
//GapSound (GapSound)
package {
import flash.media.*;
public dynamic class GapSound extends Sound {
}
}//package
Section 60
//LevelClearedSound (LevelClearedSound)
package {
import flash.media.*;
public dynamic class LevelClearedSound extends Sound {
}
}//package
Section 61
//LevelStartSound (LevelStartSound)
package {
import flash.media.*;
public dynamic class LevelStartSound extends Sound {
}
}//package
Section 62
//Menu (Menu)
package {
import src.*;
import flash.display.*;
import flash.text.*;
public dynamic class Menu extends MovieClip {
public var fpsMeter:TextField;
public var quitButton:SimpleButton;
public var quitLabel:TextField;
public var progressGauge:MovieClip;
public var score:TextField;
public var levelMeter:TextField;
public var timeMeter:TimeMeter;
}
}//package
Section 63
//ReverseSound (ReverseSound)
package {
import flash.media.*;
public dynamic class ReverseSound extends Sound {
}
}//package
Section 64
//RollingBallSound (RollingBallSound)
package {
import flash.media.*;
public dynamic class RollingBallSound extends Sound {
}
}//package
Section 65
//SlowdownSound (SlowdownSound)
package {
import flash.media.*;
public dynamic class SlowdownSound extends Sound {
}
}//package
Section 66
//WarningSound (WarningSound)
package {
import flash.media.*;
public dynamic class WarningSound extends Sound {
}
}//package