Section 1
//KeyPoll (bigroom.input.KeyPoll)
package bigroom.input {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class KeyPoll {
private var states:ByteArray;
private var dispObj:DisplayObject;
public function KeyPoll(_arg1:DisplayObject){
states = new ByteArray();
states.writeUnsignedInt(0);
states.writeUnsignedInt(0);
states.writeUnsignedInt(0);
states.writeUnsignedInt(0);
states.writeUnsignedInt(0);
states.writeUnsignedInt(0);
states.writeUnsignedInt(0);
states.writeUnsignedInt(0);
dispObj = _arg1;
dispObj.addEventListener(KeyboardEvent.KEY_DOWN, keyDownListener, false, 0, true);
dispObj.addEventListener(KeyboardEvent.KEY_UP, keyUpListener, false, 0, true);
dispObj.addEventListener(Event.ACTIVATE, activateListener, false, 0, true);
dispObj.addEventListener(Event.DEACTIVATE, deactivateListener, false, 0, true);
}
public function isUp(_arg1:uint):Boolean{
return (((states[(_arg1 >>> 3)] & (1 << (_arg1 & 7))) == 0));
}
private function activateListener(_arg1:Event):void{
var _local2:int;
_local2 = 0;
while (_local2 < 8) {
states[_local2] = 0;
_local2++;
};
}
private function deactivateListener(_arg1:Event):void{
var _local2:int;
_local2 = 0;
while (_local2 < 8) {
states[_local2] = 0;
_local2++;
};
}
public function isDown(_arg1:uint):Boolean{
return (!(((states[(_arg1 >>> 3)] & (1 << (_arg1 & 7))) == 0)));
}
private function keyDownListener(_arg1:KeyboardEvent):void{
states[(_arg1.keyCode >>> 3)] = (states[(_arg1.keyCode >>> 3)] | (1 << (_arg1.keyCode & 7)));
}
private function keyUpListener(_arg1:KeyboardEvent):void{
states[(_arg1.keyCode >>> 3)] = (states[(_arg1.keyCode >>> 3)] & ~((1 << (_arg1.keyCode & 7))));
}
}
}//package bigroom.input
Section 2
//dead_box_38 (bouncer_agaf_complete_fla.dead_box_38)
package bouncer_agaf_complete_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class dead_box_38 extends MovieClip {
public var close1_timer:Timer;
public function dead_box_38(){
addFrameScript(0, frame1, 1, frame2, 10, frame11, 22, frame23);
}
function frame1(){
stop();
}
function frame23(){
stop();
MovieClip(parent).gotoAndStop((MovieClip(parent).current_level + 1));
MovieClip(parent).play();
}
function frame2(){
close1_timer = new Timer(1500);
close1_timer.addEventListener(TimerEvent.TIMER, close1_box);
close1_timer.start();
gotoAndPlay(3);
}
function frame11(){
stop();
}
public function close1_box(_arg1:Event){
gotoAndPlay(12);
close1_timer.removeEventListener(TimerEvent.TIMER, close1_box);
close1_timer = null;
}
}
}//package bouncer_agaf_complete_fla
Section 3
//gameover_box_39 (bouncer_agaf_complete_fla.gameover_box_39)
package bouncer_agaf_complete_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class gameover_box_39 extends MovieClip {
public var no_button:SimpleButton;
public var score_button:SimpleButton;
public var yes_button:SimpleButton;
public var pname:TextField;
public function gameover_box_39(){
addFrameScript(0, frame1, 1, frame2, 11, frame12, 22, frame23);
}
function frame12(){
stop();
yes_button.addEventListener(MouseEvent.MOUSE_DOWN, yes_pressed);
no_button.addEventListener(MouseEvent.MOUSE_DOWN, no_pressed);
score_button.addEventListener(MouseEvent.MOUSE_DOWN, score_pressed);
score_button.addEventListener(MouseEvent.MOUSE_UP, score_released);
MovieClip(parent).level_running = 0;
}
function frame1(){
stop();
}
public function score_pressed(_arg1:Event){
MovieClip(parent).submit_game_score(pname.text, MovieClip(parent).score);
score_button.removeEventListener(MouseEvent.MOUSE_DOWN, score_pressed);
score_button.alpha = 0.25;
}
public function score_released(_arg1:Event){
MovieClip(parent).show_scores();
}
function frame2(){
gotoAndPlay(3);
}
function frame23(){
stop();
}
public function no_pressed(_arg1:Event){
MovieClip(parent).game_mode = 0;
MovieClip(parent).endGame();
MovieClip(parent).gotoAndStop(3);
yes_button.removeEventListener(MouseEvent.MOUSE_DOWN, yes_pressed);
no_button.removeEventListener(MouseEvent.MOUSE_DOWN, no_pressed);
score_button.removeEventListener(MouseEvent.MOUSE_DOWN, score_pressed);
gotoAndPlay(12);
}
public function yes_pressed(_arg1:Event){
MovieClip(parent).score = (MovieClip(parent).score - 5000);
if (MovieClip(parent).score < 0){
MovieClip(parent).score = 0;
};
MovieClip(parent).lives = 5;
MovieClip(parent).gotoAndStop((MovieClip(parent).current_level + 1));
MovieClip(parent).play();
yes_button.removeEventListener(MouseEvent.MOUSE_DOWN, yes_pressed);
no_button.removeEventListener(MouseEvent.MOUSE_DOWN, no_pressed);
gotoAndPlay(12);
}
}
}//package bouncer_agaf_complete_fla
Section 4
//level_start_box_36 (bouncer_agaf_complete_fla.level_start_box_36)
package bouncer_agaf_complete_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class level_start_box_36 extends MovieClip {
public var begin_button:MovieClip;
public var close1_timer:Timer;
public function level_start_box_36(){
addFrameScript(0, frame1, 1, frame2, 10, frame11, 23, frame24);
}
function frame1(){
stop();
}
function frame24(){
stop();
MovieClip(parent).mouse_status = 0;
}
function frame2(){
gotoAndPlay(3);
}
function frame11(){
stop();
close1_timer = new Timer(1000);
close1_timer.addEventListener(TimerEvent.TIMER, close1_box);
close1_timer.start();
}
public function close1_box(_arg1:Event){
MovieClip(parent).level_running = 1;
MovieClip(parent).player_dead = 0;
MovieClip(parent).gameTime.start();
gotoAndPlay(12);
close1_timer.removeEventListener(TimerEvent.TIMER, close1_box);
close1_timer = null;
}
}
}//package bouncer_agaf_complete_fla
Section 5
//level1_21 (bouncer_agaf_complete_fla.level1_21)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level1_21 extends MovieClip {
public var player_gfx:MovieClip;
public var paddle:MovieClip;
}
}//package bouncer_agaf_complete_fla
Section 6
//level10_51 (bouncer_agaf_complete_fla.level10_51)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level10_51 extends MovieClip {
public var left:h_mover;
public var player_gfx:MovieClip;
public var right:h_mover;
public var paddle:MovieClip;
}
}//package bouncer_agaf_complete_fla
Section 7
//level11_55 (bouncer_agaf_complete_fla.level11_55)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level11_55 extends MovieClip {
public var player_gfx:MovieClip;
public var right:h_mover;
public var paddle:MovieClip;
public var down:v_platform;
}
}//package bouncer_agaf_complete_fla
Section 8
//level12_59 (bouncer_agaf_complete_fla.level12_59)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level12_59 extends MovieClip {
public var player_gfx:MovieClip;
public var paddle:MovieClip;
public var down:v_platform;
}
}//package bouncer_agaf_complete_fla
Section 9
//level13_60 (bouncer_agaf_complete_fla.level13_60)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level13_60 extends MovieClip {
public var left:h_platform;
public var player_gfx:MovieClip;
public var right:h_platform;
public var paddle:MovieClip;
}
}//package bouncer_agaf_complete_fla
Section 10
//level14_62 (bouncer_agaf_complete_fla.level14_62)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level14_62 extends MovieClip {
public var player_gfx:MovieClip;
public var paddle:MovieClip;
public var down:v_platform;
}
}//package bouncer_agaf_complete_fla
Section 11
//level15_63 (bouncer_agaf_complete_fla.level15_63)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level15_63 extends MovieClip {
public var player_gfx:MovieClip;
public var paddle:MovieClip;
public var down:v_platform;
public var up:v_platform;
}
}//package bouncer_agaf_complete_fla
Section 12
//level16_64 (bouncer_agaf_complete_fla.level16_64)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level16_64 extends MovieClip {
public var player_gfx:MovieClip;
public var paddle:MovieClip;
}
}//package bouncer_agaf_complete_fla
Section 13
//level17_65 (bouncer_agaf_complete_fla.level17_65)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level17_65 extends MovieClip {
public var player_gfx:MovieClip;
public var paddle:MovieClip;
}
}//package bouncer_agaf_complete_fla
Section 14
//level18_66 (bouncer_agaf_complete_fla.level18_66)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level18_66 extends MovieClip {
public var player_gfx:MovieClip;
public var paddle:MovieClip;
}
}//package bouncer_agaf_complete_fla
Section 15
//level19_67 (bouncer_agaf_complete_fla.level19_67)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level19_67 extends MovieClip {
public var player_gfx:MovieClip;
public var paddle:MovieClip;
}
}//package bouncer_agaf_complete_fla
Section 16
//level2_43 (bouncer_agaf_complete_fla.level2_43)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level2_43 extends MovieClip {
public var player_gfx:MovieClip;
public var paddle:MovieClip;
}
}//package bouncer_agaf_complete_fla
Section 17
//level20_68 (bouncer_agaf_complete_fla.level20_68)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level20_68 extends MovieClip {
public var player_gfx:MovieClip;
public var paddle:MovieClip;
}
}//package bouncer_agaf_complete_fla
Section 18
//level3_44 (bouncer_agaf_complete_fla.level3_44)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level3_44 extends MovieClip {
public var player_gfx:MovieClip;
public var paddle:MovieClip;
}
}//package bouncer_agaf_complete_fla
Section 19
//level4_45 (bouncer_agaf_complete_fla.level4_45)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level4_45 extends MovieClip {
public var player_gfx:MovieClip;
public var paddle:MovieClip;
}
}//package bouncer_agaf_complete_fla
Section 20
//level5_46 (bouncer_agaf_complete_fla.level5_46)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level5_46 extends MovieClip {
public var player_gfx:MovieClip;
public var paddle:MovieClip;
}
}//package bouncer_agaf_complete_fla
Section 21
//level6_47 (bouncer_agaf_complete_fla.level6_47)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level6_47 extends MovieClip {
public var player_gfx:MovieClip;
public var paddle:MovieClip;
}
}//package bouncer_agaf_complete_fla
Section 22
//level7_48 (bouncer_agaf_complete_fla.level7_48)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level7_48 extends MovieClip {
public var player_gfx:MovieClip;
public var paddle:MovieClip;
}
}//package bouncer_agaf_complete_fla
Section 23
//level8_49 (bouncer_agaf_complete_fla.level8_49)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level8_49 extends MovieClip {
public var player_gfx:MovieClip;
public var paddle:MovieClip;
}
}//package bouncer_agaf_complete_fla
Section 24
//level9_50 (bouncer_agaf_complete_fla.level9_50)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class level9_50 extends MovieClip {
public var player_gfx:MovieClip;
public var paddle:MovieClip;
}
}//package bouncer_agaf_complete_fla
Section 25
//mute_button_18 (bouncer_agaf_complete_fla.mute_button_18)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class mute_button_18 extends MovieClip {
public function mute_button_18(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package bouncer_agaf_complete_fla
Section 26
//player_22 (bouncer_agaf_complete_fla.player_22)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class player_22 extends MovieClip {
public var hit_box:MovieClip;
public function player_22(){
addFrameScript(29, frame30, 53, frame54);
}
function frame30(){
gotoAndPlay(1);
}
function frame54(){
stop();
}
}
}//package bouncer_agaf_complete_fla
Section 27
//preloader_3 (bouncer_agaf_complete_fla.preloader_3)
package bouncer_agaf_complete_fla {
import flash.display.*;
public dynamic class preloader_3 extends MovieClip {
public var loader_mask:MovieClip;
}
}//package bouncer_agaf_complete_fla
Section 28
//status_box_34 (bouncer_agaf_complete_fla.status_box_34)
package bouncer_agaf_complete_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class status_box_34 extends MovieClip {
public var points_text:TextField;
public var close_timer:Timer;
public var time_text:TextField;
public function status_box_34(){
addFrameScript(0, frame1, 1, frame2, 10, frame11, 22, frame23);
}
public function close_box(_arg1:Event){
gotoAndPlay(12);
close_timer.removeEventListener(TimerEvent.TIMER, close_box);
close_timer = null;
}
function frame1(){
stop();
}
function frame23(){
stop();
if (MovieClip(parent).current_level < 37){
MovieClip(parent).resetLevel();
MovieClip(parent).nextLevel();
};
if (MovieClip(parent).current_level > 37){
MovieClip(parent).game_mode = 0;
MovieClip(parent).endGame();
MovieClip(parent).gotoAndStop(64);
};
}
function frame2(){
close_timer = new Timer(2000);
close_timer.addEventListener(TimerEvent.TIMER, close_box);
close_timer.start();
}
function frame11(){
stop();
MovieClip(parent).score = (MovieClip(parent).score + Math.floor(((60000 - ((MovieClip(parent).gameTime.seconds * 1000) + MovieClip(parent).gameTime.mills)) / 10)));
MovieClip(parent).score_text.text = String(MovieClip(parent).score);
points_text.text = ("TIME BONUS: " + String(Math.floor(((60000 - ((MovieClip(parent).gameTime.seconds * 1000) + MovieClip(parent).gameTime.mills)) / 10))));
time_text.text = (("TIME TAKEN: " + String(((MovieClip(parent).gameTime.seconds + ".") + String(Math.floor((MovieClip(parent).gameTime.mills / 100)))))) + " SECS");
}
}
}//package bouncer_agaf_complete_fla
Section 29
//timecounter (cursesfoiled.time.timecounter)
package cursesfoiled.time {
import flash.events.*;
import flash.utils.*;
public class timecounter {
private var timer:Timer;
public var time:String;// = ""
public var mills:int;// = 0
public var total_mills:int;// = 0
public var minutes:int;// = 0
private var mode:int;// = 0
private var baseTimer:int;
public var seconds:int;// = 0
public function timecounter(_arg1:int, _arg2:int, _arg3:int, _arg4:int){
mills = 0;
total_mills = 0;
seconds = 0;
minutes = 0;
time = "";
mode = 0;
super();
mills = _arg3;
seconds = _arg2;
minutes = _arg1;
mode = _arg4;
timer = new Timer(1);
timer.addEventListener(TimerEvent.TIMER, updateTime);
if (seconds < 10){
time = String(((minutes + ":0") + seconds));
} else {
time = String(((minutes + ":") + seconds));
};
}
public function stop(){
timer.stop();
}
public function reset(){
mills = 0;
seconds = 0;
minutes = 0;
time = "0:00";
}
public function totalSeconds(){
return ((seconds + (minutes * 60)));
}
public function start(){
baseTimer = getTimer();
timer.start();
}
public function totalMills(){
return (total_mills);
}
private function updateTime(_arg1:TimerEvent){
var _local2:Date;
_local2 = new Date((getTimer() - baseTimer));
mills = _local2.milliseconds;
seconds = _local2.seconds;
minutes = _local2.minutes;
}
}
}//package cursesfoiled.time
Section 30
//MochiServices (mochi.MochiServices)
package mochi {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiServices {
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _swfVersion:String;
private static var _sendChannel:LocalConnection;
private static var _rcvChannelName:String;
private static var _gatewayURL:String = "http://www.mochiads.com/static/lib/services/services.swf";
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _id:String;
private static var _listenChannel:LocalConnection;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _startTime:Number;
private static var _connecting:Boolean = false;
public static var onError:Object;
private static var _listenChannelName:String = "__mochiservices";
private static var _rcvChannel:LocalConnection;
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
onError("NotConnected");
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
};
if (_clip != null){
if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){
_clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_clip._nextcallbackID++;
};
};
}
public static function get connected():Boolean{
return (_connected);
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (_clip != null){
if (_clip._queue != null){
while (_clip._queue.length > 0) {
_local2 = _clip._queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _clip._callbacks[_local2.callbackID];
};
delete _clip._callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
};
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
public static function get childClip():Object{
return (_clip);
}
public static function get id():String{
return (_id);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function getVersion():String{
return ("1.2");
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_listenChannel.close();
_rcvChannel.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
Security.allowDomain("*");
Security.allowInsecureDomain("*");
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
return (_local2);
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
if (_clip.parent != null){
Sprite(_clip.parent).removeChild(_clip);
};
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_arg1 != null){
if ((_arg1 is Sprite)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is Sprite)){
Sprite(_container).addChild(_clip);
};
};
}
private static function onStatus(_arg1:StatusEvent):void{
switch (_arg1.level){
case "error":
_connected = false;
_listenChannel.connect(_listenChannelName);
break;
};
}
private static function initComChannels():void{
if (!_connected){
_sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion()});
_rcvChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_clip.onReceive = function (_arg1:Object):void{
var cb:String;
var cblst:Object;
var method:*;
var obj:Object;
var pkg = _arg1;
cb = pkg.callbackID;
cblst = this.client._callbacks[cb];
if (!cblst){
return;
};
method = cblst.callbackMethod;
obj = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
if (obj[method] != null){
method = obj[method];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace("Unable to invoke callback method.");
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace("Unable to invoke callback method on object.");
};
};
};
delete this.client._callbacks[cb];
};
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
_rcvChannel.connect(_rcvChannelName);
_connecting = false;
_connected = true;
_listenChannel.close();
while (_clip._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift());
};
};
}
private static function listen():void{
_listenChannel = new LocalConnection();
_listenChannel.client = _clip;
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
_listenChannel.allowDomain("*", "localhost");
_listenChannel.allowInsecureDomain("*", "localhost");
_listenChannel.connect(_listenChannelName);
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError.apply(null, ["NotConnected"]);
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
public static function get clip():Object{
return (_container);
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
_rcvChannelName = _arg1;
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
var clipname:String;
var f:Function;
var req:URLRequest;
var id = _arg1;
var clip = _arg2;
clipname = ("_mochiservices_com_" + id);
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
MochiServices.allowDomains(_gatewayURL);
_clip = createEmptyMovieClip(clip, clipname, 10336, false);
_loader = new Loader();
_timer = new Timer(1000, 0);
_startTime = getTimer();
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
f = function (_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
req = new URLRequest(_gatewayURL);
_loader.load(req);
_clip.addChild(_loader);
_clip._mochiservices_com = _loader;
_sendChannel = new LocalConnection();
_clip._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain("*", "localhost");
_rcvChannel.allowInsecureDomain("*", "localhost");
_rcvChannel.client = _clip;
_clip._nextcallbackID = 0;
_clip._callbacks = {};
listen();
return (_clip);
}
public static function bringToTop(_arg1:Event):void{
var e = _arg1;
if (MochiServices.clip != null){
if (MochiServices.childClip != null){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
};
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
if ((clip is DisplayObject)){
if (((!(_connected)) && ((_clip == null)))){
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{
var _local5:MovieClip;
_local5 = new MovieClip();
if (_arg4){
if (((false) && (_arg3))){
_arg1.addChildAt(_local5, _arg3);
} else {
_arg1.addChild(_local5);
};
};
_arg1[_arg2] = _local5;
_local5["_name"] = _arg2;
return (_local5);
}
public static function connectWait(_arg1:TimerEvent):void{
if ((getTimer() - _startTime) > 10000){
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_timer.stop();
};
}
}
}//package mochi
Section 31
//agaf_logo (agaf_logo)
package {
import flash.display.*;
public dynamic class agaf_logo extends MovieClip {
}
}//package
Section 32
//agaf_logo_frame (agaf_logo_frame)
package {
import flash.display.*;
public dynamic class agaf_logo_frame extends MovieClip {
public function agaf_logo_frame(){
addFrameScript(108, frame109);
}
function frame109(){
MovieClip(parent).gotoAndPlay(3);
}
}
}//package
Section 33
//bounce (bounce)
package {
import flash.display.*;
import flash.events.*;
import bigroom.input.*;
import flash.utils.*;
import cursesfoiled.time.*;
import mochi.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
import flash.geom.*;
import cursesfoiled.graphics.*;
public dynamic class bounce extends MovieClip {
private var updateTimer:Timer;
public var level_running:int;// = 0
private var resizers:Array;
public var mute_button:MovieClip;
public var music_playing:int;// = 0
public var score_display:TextField;
public var highscore_button:SimpleButton;
private var glow_switch:int;// = 1
private var star_snd:star_wav;
public var website_string:String;// = "http://www.allgamesallfree.com"
private var pointer:Object;
private var timeLastFrame:Number;
private var key:KeyPoll;
private var platforms:Array;
private var goal_hit:int;// = 0
public var gg_small_button:SimpleButton;
public var current_score:int;// = 0
private var max_power:Number;// = 0
private var gamesound:SoundChannel;
public var preloader:MovieClip;
private var directors:Array;
private var gem_snd:gem_wav;
public var score:int;// = 0
private var fps_counter:Number;
public var score_text:TextField;
private var bounce_height;// = 5.5
private var level_started:int;// = 0
private var FPS:String;// = ""
private var mouse_status:int;// = 0
private var bouncers:Array;
public var gamelevel:MovieClip;
private var gameeffects:SoundChannel;
private var player:Object;
public var thanks_text:MovieClip;
public var level_comp_box:MovieClip;
public var sending_text:MovieClip;
public var bubble_text:TextField;
public var game_over:int;// = 0
public var pname:TextField;
private var gems:Array;
private var power:Number;// = 0
private var player_dead:int;// = 0
private var first_time:int;// = 0
public var lives:int;// = 5
public var curses_button:SimpleButton;
private var sound:int;// = 1
public var site_button:SimpleButton;
public var myMenu:ContextMenu;
private var p_xv;
private var die_snd:die_wav;
private var start_wait:int;// = 0
public var submit_button:SimpleButton;
private var spikes:Array;
public var current_level:int;// = 0
private var p_yv:Number;
private var bounce_snd:bounce_wav;
private var wait_time:int;// = 0
public var garage_button:SimpleButton;
private var paddle:Object;
private var bubble_amount:int;// = 0
public var start_level:int;// = 10
public var dead_box:MovieClip;
public var gg_button:SimpleButton;
public var level_start_box:MovieClip;
private var bubbles:Array;
private var bounce_playing;// = 0
public var lives_text:TextField;
public var back_button:SimpleButton;
private var level_complete:int;// = 0
private var trail_switch:int;// = 1
public var game_music:game_mp3;
private var gamevol:SoundTransform;
private var max_speed:Number;// = 5
public var start_button:SimpleButton;
private var fans:Array;
private var game_mode:int;// = 0
public var gameover_box:MovieClip;
private var movers:Array;
private var start_x:int;// = 0
public var gameTime:timecounter;
private var start_y:int;// = 0
public var options_button:SimpleButton;
private var FPSTimer:Timer;
public function bounce(){
website_string = "http://www.allgamesallfree.com";
FPSTimer = new Timer(1000);
updateTimer = new Timer(1);
gameTime = new timecounter(0, 0, 0, 1);
FPS = "";
mouse_status = 0;
sound = 1;
key = new KeyPoll(stage);
game_mode = 0;
score = 0;
current_score = 0;
level_complete = 0;
level_started = 0;
level_running = 0;
current_level = 0;
start_level = 10;
wait_time = 0;
start_wait = 0;
glow_switch = 1;
trail_switch = 1;
first_time = 0;
player_dead = 0;
game_over = 0;
start_x = 0;
start_y = 0;
goal_hit = 0;
max_power = 0;
power = 0;
max_speed = 5;
lives = 5;
bounce_height = 5.5;
platforms = new Array();
spikes = new Array();
bouncers = new Array();
movers = new Array();
directors = new Array();
resizers = new Array();
bubbles = new Array();
gems = new Array();
fans = new Array();
bubble_amount = 0;
gamesound = new SoundChannel();
gameeffects = new SoundChannel();
gamevol = new SoundTransform(1, 0);
music_playing = 0;
bounce_playing = 0;
super();
addFrameScript(0, frame1, 2, frame3, 5, frame6, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25, 25, frame26, 26, frame27, 27, frame28, 28, frame29, 29, frame30, 30, frame31, 31, frame32, 32, frame33, 33, frame34, 34, frame35, 35, frame36, 36, frame37, 37, frame38, 38, frame39, 39, frame40, 40, frame41, 41, frame42, 42, frame43, 43, frame44, 44, frame45, 45, frame46, 46, frame47, 47, frame48, 48, frame49, 53, frame54, 54, frame55, 63, frame64, 64, frame65, 79, frame80);
}
private function updateMovers(){
var _local1:int;
var _local2:*;
var _local3:int;
_local1 = 0;
while (_local1 < movers.length) {
_local2 = movers[_local1];
_local2.mc.x = (_local2.mc.x + _local2.xv);
_local2.mc.y = (_local2.mc.y + _local2.yv);
if ((((_local2.mc is h_platform)) || ((_local2.mc is v_platform)))){
if (player.hit_box.hitTestObject(_local2.mc)){
p_yv = -(bounce_height);
if (bounce_playing < 1){
gameeffects = bounce_snd.play();
gameeffects.soundTransform = gamevol;
bounce_playing = 100;
};
};
};
_local3 = 0;
while (_local3 < directors.length) {
if (_local2.mc.hitTestObject(directors[_local3].mc)){
if ((directors[_local3].mc is go_up)){
_local2.yv = -(_local2.speed);
};
if ((directors[_local3].mc is go_down)){
_local2.yv = _local2.speed;
};
if ((directors[_local3].mc is go_left)){
_local2.xv = -(_local2.speed);
};
if ((directors[_local3].mc is go_right)){
_local2.xv = _local2.speed;
};
if ((_local2.mc is v_mover)){
_local2.xv = 0;
};
if ((_local2.mc is h_mover)){
_local2.yv = 0;
};
};
_local3++;
};
_local1++;
};
}
private function updateMain(){
var _local1:*;
_local1 = (getTimer() - timeLastFrame);
while (_local1 < (1000 / 60)) {
_local1 = (getTimer() - timeLastFrame);
};
timeLastFrame = getTimer();
player = gamelevel.player_gfx;
paddle = gamelevel.paddle;
score_text.text = String(score);
lives_text.text = String(lives);
if (lives < 1){
if (!game_over){
game_over = 1;
player_dead = 1;
level_running = 0;
gameover_box.gotoAndStop(2);
lives = 0;
};
};
if (level_running){
player_dead = 0;
player.x = (player.x + p_xv);
player.y = (player.y + p_yv);
p_yv = (p_yv + 0.3);
if (bubble_amount <= 0){
level_comp_box.gotoAndPlay(2);
level_running = 0;
goal_hit = 1;
};
bubble_text.text = String(bubble_amount);
updatePlatforms();
updateSpikes();
updateBouncers();
updateMovers();
updateResizers();
updateBubbles();
updateGems();
updateFans();
if (!goal_hit){
checkCollisions();
};
if (key.isDown(Keyboard.LEFT)){
paddle.x = (paddle.x - 2.5);
};
if (key.isDown(Keyboard.RIGHT)){
paddle.x = (paddle.x + 2.5);
};
if (paddle.x < 0){
paddle.x = 0;
};
if (paddle.x > 480){
paddle.x = 480;
};
player.x = paddle.x;
if (player.hitTestObject(paddle)){
p_yv = -(bounce_height);
if (bounce_playing < 1){
gameeffects = bounce_snd.play();
gameeffects.soundTransform = gamevol;
bounce_playing = 100;
};
};
};
fps_counter++;
}
public function highscore_pushed(_arg1:Event){
show_scores();
}
private function mouseup(_arg1:Event){
mouse_status = 0;
}
private function toggleSound(_arg1:Event){
switch (sound){
case 1:
sound = 0;
gamevol.volume = 0;
mute_button.gotoAndStop(2);
break;
case 0:
sound = 1;
gamevol.volume = 1;
mute_button.gotoAndStop(1);
break;
};
}
private function updateFans(){
var _local1:int;
var _local2:Object;
_local1 = 0;
while (_local1 < fans.length) {
_local2 = fans[_local1];
if (_local2.mc.hitbox.hitTestPoint(player.x, player.y, true)){
max_power = distanceTo(player.x, player.y, _local2.mc.x, _local2.mc.y);
if (max_power > 400){
max_power = 400;
};
power = 0.08;
p_xv = (p_xv + (Math.sin(degToRad(_local2.ang)) * power));
p_yv = (p_yv + (-(Math.cos(degToRad(_local2.ang))) * power));
};
_local1++;
};
}
public function onComplete(_arg1:Event){
thanks_text.visible = true;
sending_text.visible = false;
back_button.visible = true;
}
function frame14(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
function frame16(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
public function nextLevel(){
gotoAndStop((currentFrame + 2));
}
private function updateGame(_arg1:TimerEvent){
gamesound.soundTransform = gamevol;
gameeffects.soundTransform = gamevol;
switch (game_mode){
case 0:
updateTitle();
break;
case 1:
updateOptions();
break;
case 2:
updateIntro();
break;
case 3:
updateMain();
break;
};
}
private function updateBubbles(){
var _local1:int;
var _local2:Object;
_local1 = 0;
while (_local1 < bubbles.length) {
_local2 = bubbles[_local1];
if (player.hit_box.hitTestObject(_local2.mc)){
gameeffects = star_snd.play(0, 1);
gameeffects.soundTransform = gamevol;
bubble_amount = (bubble_amount - 1);
score = (score + 100);
current_score = (current_score + 100);
_local2.mc.parent.removeChild(_local2.mc);
removeObject(_local2, bubbles);
};
_local1++;
};
}
function frame3(){
stop();
checkURL();
stage.frameRate = 120;
game_mode = 0;
lives = 5;
curses_button.addEventListener(MouseEvent.MOUSE_DOWN, cursessite);
start_button.addEventListener(MouseEvent.MOUSE_DOWN, start_pushed);
options_button.addEventListener(MouseEvent.MOUSE_UP, options_pushed);
highscore_button.addEventListener(MouseEvent.MOUSE_UP, highscore_pushed);
gg_button.addEventListener(MouseEvent.MOUSE_DOWN, options_pushed);
if (!music_playing){
music_playing = 1;
game_music = new game_mp3();
gamesound = game_music.play(0, 0xFFFF);
};
}
function frame19(){
stop();
gotoAndPlay((currentFrame - 1));
}
function frame11(){
stop();
gotoAndPlay((currentFrame - 1));
}
function frame6(){
}
function frame22(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
function frame25(){
stop();
gotoAndPlay((currentFrame - 1));
}
function frame9(){
gotoAndPlay(3);
}
function frame15(){
stop();
gotoAndPlay((currentFrame - 1));
}
function frame20(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
function frame21(){
stop();
gotoAndPlay((currentFrame - 1));
}
function frame1(){
stage.frameRate = 30;
this.stop();
MochiServices.connect("8953461d83e5fa81", this);
garage_button.addEventListener(MouseEvent.MOUSE_DOWN, garagesite);
myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
this.contextMenu = myMenu;
this.addEventListener("enterFrame", onEnterFrame);
}
public function submit_game_score(_arg1:String, _arg2:Number){
var _local3:String;
var _local4:URLRequest;
var _local5:URLLoader;
var _local6:URLVariables;
_local3 = "game_title";
_local4 = new URLRequest(("http://www.allgamesallfree.com/new_score.php?game=" + _local3));
_local5 = new URLLoader();
_local6 = new URLVariables();
_local6.add_pass = "flashapi";
_local6.name = _arg1;
_local6.score = _arg2;
_local4.method = URLRequestMethod.POST;
_local4.data = _local6;
_local5.load(_local4);
}
function frame35(){
stop();
gotoAndPlay((currentFrame - 1));
}
public function angleFromTo(_arg1, _arg2, _arg3, _arg4:Number){
var _local5:Number;
var _local6:Number;
_local5 = (_arg3 - _arg1);
_local6 = (_arg4 - _arg2);
return ((Math.atan2(_local6, _local5) / (Math.PI / 180)));
}
function frame24(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
function frame13(){
stop();
gotoAndPlay((currentFrame - 1));
}
function frame29(){
stop();
gotoAndPlay((currentFrame - 1));
}
function frame36(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
function frame23(){
stop();
gotoAndPlay((currentFrame - 1));
}
function frame34(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
function frame38(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
private function examineLevel(){
var _local1:int;
var _local2:*;
var _local3:Object;
var _local4:Object;
var _local5:Object;
var _local6:Object;
var _local7:Object;
var _local8:Object;
var _local9:Object;
var _local10:Object;
var _local11:Object;
var _local12:Object;
var _local13:Object;
var _local14:Object;
var _local15:Object;
var _local16:Object;
var _local17:Object;
bubble_amount = 0;
current_score = 0;
goal_hit = 0;
level_start_box.gotoAndStop(2);
start_x = gamelevel.player_gfx.x;
start_y = gamelevel.player_gfx.y;
current_level = currentFrame;
_local1 = 0;
while (_local1 < this.gamelevel.numChildren) {
_local2 = this.gamelevel.getChildAt(_local1);
if ((_local2 is platform1)){
_local3 = new Object();
_local3.x = _local2.x;
_local3.y = _local2.y;
_local3.mc = _local2;
platforms.push(_local3);
};
if ((_local2 is small_bubbles)){
_local4 = new Object();
_local4.x = _local2.x;
_local4.y = _local2.y;
_local4.mc = _local2;
bubbles.push(_local4);
bubble_amount = (bubble_amount + 1);
};
if ((_local2 is gem_obj)){
_local5 = new Object();
_local5.x = _local2.x;
_local5.y = _local2.y;
_local5.mc = _local2;
gems.push(_local5);
};
if ((((_local2 is spinning_spike1)) || ((_local2 is spinning_spike2)))){
_local6 = new Object();
_local6.x = _local2.x;
_local6.y = _local2.y;
_local6.ang = _local2.rotation;
_local6.mc = _local2;
spikes.push(_local6);
};
if ((_local2 is Bouncer)){
_local7 = new Object();
_local7.x = _local2.x;
_local7.y = _local2.y;
_local7.xv = 0;
_local7.yv = 0;
if (_local2.name == "right"){
_local7.xv = 2;
};
if (_local2.name == "left"){
_local7.xv = -2;
};
if (_local2.name == "up"){
_local7.yv = -2;
};
if (_local2.name == "down"){
_local7.yv = 2;
};
_local7.mc = _local2;
bouncers.push(_local7);
};
if ((_local2 is h_platform)){
_local8 = new Object();
_local8.x = _local2.x;
_local8.y = _local2.y;
_local8.speed = 1;
if (_local2.name == "right"){
_local8.xv = _local8.speed;
};
if (_local2.name == "left"){
_local8.xv = -(_local8.speed);
};
_local8.yv = 0;
_local8.mc = _local2;
movers.push(_local8);
};
if ((_local2 is v_platform)){
_local9 = new Object();
_local9.x = _local2.x;
_local9.y = _local2.y;
_local9.speed = 1.5;
if (_local2.name == "down"){
_local9.yv = _local9.speed;
};
if (_local2.name == "up"){
_local9.yv = -(_local9.speed);
};
_local9.xv = 0;
_local9.mc = _local2;
movers.push(_local9);
};
if ((_local2 is h_mover)){
_local10 = new Object();
_local10.x = _local2.x;
_local10.y = _local2.y;
if (_local2.name == "right"){
_local10.xv = 2;
};
if (_local2.name == "left"){
_local10.xv = -2;
};
_local10.yv = 0;
_local10.speed = 2;
_local10.mc = _local2;
movers.push(_local10);
};
if ((_local2 is v_mover)){
_local11 = new Object();
_local11.x = _local2.x;
_local11.y = _local2.y;
if (_local2.name == "down"){
_local10.yv = 2;
};
if (_local2.name == "up"){
_local10.yv = -2;
};
_local11.xv = 0;
_local11.speed = 2;
_local11.mc = _local2;
movers.push(_local11);
};
if ((_local2 is go_up)){
_local12 = new Object();
_local12.mc = _local2;
_local2.alpha = 0;
directors.push(_local12);
};
if ((_local2 is go_down)){
_local13 = new Object();
_local13.mc = _local2;
_local2.alpha = 0;
directors.push(_local13);
};
if ((_local2 is go_left)){
_local14 = new Object();
_local14.mc = _local2;
_local2.alpha = 0;
directors.push(_local14);
};
if ((_local2 is go_right)){
_local15 = new Object();
_local15.mc = _local2;
_local2.alpha = 0;
directors.push(_local15);
};
if ((_local2 is resizer)){
_local16 = new Object();
_local16.mc = _local2;
_local16.size = _local2.width;
_local16.grow = 0;
resizers.push(_local16);
};
if ((_local2 is Fan)){
_local17 = new Object();
_local17.mc = _local2;
_local17.x = _local2.x;
_local17.y = _local2.y;
_local17.ang = _local2.rotation;
fans.push(_local17);
};
_local1++;
};
}
function frame32(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
function frame33(){
stop();
gotoAndPlay((currentFrame - 1));
}
public function retry(){
p_xv = 0;
p_yv = 0;
player.x = start_x;
player.y = start_y;
}
private function checkCollisions(){
var _local1:int;
var _local2:*;
var _local3:int;
var _local4:*;
var _local5:*;
_local1 = 0;
while (_local1 < this.gamelevel.numChildren) {
_local2 = this.gamelevel.getChildAt(_local1);
if ((_local2 is Spike)){
if (player.hit_box.hitTestObject(_local2)){
if (lives > 0){
if (!player_dead){
player_dead = 1;
lives = (lives - 1);
gameeffects = die_snd.play();
gameeffects.soundTransform = gamevol;
score = (score - current_score);
current_score = 0;
};
level_running = 0;
if (lives > 0){
dead_box.gotoAndStop(2);
};
player.gotoAndPlay(50);
};
};
};
if ((_local2 is Bouncer)){
if (player.hit_box.hitTestObject(_local2)){
if (lives > 0){
if (!player_dead){
player_dead = 1;
lives = (lives - 1);
};
level_running = 0;
if (lives > 0){
dead_box.gotoAndStop(2);
};
player.gotoAndPlay(50);
};
};
};
if ((_local2 is h_mover)){
if (player.hit_box.hitTestObject(_local2)){
if (lives > 0){
if (!player_dead){
player_dead = 1;
lives = (lives - 1);
};
level_running = 0;
if (lives > 0){
dead_box.gotoAndStop(2);
};
player.gotoAndPlay(50);
};
};
};
if ((_local2 is v_mover)){
if (player.hit_box.hitTestObject(_local2)){
if (lives > 0){
if (!player_dead){
player_dead = 1;
lives = (lives - 1);
};
level_running = 0;
if (lives > 0){
dead_box.gotoAndStop(2);
};
player.gotoAndPlay(50);
};
};
};
if ((_local2 is resizer)){
_local3 = 0;
while (_local3 < 32) {
_local4 = (player.x + (Math.sin(degToRad((11.25 * _local3))) * 12));
_local5 = (player.y + (Math.cos(degToRad((11.25 * _local3))) * 12));
if (_local2.hitTestPoint(_local4, _local5, true)){
if (lives > 0){
if (!player_dead){
player_dead = 1;
lives = (lives - 1);
};
level_running = 0;
if (lives > 0){
dead_box.gotoAndStop(2);
};
player.gotoAndPlay(50);
};
};
_local3++;
};
};
if ((((_local2 is spinning_spike1)) || ((_local2 is spinning_spike2)))){
_local3 = 0;
while (_local3 < 32) {
_local4 = (player.x + (Math.sin(degToRad((11.25 * _local3))) * 12));
_local5 = (player.y + (Math.cos(degToRad((11.25 * _local3))) * 12));
if (_local2.hitTestPoint(_local4, _local5, true)){
if (lives > 0){
if (!player_dead){
player_dead = 1;
lives = (lives - 1);
};
level_running = 0;
if (lives > 0){
dead_box.gotoAndStop(2);
};
player.gotoAndPlay(50);
};
};
_local3++;
};
};
_local1++;
};
}
function frame27(){
stop();
gotoAndPlay((currentFrame - 1));
}
function frame28(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
function frame31(){
stop();
gotoAndPlay((currentFrame - 1));
}
function frame40(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
function frame12(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
function frame37(){
stop();
gotoAndPlay((currentFrame - 1));
}
function frame39(){
stop();
gotoAndPlay((currentFrame - 1));
}
public function tracking(){
var _local1:URLRequest;
var _local2:URLVariables;
var _local3:URLLoader;
_local1 = new URLRequest("http://www.gamegarage.co.uk/scripts/tracking.php");
_local1.method = URLRequestMethod.POST;
_local2 = new URLVariables();
_local2.game_id = LoaderInfo(this.root.loaderInfo).parameters["game_id"];
_local2.user_id = LoaderInfo(this.root.loaderInfo).parameters["user_id"];
_local1.data = _local2;
_local3 = new URLLoader(_local1);
_local3.dataFormat = URLLoaderDataFormat.VARIABLES;
_local3.load(_local1);
}
function frame48(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
private function updateBouncers(){
var _local1:int;
var _local2:Object;
_local1 = 0;
while (_local1 < bouncers.length) {
_local2 = bouncers[_local1];
_local2.mc.x = (_local2.mc.x + _local2.xv);
_local2.mc.y = (_local2.mc.y + _local2.yv);
if (_local2.mc.x < 16){
_local2.xv = 2;
};
if (_local2.mc.x > 616){
_local2.xv = -2;
};
if (_local2.mc.y < 44){
_local2.yv = 2;
};
if (_local2.mc.y > 456){
_local2.yv = -2;
};
_local1++;
};
}
public function onEnterFrame(_arg1:Event){
preloader.loader_mask.scaleX = ((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 1);
if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
gotoAndStop(80);
this.removeEventListener("enterFrame", onEnterFrame);
};
}
function frame45(){
stop();
gotoAndPlay((currentFrame - 1));
}
function frame10(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
function frame41(){
stop();
gotoAndPlay((currentFrame - 1));
}
function frame30(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
function frame43(){
stop();
gotoAndPlay((currentFrame - 1));
}
function frame42(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
public function scoring(){
var _local1:URLRequest;
var _local2:URLVariables;
var _local3:URLLoader;
_local1 = new URLRequest("http://www.gamegarage.co.uk/scripts/score.php");
_local1.method = URLRequestMethod.POST;
_local2 = new URLVariables();
_local2.game_id = LoaderInfo(this.root.loaderInfo).parameters["game_id"];
_local2.user_id = LoaderInfo(this.root.loaderInfo).parameters["user_id"];
_local2.score = score;
_local2.alg = (((_local2.game_id + _local2.user_id) + String(score)) + "a83l9xj");
_local1.data = _local2;
_local3 = new URLLoader(_local1);
_local3.addEventListener(Event.COMPLETE, onComplete);
_local3.dataFormat = URLLoaderDataFormat.VARIABLES;
_local3.load(_local1);
}
function frame46(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
function frame54(){
stop();
game_mode = 0;
gotoAndPlay(3);
}
function frame44(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
function frame55(){
stop();
}
public function submit_release(_arg1:Event){
show_scores();
submit_button.visible = false;
sending_text.visible = true;
}
public function cursessite(_arg1:Event){
var _local2:URLRequest;
if (ExternalInterface.available){
ExternalInterface.call("window.open", "http://www.cursesfoiled.co.uk", "_blank");
} else {
_local2 = new URLRequest("http://www.cursesfoiled.co.uk");
navigateToURL(_local2, "_blank");
};
}
private function removeObject(_arg1:Object, _arg2:Array){
var _local3:*;
for (_local3 in _arg2) {
if (_arg2[_local3] == _arg1){
_arg2.splice(_local3, 1);
_arg1 = null;
break;
};
};
}
public function garagesite(_arg1:Event){
var _local2:URLRequest;
if (ExternalInterface.available){
ExternalInterface.call("window.open", website_string, "_blank");
} else {
_local2 = new URLRequest(website_string);
navigateToURL(_local2, "_blank");
};
}
private function fps_update(_arg1:TimerEvent){
FPS = (String(fps_counter) + " FPS");
fps_counter = 0;
}
function frame18(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
function frame49(){
stop();
gotoAndPlay((currentFrame - 1));
}
private function mousedown(_arg1:Event){
mouse_status = 1;
}
function frame65(){
gotoAndPlay(3);
}
private function updateIntro(){
}
function frame17(){
stop();
gotoAndPlay((currentFrame - 1));
}
function frame80(){
stop();
stage.frameRate = 30;
site_button.addEventListener(MouseEvent.MOUSE_DOWN, site);
}
function frame26(){
stop();
resetLevel();
examineLevel();
game_mode = 3;
gamelevel.player_gfx.gotoAndPlay(1);
}
public function degToRad(_arg1:Number){
return ((_arg1 * (Math.PI / 180)));
}
function frame64(){
score_display.text = String(score);
submit_button.addEventListener(MouseEvent.MOUSE_DOWN, submit_score);
submit_button.addEventListener(MouseEvent.MOUSE_UP, submit_release);
back_button.addEventListener(MouseEvent.MOUSE_DOWN, go_back);
submit_button.visible = true;
thanks_text.visible = false;
sending_text.visible = false;
}
public function site(_arg1:Event){
var _local2:URLRequest;
if (ExternalInterface.available){
ExternalInterface.call("window.open", website_string, "_blank");
} else {
_local2 = new URLRequest(website_string);
navigateToURL(_local2, "_blank");
};
}
private function updateTitle(){
}
function gg_site(_arg1:Event){
var _local2:URLRequest;
if (ExternalInterface.available){
ExternalInterface.call("window.open", website_string, "_blank");
} else {
_local2 = new URLRequest(website_string);
navigateToURL(_local2, "_blank");
};
}
public function checkURL(){
var _local1:String;
_local1 = stage.loaderInfo.url.toLowerCase();
if ((((((((_local1.indexOf("allgamesallfree.com") <= 0)) && ((_local1.indexOf("cursesfoiled.co.uk") <= 0)))) && ((_local1.indexOf("fantasticchoice.com") <= 0)))) && ((_local1.indexOf("flashgamelicense.com") <= 0)))){
start_game();
} else {
start_game();
};
}
public function distanceTo(_arg1, _arg2, _arg3, _arg4){
var _local5:Number;
var _local6:Number;
_local5 = (_arg1 - _arg3);
_local6 = (_arg4 - _arg2);
return (Math.sqrt(((_local5 * _local5) + (_local6 * _local6))));
}
private function updateSpikes(){
var _local1:int;
var _local2:int;
var _local3:Object;
var _local4:*;
_local1 = 0;
while (_local1 < spikes.length) {
_local2 = 0;
while (_local2 < spikes[_local1].mc.numChildren) {
_local4 = spikes[_local1].mc.getChildAt(_local2);
spikes[_local1].mc.getChildAt(_local2).rotation = (_local4.rotation - 2);
_local2++;
};
_local3 = spikes[_local1];
_local3.mc.rotation = (_local3.mc.rotation + 2);
_local1++;
};
}
private function updateGems(){
var _local1:int;
var _local2:Object;
_local1 = 0;
while (_local1 < gems.length) {
_local2 = gems[_local1];
if (player.hit_box.hitTestObject(_local2.mc)){
gameeffects = gem_snd.play();
gameeffects.soundTransform = gamevol;
score = (score + 200);
current_score = (current_score + 200);
_local2.mc.parent.removeChild(_local2.mc);
removeObject(_local2, gems);
};
_local1++;
};
}
public function resetLevel(){
var _local1:int;
_local1 = 0;
while (_local1 < platforms.length) {
removeObject(platforms[_local1], platforms);
_local1++;
};
platforms = [];
_local1 = 0;
while (_local1 < gems.length) {
removeObject(gems[_local1], gems);
_local1++;
};
gems = [];
_local1 = 0;
while (_local1 < spikes.length) {
removeObject(spikes[_local1], spikes);
_local1++;
};
spikes = [];
_local1 = 0;
while (_local1 < movers.length) {
removeObject(movers[_local1], movers);
_local1++;
};
movers = [];
_local1 = 0;
while (_local1 < directors.length) {
removeObject(directors[_local1], directors);
_local1++;
};
directors = [];
_local1 = 0;
while (_local1 < resizers.length) {
removeObject(resizers[_local1], resizers);
_local1++;
};
resizers = [];
_local1 = 0;
while (_local1 < bubbles.length) {
removeObject(bubbles[_local1], bubbles);
bubble_amount = (bubble_amount - 1);
_local1++;
};
bubbles = [];
_local1 = 0;
while (_local1 < fans.length) {
removeObject(fans[_local1], fans);
_local1++;
};
fans = [];
level_running = 0;
game_over = 0;
p_xv = 0;
p_yv = 0;
}
function frame47(){
stop();
gotoAndPlay((currentFrame - 1));
}
public function endGame(){
game_over = 0;
current_score = 0;
updateTimer.removeEventListener(TimerEvent.TIMER, updateGame);
FPSTimer.removeEventListener(TimerEvent.TIMER, fps_update);
}
private function updateOptions(){
}
private function updatePlatforms(){
var _local1:int;
var _local2:Object;
_local1 = 0;
while (_local1 < platforms.length) {
_local2 = platforms[_local1];
if (bounce_playing > 0){
bounce_playing = (bounce_playing - 1);
};
if (player.hit_box.hitTestObject(_local2.mc)){
p_yv = -(bounce_height);
if (bounce_playing < 1){
gameeffects = bounce_snd.play();
gameeffects.soundTransform = gamevol;
bounce_playing = 100;
};
};
_local1++;
};
}
public function radToDeg(_arg1:Number){
return ((_arg1 * (180 / Math.PI)));
}
public function show_scores(){
var _local1:URLRequest;
_local1 = new URLRequest("http://www.allgamesallfree.com/index.php?id=highscores&game=bouncer");
navigateToURL(_local1, "_blank");
}
public function submit_score(_arg1:Event){
submit_game_score(pname.text, score);
score = 0;
}
public function start_pushed(_arg1:Event){
score = 0;
gotoAndStop(start_level);
}
public function start_game(){
updateTimer.addEventListener(TimerEvent.TIMER, updateGame);
updateTimer.start();
FPSTimer.addEventListener(TimerEvent.TIMER, fps_update);
FPSTimer.start();
stage.addEventListener(MouseEvent.MOUSE_DOWN, mousedown);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseup);
mute_button.addEventListener(MouseEvent.MOUSE_DOWN, toggleSound);
gg_small_button.addEventListener(MouseEvent.MOUSE_DOWN, gg_site);
p_xv = 0;
p_yv = 0;
bounce_snd = new bounce_wav();
star_snd = new star_wav();
gem_snd = new gem_wav();
die_snd = new die_wav();
}
public function go_back(_arg1:Event){
score = 0;
gotoAndPlay(3);
}
private function resetGame(){
game_mode = 0;
game_over = 0;
level_running = 0;
score = 0;
current_score = 0;
}
private function updateResizers(){
var _local1:int;
var _local2:*;
_local1 = 0;
while (_local1 < resizers.length) {
_local2 = resizers[_local1];
if (_local2.grow == 0){
_local2.mc.width = (_local2.mc.width + 2);
_local2.mc.height = (_local2.mc.height + 2);
};
if (_local2.grow == 1){
_local2.mc.width = (_local2.mc.width - 2);
_local2.mc.height = (_local2.mc.height - 2);
};
if (_local2.mc.width < 16){
_local2.grow = 0;
};
if (_local2.mc.width > 64){
_local2.grow = 1;
};
_local1++;
};
}
public function options_pushed(_arg1:Event){
var _local2:URLRequest;
if (ExternalInterface.available){
ExternalInterface.call("window.open", website_string, "_blank");
} else {
_local2 = new URLRequest(website_string);
navigateToURL(_local2, "_blank");
};
}
}
}//package
Section 34
//bounce_wav (bounce_wav)
package {
import flash.media.*;
public dynamic class bounce_wav extends Sound {
}
}//package
Section 35
//Bouncer (Bouncer)
package {
import flash.display.*;
public dynamic class Bouncer extends MovieClip {
}
}//package
Section 36
//die_wav (die_wav)
package {
import flash.media.*;
public dynamic class die_wav extends Sound {
}
}//package
Section 37
//Fan (Fan)
package {
import flash.display.*;
public dynamic class Fan extends MovieClip {
public var hitbox:MovieClip;
}
}//package
Section 38
//game_mp3 (game_mp3)
package {
import flash.media.*;
public dynamic class game_mp3 extends Sound {
}
}//package
Section 39
//gem_obj (gem_obj)
package {
import flash.display.*;
public dynamic class gem_obj extends MovieClip {
}
}//package
Section 40
//gem_wav (gem_wav)
package {
import flash.media.*;
public dynamic class gem_wav extends Sound {
}
}//package
Section 41
//go_down (go_down)
package {
import flash.display.*;
public dynamic class go_down extends MovieClip {
}
}//package
Section 42
//go_left (go_left)
package {
import flash.display.*;
public dynamic class go_left extends MovieClip {
}
}//package
Section 43
//go_right (go_right)
package {
import flash.display.*;
public dynamic class go_right extends MovieClip {
}
}//package
Section 44
//go_up (go_up)
package {
import flash.display.*;
public dynamic class go_up extends MovieClip {
}
}//package
Section 45
//h_mover (h_mover)
package {
import flash.display.*;
public dynamic class h_mover extends MovieClip {
}
}//package
Section 46
//h_platform (h_platform)
package {
import flash.display.*;
public dynamic class h_platform extends MovieClip {
}
}//package
Section 47
//platform1 (platform1)
package {
import flash.display.*;
public dynamic class platform1 extends MovieClip {
}
}//package
Section 48
//resizer (resizer)
package {
import flash.display.*;
public dynamic class resizer extends MovieClip {
}
}//package
Section 49
//small_bubbles (small_bubbles)
package {
import flash.display.*;
public dynamic class small_bubbles extends MovieClip {
}
}//package
Section 50
//Spike (Spike)
package {
import flash.display.*;
public dynamic class Spike extends MovieClip {
}
}//package
Section 51
//spinning_spike1 (spinning_spike1)
package {
import flash.display.*;
public dynamic class spinning_spike1 extends MovieClip {
}
}//package
Section 52
//spinning_spike2 (spinning_spike2)
package {
import flash.display.*;
public dynamic class spinning_spike2 extends MovieClip {
}
}//package
Section 53
//star_wav (star_wav)
package {
import flash.media.*;
public dynamic class star_wav extends Sound {
}
}//package
Section 54
//v_mover (v_mover)
package {
import flash.display.*;
public dynamic class v_mover extends MovieClip {
}
}//package
Section 55
//v_platform (v_platform)
package {
import flash.display.*;
public dynamic class v_platform extends MovieClip {
}
}//package