Section 1
//BlueBall_32 (NewGame_fla.BlueBall_32)
package NewGame_fla {
import flash.display.*;
public dynamic class BlueBall_32 extends MovieClip {
public var playButton:SimpleButton;
}
}//package NewGame_fla
Section 2
//cannonM_13 (NewGame_fla.cannonM_13)
package NewGame_fla {
import flash.display.*;
public dynamic class cannonM_13 extends MovieClip {
public function cannonM_13(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package NewGame_fla
Section 3
//eye_8 (NewGame_fla.eye_8)
package NewGame_fla {
import flash.display.*;
public dynamic class eye_8 extends MovieClip {
public var eye2:MovieClip;
}
}//package NewGame_fla
Section 4
//gamelevel_43 (NewGame_fla.gamelevel_43)
package NewGame_fla {
import flash.display.*;
public dynamic class gamelevel_43 extends MovieClip {
public var quarterWall:Wall;
}
}//package NewGame_fla
Section 5
//GameText_45 (NewGame_fla.GameText_45)
package NewGame_fla {
import flash.display.*;
public dynamic class GameText_45 extends MovieClip {
public function GameText_45(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package NewGame_fla
Section 6
//openingScreen_67 (NewGame_fla.openingScreen_67)
package NewGame_fla {
import flash.display.*;
public dynamic class openingScreen_67 extends MovieClip {
public function openingScreen_67(){
addFrameScript(0, frame1, 34, frame35);
}
function frame1(){
stop();
}
function frame35(){
stop();
}
}
}//package NewGame_fla
Section 7
//ShowIfPosted_60 (NewGame_fla.ShowIfPosted_60)
package NewGame_fla {
import flash.display.*;
public dynamic class ShowIfPosted_60 extends MovieClip {
public function ShowIfPosted_60(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package NewGame_fla
Section 8
//ShowModeMC_61 (NewGame_fla.ShowModeMC_61)
package NewGame_fla {
import flash.display.*;
public dynamic class ShowModeMC_61 extends MovieClip {
public function ShowModeMC_61(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package NewGame_fla
Section 9
//ToggleButton_63 (NewGame_fla.ToggleButton_63)
package NewGame_fla {
import flash.display.*;
public dynamic class ToggleButton_63 extends MovieClip {
public function ToggleButton_63(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package NewGame_fla
Section 10
//Trophie_64 (NewGame_fla.Trophie_64)
package NewGame_fla {
import flash.display.*;
public dynamic class Trophie_64 extends MovieClip {
public function Trophie_64(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package NewGame_fla
Section 11
//WinText_88 (NewGame_fla.WinText_88)
package NewGame_fla {
import flash.display.*;
public dynamic class WinText_88 extends MovieClip {
public function WinText_88(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package NewGame_fla
Section 12
//Block (Block)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Block extends MovieClip {
private var xdif:Number;// = 0
public var alreadyHit:Boolean;// = false
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)));
alreadyHit = false;
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 < -300){
deleteBlock();
};
}
public function getCursorLocation1():void{
if (alreadyHit == false){
xdif = -(xdif);
ydif = -(ydif);
alreadyHit = true;
};
}
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 13
//Cannon (Cannon)
package {
import flash.display.*;
import flash.events.*;
public class Cannon extends MovieClip {
public var xdif:Number;
private var cursor:Cursor;
public var ydif:Number;
private var target:Cursor;
public var radAngle:Number;
public function Cannon(_arg1, _arg2:Number, _arg3:Cursor){
this.x = _arg1;
this.y = _arg2;
addEventListener(Event.ENTER_FRAME, moveCannon);
this.target = _arg3;
}
function moveCannon(_arg1:Event){
xdif = (target.x - this.x);
ydif = (target.y - this.y);
radAngle = Math.atan2(ydif, xdif);
this.rotation = (((radAngle * 360) / (2 * Math.PI)) + 90);
}
}
}//package
Section 14
//Cursor (Cursor)
package {
import flash.display.*;
public dynamic class Cursor extends MovieClip {
public function Cursor(){
addFrameScript(0, frame1, 26, frame27);
}
function frame1(){
stop();
}
function frame27(){
gotoAndStop(1);
}
}
}//package
Section 15
//MochiAd (MochiAd)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("2.2");
}
public static function showTimedAd(_arg1:Object):void{
MochiAd.showInterLevelAd(_arg1);
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var f:Function;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
f = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
mc._mochiad_ctr_failed = true;
};
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["sendHighScore", _arg1], _arg2, _arg3);
return (true);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = _local1.loaderInfo.bytesTotal;
if ((((_local4 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
_local3 = true;
};
};
};
if ((((_local2 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _loadCommunicator(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var clipname:String;
var server:String;
var depth:Number;
var mc:MovieClip;
var lv:URLVariables;
var k:String;
var lc:LocalConnection;
var name:String;
var req:URLRequest;
var loader:Loader;
var options = _arg1;
DEFAULTS = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
clipname = ("_mochiad_com_" + options.id);
if (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip[clipname]){
return (clip[clipname]);
};
server = (options.com_server + options.id);
MochiAd._allowDomains(server);
delete options.id;
delete options.com_server;
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, clipname, depth);
lv = new URLVariables();
for (k in options) {
lv[k] = options[k];
};
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.name = name;
mc.lc = lc;
lv.lc = name;
mc._id = 0;
mc._queue = [];
mc.rpcResult = function (_arg1:Object):void{
var _local3:Array;
var _local4:Array;
var _local5:Number;
var _local6:Object;
var _local7:Object;
_arg1 = parseInt(_arg1.toString());
_local3 = mc._callbacks[_arg1];
if (typeof(_local3) == "undefined"){
return;
};
delete mc._callbacks[_arg1];
_local4 = [];
_local5 = 2;
while (_local5 < _local3.length) {
_local4.push(_local3[_local5]);
_local5++;
};
_local5 = 1;
while (_local5 < arguments.length) {
_local4.push(arguments[_local5]);
_local5++;
};
_local6 = _local3[1];
_local7 = _local3[0];
if (((_local7) && ((typeof(_local6) == "string")))){
_local6 = _local7[_local6];
};
if (typeof(_local6) == "function"){
_local6.apply(_local7, _local4);
};
};
mc._didConnect = function (_arg1:String):void{
var _local2:Array;
var _local3:Function;
var _local4:Number;
var _local5:Array;
mc._endpoint = _arg1;
_local2 = mc._queue;
delete mc._queue;
_local3 = mc.doSend;
_local4 = 0;
while (_local4 < _local2.length) {
_local5 = _local2[_local4];
_local3.apply(this, _local5);
_local4++;
};
};
mc.doSend = function (_arg1:Array, _arg2:Object, _arg3:Object):void{
var _local5:Number;
var _local6:LocalConnection;
var _local7:Array;
var _local8:Number;
if (mc._endpoint == null){
_local7 = [];
_local8 = 0;
while (_local8 < arguments.length) {
_local7.push(arguments[_local8]);
_local8++;
};
mc._queue.push(_local7);
return;
};
mc._id = (mc._id + 1);
_local5 = mc._id;
mc._callbacks[_local5] = [_arg2, ((_arg3) || (_arg2))];
_local6 = new LocalConnection();
_local6.send(mc._endpoint, "rpc", _local5, _arg1);
};
mc._callbacks = {};
mc._callbacks[0] = [mc, "_didConnect"];
lv.st = getTimer();
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader = new Loader();
loader.load(req);
mc.addChild(loader);
mc._mochiad_com = loader;
return (mc);
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
bar.x = 10;
bar.y = (h - 20);
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (!this.parent.parent){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
if (!chk.showing){
_local11 = _local2.loaderInfo.bytesTotal;
if ((((_local11 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local3 > chk.ad_timeout){
_local4 = true;
};
};
};
if ((((_local3 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
MochiAd.showPreGameAd(_arg1);
}
public static function fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["fetchHighScores", _arg1], _arg2, _arg3);
return (true);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 16
//ModeLocked (ModeLocked)
package {
import flash.display.*;
public dynamic class ModeLocked extends MovieClip {
}
}//package
Section 17
//NewGame (NewGame)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import MochiAd_v2_2.*;
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 NormalB:Number;
public var ExtremeCannonTimer:Timer;
public var BlockX2:Number;
public var BlockY1:Number;
public var BlockY3:Number;
public var NormalT:Number;
public var BlockY2:Number;
public var theplayerName:String;
public var gameText:MovieClip;
public var leftArrow:Boolean;// = false
public var leftArrow1:Boolean;// = false
public var ChooseModeButton:SimpleButton;
var Powerupon:Boolean;// = false
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 MenuButton99:SimpleButton;
public var LocalLevelT:SharedObject;
public var Level10:MovieClip;
public var Level11:Number;
public var downArrow:Boolean;// = false
private var smartblocks:Array;
public var downArrow1:Boolean;// = false
public var smartBlockY:Number;
public var JGames:SimpleButton;
public var smartBlockX:Number;
public var Level22:Number;
public var Level33:Number;
public var powerupTimer:Timer;
public var instanceName:screenclose;
public var MenuButton9:SimpleButton;
public var mascot1Frame:Number;// = 1
public var GameMode:String;
public var speedB:Number;// = 100
public var Level44:Number;
public var ScreenOpen:MovieClip;
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 Multiplayer:SimpleButton;
public var Song:Boolean;
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 toggleButton1:MovieClip;
public var Level7:MovieClip;
public var Level8:MovieClip;
public var Level9:MovieClip;
public var InstructionsButton:SimpleButton;
public var Level6:MovieClip;
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 mascot1:MovieClip;
public var MenuButton:SimpleButton;
public var BlockX:Number;
public var downWall:Wall;
public var LocalExtremeT:SharedObject;
public var BlockY:Number;
public var CursorColor:SimpleButton;
private var blocks:Array;
public var shootingTimer:Timer;
public var AroundBlockTime:Number;// = 1500
public var CrazyMode:SimpleButton;
public var Song1:Boolean;
public var BBCounter:Number;
public var timePassed:int;
public var ExtremeBB:TextField;
public var box:MovieClip;
public var song1:Sound;
public var ExtremeModeH:SimpleButton;
public var Level1010:Number;
public var MoreCannons:Number;// = 0
public var ballTimerAround:Timer;
public var rightWall:Wall;
private var powerups:Array;
public var StartButton:SimpleButton;
public var CannonBB:TextField;
public var ScreenTimer:Timer;
public var BlueBallCounter:TextField;
public var Trophie:MovieClip;
public var PowerupX:Number;
public var LocalRandomT:SharedObject;
public var PowerupY:Number;
public var LocalRandomB:SharedObject;
public var ExtremeTimer:Timer;
public var Lplayer:Number;
public var NormalModeH:SimpleButton;
public var songChannel:SoundChannel;
public var LocalAroundB:SharedObject;
public var ScreenIsOpen:Boolean;
public var LevelTimer:Timer;
public var upArrow:Boolean;// = false
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 rightArrow1:Boolean;// = false
public var CannonB:Number;
public var gamelevel:MovieClip;
public var CannonT: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 WinText:MovieClip;
public var locked:ModeLocked;
public var highq:SimpleButton;
public var LocalLevel33:SharedObject;
public var mascotFrame:Number;// = 1
private var cannons:Array;
public var LevelMode:SimpleButton;
public var CountdownSeconds:Number;
public var LocalLevel44:SharedObject;
public var StartButton11:SimpleButton;
public var startmbutton:SimpleButton;
public var PlayThisAgainButton:SimpleButton;
public var Countdownseconds:Number;
public var OptionsButton:SimpleButton;
public var rightArrow:Boolean;// = false
public var cursor:Cursor;
public var LeveltimeDisplay:TextField;
public var NormalMode:SimpleButton;
public var LocalLevel55:SharedObject;
public var smartBlockShootingTime:Number;// = 2000
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 mascot:MovieClip;
public var songChannel1:SoundChannel;
public var AroundNumber:Number;// = 0
public var RandomT:Number;
public var randomNum:Number;
public var LocalLevel99:SharedObject;
public var upArrow1:Boolean;// = false
public var Txt1:MovieClip;
public var CannonModeH:SimpleButton;
private var walls:Array;
public var RandomModeH:SimpleButton;
public var bb2:MovieClip;
public var bb4:MovieClip;
public var AroundB:Number;
public var ShowModeMC:MovieClip;
public var blackbutton:SimpleButton;
public var bb3:MovieClip;
public var bb5:MovieClip;
public var ClockTimer:Timer;
public function NewGame(){
lastTime = 0;
AroundNumber = 0;
smartBlockShootingTime = 2000;
MoreCannons = 0;
Powerupon = false;
ExtremeShootingTime = 19000;
AroundBlockTime = 1500;
speedB = 100;
leftArrow = false;
rightArrow = false;
upArrow = false;
downArrow = false;
leftArrow1 = false;
rightArrow1 = false;
upArrow1 = false;
downArrow1 = false;
mascotFrame = 1;
mascot1Frame = 1;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13);
}
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");
}
function keyPressedDown(_arg1:KeyboardEvent){
if (_arg1.keyCode == 37){
leftArrow = true;
} else {
if (_arg1.keyCode == 39){
rightArrow = true;
} else {
if (_arg1.keyCode == 38){
upArrow = true;
} else {
if (_arg1.keyCode == 40){
downArrow = true;
};
};
};
};
}
public function rolloverAround(_arg1:MouseEvent){
gameText.gotoAndStop(5);
}
public function gotoMenuwhenfinished(_arg1:TimerEvent){
gotoAndStop("Menu");
}
public function mediumquality(_arg1:MouseEvent){
stage.quality = "medium";
}
public function toggleClick1(_arg1:MouseEvent){
if (toggleButton1.buttonState == "on"){
toggleButton1.buttonState = "off";
stopSong1();
} else {
toggleButton1.buttonState = "on";
startSong1();
};
toggleButton1.gotoAndStop((toggleButton1.buttonState + " over"));
}
public function stopSong(){
songChannel.stop();
Song = false;
}
public function rolloverCrazy(_arg1:MouseEvent){
if (CrazyUnlocked == 2){
gameText.gotoAndStop(6);
} else {
gameText.gotoAndStop(9);
};
}
function frame11(){
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;
randomNum = Math.floor((Math.random() * 7));
trace(randomNum);
if (randomNum == 1){
LevelMade.text = "Unlock all trophies to play Crazy Mode.";
} else {
if (randomNum == 2){
LevelMade.text = "Hi there! My name is Mr. BlueBall.";
} else {
if (randomNum == 3){
LevelMade.text = "I wish I could play BlueBall...";
} else {
if (randomNum == 4){
LevelMade.text = "You can change the graphic and effect quality under 'Options', if the game lags.";
} else {
if (randomNum == 5){
LevelMade.text = "You can change or stop the music under 'Options'.";
} else {
if (randomNum == 6){
LevelMade.text = "You can change the cursor color under 'Options'.";
} else {
if (randomNum == 0){
LevelMade.text = "I am the king of BlueBall.";
};
};
};
};
};
};
};
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 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;
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);
Multiplayer.addEventListener(MouseEvent.CLICK, gotoMultiplayer);
JGames.addEventListener(MouseEvent.CLICK, gotoJGames2);
stop();
if (Musicon == false){
Musicon = true;
song = new TestSong();
startSong();
gotoAndStop("Menu");
};
if (ScreenIsOpen == true){
ScreenOpen.gotoAndPlay(2);
ScreenIsOpen = false;
} else {
ScreenOpen.gotoAndPlay(100);
};
}
function frame5(){
if (GameMode == "Multiplayer"){
gotoAndStop("Multiplayer");
};
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;
}
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;
playAgainButton10.addEventListener(MouseEvent.CLICK, goToMenu10);
}
public function ExtremeModeTimer(){
ExtremeTimer = new Timer(ExtremeShootingTime, 1);
ExtremeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, repeatExtremeModeTimer);
ExtremeTimer.start();
}
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;
playAgainButton.addEventListener(MouseEvent.CLICK, goToMenu);
}
public function rolloutToggle1(_arg1:MouseEvent){
toggleButton1.gotoAndStop(toggleButton1.buttonState);
}
public function addBlockTimerRandom(){
ballTimerRandom = new Timer(1500, 1);
ballTimerRandom.addEventListener(TimerEvent.TIMER_COMPLETE, repeatballTimerRandom);
ballTimerRandom.start();
}
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 == "Multiplayer"){
CountdownText.x = -1000;
Txt2.x = -1000;
};
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 moveMascot1(_arg1:Event){
var _local2:Number;
_local2 = 8;
if (leftArrow1){
mascot1.x = (mascot1.x - _local2);
};
if (rightArrow1){
mascot1.x = (mascot1.x + _local2);
};
if (upArrow1){
mascot1.y = (mascot1.y - _local2);
};
if (downArrow1){
mascot1.y = (mascot1.y + _local2);
};
}
function frame2(){
JGames.addEventListener(MouseEvent.CLICK, gotoJGames1);
stop();
instanceName.gotoAndPlay(1);
TimeScreen();
}
public function startTheRealGame(_arg1:MouseEvent){
startGame();
startClock();
StartButton.x = -1000;
if (GameMode == "Multiplayer"){
cursor.gotoAndStop("nocursor");
};
}
function frame1(){
Mouse.hide();
addEventListener(Event.ENTER_FRAME, moveCursor);
cursor.mouseEnabled = false;
MochiAd.showPreGameAd({clip:root, id:"fe8f481459f225f0", res:"600x500", background:0xE9E9E9, color:859525, outline:0, no_bg:true});
myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
JGames.addEventListener(MouseEvent.CLICK, gotoJGames);
Musicon = false;
ScreenIsOpen = true;
Song1 = false;
Song = true;
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;
};
}
function frame13(){
StartButton11.addEventListener(MouseEvent.CLICK, startMgame);
}
public function gotoSubmitPage(_arg1:MouseEvent){
theplayerName = playerName.text;
trace(theplayerName);
sendHighScores();
removeChild(HighScoreButton);
}
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 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;
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 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;
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 rolloverExtreme(_arg1:MouseEvent){
gameText.gotoAndStop(7);
}
public function startSong(){
songChannel = song.play();
songChannel.addEventListener(Event.SOUND_COMPLETE, songCompleteHandler);
Song = true;
if (Song1 == true){
stopSong1();
toggleButton1.buttonState = "off";
toggleButton1.gotoAndStop("off");
};
}
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 addBlockTimerNormal(){
blockTimer = new Timer(1500, 1);
blockTimer.addEventListener(TimerEvent.TIMER_COMPLETE, repeatBlockTimerandAddBlock);
blockTimer.start();
}
public function deletelocked(_arg1:TimerEvent){
removeChild(locked);
}
public function playLevel(_arg1:MouseEvent){
LevelMode.removeEventListener(MouseEvent.ROLL_OUT, rollout);
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;
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);
if (Song == true){
toggleButton.buttonState = "on";
toggleButton.gotoAndStop("on");
} else {
toggleButton.buttonState = "off";
toggleButton.gotoAndStop("off");
};
song1 = new TestSong1();
toggleButton1.addEventListener(MouseEvent.MOUSE_OVER, rolloverToggle1);
toggleButton1.addEventListener(MouseEvent.MOUSE_OUT, rolloutToggle1);
toggleButton1.addEventListener(MouseEvent.CLICK, toggleClick1);
if (Song1 == true){
toggleButton1.buttonState = "on";
toggleButton1.gotoAndStop("on");
} else {
toggleButton1.buttonState = "off";
toggleButton1.gotoAndStop("off");
};
}
function frame12(){
if (Lplayer == 1){
WinText.gotoAndStop(3);
} else {
if (Lplayer == 2){
WinText.gotoAndStop(2);
} else {
WinText.gotoAndStop(1);
};
};
Lplayer = 3;
startmbutton.addEventListener(MouseEvent.CLICK, playM);
MenuButton99.addEventListener(MouseEvent.CLICK, gototherealfinalMenu);
}
public function startClock(){
ClockTimer = new Timer(1000, 1);
ClockTimer.addEventListener(TimerEvent.TIMER_COMPLETE, addSecond);
ClockTimer.start();
}
function keyPressedDown1(_arg1:KeyboardEvent){
if (_arg1.keyCode == 65){
leftArrow1 = true;
} else {
if (_arg1.keyCode == 68){
rightArrow1 = true;
} else {
if (_arg1.keyCode == 87){
upArrow1 = true;
} else {
if (_arg1.keyCode == 83){
downArrow1 = true;
};
};
};
};
}
public function checkTimePassed(_arg1:Event){
}
public function deletePowerups(){
var _local1:int;
_local1 = (powerups.length - 1);
while (_local1 >= 0) {
powerups[_local1].x = -1000;
_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 addCannon(){
var _local1:Cannon;
BlockY = 38;
BlockX = 23;
_local1 = new Cannon(BlockX, BlockY, cursor);
addChild(_local1);
cannons.push(_local1);
}
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 playRandom(_arg1:MouseEvent){
gotoAndStop("Normal");
GameMode = "Random";
}
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 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 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 highquality(_arg1:MouseEvent){
stage.quality = "high";
}
public function removePowerup(_arg1:Powerup){
}
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 addBlockTimerAround(){
ballTimerAround = new Timer(AroundBlockTime, 1);
ballTimerAround.addEventListener(TimerEvent.TIMER_COMPLETE, repeatballTimerAround);
ballTimerAround.start();
}
public function gotoMenu(_arg1:MouseEvent){
gotoAndStop("Menu");
}
function keyPressedUp1(_arg1:KeyboardEvent){
if (_arg1.keyCode == 65){
leftArrow1 = false;
} else {
if (_arg1.keyCode == 68){
rightArrow1 = false;
} else {
if (_arg1.keyCode == 87){
upArrow1 = false;
} else {
if (_arg1.keyCode == 83){
downArrow1 = false;
};
};
};
};
}
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 starttheGame(_arg1:MouseEvent){
gotoAndStop("ChooseMode");
}
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 playLevel2(_arg1:MouseEvent){
GameMode = "Level2";
gotoAndStop("Normal");
}
public function playLevel4(_arg1:MouseEvent){
GameMode = "Level4";
gotoAndStop("Normal");
}
public function playLevel7(_arg1:MouseEvent){
GameMode = "Level7";
gotoAndStop("Normal");
}
public function playLevel6(_arg1:MouseEvent){
GameMode = "Level6";
gotoAndStop("Normal");
}
public function playLevel8(_arg1:MouseEvent){
GameMode = "Level8";
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 fireBall(_arg1:Event){
}
public function rollout(_arg1:MouseEvent){
gameText.gotoAndStop(1);
}
public function songCompleteHandler1(_arg1:Event){
toggleButton1.buttonState = "on";
startSong1();
}
public function gotoCredits(_arg1:MouseEvent){
gotoAndStop("Credits");
}
public function TimeScreen(){
ScreenTimer = new Timer(2500, 1);
ScreenTimer.addEventListener(TimerEvent.TIMER_COMPLETE, gotoMenuwhenfinished);
ScreenTimer.start();
}
public function checkForHits(_arg1:Event){
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
if (GameMode == "Multiplayer"){
cursor.y = ((Math.random() * 280) + 49);
cursor.x = ((Math.random() * 480) + 36);
};
_local2 = (blocks.length - 1);
while (_local2 >= 0) {
_local4 = (powerups.length - 1);
while (_local4 >= 0) {
if (powerups[_local4].hitTestObject(blocks[_local2])){
powerups[_local4].alpha = (powerups[_local4].alpha - 0.2);
blocks[_local2].x = -1000;
};
if (powerups[_local4].alpha < 0.1){
powerups[_local4].x = -1000;
};
if (GameMode == "Multiplayer"){
} else {
if (cursor.hitTestObject(powerups[_local4])){
Powerupon = true;
} else {
Powerupon = false;
};
};
_local4--;
};
if (GameMode == "Multiplayer"){
} else {
if (cursor.hitTestObject(blocks[_local2])){
if (Powerupon == true){
} else {
if (Powerupon == false){
endGame();
};
};
};
};
if (mascot.hitTestObject(blocks[_local2])){
if (mascot.scaleX < 0.15){
Lplayer = 1;
endGame();
};
mascot.scaleX = (mascot.scaleX - 0.05);
mascot.scaleY = (mascot.scaleY - 0.05);
blocks[_local2].x = -1000;
};
if (mascot1.hitTestObject(blocks[_local2])){
if (mascot1.scaleX < 0.15){
Lplayer = 2;
endGame();
};
mascot1.scaleX = (mascot1.scaleX - 0.05);
mascot1.scaleY = (mascot1.scaleY - 0.05);
blocks[_local2].x = -1000;
};
_local2--;
};
_local3 = (smartblocks.length - 1);
while (_local3 >= 0) {
_local5 = (powerups.length - 1);
while (_local5 >= 0) {
if (powerups[_local5].hitTestObject(smartblocks[_local3])){
powerups[_local5].alpha = (powerups[_local5].alpha - 0.2);
smartblocks[_local3].x = -1000;
};
if (powerups[_local5].alpha < 0.1){
powerups[_local5].x = -1000;
};
if (cursor.hitTestObject(powerups[_local5])){
Powerupon = true;
} else {
Powerupon = false;
};
_local5--;
};
if (smartblocks[_local3].hitTestObject(cursor)){
if (Powerupon == true){
} else {
endGame();
};
};
_local3--;
};
if (GameMode == "Multiplayer"){
if (mascot1.hitTestObject(box)){
} else {
Lplayer = 2;
endGame();
};
if (mascot.hitTestObject(box)){
} else {
Lplayer = 1;
endGame();
};
if (mascot.hitTestObject(rightWall)){
Lplayer = 1;
endGame();
};
if (mascot.hitTestObject(leftWall)){
Lplayer = 1;
endGame();
};
if (mascot.hitTestObject(upWall)){
Lplayer = 1;
endGame();
};
if (mascot.hitTestObject(downWall)){
Lplayer = 1;
endGame();
};
if (mascot1.hitTestObject(rightWall)){
Lplayer = 2;
endGame();
};
if (mascot1.hitTestObject(leftWall)){
Lplayer = 2;
endGame();
};
if (mascot1.hitTestObject(upWall)){
Lplayer = 2;
endGame();
};
if (mascot1.hitTestObject(downWall)){
Lplayer = 2;
endGame();
};
} else {
if (cursor.hitTestObject(box)){
} else {
endGame();
};
if ((((((((downWall == null)) || ((leftWall == null)))) || ((upWall == null)))) || ((rightWall == null)))){
} else {
if (cursor.hitTestObject(rightWall)){
endGame();
};
if (cursor.hitTestObject(leftWall)){
endGame();
};
if (cursor.hitTestObject(upWall)){
endGame();
};
if (cursor.hitTestObject(downWall)){
endGame();
};
};
};
}
public function gotoChooseMode1(_arg1:MouseEvent){
gotoAndStop("ChooseMode");
}
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 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 == "Multiplayer"){
addBlockTimerRandom();
AroundBlockTime = 5204;
addBlockTimerAround();
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressedDown1);
stage.addEventListener(KeyboardEvent.KEY_UP, keyPressedUp1);
stage.addEventListener(Event.ENTER_FRAME, moveMascot1);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressedDown);
stage.addEventListener(KeyboardEvent.KEY_UP, keyPressedUp);
stage.addEventListener(Event.ENTER_FRAME, moveMascot);
} 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 addBlock4(){
var _local1:Number;
var _local2:smartBlock;
_local1 = 100;
BlockY3 = mascot.y;
BlockX3 = mascot.x;
_local2 = new smartBlock(BlockX3, BlockY3, _local1, cursor);
addChild(_local2);
smartblocks.push(_local2);
}
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){
}
public function PlayThisAgain(_arg1:MouseEvent){
gotoAndStop("Normal");
}
public function startSong1(){
songChannel1 = song1.play();
songChannel1.addEventListener(Event.SOUND_COMPLETE, songCompleteHandler1);
Song1 = true;
if (Song == true){
stopSong();
toggleButton.buttonState = "off";
toggleButton.gotoAndStop("off");
};
}
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 startMgame(_arg1:MouseEvent){
StartButton11.x = -1000;
startGame1();
}
public function gototherealfinalMenu(_arg1:MouseEvent){
gotoAndStop("Menu");
}
function keyPressedUp(_arg1:KeyboardEvent){
if (_arg1.keyCode == 37){
leftArrow = false;
} else {
if (_arg1.keyCode == 39){
rightArrow = false;
} else {
if (_arg1.keyCode == 38){
upArrow = false;
} else {
if (_arg1.keyCode == 40){
downArrow = false;
};
};
};
};
}
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 stopSong1(){
songChannel1.stop();
Song1 = false;
}
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 addCannon3(){
var _local1:Cannon;
BlockY = 38;
BlockX = 23;
_local1 = new Cannon(BlockX, BlockY, cursor);
addChild(_local1);
cannons.push(_local1);
}
public function addCannon2(){
var _local1:Cannon;
BlockY = 40;
BlockX = 575;
_local1 = new Cannon(BlockX, BlockY, cursor);
addChild(_local1);
cannons.push(_local1);
}
public function addCannon4(){
var _local1:Cannon;
BlockY = 413;
BlockX = 22;
_local1 = new Cannon(BlockX, BlockY, cursor);
addChild(_local1);
cannons.push(_local1);
}
public function goToMenu9(_arg1:MouseEvent){
gotoAndStop("Menu");
}
public function addCannon1(){
var _local1:Cannon;
BlockY = 38;
BlockX = 23;
_local1 = new Cannon(BlockX, BlockY, cursor);
addChild(_local1);
cannons.push(_local1);
}
public function addCannon8(){
var _local1:Cannon;
BlockY = 38;
BlockX = 23;
_local1 = new Cannon(BlockX, BlockY, cursor);
addChild(_local1);
cannons.push(_local1);
}
public function AroundModeHigh(_arg1:MouseEvent){
var _local2:URLRequest;
url = "http://rankz.armorbot.com/BlueBall2AroundMode/";
_local2 = new URLRequest(url);
navigateToURL(_local2, "_blank");
}
public function addCannon7(){
var _local1:Cannon;
BlockY = 38;
BlockX = 23;
_local1 = new Cannon(BlockX, BlockY, cursor);
addChild(_local1);
cannons.push(_local1);
}
function moveMascot(_arg1:Event){
var _local2:Number;
_local2 = 8;
if (leftArrow){
mascot.x = (mascot.x - _local2);
};
if (rightArrow){
mascot.x = (mascot.x + _local2);
};
if (upArrow){
mascot.y = (mascot.y - _local2);
};
if (downArrow){
mascot.y = (mascot.y + _local2);
};
}
public function lowquality(_arg1:MouseEvent){
stage.quality = "low";
}
public function addCannon6(){
var _local1:Cannon;
BlockY = 413;
BlockX = 575;
_local1 = new Cannon(BlockX, BlockY, cursor);
addChild(_local1);
cannons.push(_local1);
}
public function rolloverLevel(_arg1:MouseEvent){
gameText.gotoAndStop(3);
}
public function loweffects(_arg1:MouseEvent){
stage.frameRate = 15;
}
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 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 rolloverToggle1(_arg1:MouseEvent){
toggleButton1.gotoAndStop((toggleButton1.buttonState + " over"));
}
public function goToMenu4(_arg1:MouseEvent){
gotoAndStop("Menu");
}
public function deleteBlocks(){
var _local1:int;
_local1 = (blocks.length - 1);
while (_local1 >= 0) {
blocks[_local1].x = -1000;
_local1--;
};
}
public function addCannon5(){
var _local1:Cannon;
BlockY = 38;
BlockX = 23;
_local1 = new Cannon(BlockX, BlockY, cursor);
addChild(_local1);
cannons.push(_local1);
}
public function rolloverCannon(_arg1:MouseEvent){
gameText.gotoAndStop(8);
}
public function startGame1(){
}
public function repeatBlockTimerandAddBlockC(_arg1:TimerEvent){
addBlock();
addBlockTimerCrazy();
}
public function startGame(){
blocks = new Array();
smartblocks = new Array();
powerups = new Array();
cannons = new Array();
checkGameMode();
addEventListener(Event.ENTER_FRAME, checkForHits);
Countdownseconds = 20;
if (GameMode == "Multiplayer"){
} else {
CountDownClock();
poweruptimer();
};
}
public function endGame(){
removeEventListener(Event.ENTER_FRAME, checkForHits);
deleteBlocks();
deletesmartBlocks();
deletePowerups();
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;
} else {
if (GameMode == "Multiplayer"){
ballTimerRandom.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatballTimerRandom);
ballTimerAround.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatballTimerAround);
mascot.x = -500;
mascot1.x = -500;
mascotFrame = 1;
mascot1Frame = 1;
mascot.scaleX = 1;
mascot.scaleY = 1;
mascot1.scaleX = 1;
mascot1.scaleY = 1;
mascot.gotoAndPlay(mascotFrame);
mascot1.gotoAndPlay(mascot1Frame);
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
if (GameMode == "Multiplayer"){
cursor.gotoAndStop(1);
} else {
powerupTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatpoweruptimer);
countDownTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, repeatCountDownClock);
};
ClockTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, addSecond);
gotoAndStop("GameOver");
}
public function playM(_arg1:MouseEvent){
GameMode = "Multiplayer";
mascot.x = 205;
mascot.y = 215;
mascot1.x = 380;
mascot1.y = 215;
gotoAndStop("Normal");
}
public function gotoJGames1(_arg1:MouseEvent){
var _local2:*;
var _local3:URLRequest;
_local2 = "http://www.jgames.ch.vu";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
}
public function gotoJGames(_arg1:MouseEvent){
var _local2:*;
var _local3:URLRequest;
_local2 = "http://www.jgames.ch.vu";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
}
public function gotoOptions(_arg1:MouseEvent){
gotoAndStop("Options");
}
public function gotoJGames2(_arg1:MouseEvent){
var _local2:*;
var _local3:URLRequest;
_local2 = "http://www.jgames.ch.vu";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
}
public function removesmartBlock(_arg1:smartBlock){
}
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 gotoMultiplayer(_arg1:MouseEvent){
gotoAndStop("Multiplayer");
}
}
}//package
Section 18
//Powerup (Powerup)
package {
import flash.display.*;
import flash.events.*;
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.x < -500){
deleteBlock();
};
if (this.hitTestObject(target)){
poweredUp = true;
};
}
public function deleteBlock(){
MovieClip(parent).removePowerup(this);
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, movePowerup);
}
}
}//package
Section 19
//screenclose (screenclose)
package {
import flash.display.*;
public dynamic class screenclose extends MovieClip {
public function screenclose(){
addFrameScript(0, frame1, 38, frame39);
}
function frame1(){
stop();
}
function frame39(){
stop();
}
}
}//package
Section 20
//smartBlock (smartBlock)
package {
import flash.display.*;
import flash.events.*;
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 21
//TestSong (TestSong)
package {
import flash.media.*;
public dynamic class TestSong extends Sound {
}
}//package
Section 22
//TestSong1 (TestSong1)
package {
import flash.media.*;
public dynamic class TestSong1 extends Sound {
}
}//package
Section 23
//Wall (Wall)
package {
import flash.display.*;
public dynamic class Wall extends MovieClip {
}
}//package