Frame 1
var my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
_root.menu = my_cm;
fscommand ("showmenu", "fasle");
MochiAd.showPreGameAd({id:"4c96e469a7761661", res:"690x500", background:6845841, color:788068, outline:12695210, no_bg:false});
Frame 3
if (_root.getBytesLoaded() < _root.getBytesTotal()) {
gotoAndStop ("Loading");
}
Frame 7
stop();
Symbol 2 MovieClip Frame 1
onPress = function () {
getURL ("http://www.freeworldgroup.com");
};
Symbol 5 MovieClip Frame 1
function Replace() {
if (sVariable.length == 0) {
tTxt.text = sTxt;
} else {
tTxt.variable = sVariable;
}
tTxt.autoSize = autoSize;
if (autoSize == "right") {
tTxt._x = -Math.floor(tTxt._width);
} else if (autoSize == "center") {
tTxt._x = -Math.floor(tTxt._width / 2);
} else {
tTxt._x = 0;
}
}
var sTxt;
var bBmp;
var bMultiline;
var autoSize;
var sVariable;
Replace();
this.cacheAsBitmap = bBmp;
Symbol 6 MovieClip Frame 1
_x = (Stage.width / 2);
_y = ((Stage.height / 2) - 30);
Symbol 6 MovieClip Frame 25
function flash_loading(x, T, r) {
var _local1 = T / 2;
var _local2 = (-r) / (_local1 * _local1);
return((_local2 * Math.pow((x % T) - _local1, 2)) + r);
}
stop();
var rate;
var all = _root.getBytesTotal();
onEnterFrame = function () {
var _local3 = _root.getBytesLoaded();
rate = int((_local3 / all) * 100) + "%";
mLoading._alpha = flash_loading(getTimer(), 800, 100);
if (_local3 == all) {
delete this.onEnterFrame;
if ((_root._mochiad instanceof MovieClip) != true) {
_root.play();
}
}
};
Instance of Symbol 5 MovieClip in Symbol 6 MovieClip Frame 25
//component parameters
onClipEvent (construct) {
sTxt = "TXT";
sVariable = "_parent.rate";
autoSize = "center";
bBmp = false;
}
Instance of Symbol 5 MovieClip "mLoading" in Symbol 6 MovieClip Frame 25
//component parameters
onClipEvent (construct) {
sTxt = "Loading...";
sVariable = "";
autoSize = "center";
bBmp = false;
}
Symbol 429 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.5");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 430 MovieClip [__Packages.Global] Frame 0
class Global
{
static var keyFlagArr, keyCtrlObjArr, mainPause, pause, testBar, main, game;
function Global () {
}
static function init() {
_root.onEnterFrame = function () {
Global.runAll();
};
keyFlagArr = new Array(256);
keyCtrlObjArr = new Array();
return(null);
}
static function runAll() {
if (mainPause) {
updateTestBar();
return(undefined);
}
var _local2 = 0;
while (_local2 < 256) {
var _local3 = keyFlagArr[_local2];
var _local4 = (keyFlagArr[_local2] = Key.isDown(_local2));
if ((!_local3) && (_local4)) {
if (_local2 == 1) {
} else if (_local2 == 2) {
} else {
runKeyCtrl("onKeyDown", _local2);
}
} else if (_local3 && (!_local4)) {
if (_local2 == 1) {
} else if (_local2 == 2) {
} else {
runKeyCtrl("onKeyUp", _local2);
}
}
_local2++;
}
var _local5 = Common.dumpArrByF(runArr, dumpRunArrF);
_local2 = 0;
while (_local2 < _local5) {
var _local1 = runArr[_local2];
if (pause && (_local1.pauseAble)) {
} else if ((++_local1.intervalNum) >= _local1.interval) {
_local1.intervalNum = 0;
_local1.obj[_local1.runF](--_local1.times);
}
_local2++;
}
updateTestBar();
}
static function dumpRunArrF(runObj) {
return((runObj.obj[runObj.runF] == undefined) || (runObj.times <= 0));
}
static function addRun(obj, runF, interval, times, notPauseAble) {
delRun(obj, runF);
if (interval > 0) {
} else {
interval = 1;
}
if (times > 0) {
} else {
times = Infinity;
}
var _local1;
if (notPauseAble) {
_local1 = false;
} else {
_local1 = true;
}
runArr.push({obj:obj, runF:runF, intervalNum:0, interval:interval, times:times, pauseAble:_local1});
}
static function delRun(obj, runF) {
var _local3 = runArr.length;
var _local1 = 0;
while (_local1 < _local3) {
var _local2 = runArr[_local1];
if ((obj == _local2.obj) && (runF == _local2.runF)) {
runArr[_local1] = null;
return(true);
}
_local1++;
}
return(false);
}
static function updateTestBar() {
if (testBar._name == undefined) {
updateTestBar = null;
}
var _local6;
var _local1;
var _local4 = "";
_local4 = _local4 + (("main=" + main) + newline);
_local4 = _local4 + (("game=" + game) + newline);
_local4 = _local4 + (("pause=" + pause) + newline);
_local6 = runArr.length;
_local4 = _local4 + (("runArr.length=" + _local6) + newline);
var _local3 = 0;
while (_local3 < _local6) {
_local1 = runArr[_local3];
_local4 = _local4 + (((_local1.obj + ",") + _local1.runF) + newline);
_local3++;
}
_local4 = _local4 + "--------------------\n";
_local6 = Common.dumpArrByF(checkObjArr, dumpCOAF);
_local3 = 0;
while (_local3 < _local6) {
_local1 = checkObjArr[_local3];
_local4 = _local4 + (((_local1.obj + ",") + _local1.valName) + newline);
var _local2 = _local1.obj[_local1.valName];
var _local5;
switch (Common.getObjType(_local2)) {
case "Array" :
_local5 = _local2.length;
break;
default :
_local5 = _local2;
}
_local4 = _local4 + (_local5 + newline);
_local3++;
}
_local4 = _local4 + "----";
_local4 = _local4 + ((("totalKeyCtrl:" + keyCtrlObjArr.length) + "\r") + keyCtrlObjArr);
testBar.showMsg(_local4);
}
static function addCheck(obj, valName) {
checkObjArr.push({obj:obj, valName:valName});
}
static function delCheck(obj, valName) {
var _local3 = checkObjArr.length;
var _local1 = 0;
while (_local1 < _local3) {
obj = checkObjArr[_local1];
if ((obj.obj == obj) & (obj.valName == valName)) {
checkObjArr[_local1] = null;
return(true);
}
_local1++;
}
return(false);
}
static function dumpCOAF(obj) {
if (typeof(obj.obj) == "movieclip") {
return(obj.obj._name == undefined);
}
return(obj.obj == undefined);
}
static function addKeyCtrl(obj) {
keyCtrlObjArr.push(obj);
}
static function delKeyCtrl() {
keyCtrlObjArr.pop();
}
static function runKeyCtrl(keyFName, keyCode) {
var _local2 = keyCtrlObjArr.length;
while (_local2-- , _local2 >= 0) {
var _local1 = keyCtrlObjArr[_local2];
if (_local1.onKeyUp || (_local1.onKeyDown)) {
_local1[keyFName](keyCode);
return(undefined);
}
keyCtrlObjArr.pop();
}
}
static function clearAllKeyCtrl() {
keyCtrlObjArr = new Array();
}
static var gameInterface = new Object();
static var runArr = new Array();
static var checkObjArr = new Array();
static var initObj = init();
}
Symbol 431 MovieClip [__Packages.FWG.BasicMain] Frame 0
class FWG.BasicMain extends MovieClip
{
var _name, _parent, gameName, stageWid, stageHei, totalStage, stageNum, sndBg, soundOn, playerInfo, keySetting, isFirstPlay, _keyDown, _keyUp, __currScore, gamePad, __score, pageId, fadeMask, stageSave, qualitySetting, snd_mc, __musicOn, isWin, mainContainer, pausePad;
function BasicMain (_gameName, _stageWid, _stageHei, _totalStage, hasKeySetting) {
super();
Global.main = this;
_name = "main";
_parent.stop();
gameName = _gameName;
stageWid = _stageWid;
stageHei = _stageHei;
totalStage = _totalStage;
currScore = (0);
score = (0);
stageNum = 1;
sndBg = new Sound();
sndBg.attachSound("SndBg");
musicOn = (true);
soundOn = true;
playerInfo = new FWG.PlayerInfo();
if (hasKeySetting) {
keySetting = new FWG.KeySetting();
}
isFirstPlay = true;
Global.addRun(this, "gotoMenu", 2, 1, true);
Global.addKeyCtrl(this);
}
function onKeyDown(keyCode) {
_keyDown(keyCode);
}
function onKeyUp(keyCode) {
switch (keyCode) {
case 80 :
trace("P\u952E\u6682\u505C");
pauseGame();
break;
default :
_keyUp(keyCode);
}
}
function instPlay() {
if (isFirstPlay) {
gotoInst();
} else {
gotoOptions();
}
}
function initBtn(btn) {
switch (btn.__get__label()) {
case "Play Game" :
case "Play" :
case "Skip" :
btn._release = function () {
Global.main.instPlay();
};
break;
case "Play Again" :
btn._release = function () {
Global.main.playAgain();
};
break;
case "Instructions" :
btn._release = function () {
Global.main.gotoInst();
};
break;
case "Key Settings" :
btn._release = function () {
Global.main.gotoKeySetting();
};
break;
case "View Highscores" :
btn._release = function () {
this.getURL("http://www.freeworldgroup.com/score/index.asp?game=" + Global.main.gameName, "_blank");
};
break;
case "Download Games" :
btn._release = function () {
this.getURL("http://www.ifungames.com", "_blank");
};
break;
case "More Online Games" :
btn._release = function () {
this.getURL("http://www.freeworldgroup.com", "_blank");
};
break;
case "Add Games to Your Site" :
btn._release = function () {
this.getURL("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
};
break;
case "Copyright 2008 freeworldgroup.com" :
btn._release = function () {
this.getURL("http://www.freeworldgroup.com", "_blank");
};
break;
case "Credits" :
btn._release = function () {
Global.main.musicCredits.fadeShow();
};
break;
case "Menu" :
btn._release = function () {
Global.main.gotoMenu();
};
break;
case "Submit Score" :
btn._release = function () {
if (Global.main.__get__score() <= 0) {
ui.Alt.show("Your score is 0 !");
ui.Alt.hideDelay(30);
} else {
Global.main.submitScore.show();
}
};
}
}
function addScore(dScore) {
currScore = currScore + dScore;
score = score + dScore;
}
function get currScore() {
return(__currScore);
}
function set currScore(_currScore) {
gamePad.__set__currScore((__currScore = _currScore));
//return(currScore);
}
function get score() {
return(__score);
}
function set score(_score) {
gamePad.__set__score((__score = _score));
//return(score);
}
function fadeTo(_pageId, onFadeShow) {
pageId = _pageId;
fadeMask.fadeHide();
fadeMask.onShow = onFadeShow;
fadeMask.onHide = function () {
Global.main.putInPage(Global.main.pageId);
Global.main.fadeMask.fadeShow();
Global.main.fadeMask.onHide = null;
};
}
function gotoMenu() {
Global.pause = true;
ui.Alert.show("Back To Main Menu?", gotoMenuHandler);
}
function gotoMenuHandler(flag) {
if (flag) {
Global.main.fadeTo("FWG.PageMenu");
} else {
Global.pause = false;
}
}
function gotoInst() {
fadeTo("FWG.PageInst");
}
function gotoOptions() {
stageNum = 1;
currScore = (0);
score = (0);
fadeTo("FWG.PageOptions");
}
function gotoGame() {
Global.pause = false;
fadeTo("FWG.PageGame");
}
function selectPlay(_stageNum) {
stageNum = _stageNum;
currScore = (0);
var _local2 = stageSave.getScore(stageNum - 1);
if (isNaN(_local2) || (_local2 < 0)) {
_local2 = 0;
}
score = (_local2);
gotoGame();
}
function gotoKeySetting() {
fadeTo("FWG.PageKeySetting");
}
function showQualitySetting() {
Global.pause = true;
qualitySetting.fadeShow();
qualitySetting.onHide = function () {
Global.pause = false;
};
}
function playSound(soundId) {
if (soundOn) {
var _local2 = snd_mc[soundId];
if (snd_mc[soundId] == undefined) {
_local2 = (snd_mc[soundId] = new Sound(Common.addMcToTop(snd_mc)));
_local2.attachSound(soundId);
}
_local2.start();
return(_local2);
}
return(null);
}
function get musicOn() {
return(__musicOn);
}
function set musicOn(_musicOn) {
__musicOn = _musicOn;
if (__musicOn) {
sndBg.start(0, 10000);
} else {
sndBg.stop();
}
//return(musicOn);
}
function stageClear() {
Global.pause = true;
var _local2 = stageSave.getcurrScore(stageNum);
if (_local2 <= currScore) {
stageSave.setScore(stageNum, currScore);
}
if (stageNum >= totalStage) {
win();
} else {
fadeTo("FWG.PageStageClear");
}
}
function win() {
Global.pause = true;
isWin = true;
fadeTo("FWG.PageGameOver");
}
function lose() {
Global.pause = true;
isWin = false;
fadeTo("FWG.PageGameOver");
}
function nextStage() {
stageNum++;
currScore = (0);
gotoGame();
}
function playAgain() {
gotoOptions();
}
function isIllegalUserName(name) {
return(playerInfo.isIllegalName(name));
}
function MainContainer() {
Global.main.mainContainer = this;
}
function putInPage(_pageId) {
pageId = _pageId;
mainContainer.page = mainContainer.attachMovie(pageId, "page", 0);
}
function pauseGame() {
Global.pause = true;
pausePad.fadeShow();
}
}
Symbol 432 MovieClip [__Packages.FWG.LocalSetting] Frame 0
class FWG.LocalSetting
{
var lso, dataObj;
function LocalSetting (saveName) {
saveName = saveName + "_as2";
lso = SharedObject.getLocal(saveName, "/");
if (lso.data.dataObj) {
dataObj = Common.cloneObj(lso.data.dataObj);
} else {
trace(saveName + " \u7B2C\u4E00\u6B21\u8BBE\u5B9A");
lso.data.defaultDataObj = Common.cloneObj(dataObj);
}
lso.data.dataObj = dataObj;
}
function getDefault() {
return(lso.data.defaultDataObj);
}
function setDefault() {
lso.data.dataObj = (dataObj = Common.cloneObj(lso.data.defaultDataObj));
}
}
Symbol 433 MovieClip [__Packages.math.Vector] Frame 0
class math.Vector extends flash.geom.Point
{
var x, y;
function Vector (vx, vy) {
super(vx, vy);
if (isNaN(x)) {
x = 0;
}
if (isNaN(y)) {
y = 0;
}
trace("totalVector=" + (++totalVector));
}
function dot(v) {
return((x * v.x) + (y * v.y));
}
function cross(v) {
return((x * v.y) - (y * v.x));
}
static function dot_(v1, v2) {
return((v1.x * v2.x) + (v1.y * v2.y));
}
static function cross_(v1, v2) {
return((v1.x * v2.y) - (v2.x * v1.y));
}
function add(v) {
x = x + v.x;
y = y + v.y;
}
function subtract(v) {
x = x - v.x;
y = y - v.y;
}
function mult(s) {
x = x * s;
y = y * s;
}
static function add_(v1, v2) {
return(new math.Vector(v1.x + v2.x, v1.y + v2.y));
}
static function subtract_(v1, v2) {
return(new math.Vector(v1.x - v2.x, v1.y - v2.y));
}
static function mult_(v, s) {
return(new math.Vector(v.x * s, v.y * s));
}
static function normalize_(v, len) {
v = v.clone();
v.normalize(len);
return(v);
}
function clone() {
return(new math.Vector(x, y));
}
function get len_2() {
return((x * x) + (y * y));
}
function simple(u) {
x = Math.round(x / u) * u;
y = Math.round(y / u) * u;
}
function rotate(a) {
var _local2 = Math.cos(a);
var _local3 = Math.sin(a);
var _local5 = x;
var _local4 = y;
x = (_local5 * _local2) - (_local4 * _local3);
y = (_local5 * _local3) + (_local4 * _local2);
}
function transform(m) {
var _local4 = x;
var _local3 = y;
x = ((_local4 * m.a) + (_local3 * m.c)) + m.tx;
y = ((_local4 * m.b) + (_local3 * m.d)) + m.ty;
}
function isRight(p) {
return(cross_(this, p) < 0);
}
function isInside(pArr) {
var _local5 = pArr.length;
var _local2 = 0;
while (_local2 < _local5) {
var _local3 = pArr[_local2];
var _local4 = pArr[((_local2 == (_local5 - 1)) ? 0 : (_local2 + 1))];
tp1.x = x - _local3.x;
tp1.y = y - _local3.y;
tp2.x = _local4.x - _local3.x;
tp2.y = _local4.y - _local3.y;
if (tp2.isRight(tp1)) {
return(false);
}
_local2++;
}
return(true);
}
function getMp() {
var _local2 = new math.Vector(y, -x);
_local2.normalize(1);
return(_local2);
}
static function polar(len, angle) {
var _local1 = flash.geom.Point.polar(len, angle);
return(new math.Vector(_local1.x, _local1.y));
}
static function interpolate(pt1, pt2, f) {
var _local1 = flash.geom.Point.interpolate(pt1, pt2, f);
return(new math.Vector(_local1.x, _local1.y));
}
static function getK(p, m, n) {
return(cross_(p, n) / cross_(m, n));
}
static function getHorizontal(p, p0) {
var _local1 = dot_(p, p0) / p0.__get__len_2();
return(new math.Vector(p0.x * _local1, p0.y * _local1));
}
static function getVertical(p, p0) {
var _local2 = p0.__get__len_2();
return(new math.Vector((p0.y * cross_(p, p0)) / _local2, (p0.x * cross_(p0, p)) / _local2));
}
static function intersects(p1, p2, p3, p4) {
tp1.x = p3.x - p1.x;
tp1.y = p3.y - p1.y;
tp2.x = p2.x - p3.x;
tp2.y = p2.y - p3.y;
var _local8 = cross_(tp1, tp2);
tp3.x = p4.x - p2.x;
tp3.y = p4.y - p2.y;
var _local6 = cross_(tp2, tp3);
if ((_local8 * _local6) < 0) {
return(false);
}
tp4.x = p1.x - p4.x;
tp4.y = p1.y - p4.y;
var _local4 = cross_(tp3, tp4);
if ((_local6 * _local4) < 0) {
return(false);
}
var _local7 = cross_(tp4, tp1);
if ((_local4 * _local7) < 0) {
return(false);
}
return(true);
}
static function intersection(p1, p2, p3, p4) {
var _local2 = cross_(p1, p3);
var _local5 = cross_(p2, p4);
var _local7 = cross_(p3, p2);
var _local1 = cross_(p4, p1);
var _local3 = cross_(p3, p4);
var _local10 = ((_local2 + _local3) + _local1) / (((_local2 + _local5) + _local7) + _local1);
return(interpolate(p2, p1, _local10));
}
static function distance(v1, v2) {
var _local2 = v1.x - v2.x;
var _local1 = v1.y - v2.y;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
function get _rotation() {
return(Math.atan2(y, x) * 57.2957795130823);
}
function get _radian() {
return(Math.atan2(y, x));
}
static var tp1 = new math.Vector();
static var tp2 = new math.Vector();
static var tp3 = new math.Vector();
static var tp4 = new math.Vector();
static var totalVector = 0;
}
Symbol 434 MovieClip [__Packages.Common] Frame 0
class Common
{
static var tempArr;
function Common () {
}
static function getRGB(mc) {
return(mc.transform.colorTransform.rgb);
}
static function setRGB(mc, color) {
var _local1 = mc.transform.colorTransform;
_local1.rgb = color;
mc.transform.colorTransform = _local1;
}
static function setRGBOffset(mc, color, modeNum) {
if (isNaN(modeNum)) {
modeNum = 1;
}
var _local1 = mc.transform.colorTransform;
_local1.redOffset = ((color >> 16) & 255) - (255 * modeNum);
_local1.greenOffset = ((color >> 8) & 255) - (255 * modeNum);
_local1.blueOffset = (color & 255) - (255 * modeNum);
mc.transform.colorTransform = _local1;
}
static function disorder(arr) {
var _local5 = arr.length;
var _local1 = 0;
while (_local1 < _local5) {
var _local3 = random(_local5);
var _local4 = arr[_local1];
arr[_local1] = arr[_local3];
arr[_local3] = _local4;
_local1++;
}
}
static function getSum(arr) {
var _local2 = 0;
var _local3 = arr.length;
var _local1 = 0;
while (_local1 < _local3) {
_local2 = _local2 + arr[_local1];
_local1++;
}
return(_local2);
}
static function arrDel(arr, item) {
var _local3 = arr.length;
var _local1 = 0;
while (_local1 < _local3) {
if (arr[_local1] == item) {
arr.splice(_local1, 1);
return(_local1);
}
_local1++;
}
return(-1);
}
static function dumpArr(arr) {
var _local2 = arr.length;
var _local1 = 0;
while (_local1 < _local2) {
if (arr[_local1] == undefined) {
arr.splice(_local1, 1);
_local1--;
_local2--;
}
_local1++;
}
return(_local2);
}
static function dumpArrByF(arr, f) {
var _local2 = arr.length;
var _local1 = 0;
while (_local1 < _local2) {
if (f(arr[_local1])) {
arr.splice(_local1, 1);
_local1--;
_local2--;
}
_local1++;
}
return(_local2);
}
static function dumpArrOn(arr, valName) {
var _local2 = arr.length;
var _local1 = 0;
while (_local1 < _local2) {
if (arr[_local1][valName] == undefined) {
arr.splice(_local1, 1);
_local1--;
_local2--;
}
_local1++;
}
return(_local2);
}
static function forEach(arr, thisObj, fName) {
var _local4 = arr.length;
if (thisObj) {
var _local1 = 0;
while (_local1 < _local4) {
thisObj[fName](arr[_local1], _local1, arr);
_local1++;
}
} else {
var _local1 = 0;
while (_local1 < _local4) {
thisObj = arr[_local1];
thisObj[fName](thisObj, _local1, arr);
_local1++;
}
}
}
static function arrToStr(arr, depth) {
if (isNaN(depth)) {
depth = 0;
}
var _local7 = getSpaces(depth);
if (arr.constructor == Array) {
var _local4 = ((arr[0].constructor == Array) ? newline : "");
var _local3 = (_local7 + "[") + _local4;
var _local6 = arr.length;
var _local1 = 0;
while (_local1 < _local6) {
_local3 = _local3 + ((arrToStr(arr[_local1], depth + 1) + ",") + _local4);
_local1++;
}
if (_local4 == "") {
if (arr.length == 0) {
return("[]");
}
return(_local3.substr(0, _local3.length - 1) + "]");
}
return(((_local3.substr(0, _local3.length - 2) + newline) + _local7) + "]");
}
if (arr.constructor == String) {
return(("\"" + arr) + "\"");
}
return(arr);
}
static function reverseStr(str) {
var _local1 = str.split("");
_local1.reverse();
return(_local1.join(""));
}
static function arrIndexOf(arr, item) {
var _local2 = arr.length;
var _local1 = 0;
while (_local1 < _local2) {
if (arr[_local1] == item) {
return(_local1);
}
_local1++;
}
return(-1);
}
static function getMap(w, h, initValue) {
var _local3 = new Array(h);
var _local2 = 0;
while (_local2 < h) {
_local3[_local2] = new Array(w);
var _local1 = 0;
while (_local1 < w) {
_local3[_local2][_local1] = initValue;
_local1++;
}
_local2++;
}
return(_local3);
}
static function getRanByRate(valueArr, rateArr) {
var _local5 = Math.random() * getSum(rateArr);
var _local4 = rateArr.length;
var _local2 = 0;
var _local1 = 0;
while (_local1 < _local4) {
_local2 = _local2 + rateArr[_local1];
if (_local5 < _local2) {
return(valueArr[_local1]);
}
_local1++;
}
}
static function getRanArrByRate(valueArr, rateArr, total) {
var _local7 = new Array(total);
var _local10 = getSum(rateArr);
var _local9 = rateArr.length;
var _local4 = 0;
var _local2 = 0;
var _local3 = 0;
var _local5;
var _local1 = 0;
while (_local1 < total) {
_local4++;
if (_local4 >= _local3) {
_local4 = 0;
_local5 = valueArr[_local2];
_local3 = Math.round((rateArr[_local2] / _local10) * total);
_local2++;
if (_local2 >= _local9) {
_local2 = 0;
}
}
_local7[_local1] = _local5;
_local1++;
}
disorder(_local7);
return(_local7);
}
static function getChildAt(mc, index) {
var _local2 = 0;
for (var _local4 in mc) {
var _local1 = mc[_local4];
if (_local1 instanceof MovieClip) {
if (_local2 == index) {
return(_local1);
}
_local2++;
}
}
return(null);
}
static function getNumChildren(mc) {
var _local2 = 0;
for (var _local3 in mc) {
if (mc[_local3] instanceof MovieClip) {
_local2++;
}
}
return(_local2);
}
static function randomStop(mc, totalFs) {
if (isNaN(totalFs)) {
totalFs = mc._totalframes;
}
mc.gotoAndStop(random(totalFs) + 1);
}
static function getAllChildren(mc, recursion, notClearTempArr) {
if (recursion && (!notClearTempArr)) {
tempArr = new Array();
}
var _local2 = new Array();
for (var _local5 in mc) {
var _local1 = mc[_local5];
if ((_local1 instanceof MovieClip) && (!isInTempArr(_local1))) {
tempArr.push(_local1);
_local2.push(_local1);
if (recursion) {
_local2 = _local2.concat(getAllChildren(_local1, true, true));
}
}
}
return(_local2);
}
static function forEachChild(mc, thisObj, fName, recursion) {
var _local3 = getAllChildren(mc, recursion);
var _local4 = _local3.length;
if (thisObj) {
var _local1 = 0;
while (_local1 < _local4) {
thisObj[fName](_local3[_local1]);
_local1++;
}
} else {
var _local1 = 0;
while (_local1 < _local4) {
thisObj = _local3[_local1];
thisObj[fName](thisObj);
_local1++;
}
}
}
static function isInTempArr(value) {
var _local2 = tempArr.length;
var _local1 = 0;
while (_local1 < _local2) {
if (tempArr[_local1] == value) {
return(true);
}
_local1++;
}
return(false);
}
static function getAllChildrenByOrder(mc, varName, recursion) {
var _local1 = getAllChildren(mc, recursion);
_local1.sortOn(varName, Array.NUMERIC);
return(_local1);
}
static function addMcToTop(mc, id, initObj) {
var _local5 = mc.getNextHighestDepth();
var _local4 = "mc" + (++mcNameId);
var _local2 = mc.attachMovie(id, _local4, _local5, initObj);
if (_local2) {
return(_local2);
}
_local2 = mc.createEmptyMovieClip(_local4, _local5);
for (var _local3 in initObj) {
_local2[_local3] = initObj[_local3];
}
return(_local2);
}
static function removeFixMc(mc) {
mc.swapDepths(mc._parent.getNextHighestDepth());
mc.removeMovieClip();
}
static function removeAll(mc) {
for (var _local2 in mc) {
if (typeof(mc[_local2]) == "movieclip") {
mc[_local2].removeMovieClip();
}
}
}
static function randomLine(mc, x1, y1, x2, y2, d) {
trace("Common.randomLine \u672A\u6D4B\u8BD5");
dp.x = x2 - x1;
dp.y = y2 - y1;
var _local7 = dp.length;
var _local3 = Math.round(_local7 / d);
dp.x = dp.x / _local3;
dp.y = dp.y / _local3;
mc.moveTo(x1, y1);
var _local1 = 1;
while (_local1 < _local3) {
mc.lineTo((x1 + (dp.x * _local1)) + ((Math.random() - 0.5) * d), (y1 + (dp.y * _local1)) + ((Math.random() - 0.5) * d));
_local1++;
}
mc.lineTo(x2, y2);
}
static function drawCircle(mc, x, y, r) {
var _local4 = 0.414213562373095 * r;
var _local5 = 0.707106781186547 * r;
mc.moveTo(x + r, y);
mc.curveTo(r + x, _local4 + y, _local5 + x, _local5 + y);
mc.curveTo(_local4 + x, r + y, x, r + y);
mc.curveTo((-_local4) + x, r + y, (-_local5) + x, _local5 + y);
mc.curveTo((-r) + x, _local4 + y, (-r) + x, y);
mc.curveTo((-r) + x, (-_local4) + y, (-_local5) + x, (-_local5) + y);
mc.curveTo((-_local4) + x, (-r) + y, x, (-r) + y);
mc.curveTo(_local4 + x, (-r) + y, _local5 + x, (-_local5) + y);
mc.curveTo(r + x, (-_local4) + y, r + x, y);
}
static function drawRect() {
var _local3 = arguments[0];
var _local2 = arguments[1];
var _local4;
var _local5;
var _local6;
var _local7;
switch (_local2.constructor) {
case flash.geom.Rectangle :
_local4 = _local2.x;
_local5 = _local2.y;
_local6 = _local2.x + _local2.width;
_local7 = _local2.y + _local2.height;
break;
case Number :
_local4 = _local2;
_local5 = arguments[2];
_local6 = arguments[3];
_local7 = arguments[4];
break;
default :
_local4 = _local2.xMin;
_local5 = _local2.yMin;
_local6 = _local2.xMax;
_local7 = _local2.yMax;
}
_local3.moveTo(_local4, _local5);
_local3.lineTo(_local6, _local5);
_local3.lineTo(_local6, _local7);
_local3.lineTo(_local4, _local7);
_local3.lineTo(_local4, _local5);
}
static function drawGrid(mc, w, h, d) {
var _local3 = 0;
while (_local3 <= w) {
mc.moveTo(_local3 * d, 0);
mc.lineTo(_local3 * d, h * d);
_local3++;
}
var _local2 = 0;
while (_local2 <= h) {
mc.moveTo(0, _local2 * d);
mc.lineTo(w * d, _local2 * d);
_local2++;
}
}
static function isBmdHit(obj, bg) {
if (obj.hitTest(bg)) {
return(getBmdHitRect(obj, bg).width > 0);
}
return(false);
}
static function getBmdHitRect(obj, bg) {
return(getContainBmd(obj, bg, 10, 10).getColorBoundsRect(4294967295, 4278190080));
}
static function getContainBmd(obj, bg, bm1, bm2) {
var _local1 = obj.getBounds(obj);
var _local3 = new flash.geom.Rectangle(_local1.xMin, _local1.yMin, _local1.xMax - _local1.xMin, _local1.yMax - _local1.yMin);
var _local4 = new flash.display.BitmapData(_local3.width, _local3.height, true, 0);
var _local6 = bg.transform.concatenatedMatrix;
var _local2 = new flash.geom.Matrix(1, 0, 0, 1, -_local3.x, -_local3.y);
_local4.draw(obj, _local2, null, bm1);
_local2.tx = _local2.tx * -1;
_local2.ty = _local2.ty * -1;
var _local7 = obj.transform.concatenatedMatrix;
_local2.concat(_local7);
_local2.invert();
_local6.concat(_local2);
_local4.draw(bg, _local6, null, bm2);
return(_local4);
}
static function cloneObj(obj, varName, depth) {
if (isNaN(depth)) {
depth = 0;
}
if (varName == undefined) {
varName = "";
}
var _local5 = getObjType(obj);
switch (_local5) {
case "Array" :
return(obj.slice());
case "Object" :
var _local2 = new Object();
for (varName in obj) {
_local2[varName] = cloneObj(obj[varName], varName, depth + 1);
}
return(_local2);
}
return(obj);
}
static function getObjType(obj) {
switch (obj.constructor) {
case Boolean :
return("Boolean");
case Number :
return("Number");
case String :
return("String");
case Array :
return("Array");
}
return("Object");
}
static function objToStr(obj, depth) {
if (isNaN(depth)) {
depth = 0;
}
var _local3 = obj + newline;
for (var _local4 in obj) {
_local3 = _local3 + ((((((getSpaces(depth) + "|-") + getObjType(obj[_local4])) + ":") + _local4) + " -- ") + objToStr(obj[_local4], depth + 1));
}
return(_local3);
}
static function getSpaces(total) {
var _local2 = "";
var _local1 = 0;
while (_local1 < total) {
_local2 = _local2 + " ";
_local1++;
}
return(_local2);
}
static function searchMap(map, seed, obj, fName) {
trace("obj==null\u65F6\u6307\u5411\u6BCF\u4E2A\u5BF9\u8C61");
var _local16 = map[0].length;
var _local15 = map.length;
var _local7 = new Array(_local15);
var _local1 = 0;
while (_local1 < _local15) {
_local7[_local1] = new Array(_local16);
_local1++;
}
var _local10;
var _local12 = seed.length;
var _local4 = 0;
while (_local4 < _local12) {
_local7[seed[_local4][1]][seed[_local4][0]] = true;
obj[fName](map[seed[_local4][1]][seed[_local4][0]]);
_local4++;
}
while (_local12 = seed.length , _local12 > 0) {
_local10 = new Array();
_local4 = 0;
while (_local4 < _local12) {
var _local9 = seed[_local4][0];
var _local8 = seed[_local4][1];
var _local3 = 0;
while (_local3 < 4) {
var _local5 = dirArr[_local3];
var _local2 = _local9 + _local5[0];
_local1 = _local8 + _local5[1];
if ((!_local7[_local1][_local2]) && (obj[fName](map[_local1][_local2]))) {
_local7[_local1][_local2] = true;
_local10.push([_local2, _local1]);
}
_local3++;
}
_local4++;
}
seed = _local10.slice();
}
}
static function localToLocal(p, mc1, mc2) {
mc1.localToGlobal(p);
mc2.globalToLocal(p);
}
static function getHitP(p1, hitP, mc) {
var _local4 = p1.x;
var _local3 = p1.y;
var _local6 = hitP.x;
var _local5 = hitP.y;
var _local7 = 5;
while (_local7--) {
var _local1 = (_local4 + _local6) / 2;
var _local2 = (_local3 + _local5) / 2;
if (mc.hitTest(_local1, _local2, true)) {
_local6 = _local1;
_local5 = _local2;
} else {
_local4 = _local1;
_local3 = _local2;
}
}
if (mc.hitTest(_local1, _local2, true)) {
hitP.x = _local4;
hitP.y = _local3;
} else {
hitP.x = _local1;
hitP.y = _local2;
}
}
static function getHitPByCircle(p0, hitP, da, mc) {
var _local9 = p0.x;
var _local8 = p0.y;
var _local14 = hitP.x - p0.x;
var _local13 = hitP.y - p0.y;
var _local5 = Math.sqrt((_local14 * _local14) + (_local13 * _local13));
var _local11 = Math.atan2(_local13, _local14);
var _local7 = -da;
var _local6 = da;
var _local10 = 10;
while (_local10--) {
var _local1 = (_local7 + _local6) / 2;
var _local2 = _local11 + _local1;
var _local3 = _local9 + (Math.cos(_local2) * _local5);
var _local4 = _local8 + (Math.sin(_local2) * _local5);
if (mc.hitTest(_local3, _local4, true)) {
_local6 = _local1;
} else {
_local7 = _local1;
}
}
hitP.x = _local3;
hitP.y = _local4;
}
static var a2r = 57.2957795130823;
static var dirArr = [[-1, 0], [0, -1], [1, 0], [0, 1]];
static var dp = new math.Vector();
static var tp = new math.Vector();
static var mcNameId = 0;
}
Symbol 435 MovieClip [__Packages.FWG.PlayerInfo] Frame 0
class FWG.PlayerInfo extends FWG.LocalSetting
{
function PlayerInfo () {
super("FWGPlayerInfo");
}
function isIllegalName(name) {
return((name == "") || (name == "MrNoName"));
}
var dataObj = {playerName:"MrNoName"};
}
Symbol 436 MovieClip [__Packages.FWG.KeySetting] Frame 0
class FWG.KeySetting extends FWG.LocalSetting
{
var getDefault;
function KeySetting () {
super(Global.main.gameName + "KeySetting");
}
function getCode(id) {
return(dataObj["$" + id]);
}
function saveCode(id, code) {
dataObj["$" + id] = code;
}
function isDefault() {
var _local2 = getDefault().dataObj;
for (var _local3 in _local2) {
if (dataObj[_local3] == _local2[_local3]) {
return(false);
}
}
return(true);
}
var dataObj = {$0:65, $1:87, $2:68, $3:83, $4:74, $5:73, $6:76, $7:75, $8:86, $9:66, $10:32};
}
Symbol 437 MovieClip [__Packages.FWG.StageSave] Frame 0
class FWG.StageSave extends FWG.LocalSetting
{
function StageSave () {
super(Global.main.gameName + "StageSave");
}
function getcurrScore(id) {
var _local2 = dataObj["$" + id].currScore;
if (isNaN(_local2)) {
return(-1);
}
return(_local2);
}
function getScore(stageNum_1) {
var _local3 = 0;
var _local2 = 1;
while (_local2 <= stageNum_1) {
_local3 = _local3 + dataObj["$" + _local2].currScore;
_local2++;
}
return(_local3);
}
function setScore(stageNum, currScore) {
dataObj["$" + stageNum] = {currScore:currScore};
}
var dataObj = {};
}
Symbol 438 MovieClip [__Packages.ui.BasicWindow] Frame 0
class ui.BasicWindow extends MovieClip
{
var _visible, gotoAndStop, windowBody, _alpha, onShow, onHide;
function BasicWindow () {
super();
_visible = false;
gotoAndStop(2);
}
function show() {
_visible = true;
Global.addKeyCtrl(this);
gotoAndStop(1);
windowBody = Common.getChildAt(this, 0);
initBody();
}
function hide() {
Global.delKeyCtrl();
_visible = false;
gotoAndStop(2);
}
function onKeyUp(keyCode) {
trace((("\u6309\u952E\u7126\u70B9\u88AB\u8F6C\u79FB\u5230:" + this) + "\rkeyCode=") + keyCode);
}
function initBody() {
}
function fadeShow() {
show();
_alpha = 0;
Global.addRun(this, "showRun", 1, 5, true);
}
function fadeHide() {
Global.addRun(this, "hideRun", 1, 5, true);
}
function showRun(num) {
_alpha = (5 - num) * 20;
if (num == 0) {
onShow();
}
}
function hideRun(num) {
_alpha = num * 20;
if (num == 0) {
hide();
onHide();
}
}
}
Symbol 439 MovieClip [__Packages.ui.WindowBg] Frame 0
class ui.WindowBg extends MovieClip
{
var _parent;
function WindowBg () {
super();
_parent.windowBg = this;
}
}
Symbol 440 MovieClip [__Packages.FWG.SubmitScore] Frame 0
class FWG.SubmitScore extends ui.BasicWindow
{
var windowBody, send_var;
function SubmitScore () {
super();
Global.main.submitScore = this;
}
function initBody() {
windowBody.stop();
windowBody.btnSubmit._release = function () {
Global.main.submitScore.checkSubmit();
};
windowBody.btnX._release = function () {
Global.main.submitScore.fadeHide();
};
windowBody.nameTxt.txt.type = "input";
windowBody.nameTxt.txt.selectable = true;
windowBody.nameTxt.__text = Global.main.playerInfo.dataObj.playerName;
windowBody.scoreTxt.__text = String(Global.main.__get__score());
Selection.setFocus(windowBody.nameTxt);
trace((("playerName=" + windowBody.nameTxt.text) + ",score=") + windowBody.scoreTxt.text);
send_var = new LoadVars();
send_var.game = Global.main.gameName;
}
function checkSubmit() {
Selection.setFocus(windowBody.nameTxt);
if (Global.main.isIllegalUserName(windowBody.nameTxt.text)) {
ui.Alt.show("You must enter your name!", windowBody.nameTxt);
return(undefined);
}
submit();
}
function submit() {
send_var.score = windowBody.scoreTxt.text;
send_var.name = windowBody.nameTxt.text;
if (send_var.name == "") {
send_var.name = "guest" + random(1000);
}
Global.main.playerInfo.dataObj.playerName = send_var.name;
var _local2 = new LoadVars();
_local2.onLoad = function () {
Global.main.submitScore.windowBody.gotoAndStop(3);
};
send_var.sendAndLoad("http://www.freeworldgroup.com/score/score.asp", _local2, "POST");
trace((("send_var.name=" + send_var.name) + ",send_var.score=") + send_var.score);
windowBody.gotoAndStop(2);
Global.main.btnSs._visible = false;
}
}
Symbol 441 MovieClip [__Packages.ui.Alt] Frame 0
class ui.Alt extends MovieClip
{
static var alt;
var _visible, msgTxt, bg, _parent, _x, _y;
function Alt () {
super();
alt = this;
_visible = false;
}
static function show(_msg, mc) {
alt.show_(_msg, mc);
}
static function hide() {
alt.hide_();
}
function show_(_msg, mc) {
_visible = true;
msg = ((" " + _msg) + " ");
msgTxt.autoSize = "center";
bg._width = msgTxt._width + 10;
if (mc) {
var _local4 = new math.Vector();
mc.localToGlobal(_local4);
_parent.globalToLocal(_local4);
_x = _local4.x;
_y = _local4.y;
} else {
_x = _parent._xmouse;
_y = _parent._ymouse;
}
var _local3 = bg.getBounds(_root);
if (_local3.xMin < 0) {
_x = _x + (10 - _local3.xMin);
} else if (_local3.xMax > Global.main.stageWid) {
_x = _x - ((10 + _local3.xMax) - Global.main.stageWid);
}
if (_local3.yMin < 0) {
_y = _y + (10 - _local3.yMin);
} else if (_local3.yMax > Global.main.stageHei) {
_y = _y - ((10 + _local3.yMax) - Global.main.stageHei);
}
_x = Math.round(_x);
_y = Math.round(_y);
}
function hide_() {
_visible = false;
}
static function hideDelay(delayTime) {
if (delayTime > 0) {
} else {
delayTime = 30;
}
Global.addRun(alt, "hide_", delayTime, 1, true);
}
function set msg(_msg) {
msgTxt.text = _msg;
//return(msg);
}
function get msg() {
return(msgTxt.text);
}
}
Symbol 442 MovieClip [__Packages.FWG.MusicCredits] Frame 0
class FWG.MusicCredits extends ui.BasicWindow
{
var windowBody;
function MusicCredits () {
super();
Global.main.musicCredits = this;
}
function initBody() {
windowBody.btnBack._release = function () {
Global.main.musicCredits.fadeHide();
};
}
}
Symbol 443 MovieClip [__Packages.ui.QualitySetting] Frame 0
class ui.QualitySetting extends ui.BasicWindow
{
var __quality, __get__quality, _quality, windowBody;
function QualitySetting () {
super();
Global.main.qualitySetting = this;
}
function set quality(_quality1) {
__quality = _quality1;
initBody();
//return(__get__quality());
}
function fadeShow() {
super.fadeShow();
quality = (_quality);
}
function initBody() {
windowBody.btnOk._release = function () {
Global.main.qualitySetting.fadeHide();
};
var _local2 = 0;
while (_local2 < 4) {
windowBody["btn" + _local2]._release = function () {
Global.main.qualitySetting.__set__quality(this.label);
};
_local2++;
}
_quality = __quality;
Global.addRun(this, "adjustBtns", 1, 1, true);
}
function adjustBtns() {
var _local3 = 0;
while (_local3 < 4) {
var _local2 = windowBody["btn" + _local3];
if (_local2.label == __quality) {
_local2.selected = true;
} else {
_local2.selected = false;
}
_local3++;
}
}
}
Symbol 444 MovieClip [__Packages.ui.SBtn] Frame 0
class ui.SBtn extends MovieClip
{
var filters0, filters, greyFilters, __selectAble, stop, btn, rollOver, _rollOver, rollOut, _rollOut, press, _press, release, _release, __selected, gotoAndStop, onRelease, useHandCursor;
function SBtn () {
super();
filters0 = filters.slice();
greyFilters = filters.concat([greyFilter]);
__selectAble = true;
init();
stop();
}
function init() {
btn.stop();
btn.sbtn = this;
btn.onRollOver = function () {
this.gotoAndStop(2);
this.sbtn._onRollOver();
};
btn.onRollOut = function () {
this.gotoAndStop(1);
this.sbtn._onRollOut();
};
btn.onPress = function () {
this.gotoAndStop(3);
this.sbtn._onPress();
};
btn.onRelease = function () {
this.gotoAndStop(2);
this.sbtn._onRelease();
};
}
function _onRollOver() {
if (selectAble) {
rollOver();
_rollOver();
}
}
function _onRollOut() {
if (selectAble) {
rollOut();
_rollOut();
}
}
function _onPress() {
if (selectAble) {
press();
_press();
}
}
function _onRelease() {
if (selectAble) {
release();
_release();
}
}
function get selected() {
return(__selected);
}
function set selected(_selected) {
__selected = _selected;
if (__selected) {
btn.enabled = false;
gotoAndStop(2);
} else {
btn.enabled = true;
gotoAndStop(1);
}
//return(selected);
}
function get selectAble() {
return(__selectAble);
}
function set selectAble(_selectAble) {
__selectAble = _selectAble;
if (__selectAble) {
delete onRelease;
btn.enabled = true;
btn.useHandCursor = true;
filters = filters0;
} else {
btn.enabled = false;
onRelease = function () {
this.errorPress();
};
useHandCursor = false;
filters = greyFilters;
}
//return(selectAble);
}
static var greyFilter = new flash.filters.ColorMatrixFilter([0.15, 0.295, 0.055, 0, 0, 0.15, 0.295, 0.055, 0, 0, 0.15, 0.295, 0.055, 0, 0, 0, 0, 0, 1, 0]);
}
Symbol 445 MovieClip [__Packages.FWG.Btn] Frame 0
class FWG.Btn extends ui.SBtn
{
var __label, altInfo;
function Btn () {
super();
}
function get label() {
return(__label);
}
function set label(_label) {
__label = _label;
Global.main.initBtn(this);
//return(label);
}
function rollOver() {
Global.main.playSound("SndRollOver", this);
if (altInfo.length > 0) {
ui.Alt.show(altInfo);
}
}
function rollOut() {
ui.Alt.hide();
}
function press() {
Global.main.playSound("SndPress", this);
ui.Alt.hide();
}
}
Symbol 446 MovieClip [__Packages.FWG.BtnSs] Frame 0
class FWG.BtnSs extends FWG.Btn
{
var __set__label;
function BtnSs () {
super();
__set__label("Submit Score");
Global.main.btnSs = this;
}
}
Symbol 447 MovieClip [__Packages.ui.FadeMask] Frame 0
class ui.FadeMask extends MovieClip
{
var gotoAndPlay, gotoAndStop;
function FadeMask () {
super();
Global.main.fadeMask = this;
}
function fadeShow() {
gotoAndPlay("fadeShow");
}
function fadeHide() {
gotoAndPlay("fadeHide");
}
function show() {
gotoAndStop("show");
}
function hide() {
gotoAndStop("hide");
}
}
Symbol 448 MovieClip [__Packages.FWG.BasicGamePad] Frame 0
class FWG.BasicGamePad extends MovieClip
{
var stageNumTxt, __get__stageNum, currScoreTxt, __get__currScore, scoreTxt, __get__score;
function BasicGamePad () {
super();
Global.main.gamePad = this;
}
function init() {
stageNum = (Global.main.stageNum);
currScore = (Global.main.currScore);
score = (Global.main.score);
}
function set stageNum(_stageNum) {
stageNumTxt.text = _stageNum;
//return(__get__stageNum());
}
function set currScore(_currScore) {
currScoreTxt.text = _currScore;
//return(__get__currScore());
}
function set score(_score) {
scoreTxt.text = _score;
//return(__get__score());
}
}
Symbol 449 MovieClip [__Packages.ui.NumClock] Frame 0
class ui.NumClock extends MovieClip
{
var __totalTime, onTimeUp, __time, txt;
function NumClock () {
super();
}
function start() {
Global.addRun(this, "run", 30, __totalTime);
}
function stop() {
Global.delRun(this, "run");
}
function run(num) {
time = (num);
if (time <= 0) {
timeUp();
}
}
function timeUp() {
stop();
onTimeUp();
}
function get time() {
return(__time);
}
function set time(_time) {
txt.__set__text(numToTime((__time = _time)));
//return(time);
}
function get totalTime() {
return(__totalTime);
}
function set totalTime(_totalTime) {
time = ((__totalTime = _totalTime));
//return(totalTime);
}
function numToTime(num) {
var _local2 = num % 60;
var _local3 = (num - _local2) / 60;
var _local1 = "";
if (_local3 < 10) {
_local1 = _local1 + "0";
}
_local1 = _local1 + (_local3 + ":");
if (_local2 < 10) {
_local1 = _local1 + "0";
}
_local1 = _local1 + _local2;
return(_local1);
}
}
Symbol 450 MovieClip [__Packages.ui.Label] Frame 0
class ui.Label extends MovieClip
{
var __text, txt;
function Label () {
super();
if (__text.length > 0) {
text = (__text);
}
}
function get text() {
if (txt.selectable) {
__text = txt.text;
}
return(__text);
}
function set text(_text) {
txt.text = (__text = _text);
//return(text);
}
function get autoSize() {
return(txt.autoSize);
}
function set autoSize(_autoSize) {
txt.autoSize = _autoSize;
//return(autoSize);
}
}
Symbol 451 MovieClip [__Packages.FWG.GamePad] Frame 0
class FWG.GamePad extends FWG.BasicGamePad
{
var btnReset, btnGrid, __step, stepTxt;
function GamePad () {
super();
btnReset._release = function () {
Global.game.reset();
};
if (Global.gameInterface.showGrid == undefined) {
Global.gameInterface.showGrid = true;
}
Global.game.grid._visible = Global.gameInterface.showGrid;
if (Global.gameInterface.showGrid) {
btnGrid.altInfo = "Hide Grid";
btnGrid.gotoAndStop(1);
} else {
btnGrid.altInfo = "Show Grid";
btnGrid.gotoAndStop(2);
}
btnGrid._release = function () {
Global.gameInterface.showGrid = !Global.gameInterface.showGrid;
if (Global.gameInterface.showGrid) {
this.altInfo = "Hide Grid";
this.gotoAndStop(1);
} else {
this.altInfo = "Show Grid";
this.gotoAndStop(2);
}
Global.game.grid._visible = Global.gameInterface.showGrid;
};
}
function init() {
super.init();
step = (0);
}
function get step() {
return(__step);
}
function set step(_step) {
stepTxt.__set__text((__step = _step));
//return(step);
}
}
Symbol 452 MovieClip [__Packages.FWG.PausePad] Frame 0
class FWG.PausePad extends ui.BasicWindow
{
var onHide, windowBody, fadeHide;
function PausePad () {
super();
Global.main.pausePad = this;
onHide = function () {
Global.pause = false;
};
}
function initBody() {
windowBody.btnResume._release = function () {
Global.main.pausePad.fadeHide();
};
}
function onKeyUp(keyCode) {
fadeHide();
}
}
Symbol 453 MovieClip [__Packages.ui.Alert] Frame 0
class ui.Alert extends ui.BasicWindow
{
static var alert;
var windowBody;
function Alert () {
super();
alert = this;
}
static function show(_msg, _onCallBack) {
if (showAlert) {
alert.onCallBack = _onCallBack;
alert.fadeShow();
alert.__set__msg(_msg);
} else {
_onCallBack(true);
}
}
function set msg(_msg) {
windowBody.msgTxt.__text = _msg;
//return(msg);
}
function get msg() {
return(windowBody.msgTxt.__text);
}
static function callBack(_flag) {
alert.flag = _flag;
alert.fadeHide();
alert.onHide = function () {
this.onCallBack(this.flag);
};
}
function initBody() {
windowBody.btnYes._release = function () {
ui.Alert.callBack(true);
};
windowBody.btnNo._release = function () {
ui.Alert.callBack(false);
};
}
static function get showAlert() {
return(alert._name != undefined);
}
}
Symbol 454 MovieClip [__Packages.FWG.Main] Frame 0
class FWG.Main extends FWG.BasicMain
{
function Main () {
super("beetle_run", 690, 500, 25);
}
}
Symbol 455 MovieClip [__Packages.FWG.BasicGame] Frame 0
class FWG.BasicGame extends MovieClip
{
var effectArea;
function BasicGame () {
super();
Global.game = this;
Global.pause = false;
}
function initClock(totalTime) {
Global.main.gamePad.clock.__set__totalTime(totalTime);
Global.main.gamePad.clock.start();
Global.main.gamePad.clock.onTimeUp = function () {
Global.pause = true;
Global.game.timeUp();
};
}
function stageClear() {
Global.main.stageClear();
}
function win() {
Global.main.win();
}
function timeUp() {
Global.pause = true;
Global.main.gamePad.timeUp_mc.gotoAndPlay(2);
Global.addKeyCtrl(Global.main.gamePad.timeUp_mc);
Global.main.gamePad.timeUp_mc.onKeyUp = function () {
trace("\u6309\u952E\u7126\u70B9\u88AB\u8F6C\u79FB\u5230:timeUp_mc");
};
Global.addRun(this, "lose", 60, 1, true);
}
function lose() {
Global.main.lose();
}
function addScore(score, x, y) {
Global.main.addScore(score);
addTxtPopUp("+" + score, x, y);
}
function addTxtPopUp(msg, x, y) {
var _local2 = new math.Vector();
if (x instanceof MovieClip) {
Common.localToLocal(_local2, x, this);
} else if (!isNaN(x.x)) {
_local2.x = x.x;
_local2.y = x.y;
} else if (isNaN(x)) {
Common.localToLocal(_local2, Global.main.gamePad.scoreTxtPos, this);
} else {
_local2.x = x;
_local2.y = y;
}
addEffect("effect.TxtPopUp", {text:msg, _x:_local2.x, _y:_local2.y});
}
function addEffect(id, initObj) {
return(Common.addMcToTop(effectArea, id, initObj));
}
}
Symbol 456 MovieClip [__Packages.bettlerun.Game] Frame 0
class bettlerun.Game extends FWG.BasicGame
{
var map, moving, gotoAndStop, ball, initClock, hole, prevKeyId, ballInDelayTime, addEffect;
function Game () {
super();
map = new Array(h);
var _local3 = 0;
while (_local3 < h) {
map[_local3] = new Array(w);
_local3++;
}
resetMap();
moving = false;
if (Global.main.pageId == "FWG.PageGame") {
Global.main._keyDown = function (keyCode) {
Global.game.onKeyDown(keyCode);
};
gotoAndStop(Global.main.stageNum + 1);
} else {
gotoAndStop(Global.main.totalStage + 2);
}
}
function resetMap() {
var _local3 = 0;
while (_local3 < h) {
var _local2 = 0;
while (_local2 < w) {
map[_local3][_local2] = null;
_local2++;
}
_local3++;
}
}
function addTile(tile) {
var _local4 = Math.round(tile._x / d);
var _local3 = Math.round(tile._y / d);
tile._x = _local4 * d;
tile._y = _local3 * d;
if (tile instanceof bettlerun.Ball) {
ball = tile;
ball.x0 = ball._x;
ball.y0 = ball._y;
reset();
if (Global.main.stageNum > 20) {
initClock(180);
} else {
initClock(120);
}
setDepth(tile);
} else {
if ((tile instanceof bettlerun.Brick) || (tile instanceof bettlerun.Brick2)) {
setDepth(tile);
} else if (tile instanceof bettlerun.Hole) {
hole = tile;
} else if (tile instanceof bettlerun.BallIn) {
tile.brother = tile._parent["ballout" + tile._name.substr(6, tile._name.length)];
}
map[_local3][_local4] = tile;
}
}
function onKeyDown(keyCode) {
switch (keyCode) {
case 37 :
mov(0);
break;
case 38 :
mov(1);
break;
case 39 :
mov(2);
break;
case 40 :
mov(3);
}
}
function mov(id) {
if (moving) {
prevKeyId = id;
return(undefined);
}
prevKeyId = -1;
var _local3 = Common.dirArr[id][0];
var _local2 = Common.dirArr[id][1];
ball.gotoAndStop(id + 1);
if ((map[(ball._y / d) + _local2][(ball._x / d) + _local3] == null) || (map[(ball._y / d) + _local2][(ball._x / d) + _local3].type == "hole")) {
Global.addRun(this, "movRun");
ball.body.play();
moving = true;
ball.vx = _local3 * v;
ball.vy = _local2 * v;
Global.main.gamePad.__set__step((Global.main.gamePad.__get__step()+1));
} else {
ball.body.stop();
}
}
function movRun() {
if (ballInDelayTime > 0) {
if ((--ballInDelayTime) <= 0) {
ball._visible = true;
}
return(undefined);
}
var _local3 = ball._x;
var _local2 = ball._y;
if (((_local3 % d) == 0) && ((_local2 % d) == 0)) {
_local3 = _local3 / d;
_local2 = _local2 / d;
if ((((_local3 < 0) || (_local3 >= w)) || (_local2 < 0)) || (_local2 >= h)) {
Global.delRun(this, "movRun");
Global.addRun(this, "movRun2");
Global.addRun(this, "reset", 30, 1);
return(undefined);
}
var _local4 = map[_local2][_local3];
var _local5 = _local4.type;
if (_local5 == bettlerun.Tile.HOLE) {
Global.delRun(this, "movRun");
ball.body.stop();
ball.body.ball._visible = false;
ball.body.ball2._visible = false;
hole.play();
stageClear();
return(undefined);
}
if (_local5 == bettlerun.Tile.BALLIN) {
ballInDelayTime = 30;
ball._visible = false;
ball._x = _local4.brother._x;
ball._y = _local4.brother._y;
Global.addRun(_local4.brother, "play", ballInDelayTime, 1);
return(undefined);
}
_local3 = _local3 + (ball.vx / v);
_local2 = _local2 + (ball.vy / v);
_local4 = map[_local2][_local3];
_local5 = _local4.type;
if ((_local5 == bettlerun.Tile.BRICK) || ((_local5 == bettlerun.Tile.BRICK2) && (_local4._currentframe == 1))) {
Global.delRun(this, "movRun");
ball.body.stop();
moving = false;
if (_local5 == bettlerun.Tile.BRICK2) {
_local4.gotoAndStop(2);
}
if (prevKeyId >= 0) {
mov(prevKeyId);
}
return(undefined);
}
prevKeyId = -1;
}
ball._x = ball._x + ball.vx;
ball._y = ball._y + ball.vy;
addEffect("piece", {_x:ball._x + ((Math.random() - 0.5) * 3), _y:ball._y + ((Math.random() - 0.5) * 3), _rotation:Math.atan2(ball.vy, ball.vx) * Common.a2r});
setDepth(ball);
}
function stageClear() {
if (Global.main.pageId == "FWG.PageGame") {
var _local3 = Global.main.gamePad.clock.__get__time();
var _local4 = ((Global.main.stageNum > 20) ? 300 : 200);
trace((("stageNum=" + Global.main.stageNum) + ",maxStepBonus=") + _local4);
var _local2 = _local4 - (Global.main.gamePad.__get__step() * 10);
if (_local2 < 0) {
_local2 = 0;
}
Global.gameInterface.timeBonus = _local3;
Global.gameInterface.stepBonus = _local2;
Global.main.addScore(_local3 + _local2);
super.stageClear();
}
}
function movRun2() {
ball._x = ball._x + ball.vx;
ball._y = ball._y + ball.vy;
}
function reset() {
Global.delRun(this, "reset");
Global.delRun(this, "movRun");
Global.delRun(this, "movRun2");
ball._x = ball.x0;
ball._y = ball.y0;
ball.gotoAndStop("up");
ball.body.stop();
ball._visible = true;
ballInDelayTime = 0;
moving = false;
var _local3 = 0;
while (_local3 < h) {
var _local2 = 0;
while (_local2 < w) {
if (map[_local3][_local2].type == bettlerun.Tile.BRICK2) {
map[_local3][_local2].gotoAndStop(1);
}
_local2++;
}
_local3++;
}
}
function setDepth(m) {
m.swapDepths(Math.round(m._x + (m._y * 1000)));
}
static var w = 14;
static var h = 14;
static var d = 30;
static var v = d / 5;
}
Symbol 457 MovieClip [__Packages.bettlerun.Tile] Frame 0
class bettlerun.Tile extends MovieClip
{
var type;
function Tile (_type) {
super();
type = _type;
Global.game.addTile(this);
}
static var BALL = "ball";
static var BRICK = "brick";
static var BRICK2 = "brick2";
static var HOLE = "hole";
static var BALLIN = "ballin";
static var BALLOUT = "ballout";
}
Symbol 458 MovieClip [__Packages.bettlerun.Ball] Frame 0
class bettlerun.Ball extends bettlerun.Tile
{
var gotoAndStop, body;
function Ball () {
super(bettlerun.Tile.BALL);
gotoAndStop("up");
if (Global.main.pageId == "FWG.PageOptions") {
body.stop();
}
}
}
Symbol 459 MovieClip [__Packages.bettlerun.Hole] Frame 0
class bettlerun.Hole extends bettlerun.Tile
{
function Hole () {
super(bettlerun.Tile.HOLE);
}
}
Symbol 460 MovieClip [__Packages.bettlerun.Brick] Frame 0
class bettlerun.Brick extends bettlerun.Tile
{
function Brick () {
super(bettlerun.Tile.BRICK);
}
}
Symbol 461 MovieClip [__Packages.bettlerun.Brick2] Frame 0
class bettlerun.Brick2 extends bettlerun.Tile
{
function Brick2 () {
super(bettlerun.Tile.BRICK2);
}
}
Symbol 462 MovieClip [__Packages.bettlerun.BallIn] Frame 0
class bettlerun.BallIn extends bettlerun.Tile
{
function BallIn () {
super(bettlerun.Tile.BALLIN);
}
}
Symbol 463 MovieClip [__Packages.FWG.BtnPa] Frame 0
class FWG.BtnPa extends FWG.Btn
{
var __set__label;
function BtnPa () {
super();
__set__label("Play Again");
}
}
Symbol 464 MovieClip [__Packages.FWG.BtnVh] Frame 0
class FWG.BtnVh extends FWG.Btn
{
var __set__label;
function BtnVh () {
super();
__set__label("View Highscores");
}
}
Symbol 465 MovieClip [__Packages.FWG.BtnMog] Frame 0
class FWG.BtnMog extends FWG.Btn
{
var __set__label;
function BtnMog () {
super();
__set__label("More Online Games");
}
}
Symbol 466 MovieClip [__Packages.FWG.BtnAgtys] Frame 0
class FWG.BtnAgtys extends FWG.Btn
{
var __set__label;
function BtnAgtys () {
super();
__set__label("Add Games to Your Site");
}
}
Symbol 467 MovieClip [__Packages.FWG.BtnDg] Frame 0
class FWG.BtnDg extends FWG.Btn
{
var __set__label;
function BtnDg () {
super();
__set__label("Download Games");
}
}
Symbol 468 MovieClip [__Packages.FWG.BtnMenu] Frame 0
class FWG.BtnMenu extends FWG.Btn
{
var __set__label;
function BtnMenu () {
super();
__set__label("Menu");
}
}
Symbol 469 MovieClip [__Packages.FWG.ScorePad] Frame 0
class FWG.ScorePad extends MovieClip
{
var scoreTxt;
function ScorePad () {
super();
Global.addRun(this, "init", 1, 1, true);
}
function init() {
scoreTxt.__set__text(Global.main.score);
}
}
Symbol 470 MovieClip [__Packages.FWG.BtnPlay] Frame 0
class FWG.BtnPlay extends FWG.Btn
{
var __set__label;
function BtnPlay () {
super();
__set__label("Play");
}
}
Symbol 471 MovieClip [__Packages.FWG.BtnSkip] Frame 0
class FWG.BtnSkip extends FWG.Btn
{
var __set__label;
function BtnSkip () {
super();
__set__label("Skip");
}
}
Symbol 472 MovieClip [__Packages.ui.HitRec] Frame 0
class ui.HitRec extends MovieClip
{
var onRelease, useHandCursor;
function HitRec () {
super();
onRelease = function () {
};
useHandCursor = false;
}
}
Symbol 473 MovieClip [__Packages.FWG.PageGameOver] Frame 0
class FWG.PageGameOver extends MovieClip
{
var scoreTxt, gotoAndStop, foundTxt, missedTxt, percentTxt, mistakeTxt;
function PageGameOver () {
super();
scoreTxt.text = Global.main.score;
if (Global.main.isWin) {
gotoAndStop(1);
} else {
gotoAndStop(2);
}
foundTxt.text = Global.gameInterface.__found;
missedTxt.text = Global.gameInterface.__missed;
percentTxt.text = Global.gameInterface.__percent + "%";
mistakeTxt.text = Global.gameInterface.__mistake;
}
}
Symbol 474 MovieClip [__Packages.FWG.BtnNs] Frame 0
class FWG.BtnNs extends FWG.Btn
{
var __set__label, altInfo, _release;
function BtnNs () {
super();
__set__label("Next Stage");
altInfo = "Press any key to continue.";
Global.addRun(this, "initDelay", 15, 1, true);
_release = function () {
Global.main.nextStage();
};
}
function initDelay() {
Global.addKeyCtrl(this);
}
function onKeyUp() {
onKeyUp = null;
_release();
}
}
Symbol 475 MovieClip [__Packages.FWG.PageStageClear] Frame 0
class FWG.PageStageClear extends MovieClip
{
var timeBonusTxt, stepBonusTxt, currScoreTxt, scoreTxt;
function PageStageClear () {
super();
}
function init() {
timeBonusTxt.__set__text(Global.gameInterface.timeBonus);
stepBonusTxt.__set__text(Global.gameInterface.stepBonus);
currScoreTxt.__set__text(Global.main.currScore);
scoreTxt.__set__text(Global.main.score);
}
}
Symbol 476 MovieClip [__Packages.bettlerun.BallOut] Frame 0
class bettlerun.BallOut extends bettlerun.Tile
{
function BallOut () {
super(bettlerun.Tile.BALLOUT);
}
}
Symbol 477 MovieClip [__Packages.FWG._3Btn] Frame 0
class FWG._3Btn extends MovieClip
{
var btnQ, btnM, btnS, btnP;
function _3Btn () {
super();
btnQ.altInfo = "Quality";
btnQ._release = function () {
Global.main.showQualitySetting();
};
if (Global.main.__get__musicOn()) {
btnM.altInfo = "Music Off";
} else {
btnM.altInfo = "Music On";
}
btnM._release = function () {
if (Global.main.__get__musicOn()) {
this.altInfo = "Music On";
Global.main.__set__musicOn(false);
this.gotoAndStop(2);
} else {
this.altInfo = "Music Off";
Global.main.__set__musicOn(true);
this.gotoAndStop(1);
}
};
if (Global.main.__get__musicOn()) {
btnM.gotoAndStop(1);
} else {
btnM.gotoAndStop(2);
}
if (Global.main.soundOn) {
btnS.altInfo = "Sound Off";
} else {
btnS.altInfo = "Sound On";
}
btnS._release = function () {
if (Global.main.soundOn) {
this.altInfo = "Sound On";
Global.main.soundOn = false;
this.gotoAndStop(2);
} else {
this.altInfo = "Sound Off";
Global.main.soundOn = true;
this.gotoAndStop(1);
}
};
if (Global.main.soundOn) {
btnS.gotoAndStop(1);
} else {
btnS.gotoAndStop(2);
}
btnP.altInfo = "Pause.";
btnP._release = function () {
Global.main.pauseGame();
};
}
}
Symbol 478 MovieClip [__Packages.FWG.BtnQ0] Frame 0
class FWG.BtnQ0 extends FWG.Btn
{
var __set__label;
function BtnQ0 () {
super();
__set__label("LOW");
}
}
Symbol 479 MovieClip [__Packages.FWG.BtnQ1] Frame 0
class FWG.BtnQ1 extends FWG.Btn
{
var __set__label;
function BtnQ1 () {
super();
__set__label("MEDIUM");
}
}
Symbol 480 MovieClip [__Packages.FWG.BtnQ2] Frame 0
class FWG.BtnQ2 extends FWG.Btn
{
var __set__label;
function BtnQ2 () {
super();
__set__label("HIGH");
}
}
Symbol 481 MovieClip [__Packages.FWG.BtnQ3] Frame 0
class FWG.BtnQ3 extends FWG.Btn
{
var __set__label;
function BtnQ3 () {
super();
__set__label("BEST");
}
}
Symbol 482 MovieClip [__Packages.FWG.PageGame] Frame 0
class FWG.PageGame extends MovieClip
{
function PageGame () {
super();
}
}
Symbol 483 MovieClip [__Packages.FWG.BtnLevel] Frame 0
class FWG.BtnLevel extends FWG.Btn
{
var __set__selectAble, errorPress, scoreTxt, __get__score, __id, levelTxt, levelImg;
function BtnLevel () {
super();
}
function set score(_score) {
if (_score < 0) {
_score = 0;
__set__selectAble(false);
errorPress = function () {
ui.Alt.show("Can't play yet!");
};
}
scoreTxt.text = "Score:" + _score;
//return(__get__score());
}
function get id() {
return(__id);
}
function set id(_id) {
__id = _id;
levelTxt.text = "Level " + __id;
levelImg.gotoAndStop(_id);
//return(id);
}
}
Symbol 484 MovieClip [__Packages.FWG.StageSelecter] Frame 0
class FWG.StageSelecter extends MovieClip
{
function StageSelecter () {
super();
Global.main.stageSave = new FWG.StageSave();
}
function init() {
var _local5;
var _local3;
var _local4;
var _local2 = 1;
while (_local2 <= Global.main.totalStage) {
_local4 = Global.main.stageSave.getcurrScore(_local2);
_local3 = this["btn" + _local2];
_local3.__set__id(_local2);
if ((_local4 < 0) && (!_local5)) {
_local5 = true;
_local3.__set__score(0);
} else {
_local3.__set__score(_local4);
}
_local3._release = function () {
Global.main.selectPlay(this.id);
};
_local2++;
}
}
}
Symbol 485 MovieClip [__Packages.FWG.PageOptions] Frame 0
class FWG.PageOptions extends MovieClip
{
function PageOptions () {
super();
}
}
Symbol 486 MovieClip [__Packages.FWG.Instructions] Frame 0
class FWG.Instructions extends MovieClip
{
var stop, btnNext, btnBack, _totalframes, _currentframe, btnPlay, btnSkip;
function Instructions () {
super();
stop();
setPos();
Global.main.isFirstPlay = false;
btnNext._release = function () {
this._parent.nextFrame();
this._parent.setPos();
};
btnBack._release = function () {
this._parent.prevFrame();
this._parent.setPos();
};
}
function setPos() {
btnPlay._visible = _currentframe == _totalframes;
btnSkip._visible = (btnNext._visible = _currentframe != _totalframes);
btnBack._visible = _currentframe > 1;
}
}
Symbol 487 MovieClip [__Packages.FWG.PageInst] Frame 0
class FWG.PageInst extends MovieClip
{
function PageInst () {
super();
}
}
Symbol 488 MovieClip [__Packages.FWG.BtnPg] Frame 0
class FWG.BtnPg extends FWG.Btn
{
var __set__label;
function BtnPg () {
super();
__set__label("Play Game");
}
}
Symbol 489 MovieClip [__Packages.FWG.BtnInstructions] Frame 0
class FWG.BtnInstructions extends FWG.Btn
{
var __set__label;
function BtnInstructions () {
super();
__set__label("Instructions");
}
}
Symbol 490 MovieClip [__Packages.FWG.BtnCopyright] Frame 0
class FWG.BtnCopyright extends FWG.Btn
{
var __set__label;
function BtnCopyright () {
super();
__set__label("Copyright 2008 freeworldgroup.com");
}
}
Symbol 491 MovieClip [__Packages.FWG.BtnCredits] Frame 0
class FWG.BtnCredits extends FWG.Btn
{
var __set__label;
function BtnCredits () {
super();
__set__label("Credits");
}
}
Symbol 492 MovieClip [__Packages.FWG.PageMenu] Frame 0
class FWG.PageMenu extends MovieClip
{
function PageMenu () {
super();
Global.main.__set__score(0);
}
}
Symbol 493 MovieClip [__Packages.ui.TxtPopUp] Frame 0
class ui.TxtPopUp extends MovieClip
{
var text, body;
function TxtPopUp () {
super();
body.text = text;
}
}
Symbol 494 MovieClip [__Packages.FWG.Logo] Frame 0
class FWG.Logo extends ui.SBtn
{
var _release;
function Logo () {
super();
_release = function () {
this.getURL("http://www.freeworldgroup.com/", "_blank");
};
}
}
Symbol 9 MovieClip Frame 1
function isIn(domainName) {
return(((isInUrlFront(domainName) || (isInUrlFront("http://" + domainName))) || (isInUrlFront("http://www." + domainName))) || (isInUrlFront("www." + domainName)));
}
function isInUrlFront(str) {
var _local1 = _url;
_local1.toLowerCase();
str.toLowerCase();
return(_local1.indexOf(str) == 0);
}
this._visible = false;
return(undefined);
Symbol 33 MovieClip Frame 1
_x = (Stage.width / 2);
_y = (Stage.height / 2);
_root.stop();
onPress = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
Symbol 33 MovieClip Frame 146
stop();
_root.play();
Symbol 52 MovieClip [FWG.Logo] Frame 1
#initclip 136
Object.registerClass("FWG.Logo", FWG.Logo);
#endinitclip
Symbol 60 MovieClip [FWG.BtnSs] Frame 1
#initclip 67
Object.registerClass("FWG.BtnSs", FWG.BtnSs);
#endinitclip
Symbol 64 MovieClip [FWG.BtnPa] Frame 1
#initclip 68
Object.registerClass("FWG.BtnPa", FWG.BtnPa);
#endinitclip
Symbol 68 MovieClip [FWG.BtnVh] Frame 1
#initclip 69
Object.registerClass("FWG.BtnVh", FWG.BtnVh);
#endinitclip
Symbol 72 MovieClip [FWG.BtnMog] Frame 1
#initclip 70
Object.registerClass("FWG.BtnMog", FWG.BtnMog);
#endinitclip
Symbol 76 MovieClip [FWG.BtnAgtys] Frame 1
#initclip 71
Object.registerClass("FWG.BtnAgtys", FWG.BtnAgtys);
#endinitclip
Symbol 80 MovieClip [FWG.BtnDg] Frame 1
#initclip 72
Object.registerClass("FWG.BtnDg", FWG.BtnDg);
#endinitclip
Symbol 84 MovieClip [FWG.BtnMenu] Frame 1
#initclip 73
Object.registerClass("FWG.BtnMenu", FWG.BtnMenu);
#endinitclip
Symbol 87 MovieClip [ui.Label2] Frame 1
#initclip 74
Object.registerClass("ui.Label2", ui.Label);
#endinitclip
Symbol 90 MovieClip [FWG.ScorePad] Frame 1
#initclip 75
Object.registerClass("FWG.ScorePad", FWG.ScorePad);
#endinitclip
Symbol 93 MovieClip Frame 80
stop();
Symbol 107 MovieClip [FWG.BtnNext] Frame 1
#initclip 76
Object.registerClass("FWG.BtnNext", FWG.Btn);
#endinitclip
Symbol 112 MovieClip [FWG.BtnBack] Frame 1
#initclip 77
Object.registerClass("FWG.BtnBack", FWG.Btn);
#endinitclip
Symbol 116 MovieClip [FWG.BtnPlay] Frame 1
#initclip 78
Object.registerClass("FWG.BtnPlay", FWG.BtnPlay);
#endinitclip
Symbol 120 MovieClip [FWG.BtnSkip] Frame 1
#initclip 79
Object.registerClass("FWG.BtnSkip", FWG.BtnSkip);
#endinitclip
Symbol 124 MovieClip [FWG.BtnMenu2] Frame 1
#initclip 80
Object.registerClass("FWG.BtnMenu2", FWG.BtnMenu);
#endinitclip
Symbol 127 MovieClip [ui.HitRec] Frame 1
#initclip 81
Object.registerClass("ui.HitRec", ui.HitRec);
#endinitclip
Symbol 128 MovieClip [ui.WindowBg] Frame 1
#initclip 82
Object.registerClass("ui.WindowBg", ui.WindowBg);
#endinitclip
Symbol 135 MovieClip [FWG.BtnX] Frame 1
#initclip 83
Object.registerClass("FWG.BtnX", FWG.Btn);
#endinitclip
Symbol 145 MovieClip [FWG.BtnSubmit] Frame 1
#initclip 84
Object.registerClass("FWG.BtnSubmit", FWG.Btn);
#endinitclip
Symbol 151 MovieClip [FWG.SubmitScore] Frame 1
#initclip 85
Object.registerClass("FWG.SubmitScore", FWG.SubmitScore);
#endinitclip
Symbol 169 MovieClip Frame 80
stop();
Symbol 170 MovieClip [FWG.PageGameOver] Frame 1
#initclip 86
Object.registerClass("FWG.PageGameOver", FWG.PageGameOver);
#endinitclip
Symbol 175 MovieClip [FWG.BtnNs] Frame 1
#initclip 87
Object.registerClass("FWG.BtnNs", FWG.BtnNs);
#endinitclip
Symbol 180 MovieClip [FWG.PageStageClear] Frame 1
#initclip 88
Object.registerClass("FWG.PageStageClear", FWG.PageStageClear);
#endinitclip
init();
Symbol 188 MovieClip [bettlerun.Brick] Frame 1
#initclip 89
Object.registerClass("bettlerun.Brick", bettlerun.Brick);
#endinitclip
gotoAndStop(random(2) + 1);
Symbol 195 MovieClip [bettlerun.Hole] Frame 1
#initclip 90
Object.registerClass("bettlerun.Hole", bettlerun.Hole);
#endinitclip
stop();
if (Global.main.pageId == "FWG.PageOptions") {
arrowMov_mc.stop();
}
Symbol 195 MovieClip [bettlerun.Hole] Frame 10
stop();
Symbol 223 MovieClip [bettlerun.Ball] Frame 1
#initclip 91
Object.registerClass("bettlerun.Ball", bettlerun.Ball);
#endinitclip
Symbol 226 MovieClip [piece] Frame 30
Common.removeFixMc(this);
Symbol 247 MovieClip [bettlerun.BallOut] Frame 1
#initclip 92
Object.registerClass("bettlerun.BallOut", bettlerun.BallOut);
#endinitclip
stop();
Symbol 249 MovieClip [bettlerun.BallIn] Frame 1
#initclip 93
Object.registerClass("bettlerun.BallIn", bettlerun.BallIn);
#endinitclip
Symbol 251 MovieClip Frame 1
stop();
Symbol 252 MovieClip [bettlerun.Game] Frame 1
#initclip 94
Object.registerClass("bettlerun.Game", bettlerun.Game);
#endinitclip
Symbol 255 MovieClip [ui.NumClock] Frame 1
#initclip 95
Object.registerClass("ui.NumClock", ui.NumClock);
#endinitclip
Symbol 262 MovieClip [FWG.BtnReset] Frame 1
#initclip 96
Object.registerClass("FWG.BtnReset", FWG.Btn);
#endinitclip
Symbol 268 MovieClip [FWG.BtnQ] Frame 1
#initclip 97
Object.registerClass("FWG.BtnQ", FWG.Btn);
#endinitclip
Symbol 276 MovieClip [FWG.BtnM] Frame 1
#initclip 98
Object.registerClass("FWG.BtnM", FWG.Btn);
#endinitclip
Symbol 281 MovieClip [FWG.BtnS] Frame 1
#initclip 99
Object.registerClass("FWG.BtnS", FWG.Btn);
#endinitclip
Symbol 286 MovieClip [FWG.BtnPause] Frame 1
#initclip 100
Object.registerClass("FWG.BtnPause", FWG.Btn);
#endinitclip
Symbol 287 MovieClip [FWG._3Btn] Frame 1
#initclip 101
Object.registerClass("FWG._3Btn", FWG._3Btn);
#endinitclip
Symbol 292 MovieClip [FWG.BtnGrid] Frame 1
#initclip 102
Object.registerClass("FWG.BtnGrid", FWG.Btn);
#endinitclip
Symbol 296 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 28
stop();
Symbol 297 MovieClip [FWG.GamePad] Frame 1
#initclip 103
Object.registerClass("FWG.GamePad", FWG.GamePad);
#endinitclip
this.init();
Symbol 306 MovieClip [FWG.BtnQ0] Frame 1
#initclip 104
Object.registerClass("FWG.BtnQ0", FWG.BtnQ0);
#endinitclip
Symbol 310 MovieClip [FWG.BtnQ1] Frame 1
#initclip 105
Object.registerClass("FWG.BtnQ1", FWG.BtnQ1);
#endinitclip
Symbol 314 MovieClip [FWG.BtnQ2] Frame 1
#initclip 106
Object.registerClass("FWG.BtnQ2", FWG.BtnQ2);
#endinitclip
Symbol 318 MovieClip [FWG.BtnQ3] Frame 1
#initclip 107
Object.registerClass("FWG.BtnQ3", FWG.BtnQ3);
#endinitclip
Symbol 322 MovieClip [FWG.BtnOK] Frame 1
#initclip 108
Object.registerClass("FWG.BtnOK", FWG.Btn);
#endinitclip
Symbol 324 MovieClip [ui.QualitySetting] Frame 1
#initclip 109
Object.registerClass("ui.QualitySetting", ui.QualitySetting);
#endinitclip
Symbol 326 MovieClip [ui.Label3] Frame 1
#initclip 110
Object.registerClass("ui.Label3", ui.Label);
#endinitclip
Symbol 330 MovieClip [FWG.BtnYes] Frame 1
#initclip 111
Object.registerClass("FWG.BtnYes", FWG.Btn);
#endinitclip
Symbol 334 MovieClip [FWG.BtnNo] Frame 1
#initclip 112
Object.registerClass("FWG.BtnNo", FWG.Btn);
#endinitclip
Symbol 336 MovieClip [ui.Alert] Frame 1
#initclip 113
Object.registerClass("ui.Alert", ui.Alert);
#endinitclip
Symbol 342 MovieClip [FWG.BtnResume] Frame 1
#initclip 114
Object.registerClass("FWG.BtnResume", FWG.Btn);
#endinitclip
Symbol 346 MovieClip [FWG.PausePad] Frame 1
#initclip 115
Object.registerClass("FWG.PausePad", FWG.PausePad);
#endinitclip
Symbol 347 MovieClip [FWG.PageGame] Frame 1
#initclip 116
Object.registerClass("FWG.PageGame", FWG.PageGame);
#endinitclip
Symbol 351 MovieClip [FWG.BtnBack2] Frame 1
#initclip 117
Object.registerClass("FWG.BtnBack2", FWG.Btn);
#endinitclip
Symbol 357 MovieClip [FWG.BtnLevel] Frame 1
#initclip 118
Object.registerClass("FWG.BtnLevel", FWG.BtnLevel);
#endinitclip
Symbol 358 MovieClip [FWG.StageSelecter] Frame 1
#initclip 119
Object.registerClass("FWG.StageSelecter", FWG.StageSelecter);
#endinitclip
init();
Symbol 361 MovieClip [FWG.PageOptions] Frame 1
#initclip 120
Object.registerClass("FWG.PageOptions", FWG.PageOptions);
#endinitclip
Symbol 373 MovieClip Frame 1
stop();
Symbol 374 MovieClip Frame 1
stop();
Symbol 375 MovieClip Frame 1
stop();
Symbol 376 MovieClip Frame 1
stop();
Symbol 377 MovieClip Frame 1
stop();
Symbol 378 MovieClip [FWG.Instructions] Frame 1
#initclip 121
Object.registerClass("FWG.Instructions", FWG.Instructions);
#endinitclip
Symbol 378 MovieClip [FWG.Instructions] Frame 3
function keyDown() {
if ((++keyId) >= keyArr.length) {
keyId = -1;
inst_movie.play();
return(undefined);
}
Global.game.mov(keyArr[keyId]);
this["key" + keyArr[keyId]].play();
}
Global.addRun(this, "keyDown", 60);
var keyId = -1;
var keyArr = [2, 1, 0];
var i = 0;
while (i < 4) {
i++;
}
Symbol 379 MovieClip [FWG.PageInst] Frame 1
#initclip 122
Object.registerClass("FWG.PageInst", FWG.PageInst);
#endinitclip
Symbol 387 MovieClip [FWG.BtnPg] Frame 1
#initclip 123
Object.registerClass("FWG.BtnPg", FWG.BtnPg);
#endinitclip
Symbol 391 MovieClip [FWG.BtnInstructions] Frame 1
#initclip 124
Object.registerClass("FWG.BtnInstructions", FWG.BtnInstructions);
#endinitclip
Symbol 396 MovieClip [FWG.BtnCopyright] Frame 1
#initclip 125
Object.registerClass("FWG.BtnCopyright", FWG.BtnCopyright);
#endinitclip
Symbol 400 MovieClip [FWG.BtnCredits] Frame 1
#initclip 126
Object.registerClass("FWG.BtnCredits", FWG.BtnCredits);
#endinitclip
Symbol 404 MovieClip [FWG.MusicCreditsBg] Frame 1
#initclip 127
Object.registerClass("FWG.MusicCreditsBg", ui.WindowBg);
#endinitclip
this.cacheAsBitmap = true;
Symbol 409 MovieClip [FWG.MusicCredits] Frame 1
#initclip 128
Object.registerClass("FWG.MusicCredits", FWG.MusicCredits);
#endinitclip
Symbol 410 MovieClip [FWG.PageMenu] Frame 1
#initclip 129
Object.registerClass("FWG.PageMenu", FWG.PageMenu);
#endinitclip
Symbol 414 MovieClip [ui.Label1] Frame 1
#initclip 130
Object.registerClass("ui.Label1", ui.Label);
#endinitclip
Symbol 415 MovieClip [ui.Alt] Frame 1
#initclip 131
Object.registerClass("ui.Alt", ui.Alt);
#endinitclip
Symbol 416 MovieClip [ui.TxtPopUp] Frame 1
#initclip 132
Object.registerClass("ui.TxtPopUp", ui.TxtPopUp);
#endinitclip
Symbol 416 MovieClip [ui.TxtPopUp] Frame 15
stop();
this.removeMovieClip();
Symbol 419 MovieClip Frame 1
stop();
Symbol 420 MovieClip [ui.FadeMask] Frame 1
#initclip 133
Object.registerClass("ui.FadeMask", ui.FadeMask);
#endinitclip
stop();
Symbol 420 MovieClip [ui.FadeMask] Frame 10
onHide();
Symbol 420 MovieClip [ui.FadeMask] Frame 20
onShow();
Symbol 421 MovieClip [FWG.Main] Frame 1
#initclip 134
Object.registerClass("FWG.Main", FWG.Main);
#endinitclip
Symbol 424 MovieClip [testBar_BtnPause] Frame 1
#initclip 135
Object.registerClass("testBar_BtnPause", FWG.Btn);
#endinitclip
Symbol 427 MovieClip Frame 1
function clearMsg() {
txt.text = "";
}
function showMsg(msg) {
txt.text = msg;
}
Global.testBar = this;
btnPause.onPress = function () {
Global.pause = !Global.pause;
};