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();
} 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)){
} 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");
}
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();
}
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.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiServices {
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _swfVersion:String;
private static var _sendChannel:LocalConnection;
private static var _rcvChannelName:String;
private static var _gatewayURL:String = "http://www.mochiads.com/static/lib/services/services.swf";
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _id:String;
private static var _listenChannel:LocalConnection;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _startTime:Number;
private static var _connecting:Boolean = false;
public static var onError:Object;
private static var _listenChannelName:String = "__mochiservices";
private static var _rcvChannel:LocalConnection;
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
onError("NotConnected");
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
};
if (_clip != null){
if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){
_clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_clip._nextcallbackID++;
};
};
}
public static function get connected():Boolean{
return (_connected);
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (_clip != null){
if (_clip._queue != null){
while (_clip._queue.length > 0) {
_local2 = _clip._queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _clip._callbacks[_local2.callbackID];
};
delete _clip._callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
};
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
public static function get childClip():Object{
return (_clip);
}
public static function get id():String{
return (_id);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function getVersion():String{
return ("1.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
//_x16_33 (popthree1_fla._x16_33)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class _x16_33 extends MovieClip {
public function _x16_33(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package popthree1_fla
Section 4
//_x2_25 (popthree1_fla._x2_25)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class _x2_25 extends MovieClip {
public function _x2_25(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package popthree1_fla
Section 5
//_x32_35 (popthree1_fla._x32_35)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class _x32_35 extends MovieClip {
public function _x32_35(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package popthree1_fla
Section 6
//_x4_29 (popthree1_fla._x4_29)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class _x4_29 extends MovieClip {
public function _x4_29(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package popthree1_fla
Section 7
//_x8_31 (popthree1_fla._x8_31)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class _x8_31 extends MovieClip {
public function _x8_31(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package popthree1_fla
Section 8
//amazing__45 (popthree1_fla.amazing__45)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class amazing__45 extends MovieClip {
public function amazing__45(){
addFrameScript(9, frame10);
}
function frame10(){
gotoAndPlay(1);
}
}
}//package popthree1_fla
Section 9
//areyousure_57 (popthree1_fla.areyousure_57)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class areyousure_57 extends MovieClip {
public var confirmquit:SimpleButton;
public var cancelquit:SimpleButton;
public function areyousure_57(){
addFrameScript(0, frame1);
}
function frame1(){
confirmquit.addEventListener(MouseEvent.CLICK, quitgame);
cancelquit.addEventListener(MouseEvent.CLICK, cancel);
}
public function cancel(_arg1:Event){
parent.gotoAndStop(1);
parent.parent.paused = false;
}
public function quitgame(_arg1:Event){
parent.gotoAndStop(1);
parent.parent.yesimsure();
}
}
}//package popthree1_fla
Section 10
//areyousureyesno_56 (popthree1_fla.areyousureyesno_56)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class areyousureyesno_56 extends MovieClip {
public function areyousureyesno_56(){
addFrameScript(0, frame1, 16, frame17);
}
function frame1(){
stop();
}
function frame17(){
stop();
}
}
}//package popthree1_fla
Section 11
//awesome__43 (popthree1_fla.awesome__43)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class awesome__43 extends MovieClip {
public function awesome__43(){
addFrameScript(11, frame12);
}
function frame12(){
gotoAndPlay(1);
}
}
}//package popthree1_fla
Section 12
//b1_103 (popthree1_fla.b1_103)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class b1_103 extends MovieClip {
public var specialmc:MovieClip;
public function b1_103(){
addFrameScript(0, frame1, 1, frame2, 61, frame62, 65, frame66);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame62(){
gotoAndPlay("rollover");
}
function frame66(){
stop();
}
}
}//package popthree1_fla
Section 13
//b2_114 (popthree1_fla.b2_114)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class b2_114 extends MovieClip {
public var specialmc:MovieClip;
public function b2_114(){
addFrameScript(0, frame1, 1, frame2, 61, frame62, 65, frame66);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame62(){
gotoAndPlay("rollover");
}
function frame66(){
stop();
}
}
}//package popthree1_fla
Section 14
//b3_116 (popthree1_fla.b3_116)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class b3_116 extends MovieClip {
public var specialmc:MovieClip;
public function b3_116(){
addFrameScript(0, frame1, 1, frame2, 61, frame62, 65, frame66);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame62(){
gotoAndPlay("rollover");
}
function frame66(){
stop();
}
}
}//package popthree1_fla
Section 15
//b4_118 (popthree1_fla.b4_118)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class b4_118 extends MovieClip {
public var specialmc:MovieClip;
public function b4_118(){
addFrameScript(0, frame1, 1, frame2, 61, frame62, 65, frame66);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame62(){
gotoAndPlay("rollover");
}
function frame66(){
stop();
}
}
}//package popthree1_fla
Section 16
//b5_121 (popthree1_fla.b5_121)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class b5_121 extends MovieClip {
public var specialmc:MovieClip;
public function b5_121(){
addFrameScript(0, frame1, 1, frame2, 61, frame62, 65, frame66);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame62(){
gotoAndPlay("rollover");
}
function frame66(){
stop();
}
}
}//package popthree1_fla
Section 17
//b6_124 (popthree1_fla.b6_124)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class b6_124 extends MovieClip {
public var specialmc:MovieClip;
public function b6_124(){
addFrameScript(0, frame1, 1, frame2, 61, frame62, 65, frame66);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame62(){
gotoAndPlay("rollover");
}
function frame66(){
stop();
}
}
}//package popthree1_fla
Section 18
//b7_128 (popthree1_fla.b7_128)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class b7_128 extends MovieClip {
public var specialmc:MovieClip;
public function b7_128(){
addFrameScript(0, frame1, 1, frame2, 61, frame62, 65, frame66);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame62(){
gotoAndPlay("rollover");
}
function frame66(){
stop();
}
}
}//package popthree1_fla
Section 19
//b8_131 (popthree1_fla.b8_131)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class b8_131 extends MovieClip {
public function b8_131(){
addFrameScript(0, frame1, 1, frame2, 61, frame62, 65, frame66);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame62(){
gotoAndPlay("rollover");
}
function frame66(){
stop();
}
}
}//package popthree1_fla
Section 20
//balloonmove8_130 (popthree1_fla.balloonmove8_130)
package popthree1_fla {
import flash.display.*;
public dynamic class balloonmove8_130 extends MovieClip {
public var inner:MovieClip;
}
}//package popthree1_fla
Section 21
//baloonmove1_102 (popthree1_fla.baloonmove1_102)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class baloonmove1_102 extends MovieClip {
public var inner:MovieClip;
public var a:int;
public function baloonmove1_102(){
addFrameScript(1, frame2, 2, frame3);
}
function frame3(){
a = (int((Math.random() * 4)) + 1);
switch (a){
case 1:
gotoAndPlay("seq1");
break;
case 2:
gotoAndPlay("seq2");
break;
case 3:
gotoAndPlay("seq3");
break;
case 4:
gotoAndPlay("seq4");
break;
};
stop();
}
function frame2(){
inner.specialmc.gotoAndStop((MovieClip(parent.parent).specialType + 1));
}
}
}//package popthree1_fla
Section 22
//baloonmove2_113 (popthree1_fla.baloonmove2_113)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class baloonmove2_113 extends MovieClip {
public var inner:MovieClip;
public var a:int;
public function baloonmove2_113(){
addFrameScript(1, frame2, 2, frame3, 87, frame88);
}
function frame88(){
gotoAndPlay(3);
}
function frame3(){
a = (int((Math.random() * 4)) + 1);
switch (a){
case 1:
gotoAndPlay("seq1");
break;
case 2:
gotoAndPlay("seq2");
break;
case 3:
gotoAndPlay("seq3");
break;
case 4:
gotoAndPlay("seq4");
break;
};
stop();
}
function frame2(){
inner.specialmc.gotoAndStop((MovieClip(parent.parent).specialType + 1));
}
}
}//package popthree1_fla
Section 23
//baloonmove3copy_115 (popthree1_fla.baloonmove3copy_115)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class baloonmove3copy_115 extends MovieClip {
public var inner:MovieClip;
public var a:int;
public function baloonmove3copy_115(){
addFrameScript(1, frame2, 2, frame3);
}
function frame3(){
a = (int((Math.random() * 4)) + 1);
switch (a){
case 1:
gotoAndPlay("seq1");
break;
case 2:
gotoAndPlay("seq2");
break;
case 3:
gotoAndPlay("seq3");
break;
case 4:
gotoAndPlay("seq4");
break;
};
stop();
}
function frame2(){
inner.specialmc.gotoAndStop((MovieClip(parent.parent).specialType + 1));
}
}
}//package popthree1_fla
Section 24
//baloonmove4_117 (popthree1_fla.baloonmove4_117)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class baloonmove4_117 extends MovieClip {
public var inner:MovieClip;
public var a:int;
public function baloonmove4_117(){
addFrameScript(1, frame2, 2, frame3);
}
function frame3(){
a = (int((Math.random() * 4)) + 1);
switch (a){
case 1:
gotoAndPlay("seq1");
break;
case 2:
gotoAndPlay("seq2");
break;
case 3:
gotoAndPlay("seq3");
break;
case 4:
gotoAndPlay("seq4");
break;
};
stop();
}
function frame2(){
inner.specialmc.gotoAndStop((MovieClip(parent.parent).specialType + 1));
}
}
}//package popthree1_fla
Section 25
//baloonmove5_120 (popthree1_fla.baloonmove5_120)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class baloonmove5_120 extends MovieClip {
public var inner:MovieClip;
public var a:int;
public function baloonmove5_120(){
addFrameScript(1, frame2, 2, frame3);
}
function frame3(){
a = (int((Math.random() * 4)) + 1);
switch (a){
case 1:
gotoAndPlay("seq1");
break;
case 2:
gotoAndPlay("seq2");
break;
case 3:
gotoAndPlay("seq3");
break;
case 4:
gotoAndPlay("seq4");
break;
};
stop();
}
function frame2(){
inner.specialmc.gotoAndStop((MovieClip(parent.parent).specialType + 1));
}
}
}//package popthree1_fla
Section 26
//baloonmove6_123 (popthree1_fla.baloonmove6_123)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class baloonmove6_123 extends MovieClip {
public var inner:MovieClip;
public var a:int;
public function baloonmove6_123(){
addFrameScript(1, frame2, 2, frame3);
}
function frame3(){
a = (int((Math.random() * 4)) + 1);
switch (a){
case 1:
gotoAndPlay("seq1");
break;
case 2:
gotoAndPlay("seq2");
break;
case 3:
gotoAndPlay("seq3");
break;
case 4:
gotoAndPlay("seq4");
break;
};
stop();
}
function frame2(){
inner.specialmc.gotoAndStop((MovieClip(parent.parent).specialType + 1));
}
}
}//package popthree1_fla
Section 27
//baloonmove7_127 (popthree1_fla.baloonmove7_127)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class baloonmove7_127 extends MovieClip {
public var inner:MovieClip;
public var a:int;
public function baloonmove7_127(){
addFrameScript(1, frame2, 2, frame3, 87, frame88);
}
function frame88(){
gotoAndPlay(3);
}
function frame3(){
a = (int((Math.random() * 4)) + 1);
switch (a){
case 1:
gotoAndPlay("seq1");
break;
case 2:
gotoAndPlay("seq2");
break;
case 3:
gotoAndPlay("seq3");
break;
case 4:
gotoAndPlay("seq4");
break;
};
stop();
}
function frame2(){
inner.specialmc.gotoAndStop((MovieClip(parent.parent).specialType + 1));
}
}
}//package popthree1_fla
Section 28
//basecolours_101 (popthree1_fla.basecolours_101)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class basecolours_101 extends MovieClip {
public var inner:MovieClip;
public function basecolours_101(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
}
}//package popthree1_fla
Section 29
//buy_a_hint_anim_81 (popthree1_fla.buy_a_hint_anim_81)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class buy_a_hint_anim_81 extends MovieClip {
public function buy_a_hint_anim_81(){
addFrameScript(0, frame1, 10, frame11, 16, frame17, 28, frame29);
}
function frame1(){
stop();
}
function frame17(){
stop();
}
function frame29(){
parent.scoreGlow();
}
function frame11(){
stop();
}
}
}//package popthree1_fla
Section 30
//endgame_53 (popthree1_fla.endgame_53)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class endgame_53 extends MovieClip {
public var startagain:SimpleButton;
public var submitscore:SimpleButton;
public function endgame_53(){
addFrameScript(0, frame1);
}
public function submit(_arg1:Event){
parent.parent.doHighScore();
parent.parent.resetGame();
}
public function startover(_arg1:Event){
parent.gotoAndStop(1);
parent.parent.resetGame();
}
function frame1(){
submitscore.addEventListener(MouseEvent.CLICK, submit);
startagain.addEventListener(MouseEvent.CLICK, startover);
}
}
}//package popthree1_fla
Section 31
//endgamesnd_19 (popthree1_fla.endgamesnd_19)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class endgamesnd_19 extends MovieClip {
public function endgamesnd_19(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package popthree1_fla
Section 32
//engame_91 (popthree1_fla.engame_91)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class engame_91 extends MovieClip {
public function engame_91(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package popthree1_fla
Section 33
//filtered_88 (popthree1_fla.filtered_88)
package popthree1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class filtered_88 extends MovieClip {
public var scoreDisplay:TextField;
}
}//package popthree1_fla
Section 34
//gameover_52 (popthree1_fla.gameover_52)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class gameover_52 extends MovieClip {
public function gameover_52(){
addFrameScript(0, frame1, 16, frame17);
}
function frame1(){
stop();
}
function frame17(){
stop();
}
}
}//package popthree1_fla
Section 35
//instructions_60 (popthree1_fla.instructions_60)
package popthree1_fla {
import flash.display.*;
public dynamic class instructions_60 extends MovieClip {
public var startButton:MovieClip;
}
}//package popthree1_fla
Section 36
//intro_2 (popthree1_fla.intro_2)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class intro_2 extends MovieClip {
public var done;
public function intro_2(){
addFrameScript(0, frame1, 116, frame117);
}
function frame1(){
done = false;
}
function frame117(){
stop();
done = true;
}
}
}//package popthree1_fla
Section 37
//kernal1_1_144 (popthree1_fla.kernal1_1_144)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class kernal1_1_144 extends MovieClip {
public function kernal1_1_144(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
}
function frame19(){
stop();
}
}
}//package popthree1_fla
Section 38
//kernal1_2_141 (popthree1_fla.kernal1_2_141)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class kernal1_2_141 extends MovieClip {
public function kernal1_2_141(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
}
function frame19(){
stop();
}
}
}//package popthree1_fla
Section 39
//kernal1_3_139 (popthree1_fla.kernal1_3_139)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class kernal1_3_139 extends MovieClip {
public function kernal1_3_139(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
}
function frame19(){
stop();
}
}
}//package popthree1_fla
Section 40
//kernal1_4_136 (popthree1_fla.kernal1_4_136)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class kernal1_4_136 extends MovieClip {
public function kernal1_4_136(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
}
function frame19(){
stop();
}
}
}//package popthree1_fla
Section 41
//Light_97 (popthree1_fla.Light_97)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class Light_97 extends MovieClip {
public function Light_97(){
addFrameScript(0, frame1, 49, frame50);
}
function frame1(){
}
function frame50(){
stop();
}
}
}//package popthree1_fla
Section 42
//Light2_98 (popthree1_fla.Light2_98)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class Light2_98 extends MovieClip {
public function Light2_98(){
addFrameScript(0, frame1, 35, frame36);
}
function frame1(){
}
function frame36(){
stop();
parent.parent.parent.removeSpecial(parent);
}
}
}//package popthree1_fla
Section 43
//mask_68 (popthree1_fla.mask_68)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class mask_68 extends MovieClip {
public function mask_68(){
addFrameScript(60, frame61);
}
function frame61(){
gotoAndPlay(1);
}
}
}//package popthree1_fla
Section 44
//maskcopy_70 (popthree1_fla.maskcopy_70)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class maskcopy_70 extends MovieClip {
public function maskcopy_70(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package popthree1_fla
Section 45
//moregames_90 (popthree1_fla.moregames_90)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class moregames_90 extends MovieClip {
public function moregames_90(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package popthree1_fla
Section 46
//music_20 (popthree1_fla.music_20)
package popthree1_fla {
import flash.display.*;
public dynamic class music_20 extends MovieClip {
public var musicmain:MovieClip;
}
}//package popthree1_fla
Section 47
//music2_21 (popthree1_fla.music2_21)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class music2_21 extends MovieClip {
public function music2_21(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package popthree1_fla
Section 48
//musicToggle_24 (popthree1_fla.musicToggle_24)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class musicToggle_24 extends MovieClip {
public var newTransform:SoundTransform;
public function musicToggle_24(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
newTransform = new SoundTransform(1, 0);
MovieClip(parent.parent).music.soundTransform = newTransform;
}
function frame2(){
stop();
newTransform = new SoundTransform(0, 0);
MovieClip(parent.parent).music.soundTransform = newTransform;
}
}
}//package popthree1_fla
Section 49
//nomovesnd_18 (popthree1_fla.nomovesnd_18)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class nomovesnd_18 extends MovieClip {
public function nomovesnd_18(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package popthree1_fla
Section 50
//pop1_14 (popthree1_fla.pop1_14)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class pop1_14 extends MovieClip {
public function pop1_14(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package popthree1_fla
Section 51
//pop2_15 (popthree1_fla.pop2_15)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class pop2_15 extends MovieClip {
public function pop2_15(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package popthree1_fla
Section 52
//pop3_16 (popthree1_fla.pop3_16)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class pop3_16 extends MovieClip {
public function pop3_16(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package popthree1_fla
Section 53
//pop4_17 (popthree1_fla.pop4_17)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class pop4_17 extends MovieClip {
public function pop4_17(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package popthree1_fla
Section 54
//scoreDisplaymc_87 (popthree1_fla.scoreDisplaymc_87)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class scoreDisplaymc_87 extends MovieClip {
public var filtertext:MovieClip;
public function scoreDisplaymc_87(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package popthree1_fla
Section 55
//sndToggle_23 (popthree1_fla.sndToggle_23)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class sndToggle_23 extends MovieClip {
public var newTransform:SoundTransform;
public function sndToggle_23(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
newTransform = new SoundTransform(1, 0);
MovieClip(parent.parent).sounds.soundTransform = newTransform;
MovieClip(parent.parent).bloonholder.soundTransform = newTransform;
MovieClip(parent.parent).specialsholder.soundTransform = newTransform;
MovieClip(parent.parent).superlatives.soundTransform = newTransform;
}
function frame2(){
stop();
newTransform = new SoundTransform(0, 0);
MovieClip(parent.parent).sounds.soundTransform = newTransform;
MovieClip(parent.parent).bloonholder.soundTransform = newTransform;
MovieClip(parent.parent).specialsholder.soundTransform = newTransform;
MovieClip(parent.parent).superlatives.soundTransform = newTransform;
}
}
}//package popthree1_fla
Section 56
//soundControl_22 (popthree1_fla.soundControl_22)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class soundControl_22 extends MovieClip {
public var musToggle_mc:MovieClip;
public var sndToggle_mc:MovieClip;
public function soundControl_22(){
addFrameScript(0, frame1);
}
public function musToggle(_arg1:MouseEvent){
musToggle_mc.play();
}
public function sndToggle(_arg1:MouseEvent){
sndToggle_mc.play();
}
function frame1(){
sndToggle_mc.addEventListener(MouseEvent.CLICK, sndToggle);
musToggle_mc.addEventListener(MouseEvent.CLICK, musToggle);
}
}
}//package popthree1_fla
Section 57
//sounds_13 (popthree1_fla.sounds_13)
package popthree1_fla {
import flash.display.*;
public dynamic class sounds_13 extends MovieClip {
public var pop1:MovieClip;
public var pop2:MovieClip;
public var nomove:MovieClip;
public var pop3:MovieClip;
public var pop4:MovieClip;
public var gameover:MovieClip;
}
}//package popthree1_fla
Section 58
//specials_105 (popthree1_fla.specials_105)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class specials_105 extends MovieClip {
public function specials_105(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
}
}//package popthree1_fla
Section 59
//startagain_89 (popthree1_fla.startagain_89)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class startagain_89 extends MovieClip {
public function startagain_89(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package popthree1_fla
Section 60
//startbutton_71 (popthree1_fla.startbutton_71)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class startbutton_71 extends MovieClip {
public function startbutton_71(){
addFrameScript(0, frame1, 15, frame16, 26, frame27);
}
function frame16(){
stop();
}
function frame1(){
stop();
}
function frame27(){
stop();
}
}
}//package popthree1_fla
Section 61
//superlatives_37 (popthree1_fla.superlatives_37)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class superlatives_37 extends MovieClip {
public function superlatives_37(){
addFrameScript(0, frame1, 51, frame52, 101, frame102, 157, frame158, 206, frame207);
}
function frame158(){
gotoAndStop(1);
}
function frame207(){
gotoAndStop(1);
}
function frame102(){
gotoAndStop(1);
}
function frame1(){
stop();
}
function frame52(){
gotoAndStop(1);
}
}
}//package popthree1_fla
Section 62
//unbelievable__47 (popthree1_fla.unbelievable__47)
package popthree1_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class unbelievable__47 extends MovieClip {
public function unbelievable__47(){
addFrameScript(5, frame6);
}
function frame6(){
gotoAndPlay(1);
}
}
}//package popthree1_fla
Section 63
//ArialAbyMiecPewnosc (ArialAbyMiecPewnosc)
package {
import flash.text.*;
public dynamic class ArialAbyMiecPewnosc extends Font {
}
}//package
Section 64
//BasicButton (BasicButton)
package {
import flash.display.*;
public dynamic class BasicButton extends SimpleButton {
}
}//package
Section 65
//FpsCounter (FpsCounter)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
public class FpsCounter extends Sprite {
private var oldT:uint;
private var mfpsCount:int;// = 0
private var avgCount:int;// = 30
private var avgCount2:int;// = 30
private var textBox:TextField;
private var mfpsCount2:int;// = 0
private var textBox3:TextField;
private var textBox2:TextField;
public function FpsCounter(){
mfpsCount = 0;
mfpsCount2 = 0;
avgCount = 30;
avgCount2 = 30;
super();
textBox = new TextField();
textBox.text = "...";
textBox.textColor = 11145540;
textBox.selectable = false;
textBox2 = new TextField();
textBox2.text = "...";
textBox2.width = 150;
textBox2.textColor = 11145540;
textBox2.selectable = false;
textBox2.y = 15;
textBox3 = new TextField();
textBox3.text = "...";
textBox3.textColor = 11145540;
textBox3.selectable = false;
textBox3.y = 30;
oldT = getTimer();
addChild(textBox);
addChild(textBox2);
addChild(textBox3);
}
public function updateEnd():void{
}
public function updatePhys(_arg1:uint):void{
var _local2:uint;
var _local3:uint;
_local2 = getTimer();
_local3 = (_local2 - _arg1);
mfpsCount2 = (mfpsCount2 + _local3);
if (avgCount2 < 1){
textBox2.text = String((((("Physics step: " + Math.round((mfpsCount2 / 30))) + " ms (") + Math.round((1000 / (mfpsCount2 / 30)))) + " fps)"));
avgCount2 = 30;
mfpsCount2 = 0;
};
avgCount2--;
}
public function update():void{
var _local1:uint;
var _local2:uint;
_local1 = getTimer();
_local2 = (_local1 - oldT);
mfpsCount = (mfpsCount + _local2);
if (avgCount < 1){
textBox.text = String((Math.round((1000 / (mfpsCount / 30))) + " fps average"));
avgCount = 30;
mfpsCount = 0;
};
avgCount--;
oldT = getTimer();
textBox3.text = (Math.round((System.totalMemory / (0x0400 * 0x0400))) + " MB used");
}
}
}//package
Section 66
//LightSabre (LightSabre)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class LightSabre extends MovieClip {
public function LightSabre(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package
Section 67
//MatchThree (MatchThree)
package {
import flash.display.*;
import flash.events.*;
import mochi.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
public dynamic class MatchThree extends MovieClip {
private var totPieces:int;
public var buyhint:MovieClip;
private var endDest:int;
private var firstPiece:Piece;
public var music:MovieClip;
private var isDropping;
public var endbit:MovieClip;
public var startb:MovieClip;
private var hint:Piece;
public var x16:MovieClip;
public var bloonholder:MovieClip;
public var x2:MovieClip;
public var x4:MovieClip;
public var x8:MovieClip;
public var showhs:SimpleButton;
private var isSwapping:Boolean;
public var x32:MovieClip;
public var superlatives:MovieClip;
private var pointMult:int;
public var endb:MovieClip;
private var fps:FpsCounter;
public var specialsholder:MovieClip;
private var justPopped:Boolean;
public var paused:Boolean;
public var sounds:MovieClip;
private var grid:Array;
private var theTimer:Timer;
public var more:MovieClip;
private var gameSprite:Sprite;
public var prog;
public var scoreDisplaymc:MovieClip;
public var loadbar:MovieClip;
public var instructions:MovieClip;
public var introclip:MovieClip;
private var gameScore:int;
public var hintArrow:MovieClip;
public var areyousure:MovieClip;
public var gameoverpanel:MovieClip;
static const spacing:Number = 55;
static const offsetX:Number = 200;
static const numPieces:uint = 7;
static const offsetY:Number = 20;
public function MatchThree(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 8, frame9, 12, frame13, 13, frame14);
fps = new FpsCounter();
fps.x = 0;
fps.y = 0;
}
public function matchPattern(_arg1, _arg2:uint, _arg3, _arg4:Array){
var _local5:int;
var _local6:int;
_local5 = grid[_arg1][_arg2].type;
_local6 = 0;
while (_local6 < _arg3.length) {
if (!matchType((_arg1 + _arg3[_local6][0]), (_arg2 + _arg3[_local6][1]), _local5)){
return (false);
};
_local6++;
};
_local6 = 0;
while (_local6 < _arg4.length) {
if (matchType((_arg1 + _arg4[_local6][0]), (_arg2 + _arg4[_local6][1]), _local5)){
hint = grid[(_arg1 + _arg4[_local6][0])][(_arg2 + _arg4[_local6][1])];
return (true);
};
_local6++;
};
return (false);
}
public function moreOu(_arg1:MouseEvent):void{
more.gotoAndStop(1);
}
public function startC(_arg1:MouseEvent):void{
if (paused){
return;
};
paused = true;
endDest = 2;
areyousure.gotoAndPlay("active_");
}
public function endOu(_arg1:MouseEvent):void{
endb.gotoAndStop(1);
}
public function lookForMatches():Array{
var _local1:Array;
var _local2:int;
var _local3:int;
var _local4:Array;
_local1 = new Array();
_local2 = 0;
while (_local2 < 8) {
_local3 = 0;
while (_local3 < 6) {
_local4 = getMatchHoriz(_local3, _local2);
if (_local4.length > 2){
_local1.push(_local4);
_local3 = (_local3 + (_local4.length - 1));
};
_local3++;
};
_local2++;
};
_local3 = 0;
while (_local3 < 8) {
_local2 = 0;
while (_local2 < 6) {
_local4 = getMatchVert(_local3, _local2);
if (_local4.length > 2){
_local1.push(_local4);
_local2 = (_local2 + (_local4.length - 1));
};
_local2++;
};
_local3++;
};
return (_local1);
}
public function buyHint(){
if (((!((hint == null))) && ((gameScore >= 200)))){
addScore(-200);
hintArrow.x = (hint.x - 20);
hintArrow.y = (hint.y + 32);
selectPiece(hint);
};
}
public function startO(_arg1:MouseEvent):void{
if (paused){
return;
};
startb.gotoAndStop(2);
}
public function clickPiece(_arg1:MouseEvent){
var _local2:Piece;
if (((((isSwapping) || (isDropping))) || (justPopped))){
return;
};
_local2 = Piece(_arg1.currentTarget);
if (_local2.popped){
return;
};
selectPiece(_local2);
}
function frame14(){
startMatchThree();
stop();
}
public function rollOffPiece(_arg1:MouseEvent){
var _local2:Piece;
_local2 = Piece(_arg1.currentTarget);
if (_local2.colour != null){
if (_local2.colour.inner.inner.currentLabel != "click"){
_local2.colour.inner.inner.gotoAndStop(1);
};
};
}
function frame3(){
if (framesLoaded == totalFrames){
play();
} else {
gotoAndPlay("load");
};
}
function frame13(){
playMainMusic();
instructions_menu();
stop();
}
function frame1(){
MochiBot.track(this, "1e64b088");
MochiAd.showPreGameAd({clip:root, id:"e9fa45240d74a2e9", res:"640x480"});
MochiServices.connect("e9fa45240d74a2e9", this);
}
public function startButtonPress(_arg1:MouseEvent){
instructions.startButton.removeEventListener(MouseEvent.ROLL_OUT, startButtonOut);
gotoAndStop("start");
}
public function addScore(_arg1:int){
hintArrow.x = 1000;
hintArrow.y = 1000;
gameScore = (gameScore + _arg1);
scoreDisplaymc.filtertext.scoreDisplay.text = String(gameScore);
}
function frame9(){
if (!introclip.done){
gotoAndPlay("intro");
};
}
function frame2(){
prog = (this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal);
loadbar.scaleX = prog;
}
public function movePieces(_arg1:Event){
var _local2:*;
var _local3:int;
var _local4:Boolean;
var _local5:*;
var _local6:int;
var _local7:int;
var _local8:*;
var _local9:*;
fps.update();
if (paused){
return;
};
_local2 = false;
_local3 = 0;
while (_local3 < specialsholder.numChildren) {
_local5 = specialsholder.getChildAt(_local3);
if ((((((_local5.type == 3)) || ((_local5.type == 2)))) || ((_local5.type == 4)))){
_local6 = 0;
while (_local6 < 8) {
_local7 = 0;
while (_local7 < 8) {
if (((!((grid[_local7][_local6] == null))) && (!(grid[_local7][_local6].popped)))){
if (grid[_local7][_local6].colour.inner.inner.specialmc.hitTestObject(_local5)){
_local2 = true;
doTimer();
_local8 = 25;
if (grid[_local7][_local6].specialType == 1){
_local8 = (_local8 + 500);
};
addScore((_local8 * pointMult));
_local9 = new PointBurst(this, (_local8 * pointMult), grid[_local7][_local6].x, grid[_local7][_local6].y);
popMe(grid[_local7][_local6]);
};
};
_local7++;
};
_local6++;
};
};
_local3++;
};
if (specialsholder.numChildren > 0){
doTimer();
return;
};
if (_local2){
};
if (justPopped){
return;
};
_local4 = false;
_local6 = 0;
while (_local6 < 8) {
_local7 = 0;
while (_local7 < 8) {
if (grid[_local7][_local6] != null){
if (grid[_local7][_local6].y < ((grid[_local7][_local6].row * spacing) + offsetY)){
grid[_local7][_local6].y = (grid[_local7][_local6].y + 11);
_local4 = true;
} else {
if (grid[_local7][_local6].y > ((grid[_local7][_local6].row * spacing) + offsetY)){
grid[_local7][_local6].y = (grid[_local7][_local6].y - 11);
_local4 = true;
} else {
if (grid[_local7][_local6].x < ((grid[_local7][_local6].col * spacing) + offsetX)){
grid[_local7][_local6].x = (grid[_local7][_local6].x + 11);
_local4 = true;
} else {
if (grid[_local7][_local6].x > ((grid[_local7][_local6].col * spacing) + offsetX)){
grid[_local7][_local6].x = (grid[_local7][_local6].x - 11);
_local4 = true;
};
};
};
};
};
_local7++;
};
_local6++;
};
if (((isDropping) && (!(_local4)))){
isDropping = false;
findAndRemoveMatches();
} else {
if (((isSwapping) && (!(_local4)))){
isSwapping = false;
findAndRemoveMatches();
};
};
checkfordupes();
}
public function moregamesclick(_arg1:Event){
var _local2:String;
var _local3:URLRequest;
_local2 = "http://www.ninjakiwi.com";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
}
public function rollOverPiece(_arg1:MouseEvent){
var _local2:Piece;
_local2 = Piece(_arg1.currentTarget);
if (((!((_local2.colour == null))) && (!((_local2 == firstPiece))))){
_local2.colour.inner.inner.gotoAndPlay("rollover");
};
}
public function lookForPossibles(){
var _local1:int;
var _local2:int;
_local1 = 0;
while (_local1 < 8) {
_local2 = 0;
while (_local2 < 8) {
if (matchPattern(_local1, _local2, [[1, 0]], [[-2, 0], [-1, -1], [-1, 1], [2, -1], [2, 1], [3, 0]])){
return (true);
};
if (matchPattern(_local1, _local2, [[2, 0]], [[1, -1], [1, 1]])){
return (true);
};
if (matchPattern(_local1, _local2, [[0, 1]], [[0, -2], [-1, -1], [1, -1], [-1, 2], [1, 2], [0, 3]])){
return (true);
};
if (matchPattern(_local1, _local2, [[0, 2]], [[-1, 1], [1, 1]])){
return (true);
};
_local2++;
};
_local1++;
};
return (false);
}
public function matchType(_arg1, _arg2, _arg3:int){
if ((((((((_arg1 < 0)) || ((_arg1 > 7)))) || ((_arg2 < 0)))) || ((_arg2 > 7)))){
return (false);
};
return ((grid[_arg1][_arg2].type == _arg3));
}
public function makeSwap(_arg1, _arg2:Piece){
swapPieces(_arg1, _arg2);
if (lookForMatches().length == 0){
sounds.nomove.play();
swapPieces(_arg1, _arg2);
} else {
isSwapping = true;
};
}
public function startButtonOut(_arg1:MouseEvent){
instructions.startButton.gotoAndPlay("rollOut");
}
public function HintButtonP(_arg1:MouseEvent):void{
if (paused){
return;
};
buyhint.gotoAndPlay("press");
}
public function swapPieces(_arg1, _arg2:Piece){
var _local3:uint;
var _local4:uint;
_local3 = _arg1.col;
_local4 = _arg1.row;
_arg1.col = _arg2.col;
_arg1.row = _arg2.row;
_arg2.col = _local3;
_arg2.row = _local4;
grid[_arg1.col][_arg1.row] = _arg1;
grid[_arg2.col][_arg2.row] = _arg2;
}
public function cleanUp(){
grid = null;
removeChild(gameSprite);
gameSprite = null;
removeEventListener(Event.ENTER_FRAME, movePieces);
}
public function addPiece(_arg1, _arg2:int):Piece{
var _local3:Piece;
var _local4:int;
_local3 = new Piece();
_local3.x = ((_arg1 * spacing) + offsetX);
_local3.y = ((_arg2 * spacing) + offsetY);
_local3.col = _arg1;
_local3.row = _arg2;
_local3.popped = false;
_local3.parentSprite = gameSprite;
_local4 = 0;
if (Math.random() > 0.83){
_local4 = int(((Math.random() * 4) + 1));
};
_local3.type = Math.ceil((Math.random() * numPieces));
_local3.specialType = _local4;
_local3.colour.gotoAndStop(_local3.type);
_local3.select.visible = false;
gameSprite.addChild(_local3);
grid[_arg1][_arg2] = _local3;
_local3.addEventListener(MouseEvent.MOUSE_DOWN, clickPiece);
_local3.addEventListener(MouseEvent.ROLL_OVER, rollOverPiece);
_local3.addEventListener(MouseEvent.ROLL_OUT, rollOffPiece);
return (_local3);
}
public function checkfordupes(){
var _local1:int;
var _local2:*;
_local1 = 0;
while (_local1 < gameSprite.numChildren) {
_local2 = gameSprite.getChildAt(_local1);
if (_local2.popped){
} else {
if (grid[_local2.col][_local2.row] != _local2){
trace("FOUND ONE");
gameSprite.removeChild(_local2);
_local2 = null;
};
};
_local1++;
};
}
public function endO(_arg1:MouseEvent):void{
endb.gotoAndStop(2);
}
public function endP(_arg1:MouseEvent):void{
if (paused){
return;
};
paused = true;
endDest = 1;
areyousure.gotoAndPlay("active_");
}
public function startMatchThree(){
var _local1:int;
paused = true;
grid = new Array();
_local1 = 0;
while (_local1 < 8) {
grid.push(new Array());
_local1++;
};
setUpGrid();
pointMult = 1;
isDropping = false;
isSwapping = false;
justPopped = false;
gameScore = 0;
totPieces = 0;
scoreDisplaymc.filtertext.scoreDisplay.text = String(gameScore);
addEventListener(Event.ENTER_FRAME, movePieces);
buyhint.addEventListener(MouseEvent.ROLL_OVER, HintButtonOver);
buyhint.addEventListener(MouseEvent.ROLL_OUT, HintButtonOut);
buyhint.addEventListener(MouseEvent.CLICK, HintButtonP);
startb.addEventListener(MouseEvent.ROLL_OVER, startO);
startb.addEventListener(MouseEvent.CLICK, startC);
startb.addEventListener(MouseEvent.ROLL_OUT, startOu);
more.addEventListener(MouseEvent.ROLL_OVER, moreO);
more.addEventListener(MouseEvent.ROLL_OUT, moreOu);
more.addEventListener(MouseEvent.CLICK, moregamesclick);
endb.addEventListener(MouseEvent.ROLL_OVER, endO);
endb.addEventListener(MouseEvent.ROLL_OUT, endOu);
endb.addEventListener(MouseEvent.CLICK, endP);
showhs.addEventListener(MouseEvent.CLICK, showHS);
paused = false;
}
public function showHS(_arg1:Event){
MochiScores.showLeaderboard({boardID:"b089577827684a36"});
}
public function yesimsure(){
if (endDest == 1){
gameoverpanel.gotoAndPlay("active_");
};
if (endDest == 2){
resetGame();
};
}
public function HintButtonOver(_arg1:MouseEvent):void{
if (paused){
return;
};
buyhint.gotoAndPlay("rollover");
}
public function startButtonOver(_arg1:MouseEvent){
instructions.startButton.gotoAndPlay("rollOver");
}
public function playMainMusic(){
music.musicmain.gotoAndStop(2);
}
public function scoreGlow(){
buyHint();
scoreDisplaymc.gotoAndPlay(2);
}
public function stopMusic(){
if (music != null){
music.musicmain.gotoAndStop(1);
};
}
public function selectPiece(_arg1){
trace(("piece: " + _arg1));
if (_arg1 == firstPiece){
return;
};
if (firstPiece == null){
_arg1.colour.inner.inner.gotoAndStop("click");
firstPiece = _arg1;
} else {
if (firstPiece == _arg1){
_arg1.colour.inner.inner.gotoAndStop(1);
firstPiece = null;
} else {
firstPiece.colour.inner.inner.gotoAndStop(1);
if (firstPiece.row == _arg1.row){
if (Math.abs((firstPiece.col - _arg1.col)) == 1){
makeSwap(firstPiece, _arg1);
firstPiece = null;
} else {
firstPiece = _arg1;
firstPiece.colour.inner.inner.gotoAndStop("click");
};
} else {
if (firstPiece.col == _arg1.col){
if (Math.abs((firstPiece.row - _arg1.row)) == 1){
makeSwap(firstPiece, _arg1);
firstPiece = null;
} else {
firstPiece = _arg1;
firstPiece.colour.inner.inner.gotoAndStop("click");
};
} else {
firstPiece = _arg1;
firstPiece.colour.inner.inner.gotoAndStop("click");
};
};
};
};
}
public function findAndRemoveMatches(){
var _local1:Array;
var _local2:int;
var _local3:Number;
var _local4:int;
var _local5:*;
_local1 = lookForMatches();
_local2 = 0;
while (_local2 < _local1.length) {
_local3 = ((_local1[_local2].length - 1) * 50);
if (_local2 > 0){
};
_local4 = 0;
while (_local4 < _local1[_local2].length) {
if (gameSprite.contains(_local1[_local2][_local4])){
_local3 = (_local3 + popMe(_local1[_local2][_local4]));
};
_local4++;
};
if (pointMult > 1){
x2.gotoAndStop(1);
x4.gotoAndStop(1);
x8.gotoAndStop(1);
x16.gotoAndStop(1);
x32.gotoAndStop(1);
this[("x" + pointMult)].gotoAndPlay(2);
};
_local5 = new PointBurst(this, (_local3 * pointMult), _local1[_local2][1].x, _local1[_local2][1].y);
addScore((_local3 * pointMult));
_local2++;
};
if (_local1.length == 0){
superlatives.scaleX = (superlatives.scaleY = 1.2);
pointMult = 1;
trace((("you popped: " + totPieces) + " bloons"));
if ((((totPieces > 10)) && ((totPieces < 18)))){
superlatives.gotoAndPlay("cool");
};
if ((((totPieces > 17)) && ((totPieces < 25)))){
superlatives.gotoAndPlay("great");
};
if ((((totPieces > 24)) && ((totPieces < 30)))){
superlatives.gotoAndPlay("awesome");
};
if ((((totPieces > 29)) && ((totPieces < 36)))){
superlatives.gotoAndPlay("amazing");
};
if (totPieces > 35){
superlatives.gotoAndPlay("unbelievable");
};
totPieces = 0;
if (!lookForPossibles()){
sounds.gameover.play();
endGame();
};
} else {
pointMult = (pointMult * 2);
if (pointMult > 32){
pointMult = 32;
};
doTimer();
};
}
public function addNewPieces(){
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:Piece;
_local1 = 0;
while (_local1 < 8) {
_local2 = 0;
_local3 = 0;
while (_local3 < 8) {
if (grid[_local1][_local3] == null){
_local4 = addPiece(_local1, _local3);
var _temp1 = _local2;
_local2 = (_local2 + 1);
_local4.y = ((offsetY + (spacing * 8)) + (spacing * _temp1));
isDropping = true;
};
_local3++;
};
totPieces = (totPieces + _local2);
_local1++;
};
}
public function endPop(_arg1:Event){
justPopped = false;
addNewPieces();
trace("end pop!");
}
public function doTimer(){
if (theTimer != null){
theTimer.stop();
theTimer = null;
};
justPopped = true;
theTimer = new Timer(250, 1);
theTimer.start();
theTimer.addEventListener(TimerEvent.TIMER, endPop);
}
public function endGame(){
paused = true;
gameoverpanel.gotoAndPlay("active_");
}
public function setUpGrid(){
var _local1:int;
var _local2:int;
gameSprite = bloonholder;
while (true) {
trace("doing a while");
clearBloons();
_local1 = 0;
while (_local1 < 8) {
_local2 = 0;
while (_local2 < 8) {
addPiece(_local1, _local2);
_local2++;
};
_local1++;
};
if (lookForMatches().length != 0){
} else {
if (lookForPossibles() == false){
} else {
break;
};
};
};
}
public function removeSpecial(_arg1){
specialsholder.removeChild(_arg1);
_arg1 = null;
}
public function affectAbove(_arg1:Piece){
var _local2:int;
_local2 = (_arg1.row + 1);
while (_local2 < 8) {
if (grid[_arg1.col][_local2] != null){
grid[_arg1.col][_local2].row--;
grid[_arg1.col][(_local2 - 1)] = grid[_arg1.col][_local2];
grid[_arg1.col][_local2] = null;
};
_local2++;
};
}
public function moreO(_arg1:MouseEvent):void{
if (paused){
return;
};
more.gotoAndStop(2);
}
public function clearBloons(){
var _local1:int;
var _local2:int;
_local1 = 0;
while (_local1 < 8) {
_local2 = 0;
while (_local2 < 8) {
removeBloon(grid[_local2][_local1]);
_local2++;
};
_local1++;
};
}
public function instructions_menu(){
instructions.startButton.addEventListener(MouseEvent.ROLL_OVER, startButtonOver);
instructions.startButton.addEventListener(MouseEvent.ROLL_OUT, startButtonOut);
instructions.startButton.addEventListener(MouseEvent.CLICK, startButtonPress);
}
public function doSpecial(_arg1){
var _local2:*;
_local2 = null;
switch (_arg1.specialType){
case 1:
_local2 = new Popcorn();
break;
case 2:
_local2 = new Spikey();
_local2.type = 2;
break;
case 3:
_local2 = new Tacks();
_local2.type = 3;
break;
case 4:
_local2 = new LightSabre();
_local2.type = 4;
break;
};
_local2.x = (_arg1.x + 10);
_local2.y = (_arg1.y + 10);
specialsholder.addChild(_local2);
}
public function doHighScore(){
MochiScores.showLeaderboard({boardID:"b089577827684a36", score:gameScore});
gameoverpanel.gotoAndStop(1);
}
public function popMe(_arg1){
var _local2:int;
var _local3:int;
_local2 = 0;
grid[_arg1.col][_arg1.row] = null;
_arg1.popped = true;
if (_arg1.specialType){
if (_arg1.specialType == 1){
_local2 = (_local2 + 500);
};
doSpecial(_arg1);
};
_arg1.gotoAndPlay("popped");
affectAbove(_arg1);
_local3 = int(((Math.random() * 4) + 1));
sounds[("pop" + _local3)].play();
return (_local2);
}
public function HintButtonOut(_arg1:MouseEvent):void{
buyhint.gotoAndPlay("rollout");
}
public function endStuff(){
clearBloons();
removeEventListener(Event.ENTER_FRAME, movePieces);
buyhint.removeEventListener(MouseEvent.ROLL_OVER, HintButtonOver);
buyhint.removeEventListener(MouseEvent.ROLL_OUT, HintButtonOut);
buyhint.removeEventListener(MouseEvent.CLICK, HintButtonP);
startb.removeEventListener(MouseEvent.ROLL_OVER, startO);
startb.removeEventListener(MouseEvent.CLICK, startC);
startb.removeEventListener(MouseEvent.ROLL_OUT, startOu);
more.removeEventListener(MouseEvent.ROLL_OVER, moreO);
more.removeEventListener(MouseEvent.ROLL_OUT, moreOu);
endb.removeEventListener(MouseEvent.ROLL_OVER, endO);
endb.removeEventListener(MouseEvent.ROLL_OUT, endOu);
endb.removeEventListener(MouseEvent.CLICK, endP);
}
public function resetGame(){
endStuff();
startMatchThree();
}
public function removeBloon(_arg1){
if (_arg1 != null){
gameSprite.removeChild(_arg1);
_arg1 = null;
};
}
public function startOu(_arg1:MouseEvent):void{
startb.gotoAndStop(1);
}
public function getMatchHoriz(_arg1, _arg2):Array{
var _local3:Array;
var _local4:int;
_local3 = new Array(grid[_arg1][_arg2]);
if (grid[_arg1][_arg2].popped){
return (_local3);
};
_local4 = 1;
while ((_arg1 + _local4) < 8) {
if (grid[_arg1][_arg2].type == grid[(_arg1 + _local4)][_arg2].type){
_local3.push(grid[(_arg1 + _local4)][_arg2]);
} else {
return (_local3);
};
_local4++;
};
return (_local3);
}
public function getMatchVert(_arg1, _arg2):Array{
var _local3:Array;
var _local4:int;
if (grid[_arg1][_arg2].popped){
return (_local3);
};
_local3 = new Array(grid[_arg1][_arg2]);
_local4 = 1;
while ((_arg2 + _local4) < 8) {
if (grid[_arg1][_arg2].type == grid[_arg1][(_arg2 + _local4)].type){
_local3.push(grid[_arg1][(_arg2 + _local4)]);
} else {
return (_local3);
};
_local4++;
};
return (_local3);
}
}
}//package
Section 68
//MochiAd (MochiAd)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("2.3");
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var f:Function;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
f = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
mc._mochiad_ctr_failed = true;
};
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["sendHighScore", _arg1], _arg2, _arg3);
return (true);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}};
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_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = _local1.loaderInfo.bytesTotal;
if ((((_local4 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.parent._mochiad_ctr_failed){
options.ad_failed();
_local3 = true;
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _loadCommunicator(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var clipname:String;
var server:String;
var depth:Number;
var mc:MovieClip;
var lv:URLVariables;
var k:String;
var lc:LocalConnection;
var name:String;
var req:URLRequest;
var loader:Loader;
var options = _arg1;
DEFAULTS = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
clipname = ("_mochiad_com_" + options.id);
if (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip[clipname]){
return (clip[clipname]);
};
server = (options.com_server + options.id);
MochiAd._allowDomains(server);
delete options.id;
delete options.com_server;
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, clipname, depth);
lv = new URLVariables();
for (k in options) {
lv[k] = options[k];
};
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.name = name;
mc.lc = lc;
lv.lc = name;
mc._id = 0;
mc._queue = [];
mc.rpcResult = function (_arg1:Object):void{
var _local3:Array;
var _local4:Array;
var _local5:Number;
var _local6:Object;
var _local7:Object;
_arg1 = parseInt(_arg1.toString());
_local3 = mc._callbacks[_arg1];
if (typeof(_local3) == "undefined"){
return;
};
delete mc._callbacks[_arg1];
_local4 = [];
_local5 = 2;
while (_local5 < _local3.length) {
_local4.push(_local3[_local5]);
_local5++;
};
_local5 = 1;
while (_local5 < arguments.length) {
_local4.push(arguments[_local5]);
_local5++;
};
_local6 = _local3[1];
_local7 = _local3[0];
if (((_local7) && ((typeof(_local6) == "string")))){
_local6 = _local7[_local6];
};
if (typeof(_local6) == "function"){
_local6.apply(_local7, _local4);
};
};
mc._didConnect = function (_arg1:String):void{
var _local2:Array;
var _local3:Function;
var _local4:Number;
var _local5:Array;
mc._endpoint = _arg1;
_local2 = mc._queue;
delete mc._queue;
_local3 = mc.doSend;
_local4 = 0;
while (_local4 < _local2.length) {
_local5 = _local2[_local4];
_local3.apply(this, _local5);
_local4++;
};
};
mc.doSend = function (_arg1:Array, _arg2:Object, _arg3:Object):void{
var _local5:Number;
var _local6:LocalConnection;
var _local7:Array;
var _local8:Number;
if (mc._endpoint == null){
_local7 = [];
_local8 = 0;
while (_local8 < arguments.length) {
_local7.push(arguments[_local8]);
_local8++;
};
mc._queue.push(_local7);
return;
};
mc._id = (mc._id + 1);
_local5 = mc._id;
mc._callbacks[_local5] = [_arg2, ((_arg3) || (_arg2))];
_local6 = new LocalConnection();
_local6.send(mc._endpoint, "rpc", _local5, _arg1);
};
mc._callbacks = {};
mc._callbacks[0] = [mc, "_didConnect"];
lv.st = getTimer();
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader = new Loader();
loader.load(req);
mc.addChild(loader);
mc._mochiad_com = loader;
return (mc);
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("5cc6f7dfb67f2f08341c831480f7c2a7".length == 0){
options.ad_started();
options.ad_finished();
return;
};
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_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
bar.x = 10;
bar.y = (h - 20);
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
if (!chk.showing){
_local11 = _local2.loaderInfo.bytesTotal;
if ((((_local11 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local3 > chk.ad_timeout){
options.ad_failed();
_local4 = true;
};
};
};
if (this.parent._mochiad_ctr_failed){
options.ad_failed();
_local4 = true;
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["fetchHighScores", _arg1], _arg2, _arg3);
return (true);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 69
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 70
//Piece (Piece)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class Piece extends MovieClip {
public var select:MovieClip;
public var colour:MovieClip;
public function Piece(){
addFrameScript(0, frame1, 13, frame14);
}
function frame14(){
stop();
MovieClip(parent.parent).removeBloon(this);
}
function frame1(){
stop();
}
}
}//package
Section 71
//PointBurst (PointBurst)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
public class PointBurst extends Sprite {
private var burstSprite:Sprite;
private var animTimer:Timer;
private var parentMC:MovieClip;
private var tField:TextField;
static const animStepTime:int = 50;
static const fontSize:int = 20;
static const fontFace:String = "Arial Rounded MT Bold";
static const fontBold:Boolean = true;
static const animSteps:int = 10;
static const startScale:Number = 0;
static const fontColor:Number = 15974;
static const endScale:Number = 2;
public function PointBurst(_arg1:MovieClip, _arg2:Object, _arg3, _arg4:Number){
var _local5:TextFormat;
super();
_local5 = new TextFormat();
_local5.font = fontFace;
_local5.size = fontSize;
_local5.bold = fontBold;
_local5.color = fontColor;
_local5.align = "center";
tField = new TextField();
tField.embedFonts = true;
tField.selectable = false;
tField.defaultTextFormat = _local5;
tField.autoSize = TextFieldAutoSize.CENTER;
tField.text = String(_arg2);
tField.x = -((tField.width / 2));
tField.y = -((tField.height / 2));
burstSprite = new Sprite();
burstSprite.x = (_arg3 + 5);
burstSprite.y = (_arg4 + 5);
burstSprite.scaleX = startScale;
burstSprite.scaleY = startScale;
burstSprite.alpha = 0;
burstSprite.addChild(tField);
parentMC = _arg1;
parentMC.addChild(burstSprite);
animTimer = new Timer(animStepTime, animSteps);
animTimer.addEventListener(TimerEvent.TIMER, rescaleBurst);
animTimer.addEventListener(TimerEvent.TIMER_COMPLETE, removeBurst);
animTimer.start();
}
public function removeBurst(_arg1:TimerEvent){
burstSprite.removeChild(tField);
parentMC.removeChild(burstSprite);
tField = null;
burstSprite = null;
delete ??getglobalscope
[this];
}
public function rescaleBurst(_arg1:TimerEvent){
var _local2:Number;
_local2 = (_arg1.target.currentCount / animSteps);
burstSprite.y = (burstSprite.y - 1);
burstSprite.scaleX = 1;
burstSprite.scaleY = 1;
burstSprite.alpha = 1;
}
}
}//package
Section 72
//Popcorn (Popcorn)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class Popcorn extends MovieClip {
public function Popcorn(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
parent.parent.removeSpecial(this);
}
}
}//package
Section 73
//Spikey (Spikey)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class Spikey extends MovieClip {
public function Spikey(){
addFrameScript(31, frame32);
}
function frame32(){
stop();
parent.parent.removeSpecial(this);
}
}
}//package
Section 74
//Tacks (Tacks)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class Tacks extends MovieClip {
public function Tacks(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
parent.parent.removeSpecial(this);
}
}
}//package