Section 1
//BlueBall_23 (NewGame_fla.BlueBall_23)
package NewGame_fla {
import flash.display.*;
public dynamic class BlueBall_23 extends MovieClip {
public var playButton:SimpleButton;
}
}//package NewGame_fla
Section 2
//gamelevel_34 (NewGame_fla.gamelevel_34)
package NewGame_fla {
import flash.display.*;
public dynamic class gamelevel_34 extends MovieClip {
public var quarterWall:Wall;
}
}//package NewGame_fla
Section 3
//GameText_36 (NewGame_fla.GameText_36)
package NewGame_fla {
import flash.display.*;
public dynamic class GameText_36 extends MovieClip {
public function GameText_36(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package NewGame_fla
Section 4
//ShowIfPosted_50 (NewGame_fla.ShowIfPosted_50)
package NewGame_fla {
import flash.display.*;
public dynamic class ShowIfPosted_50 extends MovieClip {
public function ShowIfPosted_50(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package NewGame_fla
Section 5
//ShowModeMC_51 (NewGame_fla.ShowModeMC_51)
package NewGame_fla {
import flash.display.*;
public dynamic class ShowModeMC_51 extends MovieClip {
public function ShowModeMC_51(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package NewGame_fla
Section 6
//ToggleButton_53 (NewGame_fla.ToggleButton_53)
package NewGame_fla {
import flash.display.*;
public dynamic class ToggleButton_53 extends MovieClip {
public function ToggleButton_53(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package NewGame_fla
Section 7
//Trophie_54 (NewGame_fla.Trophie_54)
package NewGame_fla {
import flash.display.*;
public dynamic class Trophie_54 extends MovieClip {
public function Trophie_54(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package NewGame_fla
Section 8
//Block (Block)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Block extends MovieClip {
private var xdif:Number;// = 0
private var cursor:Cursor;
private var speed;
private var ydif:Number;// = 0
private var lastTime:int;
private var updatePositionY:Number;
private var locationTimer:Timer;
private var target:Cursor;
private var updatePositionX:Number;
public var blockSpeed:Number;// = 100
public var length;
public function Block(_arg1, _arg2:Number, _arg3:Number, _arg4:Cursor){
blockSpeed = 100;
xdif = 0;
ydif = 0;
speed = ((Math.random() * 80) + 60);
length = Math.sqrt(((xdif * xdif) + (ydif * ydif)));
super();
this.x = _arg1;
this.y = _arg2;
blockSpeed = _arg3;
addEventListener(Event.ENTER_FRAME, moveBlock);
this.target = _arg4;
getCursorLocation();
}
public function getCursorLocation(){
var _local1:Number;
_local1 = (Math.random() * 20000);
locationTimer = new Timer(_local1, 1);
locationTimer.addEventListener(TimerEvent.TIMER_COMPLETE, repeatGetCursorLocation);
locationTimer.start();
}
public function moveBlock(_arg1:Event){
var _local2:int;
var _local3:*;
_local2 = (getTimer() - lastTime);
lastTime = (lastTime + _local2);
this.x = (this.x + ((xdif * _local2) / 1000));
this.y = (this.y + ((ydif * _local2) / 1000));
if (this.x < 40){
xdif = (target.x - this.x);
ydif = (target.y - this.y);
length = Math.sqrt(((xdif * xdif) + (ydif * ydif)));
xdif = (xdif / length);
ydif = (ydif / length);
xdif = (xdif * speed);
ydif = (ydif * speed);
};
if (this.y < 60){
xdif = (target.x - this.x);
ydif = (target.y - this.y);
length = Math.sqrt(((xdif * xdif) + (ydif * ydif)));
xdif = (xdif / length);
ydif = (ydif / length);
xdif = (xdif * speed);
ydif = (ydif * speed);
};
if (this.x > 557){
xdif = (target.x - this.x);
ydif = (target.y - this.y);
length = Math.sqrt(((xdif * xdif) + (ydif * ydif)));
xdif = (xdif / length);
ydif = (ydif / length);
xdif = (xdif * speed);
ydif = (ydif * speed);
};
if (this.y > 396){
xdif = (target.x - this.x);
ydif = (target.y - this.y);
_local3 = Math.sqrt(((xdif * xdif) + (ydif * ydif)));
xdif = (xdif / _local3);
ydif = (ydif / _local3);
xdif = (xdif * speed);
ydif = (ydif * speed);
};
if (this.x < -10){
deleteBlock();
} else {
if (this.y > 510){
deleteBlock();
} else {
if (this.y < -10){
deleteBlock();
} else {
if (this.x > 610){
deleteBlock();
};
};
};
};
}
public function deleteBlock(){
MovieClip(parent).removeBlock(this);
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, moveBlock);
}
public function repeatGetCursorLocation(_arg1:TimerEvent){
var _local2:*;
getCursorLocation();
if (speed < 200){
speed = (speed + 10);
} else {
if (speed > 200){
speed = (speed + 2);
};
};
xdif = (target.x - this.x);
ydif = (target.y - this.y);
_local2 = Math.sqrt(((xdif * xdif) + (ydif * ydif)));
xdif = (xdif / _local2);
ydif = (ydif / _local2);
xdif = (xdif * speed);
ydif = (ydif * speed);
}
}
}//package
Section 9
//Cursor (Cursor)
package {
import flash.display.*;
public dynamic class Cursor extends MovieClip {
public function Cursor(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 10
//ModeLocked (ModeLocked)
package {
import flash.display.*;
public dynamic class ModeLocked extends MovieClip {
}
}//package
Section 11
//NewGame (NewGame)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
public dynamic class NewGame extends MovieClip {
public var bb1:MovieClip;
public var Txt2:MovieClip;
public var bb6:MovieClip;
public var BlockX1:Number;
public var AroundT:Number;
public var BlockX3:Number;
public var TotalTime:TextField;
public var BlockX2:Number;
public var NormalB:Number;
public var ExtremeCannonTimer:Timer;
public var BlockY1:Number;
public var BlockY3:Number;
public var NormalT:Number;
var Powerupon:Boolean;// = false
public var BlockY2:Number;
public var theplayerName:String;
public var gameText:MovieClip;
public var ChooseModeButton:SimpleButton;
public var CreditsButton:SimpleButton;
public var CannonMode:SimpleButton;
public var deleteTimer:Timer;
public var RandomBB:TextField;
public var ExtremeMode:SimpleButton;
public var LevelTxt:MovieClip;
public var LocalLevelT:SharedObject;
public var Level10:MovieClip;
public var Level11:Number;
private var smartblocks:Array;
public var smartBlockY:Number;
public var smartBlockX:Number;
public var Level22:Number;
public var Level33:Number;
public var powerupTimer:Timer;
public var MenuButton9:SimpleButton;
public var GameMode:String;
public var speedB:Number;// = 100
public var Level44:Number;
public var ballTimerRandom:Timer;
public var Level55:Number;
public var playerName:TextField;
public var CrazyModeH:SimpleButton;
public var song:Sound;
public var ViewHighScoresButton1:SimpleButton;
public var AroundModeH:SimpleButton;
public var playAgainButton1:SimpleButton;
public var playAgainButton5:SimpleButton;
public var Level66:Number;
public var playAgainButton4:SimpleButton;
public var RandomMode:SimpleButton;
public var LocalCannonB:SharedObject;
public var myMenu;
public var LocalCannonT:SharedObject;
public var AroundMode:SimpleButton;
public var timeDisplay:TextField;
public var ExtremeB:Number;
public var timeString:String;
public var smartblockTimer:Timer;
public var HighScoreButton:SimpleButton;
public var Level77:Number;
public var Level1:MovieClip;
public var Level2:MovieClip;
public var Level3:MovieClip;
public var Level4:MovieClip;
public var Level5:MovieClip;
public var Level6:MovieClip;
public var Level7:MovieClip;
public var Level8:MovieClip;
public var Level9:MovieClip;
public var InstructionsButton:SimpleButton;
public var Level88:Number;
public var ChooseModeButton1:SimpleButton;
public var ExtremeT:Number;
public var LevelB:Number;
public var url:String;
public var LevelT:Number;
public var playAgainButton10:SimpleButton;
public var LocalExtremeB:SharedObject;
public var Level99:Number;
public var MenuButton:SimpleButton;
public var BlockX:Number;
public var LocalExtremeT:SharedObject;
public var downWall:Wall;
public var CursorColor:SimpleButton;
private var blocks:Array;
public var shootingTimer:Timer;
public var AroundBlockTime:Number;// = 1500
public var CrazyMode:SimpleButton;
public var timePassed:int;
public var BlockY:Number;
public var BBCounter:Number;
public var ExtremeBB:TextField;
public var box:MovieClip;
public var ExtremeModeH:SimpleButton;
public var Level1010:Number;
public var MoreCannons:Number;// = 0
public var XMAX:Number;
public var ballTimerAround:Timer;
public var rightWall:Wall;
private var powerups:Array;
public var StartButton:SimpleButton;
public var CannonBB:TextField;
public var PowerupY:Number;
public var BlueBallCounter:TextField;
public var Trophie:MovieClip;
public var PowerupX:Number;
public var LocalRandomT:SharedObject;
public var ExtremeTimer:Timer;
public var LocalRandomB:SharedObject;
public var NormalModeH:SimpleButton;
public var songChannel:SoundChannel;
public var LevelTimer:Timer;
public var LocalAroundB:SharedObject;
public var LocalAroundT:SharedObject;
public var ViewHighScoresButton:SimpleButton;
public var LocalNormalB:SharedObject;
public var leftWall:Wall;
public var CrazyUnlocked:Number;
public var seconds:int;
public var lastTime:int;// = 0
public var LocalNormalT:SharedObject;
public var LevelMade:TextField;
public var progressBar:MovieClip;
public var Musicon:Boolean;
public var LocalBBCounter:SharedObject;
public var blockTimer:Timer;
public var CannonB:Number;
public var gamelevel:MovieClip;
public var CannonT:Number;
public var XMIN:Number;
public var CountdownText:TextField;
public var playAgainButton:SimpleButton;
public var AroundBB:TextField;
public var LocalLevel1010:SharedObject;
public var ShowIfPosted:MovieClip;
public var LocalLevel22:SharedObject;
public var highe:SimpleButton;
public var upWall:Wall;
public var locked:ModeLocked;
public var highq:SimpleButton;
public var LocalLevel33:SharedObject;
public var LevelMode:SimpleButton;
public var CountdownSeconds:Number;
public var LocalLevel44:SharedObject;
public var smartBlockShootingTime:Number;// = 2000
public var PlayThisAgainButton:SimpleButton;
public var Countdownseconds:Number;
public var OptionsButton:SimpleButton;
public var cursor:Cursor;
public var LeveltimeDisplay:TextField;
public var NormalMode:SimpleButton;
public var LocalLevel55:SharedObject;
public var LocalLevel66:SharedObject;
public var countDownTimer:Timer;
public var ExtremeShootingTime:Number;// = 19000
public var NormalBB:TextField;
public var CursorC;
public var mediume:SimpleButton;
public var lowe:SimpleButton;
public var LocalLevel77:SharedObject;
public var mediumq:SimpleButton;
public var lowq:SimpleButton;
public var toggleButton:MovieClip;
public var LeveltimeString:String;
public var LocalLevel88:SharedObject;
public var RandomB:Number;
public var startGameButton:SimpleButton;
public var AroundNumber:Number;// = 0
public var RandomT:Number;
public var LocalLevel99:SharedObject;
public var Txt1:MovieClip;
public var RandomModeH:SimpleButton;
public var CannonModeH:SimpleButton;
private var walls:Array;
public var bb2:MovieClip;
public var bb4:MovieClip;
public var AroundB:Number;
public var ShowModeMC:MovieClip;
public var ClockTimer:Timer;
public var blackbutton:SimpleButton;
public var bb3:MovieClip;
public var bb5:MovieClip;
public function NewGame(){
var _local1:*;
lastTime = 0;
AroundNumber = 0;
smartBlockShootingTime = 2000;
MoreCannons = 0;
Powerupon = false;
ExtremeShootingTime = 19000;
AroundBlockTime = 1500;
speedB = 100;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11);
_local1 = new ContextMenu();
_local1.hideBuiltInItems();
}
public function RandomModeHigh(_arg1:MouseEvent){
var _local2:URLRequest;
url = "http://rankz.armorbot.com/BlueBall2RandomMode/";
_local2 = new URLRequest(url);
navigateToURL(_local2, "_blank");
}
public function PopUpHighScores1(_arg1:MouseEvent){
var _local2:String;
var _local3:URLRequest;
if (GameMode == "Normal"){
_local2 = "http://rankz.armorbot.com/BlueBall2NormalMode/";
} else {
if (GameMode == "Random"){
_local2 = "http://rankz.armorbot.com/BlueBall2RandomMode/";
} else {
if (GameMode == "Around"){
_local2 = "http://rankz.armorbot.com/BlueBall2AroundMode/";
} else {
if (GameMode == "Crazy"){
_local2 = "http://rankz.armorbot.com/BlueBall2CrazyMode/";
} else {
if (GameMode == "Extreme"){
_local2 = "http://rankz.armorbot.com/BlueBall2ExtremeMode/";
} else {
if (GameMode == "Cannon"){
_local2 = "http://rankz.armorbot.com/BlueBall2CannonMode/";
};
};
};
};
};
};
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
}
public function NormalModeHigh(_arg1:MouseEvent){
var _local2:URLRequest;
url = "http://rankz.armorbot.com/BlueBall2NormalMode/";
_local2 = new URLRequest(url);
navigateToURL(_local2, "_blank");
}
public function mediumquality(_arg1:MouseEvent){
stage.quality = "medium";
}
public function stopSong(){
songChannel.stop();
}
public function rolloverCrazy(_arg1:MouseEvent){
if (CrazyUnlocked == 2){
gameText.gotoAndStop(6);
} else {
gameText.gotoAndStop(9);
};
}
function frame11(){
Musicon = true;
song = new TestSong();
startSong();
gotoAndStop("Menu");
}
public function ExtremeModeTimer(){
ExtremeTimer = new Timer(ExtremeShootingTime, 1);
ExtremeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, repeatExtremeModeTimer);
ExtremeTimer.start();
}
public function CountDownClock(){
countDownTimer = new Timer(1000, 1);
countDownTimer.addEventListener(TimerEvent.TIMER_COMPLETE, repeatCountDownClock);
countDownTimer.start();
}
public function rolloutToggle(_arg1:MouseEvent){
toggleButton.gotoAndStop(toggleButton.buttonState);
}
function frame3(){
LocalBBCounter.data.gameinfoBB = BBCounter;
LocalNormalT.data.gameinfo1 = NormalT;
LocalLevelT.data.gameinfo2 = LevelT;
LocalRandomT.data.gameinfo3 = RandomT;
LocalAroundT.data.gameinfo4 = AroundT;
LocalExtremeT.data.gameinfo5 = ExtremeT;
LocalCannonT.data.gameinfo6 = CannonT;
LocalLevel22.data.gameinfo22 = Level22;
LocalLevel33.data.gameinfo33 = Level33;
LocalLevel44.data.gameinfo44 = Level44;
LocalLevel55.data.gameinfo55 = Level55;
LocalLevel66.data.gameinfo66 = Level66;
LocalLevel77.data.gameinfo77 = Level77;
LocalLevel88.data.gameinfo88 = Level88;
LocalLevel99.data.gameinfo99 = Level99;
LocalLevel1010.data.gameinfo1010 = Level1010;
LocalNormalB.data.gameinfoB1 = NormalB;
LocalRandomB.data.gameinfoB2 = RandomB;
LocalAroundB.data.gameinfoB3 = AroundB;
LocalExtremeB.data.gameinfoB4 = ExtremeB;
LocalCannonB.data.gameinfoB5 = CannonB;
stop();
LeveltimeString = String(CountdownSeconds);
if (GameMode == "Level1"){
CountdownSeconds = 45;
removeChild(Txt1);
timeDisplay.x = -1000;
LeveltimeDisplay.x = 25.6;
LeveltimeDisplay.y = 465;
LeveltimeString = String(CountdownSeconds);
LeveltimeDisplay.text = LeveltimeString;
} else {
if (GameMode == "Level2"){
CountdownSeconds = 65;
LeveltimeDisplay.x = 25.6;
LeveltimeDisplay.y = 465;
removeChild(Txt1);
timeDisplay.x = -1000;
LeveltimeString = String(CountdownSeconds);
LeveltimeDisplay.text = LeveltimeString;
} else {
if (GameMode == "Level3"){
CountdownSeconds = 40;
LeveltimeDisplay.x = 25.6;
LeveltimeDisplay.y = 465;
removeChild(Txt1);
timeDisplay.x = -1000;
LeveltimeString = String(CountdownSeconds);
LeveltimeDisplay.text = LeveltimeString;
} else {
if (GameMode == "Level4"){
CountdownSeconds = 50;
LeveltimeDisplay.x = 25.6;
LeveltimeDisplay.y = 465;
removeChild(Txt1);
timeDisplay.x = -1000;
LeveltimeString = String(CountdownSeconds);
LeveltimeDisplay.text = LeveltimeString;
} else {
if (GameMode == "Level5"){
CountdownSeconds = 90;
LeveltimeDisplay.x = 25.6;
LeveltimeDisplay.y = 465;
removeChild(Txt1);
timeDisplay.x = -1000;
LeveltimeString = String(CountdownSeconds);
LeveltimeDisplay.text = LeveltimeString;
} else {
if (GameMode == "Level6"){
CountdownSeconds = 65;
LeveltimeDisplay.x = 25.6;
LeveltimeDisplay.y = 465;
removeChild(Txt1);
timeDisplay.x = -1000;
LeveltimeString = String(CountdownSeconds);
LeveltimeDisplay.text = LeveltimeString;
} else {
if (GameMode == "Level7"){
CountdownSeconds = 20;
timeDisplay.x = -1000;
LeveltimeDisplay.x = 25.6;
LeveltimeDisplay.y = 465;
removeChild(Txt1);
LeveltimeString = String(CountdownSeconds);
LeveltimeDisplay.text = LeveltimeString;
} else {
if (GameMode == "Level8"){
CountdownSeconds = 30;
timeDisplay.x = -1000;
LeveltimeDisplay.x = 25.6;
LeveltimeDisplay.y = 465;
removeChild(Txt1);
LeveltimeString = String(CountdownSeconds);
LeveltimeDisplay.text = LeveltimeString;
} else {
if (GameMode == "Level9"){
CountdownSeconds = 100;
timeDisplay.x = -1000;
LeveltimeDisplay.x = 25.6;
LeveltimeDisplay.y = 465;
LeveltimeString = String(CountdownSeconds);
LeveltimeDisplay.text = LeveltimeString;
removeChild(Txt1);
} else {
if (GameMode == "Level10"){
CountdownSeconds = 45;
timeDisplay.x = -1000;
LeveltimeDisplay.x = 25.6;
LeveltimeDisplay.y = 465;
LeveltimeString = String(CountdownSeconds);
LeveltimeDisplay.text = LeveltimeString;
removeChild(Txt1);
} else {
LevelTxt.x = -1000;
};
};
};
};
};
};
};
};
};
};
StartButton.addEventListener(MouseEvent.CLICK, startTheRealGame);
seconds = 0;
timeString = String(seconds);
}
function frame5(){
LocalBBCounter.data.gameinfoBB = BBCounter;
LocalNormalT.data.gameinfo1 = NormalT;
LocalLevelT.data.gameinfo2 = LevelT;
LocalRandomT.data.gameinfo3 = RandomT;
LocalAroundT.data.gameinfo4 = AroundT;
LocalExtremeT.data.gameinfo5 = ExtremeT;
LocalCannonT.data.gameinfo6 = CannonT;
LocalLevel22.data.gameinfo22 = Level22;
LocalLevel33.data.gameinfo33 = Level33;
LocalLevel44.data.gameinfo44 = Level44;
LocalLevel55.data.gameinfo55 = Level55;
LocalLevel66.data.gameinfo66 = Level66;
LocalLevel77.data.gameinfo77 = Level77;
LocalLevel88.data.gameinfo88 = Level88;
LocalLevel99.data.gameinfo99 = Level99;
LocalLevel1010.data.gameinfo1010 = Level1010;
LocalNormalB.data.gameinfoB1 = NormalB;
LocalRandomB.data.gameinfoB2 = RandomB;
LocalAroundB.data.gameinfoB3 = AroundB;
LocalExtremeB.data.gameinfoB4 = ExtremeB;
LocalCannonB.data.gameinfoB5 = CannonB;
playAgainButton.addEventListener(MouseEvent.CLICK, goToMenu);
}
function frame6(){
LocalBBCounter.data.gameinfoBB = BBCounter;
LocalNormalT.data.gameinfo1 = NormalT;
LocalLevelT.data.gameinfo2 = LevelT;
LocalRandomT.data.gameinfo3 = RandomT;
LocalAroundT.data.gameinfo4 = AroundT;
LocalExtremeT.data.gameinfo5 = ExtremeT;
LocalCannonT.data.gameinfo6 = CannonT;
LocalLevel22.data.gameinfo22 = Level22;
LocalLevel33.data.gameinfo33 = Level33;
LocalLevel44.data.gameinfo44 = Level44;
LocalLevel55.data.gameinfo55 = Level55;
LocalLevel66.data.gameinfo66 = Level66;
LocalLevel77.data.gameinfo77 = Level77;
LocalLevel88.data.gameinfo88 = Level88;
LocalLevel99.data.gameinfo99 = Level99;
LocalLevel1010.data.gameinfo1010 = Level1010;
LocalNormalB.data.gameinfoB1 = NormalB;
LocalRandomB.data.gameinfoB2 = RandomB;
LocalAroundB.data.gameinfoB3 = AroundB;
LocalExtremeB.data.gameinfoB4 = ExtremeB;
LocalCannonB.data.gameinfoB5 = CannonB;
playAgainButton10.addEventListener(MouseEvent.CLICK, goToMenu10);
}
function frame7(){
LocalBBCounter.data.gameinfoBB = BBCounter;
LocalNormalT.data.gameinfo1 = NormalT;
LocalLevelT.data.gameinfo2 = LevelT;
LocalRandomT.data.gameinfo3 = RandomT;
LocalAroundT.data.gameinfo4 = AroundT;
LocalExtremeT.data.gameinfo5 = ExtremeT;
LocalCannonT.data.gameinfo6 = CannonT;
LocalLevel22.data.gameinfo22 = Level22;
LocalLevel33.data.gameinfo33 = Level33;
LocalLevel44.data.gameinfo44 = Level44;
LocalLevel55.data.gameinfo55 = Level55;
LocalLevel66.data.gameinfo66 = Level66;
LocalLevel77.data.gameinfo77 = Level77;
LocalLevel88.data.gameinfo88 = Level88;
LocalLevel99.data.gameinfo99 = Level99;
LocalLevel1010.data.gameinfo1010 = Level1010;
LocalNormalB.data.gameinfoB1 = NormalB;
LocalRandomB.data.gameinfoB2 = RandomB;
LocalAroundB.data.gameinfoB3 = AroundB;
LocalExtremeB.data.gameinfoB4 = ExtremeB;
LocalCannonB.data.gameinfoB5 = CannonB;
playAgainButton5.addEventListener(MouseEvent.CLICK, goToMenu5);
CursorColor.addEventListener(MouseEvent.CLICK, ChangeCursor);
blackbutton.addEventListener(MouseEvent.CLICK, ChangeCursord);
lowq.addEventListener(MouseEvent.CLICK, lowquality);
mediumq.addEventListener(MouseEvent.CLICK, mediumquality);
highq.addEventListener(MouseEvent.CLICK, highquality);
lowe.addEventListener(MouseEvent.CLICK, loweffects);
mediume.addEventListener(MouseEvent.CLICK, mediumeffects);
highe.addEventListener(MouseEvent.CLICK, higheffects);
toggleButton.addEventListener(MouseEvent.MOUSE_OVER, rolloverToggle);
toggleButton.addEventListener(MouseEvent.MOUSE_OUT, rolloutToggle);
toggleButton.addEventListener(MouseEvent.CLICK, toggleClick);
toggleButton.buttonState = "on";
toggleButton.gotoAndStop("on");
}
public function addBlockTimerRandom(){
ballTimerRandom = new Timer(1500, 1);
ballTimerRandom.addEventListener(TimerEvent.TIMER_COMPLETE, repeatballTimerRandom);
ballTimerRandom.start();
}
public function addBlock(){
var _local1:Number;
var _local2:Block;
_local1 = 100;
BlockY = 40;
BlockX = 24;
_local2 = new Block(BlockX, BlockY, _local1, cursor);
addChild(_local2);
blocks.push(_local2);
BBCounter = (BBCounter + 1);
}
function frame2(){
LocalBBCounter.data.gameinfoBB = BBCounter;
LocalNormalT.data.gameinfo1 = NormalT;
LocalLevelT.data.gameinfo2 = LevelT;
LocalRandomT.data.gameinfo3 = RandomT;
LocalAroundT.data.gameinfo4 = AroundT;
LocalExtremeT.data.gameinfo5 = ExtremeT;
LocalCannonT.data.gameinfo6 = CannonT;
LocalLevel22.data.gameinfo22 = Level22;
LocalLevel33.data.gameinfo33 = Level33;
LocalLevel44.data.gameinfo44 = Level44;
LocalLevel55.data.gameinfo55 = Level55;
LocalLevel66.data.gameinfo66 = Level66;
LocalLevel77.data.gameinfo77 = Level77;
LocalLevel88.data.gameinfo88 = Level88;
LocalLevel99.data.gameinfo99 = Level99;
LocalLevel1010.data.gameinfo1010 = Level1010;
LocalNormalB.data.gameinfoB1 = NormalB;
LocalRandomB.data.gameinfoB2 = RandomB;
LocalAroundB.data.gameinfoB3 = AroundB;
LocalExtremeB.data.gameinfoB4 = ExtremeB;
LocalCannonB.data.gameinfoB5 = CannonB;
startGameButton.addEventListener(MouseEvent.CLICK, starttheGame);
ViewHighScoresButton.addEventListener(MouseEvent.CLICK, PopUpHighScores);
InstructionsButton.addEventListener(MouseEvent.CLICK, showInstructions);
OptionsButton.addEventListener(MouseEvent.CLICK, gotoOptions);
CreditsButton.addEventListener(MouseEvent.CLICK, gotoCredits);
if (Musicon == false){
gotoAndStop(11);
};
stop();
}
public function addSecond(_arg1:TimerEvent){
seconds = (seconds + 1);
timeString = String(seconds);
timeDisplay.text = timeString;
startClock();
}
function frame4(){
LocalBBCounter.data.gameinfoBB = BBCounter;
LocalNormalT.data.gameinfo1 = NormalT;
LocalLevelT.data.gameinfo2 = LevelT;
LocalRandomT.data.gameinfo3 = RandomT;
LocalAroundT.data.gameinfo4 = AroundT;
LocalExtremeT.data.gameinfo5 = ExtremeT;
LocalCannonT.data.gameinfo6 = CannonT;
LocalLevel22.data.gameinfo22 = Level22;
LocalLevel33.data.gameinfo33 = Level33;
LocalLevel44.data.gameinfo44 = Level44;
LocalLevel55.data.gameinfo55 = Level55;
LocalLevel66.data.gameinfo66 = Level66;
LocalLevel77.data.gameinfo77 = Level77;
LocalLevel88.data.gameinfo88 = Level88;
LocalLevel99.data.gameinfo99 = Level99;
LocalLevel1010.data.gameinfo1010 = Level1010;
LocalNormalB.data.gameinfoB1 = NormalB;
LocalRandomB.data.gameinfoB2 = RandomB;
LocalAroundB.data.gameinfoB3 = AroundB;
LocalExtremeB.data.gameinfoB4 = ExtremeB;
LocalCannonB.data.gameinfoB5 = CannonB;
if (GameMode == "Normal"){
ShowModeMC.gotoAndStop(1);
} else {
if (GameMode == "Random"){
ShowModeMC.gotoAndStop(2);
} else {
if (GameMode == "Around"){
ShowModeMC.gotoAndStop(3);
} else {
if (GameMode == "Crazy"){
ShowModeMC.gotoAndStop(4);
} else {
if (GameMode == "Extreme"){
ShowModeMC.gotoAndStop(5);
} else {
if (GameMode == "Cannon"){
ShowModeMC.gotoAndStop(6);
};
};
};
};
};
};
HighScoreButton.addEventListener(MouseEvent.CLICK, gotoSubmitPage);
playAgainButton1.addEventListener(MouseEvent.CLICK, goToMenu1);
ViewHighScoresButton1.addEventListener(MouseEvent.CLICK, PopUpHighScores1);
ChooseModeButton.addEventListener(MouseEvent.CLICK, gotoChooseMode);
PlayThisAgainButton.addEventListener(MouseEvent.CLICK, PlayThisAgain);
if (seconds >= 100){
if (GameMode == "Normal"){
if (NormalT == 2){
Trophie.gotoAndStop(2);
};
} else {
if (GameMode == "Random"){
if (RandomT == 2){
Trophie.gotoAndStop(3);
};
} else {
if (GameMode == "Around"){
if (AroundT == 2){
Trophie.gotoAndStop(4);
};
} else {
if (GameMode == "Extreme"){
if (ExtremeT == 2){
Trophie.gotoAndStop(5);
};
} else {
if (GameMode == "Cannon"){
if (CannonT == 2){
Trophie.gotoAndStop(6);
};
};
};
};
};
};
if (GameMode == "Normal"){
NormalT = 1;
} else {
if (GameMode == "Random"){
RandomT = 1;
} else {
if (GameMode == "Around"){
AroundT = 1;
} else {
if (GameMode == "Extreme"){
ExtremeT = 1;
} else {
if (GameMode == "Cannon"){
CannonT = 1;
};
};
};
};
};
};
if (GameMode == "Level1"){
gotoAndStop("Level");
} else {
if (GameMode == "Level2"){
gotoAndStop("Level");
} else {
if (GameMode == "Level3"){
gotoAndStop("Level");
} else {
if (GameMode == "Level4"){
gotoAndStop("Level");
} else {
if (GameMode == "Level5"){
gotoAndStop("Level");
} else {
if (GameMode == "Level6"){
gotoAndStop("Level");
} else {
if (GameMode == "Level7"){
gotoAndStop("Level");
} else {
if (GameMode == "Level8"){
gotoAndStop("Level");
} else {
if (GameMode == "Level9"){
gotoAndStop("Level");
} else {
if (GameMode == "Level10"){
gotoAndStop("Level");
};
};
};
};
};
};
};
};
};
};
timeString = String(seconds);
timeDisplay.text = timeString;
if (GameMode == "Normal"){
if (seconds > NormalB){
NormalB = seconds;
};
} else {
if (GameMode == "Random"){
if (seconds > RandomB){
RandomB = seconds;
};
} else {
if (GameMode == "Around"){
if (seconds > AroundB){
AroundB = seconds;
};
} else {
if (GameMode == "Extreme"){
if (seconds > ExtremeB){
ExtremeB = seconds;
};
} else {
if (GameMode == "Cannon"){
if (seconds > CannonB){
CannonB = seconds;
};
};
};
};
};
};
theplayerName = "Mr. BlueBall";
playerName.text = theplayerName;
}
public function startTheRealGame(_arg1:MouseEvent){
startGame();
startClock();
removeChild(StartButton);
}
public function addBlockTimerNormal(){
blockTimer = new Timer(1500, 1);
blockTimer.addEventListener(TimerEvent.TIMER_COMPLETE, repeatBlockTimerandAddBlock);
blockTimer.start();
}
function frame1(){
Mouse.hide();
addEventListener(Event.ENTER_FRAME, moveCursor);
cursor.mouseEnabled = false;
stop();
myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
XMAX = 650;
XMIN = 0;
addEventListener(Event.ENTER_FRAME, loadProgress);
Musicon = false;
CrazyUnlocked = 2;
CursorC = 1;
Level11 = 1;
LocalBBCounter = SharedObject.getLocal("BBCounter");
if (!isNaN(Number(LocalBBCounter.data.gameinfoBB))){
BBCounter = LocalBBCounter.data.gameinfoBB;
} else {
BBCounter = 0;
};
LocalNormalB = SharedObject.getLocal("B1");
LocalRandomB = SharedObject.getLocal("B2");
LocalAroundB = SharedObject.getLocal("B3");
LocalExtremeB = SharedObject.getLocal("B4");
LocalCannonB = SharedObject.getLocal("B5");
if (!isNaN(Number(LocalNormalB.data.gameinfoB1))){
NormalB = LocalNormalB.data.gameinfoB1;
} else {
NormalB = 0;
};
if (!isNaN(Number(LocalRandomB.data.gameinfoB2))){
RandomB = LocalRandomB.data.gameinfoB2;
} else {
RandomB = 0;
};
if (!isNaN(Number(LocalAroundB.data.gameinfoB3))){
AroundB = LocalAroundB.data.gameinfoB3;
} else {
AroundB = 0;
};
if (!isNaN(Number(LocalExtremeB.data.gameinfoB4))){
ExtremeB = LocalExtremeB.data.gameinfoB4;
} else {
ExtremeB = 0;
};
if (!isNaN(Number(LocalCannonB.data.gameinfoB5))){
CannonB = LocalCannonB.data.gameinfoB5;
} else {
CannonB = 0;
};
LocalLevel22 = SharedObject.getLocal("L22");
LocalLevel33 = SharedObject.getLocal("L33");
LocalLevel44 = SharedObject.getLocal("L44");
LocalLevel55 = SharedObject.getLocal("L55");
LocalLevel66 = SharedObject.getLocal("L66");
LocalLevel77 = SharedObject.getLocal("L77");
LocalLevel88 = SharedObject.getLocal("L88");
LocalLevel99 = SharedObject.getLocal("L99");
LocalLevel1010 = SharedObject.getLocal("L1010");
if (!isNaN(Number(LocalLevel22.data.gameinfo22))){
Level22 = LocalLevel22.data.gameinfo22;
} else {
Level22 = 2;
};
if (!isNaN(Number(LocalLevel33.data.gameinfo33))){
Level33 = LocalLevel33.data.gameinfo33;
} else {
Level33 = 2;
};
if (!isNaN(Number(LocalLevel44.data.gameinfo44))){
Level44 = LocalLevel44.data.gameinfo44;
} else {
Level44 = 2;
};
if (!isNaN(Number(LocalLevel55.data.gameinfo55))){
Level55 = LocalLevel55.data.gameinfo55;
} else {
Level55 = 2;
};
if (!isNaN(Number(LocalLevel66.data.gameinfo66))){
Level66 = LocalLevel66.data.gameinfo66;
} else {
Level66 = 2;
};
if (!isNaN(Number(LocalLevel77.data.gameinfo77))){
Level77 = LocalLevel77.data.gameinfo77;
} else {
Level77 = 2;
};
if (!isNaN(Number(LocalLevel88.data.gameinfo88))){
Level88 = LocalLevel88.data.gameinfo88;
} else {
Level88 = 2;
};
if (!isNaN(Number(LocalLevel99.data.gameinfo99))){
Level99 = LocalLevel99.data.gameinfo99;
} else {
Level99 = 2;
};
if (!isNaN(Number(LocalLevel1010.data.gameinfo1010))){
Level1010 = LocalLevel1010.data.gameinfo1010;
} else {
Level1010 = 2;
};
LocalNormalT = SharedObject.getLocal("T1");
LocalLevelT = SharedObject.getLocal("T2");
LocalRandomT = SharedObject.getLocal("T3");
LocalAroundT = SharedObject.getLocal("T4");
LocalExtremeT = SharedObject.getLocal("T5");
LocalCannonT = SharedObject.getLocal("T6");
if (!isNaN(Number(LocalNormalT.data.gameinfo1))){
NormalT = LocalNormalT.data.gameinfo1;
} else {
trace(("not saved! " + LocalNormalT.data.gameinfo1));
NormalT = 2;
};
if (!isNaN(Number(LocalLevelT.data.gameinfo2))){
LevelT = LocalLevelT.data.gameinfo2;
} else {
trace(("not saved! " + LocalLevelT.data.gameinfo2));
LevelT = 2;
};
if (!isNaN(Number(LocalRandomT.data.gameinfo3))){
RandomT = LocalRandomT.data.gameinfo3;
} else {
trace(("not saved! " + LocalRandomT.data.gameinfo3));
RandomT = 2;
};
if (!isNaN(Number(LocalAroundT.data.gameinfo4))){
AroundT = LocalAroundT.data.gameinfo4;
} else {
trace(("not saved! " + LocalAroundT.data.gameinfo4));
AroundT = 2;
};
if (!isNaN(Number(LocalExtremeT.data.gameinfo5))){
ExtremeT = LocalExtremeT.data.gameinfo5;
} else {
trace(("not saved! " + LocalExtremeT.data.gameinfo5));
ExtremeT = 2;
};
if (!isNaN(Number(LocalCannonT.data.gameinfo6))){
CannonT = LocalCannonT.data.gameinfo6;
} else {
trace(("not saved! " + LocalCannonT.data.gameinfo6));
CannonT = 2;
};
}
public function gotoSubmitPage(_arg1:MouseEvent){
theplayerName = playerName.text;
trace(theplayerName);
sendHighScores();
removeChild(HighScoreButton);
}
function frame9(){
LocalBBCounter.data.gameinfoBB = BBCounter;
LocalNormalT.data.gameinfo1 = NormalT;
LocalLevelT.data.gameinfo2 = LevelT;
LocalRandomT.data.gameinfo3 = RandomT;
LocalAroundT.data.gameinfo4 = AroundT;
LocalExtremeT.data.gameinfo5 = ExtremeT;
LocalCannonT.data.gameinfo6 = CannonT;
LocalLevel22.data.gameinfo22 = Level22;
LocalLevel33.data.gameinfo33 = Level33;
LocalLevel44.data.gameinfo44 = Level44;
LocalLevel55.data.gameinfo55 = Level55;
LocalLevel66.data.gameinfo66 = Level66;
LocalLevel77.data.gameinfo77 = Level77;
LocalLevel88.data.gameinfo88 = Level88;
LocalLevel99.data.gameinfo99 = Level99;
LocalLevel1010.data.gameinfo1010 = Level1010;
LocalNormalB.data.gameinfoB1 = NormalB;
LocalRandomB.data.gameinfoB2 = RandomB;
LocalAroundB.data.gameinfoB3 = AroundB;
LocalExtremeB.data.gameinfoB4 = ExtremeB;
LocalCannonB.data.gameinfoB5 = CannonB;
NormalModeH.addEventListener(MouseEvent.CLICK, NormalModeHigh);
RandomModeH.addEventListener(MouseEvent.CLICK, RandomModeHigh);
AroundModeH.addEventListener(MouseEvent.CLICK, AroundModeHigh);
CrazyModeH.addEventListener(MouseEvent.CLICK, CrazyModeHigh);
ExtremeModeH.addEventListener(MouseEvent.CLICK, ExtremeModeHigh);
CannonModeH.addEventListener(MouseEvent.CLICK, CannonModeHigh);
playAgainButton4.addEventListener(MouseEvent.CLICK, goToMenu4);
}
function frame10(){
LocalBBCounter.data.gameinfoBB = BBCounter;
LocalNormalT.data.gameinfo1 = NormalT;
LocalLevelT.data.gameinfo2 = LevelT;
LocalRandomT.data.gameinfo3 = RandomT;
LocalAroundT.data.gameinfo4 = AroundT;
LocalExtremeT.data.gameinfo5 = ExtremeT;
LocalCannonT.data.gameinfo6 = CannonT;
LocalLevel22.data.gameinfo22 = Level22;
LocalLevel33.data.gameinfo33 = Level33;
LocalLevel44.data.gameinfo44 = Level44;
LocalLevel55.data.gameinfo55 = Level55;
LocalLevel66.data.gameinfo66 = Level66;
LocalLevel77.data.gameinfo77 = Level77;
LocalLevel88.data.gameinfo88 = Level88;
LocalLevel99.data.gameinfo99 = Level99;
LocalLevel1010.data.gameinfo1010 = Level1010;
LocalNormalB.data.gameinfoB1 = NormalB;
LocalRandomB.data.gameinfoB2 = RandomB;
LocalAroundB.data.gameinfoB3 = AroundB;
LocalExtremeB.data.gameinfoB4 = ExtremeB;
LocalCannonB.data.gameinfoB5 = CannonB;
if (GameMode == "Level1"){
if (CountdownSeconds > seconds){
LevelMade.text = String((("You would have had to survive " + CountdownSeconds) + " seconds longer to win."));
} else {
if (CountdownSeconds <= 0){
LevelMade.text = String("Congratlations, you did it!");
};
};
} else {
if (GameMode == "Level2"){
if (CountdownSeconds > seconds){
LevelMade.text = String((("You would have had to survive " + CountdownSeconds) + " seconds longer to win."));
} else {
if (CountdownSeconds <= 0){
LevelMade.text = String("Congratlations, you did it!");
};
};
} else {
if (GameMode == "Level3"){
if (CountdownSeconds > seconds){
LevelMade.text = String((("You would have had to survive " + CountdownSeconds) + " seconds longer to win."));
} else {
if (CountdownSeconds <= 0){
LevelMade.text = String("Congratlations, you did it!");
};
};
} else {
if (GameMode == "Level4"){
if (CountdownSeconds > seconds){
LevelMade.text = String((("You would have had to survive " + CountdownSeconds) + " seconds longer to win."));
} else {
if (CountdownSeconds <= 0){
LevelMade.text = String("Congratlations, you did it!");
};
};
} else {
if (GameMode == "Level5"){
if (CountdownSeconds > seconds){
LevelMade.text = String((("You would have had to survive " + CountdownSeconds) + " seconds longer to win."));
} else {
if (CountdownSeconds <= 0){
LevelMade.text = String("Congratlations, you did it!");
};
};
} else {
if (GameMode == "Level6"){
if (CountdownSeconds > seconds){
LevelMade.text = String((("You would have had to survive " + CountdownSeconds) + " seconds longer to win."));
} else {
if (CountdownSeconds <= 0){
LevelMade.text = String("Congratlations, you did it!");
};
};
} else {
if (GameMode == "Level7"){
if (CountdownSeconds > seconds){
LevelMade.text = String((("You would have had to survive " + CountdownSeconds) + " seconds longer to win."));
} else {
if (CountdownSeconds <= 0){
LevelMade.text = String("Congratlations, you did it!");
};
};
} else {
if (GameMode == "Level8"){
if (CountdownSeconds > seconds){
LevelMade.text = String((("You would have had to survive " + CountdownSeconds) + " seconds longer to win."));
} else {
if (CountdownSeconds <= 0){
LevelMade.text = String("Congratlations, you did it!");
};
};
} else {
if (GameMode == "Level9"){
if (CountdownSeconds > seconds){
LevelMade.text = String((("You would have had to survive " + CountdownSeconds) + " seconds longer to win."));
} else {
if (CountdownSeconds <= 0){
LevelMade.text = String("Congratlations, you did it!");
};
};
} else {
if (GameMode == "Level10"){
if (CountdownSeconds > seconds){
LevelMade.text = String((("You would have had to survive " + CountdownSeconds) + " seconds longer to win."));
} else {
if (CountdownSeconds <= 0){
LevelMade.text = String("Congratlations, you did it!");
};
};
};
};
};
};
};
};
};
};
};
};
seconds = 0;
if (Level22 == 2){
Level2.alpha = 0.5;
} else {
Level2.addEventListener(MouseEvent.CLICK, playLevel2);
};
if (Level33 == 2){
Level3.alpha = 0.5;
} else {
Level3.addEventListener(MouseEvent.CLICK, playLevel3);
};
if (Level44 == 2){
Level4.alpha = 0.5;
} else {
Level4.addEventListener(MouseEvent.CLICK, playLevel4);
};
if (Level55 == 2){
Level5.alpha = 0.5;
} else {
Level5.addEventListener(MouseEvent.CLICK, playLevel5);
};
if (Level66 == 2){
Level6.alpha = 0.5;
} else {
Level6.addEventListener(MouseEvent.CLICK, playLevel6);
};
if (Level77 == 2){
Level7.alpha = 0.5;
} else {
Level7.addEventListener(MouseEvent.CLICK, playLevel7);
};
if (Level88 == 2){
Level8.alpha = 0.5;
} else {
Level8.addEventListener(MouseEvent.CLICK, playLevel8);
};
if (Level99 == 2){
Level9.alpha = 0.5;
} else {
Level9.addEventListener(MouseEvent.CLICK, playLevel9);
};
if (Level1010 == 2){
Level10.alpha = 0.5;
} else {
Level10.addEventListener(MouseEvent.CLICK, playLevel10);
};
MenuButton9.addEventListener(MouseEvent.CLICK, goToMenu9);
Level1.addEventListener(MouseEvent.CLICK, playLevel1);
ChooseModeButton1.addEventListener(MouseEvent.CLICK, gotoChooseMode1);
}
public function startSong(){
songChannel = song.play();
songChannel.addEventListener(Event.SOUND_COMPLETE, songCompleteHandler);
}
public function rolloverExtreme(_arg1:MouseEvent){
gameText.gotoAndStop(7);
}
public function repeatlessShootingTime(_arg1:TimerEvent){
lessShootingTime();
if (smartBlockShootingTime > 900){
smartBlockShootingTime = (smartBlockShootingTime - 45);
};
if (smartBlockShootingTime < 1700){
addBlock();
};
if (smartBlockShootingTime < 1500){
addBlock1();
};
if (smartBlockShootingTime < 1250){
addBlock2();
};
if (smartBlockShootingTime < 1000){
addBlock3();
};
MoreCannons = (MoreCannons + 1);
}
public function deletelocked(_arg1:TimerEvent){
removeChild(locked);
}
public function playLevel(_arg1:MouseEvent){
gotoAndStop("Level");
GameMode = "Level";
}
function frame8(){
LocalBBCounter.data.gameinfoBB = BBCounter;
LocalNormalT.data.gameinfo1 = NormalT;
LocalLevelT.data.gameinfo2 = LevelT;
LocalRandomT.data.gameinfo3 = RandomT;
LocalAroundT.data.gameinfo4 = AroundT;
LocalExtremeT.data.gameinfo5 = ExtremeT;
LocalCannonT.data.gameinfo6 = CannonT;
LocalLevel22.data.gameinfo22 = Level22;
LocalLevel33.data.gameinfo33 = Level33;
LocalLevel44.data.gameinfo44 = Level44;
LocalLevel55.data.gameinfo55 = Level55;
LocalLevel66.data.gameinfo66 = Level66;
LocalLevel77.data.gameinfo77 = Level77;
LocalLevel88.data.gameinfo88 = Level88;
LocalLevel99.data.gameinfo99 = Level99;
LocalLevel1010.data.gameinfo1010 = Level1010;
LocalNormalB.data.gameinfoB1 = NormalB;
LocalRandomB.data.gameinfoB2 = RandomB;
LocalAroundB.data.gameinfoB3 = AroundB;
LocalExtremeB.data.gameinfoB4 = ExtremeB;
LocalCannonB.data.gameinfoB5 = CannonB;
if (LevelT == 1){
if (NormalT == 1){
if (RandomT == 1){
if (AroundT == 1){
if (ExtremeT == 1){
if (CannonT == 1){
CrazyUnlocked = 1;
};
};
};
};
};
};
NormalBB.text = String(NormalB);
RandomBB.text = String(RandomB);
AroundBB.text = String(AroundB);
ExtremeBB.text = String(ExtremeB);
CannonBB.text = String(CannonB);
TotalTime.text = String(((((NormalB + RandomB) + AroundB) + ExtremeB) + CannonB));
BlueBallCounter.text = String(BBCounter);
locked = new ModeLocked();
NormalMode.addEventListener(MouseEvent.CLICK, playNormal);
NormalMode.addEventListener(MouseEvent.ROLL_OVER, rolloverNormal);
NormalMode.addEventListener(MouseEvent.ROLL_OUT, rollout);
LevelMode.addEventListener(MouseEvent.CLICK, playLevel);
LevelMode.addEventListener(MouseEvent.ROLL_OVER, rolloverLevel);
LevelMode.addEventListener(MouseEvent.ROLL_OUT, rollout);
RandomMode.addEventListener(MouseEvent.CLICK, playRandom);
RandomMode.addEventListener(MouseEvent.ROLL_OVER, rolloverRandom);
RandomMode.addEventListener(MouseEvent.ROLL_OUT, rollout);
AroundMode.addEventListener(MouseEvent.CLICK, playAround);
AroundMode.addEventListener(MouseEvent.ROLL_OVER, rolloverAround);
AroundMode.addEventListener(MouseEvent.ROLL_OUT, rollout);
CrazyMode.addEventListener(MouseEvent.CLICK, playCrazy);
CrazyMode.addEventListener(MouseEvent.ROLL_OVER, rolloverCrazy);
CrazyMode.addEventListener(MouseEvent.ROLL_OUT, rollout);
ExtremeMode.addEventListener(MouseEvent.CLICK, playExtreme);
ExtremeMode.addEventListener(MouseEvent.ROLL_OVER, rolloverExtreme);
ExtremeMode.addEventListener(MouseEvent.ROLL_OUT, rollout);
CannonMode.addEventListener(MouseEvent.CLICK, playCannon);
CannonMode.addEventListener(MouseEvent.ROLL_OVER, rolloverCannon);
CannonMode.addEventListener(MouseEvent.ROLL_OUT, rollout);
MenuButton.addEventListener(MouseEvent.CLICK, gotoMenu);
GameMode = "Nothing";
if (LevelT == 1){
bb2.alpha = 1;
} else {
bb2.alpha = 0.3;
};
if (NormalT == 1){
bb1.aplha = 1;
} else {
bb1.alpha = 0.3;
};
if (RandomT == 1){
bb3.alpha = 1;
} else {
bb3.alpha = 0.3;
};
if (AroundT == 1){
bb4.alpha = 1;
} else {
bb4.alpha = 0.3;
};
if (ExtremeT == 1){
bb5.alpha = 1;
} else {
bb5.alpha = 0.3;
};
if (CannonT == 1){
bb6.alpha = 1;
} else {
bb6.alpha = 0.3;
};
}
public function startClock(){
ClockTimer = new Timer(1000, 1);
ClockTimer.addEventListener(TimerEvent.TIMER_COMPLETE, addSecond);
ClockTimer.start();
}
public function examineLevel(){
var _local1:int;
var _local2:*;
var _local3:Object;
walls = new Array();
_local1 = 0;
while (_local1 < this.gamelevel.numChildren) {
_local2 = this.gamelevel.getChildAt(_local1);
_local3 = new Object();
_local3.mc = _local2;
walls.push(_local3.mc);
_local1++;
};
}
public function checkTimePassed(_arg1:Event){
}
public function deletePowerups(){
var _local1:int;
_local1 = (powerups.length - 1);
while (_local1 >= 0) {
removeChild(powerups[_local1]);
_local1--;
};
}
public function poweruptimer(){
powerupTimer = new Timer(20000, 1);
powerupTimer.addEventListener(TimerEvent.TIMER_COMPLETE, repeatpoweruptimer);
powerupTimer.start();
}
public function ExtremeCannons(){
ExtremeCannonTimer = new Timer(1000, 1);
ExtremeCannonTimer.addEventListener(TimerEvent.TIMER_COMPLETE, repeatExtremeCannonTimer);
ExtremeCannonTimer.start();
}
public function startLevelClock(){
LevelTimer = new Timer(1000, 1);
LevelTimer.addEventListener(TimerEvent.TIMER_COMPLETE, addLevelSecond);
LevelTimer.start();
}
public function repeatExtremeCannonTimer(_arg1:TimerEvent){
ExtremeCannons();
addsmartBlock1();
}
public function lessShootingTime(){
shootingTimer = new Timer(5000, 1);
shootingTimer.addEventListener(TimerEvent.TIMER_COMPLETE, repeatlessShootingTime);
shootingTimer.start();
}
public function higheffects(_arg1:MouseEvent){
stage.frameRate = 25;
}
public function addsmartBlock3(){
var _local1:Number;
var _local2:smartBlock;
_local1 = 100;
smartBlockY = 420;
smartBlockX = 302;
_local2 = new smartBlock(smartBlockX, smartBlockY, _local1, cursor);
addChild(_local2);
smartblocks.push(_local2);
BBCounter = (BBCounter + 1);
}
public function playRandom(_arg1:MouseEvent){
gotoAndStop("Normal");
GameMode = "Random";
}
public function loadProgress(_arg1:Event){
var _local2:int;
var _local3:int;
var _local4:Number;
var _local5:Number;
progressBar.rotation = (progressBar.rotation + 5);
_local2 = this.root.loaderInfo.bytesLoaded;
_local3 = this.root.loaderInfo.bytesTotal;
_local4 = (_local2 / _local3);
_local5 = (XMAX - XMIN);
progressBar.x = ((_local4 * _local5) + XMIN);
if (_local2 >= _local3){
removeEventListener(Event.ENTER_FRAME, loadProgress);
gotoAndStop("Song");
};
}
public function addsmartBlock2(){
var _local1:Number;
var _local2:smartBlock;
_local1 = 100;
smartBlockY = 224;
smartBlockX = 576;
_local2 = new smartBlock(smartBlockX, smartBlockY, _local1, cursor);
addChild(_local2);
smartblocks.push(_local2);
BBCounter = (BBCounter + 1);
}
public function playNormal(_arg1:MouseEvent){
gotoAndStop("Normal");
GameMode = "Normal";
}
public function removePowerup(_arg1:Powerup){
var _local2:*;
for (_local2 in powerups) {
if (powerups[_local2] == _arg1){
powerups.splice(_local2, 1);
break;
};
};
}
public function highquality(_arg1:MouseEvent){
stage.quality = "high";
}
public function addBlock1(){
var _local1:Number;
var _local2:Block;
_local1 = 100;
BlockY1 = 40;
BlockX1 = 575;
_local2 = new Block(BlockX1, BlockY1, _local1, cursor);
addChild(_local2);
blocks.push(_local2);
BBCounter = (BBCounter + 1);
}
public function addBlock2(){
var _local1:Number;
var _local2:Block;
_local1 = 100;
BlockY2 = 413;
BlockX2 = 22;
_local2 = new Block(BlockX2, BlockY2, _local1, cursor);
addChild(_local2);
blocks.push(_local2);
BBCounter = (BBCounter + 1);
}
public function addBlock3(){
var _local1:Number;
var _local2:Block;
_local1 = 100;
BlockY3 = 413;
BlockX3 = 575;
_local2 = new Block(BlockX3, BlockY3, _local1, cursor);
addChild(_local2);
blocks.push(_local2);
BBCounter = (BBCounter + 1);
}
public function showInstructions(_arg1:MouseEvent){
gotoAndStop("Instructions");
}
public function playCannon(_arg1:MouseEvent){
gotoAndStop("Normal");
GameMode = "Cannon";
}
public function addsmartBlock4(){
var _local1:Number;
var _local2:smartBlock;
_local1 = 100;
smartBlockY = 225;
smartBlockX = 18;
_local2 = new smartBlock(smartBlockX, smartBlockY, _local1, cursor);
addChild(_local2);
smartblocks.push(_local2);
BBCounter = (BBCounter + 1);
}
public function starttheGame(_arg1:MouseEvent){
gotoAndStop("ChooseMode");
}
public function addBlockTimerAround(){
ballTimerAround = new Timer(AroundBlockTime, 1);
ballTimerAround.addEventListener(TimerEvent.TIMER_COMPLETE, repeatballTimerAround);
ballTimerAround.start();
}
public function gotoMenu(_arg1:MouseEvent){
gotoAndStop("Menu");
}
public function addsmartBlock1(){
var _local1:Number;
var _local2:smartBlock;
_local1 = 100;
smartBlockY = 34;
smartBlockX = 302;
_local2 = new smartBlock(smartBlockX, smartBlockY, _local1, cursor);
addChild(_local2);
smartblocks.push(_local2);
BBCounter = (BBCounter + 1);
}
public function repeatsmartBlockTimerandAddsmartBlock(_arg1:TimerEvent){
addsmartBlock1();
addsmartBlockTimer();
if (MoreCannons > 2){
addsmartBlock2();
};
if (MoreCannons > 3){
addsmartBlock3();
};
if (MoreCannons > 6){
addsmartBlock4();
};
}
public function CrazyModeHigh(_arg1:MouseEvent){
var _local2:URLRequest;
url = "http://rankz.armorbot.com/BlueBall2CrazyMode/";
_local2 = new URLRequest(url);
navigateToURL(_local2, "_blank");
}
public function goToMenu(_arg1:MouseEvent){
gotoAndStop("Menu");
}
public function playLevel3(_arg1:MouseEvent){
GameMode = "Level3";
gotoAndStop("Normal");
}
public function rolloverToggle(_arg1:MouseEvent){
toggleButton.gotoAndStop((toggleButton.buttonState + " over"));
}
public function playLevel7(_arg1:MouseEvent){
GameMode = "Level7";
gotoAndStop("Normal");
}
public function playLevel2(_arg1:MouseEvent){
GameMode = "Level2";
gotoAndStop("Normal");
}
public function playLevel4(_arg1:MouseEvent){
GameMode = "Level4";
gotoAndStop("Normal");
}
public function playLevel8(_arg1:MouseEvent){
GameMode = "Level8";
gotoAndStop("Normal");
}
public function playLevel6(_arg1:MouseEvent){
GameMode = "Level6";
gotoAndStop("Normal");
}
public function playLevel9(_arg1:MouseEvent){
GameMode = "Level9";
gotoAndStop("Normal");
}
public function playLevel1(_arg1:MouseEvent){
GameMode = "Level1";
gotoAndStop("Normal");
}
public function playLevel5(_arg1:MouseEvent){
GameMode = "Level5";
gotoAndStop("Normal");
}
public function rollout(_arg1:MouseEvent){
gameText.gotoAndStop(1);
}
public function gotoCredits(_arg1:MouseEvent){
gotoAndStop("Credits");
}
public function checkForHits(_arg1:Event){
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
_local2 = (blocks.length - 1);
while (_local2 >= 0) {
_local5 = (powerups.length - 1);
while (_local5 >= 0) {
if (powerups[_local5].hitTestObject(blocks[_local2])){
powerups[_local5].alpha = (powerups[_local5].alpha - 0.2);
blocks[_local2].x = -1000;
};
if (powerups[_local5].alpha < 0.1){
powerups[_local5].x = -1000;
};
if (cursor.hitTestObject(powerups[_local5])){
Powerupon = true;
} else {
Powerupon = false;
};
_local5--;
};
if (cursor.hitTestObject(blocks[_local2])){
if (Powerupon == true){
} else {
if (Powerupon == false){
endGame();
trace("hit");
};
};
};
_local2--;
};
_local3 = (smartblocks.length - 1);
while (_local3 >= 0) {
_local6 = (powerups.length - 1);
while (_local6 >= 0) {
if (powerups[_local6].hitTestObject(smartblocks[_local3])){
powerups[_local6].alpha = (powerups[_local6].alpha - 0.2);
smartblocks[_local3].x = -1000;
};
if (powerups[_local6].alpha < 0.1){
powerups[_local6].x = -1000;
};
if (cursor.hitTestObject(powerups[_local6])){
Powerupon = true;
} else {
Powerupon = false;
};
_local6--;
};
if (smartblocks[_local3].hitTestObject(cursor)){
if (Powerupon == true){
} else {
endGame();
};
};
_local3--;
};
_local4 = (walls.length - 1);
while (_local4 >= 0) {
if (cursor.hitTestObject(walls[_local4])){
endGame();
};
_local4--;
};
if (cursor.hitTestObject(box)){
} else {
endGame();
};
if (cursor.hitTestObject(rightWall)){
endGame();
};
if (cursor.hitTestObject(leftWall)){
endGame();
};
if (cursor.hitTestObject(upWall)){
endGame();
};
if (cursor.hitTestObject(downWall)){
endGame();
};
}
public function playCrazy(_arg1:MouseEvent){
if (CrazyUnlocked == 1){
gotoAndStop("Normal");
GameMode = "Crazy";
} else {
if (CrazyUnlocked == 2){
deletelockedTimer();
};
};
}
public function addLevelSecond(_arg1:TimerEvent){
CountdownSeconds = (CountdownSeconds - 1);
LeveltimeString = String(CountdownSeconds);
LeveltimeDisplay.text = LeveltimeString;
startLevelClock();
if (CountdownSeconds <= 0){
if (GameMode == "Level1"){
Level22 = 1;
} else {
if (GameMode == "Level2"){
Level33 = 1;
} else {
if (GameMode == "Level3"){
Level44 = 1;
} else {
if (GameMode == "Level4"){
Level55 = 1;
} else {
if (GameMode == "Level5"){
Level66 = 1;
} else {
if (GameMode == "Level6"){
Level77 = 1;
} else {
if (GameMode == "Level7"){
Level88 = 1;
} else {
if (GameMode == "Level8"){
Level99 = 1;
} else {
if (GameMode == "Level9"){
Level1010 = 1;
} else {
if (GameMode == "Level10"){
LevelT = 1;
};
};
};
};
};
};
};
};
};
};
LocalBBCounter.data.gameinfoBB = BBCounter;
endGame();
};
}
public function gotoChooseMode1(_arg1:MouseEvent){
gotoAndStop("ChooseMode");
}
public function checkGameMode(){
if (GameMode == "Normal"){
addBlockTimerNormal();
} else {
if (GameMode == "Random"){
addBlockTimerRandom();
} else {
if (GameMode == "Around"){
AroundBlockTime = 1500;
addBlockTimerAround();
} else {
if (GameMode == "Cannon"){
addsmartBlockTimer();
lessShootingTime();
} else {
if (GameMode == "Extreme"){
AroundBlockTime = 9000;
ExtremeModeTimer();
addBlockTimerAround();
ExtremeCannons();
addBlock();
addBlock1();
addBlock2();
addBlock3();
} else {
if (GameMode == "Crazy"){
addBlockTimerCrazy();
} else {
if (GameMode == "Level1"){
startLevelClock();
addBlockTimerNormal();
} else {
if (GameMode == "Level2"){
startLevelClock();
addBlockTimerNormal();
} else {
if (GameMode == "Level3"){
startLevelClock();
addBlockTimerNormal();
addBlockTimerRandom();
} else {
if (GameMode == "Level4"){
startLevelClock();
AroundBlockTime = 1346;
addBlockTimerAround();
addBlockTimerRandom();
} else {
if (GameMode == "Level5"){
startLevelClock();
addBlockTimerNormal();
} else {
if (GameMode == "Level6"){
startLevelClock();
addBlockTimerNormal();
AroundBlockTime = 1346;
addBlockTimerAround();
} else {
if (GameMode == "Level7"){
startLevelClock();
AroundBlockTime = 160;
addBlockTimerAround();
} else {
if (GameMode == "Level8"){
startLevelClock();
addsmartBlockTimer();
lessShootingTime();
AroundBlockTime = 1346;
addBlockTimerAround();
addBlockTimerNormal();
} else {
if (GameMode == "Level9"){
startLevelClock();
addBlockTimerNormal();
} else {
if (GameMode == "Level10"){
startLevelClock();
AroundBlockTime = 500;
addBlockTimerAround();
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function ChangeCursord(_arg1:MouseEvent){
cursor.gotoAndStop(1);
}
public function addBlockTimerCrazy(){
blockTimer = new Timer(130, 1);
blockTimer.addEventListener(TimerEvent.TIMER_COMPLETE, repeatBlockTimerandAddBlockC);
blockTimer.start();
}
public function repeatballTimerRandom(_arg1:TimerEvent){
var _local2:Number;
_local2 = Math.random();
if (_local2 > 0.5){
if (Math.random() > 0.5){
addBlock();
} else {
addBlock1();
};
} else {
if (Math.random() > 0.5){
addBlock2();
} else {
addBlock3();
};
};
addBlockTimerRandom();
}
public function songCompleteHandler(_arg1:Event){
toggleButton.buttonState = "on";
startSong();
}
public function repeatpoweruptimer(_arg1:TimerEvent){
poweruptimer();
}
public function sendHighScores(){
var abrazor30Data:URLRequest;
var variables:URLVariables;
var verbs:Number;
var viper:String;
var loader:URLLoader;
var dataOnLoad:Function;
dataOnLoad = function (_arg1:Event){
trace(loader.data);
};
abrazor30Data = new URLRequest("http://rankz.armorbot.com/submit/as3_v0.php");
abrazor30Data.method = URLRequestMethod.POST;
variables = new URLVariables();
if (GameMode == "Normal"){
variables.flashkey = "SGFrVlRkdGg=";
variables.SU0249 = "MjUyMGolZSVhJW4lcw==";
} else {
if (GameMode == "Random"){
variables.flashkey = "SlVyclpPa0o=";
variables.SU0249 = "MjUyMWolZSVhJW4lcw==";
} else {
if (GameMode == "Around"){
variables.flashkey = "VXVLZEJ1Wm8=";
variables.SU0249 = "MjUyMmolZSVhJW4lcw==";
} else {
if (GameMode == "Crazy"){
variables.flashkey = "dWJkR0dwUXg=";
variables.SU0249 = "MjUyM2olZSVhJW4lcw==";
} else {
if (GameMode == "Extreme"){
variables.flashkey = "b01ZRW1rYWk=";
variables.SU0249 = "MjUyNGolZSVhJW4lcw==";
} else {
if (GameMode == "Cannon"){
variables.flashkey = "b2lnYnZWaEw=";
variables.SU0249 = "MjUyNWolZSVhJW4lcw==";
};
};
};
};
};
};
variables.bmFtZTE = theplayerName;
verbs = seconds;
viper = (verbs + "Z");
variables.c2NvcmUx = viper.split("0").join("U");
variables.c2NvcmUx = variables.c2NvcmUx.split("").join("A");
variables.c2NvcmUx = variables.c2NvcmUx.split("AU").join("Y");
variables.c2NvcmUx = variables.c2NvcmUx.split("A1").join("B");
variables.c2NvcmUx = variables.c2NvcmUx.split(".").join("N");
abrazor30Data.data = variables;
loader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
loader.addEventListener(Event.COMPLETE, dataOnLoad);
loader.load(abrazor30Data);
ShowIfPosted.gotoAndStop(2);
}
public function playAround(_arg1:MouseEvent){
gotoAndStop("Normal");
GameMode = "Around";
}
public function CannonModeHigh(_arg1:MouseEvent){
var _local2:URLRequest;
url = "http://rankz.armorbot.com/BlueBall2CannonMode/";
_local2 = new URLRequest(url);
navigateToURL(_local2, "_blank");
}
public function gotoChooseMode(_arg1:MouseEvent){
gotoAndStop("ChooseMode");
}
public function deletesmartBlocks(){
var _local1:int;
_local1 = (smartblocks.length - 1);
while (_local1 >= 0) {
smartblocks[_local1].x = -1000;
_local1--;
};
}
public function PopUpHighScores(_arg1:MouseEvent){
gotoAndStop("HighScores");
}
public function removeBlock(_arg1:Block){
var _local2:*;
for (_local2 in blocks) {
if (blocks[_local2] == _arg1){
blocks.splice(_local2, 1);
break;
};
};
}
public function PlayThisAgain(_arg1:MouseEvent){
gotoAndStop("Normal");
}
public function addPowerup(){
var _local1:Number;
var _local2:Powerup;
_local1 = 100;
PowerupY = 217;
PowerupX = 285;
_local2 = new Powerup(PowerupX, PowerupY, _local1, cursor);
addChild(_local2);
powerups.push(_local2);
}
public function moveCursor(_arg1:Event){
cursor.x = mouseX;
cursor.y = mouseY;
}
public function ExtremeModeHigh(_arg1:MouseEvent){
var _local2:URLRequest;
url = "http://rankz.armorbot.com/BlueBall2ExtremeMode/";
_local2 = new URLRequest(url);
navigateToURL(_local2, "_blank");
}
public function toggleClick(_arg1:MouseEvent){
if (toggleButton.buttonState == "on"){
toggleButton.buttonState = "off";
stopSong();
} else {
toggleButton.buttonState = "on";
startSong();
};
toggleButton.gotoAndStop((toggleButton.buttonState + " over"));
}
public function repeatCountDownClock(_arg1:TimerEvent){
var _local2:*;
CountDownClock();
if (Countdownseconds == 0){
Countdownseconds = 20;
addPowerup();
} else {
Countdownseconds = (Countdownseconds - 1);
};
_local2 = String(Countdownseconds);
CountdownText.text = _local2;
}
public function addsmartBlockTimer(){
smartblockTimer = new Timer(smartBlockShootingTime, 1);
smartblockTimer.addEventListener(TimerEvent.TIMER_COMPLETE, repeatsmartBlockTimerandAddsmartBlock);
smartblockTimer.start();
}
public function repeatBlockTimerandAddBlock(_arg1:TimerEvent){
var _local2:Number;
_local2 = Math.random();
addBlock();
addBlockTimerNormal();
}
public function playLevel10(_arg1:MouseEvent){
GameMode = "Level10";
gotoAndStop("Normal");
}
public function playExtreme(_arg1:MouseEvent){
gotoAndStop("Normal");
GameMode = "Extreme";
}
public function goToMenu1(_arg1:MouseEvent){
gotoAndStop("Menu");
}
public function goToMenu5(_arg1:MouseEvent){
gotoAndStop("Menu");
}
public function rolloverRandom(_arg1:MouseEvent){
gameText.gotoAndStop(4);
}
public function goToMenu9(_arg1:MouseEvent){
gotoAndStop("Menu");
}
public function repeatballTimerAround(_arg1:TimerEvent){
addBlockTimerAround();
if (AroundNumber == 0){
addBlock();
} else {
if (AroundNumber == 1){
addBlock1();
} else {
if (AroundNumber == 2){
addBlock3();
} else {
if (AroundNumber == 3){
addBlock2();
};
};
};
};
if (AroundNumber == 3){
AroundNumber = 0;
} else {
AroundNumber = (AroundNumber + 1);
};
}
public function AroundModeHigh(_arg1:MouseEvent){
var _local2:URLRequest;
url = "http://rankz.armorbot.com/BlueBall2AroundMode/";
_local2 = new URLRequest(url);
navigateToURL(_local2, "_blank");
}
public function lowquality(_arg1:MouseEvent){
stage.quality = "low";
}
public function rolloverLevel(_arg1:MouseEvent){
gameText.gotoAndStop(3);
}
public function loweffects(_arg1:MouseEvent){
stage.frameRate = 15;
}
public function rolloverCannon(_arg1:MouseEvent){
gameText.gotoAndStop(8);
}
public function deleteBlocks(){
var _local1:int;
_local1 = (blocks.length - 1);
while (_local1 >= 0) {
blocks[_local1].x = -1000;
_local1--;
};
}
public function goToMenu10(_arg1:MouseEvent){
gotoAndStop("Menu");
}
public function rolloverNormal(_arg1:MouseEvent){
gameText.gotoAndStop(2);
}
public function ChangeCursor(_arg1:MouseEvent){
if (CursorC > 26){
CursorC = 1;
} else {
CursorC = (CursorC + 1);
};
cursor.gotoAndStop(CursorC);
}
public function goToMenu4(_arg1:MouseEvent){
gotoAndStop("Menu");
}
public function endGame(){
removeEventListener(Event.ENTER_FRAME, checkForHits);
if (GameMode == "Normal"){
blockTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatBlockTimerandAddBlock);
} else {
if (GameMode == "Random"){
ballTimerRandom.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatballTimerRandom);
} else {
if (GameMode == "Around"){
ballTimerAround.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatballTimerAround);
AroundNumber = 0;
} else {
if (GameMode == "Cannon"){
smartblockTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatsmartBlockTimerandAddsmartBlock);
shootingTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatlessShootingTime);
smartBlockShootingTime = 2000;
MoreCannons = 0;
} else {
if (GameMode == "Extreme"){
ExtremeTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatExtremeModeTimer);
ballTimerAround.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatballTimerAround);
ExtremeCannonTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatExtremeCannonTimer);
AroundNumber = 0;
ExtremeShootingTime = 19000;
} else {
if (GameMode == "Crazy"){
blockTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatBlockTimerandAddBlockC);
} else {
if (GameMode == "Level1"){
LevelTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, addLevelSecond);
blockTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatBlockTimerandAddBlock);
} else {
if (GameMode == "Level2"){
LevelTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, addLevelSecond);
blockTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatBlockTimerandAddBlock);
} else {
if (GameMode == "Level3"){
LevelTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, addLevelSecond);
ballTimerRandom.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatballTimerRandom);
blockTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatBlockTimerandAddBlock);
} else {
if (GameMode == "Level4"){
LevelTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, addLevelSecond);
ballTimerAround.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatballTimerAround);
ballTimerRandom.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatballTimerRandom);
AroundNumber = 0;
} else {
if (GameMode == "Level5"){
LevelTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, addLevelSecond);
blockTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatBlockTimerandAddBlock);
} else {
if (GameMode == "Level6"){
LevelTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, addLevelSecond);
blockTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatBlockTimerandAddBlock);
ballTimerAround.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatballTimerAround);
AroundNumber = 0;
} else {
if (GameMode == "Level7"){
LevelTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, addLevelSecond);
ballTimerAround.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatballTimerAround);
AroundNumber = 0;
} else {
if (GameMode == "Level8"){
LevelTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, addLevelSecond);
ballTimerAround.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatballTimerAround);
AroundNumber = 0;
blockTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatBlockTimerandAddBlock);
smartblockTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatsmartBlockTimerandAddsmartBlock);
shootingTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatlessShootingTime);
smartBlockShootingTime = 2000;
MoreCannons = 0;
} else {
if (GameMode == "Level9"){
LevelTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, addLevelSecond);
blockTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatBlockTimerandAddBlock);
} else {
if (GameMode == "Level10"){
LevelTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, addLevelSecond);
ballTimerAround.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatballTimerAround);
AroundNumber = 0;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
deleteBlocks();
deletesmartBlocks();
deletePowerups();
ClockTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, addSecond);
powerupTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatpoweruptimer);
countDownTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatCountDownClock);
gotoAndStop("GameOver");
}
public function repeatBlockTimerandAddBlockC(_arg1:TimerEvent){
addBlock();
addBlockTimerCrazy();
}
public function startGame(){
blocks = new Array();
smartblocks = new Array();
powerups = new Array();
examineLevel();
checkGameMode();
addEventListener(Event.ENTER_FRAME, checkForHits);
Countdownseconds = 20;
CountDownClock();
poweruptimer();
}
public function gotoOptions(_arg1:MouseEvent){
gotoAndStop("Options");
}
public function removesmartBlock(_arg1:smartBlock){
var _local2:*;
for (_local2 in smartblocks) {
if (smartblocks[_local2] == _arg1){
smartblocks.splice(_local2, 1);
break;
};
};
}
public function deletelockedTimer(){
locked.x = (CrazyMode.x - 60);
locked.y = CrazyMode.y;
locked.alpha = 0.6;
addChild(locked);
deleteTimer = new Timer(1000, 1);
deleteTimer.addEventListener(TimerEvent.TIMER_COMPLETE, deletelocked);
deleteTimer.start();
}
public function repeatExtremeModeTimer(_arg1:TimerEvent){
ExtremeModeTimer();
if (ExtremeShootingTime >= 300){
ExtremeShootingTime = (ExtremeShootingTime - 50);
};
addBlock();
addBlock1();
addBlock2();
addBlock3();
}
public function mediumeffects(_arg1:MouseEvent){
stage.frameRate = 20;
}
public function rolloverAround(_arg1:MouseEvent){
gameText.gotoAndStop(5);
}
}
}//package
Section 12
//Powerup (Powerup)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Powerup extends MovieClip {
private var xdif:Number;// = 0
public var poweredUp:Boolean;// = false
private var cursor:Cursor;
private var speed;
public var deleteTimer:Timer;
private var ydif:Number;// = 0
private var lastTime:int;
private var updatePositionY:Number;
private var locationTimer:Timer;
private var target:Cursor;
private var updatePositionX:Number;
public var blockSpeed:Number;// = 100
public var length;
public function Powerup(_arg1, _arg2:Number, _arg3:Number, _arg4:Cursor){
blockSpeed = 100;
xdif = 0;
ydif = 0;
speed = ((Math.random() * 80) + 60);
length = Math.sqrt(((xdif * xdif) + (ydif * ydif)));
poweredUp = false;
super();
this.x = _arg1;
this.y = _arg2;
blockSpeed = _arg3;
addEventListener(Event.ENTER_FRAME, movePowerup);
this.target = _arg4;
}
public function movePowerup(_arg1:Event){
var _local2:int;
_local2 = (getTimer() - lastTime);
lastTime = (lastTime + _local2);
if (poweredUp == true){
this.x = target.x;
this.y = target.y;
if (this.alpha < 0.1){
deleteBlock();
};
};
if (this.hitTestObject(target)){
poweredUp = true;
};
}
public function deleteBlock(){
MovieClip(parent).removePowerup(this);
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, movePowerup);
}
}
}//package
Section 13
//smartBlock (smartBlock)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class smartBlock extends MovieClip {
private var xdif:Number;// = 0
private var cursor:Cursor;
private var speed;// = 300
private var ydif:Number;// = 0
private var lastTime:int;
private var updatePositionY:Number;
private var locationTimer:Timer;
private var target:Cursor;
private var updatePositionX:Number;
public var blockSpeed:Number;// = 100
public function smartBlock(_arg1, _arg2:Number, _arg3:Number, _arg4:Cursor){
blockSpeed = 100;
xdif = 0;
ydif = 0;
speed = 300;
super();
this.x = _arg1;
this.y = _arg2;
addEventListener(Event.ENTER_FRAME, moveBlock);
this.target = _arg4;
getCursorLocation();
}
public function getCursorLocation(){
locationTimer = new Timer(3000, 1);
locationTimer.addEventListener(TimerEvent.TIMER_COMPLETE, repeatGetCursorLocation);
locationTimer.start();
}
public function deletesmartBlock(){
MovieClip(parent).removesmartBlock(this);
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, moveBlock);
}
public function moveBlock(_arg1:Event){
var _local2:int;
_local2 = (getTimer() - lastTime);
lastTime = (lastTime + _local2);
this.x = (this.x + ((xdif * _local2) / 1000));
this.y = (this.y + ((ydif * _local2) / 1000));
if (this.x < -10){
deletesmartBlock();
} else {
if (this.y > 510){
deletesmartBlock();
} else {
if (this.y < -10){
deletesmartBlock();
} else {
if (this.x > 610){
deletesmartBlock();
};
};
};
};
}
public function repeatGetCursorLocation(_arg1:TimerEvent){
var _local2:*;
getCursorLocation();
xdif = (target.x - this.x);
ydif = (target.y - this.y);
_local2 = Math.sqrt(((xdif * xdif) + (ydif * ydif)));
xdif = (xdif / _local2);
ydif = (ydif / _local2);
xdif = (xdif * speed);
ydif = (ydif * speed);
}
}
}//package
Section 14
//TestSong (TestSong)
package {
import flash.media.*;
public dynamic class TestSong extends Sound {
}
}//package
Section 15
//Wall (Wall)
package {
import flash.display.*;
public dynamic class Wall extends MovieClip {
}
}//package