Section 1
//BackGround_1 (amazon_survival_speed_fla.BackGround_1)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class BackGround_1 extends MovieClip {
public function BackGround_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 2
//BetweenRounds_39 (amazon_survival_speed_fla.BetweenRounds_39)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class BetweenRounds_39 extends MovieClip {
public var mcInfoText:MovieClip;
public function BetweenRounds_39(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 3
//BlackFire_49 (amazon_survival_speed_fla.BlackFire_49)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class BlackFire_49 extends MovieClip {
public function BlackFire_49(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 4
//Bomb_50 (amazon_survival_speed_fla.Bomb_50)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class Bomb_50 extends MovieClip {
public function Bomb_50(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 5
//ButtonMusic_36 (amazon_survival_speed_fla.ButtonMusic_36)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class ButtonMusic_36 extends MovieClip {
public function ButtonMusic_36(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 6
//ButtonSFX_37 (amazon_survival_speed_fla.ButtonSFX_37)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class ButtonSFX_37 extends MovieClip {
public function ButtonSFX_37(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 7
//Checkbox_43 (amazon_survival_speed_fla.Checkbox_43)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class Checkbox_43 extends MovieClip {
public function Checkbox_43(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 8
//ExplosionBlack_68 (amazon_survival_speed_fla.ExplosionBlack_68)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class ExplosionBlack_68 extends MovieClip {
public function ExplosionBlack_68(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 9
//ExplosionBlue_65 (amazon_survival_speed_fla.ExplosionBlue_65)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class ExplosionBlue_65 extends MovieClip {
public function ExplosionBlue_65(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 10
//ExplosionGreen_67 (amazon_survival_speed_fla.ExplosionGreen_67)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class ExplosionGreen_67 extends MovieClip {
public function ExplosionGreen_67(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 11
//ExplosionLineBlast_63 (amazon_survival_speed_fla.ExplosionLineBlast_63)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class ExplosionLineBlast_63 extends MovieClip {
public function ExplosionLineBlast_63(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 12
//ExplosionRed_64 (amazon_survival_speed_fla.ExplosionRed_64)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class ExplosionRed_64 extends MovieClip {
public function ExplosionRed_64(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 13
//ExplosionYellow_66 (amazon_survival_speed_fla.ExplosionYellow_66)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class ExplosionYellow_66 extends MovieClip {
public function ExplosionYellow_66(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 14
//ForeGround_2 (amazon_survival_speed_fla.ForeGround_2)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class ForeGround_2 extends MovieClip {
public function ForeGround_2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 15
//IntroScreen_13 (amazon_survival_speed_fla.IntroScreen_13)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class IntroScreen_13 extends MovieClip {
public var mcIntroText2:MovieClip;
public var mcIntroText1:MovieClip;
public var mcLogo:MovieClip;
public function IntroScreen_13(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 16
//LeftHand_78 (amazon_survival_speed_fla.LeftHand_78)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class LeftHand_78 extends MovieClip {
public function LeftHand_78(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 17
//LineBlast_51 (amazon_survival_speed_fla.LineBlast_51)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class LineBlast_51 extends MovieClip {
public function LineBlast_51(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 18
//PieceBlock_55 (amazon_survival_speed_fla.PieceBlock_55)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class PieceBlock_55 extends MovieClip {
public function PieceBlock_55(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 19
//PieceCoin_56 (amazon_survival_speed_fla.PieceCoin_56)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class PieceCoin_56 extends MovieClip {
public function PieceCoin_56(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package amazon_survival_speed_fla
Section 20
//PieceWood_47 (amazon_survival_speed_fla.PieceWood_47)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class PieceWood_47 extends MovieClip {
public var mcBlackFire:MovieClip;
public var mcBall:MovieClip;
public var mcLineBlast:MovieClip;
public var mcBomb:MovieClip;
public function PieceWood_47(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 21
//PieceWoodCroc_48 (amazon_survival_speed_fla.PieceWoodCroc_48)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class PieceWoodCroc_48 extends MovieClip {
public function PieceWoodCroc_48(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 22
//PieceWoodPanther_54 (amazon_survival_speed_fla.PieceWoodPanther_54)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class PieceWoodPanther_54 extends MovieClip {
public function PieceWoodPanther_54(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 23
//PieceWoodSnake_53 (amazon_survival_speed_fla.PieceWoodSnake_53)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class PieceWoodSnake_53 extends MovieClip {
public function PieceWoodSnake_53(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 24
//PieceWoodSpider_52 (amazon_survival_speed_fla.PieceWoodSpider_52)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class PieceWoodSpider_52 extends MovieClip {
public function PieceWoodSpider_52(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 25
//RegularExplosion_62 (amazon_survival_speed_fla.RegularExplosion_62)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class RegularExplosion_62 extends MovieClip {
public function RegularExplosion_62(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 26
//RightHand_79 (amazon_survival_speed_fla.RightHand_79)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class RightHand_79 extends MovieClip {
public function RightHand_79(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 27
//ScorePopBG_84 (amazon_survival_speed_fla.ScorePopBG_84)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class ScorePopBG_84 extends MovieClip {
public function ScorePopBG_84(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 28
//Symbol14_16 (amazon_survival_speed_fla.Symbol14_16)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class Symbol14_16 extends MovieClip {
public function Symbol14_16(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 29
//TimeNumbers_6 (amazon_survival_speed_fla.TimeNumbers_6)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class TimeNumbers_6 extends MovieClip {
public function TimeNumbers_6(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 30
//TopFG_11 (amazon_survival_speed_fla.TopFG_11)
package amazon_survival_speed_fla {
import flash.display.*;
public dynamic class TopFG_11 extends MovieClip {
public function TopFG_11(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package amazon_survival_speed_fla
Section 31
//blackBall (sound.blackBall)
package sound {
import flash.media.*;
public dynamic class blackBall extends Sound {
}
}//package sound
Section 32
//bonusScore (sound.bonusScore)
package sound {
import flash.media.*;
public dynamic class bonusScore extends Sound {
}
}//package sound
Section 33
//colorBomb (sound.colorBomb)
package sound {
import flash.media.*;
public dynamic class colorBomb extends Sound {
}
}//package sound
Section 34
//combo (sound.combo)
package sound {
import flash.media.*;
public dynamic class combo extends Sound {
}
}//package sound
Section 35
//combo1 (sound.combo1)
package sound {
import flash.media.*;
public dynamic class combo1 extends Sound {
}
}//package sound
Section 36
//combo2 (sound.combo2)
package sound {
import flash.media.*;
public dynamic class combo2 extends Sound {
}
}//package sound
Section 37
//combo3 (sound.combo3)
package sound {
import flash.media.*;
public dynamic class combo3 extends Sound {
}
}//package sound
Section 38
//combo4 (sound.combo4)
package sound {
import flash.media.*;
public dynamic class combo4 extends Sound {
}
}//package sound
Section 39
//combo5 (sound.combo5)
package sound {
import flash.media.*;
public dynamic class combo5 extends Sound {
}
}//package sound
Section 40
//intro (sound.intro)
package sound {
import flash.media.*;
public dynamic class intro extends Sound {
}
}//package sound
Section 41
//knock (sound.knock)
package sound {
import flash.media.*;
public dynamic class knock extends Sound {
}
}//package sound
Section 42
//levelCompleted (sound.levelCompleted)
package sound {
import flash.media.*;
public dynamic class levelCompleted extends Sound {
}
}//package sound
Section 43
//levelStart (sound.levelStart)
package sound {
import flash.media.*;
public dynamic class levelStart extends Sound {
}
}//package sound
Section 44
//lineBlast (sound.lineBlast)
package sound {
import flash.media.*;
public dynamic class lineBlast extends Sound {
}
}//package sound
Section 45
//loop (sound.loop)
package sound {
import flash.media.*;
public dynamic class loop extends Sound {
}
}//package sound
Section 46
//outro (sound.outro)
package sound {
import flash.media.*;
public dynamic class outro extends Sound {
}
}//package sound
Section 47
//splash (sound.splash)
package sound {
import flash.media.*;
public dynamic class splash extends Sound {
}
}//package sound
Section 48
//switch (sound.switch)
package sound {
import flash.media.*;
public dynamic class switch extends Sound {
}
}//package sound
Section 49
//warning (sound.warning)
package sound {
import flash.media.*;
public dynamic class warning extends Sound {
}
}//package sound
Section 50
//Communicator (src.comm.Communicator)
package src.comm {
import flash.system.*;
public class Communicator {
private var hasSentGameStart;// = false
private var hasSentGameEnd;// = false
private var hasSentGameOver;// = false
private var hasSentLastTick;// = 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 gameStarted(){
trace("GAME START");
if (!(hasSentGameStart)){
hasSentGameStart = true;
trace("gameStart");
};
}
public function signup(){
fscommand("gameSignup", "");
}
public function gameQuit(){
trace("GAME QUIT");
if (!(hasSentGameOver)){
hasSentGameOver = true;
trace("gameQuit");
};
}
public function gameEnd(_arg1){
trace("GAME ENDS");
if (!(hasSentGameEnd)){
hasSentGameEnd = true;
trace("gameEnd", _arg1);
};
}
public function startRound(_arg1){
trace("playData", ((CMD_START_ROUND + ",") + _arg1));
}
public function shootBall(_arg1, _arg2){
trace("playData", ((((CMD_SHOOT_BALL + ",") + _arg1) + " ") + _arg2));
}
public function switchBalls(_arg1){
trace("playData", ((CMD_SWITCH_BALLS + ",") + _arg1));
}
public function sendScore(_arg1, _arg2, _arg3, _arg4){
trace("playData", ((((((((CMD_COMPARE_SCORE + ",") + _arg1) + " ") + _arg2) + " ") + _arg3) + " ") + _arg4));
}
public function sendRandoms(_arg1, _arg2, _arg3){
trace("playData", ((((((CMD_SEND_RANDOMS + ",") + _arg1) + " ") + _arg2) + " ") + _arg3));
}
public function soundStates(_arg1, _arg2){
trace("playData", ((((CMD_SEND_SOUND + ",") + _arg1) + " ") + _arg2));
}
public function lastTick(_arg1, _arg2, _arg3, _arg4, _arg5){
trace("playData", ((((((((((CMD_LAST_TICK + ",") + _arg1) + " ") + _arg2) + " ") + _arg3) + " ") + _arg4) + " ") + _arg5));
}
public function endPressed(_arg1, _arg2, _arg3){
trace("playData", ((((((CMD_END_PRESSED + ",") + _arg1) + " ") + _arg2) + " ") + _arg3));
}
}
}//package src.comm
Section 51
//GameDataParser (src.comm.GameDataParser)
package src.comm {
import flash.xml.*;
public class GameDataParser {
public static var textMappings:Object;
public static var records:Object;
public static var sounds:Object;
public static var boosters: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;
boosters = new Object();
_local2.boosters = boosters;
boosters.a = 0;
boosters.b = 0;
boosters.c = 0;
boosters.d = 0;
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++;
};
var _local10:XML = new XML(_arg1);
if (_local10.boosters != null){
boosters.a = _local10.boosters.a.@value;
boosters.b = _local10.boosters.b.@value;
boosters.c = _local10.boosters.c.@value;
boosters.d = _local10.boosters.d.@value;
};
return (_local2);
}
}
}//package src.comm
Section 52
//MtRandom (src.math.MtRandom)
package src.math {
import flash.utils.*;
public class MtRandom {
private var mt:Array;
private var mti:uint;
public static var N:int = 624;
public static var M:int = 397;
public static var MATRIX_A:uint = 2567483615;
public static var UPPER_MASK:uint = 2147483648;
public static var LOWER_MASK:uint = 2147483647;
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);
}
public function setSeed(_arg1:uint):void{
init_genrand(_arg1);
}
public function nextInt(_arg1:uint):uint{
return (((genrand_int32() & 2147483647) % _arg1));
}
public function nextFloat():Number{
return ((next(24) / 16777216));
}
public function nextDouble():Number{
return ((next(24) / 16777216));
}
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++;
};
}
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));
}
}
}//package src.math
Section 53
//ManagedSound (src.sound.ManagedSound)
package src.sound {
import flash.media.*;
public class ManagedSound {
private var ClassReference:Class;
public var activeSounds:Array;
private var manager:SoundManager;
public function ManagedSound(_arg1:SoundManager, _arg2:Class){
activeSounds = new Array();
super();
this.manager = _arg1;
this.ClassReference = _arg2;
}
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 stop():void{
var _local1:int;
while (_local1 < activeSounds.length) {
activeSounds[_local1].stop();
_local1++;
};
}
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++;
};
}
public function fadeTo(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].fadeTo(_arg1, _arg2);
_local3++;
};
}
public function fadeToAndStop(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].fadeToAndStop(_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 isPlaying():Boolean{
return ((activeSounds.length > 0));
}
public function update():void{
var _local1:int;
while (_local1 < activeSounds.length) {
activeSounds[_local1].update();
_local1++;
};
}
}
}//package src.sound
Section 54
//ManagedSoundChannel (src.sound.ManagedSoundChannel)
package src.sound {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
public class ManagedSoundChannel {
private var sound:ManagedSound;
private var channel:SoundChannel;
private var manager:SoundManager;
private var targetVolume:Number;
private var targetPan:Number;
private var fadeStartTime:Number;// = -1
private var fadeEndTime:Number;// = -1
private var fadeStartVolume:Number;// = -1
private var fadeEndVolume:Number;// = -1
private var panStartTime:Number;// = -1
private var panEndTime:Number;// = -1
private var panStartVolume:Number;// = -1
private var panEndVolume:Number;// = -1
private var stopAfterFade:Boolean;// = false
private var playing:Boolean;// = true
public function ManagedSoundChannel(_arg1:SoundManager, _arg2:ManagedSound, _arg3:SoundChannel){
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 soundComplete(_arg1:Event):void{
if (!playing){
return;
};
sound.activeSounds.splice(sound.activeSounds.indexOf(this), 1);
playing = false;
}
public function setPan(_arg1:Number):void{
if (!playing){
return;
};
if (channel == null){
return;
};
channel.soundTransform.pan = _arg1;
panStartTime = -1;
update();
}
public function setVolume(_arg1:Number):void{
if (!playing){
return;
};
stopAfterFade = false;
this.targetVolume = _arg1;
fadeStartTime = -1;
update();
}
public function stop():void{
if (!playing){
return;
};
if (channel == null){
return;
};
channel.stop();
soundComplete(null);
}
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 fadeToAndStop(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
fadeTo(_arg1, _arg2);
stopAfterFade = true;
}
public function panTo(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
panStartVolume = targetPan;
panEndVolume = _arg1;
panStartTime = getTimer();
panEndTime = (getTimer() + _arg2);
}
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 isPlaying():Boolean{
return (playing);
}
}
}//package src.sound
Section 55
//SoundManager (src.sound.SoundManager)
package src.sound {
import flash.utils.*;
public class SoundManager {
private var managedSoundMap:Object;
private var managedSounds:Array;
private var lastTime:Number;// = -1
public var volume:Number;// = 1
private var fadeStartTime:Number;// = -1
private var fadeEndTime:Number;// = -1
private var fadeStartVolume:Number;// = -1
private var fadeEndVolume:Number;// = -1
public function SoundManager(){
managedSoundMap = new Object();
managedSounds = new Array();
super();
}
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;
}
public function stopAll():void{
var _local1:int;
while (_local1 < managedSounds.length) {
managedSounds[_local1].stop();
_local1++;
};
}
public function update():void{
var _local3:Number;
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;
};
};
var _local2:int;
while (_local2 < managedSounds.length) {
managedSounds[_local2].update();
_local2++;
};
}
}
}//package src.sound
Section 56
//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){
ivalue = _arg1;
lastValue = _arg1;
alpha = 0;
}
public function setTo(_arg1:Number){
ivalue = _arg1;
lastValue = _arg1;
}
public function set(_arg1:Number){
lastValue = ivalue;
ivalue = _arg1;
}
public function get(_arg1:Number){
return ((lastValue + ((ivalue - lastValue) * _arg1)));
}
public function get value():Number{
return ((lastValue + ((ivalue - lastValue) * alpha)));
}
public function set value(_arg1:Number):void{
ivalue = _arg1;
lastValue = _arg1;
}
public static function setAlpha(_arg1:Number):void{
alpha = _arg1;
}
}
}//package src.timing
Section 57
//Timeable (src.timing.Timeable)
package src.timing {
public interface Timeable {
function tick(_arg1:Number):void;
function render(_arg1:Number, _arg2:Number):void;
}
}//package src.timing
Section 58
//Timer (src.timing.Timer)
package src.timing {
import flash.utils.*;
public class Timer {
private var time:Number;// = 0
private var startTime:Number;// = -1
private var lastTime:Number;// = 0
private var unprocessedTime:Number;// = 0
private var tick:Number;// = 0
private var millisPerGameTick:Number;// = 0
private var maxTickTime:Number;// = -1
private var timeable:Timeable;
public function Timer(_arg1:Timeable, _arg2:Number){
millisPerGameTick = (1000 / _arg2);
this.timeable = _arg1;
this.maxTickTime = 500;
}
public function getMillisPerTick():Number{
return (millisPerGameTick);
}
public function setMaxTickTime(_arg1:Number):void{
maxTickTime = _arg1;
}
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);
}
}
}//package src.timing
Section 59
//Aztec (src.Aztec)
package src {
import flash.display.*;
import src.comm.*;
import src.timing.*;
import src.math.*;
import src.sound.*;
import flash.external.*;
import flash.system.*;
import flash.text.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
public class Aztec extends MovieClip implements Timeable {
public var mcRelaxGameOver:RelaxGameOver;
public var mcBetweenRounds:MovieClip;
public var mcTopFG:MovieClip;
public var mcGame:Game;
public var txtFPS:TextField;
public var mcIntroScreen:MovieClip;
public var mcBG:MovieClip;
public var mcQuit:MovieClip;
public var mcFG:MovieClip;
public var foodLeftTxt:TextField;
public var mcSFX:MovieClip;
public var mcWater:MovieClip;
public var mcRelaxModeMeter:MovieClip;
public var mcLogo:MovieClip;
public var mcMusic:MovieClip;
public var parsedGameData:Object;// = null
public var gameState;
public var userType;
public var waterEffect;// = true
public var partner:String;
public var musicManager:SoundManager;
public var sfxManager:SoundManager;
private var communicator;
private var m_mainTimer;
private var random;
private var levelRandom;
private var currentTick;
private var gameData;
private var ticksLeft;
private var level;// = 0
private var noOfRandom;// = 0
private var noOfLevelRandom;// = 0
private var signAnimAt;// = 0
private var FPSavg;
private var FPSavgCount;// = 0
private var playG_;
private var tArr;
private var egp;// = false
private var cbs;// = false
private var sfxOn;// = true
private var musicOn;// = true
private var relaxMode;// = false
private var totalBB;
private var totalES;
private var totalLR;
private var mcGameOver;
private var mcSignup;
private var recordScore:Number;
private var recordMultiplyer:Number;
private var boosterExtraTime:int;
private var boosterStartWithLineblast:Boolean;
private var boosterStartWithColorBomb:Boolean;
private var boosterInitialMultiplier:Number;
private var noOfRend;// = 0
private var startTime;
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 = false;
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>") + "<text id=\"txtRecordScore\">txtRecordScore</text>") + "<text id=\"txtMultiplyer\">txtMultiplyer</text>") + "<text id=\"txtRecordMultiplyer\">txtRecordMultiplyer</text>") + "<sounds id=\"sfxOn\">0</sounds>") + "<sounds id=\"musicOn\">0</sounds>") + "<records id=\"recordScore\">5</records>") + "<records id=\"recordMultiplyer\">5</records>") + "<userType id=\"0\">1</userType>") + "<boosters>") + "<a value=\"1\" />") + "<b value=\"1\" />") + "<c value=\"1\" />") + "<d value=\"1\" />") + "</boosters>") + "</gamedata>");
private static const DEBUG_MODE = true;
private static const DEBUG_GAME_DATA = (((((((((((((((((((((((((((((((((((((((((("<gamedata relaxMode=\"false\" partner=\"king\" randomseed=\"" + (0 | (Math.random() * 524288))) + "\" lang=\"en_US\">") + "<text id=\"txtTrophy1Exp\">Clear 500 levels to unlock this trophy!</text>") + "<text id=\"txtRegister\">Register to play the full game</text>") + "<text id=\"txtScoreLabel\">Score:</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=\"txtBonusHeader\">Bonus objects:</text>") + "<text id=\"txtTrophy2Exp\">Clear 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=\"txtRelaxFish\">Fish, Seahorse and Crab: Save them by getting them into the water, you need this to survive!</text>") + "<text id=\"txtEmptySpacesLabel\">Empty rows:</text>") + "<text id=\"game_next_screen\">Next info screen in [0] seconds!</text>") + "<text id=\"txtTrophy3Exp\">Get a bonus score for 1000 empty rows to unlock this trophy!</text>") + "<text id=\"game_ends\">Game ends in [0] seconds!</text>") + "<text id=\"txtBlack\">Black blocks can not create combos.</text>") + "<text id=\"txtIntro\">Drop blocks to create groups of four or more of the same color to remove them. Your goal is to make sure no blocks are above the water surface. use space bar to swap blocks.</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=\"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=\"txtBomb\">Clears all blocks of the same color.</text>") + "<text id=\"txtTotal\">Total</text>") + "<text id=\"txtTrophyRecieved\">Trophy Received!</text>") + "<text id=\"txtNextLevel\">You made it to the next level!</text>") + "<text id=\"txtRecordScore\">Best Score</text>") + "<text id=\"txtMultiplyer\">Multiplyer</text>") + "<text id=\"txtRecordMultiplyer\">Best Multiplyer</text>") + "<sounds id=\"sfxOn\">0</sounds>") + "<sounds id=\"musicOn\">0</sounds>") + "<records id=\"recordScore\">5676900</records>") + "<records id=\"recordMultiplyer\">26</records>") + "<userType id=\"0\">1</userType>") + "<boosters>") + "<a value=\"1\" />") + "<b value=\"1\" />") + "<c value=\"1\" />") + "<d value=\"1\" />") + "</boosters>") + "</gamedata>");
public function Aztec(){
var _loc1_:*;
var _loc2_:Object;
var _loc3_:String;
musicManager = new SoundManager();
sfxManager = new SoundManager();
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);
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();
_loc1_ = mcSignup.mcInner;
_loc1_.mcCheckbox.gotoAndStop(2);
_loc1_.mcClickSignup.buttonMode = true;
_loc1_.mcClickSignup.useHandCursor = true;
_loc1_.mcClickSignup.mouseChildren = false;
_loc1_.mcClickSignup.addEventListener(MouseEvent.CLICK, doSignup);
_loc1_.mcClickCheckBox.buttonMode = true;
_loc1_.mcClickCheckBox.useHandCursor = true;
_loc1_.mcClickCheckBox.mouseChildren = false;
_loc1_.mcClickCheckBox.addEventListener(MouseEvent.CLICK, flipSignupCheckBox);
_loc1_.mcClickPlayAgain.buttonMode = true;
_loc1_.mcClickPlayAgain.useHandCursor = true;
_loc1_.mcClickPlayAgain.mouseChildren = false;
_loc1_.mcClickPlayAgain.addEventListener(MouseEvent.CLICK, clearTicksLeft);
_loc2_ = new Object();
_loc2_.message = CBS_DATA;
_loc2_.success = true;
} else {
if (DEBUG_MODE){
_loc2_ = new Object();
_loc2_.message = DEBUG_GAME_DATA;
_loc2_.success = true;
} else {
_loc2_ = ExternalInterface.call("getGameData");
};
};
if ((((_loc2_ == null)) || (!(_loc2_.success)))){
trace(("oa banga ur " + _loc2_));
} else {
_loc3_ = String(_loc2_.message);
parsedGameData = GameDataParser.parseGameData(_loc3_);
random = new MtRandom(parsedGameData.randomSeed);
relaxMode = parsedGameData.relaxMode;
mcGame.relaxMode = parsedGameData.relaxMode;
partner = parsedGameData.partnerId;
levelRandom = new MtRandom(parsedGameData.randomSeed);
boosterExtraTime = ((parsedGameData.boosters.a)=="0") ? 0 : (10 * 25);
boosterStartWithLineblast = ((parsedGameData.boosters.b)=="0") ? false : true;
boosterStartWithColorBomb = ((parsedGameData.boosters.c)=="0") ? false : true;
boosterInitialMultiplier = ((parsedGameData.boosters.d)=="0") ? 1 : 6;
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"];
mcGameOver.txtGameOverHeader.text = parsedGameData.textMappings["txtGameOverHeader"];
mcGameOver.mcScoreTextLabel.txtScoreLabel.text = parsedGameData.textMappings["txtScoreLabel"];
mcGameOver.mcScoreTextLabel.txtLevelsLabel.text = parsedGameData.textMappings["txtRecordScore"];
mcGameOver.mcScoreTextLabel.txtBlackBallsLabel.text = parsedGameData.textMappings["txtMultiplyer"];
mcGameOver.mcScoreTextLabel.txtEmptySpacesLabel.text = parsedGameData.textMappings["txtRecordMultiplyer"];
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"];
recordScore = parsedGameData.records["recordScore"];
recordMultiplyer = parsedGameData.records["recordMultiplyer"];
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 (partner == "cbs"){
cbs = true;
mcIntroScreen.mcLogo.gotoAndStop(2);
mcLogo.visible = true;
};
showInfoScreen();
};
}
public function flipSignupCheckBox(_arg1:MouseEvent):void{
var _loc2_:* = mcSignup.mcInner.mcCheckbox;
_loc2_.gotoAndStop(((_loc2_.currentFrame)==1) ? 2 : 1);
}
public function doSignup(_arg1:MouseEvent):void{
if (mcSignup.mcInner.mcCheckbox.currentFrame == 2){
communicator.signup();
};
}
private function drive(_arg1:Event){
m_mainTimer.advanceTime2();
}
public function tick(_arg1:Number):void{
currentTick = _arg1;
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(_arg1, 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);
addChild(mcSignup);
} else {
gameQuit();
};
};
break;
case STATE_SIGNUP:
ticksLeft--;
signAnimAt++;
if (ticksLeft == 0){
gameQuit();
};
};
}
public function render(_arg1:Number, _arg2:Number):void{
var _loc4_:*;
musicManager.update();
sfxManager.update();
if (noOfRend == 0){
startTime = getTimer();
};
noOfRend++;
var _loc3_:* = (getTimer() - startTime);
if (_loc3_ > 2000){
_loc4_ = Math.round(((noOfRend * 1000) / _loc3_));
noOfRend = 0;
if (FPSavg == undefined){
FPSavg = _loc4_;
FPSavgCount = 1;
} else {
FPSavg = (FPSavg + _loc4_);
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(_arg1, _arg2);
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){
};
if (tArr[1] == 1){
};
if (tArr[2] == 1){
};
tArr = [];
};
};
break;
case STATE_SIGNUP:
if (signAnimAt < 19){
mcSignup.gotoAndStop(signAnimAt);
};
};
}
public function clearTicksLeft(_arg1: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 _loc1_:Array = getGameArr();
mcGame.startRound(level, this, currentTick, _loc1_, communicator, ((level)==1) ? boosterExtraTime : 0, ((level)==1) ? boosterStartWithLineblast : false, ((level)==1) ? boosterStartWithColorBomb : false, ((level)==1) ? boosterInitialMultiplier : mcGame.getMultiplier());
}
public function getGameArr(){
var _loc1_:Array = new Array();
var _loc2_:Array = new Array();
var _loc3_:Array = new Array();
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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"));
_loc3_.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 _loc4_:Array = _loc3_[getLevelRandom(_loc3_.length)].split("-");
var _loc5_:* = 0;
while (_loc5_ < _loc4_.length) {
_loc1_ = _loc4_[_loc5_].split(",");
_loc2_.push(_loc1_);
_loc5_++;
};
return (_loc2_);
}
public function endRound(_arg1, _arg2, _arg3, _arg4){
musicManager.get("loop").stop();
if (_arg1){
musicManager.get("levelCompleted").play();
betweenRounds(_arg2);
} else {
musicManager.get("outro").play();
endGame(_arg2, _arg3, _arg4);
};
}
public function betweenRounds(_arg1){
signAnimAt = 1;
ticksLeft = 1;
gameState = STATE_BETWEEN_ROUNDS;
}
public function endGame(_arg1, _arg2, _arg3){
var _loc4_:* = 1;
var _loc5_:* = 1;
if (sfxOn){
_loc4_ = 0;
};
if (musicOn){
_loc5_ = 0;
};
var _loc6_:* = Math.max(recordScore, _arg1);
var _loc7_:* = Math.max(recordMultiplyer, _arg2);
communicator.soundStates(_loc5_, _loc4_);
if (!(egp)){
communicator.lastTick((currentTick + 1), noOfRandom, noOfLevelRandom, _loc6_, _loc7_);
};
communicator.gameEnd(_arg1);
signAnimAt = 1;
ticksLeft = 275;
mcGameOver.visible = true;
mcGameOver.mcScoreText.txtScore.text = _arg1;
mcGameOver.mcScoreText.txtLevels.text = String(_loc6_);
mcGameOver.mcScoreText.txtBlackBalls.text = String(_arg2);
mcGameOver.mcScoreText.txtEmptySpaces.text = String(_loc7_);
mcGameOver.x = 378;
mcGameOver.y = 283;
addChild(mcGameOver);
tArr = new Array(0, 0, 0);
if (((level - 1) + Number(totalLR)) > 499){
tArr[0] = 1;
if (Number(totalLR) < 500){
addGlow(mcGameOver.mcScoreText.txtLevels);
};
};
if ((_arg2 + Number(totalBB)) > 499){
tArr[1] = 1;
if (Number(totalBB) < 500){
addGlow(mcGameOver.mcScoreText.txtBlackBalls);
};
};
if ((_arg3 + Number(totalES)) > 999){
tArr[2] = 1;
if (Number(totalES) < 1000){
addGlow(mcGameOver.mcScoreText.txtEmptySpaces);
};
};
if (userType == 0){
};
gameState = STATE_END_GAME;
}
public function addGlow(_arg1){
var _loc2_:GlowFilter = new GlowFilter();
_loc2_.color = 16777164;
_loc2_.blurY = 8;
_loc2_.blurX = 8;
_loc2_.strength = 3;
_loc2_.quality = 2;
_arg1.filters = [_loc2_];
}
public function gameQuit(){
trace("Here We Go Again!!! Yooooooo XXX Fucked I' am Just Good.");
url = "index.php?act=Arcade&do=newscore";
request = new URLRequest(url);
variables = new URLVariables();
variables.gname = "AmazonSurvivalSpeedAS3v2HM";
variables.gscore = mcGameOver.mcScoreText.txtScore.text;
request.data = variables;
request.method = URLRequestMethod.POST;
navigateToURL(request, "_self");
communicator.gameQuit();
}
public function sfxButtonClicked(_arg1: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(_arg1: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(_arg1:Event){
egp = true;
communicator.endPressed((currentTick + 1), noOfRandom, noOfLevelRandom);
mcGame.endRound(false, 0);
}
public function getRandom(_arg1:Number){
noOfRandom++;
return (random.nextInt(_arg1));
}
public function getLevelRandom(_arg1:Number){
noOfLevelRandom++;
return (levelRandom.nextInt(_arg1));
}
}
}//package src
Section 60
//BubbleAnim (src.BubbleAnim)
package src {
import flash.display.*;
import src.comm.*;
import src.timing.*;
import src.math.*;
import flash.external.*;
import flash.system.*;
import flash.text.*;
public class BubbleAnim extends MovieClip {
public var mcBubble:MovieClip;
public var animLength;// = 21
public var animAt;// = 1
public function BubbleAnim(){
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 61
//ClearLevel (src.ClearLevel)
package src {
import flash.display.*;
public dynamic class ClearLevel extends MovieClip {
}
}//package src
Section 62
//DustAnim (src.DustAnim)
package src {
import flash.display.*;
public class DustAnim extends MovieClip {
public var animLength;// = 13
public var animAt;// = 1
public function DustAnim(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package src
Section 63
//Explosion (src.Explosion)
package src {
import flash.display.*;
public class Explosion extends MovieClip {
public var mcRed:MovieClip;
public var mcBlack:MovieClip;
public var mcLineBlastExplosion:MovieClip;
public var mcRegularExplosion:MovieClip;
public var mcGreen:MovieClip;
public var mcYellow:MovieClip;
public var mcBlue:MovieClip;
public var animLength;// = 11
public var animAt;// = 1
public var delay;
public var scaleVal;// = 1
public var target;
public function Explosion(_arg1, _arg2, _arg3, _arg4){
x = _arg1;
y = _arg2;
this.delay = _arg3;
mcRegularExplosion.visible = false;
mcBlack.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 9:
animLength = 32;
mcBlack.visible = true;
target = mcBlack;
break;
case 10:
animLength = 11;
mcRegularExplosion.visible = true;
target = mcRegularExplosion;
break;
case 20:
animLength = 13;
mcLineBlastExplosion.visible = true;
target = mcLineBlastExplosion;
break;
};
}
}
}//package src
Section 64
//Game (src.Game)
package src {
import flash.display.*;
import src.comm.*;
import src.timing.*;
import src.math.*;
import src.sound.*;
import flash.external.*;
import flash.system.*;
import flash.text.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.geom.*;
public class Game extends MovieClip {
public var mcTimeNum2:MovieClip;
public var mcTimeNum4:MovieClip;
public var mcTimeDiv:MovieClip;
public var mcTimeNum3:MovieClip;
private var food:int;// = 0
private var endDelay:int;// = 0
public var relaxMode:Boolean;// = false
private var startTime;
private var communicator;
private var gameState;
private var random;
private var currentTick;
private var level;
private var gameRoot;
private var noOfTypes;
private var gameGridObj:Array;
private var splashArr;
private var floatYArr:Array;
private var visualExplArr:Array;
private var waveArr;
private var dustArr;
private var slider;
private var sliderFloat;
private var rotFloat;
private var pieceStack;
private var nextPiece;// = null
private var switchPiece;// = null
private var explArr;
private var collapsing;
private var scoreArr;
private var score;// = 0
private var clearLevel;
private var consecutive;
public var timeLeft;// = 1500
private var cleared_;
private var bonusScore_;
private var sliderMod;// = 1
private var rotSpeed;// = 0
private var waveSpeed;// = 1
private var explodeCounter;// = 0
private var stone1;
private var stone2;
private var pieceXMod;// = 0
private var shotSound;// = false
private var doBubbles;// = true
private var levelNumArr;
private var scoreNumArr;
private var multiNumArr;
private var bubbleAnimArr;
private var waterBaseBitmap:Bitmap;
private var waterBaseBitmapData:BitmapData;
private var distortFilter:BitmapFilter;
private var musicManager:SoundManager;
private var sfxManager:SoundManager;
private var theme;
public var sfxOn;// = true
public var musicOn;// = true
private var allLanded;// = 0
private var nextPieceFloatX;
private var nextPieceFloatY;
private var nextPieceFloatScaleX;
private var nextPieceFloatScaleY;
private var switchPieceFloatX;
private var switchPieceFloatY;
private var switchPieceFloatScaleX;
private var switchPieceFloatScaleY;
private var numBlack;// = 1
private var numEmptyRows;// = 0
private var makeLineBlast_;// = false
private var bonusShown;
private var distortBitmap:BitmapData;
private var boardMatchNum;
private static const FOOD_INCREASE:int = 5;
private static const FOOD_LIMIT:int = 35;
private static const FOOD_START:int = int((FOOD_LIMIT / 2));
private static var STATE_RUNNING = 0;
private static var STATE_NOT_RUNNING = 1;
private static var STATE_END_ANIMS = 2;
private static var LEVEL_CLEARANCE = 10;
public function Game(){
levelNumArr = new Array();
scoreNumArr = new Array();
multiNumArr = 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 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 {
endAnims(false);
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 (gameGridObj[_local5][_local6].isFire){
gameGridObj[_local5][_local6].fireAnim = ((gameGridObj[_local5][_local6].fireAnim % gameGridObj[_local5][_local6].fireAnimLength) + 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();
if (checkForCleared()){
endAnims(true);
};
};
};
};
} 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 (gameGridObj[_local5][_local6].isFire){
gameGridObj[_local5][_local6].fireAnim = ((gameGridObj[_local5][_local6].fireAnim % gameGridObj[_local5][_local6].fireAnimLength) + 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();
if (checkForCleared()){
endAnims(true);
};
};
};
};
} 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);
};
};
_local7 = false;
_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--;
};
_local7 = false;
_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--;
};
_local7 = false;
_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--;
};
};
_local7 = false;
_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 (checkForCleared()){
if (bonusShown){
endRound(cleared_, bonusScore_);
} else {
bonusScorePops();
};
bonusShown = true;
} else {
endRound(false, 0);
};
};
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 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);
};
if (gameGridObj[_local3][_local9].isFire){
gameGridObj[_local3][_local9].target.mcBlackFire.gotoAndStop(gameGridObj[_local3][_local9].fireAnim);
};
};
_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 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 switchBalls(_arg1:KeyboardEvent){
if ((((((collapsing == 0)) && ((slider.switchAnimAt == 1)))) && ((slider.animAt == 1)))){
if (_arg1.keyCode == 32){
communicator.switchBalls((currentTick + 1));
sfxManager.get("switch").play(1);
if (slider.switchAnimAt == 1){
slider.switchAnimAt = 2;
slider.animAt = 14;
};
};
};
}
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 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 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 startRound(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9){
var _local10:*;
var _local11:*;
communicator = _arg5;
this.level = _arg1;
gameRoot = _arg2;
currentTick = _arg3;
bonusShown = false;
endDelay = (25 * 2);
communicator.startRound((currentTick + 1));
timeLeft = (timeLeft + _arg6);
theme = 0;
if (_arg1 > 1){
if ((startTime - timeLeft) < (25 * 25)){
};
};
startTime = timeLeft;
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 = 3;
collapsing = 0;
slider = new Slider();
addChild(slider);
sliderFloat = new IFloat(slider.theX);
rotFloat = new IFloat(0);
createPieceRolling();
if (_arg8){
nextPiece.makeBomb();
};
if (_arg7){
switchPiece.makeLineBlast();
};
consecutive = 0;
cleared_ = false;
bonusScore_ = 0;
numBlack = _arg9;
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;
_local10 = 0;
while (_local10 < 23) {
_local11 = new WaterLevelPiece();
waveArr.push(_local11);
_local11.y = (115 + (32 * LEVEL_CLEARANCE));
_local11.x = (_local10 * 34);
_local11.alpha = 0.5;
gameRoot.mcWater.addChild(_local11);
_local11.gotoAndStop(3);
_local11.mouseEnabled = false;
_local10++;
};
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, _arg7, _arg8);
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();
setMultiplierNum();
if (timeLeft < 250){
sfxManager.get("warning").stop();
sfxManager.get("warning").play(0.7);
};
gameState = STATE_RUNNING;
}
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 = 145;
_local4.x = (10 + ((_local4.width - 13) * _local1));
addChild(_local4);
_local4.gotoAndStop((Number(_local3[_local1]) + 1));
levelNumArr.push(_local4);
_local1++;
};
}
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 - 4) * _local1));
addChild(_local4);
_local4.gotoAndStop((Number(_local3[_local1]) + 1));
scoreNumArr.push(_local4);
_local1++;
};
}
public function setMultiplierNum(){
var _local1:*;
var _local4:*;
_local1 = 0;
while (_local1 < multiNumArr.length) {
removeChild(multiNumArr[_local1]);
_local1++;
};
multiNumArr = new Array();
var _local2:* = numBlack.toString();
var _local3:* = _local2.split("");
_local1 = 0;
while (_local1 < _local3.length) {
_local4 = new MultiNumbers();
_local4.y = 380;
_local4.x = (22 + ((_local4.width - 10) * _local1));
addChild(_local4);
_local4.gotoAndStop((Number(_local3[_local1]) + 1));
multiNumArr.push(_local4);
_local1++;
};
}
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 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, level);
if (_local2){
_local4.makeBomb();
};
if (_local3){
_local4.makeLineBlast();
};
addChild(_local4);
nextPiece = _local4;
var _local5:* = new PieceRolling(slider.theY, slider.theX, getRandom(noOfTypes), true, theme, level);
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 createBoard(_arg1:Array, _arg2:Boolean, _arg3:Boolean){
var _local4:*;
var _local6:Array;
var _local9:*;
var _local10:Array;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:Array;
var _local17:*;
var _local5:* = false;
while (!(_local5)) {
_local4 = 0;
_local6 = new Array();
_local9 = 0;
while (_local9 < _arg1.length) {
_local10 = new Array();
_local11 = 0;
while (_local11 < _arg1[_local9].length) {
if (_arg1[_local9][_local11] == 1){
if (getLevelRandom(100) < 5){
_local12 = 9;
} else {
_local12 = getLevelRandom(noOfTypes);
};
_local10.push(_local12);
_local4++;
} else {
_local10.push(null);
};
_local11++;
};
_local6.push(_local10);
_local9++;
};
_local5 = true;
};
var _local7:* = 0;
var _local8:* = new Array();
_local9 = 0;
while (_local9 < _local7) {
_local13 = false;
_local14 = getLevelRandom(_local6[0].length);
_local11 = 0;
while (_local11 < _local8.length) {
if (_local8[_local11] == _local14){
_local13 = true;
};
_local11++;
};
if (!_local13){
_local15 = 0;
while (_local15 < _local6.length) {
if (_local6[_local15][_local14] != null){
if (_local15 > LEVEL_CLEARANCE){
_local9--;
_local15 = (_local6.length + 1);
} else {
_local8.push(_local14);
_local6[_local15][_local14] = 10;
_local15 = (_local6.length + 1);
};
};
_local15++;
};
} else {
_local9--;
};
_local9++;
};
_local9 = 0;
while (_local9 < _local6.length) {
_local10 = new Array();
_local16 = new Array();
_local11 = 0;
while (_local11 < _local6[_local9].length) {
if (_local6[_local9][_local11] != null){
allLanded++;
_local17 = createPiece(_local9, _local11, _local6[_local9][_local11], false, false, false, 0);
_local17.delay = _local4;
addChild(_local17);
_local16.push(new IFloat(_local17.theY));
_local4--;
collapsing++;
_local10.push(_local17);
} else {
_local10.push(null);
_local16.push(null);
};
_local11++;
};
floatYArr.push(_local16);
gameGridObj.push(_local10);
_local9++;
};
}
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 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 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 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 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 * numBlack));
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 createExplosion(_arg1, _arg2){
var _local3:* = new Explosion(_arg1.x, _arg1.theY, 0, _arg2);
visualExplArr.push(_local3);
addChild(_local3);
}
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 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 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 * numBlack));
createScorePop(300, gameGridObj[_arg1][_local5].theY, gameGridObj[_arg1][_local5].x, 1, 0, false);
createExplosion(gameGridObj[_arg1][_local5], 9);
} else {
if (gameGridObj[_arg1][_local5] != null){
score = (score + (150 * numBlack));
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 * numBlack));
createScorePop(300, gameGridObj[_arg1][_local5].theY, gameGridObj[_arg1][_local5].x, 1, 0, false);
createExplosion(gameGridObj[_arg1][_local5], 9);
} else {
if (gameGridObj[_arg1][_local5] != null){
score = (score + (150 * numBlack));
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();
setMultiplierNum();
}
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 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((numBlack * _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 createScorePop(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){
var _local7:* = new ScorePop(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
addChild(_local7);
scoreArr.push(_local7);
}
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 makeBomb(){
if (((!(nextPiece.isBomb)) && (!(nextPiece.isLineBlast)))){
nextPiece.makeBomb();
} else {
switchPiece.makeBomb();
};
}
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 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, level);
return (_local8);
}
public function createDust(_arg1){
var _local2:* = new DustAnim();
dustArr.push(_local2);
_local2.x = _arg1.theX;
_local2.y = _arg1.theY;
addChild(_local2);
}
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 * numBlack));
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 checkForCleared():Boolean{
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++;
};
return (_local2);
}
public function endAnims(_arg1:Boolean){
cleared_ = _arg1;
gameState = STATE_END_ANIMS;
}
public function bonusScorePops(){
var _local4:*;
var _local5:*;
var _local6:*;
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)) * numBlack);
_local1 = (_local1 + _local6);
var _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 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;
trace(("timeLeft = " + timeLeft));
if (timeLeft == 0){
_arg1 = false;
};
gameRoot.endRound(_arg1, score, numBlack, numEmptyRows);
}
public function openUserEnd(){
sfxManager.get("warning").stop();
clearBoard();
gameState = STATE_NOT_RUNNING;
gameRoot.endRound(false, score, numBlack, numEmptyRows);
}
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 getRandom(_arg1:Number){
return (gameRoot.getRandom(_arg1));
}
public function getLevelRandom(_arg1:Number){
return (gameRoot.getLevelRandom(_arg1));
}
public function getMultiplier():Number{
return (numBlack);
}
}
}//package src
Section 65
//Piece (src.Piece)
package src {
import flash.display.*;
import src.comm.*;
import src.timing.*;
import src.math.*;
import flash.external.*;
import flash.system.*;
import flash.text.*;
public class Piece extends MovieClip {
public var mcWood:MovieClip;
public var type;
public var yPos;
public var xPos;
public var gotoY;
public var gotoX;
public var theY;
public var theX;
public var delay;// = 0
public var speed;// = 1
public var collapsing;// = true
public var cfe;// = false
public var isBomb;
public var isFire;
public var isLineBlast;
public var isCoin;// = false
public var running;// = false
public var animAt;// = 1
public var animLength;// = 60
public var animSpeed;// = 1
public var bombAnim;// = 1
public var bombAnimLength;// = 20
public var lineBlastAnim;// = 1
public var lineBlastAnimLength;// = 10
public var fireAnim;// = 1
public var fireAnimLength;// = 39
public var target;
public var rotDeg;
public var targetID;
public var firstLand;// = false
private static var WIDTH = 32;
private static var HEIGHT = 32;
public function Piece(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10){
this.type = _arg1;
this.yPos = _arg2;
this.xPos = _arg3;
this.running = _arg6;
targetID = _arg9;
target = mcWood;
isBomb = _arg4;
isLineBlast = _arg5;
target.mcBlackFire.visible = false;
if (!isBomb){
target.mcBomb.visible = false;
};
if (!isLineBlast){
target.mcLineBlast.visible = false;
};
if (_arg1 == 10){
isCoin = true;
};
if (_arg1 == 9){
target.mcBlackFire.visible = true;
isFire = true;
};
animSpeed = (Math.round((Math.random() * 3)) + 1);
var _local11:* = 0;
if (!_arg6){
_local11 = -60;
};
gotoY = ((_arg2 * HEIGHT) + 100);
gotoX = ((_arg3 * WIDTH) + _arg8);
theY = (40 + _local11);
theX = gotoX;
y = theY;
x = theX;
rotation = (rotDeg = _arg7);
this.delay = delay;
var _local12:* = 0;
if (((((_arg10 % 2) == 0)) && ((_arg1 == 1)))){
_local12 = 3;
};
target.gotoAndStop(((_arg1 + 1) + _local12));
}
public function tick(_arg1:Number, _arg2:Number):void{
}
public function render(_arg1:Number, _arg2:Number):void{
}
public function getSpeed(){
return (speed);
}
public function updateSpeed(){
speed = Math.min((speed + 3), 40);
}
public function land(){
speed = 1;
collapsing = false;
firstLand = true;
}
public function updatePos(_arg1, _arg2){
yPos = _arg1;
xPos = _arg2;
gotoY = ((yPos * HEIGHT) + 100);
gotoX = ((xPos * WIDTH) + 250);
}
}
}//package src
Section 66
//PieceRolling (src.PieceRolling)
package src {
import flash.display.*;
import src.comm.*;
import src.timing.*;
import src.math.*;
import flash.external.*;
import flash.system.*;
import flash.text.*;
public class PieceRolling extends MovieClip {
public var mcWood:MovieClip;
public var type;
public var isBomb;// = false
public var isLineBlast;// = false
public var theY;// = 0
public var theX;// = 0
public var gotoY;
public var gotoX;
public var bombAnim;// = 1
public var bombAnimLength;// = 20
public var lineBlastAnim;// = 1
public var lineBlastAnimLength;// = 10
public var target;
public var targetID;
private var level;
private static var WIDTH = 32;
private static var HEIGHT = 32;
public function PieceRolling(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){
this.level = _arg6;
targetID = _arg5;
target = mcWood;
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.mcBlackFire.visible = false;
var _local7:* = 0;
if (((((_arg6 % 2) == 0)) && ((_arg3 == 1)))){
_local7 = 3;
};
target.gotoAndStop(((_arg3 + 1) + _local7));
}
public function switchType(_arg1:Number, _arg2:Boolean, _arg3:Boolean){
type = _arg1;
isBomb = _arg2;
isLineBlast = _arg3;
target.mcBomb.visible = isBomb;
target.mcLineBlast.visible = isLineBlast;
var _local4:* = 0;
if (((((level % 2) == 0)) && ((type == 1)))){
_local4 = 3;
};
target.gotoAndStop(((type + 1) + _local4));
}
public function makeBomb(){
isBomb = true;
target.mcBomb.visible = true;
isLineBlast = false;
target.mcLineBlast.visible = false;
}
public function makeLineBlast(){
isLineBlast = true;
target.mcLineBlast.visible = true;
isBomb = false;
target.mcBomb.visible = false;
}
}
}//package src
Section 67
//RelaxGameOver (src.RelaxGameOver)
package src {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class RelaxGameOver extends MovieClip {
private var dropTime:int;
public function RelaxGameOver(){
visible = false;
}
public function drop(){
if (!visible){
y = -213;
visible = true;
dropTime = -1;
addEventListener(Event.ENTER_FRAME, enterFrame);
};
}
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);
}
}
}//package src
Section 68
//ScorePop (src.ScorePop)
package src {
import flash.display.*;
import src.comm.*;
import src.timing.*;
import src.math.*;
import flash.external.*;
import flash.system.*;
import flash.text.*;
public class ScorePop extends MovieClip {
public var mcScorePop:MovieClip;
public var animLength;// = 20
public var animAt;// = 1
private var min;// = 50
private var max;// = 1500
public var delay;
public var endScore;
public function ScorePop(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){
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 69
//Slider (src.Slider)
package src {
import flash.display.*;
public class Slider extends MovieClip {
public var mcRight:MovieClip;
public var mcLeft:MovieClip;
public var theX;// = 380
public var theY;// = 37
public var animAt;// = 1
public var switchAnimAt;// = 1
public function Slider(){
x = theX;
y = theY;
}
}
}//package src
Section 70
//GameOverScreen (GameOverScreen)
package {
import flash.display.*;
import flash.text.*;
public dynamic class GameOverScreen extends MovieClip {
public var txtGameOverHeader:TextField;
public var mcScoreText:MovieClip;
public var mcScoreTextLabel:MovieClip;
public var mcTrophies:MovieClip;
public function GameOverScreen(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 71
//LevelNumbers (LevelNumbers)
package {
import flash.display.*;
public dynamic class LevelNumbers extends MovieClip {
public function LevelNumbers(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 72
//MultiNumbers (MultiNumbers)
package {
import flash.display.*;
public dynamic class MultiNumbers extends MovieClip {
public function MultiNumbers(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 73
//Play (Play)
package {
import flash.display.*;
public dynamic class Play extends MovieClip {
}
}//package
Section 74
//ScoreNumbers (ScoreNumbers)
package {
import flash.display.*;
public dynamic class ScoreNumbers extends MovieClip {
public function ScoreNumbers(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 75
//SignupScreen (SignupScreen)
package {
import flash.display.*;
public dynamic class SignupScreen extends MovieClip {
public var mcInner:MovieClip;
public function SignupScreen(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 76
//Splash (Splash)
package {
import flash.display.*;
public dynamic class Splash extends MovieClip {
public function Splash(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 77
//Stone1 (Stone1)
package {
import flash.display.*;
public dynamic class Stone1 extends MovieClip {
}
}//package
Section 78
//Stone2 (Stone2)
package {
import flash.display.*;
public dynamic class Stone2 extends MovieClip {
}
}//package
Section 79
//WaterLevelPiece (WaterLevelPiece)
package {
import flash.display.*;
public dynamic class WaterLevelPiece extends MovieClip {
public function WaterLevelPiece(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package