Section 1
//MochiCoins (mochi.as3.MochiCoins)
package mochi.as3 {
public class MochiCoins {
public static const STORE_HIDE:String = "StoreHide";
public static const NO_USER:String = "NoUser";
public static const IO_ERROR:String = "IOError";
public static const ITEM_NEW:String = "ItemNew";
public static const ITEM_OWNED:String = "ItemOwned";
public static const STORE_ITEMS:String = "StoreItems";
public static const ERROR:String = "Error";
public static const STORE_SHOW:String = "StoreShow";
public static var _inventory:MochiInventory;
public static function triggerEvent(_arg1:String, _arg2:Object):void{
MochiSocial.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
MochiSocial.removeEventListener(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
MochiSocial.addEventListener(_arg1, _arg2);
}
public static function getStoreItems():void{
MochiServices.send("coins_getStoreItems");
}
public static function get inventory():MochiInventory{
return (_inventory);
}
public static function showStore(_arg1:Object=null):void{
MochiServices.bringToTop();
MochiServices.send("coins_showStore", {options:_arg1}, null, null);
}
public static function showItem(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showItem call must pass an Object with an item key");
return;
};
MochiServices.bringToTop();
MochiServices.send("coins_showItem", {options:_arg1}, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showVideo(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showVideo call must pass an Object with an item key");
return;
};
MochiServices.bringToTop();
MochiServices.send("coins_showVideo", {options:_arg1}, null, null);
}
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_inventory = new MochiInventory();
});
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_inventory = null;
});
}
}//package mochi.as3
Section 2
//MochiDigits (mochi.as3.MochiDigits)
package mochi.as3 {
public final class MochiDigits {
private var Sibling:MochiDigits;
private var Fragment:Number;
private var Encoder:Number;
public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{
Encoder = 0;
setValue(_arg1, _arg2);
}
public function set value(_arg1:Number):void{
setValue(_arg1);
}
public function reencode():void{
var _local1:uint;
_local1 = int((2147483647 * Math.random()));
Fragment = (Fragment ^ (_local1 ^ Encoder));
Encoder = _local1;
}
public function toString():String{
var _local1:String;
_local1 = String.fromCharCode((Fragment ^ Encoder));
if (Sibling != null){
_local1 = (_local1 + Sibling.toString());
};
return (_local1);
}
public function get value():Number{
return (Number(this.toString()));
}
public function setValue(_arg1:Number=0, _arg2:uint=0):void{
var _local3:String;
_local3 = _arg1.toString();
var _temp1 = _arg2;
_arg2 = (_arg2 + 1);
Fragment = (_local3.charCodeAt(_temp1) ^ Encoder);
if (_arg2 < _local3.length){
Sibling = new MochiDigits(_arg1, _arg2);
} else {
Sibling = null;
};
reencode();
}
public function addValue(_arg1:Number):void{
value = (value + _arg1);
}
}
}//package mochi.as3
Section 3
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher)
package mochi.as3 {
public class MochiEventDispatcher {
private var eventTable:Object;
public function MochiEventDispatcher():void{
eventTable = {};
}
public function triggerEvent(_arg1:String, _arg2:Object):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
return;
};
for (_local3 in eventTable[_arg1]) {
var _local6 = eventTable[_arg1];
_local6[_local3](_arg2);
};
}
public function removeEventListener(_arg1:String, _arg2:Function):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
eventTable[_arg1] = [];
return;
};
for (_local3 in eventTable[_arg1]) {
if (eventTable[_arg1][_local3] != _arg2){
} else {
eventTable[_arg1].splice(Number(_local3), 1);
};
};
}
public function addEventListener(_arg1:String, _arg2:Function):void{
removeEventListener(_arg1, _arg2);
eventTable[_arg1].push(_arg2);
}
}
}//package mochi.as3
Section 4
//MochiEvents (mochi.as3.MochiEvents)
package mochi.as3 {
import flash.display.*;
public class MochiEvents {
public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL";
public static const FORMAT_LONG:String = "LongForm";
public static const ALIGN_BOTTOM:String = "ALIGN_B";
public static const ACHIEVEMENT_RECEIVED:String = "AchievementReceived";
public static const FORMAT_SHORT:String = "ShortForm";
public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR";
public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR";
public static const ALIGN_TOP:String = "ALIGN_T";
public static const ALIGN_LEFT:String = "ALIGN_L";
public static const ALIGN_RIGHT:String = "ALIGN_R";
public static const ALIGN_TOP_LEFT:String = "ALIGN_TL";
public static const ALIGN_CENTER:String = "ALIGN_C";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
private static var gameStart:Number;
private static var levelStart:Number;
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function startSession(_arg1:String):void{
MochiServices.send("events_beginSession", {achievementID:_arg1}, null, null);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function setNotifications(_arg1:MovieClip, _arg2:Object):void{
var _local3:Object;
var _local4:Object;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
_local3.clip = _arg1;
MochiServices.send("events_setNotifications", _local3, null, null);
}
public static function endGame():void{
var _local1:Number;
_local1 = (new Date().time - gameStart);
trigger("end_game", {time:_local1});
}
public static function startGame():void{
gameStart = new Date().time;
trigger("start_game");
}
public static function trigger(_arg1:String, _arg2:Object=null):void{
if (_arg2 == null){
_arg2 = {};
} else {
if (_arg2["kind"] != undefined){
trace("WARNING: optional arguments package contains key 'id', it will be overwritten");
_arg2["kind"] = _arg1;
};
};
MochiServices.send("events_triggerEvent", {eventObject:_arg2}, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function startLevel():void{
levelStart = new Date().time;
trigger("start_level");
}
public static function endLevel():void{
var _local1:Number;
_local1 = (new Date().time - levelStart);
trigger("end_level", {time:_local1});
}
}
}//package mochi.as3
Section 5
//MochiInventory (mochi.as3.MochiInventory)
package mochi.as3 {
import flash.events.*;
import flash.utils.*;
public dynamic class MochiInventory extends Proxy {
private var _timer:Timer;
private var _names:Array;
private var _consumableProperties:Object;
private var _syncID:Number;
private var _storeSync:Object;
private var _outstandingID:Number;
private var _syncPending:Boolean;
public static const READY:String = "InvReady";
public static const ERROR:String = "Error";
public static const IO_ERROR:String = "IoError";
private static const KEY_SALT:String = " syncMaint";
public static const WRITTEN:String = "InvWritten";
public static const NOT_READY:String = "InvNotReady";
public static const VALUE_ERROR:String = "InvValueError";
private static const CONSUMER_KEY:String = "MochiConsumables";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public function MochiInventory():void{
MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, itemOwned);
MochiCoins.addEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, loggedOut);
_storeSync = new Object();
_syncPending = false;
_outstandingID = 0;
_syncID = 0;
_timer = new Timer(1000);
_timer.addEventListener(TimerEvent.TIMER, sync);
_timer.start();
if (MochiSocial.loggedIn){
loggedIn();
} else {
loggedOut();
};
}
private function newItems(_arg1:Object):void{
if (!this[(_arg1.id + KEY_SALT)]){
this[(_arg1.id + KEY_SALT)] = 0;
};
if (!this[_arg1.id]){
this[_arg1.id] = 0;
};
this[(_arg1.id + KEY_SALT)] = (this[(_arg1.id + KEY_SALT)] + _arg1.count);
this[_arg1.id] = (this[_arg1.id] + _arg1.count);
if (_arg1.privateProperties.consumable){
if (!this[_arg1.privateProperties.tag]){
this[_arg1.privateProperties.tag] = 0;
};
this[_arg1.privateProperties.tag] = (this[_arg1.privateProperties.tag] + (_arg1.privateProperties.inc * _arg1.count));
};
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (-1);
};
if (_consumableProperties[_arg1]){
return (MochiDigits(_consumableProperties[_arg1]).value);
};
return (undefined);
}
public function release():void{
MochiCoins.removeEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.removeEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.removeEventListener(MochiSocial.LOGGED_OUT, loggedOut);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (false);
};
if (_consumableProperties[_arg1] == undefined){
return (false);
};
return (true);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{
return (((_arg1)>=_names.length) ? 0 : (_arg1 + 1));
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var _local3:MochiDigits;
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return;
};
if (!(_arg2 is Number)){
triggerEvent(ERROR, {type:VALUE_ERROR, error:"Invalid type", arg:_arg2});
return;
};
if (_consumableProperties[_arg1]){
_local3 = MochiDigits(_consumableProperties[_arg1]);
if (_local3.value == _arg2){
return;
};
_local3.value = _arg2;
} else {
_names.push(_arg1);
_consumableProperties[_arg1] = new MochiDigits(_arg2);
};
_syncID++;
}
private function sync(_arg1:Event=null):void{
var _local2:Object;
var _local3:String;
if (((_syncPending) || ((_syncID == _outstandingID)))){
return;
};
_outstandingID = _syncID;
_local2 = {};
for (_local3 in _consumableProperties) {
_local2[_local3] = MochiDigits(_consumableProperties[_local3]).value;
};
MochiUserData.put(CONSUMER_KEY, _local2, putConsumableBag);
_syncPending = true;
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{
return (_names[(_arg1 - 1)]);
}
private function loggedIn(_arg1:Object=null):void{
MochiUserData.get(CONSUMER_KEY, getConsumableBag);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{
if (!_consumableProperties[_arg1]){
return (false);
};
_names.splice(_names.indexOf(_arg1), 1);
delete _consumableProperties[_arg1];
return (true);
}
private function itemOwned(_arg1:Object):void{
_storeSync[_arg1.id] = {properties:_arg1.properties, count:_arg1.count};
}
private function putConsumableBag(_arg1:MochiUserData):void{
_syncPending = false;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
_outstandingID = -1;
};
triggerEvent(WRITTEN, {});
}
private function getConsumableBag(_arg1:MochiUserData):void{
var _local2:String;
var _local3:Number;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
return;
};
_consumableProperties = {};
_names = new Array();
if (_arg1.data){
for (_local2 in _arg1.data) {
_names.push(_local2);
_consumableProperties[_local2] = new MochiDigits(_arg1.data[_local2]);
};
};
for (_local2 in _storeSync) {
_local3 = _storeSync[_local2].count;
if (_consumableProperties[(_local2 + KEY_SALT)]){
_local3 = (_local3 - _consumableProperties[_local2]);
};
if (_local3 == 0){
} else {
newItems({id:_local2, count:_local3, properties:_storeSync[_local2].properties});
};
};
triggerEvent(READY, {});
}
private function loggedOut(_arg1:Object=null):void{
_consumableProperties = null;
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
}
}//package mochi.as3
Section 6
//MochiScores (mochi.as3.MochiScores)
package mochi.as3 {
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 n:Number;
var options = _arg1;
if (options != null){
delete options.clip;
MochiServices.setContainer();
MochiServices.bringToTop();
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;
};
} else {
if ((options.score is MochiDigits)){
options.score = options.score.value;
};
};
n = Number(options.score);
if (isNaN(n)){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(n) != n){
trace((("WARNING: Submitted score '" + options.score) + "' will be truncated"));
};
options.score = n;
};
};
};
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)){
MochiServices.clip.gotoAndStop("start");
} 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.warnID(options.boardID, true);
trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal");
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{
_arg1 = Number(_arg1);
if (isNaN(_arg1)){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((_arg1 == Number.NEGATIVE_INFINITY)) || ((_arg1 == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(_arg1) != _arg1){
trace((("WARNING: Submitted score '" + String(_arg1)) + "' will be truncated"));
};
_arg1 = Number(_arg1);
};
};
MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4);
}
public static function onClose(_arg1:Object=null):void{
if (((((_arg1) && ((_arg1.error == true)))) && (onErrorHandler))){
if (_arg1.errorCode == null){
_arg1.errorCode = "IOError";
};
onErrorHandler(_arg1.errorCode);
MochiServices.doClose();
return;
};
onCloseHandler();
MochiServices.doClose();
}
public static function setBoardID(_arg1:String):void{
MochiServices.warnID(_arg1, true);
MochiScores.boardID = _arg1;
MochiServices.send("scores_setBoardID", {boardID:_arg1});
}
}
}//package mochi.as3
Section 7
//MochiServices (mochi.as3.MochiServices)
package mochi.as3 {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
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 _preserved:Object;
public static var netupAttempted:Boolean = false;
private static var _sendChannel:LocalConnection;
public static var servicesSync:MochiSync = new MochiSync();
private static var _clip:MovieClip;
private static var _id:String;
private static var _services:String = "services.swf";
private static var _servURL:String = "http://www.mochiads.com/static/lib/services/";
public static var widget:Boolean = false;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _loader:Loader;
private static var _connecting:Boolean = false;
private static var _mochiLocalConnection:MovieClip;
private static var _listenChannelName:String = "__ms_";
public static var onError:Object;
public static var netup:Boolean = true;
private static var _mochiLC:String = "MochiLC.swf";
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function get connected():Boolean{
return (_connected);
}
private static function onReceive(_arg1:Object):void{
var cb:String;
var cblst:Object;
var method:*;
var methodName:String;
var obj:Object;
var pkg = _arg1;
cb = pkg.callbackID;
cblst = _clip._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 _clip._callbacks[cb];
}
public static function get childClip():Object{
return (_clip);
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + _arg1));
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++;
};
};
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local3:Array;
var _local4:int;
var _local5:Array;
var _local6:Array;
var _local7:MovieClip;
var _local8:LocalConnection;
var _local9:String;
var _local10:ByteArray;
var _local11:ByteArray;
var _local12:uint;
var _local13:uint;
var _local14:Loader;
_local3 = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23];
_local5 = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
_local6 = [0, 64, 0, 0, 0];
_local7 = new MovieClip();
_local8 = new LocalConnection();
_local9 = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().time));
_local8 = new LocalConnection();
_local7.lc = _local8;
_local7.click = _arg2;
_local8.client = _local7;
_local8.connect(_local9);
_local10 = new ByteArray();
_local11 = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
_local12 = ((_local3.length + _local11.length) + 4);
_local13 = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{
var vars:Object;
var avm1Click:DisplayObject;
var s:String;
var i:Number;
var x:String;
var req:URLRequest;
var loader:Loader;
var setURL:Function;
var err:Function;
var complete:Function;
var url = _arg1;
var burl = _arg2;
var btn = _arg3;
var onClick = _arg4;
vars = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
s = "?";
i = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://x.mochiads.com/linkping.swf");
loader = new Loader();
setURL = function (_arg1:String):void{
var _local2:Rectangle;
if (avm1Click){
btn.removeChild(avm1Click);
};
avm1Click = clickMovie(_arg1, onClick);
_local2 = btn.getBounds(btn);
btn.addChild(avm1Click);
avm1Click.x = _local2.x;
avm1Click.y = _local2.y;
avm1Click.scaleX = (0.01 * _local2.width);
avm1Click.scaleY = (0.01 * _local2.height);
};
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
setURL(burl);
};
complete = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
if (netup){
setURL((url + s));
} else {
setURL(burl);
};
if (!((netupAttempted) || (_connected))){
netupAttempted = true;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
};
}
public static function warnID(_arg1:String, _arg2:Boolean):void{
var _local3:Number;
_arg1 = _arg1.toLowerCase();
if (_arg1.length != 16){
trace((("WARNING: " + (_arg2) ? "board" : "game") + " ID is not the appropriate length"));
return;
} else {
if (_arg1 == "1e113c7239048b3f"){
if (_arg2){
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
};
return;
} else {
if (_arg1 == "84993a1de4031cd8"){
if (_arg2){
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
};
return;
};
};
};
_local3 = 0;
while (_local3 < _arg1.length) {
switch (_arg1.charAt(_local3)){
case "0":
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
case "8":
case "9":
case "a":
case "b":
case "c":
case "d":
case "e":
case "f":
break;
default:
trace(("WARNING: Board ID contains illegal characters: " + _arg1));
return;
};
_local3++;
};
}
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 {
_mochiLocalConnection.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType != "application"){
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
};
return (_local2);
}
public static function getVersion():String{
return ("3.7 as3");
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (((_clip) && (_clip._queue))){
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);
};
};
};
};
}
public static function get id():String{
return (_id);
}
private static function onEvent(_arg1:Object):void{
var _local2:String;
var _local3:String;
_local2 = _arg1.target;
_local3 = _arg1.event;
switch (_local2){
case "events":
MochiEvents.triggerEvent(_arg1.event, _arg1.args);
break;
case "coins":
MochiCoins.triggerEvent(_arg1.event, _arg1.args);
break;
case "sync":
servicesSync.triggerEvent(_arg1.event, _arg1.args);
break;
};
}
private static function urlOptions(_arg1:Object):Object{
var _local2:Object;
var _local3:String;
var _local4:Array;
var _local5:Number;
var _local6:Array;
_local2 = {};
if (_arg1.stage){
_local3 = _arg1.stage.loaderInfo.parameters.mochiad_options;
} else {
_local3 = _arg1.loaderInfo.parameters.mochiad_options;
};
if (_local3){
_local4 = _local3.split("&");
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5].split("=");
_local2[unescape(_local6[0])] = unescape(_local6[1]);
_local5++;
};
};
return (_local2);
}
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 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 (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.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) {
};
};
};
};
}
private static function loadError(_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
}
private static function initComChannels():void{
if (!_connected){
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_clip.onReceive = onReceive;
_clip.onEvent = onEvent;
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
while (_clip._queue.length > 0) {
_mochiLocalConnection.send(_sendChannelName, "onReceive", _clip._queue.shift());
};
};
}
private static function loadLCBridge(_arg1:Object):void{
var loader:Loader;
var mochiLCURL:String;
var req:URLRequest;
var complete:Function;
var clip = _arg1;
loader = new Loader();
mochiLCURL = (_servURL + _mochiLC);
req = new URLRequest(mochiLCURL);
complete = function (_arg1:Object):void{
_mochiLocalConnection = MovieClip(loader.content);
listen();
};
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
loader.load(req);
clip.addChild(loader);
}
private static function listen():void{
_mochiLocalConnection.connect(_listenChannelName);
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
trace("Waiting for MochiAds services to connect...");
}
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");
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
var _local3:String;
var _local4:String;
var _local5:URLRequest;
var _local6:URLVariables;
_local3 = ("_mochiservices_com_" + _arg1);
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
if (urlOptions(_arg2).servURL){
_servURL = urlOptions(_arg2).servURL;
};
_local4 = (_servURL + _services);
if (urlOptions(_arg2).servicesURL){
_local4 = urlOptions(_arg2).servicesURL;
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999))));
MochiServices.allowDomains(_local4);
_clip = createEmptyMovieClip(_arg2, _local3, 10336, false);
loadLCBridge(_clip);
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
_local5 = new URLRequest(_local4);
_local6 = new URLVariables();
_local6.listenLC = _listenChannelName;
_local6.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options;
_local6.api_version = getVersion();
if (widget){
_local6.widget = true;
};
_local5.data = _local6;
_loader.load(_local5);
_clip.addChild(_loader);
_clip._mochiservices_com = _loader;
_sendChannel = new LocalConnection();
_clip._queue = [];
_clip._nextcallbackID = 0;
_clip._callbacks = {};
_timer = new Timer(10000, 1);
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
return (_clip);
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
warnID(id, false);
if ((clip is DisplayObject)){
if (clip.stage == null){
trace("MochiServices connect requires the containing clip be attached to the stage");
};
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 bringToTop(_arg1:Event=null):void{
var e = _arg1;
if (((!((MochiServices.clip == null))) && (!((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 connectWait(_arg1:TimerEvent):void{
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load. (timeout)");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
}
}
}//package mochi.as3
Section 8
//MochiSocial (mochi.as3.MochiSocial)
package mochi.as3 {
public class MochiSocial {
public static const LOGGED_IN:String = "LoggedIn";
public static const PROFILE_HIDE:String = "ProfileHide";
public static const NO_USER:String = "NoUser";
public static const PROPERTIES_SIZE:String = "PropertiesSize";
public static const IO_ERROR:String = "IOError";
public static const PROPERTIES_SAVED:String = "PropertySaved";
public static const WIDGET_LOADED:String = "WidgetLoaded";
public static const USER_INFO:String = "UserInfo";
public static const ERROR:String = "Error";
public static const LOGIN_SHOW:String = "LoginShow";
public static const LOGGED_OUT:String = "LoggedOut";
public static const PROFILE_SHOW:String = "ProfileShow";
public static const LOGIN_SHOWN:String = "LoginShown";
public static const LOGIN_HIDE:String = "LoginHide";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static var _user_info:Object = null;
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function saveUserProperties(_arg1:Object):void{
MochiServices.send("coins_saveUserProperties", _arg1);
}
public static function get loggedIn():Boolean{
return (!((_user_info == null)));
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function getUserInfo():void{
MochiServices.send("coins_getUserInfo");
}
public static function showLoginWidget(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showLoginWidget", {options:_arg1});
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function requestLogin():void{
MochiServices.send("coins_requestLogin");
}
public static function getAPIURL():String{
if (!_user_info){
return (null);
};
return (_user_info.api_url);
}
public static function hideLoginWidget():void{
MochiServices.send("coins_hideLoginWidget");
}
public static function getAPIToken():String{
if (!_user_info){
return (null);
};
return (_user_info.api_token);
}
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_user_info = _arg1;
});
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_user_info = null;
});
}
}//package mochi.as3
Section 9
//MochiSync (mochi.as3.MochiSync)
package mochi.as3 {
import flash.utils.*;
public dynamic class MochiSync extends Proxy {
private var _syncContainer:Object;
public static var SYNC_PROPERTY:String = "UpdateProperty";
public static var SYNC_REQUEST:String = "SyncRequest";
public function MochiSync():void{
_syncContainer = {};
}
public function triggerEvent(_arg1:String, _arg2:Object):void{
switch (_arg1){
case SYNC_REQUEST:
MochiServices.send("sync_syncronize", _syncContainer);
break;
case SYNC_PROPERTY:
_syncContainer[_arg2.name] = _arg2.value;
break;
};
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
return (_syncContainer[_arg1]);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var _local3:String;
if (_syncContainer[_arg1] == _arg2){
return;
};
_local3 = _arg1.toString();
_syncContainer[_local3] = _arg2;
MochiServices.send("sync_propUpdate", {name:_local3, value:_arg2});
}
}
}//package mochi.as3
Section 10
//MochiUserData (mochi.as3.MochiUserData)
package mochi.as3 {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
public class MochiUserData extends EventDispatcher {
public var callback:Function;// = null
public var error:Event;// = null
public var key:String;// = null
public var operation:String;// = null
public var data;// = null
public var _loader:URLLoader;
public function MochiUserData(_arg1:String="", _arg2:Function=null){
key = null;
data = null;
error = null;
operation = null;
callback = null;
super();
this.key = _arg1;
this.callback = _arg2;
}
public function securityErrorHandler(_arg1:SecurityErrorEvent):void{
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + _arg1.toString())));
}
public function putEvent(_arg1):void{
request("put", serialize(_arg1));
}
public function request(_arg1:String, _arg2:ByteArray):void{
var api_url:String;
var api_token:String;
var args:URLVariables;
var req:URLRequest;
var _operation = _arg1;
var _data = _arg2;
operation = _operation;
api_url = MochiSocial.getAPIURL();
api_token = MochiSocial.getAPIToken();
if ((((api_url == null)) || ((api_token == null)))){
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "not logged in"));
return;
};
_loader = new URLLoader();
args = new URLVariables();
args.op = _operation;
args.key = key;
req = new URLRequest((((MochiSocial.getAPIURL() + "/") + "MochiUserData?") + args.toString()));
req.method = URLRequestMethod.POST;
req.contentType = "application/x-mochi-userdata";
req.requestHeaders = [new URLRequestHeader("x-mochi-services-version", MochiServices.getVersion()), new URLRequestHeader("x-mochi-api-token", api_token)];
req.data = _data;
_loader.dataFormat = URLLoaderDataFormat.BINARY;
_loader.addEventListener(Event.COMPLETE, completeHandler);
_loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
try {
_loader.load(req);
} catch(e:SecurityError) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + e.toString())));
};
}
public function completeHandler(_arg1:Event):void{
var event = _arg1;
try {
if (_loader.data.length){
data = deserialize(_loader.data);
} else {
data = null;
};
} catch(e:Error) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("deserialize error: " + e.toString())));
return;
};
if (callback != null){
performCallback();
} else {
dispatchEvent(event);
};
close();
}
public function performCallback():void{
try {
callback(this);
} catch(e:Error) {
trace(("[MochiUserData] exception during callback: " + e));
};
}
public function serialize(_arg1):ByteArray{
var _local2:ByteArray;
_local2 = new ByteArray();
_local2.objectEncoding = ObjectEncoding.AMF3;
_local2.writeObject(_arg1);
_local2.compress();
return (_local2);
}
public function errorHandler(_arg1:IOErrorEvent):void{
data = null;
error = _arg1;
if (callback != null){
performCallback();
} else {
dispatchEvent(_arg1);
};
close();
}
public function getEvent():void{
request("get", serialize(null));
}
override public function toString():String{
return ((((((((("[MochiUserData operation=" + operation) + " key=\"") + key) + "\" data=") + data) + " error=\"") + error) + "\"]"));
}
public function close():void{
if (_loader){
_loader.removeEventListener(Event.COMPLETE, completeHandler);
_loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
_loader.close();
_loader = null;
};
error = null;
callback = null;
}
public function deserialize(_arg1:ByteArray){
_arg1.objectEncoding = ObjectEncoding.AMF3;
_arg1.uncompress();
return (_arg1.readObject());
}
public static function get(_arg1:String, _arg2:Function):void{
var _local3:MochiUserData;
_local3 = new MochiUserData(_arg1, _arg2);
_local3.getEvent();
}
public static function put(_arg1:String, _arg2, _arg3:Function):void{
var _local4:MochiUserData;
_local4 = new MochiUserData(_arg1, _arg3);
_local4.putEvent(_arg2);
}
}
}//package mochi.as3
Section 11
//7y6tru_442 (TrackSetter01_03_final_fla.7y6tru_442)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class 7y6tru_442 extends MovieClip {
public function 7y6tru_442(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 12
//AllnewArrow10_360 (TrackSetter01_03_final_fla.AllnewArrow10_360)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class AllnewArrow10_360 extends MovieClip {
public function AllnewArrow10_360(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 13
//AllnewArrow6_354 (TrackSetter01_03_final_fla.AllnewArrow6_354)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class AllnewArrow6_354 extends MovieClip {
public function AllnewArrow6_354(){
addFrameScript(0, frame1, 3, frame4);
}
function frame1(){
stop();
}
function frame4(){
}
}
}//package TrackSetter01_03_final_fla
Section 14
//AllnewArrow7_358 (TrackSetter01_03_final_fla.AllnewArrow7_358)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class AllnewArrow7_358 extends MovieClip {
public function AllnewArrow7_358(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 15
//AllnewArrow9_359 (TrackSetter01_03_final_fla.AllnewArrow9_359)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class AllnewArrow9_359 extends MovieClip {
public function AllnewArrow9_359(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 16
//arr3423423_277 (TrackSetter01_03_final_fla.arr3423423_277)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class arr3423423_277 extends MovieClip {
public function arr3423423_277(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 17
//asdas_141 (TrackSetter01_03_final_fla.asdas_141)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class asdas_141 extends MovieClip {
public function asdas_141(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 18
//car41_201 (TrackSetter01_03_final_fla.car41_201)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class car41_201 extends MovieClip {
public var B:MovieClip;
}
}//package TrackSetter01_03_final_fla
Section 19
//container_154 (TrackSetter01_03_final_fla.container_154)
package TrackSetter01_03_final_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class container_154 extends MovieClip {
public var LEFT:Boolean;
public var WaterTxt:TextField;
public var pausemc:MovieClip;
public var b1:MovieClip;
public var b2:MovieClip;
public var HospTxt:TextField;
public var bgsound:Bgsound;
public var c1:MovieClip;
public var c3:MovieClip;
public var c2:MovieClip;
public var secs1:String;
public var radiance:Number;
public var fire:Firesc;
public var FireTxt:TextField;
public var d4:MovieClip;
public var PoliceTxt:TextField;
public var d5:MovieClip;
public var d6:MovieClip;
public var d0:MovieClip;
public var d2:MovieClip;
public var speed:Number;
public var arr:Array;
public var d3:MovieClip;
public var i:int;
public var k:int;
public var e2:MovieClip;
public var Fire:MovieClip;
public var d1:MovieClip;
public var j:int;
public var e1:MovieClip;
public var sndbut:MovieClip;
public var hospital:Hospital;
public var f2:MovieClip;
public var lvsel:MovieClip;
public var forremove:MovieClip;
public var bgmc:MovieClip;
public var speedMaxReverse:Number;
public var f1:MovieClip;
public var speedAcceleration:Number;
public var steering:Number;
public var temptraincaled:MovieClip;
public var sndbut2:MovieClip;
public var steeringFriction:Number;
public var DelArr:Array;
public var time:int;
public var radianceOld:Number;
public var ColTxt:TextField;
public var Water:MovieClip;
public var House:MovieClip;
public var MOVEFRONT:Boolean;
public var inter:int;
public var water:Watersc;
public var mytimer:Timer;
public var velocityX:Number;
public var velocityY:Number;
public var police:Policesc;
public var Times:TextField;
public var idint:int;
public var house:Home;
public var steeringMax:Number;
public var level_txt:TextField;
public var TOP:Boolean;
public var Police:MovieClip;
public var help:MovieClip;
public var HouseTxt:TextField;
public var FliRef:MovieClip;
public var Col:MovieClip;
public var steeringAcceleration:Number;
public var college:College;
public var speedMax:Number;
public var groundFriction:Number;
public var LScore:TextField;
public var BOT:Boolean;
public var tra:MovieClip;
public var wrong:Wrong;
public var logo:SimpleButton;
public var ArrowArr:Array;
public var MOVEREVERSE:Boolean;
public var Hosp:MovieClip;
public var carArr:Array;
public var a1:MovieClip;
public var a2:MovieClip;
public var a4:MovieClip;
public var mins1:String;
public var a3:MovieClip;
public var RIGHT:Boolean;
public function container_154(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
public function ForCheck(_arg1:MovieClip){
if (Col != null){
if (((HitTest.complexHitTestObject(_arg1, Col, 1)) && ((_arg1.carid == 1)))){
var _local2 = TrackSetter.CounterArr[TrackSetter.LevelCount];
var _local3:int;
var _local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
TrackSetter.levelScore = (TrackSetter.levelScore + 5);
if (myvar.soundToggled){
myvar.sc1 = college.play(0, 1);
} else {
myvar.sc1.stop();
};
ColTxt.text = ((TrackSetter.CounterArr[TrackSetter.LevelCount][0] + " / ") + TrackSetter.TargetArr[TrackSetter.LevelCount][0]);
_arg1.carid = 100;
} else {
if (((HitTest.complexHitTestObject(_arg1, Col, 1)) && (!((_arg1.carid == 100))))){
if (TrackSetter.levelScore > 5){
TrackSetter.levelScore = (TrackSetter.levelScore - 5);
};
if (myvar.soundToggled){
myvar.wrngsc.stop();
myvar.wrngsc = wrong.play(0, 1);
} else {
myvar.wrngsc.stop();
};
};
};
};
if (Water != null){
if (((HitTest.complexHitTestObject(_arg1, Water, 1)) && ((_arg1.carid == 2)))){
_local2 = TrackSetter.CounterArr[TrackSetter.LevelCount];
_local3 = 1;
_local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
TrackSetter.levelScore = (TrackSetter.levelScore + 5);
if (myvar.soundToggled){
myvar.sc2 = water.play(0, 1);
} else {
myvar.sc2.stop();
};
WaterTxt.text = ((TrackSetter.CounterArr[TrackSetter.LevelCount][1] + " / ") + TrackSetter.TargetArr[TrackSetter.LevelCount][1]);
_arg1.carid = 100;
} else {
if (((HitTest.complexHitTestObject(_arg1, Water, 1)) && (!((_arg1.carid == 100))))){
if (TrackSetter.levelScore > 5){
TrackSetter.levelScore = (TrackSetter.levelScore - 5);
};
if (myvar.soundToggled){
myvar.wrngsc.stop();
myvar.wrngsc = wrong.play(0, 1);
} else {
myvar.wrngsc.stop();
};
};
};
};
if (Fire != null){
if (((HitTest.complexHitTestObject(_arg1, Fire, 1)) && ((_arg1.carid == 3)))){
trace(" ForCheck ");
_local2 = TrackSetter.CounterArr[TrackSetter.LevelCount];
_local3 = 2;
_local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
TrackSetter.levelScore = (TrackSetter.levelScore + 5);
if (myvar.soundToggled){
myvar.sc3 = fire.play(0, 1);
} else {
myvar.sc3.stop();
};
FireTxt.text = ((TrackSetter.CounterArr[TrackSetter.LevelCount][2] + " / ") + TrackSetter.TargetArr[TrackSetter.LevelCount][2]);
_arg1.carid = 100;
} else {
if (((HitTest.complexHitTestObject(_arg1, Fire, 1)) && (!((_arg1.carid == 100))))){
if (myvar.soundToggled){
myvar.wrngsc.stop();
myvar.wrngsc = wrong.play(0, 1);
} else {
myvar.wrngsc.stop();
};
if (TrackSetter.levelScore > 5){
TrackSetter.levelScore = (TrackSetter.levelScore - 5);
};
};
};
};
if (House != null){
if (((HitTest.complexHitTestObject(_arg1, House, 1)) && ((_arg1.carid == 4)))){
_local2 = TrackSetter.CounterArr[TrackSetter.LevelCount];
_local3 = 3;
_local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
TrackSetter.levelScore = (TrackSetter.levelScore + 5);
if (myvar.soundToggled){
myvar.sc4 = house.play(0, 1);
} else {
myvar.sc4.stop();
};
HouseTxt.text = ((TrackSetter.CounterArr[TrackSetter.LevelCount][3] + " / ") + TrackSetter.TargetArr[TrackSetter.LevelCount][3]);
_arg1.carid = 100;
} else {
if (((HitTest.complexHitTestObject(_arg1, House, 1)) && (!((_arg1.carid == 100))))){
if (myvar.soundToggled){
myvar.wrngsc.stop();
myvar.wrngsc = wrong.play(0, 1);
} else {
myvar.wrngsc.stop();
};
if (TrackSetter.levelScore > 5){
TrackSetter.levelScore = (TrackSetter.levelScore - 5);
};
};
};
};
if (Police != null){
if (((HitTest.complexHitTestObject(_arg1, Police, 1)) && ((_arg1.carid == 5)))){
_local2 = TrackSetter.CounterArr[TrackSetter.LevelCount];
_local3 = 4;
_local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
TrackSetter.levelScore = (TrackSetter.levelScore + 5);
if (myvar.soundToggled){
myvar.sc5 = police.play(0, 1);
} else {
myvar.sc5.stop();
};
PoliceTxt.text = ((TrackSetter.CounterArr[TrackSetter.LevelCount][4] + " / ") + TrackSetter.TargetArr[TrackSetter.LevelCount][4]);
_arg1.carid = 100;
} else {
if (((HitTest.complexHitTestObject(_arg1, Police, 1)) && (!((_arg1.carid == 100))))){
if (myvar.soundToggled){
myvar.wrngsc.stop();
myvar.wrngsc = wrong.play(0, 1);
} else {
myvar.wrngsc.stop();
};
if (TrackSetter.levelScore > 5){
TrackSetter.levelScore = (TrackSetter.levelScore - 5);
};
};
};
};
if (Hosp != null){
if (((HitTest.complexHitTestObject(_arg1, Hosp, 1)) && ((_arg1.carid == 6)))){
_local2 = TrackSetter.CounterArr[TrackSetter.LevelCount];
_local3 = 5;
_local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
TrackSetter.levelScore = (TrackSetter.levelScore + 5);
if (myvar.soundToggled){
myvar.sc6 = hospital.play(0, 1);
} else {
myvar.sc6.stop();
};
HospTxt.text = ((TrackSetter.CounterArr[TrackSetter.LevelCount][5] + " / ") + TrackSetter.TargetArr[TrackSetter.LevelCount][5]);
_arg1.carid = 100;
} else {
if (((HitTest.complexHitTestObject(_arg1, Hosp, 1)) && (!((_arg1.carid == 100))))){
if (myvar.soundToggled){
myvar.wrngsc.stop();
myvar.wrngsc = wrong.play(0, 1);
} else {
myvar.wrngsc.stop();
};
if (TrackSetter.levelScore > 5){
TrackSetter.levelScore = (TrackSetter.levelScore - 5);
};
};
};
};
}
public function mute(_arg1:MouseEvent):void{
sndbut_mute();
}
public function Clickfn(_arg1:MouseEvent){
var _local2:int;
var _local3:String;
var _local4:String;
var _local5:int;
_local2 = _arg1.currentTarget.currentFrame;
_local3 = _arg1.currentTarget.currentLabel;
_local4 = _arg1.currentTarget.name.substring(0, 1);
_local5 = 2;
if (_local4 == "b"){
_local5 = 3;
};
if (_local4 == "c"){
_local5 = 4;
};
if (_local4 == "e"){
_local5 = 8;
};
if (_local4 == "f"){
_local5 = 6;
};
_local2 = (_local2 + 1);
if (_local2 > _local5){
_local2 = 1;
};
MovieClip(_arg1.currentTarget).gotoAndStop(_local2);
}
public function calfor(_arg1:MovieClip){
var _local2:int;
var _local3:String;
var _local4:int;
var _local5:String;
_local2 = 1;
while (_local2 < ArrowArr.length) {
if (HitTest.complexHitTestObject(_arg1.S, ArrowArr[_local2], 1)){
_local3 = ArrowArr[_local2].currentLabel;
_local4 = int(_local3.substring(1, 2));
_local5 = _local3.substring(0, 2);
if (_arg1.radiance == 0){
if (_local4 != 0){
_arg1.remove = true;
} else {
_arg1.remove = false;
};
} else {
if (_arg1.radiance == 11){
if (_local4 != 1){
_arg1.remove = true;
} else {
_arg1.remove = false;
};
} else {
if (_arg1.radiance == 22){
if (_local4 != 3){
_arg1.remove = true;
} else {
_arg1.remove = false;
};
} else {
if (_arg1.radiance == -11){
if (_local4 != 2){
_arg1.remove = true;
} else {
_arg1.remove = false;
};
};
};
};
};
};
_local2++;
};
}
function frame5(){
stop();
ArrowArr = new Array("", a1, a2, a3, a4);
DelArr = new Array(d0, d1, d2, d3, d4);
time = 60;
EventsAddFun(ArrowArr, DelArr, time);
}
function frame6(){
ArrowArr = new Array("", a1, a2, a3, a4);
DelArr = new Array(d0, d1, d2, d3, d4);
time = 60;
EventsAddFun(ArrowArr, DelArr, time);
}
function frame3(){
stop();
ArrowArr = new Array("", a1, a2, a3);
DelArr = new Array(d0, d1, d2, d3);
time = 60;
EventsAddFun(ArrowArr, DelArr, time);
}
public function sndbut2_mute():void{
if (myvar.soundToggled){
myvar.soundToggled = false;
sndbut2.gotoAndStop(2);
} else {
if (myvar.soundToggled == false){
myvar.soundToggled = true;
sndbut2.gotoAndStop(1);
};
};
}
function frame9(){
stop();
ArrowArr = new Array("", a1, a2, b1);
DelArr = new Array(d0, d1, d2, d3, d4);
time = 60;
EventsAddFun(ArrowArr, DelArr, time);
}
function frame2(){
stop();
ArrowArr = new Array("", a1, a2);
DelArr = new Array(d0, d1, d2);
time = 60;
EventsAddFun(ArrowArr, DelArr, time);
}
function frame8(){
stop();
ArrowArr = new Array("", a1, a2, a3, a4);
DelArr = new Array(d0, d1, d2, d3, d4, d5);
time = 60;
EventsAddFun(ArrowArr, DelArr, time);
}
public function owner_helped(_arg1:MouseEvent):void{
help.palette.visible = false;
}
function frame7(){
stop();
ArrowArr = new Array("", a1, b1, b2, c1, c2, c3);
DelArr = new Array(d0, d1, d2, d3, d4, d5);
time = 60;
EventsAddFun(ArrowArr, DelArr, time);
}
function frame10(){
stop();
ArrowArr = new Array("", b1, b2, e1, e2, f1, f2);
DelArr = new Array(d0, d1, d2, d3, d4, d5, d6);
time = 180;
EventsAddFun(ArrowArr, DelArr, time);
}
public function step(_arg1:Event){
var _local2:*;
var _local3:MovieClip;
var _local4:*;
var _local5:*;
_local2 = 0;
while (_local2 < carArr.length) {
_local3 = (carArr[_local2] as MovieClip);
if (((!(_local3.remove)) && (_local3.MOVEFRONT))){
speed = _local3.speed;
speedMax = _local3.speedMax;
speedMaxReverse = _local3.speedMaxReverse;
speedAcceleration = _local3.speedAcceleration;
steeringAcceleration = _local3.steeringAcceleration;
steeringMax = _local3.steeringMax;
steering = _local3.steering;
steeringFriction = _local3.steeringFriction;
velocityX = _local3.velocityX;
velocityY = _local3.velocityY;
radiance = _local3.radiance;
radianceOld = _local3.radianceOld;
MOVEFRONT = _local3.MOVEFRONT;
if (MOVEFRONT){
if (speed < speedMax){
speed = (speed + speedAcceleration);
if (speed > speedMax){
speed = speedMax;
};
};
};
if ((((_local3.Turn == "L")) && (_local3.ok))){
steering = (steering - steeringAcceleration);
if (steering > steeringMax){
steering = steeringMax;
};
} else {
if ((((_local3.Turn == "R")) && (_local3.ok))){
steering = (steering + steeringAcceleration);
if (steering < -(steeringMax)){
steering = -(steeringMax);
};
} else {
if ((((_local3.Turn == "B")) && (_local3.ok))){
};
};
};
speed = (speed * groundFriction);
_local4 = (speed * Math.cos(radiance));
_local5 = (speed * Math.sin(radiance));
velocityX = (velocityX + ((_local4 - velocityX) * groundFriction));
velocityY = (velocityY + ((_local5 - velocityY) * groundFriction));
if ((((((((velocityX < 0.5)) && ((velocityX > -0.5)))) && ((velocityY < 0.5)))) && ((velocityY > -0.5)))){
velocityX = 0;
velocityY = 0;
};
_local3.x = (_local3.x + velocityX);
_local3.y = (_local3.y + velocityY);
if ((((radiance > (radianceOld - 1.508))) && ((radiance < (radianceOld + 1.508))))){
radiance = (radiance + ((steering * speed) * 0.045));
} else {
radiance = _local3.Radiance;
_local3.ok = false;
};
_local3.rotation = ((radiance * 180) / Math.PI);
steering = (steering - (steering * 0.1));
_local3.speed = speed;
_local3.speedMax = speedMax;
_local3.speedMaxReverse = speedMaxReverse;
_local3.speedAcceleration = speedAcceleration;
_local3.steeringAcceleration = steeringAcceleration;
_local3.steeringMax = steeringMax;
_local3.steering = steering;
_local3.steeringFriction = steeringFriction;
_local3.velocityX = velocityX;
_local3.velocityY = velocityY;
_local3.radiance = radiance;
_local3.MOVEFRONT = MOVEFRONT;
ForCheck(_local3);
TurnFun(_local3);
DelFun(_local3, _local2);
};
if ((((TrackSetter.LevelCount == 7)) || ((TrackSetter.LevelCount == 10)))){
calfor(_local3);
};
_local2++;
};
}
public function calforLevelUP(){
var _local1:int;
var _local2:int;
_local1 = 0;
_local2 = 0;
while (_local2 < TrackSetter.TargetArr[TrackSetter.LevelCount].length) {
if (TrackSetter.TargetArr[TrackSetter.LevelCount][_local2] <= TrackSetter.CounterArr[TrackSetter.LevelCount][_local2]){
_local1++;
};
_local2++;
};
if (_local1 == TrackSetter.TargetArr[TrackSetter.LevelCount].length){
trace("Level Uped");
if (inter > 0){
clearInterval(inter);
};
mytimer.stop();
SoundMixer.stopAll();
stage.removeEventListener(KeyboardEvent.KEY_DOWN, downfn);
stage.removeEventListener(Event.ENTER_FRAME, step);
if (TrackSetter.LevelCount >= 10){
TrackSetter.Cong = true;
MovieClip(this.parent).gotoAndStop("gover");
} else {
level_txt.text = String(TrackSetter.LevelCount);
MovieClip(this.parent).gotoAndStop("levelup");
};
} else {
trace("Game Over");
if (inter > 0){
clearInterval(inter);
};
mytimer.stop();
SoundMixer.stopAll();
stage.removeEventListener(KeyboardEvent.KEY_DOWN, downfn);
stage.removeEventListener(Event.ENTER_FRAME, step);
MovieClip(this.parent).gotoAndStop("gover");
};
}
public function DelCarFun(_arg1:MovieClip, _arg2:int):Boolean{
var _local3:*;
_local3 = 0;
while (_local3 < carArr.length) {
if (((HitTest.complexHitTestObject(_arg1, carArr[_local3], 1)) && (!((carArr[_local3].id == _arg1.id))))){
trace("hitted success");
removeChild((_arg1 as MovieClip));
removeChild((carArr[_local3] as MovieClip));
carArr.splice(_arg2, 1);
if (_arg2 > _local3){
} else {
_local3--;
};
carArr.splice(_local3, 1);
return (true);
} else {
if (HitTest.complexHitTestObject(carArr[_local3], forremove, 1)){
removeChild((carArr[_local3] as MovieClip));
carArr.splice(_local3, 1);
return (true);
};
};
_local3++;
};
return (false);
}
function frame1(){
trace(("lvl " + TrackSetter.LevelCount));
bgsound = new Bgsound();
college = new College();
fire = new Firesc();
house = new Home();
hospital = new Hospital();
police = new Policesc();
water = new Watersc();
wrong = new Wrong();
sndbut.buttonMode = true;
sndbut2.buttonMode = true;
mytimer = new Timer(1000, 0);
time = 60;
level_txt.text = String(TrackSetter.LevelCount);
sndbut.addEventListener(MouseEvent.CLICK, mute);
sndbut2.addEventListener(MouseEvent.CLICK, mute_sound);
lvsel.addEventListener(MouseEvent.CLICK, lvselfntry);
j = 0;
LEFT = false;
RIGHT = false;
TOP = false;
BOT = false;
MOVEFRONT = false;
MOVEREVERSE = false;
i = 0;
ArrowArr = new Array();
speed = 0;
speedMax = 2;
speedMaxReverse = -2;
speedAcceleration = 1;
groundFriction = 0.95;
steering = 0;
steeringMax = 5;
steeringAcceleration = 0.1;
steeringFriction = 0.98;
velocityX = 0;
velocityY = 0;
radiance = 0;
radianceOld = radiance;
carArr = new Array();
DelArr = new Array();
k = 0;
idint = 0;
inter = 1;
arr = new Array("", [4, 5, 6], [3, 4, 5], [2, 4, 5], [1, 3, 6], [3, 4, 5, 6], [1, 2, 6], [1, 2, 6], [1, 2, 3, 5], [3, 4, 5, 6], [1, 2, 3, 4, 5, 6]);
stage.addEventListener(KeyboardEvent.KEY_DOWN, downfn);
myvar.bgsc = bgsound.play(0, int.MAX_VALUE);
if (TrackSetter.LevelCount == 1){
ArrowArr = new Array("", a1, a2, a3, a4);
DelArr = new Array(d0, d1, d2);
time = 60;
EventsAddFun(ArrowArr, DelArr, time);
stop();
} else {
gotoAndStop(TrackSetter.LevelCount);
};
logo.addEventListener(MouseEvent.CLICK, logofn);
help.buttonMode = true;
help.palette.visible = false;
help.addEventListener(MouseEvent.ROLL_OVER, owner_help);
help.addEventListener(MouseEvent.ROLL_OUT, owner_helped);
pausemc.visible = false;
}
public function downfn(_arg1:KeyboardEvent){
if (_arg1.keyCode == 80){
PauseAll();
};
if (_arg1.keyCode == 77){
sndbut_mute();
};
if (_arg1.keyCode == 83){
sndbut2_mute();
};
}
function frame4(){
stop();
ArrowArr = new Array("", a1, b1);
DelArr = new Array(d0, d1, d2, d3);
time = 60;
EventsAddFun(ArrowArr, DelArr, time);
}
public function time_fun(_arg1:TimerEvent):void{
var _local2:Number;
var _local3:Number;
if (time > 0){
time--;
_local2 = Math.floor((time % 60));
_local3 = Math.floor((time / 60));
if (String(_local2).length == 1){
secs1 = ("0" + _local2);
} else {
secs1 = String(_local2);
};
if (String(_local3).length == 1){
mins1 = ("0" + _local3);
} else {
mins1 = String(_local3);
};
Times.text = ((mins1 + ":") + secs1);
LScore.text = String(TrackSetter.levelScore);
} else {
mytimer.stop();
calforLevelUP();
};
}
public function owner_help(_arg1:MouseEvent):void{
help.palette.visible = true;
}
public function lvselfntry(_arg1:MouseEvent){
lvsel.removeEventListener(MouseEvent.CLICK, lvselfntry);
if (inter > 0){
clearInterval(inter);
};
mytimer.stop();
stage.removeEventListener(Event.ENTER_FRAME, step);
MovieClip(root).gotoAndStop("levels");
}
public function firsttimeCal(){
var _local1:int;
_local1 = 0;
while (_local1 < 6) {
TrackSetter.CounterArr[TrackSetter.LevelCount][_local1] = 0;
_local1++;
};
HospTxt.text = ((TrackSetter.CounterArr[TrackSetter.LevelCount][5] + " / ") + TrackSetter.TargetArr[TrackSetter.LevelCount][5]);
PoliceTxt.text = ((TrackSetter.CounterArr[TrackSetter.LevelCount][4] + " / ") + TrackSetter.TargetArr[TrackSetter.LevelCount][4]);
ColTxt.text = ((TrackSetter.CounterArr[TrackSetter.LevelCount][0] + " / ") + TrackSetter.TargetArr[TrackSetter.LevelCount][0]);
WaterTxt.text = ((TrackSetter.CounterArr[TrackSetter.LevelCount][1] + " / ") + TrackSetter.TargetArr[TrackSetter.LevelCount][1]);
FireTxt.text = ((TrackSetter.CounterArr[TrackSetter.LevelCount][2] + " / ") + TrackSetter.TargetArr[TrackSetter.LevelCount][2]);
HouseTxt.text = ((TrackSetter.CounterArr[TrackSetter.LevelCount][3] + " / ") + TrackSetter.TargetArr[TrackSetter.LevelCount][3]);
}
public function mute_sound(_arg1:MouseEvent):void{
sndbut2_mute();
}
public function addCars(){
var _local1:int;
var _local2:Class;
var _local3:Object;
if (carArr.length <= 4){
_local1 = Math.round((Math.random() * (arr[TrackSetter.LevelCount].length - 1)));
_local2 = (getDefinitionByName(("car" + arr[TrackSetter.LevelCount][_local1])) as Class);
_local3 = new (_local2);
_local3.x = FliRef.x;
_local3.y = FliRef.y;
_local3.carid = arr[TrackSetter.LevelCount][_local1];
_local3.id = idint;
idint++;
_local3.speed = 0;
_local3.speedMax = 2.8;
_local3.speedMaxReverse = -2;
_local3.speedAcceleration = 1;
_local3.steeringAcceleration = 0.15;
_local3.steeringMax = 5;
_local3.steering = 0;
_local3.steeringFriction = steeringFriction;
_local3.velocityX = 0;
_local3.velocityY = 0;
if (TrackSetter.LevelCount == 9){
_local3.radiance = 11;
_local3.radianceOld = 11;
} else {
_local3.radiance = 0;
_local3.radianceOld = 0;
};
_local3.MOVEFRONT = true;
_local3.Radiance = 0;
_local3.ok = false;
_local3.remove = false;
addChild((_local3 as MovieClip));
carArr.push(_local3);
};
}
public function addall(){
var _local1:int;
_local1 = 1;
while (_local1 < ArrowArr.length) {
ArrowArr[_local1].addEventListener(MouseEvent.CLICK, Clickfn);
ArrowArr[_local1].buttonMode = true;
ArrowArr[_local1].Turn = "F";
ArrowArr[_local1].ok = false;
_local1++;
};
}
public function sndbut_mute():void{
if (myvar.soundToggle){
myvar.bgsc.stop();
myvar.soundToggle = false;
sndbut.gotoAndStop(2);
} else {
if (myvar.soundToggle == false){
myvar.soundToggle = true;
myvar.bgsc = bgsound.play(0, int.MAX_VALUE);
sndbut.gotoAndStop(1);
};
};
}
public function DelFun(_arg1:MovieClip, _arg2:int){
var _local3:int;
if (DelCarFun(_arg1, _arg2)){
} else {
_local3 = 0;
while (_local3 < DelArr.length) {
if (HitTest.complexHitTestObject(_arg1, (DelArr[_local3] as MovieClip), 1)){
removeChild((_arg1 as MovieClip));
carArr.splice(_arg2, 1);
break;
};
_local3++;
};
};
}
public function TurnFun(_arg1:MovieClip){
var _local2:int;
var _local3:String;
var _local4:String;
_local2 = 1;
while (_local2 < ArrowArr.length) {
if (((HitTest.complexHitTestObject(_arg1.B, ArrowArr[_local2], 1)) && ((_arg1.ok == false)))){
_arg1.steering = 0;
_local3 = ArrowArr[_local2].currentLabel;
_local4 = _local3.substring(0, 1);
_arg1.hitMc = _local2;
if (_local3.substring(0, 1) != "F"){
_arg1.radianceOld = _arg1.radiance;
};
if ((((((_arg1.radiance == 0)) && ((_local4 == "L")))) || ((((_arg1.radiance == 22)) && ((_local4 == "R")))))){
_arg1.Radiance = 11;
} else {
if ((((((_arg1.radiance == 0)) && ((_local4 == "R")))) || ((((_arg1.radiance == 22)) && ((_local4 == "L")))))){
_arg1.Radiance = -11;
} else {
if ((((((_arg1.radiance == 11)) && ((_local4 == "L")))) || ((((_arg1.radiance == -11)) && ((_local4 == "R")))))){
_arg1.Radiance = 22;
} else {
if ((((((_arg1.radiance == 11)) && ((_local4 == "R")))) || ((((_arg1.radiance == -11)) && ((_local4 == "L")))))){
_arg1.Radiance = 0;
};
};
};
};
_arg1.Turn = _local3.substring(0, 1);
if (_local3.substring(0, 2) != "F"){
_arg1.ok = true;
};
break;
};
_local2++;
};
}
public function logofn(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.123chase.com"), "_blank");
}
public function EventsAddFun(_arg1:Array, _arg2:Array, _arg3:int){
trace("eventAdd");
ArrowArr = _arg1;
DelArr = _arg2;
time = 180;
mytimer.addEventListener(TimerEvent.TIMER, time_fun);
mytimer.start();
stage.addEventListener(Event.ENTER_FRAME, step);
TrackSetter.levelScore = 0;
addCars();
inter = setInterval(addCars, 3000);
firsttimeCal();
addall();
}
public function PauseAll(){
if (!TrackSetter.IsPause){
this.setChildIndex(pausemc, (numChildren - 1));
pausemc.visible = true;
TrackSetter.IsPause = true;
if (inter > 0){
clearInterval(inter);
};
mytimer.stop();
SoundMixer.stopAll();
stage.removeEventListener(Event.ENTER_FRAME, step);
} else {
if (myvar.soundToggle){
myvar.bgsc = bgsound.play(0, int.MAX_VALUE);
} else {
myvar.bgsc.stop();
};
pausemc.visible = false;
TrackSetter.IsPause = false;
if (inter > 0){
clearInterval(inter);
};
inter = setInterval(addCars, 3000);
mytimer.start();
stage.addEventListener(Event.ENTER_FRAME, step);
};
}
}
}//package TrackSetter01_03_final_fla
Section 20
//dbvcn_151 (TrackSetter01_03_final_fla.dbvcn_151)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class dbvcn_151 extends MovieClip {
public function dbvcn_151(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 21
//ewrn_143 (TrackSetter01_03_final_fla.ewrn_143)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class ewrn_143 extends MovieClip {
public function ewrn_143(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 22
//frsdgh_136 (TrackSetter01_03_final_fla.frsdgh_136)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class frsdgh_136 extends MovieClip {
public function frsdgh_136(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 23
//frsdghcopy_122 (TrackSetter01_03_final_fla.frsdghcopy_122)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class frsdghcopy_122 extends MovieClip {
public function frsdghcopy_122(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 24
//fsdfdsfwe45t3452124_420 (TrackSetter01_03_final_fla.fsdfdsfwe45t3452124_420)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class fsdfdsfwe45t3452124_420 extends MovieClip {
public function fsdfdsfwe45t3452124_420(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 25
//fsdfdsfwe45t3452127_424 (TrackSetter01_03_final_fla.fsdfdsfwe45t3452127_424)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class fsdfdsfwe45t3452127_424 extends MovieClip {
public function fsdfdsfwe45t3452127_424(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 26
//fsdfdsfwe45t3452128_425 (TrackSetter01_03_final_fla.fsdfdsfwe45t3452128_425)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class fsdfdsfwe45t3452128_425 extends MovieClip {
public function fsdfdsfwe45t3452128_425(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 27
//fsdfdsfwe45t3452129_426 (TrackSetter01_03_final_fla.fsdfdsfwe45t3452129_426)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class fsdfdsfwe45t3452129_426 extends MovieClip {
public function fsdfdsfwe45t3452129_426(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 28
//fsdfwrerew3_179 (TrackSetter01_03_final_fla.fsdfwrerew3_179)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class fsdfwrerew3_179 extends MovieClip {
public function fsdfwrerew3_179(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 29
//gjkhngjklsdfng_69 (TrackSetter01_03_final_fla.gjkhngjklsdfng_69)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class gjkhngjklsdfng_69 extends MovieClip {
public var instBut:SimpleButton;
public function gjkhngjklsdfng_69(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 30
//hh_135 (TrackSetter01_03_final_fla.hh_135)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class hh_135 extends MovieClip {
public function hh_135(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 31
//hmjgj_139 (TrackSetter01_03_final_fla.hmjgj_139)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class hmjgj_139 extends MovieClip {
public function hmjgj_139(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 32
//leftright234r_176 (TrackSetter01_03_final_fla.leftright234r_176)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class leftright234r_176 extends MovieClip {
public function leftright234r_176(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 33
//MainTimeline (TrackSetter01_03_final_fla.MainTimeline)
package TrackSetter01_03_final_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import mochi.as3.*;
import flash.utils.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var backBut:SimpleButton;
public var lev:Number;
public var instBut:SimpleButton;
public var so:SharedObject;
public var levelBut:SimpleButton;
public var o:Object;
public var l:int;
public var r:int;
public var percentage:Number;
public var game_txt:TextField;
public var moregames:SimpleButton;
public var contestMenu:ContextMenu;
public var playBut:SimpleButton;
public var boardID:String;
public var over:MovieClip;
public var total_txt:TextField;
public var level1Array:Array;
public var l1:MovieClip;
public var l3:MovieClip;
public var l4:MovieClip;
public var l5:MovieClip;
public var l8:MovieClip;
public var l9:MovieClip;
public var l7:MovieClip;
public var l2:MovieClip;
public var l6:MovieClip;
public var submitscore:SimpleButton;
public var preloadMc:MovieClip;
public var trAgain:SimpleButton;
public var l10:MovieClip;
public var levelscore:TextField;
public var load_txt:TextField;
public var contextmenuItem:ContextMenuItem;
public var loadgame:MovieClip;
public var gamescore:TextField;
public function MainTimeline(){
addFrameScript(0, frame1, 5, frame6, 11, frame12, 16, frame17, 29, frame30, 34, frame35, 39, frame40);
}
public function inst(_arg1:MouseEvent){
TrackSetter.LevelCount = 1;
myvar.levelCompleted = 1;
TrackSetter.gameScore = 0;
gotoAndStop("inst");
}
function frame17(){
stop();
SoundMixer.stopAll();
lev = 0;
level1Array = new Array("", l1, l2, l3, l4, l5, l6, l7, l8, l9, l10);
l = 1;
while (l <= 10) {
level1Array[l].buttonMode = true;
if (l > myvar.levelCompleted){
level1Array[l].gotoAndStop(2);
} else {
level1Array[l].mouseChildern = false;
level1Array[l].addEventListener(MouseEvent.CLICK, fun1);
};
if (l == TrackSetter.LevelCount){
level1Array[l].gotoAndStop(3);
};
l++;
};
}
function frame12(){
SoundMixer.stopAll();
backBut.addEventListener(MouseEvent.CLICK, gostart);
}
function frame6(){
SoundMixer.stopAll();
so = SharedObject.getLocal("baru");
if (so.data.tLevel != undefined){
TrackSetter.LevelCount = so.data.tLevel;
myvar.levelCompleted = so.data.tLevel;
myvar.myArray = so.data.ar;
TrackSetter.gameScore = 0;
r = 0;
while (r < (TrackSetter.LevelCount - 1)) {
TrackSetter.gameScore = (TrackSetter.gameScore + myvar.myArray[r]);
r++;
};
loadgame.gotoAndStop(2);
loadgame.addEventListener(MouseEvent.CLICK, loadgamefn);
} else {
myvar.levelCompleted = 1;
TrackSetter.LevelCount = 1;
};
stop();
instBut.addEventListener(MouseEvent.CLICK, inst);
playBut.addEventListener(MouseEvent.CLICK, playit);
}
function frame1(){
stop();
preloadMc.logoload.addEventListener(MouseEvent.CLICK, logofnload);
contestMenu = new ContextMenu();
contestMenu.hideBuiltInItems();
contextmenuItem = new ContextMenuItem("www.123chase.com");
contextmenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, Site);
contestMenu.customItems.push(contextmenuItem);
this.contextMenu = contestMenu;
percentage = 0;
total_txt.text = (String(100) + "%");
stage.addEventListener(Event.ENTER_FRAME, BeeMoving);
}
function frame35(){
SoundMixer.stopAll();
stop();
TrackSetter.gameScore = (TrackSetter.gameScore + TrackSetter.levelScore);
levelscore.text = String(TrackSetter.levelScore);
gamescore.text = String(TrackSetter.gameScore);
if (TrackSetter.Cong){
over.gotoAndStop(1);
} else {
over.gotoAndStop(2);
};
trAgain.addEventListener(MouseEvent.CLICK, trAgainFun1);
moregames.addEventListener(MouseEvent.CLICK, moregamesFun);
submitscore.addEventListener(MouseEvent.CLICK, submitscoreFun1);
}
function frame30(){
SoundMixer.stopAll();
stop();
TrackSetter.LevelCount++;
TrackSetter.gameScore = (TrackSetter.gameScore + TrackSetter.levelScore);
levelscore.text = TrackSetter.levelScore.toString();
gamescore.text = TrackSetter.gameScore.toString();
levelBut.addEventListener(MouseEvent.CLICK, levelButFun);
trAgain.addEventListener(MouseEvent.CLICK, trAgainFun);
}
public function trAgainFun(_arg1:MouseEvent){
TrackSetter.LevelCount--;
TrackSetter.gameScore = (TrackSetter.gameScore - TrackSetter.levelScore);
this.gotoAndStop("gamepage");
}
public function gostart(_arg1:MouseEvent){
MochiBot.track(this, "226013fe");
this.gotoAndStop("gamepage");
}
function frame40(){
SoundMixer.stopAll();
game_txt.text = String(TrackSetter.gameScore);
MochiServices.connect("322e2d1ddd66c8cf", root);
o = {n:[6, 15, 2, 5, 13, 5, 13, 4, 10, 11, 11, 10, 11, 6, 13, 6], f:function (_arg1:Number, _arg2:String):String{
if (_arg2.length == 16){
return (_arg2);
};
return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16))));
}};
boardID = o.f(0, "");
MochiScores.showLeaderboard({boardID:boardID, score:TrackSetter.gameScore});
TrackSetter.LevelCount = 1;
TrackSetter.gameScore = 0;
moregames.addEventListener(MouseEvent.CLICK, moregamesFun1);
}
public function loadgamefn(_arg1:MouseEvent):void{
loadgame.removeEventListener(MouseEvent.CLICK, loadgamefn);
gotoAndStop("gamepage");
}
public function fun1(_arg1:MouseEvent){
var _local2:*;
var _local3:int;
lev = _arg1.currentTarget.name.substring(1, 3);
trace("hi");
trace(lev);
_local2 = 1;
while (_local2 <= 10) {
if (_local2 <= myvar.levelCompleted){
level1Array[_local2].gotoAndStop(1);
};
if (_local2 == lev){
level1Array[_local2].gotoAndStop(3);
};
_local2++;
};
if (lev != 0){
TrackSetter.LevelCount = lev;
TrackSetter.gameScore = 0;
if (TrackSetter.LevelCount > 1){
myvar.myArray = so.data.ar;
_local3 = 0;
while (_local3 < (TrackSetter.LevelCount - 1)) {
TrackSetter.gameScore = (TrackSetter.gameScore + myvar.myArray[_local3]);
_local3++;
};
};
};
gotoAndStop("gamepage");
}
public function logofnload(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.123chase.com"), "_blank");
}
public function submitscoreFun1(_arg1:MouseEvent){
so.clear();
this.gotoAndStop("submitpage");
}
public function moregamesFun1(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://123chase.com"), "_blank");
}
public function trAgainFun1(_arg1:MouseEvent){
TrackSetter.gameScore = (TrackSetter.gameScore - TrackSetter.levelScore);
this.gotoAndStop("gamepage");
}
public function BeeMoving(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
_local2 = loaderInfo.bytesLoaded;
_local3 = loaderInfo.bytesTotal;
percentage = Math.round(((_local2 / _local3) * 100));
load_txt.text = (String(percentage) + "%");
preloadMc.preloadCar.gotoAndStop((percentage * 3));
if (_local2 == _local3){
gotoAndStop("start");
stage.removeEventListener(Event.ENTER_FRAME, BeeMoving);
};
}
public function moregamesFun(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://123chase.com"), "_blank");
}
public function playit(_arg1:MouseEvent){
MochiBot.track(this, "226013fe");
so.clear();
TrackSetter.LevelCount = 1;
TrackSetter.gameScore = 0;
this.gotoAndStop("gamepage");
}
public function Site(_arg1:Event):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.123chase.com");
navigateToURL(_local2, "_blank");
}
public function levelButFun(_arg1:MouseEvent){
myvar.myArray[(TrackSetter.LevelCount - 1)] = TrackSetter.levelScore;
so.setProperty("ar", myvar.myArray);
so.data.tLevel = TrackSetter.LevelCount;
if (TrackSetter.LevelCount >= myvar.levelCompleted){
myvar.levelCompleted = TrackSetter.LevelCount;
};
this.gotoAndStop("gamepage");
}
}
}//package TrackSetter01_03_final_fla
Section 34
//newupdatertreteterter41_173 (TrackSetter01_03_final_fla.newupdatertreteterter41_173)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class newupdatertreteterter41_173 extends MovieClip {
public function newupdatertreteterter41_173(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 35
//preload__23 (TrackSetter01_03_final_fla.preload__23)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class preload__23 extends MovieClip {
public function preload__23(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 36
//preload_preloadMc_1 (TrackSetter01_03_final_fla.preload_preloadMc_1)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class preload_preloadMc_1 extends MovieClip {
public var preloadCar:MovieClip;
public var logoload:SimpleButton;
}
}//package TrackSetter01_03_final_fla
Section 37
//q3erq3wrfd4_130 (TrackSetter01_03_final_fla.q3erq3wrfd4_130)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class q3erq3wrfd4_130 extends MovieClip {
public function q3erq3wrfd4_130(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 38
//q3erq3wrfd7_133 (TrackSetter01_03_final_fla.q3erq3wrfd7_133)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class q3erq3wrfd7_133 extends MovieClip {
public function q3erq3wrfd7_133(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 39
//qweer_148 (TrackSetter01_03_final_fla.qweer_148)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class qweer_148 extends MovieClip {
public function qweer_148(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 40
//rtreteterter150_159 (TrackSetter01_03_final_fla.rtreteterter150_159)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class rtreteterter150_159 extends MovieClip {
public function rtreteterter150_159(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 41
//rtreteterter41_310 (TrackSetter01_03_final_fla.rtreteterter41_310)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class rtreteterter41_310 extends MovieClip {
public function rtreteterter41_310(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 42
//rtyryrty4565copy_256 (TrackSetter01_03_final_fla.rtyryrty4565copy_256)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class rtyryrty4565copy_256 extends MovieClip {
public var palette:MovieClip;
}
}//package TrackSetter01_03_final_fla
Section 43
//Symbol115_242 (TrackSetter01_03_final_fla.Symbol115_242)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class Symbol115_242 extends MovieClip {
public var sndoff:MovieClip;
public function Symbol115_242(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 44
//Symbol115copy2_246 (TrackSetter01_03_final_fla.Symbol115copy2_246)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class Symbol115copy2_246 extends MovieClip {
public var sndoff:MovieClip;
public function Symbol115copy2_246(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 45
//were_146 (TrackSetter01_03_final_fla.were_146)
package TrackSetter01_03_final_fla {
import flash.display.*;
public dynamic class were_146 extends MovieClip {
public function were_146(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package TrackSetter01_03_final_fla
Section 46
//Bgsound (Bgsound)
package {
import flash.media.*;
public dynamic class Bgsound extends Sound {
}
}//package
Section 47
//car1 (car1)
package {
import flash.display.*;
public dynamic class car1 extends MovieClip {
public var S:MovieClip;
public var B:MovieClip;
}
}//package
Section 48
//car2 (car2)
package {
import flash.display.*;
public dynamic class car2 extends MovieClip {
public var S:MovieClip;
public var B:MovieClip;
}
}//package
Section 49
//car3 (car3)
package {
import flash.display.*;
public dynamic class car3 extends MovieClip {
public var S:MovieClip;
public var B:MovieClip;
}
}//package
Section 50
//car4 (car4)
package {
import flash.display.*;
public dynamic class car4 extends MovieClip {
public var S:MovieClip;
public var B:MovieClip;
}
}//package
Section 51
//car5 (car5)
package {
import flash.display.*;
public dynamic class car5 extends MovieClip {
public var S:MovieClip;
public var B:MovieClip;
}
}//package
Section 52
//car6 (car6)
package {
import flash.display.*;
public dynamic class car6 extends MovieClip {
public var S:MovieClip;
public var B:MovieClip;
}
}//package
Section 53
//College (College)
package {
import flash.media.*;
public dynamic class College extends Sound {
}
}//package
Section 54
//Firesc (Firesc)
package {
import flash.media.*;
public dynamic class Firesc extends Sound {
}
}//package
Section 55
//HitTest (HitTest)
package {
import flash.display.*;
import flash.geom.*;
public class HitTest {
protected static function getDrawMatrix(_arg1:DisplayObject, _arg2:Rectangle, _arg3:Number):Matrix{
var _local4:Point;
var _local5:Matrix;
var _local6:Matrix;
_local6 = _arg1.root.transform.concatenatedMatrix;
_local4 = _arg1.localToGlobal(new Point());
_local5 = _arg1.transform.concatenatedMatrix;
_local5.tx = (_local4.x - _arg2.x);
_local5.ty = (_local4.y - _arg2.y);
_local5.a = (_local5.a / _local6.a);
_local5.d = (_local5.d / _local6.d);
if (_arg3 != 1){
_local5.scale(_arg3, _arg3);
};
return (_local5);
}
public static function complexHitTestObject(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:Number=1):Boolean{
return (!((complexIntersectionRectangle(_arg1, _arg2, _arg3).width == 0)));
}
public static function complexIntersectionRectangle(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:Number=1):Rectangle{
var _local4:Rectangle;
var _local5:BitmapData;
var _local6:Rectangle;
if (_arg3 <= 0){
throw (new Error("ArgumentError: Error #5001: Invalid value for accurracy", 5001));
};
if (!_arg1.hitTestObject(_arg2)){
return (new Rectangle());
};
_local4 = intersectionRectangle(_arg1, _arg2);
if (((((_local4.width * _arg3) < 1)) || (((_local4.height * _arg3) < 1)))){
return (new Rectangle());
};
_local5 = new BitmapData((_local4.width * _arg3), (_local4.height * _arg3), false, 0);
_local5.draw(_arg1, HitTest.getDrawMatrix(_arg1, _local4, _arg3), new ColorTransform(1, 1, 1, 1, 0xFF, -255, -255, 0xFF));
_local5.draw(_arg2, HitTest.getDrawMatrix(_arg2, _local4, _arg3), new ColorTransform(1, 1, 1, 1, 0xFF, 0xFF, 0xFF, 0xFF), BlendMode.DIFFERENCE);
_local6 = _local5.getColorBoundsRect(4294967295, 4278255615);
_local5.dispose();
if (_arg3 != 1){
_local6.x = (_local6.x / _arg3);
_local6.y = (_local6.y / _arg3);
_local6.width = (_local6.width / _arg3);
_local6.height = (_local6.height / _arg3);
};
_local6.x = (_local6.x + _local4.x);
_local6.y = (_local6.y + _local4.y);
return (_local6);
}
public static function intersectionRectangle(_arg1:DisplayObject, _arg2:DisplayObject):Rectangle{
var _local3:Rectangle;
var _local4:Rectangle;
var _local5:Rectangle;
if (((((!(_arg1.root)) || (!(_arg2.root)))) || (!(_arg1.hitTestObject(_arg2))))){
return (new Rectangle());
};
_local3 = _arg1.getBounds(_arg1.root);
_local4 = _arg2.getBounds(_arg2.root);
_local5 = new Rectangle();
_local5.x = Math.max(_local3.x, _local4.x);
_local5.y = Math.max(_local3.y, _local4.y);
_local5.width = Math.min(((_local3.x + _local3.width) - _local5.x), ((_local4.x + _local4.width) - _local5.x));
_local5.height = Math.min(((_local3.y + _local3.height) - _local5.y), ((_local4.y + _local4.height) - _local5.y));
return (_local5);
}
}
}//package
Section 56
//Home (Home)
package {
import flash.media.*;
public dynamic class Home extends Sound {
}
}//package
Section 57
//Hospital (Hospital)
package {
import flash.media.*;
public dynamic class Hospital extends Sound {
}
}//package
Section 58
//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 59
//myvar (myvar)
package {
import flash.media.*;
public class myvar {
public static var sc1:SoundChannel = new SoundChannel();
public static var soundToggle:Boolean = true;
public static var sc5:SoundChannel = new SoundChannel();
public static var levelCompleted:Number = 0;
public static var soundToggled:Boolean = true;
public static var sc2:SoundChannel = new SoundChannel();
public static var sc3:SoundChannel = new SoundChannel();
public static var sc4:SoundChannel = new SoundChannel();
public static var wrngsc:SoundChannel = new SoundChannel();
public static var myArray:Array = new Array();
public static var sc6:SoundChannel = new SoundChannel();
public static var bgsc:SoundChannel = new SoundChannel();
}
}//package
Section 60
//Policesc (Policesc)
package {
import flash.media.*;
public dynamic class Policesc extends Sound {
}
}//package
Section 61
//TrackSetter (TrackSetter)
package {
public class TrackSetter {
public static var gameScore:int = 0;
public static var Cong:Boolean = false;
public static var LevelCount:int = 1;
public static var IsPause:Boolean = false;
public static var levelScore:int = 0;
public static var TargetArr:Array = new Array([1, 1, 1, 1, 1, 1], [0, 0, 0, 6, 0, 6], [0, 0, 6, 0, 6, 0], [0, 6, 0, 6, 6, 0], [6, 0, 6, 0, 0, 6], [0, 0, 6, 6, 6, 6], [6, 6, 0, 0, 0, 6], [6, 6, 0, 6, 0, 6], [6, 0, 6, 0, 6, 6], [0, 0, 6, 6, 6, 6], [6, 6, 6, 6, 6, 6]);
public static var CounterArr:Array = new Array([0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]);
}
}//package
Section 62
//Watersc (Watersc)
package {
import flash.media.*;
public dynamic class Watersc extends Sound {
}
}//package
Section 63
//Wrong (Wrong)
package {
import flash.media.*;
public dynamic class Wrong extends Sound {
}
}//package