Section 1
//MochiScores (mochi.MochiScores)
package mochi {
import flash.display.*;
import flash.text.*;
public class MochiScores {
private static var boardID:String;
public static var onErrorHandler:Object;
public static var onCloseHandler:Object;
public static function showLeaderboard(_arg1:Object=null):void{
var options = _arg1;
if (options != null){
if (options.clip != null){
if ((options.clip is Sprite)){
MochiServices.setContainer(options.clip);
};
delete options.clip;
} else {
MochiServices.setContainer();
};
MochiServices.stayOnTop();
if (options.name != null){
if ((options.name is TextField)){
if (options.name.text.length > 0){
options.name = options.name.text;
};
};
};
if (options.score != null){
if ((options.score is TextField)){
if (options.score.text.length > 0){
options.score = options.score.text;
};
};
};
if (options.onDisplay != null){
options.onDisplay();
} else {
if (MochiServices.clip != null){
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
};
} else {
options = {};
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
Bomboozle.resetTitle();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
if (options.onClose != null){
onCloseHandler = options.onClose;
} else {
onCloseHandler = function ():void{
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.play();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onClose.");
};
};
};
if (options.onError != null){
onErrorHandler = options.onError;
} else {
onErrorHandler = null;
};
if (options.boardID == null){
if (MochiScores.boardID != null){
options.boardID = MochiScores.boardID;
};
};
MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose);
}
public static function closeLeaderboard():void{
MochiServices.send("scores_closeLeaderboard");
Bomboozle.resetTitle();
}
public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2);
}
public static function requestList(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_requestList", null, _arg1, _arg2);
}
public static function scoresArrayToObjects(_arg1:Object):Object{
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Object;
var _local7:String;
var _local8:String;
_local2 = {};
for (_local7 in _arg1) {
if (typeof(_arg1[_local7]) == "object"){
if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){
_local2[_local7] = [];
_local5 = _arg1[_local7];
_local4 = 0;
while (_local4 < _local5.rows.length) {
_local6 = {};
_local3 = 0;
while (_local3 < _local5.cols.length) {
_local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3];
_local3++;
};
_local2[_local7].push(_local6);
_local4++;
};
} else {
_local2[_local7] = {};
for (_local8 in _arg1[_local7]) {
_local2[_local7][_local8] = _arg1[_local7][_local8];
};
};
} else {
_local2[_local7] = _arg1[_local7];
};
};
return (_local2);
}
public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{
MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4);
}
public static function onClose(_arg1:Object=null):void{
if (_arg1 != null){
if (_arg1.error != null){
if (_arg1.error == true){
if (onErrorHandler != null){
if (_arg1.errorCode == null){
_arg1.errorCode = "IOError";
};
onErrorHandler(_arg1.errorCode);
MochiServices.doClose();
return;
};
};
};
};
onCloseHandler();
MochiServices.doClose();
Bomboozle.resetTitle();
}
public static function setBoardID(_arg1:String):void{
MochiScores.boardID = _arg1;
MochiServices.send("scores_setBoardID", {boardID:_arg1});
}
}
}//package mochi
Section 2
//MochiServices (mochi.MochiServices)
package mochi {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.utils.*;
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.31");
}
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 methodName:String;
var obj:Object;
var pkg = _arg1;
cb = pkg.callbackID;
cblst = this.client._callbacks[cb];
if (!cblst){
return;
};
method = cblst.callbackMethod;
methodName = "";
obj = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
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(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete this.client._callbacks[cb];
};
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_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);
trace("Waiting for MochiAds services to connect...");
}
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)))){
trace("MochiServices Connecting...");
_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 mc:MovieClip;
var parent = _arg1;
var name = _arg2;
var depth = _arg3;
var doAdd = _arg4;
mc = new MovieClip();
if (doAdd){
if (((false) && (depth))){
parent.addChildAt(mc, depth);
} else {
parent.addChild(mc);
};
};
try {
parent[name] = mc;
} catch(e:Error) {
throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
mc["_name"] = name;
return (mc);
}
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 3
//BitmapAsset (mx.core.BitmapAsset)
package mx.core {
import flash.display.*;
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject {
mx_internal static const VERSION:String = "2.0.1.0";
public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
public function get measuredWidth():Number{
if (bitmapData){
return (bitmapData.width);
};
return (0);
}
public function get measuredHeight():Number{
if (bitmapData){
return (bitmapData.height);
};
return (0);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 4
//FlexBitmap (mx.core.FlexBitmap)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexBitmap extends Bitmap {
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
var bitmapData = _arg1;
var pixelSnapping = _arg2;
var smoothing = _arg3;
super(bitmapData, pixelSnapping, smoothing);
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 5
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 6
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function set height(_arg1:Number):void;
function get scaleY():Number;
function move(_arg1:Number, _arg2:Number):void;
function get scaleX():Number;
function set mask(_arg1:DisplayObject):void;
function set scaleX(_arg1:Number):void;
function set name(_arg1:String):void;
function set scaleY(_arg1:Number):void;
function get visible():Boolean;
function get measuredWidth():Number;
function set visible(_arg1:Boolean):void;
function get alpha():Number;
function get height():Number;
function get width():Number;
function get parent():DisplayObjectContainer;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set y(_arg1:Number):void;
function get x():Number;
function get y():Number;
function set alpha(_arg1:Number):void;
}
}//package mx.core
Section 7
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function get repeaters():Array;
function get instanceIndices():Array;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 8
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 9
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.core
Section 10
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "2.0.1.0";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var _local2:String;
var _local3:DisplayObject;
var _local4:String;
var _local5:Array;
_local3 = _arg1;
while (_local3 != null) {
if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){
break;
};
_local4 = _local3.name;
if ((_local3 is IRepeaterClient)){
_local5 = IRepeaterClient(_local3).instanceIndices;
if (_local5){
_local4 = (_local4 + (("[" + _local5.join("][")) + "]"));
};
};
_local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2);
_local3 = _local3.parent;
};
return (_local2);
}
public static function createUniqueName(_arg1:Object):String{
var _local2:String;
var _local3:int;
var _local4:int;
if (!_arg1){
return (null);
};
_local2 = getQualifiedClassName(_arg1);
_local3 = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
_local4 = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 11
//AddOption (AddOption)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
public class AddOption extends Sprite {
private const BORDER_SIZE:Number = 1.5;
private const BAR_CORNER_SIZE:Number = 20;
private const BAR_WIDTH:Number = 360;
private const BAR_HEIGHT:Number = 24;
private var _transform:SoundTransform;
private var _sound:Sound;
private var sound_volume_class:Class;
private var options_class:Class;
private var option_position:int;
private var option_text_bitmap:BitmapData;
private var option_text_image:Bitmap;
private var _channel:SoundChannel;
private var music_volume_class:Class;
private var _mtx:Matrix;
public function AddOption(){
_mtx = new Matrix();
music_volume_class = AddOption_music_volume_class;
sound_volume_class = AddOption_sound_volume_class;
options_class = AddOption_options_class;
super();
}
public function optionClicked(_arg1:MouseEvent):void{
var _local2:int;
var _local3:Number;
_local2 = ((stage.stageWidth - BAR_WIDTH) >> 1);
if ((((mouseX >= _local2)) && ((mouseX <= (_local2 + BAR_WIDTH))))){
_local3 = ((mouseX - _local2) / BAR_WIDTH);
trace(("bar_value = " + _local3));
switch (option_position){
case 0:
if (_local3 < 0.05){
Bomboozle.music_volume = 0;
ProgressBar._transform.volume = Bomboozle.music_volume;
ProgressBar._channel.stop();
} else {
if (Bomboozle.music_volume == 0){
ProgressBar._channel = ProgressBar._sound.play(0, int.MAX_VALUE);
};
Bomboozle.music_volume = _local3;
ProgressBar._transform.volume = Bomboozle.music_volume;
ProgressBar._channel.soundTransform = ProgressBar._transform;
};
break;
case 1:
if (_local3 < 0.05){
_local3 = 0;
};
Bomboozle.sound_volume = _local3;
PlaySample.playSound(PlaySample.SOUND_BOMB_AWARDED, 0);
break;
};
};
}
public function init(_arg1:int):void{
option_position = _arg1;
switch (_arg1){
case -1:
option_text_image = new options_class();
break;
case 0:
option_text_image = new music_volume_class();
break;
case 1:
option_text_image = new sound_volume_class();
break;
};
option_text_bitmap = new BitmapData(option_text_image.width, option_text_image.height, true, 0xFFFFFF);
option_text_bitmap.draw(option_text_image, new Matrix());
addEventListener(Event.ENTER_FRAME, onEnterFrame);
addEventListener(MouseEvent.MOUSE_DOWN, optionClicked);
this.alpha = 0;
}
public function onEnterFrame(_arg1:Event):void{
var _local2:int;
var _local3:int;
switch (Bomboozle.game_state){
case Bomboozle.GAME_STATE_OPTIONS:
mouseEnabled = (option_position > -1);
visible = true;
if (this.alpha < 1){
this.alpha = (this.alpha + Bomboozle.FADE_SPEED);
};
graphics.clear();
_local2 = ((stage.stageWidth - option_text_bitmap.width) / 2);
_local3 = ((stage.stageHeight * 0.25) + (this.option_position * (option_text_image.height * 1.3)));
if (option_position == -1){
_local3 = (_local3 - option_text_bitmap.height);
};
_mtx = new Matrix();
_mtx.translate(_local2, _local3);
graphics.beginBitmapFill(option_text_bitmap, _mtx, false, false);
graphics.drawRect(_local2, _local3, option_text_image.width, option_text_image.height);
if (option_position > -1){
_local2 = ((stage.stageWidth - BAR_WIDTH) / 2);
_local3 = (_local3 + (option_text_bitmap.height * 0.575));
graphics.beginFill(8110176);
graphics.drawRoundRect((_local2 - (BORDER_SIZE * 2)), (_local3 - (BORDER_SIZE * 2)), (BAR_WIDTH + (BORDER_SIZE * 4)), (BAR_HEIGHT + (BORDER_SIZE * 4)), BAR_CORNER_SIZE, BAR_CORNER_SIZE);
graphics.beginFill(((option_position == 0)) ? 15147288 : 1065628);
graphics.drawRoundRect(_local2, _local3, (BAR_WIDTH * ((option_position == 0)) ? Bomboozle.music_volume : Bomboozle.sound_volume), BAR_HEIGHT, (BAR_CORNER_SIZE * 0.75), (BAR_CORNER_SIZE * 0.75));
graphics.beginFill(0xFFFFFF, 0.7);
graphics.drawRoundRect((_local2 + (BORDER_SIZE * 3)), (_local3 + 2), (BAR_WIDTH - (BORDER_SIZE * 6)), (BAR_HEIGHT / 5), (BAR_CORNER_SIZE * 0.2), (BAR_CORNER_SIZE * 0.2));
};
break;
default:
mouseEnabled = false;
if (this.alpha > 0){
this.alpha = (this.alpha - Bomboozle.FADE_SPEED);
};
break;
};
}
}
}//package
Section 12
//AddOption_music_volume_class (AddOption_music_volume_class)
package {
import mx.core.*;
public class AddOption_music_volume_class extends BitmapAsset {
}
}//package
Section 13
//AddOption_options_class (AddOption_options_class)
package {
import mx.core.*;
public class AddOption_options_class extends BitmapAsset {
}
}//package
Section 14
//AddOption_sound_volume_class (AddOption_sound_volume_class)
package {
import mx.core.*;
public class AddOption_sound_volume_class extends BitmapAsset {
}
}//package
Section 15
//BackButton (BackButton)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class BackButton extends Sprite {
private var backIconClass:Class;
private var icon_back:Bitmap;
public function BackButton(){
backIconClass = BackButton_backIconClass;
super();
}
public function init():void{
icon_back = new backIconClass();
alpha = 0;
addChild(icon_back);
addEventListener(MouseEvent.MOUSE_OVER, mouseOverIcon);
addEventListener(MouseEvent.MOUSE_OUT, mouseOffIcon);
addEventListener(MouseEvent.MOUSE_DOWN, iconClicked);
addEventListener(Event.ENTER_FRAME, step);
}
private function mouseOffIcon(_arg1:MouseEvent):void{
var _local2:ColorTransform;
_local2 = this.transform.colorTransform;
_local2.blueMultiplier = (_local2.redMultiplier = (_local2.greenMultiplier = 1));
this.transform.colorTransform = _local2;
}
private function mouseOverIcon(_arg1:MouseEvent):void{
if (this.alpha >= 1){
PlaySample.playSound(PlaySample.SOUND_OVER_ICON, 1);
};
}
private function iconClicked(_arg1:MouseEvent):void{
trace("iconClicked");
if (this.alpha < 1){
return;
};
switch (Bomboozle.game_state){
case Bomboozle.GAME_STATE_OPTIONS:
case Bomboozle.GAME_STATE_CREDITS:
case Bomboozle.GAME_STATE_SELECT_GAME:
case Bomboozle.GAME_STATE_CHOOSE_LEADERBOARD:
PlaySample.playSound(PlaySample.SOUND_SELECT, 0);
this.scaleX = 1;
this.scaleY = 1;
Bomboozle.resetTitle();
break;
};
}
public function step(_arg1:Event):void{
switch (Bomboozle.game_state){
case Bomboozle.GAME_STATE_SELECT_GAME:
case Bomboozle.GAME_STATE_OPTIONS:
case Bomboozle.GAME_STATE_CREDITS:
case Bomboozle.GAME_STATE_CHOOSE_LEADERBOARD:
this.x = ((stage.stageWidth - this.width) / 2);
this.y = (stage.stageHeight * 0.85);
if (this.alpha < 1){
this.alpha = (this.alpha + (Bomboozle.FADE_SPEED / 4));
};
break;
default:
if (this.alpha > 0){
this.alpha = (this.alpha - Bomboozle.FADE_SPEED);
};
break;
};
this.mouseEnabled = (this.alpha >= 1);
this.visible = (this.alpha > 0);
}
}
}//package
Section 16
//BackButton_backIconClass (BackButton_backIconClass)
package {
import mx.core.*;
public class BackButton_backIconClass extends BitmapAsset {
}
}//package
Section 17
//Background (Background)
package {
import flash.events.*;
import flash.display.*;
public class Background extends Sprite {
private var bg_class:Class;
private var cloud_small_image:Bitmap;
private var sea_image2:Bitmap;
private var hills_image:Bitmap;
private var cloud_small_class:Class;
private var hills_class:Class;
private var sea_image:Bitmap;
private var sea_class:Class;
private var grass_image:Bitmap;
private var grass_class:Class;
private var boat_class:Class;
private var cloud_image:Bitmap;
private var bg_image:Bitmap;
private var cloud_class:Class;
public static var hill_bounce_angle:Number;
public static var boat_image:Bitmap;
public function Background(){
bg_class = Background_bg_class;
grass_class = Background_grass_class;
sea_class = Background_sea_class;
hills_class = Background_hills_class;
cloud_class = Background_cloud_class;
cloud_small_class = Background_cloud_small_class;
boat_class = Background_boat_class;
super();
}
public function init():void{
hill_bounce_angle = 0;
bg_image = new bg_class();
boat_image = new boat_class();
cloud_image = new cloud_class();
cloud_small_image = new cloud_small_class();
sea_image = new sea_class();
sea_image2 = new sea_class();
hills_image = new hills_class();
grass_image = new grass_class();
addChild(bg_image);
cloud_image.x = stage.stageWidth;
addChild(cloud_image);
cloud_small_image.x = stage.stageWidth;
addChild(cloud_small_image);
addChild(hills_image);
addChild(boat_image);
boat_image.x = -300;
sea_image2.x = -(sea_image.width);
addChild(sea_image);
addChild(sea_image2);
grass_image.y = (stage.stageHeight - grass_image.height);
addChild(grass_image);
addEventListener(Event.ENTER_FRAME, step);
visible = false;
}
public function step(_arg1:Event):void{
switch (Bomboozle.game_state){
default:
cloud_image.x--;
cloud_image.height = ((1 + (Math.sin(Logo.scenery_bounce_angle) / 16)) * cloud_image.bitmapData.height);
cloud_image.y = ((stage.stageHeight * 0.15) - (cloud_image.height / 2));
if (cloud_image.x < -(cloud_image.width)){
cloud_image.x = stage.stageWidth;
};
cloud_small_image.x = (cloud_small_image.x - 0.5);
cloud_small_image.height = ((1 + (Math.sin(Logo.scenery_bounce_angle) / 32)) * cloud_small_image.bitmapData.height);
cloud_small_image.y = ((stage.stageHeight * 0.4) - (cloud_small_image.height / 2));
if (cloud_small_image.x < -(cloud_small_image.width)){
cloud_small_image.x = stage.stageWidth;
};
hill_bounce_angle = (hill_bounce_angle + 0.2);
hills_image.height = ((1 + (Math.sin(Logo.scenery_bounce_angle) / 16)) * hills_image.bitmapData.height);
hills_image.y = ((stage.stageHeight * 0.77) - hills_image.height);
sea_image.x = (sea_image.x + 1);
sea_image2.x = (sea_image2.x + 1);
sea_image.y = (sea_image2.y = ((stage.stageHeight * 0.65) + ((1 + (Math.sin(Logo.scenery_bounce_angle) / 6)) * 32)));
if (sea_image.x >= sea_image.width){
sea_image.x = -(sea_image.width);
};
if (sea_image2.x >= sea_image2.width){
sea_image2.x = -(sea_image2.width);
};
if ((((((Bomboozle.groups_made >= (Bomboozle.NEW_COLOUR_CHAIN_THRESHOLD * 0.7))) || ((boat_image.x > 0)))) && ((boat_image.x < stage.stageWidth)))){
boat_image.x++;
boat_image.y = ((stage.stageHeight * 0.56) - ((1 + (Math.sin(Logo.scenery_bounce_angle) / 6)) * 32));
};
visible = true;
break;
case Bomboozle.GAME_STATE_PAUSED:
break;
};
}
}
}//package
Section 18
//Background_bg_class (Background_bg_class)
package {
import mx.core.*;
public class Background_bg_class extends BitmapAsset {
}
}//package
Section 19
//Background_boat_class (Background_boat_class)
package {
import mx.core.*;
public class Background_boat_class extends BitmapAsset {
}
}//package
Section 20
//Background_cloud_class (Background_cloud_class)
package {
import mx.core.*;
public class Background_cloud_class extends BitmapAsset {
}
}//package
Section 21
//Background_cloud_small_class (Background_cloud_small_class)
package {
import mx.core.*;
public class Background_cloud_small_class extends BitmapAsset {
}
}//package
Section 22
//Background_grass_class (Background_grass_class)
package {
import mx.core.*;
public class Background_grass_class extends BitmapAsset {
}
}//package
Section 23
//Background_hills_class (Background_hills_class)
package {
import mx.core.*;
public class Background_hills_class extends BitmapAsset {
}
}//package
Section 24
//Background_sea_class (Background_sea_class)
package {
import mx.core.*;
public class Background_sea_class extends BitmapAsset {
}
}//package
Section 25
//BitmapText (BitmapText)
package {
import flash.display.*;
import flash.geom.*;
public class BitmapText extends Sprite {
private var bonus_numbers_class:Class;
private var time_bubble_class:Class;
private var score_numbers_class:Class;
private var time_numbers_class:Class;
public static const TIME_FONT:int = 2;
public static const BONUS_FONT:int = 1;
public static const SCORE_FONT:int = 0;
public static var score_numbers_image:Bitmap;
public static var bonus_numbers_image:Bitmap;
public static var time_bubble_bitmap:BitmapData;
public static var score_numbers_bitmap:BitmapData;
public static var font_width:int;
public static var font_height:int;
public static var time_bubble_image:Bitmap;
public static var bonus_numbers_bitmap:BitmapData;
public static var _mtx:Matrix = new Matrix();
public static var time_numbers_image:Bitmap;
public static var time_numbers_bitmap:BitmapData;
public function BitmapText(){
score_numbers_class = BitmapText_score_numbers_class;
bonus_numbers_class = BitmapText_bonus_numbers_class;
time_numbers_class = BitmapText_time_numbers_class;
time_bubble_class = BitmapText_time_bubble_class;
super();
}
public function init():void{
mouseEnabled = false;
score_numbers_image = new score_numbers_class();
bonus_numbers_image = new bonus_numbers_class();
time_numbers_image = new time_numbers_class();
time_bubble_image = new time_bubble_class();
font_width = score_numbers_image.width;
font_height = (score_numbers_image.height / 10);
score_numbers_bitmap = new BitmapData(score_numbers_image.width, score_numbers_image.height, false);
score_numbers_bitmap.draw(score_numbers_image, new Matrix());
bonus_numbers_bitmap = new BitmapData(bonus_numbers_image.width, bonus_numbers_image.height, false);
bonus_numbers_bitmap.draw(bonus_numbers_image, new Matrix());
time_numbers_bitmap = new BitmapData(time_numbers_image.width, time_numbers_image.height, false);
time_numbers_bitmap.draw(time_numbers_image, new Matrix());
time_bubble_bitmap = new BitmapData(time_bubble_image.width, time_bubble_image.height, true, 0xFFFFFF);
time_bubble_bitmap.draw(time_bubble_image, new Matrix());
}
public static function drawNumber(_arg1:Graphics, _arg2:int, _arg3:int, _arg4:int, _arg5:String, _arg6:int):void{
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:*;
if (_arg6 == TIME_FONT){
_mtx = new Matrix();
_mtx.translate((_arg3 - 47), (_arg4 - 30));
_arg1.beginBitmapFill(time_bubble_bitmap, _mtx, false, false);
_arg1.drawRect((_arg3 - 47), (_arg4 - 30), time_bubble_bitmap.width, time_bubble_bitmap.height);
};
_local7 = 0;
_local8 = _arg2.toString().length;
_local9 = _local8;
if (_arg5 == "centred"){
_arg3 = (_arg3 + ((_local8 * font_width) / 2));
} else {
if (_arg5 == "left"){
_arg3 = (_arg3 + (_local8 * font_width));
};
};
do {
_local7 = (_local7 * 10);
_local7 = (_local7 + (_arg2 % 10));
_arg2 = (_arg2 / 10);
--_local9;
} while (_local9 > 0);
_local9 = _local8;
do {
_local10 = (_local7 % 10);
_mtx = new Matrix();
_mtx.translate((_arg3 - (_local9 * font_width)), (_arg4 - (_local10 * font_height)));
_arg1.beginBitmapFill(((_arg6 == SCORE_FONT)) ? score_numbers_bitmap : ((_arg6 == BONUS_FONT)) ? bonus_numbers_bitmap : time_numbers_bitmap, _mtx, false, false);
_arg1.drawRect((_arg3 - (_local9 * font_width)), _arg4, font_width, font_height);
_local7 = (_local7 / 10);
--_local9;
} while (_local9 > 0);
_arg1.endFill();
}
}
}//package
Section 26
//BitmapText_bonus_numbers_class (BitmapText_bonus_numbers_class)
package {
import mx.core.*;
public class BitmapText_bonus_numbers_class extends BitmapAsset {
}
}//package
Section 27
//BitmapText_score_numbers_class (BitmapText_score_numbers_class)
package {
import mx.core.*;
public class BitmapText_score_numbers_class extends BitmapAsset {
}
}//package
Section 28
//BitmapText_time_bubble_class (BitmapText_time_bubble_class)
package {
import mx.core.*;
public class BitmapText_time_bubble_class extends BitmapAsset {
}
}//package
Section 29
//BitmapText_time_numbers_class (BitmapText_time_numbers_class)
package {
import mx.core.*;
public class BitmapText_time_numbers_class extends BitmapAsset {
}
}//package
Section 30
//Blocks (Blocks)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public dynamic class Blocks extends Sprite {
private var blob_red_image:Bitmap;
private var blob_blue_bitmap:BitmapData;
private var blobs_surprised_bitmap:BitmapData;
private var blob_wildcard_image_class:Class;
private var blob_yellow_image:Bitmap;
private var marker_skull_bitmap:BitmapData;
private var blob_yellow_bitmap:BitmapData;
private var blobs_surprised_image_class:Class;
private var blob_yellow_image_class:Class;
private var blob_red_image_class:Class;
private var blob_blue_image:Bitmap;
private var blob_skull_image:Bitmap;
private var blob_green_image_class:Class;
private var blob_bomb_image:Bitmap;
private var blob_green_bitmap:BitmapData;
private var marker_skull_image:Bitmap;
private var blob_purple_image_class:Class;
private var blob_skull_image_class:Class;
private var blob_blue_image_class:Class;
private var blob_green_image:Bitmap;
private var blob_red_bitmap:BitmapData;
private var blob_wildcard_image:Bitmap;
private var blob_wildcard_bitmap:BitmapData;
private var hint_arrow_image_class:Class;
private var blob_purple_image:Bitmap;
private var board_bitmap:BitmapData;
private var blob_skull_bitmap:BitmapData;
private var marker_bomb_image:Bitmap;
private var board_image_class:Class;
private var board_image:Bitmap;
private var blob_bomb_bitmap:BitmapData;
private var blob_bomb_image_class:Class;
private var marker_bomb_image_class:Class;
private var marker_skull_image_class:Class;
private var marker_bomb_bitmap:BitmapData;
private var blob_purple_bitmap:BitmapData;
public var _mtx:Matrix;
private var blobs_surprised_image:Bitmap;
public static const BLOB_BOMB:int = 7;
public static const BLOB_SKULL:int = 5;
public static const BOARD_X:int = 40;
public static const COLOR_ARRAY:Array = [15415321, 16567302, 3715912, 112577, 7951521, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF];
public static const BLOB_WILDCARD:int = 6;
public static const BOARD_COLUMNS:int = 7;
public static const BLOB_SIZE:int = 40;
public static const BOARD_START_XO:int = -640;
public static const BOARD_CELLS:int = 77;
public static const BLOB_GRAVITY:Number = 1;
public static const FALL_DELAY:int = 10;
public static const PATH_CHECK_X:Array = [-1, -2, 0, 0, 1, 2, 0, 0, -1, -1, 0, -1, 1, 1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1];
public static const PATH_CHECK_Y:Array = [0, 0, -1, -2, 0, 0, 1, 2, 0, 1, -1, -1, 0, -1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1];
public static const BOARD_ROWS:int = 12;
public static const BOARD_HEIGHT:int = 440;
public static const BOARD_WIDTH:int = 280;
public static const BOMB_THRESHOLD:int = 6;
public static var blobs_in_line:int;
public static var cursor_active:Boolean = false;
public static var line_colour_index:int;
public static var BOARD_Y:int;
public static var hint_bounce_angle:Number = 0;
public static var blob_explosion_x:Array = new Array(BOARD_CELLS);
public static var blob_explosion_y:Array = new Array(BOARD_CELLS);
public static var mouse_column:int;
public static var mouse_row:int;
public static var marker_bounce_angle:Number = 0;
public static var grid:Array = new Array();
public static var cursor_column:int;
public static var cursor_row:int;
public static var ticks:int = 0;
public static var hint_timer:int;
public static var waiting_for_blobs_to_settle:Boolean;
public static var blob_gravity:Array = new Array();
public static var bomb_explosion:Array = new Array();
public static var prev_mouse_blob_x:int;
public static var prev_mouse_blob_y:int;
public static var fall_delay:int;
public static var hint_y:int;
public static var longest_chain:int = 0;
public static var hint_x:int;
public static var blob_counter_x:Number;
public static var blob_counter_y:Number;
public static var blobs_exploding:Boolean;
public static var hint_arrow_bitmap:BitmapData;
public static var blob_explosions:int = 0;
public static var blobs_still_falling:Boolean;
public static var hint_arrow_image:Bitmap;
public static var blob_lit:Array = new Array();
public static var board_xo:int;
public static var blob_yo:Array = new Array();
public static var blob_explosion_timer:int;
public function Blocks(_arg1:Stage){
marker_skull_image_class = Blocks_marker_skull_image_class;
marker_bomb_image_class = Blocks_marker_bomb_image_class;
hint_arrow_image_class = Blocks_hint_arrow_image_class;
board_image_class = Blocks_board_image_class;
blob_red_image_class = Blocks_blob_red_image_class;
blob_yellow_image_class = Blocks_blob_yellow_image_class;
blob_green_image_class = Blocks_blob_green_image_class;
blob_blue_image_class = Blocks_blob_blue_image_class;
blob_purple_image_class = Blocks_blob_purple_image_class;
blob_wildcard_image_class = Blocks_blob_wildcard_image_class;
blob_bomb_image_class = Blocks_blob_bomb_image_class;
blob_skull_image_class = Blocks_blob_skull_image_class;
blobs_surprised_image_class = Blocks_blobs_surprised_image_class;
_mtx = new Matrix();
super();
board_image = new board_image_class();
marker_skull_image = new marker_skull_image_class();
marker_bomb_image = new marker_bomb_image_class();
hint_arrow_image = new hint_arrow_image_class();
blob_red_image = new blob_red_image_class();
blob_yellow_image = new blob_yellow_image_class();
blob_green_image = new blob_green_image_class();
blob_blue_image = new blob_blue_image_class();
blob_purple_image = new blob_purple_image_class();
blob_wildcard_image = new blob_wildcard_image_class();
blob_bomb_image = new blob_bomb_image_class();
blob_skull_image = new blob_skull_image_class();
blobs_surprised_image = new blobs_surprised_image_class();
BOARD_Y = ((_arg1.stageHeight - BOARD_HEIGHT) >> 1);
init();
}
public function drawBlob(_arg1:Boolean, _arg2:Boolean, _arg3:int, _arg4:Number, _arg5:Number):void{
_mtx = new Matrix();
if (((_arg2) && (blobs_exploding))){
_mtx.translate((_arg4 - (_arg3 * BLOB_SIZE)), _arg5);
graphics.beginBitmapFill(blobs_surprised_bitmap, _mtx, false, false);
} else {
_mtx.translate(_arg4, _arg5);
switch (_arg3){
case BLOB_WILDCARD:
graphics.beginBitmapFill(blob_wildcard_bitmap, _mtx, false, false);
break;
case BLOB_BOMB:
graphics.beginBitmapFill(blob_bomb_bitmap, _mtx, false, false);
break;
case 0:
graphics.beginBitmapFill(blob_red_bitmap, _mtx, false, false);
break;
case 1:
graphics.beginBitmapFill(blob_yellow_bitmap, _mtx, false, false);
break;
case 2:
graphics.beginBitmapFill(blob_green_bitmap, _mtx, false, false);
break;
case 3:
graphics.beginBitmapFill(blob_blue_bitmap, _mtx, false, false);
break;
case 4:
graphics.beginBitmapFill(blob_purple_bitmap, _mtx, false, false);
break;
case 5:
graphics.beginBitmapFill(blob_skull_bitmap, _mtx, false, false);
break;
};
};
graphics.drawRect(_arg4, Math.max(_arg5, BOARD_Y), BLOB_SIZE, (BLOB_SIZE - ((_arg5 < BOARD_Y)) ? (BOARD_Y - _arg5) : 0));
graphics.endFill();
if (((((!(blobs_exploding)) && (_arg2))) && (((ticks % 8) < 4)))){
graphics.beginFill(0xFFFFFF, 0.7);
graphics.drawRect(_arg4, _arg5, BLOB_SIZE, BLOB_SIZE);
};
}
public function init():void{
line_colour_index = -1;
blobs_in_line = 0;
board_xo = BOARD_START_XO;
board_bitmap = new BitmapData(board_image.width, board_image.height, true, 0xFFFFFF);
board_bitmap.draw(board_image, new Matrix());
marker_bomb_bitmap = new BitmapData(marker_bomb_image.width, marker_bomb_image.height, true, 0xFFFFFF);
marker_bomb_bitmap.draw(marker_bomb_image, new Matrix());
marker_skull_bitmap = new BitmapData(marker_skull_image.width, marker_skull_image.height, true, 0xFFFFFF);
marker_skull_bitmap.draw(marker_skull_image, new Matrix());
hint_arrow_bitmap = new BitmapData(hint_arrow_image.width, hint_arrow_image.height, true, 0xFFFFFF);
hint_arrow_bitmap.draw(hint_arrow_image, new Matrix());
blob_red_bitmap = new BitmapData(BLOB_SIZE, BLOB_SIZE);
blob_red_bitmap.draw(blob_red_image, new Matrix());
blob_yellow_bitmap = new BitmapData(BLOB_SIZE, BLOB_SIZE);
blob_yellow_bitmap.draw(blob_yellow_image, new Matrix());
blob_green_bitmap = new BitmapData(BLOB_SIZE, BLOB_SIZE);
blob_green_bitmap.draw(blob_green_image, new Matrix());
blob_blue_bitmap = new BitmapData(BLOB_SIZE, BLOB_SIZE);
blob_blue_bitmap.draw(blob_blue_image, new Matrix());
blob_purple_bitmap = new BitmapData(BLOB_SIZE, BLOB_SIZE);
blob_purple_bitmap.draw(blob_purple_image, new Matrix());
blob_wildcard_bitmap = new BitmapData(BLOB_SIZE, BLOB_SIZE);
blob_wildcard_bitmap.draw(blob_wildcard_image, new Matrix());
blob_bomb_bitmap = new BitmapData(BLOB_SIZE, BLOB_SIZE);
blob_bomb_bitmap.draw(blob_bomb_image, new Matrix());
blob_skull_bitmap = new BitmapData(BLOB_SIZE, BLOB_SIZE);
blob_skull_bitmap.draw(blob_skull_image, new Matrix());
blobs_surprised_bitmap = new BitmapData(blobs_surprised_image.width, BLOB_SIZE);
blobs_surprised_bitmap.draw(blobs_surprised_image, new Matrix());
blobs_still_falling = false;
waiting_for_blobs_to_settle = false;
addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
addEventListener(MouseEvent.MOUSE_UP, mouseUp);
addEventListener(Event.ENTER_FRAME, step);
addEventListener(Event.ENTER_FRAME, drawBoard);
addEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
}
public function mouseDown(_arg1:MouseEvent):void{
trace("******** MOUSE DOWN *********");
switch (Bomboozle.game_state){
case Bomboozle.GAME_STATE_GAME:
if ((((((fall_delay <= 0)) && (!(blobs_still_falling)))) && (!(blobs_exploding)))){
if (cursor_active){
finishLine();
} else {
if (mouseIsOnBoard()){
blob_counter_x = mouseX;
blob_counter_y = mouseY;
switch (grid[getColumn(mouseX)][getRow(mouseY)]){
case BLOB_BOMB:
PlaySample.playSound(PlaySample.SOUND_BOMB_EXPLOSION, 0);
detonateBomb(getColumn(mouseX), getRow(mouseY));
setBlobsToFall(true, mouseX, mouseY);
break;
default:
addTileToChain(getColumn(mouseX), getRow(mouseY));
break;
};
};
};
};
break;
};
}
public function drawBoard(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:Number;
var _local8:int;
var _local9:Number;
var _local10:Number;
var _local11:Number;
switch (Bomboozle.game_state){
case Bomboozle.GAME_STATE_GAME:
case Bomboozle.GAME_STATE_PAUSED:
case Bomboozle.GAME_STATE_OVER:
_local2 = (board_xo + BOARD_X);
graphics.clear();
_local3 = ((_local2 + ((BOARD_COLUMNS * BLOB_SIZE) >> 1)) - (board_image.width >> 1));
_local4 = ((stage.stageHeight - board_image.height) >> 1);
_mtx = new Matrix();
_mtx.translate(_local3, _local4);
graphics.beginBitmapFill(board_bitmap, _mtx, false, false);
graphics.drawRect(_local3, _local4, board_image.width, board_image.height);
graphics.endFill();
if ((((Bomboozle.game_state == Bomboozle.GAME_STATE_PAUSED)) && ((Bomboozle.game_type == Bomboozle.GAME_TYPE_TIMED)))){
} else {
_local5 = 0;
while (_local5 < BOARD_COLUMNS) {
_local6 = (BOARD_ROWS - 1);
while (_local6 >= 0) {
if (grid[_local5][_local6] != -1){
_local7 = ((BOARD_Y + ((_local6 - 1) * BLOB_SIZE)) + blob_yo[_local5][_local6]);
if (blob_yo[_local5][_local6] >= BLOB_SIZE){
_local7 = (_local7 - (blob_yo[_local5][_local6] % BLOB_SIZE));
};
drawBlob((((_local5 == cursor_column)) && ((_local6 == cursor_row))), (blob_lit[_local5][_local6] > 0), grid[_local5][_local6], (_local2 + (_local5 * BLOB_SIZE)), _local7);
};
_local6--;
};
_local5++;
};
graphics.endFill();
_local5 = 0;
while (_local5 < BOARD_COLUMNS) {
_local6 = 1;
while (_local6 < BOARD_ROWS) {
if (bomb_explosion[_local5][_local6] != -1){
Explosion.drawExplosion(graphics, bomb_explosion[_local5][_local6], ((BOARD_X + (_local5 * BLOB_SIZE)) + (BLOB_SIZE * 0.5)), ((BOARD_Y + ((_local6 - 1) * BLOB_SIZE)) + (BLOB_SIZE * 0.5)));
if ((ticks % 3) == 0){
var _local12 = bomb_explosion[_local5];
var _local13 = _local6;
var _local14 = (_local12[_local13] + 1);
_local12[_local13] = _local14;
if (_local14 >= Explosion.ANIM_FRAMES){
bomb_explosion[_local5][_local6] = -1;
};
};
};
_local6++;
};
_local5++;
};
};
if (cursor_active){
if ((((((Bomboozle.game_type == Bomboozle.GAME_TYPE_SKULL)) && ((blobs_in_line == 3)))) || ((blobs_in_line >= BOMB_THRESHOLD)))){
marker_bounce_angle = (marker_bounce_angle + 1);
_local8 = (((BOARD_X + (mouse_column * BLOB_SIZE)) + (BLOB_SIZE * 0.5)) - (marker_bomb_image.width / 2));
_local9 = ((BOARD_Y - marker_bomb_image.height) + ((Math.sin(marker_bounce_angle) / 16) * 32));
_mtx = new Matrix();
_mtx.translate(_local8, _local9);
graphics.beginBitmapFill(((blobs_in_line == 3)) ? marker_skull_bitmap : marker_bomb_bitmap, _mtx, false, false);
graphics.drawRect(_local8, _local9, marker_bomb_image.width, marker_bomb_image.height);
graphics.endFill();
};
};
if (((((!(cursor_active)) && ((Bomboozle.game_state == Bomboozle.GAME_STATE_GAME)))) && (!(waiting_for_blobs_to_settle)))){
if (++hint_timer > 150){
hint_timer = (-(Math.random()) * 50);
};
if (hint_timer > 100){
hint_bounce_angle = (hint_bounce_angle + 0.5);
_local10 = (hint_x - ((Math.sin(hint_bounce_angle) / 16) * 64));
_local11 = (hint_y - ((Math.sin(hint_bounce_angle) / 16) * 64));
_mtx = new Matrix();
_mtx.translate(_local10, _local11);
graphics.beginBitmapFill(hint_arrow_bitmap, _mtx, false, false);
graphics.drawRect(_local10, _local11, hint_arrow_image.width, hint_arrow_image.height);
graphics.endFill();
};
};
if (Bomboozle.game_type == Bomboozle.GAME_TYPE_TIMED){
BitmapText.drawNumber(graphics, Bomboozle.game_time, 570, 260, "centred", BitmapText.TIME_FONT);
};
break;
default:
break;
};
}
public function addTileToChain(_arg1:int, _arg2:int):void{
trace((((("addTileToChain(" + _arg1) + ", ") + _arg2) + ")"));
trace(("Math.abs(cursor_column - _column) + Math.abs(cursor_row - _row) = " + (Math.abs((cursor_column - _arg1)) + Math.abs((cursor_row - _arg2)))));
if ((((blobs_in_line > 0)) && (((Math.abs((cursor_column - _arg1)) + Math.abs((cursor_row - _arg2))) > 1)))){
cancelLine();
} else {
if (((((((((blobIsOnBoard(_arg1, _arg2)) && ((((blobs_in_line > 0)) || (tileIsWithinGroup(_arg1, _arg2, grid[_arg1][_arg2])))))) && ((((((grid[_arg1][_arg2] == line_colour_index)) || ((line_colour_index < 0)))) || ((grid[_arg1][_arg2] == BLOB_WILDCARD)))))) && ((blob_lit[_arg1][_arg2] < 1)))) && (!((grid[_arg1][_arg2] == -1))))){
if ((((line_colour_index < 0)) && (!((grid[_arg1][_arg2] == BLOB_WILDCARD))))){
line_colour_index = grid[_arg1][_arg2];
};
if ((((blobs_in_line < 1)) || (((Math.abs((cursor_column - _arg1)) + Math.abs((cursor_row - _arg2))) < 2)))){
trace("addTileToChain");
if (!cursor_active){
cursor_active = true;
Path.clear_path = true;
Path.prev_mouseX = mouseX;
Path.prev_mouseY = mouseY;
blob_explosions = 0;
PlaySample.playSound(PlaySample.SOUND_ACTIVATE, 0);
} else {
PlaySample.playSound(PlaySample.SOUND_ADD_BLOB, 0);
};
prev_mouse_blob_x = mouseX;
prev_mouse_blob_y = mouseY;
blob_lit[_arg1][_arg2] = 1;
cursor_column = _arg1;
cursor_row = _arg2;
blobs_in_line++;
if (blobs_in_line > longest_chain){
longest_chain = blobs_in_line;
};
blob_explosion_x[blob_explosions] = _arg1;
blob_explosion_y[blob_explosions] = _arg2;
blob_explosions++;
};
} else {
cancelLine();
};
};
}
public function mouseMove(_arg1:MouseEvent):void{
hint_timer = 0;
}
public function finishLine():void{
if (cursor_active){
if (blobs_in_line > 2){
Path.clear_path = true;
addBlob(getColumn(mouseX), 0, (((blobs_in_line == 3)) && ((Bomboozle.game_type == Bomboozle.GAME_TYPE_SKULL))), (blobs_in_line >= BOMB_THRESHOLD));
blobs_exploding = true;
cursor_active = false;
if (blobs_in_line > 9){
CharacterAnim.next_pose = CharacterAnim.POSE_ECSTATIC;
} else {
if (blobs_in_line > 5){
CharacterAnim.next_pose = CharacterAnim.POSE_VERY_HAPPY;
} else {
if ((((blobs_in_line == 3)) && ((Math.random() < 0.5)))){
CharacterAnim.next_pose = CharacterAnim.POSE_BORED;
};
};
};
} else {
cancelLine();
};
};
hint_timer = 0;
}
public function getColumn(_arg1:int):int{
return (((_arg1 - BOARD_X) / BLOB_SIZE));
}
public function cancelLine():void{
var _local1:int;
var _local2:int;
PlaySample.playSound(PlaySample.SOUND_DEACTIVATE, 0);
_local1 = 0;
while (_local1 < BOARD_COLUMNS) {
_local2 = 0;
while (_local2 < BOARD_ROWS) {
blob_lit[_local1][_local2] = 0;
_local2++;
};
_local1++;
};
blobs_in_line = 0;
line_colour_index = -1;
cursor_active = false;
Path.clear_path = true;
}
public function mouseIsOnBoard():Boolean{
if ((((((((mouseX < BOARD_X)) || ((mouseX >= (BOARD_X + BOARD_WIDTH))))) || ((mouseY < BOARD_Y)))) || ((mouseY >= (BOARD_Y + BOARD_HEIGHT))))){
return (false);
};
return (true);
}
public function getRow(_arg1:int):int{
return ((((_arg1 - BOARD_Y) / BLOB_SIZE) + 1));
}
public function step(_arg1:Event):void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
ticks++;
switch (Bomboozle.game_state){
case Bomboozle.GAME_STATE_OVER:
break;
case Bomboozle.GAME_STATE_GAME:
if (blobs_exploding){
if (--blob_explosion_timer < 0){
blob_explosion_timer = 2;
PlaySample.playSound(PlaySample.SOUND_BLOB_EXPLOSION, 0);
_local2 = blob_explosion_x[(blob_explosions - 1)];
_local3 = blob_explosion_y[(blob_explosions - 1)];
_local4 = ((BOARD_X + (_local2 * BLOB_SIZE)) + (BLOB_SIZE * 0.5));
_local5 = ((BOARD_Y + ((_local3 - 1) * BLOB_SIZE)) + (BLOB_SIZE * 0.5));
Path.placeFlash(_local4, _local5);
ParticleManager.getInstance().createParticle(8, {xpos:_local4, ypos:_local5}, line_colour_index);
grid[_local2][_local3] = -1;
if (--blob_explosions <= 0){
blobs_exploding = false;
setBlobsToFall(false, _local4, _local5);
};
};
};
if (Bomboozle.game_type == Bomboozle.GAME_TYPE_TIMED){
if (!LargeText.go_image.visible){
if (((((ticks % 10) == 0)) && ((--Bomboozle.game_time == 0)))){
cancelLine();
Bomboozle.game_state = Bomboozle.GAME_STATE_OVER;
};
};
};
if (board_xo < 0){
board_xo = (board_xo - (board_xo / 6));
};
mouse_column = ((mouseX - BOARD_X) / BLOB_SIZE);
mouse_row = (((mouseY - BOARD_Y) / BLOB_SIZE) + 1);
if (fall_delay > 0){
fall_delay--;
} else {
if (cursor_active){
blob_counter_x = (blob_counter_x + ((mouseX - blob_counter_x) / 4));
blob_counter_y = (blob_counter_y + ((mouseY - blob_counter_y) / 4));
if (!mouseIsOnBoard()){
cancelLine();
} else {
if (((!((mouse_column == cursor_column))) || (!((mouse_row == cursor_row))))){
addTileToChain(mouse_column, mouse_row);
};
};
};
if (waiting_for_blobs_to_settle){
blobs_still_falling = false;
_local2 = 0;
while (_local2 < BOARD_COLUMNS) {
_local3 = (BOARD_ROWS - 1);
while (_local3 >= 0) {
if (grid[_local2][_local3] != -1){
if (blob_gravity[_local2][_local3] != 0){
blobs_still_falling = true;
if (blob_gravity[_local2][_local3] < BLOB_SIZE){
blob_gravity[_local2][_local3] = (blob_gravity[_local2][_local3] + BLOB_GRAVITY);
};
blob_yo[_local2][_local3] = (blob_yo[_local2][_local3] + blob_gravity[_local2][_local3]);
if (blob_yo[_local2][_local3] >= BLOB_SIZE){
grid[_local2][(_local3 + 1)] = grid[_local2][_local3];
grid[_local2][_local3] = -1;
blob_gravity[_local2][(_local3 + 1)] = blob_gravity[_local2][_local3];
blob_yo[_local2][_local3] = 0;
blob_yo[_local2][(_local3 + 1)] = 0;
if ((((_local3 == (BOARD_ROWS - 2))) || ((((grid[_local2][(_local3 + 2)] > -1)) && ((blob_gravity[_local2][(_local3 + 2)] == 0)))))){
blob_gravity[_local2][_local3] = 0;
blob_gravity[_local2][(_local3 + 1)] = 0;
};
if (_local3 == 0){
addBlob(_local2, _local3, false, false);
};
};
};
};
_local3--;
};
_local2++;
};
if (!blobs_still_falling){
waiting_for_blobs_to_settle = false;
blobs_in_line = 0;
line_colour_index = -1;
checkForGameOver();
};
};
};
break;
default:
graphics.clear();
break;
};
}
public function mouseUp(_arg1:MouseEvent):void{
if (((cursor_active) && ((blobs_in_line > 1)))){
finishLine();
};
}
public function detonateBomb(_arg1:int, _arg2:int):void{
var _local3:int;
var _local4:int;
var _local5:int;
bomb_explosion[_arg1][_arg2] = 0;
_local3 = -2;
while (_local3 <= 2) {
_local4 = (2 - ((_local3)<0) ? -(_local3) : _local3);
_local5 = -(_local4);
while (_local5 <= _local4) {
if (((((((!((_local5 == _arg1))) || (!((_local3 == _arg2))))) && (blobIsOnBoard((_local5 + _arg1), (_local3 + _arg2))))) && ((blob_lit[(_local5 + _arg1)][(_local3 + _arg2)] == 0)))){
blob_lit[(_local5 + _arg1)][(_local3 + _arg2)] = 1;
if (grid[(_local5 + _arg1)][(_local3 + _arg2)] == BLOB_BOMB){
detonateBomb((_local5 + _arg1), (_local3 + _arg2));
};
};
_local5++;
};
_local3++;
};
}
public function setBlobsToFall(_arg1:Boolean, _arg2:int, _arg3:int):void{
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
_local4 = 0;
_local5 = 0;
while (_local5 < BOARD_COLUMNS) {
_local6 = 0;
while (_local6 < BOARD_ROWS) {
if (blob_lit[_local5][_local6] > 0){
_local4++;
if (_arg1){
ParticleManager.getInstance().createParticle(4, {xpos:((BOARD_X + (_local5 * BLOB_SIZE)) + (BLOB_SIZE * 0.5)), ypos:((BOARD_Y + ((_local6 - 1) * BLOB_SIZE)) + (BLOB_SIZE * 0.5))}, grid[_local5][_local6]);
};
blob_lit[_local5][_local6] = 0;
grid[_local5][_local6] = -1;
_local7 = _local6;
while (_local7 >= 0) {
blob_gravity[_local5][_local7] = 1E-13;
_local7--;
};
};
_local6++;
};
_local5++;
};
if (blobs_in_line > 2){
Bomboozle.bonus = ((blobs_in_line * blobs_in_line) * 50);
} else {
Bomboozle.bonus = ((_local4 * _local4) * 10);
};
Bomboozle.score = (Bomboozle.score + Bomboozle.bonus);
if (Bomboozle.score > Bomboozle.hiscore[Bomboozle.game_type]){
Bomboozle.hiscore[Bomboozle.game_type] = Bomboozle.score;
};
waiting_for_blobs_to_settle = true;
blobs_still_falling = true;
fall_delay = FALL_DELAY;
cursor_active = false;
Bomboozle.groups_made++;
BonusText.init(Bomboozle.bonus, _arg2, _arg3);
}
public static function tileIsWithinGroup(_arg1:int, _arg2:int, _arg3:int):Boolean{
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
_local4 = 1;
switch (grid[_arg1][_arg2]){
case BLOB_WILDCARD:
_local4 = 6;
break;
case -1:
return (false);
};
_local5 = 0;
while (_local5 <= _local4) {
if (_local4 > 1){
_arg3 = _local5;
};
_local6 = 0;
while (_local6 <= 22) {
_local7 = 1;
_local8 = 0;
while (_local8 < 2) {
_local9 = (_arg1 + PATH_CHECK_X[(_local6 + _local8)]);
_local10 = (_arg2 + PATH_CHECK_Y[(_local6 + _local8)]);
if (((blobIsOnBoard(_local9, _local10)) && ((blob_lit[_local9][_local10] < 1)))){
_local11 = grid[_local9][_local10];
if ((((_local11 == _arg3)) || ((_local11 == BLOB_WILDCARD)))){
++_local7;
if (_local7 > 2){
return (true);
};
} else {
_local8 = 99;
};
};
_local8++;
};
_local6 = (_local6 + 2);
};
_local5++;
};
return (false);
}
public static function blobIsOnBoard(_arg1:int, _arg2:int):Boolean{
if ((((((((_arg1 < 0)) || ((_arg1 >= BOARD_COLUMNS)))) || ((_arg2 < 1)))) || ((_arg2 >= BOARD_ROWS)))){
return (false);
};
return (true);
}
public static function checkForGameOver():void{
var _local1:int;
var _local2:int;
Bomboozle.groups_left = 0;
_local1 = 0;
while (_local1 < BOARD_COLUMNS) {
_local2 = 1;
while (_local2 < BOARD_ROWS) {
if ((((grid[_local1][_local2] == BLOB_BOMB)) || (tileIsWithinGroup(_local1, _local2, grid[_local1][_local2])))){
hint_x = ((BOARD_X + (_local1 * BLOB_SIZE)) - hint_arrow_image.width);
hint_y = ((BOARD_Y + ((_local2 - 1) * BLOB_SIZE)) - hint_arrow_image.height);
if (++Bomboozle.groups_left > 4){
_local2 = 99;
_local1 = _local2;
};
};
_local2++;
};
_local1++;
};
if (Bomboozle.groups_left == 0){
Bomboozle.game_state = Bomboozle.GAME_STATE_OVER;
};
}
public static function addBlob(_arg1:int, _arg2:int, _arg3:Boolean, _arg4:Boolean):void{
var _local5:int;
_local5 = -1;
if (_arg3){
_local5 = BLOB_SKULL;
PlaySample.playSound(PlaySample.SOUND_SKULL_DROP, 0);
} else {
if (_arg4){
_local5 = BLOB_BOMB;
PlaySample.playSound(PlaySample.SOUND_BOMB_AWARDED, 0);
};
};
if (_local5 == -1){
if ((((((Bomboozle.game_type == Bomboozle.GAME_TYPE_INFINITE)) && ((Bomboozle.groups_made > 100)))) && ((Math.random() < (Bomboozle.groups_made / 5000))))){
_local5 = BLOB_SKULL;
} else {
if (Math.random() < 0.02){
_local5 = BLOB_WILDCARD;
} else {
if (Bomboozle.groups_made >= Bomboozle.NEW_COLOUR_CHAIN_THRESHOLD){
Bomboozle.tile_limit = 4;
} else {
Bomboozle.tile_limit = 3;
};
_local5 = Math.round((Math.random() * Bomboozle.tile_limit));
};
};
};
grid[_arg1][_arg2] = _local5;
}
}
}//package
Section 31
//Blocks_blob_blue_image_class (Blocks_blob_blue_image_class)
package {
import mx.core.*;
public class Blocks_blob_blue_image_class extends BitmapAsset {
}
}//package
Section 32
//Blocks_blob_bomb_image_class (Blocks_blob_bomb_image_class)
package {
import mx.core.*;
public class Blocks_blob_bomb_image_class extends BitmapAsset {
}
}//package
Section 33
//Blocks_blob_green_image_class (Blocks_blob_green_image_class)
package {
import mx.core.*;
public class Blocks_blob_green_image_class extends BitmapAsset {
}
}//package
Section 34
//Blocks_blob_purple_image_class (Blocks_blob_purple_image_class)
package {
import mx.core.*;
public class Blocks_blob_purple_image_class extends BitmapAsset {
}
}//package
Section 35
//Blocks_blob_red_image_class (Blocks_blob_red_image_class)
package {
import mx.core.*;
public class Blocks_blob_red_image_class extends BitmapAsset {
}
}//package
Section 36
//Blocks_blob_skull_image_class (Blocks_blob_skull_image_class)
package {
import mx.core.*;
public class Blocks_blob_skull_image_class extends BitmapAsset {
}
}//package
Section 37
//Blocks_blob_wildcard_image_class (Blocks_blob_wildcard_image_class)
package {
import mx.core.*;
public class Blocks_blob_wildcard_image_class extends BitmapAsset {
}
}//package
Section 38
//Blocks_blob_yellow_image_class (Blocks_blob_yellow_image_class)
package {
import mx.core.*;
public class Blocks_blob_yellow_image_class extends BitmapAsset {
}
}//package
Section 39
//Blocks_blobs_surprised_image_class (Blocks_blobs_surprised_image_class)
package {
import mx.core.*;
public class Blocks_blobs_surprised_image_class extends BitmapAsset {
}
}//package
Section 40
//Blocks_board_image_class (Blocks_board_image_class)
package {
import mx.core.*;
public class Blocks_board_image_class extends BitmapAsset {
}
}//package
Section 41
//Blocks_hint_arrow_image_class (Blocks_hint_arrow_image_class)
package {
import mx.core.*;
public class Blocks_hint_arrow_image_class extends BitmapAsset {
}
}//package
Section 42
//Blocks_marker_bomb_image_class (Blocks_marker_bomb_image_class)
package {
import mx.core.*;
public class Blocks_marker_bomb_image_class extends BitmapAsset {
}
}//package
Section 43
//Blocks_marker_skull_image_class (Blocks_marker_skull_image_class)
package {
import mx.core.*;
public class Blocks_marker_skull_image_class extends BitmapAsset {
}
}//package
Section 44
//Bomboozle (Bomboozle)
package {
import flash.events.*;
import flash.display.*;
import mochi.*;
import flash.net.*;
import flash.ui.*;
public dynamic class Bomboozle extends MovieClip {
public static const GAME_STATE_SUBMIT_SCORE:int = 9;
public static const TUTORIAL_PAGES:int = 5;
public static const GAME_MODE_STRINGS:Array = ["Infinite", "Timed", "Skull"];
public static const GAME_STATE_SHOW_MOCHIAD:int = -2;
public static const game_ID:String = "526e0978452effb3";
public static const USE_EXTERNAL_AUDIO:Boolean = false;
public static const GAME_STATE_TITLE:int = 1;
public static const GAME_STATE_CREDITS:int = 7;
public static const GAME_STATE_OPTIONS:int = 4;
public static const FADE_SPEED:Number = 0.1;
public static const MOCHIADS_VERSION:Boolean = true;
public static const SKULL_CHAIN_THRESHOLD:int = 100;
public static const GAME_STATE_DEV_LOGO:int = -1;
public static const GAME_TYPE_TIMED:int = 1;
public static const GAME_STATE_OVER:int = 5;
public static const MOCHIADS_HISCORES:Boolean = true;
public static const KONGREGATE_VERSION:Boolean = false;
public static const GAME_STATE_SCOREBOARD:int = 6;
public static const GAME_STATE_TUTORIAL:int = 11;
public static const MINDJOLT_VERSION:Boolean = false;
public static const GAME_TYPE_SKULL:int = 2;
public static const SCREEN_BORDER:int = 16;
public static const ICON_GRAVITY:int = 2;
public static const GAME_STATE_PAUSED:int = 8;
public static const GAME_TYPE_INFINITE:int = 0;
public static const GAME_STATE_GAME:int = 3;
public static const GAME_STATE_CHOOSE_LEADERBOARD:int = 10;
public static const NEW_COLOUR_CHAIN_THRESHOLD:int = 30;
public static const leaderboard_IDs:Array = ["c100960b3cc2a2f1", "2887fb4675b7bb15", "fac77ac486436640"];
public static const GAME_STATE_SELECT_GAME:int = 2;
public static var game_time:int;
public static var MindJoltAPI:Object;
public static var game_state:int = -1;
public static var score:int;
public static var music_volume:Number = 0.1;
public static var groups_left:int;
public static var groups_made:int;
public static var kongregate;
public static var bonus:int;
public static var hiscore:Array = [0, 0, 0];
public static var sound_volume:Number = 0.2;
public static var tutorial_page:int = 0;
public static var game_type:int;
public static var tile_limit:int;
public static var tutorial_has_been_viewed:Boolean = false;
public static var stage:Stage;
public function Bomboozle():void{
var _progressBar:ProgressBar;
var i:int;
var _soundPlayer:PlaySample;
var _bg:Background;
var _blocks:Blocks;
var _explosion:Explosion;
var _character_anim:CharacterAnim;
var _winged_box:WingedBox;
var _panel:Panel;
var _back_button:BackButton;
var _pause_button:PauseButton;
var _logo:Logo;
var _sparkle:Sparkle;
var _bitmap_text:BitmapText;
var _text_anim:LargeText;
var _path:Path;
var _bonus_text:BonusText;
var gameParams:Object;
var urlLoader:Loader;
var loadFinished:Function;
var paramObj:Object;
var api_url:String;
var request:URLRequest;
var loader:Loader;
var _tutorial:Tutorial;
var _menuIcon:MenuIcon;
var _Option:AddOption;
super();
if (MINDJOLT_VERSION){
loadFinished = function (_arg1:Event):void{
MindJoltAPI = _arg1.currentTarget.content;
MindJoltAPI.service.connect();
trace("[MindJoltAPI] service manually loaded");
};
gameParams = LoaderInfo(root.loaderInfo).parameters;
urlLoader = new Loader();
urlLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadFinished);
urlLoader.load(new URLRequest(((gameParams.mjPath) || ("http://static.mindjolt.com/api/as3/scoreapi_as3_local.swf"))));
this.addChild(urlLoader);
};
if (MOCHIADS_VERSION){
MochiServices.connect(game_ID, root);
};
if (KONGREGATE_VERSION){
paramObj = LoaderInfo(root.loaderInfo).parameters;
api_url = ((paramObj.api_path) || ("http://www.kongregate.com/flash/API_AS3_Local.swf"));
trace(("API path: " + api_url));
request = new URLRequest(api_url);
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
loader.load(request);
this.addChild(loader);
};
stage.scaleMode = "noScale";
stage.frameRate = 33;
_progressBar = new ProgressBar();
addChild(_progressBar);
i = 0;
initGame();
_soundPlayer = new PlaySample();
_bg = new Background();
addChild(_bg);
_bg.init();
_blocks = new Blocks(stage);
addChild(_blocks);
ParticleManager.getInstance().init(stage);
_explosion = new Explosion();
addChild(_explosion);
_explosion.init();
_character_anim = new CharacterAnim();
addChild(_character_anim);
_winged_box = new WingedBox();
addChild(_winged_box);
_winged_box.init();
_panel = new Panel();
addChild(_panel);
_panel.init();
_back_button = new BackButton();
addChild(_back_button);
_back_button.init();
_pause_button = new PauseButton();
addChild(_pause_button);
_pause_button.init();
i = 0;
while (i < 5) {
_tutorial = new Tutorial();
addChild(_tutorial);
_tutorial.init(i);
i = (i + 1);
};
i = 0;
while (i < (MOCHIADS_HISCORES) ? 4 : 3) {
_menuIcon = new MenuIcon();
addChild(_menuIcon);
_menuIcon.init(i, (MOCHIADS_HISCORES) ? 4 : 3, 0);
i = (i + 1);
};
i = 0;
while (i < 3) {
_menuIcon = new MenuIcon();
addChild(_menuIcon);
_menuIcon.init((i + 4), 3, 4);
i = (i + 1);
};
i = 0;
while (i < 1) {
_menuIcon = new MenuIcon();
addChild(_menuIcon);
_menuIcon.init((i + 7), 1, 7);
i = (i + 1);
};
i = 0;
while (i < 2) {
_menuIcon = new MenuIcon();
addChild(_menuIcon);
_menuIcon.init((i + 9), 2, 9);
i = (i + 1);
};
i = 0;
while (i < 2) {
_menuIcon = new MenuIcon();
addChild(_menuIcon);
_menuIcon.init((i + 11), 2, 11);
i = (i + 1);
};
i = 0;
while (i < 3) {
_menuIcon = new MenuIcon();
addChild(_menuIcon);
_menuIcon.init((i + 13), 3, 13);
i = (i + 1);
};
i = -1;
while (i < 2) {
_Option = new AddOption();
addChild(_Option);
_Option.init(i);
i = (i + 1);
};
_logo = new Logo();
addChild(_logo);
_sparkle = new Sparkle();
addChild(_sparkle);
_bitmap_text = new BitmapText();
addChild(_bitmap_text);
_bitmap_text.init();
_text_anim = new LargeText();
addChild(_text_anim);
_path = new Path();
addChild(_path);
_path.init();
_bonus_text = new BonusText();
addChild(_bonus_text);
if (MOCHIADS_VERSION){
showMochiAd();
};
}
public function mouseOver(_arg1:MouseEvent):void{
Mouse.hide();
}
public function loadComplete(_arg1:Event):void{
kongregate = _arg1.target.content;
kongregate.services.connect();
trace(("\n" + kongregate.services));
trace(("\n" + kongregate.user));
trace(("\n" + kongregate.scores));
trace(("\n" + kongregate.stats));
}
public function mouseOut(_arg1:MouseEvent):void{
Mouse.show();
}
public function showMochiAd():void{
try {
game_state = GAME_STATE_SHOW_MOCHIAD;
MochiAd.showPreGameAd({clip:root, id:game_ID, res:"640x520", background:3771466, color:16764432, outline:16764432, no_bg:true});
} catch(errObject:Error) {
trace(("Error: " + errObject.message));
};
}
public static function initGame():void{
}
public static function startGame():void{
var _local1:int;
var _local2:int;
tutorial_has_been_viewed = true;
game_state = GAME_STATE_GAME;
LargeText.init();
tile_limit = 3;
game_time = 999;
groups_made = 0;
score = 0;
Blocks.board_xo = Blocks.BOARD_START_XO;
Panel.panel_score_yo = (Panel.panel_hiscore_yo = (Panel.panel_chains_yo = -600));
BonusText.bonus_text_y = -100;
Background.boat_image.x = -300;
CharacterAnim.next_pose = CharacterAnim.POSE_HAPPY;
_local1 = 0;
while (_local1 < Blocks.BOARD_COLUMNS) {
Blocks.bomb_explosion[_local1] = new Array();
Blocks.grid[_local1] = new Array();
Blocks.blob_gravity[_local1] = new Array();
Blocks.blob_yo[_local1] = new Array();
Blocks.blob_lit[_local1] = new Array();
_local2 = 0;
while (_local2 < Blocks.BOARD_ROWS) {
Blocks.bomb_explosion[_local1][_local2] = -1;
Blocks.addBlob(_local1, _local2, false, false);
Blocks.blob_gravity[_local1][_local2] = 0;
Blocks.blob_yo[_local1][_local2] = 0;
Blocks.blob_lit[_local1][_local2] = 0;
_local2++;
};
_local1++;
};
Blocks.checkForGameOver();
PlaySample.playSound(PlaySample.SOUND_START_GAME, 0);
}
public static function resetTitle():void{
game_state = GAME_STATE_TITLE;
Logo.initTitleLogo();
PlaySample.playSound(PlaySample.SOUND_SELECT, 0);
}
}
}//package
Section 45
//BonusText (BonusText)
package {
import flash.events.*;
import flash.display.*;
public class BonusText extends Sprite {
public static var bonus_value:int;
public static var bonus_text_x:Number;
public static var bonus_text_y:Number;
public static var bonus_text_gravity:Number;
public function BonusText(){
mouseEnabled = false;
addEventListener(Event.ENTER_FRAME, step);
}
public function step(_arg1:Event):void{
var _local2:int;
var _local3:Number;
graphics.clear();
switch (Bomboozle.game_state){
case Bomboozle.GAME_STATE_GAME:
if (Blocks.cursor_active){
WingedBox.drawBox(graphics, (Blocks.blob_counter_x + Blocks.BLOB_SIZE), Blocks.blob_counter_y, (BitmapText.font_width * 2.5), -1);
BitmapText.drawNumber(graphics, Blocks.blobs_in_line, (Blocks.blob_counter_x + Blocks.BLOB_SIZE), (Blocks.blob_counter_y + (BitmapText.font_height * 0.6)), "centred", BitmapText.BONUS_FONT);
};
if (bonus_text_y > -40){
graphics.beginFill(0xFFFFFF);
_local2 = (bonus_value.toString().length * BitmapText.font_width);
trace(("text_width = " + _local2));
_local3 = (bonus_text_x + (1 + (Math.sin(Logo.scenery_bounce_angle) * 32)));
WingedBox.drawBox(graphics, _local3, bonus_text_y, (_local2 * 1.5), 0);
BitmapText.drawNumber(graphics, bonus_value, _local3, (bonus_text_y + (BitmapText.font_height * 0.6)), "centred", BitmapText.BONUS_FONT);
bonus_text_y = (bonus_text_y - ((bonus_text_y + 100) / 48));
};
break;
default:
break;
};
}
public static function init(_arg1:int, _arg2:Number, _arg3:Number):void{
bonus_text_gravity = 12;
bonus_value = _arg1;
bonus_text_x = _arg2;
bonus_text_y = _arg3;
}
}
}//package
Section 46
//CharacterAnim (CharacterAnim)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class CharacterAnim extends Sprite {
private var bloke_unhappy_class:Class;
private var bloke_very_happy_class:Class;
private var bloke_happy_class:Class;
private var bloke_ecstatic_class:Class;
private var bloke_bored_class:Class;
public static const ECSTATIC_FRAMES:Array = [0, 1, 2, 3, 4, 5];
public static const BORED_IMAGE_FRAMES:int = 4;
public static const BORED_FRAMES:Array = [0, 0, 0, 0, 0, 1, 0, 1, 2, 3, 2, 3, 2, 3, 2];
public static const POSE_ECSTATIC:int = 4;
public static const HAPPY_FRAMES:Array = [0, 1, 2, 3, 2, 4, 2, 3, 2, 4, 5, 5, 4, 4];
public static const HAPPY_IMAGE_FRAMES:int = 6;
public static const POSE_HAPPY:int = 2;
public static const POSE_BORED:int = 1;
public static const UNHAPPY_FRAMES:Array = [0, 1, 2, 3, 4, 5, 1, 2, 3, 4];
public static const VERY_HAPPY_IMAGE_FRAMES:int = 5;
public static const POSE_UNHAPPY:int = 0;
public static const POSE_VERY_HAPPY:int = 3;
public static const UNHAPPY_IMAGE_FRAMES:int = 6;
public static const VERY_HAPPY_FRAMES:Array = [0, 1, 0, 2, 0, 3, 4, 0];
public static const ECSTATIC_IMAGE_FRAMES:int = 6;
public static var container:Sprite;
public static var animation:Bitmap;
public static var ANIM_FRAMES_ARRAY:Array;
public static var ANIM_FRAMES:int;
public static var current_pose:int;
public static var previous_pose:int = -1;
public static var next_pose:int = -1;
public static var FRAME_HEIGHT:int;
public static var FRAME_WIDTH:int;
public static var anim_frame:int;
public function CharacterAnim(){
bloke_unhappy_class = CharacterAnim_bloke_unhappy_class;
bloke_bored_class = CharacterAnim_bloke_bored_class;
bloke_happy_class = CharacterAnim_bloke_happy_class;
bloke_very_happy_class = CharacterAnim_bloke_very_happy_class;
bloke_ecstatic_class = CharacterAnim_bloke_ecstatic_class;
super();
startNewAnim(POSE_HAPPY);
}
public function startNewAnim(_arg1:int):void{
if (container != null){
removeChild(container);
};
previous_pose = current_pose;
current_pose = _arg1;
anim_frame = 0;
container = new Sprite();
switch (_arg1){
case POSE_BORED:
animation = new bloke_bored_class();
ANIM_FRAMES = BORED_IMAGE_FRAMES;
ANIM_FRAMES_ARRAY = BORED_FRAMES;
break;
case POSE_UNHAPPY:
animation = new bloke_unhappy_class();
ANIM_FRAMES = UNHAPPY_IMAGE_FRAMES;
ANIM_FRAMES_ARRAY = UNHAPPY_FRAMES;
break;
case POSE_HAPPY:
animation = new bloke_happy_class();
ANIM_FRAMES = HAPPY_IMAGE_FRAMES;
ANIM_FRAMES_ARRAY = HAPPY_FRAMES;
break;
case POSE_VERY_HAPPY:
animation = new bloke_very_happy_class();
ANIM_FRAMES = VERY_HAPPY_IMAGE_FRAMES;
ANIM_FRAMES_ARRAY = VERY_HAPPY_FRAMES;
break;
case POSE_ECSTATIC:
animation = new bloke_ecstatic_class();
ANIM_FRAMES = ECSTATIC_IMAGE_FRAMES;
ANIM_FRAMES_ARRAY = ECSTATIC_FRAMES;
break;
};
FRAME_WIDTH = (animation.width / ANIM_FRAMES);
FRAME_HEIGHT = animation.height;
trace(("FRAME_WIDTH = " + FRAME_WIDTH));
trace(("animation.height = " + animation.height));
container.addChild(animation);
animation.height = ((1 + (Math.sin(-(Logo.scenery_bounce_angle)) / 32)) * animation.bitmapData.height);
container.x = (490 - (FRAME_WIDTH >> 1));
container.y = ((520 - animation.height) - 10);
container.scrollRect = new Rectangle(0, 0, FRAME_WIDTH, animation.height);
trace(("container.x = " + container.x));
trace(("container.y = " + container.y));
container.mouseEnabled = false;
addChild(container);
addEventListener(Event.ENTER_FRAME, step);
next_pose = -1;
if ((((Bomboozle.game_state == Bomboozle.GAME_STATE_GAME)) || ((Bomboozle.game_state == Bomboozle.GAME_STATE_OVER)))){
container.visible = true;
} else {
container.visible = false;
};
}
public function step(_arg1:Event):void{
switch (Bomboozle.game_state){
case Bomboozle.GAME_STATE_GAME:
case Bomboozle.GAME_STATE_PAUSED:
case Bomboozle.GAME_STATE_OVER:
container.visible = true;
if (alpha < 1){
alpha = (alpha + Bomboozle.FADE_SPEED);
};
container.y = ((stage.stageHeight - animation.height) - 10);
if (((!((Bomboozle.game_state == Bomboozle.GAME_STATE_PAUSED))) && (((Blocks.ticks % 9) == 0)))){
container.scrollRect = new Rectangle((FRAME_WIDTH * ANIM_FRAMES_ARRAY[anim_frame]), 0, FRAME_WIDTH, animation.height);
if (++anim_frame >= ANIM_FRAMES_ARRAY.length){
if (next_pose == -1){
if (Bomboozle.groups_left < 4){
next_pose = POSE_UNHAPPY;
} else {
next_pose = ((Math.random() < 0.5)) ? POSE_BORED : POSE_HAPPY;
};
};
startNewAnim(next_pose);
};
};
break;
default:
if (alpha > 0){
alpha = (alpha - Bomboozle.FADE_SPEED);
};
break;
};
}
}
}//package
Section 47
//CharacterAnim_bloke_bored_class (CharacterAnim_bloke_bored_class)
package {
import mx.core.*;
public class CharacterAnim_bloke_bored_class extends BitmapAsset {
}
}//package
Section 48
//CharacterAnim_bloke_ecstatic_class (CharacterAnim_bloke_ecstatic_class)
package {
import mx.core.*;
public class CharacterAnim_bloke_ecstatic_class extends BitmapAsset {
}
}//package
Section 49
//CharacterAnim_bloke_happy_class (CharacterAnim_bloke_happy_class)
package {
import mx.core.*;
public class CharacterAnim_bloke_happy_class extends BitmapAsset {
}
}//package
Section 50
//CharacterAnim_bloke_unhappy_class (CharacterAnim_bloke_unhappy_class)
package {
import mx.core.*;
public class CharacterAnim_bloke_unhappy_class extends BitmapAsset {
}
}//package
Section 51
//CharacterAnim_bloke_very_happy_class (CharacterAnim_bloke_very_happy_class)
package {
import mx.core.*;
public class CharacterAnim_bloke_very_happy_class extends BitmapAsset {
}
}//package
Section 52
//Explosion (Explosion)
package {
import flash.display.*;
import flash.geom.*;
public class Explosion extends Sprite {
private var bomb_explosion_class:Class;
public static const ANIM_FRAMES:int = 6;
public static var explosion_bitmap:BitmapData;
public static var _mtx:Matrix = new Matrix();
public static var explosion_image:Bitmap;
public static var frame_width:int;
public static var frame_height:int;
public function Explosion(){
bomb_explosion_class = Explosion_bomb_explosion_class;
super();
}
public function init():void{
mouseEnabled = false;
explosion_image = new bomb_explosion_class();
frame_width = explosion_image.width;
frame_height = (explosion_image.height / ANIM_FRAMES);
explosion_bitmap = new BitmapData(explosion_image.width, explosion_image.height, true, 0xFFFFFF);
explosion_bitmap.draw(explosion_image, new Matrix());
}
public static function drawExplosion(_arg1:Graphics, _arg2:int, _arg3:int, _arg4:int):void{
_arg3 = (_arg3 - (frame_width / 2));
_arg4 = (_arg4 - (frame_height / 2));
_mtx = new Matrix();
_mtx.translate(_arg3, (_arg4 - (_arg2 * frame_height)));
_arg1.beginBitmapFill(explosion_bitmap, _mtx, false, false);
_arg1.drawRect(_arg3, _arg4, frame_width, frame_height);
_arg1.endFill();
}
}
}//package
Section 53
//Explosion_bomb_explosion_class (Explosion_bomb_explosion_class)
package {
import mx.core.*;
public class Explosion_bomb_explosion_class extends BitmapAsset {
}
}//package
Section 54
//LargeText (LargeText)
package {
import flash.events.*;
import flash.display.*;
public class LargeText extends Sprite {
private var choose_game_class:Class;
private var text_gameover_class:Class;
private var text_go_class:Class;
private var leaderboard_class:Class;
private var text_time_up_class:Class;
private var credits_class:Class;
private var text_ready_class:Class;
private var text_paused_class:Class;
public static var container:Sprite;
public static var go_image:Bitmap;
public static var paused_image:Bitmap;
public static var go_image_gravity:Number;
public static var leaderboard_image:Bitmap;
public static var game_over_image:Bitmap;
public static var ready_sound_played:Boolean;
public static var time_up_image:Bitmap;
public static var go_image_bounces:int;
public static var credits_image:Bitmap;
public static var go_image_yo:Number;
public static var choose_game_image:Bitmap;
public static var ready_image:Bitmap;
public function LargeText(){
text_ready_class = LargeText_text_ready_class;
text_go_class = LargeText_text_go_class;
text_gameover_class = LargeText_text_gameover_class;
text_time_up_class = LargeText_text_time_up_class;
choose_game_class = LargeText_choose_game_class;
text_paused_class = LargeText_text_paused_class;
credits_class = LargeText_credits_class;
leaderboard_class = LargeText_leaderboard_class;
super();
ready_image = new text_ready_class();
go_image = new text_go_class();
game_over_image = new text_gameover_class();
time_up_image = new text_time_up_class();
choose_game_image = new choose_game_class();
paused_image = new text_paused_class();
credits_image = new credits_class();
leaderboard_image = new leaderboard_class();
addChild(ready_image);
addChild(go_image);
addChild(game_over_image);
addChild(time_up_image);
addChild(choose_game_image);
addChild(paused_image);
addChild(credits_image);
addChild(leaderboard_image);
ready_image.visible = false;
go_image.visible = false;
game_over_image.visible = false;
time_up_image.visible = false;
paused_image.visible = false;
credits_image.visible = false;
leaderboard_image.visible = false;
choose_game_image.alpha = 0;
mouseEnabled = false;
addEventListener(Event.ENTER_FRAME, step);
}
public function step(_arg1:Event):void{
switch (Bomboozle.game_state){
case Bomboozle.GAME_STATE_TITLE:
case Bomboozle.GAME_STATE_PAUSED:
ready_image.visible = false;
go_image.visible = false;
game_over_image.visible = false;
break;
case Bomboozle.GAME_STATE_CREDITS:
credits_image.x = ((stage.stageWidth - credits_image.width) / 2);
credits_image.y = (stage.stageHeight * 0.09);
break;
};
leaderboard_image.visible = (Bomboozle.game_state == Bomboozle.GAME_STATE_CHOOSE_LEADERBOARD);
leaderboard_image.x = ((stage.stageWidth - leaderboard_image.width) / 2);
leaderboard_image.y = (stage.stageHeight * 0.2);
credits_image.visible = (Bomboozle.game_state == Bomboozle.GAME_STATE_CREDITS);
if (Bomboozle.game_state == Bomboozle.GAME_STATE_PAUSED){
paused_image.width = ((1 + (Math.sin(Logo.scenery_bounce_angle) / 16)) * paused_image.bitmapData.width);
paused_image.height = ((1 + (Math.sin(Logo.scenery_bounce_angle) / 16)) * paused_image.bitmapData.height);
paused_image.x = ((stage.stageWidth - paused_image.width) / 2);
paused_image.y = ((stage.stageHeight / 4) - (paused_image.height / 2));
};
paused_image.visible = (Bomboozle.game_state == Bomboozle.GAME_STATE_PAUSED);
if (Bomboozle.game_state == Bomboozle.GAME_STATE_SELECT_GAME){
if (choose_game_image.alpha < 1){
choose_game_image.alpha = (choose_game_image.alpha + Bomboozle.FADE_SPEED);
};
choose_game_image.x = ((stage.stageWidth - choose_game_image.width) / 2);
choose_game_image.y = (stage.stageHeight * 0.2);
} else {
if (choose_game_image.alpha > 0){
choose_game_image.alpha = (choose_game_image.alpha - Bomboozle.FADE_SPEED);
};
};
switch (Bomboozle.game_state){
case Bomboozle.GAME_STATE_GAME:
if (ready_image.visible){
if (ready_image.scaleX < 1){
ready_image.scaleX = (ready_image.scaleX + ((1.1 - ready_image.scaleX) / 8));
if (((!(ready_sound_played)) && ((ready_image.scaleX >= 0.5)))){
ready_sound_played = true;
PlaySample.playSound(PlaySample.SOUND_READY, 0);
};
};
if (ready_image.scaleY > 1){
ready_image.scaleY = (ready_image.scaleY - ((ready_image.scaleY - 1) / 4));
};
if (go_image_bounces > 0){
if ((ready_image.alpha = (ready_image.alpha - Bomboozle.FADE_SPEED)) < 0){
ready_image.visible = false;
};
};
ready_image.x = ((stage.stageWidth - ready_image.width) >> 1);
ready_image.y = ((stage.stageHeight - ready_image.height) >> 1);
};
if (go_image.visible){
if (go_image_bounces < 6){
go_image_yo = (go_image_yo + (go_image_gravity = (go_image_gravity + 0.5)));
if (go_image_yo >= 0){
go_image_gravity = (-(go_image_gravity) / 3);
go_image_yo = 0;
if (++go_image_bounces == 1){
PlaySample.playSound(PlaySample.SOUND_GO, 0);
};
};
} else {
if ((go_image.alpha = (go_image.alpha - Bomboozle.FADE_SPEED)) < 0){
go_image.visible = false;
};
};
go_image.x = ((stage.stageWidth - go_image.width) >> 1);
go_image.y = (((stage.stageHeight - go_image.height) >> 1) + go_image_yo);
};
if (game_over_image.alpha > 0){
game_over_image.alpha = (game_over_image.alpha - Bomboozle.FADE_SPEED);
};
break;
case Bomboozle.GAME_STATE_OVER:
if (Bomboozle.game_type == Bomboozle.GAME_TYPE_TIMED){
time_up_image.visible = (time_up_image.alpha > 0);
time_up_image.x = ((stage.stageWidth - time_up_image.width) / 2);
time_up_image.y = (stage.stageHeight * 0.25);
if (time_up_image.alpha < 1){
time_up_image.alpha = (time_up_image.alpha + Bomboozle.FADE_SPEED);
};
} else {
game_over_image.visible = (game_over_image.alpha > 0);
game_over_image.x = ((stage.stageWidth - game_over_image.width) / 2);
game_over_image.y = (stage.stageHeight * 0.13);
if (game_over_image.alpha < 1){
game_over_image.alpha = (game_over_image.alpha + Bomboozle.FADE_SPEED);
};
};
break;
default:
if (game_over_image.alpha > 0){
game_over_image.alpha = (game_over_image.alpha - Bomboozle.FADE_SPEED);
};
if (time_up_image.alpha > 0){
time_up_image.alpha = (time_up_image.alpha - Bomboozle.FADE_SPEED);
};
break;
};
}
public static function init():void{
ready_sound_played = false;
ready_image.scaleX = 0;
ready_image.scaleY = 10;
ready_image.alpha = 1;
ready_image.visible = true;
go_image.scaleX = 1;
go_image.scaleY = 1;
go_image.alpha = 1;
go_image.visible = true;
go_image_gravity = 1;
go_image.y = -400;
go_image_yo = -400;
go_image_bounces = 0;
}
}
}//package
Section 55
//LargeText_choose_game_class (LargeText_choose_game_class)
package {
import mx.core.*;
public class LargeText_choose_game_class extends BitmapAsset {
}
}//package
Section 56
//LargeText_credits_class (LargeText_credits_class)
package {
import mx.core.*;
public class LargeText_credits_class extends BitmapAsset {
}
}//package
Section 57
//LargeText_leaderboard_class (LargeText_leaderboard_class)
package {
import mx.core.*;
public class LargeText_leaderboard_class extends BitmapAsset {
}
}//package
Section 58
//LargeText_text_gameover_class (LargeText_text_gameover_class)
package {
import mx.core.*;
public class LargeText_text_gameover_class extends BitmapAsset {
}
}//package
Section 59
//LargeText_text_go_class (LargeText_text_go_class)
package {
import mx.core.*;
public class LargeText_text_go_class extends BitmapAsset {
}
}//package
Section 60
//LargeText_text_paused_class (LargeText_text_paused_class)
package {
import mx.core.*;
public class LargeText_text_paused_class extends BitmapAsset {
}
}//package
Section 61
//LargeText_text_ready_class (LargeText_text_ready_class)
package {
import mx.core.*;
public class LargeText_text_ready_class extends BitmapAsset {
}
}//package
Section 62
//LargeText_text_time_up_class (LargeText_text_time_up_class)
package {
import mx.core.*;
public class LargeText_text_time_up_class extends BitmapAsset {
}
}//package
Section 63
//Logo (Logo)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.filters.*;
public class Logo extends Sprite {
private var logo_image_class:Class;
private var dev_logo_class:Class;
public static var finished_scaling:Boolean;
public static var scenery_bounce_angle:Number = 0;
public static var dev_logo_blur_x:Number = 100;
public static var dev_logo_blur_y:Number = 100;
public static var wobble_angle:Number = 0;
public static var logo:Bitmap;
public static var dev_logo:Bitmap;
public static var logo_stretching:Boolean = true;
public static var dev_logo_timer:int = 50;
public static var flash_fade_value:Number = 1;
public function Logo(){
logo_image_class = Logo_logo_image_class;
dev_logo_class = Logo_dev_logo_class;
super();
logo = new logo_image_class();
mouseEnabled = false;
initTitleLogo();
addChild(logo);
dev_logo = new dev_logo_class();
dev_logo.x = (320 - (dev_logo.width / 2));
dev_logo.y = (260 - (dev_logo.height / 2));
dev_logo.filters = [new BlurFilter(dev_logo_blur_x, dev_logo_blur_y, BitmapFilterQuality.LOW)];
addChild(dev_logo);
PlaySample.playSound(PlaySample.SOUND_DEV_LOGO, 0);
addEventListener(Event.ENTER_FRAME, step);
}
public function step(_arg1:Event):void{
var _local2:ColorTransform;
switch (Bomboozle.game_state){
case Bomboozle.GAME_STATE_SHOW_MOCHIAD:
case Bomboozle.GAME_STATE_DEV_LOGO:
if (flash_fade_value > 0){
graphics.clear();
graphics.beginFill(0xFFFFFF, flash_fade_value);
graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
};
if (dev_logo_blur_y < 1){
flash_fade_value = (flash_fade_value - 0.05);
if (dev_logo.alpha > 0){
dev_logo.alpha = (dev_logo.alpha - 0.05);
if (dev_logo.alpha <= 0){
if (!Bomboozle.MOCHIADS_VERSION){
Bomboozle.game_state = Bomboozle.GAME_STATE_TITLE;
} else {
Bomboozle.game_state = Bomboozle.GAME_STATE_SHOW_MOCHIAD;
};
removeChild(dev_logo);
};
};
} else {
dev_logo_blur_x = (dev_logo_blur_x - (dev_logo_blur_x / 4));
if (dev_logo_blur_x < 1){
dev_logo_blur_y = (dev_logo_blur_y - (dev_logo_blur_y / 8));
};
dev_logo.filters = [new BlurFilter(dev_logo_blur_x, dev_logo_blur_y, BitmapFilterQuality.LOW)];
};
break;
case Bomboozle.GAME_STATE_TITLE:
logo.x = ((stage.stageWidth - logo.width) / 2);
logo.y = ((stage.stageHeight / 4) - (logo.height / 2));
if (logo.alpha < 1){
logo.alpha = (logo.alpha + Bomboozle.FADE_SPEED);
};
if (((!(finished_scaling)) && ((logo.scaleX < 1)))){
logo.scaleX = (logo.scaleX + ((1.01 - logo.scaleX) / 8));
logo.scaleX = Math.min(logo.scaleX, 1);
finished_scaling = (logo.scaleX >= 1);
if (finished_scaling){
wobble_angle = 0;
logo.scaleX = 0;
};
};
if (logo.scaleX < 0){
logo.x = ((stage.stageWidth / 2) + (logo.width / 2));
} else {
if (!finished_scaling){
logo.x = ((stage.stageWidth / 2) - (logo.width / 2));
} else {
wobble_angle = (wobble_angle + 0.1);
logo.width = ((1 + (Math.sin(wobble_angle) / 16)) * logo.bitmapData.width);
logo.height = ((1 + (Math.sin(wobble_angle) / 16)) * logo.bitmapData.height);
};
};
_local2 = logo.transform.colorTransform;
_local2.redMultiplier = (_local2.greenMultiplier = (_local2.blueMultiplier = logo.scaleX));
logo.transform.colorTransform = _local2;
break;
default:
if (logo.alpha > 0){
logo.alpha = (logo.alpha - Bomboozle.FADE_SPEED);
};
break;
};
scenery_bounce_angle = (scenery_bounce_angle + 0.1);
logo.visible = (logo.alpha > 0);
}
public static function initTitleLogo():void{
logo.alpha = 1;
logo.scaleX = -1;
wobble_angle = 0;
finished_scaling = false;
}
}
}//package
Section 64
//Logo_dev_logo_class (Logo_dev_logo_class)
package {
import mx.core.*;
public class Logo_dev_logo_class extends BitmapAsset {
}
}//package
Section 65
//Logo_logo_image_class (Logo_logo_image_class)
package {
import mx.core.*;
public class Logo_logo_image_class extends BitmapAsset {
}
}//package
Section 66
//MenuIcon (MenuIcon)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import mochi.*;
public dynamic class MenuIcon extends MovieClip {
private var icon_infinite_class:Class;
private var icons_in_menu:int;
private var icon_image:Bitmap;
private var icon_menu_class:Class;
private var icon_bounces:int;
private var icon_scores_lass:Class;
private var icon_play_class:Class;
private var icon_option_class:Class;
private var icon_skip_class:Class;
private var icon_continue_class:Class;
private var icon_game_state:int;
private var icon_hardcore_class:Class;
private var icon_yoffset:int;
private var icon_gravity:int;
private var first_icon_in_menu:int;
private var icon_credits_class:Class;
private var icon_timed_class:Class;
private var icon_next_class:Class;
private var icon_wobble_angle:Number;
private var icon_squash:Number;
private var icon_number:int;
public static const ICON_BOUNCE_LIMIT:int = 3;
public static var total_icon_bounces:int;
public static var mouse_over_icon:int = -1;
public function MenuIcon(){
icon_play_class = MenuIcon_icon_play_class;
icon_option_class = MenuIcon_icon_option_class;
icon_credits_class = MenuIcon_icon_credits_class;
icon_scores_lass = MenuIcon_icon_scores_lass;
icon_infinite_class = MenuIcon_icon_infinite_class;
icon_timed_class = MenuIcon_icon_timed_class;
icon_hardcore_class = MenuIcon_icon_hardcore_class;
icon_continue_class = MenuIcon_icon_continue_class;
icon_menu_class = MenuIcon_icon_menu_class;
icon_skip_class = MenuIcon_icon_skip_class;
icon_next_class = MenuIcon_icon_next_class;
super();
}
public function init(_arg1:int, _arg2:int, _arg3:int):void{
switch (_arg1){
case 0:
icon_image = new icon_play_class();
break;
case 1:
icon_image = new icon_option_class();
break;
case 2:
icon_image = new icon_credits_class();
break;
case 3:
icon_image = new icon_scores_lass();
break;
case 4:
icon_image = new icon_infinite_class();
break;
case 5:
icon_image = new icon_timed_class();
break;
case 6:
icon_image = new icon_hardcore_class();
break;
case 7:
icon_image = new icon_continue_class();
break;
case 8:
icon_image = new icon_menu_class();
break;
case 9:
icon_image = new icon_continue_class();
break;
case 10:
icon_image = new icon_menu_class();
break;
case 11:
icon_image = new icon_skip_class();
break;
case 12:
icon_image = new icon_next_class();
break;
case 13:
icon_image = new icon_infinite_class();
break;
case 14:
icon_image = new icon_timed_class();
break;
case 15:
icon_image = new icon_hardcore_class();
break;
};
if (_arg1 < 4){
icon_game_state = Bomboozle.GAME_STATE_TITLE;
} else {
if (_arg1 < 7){
icon_game_state = Bomboozle.GAME_STATE_SELECT_GAME;
} else {
if (_arg1 < 9){
icon_game_state = Bomboozle.GAME_STATE_OVER;
} else {
if (_arg1 < 11){
icon_game_state = Bomboozle.GAME_STATE_PAUSED;
} else {
if (_arg1 < 13){
icon_game_state = Bomboozle.GAME_STATE_TUTORIAL;
} else {
if (_arg1 < 16){
icon_game_state = Bomboozle.GAME_STATE_CHOOSE_LEADERBOARD;
};
};
};
};
};
};
first_icon_in_menu = _arg3;
icon_number = _arg1;
icons_in_menu = _arg2;
icon_squash = 1;
icon_wobble_angle = 0;
addChild(icon_image);
resetIcon();
addEventListener(MouseEvent.MOUSE_OVER, mouseOverIcon);
addEventListener(MouseEvent.MOUSE_OUT, mouseOffIcon);
addEventListener(MouseEvent.MOUSE_DOWN, iconClicked);
addEventListener(Event.ENTER_FRAME, step);
}
private function mouseOverIcon(_arg1:MouseEvent):void{
if ((((this.icon_gravity == 0)) && ((this.icon_bounces >= ICON_BOUNCE_LIMIT)))){
PlaySample.playSound(PlaySample.SOUND_OVER_ICON, 0);
};
}
private function mouseOffIcon(_arg1:MouseEvent):void{
var _local2:ColorTransform;
_local2 = this.transform.colorTransform;
_local2.blueMultiplier = (_local2.redMultiplier = (_local2.greenMultiplier = 1));
this.transform.colorTransform = _local2;
}
private function iconClicked(_arg1:MouseEvent):void{
if ((((((((this.icon_game_state == Bomboozle.game_state)) && ((this.icon_gravity == 0)))) && ((this.icon_yoffset == 0)))) && ((total_icon_bounces >= (this.icons_in_menu * ICON_BOUNCE_LIMIT))))){
trace("iconClicked");
PlaySample.playSound(PlaySample.SOUND_SELECT, 0);
switch (this.icon_number){
case 0:
Bomboozle.game_state = Bomboozle.GAME_STATE_SELECT_GAME;
break;
case 1:
Bomboozle.game_state = Bomboozle.GAME_STATE_OPTIONS;
break;
case 2:
Bomboozle.game_state = Bomboozle.GAME_STATE_CREDITS;
break;
case 3:
Bomboozle.game_state = Bomboozle.GAME_STATE_CHOOSE_LEADERBOARD;
break;
case 4:
case 5:
case 6:
Bomboozle.game_type = (this.icon_number - 4);
if (Bomboozle.tutorial_has_been_viewed){
Bomboozle.startGame();
} else {
Bomboozle.game_state = Bomboozle.GAME_STATE_TUTORIAL;
};
break;
case 7:
if (Bomboozle.MOCHIADS_HISCORES){
Bomboozle.game_state = Bomboozle.GAME_STATE_SUBMIT_SCORE;
MochiScores.showLeaderboard({boardID:Bomboozle.leaderboard_IDs[Bomboozle.game_type], score:Bomboozle.score, showTableRank:true, previewScores:true, numScores:20, onError:Bomboozle.resetTitle, preloaderDisplay:false});
} else {
if (Bomboozle.MINDJOLT_VERSION){
Bomboozle.MindJoltAPI.service.submitScore(Bomboozle.score, Bomboozle.GAME_MODE_STRINGS[Bomboozle.game_type]);
} else {
if (Bomboozle.KONGREGATE_VERSION){
trace("YOOOOOOOOOOOO!!!!!!!!!!");
Bomboozle.kongregate.scores.submit(Bomboozle.score, Bomboozle.GAME_MODE_STRINGS[Bomboozle.game_type]);
Bomboozle.kongregate.stats.submit("Chains", Bomboozle.groups_made);
Bomboozle.kongregate.stats.submit("Longest chain", Blocks.longest_chain);
};
};
Bomboozle.resetTitle();
};
break;
case 8:
break;
case 9:
Bomboozle.game_state = Bomboozle.GAME_STATE_GAME;
Bomboozle.tutorial_has_been_viewed = true;
Bomboozle.tutorial_page = Bomboozle.TUTORIAL_PAGES;
break;
case 10:
Bomboozle.resetTitle();
break;
case 11:
Bomboozle.startGame();
break;
case 12:
if (++Bomboozle.tutorial_page >= Bomboozle.TUTORIAL_PAGES){
Bomboozle.startGame();
};
break;
case 13:
case 14:
case 15:
Bomboozle.game_state = Bomboozle.GAME_STATE_SCOREBOARD;
MochiScores.showLeaderboard({boardID:Bomboozle.leaderboard_IDs[(this.icon_number - 13)], showTableRank:true, previewScores:true, numScores:20, onError:Bomboozle.resetTitle, preloaderDisplay:false});
break;
};
};
}
public function step(_arg1:Event):void{
var _local2:int;
var _local3:int;
this.visible = ((((this.y + this.height) >= 0)) && ((this.y < stage.stageHeight)));
if (this.icon_game_state == Bomboozle.game_state){
this.icon_wobble_angle = (this.icon_wobble_angle + 0.1);
mouse_over_icon = -1;
if (this.icon_bounces < ICON_BOUNCE_LIMIT){
if (this.icon_squash == 1){
this.icon_yoffset = (this.icon_yoffset + this.icon_gravity);
this.icon_gravity = (this.icon_gravity + Bomboozle.ICON_GRAVITY);
};
if (this.icon_yoffset >= 0){
if (this.icon_bounces < 1){
this.icon_squash = (this.icon_squash - ((this.icon_squash - (0.45 + (this.icon_bounces * 0.2))) / 2));
this.icon_yoffset = 0;
if (this.icon_squash <= 0.5){
this.icon_bounces++;
total_icon_bounces++;
this.icon_squash = 1;
this.icon_gravity = (-(this.icon_gravity) / 3);
};
} else {
this.icon_gravity = (-(this.icon_gravity) / 3);
this.icon_bounces++;
total_icon_bounces++;
};
};
this.scaleY = this.icon_squash;
} else {
this.icon_gravity = 0;
};
} else {
if ((((((this.icon_bounces >= ICON_BOUNCE_LIMIT)) || (!((this.icon_gravity == 0))))) && ((this.y > 0)))){
this.icon_yoffset = (this.icon_yoffset + (this.icon_gravity = (this.icon_gravity + Bomboozle.ICON_GRAVITY)));
};
};
_local2 = (stage.stageWidth / this.icons_in_menu);
_local3 = ((stage.stageWidth >> 1) - ((_local2 * (this.icons_in_menu - 1)) >> 1));
this.x = ((_local3 + ((this.icon_number - this.first_icon_in_menu) * _local2)) - (this.width / 2));
switch (this.icon_game_state){
case Bomboozle.GAME_STATE_OVER:
this.y = (stage.stageHeight * 0.8);
break;
case Bomboozle.GAME_STATE_TUTORIAL:
this.y = (stage.stageHeight * 0.75);
break;
default:
this.y = (stage.stageHeight * 0.65);
break;
};
this.y = ((this.y - (this.height / 2)) + this.icon_yoffset);
if (this.y > stage.stageHeight){
resetIcon();
};
}
public function resetIcon():void{
this.visible = false;
this.icon_gravity = 0;
this.icon_yoffset = (this.y = (-(stage.stageHeight) - (Math.random() * 200)));
this.icon_bounces = 0;
this.alpha = 1;
this.icon_squash = 1;
total_icon_bounces = 0;
}
}
}//package
Section 67
//MenuIcon_icon_continue_class (MenuIcon_icon_continue_class)
package {
import mx.core.*;
public class MenuIcon_icon_continue_class extends BitmapAsset {
}
}//package
Section 68
//MenuIcon_icon_credits_class (MenuIcon_icon_credits_class)
package {
import mx.core.*;
public class MenuIcon_icon_credits_class extends BitmapAsset {
}
}//package
Section 69
//MenuIcon_icon_hardcore_class (MenuIcon_icon_hardcore_class)
package {
import mx.core.*;
public class MenuIcon_icon_hardcore_class extends BitmapAsset {
}
}//package
Section 70
//MenuIcon_icon_infinite_class (MenuIcon_icon_infinite_class)
package {
import mx.core.*;
public class MenuIcon_icon_infinite_class extends BitmapAsset {
}
}//package
Section 71
//MenuIcon_icon_menu_class (MenuIcon_icon_menu_class)
package {
import mx.core.*;
public class MenuIcon_icon_menu_class extends BitmapAsset {
}
}//package
Section 72
//MenuIcon_icon_next_class (MenuIcon_icon_next_class)
package {
import mx.core.*;
public class MenuIcon_icon_next_class extends BitmapAsset {
}
}//package
Section 73
//MenuIcon_icon_option_class (MenuIcon_icon_option_class)
package {
import mx.core.*;
public class MenuIcon_icon_option_class extends BitmapAsset {
}
}//package
Section 74
//MenuIcon_icon_play_class (MenuIcon_icon_play_class)
package {
import mx.core.*;
public class MenuIcon_icon_play_class extends BitmapAsset {
}
}//package
Section 75
//MenuIcon_icon_scores_lass (MenuIcon_icon_scores_lass)
package {
import mx.core.*;
public class MenuIcon_icon_scores_lass extends BitmapAsset {
}
}//package
Section 76
//MenuIcon_icon_skip_class (MenuIcon_icon_skip_class)
package {
import mx.core.*;
public class MenuIcon_icon_skip_class extends BitmapAsset {
}
}//package
Section 77
//MenuIcon_icon_timed_class (MenuIcon_icon_timed_class)
package {
import mx.core.*;
public class MenuIcon_icon_timed_class extends BitmapAsset {
}
}//package
Section 78
//MochiAd (MochiAd)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("2.1");
}
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);
};
if (clip._mochiad_loaded){
return (null);
};
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{
mc._mochiad_ctr_failed = true;
};
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
g = function (_arg1:Object):void{
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];
};
};
_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++;
};
};
return (_local3);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
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();
};
_arg1.removeChild(_arg1._mochiad);
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{
this.clip.stop();
}, ad_finished:function ():void{
this.clip.play();
}};
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{
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;
_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.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
_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{
this.clip.stop();
}, ad_finished:function ():void{
this.clip.play();
}};
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;
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{
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);
Bomboozle.game_state = Bomboozle.GAME_STATE_TITLE;
};
};
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = 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;
_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;
Bomboozle.resetTitle();
};
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 {
mc.removeEventListener(Event.ENTER_FRAME, f);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 79
//Panel (Panel)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class Panel extends Sprite {
private var panel_y:int;
private var panel_chains_image:Bitmap;
private var panel_chains_class:Class;
private var panel_score_image:Bitmap;
private var panel_score_class:Class;
private var panel_hiscore_image:Bitmap;
private var panel_hiscore_class:Class;
private var panel_x:int;
public static var panel_chains_bitmap:BitmapData;
public static var panel_chains_yo:Number;
public static var _mtx:Matrix = new Matrix();
public static var panel_score_bitmap:BitmapData;
public static var panel_hiscore_bitmap:BitmapData;
public static var panel_score_yo:Number;
public static var panel_hiscore_yo:Number;
public function Panel(){
panel_score_class = Panel_panel_score_class;
panel_hiscore_class = Panel_panel_hiscore_class;
panel_chains_class = Panel_panel_chains_class;
super();
}
public function init():void{
panel_score_image = new panel_score_class();
panel_hiscore_image = new panel_hiscore_class();
panel_chains_image = new panel_chains_class();
panel_score_bitmap = new BitmapData(panel_score_image.width, panel_score_image.height, true, 0xFFFFFF);
panel_score_bitmap.draw(panel_score_image, new Matrix());
panel_hiscore_bitmap = new BitmapData(panel_hiscore_image.width, panel_hiscore_image.height, true, 0xFFFFFF);
panel_hiscore_bitmap.draw(panel_hiscore_image, new Matrix());
panel_chains_bitmap = new BitmapData(panel_chains_image.width, panel_chains_image.height, true, 0xFFFFFF);
panel_chains_bitmap.draw(panel_chains_image, new Matrix());
addEventListener(Event.ENTER_FRAME, step);
}
public function step(_arg1:Event):void{
switch (Bomboozle.game_state){
case Bomboozle.GAME_STATE_GAME:
case Bomboozle.GAME_STATE_PAUSED:
case Bomboozle.GAME_STATE_OVER:
visible = true;
graphics.clear();
panel_x = 369;
panel_y = (29 + panel_score_yo);
_mtx = new Matrix();
_mtx.translate(panel_x, panel_y);
graphics.beginBitmapFill(panel_score_bitmap, _mtx, false, false);
graphics.drawRect(panel_x, panel_y, panel_score_image.width, panel_score_image.height);
BitmapText.drawNumber(graphics, Bomboozle.score, (panel_x + (panel_score_image.width * 0.9)), (panel_y + (panel_score_image.height / 2)), "right", BitmapText.SCORE_FONT);
panel_x = 420;
panel_y = (93 + panel_hiscore_yo);
_mtx = new Matrix();
_mtx.translate(panel_x, panel_y);
graphics.beginBitmapFill(panel_hiscore_bitmap, _mtx, false, false);
graphics.drawRect(panel_x, panel_y, panel_hiscore_image.width, panel_hiscore_image.height);
BitmapText.drawNumber(graphics, Bomboozle.hiscore[Bomboozle.game_type], (panel_x + (panel_hiscore_image.width * 0.9)), (panel_y + (panel_hiscore_image.height / 2)), "right", BitmapText.SCORE_FONT);
panel_x = 472;
panel_y = (156 + panel_chains_yo);
_mtx = new Matrix();
_mtx.translate(panel_x, panel_y);
graphics.beginBitmapFill(panel_chains_bitmap, _mtx, false, false);
graphics.drawRect(panel_x, panel_y, panel_chains_image.width, panel_chains_image.height);
BitmapText.drawNumber(graphics, Bomboozle.groups_made, (panel_x + (panel_chains_image.width * 0.9)), (panel_y + (panel_chains_image.height / 2)), "right", BitmapText.SCORE_FONT);
if (panel_chains_yo < 0){
panel_chains_yo = (panel_chains_yo + Math.abs(((panel_chains_yo - 1) / 2)));
} else {
if (panel_hiscore_yo < 0){
panel_hiscore_yo = (panel_hiscore_yo + Math.abs(((panel_hiscore_yo - 1) / 2)));
} else {
if (panel_score_yo < 0){
panel_score_yo = (panel_score_yo + Math.abs(((panel_score_yo - 1) / 2)));
};
};
};
break;
default:
visible = false;
break;
};
}
}
}//package
Section 80
//Panel_panel_chains_class (Panel_panel_chains_class)
package {
import mx.core.*;
public class Panel_panel_chains_class extends BitmapAsset {
}
}//package
Section 81
//Panel_panel_hiscore_class (Panel_panel_hiscore_class)
package {
import mx.core.*;
public class Panel_panel_hiscore_class extends BitmapAsset {
}
}//package
Section 82
//Panel_panel_score_class (Panel_panel_score_class)
package {
import mx.core.*;
public class Panel_panel_score_class extends BitmapAsset {
}
}//package
Section 83
//Particle (Particle)
package {
import flash.events.*;
import flash.display.*;
public class Particle extends Shape {
private var ymov:Number;// = 0
private var pid:int;
private var colour_index:int;// = 0
private var sideLength:Number;
private var tempy:Number;// = 0
private var xmov:Number;// = 0
private var isGrowing:Boolean;// = false
private var tempx:Number;// = 0
public static var deg:Number = 0;
public function Particle(){
xmov = 0;
ymov = 0;
tempx = 0;
tempy = 0;
colour_index = 0;
isGrowing = false;
super();
}
private function onRemoved(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
removeEventListener(Event.REMOVED, onRemoved);
}
private function grow():Boolean{
this.scaleX = (this.scaleY = (this.scaleY - 0.02));
return ((this.scaleX > 0));
}
public function init(_arg1:int, _arg2:Object, _arg3:int):Particle{
var _local4:Number;
var _local5:Number;
this.pid = _arg1;
this.sideLength = (Blocks.BLOB_SIZE / 3);
this.x = _arg2.xpos;
this.y = _arg2.ypos;
this.colour_index = _arg3;
deg = (deg + 0.0174532925);
_local4 = (deg * 57.2957795);
_local5 = 6;
this.xmov = (_local5 * Math.cos(_local4));
this.ymov = (_local5 * Math.sin(_local4));
addEventListener(Event.ENTER_FRAME, onEnterFrame);
addEventListener(Event.REMOVED, onRemoved);
draw();
return (this);
}
private function killMe():void{
ParticleManager.getInstance().removeParticle(this.pid);
stage.removeChild(this);
}
private function onEnterFrame(_arg1:Event):void{
this.tempx = this.x;
this.tempy = this.y;
this.tempx = (this.tempx + this.xmov);
this.tempy = (this.tempy + this.ymov);
if (((!(grow())) || (!(checkForWalls())))){
killMe();
} else {
this.x = this.tempx;
this.y = this.tempy;
};
}
private function draw():void{
graphics.beginFill(Blocks.COLOR_ARRAY[this.colour_index]);
graphics.drawCircle(0, 0, this.sideLength);
graphics.endFill();
}
private function checkForWalls():Boolean{
if (((((((((this.tempy + this.sideLength) < 0)) || (((this.tempy - this.sideLength) > stage.stageHeight)))) || (((this.tempx + this.sideLength) < 0)))) || (((this.tempx - this.sideLength) > stage.stageWidth)))){
return (false);
};
return (true);
}
override public function toString():String{
return ("[Particle]");
}
}
}//package
Section 84
//ParticleManager (ParticleManager)
package {
import flash.display.*;
public class ParticleManager {
private var allParticles:Array;
private var recycle:Array;
private var stage:Stage;
private static var instance:ParticleManager;
public function ParticleManager(_arg1:SingletonEnforcer){
}
public function createParticle(_arg1:int, _arg2:Object, _arg3:int):void{
var _local4:int;
var _local5:int;
_local4 = 0;
while (_local4 < _arg1) {
_local5 = getNextSlot();
this.allParticles[_local5] = new Particle().init(_local5, _arg2, _arg3);
this.stage.addChild(this.allParticles[_local5]);
_local4++;
};
}
public function removeParticle(_arg1:int):void{
this.recycle.push(_arg1);
}
private function getNextSlot():int{
if (this.recycle.length > 0){
return (int(this.recycle.pop()));
};
return (this.allParticles.length);
}
public function init(_arg1:Stage):void{
this.allParticles = [];
this.recycle = [];
this.stage = _arg1;
}
public static function getInstance():ParticleManager{
if (ParticleManager.instance == null){
ParticleManager.instance = new ParticleManager(new SingletonEnforcer());
};
return (ParticleManager.instance);
}
}
}//package
class SingletonEnforcer {
private function SingletonEnforcer(){
}
}
Section 85
//Path (Path)
package {
import flash.events.*;
import flash.display.*;
import flash.ui.*;
public class Path extends Sprite {
private var pencil_image_class:Class;
private var pencil_image:Bitmap;
private var flash_image_class:Class;
public static var prev_mouseY:Number;
public static var path_start_x:Number;
public static var flash_image:Bitmap;
public static var path_start_y:Number;
public static var clear_path:Boolean;
public static var prev_mouseX:Number;
public function Path(){
pencil_image_class = Path_pencil_image_class;
flash_image_class = Path_flash_image_class;
super();
pencil_image = new pencil_image_class();
flash_image = new flash_image_class();
}
public function init():void{
mouseEnabled = false;
pencil_image.alpha = 1;
pencil_image.visible = false;
addChild(pencil_image);
addChild(flash_image);
flash_image.alpha = 0;
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
addEventListener(Event.ENTER_FRAME, step);
stage.addEventListener(MouseEvent.MOUSE_OUT, mouseOut);
stage.addEventListener(MouseEvent.MOUSE_OVER, mouseOver);
}
public function mouseOver(_arg1:MouseEvent):void{
if (pencil_image.visible){
Mouse.hide();
};
}
public function mouseOut(_arg1:MouseEvent):void{
Mouse.show();
}
public function pointerIsOnScreen():Boolean{
if ((((((((mouseX > 10)) && ((mouseX < (stage.stageWidth - 10))))) && ((mouseY > 10)))) && ((mouseY < (stage.stageHeight - 10))))){
return (true);
};
return (false);
}
public function step(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
switch (Bomboozle.game_state){
case Bomboozle.GAME_STATE_GAME:
if (((((Blocks.cursor_active) && (((!((prev_mouseX == stage.mouseX))) || (!((prev_mouseY == stage.mouseY))))))) || (clear_path))){
graphics.lineStyle(7, 0xFFFFFF);
graphics.moveTo((path_start_x - (Blocks.BLOB_SIZE * 0.26)), (path_start_y - (Blocks.BLOB_SIZE * 0.24)));
graphics.lineTo((path_start_x + (Blocks.BLOB_SIZE / 4)), (path_start_y + (Blocks.BLOB_SIZE / 4)));
graphics.moveTo((path_start_x + (Blocks.BLOB_SIZE * 0.23)), (path_start_y - (Blocks.BLOB_SIZE * 0.27)));
graphics.lineTo((path_start_x - (Blocks.BLOB_SIZE * 0.22)), (path_start_y + (Blocks.BLOB_SIZE * 0.22)));
graphics.moveTo(prev_mouseX, prev_mouseY);
graphics.lineTo(mouseX, mouseY);
_local2 = (mouseX - Blocks.prev_mouse_blob_x);
_local3 = (mouseY - Blocks.prev_mouse_blob_y);
_local4 = Math.atan2(_local3, _local2);
trace(("radians = " + _local4));
trace(("Math.atan2(prev_mouseY - mouseY, prev_mouseX - mouseX) = " + Math.atan2((prev_mouseY - mouseY), (prev_mouseX - mouseX))));
prev_mouseX = mouseX;
prev_mouseY = mouseY;
if (clear_path){
graphics.clear();
prev_mouseX = mouseX;
prev_mouseY = mouseY;
path_start_x = mouseX;
path_start_y = mouseY;
clear_path = false;
};
};
pencil_image.visible = true;
break;
case Bomboozle.GAME_STATE_SHOW_MOCHIAD:
case Bomboozle.GAME_STATE_SCOREBOARD:
case Bomboozle.GAME_STATE_SUBMIT_SCORE:
graphics.clear();
pencil_image.visible = false;
break;
default:
graphics.clear();
pencil_image.visible = true;
break;
};
if (flash_image.alpha > 0){
flash_image.alpha = (flash_image.alpha - (Bomboozle.FADE_SPEED / 2));
};
pencil_image.x = mouseX;
pencil_image.y = (mouseY - pencil_image.height);
}
public function mouseDown(_arg1:MouseEvent):void{
flash_image.x = (mouseX - (flash_image.width / 2));
flash_image.y = (mouseY - (flash_image.height / 2));
flash_image.alpha = 1;
}
public static function placeFlash(_arg1:int, _arg2:int):void{
flash_image.x = (_arg1 - (flash_image.width >> 1));
flash_image.y = (_arg2 - (flash_image.height >> 1));
flash_image.alpha = 1;
}
}
}//package
Section 86
//Path_flash_image_class (Path_flash_image_class)
package {
import mx.core.*;
public class Path_flash_image_class extends BitmapAsset {
}
}//package
Section 87
//Path_pencil_image_class (Path_pencil_image_class)
package {
import mx.core.*;
public class Path_pencil_image_class extends BitmapAsset {
}
}//package
Section 88
//PauseButton (PauseButton)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class PauseButton extends Sprite {
private var pauseIconClass:Class;
private var icon_pause:Bitmap;
public function PauseButton(){
pauseIconClass = PauseButton_pauseIconClass;
super();
}
public function init():void{
icon_pause = new pauseIconClass();
alpha = 0;
x = 369;
y = 200;
addChild(icon_pause);
addEventListener(MouseEvent.MOUSE_OVER, mouseOverIcon);
addEventListener(MouseEvent.MOUSE_OUT, mouseOffIcon);
addEventListener(MouseEvent.MOUSE_DOWN, iconClicked);
addEventListener(Event.ENTER_FRAME, step);
}
private function mouseOffIcon(_arg1:MouseEvent):void{
var _local2:ColorTransform;
_local2 = this.transform.colorTransform;
_local2.blueMultiplier = (_local2.redMultiplier = (_local2.greenMultiplier = 1));
this.transform.colorTransform = _local2;
}
private function mouseOverIcon(_arg1:MouseEvent):void{
if (this.alpha >= 1){
PlaySample.playSound(PlaySample.SOUND_OVER_ICON, 1);
};
}
private function iconClicked(_arg1:MouseEvent):void{
trace("iconClicked");
switch (Bomboozle.game_state){
case Bomboozle.GAME_STATE_GAME:
PlaySample.playSound(PlaySample.SOUND_SELECT, 0);
Bomboozle.game_state = Bomboozle.GAME_STATE_PAUSED;
break;
};
}
public function step(_arg1:Event):void{
switch (Bomboozle.game_state){
case Bomboozle.GAME_STATE_GAME:
if (this.alpha < 1){
this.alpha = (this.alpha + Bomboozle.FADE_SPEED);
};
break;
default:
if (this.alpha > 0){
this.alpha = (this.alpha - Bomboozle.FADE_SPEED);
};
break;
};
this.mouseEnabled = (this.alpha >= 1);
this.visible = (this.alpha > 0);
}
}
}//package
Section 89
//PauseButton_pauseIconClass (PauseButton_pauseIconClass)
package {
import mx.core.*;
public class PauseButton_pauseIconClass extends BitmapAsset {
}
}//package
Section 90
//PlaySample (PlaySample)
package {
import flash.media.*;
public class PlaySample {
private var _sound_dev_logo_Class:Class;
private var _sound_ready_Class:Class;
private var _sound_go_Class:Class;
private var _sound_bomb_awarded_Class:Class;
private var _sound_blob_explosion_Class:Class;
private var _sound_deactivate_Class:Class;
private var _sound_bomb_explosion_Class:Class;
private var _sound_activate_Class:Class;
private var _sound_add_blob_Class:Class;
private var _sound_select_Class:Class;
private var _sound_over_icon_Class:Class;
private var _sound_start_game_class:Class;
private var _sound_skull_drop_Class:Class;
public static const SOUND_SKULL_DROP:int = 11;
public static const SOUND_DEV_LOGO:int = 12;
public static const SOUND_START_GAME:int = 2;
public static const SOUND_BLOB_EXPLOSION:int = 3;
public static const SOUND_READY:int = 8;
public static const SOUND_OVER_ICON:int = 0;
public static const SOUND_GO:int = 9;
public static const SOUND_ACTIVATE:int = 4;
public static const SOUND_DEACTIVATE:int = 5;
public static const SOUND_SELECT:int = 1;
public static const SOUND_BOMB_AWARDED:int = 10;
public static const SOUND_ADD_BLOB:int = 7;
public static const SOUND_BOMB_EXPLOSION:int = 6;
public static var _sound_deactivate:Sound;
public static var _sound_blob_explosion:Sound;
public static var _sound_select:Sound;
public static var _sound_over_icon:Sound;
public static var _sound_skull_drop:Sound;
public static var _sound_ready:Sound;
public static var _sound_start_game:Sound;
public static var _sound_activate:Sound;
public static var _sound_bomb_explosion:Sound;
public static var _sound_add_blob:Sound;
public static var _channel:SoundChannel;
public static var _sound_dev_logo:Sound;
public static var _transform:SoundTransform;
public static var _sound_bomb_awarded:Sound;
public static var _sound_go:Sound;
public function PlaySample(){
_sound_over_icon_Class = PlaySample__sound_over_icon_Class;
_sound_select_Class = PlaySample__sound_select_Class;
_sound_start_game_class = PlaySample__sound_start_game_class;
_sound_blob_explosion_Class = PlaySample__sound_blob_explosion_Class;
_sound_activate_Class = PlaySample__sound_activate_Class;
_sound_deactivate_Class = PlaySample__sound_deactivate_Class;
_sound_bomb_explosion_Class = PlaySample__sound_bomb_explosion_Class;
_sound_add_blob_Class = PlaySample__sound_add_blob_Class;
_sound_ready_Class = PlaySample__sound_ready_Class;
_sound_go_Class = PlaySample__sound_go_Class;
_sound_bomb_awarded_Class = PlaySample__sound_bomb_awarded_Class;
_sound_skull_drop_Class = PlaySample__sound_skull_drop_Class;
_sound_dev_logo_Class = PlaySample__sound_dev_logo_Class;
super();
if (Bomboozle.USE_EXTERNAL_AUDIO){
} else {
_sound_over_icon = new _sound_over_icon_Class();
_sound_select = new _sound_select_Class();
_sound_start_game = new _sound_start_game_class();
_sound_blob_explosion = new _sound_blob_explosion_Class();
_sound_activate = new _sound_activate_Class();
_sound_deactivate = new _sound_deactivate_Class();
_sound_bomb_explosion = new _sound_bomb_explosion_Class();
_sound_add_blob = new _sound_add_blob_Class();
_sound_ready = new _sound_ready_Class();
_sound_go = new _sound_go_Class();
_sound_bomb_awarded = new _sound_bomb_awarded_Class();
_sound_skull_drop = new _sound_skull_drop_Class();
_sound_dev_logo = new _sound_dev_logo_Class();
};
_transform = new SoundTransform();
}
public static function playSound(_arg1:int, _arg2:Number):void{
if (Bomboozle.sound_volume > 0){
_transform.volume = Bomboozle.sound_volume;
_transform.pan = _arg2;
switch (_arg1){
case SOUND_OVER_ICON:
_channel = _sound_over_icon.play(0, 0);
break;
case SOUND_SELECT:
_channel = _sound_select.play(0, 0);
break;
case SOUND_START_GAME:
_channel = _sound_start_game.play(0, 0);
break;
case SOUND_BLOB_EXPLOSION:
_channel = _sound_blob_explosion.play(0, 0);
break;
case SOUND_ACTIVATE:
_channel = _sound_activate.play(0, 0);
break;
case SOUND_DEACTIVATE:
_channel = _sound_deactivate.play(0, 0);
break;
case SOUND_BOMB_EXPLOSION:
_channel = _sound_bomb_explosion.play(0, 0);
break;
case SOUND_ADD_BLOB:
_channel = _sound_add_blob.play(0, 0);
break;
case SOUND_READY:
_channel = _sound_ready.play(0, 0);
break;
case SOUND_GO:
_channel = _sound_go.play(0, 0);
break;
case SOUND_BOMB_AWARDED:
_channel = _sound_bomb_awarded.play(0, 0);
break;
case SOUND_SKULL_DROP:
_channel = _sound_skull_drop.play(0, 0);
break;
case SOUND_DEV_LOGO:
_channel = _sound_dev_logo.play(0, 0);
break;
};
_channel.soundTransform = _transform;
};
}
}
}//package
Section 91
//PlaySample__sound_activate_Class (PlaySample__sound_activate_Class)
package {
import mx.core.*;
public class PlaySample__sound_activate_Class extends SoundAsset {
}
}//package
Section 92
//PlaySample__sound_add_blob_Class (PlaySample__sound_add_blob_Class)
package {
import mx.core.*;
public class PlaySample__sound_add_blob_Class extends SoundAsset {
}
}//package
Section 93
//PlaySample__sound_blob_explosion_Class (PlaySample__sound_blob_explosion_Class)
package {
import mx.core.*;
public class PlaySample__sound_blob_explosion_Class extends SoundAsset {
}
}//package
Section 94
//PlaySample__sound_bomb_awarded_Class (PlaySample__sound_bomb_awarded_Class)
package {
import mx.core.*;
public class PlaySample__sound_bomb_awarded_Class extends SoundAsset {
}
}//package
Section 95
//PlaySample__sound_bomb_explosion_Class (PlaySample__sound_bomb_explosion_Class)
package {
import mx.core.*;
public class PlaySample__sound_bomb_explosion_Class extends SoundAsset {
}
}//package
Section 96
//PlaySample__sound_deactivate_Class (PlaySample__sound_deactivate_Class)
package {
import mx.core.*;
public class PlaySample__sound_deactivate_Class extends SoundAsset {
}
}//package
Section 97
//PlaySample__sound_dev_logo_Class (PlaySample__sound_dev_logo_Class)
package {
import mx.core.*;
public class PlaySample__sound_dev_logo_Class extends SoundAsset {
}
}//package
Section 98
//PlaySample__sound_go_Class (PlaySample__sound_go_Class)
package {
import mx.core.*;
public class PlaySample__sound_go_Class extends SoundAsset {
}
}//package
Section 99
//PlaySample__sound_over_icon_Class (PlaySample__sound_over_icon_Class)
package {
import mx.core.*;
public class PlaySample__sound_over_icon_Class extends SoundAsset {
}
}//package
Section 100
//PlaySample__sound_ready_Class (PlaySample__sound_ready_Class)
package {
import mx.core.*;
public class PlaySample__sound_ready_Class extends SoundAsset {
}
}//package
Section 101
//PlaySample__sound_select_Class (PlaySample__sound_select_Class)
package {
import mx.core.*;
public class PlaySample__sound_select_Class extends SoundAsset {
}
}//package
Section 102
//PlaySample__sound_skull_drop_Class (PlaySample__sound_skull_drop_Class)
package {
import mx.core.*;
public class PlaySample__sound_skull_drop_Class extends SoundAsset {
}
}//package
Section 103
//PlaySample__sound_start_game_class (PlaySample__sound_start_game_class)
package {
import mx.core.*;
public class PlaySample__sound_start_game_class extends SoundAsset {
}
}//package
Section 104
//ProgressBar (ProgressBar)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.net.*;
public class ProgressBar extends Sprite {
public static var _sound:Sound;
public static var _channel:SoundChannel;
public static var theme_playing:Boolean;
public static var _transform:SoundTransform;
public static var finished_loading:Boolean;
public function ProgressBar(){
super();
finished_loading = false;
theme_playing = false;
try {
if (Bomboozle.USE_EXTERNAL_AUDIO){
_sound = new Sound(new URLRequest("bomboozle.mp3"));
} else {
if (Bomboozle.MOCHIADS_VERSION){
_sound = new Sound(new URLRequest("http://games.mochiads.com/c/g/bomboozle/bomboozle.mp3"));
} else {
if (Bomboozle.KONGREGATE_VERSION){
_sound = new Sound(new URLRequest("bomboozle.mp3"));
};
};
};
addEventListener(Event.ENTER_FRAME, step);
} catch(errObject:Error) {
trace(("Error: " + errObject.message));
};
}
public function step(_arg1:Event):void{
var loaded:int;
var total:int;
var event = _arg1;
try {
if (!finished_loading){
trace("loading sound...");
loaded = _sound.bytesLoaded;
total = _sound.bytesTotal;
if (loaded >= total){
finished_loading = true;
};
} else {
switch (Bomboozle.game_state){
case Bomboozle.GAME_STATE_SHOW_MOCHIAD:
case Bomboozle.GAME_STATE_DEV_LOGO:
break;
default:
if (!theme_playing){
trace("play the theme!");
_channel = _sound.play(0, int.MAX_VALUE);
_transform = new SoundTransform();
_transform.volume = Bomboozle.music_volume;
_channel.soundTransform = _transform;
theme_playing = true;
};
break;
};
};
} catch(errObject:Error) {
trace(("Error: " + errObject.message));
};
}
}
}//package
Section 105
//Sparkle (Sparkle)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class Sparkle extends Sprite {
public var matrix:Matrix;
private var sparkle_image_class:Class;
public static var sparkle_scale:Number = 0;
public static var sparkle_rotation:Number = 0;
public static var sparkle_x:Number;
public static var sparkle_y:Number;
public static var sparkle_image:Bitmap;
public static var sparkle_rotation_dir:Number = 0;
public static var sparkle_bitmap:BitmapData;
public function Sparkle(){
matrix = new Matrix();
sparkle_image_class = Sparkle_sparkle_image_class;
super();
sparkle_image = new sparkle_image_class();
mouseEnabled = false;
init();
addEventListener(Event.ENTER_FRAME, step);
}
public function placeSparkle():void{
sparkle_x = (Logo.logo.x + (Math.random() * Logo.logo.width));
sparkle_y = (Logo.logo.y + (Math.random() * Logo.logo.height));
sparkle_scale = 1;
sparkle_rotation_dir = ((Math.random() < 0.5)) ? -0.1 : 0.1;
}
public function drawSparkle(_arg1:Number, _arg2:Number):void{
graphics.clear();
matrix = new Matrix();
matrix.translate(-((sparkle_bitmap.width / 2)), -((sparkle_bitmap.height / 2)));
matrix.rotate(sparkle_rotation);
matrix.scale(sparkle_scale, sparkle_scale);
matrix.translate(_arg1, _arg2);
_arg1 = (_arg1 - (sparkle_bitmap.width / 2));
_arg2 = (_arg2 - (sparkle_bitmap.height / 2));
graphics.beginBitmapFill(sparkle_bitmap, matrix, false, false);
graphics.drawRect(_arg1, _arg2, sparkle_bitmap.width, sparkle_bitmap.height);
graphics.endFill();
}
public function step(_arg1:Event):void{
switch (Bomboozle.game_state){
case Bomboozle.GAME_STATE_TITLE:
visible = true;
sparkle_rotation = (sparkle_rotation + sparkle_rotation_dir);
drawSparkle(sparkle_x, sparkle_y);
sparkle_scale = (sparkle_scale - 0.04);
if (sparkle_scale <= 0){
placeSparkle();
};
break;
default:
visible = false;
break;
};
}
public static function init():void{
sparkle_bitmap = new BitmapData(sparkle_image.width, sparkle_image.height, true, 0xFFFFFF);
sparkle_bitmap.draw(sparkle_image, new Matrix());
}
}
}//package
Section 106
//Sparkle_sparkle_image_class (Sparkle_sparkle_image_class)
package {
import mx.core.*;
public class Sparkle_sparkle_image_class extends BitmapAsset {
}
}//package
Section 107
//Tutorial (Tutorial)
package {
import flash.events.*;
import flash.display.*;
public class Tutorial extends Sprite {
private var tutorial_1_class:Class;
private var tutorial_image:Bitmap;
private var tutorial_2_class:Class;
private var tutorial_3_class:Class;
private var tutorial_0_class:Class;
private var tutorial_4_class:Class;
private var page_id:int;
public function Tutorial(){
tutorial_0_class = Tutorial_tutorial_0_class;
tutorial_1_class = Tutorial_tutorial_1_class;
tutorial_2_class = Tutorial_tutorial_2_class;
tutorial_3_class = Tutorial_tutorial_3_class;
tutorial_4_class = Tutorial_tutorial_4_class;
super();
}
public function init(_arg1:int):void{
switch (_arg1){
case 0:
this.tutorial_image = new tutorial_0_class();
break;
case 1:
this.tutorial_image = new tutorial_1_class();
break;
case 2:
this.tutorial_image = new tutorial_2_class();
break;
case 3:
this.tutorial_image = new tutorial_3_class();
break;
case 4:
this.tutorial_image = new tutorial_4_class();
break;
};
this.page_id = _arg1;
this.x = (stage.stageWidth * 1.5);
this.y = ((stage.stageHeight * 0.35) - (this.tutorial_image.height / 2));
this.mouseEnabled = true;
addChild(this.tutorial_image);
addEventListener(Event.ENTER_FRAME, step);
}
public function step(_arg1:Event):void{
if (this.visible){
switch (Bomboozle.game_state){
case Bomboozle.GAME_STATE_TUTORIAL:
if (Bomboozle.tutorial_page == this.page_id){
if (this.x > ((stage.stageWidth / 2) - (this.width / 2))){
this.x = (this.x - ((this.x - ((stage.stageWidth / 2) - (this.width / 2))) / 4));
};
} else {
if ((((this.page_id < Bomboozle.tutorial_page)) && ((this.x > -(this.width))))){
this.x = (this.x - ((this.x - (-(this.width) * 1.1)) / 4));
if (this.x < -(this.width)){
this.visible = false;
};
};
};
break;
case Bomboozle.GAME_STATE_GAME:
if (this.alpha > 0){
this.alpha = (this.alpha - Bomboozle.FADE_SPEED);
} else {
this.visible = false;
};
break;
default:
break;
};
};
}
}
}//package
Section 108
//Tutorial_tutorial_0_class (Tutorial_tutorial_0_class)
package {
import mx.core.*;
public class Tutorial_tutorial_0_class extends BitmapAsset {
}
}//package
Section 109
//Tutorial_tutorial_1_class (Tutorial_tutorial_1_class)
package {
import mx.core.*;
public class Tutorial_tutorial_1_class extends BitmapAsset {
}
}//package
Section 110
//Tutorial_tutorial_2_class (Tutorial_tutorial_2_class)
package {
import mx.core.*;
public class Tutorial_tutorial_2_class extends BitmapAsset {
}
}//package
Section 111
//Tutorial_tutorial_3_class (Tutorial_tutorial_3_class)
package {
import mx.core.*;
public class Tutorial_tutorial_3_class extends BitmapAsset {
}
}//package
Section 112
//Tutorial_tutorial_4_class (Tutorial_tutorial_4_class)
package {
import mx.core.*;
public class Tutorial_tutorial_4_class extends BitmapAsset {
}
}//package
Section 113
//WingedBox (WingedBox)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class WingedBox extends Sprite {
private var wing_small_image_class:Class;
private var bonus_border_right_image_class:Class;
private var bonus_border_left_image_class:Class;
public static const WING_FRAMES:int = 4;
public static var bonus_border_left_bitmapdata:BitmapData;
public static var WING_WIDTH:int = 0;
public static var wing_small_bitmapdata:BitmapData;
public static var bonus_border_right_bitmapdata:BitmapData;
public static var wing_small_image:Bitmap;
public static var WING_HEIGHT:int = 0;
public static var bonus_border_right_image:Bitmap;
public static var bonus_border_left_image:Bitmap;
public static var wing_frame:int = 0;
public static var _mtx:Matrix;
public function WingedBox(){
bonus_border_left_image_class = WingedBox_bonus_border_left_image_class;
bonus_border_right_image_class = WingedBox_bonus_border_right_image_class;
wing_small_image_class = WingedBox_wing_small_image_class;
super();
bonus_border_left_image = new bonus_border_left_image_class();
bonus_border_right_image = new bonus_border_right_image_class();
wing_small_image = new wing_small_image_class();
WING_WIDTH = (wing_small_image.width / WING_FRAMES);
WING_HEIGHT = (wing_small_image.height / 2);
mouseEnabled = false;
visible = false;
}
public function init():void{
bonus_border_left_bitmapdata = new BitmapData(bonus_border_left_image.width, bonus_border_left_image.height, true, 0xFFFFFF);
bonus_border_left_bitmapdata.draw(bonus_border_left_image, new Matrix());
bonus_border_right_bitmapdata = new BitmapData(bonus_border_right_image.width, bonus_border_right_image.height, true, 0xFFFFFF);
bonus_border_right_bitmapdata.draw(bonus_border_right_image, new Matrix());
wing_small_bitmapdata = new BitmapData(wing_small_image.width, wing_small_image.height, true, 0xFFFFFF);
wing_small_bitmapdata.draw(wing_small_image, new Matrix());
addEventListener(Event.ENTER_FRAME, step);
}
public function step(_arg1:Event):void{
if (((((Blocks.ticks % 3) == 0)) && ((++wing_frame >= WING_FRAMES)))){
wing_frame = 0;
};
}
public static function drawBox(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:int):void{
var _local6:int;
var _local7:int;
_local6 = bonus_border_left_image.height;
_arg2 = (_arg2 - (_arg4 / 2));
_arg1.beginFill(6238856);
_arg1.drawRect(_arg2, _arg3, _arg4, _local6);
_arg1.endFill();
_arg1.beginFill(46534);
_arg1.drawRect(_arg2, (_arg3 + 3), _arg4, (_local6 - 6));
_arg1.endFill();
_mtx = new Matrix();
_mtx.translate((_arg2 - bonus_border_left_image.width), _arg3);
_arg1.beginBitmapFill(bonus_border_left_bitmapdata, _mtx, false, false);
_arg1.drawRect((_arg2 - bonus_border_left_image.width), _arg3, bonus_border_left_image.width, _local6);
_arg1.endFill();
_mtx = new Matrix();
_mtx.translate((_arg2 + _arg4), _arg3);
_arg1.beginBitmapFill(bonus_border_right_bitmapdata, _mtx, false, false);
_arg1.drawRect((_arg2 + _arg4), _arg3, bonus_border_right_image.width, _local6);
_arg1.endFill();
_arg1.lineStyle();
if (_arg5 > -1){
_mtx = new Matrix();
_local7 = 0;
while (_local7 < 2) {
if (_local7 > 0){
_mtx = new Matrix();
};
_mtx.translate(((_arg2 + ((_local7 == 0)) ? -(WING_WIDTH) : _arg4) - (wing_frame * WING_WIDTH)), (_arg3 - (_local7 * WING_HEIGHT)));
_arg1.beginBitmapFill(wing_small_bitmapdata, _mtx, false, false);
_arg1.drawRect((_arg2 + ((_local7 == 0)) ? -(WING_WIDTH) : _arg4), _arg3, WING_WIDTH, WING_HEIGHT);
_local7++;
};
};
_arg1.endFill();
}
}
}//package
Section 114
//WingedBox_bonus_border_left_image_class (WingedBox_bonus_border_left_image_class)
package {
import mx.core.*;
public class WingedBox_bonus_border_left_image_class extends BitmapAsset {
}
}//package
Section 115
//WingedBox_bonus_border_right_image_class (WingedBox_bonus_border_right_image_class)
package {
import mx.core.*;
public class WingedBox_bonus_border_right_image_class extends BitmapAsset {
}
}//package
Section 116
//WingedBox_wing_small_image_class (WingedBox_wing_small_image_class)
package {
import mx.core.*;
public class WingedBox_wing_small_image_class extends BitmapAsset {
}
}//package