Section 1
//buttonAnim_76 (base2_fla.buttonAnim_76)
package base2_fla {
import flash.display.*;
public dynamic class buttonAnim_76 extends MovieClip {
public function buttonAnim_76(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package base2_fla
Section 2
//Symbol10_44 (base2_fla.Symbol10_44)
package base2_fla {
import flash.display.*;
public dynamic class Symbol10_44 extends MovieClip {
public var guy:MovieClip;
}
}//package base2_fla
Section 3
//Symbol17copy_52 (base2_fla.Symbol17copy_52)
package base2_fla {
import flash.display.*;
public dynamic class Symbol17copy_52 extends MovieClip {
public function Symbol17copy_52(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package base2_fla
Section 4
//Symbol18copy_54 (base2_fla.Symbol18copy_54)
package base2_fla {
import flash.display.*;
public dynamic class Symbol18copy_54 extends MovieClip {
public function Symbol18copy_54(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package base2_fla
Section 5
//Symbol27_7 (base2_fla.Symbol27_7)
package base2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol27_7 extends MovieClip {
public var submitBut:SimpleButton;
public var playBut:SimpleButton;
public var nameInput:TextField;
}
}//package base2_fla
Section 6
//Timeline_74 (base2_fla.Timeline_74)
package base2_fla {
import flash.display.*;
public dynamic class Timeline_74 extends MovieClip {
public var but:SimpleButton;
public var logo:MovieClip;
public function Timeline_74(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package base2_fla
Section 7
//Timeline_75 (base2_fla.Timeline_75)
package base2_fla {
import flash.display.*;
public dynamic class Timeline_75 extends MovieClip {
public var buttonAnim:MovieClip;
public var logoGray:MovieClip;
public var preloadBut:SimpleButton;
public var logoRed:MovieClip;
}
}//package base2_fla
Section 8
//Timeline_77 (base2_fla.Timeline_77)
package base2_fla {
import flash.display.*;
public dynamic class Timeline_77 extends MovieClip {
public function Timeline_77(){
addFrameScript(0, frame1, 22, frame23);
}
function frame1(){
stop();
}
function frame23(){
stop();
}
}
}//package base2_fla
Section 9
//Timeline_78 (base2_fla.Timeline_78)
package base2_fla {
import flash.display.*;
public dynamic class Timeline_78 extends MovieClip {
public function Timeline_78(){
addFrameScript(99, frame100);
}
function frame100(){
stop();
}
}
}//package base2_fla
Section 10
//Timeline_82 (base2_fla.Timeline_82)
package base2_fla {
import flash.display.*;
public dynamic class Timeline_82 extends MovieClip {
public var redM:MovieClip;
public function Timeline_82(){
addFrameScript(0, frame1, 35, frame36, 47, frame48);
}
function frame1(){
stop();
}
function frame36(){
stop();
}
function frame48(){
stop();
}
}
}//package base2_fla
Section 11
//Timeline_83 (base2_fla.Timeline_83)
package base2_fla {
import flash.display.*;
public dynamic class Timeline_83 extends MovieClip {
public function Timeline_83(){
addFrameScript(209, frame210);
}
function frame210(){
stop();
trace("end frame");
}
}
}//package base2_fla
Section 12
//aoeCircle (aoeCircle)
package {
import flash.events.*;
import flash.display.*;
public class aoeCircle extends MovieClip {
var mainMov:mainClass;
public function aoeCircle(){
addEventListener(Event.ENTER_FRAME, mainLoop);
}
public function mainLoop(_arg1:Event){
if (mainClass(root)){
mainMov = mainClass(root);
if (currentFrame == 15){
trace("exp over");
mainMov.AOEonStage = false;
mainMov.removeObj(this);
};
};
}
}
}//package
Section 13
//coin (coin)
package {
import flash.events.*;
import flash.display.*;
public class coin extends MovieClip {
var id:Number;// = 0
var batDir:Number;// = 2
public var coinAnim:MovieClip;
var picked:Boolean;// = false
var mainMov:mainClass;
var batMov:Number;// = 70
var coinVal:Number;// = 0
public function coin(_arg1:Number, _arg2:String, _arg3:Boolean, _arg4:Number=300, _arg5:Number=300){
picked = false;
id = 0;
batMov = 70;
batDir = 2;
coinVal = 0;
super();
id = _arg1;
coinAnim.gotoAndStop(_arg2);
trace("manualPlaced");
x = _arg4;
y = _arg5;
if ((((id == 6)) || ((id == 5)))){
trace((scaleX + " bat"));
scaleX = -1;
};
addEventListener(Event.ENTER_FRAME, mainLoop);
}
public function init(){
trace("init");
if ((((id == 6)) || ((id == 5)))){
trace((scaleX + " bat"));
scaleX = -1;
x = (Math.floor((Math.random() * 600)) + 20);
y = (Math.floor((Math.random() * 260)) + 200);
} else {
x = (Math.floor((Math.random() * 600)) + 20);
y = (Math.floor((Math.random() * 260)) + 200);
};
if (mainClass(root)){
mainMov = mainClass(root);
if (id == 3){
coinVal = (Math.floor((Math.random() * 600)) + 50);
} else {
if ((((id == 1)) || ((id == 2)))){
if (mainMov.magnifyPU){
trace("magnifyPU");
coinVal = (mainMov.unitPropArray[id][1] + 5);
} else {
coinVal = mainMov.unitPropArray[id][1];
};
} else {
if (((mainMov.certPU) && (!((id == 5))))){
coinVal = (mainMov.unitPropArray[id][1] + 10);
} else {
coinVal = mainMov.unitPropArray[id][1];
};
};
};
if (mainMov.checkColl(this)){
init();
};
};
}
public function mainLoop(_arg1:Event){
if (mainClass(root)){
mainMov = mainClass(root);
if (mainMov.levelOver){
mainMov.removeObj(this);
};
if (id == 3){
coinVal = (Math.floor((Math.random() * 600)) + 50);
} else {
if ((((id == 1)) || ((id == 2)))){
if (mainMov.magnifyPU){
coinVal = (mainMov.unitPropArray[id][1] + 30);
} else {
coinVal = mainMov.unitPropArray[id][1];
};
} else {
if (((mainMov.certPU) && (!((id == 5))))){
coinVal = (mainMov.unitPropArray[id][1] + 50);
} else {
coinVal = mainMov.unitPropArray[id][1];
};
};
};
if ((((((id == 6)) || ((id == 5)))) && (!(picked)))){
x = (x + batDir);
batMov = (batMov - 1);
if (batMov == 0){
batDir = (batDir * -1);
scaleX = (scaleX * -1);
batMov = (Math.floor((Math.random() * 50)) + 70);
};
};
if (!mainMov.levelOver){
mainMov.checkHookColl(this);
};
if (((picked) && (!(mainMov.levelOver)))){
coinAnim.stop();
if (id < 4){
x = (mainMov.hotspotX + (30 * Math.cos(mainMov.hookMov.dir)));
y = (mainMov.hotspotY + (30 * Math.sin(mainMov.hookMov.dir)));
} else {
if (id == 4){
mainMov.addExplosion(this.x, this.y);
mainMov.addAOE(this.x, this.y);
mainMov.removeObj(this);
} else {
x = mainMov.hotspotX;
y = (mainMov.hotspotY + 10);
};
};
if (mainMov.hookMov.hookStatus == "rotate"){
mainMov.money = (mainMov.money + coinVal);
mainMov.displayScoreAnim(coinVal);
mainMov.moneyDisp.updateMoney(mainMov.money, mainMov.moneyTarget);
mainMov.removeObj(this);
};
};
};
}
}
}//package
Section 14
//craneOperateSound (craneOperateSound)
package {
import flash.media.*;
public dynamic class craneOperateSound extends Sound {
}
}//package
Section 15
//dynamite (dynamite)
package {
import flash.events.*;
import flash.display.*;
public class dynamite extends MovieClip {
public function dynamite(){
x = 328.8;
y = 36.4;
addEventListener(Event.ENTER_FRAME, mainLoop);
}
public function mainLoop(_arg1:Event){
if (mainClass(root)){
x = (x + (10 * Math.cos(mainClass(root).hookMov.dir)));
y = (y + (10 * Math.sin(mainClass(root).hookMov.dir)));
};
}
}
}//package
Section 16
//explosion (explosion)
package {
import flash.events.*;
import flash.display.*;
public class explosion extends MovieClip {
var mainMov:mainClass;
public var expAnim:MovieClip;
public function explosion(){
addEventListener(Event.ENTER_FRAME, mainLoop);
}
public function mainLoop(_arg1:Event){
if (mainClass(root)){
mainMov = mainClass(root);
if (expAnim.currentFrame == 15){
trace("exp over");
mainMov.removeObj(this);
};
};
}
}
}//package
Section 17
//explosionSound (explosionSound)
package {
import flash.media.*;
public dynamic class explosionSound extends Sound {
}
}//package
Section 18
//gameOver (gameOver)
package {
import flash.events.*;
import flash.display.*;
public class gameOver extends MovieClip {
public var buttonDisplay:MovieClip;
var mainMov:mainClass;
public function gameOver(_arg1:mainClass){
mainMov = _arg1;
if (mainMov.levelPassed){
buttonDisplay.gotoAndStop(1);
if (!mainMov.soundMute){
SoundManager.getInstance().playSound("winSound", 1, 0, 999);
};
} else {
trace("game over");
buttonDisplay.gotoAndStop(2);
};
if (buttonDisplay.playBut){
buttonDisplay.playBut.addEventListener(MouseEvent.CLICK, playButClicked);
};
if (buttonDisplay.submitBut){
buttonDisplay.submitBut.addEventListener(MouseEvent.CLICK, submitButClicked);
};
}
public function toHighScoreButClicked(_arg1:MouseEvent){
if (mainClass(root).playerName != ""){
mainClass(root).playerName = buttonDisplay.nameInput.text;
trace(("the name is " + buttonDisplay.nameInput.text));
mainMov.showHighScore();
};
}
public function submitButClicked(_arg1:MouseEvent){
if (mainClass(root).playerName != ""){
mainClass(root).playerName = buttonDisplay.nameInput.text;
trace(("the name is " + buttonDisplay.nameInput.text));
mainMov.showHighScore();
};
}
public function playButClicked(_arg1:MouseEvent){
if (!mainMov.soundMute){
SoundManager.getInstance().stopSound("winSound");
};
mainMov.shopState();
}
}
}//package
Section 19
//highScoreTable (highScoreTable)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
public class highScoreTable extends MovieClip {
var testScore:String;
public var scoreDisp:TextField;
var testDisp:Boolean;// = false
public var miniLogoBut:SimpleButton;
public var toMenuBut:SimpleButton;
var request:URLRequest;
var mainMov:mainClass;
public var nameDisp:TextField;
public function highScoreTable(_arg1:mainClass){
testDisp = false;
super();
mainMov = _arg1;
testDisp = false;
toMenuBut.addEventListener(MouseEvent.CLICK, toMenuButClicked);
addEventListener(Event.ENTER_FRAME, mainLoop);
scoreDisp.multiline = true;
nameDisp.multiline = true;
scoreDisp.text = "";
nameDisp.text = "";
miniLogoBut.addEventListener(MouseEvent.CLICK, mouseClick);
request = new URLRequest("http://www.box10.com/?utm_source=brandedgames&utm_medium=moneyminer");
}
public function mouseClick(_arg1:MouseEvent){
navigateToURL(request, "_blank");
}
public function toHighScoreButClicked(_arg1:MouseEvent){
mainMov.showHighScore();
}
public function toMenuButClicked(_arg1:MouseEvent){
mainMov.showSplash();
}
public function mainLoop(_arg1:Event){
var _local2:*;
if (mainClass(root)){
if (!testDisp){
mainClass(root).cookies.data.highScoreList.push([mainClass(root).playerName, int(mainClass(root).money)]);
mainClass(root).cookies.data.highScoreList.sort(mainClass(root).order);
for (_local2 in mainClass(root).cookies.data.highScoreList) {
scoreDisp.appendText((String(mainClass(root).cookies.data.highScoreList[_local2][1]) + "\n"));
nameDisp.appendText((mainClass(root).cookies.data.highScoreList[_local2][0] + "\n"));
};
testDisp = true;
};
};
}
}
}//package
Section 20
//hook (hook)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public class hook extends MovieClip {
var hookSpeed:Number;// = 10
public var hookStatus:String;// = "rotate"
var yAdder:Number;// = 0
var rotationDir:Number;// = 2
public var range:MovieClip;
var xAdder:Number;// = 0
var dir:Number;// = 0
public var lineGraph:MovieClip;
public var hookAnim:MovieClip;
public function hook(){
rotationDir = 2;
dir = 0;
xAdder = 0;
yAdder = 0;
hookSpeed = 10;
hookStatus = "rotate";
super();
hookAnim.stop();
addEventListener(Event.ENTER_FRAME, mainLoop);
}
public function init(){
trace("test");
hookStatus = "rotate";
x = 328.8;
y = 36.4;
}
public function shootHook(){
if (hookStatus == "rotate"){
dir = (((rotation + 90) * Math.PI) / 180);
hookStatus = "shoot";
};
}
public function mainLoop(_arg1:Event){
if (mainClass(root)){
if (hookStatus == "rewind"){
lineGraph.visible = false;
} else {
lineGraph.visible = true;
};
switch (hookStatus){
case "rotate":
if (!mainClass(root).gamePaused){
mainClass(root).play_screen.tractor.guy.gotoAndStop(1);
rotation = (rotation + rotationDir);
mainClass(root).drawRod(x, y);
if ((((rotation == 60)) || ((rotation == -60)))){
rotationDir = (rotationDir * -1);
};
};
break;
case "shoot":
if (!mainClass(root).gamePaused){
mainClass(root).play_screen.tractor.guy.gotoAndStop(3);
x = (x + (hookSpeed * Math.cos(dir)));
y = (y + (hookSpeed * Math.sin(dir)));
mainClass(root).hotspotX = (x + (40 * Math.cos(dir)));
mainClass(root).hotspotY = (y + (40 * Math.sin(dir)));
if ((((((mainClass(root).hotspotY > 480)) || ((mainClass(root).hotspotX > 640)))) || ((mainClass(root).hotspotX < 0)))){
hookStatus = "rewind";
};
mainClass(root).drawRod(x, y);
};
break;
case "rewind":
if (!mainClass(root).gamePaused){
mainClass(root).play_screen.tractor.guy.gotoAndStop(2);
mainClass(root).hotspotX = (x + (40 * Math.cos(dir)));
mainClass(root).hotspotY = (y + (40 * Math.sin(dir)));
x = (x - ((hookSpeed - mainClass(root).slowdown) * Math.cos(dir)));
y = (y - ((hookSpeed - mainClass(root).slowdown) * Math.sin(dir)));
if (y < 36.4){
mainClass(root).stopPullingSound();
init();
};
mainClass(root).drawRod((x + (20 * Math.cos(dir))), (y + (20 * Math.sin(dir))));
};
break;
};
};
}
}
}//package
Section 21
//inGame (inGame)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class inGame extends Sprite {
public var certDisplay:MovieClip;
public var tractor:MovieClip;
public var cloverDisplay:MovieClip;
public var muteBut:MovieClip;
var mainMov:mainClass;
public var pauseBut:MovieClip;
public var magnifyDisplay:MovieClip;
public var dynamiteDisplay:MovieClip;
public var powerDisplay:MovieClip;
public function inGame(_arg1:mainClass){
mainMov = _arg1;
dynamiteDisplay.gotoAndStop((mainMov.dynamiteNumber + 1));
tractor.guy.stop();
muteBut.addEventListener(MouseEvent.CLICK, muteButClicked);
pauseBut.addEventListener(MouseEvent.CLICK, pauseButClicked);
if (mainMov.soundMute){
muteBut.gotoAndStop(2);
};
}
public function pauseButClicked(_arg1:MouseEvent){
mainMov.gamePaused = true;
pauseBut.gotoAndStop(2);
mainMov.addPauseScreen();
}
public function muteButClicked(_arg1:MouseEvent){
if (mainMov.soundMute){
mainMov.soundMute = false;
SoundManager.getInstance().stopSound("craneSound");
muteBut.gotoAndStop(1);
} else {
mainMov.soundMute = true;
muteBut.gotoAndStop(2);
};
}
}
}//package
Section 22
//keys (keys)
package {
import flash.events.*;
public class keys {
private var press_right;// = false
private var press_left;// = false
private var press_space;// = false
private var press_up;// = false
private var press_down;// = false
public function keys(_arg1){
press_left = false;
press_right = false;
press_down = false;
press_up = false;
press_space = false;
super();
_arg1.stage.addEventListener(KeyboardEvent.KEY_DOWN, key_down);
_arg1.stage.addEventListener(KeyboardEvent.KEY_UP, key_up);
}
public function key_down(_arg1:KeyboardEvent){
if (_arg1.keyCode == 32){
press_space = true;
};
if (_arg1.keyCode == 37){
press_left = true;
};
if (_arg1.keyCode == 38){
press_up = true;
};
if (_arg1.keyCode == 39){
press_right = true;
};
if (_arg1.keyCode == 40){
press_down = true;
};
}
public function is_left(){
return (press_left);
}
public function is_up(){
return (press_up);
}
public function is_space(){
return (press_space);
}
public function is_down(){
return (press_down);
}
public function key_up(_arg1:KeyboardEvent){
if (_arg1.keyCode == 32){
press_space = false;
};
if (_arg1.keyCode == 37){
press_left = false;
};
if (_arg1.keyCode == 38){
press_up = false;
};
if (_arg1.keyCode == 39){
press_right = false;
};
if (_arg1.keyCode == 40){
press_down = false;
};
}
public function is_right(){
return (press_right);
}
}
}//package
Section 23
//mainClass (mainClass)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import com.*;
public class mainClass extends Sprite {
public var coins:coin;
public var keyboardInput:keys;
public var slowdown:Number;// = 0
public var selObj:MovieClip;
public var coinArray:Array;
public var timeSec:Number;// = 0
public var levelInterval:uint;
public var moneyTarget:Number;// = 0
public var removedObj:MovieClip;
public var levelOver:Boolean;// = false
public var moneyDisp;
public var dynamiteAmmo:dynamite;
public var exploAnim:explosion;
public var cookies:SharedObject;
public var AOEonStage:Boolean;// = false
public var placingArray:Array;
public var preloaderMov:preloaderMain;
public var soundPlayed:Boolean;// = false
public var money:Number;// = 0
public var hookMov:hook;
public var shop:shopScreen;
public var dynamiteShoot:Boolean;// = false
public var playerName:String;
public var levelPassed:Boolean;// = false
public var certPU:Boolean;// = false
public var levelArray:Array;
public var objective:objectiveScreen;
public var splash_screen:splash;
public var timer;
public var skipLevelAva:Boolean;// = false
public var manualPlacing:Boolean;// = false
public var magnifyPU:Boolean;// = false
var hotspotX:Number;// = 0
var hotspotY:Number;// = 0
public var loadedBytes:Number;// = 0
public var game_over_screen:Sprite;
public var highScore_screen:Sprite;
public var cloverPU:Boolean;// = false
public var totalBytes:Number;// = 0
public var unitPropArray:Array;
public var AoeCircle:aoeCircle;
public var keyboardSprite:Sprite;
public var skipLevelMov:skipLevelDisp;
var soundManager:SoundManager;
public var goalAdder:Number;// = 155
public var dynamiteNumber:Number;// = 1
public var gamePaused:Boolean;// = false
public var rod:MovieClip;
public var soundMute:Boolean;// = false
public var powerPU:Boolean;// = false
public var play_screen:inGame;
public var PauseScreen:pauseScreen;
public var levelNumber:Number;// = 1
public function mainClass(){
var _local1:*;
dynamiteShoot = false;
rod = new MovieClip();
coinArray = new Array();
slowdown = 0;
levelOver = false;
timer = new timerDisplay();
moneyDisp = new moneyDisplay();
money = 0;
moneyTarget = 0;
goalAdder = 155;
timeSec = 0;
dynamiteNumber = 1;
hotspotX = 0;
hotspotY = 0;
levelPassed = false;
levelArray = new Array();
unitPropArray = new Array();
placingArray = new Array();
levelNumber = 1;
cloverPU = false;
magnifyPU = false;
powerPU = false;
certPU = false;
soundPlayed = false;
AOEonStage = false;
manualPlacing = false;
skipLevelAva = false;
loadedBytes = 0;
totalBytes = 0;
soundMute = false;
gamePaused = false;
super();
preloaderMov = new preloaderMain(this);
addChild(preloaderMov);
_local1 = new Sprite();
addChild(_local1);
keyboardInput = new keys(_local1);
addEventListener(Event.ENTER_FRAME, mainLoop);
cookies = SharedObject.getLocal("reload");
if (cookies.data.highScoreList == undefined){
cookies.data.highScoreList = new Array();
cookies.data.highScoreList = [["CPU", 20000], ["CPU", 16000], ["CPU", 15000], ["CPU", 14000], ["CPU", 13000], ["CPU", 12000], ["CPU", 11000], ["CPU", 10000], ["CPU", 7500], ["CPU", 5000]];
trace(cookies.data.highScoreList[0][1]);
} else {
trace("sudah ada");
};
cookies.close();
}
public function checkColl(_arg1:MovieClip){
var _local2:Number;
var _local3:*;
selObj = _arg1;
_local2 = 0;
for (_local3 in coinArray) {
if (((!((selObj == coinArray[_local3]))) && (coinArray[_local3].hitTestObject(selObj)))){
trace("hitTest");
_local2++;
break;
};
};
if (_local2 > 0){
return (true);
};
return (false);
}
public function playTheGame(){
play_screen = new inGame(this);
if (splash_screen){
removeChild(splash_screen);
splash_screen = null;
};
addChild(play_screen);
objectiveDisp();
}
public function playSound(){
trace("playsound");
SoundManager.getInstance().playSound("craneSound");
}
public function objectiveDisp(){
trace("test");
SoundManager.getInstance().stopSound("mainSound");
objective = new objectiveScreen(this);
addChild(objective);
if (shop){
removeChild(shop);
shop = null;
};
}
public function addPauseScreen(){
PauseScreen = new pauseScreen(this);
addChild(PauseScreen);
stopPullingSound();
}
public function levelEnd(){
clearInterval(levelInterval);
skipLevelAva = false;
skipLevelMov.visible = false;
removeChild(skipLevelMov);
timer.timerReset();
stopPullingSound();
cloverPU = false;
magnifyPU = false;
powerPU = false;
certPU = false;
levelOver = true;
removeChild(hookMov);
removeChild(rod);
hookMov = null;
if (money >= moneyTarget){
levelPassed = true;
if (levelNumber == 10){
levelNumber = 4;
} else {
levelNumber = (levelNumber + 1);
};
} else {
levelPassed = false;
};
game_over_screen = new gameOver(this);
addChild(game_over_screen);
}
public function timeInterval(){
if (!gamePaused){
timeSec = (timeSec - 1);
timer.updateTime(timeSec);
if (timeSec == -1){
trace("levelEnd");
levelEnd();
};
};
}
public function levelInit(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
trace(("LEVEL" + levelNumber));
skipLevelAva = false;
play_screen.dynamiteDisplay.gotoAndStop((dynamiteNumber + 1));
levelOver = false;
timeSec = 60;
removeChild(objective);
objective = null;
if (cloverPU){
play_screen.cloverDisplay.visible = true;
} else {
play_screen.cloverDisplay.visible = false;
};
if (magnifyPU){
play_screen.magnifyDisplay.visible = true;
} else {
play_screen.magnifyDisplay.visible = false;
};
if (powerPU){
play_screen.powerDisplay.visible = true;
} else {
play_screen.powerDisplay.visible = false;
};
if (certPU){
play_screen.certDisplay.visible = true;
} else {
play_screen.certDisplay.visible = false;
};
addChild(timer);
addChild(moneyDisp);
moneyDisp.updateMoney(money, moneyTarget);
levelInterval = setInterval(timeInterval, 1000);
for (_local1 in levelArray[levelNumber]) {
_local3 = 0;
while (_local3 < levelArray[levelNumber][_local1]) {
trace(placingArray[levelNumber][0]);
_local4 = 300;
_local5 = 300;
if (placingArray[levelNumber][0] == "random"){
manualPlacing = false;
} else {
manualPlacing = true;
_local4 = placingArray[levelNumber][1][_local1][_local3][0];
_local5 = placingArray[levelNumber][1][_local1][_local3][1];
};
_local6 = new coin(_local1, levelArray[0][_local1], manualPlacing, _local4, _local5);
coins = _local6;
addChild(coins);
coinArray.push(coins);
if (!manualPlacing){
coins.init();
};
_local3++;
};
};
skipLevelMov = new skipLevelDisp();
skipLevelMov.x = 319.9;
skipLevelMov.y = 453.4;
skipLevelMov.visible = false;
addChild(skipLevelMov);
trace(coinArray.length);
hookMov = new hook();
addChild(hookMov);
hookMov.init();
_local2 = new Sprite();
stage.focus = this;
checkPU();
}
public function stopPullingSound(){
trace("stopsound");
SoundManager.getInstance().stopSound("craneSound");
soundPlayed = false;
}
public function checkPU(){
if (cloverPU){
};
if (((powerPU) && (hookMov))){
hookMov.hookSpeed = 12;
trace(hookMov.hookSpeed);
};
}
public function checkSkipLevel(){
var _local1:Number;
var _local2:*;
_local1 = 0;
for (_local2 in coinArray) {
if (((((((!((coinArray[_local2].id == 1))) && (!((coinArray[_local2].id == 2))))) && (!((coinArray[_local2].id == 4))))) && (!((coinArray[_local2].id == 5))))){
_local1++;
};
};
if (_local1 == 0){
return (true);
};
trace(("remaining coin =" + _local1));
return (false);
}
public function shopState(){
if (game_over_screen){
removeChild(game_over_screen);
game_over_screen = null;
};
shop = new shopScreen(this);
addChild(shop);
}
public function displayScoreAnim(_arg1){
var _local2:*;
_local2 = new scoreAnim();
_local2.x = 328.8;
_local2.y = 50;
_local2.score.text = _arg1;
addChild(_local2);
winkingSound();
}
public function order(_arg1, _arg2){
var _local3:*;
var _local4:*;
_local3 = _arg1[1];
_local4 = _arg2[1];
if (_local3 > _local4){
return (-1);
};
if (_local3 < _local4){
return (1);
};
return (0);
}
public function winkingSound(){
if (!soundMute){
SoundManager.getInstance().playSound("winkSound");
};
}
public function addExplosion(_arg1, _arg2){
var _local3:*;
_local3 = new explosion();
addChild(_local3);
_local3.x = _arg1;
_local3.y = _arg2;
SoundManager.getInstance().playSound("explodeSound");
}
public function gameStart(){
SoundManager.getInstance().addLibrarySound(craneOperateSound, "craneSound");
SoundManager.getInstance().addLibrarySound(winkSound, "winkSound");
SoundManager.getInstance().addLibrarySound(explosionSound, "explodeSound");
SoundManager.getInstance().addLibrarySound(mainSound, "mainSound");
SoundManager.getInstance().addLibrarySound(winSound, "winSound");
levelArray = [["coin", "stone", "rock", "tBox", "barrel", "bat", "dBat", "50cent", "ruby"], [1, 4, 3, 0, 0, 0, 0, 5, 0], [1, 5, 3, 0, 0, 0, 0, 6, 0], [2, 5, 3, 0, 0, 2, 0, 6, 0], [2, 5, 3, 0, 1, 0, 0, 6, 1], [0, 3, 4, 0, 0, 1, 0, 8, 3], [1, 5, 3, 0, 0, 0, 1, 6, 0], [2, 5, 3, 0, 2, 0, 0, 6, 1], [2, 3, 3, 2, 0, 2, 1, 4, 0], [2, 5, 3, 0, 2, 0, 0, 6, 1], [2, 0, 0, 0, 3, 0, 0, 8, 1], [2, 5, 3, 0, 0, 2, 1, 6, 0], [2, 5, 3, 0, 3, 0, 2, 6, 1], [2, 0, 0, 0, 3, 0, 0, 7, 1]];
unitPropArray = [["coin", 500, 8], ["stone", 20, 8], ["rock", 10, 8], ["tBox", 100, 8], ["barrel", 0, 5], ["bat", 5, 5], ["dBat", 700, 5], ["50cent", 50, 5], ["ruby", 600, 5]];
placingArray = [["levelNum", "ObjId", [["Objx", "Objy"], ["Objx", "Objy"]], [["Objx", "Objy"], ["Objx", "Objy"]]], ["random", [[[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[241, 358], [411, 356], [583, 356], [72, 351]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]]]], ["random", [[[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[241, 358], [411, 356], [583, 356], [72, 351]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]]]], ["random", [[[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[241, 358], [411, 356], [583, 356], [72, 351]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]]]], ["level4", [[[485, 347], [70, 394], [19, 90]], [[42, 263], [356, 212], [76, 174], [400, 375], [198, 336], [19, 90]], [[184, 266], [244, 400], [504, 260], [583, 356], [72, 351]], [[12, 13], [2, 2], [19, 90]], [[470, 431], [180, 363], [459, 357]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[277, 304], [584, 309], [572, 192], [452, 219], [277, 438], [177, 424], [408, 188]], [[0x0202, 391], [2, 2], [19, 90]]]], ["level5", [[[300, 300], [2, 2], [19, 90]], [[100, 397], [268, 436], [604, 378], [19, 90]], [[404, 445], [492, 401], [194, 382], [292, 275], [19, 90]], [[404, 445], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[314, 178], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[320, 342], [130, 300], [506, 262], [430, 315], [580, 205], [49, 189], [169, 326], [418, 225], [19, 90]], [[324, 460], [616, 440], [21, 444], [19, 90]]]], ["random", [[[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[241, 358], [411, 356], [583, 356], [72, 351]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]]]], ["random", [[[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[241, 358], [411, 356], [583, 356], [72, 351]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]]]], ["level8", [[[181, 440], [604, 423], [19, 90]], [[389, 262], [516, 274], [64, 302], [19, 90]], [[117, 204], [207, 348], [289, 293], [72, 351]], [[451, 333], [52, 382], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[460, 173], [239, 178], [19, 90]], [[314, 418], [2, 2], [19, 90]], [[177, 239], [587, 207], [465, 411], [529, 368], [19, 90]], [[12, 13], [2, 2], [19, 90]]]], ["random", [[[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[241, 358], [411, 356], [583, 356], [72, 351]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]]]], ["level10", [[[390, 361], [250, 364], [19, 90]], [[551, 449], [2, 2], [19, 90]], [[518, 367], [282, 293], [69, 399], [583, 356], [72, 351]], [[12, 13], [2, 2], [19, 90]], [[322, 363], [180, 363], [459, 357]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[614, 457], [66, 320], [130, 272], [205, 267], [23, 457], [510, 320], [408, 188], [408, 250]], [[324, 465], [2, 2], [19, 90]]]], ["random", [[[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[241, 358], [411, 356], [583, 356], [72, 351]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]]]], ["level2", [[[390, 361], [250, 364], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[241, 358], [411, 356], [583, 356], [72, 351]], [[12, 13], [2, 2], [19, 90]], [[322, 363], [180, 363], [459, 357]], [[12, 13], [2, 2], [19, 90]], [[12, 13], [2, 2], [19, 90]], [[614, 457], [66, 320], [130, 272], [205, 267], [23, 457], [510, 320], [408, 188]], [[324, 465], [2, 2], [19, 90]]]]];
showSplash();
}
public function showHighScore(){
highScore_screen = new highScoreTable(this);
addChild(highScore_screen);
}
public function addAOE(_arg1, _arg2){
AOEonStage = true;
AoeCircle = new aoeCircle();
addChild(AoeCircle);
AoeCircle.x = _arg1;
AoeCircle.y = _arg2;
}
public function removePause(){
if (gamePaused){
removeChild(PauseScreen);
PauseScreen = null;
play_screen.pauseBut.gotoAndStop(1);
gamePaused = false;
};
}
public function addDynamite(){
trace("addynamite");
dynamiteNumber--;
play_screen.dynamiteDisplay.gotoAndStop((dynamiteNumber + 1));
dynamiteAmmo = new dynamite();
addChild(dynamiteAmmo);
}
public function showSplash(){
SoundManager.getInstance().playSound("mainSound", 1, 1, 999);
splash_screen = new splash(this);
money = 0;
moneyTarget = 0;
goalAdder = 155;
levelNumber = 1;
dynamiteNumber = 1;
soundMute = false;
if (game_over_screen){
removeChild(game_over_screen);
game_over_screen = null;
};
addChild(splash_screen);
}
public function checkHookColl(_arg1:MovieClip){
selObj = _arg1;
if (((selObj.hitTestObject(hookMov.range)) && ((hookMov.hookStatus == "shoot")))){
trace("kena");
selObj.picked = true;
slowdown = unitPropArray[selObj.id][2];
hookMov.hookStatus = "rewind";
} else {
if (dynamiteAmmo){
if (((selObj.hitTestObject(dynamiteAmmo)) && (dynamiteShoot))){
slowdown = 0;
addExplosion(selObj.x, selObj.y);
removeObj(selObj);
removeObj(dynamiteAmmo);
dynamiteShoot = false;
};
};
};
if (((AoeCircle) && (AOEonStage))){
if (selObj.hitTestObject(AoeCircle)){
trace("kenaAOE");
removeObj(selObj);
};
};
}
public function drawRod(_arg1, _arg2){
addChild(rod);
rod.graphics.clear();
rod.graphics.lineStyle(1, 0);
rod.graphics.moveTo(328.8, 36.4);
rod.graphics.lineTo(_arg1, _arg2);
}
public function removeObj(_arg1:MovieClip){
var _local2:*;
removedObj = _arg1;
slowdown = 0;
for (_local2 in coinArray) {
if (removedObj == coinArray[_local2]){
coinArray.splice(_local2, 1);
break;
};
};
removeChild(removedObj);
if (checkSkipLevel()){
trace("level skip available");
skipLevelAva = true;
skipLevelMov.visible = true;
} else {
trace("level skip unavailable");
};
}
public function mainLoop(_arg1:Event):void{
loadedBytes = stage.loaderInfo.bytesLoaded;
totalBytes = stage.loaderInfo.bytesTotal;
if (((((keyboardInput.is_down()) && (!(levelOver)))) && (!(gamePaused)))){
if (((hookMov) && ((hookMov.hookStatus == "rotate")))){
if (((!(soundPlayed)) && (!(soundMute)))){
playSound();
soundPlayed = true;
};
hookMov.shootHook();
};
};
if (((((((keyboardInput.is_up()) && (!(dynamiteShoot)))) && (hookMov))) && (!(levelOver)))){
if ((((hookMov.hookStatus == "rewind")) && ((dynamiteNumber > 0)))){
addDynamite();
dynamiteShoot = true;
};
};
if (((((keyboardInput.is_space()) && (!(levelOver)))) && (skipLevelAva))){
levelEnd();
};
}
}
}//package
Section 24
//mainSound (mainSound)
package {
import flash.media.*;
public dynamic class mainSound extends Sound {
}
}//package
Section 25
//moneyDisplay (moneyDisplay)
package {
import flash.display.*;
import flash.text.*;
public class moneyDisplay extends Sprite {
public var moneyText:TextField;
public var goalText:TextField;
public function moneyDisplay(){
x = 549.1;
y = 41.1;
}
public function updateMoney(_arg1, _arg2){
moneyText.text = ("Money : $ " + _arg1);
goalText.text = ("Goal : $ " + _arg2);
}
}
}//package
Section 26
//objectiveScreen (objectiveScreen)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
public class objectiveScreen extends Sprite {
var request:URLRequest;
public var minilogoBut:SimpleButton;
public var playBut:SimpleButton;
var mainMov:mainClass;
public var goalText:TextField;
public function objectiveScreen(_arg1:mainClass){
request = new URLRequest("http://www.box10.com/?utm_source=brandedgames&utm_medium=moneyminer");
x = 320;
y = 240;
minilogoBut.addEventListener(MouseEvent.CLICK, mouseClick);
mainMov = _arg1;
mainMov.goalAdder = (mainMov.goalAdder + 215);
mainMov.moneyTarget = (mainMov.moneyTarget + (300 + mainMov.goalAdder));
trace(mainMov.moneyTarget);
goalText.text = ("$ " + mainMov.moneyTarget);
playBut.addEventListener(MouseEvent.CLICK, playButClicked);
}
public function mouseClick(_arg1:MouseEvent){
navigateToURL(request, "_blank");
}
public function playButClicked(_arg1:MouseEvent){
mainMov.levelInit();
}
}
}//package
Section 27
//pauseScreen (pauseScreen)
package {
import flash.events.*;
import flash.display.*;
public class pauseScreen extends Sprite {
var mainMov:mainClass;
public function pauseScreen(_arg1:mainClass){
mainMov = _arg1;
addEventListener(MouseEvent.CLICK, muteButClicked);
}
public function muteButClicked(_arg1:MouseEvent){
mainMov.removePause();
}
}
}//package
Section 28
//preloaderMain (preloaderMain)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class preloaderMain extends MovieClip {
public var BG:SimpleButton;
public var logoAnim:MovieClip;
public var introAnim:MovieClip;
var request:URLRequest;
var mainMov:mainClass;
public function preloaderMain(_arg1:mainClass){
mainMov = _arg1;
stop();
request = new URLRequest("http://www.box10.com/?utm_source=brandedgames&utm_medium=moneyminer");
logoAnim.but.visible = false;
logoAnim.logo.preloadBut.addEventListener(MouseEvent.MOUSE_OVER, mouseOver);
logoAnim.logo.preloadBut.addEventListener(MouseEvent.MOUSE_OUT, mouseOut);
logoAnim.logo.preloadBut.addEventListener(MouseEvent.CLICK, mouseClick);
logoAnim.but.addEventListener(MouseEvent.CLICK, introBegin);
BG.addEventListener(MouseEvent.CLICK, mouseClick);
addEventListener(Event.ENTER_FRAME, mainLoop);
}
public function butDisplay(){
logoAnim.but.visible = true;
}
public function mouseClick(_arg1:MouseEvent){
navigateToURL(request, "_blank");
}
public function mouseOver(_arg1:MouseEvent){
logoAnim.logo.buttonAnim.gotoAndStop(2);
}
public function mouseOut(_arg1:MouseEvent){
logoAnim.logo.buttonAnim.gotoAndStop(1);
}
public function introBegin(_arg1:MouseEvent){
nextFrame();
}
public function mainLoop(_arg1:Event){
var _local2:Number;
if (((mainClass(root)) && (logoAnim))){
_local2 = int(((mainMov.loadedBytes * 100) / mainMov.totalBytes));
if (_local2 > logoAnim.logo.logoGray.currentFrame){
logoAnim.logo.logoGray.play();
} else {
trace("loading");
trace(mainMov.loadedBytes);
logoAnim.logo.logoGray.stop();
};
if (logoAnim.logo.logoGray.currentFrame == 100){
logoAnim.logo.logoRed.play();
};
if (logoAnim.logo.logoRed.currentFrame == 23){
logoAnim.logo.logoRed.stop();
butDisplay();
};
};
if (((mainClass(root)) && (introAnim))){
if (introAnim.redM.currentFrame == 210){
introAnim.play();
};
if (introAnim.currentFrame == 47){
mainMov.gameStart();
};
if (introAnim.currentFrame == 48){
introAnim.stop();
};
};
}
}
}//package
Section 29
//scoreAnim (scoreAnim)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class scoreAnim extends MovieClip {
public var score:TextField;
var mainMov:mainClass;
public function scoreAnim(){
addEventListener(Event.ENTER_FRAME, mainLoop);
}
public function mainLoop(_arg1:Event){
if (mainClass(root)){
mainMov = mainClass(root);
if (currentFrame == 19){
mainMov.removeObj(this);
};
};
}
}
}//package
Section 30
//shopScreen (shopScreen)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
public class shopScreen extends Sprite {
public var moreBut:SimpleButton;
var itemArray:Array;
public var moneyText:TextField;
var certAva:Boolean;// = false
public var buyBut:SimpleButton;
public var magnifyBut:SimpleButton;
public var cloverShopBut:MovieClip;
public var dynamiteBut:SimpleButton;
var dynamitePrice:Number;// = 0
public var magnifyShop:MovieClip;
public var powerBut:SimpleButton;
public var itemName:TextField;
public var certShop:MovieClip;
public var itemDesc:TextField;
var powerPrice:Number;// = 0
var itemSel:String;
public var cloverShop:MovieClip;
var dynamiteAva:Boolean;// = true
var magnifyAva:Boolean;// = false
public var cloverBut:SimpleButton;
var powerAva:Boolean;// = false
public var nextstageBut:SimpleButton;
var certPrice:Number;// = 0
var cloverPrice:Number;// = 0
var request:URLRequest;
public var powerShop:MovieClip;
public var dynamiteShop:MovieClip;
public var certBut:SimpleButton;
var magnifyPrice:Number;// = 0
var mainMov:mainClass;
public var magnifyShopBut:MovieClip;
var cloverAva:Boolean;// = false
public var dynamiteShopBut:MovieClip;
public var powerShopBut:MovieClip;
public var certShopBut:MovieClip;
public function shopScreen(_arg1:mainClass){
cloverAva = false;
dynamiteAva = true;
magnifyAva = false;
powerAva = false;
certAva = false;
cloverPrice = 0;
dynamitePrice = 0;
magnifyPrice = 0;
powerPrice = 0;
certPrice = 0;
itemArray = new Array();
super();
request = new URLRequest("http://www.box10.com/?utm_source=brandedgames&utm_medium=moneyminer");
itemArray = [["name", "price", "desc"], ["Clover", 300, "Increases the chance of earning more money from treasure box (1 Level Only)"], ["Dynamite", 300, "Blow up an object (Press UP to use)"], ["Magnify", 300, "Increases the value of rocks (1 Level Only)"], ["PowerBattery", 300, "Increases the power of the crane (1 Level Only)"], ["Certification", 200, "Increase the value of any mineral(1 Level Only)"]];
mainMov = _arg1;
moneyText.text = ("$ " + mainMov.money);
dynamiteShopBut.gotoAndStop(1);
dynamiteShopBut.useHandCursor = true;
dynamitePrice = (Math.floor((Math.random() * itemArray[2][1])) + 50);
dynamiteBut.addEventListener(MouseEvent.MOUSE_OVER, dynamiteShopButClicked);
moreBut.addEventListener(MouseEvent.CLICK, mouseClick);
if (Math.random() > 0.6){
cloverShopBut.gotoAndStop(1);
cloverAva = true;
cloverPrice = (Math.floor((Math.random() * itemArray[1][1])) + 50);
cloverBut.addEventListener(MouseEvent.MOUSE_OVER, cloverShopButClicked);
} else {
cloverShopBut.gotoAndStop(2);
cloverBut.visible = false;
cloverShop.visible = false;
};
if (Math.random() > 0.6){
magnifyShopBut.gotoAndStop(1);
magnifyAva = true;
magnifyPrice = (Math.floor((Math.random() * itemArray[3][1])) + 50);
magnifyBut.addEventListener(MouseEvent.MOUSE_OVER, magnifyShopButClicked);
} else {
magnifyShopBut.gotoAndStop(2);
magnifyBut.visible = false;
magnifyShop.visible = false;
};
if (Math.random() > 0.6){
powerShopBut.gotoAndStop(1);
powerAva = true;
powerPrice = (Math.floor((Math.random() * itemArray[4][1])) + 50);
powerBut.addEventListener(MouseEvent.MOUSE_OVER, powerShopButClicked);
} else {
powerShopBut.gotoAndStop(2);
powerBut.visible = false;
powerShop.visible = false;
};
if (Math.random() > 0.6){
certShopBut.gotoAndStop(1);
certAva = true;
certPrice = (Math.floor((Math.random() * itemArray[5][1])) + 50);
certBut.addEventListener(MouseEvent.MOUSE_OVER, certShopButClicked);
} else {
certShopBut.gotoAndStop(2);
certBut.visible = false;
certShop.visible = false;
};
nextstageBut.addEventListener(MouseEvent.CLICK, nextstageButClicked);
buyBut.addEventListener(MouseEvent.CLICK, buyButClicked);
}
public function mouseClick(_arg1:MouseEvent){
navigateToURL(request, "_blank");
}
public function cloverShopButClicked(_arg1:MouseEvent){
trace("cloverBut");
if (cloverAva){
itemSel = itemArray[1][0];
itemDesc.text = itemArray[1][2];
itemName.text = ((("$ " + cloverPrice) + " - ") + itemArray[1][0]);
};
}
public function magnifyShopButClicked(_arg1:MouseEvent){
trace("magnifyBut");
if (magnifyAva){
itemSel = itemArray[3][0];
itemDesc.text = itemArray[3][2];
itemName.text = ((("$ " + magnifyPrice) + " - ") + itemArray[3][0]);
};
}
public function powerShopButClicked(_arg1:MouseEvent){
trace("powerBut");
if (powerAva){
itemSel = itemArray[4][0];
itemDesc.text = itemArray[4][2];
itemName.text = ((("$ " + powerPrice) + " - ") + itemArray[4][0]);
};
}
public function dynamiteShopButClicked(_arg1:MouseEvent){
trace("dynamiteBut");
if (dynamiteAva){
itemSel = itemArray[2][0];
itemDesc.text = itemArray[2][2];
itemName.text = ((("$ " + dynamitePrice) + " - ") + itemArray[2][0]);
};
}
public function buyButClicked(_arg1:MouseEvent){
mainMov.winkingSound();
switch (itemSel){
case "Dynamite":
if (mainMov.money >= dynamitePrice){
mainMov.money = (mainMov.money - dynamitePrice);
moneyText.text = ("$ " + mainMov.money);
dynamiteShopBut.gotoAndStop(2);
dynamiteBut.visible = false;
dynamiteShop.visible = false;
mainMov.dynamiteNumber++;
dynamiteAva = false;
itemSel = "";
itemDesc.text = "";
itemName.text = "";
};
break;
case "Clover":
if (mainMov.money >= cloverPrice){
mainMov.money = (mainMov.money - cloverPrice);
mainMov.cloverPU = true;
moneyText.text = ("$ " + mainMov.money);
cloverShopBut.gotoAndStop(2);
cloverBut.visible = false;
cloverShop.visible = false;
cloverAva = false;
itemSel = "";
itemDesc.text = "";
itemName.text = "";
};
break;
case "Magnify":
if (mainMov.money >= magnifyPrice){
mainMov.money = (mainMov.money - magnifyPrice);
mainMov.magnifyPU = true;
moneyText.text = ("$ " + mainMov.money);
magnifyShopBut.gotoAndStop(2);
magnifyBut.visible = false;
magnifyShop.visible = false;
magnifyAva = false;
itemSel = "";
itemDesc.text = "";
itemName.text = "";
};
break;
case "PowerBattery":
if (mainMov.money >= powerPrice){
mainMov.money = (mainMov.money - powerPrice);
mainMov.powerPU = true;
moneyText.text = ("$ " + mainMov.money);
powerShopBut.gotoAndStop(2);
powerBut.visible = false;
powerShop.visible = false;
powerAva = false;
itemSel = "";
itemDesc.text = "";
itemName.text = "";
};
break;
case "Certification":
if (mainMov.money >= certPrice){
mainMov.money = (mainMov.money - certPrice);
mainMov.certPU = true;
moneyText.text = ("$ " + mainMov.money);
certShopBut.gotoAndStop(2);
certBut.visible = false;
certShop.visible = false;
certAva = false;
itemSel = "";
itemDesc.text = "";
itemName.text = "";
};
break;
};
}
public function nextstageButClicked(_arg1:MouseEvent){
trace("nextstage");
mainMov.objectiveDisp();
}
public function certShopButClicked(_arg1:MouseEvent){
trace("certBut");
if (certAva){
itemSel = itemArray[5][0];
itemDesc.text = itemArray[5][2];
itemName.text = ((("$ " + certPrice) + " - ") + itemArray[5][0]);
};
}
}
}//package
Section 31
//skipLevelDisp (skipLevelDisp)
package {
import flash.display.*;
public dynamic class skipLevelDisp extends MovieClip {
}
}//package
Section 32
//SoundManager (SoundManager)
package {
import flash.media.*;
import flash.utils.*;
import flash.net.*;
public class SoundManager {
private var _soundsDict:Dictionary;
private var _sounds:Array;
private static var _instance:SoundManager;
private static var _allowInstance:Boolean;
public function SoundManager(){
this._soundsDict = new Dictionary(true);
this._sounds = new Array();
if (!SoundManager._allowInstance){
throw (new Error("Error: Use SoundManager.getInstance() instead of the new keyword."));
};
}
public function fadeSound(_arg1:String, _arg2:Number=0, _arg3:Number=1):void{
}
public function get sounds():Array{
return (this._sounds);
}
public function getSoundDuration(_arg1:String):Number{
return (this._soundsDict[_arg1].sound.length);
}
public function setSoundVolume(_arg1:String, _arg2:Number):void{
var _local3:Object;
var _local4:SoundTransform;
_local3 = this._soundsDict[_arg1];
_local4 = _local3.channel.soundTransform;
_local4.volume = _arg2;
_local3.channel.soundTransform = _local4;
}
public function getSoundVolume(_arg1:String):Number{
return (this._soundsDict[_arg1].channel.soundTransform.volume);
}
public function addLibrarySound(_arg1, _arg2:String):Boolean{
var _local3:int;
var _local4:Object;
var _local5:Sound;
_local3 = 0;
while (_local3 < this._sounds.length) {
if (this._sounds[_local3].name == _arg2){
return (false);
};
_local3++;
};
_local4 = new Object();
_local5 = new (_arg1);
_local4.name = _arg2;
_local4.sound = _local5;
_local4.channel = new SoundChannel();
_local4.position = 0;
_local4.paused = true;
_local4.volume = 1;
_local4.startTime = 0;
_local4.loops = 0;
_local4.pausedByAll = false;
this._soundsDict[_arg2] = _local4;
this._sounds.push(_local4);
return (true);
}
public function toString():String{
return (getQualifiedClassName(this));
}
public function isSoundPaused(_arg1:String):Boolean{
return (this._soundsDict[_arg1].paused);
}
public function removeAllSounds():void{
var _local1:int;
_local1 = 0;
while (_local1 < this._sounds.length) {
this._sounds[_local1] = null;
_local1++;
};
this._sounds = new Array();
this._soundsDict = new Dictionary(true);
}
public function getSoundPosition(_arg1:String):Number{
return (this._soundsDict[_arg1].channel.position);
}
public function stopAllSounds(_arg1:Boolean=true):void{
var _local2:int;
var _local3:String;
_local2 = 0;
while (_local2 < this._sounds.length) {
_local3 = this._sounds[_local2].name;
if (_arg1){
if (!this._soundsDict[_local3].paused){
this._soundsDict[_local3].pausedByAll = true;
this.stopSound(_local3);
};
} else {
this.stopSound(_local3);
};
_local2++;
};
}
public function removeSound(_arg1:String):void{
var _local2:int;
_local2 = 0;
while (_local2 < this._sounds.length) {
if (this._sounds[_local2].name == _arg1){
this._sounds[_local2] = null;
this._sounds.splice(_local2, 1);
};
_local2++;
};
delete this._soundsDict[_arg1];
}
public function muteAllSounds():void{
var _local1:int;
var _local2:String;
_local1 = 0;
while (_local1 < this._sounds.length) {
_local2 = this._sounds[_local1].name;
this.setSoundVolume(_local2, 0);
_local1++;
};
}
public function stopSound(_arg1:String):void{
var _local2:Object;
_local2 = this._soundsDict[_arg1];
_local2.paused = true;
_local2.channel.stop();
_local2.position = _local2.channel.position;
}
public function pauseAllSounds(_arg1:Boolean=true):void{
var _local2:int;
var _local3:String;
_local2 = 0;
while (_local2 < this._sounds.length) {
_local3 = this._sounds[_local2].name;
if (_arg1){
if (!this._soundsDict[_local3].paused){
this._soundsDict[_local3].pausedByAll = true;
this.pauseSound(_local3);
};
} else {
this.pauseSound(_local3);
};
_local2++;
};
}
public function playAllSounds(_arg1:Boolean=false):void{
var _local2:int;
var _local3:String;
_local2 = 0;
while (_local2 < this._sounds.length) {
_local3 = this._sounds[_local2].name;
if (_arg1){
if (this._soundsDict[_local3].pausedByAll){
this._soundsDict[_local3].pausedByAll = false;
this.playSound(_local3);
};
} else {
this.playSound(_local3);
};
_local2++;
};
}
public function addExternalSound(_arg1:String, _arg2:String, _arg3:Number=1000, _arg4:Boolean=false):Boolean{
var _local5:int;
var _local6:Object;
var _local7:Sound;
_local5 = 0;
while (_local5 < this._sounds.length) {
if (this._sounds[_local5].name == _arg2){
return (false);
};
_local5++;
};
_local6 = new Object();
_local7 = new Sound(new URLRequest(_arg1), new SoundLoaderContext(_arg3, _arg4));
_local6.name = _arg2;
_local6.sound = _local7;
_local6.channel = new SoundChannel();
_local6.position = 0;
_local6.paused = true;
_local6.volume = 1;
_local6.startTime = 0;
_local6.loops = 0;
_local6.pausedByAll = false;
this._soundsDict[_arg2] = _local6;
this._sounds.push(_local6);
return (true);
}
public function unmuteAllSounds():void{
var _local1:int;
var _local2:String;
var _local3:Object;
var _local4:SoundTransform;
_local1 = 0;
while (_local1 < this._sounds.length) {
_local2 = this._sounds[_local1].name;
_local3 = this._soundsDict[_local2];
_local4 = _local3.channel.soundTransform;
_local4.volume = _local3.volume;
_local3.channel.soundTransform = _local4;
_local1++;
};
}
public function isSoundPausedByAll(_arg1:String):Boolean{
return (this._soundsDict[_arg1].pausedByAll);
}
public function getSoundObject(_arg1:String):Sound{
return (this._soundsDict[_arg1].sound);
}
public function pauseSound(_arg1:String):void{
var _local2:Object;
_local2 = this._soundsDict[_arg1];
_local2.paused = true;
_local2.position = _local2.channel.position;
_local2.channel.stop();
}
public function playSound(_arg1:String, _arg2:Number=1, _arg3:Number=0, _arg4:int=0):void{
var _local5:Object;
_local5 = this._soundsDict[_arg1];
_local5.volume = _arg2;
_local5.startTime = _arg3;
_local5.loops = _arg4;
if (_local5.paused){
_local5.channel = _local5.sound.play(_local5.position, _local5.loops, new SoundTransform(_local5.volume));
} else {
_local5.channel = _local5.sound.play(_arg3, _local5.loops, new SoundTransform(_local5.volume));
};
_local5.paused = false;
}
public static function getInstance():SoundManager{
if (SoundManager._instance == null){
SoundManager._allowInstance = true;
SoundManager._instance = new (SoundManager);
SoundManager._allowInstance = false;
};
return (SoundManager._instance);
}
}
}//package
Section 33
//splash (splash)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class splash extends Sprite {
var request:URLRequest;
public var minilogoBut:SimpleButton;
public var playBut:SimpleButton;
var mainMov:mainClass;
public function splash(_arg1:mainClass){
mainMov = _arg1;
request = new URLRequest("http://www.box10.com/?utm_source=brandedgames&utm_medium=moneyminer");
playBut.addEventListener(MouseEvent.CLICK, playButClicked);
minilogoBut.addEventListener(MouseEvent.CLICK, mouseClick);
}
public function mouseClick(_arg1:MouseEvent){
navigateToURL(request, "_blank");
}
public function howToButClicked(_arg1:MouseEvent){
}
public function playButClicked(_arg1:MouseEvent){
mainMov.playTheGame();
}
}
}//package
Section 34
//timerDisplay (timerDisplay)
package {
import flash.display.*;
import flash.text.*;
public class timerDisplay extends Sprite {
public var timerText:TextField;
public function timerDisplay(){
x = 549.1;
y = 84.8;
timerText.text = "01:00";
}
public function timerReset(){
timerText.text = "01:00";
}
public function updateTime(_arg1){
if (_arg1 > 9){
timerText.text = ("00:" + _arg1);
} else {
timerText.text = ("00:0" + _arg1);
};
}
}
}//package
Section 35
//winkSound (winkSound)
package {
import flash.media.*;
public dynamic class winkSound extends Sound {
}
}//package
Section 36
//winSound (winSound)
package {
import flash.media.*;
public dynamic class winSound extends Sound {
}
}//package