Section 1
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class AdLoader extends Sprite {
private var contentspotid:String;
private var cpmstarLoader:Loader;
public function AdLoader(_arg1:String){
this.contentspotid = _arg1;
addEventListener(Event.ADDED, addedHandler);
}
private function addedHandler(_arg1:Event):void{
var _local2:String;
var _local3:DisplayObjectContainer;
removeEventListener(Event.ADDED, addedHandler);
Security.allowDomain("server.cpmstar.com");
_local2 = "http://server.cpmstar.com/adviewas3.swf";
_local3 = parent;
cpmstarLoader = new Loader();
cpmstarLoader.contentLoaderInfo.addEventListener(Event.INIT, dispatchHandler);
cpmstarLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dispatchHandler);
cpmstarLoader.load(new URLRequest(((_local2 + "?contentspotid=") + contentspotid)));
addChild(cpmstarLoader);
}
private function dispatchHandler(_arg1:Event):void{
dispatchEvent(_arg1);
}
}
}//package CPMStar
Section 2
//adBox_2 (GAME_fla.adBox_2)
package GAME_fla {
import flash.display.*;
public dynamic class adBox_2 extends MovieClip {
public var sLogo:MovieClip;
}
}//package GAME_fla
Section 3
//arrow_fade_67 (GAME_fla.arrow_fade_67)
package GAME_fla {
import flash.display.*;
public dynamic class arrow_fade_67 extends MovieClip {
public function arrow_fade_67(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package GAME_fla
Section 4
//ClearBtn_54 (GAME_fla.ClearBtn_54)
package GAME_fla {
import flash.display.*;
public dynamic class ClearBtn_54 extends MovieClip {
public function ClearBtn_54(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 5
//closeBtn_82 (GAME_fla.closeBtn_82)
package GAME_fla {
import flash.display.*;
public dynamic class closeBtn_82 extends MovieClip {
public function closeBtn_82(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 6
//credBtn_84 (GAME_fla.credBtn_84)
package GAME_fla {
import flash.display.*;
public dynamic class credBtn_84 extends MovieClip {
public function credBtn_84(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 7
//emptyScreen_7 (GAME_fla.emptyScreen_7)
package GAME_fla {
import flash.display.*;
public dynamic class emptyScreen_7 extends MovieClip {
public function emptyScreen_7(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 8
//Go_75 (GAME_fla.Go_75)
package GAME_fla {
import flash.display.*;
public dynamic class Go_75 extends MovieClip {
public function Go_75(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 9
//leveltxtOkay_79 (GAME_fla.leveltxtOkay_79)
package GAME_fla {
import flash.display.*;
public dynamic class leveltxtOkay_79 extends MovieClip {
public function leveltxtOkay_79(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 10
//loaderBar_5 (GAME_fla.loaderBar_5)
package GAME_fla {
import flash.display.*;
public dynamic class loaderBar_5 extends MovieClip {
public function loaderBar_5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 11
//loadingMC_4 (GAME_fla.loadingMC_4)
package GAME_fla {
import flash.display.*;
public dynamic class loadingMC_4 extends MovieClip {
public var loadMC:MovieClip;
public function loadingMC_4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 12
//loadMapBtn_80 (GAME_fla.loadMapBtn_80)
package GAME_fla {
import flash.display.*;
public dynamic class loadMapBtn_80 extends MovieClip {
public function loadMapBtn_80(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 13
//MainTimeline (GAME_fla.MainTimeline)
package GAME_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import CPMStar.*;
import flash.text.*;
import flash.external.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var mapsArray:Array;
public var loader:MovieClip;
public var Groove:groove;
public var mBox:pBox;
public var ad:DisplayObject;
public var bassThin:bass_thin;
public var customMap:Boolean;
public var _textBox:levelText;
public var soundOnce:Boolean;
public var mapMaker:mapBuild;
public var mapArray:Array;
public var playerMoves:int;
public var CWW:creditsWin;
public var e:int;
public var sndFxChannel:SoundChannel;
public var mcArray:Array;
public var waiting:Boolean;
public var p;
public var tempMC;
public var _muted:Boolean;
public var GameC;
public var winCheck:int;
public var request:URLRequest;
public var sndCollide:Collide;
public var sndVictory:Victory;
public var keyHigh:keys_high;
public var lastObj;
public var CPMStarContentSpotID:String;
public var matchMade:Boolean;
public var adBox:MovieClip;
public var sndSBlock:selectBlock;
public var blockDir:String;
public var _Arrows:Arrows;
public var sndPBlock:editorCellClick;
public var keyChords:keys_chords;
public var endX:int;
public var endY:int;
public var mcDelete:Array;
public var scoreArray:Array;
public var minijuegos:MovieClip;
public var LMW:loadWin;
public var endless:Boolean;
public var currentGame:int;
public var NA_:Array;
public var removeMC:Array;
public var menuButtons:Array;
public var _gameUI;
public var paramObj:Object;
public var soundT:SoundTransform;
public var mySo:SharedObject;
public var _loader:Loader;
public var sndRemoveBlocks:Vanish;
public var musicChannel:SoundChannel;
public var ATarget;
public var Ride:ride;
public var firstSet;
public var mainM;
public var sponBtn:MovieClip;
public var currentPosition:int;
public var api_url:String;
public var walkableCounter:int;
public var kongregate;
public var cMapArray;
public var myTracker:GameTracker;
public var tempPlayerMoves:int;
public var replay:Boolean;
public var tempBtn;
public var sndBtnPress:buttonRelease;
public var bassThick:bass_thick;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function checkIfWon(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
if (!customMap){
_local1 = 0;
while (_local1 < mapArray.length) {
_local3 = 0;
while (_local3 < mapArray[_local1].length) {
if ((((mapArray[_local1][_local3] > 1)) && (!((mapArray[_local1][_local3] == 5))))){
_local4 = 0;
while (_local4 < (_local1 + 1)) {
if (((!((mapArray[_local1][_local3] == mapArray[(_local1 - _local4)][_local3]))) || (((((((((_local1 - _local4) == 0)) && ((_local4 > 1)))) && (!((mapArray[(_local1 + 1)][_local3] == mapArray[_local1][_local3]))))) && ((mapArray[_local1][_local3] == mapArray[(_local1 - _local4)][_local3])))))){
if (((((((((_local1 - _local4) == 0)) && ((_local4 > 1)))) && (!((mapArray[(_local1 + 1)][_local3] == mapArray[_local1][_local3]))))) && ((mapArray[_local1][_local3] == mapArray[(_local1 - _local4)][_local3])))){
_local4++;
};
if (_local1 != 6){
if (mapArray[_local1][_local3] == mapArray[(_local1 + 1)][_local3]){
_local4 = 0;
};
};
if (_local4 > 2){
_local5 = 0;
while (_local5 < _local4) {
_local6 = 0;
while (_local6 < mcArray.length) {
if (((((mcArray[_local6].x / 50) == _local3)) && (((mcArray[_local6].y / 50) == (_local1 - _local5))))){
mcDelete.push(mcArray[_local6]);
};
_local6++;
};
_local5++;
};
};
_local4 = _local1;
};
_local4++;
};
};
fixArray();
if ((((((_local3 > 1)) && ((mapArray[_local1][_local3] > 1)))) && (!((mapArray[_local1][_local3] == 5))))){
_local7 = 0;
while (_local7 < (_local3 + 1)) {
if (((!((mapArray[_local1][_local3] == mapArray[_local1][(_local3 - _local7)]))) || (((((((((_local3 - _local7) == 0)) && ((_local7 > 1)))) && (!((mapArray[_local1][(_local3 + 1)] == mapArray[_local1][_local3]))))) && ((mapArray[_local1][_local3] == mapArray[_local1][(_local3 - _local7)])))))){
if (((((((((_local3 - _local7) == 0)) && ((_local7 > 1)))) && (!((mapArray[_local1][(_local3 + 1)] == mapArray[_local1][_local3]))))) && ((mapArray[_local1][_local3] == mapArray[_local1][(_local3 - _local7)])))){
_local7++;
};
if (_local3 != 8){
if (mapArray[_local1][_local3] == mapArray[_local1][(_local3 + 1)]){
_local7 = 0;
};
};
if (_local7 > 2){
_local8 = 0;
while (_local8 < _local7) {
_local9 = 0;
while (_local9 < mcArray.length) {
if (((((mcArray[_local9].x / 50) == (_local3 - _local8))) && (((mcArray[_local9].y / 50) == _local1)))){
mcDelete.push(mcArray[_local9]);
};
_local9++;
};
_local8++;
};
};
_local7 = _local3;
};
_local7++;
};
};
_local3++;
};
_local1++;
};
if (mcDelete.length > 1){
playSound("removeBlocks");
};
_local2 = 0;
while (_local2 < mcDelete.length) {
if (Boolean(mcDelete[_local2].stage)){
mapArray[(mcDelete[_local2].y / 50)][(mcDelete[_local2].x / 50)] = 0;
_local10 = 0;
while (_local10 < mcArray.length) {
if (mcArray[_local10] == mcDelete[_local2]){
_local11 = addChild(new blockLve());
_local11.x = mcDelete[_local2].x;
_local11.y = mcDelete[_local2].y;
_local11.addEventListener(Event.ENTER_FRAME, removeAt);
GameC.removeChild(mcDelete[_local2]);
mcArray.splice(_local10, 1);
_local10 = (mcArray.length + 1);
};
_local10++;
};
} else {
mcDelete.splice(_local2, 1);
_local2 = -1;
};
_local2++;
};
mcDelete = new Array();
if (!endless){
winCheck = 0;
_local12 = 0;
while (_local12 < mapArray.length) {
_local13 = 0;
while (_local13 < mapArray[_local12].length) {
if ((((mapArray[_local12][_local13] > 1)) && (!((mapArray[_local12][_local13] == 5))))){
winCheck++;
};
_local13++;
};
_local12++;
};
if (winCheck == 0){
playSound("victory");
if ((currentGame + 1) != mapsArray.length){
scoreArray[currentGame] = (5 + (playerMoves - tempPlayerMoves));
if (scoreArray[currentGame] == 5){
askBox("N", 3);
} else {
if (scoreArray[currentGame] == 4){
askBox("N", 2);
} else {
askBox("N", 1);
};
};
mapsArray[currentGame][1] = true;
} else {
scoreArray[currentGame] = (5 + (playerMoves - tempPlayerMoves));
if (scoreArray[currentGame] == 5){
askBox("N", 3);
} else {
if (scoreArray[currentGame] == 4){
askBox("N", 2);
} else {
askBox("N", 1);
};
};
};
kongMessage();
} else {
if (tempPlayerMoves > (playerMoves + 2)){
askBox("R");
} else {
waiting = false;
};
};
};
saveGame();
} else {
_local1 = 0;
while (_local1 < cMapArray.length) {
_local3 = 0;
while (_local3 < cMapArray[_local1].length) {
if ((((cMapArray[_local1][_local3] > 1)) && (!((cMapArray[_local1][_local3] == 5))))){
_local4 = 0;
while (_local4 < (_local1 + 1)) {
if (((!((cMapArray[_local1][_local3] == cMapArray[(_local1 - _local4)][_local3]))) || (((((((((_local1 - _local4) == 0)) && ((_local4 > 1)))) && (!((cMapArray[(_local1 + 1)][_local3] == cMapArray[_local1][_local3]))))) && ((cMapArray[_local1][_local3] == cMapArray[(_local1 - _local4)][_local3])))))){
if (((((((((_local1 - _local4) == 0)) && ((_local4 > 1)))) && (!((cMapArray[(_local1 + 1)][_local3] == cMapArray[_local1][_local3]))))) && ((cMapArray[_local1][_local3] == cMapArray[(_local1 - _local4)][_local3])))){
_local4++;
};
if (_local1 != 6){
if (cMapArray[_local1][_local3] == cMapArray[(_local1 + 1)][_local3]){
_local4 = 0;
};
};
if (_local4 > 2){
_local5 = 0;
while (_local5 < _local4) {
_local6 = 0;
while (_local6 < mcArray.length) {
if (((((mcArray[_local6].x / 50) == _local3)) && (((mcArray[_local6].y / 50) == (_local1 - _local5))))){
mcDelete.push(mcArray[_local6]);
};
_local6++;
};
_local5++;
};
};
_local4 = _local1;
};
_local4++;
};
};
fixArray();
if ((((((_local3 > 1)) && ((cMapArray[_local1][_local3] > 1)))) && (!((cMapArray[_local1][_local3] == 5))))){
_local7 = 0;
while (_local7 < (_local3 + 1)) {
if (((!((cMapArray[_local1][_local3] == cMapArray[_local1][(_local3 - _local7)]))) || (((((((((_local3 - _local7) == 0)) && ((_local7 > 1)))) && (!((cMapArray[_local1][(_local3 + 1)] == cMapArray[_local1][_local3]))))) && ((cMapArray[_local1][_local3] == cMapArray[_local1][(_local3 - _local7)])))))){
if (((((((((_local3 - _local7) == 0)) && ((_local7 > 1)))) && (!((cMapArray[_local1][(_local3 + 1)] == cMapArray[_local1][_local3]))))) && ((cMapArray[_local1][_local3] == cMapArray[_local1][(_local3 - _local7)])))){
_local7++;
};
if (_local3 != 8){
if (cMapArray[_local1][_local3] == cMapArray[_local1][(_local3 + 1)]){
_local7 = 0;
};
};
if (_local7 > 2){
_local8 = 0;
while (_local8 < _local7) {
_local9 = 0;
while (_local9 < mcArray.length) {
if (((((mcArray[_local9].x / 50) == (_local3 - _local8))) && (((mcArray[_local9].y / 50) == _local1)))){
mcDelete.push(mcArray[_local9]);
};
_local9++;
};
_local8++;
};
};
_local7 = _local3;
};
_local7++;
};
};
_local3++;
};
_local1++;
};
if (mcDelete.length > 1){
playSound("removeBlocks");
};
_local2 = 0;
while (_local2 < mcDelete.length) {
if (Boolean(mcDelete[_local2].stage)){
cMapArray[(mcDelete[_local2].y / 50)][(mcDelete[_local2].x / 50)] = 0;
_local10 = 0;
while (_local10 < mcArray.length) {
if (mcArray[_local10] == mcDelete[_local2]){
_local14 = addChild(new blockLve());
_local14.x = mcDelete[_local2].x;
_local14.y = mcDelete[_local2].y;
_local14.addEventListener(Event.ENTER_FRAME, removeAt);
GameC.removeChild(mcDelete[_local2]);
mcArray.splice(_local10, 1);
_local10 = (mcArray.length + 1);
};
_local10++;
};
} else {
mcDelete.splice(_local2, 1);
_local2 = -1;
};
_local2++;
};
mcDelete = new Array();
if (!endless){
winCheck = 0;
_local12 = 0;
while (_local12 < cMapArray.length) {
_local13 = 0;
while (_local13 < cMapArray[_local12].length) {
if ((((cMapArray[_local12][_local13] > 1)) && (!((cMapArray[_local12][_local13] == 5))))){
winCheck++;
};
_local13++;
};
_local12++;
};
if (winCheck == 0){
playSound("victory");
if (((playerMoves - tempPlayerMoves) + 5) == 5){
askBox("N", 3);
} else {
if (((playerMoves - tempPlayerMoves) + 5) == 4){
askBox("N", 2);
} else {
askBox("N", 1);
};
};
} else {
if (tempPlayerMoves > (playerMoves + 2)){
askBox("R");
} else {
waiting = false;
};
};
};
};
}
public function nextList(_arg1:Event){
if (firstSet){
firstSet = false;
} else {
firstSet = true;
};
returnToMM();
lstPuzzles();
}
public function playSound(_arg1:String){
if (!_muted){
switch (_arg1){
case "victory":
sndFxChannel = sndVictory.play();
break;
case "collide":
sndFxChannel = sndCollide.play();
break;
case "selectBlock":
sndFxChannel = sndSBlock.play();
break;
case "placeBlock":
sndFxChannel = sndPBlock.play();
break;
case "removeBlocks":
sndFxChannel = sndRemoveBlocks.play();
break;
case "btnPress":
sndFxChannel = sndBtnPress.play();
break;
};
sndFxChannel.soundTransform = soundT;
};
}
public function loadComplete(_arg1:Event):void{
kongregate = _arg1.target.content;
kongregate.services.connect();
trace(("\n" + kongregate.services));
trace(("\n" + kongregate.user));
trace(("\n" + kongregate.scores));
trace(("\n" + kongregate.stats));
}
public function showLevelTxt(){
if (mapsArray[currentGame].length == 3){
if (_Arrows.stage){
removeChild(_Arrows);
};
if (_textBox.stage){
removeChild(_textBox);
};
stage.addChild(_textBox);
_textBox.textHere.text = mapsArray[currentGame][2];
_textBox.x = 240;
_textBox.y = 187.5;
_textBox.okayBtn.addEventListener(MouseEvent.CLICK, removeThisParent);
addRoll(_textBox.okayBtn);
};
}
function frame3(){
stop();
MochiBot.track(this, "ff0802ac");
mapArray = new Array();
mapsArray = new Array(["0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0x0-2-0-0-0-2-2-0-0x0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0:1", true, "Instructions:\nCollect the gems by moving 3 or more of them together vertically or horizontally. Move the gems by clicking on them and selecting a direction. Just remember, once you choose a direction the gem doesnt stop moving till it hits another block or a wall."], ["0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0x0-0-2-0-0-0-0-0-0x0-3-3-0-3-0-0-0-0x0-0-2-0-0-0-0-0-0x0-0-2-0-0-0-0-0-0:2", false, "Hint:\nRemember, once you place 3 of them vertically or horizontally the gems will disappear to help clear the ones remaining."], ["0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0x0-0-0-0-2-0-0-0-0x0-0-2-2-0-0-0-0-0x0-0-1-1-0-5-0-0-0x0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0:2", false, "Hint:\nIt appears that the miners have left a empty crate down here. Move the crate to help match all the gems."], ["1-1-1-1-1-1-1-1-1x1-1-1-2-1-1-1-1-1x1-1-0-2-1-1-1-1-1x2-0-5-0-2-2-1-1-1x1-1-1-2-1-1-1-1-1x1-1-1-2-1-1-1-1-1x1-1-1-1-1-1-1-1-1:2", false, "Hint:\nSliding blocks in vertical and horizontal rows at the same time will help clear more blocks at once."], ["0-0-0-0-0-0-2-0-0x0-0-0-0-0-0-0-1-0x0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-1-2x0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-1-0x0-0-0-0-0-0-2-0-0:3", false], ["0-0-0-0-0-0-0-0-0x0-0-2-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0x0-4-0-0-0-2-1-0-0x0-0-0-0-0-4-0-0-0x0-0-2-0-0-4-0-0-0x0-0-0-0-0-0-0-0-0:3", false], ["0-0-0-0-0-0-0-0-0x0-0-1-1-1-1-1-0-0x0-0-0-2-0-2-0-0-0x0-0-0-0-0-0-0-0-0x0-0-0-0-2-0-0-0-0x0-1-0-0-2-0-0-1-0x0-0-1-1-1-1-1-0-0:3", false], ["0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0x1-1-1-1-1-1-1-1-1x1-0-4-4-0-4-4-0-1x0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0x4-0-0-0-4-0-0-0-0:3", false, "Hint:\nThis looks a bit tricky. Try seperating the gems into groups of 3."], ["0-0-0-0-0-0-0-0x0-2-2-0-0-0-2-2-0x0-2-0-0-0-0-0-2-0x0-0-0-0-0-0-0-0-0x0-2-0-0-0-0-0-2-0x0-2-2-0-0-0-2-2-0x0-0-0-0-0-0-0-0-0-0:4", false], ["0-0-1-0-0-0-0-0-1x0-1-0-0-3-2-0-1-0x0-0-1-0-3-2-0-0-1x0-3-0-0-0-0-0-0-0x0-1-1-1-1-0-0-0-0x0-0-0-0-0-0-0-0-0x0-0-0-0-0-2-0-0-0:4", false, "Hint:\nLooks like I might be able to use that gold coin to help collect those rubys."], ["1-1-1-1-1-1-1-1-1x1-1-1-1-1-1-1-1-1x1-1-1-5-0-0-1-3-3x1-1-1-1-1-0-2-0-0x1-1-1-5-0-2-1-2-3x1-1-1-1-1-1-1-1-1x1-1-1-1-1-1-1-1-1:5", false], ["5-0-5-0-5-0-5-0-5x0-5-0-5-0-5-0-2-0x5-0-5-0-2-0-2-0-5x0-5-0-3-0-5-0-5-0x5-0-5-0-5-0-5-0-5x0-5-0-3-0-5-0-3-0x5-0-5-0-5-0-5-0-5:5", false], ["0-0-0-0-0-4-0-0-0x0-0-0-0-4-1-0-0-0x0-0-0-0-0-4-0-0-0x0-0-0-0-0-0-0-0-0x0-0-0-4-0-0-0-0-0x0-0-0-1-4-0-0-0-0x0-0-0-4-0-0-0-0-0:4", false], ["0-0-0-0-0-0-0-0-0x0-0-0-0-0-2-2-0-0x0-0-0-0-0-0-2-0-0x0-4-4-5-0-0-0-0-1x0-1-0-0-0-1-0-0-0x0-0-4-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0:5", false], ["5-5-0-0-3-4-4-0-0x0-0-4-0-1-1-1-0-0x0-3-3-0-0-0-0-0-0x1-1-1-0-0-0-0-0-5x0-0-0-0-0-1-1-1-1x0-0-0-1-1-0-0-0-0x0-0-0-0-0-0-0-0-0:5", false], ["1-1-1-1-1-1-1-1-1x1-1-1-1-1-1-1-1-1x1-1-1-1-1-0-1-1-1x1-1-1-1-1-0-1-1-1x1-1-0-5-0-0-2-0-0x1-1-0-2-0-0-5-3-3x1-1-0-5-1-2-3-0-0:5", false], ["0-0-1-2-3-4-1-0-0x0-0-1-2-3-4-1-0-0x0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0x0-0-0-3-4-2-5-0-0x0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0:8", false], ["0-0-5-0-0-0-0-0-0x0-1-0-0-0-0-0-0-0x0-4-0-0-0-0-0-0-0x4-4-0-0-0-0-0-0-0x1-0-1-0-0-0-0-0-0x1-4-0-0-0-0-0-0-0x1-1-0-0-0-0-0-0-0:3", false], ["0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0x0-0-0-0-2-0-0-0-0x0-0-2-0-0-2-0-0-0x0-0-0-2-0-5-0-0-0x0-0-0-2-0-0-0-0-0x0-0-0-0-0-0-0-0-0:3", false, "Hint:\nTry using to crate to help match all 5 blocks at the same time"], ["0-0-2-2-3-4-1-0-0x0-0-1-2-3-4-1-0-0x0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0x0-0-0-3-4-2-5-0-0x0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0:8", false], ["0-0-0-5-0-0-0-0-0x0-2-0-0-0-0-0-0-2x0-1-0-1-1-0-0-0-0x0-1-0-2-1-1-0-1-0x0-0-0-0-0-0-0-1-0x0-0-2-1-1-1-1-1-1x0-0-0-0-0-0-0-0-0:6", false], ["1-1-1-1-1-1-1-1-1x1-0-1-0-1-0-1-0-1x1-0-0-0-2-0-0-0-1x1-1-0-1-2-1-0-1-1x1-0-0-0-0-0-0-0-1x1-1-2-1-2-1-2-1-1x1-0-1-0-1-0-1-0-1:5", false], ["1-1-1-1-1-1-1-1-1x1-1-1-1-2-1-1-1-1x1-1-1-1-3-1-1-1-1x1-1-2-0-2-0-0-1-1x1-1-1-1-3-3-1-1-1x1-1-1-1-0-1-1-1-1x1-1-1-1-1-1-1-1-1:7", false], ["0-0-0-1-0-0-0-0-2x0-0-0-0-0-0-0-0-0x0-2-0-0-0-1-0-0-0x0-0-0-2-2-1-0-0-0x0-0-0-0-0-1-0-0-0x0-0-0-1-0-0-0-0-1x0-0-0-0-2-0-0-0-1:5", false], ["0-0-2-0-0-1-0-0-0x1-2-3-0-0-1-0-0-0x0-0-0-0-0-0-0-1-0x0-0-0-0-0-0-0-0-0x1-1-0-0-0-1-1-0-0x0-0-0-0-0-0-0-0-0x2-2-0-3-3-0-1-1-1:6", false], ["0-0-0-0-0-1-0-0-1x5-0-2-0-0-0-2-0-0x0-2-0-2-0-0-2-0-5x0-0-2-0-0-0-0-0-2x0-0-0-1-1-1-0-0-0x0-0-0-0-0-0-0-0-0x2-0-0-1-0-0-0-0-0:4", false], ["1-1-0-0-0-1-0-0-0x1-0-0-0-0-0-1-0-0x0-0-2-0-1-1-0-0-0x2-0-0-1-1-0-1-0-0x0-2-0-0-2-1-0-0-0x1-0-2-2-0-0-1-0-0x1-1-0-2-0-1-0-0-0:4", false], ["0-5-2-2-0-2-2-0-0x0-0-2-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0x0-0-2-0-0-0-0-0-0x0-0-0-0-2-0-0-0-0x0-0-2-0-0-0-0-0-0x5-0-2-0-2-0-0-0-0:4", false], ["0-0-3-0-3-0-0-0-0x0-2-2-0-2-3-2-2-0x0-0-0-2-0-0-2-0-0x0-0-0-2-0-2-0-0-0x0-0-0-0-2-0-0-0-0x0-0-0-0-2-0-0-0-0x0-0-0-2-0-2-0-0-0:6", false], ["2-1-2-0-0-0-2-1-2x0-2-0-0-0-0-0-2-0x0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0x0-0-0-0-0-0-0-0-0x0-2-0-0-0-0-0-2-0x2-1-2-0-0-0-2-1-2:8", false], ["0-0-0-0-0-4-0-0-0x0-0-4-0-0-0-4-4-0x0-0-0-0-1-0-0-1-0x0-0-4-0-0-4-4-0-0x0-0-4-0-4-4-0-4-0x0-0-0-0-1-0-0-0-0x0-0-0-4-0-4-0-0-0:6", false], ["0-1-0-2-0-0-0-0-0x0-0-0-0-0-0-0-0-0x0-0-0-0-0-1-0-0-1x0-2-0-0-0-1-0-0-0x0-1-0-0-0-0-0-0-0x2-0-0-0-2-0-0-0-2x0-1-1-0-0-0-1-1-0:6", false]);
scoreArray = new Array();
p = 0;
while (p < mapsArray.length) {
scoreArray[p] = 0;
p++;
};
try {
mySo = SharedObject.getLocal("AMP");
} catch(error:Error) {
trace(("SharedObject Error:" + error.toString()));
return;
};
if (mySo.data.scoreA != undefined){
scoreArray = mySo.data.scoreA;
};
if (mySo.data.mapsA != undefined){
e = 0;
while (e < mapsArray.length) {
mapsArray[e][1] = mySo.data.mapsA[e][1];
e++;
};
};
mainM = addChild(new mainMenu());
menuButtons = new Array();
endless = false;
myTracker = new GameTracker();
mapMaker = new mapBuild();
LMW = new loadWin();
CWW = new creditsWin();
cMapArray = new Array();
customMap = false;
NA_ = new Array();
_muted = false;
mainM.puzzlebtn.addEventListener(MouseEvent.CLICK, lstPuzzles);
mainM.credBtn.addEventListener(MouseEvent.CLICK, showCred);
addRoll(mainM.credBtn);
mainM.playMore.addEventListener(MouseEvent.CLICK, sponsorFunc);
mainM.soundBtn.addEventListener(MouseEvent.CLICK, setMusic);
if (_muted){
mainM.soundBtn.gotoAndStop(2);
};
mainM.mapMakerBtn.addEventListener(MouseEvent.CLICK, mapMakerShow);
mainM.loadMapBtn.addEventListener(MouseEvent.CLICK, loadMapD);
addRoll(mainM.puzzlebtn);
addRoll(mainM.playMore);
addRoll(mainM.mapMakerBtn);
addRoll(mainM.loadMapBtn);
firstSet = true;
mcArray = new Array();
_Arrows = new Arrows();
waiting = false;
removeMC = new Array();
matchMade = false;
soundOnce = false;
mcDelete = new Array();
_textBox = new levelText();
mBox = new pBox();
sndVictory = new Victory();
sndCollide = new Collide();
sndSBlock = new selectBlock();
sndPBlock = new editorCellClick();
sndRemoveBlocks = new Vanish();
sndBtnPress = new buttonRelease();
soundT = new SoundTransform();
soundT.volume = 0.2;
bassThick = new bass_thick();
bassThin = new bass_thin();
Groove = new groove();
keyChords = new keys_chords();
keyHigh = new keys_high();
Ride = new ride();
playMusic();
kongMessage();
}
public function loadMapD(_arg1:MouseEvent){
var removeThis:Function;
var loadCustomMap:Function;
var e = _arg1;
removeThis = function (_arg1:MouseEvent){
if (LMW.stage){
removeChild(_arg1.target.parent);
};
};
loadCustomMap = function (_arg1:MouseEvent){
var _local2:*;
if (LMW.stage){
removeChild(mainM);
NA_ = LMW.mapText.text.split(/:/);
cMapArray = NA_[0].split(/x/);
_local2 = 0;
while (_local2 < cMapArray.length) {
cMapArray[_local2] = cMapArray[_local2].split(/-/);
_local2++;
};
tempPlayerMoves = 0;
playerMoves = Number(NA_[1]);
_gameUI = addChild(new gameUI());
_gameUI.returnBtn.addEventListener(MouseEvent.CLICK, returnToMenu);
_gameUI.soundBtn.addEventListener(MouseEvent.CLICK, setMusic);
if (_muted){
_gameUI.soundBtn.gotoAndStop(2);
};
_gameUI._info.text = tempPlayerMoves;
_gameUI.lvlName.text = "CUSTOM GAME";
_gameUI._info2.text = ("" + Number((playerMoves + 3)));
_gameUI.restartBtn.addEventListener(MouseEvent.CLICK, resetMap);
_gameUI.solBtn.addEventListener(MouseEvent.CLICK, linkToSol);
_gameUI.playMoreBtn.addEventListener(MouseEvent.CLICK, sponsorFunc);
addRoll(_gameUI.playMoreBtn);
addRoll(_gameUI.solBtn);
addRoll(_gameUI.restartBtn);
addRoll(_gameUI.returnBtn);
drawMap(cMapArray);
removeChild(LMW);
};
};
customMap = true;
addChild(LMW);
LMW.x = 275;
LMW.y = 200;
LMW._closeBtn.addEventListener(MouseEvent.CLICK, removeThis);
LMW.goBtn.addEventListener(MouseEvent.CLICK, loadCustomMap);
addRoll(LMW.goBtn);
addRoll(LMW._closeBtn);
}
function frame2(){
stage.addEventListener(MouseEvent.CLICK, minijuegosClick);
stage.addEventListener(Event.ENTER_FRAME, minijuegosMain);
}
function frame1(){
stop();
NewgroundsAPI.linkAPI(this);
NewgroundsAPI.connectMovie(7996);
NewgroundsAPI.addCustomEvent(1, "clickedCredits");
NewgroundsAPI.addCustomEvent(2, "beatGame");
NewgroundsAPI.addCustomEvent(3, "gotHalfWay");
CPMStarContentSpotID = "699Q1660F37A";
ad = new AdLoader(CPMStarContentSpotID);
if (Boolean((String(stage.loaderInfo.url).indexOf("kongregate.com") < 1))){
adBox.addChild(ad);
adBox.sLogo.visible = false;
} else {
adBox.sLogo.visible = true;
adBox.sLogo.addEventListener(MouseEvent.CLICK, gotoSponSite);
};
sponBtn.addEventListener(MouseEvent.CLICK, gotoSponSite);
addEventListener(Event.ENTER_FRAME, loading);
paramObj = LoaderInfo(root.loaderInfo).parameters;
api_url = ((paramObj.api_path) || ("http://www.kongregate.com/flash/API_AS3_Local.swf"));
trace(("API path: " + api_url));
request = new URLRequest(api_url);
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
_loader.load(request);
this.addChild(_loader);
}
public function askBox(_arg1:String, _arg2:Number=1){
addChild(mBox);
mBox.x = 240;
mBox.y = 187.5;
mBox.rNextBtn.visible = true;
if (_arg1 == "R"){
mBox.gotoAndStop(2);
replay = true;
if (!customMap){
myTracker.customMsg(("Lost lvl: " + (currentGame + 1)));
};
mBox.rNextBtn2.gotoAndStop(2);
mBox.rNextBtn2.addEventListener(MouseEvent.CLICK, resetMap);
addRoll(mBox.rNextBtn2);
} else {
if (!customMap){
if ((currentGame + 1) != mapsArray.length){
mBox.gotoAndStop(1);
mBox.rNextBtn.gotoAndStop(1);
replay = false;
myTracker.endLevel();
myTracker.customMsg(("Finished lvl: " + (currentGame + 1)));
currentGame++;
mBox.rNextBtn.addEventListener(MouseEvent.CLICK, resetMap);
addRoll(mBox.rNextBtn);
mBox.rNextBtn2.gotoAndStop(2);
mBox.rNextBtn2.addEventListener(MouseEvent.CLICK, resetMap);
addRoll(mBox.rNextBtn2);
} else {
myTracker.customMsg("Beat last lvl");
myTracker.endLevel();
myTracker.endGame();
mBox.gotoAndStop(3);
mBox.rNextBtn.visible = false;
mBox.rNextBtn2.gotoAndStop(2);
mBox.rNextBtn2.addEventListener(MouseEvent.CLICK, resetMap);
addRoll(mBox.rNextBtn2);
addRoll(mBox.rNextBtn);
};
} else {
mBox.gotoAndStop(4);
mBox.rNextBtn2.gotoAndStop(2);
mBox.rNextBtn2.addEventListener(MouseEvent.CLICK, resetMap);
addRoll(mBox.rNextBtn2);
};
};
mBox.trophyMC.gotoAndStop(_arg2);
mBox.menuBtn.addEventListener(MouseEvent.CLICK, returnToMenu);
addRoll(mBox.menuBtn);
}
public function removeThisParent(_arg1:MouseEvent){
stage.removeChild(_textBox);
}
public function returnToMM(_arg1:MouseEvent=null){
var _local2:*;
if (mapMaker.stage){
removeChild(mapMaker);
};
_local2 = 0;
while (_local2 < menuButtons.length) {
removeChild(menuButtons[_local2]);
_local2++;
};
menuButtons = new Array();
mainM.gotoAndStop(1);
mainM.puzzlebtn.addEventListener(MouseEvent.CLICK, lstPuzzles);
mainM.credBtn.addEventListener(MouseEvent.CLICK, showCred);
addRoll(mainM.credBtn);
mainM.playMore.addEventListener(MouseEvent.CLICK, sponsorFunc);
mainM.soundBtn.addEventListener(MouseEvent.CLICK, setMusic);
if (_muted){
mainM.soundBtn.gotoAndStop(2);
};
mainM.mapMakerBtn.addEventListener(MouseEvent.CLICK, mapMakerShow);
mainM.loadMapBtn.addEventListener(MouseEvent.CLICK, loadMapD);
addRoll(mainM.playMore);
addRoll(mainM.puzzlebtn);
addRoll(mainM.mapMakerBtn);
addRoll(mainM.loadMapBtn);
}
public function loop(_arg1:Event){
if (musicChannel != null){
musicChannel.removeEventListener(Event.SOUND_COMPLETE, loop);
playMusic();
};
}
public function addRoll(_arg1):void{
var rollOv:Function;
var rollOu:Function;
var mDown:Function;
var rollOv2:Function;
var rollOu2:Function;
var mDown2:Function;
var rollOv3:Function;
var rollOu3:Function;
var mDown3:Function;
var _obj_ = _arg1;
rollOv = function (_arg1:MouseEvent){
_arg1.target.gotoAndStop(2);
};
rollOu = function (_arg1:MouseEvent){
_arg1.target.gotoAndStop(1);
};
mDown = function (_arg1:MouseEvent){
_arg1.target.gotoAndStop(3);
playSound("btnPress");
};
rollOv2 = function (_arg1:MouseEvent){
if (_arg1.target.name == "rNextBtn"){
_arg1.target.gotoAndStop(5);
} else {
_arg1.target.gotoAndStop(7);
};
};
rollOu2 = function (_arg1:MouseEvent){
if (_arg1.target.name == "rNextBtn"){
_arg1.target.gotoAndStop(1);
} else {
_arg1.target.gotoAndStop(2);
};
};
mDown2 = function (_arg1:MouseEvent){
if (_arg1.target.name == "rNextBtn"){
_arg1.target.gotoAndStop(6);
} else {
_arg1.target.gotoAndStop(8);
};
playSound("btnPress");
};
rollOv3 = function (_arg1:MouseEvent){
if (_arg1.target.currentFrame == 1){
_arg1.target.gotoAndStop(10);
} else {
if (_arg1.target.currentFrame == 2){
_arg1.target.gotoAndStop(5);
};
};
};
rollOu3 = function (_arg1:MouseEvent){
if ((((_arg1.target.currentFrame == 10)) || ((_arg1.target.currentFrame == 11)))){
_arg1.target.gotoAndStop(1);
} else {
if ((((_arg1.target.currentFrame == 5)) || ((_arg1.target.currentFrame == 6)))){
_arg1.target.gotoAndStop(2);
};
};
};
mDown3 = function (_arg1:MouseEvent){
if ((((_arg1.target.currentFrame == 1)) || ((_arg1.target.currentFrame == 10)))){
_arg1.target.gotoAndStop(11);
} else {
if ((((_arg1.target.currentFrame == 2)) || ((_arg1.target.currentFrame == 5)))){
_arg1.target.gotoAndStop(6);
};
};
playSound("btnPress");
};
if (_obj_.name == "nextButton"){
_obj_.addEventListener(MouseEvent.ROLL_OVER, rollOv3);
_obj_.addEventListener(MouseEvent.ROLL_OUT, rollOu3);
_obj_.addEventListener(MouseEvent.MOUSE_DOWN, mDown3);
} else {
if ((((_obj_.name == "rNextBtn")) || ((_obj_.name == "rNextBtn2")))){
_obj_.addEventListener(MouseEvent.ROLL_OVER, rollOv2);
_obj_.addEventListener(MouseEvent.ROLL_OUT, rollOu2);
_obj_.addEventListener(MouseEvent.MOUSE_DOWN, mDown2);
} else {
_obj_.addEventListener(MouseEvent.ROLL_OVER, rollOv);
_obj_.addEventListener(MouseEvent.ROLL_OUT, rollOu);
_obj_.addEventListener(MouseEvent.MOUSE_DOWN, mDown);
};
};
}
public function minijuegosMain(_arg1:Event){
if (minijuegos.currentFrame == minijuegos.totalFrames){
stage.removeEventListener(MouseEvent.CLICK, minijuegosClick);
stage.removeEventListener(Event.ENTER_FRAME, minijuegosMain);
nextFrame();
};
}
public function gotoSponSite(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.minijuegos.com/"), "_BLANK");
}
public function dirMC(_arg1:MouseEvent){
if (((!(waiting)) && (!(_textBox.stage)))){
playSound("selectBlock");
if (_Arrows.stage){
removeChild(_Arrows);
};
addChild(_Arrows);
ATarget = _arg1.target;
if (_arg1.target.currentFrame != 6){
_Arrows.ar.visible = true;
} else {
_Arrows.ar.visible = false;
};
_Arrows.A1.addEventListener(MouseEvent.CLICK, findDirection);
_Arrows.A2.addEventListener(MouseEvent.CLICK, findDirection);
_Arrows.A3.addEventListener(MouseEvent.CLICK, findDirection);
_Arrows.A4.addEventListener(MouseEvent.CLICK, findDirection);
_Arrows.A1.af.gotoAndPlay(1);
_Arrows.A2.af.gotoAndPlay(1);
_Arrows.A3.af.gotoAndPlay(1);
_Arrows.A4.af.gotoAndPlay(1);
_Arrows.x = _arg1.target.x;
_Arrows.y = _arg1.target.y;
_Arrows.A1.visible = true;
_Arrows.A2.visible = true;
_Arrows.A3.visible = true;
_Arrows.A4.visible = true;
if ((_arg1.target.y / 50) == 6){
_Arrows.A3.visible = false;
};
if ((_arg1.target.y / 50) == 0){
_Arrows.A1.visible = false;
};
if ((_arg1.target.x / 50) == 8){
_Arrows.A2.visible = false;
};
if ((_arg1.target.x / 50) == 0){
_Arrows.A4.visible = false;
};
if (!customMap){
if ((_arg1.target.y / 50) != 6){
if (mapArray[((_arg1.target.y / 50) + 1)][(_arg1.target.x / 50)] >= 1){
_Arrows.A3.visible = false;
};
};
if ((_arg1.target.y / 50) != 0){
if (mapArray[((_arg1.target.y / 50) - 1)][(_arg1.target.x / 50)] >= 1){
_Arrows.A1.visible = false;
};
};
if ((_arg1.target.x / 50) != 8){
if (mapArray[(_arg1.target.y / 50)][((_arg1.target.x / 50) + 1)] >= 1){
_Arrows.A2.visible = false;
};
};
if ((_arg1.target.x / 50) != 0){
if (mapArray[(_arg1.target.y / 50)][((_arg1.target.x / 50) - 1)] >= 1){
_Arrows.A4.visible = false;
};
};
} else {
if ((_arg1.target.y / 50) != 6){
if (cMapArray[((_arg1.target.y / 50) + 1)][(_arg1.target.x / 50)] >= 1){
_Arrows.A3.visible = false;
};
};
if ((_arg1.target.y / 50) != 0){
if (cMapArray[((_arg1.target.y / 50) - 1)][(_arg1.target.x / 50)] >= 1){
_Arrows.A1.visible = false;
};
};
if ((_arg1.target.x / 50) != 8){
if (cMapArray[(_arg1.target.y / 50)][((_arg1.target.x / 50) + 1)] >= 1){
_Arrows.A2.visible = false;
};
};
if ((_arg1.target.x / 50) != 0){
if (cMapArray[(_arg1.target.y / 50)][((_arg1.target.x / 50) - 1)] >= 1){
_Arrows.A4.visible = false;
};
};
};
};
}
public function setMusic(_arg1:MouseEvent){
if (_muted){
_muted = false;
playMusic();
_arg1.target.gotoAndStop(1);
} else {
_muted = true;
if (musicChannel != null){
SoundMixer.stopAll();
};
_arg1.target.gotoAndStop(2);
};
}
public function sponsorFunc(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.minijuegos.com/"), "_blank");
}
public function siteLock(_arg1:Array):void{
var _local2:Boolean;
var _local3:*;
_local2 = false;
_local3 = 0;
while (_local3 < _arg1.length) {
if (String(stage.loaderInfo.url).indexOf(_arg1[_local3]) < 1){
if (!_local2){
_local2 = false;
};
} else {
_local2 = true;
};
_local3++;
};
if (!_local2){
root.x = 5000;
root.y = 5000;
};
}
public function linkToSol(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.minijuegos.com/walkthrough/aminerproblem.php"), "_blank");
}
public function loading(_arg1:Event){
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = stage.loaderInfo.bytesTotal;
_local3 = stage.loaderInfo.bytesLoaded;
_local4 = Math.round(((_local3 * 100) / _local2));
loader.loadMC.gotoAndPlay(_local4);
if (_local3 >= _local2){
removeEventListener(Event.ENTER_FRAME, loading);
loader.gotoAndStop(2);
loader.addEventListener(MouseEvent.CLICK, playGame);
};
}
public function moveBlock(_arg1:Event){
switch (blockDir){
case "LEFT":
if ((((ATarget.x < (endX + 35))) && (!(soundOnce)))){
playSound("collide");
soundOnce = true;
};
if (ATarget.x < endX){
soundOnce = false;
ATarget.x = endX;
fixArray();
checkIfWon();
ATarget.removeEventListener(Event.ENTER_FRAME, moveBlock);
} else {
ATarget.x = (ATarget.x - (((ATarget.x - endX) / 2) + 1));
};
break;
case "RIGHT":
if ((((ATarget.x > (endX - 35))) && (!(soundOnce)))){
playSound("collide");
soundOnce = true;
};
if (ATarget.x > endX){
soundOnce = false;
ATarget.x = endX;
fixArray();
checkIfWon();
ATarget.removeEventListener(Event.ENTER_FRAME, moveBlock);
} else {
ATarget.x = (ATarget.x - (((ATarget.x - endX) / 2) - 1));
};
break;
case "UP":
if ((((ATarget.y < (endY + 35))) && (!(soundOnce)))){
playSound("collide");
soundOnce = true;
};
if (ATarget.y < endY){
soundOnce = false;
ATarget.y = endY;
fixArray();
checkIfWon();
ATarget.removeEventListener(Event.ENTER_FRAME, moveBlock);
} else {
ATarget.y = (ATarget.y - (((ATarget.y - endY) / 2) + 1));
};
break;
case "DOWN":
if ((((ATarget.y > (endY - 35))) && (!(soundOnce)))){
playSound("collide");
soundOnce = true;
};
if (ATarget.y > endY){
soundOnce = false;
ATarget.y = endY;
fixArray();
checkIfWon();
ATarget.removeEventListener(Event.ENTER_FRAME, moveBlock);
} else {
ATarget.y = (ATarget.y - (((ATarget.y - endY) / 2) - 1));
};
break;
};
}
public function fixArray(){
var _local1:*;
var _local2:*;
var _local3:*;
if (!customMap){
_local1 = 0;
while (_local1 < mapArray.length) {
_local3 = 0;
while (_local3 < mapArray[_local1].length) {
if (mapArray[_local1][_local3] != 1){
mapArray[_local1][_local3] = 0;
};
_local3++;
};
_local1++;
};
_local2 = 0;
while (_local2 < mcArray.length) {
if (mcArray[_local2].currentFrame != 2){
mapArray[(mcArray[_local2].y / 50)][(mcArray[_local2].x / 50)] = (mcArray[_local2].currentFrame - 1);
};
_local2++;
};
} else {
_local1 = 0;
while (_local1 < cMapArray.length) {
_local3 = 0;
while (_local3 < cMapArray[_local1].length) {
if (cMapArray[_local1][_local3] != 1){
cMapArray[_local1][_local3] = 0;
};
_local3++;
};
_local1++;
};
_local2 = 0;
while (_local2 < mcArray.length) {
if (mcArray[_local2].currentFrame != 2){
cMapArray[(mcArray[_local2].y / 50)][(mcArray[_local2].x / 50)] = (mcArray[_local2].currentFrame - 1);
};
_local2++;
};
};
}
public function kongMessage(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:*;
_local1 = 0;
_local2 = 0;
_local3 = 0;
_local4 = 0;
while (_local4 < mapsArray.length) {
switch (scoreArray[_local4]){
case 5:
_local3++;
break;
case 4:
_local2++;
break;
case 3:
_local1++;
break;
case 2:
_local1++;
break;
};
_local4++;
};
kongregate.stats.submit("GoldAmount", _local3);
if (_local3 > 0){
kongregate.stats.submit("FIRSTGoldtrophy", _local3);
trace("1 GOLD");
};
if (_local3 > 9){
kongregate.stats.submit("10Goldtrophys", _local3);
trace("10 GOLD");
};
if (_local3 > 31){
kongregate.stats.submit("AllGoldtrophys", _local3);
trace("ALL GOLD");
};
if ((((_local3 + _local1) + _local2) / 2) == (mapsArray.length / 2)){
NewgroundsAPI.logCustomEvent("gotHalfWay");
};
if (((_local3 + _local1) + _local2) == mapsArray.length){
kongregate.stats.submit("GAMEFINISHED", ((_local3 + _local1) + _local2));
NewgroundsAPI.logCustomEvent("beatGame");
};
}
public function playGame(_arg1:MouseEvent){
gotoAndStop(2);
}
public function playMusic(){
if (!_muted){
if (musicChannel != null){
musicChannel.stop();
};
if (currentGame > 20){
musicChannel = bassThick.play();
musicChannel = Groove.play();
musicChannel = keyHigh.play();
musicChannel = Ride.play();
} else {
if (currentGame > 13){
musicChannel = bassThick.play();
musicChannel = Groove.play();
musicChannel = keyChords.play();
musicChannel = Ride.play();
} else {
if (currentGame > 6){
musicChannel = bassThin.play();
musicChannel = Groove.play();
musicChannel = keyHigh.play();
musicChannel = Ride.play();
} else {
if (currentGame > 0){
musicChannel = bassThin.play();
musicChannel = Groove.play();
musicChannel = keyChords.play();
musicChannel = Ride.play();
} else {
musicChannel = Groove.play();
musicChannel = Ride.play();
musicChannel = bassThin.play();
};
};
};
};
musicChannel.addEventListener(Event.SOUND_COMPLETE, loop);
};
}
public function removeCWW(_arg1:MouseEvent){
_arg1.target.parent.parent.removeChild(CWW);
}
public function saveGame():void{
mySo = SharedObject.getLocal("AMP");
mySo.data.scoreA = scoreArray;
mySo.data.mapsA = mapsArray;
}
public function mapMakerShow(_arg1:MouseEvent){
if (((!(LMW.stage)) && (!(CWW.stage)))){
mainM.gotoAndStop(3);
addChild(mapMaker);
mainM.returnBtn.addEventListener(MouseEvent.CLICK, returnToMM);
mainM.clearAll.addEventListener(MouseEvent.CLICK, clearMap);
addRoll(mainM.returnBtn);
addRoll(mainM.clearAll);
};
}
public function lstPuzzles(_arg1:MouseEvent=null){
var _local2:*;
if (((!(LMW.stage)) && (!(CWW.stage)))){
mainM.gotoAndStop(2);
addRoll(mainM.nextButton);
if (!firstSet){
mainM.nextButton.gotoAndStop(2);
} else {
mainM.nextButton.gotoAndStop(1);
};
mainM.nextButton.addEventListener(MouseEvent.CLICK, nextList);
_local2 = 0;
while (_local2 < mapsArray.length) {
if (((firstSet) && ((_local2 < 28)))){
tempBtn = addChild(new levelBox());
switch (scoreArray[_local2]){
case 5:
tempBtn.gotoAndStop(4);
break;
case 4:
tempBtn.gotoAndStop(3);
break;
case 3:
tempBtn.gotoAndStop(2);
break;
case 2:
tempBtn.gotoAndStop(2);
break;
};
tempBtn.numBox.text = (_local2 + 1);
if (_local2 > 20){
tempBtn.y = (tempBtn.y + 260);
tempBtn.x = (tempBtn.x - ((1445 - (_local2 * 75)) + 65));
} else {
if (_local2 > 13){
tempBtn.y = (tempBtn.y + 200);
tempBtn.x = (tempBtn.x - ((920 - (_local2 * 75)) + 65));
} else {
if (_local2 > 6){
tempBtn.y = (tempBtn.y + 140);
tempBtn.x = (tempBtn.x - ((395 - (_local2 * 75)) + 65));
} else {
tempBtn.y = (tempBtn.y + 75);
tempBtn.x = (tempBtn.x + ((_local2 * 75) + 65));
};
};
};
menuButtons.push(tempBtn);
if (mapsArray[_local2][1]){
tempBtn.xNo.gotoAndStop(1);
tempBtn.addEventListener(MouseEvent.CLICK, playMap);
} else {
tempBtn.xNo.gotoAndStop(2);
};
} else {
if (((!(firstSet)) && ((_local2 > 27)))){
tempBtn = addChild(new levelBox());
switch (scoreArray[_local2]){
case 5:
tempBtn.gotoAndStop(4);
break;
case 4:
tempBtn.gotoAndStop(3);
break;
case 3:
tempBtn.gotoAndStop(2);
break;
case 2:
tempBtn.gotoAndStop(2);
break;
};
tempBtn.numBox.text = (_local2 + 1);
if (_local2 > 48){
tempBtn.y = (tempBtn.y + 260);
tempBtn.x = (tempBtn.x - (((1445 - (_local2 * 75)) + 65) + 2100));
} else {
if (_local2 > 41){
tempBtn.y = (tempBtn.y + 200);
tempBtn.x = (tempBtn.x - (((920 - (_local2 * 75)) + 65) + 2100));
} else {
if (_local2 > 34){
tempBtn.y = (tempBtn.y + 140);
tempBtn.x = (tempBtn.x - (((395 - (_local2 * 75)) + 65) + 2100));
} else {
tempBtn.y = (tempBtn.y + 75);
tempBtn.x = (tempBtn.x + (((_local2 * 75) + 65) - 2100));
};
};
};
menuButtons.push(tempBtn);
if (mapsArray[_local2][1]){
tempBtn.xNo.gotoAndStop(1);
tempBtn.addEventListener(MouseEvent.CLICK, playMap);
} else {
tempBtn.xNo.gotoAndStop(2);
};
};
};
mainM.returnBtn.addEventListener(MouseEvent.CLICK, returnToMM);
mainM.soundBtn.addEventListener(MouseEvent.CLICK, setMusic);
if (_muted){
mainM.soundBtn.gotoAndStop(2);
};
addRoll(mainM.returnBtn);
_local2++;
};
};
}
public function drawMap(_arg1:Array){
var _local2:*;
var _local3:*;
waiting = false;
GameC = addChild(new GameContainer());
GameC.x = 12.1;
GameC.y = 12.1;
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = 0;
while (_local3 < _arg1[_local2].length) {
_arg1[_local2][_local3] = parseInt(_arg1[_local2][_local3]);
if (_arg1[_local2][_local3] > 0){
tempMC = GameC.addChild(new Block());
mcArray.push(tempMC);
tempMC.y = (50 * _local2);
tempMC.x = (50 * _local3);
tempMC.gotoAndStop((_arg1[_local2][_local3] + 1));
if (((((((((_arg1[_local2][_local3] + 1) == 3)) || (((_arg1[_local2][_local3] + 1) == 4)))) || (((_arg1[_local2][_local3] + 1) == 5)))) || (((_arg1[_local2][_local3] + 1) == 6)))){
tempMC.addEventListener(MouseEvent.CLICK, dirMC);
};
};
_local3++;
};
_local2++;
};
}
public function minijuegosClick(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.minijuegos.com/"), "_BLANK");
}
public function playMap(_arg1:MouseEvent){
var _local2:*;
var _local3:*;
if (customMap){
customMap = false;
};
_local2 = 0;
while (_local2 < menuButtons.length) {
removeChild(menuButtons[_local2]);
_local2++;
};
menuButtons = new Array();
if (mainM.stage){
removeChild(mainM);
};
if (_arg1.target.name == "numBox"){
currentGame = (_arg1.target.text - 1);
NA_ = mapsArray[currentGame][0].split(/:/);
mapArray = NA_[0].split(/x/);
} else {
currentGame = (_arg1.target.numBox.text - 1);
NA_ = mapsArray[currentGame][0].split(/:/);
mapArray = NA_[0].split(/x/);
};
showLevelTxt();
myTracker.beginLevel((currentGame + 1));
myTracker.customMsg(("Plyr strt LvL: " + (currentGame + 1)));
_local3 = 0;
while (_local3 < mapArray.length) {
mapArray[_local3] = mapArray[_local3].split(/-/);
_local3++;
};
tempPlayerMoves = 0;
playerMoves = Number(NA_[1]);
_gameUI = addChild(new gameUI());
_gameUI.returnBtn.addEventListener(MouseEvent.CLICK, returnToMenu);
_gameUI.soundBtn.addEventListener(MouseEvent.CLICK, setMusic);
if (_muted){
_gameUI.soundBtn.gotoAndStop(2);
};
_gameUI._info.text = tempPlayerMoves;
_gameUI._info2.text = ("" + Number((playerMoves + 3)));
_gameUI.lvlName.text = ("Level " + Number((currentGame + 1)));
_gameUI.restartBtn.addEventListener(MouseEvent.CLICK, resetMap);
_gameUI.solBtn.addEventListener(MouseEvent.CLICK, linkToSol);
_gameUI.playMoreBtn.addEventListener(MouseEvent.CLICK, sponsorFunc);
addRoll(_gameUI.playMoreBtn);
addRoll(_gameUI.solBtn);
addRoll(_gameUI.restartBtn);
addRoll(_gameUI.returnBtn);
drawMap(mapArray);
}
public function resetMap(_arg1:MouseEvent=null){
var _local2:*;
replay = false;
if (!_textBox.stage){
if (_Arrows.stage){
removeChild(_Arrows);
};
if (!customMap){
removeChild(GameC);
removeChild(_gameUI);
mcArray = new Array();
if (_arg1.target.name == "restartBtn"){
replay = true;
};
if ((((_arg1.target.name == "rNextBtn2")) && ((_arg1.target.parent.currentFrame == 1)))){
currentGame--;
trace(currentGame);
};
if (!replay){
showLevelTxt();
};
NA_ = mapsArray[currentGame][0].split(/:/);
mapArray = NA_[0].split(/x/);
_local2 = 0;
while (_local2 < mapArray.length) {
mapArray[_local2] = mapArray[_local2].split(/-/);
_local2++;
};
tempPlayerMoves = 0;
playerMoves = Number(NA_[1]);
_gameUI = addChild(new gameUI());
_gameUI.returnBtn.addEventListener(MouseEvent.CLICK, returnToMenu);
_gameUI.soundBtn.addEventListener(MouseEvent.CLICK, setMusic);
if (_muted){
_gameUI.soundBtn.gotoAndStop(2);
};
_gameUI._info.text = tempPlayerMoves;
_gameUI._info2.text = ("" + Number((playerMoves + 3)));
_gameUI.lvlName.text = ("Level " + Number((currentGame + 1)));
_gameUI.restartBtn.addEventListener(MouseEvent.CLICK, resetMap);
_gameUI.solBtn.addEventListener(MouseEvent.CLICK, linkToSol);
_gameUI.playMoreBtn.addEventListener(MouseEvent.CLICK, sponsorFunc);
addRoll(_gameUI.playMoreBtn);
addRoll(_gameUI.solBtn);
addRoll(_gameUI.restartBtn);
addRoll(_gameUI.returnBtn);
drawMap(mapArray);
if (mBox.stage){
removeChild(mBox);
};
if (!replay){
myTracker.beginLevel((currentGame + 1));
myTracker.customMsg(("Plyr strt LvL: " + (currentGame + 1)));
} else {
myTracker.customMsg(("Plyr reset map: " + (currentGame + 1)));
};
} else {
removeChild(GameC);
removeChild(_gameUI);
mcArray = new Array();
NA_ = LMW.mapText.text.split(/:/);
cMapArray = NA_[0].split(/x/);
_local2 = 0;
while (_local2 < cMapArray.length) {
cMapArray[_local2] = cMapArray[_local2].split(/-/);
_local2++;
};
tempPlayerMoves = 0;
playerMoves = Number(NA_[1]);
_gameUI = addChild(new gameUI());
_gameUI.returnBtn.addEventListener(MouseEvent.CLICK, returnToMenu);
_gameUI.soundBtn.addEventListener(MouseEvent.CLICK, setMusic);
if (_muted){
_gameUI.soundBtn.gotoAndStop(2);
};
_gameUI._info.text = tempPlayerMoves;
_gameUI._info2.text = ("" + (playerMoves + 3));
if (mBox.stage){
removeChild(mBox);
};
_gameUI.restartBtn.addEventListener(MouseEvent.CLICK, resetMap);
_gameUI.solBtn.addEventListener(MouseEvent.CLICK, linkToSol);
_gameUI.playMoreBtn.addEventListener(MouseEvent.CLICK, sponsorFunc);
addRoll(_gameUI.playMoreBtn);
addRoll(_gameUI.solBtn);
addRoll(_gameUI.restartBtn);
addRoll(_gameUI.returnBtn);
drawMap(cMapArray);
};
};
}
public function findDirection(_arg1:MouseEvent){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
tempPlayerMoves++;
_gameUI._info.text = tempPlayerMoves;
waiting = true;
walkableCounter = 0;
endX = 0;
endY = 0;
removeChild(_Arrows);
if (_arg1.currentTarget == _Arrows.A1){
blockDir = "UP";
} else {
if (_arg1.currentTarget == _Arrows.A2){
blockDir = "RIGHT";
} else {
if (_arg1.currentTarget == _Arrows.A3){
blockDir = "DOWN";
} else {
if (_arg1.currentTarget == _Arrows.A4){
blockDir = "LEFT";
};
};
};
};
if (!customMap){
if (blockDir == "UP"){
_local2 = 1;
while (_local2 < ((ATarget.y / 50) + 1)) {
if (mapArray[((ATarget.y / 50) - _local2)][(ATarget.x / 50)] == 0){
walkableCounter++;
} else {
if (walkableCounter > 0){
_local2 = ((ATarget.y / 50) + 1);
};
};
_local2++;
};
endY = (ATarget.y - (walkableCounter * 50));
} else {
if (blockDir == "DOWN"){
_local3 = 1;
while (_local3 < ((6 - (ATarget.y / 50)) + 1)) {
if (mapArray[((ATarget.y / 50) + _local3)][(ATarget.x / 50)] == 0){
walkableCounter++;
} else {
if (walkableCounter > 0){
_local3 = (6 - (ATarget.y / 50));
};
};
_local3++;
};
endY = (ATarget.y + (walkableCounter * 50));
} else {
if (blockDir == "LEFT"){
_local4 = 1;
while (_local4 < ((ATarget.x / 50) + 1)) {
if (mapArray[(ATarget.y / 50)][((ATarget.x / 50) - _local4)] == 0){
walkableCounter++;
} else {
if (walkableCounter > 0){
_local4 = ((ATarget.x / 50) + 1);
};
};
_local4++;
};
endX = (ATarget.x - (walkableCounter * 50));
} else {
if (blockDir == "RIGHT"){
_local5 = 1;
while (_local5 < ((8 - (ATarget.x / 50)) + 1)) {
if (mapArray[(ATarget.y / 50)][((ATarget.x / 50) + _local5)] == 0){
walkableCounter++;
} else {
if (walkableCounter > 0){
_local5 = (8 - (ATarget.x / 50));
};
};
_local5++;
};
endX = (ATarget.x + (walkableCounter * 50));
};
};
};
};
} else {
if (blockDir == "UP"){
_local2 = 1;
while (_local2 < ((ATarget.y / 50) + 1)) {
if (cMapArray[((ATarget.y / 50) - _local2)][(ATarget.x / 50)] == 0){
walkableCounter++;
} else {
if (walkableCounter > 0){
_local2 = ((ATarget.y / 50) + 1);
};
};
_local2++;
};
endY = (ATarget.y - (walkableCounter * 50));
} else {
if (blockDir == "DOWN"){
_local3 = 1;
while (_local3 < ((6 - (ATarget.y / 50)) + 1)) {
if (cMapArray[((ATarget.y / 50) + _local3)][(ATarget.x / 50)] == 0){
walkableCounter++;
} else {
if (walkableCounter > 0){
_local3 = (6 - (ATarget.y / 50));
};
};
_local3++;
};
endY = (ATarget.y + (walkableCounter * 50));
} else {
if (blockDir == "LEFT"){
_local4 = 1;
while (_local4 < ((ATarget.x / 50) + 1)) {
if (cMapArray[(ATarget.y / 50)][((ATarget.x / 50) - _local4)] == 0){
walkableCounter++;
} else {
if (walkableCounter > 0){
_local4 = ((ATarget.x / 50) + 1);
};
};
_local4++;
};
endX = (ATarget.x - (walkableCounter * 50));
} else {
if (blockDir == "RIGHT"){
_local5 = 1;
while (_local5 < ((8 - (ATarget.x / 50)) + 1)) {
if (cMapArray[(ATarget.y / 50)][((ATarget.x / 50) + _local5)] == 0){
walkableCounter++;
} else {
if (walkableCounter > 0){
_local5 = (8 - (ATarget.x / 50));
};
};
_local5++;
};
endX = (ATarget.x + (walkableCounter * 50));
};
};
};
};
};
ATarget.addEventListener(Event.ENTER_FRAME, moveBlock);
}
public function returnToMenu(_arg1:MouseEvent){
if (_textBox.stage){
stage.removeChild(_textBox);
};
if (_Arrows.stage){
removeChild(_Arrows);
};
removeChild(GameC);
mainM = addChild(new mainMenu());
lstPuzzles();
mcArray = new Array();
removeChild(_gameUI);
if (mBox.stage){
removeChild(mBox);
};
if (!customMap){
if (_arg1.target.name == "returnBtn"){
myTracker.customMsg((("End LvL " + (currentGame + 1)) + "-> MENU"));
} else {
myTracker.customMsg((("End LvL " + (currentGame + 1)) + "-> MENU"));
};
myTracker.endLevel();
};
if (customMap){
returnToMM();
};
}
public function clearMap(_arg1:MouseEvent){
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = _arg1.target.parent.parent.mapMaker;
_local2.bMapArray = new Array([0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]);
_local2.mapString.text = "";
p = 0;
while (p < _local2.bHolder.length) {
_local2.bHolder[p].gotoAndStop(1);
p++;
};
_local3 = 0;
while (_local3 < _local2.bMapArray.length) {
_local4 = 0;
while (_local4 < _local2.bMapArray[_local3].length) {
if (_local4 > 0){
_local2.mapString.appendText("-");
};
_local2.mapString.appendText(_local2.bMapArray[_local3][_local4]);
_local4++;
};
if (_local3 != (_local2.bMapArray.length - 1)){
_local2.mapString.appendText("x");
};
_local3++;
};
}
public function removeAt(_arg1:Event){
if (_arg1.target.currentFrame == _arg1.target.totalFrames){
_arg1.target.removeEventListener(Event.ENTER_FRAME, removeAt);
_arg1.target.parent.removeChild(_arg1.target);
};
}
public function showCred(_arg1:MouseEvent){
NewgroundsAPI.logCustomEvent("clickedCredits");
addChild(CWW);
CWW.x = 100;
CWW.y = 85;
CWW.okayBtn.addEventListener(MouseEvent.CLICK, removeCWW);
}
}
}//package GAME_fla
Section 14
//mapMakerBtn_56 (GAME_fla.mapMakerBtn_56)
package GAME_fla {
import flash.display.*;
public dynamic class mapMakerBtn_56 extends MovieClip {
public function mapMakerBtn_56(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 15
//menuBtn_57 (GAME_fla.menuBtn_57)
package GAME_fla {
import flash.display.*;
public dynamic class menuBtn_57 extends MovieClip {
public function menuBtn_57(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 16
//nextArrow_58 (GAME_fla.nextArrow_58)
package GAME_fla {
import flash.display.*;
public dynamic class nextArrow_58 extends MovieClip {
public function nextArrow_58(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 17
//playMG_59 (GAME_fla.playMG_59)
package GAME_fla {
import flash.display.*;
public dynamic class playMG_59 extends MovieClip {
public function playMG_59(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 18
//playMoreBtn_60 (GAME_fla.playMoreBtn_60)
package GAME_fla {
import flash.display.*;
public dynamic class playMoreBtn_60 extends MovieClip {
public function playMoreBtn_60(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 19
//puzzleModebtn_61 (GAME_fla.puzzleModebtn_61)
package GAME_fla {
import flash.display.*;
public dynamic class puzzleModebtn_61 extends MovieClip {
public function puzzleModebtn_61(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 20
//restartBtn_63 (GAME_fla.restartBtn_63)
package GAME_fla {
import flash.display.*;
public dynamic class restartBtn_63 extends MovieClip {
public function restartBtn_63(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 21
//returnBtn_64 (GAME_fla.returnBtn_64)
package GAME_fla {
import flash.display.*;
public dynamic class returnBtn_64 extends MovieClip {
public function returnBtn_64(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 22
//solutionBtn_65 (GAME_fla.solutionBtn_65)
package GAME_fla {
import flash.display.*;
public dynamic class solutionBtn_65 extends MovieClip {
public function solutionBtn_65(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 23
//sound_Btn_66 (GAME_fla.sound_Btn_66)
package GAME_fla {
import flash.display.*;
public dynamic class sound_Btn_66 extends MovieClip {
public function sound_Btn_66(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GAME_fla
Section 24
//Arrow_Swap (Arrow_Swap)
package {
import flash.display.*;
public dynamic class Arrow_Swap extends MovieClip {
public var af:MovieClip;
public function Arrow_Swap(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 25
//Arrows (Arrows)
package {
import flash.display.*;
public dynamic class Arrows extends MovieClip {
public var A1:Arrow_Swap;
public var A3:Arrow_Swap;
public var A4:Arrow_Swap;
public var A2:Arrow_Swap;
public var ar:MovieClip;
}
}//package
Section 26
//bass_thick (bass_thick)
package {
import flash.media.*;
public dynamic class bass_thick extends Sound {
}
}//package
Section 27
//bass_thin (bass_thin)
package {
import flash.media.*;
public dynamic class bass_thin extends Sound {
}
}//package
Section 28
//Block (Block)
package {
import flash.display.*;
public dynamic class Block extends MovieClip {
}
}//package
Section 29
//blockLve (blockLve)
package {
import flash.display.*;
public dynamic class blockLve extends MovieClip {
public function blockLve(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package
Section 30
//buttonRelease (buttonRelease)
package {
import flash.media.*;
public dynamic class buttonRelease extends Sound {
}
}//package
Section 31
//Collide (Collide)
package {
import flash.media.*;
public dynamic class Collide extends Sound {
}
}//package
Section 32
//creditsWin (creditsWin)
package {
import flash.display.*;
public dynamic class creditsWin extends MovieClip {
public var okayBtn:MovieClip;
}
}//package
Section 33
//editorCellClick (editorCellClick)
package {
import flash.media.*;
public dynamic class editorCellClick extends Sound {
}
}//package
Section 34
//GameContainer (GameContainer)
package {
import flash.display.*;
public dynamic class GameContainer extends MovieClip {
}
}//package
Section 35
//GameTracker (GameTracker)
package {
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.external.*;
public class GameTracker extends EventDispatcher {
protected var _responder:Responder;// = null
protected var _conn:NetConnection;// = null
protected var _inLevel:Boolean;// = false
protected var _serviceName:String;// = ""
protected var _passphrase:String;// = ""
protected var _sessionID:uint;
protected var _isEnabled:Boolean;// = false
protected var _serverVersionMinor:int;// = 0
protected var _serverVersionMajor:int;// = 0
protected var _timer:Timer;// = null
protected var _currentGame:int;// = 1
protected var _inGame:Boolean;// = false
protected var _hostUrl:String;// = ""
protected var _currentLevel:int;// = 0
protected var _msg_queue:Array;
public static const GAMETRACKER_SERVER_ERROR:String = "gametracker_server_error";
private static const TIMER_DELAY:int = 15000;
public static const GAMETRACKER_CODING_ERROR:String = "gametracker_coding_error";
public function GameTracker(){
_timer = null;
_currentGame = 1;
_currentLevel = 0;
_inGame = false;
_inLevel = false;
_msg_queue = new Array();
_conn = null;
_responder = null;
_isEnabled = false;
_serverVersionMajor = 0;
_serverVersionMinor = 0;
_hostUrl = "";
_serviceName = "";
_passphrase = "";
super();
setGlobalConfig();
if (_isEnabled){
_responder = new Responder(onSuccess, onNetworkingError);
_conn = new NetConnection();
_conn.connect(_hostUrl);
_timer = new Timer(TIMER_DELAY);
_timer.addEventListener("timer", onTimer);
_timer.start();
_sessionID = Math.floor((new Date().getTime() / 1000));
addToMsgQueue("begin_app", null, 0, null, null);
};
}
public function checkpoint(_arg1:Number=0, _arg2:String=null, _arg3:String=null):void{
if (!_inGame){
dispatchEvent(new GameTrackerErrorEvent(GAMETRACKER_CODING_ERROR, "checkpoint() called before startGame() was called!"));
} else {
addToMsgQueue("checkpoint", null, _arg1, _arg2, _arg3);
};
}
protected function onNetworkingError(_arg1):void{
dispatchEvent(new GameTrackerErrorEvent(GAMETRACKER_SERVER_ERROR, "Networking error"));
}
protected function onSuccess(_arg1):void{
if (_arg1.toString() != ""){
dispatchEvent(new GameTrackerErrorEvent(GAMETRACKER_SERVER_ERROR, _arg1.toString()));
};
}
protected function onTimer(_arg1:TimerEvent):void{
submitMsgQueue();
}
protected function addToMsgQueue(_arg1:String, _arg2:String, _arg3:Number, _arg4:String, _arg5:String):void{
var _local6:Object;
if (_isEnabled){
_local6 = new Object();
_local6["action"] = _arg1;
_local6["custom_action"] = _arg2;
_local6["session_id"] = _sessionID;
_local6["game_idx"] = _currentGame;
_local6["level"] = _currentLevel;
_local6["score"] = _arg3;
_local6["game_state"] = _arg4;
_local6["time"] = Math.floor((new Date().getTime() / 1000));
_local6["msg"] = _arg5;
_msg_queue.push(_local6);
};
}
public function isEnabled():Boolean{
return (_isEnabled);
}
public function beginGame(_arg1:Number=0, _arg2:String=null, _arg3:String=null):void{
if (_inGame){
endGame(_arg1, _arg2, "AUTO:(this game automatically ended when new game was started)");
};
_currentGame++;
_inGame = true;
addToMsgQueue("begin_game", null, _arg1, _arg2, _arg3);
}
protected function submitMsgQueue():void{
var _local1:Object;
if (((_isEnabled) && ((_msg_queue.length > 0)))){
_local1 = new Object();
_local1["actions"] = _msg_queue;
_local1["identifier"] = _passphrase;
_conn.call(_serviceName, _responder, _local1);
_msg_queue = new Array();
};
}
protected function setGlobalConfig():void{
var ret:Array;
_isEnabled = false;
_serverVersionMajor = 0;
_serverVersionMinor = 0;
_hostUrl = "";
_serviceName = "";
_passphrase = "";
try {
if (ExternalInterface.available){
ret = ExternalInterface.call("get_gametracker_info");
_serverVersionMajor = ret[0];
_serverVersionMinor = ret[1];
_hostUrl = ret[2];
_serviceName = ret[3];
_passphrase = ret[4];
_isEnabled = (_serverVersionMajor == 1);
};
} catch(e) {
};
}
public function customMsg(_arg1:String, _arg2:Number=0, _arg3:String=null, _arg4:String=null):void{
addToMsgQueue("custom", _arg1, _arg2, _arg3, _arg4);
}
public function beginLevel(_arg1:int, _arg2:Number=0, _arg3:String=null, _arg4:String=null):void{
if (!_inGame){
dispatchEvent(new GameTrackerErrorEvent(GAMETRACKER_CODING_ERROR, "beginLevel() called before beginGame() was called!"));
} else {
if (_inLevel){
endLevel(_arg2, _arg3, "AUTO:(this level automatically ended when new level was started)");
} else {
_currentLevel = _arg1;
_inLevel = true;
addToMsgQueue("begin_level", null, _arg2, _arg3, _arg4);
};
};
}
public function alert(_arg1:Number=0, _arg2:String=null, _arg3:String=null):void{
addToMsgQueue("alert", null, _arg1, _arg2, _arg3);
submitMsgQueue();
}
public function endLevel(_arg1:Number=0, _arg2:String=null, _arg3:String=null):void{
if (!_inLevel){
dispatchEvent(new GameTrackerErrorEvent(GAMETRACKER_CODING_ERROR, "endLevel() called before beginLevel() was called!"));
} else {
_inLevel = false;
addToMsgQueue("end_level", null, _arg1, _arg2, _arg3);
};
}
public function endGame(_arg1:Number=0, _arg2:String=null, _arg3:String=null):void{
if (!_inGame){
dispatchEvent(new GameTrackerErrorEvent(GAMETRACKER_CODING_ERROR, "endGame() called before beginGame() was called!"));
} else {
if (_inLevel){
endLevel(_arg1, _arg2, "AUTO:(this level automatically ended when game ended)");
};
addToMsgQueue("end_game", null, _arg1, _arg2, _arg3);
_inGame = false;
submitMsgQueue();
};
}
}
}//package
Section 36
//GameTrackerErrorEvent (GameTrackerErrorEvent)
package {
import flash.events.*;
public class GameTrackerErrorEvent extends Event {
public var _msg:String;
public function GameTrackerErrorEvent(_arg1:String, _arg2:String){
_msg = _arg2;
super(_arg1, false, false);
}
}
}//package
Section 37
//gameUI (gameUI)
package {
import flash.display.*;
import flash.text.*;
public dynamic class gameUI extends MovieClip {
public var playMoreBtn:MovieClip;
public var returnBtn:MovieClip;
public var _info2:TextField;
public var solBtn:MovieClip;
public var _info:TextField;
public var soundBtn:MovieClip;
public var restartBtn:MovieClip;
public var lvlName:TextField;
}
}//package
Section 38
//groove (groove)
package {
import flash.media.*;
public dynamic class groove extends Sound {
}
}//package
Section 39
//keys_chords (keys_chords)
package {
import flash.media.*;
public dynamic class keys_chords extends Sound {
}
}//package
Section 40
//keys_high (keys_high)
package {
import flash.media.*;
public dynamic class keys_high extends Sound {
}
}//package
Section 41
//levelBox (levelBox)
package {
import flash.display.*;
import flash.text.*;
public dynamic class levelBox extends MovieClip {
public var xNo:MovieClip;
public var numBox:TextField;
public function levelBox(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 42
//levelText (levelText)
package {
import flash.display.*;
import flash.text.*;
public dynamic class levelText extends MovieClip {
public var okayBtn:MovieClip;
public var textHere:TextField;
}
}//package
Section 43
//loadWin (loadWin)
package {
import flash.display.*;
import flash.text.*;
public dynamic class loadWin extends MovieClip {
public var goBtn:MovieClip;
public var mapText:TextField;
public var _closeBtn:MovieClip;
}
}//package
Section 44
//mainMenu (mainMenu)
package {
import flash.display.*;
public dynamic class mainMenu extends MovieClip {
public var nextButton:MovieClip;
public var returnBtn:MovieClip;
public var clearAll:MovieClip;
public var mapMakerBtn:MovieClip;
public var credBtn:MovieClip;
public var puzzlebtn:MovieClip;
public var playMore:MovieClip;
public var soundBtn:MovieClip;
public var loadMapBtn:MovieClip;
public var endlessbtn:MovieClip;
public function mainMenu(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 45
//mapBuild (mapBuild)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.external.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class mapBuild extends MovieClip {
public var movesText:TextField;
public var i;
public var j;
public var Blocks;
public var mapString:TextField;
public var bHolder:Array;
public var bMapArray:Array;
public function mapBuild(){
addFrameScript(0, frame1);
}
function frame1(){
bMapArray = new Array([0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]);
bHolder = new Array();
i = 0;
while (i < bMapArray.length) {
j = 0;
while (j < bMapArray[i].length) {
Blocks = addChild(new mmBlock());
Blocks.x = (j * 50);
Blocks.y = (i * 50);
bHolder.push(Blocks);
Blocks.gotoAndStop((bMapArray[i][j] + 1));
Blocks.addEventListener(MouseEvent.CLICK, changeFrame);
j++;
};
i++;
};
movesText.addEventListener(Event.CHANGE, updateString);
}
public function changeFrame(_arg1:MouseEvent){
_arg1.target.parent.parent.playSound("placeBlock");
if (_arg1.target.currentFrame == _arg1.target.totalFrames){
_arg1.target.gotoAndStop(1);
bMapArray[(_arg1.target.y / 50)][(_arg1.target.x / 50)] = (_arg1.target.currentFrame - 1);
writeString();
} else {
_arg1.target.nextFrame();
bMapArray[(_arg1.target.y / 50)][(_arg1.target.x / 50)] = (_arg1.target.currentFrame - 1);
writeString();
};
}
public function updateString(_arg1:Event){
mapString.text = "";
if (movesText.text == ""){
movesText.text = "1";
};
i = 0;
while (i < bMapArray.length) {
j = 0;
while (j < bMapArray[i].length) {
if (j > 0){
mapString.appendText("-");
};
mapString.appendText(bMapArray[i][j]);
j++;
};
if (i != (bMapArray.length - 1)){
mapString.appendText("x");
};
i++;
};
mapString.appendText((":" + movesText.text));
}
public function writeString(){
mapString.text = "";
i = 0;
while (i < bMapArray.length) {
j = 0;
while (j < bMapArray[i].length) {
if (j > 0){
mapString.appendText("-");
};
mapString.appendText(bMapArray[i][j]);
j++;
};
if (i != (bMapArray.length - 1)){
mapString.appendText("x");
};
i++;
};
mapString.appendText((":" + movesText.text));
}
}
}//package
Section 46
//mmBlock (mmBlock)
package {
import flash.display.*;
public dynamic class mmBlock extends MovieClip {
}
}//package
Section 47
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 48
//NewgroundsAPI (NewgroundsAPI)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
public class NewgroundsAPI {
public static const ADS_APPROVED:Number = 3;
public static const bridge:Sprite = new Sprite();
private static const STAT_NEW_VERSION:Number = 4;
private static const STAT_AUTHOR_SITE:Number = 2;
private static const GATEWAY_URL:String = "http://www.ngads.com/gateway.php";
private static const NEWGROUNDS_URL:String = "http://www.newgrounds.com";
private static const STAT_CUSTOM_STATS:Number = 50;
private static const STAT_MOVIE_VIEWS:Number = 1;
private static const STAT_NEWGROUNDS:Number = 3;
public static const NEW_VERSION:Number = 2;
public static const DENY_HOST:Number = 1;
private static var tracker_id:Number;
private static var movie_options:Object = new Object();
private static var connected:Boolean;
private static var custom_events:Object = new Object();
private static var host:String;
private static var linked:Boolean;
private static var events:Object = new Object();
private static var debug:Boolean;
private static var version:String;
private static var custom_links:Object = new Object();
public static function getNewVersionURL(){
return (((((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + STAT_NEW_VERSION));
}
private static function ReadGatewayData(_arg1:Object){
var _local2:*;
var _local3:String;
var _local4:*;
var _local5:URLLoader;
for (_local2 in _arg1) {
_arg1[_local2] = unescape(_arg1[_local2]);
movie_options[_local2] = _arg1[_local2];
};
if (_arg1["settings_loaded"]){
SendMessage("You have successfully connected to the Newgrounds API gateway!");
SendMessage((("Movie Identified as '" + movie_options["movie_name"]) + "'"));
if (movie_options["message"]){
SendMessage(movie_options["message"]);
};
if (movie_options["ad_url"]){
SendMessage("Your movie has been approved to run Flash Ads");
if (events[ADS_APPROVED]){
var _local6 = events;
_local6[ADS_APPROVED](movie_options["ad_url"]);
} else {
onAdsApproved(movie_options["ad_url"]);
};
};
if (((movie_options["movie_version"]) && (!((String(movie_options["movie_version"]) == String(version)))))){
SendMessage("WARNING: The movie version configured in your API settings does not match this movie's version!");
if (events[NEW_VERSION]){
_local6 = events;
_local6[NEW_VERSION]({version:movie_options["movie_version"], real_url:getMovieURL(), redirect_url:getNewVersionURL()});
} else {
onNewVersionAvailable(movie_options["movie_version"], getMovieURL(), getNewVersionURL());
};
};
if (movie_options["deny_host"]){
SendMessage("You have blocked 'localHost' in your API settings.");
SendMessage("If you wish to test your movie you will need to remove this block.");
if (events[DENY_HOST]){
_local6 = events;
_local6[DENY_HOST]({host:host, real_url:getMovieURL(), redirect_url:getNewVersionURL()});
} else {
onDenyHost(host, getMovieURL(), getNewVersionURL());
};
};
if (movie_options["request_portal_url"]){
_local3 = bridge.root.loaderInfo.url;
_local4 = ((((GATEWAY_URL + "?&id=") + tracker_id) + "&portal_url=") + escape(_local3));
_local5 = new URLLoader(new URLRequest(_local4));
};
if (events[69]){
_local6 = events;
_local6[69]();
};
} else {
if (!movie_options["settings_loaded"]){
SendError("Could not establish connection to the API gateway.");
};
};
}
public static function setMovieVersion(_arg1){
if (!_arg1){
SendError("Missing required 'version' in NewgroundsAPI.setMovieVersion(version:String)");
} else {
version = String(_arg1);
};
}
public static function loadCustomLink(_arg1:String){
if (!_arg1){
SendError("Missing required 'link_name' parameter in NewgroundsAPI.loadCustomLink(link_name:String)");
} else {
if (!custom_links[_arg1]){
SendError(("Attempted to open undefined custom link: " + _arg1));
} else {
SendLink(custom_links[_arg1]);
};
};
}
public static function addCustomLink(_arg1:Number, _arg2:String){
if (!_arg1){
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else {
if (!_arg2){
SendError("Missing required 'link_name' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else {
custom_links[_arg2] = (STAT_CUSTOM_STATS + _arg1);
SendMessage(((("Created custom link " + _arg1) + ": ") + _arg2));
};
};
}
public static function getMovieURL(){
if (movie_options["movie_url"]){
return (movie_options["movie_url"]);
};
return ("Newgrounds.com");
}
public static function debugMode(){
debug = true;
}
public static function getAdURL(){
return (movie_options["ad_url"]);
}
private static function SendStat(_arg1:Number, _arg2:Boolean, _arg3=null){
var target_url:*;
var XML_Loaded:Function;
var x:*;
var request:URLRequest;
var gateway_loader:URLLoader;
var stat_id = _arg1;
var open_in_browser = _arg2;
var extra = _arg3;
if (!tracker_id){
SendError("You must call NewgroundsAPI.connectMovie() with a valid movie id before using API features!");
} else {
XML_Loaded = function (_arg1:Event){
var _local2:XML;
var _local3:Object;
var _local4:XMLList;
var _local5:XML;
var _local6:*;
var _local7:*;
XML.ignoreWhitespace = true;
_local2 = XML(_arg1.target.data);
_local3 = new Object();
_local4 = _local2.children();
for each (_local5 in _local4) {
_local6 = _local5.localName();
_local7 = _local5.attribute("value");
if (_local7 == Number(_local7)){
_local7 = Number(_local7);
};
_local3[_local6] = _local7;
};
ReadGatewayData(_local3);
};
target_url = (((((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + stat_id) + addSeed());
if (extra){
for (x in extra) {
target_url = (target_url + ((("&" + escape(x)) + "=") + escape(extra[x])));
};
};
if (debug){
target_url = (target_url + "&debug=1");
};
if (open_in_browser){
request = new URLRequest((target_url + addSeed()));
navigateToURL(request, "_blank");
} else {
gateway_loader = new URLLoader(new URLRequest((target_url + addSeed())));
gateway_loader.addEventListener(Event.COMPLETE, XML_Loaded);
};
};
}
public static function onAdsApproved(_arg1:String){
}
public static function loadMySite(_arg1:Event=null){
SendLink(STAT_AUTHOR_SITE);
}
private static function SendMessage(_arg1:String){
trace(("[NEWGROUNDS API] :: " + _arg1));
}
public static function linkAPI(_arg1){
_arg1.addChild(bridge);
linked = true;
}
public static function loadNewgrounds(_arg1:Event=null, _arg2:String=null){
var _local3:URLRequest;
var _local4:*;
if (!tracker_id){
_local3 = new URLRequest(((NEWGROUNDS_URL + "/") + _arg2));
navigateToURL(_local3, "_blank");
} else {
_local4 = null;
if (_arg2){
_local4 = new Object();
_local4.page = _arg2;
};
SendLink(STAT_NEWGROUNDS, _local4);
};
}
private static function SendLink(_arg1, _arg2=null){
SendStat(_arg1, true, _arg2);
}
public static function logCustomEvent(_arg1:String){
if (!_arg1){
SendError("Missing required 'event_name' parameter in NewgroundsAPI.logCustomEvent(event_name:String)");
} else {
if (!custom_events[_arg1]){
SendError(("Attempted to log undefined custom event: " + _arg1));
} else {
SendEvent(custom_events[_arg1]);
};
};
}
private static function SendError(_arg1:String){
trace(("[NEWGROUNDS API ERROR] :: " + _arg1));
}
public static function addCustomEvent(_arg1:Number, _arg2:String){
if (!_arg1){
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else {
if (!_arg2){
SendError("Missing required 'event_name' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else {
custom_events[_arg2] = (STAT_CUSTOM_STATS + _arg1);
SendMessage(("Created custom event: " + _arg2));
};
};
}
private static function addSeed(){
return (("&seed=" + Math.random()));
}
public static function addEventListener(_arg1:Number, _arg2:Function){
events[_arg1] = _arg2;
}
private static function SendEvent(_arg1){
SendStat(_arg1, false);
}
public static function onNewVersionAvailable(_arg1:String, _arg2:String, _arg3:String){
var sw:*;
var sh:*;
var tw:*;
var th:*;
var mg:*;
var _root:*;
var overlay:MovieClip;
var overlay_x:*;
var overlay_y:*;
var close_x:*;
var blankarea:TextField;
var header:TextField;
var header_format:TextFormat;
var msgtext:TextField;
var msgtext_format:TextFormat;
var msgtext_link:TextFormat;
var version = _arg1;
var movie_url = _arg2;
var redirect_url = _arg3;
sw = bridge.stage.stageWidth;
sh = bridge.stage.stageHeight;
tw = 350;
th = 160;
mg = 20;
_root = bridge.root;
overlay = new MovieClip();
overlay.graphics.beginFill(0, 0.6);
overlay.graphics.lineStyle(0, 0);
overlay.graphics.drawRect(0, 0, sw, sh);
overlay.graphics.endFill();
overlay_x = Math.round(((sw - tw) / 2));
overlay_y = Math.round(((sh - th) / 2));
overlay.graphics.beginFill(102);
overlay.graphics.lineStyle(10, 0);
overlay.graphics.drawRect((overlay_x - mg), (overlay_y - mg), (tw + mg), (th + mg));
overlay.graphics.endFill();
overlay.close = function (_arg1:Event){
_root.removeChild(overlay);
};
close_x = new MovieClip();
close_x.graphics.beginFill(0, 0.1);
close_x.graphics.lineStyle(3, 22015);
close_x.graphics.drawRect(0, 0, 16, 16);
close_x.graphics.endFill();
close_x.graphics.moveTo(4, 4);
close_x.graphics.lineTo(13, 13);
close_x.graphics.moveTo(13, 4);
close_x.graphics.lineTo(4, 13);
close_x.x = ((overlay_x + tw) - 26);
close_x.y = (overlay_y - 10);
close_x.addEventListener(MouseEvent.CLICK, overlay.close);
blankarea = new TextField();
blankarea.x = (overlay_x - mg);
blankarea.y = (overlay_y - mg);
blankarea.width = (tw + mg);
blankarea.height = (th + mg);
blankarea.selectable = false;
header = new TextField();
header.width = tw;
header.x = overlay_x;
header.y = overlay_y;
header.height = 100;
header.selectable = false;
header_format = new TextFormat();
header_format.font = "Arial Black";
header_format.color = 0xFFFFFF;
header_format.size = 20;
header.defaultTextFormat = header_format;
header.text = "New Version Available!";
msgtext = new TextField();
msgtext.x = overlay_x;
msgtext.y = (overlay_y + 70);
msgtext.width = tw;
msgtext.height = 60;
msgtext.selectable = false;
msgtext_format = new TextFormat();
msgtext_format.font = "Arial";
msgtext_format.color = 0xFFFFFF;
msgtext_format.size = 12;
msgtext_format.bold = true;
msgtext_link = new TextFormat();
msgtext_link.font = "Arial";
msgtext_link.color = 0xFFFF00;
msgtext_link.size = 12;
msgtext_link.bold = true;
msgtext_link.url = redirect_url;
msgtext_link.target = "_blank";
if (version){
version = ("Version " + version);
} else {
version = "A new version";
};
msgtext.defaultTextFormat = msgtext_format;
msgtext.appendText((version + " is now available"));
if (movie_url){
msgtext.appendText(" at:\n");
msgtext.defaultTextFormat = msgtext_link;
msgtext.appendText(movie_url);
} else {
msgtext.appendText("!");
};
_root.addChild(overlay);
overlay.addChild(blankarea);
overlay.addChild(header);
overlay.addChild(msgtext);
overlay.addChild(close_x);
}
public static function onDenyHost(_arg1:String, _arg2:String, _arg3:String){
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:MovieClip;
var _local10:TextField;
var _local11:TextField;
var _local12:TextFormat;
var _local13:TextField;
var _local14:TextFormat;
var _local15:TextFormat;
_local4 = bridge.stage.stageWidth;
_local5 = bridge.stage.stageHeight;
_local6 = 350;
_local7 = 160;
_local8 = bridge.root;
_local9 = new MovieClip();
_local9.graphics.beginFill(0x660000);
_local9.graphics.lineStyle(20, 0);
_local9.graphics.drawRect(0, 0, _local4, _local5);
_local9.graphics.endFill();
_local10 = new TextField();
_local10.x = 0;
_local10.y = 0;
_local10.width = _local4;
_local10.height = _local5;
_local10.selectable = false;
_local11 = new TextField();
_local11.x = Math.round(((_local4 - _local6) / 2));
_local11.y = Math.round(((_local5 - _local7) / 2.5));
_local11.width = _local6;
_local11.height = 100;
_local11.selectable = false;
_local12 = new TextFormat();
_local12.font = "Arial Black";
_local12.color = 0xFF0000;
_local12.size = 38;
_local11.defaultTextFormat = _local12;
_local11.text = "ERROR!";
_local13 = new TextField();
_local13.x = Math.round(((_local4 - _local6) / 2));
_local13.y = (Math.round(((_local5 - _local7) / 2.5)) + 80);
_local13.width = _local6;
_local13.height = 80;
_local13.selectable = false;
_local14 = new TextFormat();
_local14.font = "Arial";
_local14.color = 0xFFFFFF;
_local14.size = 12;
_local14.bold = true;
_local15 = new TextFormat();
_local15.font = "Arial";
_local15.color = 0xFFFF00;
_local15.size = 12;
_local15.bold = true;
_local15.url = _arg3;
_local15.target = "_blank";
_local13.defaultTextFormat = _local14;
_local13.appendText((("This movie has not been approved for use on " + _arg1) + "\n"));
_local13.appendText("For an approved copy, please visit:\n");
_local13.defaultTextFormat = _local15;
_local13.appendText(_arg2);
_local8.addChild(_local9);
_local9.addChild(_local10);
_local9.addChild(_local11);
_local9.addChild(_local13);
}
public static function connectMovie(_arg1:Number){
var _local2:String;
var _local3:*;
if (!_arg1){
SendError("Missing required 'id' parameter in NewgroundsAPI.connectMovie(id:Number)");
} else {
if (!linked){
SendError("Attempted to call MewgroundsAPI.connectMovie() without first calling NewgroundsAPI.linkAPI(this)");
} else {
if (!tracker_id){
SendMessage("Connecting to API gateway...");
tracker_id = _arg1;
_local2 = bridge.root.loaderInfo.url;
host = _local2.split("/")[2].toLowerCase();
if (host.length < 1){
host = "localhost";
};
_local3 = new Object();
SendEvent(STAT_MOVIE_VIEWS);
};
};
};
}
public static function isInstalled(){
return (true);
}
}
}//package
Section 49
//pBox (pBox)
package {
import flash.display.*;
public dynamic class pBox extends MovieClip {
public var rNextBtn2:MovieClip;
public var menuBtn:MovieClip;
public var rNextBtn:MovieClip;
public var trophyMC:MovieClip;
}
}//package
Section 50
//ride (ride)
package {
import flash.media.*;
public dynamic class ride extends Sound {
}
}//package
Section 51
//selectBlock (selectBlock)
package {
import flash.media.*;
public dynamic class selectBlock extends Sound {
}
}//package
Section 52
//shine_2 (shine_2)
package {
import flash.display.*;
public dynamic class shine_2 extends MovieClip {
}
}//package
Section 53
//Vanish (Vanish)
package {
import flash.media.*;
public dynamic class Vanish extends Sound {
}
}//package
Section 54
//Victory (Victory)
package {
import flash.media.*;
public dynamic class Victory extends Sound {
}
}//package