Section 1
//BackGround_1 (amazon_survival_fla.BackGround_1)
package amazon_survival_fla {
import flash.display.*;
public dynamic class BackGround_1 extends MovieClip {
public function BackGround_1(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 2
//BetweenRounds_41 (amazon_survival_fla.BetweenRounds_41)
package amazon_survival_fla {
import flash.display.*;
public dynamic class BetweenRounds_41 extends MovieClip {
public var mcInfoText:MovieClip;
public function BetweenRounds_41(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 3
//Bomb_51 (amazon_survival_fla.Bomb_51)
package amazon_survival_fla {
import flash.display.*;
public dynamic class Bomb_51 extends MovieClip {
public function Bomb_51(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 4
//ButtonMusic_38 (amazon_survival_fla.ButtonMusic_38)
package amazon_survival_fla {
import flash.display.*;
public dynamic class ButtonMusic_38 extends MovieClip {
public function ButtonMusic_38(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 5
//ButtonSFX_39 (amazon_survival_fla.ButtonSFX_39)
package amazon_survival_fla {
import flash.display.*;
public dynamic class ButtonSFX_39 extends MovieClip {
public function ButtonSFX_39(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 6
//Checkbox_45 (amazon_survival_fla.Checkbox_45)
package amazon_survival_fla {
import flash.display.*;
public dynamic class Checkbox_45 extends MovieClip {
public function Checkbox_45(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 7
//ExplosionBlue_82 (amazon_survival_fla.ExplosionBlue_82)
package amazon_survival_fla {
import flash.display.*;
public dynamic class ExplosionBlue_82 extends MovieClip {
public function ExplosionBlue_82(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 8
//ExplosionGreen_84 (amazon_survival_fla.ExplosionGreen_84)
package amazon_survival_fla {
import flash.display.*;
public dynamic class ExplosionGreen_84 extends MovieClip {
public function ExplosionGreen_84(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 9
//ExplosionLineBlast_80 (amazon_survival_fla.ExplosionLineBlast_80)
package amazon_survival_fla {
import flash.display.*;
public dynamic class ExplosionLineBlast_80 extends MovieClip {
public function ExplosionLineBlast_80(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 10
//ExplosionRed_81 (amazon_survival_fla.ExplosionRed_81)
package amazon_survival_fla {
import flash.display.*;
public dynamic class ExplosionRed_81 extends MovieClip {
public function ExplosionRed_81(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 11
//ExplosionYellow_83 (amazon_survival_fla.ExplosionYellow_83)
package amazon_survival_fla {
import flash.display.*;
public dynamic class ExplosionYellow_83 extends MovieClip {
public function ExplosionYellow_83(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 12
//ForeGround_2 (amazon_survival_fla.ForeGround_2)
package amazon_survival_fla {
import flash.display.*;
public dynamic class ForeGround_2 extends MovieClip {
public function ForeGround_2(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 13
//IntroScreen_13 (amazon_survival_fla.IntroScreen_13)
package amazon_survival_fla {
import flash.display.*;
public dynamic class IntroScreen_13 extends MovieClip {
public var mcLogo:MovieClip;
public var mcIntroText1:MovieClip;
public var mcIntroText2:MovieClip;
public function IntroScreen_13(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 14
//LeftHand_94 (amazon_survival_fla.LeftHand_94)
package amazon_survival_fla {
import flash.display.*;
public dynamic class LeftHand_94 extends MovieClip {
public function LeftHand_94(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 15
//LineBlast_52 (amazon_survival_fla.LineBlast_52)
package amazon_survival_fla {
import flash.display.*;
public dynamic class LineBlast_52 extends MovieClip {
public function LineBlast_52(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 16
//PieceBlock_56 (amazon_survival_fla.PieceBlock_56)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceBlock_56 extends MovieClip {
public function PieceBlock_56(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 17
//PieceBone_67 (amazon_survival_fla.PieceBone_67)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceBone_67 extends MovieClip {
public var mcBall:MovieClip;
public var mcBomb:MovieClip;
public var mcLineBlast:MovieClip;
public function PieceBone_67(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 18
//PieceBoneBlock_72 (amazon_survival_fla.PieceBoneBlock_72)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceBoneBlock_72 extends MovieClip {
public function PieceBoneBlock_72(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 19
//PieceBoneBomb_60 (amazon_survival_fla.PieceBoneBomb_60)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceBoneBomb_60 extends MovieClip {
public function PieceBoneBomb_60(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 20
//PieceBoneCroc_68 (amazon_survival_fla.PieceBoneCroc_68)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceBoneCroc_68 extends MovieClip {
public function PieceBoneCroc_68(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 21
//PieceBoneLineBlast_61 (amazon_survival_fla.PieceBoneLineBlast_61)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceBoneLineBlast_61 extends MovieClip {
public function PieceBoneLineBlast_61(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 22
//PieceBonePanther_69 (amazon_survival_fla.PieceBonePanther_69)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceBonePanther_69 extends MovieClip {
public function PieceBonePanther_69(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 23
//PieceBoneSnake_70 (amazon_survival_fla.PieceBoneSnake_70)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceBoneSnake_70 extends MovieClip {
public function PieceBoneSnake_70(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 24
//PieceBoneSpider_71 (amazon_survival_fla.PieceBoneSpider_71)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceBoneSpider_71 extends MovieClip {
public function PieceBoneSpider_71(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 25
//PieceCoin_57 (amazon_survival_fla.PieceCoin_57)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceCoin_57 extends MovieClip {
public function PieceCoin_57(){
super();
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package amazon_survival_fla
Section 26
//PieceCrab_66 (amazon_survival_fla.PieceCrab_66)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceCrab_66 extends MovieClip {
public function PieceCrab_66(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 27
//PieceRock_58 (amazon_survival_fla.PieceRock_58)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceRock_58 extends MovieClip {
public var mcBall:MovieClip;
public var mcBomb:MovieClip;
public var mcLineBlast:MovieClip;
public function PieceRock_58(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 28
//PieceRockBlock_65 (amazon_survival_fla.PieceRockBlock_65)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceRockBlock_65 extends MovieClip {
public function PieceRockBlock_65(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 29
//PieceRockCroc_59 (amazon_survival_fla.PieceRockCroc_59)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceRockCroc_59 extends MovieClip {
public function PieceRockCroc_59(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 30
//PieceRockPanther_62 (amazon_survival_fla.PieceRockPanther_62)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceRockPanther_62 extends MovieClip {
public function PieceRockPanther_62(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 31
//PieceRockSnake_63 (amazon_survival_fla.PieceRockSnake_63)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceRockSnake_63 extends MovieClip {
public function PieceRockSnake_63(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 32
//PieceRockSpider_64 (amazon_survival_fla.PieceRockSpider_64)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceRockSpider_64 extends MovieClip {
public function PieceRockSpider_64(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 33
//PieceSeaHorse_73 (amazon_survival_fla.PieceSeaHorse_73)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceSeaHorse_73 extends MovieClip {
public function PieceSeaHorse_73(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 34
//PieceWood_49 (amazon_survival_fla.PieceWood_49)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceWood_49 extends MovieClip {
public var mcBall:MovieClip;
public var mcBomb:MovieClip;
public var mcLineBlast:MovieClip;
public function PieceWood_49(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 35
//PieceWoodCroc_50 (amazon_survival_fla.PieceWoodCroc_50)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceWoodCroc_50 extends MovieClip {
public function PieceWoodCroc_50(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 36
//PieceWoodPanther_53 (amazon_survival_fla.PieceWoodPanther_53)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceWoodPanther_53 extends MovieClip {
public function PieceWoodPanther_53(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 37
//PieceWoodSnake_54 (amazon_survival_fla.PieceWoodSnake_54)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceWoodSnake_54 extends MovieClip {
public function PieceWoodSnake_54(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 38
//PieceWoodSpider_55 (amazon_survival_fla.PieceWoodSpider_55)
package amazon_survival_fla {
import flash.display.*;
public dynamic class PieceWoodSpider_55 extends MovieClip {
public function PieceWoodSpider_55(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 39
//RegularExplosion_79 (amazon_survival_fla.RegularExplosion_79)
package amazon_survival_fla {
import flash.display.*;
public dynamic class RegularExplosion_79 extends MovieClip {
public function RegularExplosion_79(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 40
//RightHand_95 (amazon_survival_fla.RightHand_95)
package amazon_survival_fla {
import flash.display.*;
public dynamic class RightHand_95 extends MovieClip {
public function RightHand_95(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 41
//ScorePopBG_100 (amazon_survival_fla.ScorePopBG_100)
package amazon_survival_fla {
import flash.display.*;
public dynamic class ScorePopBG_100 extends MovieClip {
public function ScorePopBG_100(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 42
//Symbol14_16 (amazon_survival_fla.Symbol14_16)
package amazon_survival_fla {
import flash.display.*;
public dynamic class Symbol14_16 extends MovieClip {
public function Symbol14_16(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 43
//TimeNumbers_6 (amazon_survival_fla.TimeNumbers_6)
package amazon_survival_fla {
import flash.display.*;
public dynamic class TimeNumbers_6 extends MovieClip {
public function TimeNumbers_6(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 44
//TopFG_11 (amazon_survival_fla.TopFG_11)
package amazon_survival_fla {
import flash.display.*;
public dynamic class TopFG_11 extends MovieClip {
public function TopFG_11(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 45
//Trophy1_107 (amazon_survival_fla.Trophy1_107)
package amazon_survival_fla {
import flash.display.*;
public dynamic class Trophy1_107 extends MovieClip {
public function Trophy1_107(){
super();
addFrameScript(0, frame1, 51, frame52);
}
function frame52(){
gotoAndPlay(2);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 46
//Trophy2_108 (amazon_survival_fla.Trophy2_108)
package amazon_survival_fla {
import flash.display.*;
public dynamic class Trophy2_108 extends MovieClip {
public function Trophy2_108(){
super();
addFrameScript(0, frame1, 50, frame51);
}
function frame51(){
gotoAndPlay(2);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 47
//Trophy3_109 (amazon_survival_fla.Trophy3_109)
package amazon_survival_fla {
import flash.display.*;
public dynamic class Trophy3_109 extends MovieClip {
public function Trophy3_109(){
super();
addFrameScript(0, frame1, 50, frame51);
}
function frame51(){
gotoAndPlay(2);
}
function frame1(){
stop();
}
}
}//package amazon_survival_fla
Section 48
//blackBall (sound.blackBall)
package sound {
import flash.media.*;
public dynamic class blackBall extends Sound {
}
}//package sound
Section 49
//bonusScore (sound.bonusScore)
package sound {
import flash.media.*;
public dynamic class bonusScore extends Sound {
}
}//package sound
Section 50
//colorBomb (sound.colorBomb)
package sound {
import flash.media.*;
public dynamic class colorBomb extends Sound {
}
}//package sound
Section 51
//combo (sound.combo)
package sound {
import flash.media.*;
public dynamic class combo extends Sound {
}
}//package sound
Section 52
//combo1 (sound.combo1)
package sound {
import flash.media.*;
public dynamic class combo1 extends Sound {
}
}//package sound
Section 53
//combo2 (sound.combo2)
package sound {
import flash.media.*;
public dynamic class combo2 extends Sound {
}
}//package sound
Section 54
//combo3 (sound.combo3)
package sound {
import flash.media.*;
public dynamic class combo3 extends Sound {
}
}//package sound
Section 55
//combo4 (sound.combo4)
package sound {
import flash.media.*;
public dynamic class combo4 extends Sound {
}
}//package sound
Section 56
//combo5 (sound.combo5)
package sound {
import flash.media.*;
public dynamic class combo5 extends Sound {
}
}//package sound
Section 57
//intro (sound.intro)
package sound {
import flash.media.*;
public dynamic class intro extends Sound {
}
}//package sound
Section 58
//knock (sound.knock)
package sound {
import flash.media.*;
public dynamic class knock extends Sound {
}
}//package sound
Section 59
//levelCompleted (sound.levelCompleted)
package sound {
import flash.media.*;
public dynamic class levelCompleted extends Sound {
}
}//package sound
Section 60
//levelStart (sound.levelStart)
package sound {
import flash.media.*;
public dynamic class levelStart extends Sound {
}
}//package sound
Section 61
//lineBlast (sound.lineBlast)
package sound {
import flash.media.*;
public dynamic class lineBlast extends Sound {
}
}//package sound
Section 62
//loop (sound.loop)
package sound {
import flash.media.*;
public dynamic class loop extends Sound {
}
}//package sound
Section 63
//outro (sound.outro)
package sound {
import flash.media.*;
public dynamic class outro extends Sound {
}
}//package sound
Section 64
//splash (sound.splash)
package sound {
import flash.media.*;
public dynamic class splash extends Sound {
}
}//package sound
Section 65
//switch (sound.switch)
package sound {
import flash.media.*;
public dynamic class switch extends Sound {
}
}//package sound
Section 66
//warning (sound.warning)
package sound {
import flash.media.*;
public dynamic class warning extends Sound {
}
}//package sound
Section 67
//Communicator (src.comm.Communicator)
package src.comm {
import flash.system.*;
public class Communicator {
private var hasSentLastTick;// = false
private var hasSentGameEnd;// = false
private var hasSentGameStart;// = false
private var hasSentGameOver;// = false
private static var CMD_START_ROUND = 101;
private static var CMD_SHOOT_BALL = 102;
private static var CMD_SWITCH_BALLS = 103;
private static var CMD_COMPARE_SCORE = 104;
private static var CMD_SEND_RANDOMS = 105;
private static var CMD_SEND_SOUND = 106;
private static var CMD_LAST_TICK = 107;
private static var CMD_END_PRESSED = 108;
public function Communicator(){
super();
}
public function gameStarted(){
trace("GAME START");
if (!hasSentGameStart){
hasSentGameStart = true;
};
}
public function signup(){
fscommand("gameSignup", "");
}
public function gameQuit(){
trace("GAME QUIT");
if (!hasSentGameOver){
hasSentGameOver = true;
};
}
public function gameEnd(p__1){
trace("GAME ENDS");
if (!hasSentGameEnd){
hasSentGameEnd = true;
};
}
public function startRound(p__1){
}
public function shootBall(p__1, p__2){
}
public function switchBalls(p__1){
}
public function sendScore(p__1, p__2, p__3, p__4){
}
public function sendRandoms(p__1, p__2, p__3){
}
public function soundStates(p__1, p__2){
}
public function lastTick(p__1, p__2, p__3){
}
public function endPressed(p__1, p__2, p__3){
}
}
}//package src.comm
Section 68
//GameDataParser (src.comm.GameDataParser)
package src.comm {
import flash.xml.*;
public class GameDataParser {
public static var records:Object;
public static var textMappings:Object;
public static var sounds:Object;
public static function parseGameData(_arg1:String):Object{
var _local2:Object = new Object();
var _local3:XMLDocument = new XMLDocument(_arg1);
textMappings = new Object();
_local2.textMappings = textMappings;
var _local4:* = _local3.firstChild.childNodes;
records = new Object();
_local2.records = records;
sounds = new Object();
_local2.sounds = sounds;
var _local5:* = (_local3.firstChild.attributes.relaxMode == "true");
var _local6:int = parseInt(_local3.firstChild.attributes.randomseed);
var _local7:* = _local3.firstChild.attributes.lang;
var _local8:* = _local3.firstChild.attributes.partner;
_local2.randomSeed = _local6;
_local2.relaxMode = _local5;
_local2.partnerId = _local8;
_local2.country = _local7;
var _local9:* = 0;
while (_local9 < _local4.length) {
if (_local4[_local9].nodeName == "id"){
};
if (_local4[_local9].nodeName == "game"){
_local2.gameType = new String(_local4[_local9].attributes.type);
};
if (_local4[_local9].nodeName == "userType"){
_local2.userType = new String(_local4[_local9].firstChild.nodeValue);
};
if (_local4[_local9].nodeName == "text"){
if ((((_local4[_local9].firstChild == null)) || ((_local4[_local9].firstChild == undefined)))){
textMappings[_local4[_local9].attributes.id] = (("[" + _local4[_local9].attributes.id) + "]");
} else {
textMappings[_local4[_local9].attributes.id] = new String(_local4[_local9].firstChild.nodeValue);
};
};
if (_local4[_local9].nodeName == "records"){
if ((((_local4[_local9].firstChild == null)) || ((_local4[_local9].firstChild == undefined)))){
records[_local4[_local9].attributes.id] = (("[" + _local4[_local9].attributes.id) + "]");
} else {
records[_local4[_local9].attributes.id] = new String(_local4[_local9].firstChild.nodeValue);
};
};
if (_local4[_local9].nodeName == "sounds"){
if ((((_local4[_local9].firstChild == null)) || ((_local4[_local9].firstChild == undefined)))){
sounds[_local4[_local9].attributes.id] = (("[" + _local4[_local9].attributes.id) + "]");
} else {
sounds[_local4[_local9].attributes.id] = new String(_local4[_local9].firstChild.nodeValue);
};
};
_local9++;
};
return (_local2);
}
}
}//package src.comm
Section 69
//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 70
//ManagedSound (src.sound.ManagedSound)
package src.sound {
import flash.media.*;
public class ManagedSound {
public var activeSounds:Array;
private var manager:SoundManager;
private var ClassReference:Class;
public function ManagedSound(_arg1:SoundManager, _arg2:Class){
activeSounds = new Array();
super();
this.manager = _arg1;
this.ClassReference = _arg2;
}
public function stop():void{
var _local1:int;
while (_local1 < activeSounds.length) {
activeSounds[_local1].stop();
_local1++;
};
}
public function play(_arg1:Number=1, _arg2:Number=0):ManagedSoundChannel{
var _local3:SoundChannel = new ClassReference().play(0, 0, new SoundTransform(_arg1, _arg2));
return (new ManagedSoundChannel(manager, this, _local3));
}
public function loop(_arg1:Number=1, _arg2:Number=0):ManagedSoundChannel{
var _local3:SoundChannel = new ClassReference().play(0, 999999999, new SoundTransform(_arg1, _arg2));
return (new ManagedSoundChannel(manager, this, _local3));
}
public function fadeToAndStop(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].fadeToAndStop(_arg1, _arg2);
_local3++;
};
}
public function isPlaying():Boolean{
return ((activeSounds.length > 0));
}
public function update():void{
var _local1:int;
while (_local1 < activeSounds.length) {
activeSounds[_local1].update();
_local1++;
};
}
public function fadeTo(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].fadeTo(_arg1, _arg2);
_local3++;
};
}
public function panTo(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].panTo(_arg1, _arg2);
_local3++;
};
}
public function setPan(_arg1:Number):void{
var _local2:int;
while (_local2 < activeSounds.length) {
activeSounds[_local2].setPan(_arg1);
_local2++;
};
}
public function setVolume(_arg1:Number):void{
var _local2:int;
while (_local2 < activeSounds.length) {
activeSounds[_local2].setVolume(_arg1);
_local2++;
};
}
}
}//package src.sound
Section 71
//ManagedSoundChannel (src.sound.ManagedSoundChannel)
package src.sound {
import flash.media.*;
import flash.events.*;
import flash.utils.*;
public class ManagedSoundChannel {
private var fadeStartVolume:Number;// = -1
private var channel:SoundChannel;
private var fadeEndVolume:Number;// = -1
private var targetVolume:Number;
private var targetPan:Number;
private var sound:ManagedSound;
private var stopAfterFade:Boolean;// = false
private var panEndTime:Number;// = -1
private var fadeEndTime:Number;// = -1
private var manager:SoundManager;
private var playing:Boolean;// = true
private var panStartTime:Number;// = -1
private var fadeStartTime:Number;// = -1
private var panEndVolume:Number;// = -1
private var panStartVolume:Number;// = -1
public function ManagedSoundChannel(_arg1:SoundManager, _arg2:ManagedSound, _arg3:SoundChannel){
super();
this.manager = _arg1;
this.sound = _arg2;
this.channel = _arg3;
_arg2.activeSounds.push(this);
if (_arg3 == null){
soundComplete(null);
return;
};
_arg3.addEventListener(Event.SOUND_COMPLETE, soundComplete);
targetVolume = _arg3.soundTransform.volume;
targetPan = _arg3.soundTransform.pan;
update();
}
public function stop():void{
if (!playing){
return;
};
if (channel == null){
return;
};
channel.stop();
soundComplete(null);
}
public function update():void{
var _local1:Number;
if (!playing){
return;
};
if (fadeStartTime >= 0){
_local1 = ((getTimer() - fadeStartTime) / (fadeEndTime - fadeStartTime));
if (_local1 < 0){
_local1 = 0;
};
if (_local1 > 1){
_local1 = 1;
};
targetVolume = (fadeStartVolume + ((fadeEndVolume - fadeStartVolume) * _local1));
targetVolume = (targetVolume * targetVolume);
if (_local1 == 1){
fadeStartTime = -1;
};
if ((((_local1 == 1)) && (stopAfterFade))){
stop();
};
};
if (panStartTime >= 0){
_local1 = ((getTimer() - panStartTime) / (panEndTime - panStartTime));
if (_local1 < 0){
_local1 = 0;
};
if (_local1 > 1){
_local1 = 1;
};
targetPan = (panStartVolume + ((panEndVolume - panStartVolume) * _local1));
if (_local1 == 1){
panStartTime = -1;
};
};
var _local2:Number = (targetVolume * manager.volume);
var _local3:Number = targetPan;
if (channel == null){
return;
};
if (((!((_local2 == channel.soundTransform.volume))) || (!((_local3 == channel.soundTransform.pan))))){
channel.soundTransform = new SoundTransform(_local2, _local3);
};
}
public function panTo(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
panStartVolume = targetPan;
panEndVolume = _arg1;
panStartTime = getTimer();
panEndTime = (getTimer() + _arg2);
}
public function fadeTo(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
fadeStartVolume = Math.sqrt(targetVolume);
fadeEndVolume = Math.sqrt(_arg1);
fadeStartTime = getTimer();
fadeEndTime = (getTimer() + _arg2);
stopAfterFade = false;
}
public function setPan(_arg1:Number):void{
if (!playing){
return;
};
if (channel == null){
return;
};
channel.soundTransform.pan = _arg1;
panStartTime = -1;
update();
}
public function fadeToAndStop(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
fadeTo(_arg1, _arg2);
stopAfterFade = true;
}
public function setVolume(_arg1:Number):void{
if (!playing){
return;
};
stopAfterFade = false;
this.targetVolume = _arg1;
fadeStartTime = -1;
update();
}
public function soundComplete(_arg1:Event):void{
if (!playing){
return;
};
sound.activeSounds.splice(sound.activeSounds.indexOf(this), 1);
playing = false;
}
public function isPlaying():Boolean{
return (playing);
}
}
}//package src.sound
Section 72
//SoundManager (src.sound.SoundManager)
package src.sound {
import flash.utils.*;
public class SoundManager {
private var fadeStartVolume:Number;// = -1
private var lastTime:Number;// = -1
private var managedSounds:Array;
private var fadeEndTime:Number;// = -1
private var fadeStartTime:Number;// = -1
private var fadeEndVolume:Number;// = -1
public var volume:Number;// = 1
private var managedSoundMap:Object;
public function SoundManager(){
managedSoundMap = new Object();
managedSounds = new Array();
super();
}
public function update():void{
var _local3:Number;
var _local2:int;
var _local1:Number = getTimer();
if (lastTime < 0){
lastTime = _local1;
};
if (fadeStartTime >= 0){
_local3 = ((getTimer() - fadeStartTime) / (fadeEndTime - fadeStartTime));
if (_local3 < 0){
_local3 = 0;
};
if (_local3 > 1){
_local3 = 1;
};
volume = (fadeStartVolume + ((fadeEndVolume - fadeStartVolume) * _local3));
volume = (volume * volume);
if (_local3 == 1){
fadeStartTime = -1;
};
};
while (_local2 < managedSounds.length) {
managedSounds[_local2].update();
_local2++;
};
}
public function stopAll():void{
var _local1:int;
while (_local1 < managedSounds.length) {
managedSounds[_local1].stop();
_local1++;
};
}
public function get(_arg1:String):ManagedSound{
var _local2:Class;
if (managedSoundMap[_arg1] == null){
_local2 = (getDefinitionByName(("sound." + _arg1)) as Class);
if (_local2 == null){
throw (new Error(("Failed to find sound " + _arg1)));
};
managedSoundMap[_arg1] = new ManagedSound(this, _local2);
managedSounds.push(managedSoundMap[_arg1]);
};
return (managedSoundMap[_arg1]);
}
public function fadeTo(_arg1:Number, _arg2:Number):void{
fadeStartVolume = Math.sqrt(volume);
fadeEndVolume = Math.sqrt(_arg1);
fadeStartTime = getTimer();
fadeEndTime = (getTimer() + _arg2);
}
public function setVolume(_arg1:Number):void{
this.volume = _arg1;
fadeStartTime = -1;
}
}
}//package src.sound
Section 73
//IFloat (src.timing.IFloat)
package src.timing {
public class IFloat {
public var ivalue:Number;
private var lastValue:Number;
private static var alpha:Number;
public function IFloat(_arg1:Number){
super();
ivalue = _arg1;
lastValue = _arg1;
alpha = 0;
}
public function get value():Number{
return ((lastValue + ((ivalue - lastValue) * alpha)));
}
public function set(_arg1:Number){
lastValue = ivalue;
ivalue = _arg1;
}
public function get(_arg1:Number){
return ((lastValue + ((ivalue - lastValue) * _arg1)));
}
public function set value(_arg1:Number):void{
ivalue = _arg1;
lastValue = _arg1;
}
public function setTo(_arg1:Number){
ivalue = _arg1;
lastValue = _arg1;
}
public static function setAlpha(_arg1:Number):void{
alpha = _arg1;
}
}
}//package src.timing
Section 74
//Timeable (src.timing.Timeable)
package src.timing {
public interface Timeable {
function tick(:Number):void;
function render(_arg1:Number, _arg2:Number):void;
}
}//package src.timing
Section 75
//Timer (src.timing.Timer)
package src.timing {
import flash.utils.*;
public class Timer {
private var unprocessedTime:Number;// = 0
private var lastTime:Number;// = 0
private var millisPerGameTick:Number;// = 0
private var timeable:Timeable;
private var maxTickTime:Number;// = -1
private var startTime:Number;// = -1
private var time:Number;// = 0
private var tick:Number;// = 0
public function Timer(_arg1:Timeable, _arg2:Number){
super();
millisPerGameTick = (1000 / _arg2);
this.timeable = _arg1;
this.maxTickTime = 500;
}
public function getMillisPerTick():Number{
return (millisPerGameTick);
}
public function advanceTime2():void{
var _local4:*;
var _local1:* = getTimer();
if (startTime < 0){
startTime = _local1;
unprocessedTime = millisPerGameTick;
};
time = (_local1 - startTime);
var _local2:* = (time - lastTime);
lastTime = time;
unprocessedTime = (unprocessedTime + _local2);
if (unprocessedTime >= millisPerGameTick){
_local4 = (maxTickTime + _local1);
do {
timeable.tick(tick);
tick++;
unprocessedTime = (unprocessedTime - millisPerGameTick);
} while ((((unprocessedTime >= millisPerGameTick)) && ((getTimer() < _local4))));
};
var _local3:Number = ((unprocessedTime % millisPerGameTick) / millisPerGameTick);
IFloat.setAlpha(_local3);
timeable.render(tick, _local3);
}
public function advanceTime(){
time = getTimer();
var _local1:* = (time - lastTime);
lastTime = time;
unprocessedTime = (unprocessedTime + _local1);
var _local2:Number = 0;
while (unprocessedTime > millisPerGameTick) {
unprocessedTime = (unprocessedTime - millisPerGameTick);
timeable.tick(tick);
tick++;
_local2++;
if (_local2 >= 10){
unprocessedTime = 0;
};
};
var _local3:Number = (unprocessedTime / millisPerGameTick);
timeable.render(tick, _local3);
}
public function setMaxTickTime(_arg1:Number):void{
maxTickTime = _arg1;
}
}
}//package src.timing
Section 76
//Aztec (src.Aztec)
package src {
import src.sound.*;
import src.timing.*;
import flash.events.*;
import src.math.*;
import src.comm.*;
import flash.display.*;
import flash.text.*;
import flash.filters.*;
import flash.utils.*;
import flash.system.*;
import flash.net.*;
public class Aztec extends MovieClip implements Timeable {
public var mcLogo:MovieClip;
public var mcQuit:MovieClip;
private var egp;// = false
public var mcSFX:MovieClip;
public var mcWater:MovieClip;
private var FPSavgCount;// = 0
public var mcRelaxModeMeter:MovieClip;
public var mcMusic:MovieClip;
private var playG_;
private var signAnimAt;// = 0
private var sfxOn;// = true
private var tArr;
private var mcSignup;
private var startTime;
private var relaxMode;// = false
private var communicator;
public var txtFPS:TextField;
public var mcBG:MovieClip;
private var noOfRandom;// = 0
private var levelRandom;
private var FPSavg;
public var mcIntroScreen:MovieClip;
private var level;// = 0
public var waterEffect;// = true
private var totalBB;
private var mcGameOver;
private var ticksLeft;
public var mcRelaxGameOver:RelaxGameOver;
public var userType;
public var mcGame:Game;
public var foodLeftTxt:TextField;
private var m_mainTimer;
private var gameData;
private var currentTick;
public var gameState;
private var noOfRend;// = 0
private var random;
private var totalLR;
public var partner:String;
private var noOfLevelRandom;// = 0
public var mcBetweenRounds:MovieClip;
public var mcFG:MovieClip;
public var mcTopFG:MovieClip;
private var musicOn;// = true
public var parsedGameData:Object;// = null
public var lang:String;
private var totalES;
private var cbs;// = false
public var musicManager:SoundManager;
public var sfxManager:SoundManager;
private static const STATE_WAIT_FOR_GAMEDATA:int = 0;
private static const STATE_SHOW_INFO_SCREEN:int = 1;
private static const STATE_PLAY_GAME:int = 2;
private static const STATE_BETWEEN_ROUNDS:int = 3;
private static const STATE_END_GAME:int = 4;
private static const STATE_SIGNUP:int = 5;
private static const TICKS_PER_SEC:int = 25;
private static const BUILD_CBS_STANDALONE:Boolean = true;
private static const CBS_DATA:String = (((((((((((((((((((((((((((((((((("<gamedata relaxMode=\"false\" partner=\"cbs\" randomseed=\"" + (0 | (Math.random() * 524288))) + "\" lang=\"en_US\">") + "<text id=\"txtTrophy1Exp\">Clear 500 levels to unlock this trophy!</text>") + "<text id=\"txtRelaxIntro\">Drop blocks to create groups of four or more of the same kind to remove them. Your goal is to make sure no blocks are above the water surface. Use space bar to switch blocks. Collect animals to keep your meter filled or the game will end.</text>") + "<text id=\"txtRegister\">Register to play the full game</text>") + "<text id=\"txtIntroHeader\">Instructions:</text>") + "<text id=\"game_starts_in\">The game starts in [0] seconds!</text>") + "<text id=\"txtLevelsLabel\">Levels Cleared:</text>") + "<text id=\"txtTrophy2Exp\">Destroy 500 black blocks to unlock this trophy!</text>") + "<text id=\"txtFish\">Fish, Seahorse and Crab: Save them by getting them into the water for extra points!</text>") + "<text id=\"txtEmptySpacesLabel\">Empty rows:</text>") + "<text id=\"game_next_screen\">Next info screen in [0] seconds!</text>") + "<text id=\"game_ends\">Game ends in [0] seconds!</text>") + "<text id=\"txtClickToCont\">Click to continue</text>") + "<text id=\"txtBlackBallsLabel\">Black blocks:</text>") + "<text id=\"txtGameOverHeader\">Game Over!</text>") + "<text id=\"txtLineBlast\">Line Blast: Destroys a complete row.</text>") + "<text id=\"txtTrophyRecieved\">Trophy Received!</text>") + "<text id=\"txtRelaxFish\">Fish, Seahorse and Crab: Save them by getting them into the water, you need this to survive!</text>") + "<text id=\"txtScoreLabel\">Score:</text>") + "<text id=\"txtBonusHeader\">Bonus objects:</text>") + "<text id=\"txtTrophy3Exp\">Get a bonus score for 1000 empty rows to unlock this trophy!</text>") + "<text id=\"txtBlack\">Black blocks cannot create combos</text>") + "<text id=\"txtIntro\">Drop blocks to create groups of four or more of the same kind to remove them. Your goal is to make sure no blocks are above the water surface. Use space bar to switch blocks.</text>") + "<text id=\"txtBomb\">Destroys all blocks of the same colour</text>") + "<text id=\"txtTotal\">Total</text>") + "<text id=\"txtNextLevel\">You made it to the next level!</text>") + "<sounds id=\"sfxOn\">0</sounds>") + "<sounds id=\"musicOn\">0</sounds>") + "<records id=\"totalBB\">0</records>") + "<records id=\"totalES\">0</records>") + "<records id=\"totalLR\">0</records>") + "<userType id=\"0\">1</userType>") + "</gamedata>");
private static const DEBUG_MODE = false;
private static const DEBUG_GAME_DATA = (((((((((((((((((((((((((((((((((("<gamedata relaxMode=\"false\" partner=\"cbs\" randomseed=\"" + (0 | (Math.random() * 524288))) + "\" lang=\"en_US\">") + "<text id=\"txtTrophy1Exp\">Clear 500 levels to unlock this trophy!</text>") + "<text id=\"txtRelaxIntro\">Drop blocks to create groups of four or more of the same kind to remove them. Your goal is to make sure no blocks are above the water surface. Use space bar to switch blocks. Collect animals to keep your meter filled or the game will end.</text>") + "<text id=\"txtRegister\">Register to play the full game</text>") + "<text id=\"txtIntroHeader\">Instructions:</text>") + "<text id=\"game_starts_in\">The game starts in [0] seconds!</text>") + "<text id=\"txtLevelsLabel\">Levels Cleared:</text>") + "<text id=\"txtTrophy2Exp\">Destroy 500 black blocks to unlock this trophy!</text>") + "<text id=\"txtFish\">Fish, Seahorse and Crab: Save them by getting them into the water for extra points!</text>") + "<text id=\"txtEmptySpacesLabel\">Empty rows:</text>") + "<text id=\"game_next_screen\">Next info screen in [0] seconds!</text>") + "<text id=\"game_ends\">Game ends in [0] seconds!</text>") + "<text id=\"txtClickToCont\">Click to continue</text>") + "<text id=\"txtBlackBallsLabel\">Black blocks:</text>") + "<text id=\"txtGameOverHeader\">Game Over!</text>") + "<text id=\"txtLineBlast\">Line Blast: Destroys a complete row.</text>") + "<text id=\"txtTrophyRecieved\">Trophy Received!</text>") + "<text id=\"txtRelaxFish\">Fish, Seahorse and Crab: Save them by getting them into the water, you need this to survive!</text>") + "<text id=\"txtScoreLabel\">Score:</text>") + "<text id=\"txtBonusHeader\">Bonus objects:</text>") + "<text id=\"txtTrophy3Exp\">Get a bonus score for 1000 empty rows to unlock this trophy!</text>") + "<text id=\"txtBlack\">Black blocks cannot create combos</text>") + "<text id=\"txtIntro\">Drop blocks to create groups of four or more of the same kind to remove them. Your goal is to make sure no blocks are above the water surface. Use space bar to switch blocks.</text>") + "<text id=\"txtBomb\">Destroys all blocks of the same colour</text>") + "<text id=\"txtTotal\">Total</text>") + "<text id=\"txtNextLevel\">You made it to the next level!</text>") + "<sounds id=\"sfxOn\">0</sounds>") + "<sounds id=\"musicOn\">0</sounds>") + "<records id=\"totalBB\">0</records>") + "<records id=\"totalES\">0</records>") + "<records id=\"totalLR\">0</records>") + "<userType id=\"0\">1</userType>") + "</gamedata>");
public function Aztec(){
var l__2:Object;
var l__3:String;
musicManager = new SoundManager();
sfxManager = new SoundManager();
var l__1:* = undefined;
super();
mcGameOver = new GameOverScreen();
m_mainTimer = new Timer(this, TICKS_PER_SEC);
addEventListener("enterFrame", drive);
communicator = new Communicator();
mcBetweenRounds.visible = false;
mcGameOver.visible = false;
mcLogo.visible = false;
mcBetweenRounds.addEventListener(MouseEvent.CLICK, clearTicksLeft);
mcIntroScreen.addEventListener(MouseEvent.CLICK, clearTicksLeft);
mcGameOver.addEventListener(MouseEvent.CLICK, clearTicksLeft);
mcGameOver.mcTrophies.mcTrophy1.addEventListener(MouseEvent.ROLL_OVER, trophy1Exp);
mcGameOver.mcTrophies.mcTrophy2.addEventListener(MouseEvent.ROLL_OVER, trophy2Exp);
mcGameOver.mcTrophies.mcTrophy3.addEventListener(MouseEvent.ROLL_OVER, trophy3Exp);
mcGameOver.mcTrophies.mcTrophy1.addEventListener(MouseEvent.ROLL_OUT, clearTrophyExp);
mcGameOver.mcTrophies.mcTrophy2.addEventListener(MouseEvent.ROLL_OUT, clearTrophyExp);
mcGameOver.mcTrophies.mcTrophy3.addEventListener(MouseEvent.ROLL_OUT, clearTrophyExp);
mcQuit.addEventListener(MouseEvent.CLICK, endGamePressed);
mcSFX.addEventListener(MouseEvent.CLICK, sfxButtonClicked);
mcMusic.addEventListener(MouseEvent.CLICK, musicButtonClicked);
mcTopFG.mouseEnabled = false;
playG_ = new Play();
playG_.x = 455;
playG_.y = 500;
addChild(playG_);
playG_.addEventListener(MouseEvent.CLICK, clearTicksLeft);
if (BUILD_CBS_STANDALONE){
mcSignup = new SignupScreen();
l__1 = mcSignup.mcInner;
l__1.mcCheckbox.gotoAndStop(2);
l__1.mcClickSignup.buttonMode = true;
l__1.mcClickSignup.useHandCursor = true;
l__1.mcClickSignup.mouseChildren = false;
l__1.mcClickSignup.visible = false;
l__1.mcClickSignup.addEventListener(MouseEvent.CLICK, doSignup);
l__1.mcClickCheckBox.buttonMode = true;
l__1.mcClickCheckBox.useHandCursor = true;
l__1.mcClickCheckBox.mouseChildren = false;
l__1.mcClickCheckBox.addEventListener(MouseEvent.CLICK, flipSignupCheckBox);
l__1.mcClickPlayAgain.buttonMode = true;
l__1.mcClickPlayAgain.useHandCursor = true;
l__1.mcClickPlayAgain.mouseChildren = false;
l__1.mcClickPlayAgain.addEventListener(MouseEvent.CLICK, clearTicksLeft);
l__2 = new Object();
l__2.message = CBS_DATA;
l__2.success = true;
} else {
if (DEBUG_MODE){
l__2 = new Object();
l__2.message = DEBUG_GAME_DATA;
l__2.success = true;
};
};
if ((((l__2 == null)) || (!(l__2.success)))){
trace(("oa banga ur " + l__2));
} else {
l__3 = l__2.message;
parsedGameData = GameDataParser.parseGameData(l__3);
random = new MtRandom(parsedGameData.randomSeed);
relaxMode = parsedGameData.relaxMode;
mcGame.relaxMode = parsedGameData.relaxMode;
partner = parsedGameData.partnerId;
lang = parsedGameData.country;
levelRandom = new MtRandom(parsedGameData.randomSeed);
mcIntroScreen.mcIntroText1.txtIntro.text = parsedGameData.textMappings[(relaxMode) ? "txtRelaxIntro" : "txtIntro"];
mcIntroScreen.mcIntroText1.txtIntroHeader.text = parsedGameData.textMappings["txtIntroHeader"];
mcIntroScreen.mcIntroText2.txtBonusHeader.text = parsedGameData.textMappings["txtBonusHeader"];
mcIntroScreen.mcIntroText2.txtBlack.text = parsedGameData.textMappings["txtBlack"];
mcIntroScreen.mcIntroText2.txtBomb.text = parsedGameData.textMappings["txtBomb"];
mcIntroScreen.mcIntroText2.txtLineBlast.text = parsedGameData.textMappings["txtLineBlast"];
mcIntroScreen.mcIntroText2.txtFish.text = parsedGameData.textMappings[(relaxMode) ? "txtRelaxFish" : "txtFish"];
mcGameOver.txtGameOverHeader.text = parsedGameData.textMappings["txtGameOverHeader"];
mcGameOver.mcScoreTextLabel.txtScoreLabel.text = parsedGameData.textMappings["txtScoreLabel"];
mcGameOver.mcScoreTextLabel.txtLevelsLabel.text = parsedGameData.textMappings["txtLevelsLabel"];
mcGameOver.mcScoreTextLabel.txtBlackBallsLabel.text = parsedGameData.textMappings["txtBlackBallsLabel"];
mcGameOver.mcScoreTextLabel.txtEmptySpacesLabel.text = parsedGameData.textMappings["txtEmptySpacesLabel"];
mcBetweenRounds.mcInfoText.txtNextLevel.text = parsedGameData.textMappings["txtNextLevel"];
mcBetweenRounds.mcInfoText.txtScoreLabel.text = parsedGameData.textMappings["txtScoreLabel"];
mcBetweenRounds.mcInfoText.txtClickToCont.text = parsedGameData.textMappings["txtClickToCont"];
totalBB = parsedGameData.records["totalBB"];
totalES = parsedGameData.records["totalES"];
totalLR = parsedGameData.records["totalLR"];
if (Number(parsedGameData.sounds["sfxOn"]) == 1){
mcSFX.gotoAndStop(10);
sfxOn = false;
mcGame.sfxOn = false;
sfxManager.setVolume(0);
};
if (Number(parsedGameData.sounds["musicOn"]) == 1){
mcMusic.gotoAndStop(10);
musicOn = false;
mcGame.musicOn = false;
musicManager.setVolume(0);
};
userType = parsedGameData.userType;
if (lang == "en_US"){
cbs = true;
mcIntroScreen.mcLogo.gotoAndStop(2);
mcLogo.visible = true;
};
showInfoScreen();
};
}
public function flipSignupCheckBox(p__1:MouseEvent):void{
var l__2:* = mcSignup.mcInner.mcCheckbox;
l__2.gotoAndStop(((l__2.currentFrame)==1) ? 2 : 1);
}
public function doSignup(p__1:MouseEvent):void{
if (mcSignup.mcInner.mcCheckbox.currentFrame == 2){
communicator.signup();
};
}
public function trophy1Exp(p__1:Event){
mcGameOver.mcTrophies.txtTrophyExp.text = parsedGameData.textMappings["txtTrophy1Exp"];
}
public function trophy2Exp(p__1:Event){
mcGameOver.mcTrophies.txtTrophyExp.text = parsedGameData.textMappings["txtTrophy2Exp"];
}
public function trophy3Exp(p__1:Event){
mcGameOver.mcTrophies.txtTrophyExp.text = parsedGameData.textMappings["txtTrophy3Exp"];
}
public function clearTrophyExp(p__1:Event){
mcGameOver.mcTrophies.txtTrophyExp.text = "";
}
private function drive(p__1:Event){
m_mainTimer.advanceTime2();
}
public function tick(p__1:Number):void{
var p__1 = p__1;
currentTick = p__1;
switch (gameState){
case STATE_SHOW_INFO_SCREEN:
ticksLeft--;
signAnimAt++;
if (ticksLeft <= 0){
startRound();
if (!DEBUG_MODE){
communicator.gameStarted();
};
};
break;
case STATE_PLAY_GAME:
mcGame.tick(p__1, TICKS_PER_SEC);
break;
case STATE_BETWEEN_ROUNDS:
ticksLeft--;
signAnimAt++;
if (ticksLeft == 0){
startRound();
};
break;
case STATE_END_GAME:
ticksLeft--;
signAnimAt++;
if (ticksLeft == 0){
if (BUILD_CBS_STANDALONE){
gameState = STATE_SIGNUP;
signAnimAt = 1;
ticksLeft = (TICKS_PER_SEC * 30);
} else {
gameQuit();
};
};
break;
case STATE_SIGNUP:
trace(("DrunkenScore:" + mcGameOver.mcScoreText.txtScore.text));
url = "index.php?act=Arcade&do=newscore";
request = new URLRequest(url);
variables = new URLVariables();
variables.gname = "AmazonSurvivalAS3v2DR";
variables.gscore = mcGameOver.mcScoreText.txtScore.text;
request.data = variables;
request.method = URLRequestMethod.POST;
navigateToURL(request, "_self");
//unresolved jump
var _slot1 = e;
trace(_slot1);
gameState = STATE_END_GAME;
break;
};
}
public function render(p__1:Number, p__2:Number):void{
var l__4:* = undefined;
musicManager.update();
sfxManager.update();
if (noOfRend == 0){
startTime = getTimer();
};
noOfRend++;
var l__3:* = (getTimer() - startTime);
if (l__3 > 2000){
l__4 = Math.round(((noOfRend * 1000) / l__3));
noOfRend = 0;
if (FPSavg == undefined){
FPSavg = l__4;
FPSavgCount = 1;
} else {
FPSavg = (FPSavg + l__4);
FPSavgCount++;
};
if (FPSavgCount == 5){
if ((FPSavg / 5) < 10){
waterEffect = false;
};
FPSavg = 0;
FPSavgCount = 0;
};
};
switch (gameState){
case STATE_SHOW_INFO_SCREEN:
mcIntroScreen.gotoAndStop(signAnimAt);
break;
case STATE_PLAY_GAME:
mcGame.render(p__1, p__2);
break;
case STATE_BETWEEN_ROUNDS:
mcBetweenRounds.gotoAndStop(signAnimAt);
break;
case STATE_END_GAME:
if (signAnimAt < 21){
mcGameOver.gotoAndStop(signAnimAt);
} else {
if (tArr.length > 0){
if (tArr[0] == 1){
mcGameOver.mcTrophies.mcTrophy1.gotoAndPlay(2);
};
if (tArr[1] == 1){
mcGameOver.mcTrophies.mcTrophy2.gotoAndPlay(2);
};
if (tArr[2] == 1){
mcGameOver.mcTrophies.mcTrophy3.gotoAndPlay(2);
};
tArr = [];
};
};
break;
case STATE_SIGNUP:
if (signAnimAt < 19){
mcSignup.gotoAndStop(signAnimAt);
};
break;
};
}
public function clearTicksLeft(p__1:Event){
switch (gameState){
case STATE_BETWEEN_ROUNDS:
if ((((signAnimAt > 49)) && ((signAnimAt < 100)))){
ticksLeft = 29;
signAnimAt = 100;
};
break;
case STATE_END_GAME:
if (ticksLeft < 225){
ticksLeft = 1;
};
break;
default:
ticksLeft = 1;
};
}
public function showInfoScreen(){
musicManager.get("intro").play(1);
signAnimAt = 1;
ticksLeft = 560;
gameState = STATE_SHOW_INFO_SCREEN;
}
public function startRound(){
if (level == 0){
removeChild(playG_);
removeChild(mcIntroScreen);
stage.focus = this;
musicManager.get("intro").stop();
} else {
musicManager.get("levelCompleted").stop();
};
musicManager.get("loop").loop(0).fadeTo(0.4, 1000);
musicManager.get("levelStart").play();
level++;
mcBetweenRounds.visible = false;
gameState = STATE_PLAY_GAME;
var l__1:Array = getGameArr();
mcGame.startRound(level, this, currentTick, l__1, communicator);
}
public function getGameArr(){
var l__1:Array = new Array();
var l__2:Array = new Array();
var l__3:Array = new Array();
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,1,1,1,1,1,1,1,0,0-") + "0,0,1,1,1,1,1,1,1,0,0-") + "0,0,1,1,1,1,1,1,1,0,0-") + "0,0,1,1,1,1,1,1,1,0,0-") + "0,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,1,0,0,0,0,0,0,0,0,0,1,0-") + "0,1,0,0,0,0,0,0,0,0,0,1,0-") + "0,1,0,0,0,0,0,0,0,0,0,1,0-") + "0,1,0,1,1,1,1,1,1,1,0,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "1,1,1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1,1,1"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,1,1,1,0,0,0,0,0-") + "0,0,0,0,0,1,1,1,0,0,0,0,0-") + "0,0,0,0,0,1,1,1,0,0,0,0,0-") + "0,0,0,0,0,1,1,1,0,0,0,0,0-") + "1,1,1,0,0,1,1,1,0,0,1,1,1-") + "1,1,1,0,0,1,1,1,0,0,1,1,1-") + "1,1,1,0,0,1,1,1,0,0,1,1,1-") + "1,1,1,0,0,1,1,1,0,0,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1,1,1"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,1,1,1,1,1,0,0,0,0-") + "0,0,0,0,1,1,1,1,1,0,0,0,0-") + "0,0,0,0,1,1,1,1,1,0,0,0,0-") + "0,0,0,1,1,1,1,1,1,1,0,0,0-") + "0,0,0,1,1,1,1,1,1,1,0,0,0-") + "0,0,0,1,1,1,1,1,1,1,0,0,0-") + "0,0,0,1,1,1,1,1,1,1,0,0,0-") + "0,0,0,1,1,1,1,1,1,1,0,0,0-") + "0,0,0,1,1,1,1,1,1,1,0,0,0-") + "0,0,0,1,1,1,1,1,1,1,0,0,0-") + "1,1,1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1,1,1"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "0,1,1,0,0,0,0,0,1,1,0-") + "0,1,1,0,0,0,0,0,1,1,0-") + "0,1,1,0,0,0,0,0,1,1,0-") + "0,1,1,0,0,0,0,0,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "1,0,0,0,0,0,0,0,0,0,0,0,1-") + "1,0,1,1,1,0,0,0,1,1,1,0,1-") + "1,0,1,1,1,0,0,0,1,1,1,0,1-") + "1,0,1,1,1,0,0,0,1,1,1,0,1-") + "1,0,1,1,1,0,0,0,1,1,1,0,1-") + "1,0,1,1,1,0,0,0,1,1,1,0,1-") + "1,0,1,1,1,0,0,0,1,1,1,0,1-") + "1,1,1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1,1,1"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "1,0,0,0,0,0,0,0,0,0,0,0,1-") + "1,1,0,0,0,0,0,0,0,0,0,1,1-") + "1,1,1,0,0,0,0,0,0,0,1,1,1-") + "1,1,1,1,0,0,0,0,0,1,1,1,1-") + "1,1,1,1,1,0,0,0,1,1,1,1,1-") + "1,1,1,1,1,1,0,1,1,1,1,1,1-") + "1,1,1,1,1,1,0,1,1,1,1,1,1-") + "1,1,1,1,1,1,0,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1,1,1"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,1,0,0,0,0,0,0-") + "0,0,0,0,0,1,1,1,0,0,0,0,0-") + "0,0,0,0,1,1,1,1,1,0,0,0,0-") + "0,0,0,1,1,1,1,1,1,1,0,0,0-") + "0,0,1,1,1,1,1,1,1,1,1,0,0-") + "0,0,1,1,1,1,1,1,1,1,1,0,0-") + "1,0,1,1,1,1,1,1,1,1,1,0,1-") + "1,0,1,1,1,1,1,1,1,1,1,0,1-") + "1,1,1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1,1,1"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "0,1,1,0,0,0,0,0,1,1,0-") + "0,1,1,0,0,0,0,0,1,1,0-") + "0,1,1,0,0,0,0,0,1,1,0-") + "0,1,1,0,1,1,1,0,1,1,0-") + "0,1,1,0,1,1,1,0,1,1,0-") + "0,1,1,0,1,1,1,0,1,1,0-") + "0,1,1,0,1,1,1,0,1,1,0-") + "0,1,1,0,1,1,1,0,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,1,0,0,0,0,1,0,0,0,0,1,0-") + "0,1,0,0,0,1,1,1,0,0,0,1,0-") + "0,1,0,0,1,1,1,1,1,0,0,1,0-") + "0,1,0,1,1,1,1,1,1,1,0,1,0-") + "0,1,0,1,1,1,1,1,1,1,0,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,1,1,1,0,1,1,1,0,0-") + "0,0,1,1,1,0,1,1,1,0,0-") + "0,0,1,1,1,0,1,1,1,0,0-") + "0,0,1,1,1,0,1,1,1,0,0-") + "0,0,1,1,1,0,1,1,1,0,0-") + "0,1,1,1,1,0,1,1,1,1,0-") + "1,1,1,1,1,0,1,1,1,1,1-") + "1,1,1,1,1,0,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "1,1,1,0,0,0,0,0,1,1,1-") + "1,1,1,0,0,0,0,0,1,1,1-") + "1,1,1,0,0,0,0,0,1,1,1-") + "1,1,1,0,0,0,0,0,1,1,1-") + "1,1,1,0,0,0,0,0,1,1,1-") + "1,1,1,0,0,0,0,0,1,1,1-") + "1,1,1,1,0,0,0,1,1,1,1-") + "1,1,1,1,1,0,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,1,0,1,0,0,0,0-") + "0,0,0,1,1,0,1,1,0,0,0-") + "0,0,1,1,1,0,1,1,1,0,0-") + "1,0,1,1,1,0,1,1,1,0,1-") + "1,0,1,1,1,1,1,1,1,0,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "1,0,0,0,1,0,1,0,0,0,1-") + "1,1,0,1,1,0,1,1,0,1,1-") + "1,1,1,1,1,0,1,1,1,1,1-") + "1,1,1,1,1,0,1,1,1,1,1-") + "1,1,1,1,1,0,1,1,1,1,1-") + "1,1,1,1,1,0,1,1,1,1,1-") + "1,1,1,1,1,0,1,1,1,1,1-") + "1,1,1,1,1,0,1,1,1,1,1-") + "1,1,1,1,1,0,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "0,1,0,0,0,1,0,0,0,1,0-") + "1,1,1,0,0,1,0,0,1,1,1-") + "1,1,1,0,0,1,0,0,1,1,1-") + "1,1,1,0,0,1,0,0,1,1,1-") + "1,1,1,0,0,1,0,0,1,1,1-") + "1,1,1,0,0,1,0,0,1,1,1-") + "1,1,1,1,0,1,0,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,1,1,0,0,0,0,0,0,0,0,0,0-") + "0,1,1,1,1,0,0,0,0,0,0,0,0-") + "0,1,1,1,1,1,0,1,0,0,0,0,0-") + "0,1,1,1,1,1,0,1,1,1,0,0,0-") + "0,1,1,1,1,1,0,1,1,1,1,1,0-") + "0,1,1,1,1,1,0,1,1,1,1,1,0-") + "0,1,1,1,1,1,0,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,1,1-") + "0,0,0,0,0,0,1,1,0,1,1-") + "0,0,0,1,1,0,1,1,0,1,1-") + "1,1,0,1,1,0,1,1,0,1,1-") + "1,1,0,1,1,0,1,1,0,1,1-") + "1,1,0,1,1,0,1,1,0,1,1-") + "1,1,0,1,1,0,1,1,0,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,1,0,0,0,0,0,0-") + "0,0,0,0,0,1,1,1,0,0,0,0,0-") + "0,0,1,1,0,1,1,1,0,1,1,0,0-") + "0,1,1,1,0,1,1,1,0,1,1,1,0-") + "0,1,1,1,0,1,1,1,0,1,1,1,0-") + "0,1,1,1,0,1,1,1,0,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "1,1,1,1,0,0,0,1,1,1,1-") + "1,1,1,1,0,0,0,1,1,1,1-") + "1,1,1,1,0,1,0,1,1,1,1-") + "1,1,1,1,0,1,0,1,1,1,1-") + "1,1,1,1,0,1,0,1,1,1,1-") + "1,1,1,1,0,1,0,1,1,1,1-") + "1,1,1,1,0,1,0,1,1,1,1-") + "1,1,1,1,0,1,0,1,1,1,1-") + "1,1,1,1,0,1,0,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0-") + "1,1,1,1,0,1,1,1,1-") + "1,1,1,1,0,1,1,1,1-") + "1,1,1,1,0,1,1,1,1-") + "1,1,1,1,0,1,1,1,1-") + "1,1,1,1,0,1,1,1,1-") + "1,1,1,1,0,1,1,1,1-") + "1,1,1,1,0,1,1,1,1-") + "1,1,1,1,0,1,1,1,1-") + "1,1,1,1,0,1,1,1,1-") + "1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,1,1,0,1,1,0,0,0-") + "0,0,0,1,1,0,1,1,0,0,0-") + "0,0,0,1,1,0,1,1,0,0,0-") + "0,0,0,1,1,0,1,1,0,0,0-") + "0,0,0,1,1,0,1,1,0,0,0-") + "1,0,1,1,1,0,1,1,1,0,1-") + "1,0,1,1,1,0,1,1,1,0,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "0,1,0,1,1,0,1,1,0,1,0-") + "0,1,0,1,1,0,1,1,0,1,0-") + "0,1,1,1,1,0,1,1,1,1,0-") + "0,1,1,1,1,0,1,1,1,1,0-") + "0,1,1,1,1,0,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,0"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0,0,0-") + "0,1,1,1,0,0,0,0,0,1,1,1,0-") + "0,1,1,1,0,0,0,0,0,1,1,1,0-") + "0,1,1,1,0,0,0,0,0,1,1,1,0-") + "0,1,1,1,0,0,0,0,0,1,1,1,0-") + "0,1,1,1,1,0,1,0,1,1,1,1,0-") + "0,1,1,1,1,0,1,0,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0-") + "0,1,1,1,1,1,1,1,1,1,1,1,0"));
l__3.push((((((((((((((("0,0,0,0,0,0,0,0,0,0,0-" + "0,0,0,0,0,0,0,0,0,0,0-") + "0,0,0,0,0,0,0,0,0,0,0-") + "0,1,1,0,0,0,0,0,1,1,0-") + "0,1,1,0,0,0,0,0,1,1,0-") + "1,1,1,0,0,0,0,0,1,1,1-") + "1,1,1,1,1,0,1,1,1,1,1-") + "1,1,1,1,1,0,1,1,1,1,1-") + "1,1,1,1,1,0,1,1,1,1,1-") + "1,1,1,1,1,0,1,1,1,1,1-") + "1,1,1,1,1,0,1,1,1,1,1-") + "1,1,1,1,1,0,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1-") + "1,1,1,1,1,1,1,1,1,1,1"));
var l__4:Array = l__3[getLevelRandom(l__3.length)].split("-");
var l__5:* = 0;
while (l__5 < l__4.length) {
l__1 = l__4[l__5].split(",");
l__2.push(l__1);
l__5 = (l__5 + 1);
};
return (l__2);
}
public function endRound(p__1, p__2, p__3, p__4){
musicManager.get("loop").stop();
if (p__1){
musicManager.get("levelCompleted").play();
betweenRounds(p__2);
} else {
musicManager.get("outro").play();
endGame(p__2, p__3, p__4);
};
}
public function betweenRounds(p__1){
signAnimAt = 1;
mcBetweenRounds.visible = true;
ticksLeft = (5 * TICKS_PER_SEC);
mcBetweenRounds.mcInfoText.txtScore.text = p__1;
gameState = STATE_BETWEEN_ROUNDS;
}
public function endGame(p__1, p__2, p__3){
var l__4:* = 1;
var l__5:* = 1;
if (sfxOn){
l__4 = 0;
};
if (musicOn){
l__5 = 0;
};
communicator.soundStates(l__5, l__4);
if (!egp){
communicator.lastTick((currentTick + 1), noOfRandom, noOfLevelRandom);
};
communicator.gameEnd(p__1);
signAnimAt = 1;
ticksLeft = 275;
mcGameOver.visible = true;
mcGameOver.mcScoreText.txtScore.text = p__1;
var l__6:Number = (Number(totalLR) + Number((level - 1)));
var l__7:Number = (Number(totalBB) + Number(p__2));
var l__8:Number = (Number(totalES) + Number(p__3));
mcGameOver.mcScoreText.txtLevels.text = (((((level - 1) + "/ ") + parsedGameData.textMappings["txtTotal"]) + " ") + l__6);
mcGameOver.mcScoreText.txtBlackBalls.text = ((((p__2 + "/ ") + parsedGameData.textMappings["txtTotal"]) + " ") + l__7);
mcGameOver.mcScoreText.txtEmptySpaces.text = ((((p__3 + "/ ") + parsedGameData.textMappings["txtTotal"]) + " ") + l__8);
mcGameOver.x = 378;
mcGameOver.y = 283;
addChild(mcGameOver);
tArr = new Array(0, 0, 0);
if (((level - 1) + Number(totalLR)) > 499){
tArr[0] = 1;
mcGameOver.mcTrophies.mcTrophy1.gotoAndPlay(2);
if (Number(totalLR) < 500){
mcGameOver.mcTrophies.txtTrophyRecieved.text = parsedGameData.textMappings["txtTrophyRecieved"];
addGlow(mcGameOver.mcScoreText.txtLevels);
addGlow(mcGameOver.mcTrophies.txtTrophyRecieved);
};
};
if ((p__2 + Number(totalBB)) > 499){
tArr[1] = 1;
mcGameOver.mcTrophies.mcTrophy2.gotoAndPlay(2);
if (Number(totalBB) < 500){
mcGameOver.mcTrophies.txtTrophyRecieved.text = parsedGameData.textMappings["txtTrophyRecieved"];
addGlow(mcGameOver.mcScoreText.txtBlackBalls);
addGlow(mcGameOver.mcTrophies.txtTrophyRecieved);
};
};
if ((p__3 + Number(totalES)) > 999){
tArr[2] = 1;
mcGameOver.mcTrophies.mcTrophy3.gotoAndPlay(2);
if (Number(totalES) < 1000){
mcGameOver.mcTrophies.txtTrophyRecieved.text = parsedGameData.textMappings["txtTrophyRecieved"];
addGlow(mcGameOver.mcScoreText.txtEmptySpaces);
addGlow(mcGameOver.mcTrophies.txtTrophyRecieved);
};
};
if (userType == 0){
mcGameOver.mcTrophies.txtTrophyRecieved.text = parsedGameData.textMappings["txtRegister"];
};
gameState = STATE_END_GAME;
}
public function addGlow(p__1){
var l__2:GlowFilter = new GlowFilter();
l__2.color = 16777164;
l__2.blurY = 8;
l__2.blurX = 8;
l__2.strength = 3;
l__2.quality = 2;
p__1.filters = [l__2];
}
public function gameQuit(){
trace(("DrunkenScore:" + mcGameOver.mcScoreText.txtScore.text));
communicator.gameQuit();
}
public function sfxButtonClicked(p__1:Event){
if (sfxOn){
sfxManager.fadeTo(0, 500);
mcSFX.gotoAndStop(10);
sfxOn = false;
mcGame.sfxOn = false;
} else {
sfxManager.fadeTo(1, 500);
mcSFX.gotoAndStop(1);
sfxOn = true;
mcGame.sfxOn = true;
};
}
public function musicButtonClicked(p__1:Event){
if (musicOn){
musicManager.fadeTo(0, 500);
mcMusic.gotoAndStop(10);
musicOn = false;
mcGame.musicOn = false;
} else {
musicManager.fadeTo(1, 500);
mcMusic.gotoAndStop(1);
musicOn = true;
mcGame.musicOn = true;
};
}
public function endGamePressed(p__1:Event){
egp = true;
communicator.endPressed((currentTick + 1), noOfRandom, noOfLevelRandom);
mcGame.endRound(false, 0);
}
public function getRandom(p__1:Number){
noOfRandom++;
return (random.nextInt(p__1));
}
public function getLevelRandom(p__1:Number){
noOfLevelRandom++;
return (levelRandom.nextInt(p__1));
}
}
}//package src
Section 77
//BubbleAnim (src.BubbleAnim)
package src {
import src.timing.*;
import src.math.*;
import src.comm.*;
import flash.display.*;
import flash.text.*;
import flash.system.*;
public class BubbleAnim extends MovieClip {
public var mcBubble:MovieClip;
public var animAt;// = 1
public var animLength;// = 21
public function BubbleAnim(){
super();
x = Math.round((Math.random() * 750));
y = 560;
alpha = 0.8;
var _local1:* = Math.random();
mcBubble.mcInnerBubble.scaleX = Math.max(_local1, 0.4);
mcBubble.mcInnerBubble.scaleY = Math.max(_local1, 0.4);
}
}
}//package src
Section 78
//ClearLevel (src.ClearLevel)
package src {
import flash.display.*;
public dynamic class ClearLevel extends MovieClip {
}
}//package src
Section 79
//DustAnim (src.DustAnim)
package src {
import flash.display.*;
public class DustAnim extends MovieClip {
public var animAt;// = 1
public var animLength;// = 13
public function DustAnim(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package src
Section 80
//Explosion (src.Explosion)
package src {
import flash.display.*;
public class Explosion extends MovieClip {
public var delay;
public var animAt;// = 1
public var mcLineBlastExplosion:MovieClip;
public var mcYellow:MovieClip;
public var mcGreen:MovieClip;
public var mcRegularExplosion:MovieClip;
public var mcBlue:MovieClip;
public var target;
public var animLength;// = 11
public var scaleVal;// = 1
public var mcRed:MovieClip;
public function Explosion(_arg1, _arg2, _arg3, _arg4){
super();
x = _arg1;
y = _arg2;
this.delay = _arg3;
mcRegularExplosion.visible = false;
mcLineBlastExplosion.visible = false;
mcBlue.visible = false;
mcYellow.visible = false;
mcGreen.visible = false;
mcRed.visible = false;
switch (_arg4){
case 0:
animLength = 16;
mcBlue.visible = true;
target = mcBlue;
break;
case 1:
animLength = 16;
mcYellow.visible = true;
target = mcYellow;
break;
case 2:
animLength = 16;
mcGreen.visible = true;
target = mcGreen;
break;
case 3:
animLength = 16;
mcRed.visible = true;
target = mcRed;
break;
case 10:
animLength = 11;
mcRegularExplosion.visible = true;
target = mcRegularExplosion;
break;
case 20:
animLength = 13;
mcLineBlastExplosion.visible = true;
target = mcLineBlastExplosion;
break;
};
}
}
}//package src
Section 81
//Game (src.Game)
package src {
import src.sound.*;
import src.timing.*;
import flash.events.*;
import src.math.*;
import src.comm.*;
import flash.display.*;
import flash.text.*;
import flash.filters.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
public class Game extends MovieClip {
private var sliderFloat;
private var makeLineBlast_;// = false
private var bonusScore_;
public var mcTimeDiv:MovieClip;
private var nextPieceFloatScaleX;
private var nextPieceFloatScaleY;
private var nextPieceFloatX;
private var numBlack;// = 0
private var switchPiece;// = null
private var nextPieceFloatY;
private var waterBaseBitmapData:BitmapData;
private var collapsing;
private var scoreNumArr;
private var cleared_;
private var shotSound;// = false
private var switchPieceFloatX;
private var clearLevel;
private var bonusShown;
private var pieceStack;
public var sfxOn;// = true
private var switchPieceFloatY;
private var startTime;
private var switchPieceFloatScaleY;
public var relaxMode:Boolean;// = false
private var communicator;
private var dustArr;
private var switchPieceFloatScaleX;
private var doBubbles;// = true
private var food:int;// = 0
private var sliderMod;// = 1
private var bubbleAnimArr;
private var endDelay:int;// = 0
private var stone2;
private var scoreArr;
private var stone1;
public var timeLeft;// = 6000
private var sfxManager:SoundManager;
private var pieceXMod;// = 0
private var splashArr;
private var gameGridObj:Array;
private var level;
private var boardMatchNum;
public var mcTimeNum2:MovieClip;
public var mcTimeNum3:MovieClip;
public var mcTimeNum4:MovieClip;
private var visualExplArr:Array;
private var score;// = 0
private var distortBitmap:BitmapData;
private var levelNumArr;
private var floatYArr:Array;
private var waveArr;
private var rotSpeed;// = 0
private var consecutive;
private var currentTick;
private var nextPiece;// = null
private var gameState;
private var random;
private var rotFloat;
private var allLanded;// = 0
private var waveSpeed;// = 1
private var musicManager:SoundManager;
private var waterBaseBitmap:Bitmap;
private var explodeCounter;// = 0
private var noOfTypes;
private var distortFilter:BitmapFilter;
private var numEmptyRows;// = 0
private var theme;
private var explArr;
public var musicOn;// = true
private var gameRoot;
private var slider;
private static const FOOD_INCREASE:int = 5;
private static const FOOD_START:int = int((FOOD_LIMIT / 2));
private static const FOOD_LIMIT:int = 35;
private static var LEVEL_CLEARANCE = 10;
private static var STATE_NOT_RUNNING = 1;
private static var STATE_END_ANIMS = 2;
private static var STATE_RUNNING = 0;
public function Game(){
levelNumArr = new Array();
scoreNumArr = new Array();
super();
this.addEventListener(MouseEvent.MOUSE_DOWN, shootBall);
stage.addEventListener(KeyboardEvent.KEY_DOWN, switchBalls);
distortBitmap = new BitmapData(755, 200);
distortFilter = new DisplacementMapFilter(distortBitmap, new Point(0, 0), BitmapDataChannel.RED, BitmapDataChannel.GREEN, 4, 4, "wrap");
}
public function setScoreNum(){
var _local1:*;
var _local4:*;
_local1 = 0;
while (_local1 < scoreNumArr.length) {
removeChild(scoreNumArr[_local1]);
_local1++;
};
scoreNumArr = new Array();
var _local2:* = score.toString();
var _local3:* = _local2.split("");
_local1 = 0;
while (_local1 < _local3.length) {
_local4 = new ScoreNumbers();
_local4.y = (70 + _local1);
_local4.x = (5 + ((_local4.width - 7) * _local1));
addChild(_local4);
_local4.gotoAndStop((Number(_local3[_local1]) + 1));
scoreNumArr.push(_local4);
_local1++;
};
}
public function makeLineBlast(){
if (((!(nextPiece.isBomb)) && (!(nextPiece.isLineBlast)))){
if (slider.animAt != 1){
makeLineBlast_ = true;
} else {
nextPiece.makeLineBlast();
};
} else {
if (((!(switchPiece.isBomb)) && (!(switchPiece.isLineBlast)))){
switchPiece.makeLineBlast();
};
};
}
public function setClockNum(_arg1){
var _local2:* = _arg1.split("");
mcTimeNum2.gotoAndStop((Number(_local2[1]) + 1));
mcTimeNum3.gotoAndStop((Number(_local2[3]) + 1));
mcTimeNum4.gotoAndStop((Number(_local2[4]) + 1));
}
public function clearBoard(){
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < gameGridObj.length) {
_local2 = 0;
while (_local2 < gameGridObj[_local1].length) {
if (gameGridObj[_local1][_local2] != null){
removeChild(gameGridObj[_local1][_local2]);
};
_local2++;
};
_local1++;
};
_local1 = 0;
while (_local1 < scoreArr.length) {
removeChild(scoreArr[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < visualExplArr.length) {
removeChild(visualExplArr[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < splashArr.length) {
removeChild(splashArr[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < bubbleAnimArr.length) {
removeChild(bubbleAnimArr[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < dustArr.length) {
removeChild(dustArr[_local1]);
_local1++;
};
removeChild(stone1);
removeChild(stone2);
stone1 = null;
stone2 = null;
if (contains(nextPiece)){
removeChild(nextPiece);
};
removeChild(slider);
removeChild(switchPiece);
nextPiece = null;
switchPiece = null;
if (gameRoot.waterEffect){
updateWater((currentTick + 1));
};
}
public function getLevelRandom(_arg1:Number){
return (gameRoot.getLevelRandom(_arg1));
}
public function calcScore(_arg1){
var _local2:* = (1 + (consecutive * 0.5));
var _local3:* = (Math.min((100 + ((_arg1.length - 4) * 50)), 250) * _arg1.length);
_local3 = (_local3 * _local2);
_local3 = Math.round(((1 + ((level - 1) / 10)) * _local3));
createScorePop(_local3, _arg1[0].theY, _arg1[0].x, 0, 0, false);
score = (score + _local3);
setScoreNum();
communicator.sendScore(currentTick, score, _local3, _arg1.length);
}
public function collapseBoard(){
var _local3:*;
var _local4:*;
var _local1:* = 0;
var _local2:* = (gameGridObj.length - 1);
while (_local2 >= 0) {
_local3 = 0;
while (_local3 < gameGridObj[_local2].length) {
if (gameGridObj[_local2][_local3] == null){
_local4 = (_local2 - 1);
while (_local4 >= 0) {
if (gameGridObj[_local4][_local3] != null){
gameGridObj[_local2][_local3] = gameGridObj[_local4][_local3];
gameGridObj[_local2][_local3].updatePos(_local2, _local3);
gameGridObj[_local4][_local3] = null;
floatYArr[_local2][_local3] = floatYArr[_local4][_local3];
floatYArr[_local4][_local3] = null;
gameGridObj[_local2][_local3].delay = 0;
if (!gameGridObj[_local2][_local3].collapsing){
collapsing++;
};
gameGridObj[_local2][_local3].collapsing = true;
_local4 = -1;
};
_local4--;
};
};
_local3++;
};
_local2--;
};
}
public function reloadAnim(_arg1:Number, _arg2){
switchPiece.rotation = (switchPiece.rotation - 25);
if (_arg2 > 0){
switch (_arg1){
case 1:
switchPiece.theY = (switchPiece.theY + -5);
switchPiece.theX = (switchPiece.theX + -1);
break;
case 2:
switchPiece.theY = (switchPiece.theY + -5);
switchPiece.theX = (switchPiece.theX + -1);
break;
case 3:
switchPiece.theY = (switchPiece.theY + -4);
switchPiece.theX = (switchPiece.theX + -1);
break;
case 4:
switchPiece.theY = (switchPiece.theY + -4);
switchPiece.theX = (switchPiece.theX + -1);
break;
case 5:
switchPiece.theY = (switchPiece.theY + -4);
switchPiece.theX = (switchPiece.theX + -1);
break;
case 6:
switchPiece.theY = (switchPiece.theY + -4);
switchPiece.theX = (switchPiece.theX + -5);
break;
case 7:
switchPiece.theY = (switchPiece.theY + -4);
switchPiece.theX = (switchPiece.theX + -7);
break;
};
} else {
switch (_arg1){
case 8:
switchPiece.theY = (switchPiece.theY + 0);
switchPiece.theX = (switchPiece.theX + -9);
break;
case 7:
switchPiece.theY = (switchPiece.theY + 0);
switchPiece.theX = (switchPiece.theX + -10);
break;
case 6:
switchPiece.theY = (switchPiece.theY + 2);
switchPiece.theX = (switchPiece.theX + -9);
break;
case 5:
switchPiece.theY = (switchPiece.theY + 4);
switchPiece.theX = (switchPiece.theX + -9);
break;
case 4:
switchPiece.theY = (switchPiece.theY + 10);
switchPiece.theX = (switchPiece.theX + -8);
break;
case 3:
switchPiece.theY = (switchPiece.theY + 16);
switchPiece.theX = (switchPiece.theX + -8);
break;
case 2:
switchPiece.theY = 10;
switchPiece.theX = -20;
switchPieceFloatX.set(switchPiece.theX);
switchPieceFloatY.set(switchPiece.theY);
break;
};
};
switchPieceFloatX.set(switchPiece.theX);
switchPieceFloatY.set(switchPiece.theY);
}
public function startRound(_arg1, _arg2, _arg3, _arg4, _arg5){
var _local6:*;
var _local7:*;
communicator = _arg5;
this.level = _arg1;
gameRoot = _arg2;
currentTick = _arg3;
bonusShown = false;
endDelay = (25 * 2);
communicator.startRound((currentTick + 1));
theme = 0;
if (_arg1 > 1){
if ((startTime - timeLeft) < (25 * 25)){
theme = Math.round((Math.random() + 1));
};
};
startTime = timeLeft;
gameRoot.mcFG.gotoAndStop((theme + 1));
gameRoot.mcTopFG.gotoAndStop((theme + 1));
gameGridObj = new Array();
pieceStack = new Array();
floatYArr = new Array();
scoreArr = new Array();
waveArr = new Array();
splashArr = new Array();
visualExplArr = new Array();
bubbleAnimArr = new Array();
dustArr = new Array();
makeLineBlast_ = false;
noOfTypes = 4;
collapsing = 0;
slider = new Slider();
addChild(slider);
sliderFloat = new IFloat(slider.theX);
rotFloat = new IFloat(0);
createPieceRolling();
consecutive = 0;
cleared_ = false;
bonusScore_ = 0;
if (_arg1 == 1){
if (waterBaseBitmap != null){
gameRoot.mcWater.removeChild(waterBaseBitmap);
};
waterBaseBitmapData = new BitmapData(755, (32 * (14 - LEVEL_CLEARANCE)), true, 0);
waterBaseBitmap = new Bitmap(waterBaseBitmapData);
waterBaseBitmap.y = (117 + (32 * LEVEL_CLEARANCE));
gameRoot.mcWater.addChild(waterBaseBitmap);
clearLevel = new ClearLevel();
clearLevel.y = (115 + (32 * LEVEL_CLEARANCE));
clearLevel.x = 0;
clearLevel.alpha = 0.2;
gameRoot.mcWater.mouseEnabled = false;
clearLevel.mouseEnabled = false;
_local6 = 0;
while (_local6 < 23) {
_local7 = new WaterLevelPiece();
waveArr.push(_local7);
_local7.y = (115 + (32 * LEVEL_CLEARANCE));
_local7.x = (_local6 * 34);
_local7.alpha = 0.5;
gameRoot.mcWater.addChild(_local7);
_local7.gotoAndStop(3);
_local7.mouseEnabled = false;
_local6++;
};
gameRoot.mcWater.addChild(clearLevel);
musicManager = gameRoot.musicManager;
sfxManager = gameRoot.sfxManager;
gameRoot.mcRelaxModeMeter.visible = relaxMode;
food = FOOD_START;
if (relaxMode){
mcTimeNum2.visible = false;
mcTimeNum3.visible = false;
mcTimeNum4.visible = false;
mcTimeDiv.visible = false;
};
};
pieceXMod = (250 - ((_arg4[0].length - 10) * 16));
createBoard(_arg4);
if (stone1 == null){
stone1 = new Stone1();
stone2 = new Stone2();
addChild(stone1);
addChild(stone2);
};
stone1.x = (pieceXMod - 32);
stone1.y = 548;
stone2.x = ((((gameGridObj[0].length - 1) * 32) + pieceXMod) + 32);
stone2.y = 548;
setLevelNum();
setScoreNum();
if (timeLeft < 250){
sfxManager.get("warning").stop();
sfxManager.get("warning").play(0.7);
};
gameState = STATE_RUNNING;
}
public function createPiece(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){
if (_arg3 == undefined){
trace("its undefed");
_arg3 = getLevelRandom(noOfTypes);
};
var _local8:* = new Piece(_arg3, _arg1, _arg2, _arg4, _arg5, _arg6, _arg7, pieceXMod, theme);
return (_local8);
}
public function createBoard(_arg1:Array){
var _local2:*;
var _local4:Array;
var _local7:*;
var _local8:Array;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:Array;
var _local15:*;
var _local3:* = false;
while (!(_local3)) {
_local2 = 0;
_local4 = new Array();
_local7 = 0;
while (_local7 < _arg1.length) {
_local8 = new Array();
_local9 = 0;
while (_local9 < _arg1[_local7].length) {
if (_arg1[_local7][_local9] == 1){
if ((((level > 2)) && ((getLevelRandom(100) < level)))){
_local10 = 9;
} else {
_local10 = getLevelRandom(noOfTypes);
};
_local8.push(_local10);
_local2++;
} else {
_local8.push(null);
};
_local9++;
};
_local4.push(_local8);
_local7++;
};
_local3 = true;
};
var _local5:* = (getLevelRandom(3) + 1);
var _local6:* = new Array();
_local7 = 0;
while (_local7 < _local5) {
_local11 = false;
_local12 = getLevelRandom(_local4[0].length);
_local9 = 0;
while (_local9 < _local6.length) {
if (_local6[_local9] == _local12){
_local11 = true;
};
_local9++;
};
if (!_local11){
_local13 = 0;
while (_local13 < _local4.length) {
if (_local4[_local13][_local12] != null){
if (_local13 > LEVEL_CLEARANCE){
_local7--;
_local13 = (_local4.length + 1);
} else {
_local6.push(_local12);
_local4[_local13][_local12] = 10;
_local13 = (_local4.length + 1);
};
};
_local13++;
};
} else {
_local7--;
};
_local7++;
};
_local7 = 0;
while (_local7 < _local4.length) {
_local8 = new Array();
_local14 = new Array();
_local9 = 0;
while (_local9 < _local4[_local7].length) {
if (_local4[_local7][_local9] != null){
allLanded++;
_local15 = createPiece(_local7, _local9, _local4[_local7][_local9], false, false, false, 0);
_local15.delay = _local2;
addChild(_local15);
_local14.push(new IFloat(_local15.theY));
_local2--;
collapsing++;
_local8.push(_local15);
} else {
_local8.push(null);
_local14.push(null);
};
_local9++;
};
floatYArr.push(_local14);
gameGridObj.push(_local8);
_local7++;
};
}
public function endAnims(_arg1:Boolean){
cleared_ = _arg1;
gameState = STATE_END_ANIMS;
}
public function createExplosion(_arg1, _arg2){
var _local3:* = new Explosion(_arg1.x, _arg1.theY, 0, _arg2);
visualExplArr.push(_local3);
addChild(_local3);
}
public function testPiece(_arg1:Piece){
var _local2:*;
if (_arg1.type < 9){
explArr.push(_arg1);
_arg1.cfe = true;
if (_arg1.yPos > 0){
_local2 = gameGridObj[(_arg1.yPos - 1)][_arg1.xPos];
if (((((!((_local2 == null))) && (!(_local2.cfe)))) && ((_local2.type == _arg1.type)))){
testPiece(_local2);
};
};
if (_arg1.yPos < (gameGridObj.length - 1)){
_local2 = gameGridObj[(_arg1.yPos + 1)][_arg1.xPos];
if (((((!((_local2 == null))) && (!(_local2.cfe)))) && ((_local2.type == _arg1.type)))){
testPiece(_local2);
};
};
if (_arg1.xPos > 0){
_local2 = gameGridObj[_arg1.yPos][(_arg1.xPos - 1)];
if (((((!((_local2 == null))) && (!(_local2.cfe)))) && ((_local2.type == _arg1.type)))){
testPiece(_local2);
};
};
if (_arg1.xPos < (gameGridObj[_arg1.yPos].length - 1)){
_local2 = gameGridObj[_arg1.yPos][(_arg1.xPos + 1)];
if (((((!((_local2 == null))) && (!(_local2.cfe)))) && ((_local2.type == _arg1.type)))){
testPiece(_local2);
};
};
};
}
public function switchBalls(_arg1:KeyboardEvent){
if ((((((collapsing == 0)) && ((slider.switchAnimAt == 1)))) && ((slider.animAt == 1)))){
if (_arg1.keyCode == 32){
communicator.switchBalls((currentTick + 1));
sfxManager.get("switchDR").play(1);
if (slider.switchAnimAt == 1){
slider.switchAnimAt = 2;
slider.animAt = 14;
};
};
};
}
public function createScorePop(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){
var _local7:* = new ScorePop(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
addChild(_local7);
scoreArr.push(_local7);
}
public function createSplash(_arg1){
var _local2:* = new Splash();
splashArr.push(_local2);
_local2.animAt = 1;
_local2.y = ((115 + (32 * LEVEL_CLEARANCE)) - 117);
_local2.x = (_arg1 - 80);
addChild(_local2);
}
public function explodeBoard(_arg1, _arg2){
if (_arg1.length > 5){
makeLineBlast();
};
var _local3:* = 999;
var _local4:* = false;
var _local5:* = 0;
while (_local5 < _arg1.length) {
if (_arg1[_local5].collapsing){
collapsing--;
};
if (_arg1[_local5].isBomb){
_local3 = _arg1[_local5].type;
score = (score + 200);
createScorePop(200, _arg1[_local5].theY, _arg1[_local5].x, 0, 0, false);
};
if (_arg1[_local5].isLineBlast){
lineBlast(_arg1[_local5].yPos, _arg1[_local5].xPos, _arg1);
};
createExplosion(_arg1[_local5], _arg2);
gameGridObj[_arg1[_local5].yPos][_arg1[_local5].xPos] = null;
floatYArr[_arg1[_local5].yPos][_arg1[_local5].xPos] = null;
removeChild(_arg1[_local5]);
_local5++;
};
if (_local3 != 999){
colorBomb(_local3);
};
}
public function endRound(_arg1:Boolean, _arg2:Number){
gameRoot.mcQuit.visible = true;
sfxManager.get("warning").stop();
score = (score + _arg2);
setScoreNum();
if (gameRoot.gameState == 2){
clearBoard();
};
gameState = STATE_NOT_RUNNING;
gameRoot.endRound(_arg1, score, numBlack, numEmptyRows);
}
public function testBoard(_arg1:Array){
var _local3:*;
var _local2:* = 0;
while (_local2 < _arg1.length) {
_local3 = 0;
while (_local3 < _arg1[_local2].length) {
if (_arg1[_local2][_local3] != null){
boardMatchNum = 0;
testBoardPlace(_arg1, _arg1[_local2][_local3], _local2, _local3, 9999);
if (boardMatchNum > 2){
return (false);
};
};
_local3++;
};
_local2++;
};
return (true);
}
public function createPieceRolling(){
var _local1:* = 999;
var _local2:* = false;
var _local3:* = false;
if (nextPiece != null){
_local1 = switchPiece.type;
_local2 = switchPiece.isBomb;
_local3 = switchPiece.isLineBlast;
removeChild(switchPiece);
};
if (_local1 == 999){
_local1 = getRandom(noOfTypes);
};
if (makeLineBlast_){
makeLineBlast_ = false;
if (!_local2){
_local3 = true;
};
};
var _local4:* = new PieceRolling(slider.theY, slider.theX, _local1, false, theme);
if (_local2){
_local4.makeBomb();
};
if (_local3){
_local4.makeLineBlast();
};
addChild(_local4);
nextPiece = _local4;
var _local5:* = new PieceRolling(slider.theY, slider.theX, getRandom(noOfTypes), true, theme);
addChild(_local5);
switchPiece = _local5;
nextPieceFloatX = new IFloat(nextPiece.theX);
nextPieceFloatY = new IFloat(nextPiece.theY);
nextPieceFloatScaleX = new IFloat(1);
nextPieceFloatScaleY = new IFloat(1);
switchPieceFloatX = new IFloat(switchPiece.theX);
switchPieceFloatY = new IFloat(switchPiece.theY);
switchPieceFloatScaleX = new IFloat(1);
switchPieceFloatScaleY = new IFloat(1);
}
public function bonusScorePops(){
var _local4:*;
var _local5:*;
var _local6:*;
var _temp1:*;
var _local1:* = 0;
var _local2:* = 0;
var _local3:* = (LEVEL_CLEARANCE + 1);
while (_local3 < gameGridObj.length) {
_local4 = true;
_local5 = 0;
while (_local5 < gameGridObj[_local3].length) {
if (gameGridObj[_local3][_local5] == null){
_local6 = (50 * (_local3 - LEVEL_CLEARANCE));
_local1 = (_local1 + _local6);
_temp1 = _local2;
_local2 = (_local2 + 1);
createScorePop(_local6, ((_local3 * 32) + 100), ((_local5 * 32) + pieceXMod), 0, _temp1, true);
} else {
_local4 = false;
};
_local5++;
};
if (_local4){
trace("numEmptyRows++");
numEmptyRows++;
};
_local3++;
};
bonusScore_ = _local1;
}
public function tick(_arg1:Number, _arg2:Number):void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
currentTick = _arg1;
switch (gameState){
case STATE_RUNNING:
if (doBubbles){
if ((Math.random() * 100) < 5){
createBubbleAnim();
};
};
explodeCounter = Math.max((explodeCounter - 1), 0);
waveSpeed = ((waveSpeed % 28) + 1);
if (!relaxMode){
if (allLanded == 0){
timeLeft--;
if ((((gameRoot.userType == 0)) && ((level == 2)))){
openUserEnd();
break;
};
};
if (timeLeft == 0){
if (collapsing > 0){
timeLeft++;
} else {
endRound(false, 0);
break;
};
};
if (timeLeft == 250){
sfxManager.get("warning").play(0.7);
};
};
_local3 = ((mouseX - slider.theX) / 2);
slider.theX = (slider.theX + _local3);
slider.theX = Math.min((((gameGridObj[0].length - 1) * 32) + pieceXMod), slider.theX);
slider.theX = Math.max(pieceXMod, slider.theX);
_local4 = Math.max((((375 - slider.theX) / 100) * 2), ((((375 - slider.theX) / 100) * 2) * -1));
slider.theY = (37 - _local4);
sliderFloat.set(slider.theX);
rotSpeed = (rotSpeed - (_local3 / 2));
rotSpeed = Math.min(rotSpeed, 15);
rotSpeed = Math.max(rotSpeed, -15);
if (rotSpeed > 0){
rotSpeed = Math.max((rotSpeed - 0.5), 0);
} else {
rotSpeed = Math.min((rotSpeed + 0.5), 0);
};
rotFloat.set(rotSpeed);
if (slider.animAt > 1){
reloadAnim(slider.animAt, sliderMod);
slider.animAt = (slider.animAt + sliderMod);
if (slider.animAt == 8){
sliderMod = -1;
} else {
if (slider.animAt == 1){
sliderMod = 1;
createPieceRolling();
};
};
};
if (slider.switchAnimAt > 1){
switchBallsAnim(slider.switchAnimAt);
slider.switchAnimAt = (slider.switchAnimAt + 1);
};
if (nextPiece.isBomb){
nextPiece.bombAnim = ((nextPiece.bombAnim % nextPiece.bombAnimLength) + 1);
};
if (nextPiece.isLineBlast){
nextPiece.lineBlastAnim = ((nextPiece.lineBlastAnim % nextPiece.lineBlastAnimLength) + 1);
};
if (switchPiece.isBomb){
switchPiece.bombAnim = ((switchPiece.bombAnim % switchPiece.bombAnimLength) + 1);
};
if (switchPiece.isLineBlast){
switchPiece.lineBlastAnim = ((switchPiece.lineBlastAnim % switchPiece.lineBlastAnimLength) + 1);
};
_local5 = 0;
while (_local5 < gameGridObj.length) {
_local6 = 0;
while (_local6 < gameGridObj[_local5].length) {
if (gameGridObj[_local5][_local6] != null){
if (gameGridObj[_local5][_local6].isCoin){
gameGridObj[_local5][_local6].animAt = ((gameGridObj[_local5][_local6].animAt % 20) + 1);
};
if (gameGridObj[_local5][_local6].isBomb){
gameGridObj[_local5][_local6].bombAnim = ((gameGridObj[_local5][_local6].bombAnim % gameGridObj[_local5][_local6].bombAnimLength) + 1);
};
if (gameGridObj[_local5][_local6].isLineBlast){
gameGridObj[_local5][_local6].lineBlastAnim = ((gameGridObj[_local5][_local6].lineBlastAnim % gameGridObj[_local5][_local6].lineBlastAnimLength) + 1);
};
if (explodeCounter == 0){
if (gameGridObj[_local5][_local6].theY != gameGridObj[_local5][_local6].gotoY){
if (gameGridObj[_local5][_local6].delay == 0){
if ((((((gameGridObj[_local5][_local6].theY < ((LEVEL_CLEARANCE * 32) + 100))) && ((Math.min((gameGridObj[_local5][_local6].theY + gameGridObj[_local5][_local6].getSpeed()), gameGridObj[_local5][_local6].gotoY) > ((LEVEL_CLEARANCE * 32) + 100))))) && ((allLanded == 0)))){
sfxManager.get("splash").play(0.7);
};
gameGridObj[_local5][_local6].updateSpeed();
gameGridObj[_local5][_local6].theY = Math.min((gameGridObj[_local5][_local6].theY + gameGridObj[_local5][_local6].getSpeed()), gameGridObj[_local5][_local6].gotoY);
floatYArr[_local5][_local6].set(gameGridObj[_local5][_local6].theY);
gameGridObj[_local5][_local6].animAt = ((gameGridObj[_local5][_local6].animAt + gameGridObj[_local5][_local6].animSpeed) % gameGridObj[_local5][_local6].animLength);
if (gameGridObj[_local5][_local6].theY == gameGridObj[_local5][_local6].gotoY){
floatYArr[_local5][_local6].set(gameGridObj[_local5][_local6].theY);
if (((!(gameGridObj[_local5][_local6].firstLand)) && ((allLanded == 0)))){
createDust(gameGridObj[_local5][_local6]);
};
gameGridObj[_local5][_local6].land();
allLanded = Math.max((allLanded - 1), 0);
if (gameGridObj[_local5][_local6].targetID > 0){
gameGridObj[_local5][_local6].rotDeg = (Math.round(((gameGridObj[_local5][_local6].rotation / 360) * 4)) * 90);
gameGridObj[_local5][_local6].animAt = ((Number(((Math.round((((gameGridObj[_local5][_local6].animAt % 20) / 20) * 4)) * 5) + 1)) % 20) * 3);
};
if (gameGridObj[_local5][_local6].running){
checkForExplosion(gameGridObj[_local5][_local6]);
} else {
gameGridObj[_local5][_local6].running = true;
};
collapsing--;
if (shotSound){
sfxManager.get("knock").play(0.1);
shotSound = false;
};
if (collapsing == 0){
if (collapsing == 0){
consecutive = 0;
checkForCoin();
checkForCleared();
};
};
};
} else {
gameGridObj[_local5][_local6].delay--;
};
};
};
};
_local6++;
};
_local5++;
};
_local5 = 0;
while (_local5 < scoreArr.length) {
if (scoreArr[_local5].delay == 0){
scoreArr[_local5].animAt++;
if (scoreArr[_local5].animAt == scoreArr[_local5].animLength){
removeChild(scoreArr[_local5]);
scoreArr.splice(_local5, 1);
_local5--;
};
} else {
scoreArr[_local5].delay--;
};
_local5++;
};
_local5 = 0;
while (_local5 < splashArr.length) {
splashArr[_local5].animAt++;
if (splashArr[_local5].animAt == 18){
removeChild(splashArr[_local5]);
splashArr.splice(_local5, 1);
_local5--;
};
_local5++;
};
_local5 = 0;
while (_local5 < dustArr.length) {
dustArr[_local5].animAt++;
if (dustArr[_local5].animAt == dustArr[_local5].animLength){
removeChild(dustArr[_local5]);
dustArr.splice(_local5, 1);
_local5--;
};
_local5++;
};
_local5 = 0;
while (_local5 < visualExplArr.length) {
if (visualExplArr[_local5].delay > 0){
visualExplArr[_local5].delay--;
} else {
visualExplArr[_local5].animAt++;
if (visualExplArr[_local5].animAt >= visualExplArr[_local5].animLength){
removeChild(visualExplArr[_local5]);
visualExplArr.splice(_local5, 1);
_local5--;
};
};
_local5++;
};
_local5 = 0;
while (_local5 < bubbleAnimArr.length) {
bubbleAnimArr[_local5].animAt++;
if (bubbleAnimArr[_local5].animAt == bubbleAnimArr[_local5].animLength){
removeChild(bubbleAnimArr[_local5]);
bubbleAnimArr.splice(_local5, 1);
_local5--;
};
_local5++;
};
break;
case STATE_END_ANIMS:
_local7 = true;
_local5 = 0;
while (_local5 < gameGridObj.length) {
_local6 = 0;
while (_local6 < gameGridObj[_local5].length) {
if (gameGridObj[_local5][_local6] != null){
if (gameGridObj[_local5][_local6].isCoin){
gameGridObj[_local5][_local6].animAt = ((gameGridObj[_local5][_local6].animAt % 20) + 1);
};
if (gameGridObj[_local5][_local6].isBomb){
gameGridObj[_local5][_local6].bombAnim = ((gameGridObj[_local5][_local6].bombAnim % gameGridObj[_local5][_local6].bombAnimLength) + 1);
};
if (gameGridObj[_local5][_local6].isLineBlast){
gameGridObj[_local5][_local6].lineBlastAnim = ((gameGridObj[_local5][_local6].lineBlastAnim % gameGridObj[_local5][_local6].lineBlastAnimLength) + 1);
};
if (explodeCounter == 0){
if (gameGridObj[_local5][_local6].theY != gameGridObj[_local5][_local6].gotoY){
_local7 = false;
if (gameGridObj[_local5][_local6].delay == 0){
if ((((((gameGridObj[_local5][_local6].theY < ((LEVEL_CLEARANCE * 32) + 100))) && ((Math.min((gameGridObj[_local5][_local6].theY + gameGridObj[_local5][_local6].getSpeed()), gameGridObj[_local5][_local6].gotoY) > ((LEVEL_CLEARANCE * 32) + 100))))) && ((allLanded == 0)))){
sfxManager.get("splash").play(0.7);
};
gameGridObj[_local5][_local6].updateSpeed();
gameGridObj[_local5][_local6].theY = Math.min((gameGridObj[_local5][_local6].theY + gameGridObj[_local5][_local6].getSpeed()), gameGridObj[_local5][_local6].gotoY);
floatYArr[_local5][_local6].set(gameGridObj[_local5][_local6].theY);
gameGridObj[_local5][_local6].animAt = ((gameGridObj[_local5][_local6].animAt + gameGridObj[_local5][_local6].animSpeed) % gameGridObj[_local5][_local6].animLength);
if (gameGridObj[_local5][_local6].theY == gameGridObj[_local5][_local6].gotoY){
floatYArr[_local5][_local6].set(gameGridObj[_local5][_local6].theY);
if (((!(gameGridObj[_local5][_local6].firstLand)) && ((allLanded == 0)))){
createDust(gameGridObj[_local5][_local6]);
};
gameGridObj[_local5][_local6].land();
allLanded = Math.max((allLanded - 1), 0);
if (gameGridObj[_local5][_local6].targetID > 0){
gameGridObj[_local5][_local6].rotDeg = (Math.round(((gameGridObj[_local5][_local6].rotation / 360) * 4)) * 90);
gameGridObj[_local5][_local6].animAt = ((Number(((Math.round((((gameGridObj[_local5][_local6].animAt % 20) / 20) * 4)) * 5) + 1)) % 20) * 3);
};
if (gameGridObj[_local5][_local6].running){
checkForExplosion(gameGridObj[_local5][_local6]);
} else {
gameGridObj[_local5][_local6].running = true;
};
collapsing--;
if (shotSound){
sfxManager.get("knock").play(0.1);
shotSound = false;
};
if (collapsing == 0){
if (collapsing == 0){
consecutive = 0;
checkForCoin();
checkForCleared();
};
};
};
} else {
gameGridObj[_local5][_local6].delay--;
_local7 = false;
};
};
};
};
_local6++;
};
_local5++;
};
_local5 = 0;
while (_local5 < scoreArr.length) {
_local7 = false;
if (scoreArr[_local5].delay == 0){
scoreArr[_local5].animAt++;
if (scoreArr[_local5].animAt == scoreArr[_local5].animLength){
removeChild(scoreArr[_local5]);
scoreArr.splice(_local5, 1);
_local5--;
};
} else {
scoreArr[_local5].delay--;
if ((((scoreArr[_local5].delay == 0)) && (scoreArr[_local5].endScore))){
sfxManager.get("bonusScore").play(0.3);
};
};
_local5++;
};
_local5 = 0;
while (_local5 < splashArr.length) {
_local7 = false;
splashArr[_local5].animAt++;
if (splashArr[_local5].animAt == 18){
removeChild(splashArr[_local5]);
splashArr.splice(_local5, 1);
_local5--;
};
_local5++;
};
_local5 = 0;
while (_local5 < dustArr.length) {
_local7 = false;
dustArr[_local5].animAt++;
if (dustArr[_local5].animAt == dustArr[_local5].animLength){
removeChild(dustArr[_local5]);
dustArr.splice(_local5, 1);
_local5--;
};
_local5++;
};
_local5 = 0;
while (_local5 < visualExplArr.length) {
_local7 = false;
if (visualExplArr[_local5].delay > 0){
visualExplArr[_local5].delay--;
} else {
visualExplArr[_local5].animAt++;
if (visualExplArr[_local5].animAt >= visualExplArr[_local5].animLength){
removeChild(visualExplArr[_local5]);
visualExplArr.splice(_local5, 1);
_local5--;
};
};
_local5++;
};
_local5 = 0;
while (_local5 < bubbleAnimArr.length) {
bubbleAnimArr[_local5].animAt++;
if (bubbleAnimArr[_local5].animAt == bubbleAnimArr[_local5].animLength){
removeChild(bubbleAnimArr[_local5]);
bubbleAnimArr.splice(_local5, 1);
_local5--;
};
_local5++;
};
if (_local7){
gameRoot.mcQuit.visible = false;
if (bonusShown){
endRound(cleared_, bonusScore_);
} else {
bonusScorePops();
};
bonusShown = true;
};
break;
case STATE_NOT_RUNNING:
break;
};
if (relaxMode){
if ((((((food == 0)) && ((collapsing == 0)))) && ((explodeCounter == 0)))){
if (!gameRoot.mcRelaxGameOver.visible){
gameRoot.mcRelaxGameOver.drop();
};
if (--endDelay == 0){
endRound(false, 0);
};
};
if (food < 6){
gameRoot.foodLeftTxt.visible = true;
gameRoot.foodLeftTxt.text = ("" + food);
} else {
if (gameRoot.foodLeftTxt.visible){
gameRoot.foodLeftTxt.visible = false;
};
};
};
}
public function colorBomb(_arg1:Number){
var _local4:*;
sfxManager.get("colorBomb").play(0.6);
var _local2:* = new Array();
var _local3:* = 0;
while (_local3 < gameGridObj.length) {
_local4 = 0;
while (_local4 < gameGridObj[_local3].length) {
if (((!((gameGridObj[_local3][_local4] == null))) && ((gameGridObj[_local3][_local4].type == _arg1)))){
_local2.push(gameGridObj[_local3][_local4]);
};
_local4++;
};
_local3++;
};
explodeBoard(_local2, _arg1);
}
public function checkForExplosion(_arg1:Piece){
var _local4:*;
var _local2:* = false;
if (_arg1 != null){
if (!_arg1.cfe){
explArr = new Array();
testPiece(_arg1);
if (explArr.length > 3){
_local2 = true;
calcScore(explArr);
explodeBoard(explArr, 10);
consecutive++;
if (consecutive < 5){
sfxManager.get(("combo" + consecutive)).play(0.5);
} else {
sfxManager.get("combo5").play(0.5);
};
if (consecutive == 3){
makeBomb();
};
};
};
};
var _local3:* = 0;
while (_local3 < gameGridObj.length) {
_local4 = 0;
while (_local4 < gameGridObj[_local3].length) {
if (gameGridObj[_local3][_local4] != null){
gameGridObj[_local3][_local4].cfe = false;
};
_local4++;
};
_local3++;
};
if (_local2){
collapseBoard();
};
}
public function makeBomb(){
if (((!(nextPiece.isBomb)) && (!(nextPiece.isLineBlast)))){
nextPiece.makeBomb();
} else {
switchPiece.makeBomb();
};
}
public function getRandom(_arg1:Number){
return (gameRoot.getRandom(_arg1));
}
public function openUserEnd(){
sfxManager.get("warning").stop();
clearBoard();
gameState = STATE_NOT_RUNNING;
gameRoot.endRound(false, score, numBlack, numEmptyRows);
}
public function shootBall(_arg1:Event){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
if (gameState == STATE_RUNNING){
if ((((((collapsing == 0)) && ((slider.switchAnimAt == 1)))) && ((slider.animAt == 1)))){
shotSound = true;
if (food == 0){
return;
};
if (relaxMode){
food--;
if (food < 0){
food = 0;
};
};
_local2 = Math.min(Math.round(((slider.theX - pieceXMod) / 32)), 15);
communicator.shootBall((currentTick + 1), _local2);
_local4 = (gameGridObj.length - 1);
while (_local4 >= 0) {
if (gameGridObj[_local4][_local2] == null){
_local3 = _local4;
_local4 = -1;
};
_local4--;
};
if ((((gameState == STATE_RUNNING)) && ((gameGridObj[0][_local2] == null)))){
_local5 = createPiece(_local3, _local2, nextPiece.type, nextPiece.isBomb, nextPiece.isLineBlast, true, nextPiece.rotation);
addChild(_local5);
gameGridObj[_local3][_local2] = _local5;
floatYArr[_local3][_local2] = new IFloat(_local5.theY);
collapsing++;
removeChild(nextPiece);
slider.animAt = 2;
reloadAnim(1, 1);
};
};
};
}
public function lineBlast(_arg1:Number, _arg2:Number, _arg3:Array){
var _local5:*;
var _local6:*;
var _local7:*;
var _local4:* = 0;
_local5 = (_arg2 + 1);
while (_local5 < gameGridObj[_arg1].length) {
_local4++;
createLineExplosion(((_arg1 * 32) + 100), ((_local5 * 32) + pieceXMod), _local4);
if (((!((gameGridObj[_arg1][_local5] == null))) && ((gameGridObj[_arg1][_local5].type == 9)))){
numBlack++;
score = (score + 300);
createScorePop(300, gameGridObj[_arg1][_local5].theY, gameGridObj[_arg1][_local5].x, 1, 0, false);
} else {
if (gameGridObj[_arg1][_local5] != null){
score = (score + 150);
createScorePop(150, gameGridObj[_arg1][_local5].theY, gameGridObj[_arg1][_local5].x, 0, 0, false);
};
};
_local5++;
};
_local4 = 0;
_local5 = (_arg2 - 1);
while (_local5 >= 0) {
_local4++;
createLineExplosion(((_arg1 * 32) + 100), ((_local5 * 32) + pieceXMod), _local4);
if (((!((gameGridObj[_arg1][_local5] == null))) && ((gameGridObj[_arg1][_local5].type == 9)))){
numBlack++;
score = (score + 300);
createScorePop(300, gameGridObj[_arg1][_local5].theY, gameGridObj[_arg1][_local5].x, 1, 0, false);
} else {
if (gameGridObj[_arg1][_local5] != null){
score = (score + 150);
createScorePop(150, gameGridObj[_arg1][_local5].theY, gameGridObj[_arg1][_local5].x, 0, 0, false);
};
};
_local5--;
};
_local5 = 0;
while (_local5 < gameGridObj[_arg1].length) {
if (gameGridObj[_arg1][_local5] != null){
_local6 = false;
_local7 = 0;
while (_local7 < _arg3.length) {
if (_arg3[_local7] == gameGridObj[_arg1][_local5]){
_local6 = true;
};
_local7++;
};
if (!_local6){
if (gameGridObj[_arg1][_local5].collapsing){
collapsing--;
};
removeChild(gameGridObj[_arg1][_local5]);
gameGridObj[_arg1][_local5] = null;
};
};
_local5++;
};
setScoreNum();
}
public function checkForCoin(){
var _local3:*;
var _local1:* = false;
var _local2:* = (LEVEL_CLEARANCE + 1);
while (_local2 < gameGridObj.length) {
_local3 = 0;
while (_local3 < gameGridObj[_local2].length) {
if (gameGridObj[_local2][_local3] != null){
if (gameGridObj[_local2][_local3].isCoin){
score = (score + 1000);
if (relaxMode){
food = (food + FOOD_INCREASE);
if (food > FOOD_LIMIT){
food = FOOD_LIMIT;
};
};
createScorePop(1000, gameGridObj[_local2][_local3].theY, gameGridObj[_local2][_local3].x, 2, 0, false);
removeChild(gameGridObj[_local2][_local3]);
gameGridObj[_local2][_local3] = null;
_local1 = true;
};
};
_local3++;
};
_local2++;
};
if (_local1){
collapseBoard();
};
setScoreNum();
}
public function switchBallsAnim(_arg1:Number){
var _local2:*;
var _local3:*;
var _local4:*;
switch (_arg1){
case 2:
nextPiece.theY = (nextPiece.theY + -4);
nextPiece.theX = (nextPiece.theX + 16);
nextPiece.scaleX = (nextPiece.scaleX + 0.3);
nextPiece.scaleY = (nextPiece.scaleY + 0.3);
switchPiece.theY = (switchPiece.theY + 4);
switchPiece.theX = (switchPiece.theX + -16);
break;
case 3:
nextPiece.theY = (nextPiece.theY + -4);
nextPiece.theX = (nextPiece.theX + 20);
nextPiece.scaleX = (nextPiece.scaleX + 0.3);
nextPiece.scaleY = (nextPiece.scaleY + 0.3);
switchPiece.theY = (switchPiece.theY + 4);
switchPiece.theX = (switchPiece.theX + -20);
break;
case 4:
nextPiece.theY = (nextPiece.theY + -4);
nextPiece.theX = (nextPiece.theX + 20);
nextPiece.scaleX = (nextPiece.scaleX + -0.3);
nextPiece.scaleY = (nextPiece.scaleY + -0.3);
switchPiece.theY = (switchPiece.theY + 4);
switchPiece.theX = (switchPiece.theX + -20);
break;
case 5:
slider.animAt = 1;
nextPiece.theY = 10;
nextPiece.theX = 0;
nextPiece.scaleX = (nextPiece.scaleX + -0.3);
nextPiece.scaleY = (nextPiece.scaleY + -0.3);
switchPiece.theY = -4;
switchPiece.theX = 50;
_local2 = switchPiece.type;
_local3 = switchPiece.isBomb;
_local4 = switchPiece.isLineBlast;
switchPiece.switchType(nextPiece.type, nextPiece.isBomb, nextPiece.isLineBlast);
nextPiece.switchType(_local2, _local3, _local4);
switchPieceFloatX.set(switchPiece.theX);
switchPieceFloatY.set(switchPiece.theY);
nextPieceFloatX.set(nextPiece.theX);
nextPieceFloatY.set(nextPiece.theY);
slider.switchAnimAt = 0;
break;
};
switchPieceFloatX.set(switchPiece.theX);
switchPieceFloatY.set(switchPiece.theY);
nextPieceFloatX.set(nextPiece.theX);
nextPieceFloatY.set(nextPiece.theY);
}
public function updateWater(_arg1:Number){
var _local2:Number;
var _local3:int;
var _local4:Number;
var _local5:Number;
if (waterBaseBitmapData != null){
waterBaseBitmap.visible = false;
distortBitmap.draw(gameRoot, new Matrix(1, 0, 0, 1, 0, -437));
waterBaseBitmap.visible = true;
_local2 = (getTimer() / 200);
_local3 = 0;
while (_local3 < 200) {
_local4 = (Math.sin(((_local3 / 7) + _local2)) * 4);
_local4 = (_local4 + (Math.sin(((_local3 / 5) + (_local2 / 1.74))) * 2));
_local5 = (Math.sin(((_local3 / 10) + _local2)) * 2);
_local5 = (_local5 + (Math.sin(((_local3 / 17) + (_local2 / 1.4))) * 1));
waterBaseBitmapData.copyPixels(distortBitmap, new Rectangle(0, (_local3 + int((_local5 * 0.4))), 755, 1), new Point(int((_local4 * 0.4)), _local3));
_local3++;
};
};
}
public function createBubbleAnim(){
var _local1:* = new BubbleAnim();
bubbleAnimArr.push(_local1);
addChild(_local1);
}
public function render(_arg1:Number, _arg2:Number):void{
var _local3:*;
var _local4:int;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
if (gameRoot.waterEffect){
updateWater(_arg1);
} else {
if (waterBaseBitmap != null){
gameRoot.mcWater.removeChild(waterBaseBitmap);
waterBaseBitmap = null;
clearLevel.alpha = 0.4;
_local3 = 0;
while (_local3 < waveArr.length) {
waveArr[_local3].alpha = 1;
_local3++;
};
doBubbles = false;
};
};
if (relaxMode){
_local4 = (0 | (28 * (1 - (Math.min(FOOD_LIMIT, food) / FOOD_LIMIT))));
gameRoot.mcRelaxModeMeter.gotoAndStop((_local4 + 1));
};
switch (gameState){
case STATE_RUNNING:
_local5 = Math.floor((timeLeft / 25));
_local6 = Math.floor((_local5 / 60));
_local7 = (_local5 - (_local6 * 60));
_local8 = "";
if (_local7 < 10){
_local8 = "0";
};
setClockNum((((("0" + _local6) + ":") + _local8) + _local7));
slider.y = slider.theY;
slider.x = sliderFloat.get(_arg2);
nextPiece.rotation = (nextPiece.rotation + rotFloat.get(_arg2));
nextPiece.x = (sliderFloat.get(_arg2) + nextPieceFloatX.get(_arg2));
nextPiece.y = (slider.y + nextPieceFloatY.get(_arg2));
nextPiece.scaleX = nextPieceFloatScaleX.get(_arg2);
nextPiece.scaleY = nextPieceFloatScaleY.get(_arg2);
switchPiece.x = ((sliderFloat.get(_arg2) + 20) + switchPieceFloatX.get(_arg2));
switchPiece.y = (slider.y + switchPieceFloatY.get(_arg2));
switchPiece.scaleX = switchPieceFloatScaleX.get(_arg2);
switchPiece.scaleY = switchPieceFloatScaleY.get(_arg2);
slider.mcLeft.gotoAndStop(slider.animAt);
slider.mcRight.gotoAndStop(slider.animAt);
if (nextPiece.isBomb){
nextPiece.target.mcBomb.gotoAndStop(nextPiece.bombAnim);
};
if (nextPiece.isLineBlast){
nextPiece.target.mcLineBlast.gotoAndStop(nextPiece.lineBlastAnim);
};
if (switchPiece.isBomb){
switchPiece.target.mcBomb.gotoAndStop(switchPiece.bombAnim);
};
if (switchPiece.isLineBlast){
switchPiece.target.mcLineBlast.gotoAndStop(switchPiece.lineBlastAnim);
};
_local3 = 0;
while (_local3 < gameGridObj.length) {
_local9 = 0;
while (_local9 < gameGridObj[_local3].length) {
if (gameGridObj[_local3][_local9] != null){
if (explodeCounter == 0){
if (gameGridObj[_local3][_local9].y != gameGridObj[_local3][_local9].gotoY){
if ((((gameGridObj[_local3][_local9].y < (115 + (32 * LEVEL_CLEARANCE)))) && ((floatYArr[_local3][_local9].get(_arg2) > (115 + (32 * LEVEL_CLEARANCE)))))){
createSplash(gameGridObj[_local3][_local9].x);
};
gameGridObj[_local3][_local9].y = floatYArr[_local3][_local9].get(_arg2);
gameGridObj[_local3][_local9].rotation = gameGridObj[_local3][_local9].rotDeg;
if (gameGridObj[_local3][_local9].target.mcBall != null){
gameGridObj[_local3][_local9].target.mcBall.gotoAndStop(Math.round((gameGridObj[_local3][_local9].animAt / 3)));
};
};
};
if (gameGridObj[_local3][_local9].isCoin){
if (gameGridObj[_local3][_local9].target.mcBall != null){
gameGridObj[_local3][_local9].target.mcBall.gotoAndStop(gameGridObj[_local3][_local9].animAt);
};
};
if (gameGridObj[_local3][_local9].isBomb){
gameGridObj[_local3][_local9].target.mcBomb.gotoAndStop(gameGridObj[_local3][_local9].bombAnim);
};
if (gameGridObj[_local3][_local9].isLineBlast){
gameGridObj[_local3][_local9].target.mcLineBlast.gotoAndStop(gameGridObj[_local3][_local9].lineBlastAnim);
};
};
_local9++;
};
_local3++;
};
_local3 = 0;
while (_local3 < scoreArr.length) {
scoreArr[_local3].gotoAndStop(scoreArr[_local3].animAt);
_local3++;
};
_local3 = 0;
while (_local3 < splashArr.length) {
splashArr[_local3].gotoAndStop(splashArr[_local3].animAt);
_local3++;
};
_local3 = 0;
while (_local3 < dustArr.length) {
dustArr[_local3].gotoAndStop(dustArr[_local3].animAt);
_local3++;
};
_local3 = 0;
while (_local3 < visualExplArr.length) {
visualExplArr[_local3].target.gotoAndStop(visualExplArr[_local3].animAt);
_local3++;
};
_local3 = 0;
while (_local3 < bubbleAnimArr.length) {
bubbleAnimArr[_local3].gotoAndStop(bubbleAnimArr[_local3].animAt);
_local3++;
};
break;
case STATE_END_ANIMS:
_local3 = 0;
while (_local3 < gameGridObj.length) {
_local9 = 0;
while (_local9 < gameGridObj[_local3].length) {
if (gameGridObj[_local3][_local9] != null){
if (explodeCounter == 0){
if (gameGridObj[_local3][_local9].y != gameGridObj[_local3][_local9].gotoY){
if ((((gameGridObj[_local3][_local9].y < (115 + (32 * LEVEL_CLEARANCE)))) && ((floatYArr[_local3][_local9].get(_arg2) > (115 + (32 * LEVEL_CLEARANCE)))))){
createSplash(gameGridObj[_local3][_local9].x);
};
gameGridObj[_local3][_local9].y = floatYArr[_local3][_local9].get(_arg2);
gameGridObj[_local3][_local9].rotation = gameGridObj[_local3][_local9].rotDeg;
if (gameGridObj[_local3][_local9].target.mcBall != null){
gameGridObj[_local3][_local9].target.mcBall.gotoAndStop(Math.round((gameGridObj[_local3][_local9].animAt / 3)));
};
};
};
if (gameGridObj[_local3][_local9].isCoin){
if (gameGridObj[_local3][_local9].target.mcBall != null){
gameGridObj[_local3][_local9].target.mcBall.gotoAndStop(gameGridObj[_local3][_local9].animAt);
};
};
if (gameGridObj[_local3][_local9].isBomb){
gameGridObj[_local3][_local9].target.mcBomb.gotoAndStop(gameGridObj[_local3][_local9].bombAnim);
};
if (gameGridObj[_local3][_local9].isLineBlast){
gameGridObj[_local3][_local9].target.mcLineBlast.gotoAndStop(gameGridObj[_local3][_local9].lineBlastAnim);
};
};
_local9++;
};
_local3++;
};
_local3 = 0;
while (_local3 < scoreArr.length) {
scoreArr[_local3].gotoAndStop(scoreArr[_local3].animAt);
_local3++;
};
_local3 = 0;
while (_local3 < splashArr.length) {
splashArr[_local3].gotoAndStop(splashArr[_local3].animAt);
_local3++;
};
_local3 = 0;
while (_local3 < dustArr.length) {
dustArr[_local3].gotoAndStop(dustArr[_local3].animAt);
_local3++;
};
_local3 = 0;
while (_local3 < visualExplArr.length) {
visualExplArr[_local3].target.gotoAndStop(visualExplArr[_local3].animAt);
_local3++;
};
_local3 = 0;
while (_local3 < bubbleAnimArr.length) {
bubbleAnimArr[_local3].gotoAndStop(bubbleAnimArr[_local3].animAt);
_local3++;
};
break;
};
}
public function createDust(_arg1){
var _local2:* = new DustAnim();
dustArr.push(_local2);
_local2.x = _arg1.theX;
_local2.y = _arg1.theY;
addChild(_local2);
}
public function createLineExplosion(_arg1, _arg2, _arg3){
sfxManager.get("lineBlast").play(0.2);
var _local4:* = new Explosion(_arg2, _arg1, _arg3, 20);
visualExplArr.push(_local4);
addChild(_local4);
}
public function checkForCleared(){
var _local4:*;
var _local1:* = 0;
var _local2:* = true;
var _local3:* = 0;
while (_local3 < gameGridObj.length) {
_local4 = 0;
while (_local4 < gameGridObj[_local3].length) {
if (_local3 <= LEVEL_CLEARANCE){
if (gameGridObj[_local3][_local4] != null){
_local2 = false;
};
};
_local4++;
};
_local3++;
};
if (_local2){
endAnims(true);
};
}
public function testBoardPlace(_arg1:Array, _arg2, _arg3:Number, _arg4:Number, _arg5:Number){
var _local6:*;
if ((((_arg3 > 0)) && (!((_arg5 == 0))))){
_local6 = _arg1[(_arg3 - 1)][_arg4];
if (((!((_local6 == null))) && ((_local6 == _arg2)))){
boardMatchNum++;
if (boardMatchNum < 3){
testBoardPlace(_arg1, _local6, (_arg3 - 1), _arg4, 1);
};
};
};
if ((((_arg3 < (_arg1.length - 1))) && (!((_arg5 == 1))))){
_local6 = _arg1[(_arg3 + 1)][_arg4];
if (((!((_local6 == null))) && ((_local6 == _arg2)))){
boardMatchNum++;
if (boardMatchNum < 3){
testBoardPlace(_arg1, _local6, (_arg3 + 1), _arg4, 0);
};
};
};
if ((((_arg4 > 0)) && (!((_arg5 == 2))))){
_local6 = _arg1[_arg3][(_arg4 - 1)];
if (((!((_local6 == null))) && ((_local6 == _arg2)))){
boardMatchNum++;
if (boardMatchNum < 3){
testBoardPlace(_arg1, _local6, _arg3, (_arg4 - 1), 3);
};
};
};
if ((((_arg4 < (_arg1[_arg3].length - 1))) && (!((_arg5 == 3))))){
_local6 = _arg1[_arg3][(_arg4 + 1)];
if (((!((_local6 == null))) && ((_local6 == _arg2)))){
boardMatchNum++;
if (boardMatchNum < 3){
testBoardPlace(_arg1, _local6, _arg3, (_arg4 + 1), 2);
};
};
};
}
public function setLevelNum(){
var _local1:*;
var _local4:*;
_local1 = 0;
while (_local1 < levelNumArr.length) {
removeChild(levelNumArr[_local1]);
_local1++;
};
levelNumArr = new Array();
var _local2:* = level.toString();
var _local3:* = _local2.split("");
_local1 = 0;
while (_local1 < _local3.length) {
_local4 = new LevelNumbers();
_local4.y = 130;
_local4.x = (10 + ((_local4.width - 13) * _local1));
addChild(_local4);
_local4.gotoAndStop((Number(_local3[_local1]) + 1));
levelNumArr.push(_local4);
_local1++;
};
}
}
}//package src
Section 82
//Piece (src.Piece)
package src {
import src.timing.*;
import src.math.*;
import src.comm.*;
import flash.display.*;
import flash.text.*;
import flash.system.*;
public class Piece extends MovieClip {
public var delay;// = 0
public var targetID;
public var theX;
public var theY;
public var target;
public var bombAnimLength;// = 20
public var mcRock:MovieClip;
public var lineBlastAnim;// = 1
public var yPos;
public var animAt;// = 1
public var rotDeg;
public var collapsing;// = true
public var type;
public var firstLand;// = false
public var xPos;
public var running;// = false
public var animSpeed;// = 1
public var speed;// = 1
public var bombAnim;// = 1
public var gotoX;
public var gotoY;
public var animLength;// = 60
public var isLineBlast;
public var lineBlastAnimLength;// = 10
public var isCoin;// = false
public var mcWood:MovieClip;
public var cfe;// = false
public var isBomb;
public var mcBone:MovieClip;
private static var WIDTH = 32;
private static var HEIGHT = 32;
public function Piece(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9){
super();
this.type = _arg1;
this.yPos = _arg2;
this.xPos = _arg3;
this.running = _arg6;
targetID = _arg9;
switch (targetID){
case 0:
target = mcWood;
removeChild(mcRock);
removeChild(mcBone);
break;
case 1:
target = mcRock;
removeChild(mcWood);
removeChild(mcBone);
break;
case 2:
target = mcBone;
removeChild(mcRock);
removeChild(mcWood);
break;
};
isBomb = _arg4;
isLineBlast = _arg5;
if (!isBomb){
target.mcBomb.visible = false;
};
if (!isLineBlast){
target.mcLineBlast.visible = false;
};
if (_arg1 == 10){
isCoin = true;
};
animSpeed = (Math.round((Math.random() * 3)) + 1);
var _local10:* = 0;
if (!_arg6){
_local10 = -60;
};
gotoY = ((_arg2 * HEIGHT) + 100);
gotoX = ((_arg3 * WIDTH) + _arg8);
theY = (40 + _local10);
theX = gotoX;
y = theY;
x = theX;
rotation = (rotDeg = _arg7);
this.delay = delay;
target.gotoAndStop((_arg1 + 1));
}
public function updateSpeed(){
speed = Math.min((speed + 3), 40);
}
public function render(_arg1:Number, _arg2:Number):void{
}
public function getSpeed(){
return (speed);
}
public function tick(_arg1:Number, _arg2:Number):void{
}
public function updatePos(_arg1, _arg2){
yPos = _arg1;
xPos = _arg2;
gotoY = ((yPos * HEIGHT) + 100);
gotoX = ((xPos * WIDTH) + 250);
}
public function land(){
speed = 1;
collapsing = false;
firstLand = true;
}
}
}//package src
Section 83
//PieceRolling (src.PieceRolling)
package src {
import src.timing.*;
import src.math.*;
import src.comm.*;
import flash.display.*;
import flash.text.*;
import flash.system.*;
public class PieceRolling extends MovieClip {
public var type;
public var targetID;
public var theX;// = 0
public var theY;// = 0
public var target;
public var bombAnim;// = 1
public var gotoX;
public var gotoY;
public var bombAnimLength;// = 20
public var isLineBlast;// = false
public var mcRock:MovieClip;
public var lineBlastAnim;// = 1
public var lineBlastAnimLength;// = 10
public var mcWood:MovieClip;
public var isBomb;// = false
public var mcBone:MovieClip;
private static var WIDTH = 32;
private static var HEIGHT = 32;
public function PieceRolling(_arg1, _arg2, _arg3, _arg4, _arg5){
super();
targetID = _arg5;
switch (targetID){
case 0:
target = mcWood;
removeChild(mcRock);
removeChild(mcBone);
break;
case 1:
target = mcRock;
removeChild(mcWood);
removeChild(mcBone);
break;
case 2:
target = mcBone;
removeChild(mcRock);
removeChild(mcWood);
break;
};
if (_arg4){
this.theX = 50;
this.theY = -4;
} else {
this.theY = 10;
this.theX = 0;
};
x = _arg2;
y = _arg1;
gotoX = x;
gotoY = y;
this.type = _arg3;
target.mcBomb.visible = false;
target.mcLineBlast.visible = false;
target.gotoAndStop((_arg3 + 1));
}
public function switchType(_arg1:Number, _arg2:Boolean, _arg3:Boolean){
type = _arg1;
isBomb = _arg2;
isLineBlast = _arg3;
target.mcBomb.visible = isBomb;
target.mcLineBlast.visible = isLineBlast;
target.gotoAndStop((type + 1));
}
public function makeLineBlast(){
isLineBlast = true;
target.mcLineBlast.visible = true;
isBomb = false;
target.mcBomb.visible = false;
}
public function makeBomb(){
isBomb = true;
target.mcBomb.visible = true;
isLineBlast = false;
target.mcLineBlast.visible = false;
}
}
}//package src
Section 84
//RelaxGameOver (src.RelaxGameOver)
package src {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class RelaxGameOver extends MovieClip {
private var dropTime:int;
public function RelaxGameOver(){
super();
visible = false;
}
public function enterFrame(_arg1:Event):void{
var _local2:*;
if (!visible){
removeEventListener(Event.ENTER_FRAME, enterFrame);
return;
};
_local2 = getTimer();
if (dropTime == -1){
dropTime = _local2;
};
var _local3:* = (_local2 - dropTime);
if (_local3 < 200){
y = (-213 + ((_local3 / 200) * 213));
} else {
y = 0;
};
rotation = (((180 / Math.PI) * Math.sin((_local2 / 300))) * 0.2);
}
public function drop(){
if (!visible){
y = -213;
visible = true;
dropTime = -1;
addEventListener(Event.ENTER_FRAME, enterFrame);
};
}
}
}//package src
Section 85
//ScorePop (src.ScorePop)
package src {
import src.timing.*;
import src.math.*;
import src.comm.*;
import flash.display.*;
import flash.text.*;
import flash.system.*;
public class ScorePop extends MovieClip {
public var delay;
private var max;// = 1500
public var animAt;// = 1
private var min;// = 50
public var mcScorePop:MovieClip;
public var animLength;// = 20
public var endScore;
public function ScorePop(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){
super();
x = _arg3;
y = _arg2;
this.endScore = _arg6;
this.delay = _arg5;
mcScorePop.mcScorePop.mcScore.txtScore.text = _arg1;
var _local7:* = (Math.min(_arg1, max) / max);
this.scaleX = Math.max(_local7, 0.4);
this.scaleY = Math.max(_local7, 0.4);
mcScorePop.mcScorePop.mcScorePopBG.gotoAndStop((_arg4 + 1));
}
}
}//package src
Section 86
//Slider (src.Slider)
package src {
import flash.display.*;
public class Slider extends MovieClip {
public var animAt;// = 1
public var mcRight:MovieClip;
public var theX;// = 380
public var theY;// = 37
public var switchAnimAt;// = 1
public var mcLeft:MovieClip;
public function Slider(){
super();
x = theX;
y = theY;
}
}
}//package src
Section 87
//DM (DM)
package {
import flash.display.*;
public dynamic class DM extends MovieClip {
}
}//package
Section 88
//GameOverScreen (GameOverScreen)
package {
import flash.display.*;
import flash.text.*;
public dynamic class GameOverScreen extends MovieClip {
public var txtGameOverHeader:TextField;
public var mcTrophies:MovieClip;
public var mcScoreText:MovieClip;
public var mcScoreTextLabel:MovieClip;
public function GameOverScreen(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 89
//LevelNumbers (LevelNumbers)
package {
import flash.display.*;
public dynamic class LevelNumbers extends MovieClip {
public function LevelNumbers(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 90
//Play (Play)
package {
import flash.display.*;
public dynamic class Play extends MovieClip {
}
}//package
Section 91
//ScoreNumbers (ScoreNumbers)
package {
import flash.display.*;
public dynamic class ScoreNumbers extends MovieClip {
public function ScoreNumbers(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 92
//SignupScreen (SignupScreen)
package {
import flash.display.*;
public dynamic class SignupScreen extends MovieClip {
public var mcInner:MovieClip;
public function SignupScreen(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 93
//Splash (Splash)
package {
import flash.display.*;
public dynamic class Splash extends MovieClip {
public function Splash(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 94
//Stone1 (Stone1)
package {
import flash.display.*;
public dynamic class Stone1 extends MovieClip {
}
}//package
Section 95
//Stone2 (Stone2)
package {
import flash.display.*;
public dynamic class Stone2 extends MovieClip {
}
}//package
Section 96
//WaterLevelPiece (WaterLevelPiece)
package {
import flash.display.*;
public dynamic class WaterLevelPiece extends MovieClip {
public function WaterLevelPiece(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package