Frame 1
MochiAd.showPreloaderAd({id:"85d790b22c3b0ac4", res:"800x600"});
var my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
fscommand ("showmenu", "fasle");
Frame 121
stop();
var isFreePlay = false;
var isMyGame = false;
var score = 0;
var coins = 0;
var stageNum = 1;
var playerName = "";
var itemName = ["\u5E2E\u52A9", "\u5B9A\u65F6", "\u6253\u4E71", "\u7A7F\u900F", "\u70DF\u82B1", "\u96F7\u7535", "\u706B\u5C71", "\u8F70\u70B8", "\u6708\u7403"];
var priceArr = [30, 30, 30, 30, 50, 80, 100, 500, 1000];
var itemList = ["\u5E2E\u52A9", "\u5B9A\u65F6", "\u6253\u4E71", "\u7A7F\u900F", "\u6708\u7403"];
if (fwgCtrl == undefined) {
var fwgCtrl = new FwgCtrl(this, "connectit");
fwgCtrl.musicStart("NG77093");
}
fwgCtrl.initBtns(null, vhBtn, mogBtn, dgBtn, agtysBtn);
var cis = new ConnectItSave();
var mainSu = new SaveUnit("Stage " + stageNum, stageNum, score, coins, playerName, itemList);
pgBtn.press = function () {
fwgCtrl.playGame();
};
if (cis.totalFile > 0) {
pgBtn.rollOver = function () {
gameList.show();
};
pgBtn.rollOut = function () {
gameList.hide();
};
gameList.onNewGame = function (Void) {
fwgCtrl.playGame();
};
gameList.onLoadGame = function (_su) {
mainSu = _su;
score = mainSu.score;
coins = mainSu.coins;
stageNum = mainSu.stageNum;
playerName = mainSu.playerName;
itemList = mainSu.itemList.slice();
fwgCtrl.playGame();
};
}
fwgCtrl.playGame = function () {
gotoAndStop ("game");
};
fwgCtrl.gotoMainMenu = function () {
Mouse.show();
gotoAndStop ("mainMenu");
};
fwgCtrl.pause = function () {
return(game.pause());
};
fwgCtrl.enabledAll = function (value, showMask) {
if (value) {
hitRec._x = -10000;
game.pause(false, showMask);
} else if (!notGamePause) {
hitRec._x = 0;
game.pause(true, showMask);
}
};
pmpBtn.press = function () {
gotoAndStop ("create");
};
if (cis.totalMyPzs > 0) {
pmpBtn.rollOver = function () {
myPzsList.show();
};
pmpBtn.rollOut = function () {
myPzsList.hide();
};
myPzsList.onNewPzs = function () {
gotoAndStop ("create");
};
myPzsList.onLoadGame = function (_stageNum) {
isMyGame = true;
stageNum = _stageNum;
fwgCtrl.playGame();
};
}
fpBtn.press = function () {
prevView.show();
};
prevView.onHide = function (_stageNum) {
stageNum = _stageNum;
isFreePlay = true;
fwgCtrl.playGame();
};
iBtn.press = function () {
gotoAndStop ("instruction");
};
var timeArr = [15, 15, 20, 30, 30, 30, 30, 30, 30, 30, 30, 30, 45, 45, 60, 60, 60, 60, 150, 150];
Frame 122
fwgCtrl.initPauseBtn(pauseBtn);
fwgCtrl.initMmBtn(mmBtn);
fwgCtrl.initGameCtrl(qBtn, mBtn, sBtn);
game.onTimeUp = function (_score) {
score = _score;
gotoAndStop ("lose");
};
if (isFreePlay) {
game.map = Maps.getMap(stageNum);
game.typeNum = Maps.typeNumArr[stageNum - 1];
game.time = timeArr[int((stageNum - 1) / 5)];
stageNum = 0;
} else if (isMyGame) {
game.map = cis.readMyPzs(stageNum);
game.time = 120;
} else {
game.map = Maps.getMap((((stageNum - 1) * 5) + random(5)) + 1);
game.typeNum = Maps.typeNumArr[stageNum - 1];
game.time = timeArr[stageNum - 1];
}
game.score = score;
game.coins = coins;
game.itemList = itemList;
game.itemName = itemName;
fwgCtrl.enabledAll(true);
game.onStageClear = function (_score, _coins, _itemList) {
score = _score;
coins = _coins;
itemList = _itemList;
if ((isFreePlay || (isMyGame)) || ((!isMyGame) && (stageNum >= 20))) {
gotoAndStop ("gameOver");
} else {
gotoAndStop ("shopping");
}
};
if (isFreePlay) {
saveBtn._visible = false;
}
if (isMyGame) {
saveBtn._visible = false;
} else {
saveBtn.press = function (Void) {
fwgCtrl.enabledAll(false);
saveList_mc.show();
saveList_mc.onHide = function () {
fwgCtrl.enabledAll(true);
};
};
}
if (!isMyGame) {
mainSu = new SaveUnit("Stage " + stageNum, stageNum, score, coins, playerName, itemList);
}
Frame 123
if (isFreePlay || (isMyGame)) {
submit_mc._visible = false;
}
fwgCtrl.initMmBtn(mmBtn);
fwgCtrl.initBtns(null, vhBtn, mogBtn, dgBtn, agtysBtn);
Instance of Symbol 432 MovieClip "submit_mc" in Frame 123
//component parameters
onClipEvent (construct) {
_game_name = "connectit";
score_var = "_root.score";
}
Frame 124
function setEnabled(Void) {
var _local2 = 0;
while (_local2 < totalItem) {
var _local3 = this["item" + _local2];
if (coins >= _local3.price) {
Common.setEnabled(_local3, true, 0.2);
} else {
Common.setEnabled(_local3, false, 0.2);
}
_local2++;
}
}
function shoppingEnabled(value) {
var _local2 = 0;
while (_local2 < totalItem) {
Common.setEnabled(this["item" + _local2], value, 0.2);
_local2++;
}
if (value) {
setEnabled();
alert_btn._x = -10000;
} else {
alert_btn._x = alert_btn.x0;
}
alert_btn.enabled = !value;
}
alert_btn.useHandCursor = false;
alert_btn.onPress = function () {
alert_mc.show("noroom");
};
alert_btn.x0 = alert_btn._x;
alert_btn.y0 = alert_btn._y;
var totalItem = itemName.length;
if (itemList.length < 5) {
alert_btn._x = -10000;
}
fwgCtrl.enabledAll(true);
var i = 0;
while (i < totalItem) {
var item_mc = this["item" + i];
item_mc.price = priceArr[i];
item_mc.name = itemName[i];
item_mc.press = function () {
if (coins >= this.price) {
coins = coins - this.price;
coinsNums.update(coins);
setEnabled();
items_mc.addItemByValue(this.name, this._x - items_mc._x, this._y - items_mc._y);
}
};
i++;
}
setEnabled();
nsBtn.press = function () {
itemList = items_mc.itemList;
fwgCtrl.playGame();
};
stageNum++;
var coinsNums = new Nums(coinsNums_mc, 4, coins);
fwgCtrl.initMmBtn(mmBtn);
fwgCtrl.initGameCtrl(qBtn, mBtn, sBtn);
items_mc.run = function () {
alert_mc.show("removeConfirm");
alert_mc.onConfirm = function (value) {
if (value) {
items_mc.reomveCurrentItem();
}
};
};
Frame 125
fwgCtrl.initMmBtn(mmBtn);
fwgCtrl.initBtns(null, vhBtn, mogBtn, dgBtn, agtysBtn);
if (isFreePlay || (isMyGame)) {
submit_mc._visible = false;
}
Instance of Symbol 432 MovieClip "submit_mc" in Frame 125
//component parameters
onClipEvent (construct) {
_game_name = "connectit";
score_var = "_root.score";
}
Frame 126
function save(Void) {
var _local4 = 0;
var _local3 = new Array(h);
var _local2 = 0;
while (_local2 < h) {
_local3[_local2] = new Array(w);
var _local1 = 0;
while (_local1 < w) {
if (mArea[(("m" + _local2) + "_") + _local1]._currentframe == 2) {
_local3[_local2][_local1] = 1;
_local4++;
} else {
_local3[_local2][_local1] = 0;
}
_local1++;
}
_local2++;
}
if (_local4 == 0) {
alert("f0");
} else if ((_local4 % 2) == 1) {
alert("f1");
} else {
cis.saveMyPzs(_local3);
return(true);
}
return(false);
}
function alert(msg) {
alert_mc.show(msg);
}
var w = 12;
var h = 12;
var dw = 50;
var dh = 50;
var currentFrame = 0;
var y = 1;
while (y < (h - 1)) {
var x = 1;
while (x < (w - 1)) {
var m = mArea.attachMovie("create_m", (("m" + y) + "_") + x, (y * w) + x, {_x:x * dw, _y:y * dh});
m.gotoAndStop("blank");
m.press = function () {
currentFrame = 3 - this._currentframe;
onEnterFrame = function () {
mArea[(("m" + Math.round(mArea._ymouse / dh)) + "_") + Math.round(mArea._xmouse / dw)].gotoAndStop(currentFrame);
};
};
m.release = (m.releaseOutside = function () {
currentFrame = 0;
delete onEnterFrame;
});
x++;
}
y++;
}
fwgCtrl.initMmBtn(mmBtn);
saveBtn.press = function () {
if (save()) {
isMyGame = true;
stageNum = cis.totalMyPzs;
fwgCtrl.playGame();
}
};
clearBtn.press = function () {
var _local2 = 1;
while (_local2 < (h - 1)) {
var _local1 = 1;
while (_local1 < (w - 1)) {
mArea[(("m" + _local2) + "_") + _local1].gotoAndStop("blank");
_local1++;
}
_local2++;
}
};
Frame 136
fwgCtrl.initMmBtn(mmBtn);
Instance of Symbol 532 MovieClip in Frame 136
on (release) {
_parent.nextFrame();
}
Instance of Symbol 543 MovieClip in Frame 137
on (release) {
_parent.prevFrame();
}
Frame 146
fwgCtrl.playGame();
Symbol 43 MovieClip [effect_mc] Frame 1
function randomLine(mc, points, d) {
var _local10;
var _local9;
var _local8 = points[0][0] * dw;
var _local7 = points[0][1] * dh;
mc.moveTo(_local8, _local7);
var _local5 = 1;
while (_local5 < L) {
_local10 = points[_local5][0] * dw;
_local9 = points[_local5][1] * dh;
var _local3 = _local10 - _local8;
var _local2 = _local9 - _local7;
var _local4 = Math.round(Math.sqrt((_local3 * _local3) + (_local2 * _local2)) / d);
_local3 = _local3 / _local4;
_local2 = _local2 / _local4;
var _local1 = 1;
while (_local1 < _local4) {
mc.lineTo((_local8 + (_local3 * _local1)) + ((Math.random() - 0.5) * d), (_local7 + (_local2 * _local1)) + ((Math.random() - 0.5) * d));
_local1++;
}
_local8 = _local10;
_local7 = _local9;
_local5++;
}
mc.lineTo(points[L - 1][0] * dw, points[L - 1][1] * dh);
}
var L = points.length;
m1._x = m1x;
m1._y = m1y;
m2._x = m2x;
m2._y = m2y;
m1.m.gotoAndStop(f1);
m2.m.gotoAndStop(f2);
m1.coin = (m2.coin = dScore / 2);
if (L > 0) {
lineArea.onEnterFrame = function () {
this.clear();
this.lineStyle(2, 16777215);
randomLine(this, points, 10);
randomLine(this, points, 10);
randomLine(this, points, 10);
};
} else {
lineArea.clear();
lineArea.lineStyle(5, 16777215);
lineArea.moveTo(m1._x, m1._y);
lineArea.lineTo(m2._x, m2._y);
}
Symbol 43 MovieClip [effect_mc] Frame 40
onEffect();
this.removeMovieClip();
Symbol 46 Button
on (rollOver) {
rollOver();
}
on (rollOut) {
rollOut();
}
on (press) {
press();
}
Symbol 49 MovieClip [m] Frame 1
function select(Void) {
rec._alpha = 100;
}
function unselect(Void) {
rec._alpha = 0;
}
function resetValue(_value) {
value = _value;
m_pics.gotoAndStop(value);
}
m_pics.gotoAndStop(value);
rec._alpha = 0;
Symbol 50 MovieClip [popUp_effect] Frame 1
m.gotoAndStop(value);
Symbol 50 MovieClip [popUp_effect] Frame 41
this.removeMovieClip();
Symbol 55 Button
on (rollOver) {
rollOver();
}
on (rollOut) {
rollOut();
}
on (press) {
press();
}
Symbol 61 Button
on (press) {
del();
}
Symbol 64 Button
on (rollOver) {
rollOver();
}
on (rollOut) {
rollOut();
}
on (press) {
press();
}
on (release) {
release();
}
on (releaseOutside) {
releaseOutside();
}
Symbol 72 Button
on (rollOver) {
this.swapDepths(this._parent.getNextHighestDepth());
new STween(this, this._x, this._y, 120, 0.8);
rollOver();
}
on (rollOut) {
new STween(this, this._x, this._y, 100, 0.8);
}
on (press) {
new STween(this, this._x, this._y, 100, 0.8);
press();
}
Symbol 73 MovieClip [prevViewUnit] Frame 1
var w = map[0].length;
var h = map.length;
var d = 4;
this.createEmptyMovieClip("mArea", 0);
var y = 0;
while (y < h) {
var x = 0;
while (x < w) {
if (map[y][x] > 0) {
var m = mArea.attachMovie("m_pic", (("m" + y) + "_") + x, (y * w) + x, {_x:x * d, _y:y * d});
m._width = (m._height = d);
m.gotoAndStop(map[y][x]);
}
x++;
}
y++;
}
var bmp = (new flash.display.BitmapData(48, 48, true, 0));
bmp.draw(mArea);
mArea.removeMovieClip();
this.createEmptyMovieClip("mArea", 0);
mArea._x = (mArea._y = -22);
mArea.attachBitmap(bmp, 0);
Symbol 77 Button
on (press) {
press();
}
Symbol 89 MovieClip [item_item] Frame 1
function setEnabled(value) {
btn.enabled = value;
}
icon_mc.gotoAndStop(name);
Symbol 545 MovieClip [__Packages.STween] Frame 0
class STween
{
var mc, xt, yt, u, scalet, intervalId, dx, dy, dScale, onMov;
function STween (_mc, _xt, _yt, _scalet, _u) {
mc = _mc;
if (mc.stween != undefined) {
mc.stween.stopMov();
}
mc.stween = this;
xt = _xt;
yt = _yt;
if (isNaN(_scalet)) {
_scalet = 100;
}
if (isNaN(_u)) {
_u = 0.5;
}
u = _u;
scalet = _scalet;
intervalId = setInterval(this, "mov", 33);
}
function mov(Void) {
if (mc._x == undefined) {
clearInterval(intervalId);
} else {
dx = xt - mc._x;
dy = yt - mc._y;
dScale = scalet - mc._xscale;
mc._x = mc._x + (dx * u);
mc._y = mc._y + (dy * u);
mc._yscale = (mc._xscale = mc._xscale + (dScale * u));
if ((((dx * dx) + (dy * dy)) + (dScale * dScale)) < 1) {
clearInterval(intervalId);
mc._x = xt;
mc._y = yt;
mc._yscale = (mc._xscale = scalet);
onMov(mc);
}
}
}
function stopMov(Void) {
clearInterval(intervalId);
mc.stween = undefined;
}
}
Symbol 546 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function showPreloaderAd(options) {
var _local29 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812};
options = _parseOptions(options, _local29);
var _local15 = options.clip;
var _local25 = 11000;
var _local28 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
return(undefined);
}
_local15.stop();
var mc = _local15._mochiad;
mc.onUnload = function () {
this._parent.play();
};
var _local16 = _getRes(options);
var _local5 = _local16[0];
var _local14 = _local16[1];
mc._x = _local5 * 0.5;
mc._y = _local14 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local5 * -0.5;
chk._y = _local14 * -0.5;
var _local8 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local8._x = 10;
_local8._y = _local14 - 20;
var _local24 = options.color;
delete options.color;
var _local21 = options.background;
delete options.background;
var _local26 = options.outline;
delete options.outline;
var _local6 = _local8.createEmptyMovieClip("_outline", 1);
_local6.beginFill(_local21);
_local6.moveTo(0, 0);
_local6.lineTo(_local5 - 20, 0);
_local6.lineTo(_local5 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
_local6.endFill();
var _local4 = _local8.createEmptyMovieClip("_inside", 2);
_local4.beginFill(_local24);
_local4.moveTo(0, 0);
_local4.lineTo(_local5 - 20, 0);
_local4.lineTo(_local5 - 20, 10);
_local4.lineTo(0, 10);
_local4.lineTo(0, 0);
_local4.endFill();
_local4._xscale = 0;
var _local7 = _local8.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local26, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local5 - 20, 0);
_local7.lineTo(_local5 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local25;
chk.ad_timeout = _local28;
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.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_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 showTimedAd(options) {
var _local15 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd"};
options = _parseOptions(options, _local15);
var _local6 = options.clip;
var _local12 = 11000;
var _local14 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
return(undefined);
}
_local6.stop();
var mc = _local6._mochiad;
mc.onUnload = function () {
this._parent.play();
};
var _local7 = _getRes(options);
var _local16 = _local7[0];
var _local13 = _local7[1];
mc._x = _local16 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local12;
chk.ad_timeout = _local14;
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.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
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) {
_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 _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 _loadCommunicator(options) {
var _local25 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local25);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = "1.4";
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local24 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local24);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb) {
cb = parseInt(cb);
var _local4 = this._callbacks[cb];
if (!_local4) {
return(undefined);
}
delete this._callbacks[cb];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
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 = "1.4";
var _local7 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local7._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
if (_local7._url.indexOf("http") != 0) {
options.no_page = true;
}
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 _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_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);
}
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++;
}
}
return(_local4);
}
}
Symbol 547 MovieClip [__Packages.ConnectItSave] Frame 0
class ConnectItSave
{
var lso, dataArr, myPzs, totalFile, totalMyPzs;
function ConnectItSave (Void) {
lso = SharedObject.getLocal("connectit", "/");
if (lso.data.dataObj == undefined) {
trace("\u65B0\u6E38\u620F");
lso.data.dataObj = {dataArr:new Array(), myPzs:new Array()};
}
dataArr = lso.data.dataObj.dataArr;
myPzs = lso.data.dataObj.myPzs;
totalFile = dataArr.length;
totalMyPzs = myPzs.length;
}
function del(id) {
totalFile--;
dataArr.splice(id - 1, 1);
}
function delMyPzs(id) {
totalMyPzs--;
myPzs.splice(id - 1, 1);
}
function read(id) {
return(dataArr[id - 1]);
}
function readMyPzs(id) {
if (isNaN(id) || (id > totalMyPzs)) {
return(Maps.numsToMap(myPzs[totalMyPzs - 1]));
}
return(Maps.numsToMap(myPzs[id - 1]));
}
function save(temp, stageNum, score, coins, playerName, itemList, id) {
if (typeof(temp) == "object") {
var _local2 = temp.clone();
} else {
var _local2 = new SaveUnit(temp, stageNum, score, coins, playerName, itemList);
}
if (isNaN(id) || (id > totalFile)) {
totalFile++;
dataArr.push(_local2);
} else {
dataArr[id - 1] = _local2;
}
}
function saveMyPzs(map, id) {
if (isNaN(id) || (id > totalMyPzs)) {
totalMyPzs++;
myPzs.push(Maps.mapToNums(map));
} else {
myPzs[id - 1] = Maps.mapToNums(map);
}
}
}
Symbol 548 MovieClip [__Packages.Maps] Frame 0
class Maps
{
function Maps () {
}
static function arrToNum(arr) {
var _local3 = arr.length;
var _local2 = 0;
var _local1 = 0;
while (_local1 < _local3) {
_local2 = _local2 << 1;
_local2 = _local2 | arr[_local1];
_local1++;
}
return(_local2);
}
static function numToArr(num, L) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < L) {
_local3.unshift(num & 1);
num = num >> 1;
_local1++;
}
return(_local3);
}
static function numsToMap(nums) {
var _local3 = nums.length;
var _local2 = new Array(_local3);
var _local1 = 0;
while (_local1 < _local3) {
_local2[_local1] = numToArr(nums[_local1], 12);
_local1++;
}
return(_local2);
}
static function mapToNums(map) {
var _local3 = map.length;
var _local2 = new Array(_local3);
var _local1 = 0;
while (_local1 < _local3) {
_local2[_local1] = arrToNum(map[_local1]);
_local1++;
}
return(_local2);
}
static function getMap(stageNum) {
return(numsToMap(numss[stageNum]));
}
static var numss = [[], [0, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 0], [0, 1806, 1026, 1026, 0, 0, 0, 0, 1026, 1026, 1806, 0], [0, 1026, 516, 264, 144, 96, 96, 144, 264, 516, 1026, 0], [0, 524, 1042, 1040, 768, 0, 0, 12, 130, 1154, 772, 0], [0, 1542, 1542, 264, 0, 0, 0, 0, 264, 1542, 1542, 0], [0, 240, 8, 4, 1026, 1026, 1026, 1026, 512, 256, 240, 0], [0, 896, 1152, 1152, 1792, 0, 0, 14, 18, 18, 28, 0], [0, 1152, 640, 384, 1920, 0, 0, 30, 24, 20, 18, 0], [0, 0, 1016, 4, 20, 36, 68, 132, 260, 516, 0, 0], [0, 0, 240, 264, 264, 264, 264, 264, 264, 240, 0, 0], [0, 768, 768, 768, 768, 768, 768, 768, 768, 1020, 1020, 0], [0, 1020, 1020, 96, 96, 96, 96, 96, 96, 96, 96, 0], [0, 1806, 924, 504, 240, 96, 96, 96, 96, 96, 96, 0], [0, 264, 660, 1122, 612, 408, 408, 612, 1122, 660, 264, 0], [0, 504, 504, 96, 96, 96, 96, 96, 96, 504, 504, 0], [0, 1542, 780, 408, 408, 240, 408, 264, 264, 408, 240, 0], [0, 252, 252, 48, 48, 48, 48, 816, 816, 1008, 480, 0], [0, 28, 60, 96, 832, 224, 88, 832, 1472, 1272, 926, 0], [0, 780, 1290, 1434, 1434, 1266, 612, 96, 96, 96, 96, 0], [0, 1806, 1026, 1530, 264, 264, 264, 264, 1530, 1026, 1806, 0], [0, 240, 264, 264, 1902, 1170, 1170, 1902, 264, 264, 240, 0], [0, 1170, 660, 408, 1950, 0, 0, 1950, 408, 660, 1170, 0], [0, 0, 0, 96, 240, 144, 1020, 2046, 2046, 408, 0, 0], [0, 32, 96, 224, 248, 2044, 1022, 496, 112, 96, 64, 0], [0, 1020, 1020, 768, 768, 1008, 1008, 768, 768, 768, 768, 0], [0, 780, 792, 816, 864, 960, 960, 864, 816, 792, 780, 0], [0, 0, 924, 660, 924, 0, 1542, 1542, 780, 1020, 240, 0], [0, 64, 1696, 672, 928, 428, 446, 54, 62, 108, 448, 0], [0, 68, 366, 694, 1702, 0, 0, 68, 366, 694, 1702, 0], [0, 0, 408, 1020, 1902, 1542, 1542, 780, 408, 240, 96, 0], [0, 504, 1020, 1154, 1152, 768, 12, 18, 1042, 1020, 504, 0], [0, 248, 508, 390, 134, 902, 1164, 1176, 792, 30, 12, 0], [0, 1024, 672, 856, 860, 858, 858, 860, 856, 40, 68, 0], [0, 1024, 1344, 1712, 1712, 1712, 1712, 1712, 1712, 1684, 14, 0], [0, 2046, 1026, 1026, 1806, 264, 264, 1806, 1026, 1026, 2046, 0], [0, 1950, 1950, 780, 780, 408, 408, 240, 240, 96, 96, 0], [0, 1806, 924, 408, 240, 96, 96, 240, 408, 924, 1806, 0], [0, 1020, 1020, 24, 48, 96, 96, 192, 384, 1020, 1020, 0], [0, 1950, 780, 408, 240, 96, 1020, 96, 1020, 96, 96, 0], [0, 96, 1122, 1638, 1638, 1542, 2046, 504, 240, 96, 96, 0], [0, 96, 240, 408, 780, 780, 1020, 1020, 780, 780, 780, 0], [0, 1016, 1020, 780, 780, 1020, 1016, 768, 768, 768, 768, 0], [0, 780, 780, 780, 780, 780, 780, 780, 780, 1020, 504, 0], [0, 1638, 1266, 1122, 1170, 1290, 1290, 1170, 1122, 1266, 1638, 0], [0, 464, 972, 550, 1174, 358, 1640, 1682, 1604, 828, 184, 0], [0, 584, 1168, 584, 0, 1008, 1020, 1012, 1020, 1008, 480, 0], [0, 780, 780, 780, 780, 1020, 1020, 780, 780, 780, 780, 0], [0, 126, 126, 14, 822, 950, 454, 224, 880, 1840, 1536, 0], [0, 128, 192, 224, 240, 248, 252, 128, 2046, 2046, 1020, 0], [0, 1434, 756, 1290, 1686, 612, 612, 1686, 1290, 756, 1434, 0], [0, 1782, 1170, 408, 1806, 1122, 1122, 1806, 408, 1170, 1782, 0], [0, 1470, 1440, 1078, 1286, 1888, 110, 1546, 1730, 90, 2010, 0], [0, 1122, 876, 780, 240, 1782, 1782, 240, 780, 876, 1122, 0], [0, 1246, 1628, 1816, 1938, 6, 1536, 1182, 398, 934, 1970, 0], [0, 916, 1590, 1138, 1250, 1474, 1082, 1138, 1250, 1734, 668, 0], [0, 1022, 1538, 1272, 1996, 8, 256, 830, 498, 1030, 2044, 0], [0, 1008, 1016, 796, 780, 780, 780, 780, 796, 1016, 1008, 0], [0, 1020, 1020, 768, 768, 1008, 1008, 768, 768, 1020, 1020, 0], [0, 504, 1020, 780, 768, 768, 828, 828, 780, 1020, 504, 0], [0, 780, 796, 828, 892, 1004, 972, 908, 780, 780, 780, 0], [0, 504, 1020, 780, 780, 780, 780, 780, 780, 1020, 504, 0], [0, 508, 1020, 768, 768, 1016, 508, 12, 12, 1020, 1016, 0], [0, 1542, 1542, 1542, 1542, 1542, 1638, 1782, 1950, 1806, 1542, 0], [0, 2046, 2046, 96, 96, 96, 96, 96, 96, 2046, 2046, 0], [0, 240, 504, 780, 780, 408, 1170, 1806, 0, 2046, 2046, 0], [0, 1542, 780, 408, 408, 2046, 2046, 408, 408, 780, 1542, 0], [0, 504, 1020, 780, 780, 780, 780, 812, 792, 1020, 494, 0], [0, 1016, 1020, 780, 780, 1020, 1016, 864, 816, 792, 780, 0], [0, 924, 1686, 1170, 1170, 1530, 1530, 1170, 1170, 1686, 924, 0], [0, 448, 924, 830, 950, 482, 1144, 1756, 1996, 924, 56, 0], [0, 1782, 1290, 756, 1290, 1386, 1386, 1290, 756, 1290, 1782, 0], [0, 1026, 2046, 1020, 408, 408, 408, 408, 1020, 2046, 1026, 0], [0, 1534, 1282, 1402, 1354, 1354, 1322, 1322, 1514, 1034, 2042, 0], [0, 1542, 1806, 1950, 2046, 1782, 1638, 1542, 1542, 1542, 1542, 0], [0, 1950, 1542, 1386, 1266, 504, 504, 1266, 1386, 1542, 1950, 0], [0, 1530, 1902, 96, 1020, 1542, 1542, 1020, 96, 1902, 1530, 0], [0, 1902, 1782, 1170, 924, 1542, 1542, 924, 1170, 1782, 1902, 0], [0, 2044, 1422, 1542, 1650, 1234, 1202, 1254, 1542, 1818, 1022, 0], [0, 240, 248, 168, 504, 396, 508, 508, 1020, 1020, 1758, 0], [0, 2046, 1794, 1914, 74, 1986, 1086, 1312, 1518, 1038, 2046, 0], [0, 1902, 1386, 1902, 96, 1950, 1950, 96, 1902, 1386, 1902, 0], [0, 1902, 1530, 1542, 612, 1782, 1782, 612, 1542, 1530, 1902, 0], [0, 2046, 2046, 408, 408, 408, 408, 408, 408, 2046, 2046, 0], [0, 1518, 1384, 1902, 98, 2046, 2046, 1120, 1902, 362, 1914, 0], [0, 144, 1022, 2046, 1680, 2044, 1022, 150, 2046, 2044, 144, 0], [0, 2046, 2046, 876, 876, 876, 876, 876, 876, 2046, 2046, 0], [0, 2046, 1806, 1782, 1386, 1434, 1434, 1386, 1782, 1806, 2046, 0], [0, 1638, 2046, 1020, 876, 2046, 2046, 876, 1020, 2046, 1638, 0], [0, 2046, 1638, 1530, 1386, 2046, 2046, 1386, 1530, 1638, 2046, 0], [0, 1530, 408, 2046, 2046, 1530, 1530, 2046, 2046, 408, 1530, 0], [0, 2046, 1530, 2046, 2046, 1950, 1950, 2046, 2046, 1530, 2046, 0], [0, 2046, 2046, 1782, 2046, 2046, 2046, 2046, 1782, 2046, 2046, 0], [0, 2046, 1530, 2046, 2046, 2046, 2046, 2046, 2046, 1530, 2046, 0], [0, 1020, 2046, 2046, 2046, 2046, 2046, 2046, 2046, 2046, 1020, 0], [0, 1022, 1534, 2046, 2046, 2046, 2046, 2046, 2046, 2042, 2044, 0], [0, 2046, 1790, 1534, 2046, 2046, 2046, 2046, 2042, 2038, 2046, 0], [0, 2046, 2046, 2046, 1982, 1918, 2030, 2014, 2046, 2046, 2046, 0], [0, 1534, 1022, 2046, 2046, 2046, 2046, 2046, 2046, 2044, 2042, 0], [0, 1278, 1022, 1022, 2046, 2046, 2046, 2046, 2046, 2046, 2046, 0], [0, 2046, 2046, 2046, 2046, 2046, 2046, 2046, 2046, 2046, 2046, 0]];
static var typeNumArr = [4, 2, 4, 4, 4, 4, 4, 2, 2, 4];
static var totalStage = numss.length - 1;
}
Symbol 549 MovieClip [__Packages.SaveUnit] Frame 0
class SaveUnit
{
var fileName, stageNum, score, coins, playerName, itemList;
function SaveUnit (_fileName, _stageNum, _score, _coins, _playerName, _itemList) {
if (typeof(_fileName) != "string") {
fileName = "Stage 1";
stageNum = 1;
score = 0;
coins = 0;
playerName = "";
itemList = ["\u5E2E\u52A9", "\u5B9A\u65F6", "\u6253\u4E71", "\u7A7F\u900F"];
} else {
fileName = _fileName;
stageNum = _stageNum;
score = _score;
coins = _coins;
playerName = _playerName;
itemList = _itemList.slice();
}
}
function clone(Void) {
return(new SaveUnit(fileName, stageNum, score, coins, playerName, itemList));
}
}
Symbol 550 MovieClip [__Packages.FwgCtrl] Frame 0
class FwgCtrl
{
var movie, gameName, music_snd, sound_snd, musicOn, soundOn, pgBtn, vhBtn, mogBtn, dgBtn, agtysBtn, mmBtn, pauseBtn, qBtn, mBtn, sBtn;
function FwgCtrl (_movie, _gameName) {
movie = _movie;
gameName = _gameName;
music_snd = new Sound(movie.createEmptyMovieClip("CtrlmusicMc", 10001));
sound_snd = new Sound(movie.createEmptyMovieClip("CtrlsoundMc", 10000));
sound_snd.fc = this;
musicOn = true;
soundOn = true;
}
function initBtns(_pgBtn, _vhBtn, _mogBtn, _dgBtn, _agtysBtn) {
pgBtn = _pgBtn;
vhBtn = _vhBtn;
mogBtn = _mogBtn;
dgBtn = _dgBtn;
agtysBtn = _agtysBtn;
pgBtn.fc = this;
vhBtn.fc = this;
pgBtn.txt = "Play Game";
vhBtn.txt = "View Highscore";
mogBtn.txt = "More Online Games";
dgBtn.txt = "Download Games";
agtysBtn.txt = "Add Games To Your Site";
pgBtn.press = function () {
this.fc.playGame();
};
vhBtn.press = function () {
this.fc.viewHighscore();
};
mogBtn.press = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
dgBtn.press = function () {
getURL ("http://www.ifungames.com", "_blank");
};
agtysBtn.press = function () {
getURL ("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
};
}
function initMmBtn(_mmBtn) {
mmBtn = _mmBtn;
mmBtn.txt = "Main Menu";
mmBtn.fc = this;
mmBtn.press = function () {
this.fc.gotoMainMenu();
};
}
function initPauseBtn(_pauseBtn) {
pauseBtn = _pauseBtn;
pauseBtn.txt = "Pause";
pauseBtn.fc = this;
pauseBtn.press = function () {
if (this.fc.pause()) {
this.txt = "Resume";
} else {
this.txt = "Pause";
}
};
}
function initGameCtrl(_qBtn, _mBtn, _sBtn) {
qBtn = _qBtn;
qBtn.fc = this;
mBtn = _mBtn;
mBtn.fc = this;
sBtn = _sBtn;
sBtn.fc = this;
qBtn.stop();
qBtn.close = function () {
this.fc.enabledAll(true);
this.gotoAndStop(1);
this.onPress = function () {
this.open();
};
};
qBtn.open = function () {
this.gotoAndStop(2);
this.btn0.txt = "Low";
this.btn1.txt = "Medium";
this.btn2.txt = "High";
this.btn3.txt = "Best";
delete this.onPress;
this.rec.onPress = function () {
};
this.rec.enabled = false;
var _local3 = 0;
while (_local3 < 4) {
var _local2 = this["btn" + _local3];
_local2.press = function () {
this._parent.rec.yt = this._y;
new STween(this._parent.rec, this._parent.rec._x, this._parent.rec.yt);
this._parent.fc.movie._quality = this.txt.toUpperCase();
};
if (this.fc.movie._quality == _local2.txt.toUpperCase()) {
this.rec._y = _local2._y;
}
_local3++;
}
this.hitRec.onPress = function () {
this._parent.close();
};
};
qBtn.onPress = function () {
this.open();
};
if (musicOn) {
mBtn.gotoAndStop(1);
} else {
mBtn.gotoAndStop(2);
}
mBtn.onPress = function () {
this.fc.musicCtrl();
};
if (soundOn) {
sBtn.gotoAndStop(1);
} else {
sBtn.gotoAndStop(2);
}
sBtn.onPress = function () {
this.fc.soundCtrl();
};
}
function musicCtrl(Void) {
if (musicOn) {
musicOn = false;
music_snd.setVolume(0);
mBtn.gotoAndStop(2);
} else {
musicOn = true;
music_snd.setVolume(100);
mBtn.gotoAndStop(1);
}
}
function musicStart(id) {
if (musicOn) {
musicStop();
music_snd.attachSound(id);
music_snd.start(0, 10000);
}
}
function musicStop(Void) {
music_snd.stop();
}
function soundCtrl(Void) {
if (soundOn) {
soundOn = false;
sBtn.gotoAndStop(2);
sound_snd.stop();
} else {
soundOn = true;
sBtn.gotoAndStop(1);
}
}
function soundStart(id) {
if (soundOn) {
sound_snd.stop();
sound_snd.attachSound(id);
sound_snd.start();
sound_snd.onSoundComplete = function () {
this.fc.onSoundComplete();
};
}
}
function viewHighscore(Void) {
getURL ("http://www.freeworldgroup.com/score/index.asp?game=" + gameName, "_blank");
}
}
Symbol 551 MovieClip [__Packages.RandomPlay] Frame 0
class RandomPlay
{
var mc, intervalId;
function RandomPlay (_mc, minTime, maxTime) {
mc = _mc;
mc.stop();
intervalId = setInterval(this, "run", (minTime + (Math.random() * (maxTime - minTime))) * 1000);
}
function run(Void) {
clearInterval(intervalId);
mc.play();
}
}
Symbol 552 MovieClip [__Packages.ChainMov] Frame 0
class ChainMov
{
var y0, d, headNode, tailNode;
function ChainMov (_y0, _d) {
y0 = _y0;
d = _d;
headNode = new ChainNode(null, null, null);
tailNode = new ChainNode(null, null, null);
headNode.nextNode = tailNode;
tailNode.prevNode = headNode;
}
function addNode(mc, value) {
var _local2;
if (typeof(value) == "movieclip") {
_local2 = getNode(value);
} else if (value == "head") {
_local2 = headNode;
} else if (value == "tail") {
_local2 = tailNode.prevNode;
} else {
_local2 = tailNode.prevNode;
}
var _local3 = new ChainNode(mc);
var _local5 = _local2.nextNode;
_local2.nextNode = _local3;
_local5.prevNode = _local3;
_local3.prevNode = _local2;
_local3.nextNode = _local5;
adjust();
}
function removeNode(mc) {
var _local2 = getNode(mc);
var _local3 = _local2.prevNode;
var _local4 = _local2.nextNode;
_local3.nextNode = _local4;
_local4.prevNode = _local3;
mc.removeMovieClip();
adjust();
}
function getNode(mc) {
var _local2 = headNode.nextNode;
while (_local2 != tailNode) {
if (_local2.mc == mc) {
return(_local2);
}
_local2 = _local2.nextNode;
}
return(null);
}
function getIndex(mc) {
var _local2 = headNode.nextNode;
var _local3 = 0;
while (_local2 != tailNode) {
if (_local2.mc == mc) {
return(_local3);
}
_local3++;
_local2 = _local2.nextNode;
}
return(null);
}
function adjust(Void) {
var _local2 = headNode.nextNode;
var _local3 = y0;
while (_local2 != tailNode) {
new STween(_local2.mc, 0, _local3);
_local3 = _local3 + d;
_local2 = _local2.nextNode;
}
}
}
Symbol 553 MovieClip [__Packages.ChainNode] Frame 0
class ChainNode
{
var mc, prevNode, nextNode;
function ChainNode (_mc, _prevNode, _nextNode) {
mc = _mc;
prevNode = _prevNode;
nextNode = _nextNode;
}
}
Symbol 554 MovieClip [__Packages.Kyodai] Frame 0
class Kyodai
{
var totalType, totalTile, map, w, h, onGameOver, msArr, onDisorder;
function Kyodai (_map, _totalType, typeNum) {
if (isNaN(typeNum)) {
typeNum = 4;
}
totalType = _totalType;
totalTile = 0;
map = _map.slice();
w = map[0].length;
h = map.length;
var _local6 = typeNum - 2;
var _local4 = 0;
var _local3 = 0;
while (_local3 < h) {
var _local2 = 0;
while (_local2 < w) {
if (map[_local3][_local2] > 0) {
_local6++;
if (((_local6 % typeNum) == (typeNum - 1)) && ((_local4++) > totalType)) {
_local4 = 1;
}
map[_local3][_local2] = _local4;
totalTile++;
}
_local2++;
}
_local3++;
}
disorder();
}
function getPoints(x1, y1, x2, y2) {
var _local7 = Infinity;
var _local6;
var _local8;
var _local16 = map[y1][x1];
var _local15 = map[y2][x2];
map[y1][x1] = 0;
map[y2][x2] = 0;
var _local13 = x1;
while (_local13 >= 0) {
if (connectAble(x1, y1, _local13, y1)) {
if (connectAble(_local13, y1, _local13, y2) && (connectAble(_local13, y2, x2, y2))) {
_local7 = (Math.abs(_local13 - x1) + Math.abs(y1 - y2)) + Math.abs(_local13 - x2);
_local8 = [[x1, y1], [_local13, y1], [_local13, y2], [x2, y2]];
break;
}
} else {
break;
}
_local13--;
}
_local13 = x1 + 1;
while (_local13 < w) {
if (connectAble(x1, y1, _local13, y1)) {
if (connectAble(_local13, y1, _local13, y2) && (connectAble(_local13, y2, x2, y2))) {
_local6 = (Math.abs(_local13 - x1) + Math.abs(y1 - y2)) + Math.abs(_local13 - x2);
if (_local6 < _local7) {
_local7 = _local6;
_local8 = [[x1, y1], [_local13, y1], [_local13, y2], [x2, y2]];
}
break;
}
} else {
break;
}
_local13++;
}
var _local12 = y1;
while (_local12 >= 0) {
if (connectAble(x1, y1, x1, _local12)) {
if (connectAble(x1, _local12, x2, _local12) && (connectAble(x2, _local12, x2, y2))) {
_local6 = (Math.abs(_local12 - y1) + Math.abs(x1 - x2)) + Math.abs(_local12 - y2);
if (_local6 < _local7) {
_local7 = _local6;
_local8 = [[x1, y1], [x1, _local12], [x2, _local12], [x2, y2]];
}
break;
}
} else {
break;
}
_local12--;
}
_local12 = y1 + 1;
while (_local12 < h) {
if (connectAble(x1, y1, x1, _local12)) {
if (connectAble(x1, _local12, x2, _local12) && (connectAble(x2, _local12, x2, y2))) {
_local6 = (Math.abs(_local12 - y1) + Math.abs(x1 - x2)) + Math.abs(_local12 - y2);
if (_local6 < _local7) {
_local7 = _local6;
_local8 = [[x1, y1], [x1, _local12], [x2, _local12], [x2, y2]];
}
break;
}
} else {
break;
}
_local12++;
}
map[y1][x1] = _local16;
map[y2][x2] = _local15;
if (_local8.length > 0) {
var _local17;
var _local11 = _local8[0][0];
var _local10 = _local8[0][1];
var _local14 = new Array();
var _local9 = 1;
while (_local9 < 4) {
_local13 = _local8[_local9][0];
_local12 = _local8[_local9][1];
if ((_local11 == _local13) && (_local10 == _local12)) {
} else {
_local14.push([_local11, _local10]);
_local11 = _local13;
_local10 = _local12;
}
_local9++;
}
_local14.push([_local13, _local12]);
return(_local14);
}
return(null);
}
function connectAble(x1, y1, x2, y2) {
if (x1 == x2) {
if ((y2 - y1) < 0) {
var _local7 = -1;
} else {
var _local7 = 1;
}
var _local2 = y1;
while (_local2 != y2) {
if (map[_local2][x1] > 0) {
return(false);
}
_local2 = _local2 + _local7;
}
} else {
if ((x2 - x1) < 0) {
var _local8 = -1;
} else {
var _local8 = 1;
}
var _local3 = x1;
while (_local3 != x2) {
if (map[y1][_local3] > 0) {
return(false);
}
_local3 = _local3 + _local8;
}
}
return(true);
}
function equal(x1, y1, x2, y2) {
return(map[y1][x1] == map[y2][x2]);
}
function remove(x1, y1, x2, y2) {
map[y1][x1] = 0;
map[y2][x2] = 0;
totalTile = totalTile - 2;
if (totalTile <= 0) {
gameOver();
}
}
function gameOver(Void) {
onGameOver();
}
function disorder(Void) {
do {
var _local4 = new Array();
var _local3 = 0;
while (_local3 < h) {
var _local2 = 0;
while (_local2 < w) {
if (map[_local3][_local2] > 0) {
_local4.push(map[_local3][_local2]);
}
_local2++;
}
_local3++;
}
if (_local4.length == 0) {
break;
}
Common.disorder(_local4);
msArr = new Array(totalType + 1);
var _local5 = 1;
while (_local5 <= totalType) {
msArr[_local5] = new Array();
_local5++;
}
_local5 = 0;
_local3 = 0;
while (_local3 < h) {
var _local2 = 0;
while (_local2 < w) {
if (map[_local3][_local2] > 0) {
map[_local3][_local2] = _local4[_local5++];
msArr[map[_local3][_local2]].push([_local2, _local3]);
}
_local2++;
}
_local3++;
}
} while (!check());
onDisorder();
}
function check(Void) {
var _local7;
var _local6;
var _local4;
var _local5;
var _local3 = 1;
while (_local3 <= totalType) {
_local4 = msArr[_local3];
_local5 = _local4.length - 1;
var _local2 = 0;
while (_local2 < _local5) {
if (getHelp(_local3, _local4[_local2][0], _local4[_local2][1]).length > 0) {
return(true);
}
_local2++;
}
_local3++;
}
return(false);
}
function getHelp(value, x, y) {
if (map[y][x] <= 0) {
return(null);
}
var _local8 = msArr[value];
var _local11 = _local8.length;
var _local3;
var _local2;
var _local7;
var _local9 = Infinity;
var _local10;
var _local4 = 0;
while (_local4 < _local11) {
_local3 = _local8[_local4][0];
_local2 = _local8[_local4][1];
if ((x == _local3) && (y == _local2)) {
} else if ((map[_local2][_local3] > 0) && (getPoints(x, y, _local3, _local2).length > 0)) {
_local7 = Math.abs(x - _local3) + Math.abs(y - _local2);
if (_local7 < _local9) {
_local9 = _local7;
_local10 = [x, y, _local3, _local2];
}
}
_local4++;
}
return(_local10);
}
}
Symbol 555 MovieClip [__Packages.Common] Frame 0
class Common
{
function Common (Void) {
}
static function disorder(arr) {
var _local5;
var _local4 = arr.length;
var _local3;
var _local1 = 0;
while (_local1 < _local4) {
_local3 = random(_local4);
_local5 = arr[_local3];
arr[_local3] = arr[_local1];
arr[_local1] = _local5;
_local1++;
}
}
static function replace(str, c0, c1) {
return(str.split(c0).join(c1));
}
static function turnDark(_mc, u) {
if (isNaN(u)) {
u = 0.05;
}
_mc.filters = [new flash.filters.ColorMatrixFilter([u, u, u, 0, 0, u, u, u, 0, 0, u, u, u, 0, 0, 0, 0, 0, 1, 0])];
}
static function turnColorful(_mc) {
_mc.filters = [new flash.filters.ColorMatrixFilter([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0])];
}
static function setEnabled(_mc, value, u) {
if (value) {
turnColorful(_mc);
_mc.enabled = true;
delete _mc.onDragOut;
} else {
turnDark(_mc, u);
_mc.enabled = false;
_mc.onDragOut = function () {
};
}
}
}
Symbol 556 MovieClip [__Packages.Nums] Frame 0
class Nums
{
var mc, totalNum;
function Nums (_mc, _totalNum, num) {
mc = _mc;
totalNum = _totalNum;
update(num);
}
function update(num) {
var _local3 = String(num);
var _local4 = _local3.length;
var _local2 = 0;
while (_local2 < _local4) {
mc["num" + _local2].gotoAndStop(Number(_local3.charAt(_local2)) + 1);
_local2++;
}
while (_local2 < totalNum) {
mc["num" + (_local2++)].gotoAndStop("blank");
}
}
}
Symbol 98 MovieClip Frame 1
onEnterFrame = function () {
var _local5 = _root.getBytesLoaded();
var _local4 = _root.getBytesTotal();
var _local3 = int((_local5 / _local4) * 100);
num_txt.text = _local3 + "%";
if (_root._mochiad instanceof MovieClip) {
this._visible = false;
}
if (_local3 == 100) {
delete this.onEnterFrame;
if ((_root._mochiad instanceof MovieClip) != true) {
_root.play();
}
}
};
Symbol 102 MovieClip Frame 1
this._visible = false;
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
_root.play();
} else {
_root.stop();
}
Symbol 102 MovieClip Frame 2
this._visible = true;
Symbol 102 MovieClip Frame 39
stop();
Instance of Symbol 95 MovieClip in Symbol 102 MovieClip Frame 39
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Symbol 105 MovieClip Frame 1
this.onRelease = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
Symbol 203 MovieClip Frame 1
new RandomPlay(this, 0.5, 5);
Symbol 208 MovieClip Frame 1
function swing(_v) {
if (swinging) {
return(undefined);
}
v = _v;
this.onEnterFrame = function () {
var _local2 = 100 - this._xscale;
v = v + (_local2 * 0.2);
v = v * 0.8;
this._xscale = this._xscale + v;
this._yscale = this._yscale - v;
if (((_local2 * _local2) < 1) && ((v * v) < 1)) {
delete this.onEnterFrame;
swinging = false;
this._xscale = (this._yscale = 100);
}
};
}
var v = 0;
var swinging;
this.onRollOver = function () {
swing(10);
rollOver();
};
this.onRollOut = function () {
rollOut();
};
this.onPress = function () {
press();
};
Symbol 210 MovieClip Frame 1
function swing(_v) {
if (swinging) {
return(undefined);
}
v = _v;
this.onEnterFrame = function () {
var _local2 = 100 - this._xscale;
v = v + (_local2 * 0.2);
v = v * 0.8;
this._xscale = this._xscale + v;
this._yscale = this._yscale - v;
if (((_local2 * _local2) < 1) && ((v * v) < 1)) {
delete this.onEnterFrame;
swinging = false;
this._xscale = (this._yscale = 100);
}
};
}
var v = 0;
var swinging;
this.onRollOver = function () {
swing(10);
rollOver();
};
this.onRollOut = function () {
rollOut();
};
this.onPress = function () {
press();
};
Symbol 212 MovieClip Frame 1
function swing(_v) {
if (swinging) {
return(undefined);
}
v = _v;
this.onEnterFrame = function () {
var _local2 = 100 - this._xscale;
v = v + (_local2 * 0.2);
v = v * 0.8;
this._xscale = this._xscale + v;
this._yscale = this._yscale - v;
if (((_local2 * _local2) < 1) && ((v * v) < 1)) {
delete this.onEnterFrame;
swinging = false;
this._xscale = (this._yscale = 100);
}
};
}
var v = 0;
var swinging;
this.onRollOver = function () {
swing(10);
rollOver();
};
this.onRollOut = function () {
rollOut();
};
this.onPress = function () {
press();
};
Symbol 214 MovieClip Frame 1
function swing(_v) {
if (swinging) {
return(undefined);
}
v = _v;
this.onEnterFrame = function () {
var _local2 = 100 - this._xscale;
v = v + (_local2 * 0.2);
v = v * 0.8;
this._xscale = this._xscale + v;
this._yscale = this._yscale - v;
if (((_local2 * _local2) < 1) && ((v * v) < 1)) {
delete this.onEnterFrame;
swinging = false;
this._xscale = (this._yscale = 100);
}
};
}
var v = 0;
var swinging;
this.onRollOver = function () {
swing(10);
rollOver();
};
this.onRollOut = function () {
rollOut();
};
this.onPress = function () {
press();
};
Symbol 216 MovieClip Frame 1
function swing(_v) {
if (swinging) {
return(undefined);
}
v = _v;
this.onEnterFrame = function () {
var _local2 = 100 - this._xscale;
v = v + (_local2 * 0.2);
v = v * 0.8;
this._xscale = this._xscale + v;
this._yscale = this._yscale - v;
if (((_local2 * _local2) < 1) && ((v * v) < 1)) {
delete this.onEnterFrame;
swinging = false;
this._xscale = (this._yscale = 100);
}
};
}
var v = 0;
var swinging;
this.onRollOver = function () {
swing(10);
rollOver();
};
this.onRollOut = function () {
rollOut();
};
this.onPress = function () {
press();
};
Symbol 218 MovieClip Frame 1
function swing(_v) {
if (swinging) {
return(undefined);
}
v = _v;
this.onEnterFrame = function () {
var _local2 = 100 - this._xscale;
v = v + (_local2 * 0.2);
v = v * 0.8;
this._xscale = this._xscale + v;
this._yscale = this._yscale - v;
if (((_local2 * _local2) < 1) && ((v * v) < 1)) {
delete this.onEnterFrame;
swinging = false;
this._xscale = (this._yscale = 100);
}
};
}
var v = 0;
var swinging;
this.onRollOver = function () {
swing(10);
rollOver();
};
this.onRollOut = function () {
rollOut();
};
this.onPress = function () {
press();
};
Symbol 220 MovieClip Frame 1
function swing(_v) {
if (swinging) {
return(undefined);
}
v = _v;
this.onEnterFrame = function () {
var _local2 = 100 - this._xscale;
v = v + (_local2 * 0.2);
v = v * 0.8;
this._xscale = this._xscale + v;
this._yscale = this._yscale - v;
if (((_local2 * _local2) < 1) && ((v * v) < 1)) {
delete this.onEnterFrame;
swinging = false;
this._xscale = (this._yscale = 100);
}
};
}
var v = 0;
var swinging;
this.onRollOver = function () {
swing(10);
rollOver();
};
this.onRollOut = function () {
rollOut();
};
this.onPress = function () {
press();
};
Symbol 222 MovieClip Frame 1
function swing(_v) {
if (swinging) {
return(undefined);
}
v = _v;
this.onEnterFrame = function () {
var _local2 = 100 - this._xscale;
v = v + (_local2 * 0.2);
v = v * 0.8;
this._xscale = this._xscale + v;
this._yscale = this._yscale - v;
if (((_local2 * _local2) < 1) && ((v * v) < 1)) {
delete this.onEnterFrame;
swinging = false;
this._xscale = (this._yscale = 100);
}
};
}
var v = 0;
var swinging;
this.onRollOver = function () {
swing(10);
rollOver();
};
this.onRollOut = function () {
rollOut();
};
this.onPress = function () {
press();
};
Symbol 230 MovieClip Frame 1
new RandomPlay(this, 0.5, 5);
Symbol 239 MovieClip Frame 1
new RandomPlay(this, 0.5, 5);
Symbol 239 MovieClip Frame 18
new RandomPlay(this, 0.5, 5);
Symbol 245 MovieClip Frame 1
this.onEnterFrame = function () {
var _local1 = Math.atan2(_ymouse, _xmouse);
eye_mc._x = Math.cos(_local1) * 18;
eye_mc._y = Math.sin(_local1) * 18;
};
Symbol 247 MovieClip Frame 1
new RandomPlay(this, 0.5, 5);
Symbol 247 MovieClip Frame 21
new RandomPlay(this, 0.5, 5);
Symbol 247 MovieClip Frame 45
new RandomPlay(this, 0.5, 5);
Symbol 247 MovieClip Frame 69
new RandomPlay(this, 0.5, 5);
Symbol 257 MovieClip Frame 20
new RandomPlay(this, 0, 1);
Symbol 257 MovieClip Frame 37
if (this._xscale < 0) {
this._x = this._x - 20;
if (this._x < -50) {
this._xscale = 100;
}
} else {
this._x = this._x + 20;
if (this._x > 850) {
this._xscale = -100;
}
}
gotoAndPlay (1);
Symbol 260 MovieClip Frame 1
function hide(force) {
if ((!force) && (this.hitTest(_parent._xmouse, _parent._ymouse, true))) {
return(undefined);
}
for (var _local3 in this) {
if (this[_local3]._name.substr(0, 4) == "item") {
cm.removeNode(this[_local3]);
}
}
isShowing = false;
}
function show(Void) {
_parent.gameList.hide(true);
if (cis.totalMyPzs == 0) {
return(false);
}
if (!isShowing) {
isShowing = true;
this.attachMovie("saveList_item", "item0", i, {_x:0, _y:0, txt:"Create My Puzzles"});
cm.addNode(item0);
item0.delBtn._visible = false;
item0.rollOut = function () {
hide();
};
item0.press = function () {
onNewPzs();
hide(true);
};
var i = 1;
while (i <= cis.totalMyPzs) {
var _local3 = this.attachMovie("saveList_item", "item" + i, i, {_x:0, txt:"My Puzzle " + i, id:i});
cm.addNode(_local3);
_local3.del = function () {
cis.delMyPzs(cm.getIndex(this));
cm.removeNode(this);
};
_local3.rollOut = function () {
hide();
};
_local3.press = function () {
onLoadGame(this.id);
hide(true);
};
i++;
}
return(true);
}
return(false);
}
var cis = _parent.cis;
var isShowing = false;
var cm = new ChainMov(0, 30);
Symbol 261 MovieClip Frame 1
function hide(force) {
if ((!force) && (this.hitTest(_parent._xmouse, _parent._ymouse, true))) {
return(undefined);
}
for (var _local3 in this) {
if (this[_local3]._name.substr(0, 4) == "item") {
cm.removeNode(this[_local3]);
}
}
isShowing = false;
}
function show(Void) {
_parent.myPzsList.hide(true);
if (cis.totalFile == 0) {
return(false);
}
if (!isShowing) {
isShowing = true;
this.attachMovie("saveList_item", "item0", 0, {_x:0, txt:"New Game", id:i});
cm.addNode(item0);
item0.delBtn._visible = false;
item0.rollOut = function () {
hide();
};
item0.press = function () {
onNewGame();
hide(true);
};
var i = 1;
while (i <= cis.totalFile) {
var _local3 = this.attachMovie("saveList_item", "item" + i, i, {_x:0, txt:cis.read(i).fileName, id:i});
cm.addNode(_local3);
_local3.del = function () {
cis.del(cm.getIndex(this));
cm.removeNode(this);
};
_local3.rollOut = function () {
hide();
};
_local3.press = function () {
onLoadGame(cis.read(this.id));
hide(true);
};
i++;
}
return(true);
}
return(false);
}
var cis = _parent.cis;
var isShowing = false;
var cm = new ChainMov(0, 30);
Symbol 266 Button
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Symbol 269 Button
on (release) {
nextFrame();
}
Symbol 276 Button
on (release) {
prevFrame();
}
Symbol 277 MovieClip Frame 1
stop();
Symbol 277 MovieClip Frame 2
stop();
hitRec.enabled = false;
Symbol 280 MovieClip Frame 1
function show(Void) {
gotoAndPlay ("show");
}
function hide(Void) {
gotoAndPlay ("hide");
}
stop();
Symbol 280 MovieClip Frame 10
stop();
onShow();
Symbol 280 MovieClip Frame 19
onHide();
Symbol 281 MovieClip Frame 1
this.onPress = function () {
};
this.enabled = false;
Symbol 289 MovieClip Frame 1
function swing(_v) {
if (swinging) {
return(undefined);
}
v = _v;
this.onEnterFrame = function () {
var _local2 = 100 - this._xscale;
v = v + (_local2 * 0.2);
v = v * 0.8;
this._xscale = this._xscale + v;
this._yscale = this._yscale - v;
if (((_local2 * _local2) < 1) && ((v * v) < 1)) {
delete this.onEnterFrame;
swinging = false;
this._xscale = (this._yscale = 100);
}
};
}
var v = 0;
var swinging;
this.onRollOver = function () {
swing(10);
rollOver();
};
this.onRollOut = function () {
rollOut();
};
this.onPress = function () {
press();
};
Symbol 291 MovieClip Frame 1
function show(Void) {
this._visible = true;
mask.show();
mask.onShow = function () {
showing = true;
};
}
function hide(Void) {
showing = false;
this.onPress = function () {
};
this.enabled = false;
mask.hide();
mask.onHide = function () {
this._parent._visible = false;
delete this._parent.onPress;
this._parent.enabled = true;
};
}
this._visible = false;
var y = 0;
var x = 0;
var d = 50;
var kyodai;
var currentId;
var showing = false;
this.onEnterFrame = function () {
if (!showing) {
return(undefined);
}
kyodai = new Kyodai(Maps.getMap(((y * 10) + x) + 1), 25, Maps.typeNumArr[(y * 2) + int(x / 5)]);
var _local5 = prevViewArea.attachMovie("prevViewUnit", (("u" + y) + "_") + x, prevViewArea.getNextHighestDepth(), {_x:(x + 0.5) * d, _y:(y + 0.5) * d, map:kyodai.map, id:((y * 10) + x) + 1});
_local5.press = function () {
hide();
currentId = this.id;
mask.onHide = function () {
this._parent._visible = false;
delete this._parent.onPress;
this._parent.enabled = true;
onHide(currentId);
};
};
_local5.rollOver = function () {
var _local3 = 1;
while (_local3 < 11) {
var _local2 = 1;
while (_local2 < 11) {
if (this.map[_local3][_local2] > 0) {
var _local4 = prevViewScreen.attachMovie("m_pic", (("m" + _local3) + "_") + _local2, (_local3 * 10) + _local2, {_x:(_local2 - 0.5) * 50, _y:(_local3 - 0.5) * 50});
_local4.gotoAndStop(this.map[_local3][_local2]);
} else {
prevViewScreen[(("m" + _local3) + "_") + _local2].removeMovieClip();
}
_local2++;
}
_local3++;
}
};
if ((++x) >= 10) {
x = 0;
if ((++y) >= 10) {
delete this.onEnterFrame;
}
}
};
cancelBtn.press = function () {
hide();
};
Symbol 293 MovieClip Frame 1
stop();
Symbol 303 MovieClip Frame 1
function timeStart(_totalTime) {
t = (totalTime = _totalTime * 1000);
t0 = getTimer();
this.onEnterFrame = function () {
if (_parent.isPause) {
t0 = getTimer();
return(undefined);
}
var _local2 = getTimer();
if (!isPause) {
t = t - (_local2 - t0);
if (t <= 0) {
t = 0;
timeUp();
}
update();
}
t0 = _local2;
};
}
function addTime(dT) {
if (isPause) {
return(undefined);
}
t = t + (dT * 1000);
if (t > totalTime) {
t = totalTime;
}
}
function timeStop(Void) {
delete this.onEnterFrame;
}
function timeUp(Void) {
this.gotoAndStop(this._totalframes);
timeStop();
onTimeUp();
}
function pause(Void) {
isPause = true;
}
function resume(Void) {
isPause = false;
}
function timeToScore(Void) {
this.onEnterFrame = function () {
t = t - 500;
if (t <= 0) {
delete this.onEnterFrame;
onFinishTimeToScore();
}
update(true);
onTimeToScore(0.25);
};
}
function update(force) {
ft = Math.round((1 - (t / totalTime)) * this._totalframes);
if (force) {
this.gotoAndStop(ft);
} else if (this._currentframe < ft) {
this.nextFrame();
} else if (this._currentframe > ft) {
this.prevFrame();
}
}
stop();
var totalTime;
var t;
var t0;
var onTimeUp;
var onTimeToScore;
var onFinishTimeToScore;
var isPause = false;
Symbol 307 MovieClip Frame 1
var a = 0;
hand.onEnterFrame = function () {
if (_parent._parent.isPause) {
return(undefined);
}
if ((a++) >= 360) {
a = 360;
delete this.onEnterFrame;
onTimeUp();
}
this._rotation = a;
};
Symbol 308 MovieClip Frame 1
function jumpOut(Void) {
this.gotoAndPlay(2);
}
stop();
Symbol 308 MovieClip Frame 17
stop();
clock.onTimeUp = function () {
onTimeUp();
play();
};
Symbol 311 MovieClip Frame 1
function effect(Void) {
gotoAndPlay (2);
}
stop();
var onEffect;
Symbol 311 MovieClip Frame 20
stop();
onEffect();
Symbol 324 MovieClip Frame 1
stop();
Symbol 344 MovieClip Frame 1
function effect(Void) {
gotoAndPlay (2);
}
stop();
var onEffect;
Symbol 344 MovieClip Frame 128
stop();
onEffect();
Symbol 345 MovieClip Frame 1
function show(xyArr) {
if (xyArr.length == 4) {
rec1._x = xyArr[0] * dw;
rec1._y = xyArr[1] * dh;
rec2._x = xyArr[2] * dw;
rec2._y = xyArr[3] * dh;
} else {
hide();
}
}
function hide(Void) {
rec1._x = -10000;
rec2._x = -10000;
}
dw = _parent.dw;
dh = _parent.dh;
hide();
Symbol 360 MovieClip Frame 1
function addItemByValue(value, x, y) {
var _local5 = itemArea.getNextHighestDepth();
var _local4 = itemArea.attachMovie("item_item", "item" + _local5, _local5, {_x:x, _y:y});
if (typeof(value) == "number") {
_local4.name = _parent.itemList[value];
} else {
_local4.name = value;
}
_local4.gotoAndStop(_local4.name);
if ((++totalGet) >= 5) {
_parent.shoppingEnabled(false);
}
cm.addNode(_local4);
itemList.push(_local4.name);
_local4.press = function () {
run(this.name);
if (_parent == _root) {
currentItem = this;
} else {
reomveCurrentItem(this);
}
};
}
function setEnabled(value) {
var _local1;
for (var _local3 in itemArea) {
_local1 = itemArea[_local3];
if (typeof(_local1) == "movieclip") {
Common.setEnabled(_local1, value, 0.2);
}
}
}
function reomveCurrentItem(item) {
if (item == undefined) {
item = currentItem;
}
totalGet--;
_parent.shoppingEnabled(true);
itemList.splice(cm.getIndex(item), 1);
cm.removeNode(item);
}
var itemList = new Array();
var run;
var cm = new ChainMov(0, 30);
var totalItem = _parent.itemList.length;
var totalGet = 0;
var i = 0;
while (i < totalItem) {
addItemByValue(_parent.itemList[i]);
i++;
}
var currentItem;
Symbol 361 MovieClip Frame 2
function error(Void) {
t = 0;
dScore = 2;
timer.addTime(-1);
}
function stageClear(Void) {
_parent.fwgCtrl.enabledAll(false, false);
stageClear_mc.effect();
stageClear_mc.onEffect = function () {
timer.timeToScore();
};
}
function effect(m1, m2, points) {
var _local3 = getTimer();
if ((_local3 - t) < 1000) {
dScore = dScore * 2;
if (dScore > 16) {
dScore = 16;
}
} else {
dScore = 2;
}
coins = coins + dScore;
score = score + dScore;
coinsNums.update(coins);
scoreNums.update(score);
t = _local3;
timer.addTime(1);
var _local2 = others.getNextHighestDepth();
var _local1 = others.attachMovie("effect_mc", "effect" + _local2, _local2, {m1x:m1._x, m1y:m1._y, m2x:m2._x, m2y:m2._y, f1:m1.value, f2:m2.value, dScore:dScore});
_local1.points = points;
_local1.dw = dw;
_local1.dh = dh;
_local1.onEffect = function () {
onEffect();
};
}
function disorder(Void) {
kyodai.onDisorder = function () {
for (var _local2 in mArea) {
var _local1 = mArea[_local2];
if (typeof(_local1) == "movieclip") {
_local1.resetValue(kyodai.map[_local1.y][_local1.x]);
}
}
};
kyodai.disorder();
}
function pause(value, showMask) {
if (showMask == undefined) {
showMask = true;
}
if (value == undefined) {
isPause = !isPause;
} else if (value) {
isPause = true;
} else {
isPause = false;
}
if (isPause) {
if (showMask) {
pauseMask.nextFrame();
}
} else if (showMask) {
pauseMask.prevFrame();
}
return(isPause);
}
function moonEffect() {
_parent.effect_moon.effect();
_parent.effect_moon.onEarthquake = function (flag) {
var _local7 = 0;
for (var _local9 in mArea) {
var _local1 = mArea[_local9];
if (typeof(_local1) == "movieclip") {
if (flag || (random(100) < 50)) {
var _local2 = others.getNextHighestDepth();
score = score + 4;
coins = coins + 4;
coinsNums.update(coins);
scoreNums.update(score);
others.attachMovie("popUp_effect", "popUp" + _local2, _local2, {_x:_local1._x, _y:_local1._y, value:_local1.value, coin:4});
_local1.removeMovieClip();
} else {
_local7++;
}
}
}
if (flag || (_local7 == 0)) {
stageClear();
return(true);
}
return(false);
};
_parent.fwgCtrl.enabledAll(false, false);
}
stop();
var stageNums = new Nums(stageNums_mc, 4, _parent.stageNum);
var scoreNums = new Nums(scoreNums_mc, 4, score);
var coinsNums = new Nums(coinsNums_mc, 4, coins);
trace("time=" + time);
timer.timeStart(time);
timer.onTimeToScore = function (dScore) {
score = score + dScore;
scoreNums.update(int(score));
};
timer.onFinishTimeToScore = function (Void) {
score = int(score);
onStageClear(score, coins, items_mc.itemList);
};
timer.onTimeUp = function () {
_parent.fwgCtrl.enabledAll(false, false);
timeUp_mc.effect();
timeUp_mc.onEffect = function () {
onTimeUp(score);
};
};
items_mc.run = function (itemName) {
trace(itemName);
switch (itemName) {
case "\u5E2E\u52A9" :
help_mc._visible = true;
item_clock.jumpOut();
items_mc.setEnabled(false);
item_clock.onTimeUp = function () {
help_mc._visible = false;
items_mc.setEnabled(true);
items_mc.finishRun();
};
break;
case "\u5B9A\u65F6" :
timer.pause();
item_clock.jumpOut();
items_mc.setEnabled(false);
item_clock.onTimeUp = function () {
timer.resume();
items_mc.setEnabled(true);
items_mc.finishRun();
};
break;
case "\u6253\u4E71" :
disorder();
break;
case "\u7A7F\u900F" :
crossAble = true;
item_clock.jumpOut();
items_mc.setEnabled(false);
item_clock.onTimeUp = function () {
crossAble = false;
items_mc.setEnabled(true);
items_mc.finishRun();
};
break;
case "\u6708\u7403" :
moonEffect();
}
};
var dw = 50;
var dh = 50;
var kyodai = new Kyodai(map, 25, typeNum);
var t = 0;
var dScore = 2;
var onEffect;
var isPause = false;
help_mc._visible = false;
var crossAble = false;
kyodai.onGameOver = function () {
stageClear();
};
var currentM;
var y = 0;
while (y < kyodai.h) {
var x = 0;
while (x < kyodai.w) {
if (kyodai.map[y][x] > 0) {
var m = mArea.attachMovie("m", (("m" + y) + "_") + x, (y * kyodai.w) + x, {x:x, y:y, _x:x * dw, _y:y * dh, value:kyodai.map[y][x]});
m.rollOver = function () {
help_mc.show(kyodai.getHelp(this.value, this.x, this.y));
};
m.rollOut = function () {
help_mc.hide();
};
m.press = function () {
help_mc.hide();
if (currentM == undefined) {
currentM = this;
this.select();
} else if (currentM == this) {
currentM.unselect();
currentM = undefined;
} else if (kyodai.equal(this.x, this.y, currentM.x, currentM.y)) {
var _local2;
_local2 = kyodai.getPoints(this.x, this.y, currentM.x, currentM.y);
if (crossAble || (_local2.length > 0)) {
kyodai.remove(this.x, this.y, currentM.x, currentM.y);
energyBar.setValue(10);
effect(this, currentM, _local2);
this.removeMovieClip();
currentM.removeMovieClip();
if (!kyodai.check()) {
disorder();
}
currentM.unselect();
currentM = undefined;
} else {
error();
currentM.unselect();
currentM = this;
this.select();
}
} else {
error();
currentM.unselect();
currentM = this;
this.select();
}
};
}
x++;
}
y++;
}
onEffect = function () {
};
energyBar.onEffect = function () {
moonEffect();
};
Symbol 367 MovieClip Frame 1
function swing(_v) {
if (swinging) {
return(undefined);
}
v = _v;
this.onEnterFrame = function () {
var _local2 = 100 - this._xscale;
v = v + (_local2 * 0.2);
v = v * 0.8;
this._xscale = this._xscale + v;
this._yscale = this._yscale - v;
if (((_local2 * _local2) < 1) && ((v * v) < 1)) {
delete this.onEnterFrame;
swinging = false;
this._xscale = (this._yscale = 100);
}
};
}
var v = 0;
var swinging;
this.onRollOver = function () {
swing(10);
rollOver();
};
this.onRollOut = function () {
rollOut();
};
this.onPress = function () {
press();
};
Symbol 369 MovieClip Frame 1
function swing(_v) {
if (swinging) {
return(undefined);
}
v = _v;
this.onEnterFrame = function () {
var _local2 = 100 - this._xscale;
v = v + (_local2 * 0.2);
v = v * 0.8;
this._xscale = this._xscale + v;
this._yscale = this._yscale - v;
if (((_local2 * _local2) < 1) && ((v * v) < 1)) {
delete this.onEnterFrame;
swinging = false;
this._xscale = (this._yscale = 100);
}
};
}
var v = 0;
var swinging;
this.onRollOver = function () {
swing(10);
rollOver();
};
this.onRollOut = function () {
rollOut();
};
this.onPress = function () {
press();
};
Symbol 381 MovieClip Frame 1
function hide(Void) {
gotoAndStop (2);
onHide();
}
function show(Void) {
gotoAndStop (3);
}
function addItemByValue(value) {
var _local3 = this.getNextHighestDepth();
var _local2 = this.attachMovie("saveList_item", "item" + _local3, _local3, {_x:newBtn._x, _y:newBtn._y});
if (typeof(value) == "number") {
_local2.txt = cis.read(value).fileName;
} else {
_local2.txt = value;
}
_local2.press = function () {
mainSu.fileName = fn_txt.text;
cis.save(mainSu, null, null, null, null, null, cm.getIndex(this) + 1);
hide();
};
_local2.del = function () {
newBtn._visible = true;
cis.del(cm.getIndex(this) + 1);
cm.removeNode(this);
};
cm.addNode(_local2);
}
gotoAndStop (2);
var cis = _parent.cis;
Symbol 381 MovieClip Frame 2
for (var each in this) {
this[each].removeMovieClip();
}
cm = undefined;
Symbol 381 MovieClip Frame 3
var cm = new ChainMov(0, 30);
var mainSu = _parent.mainSu;
var i = 1;
while (i <= cis.totalFile) {
addItemByValue(i);
i++;
}
cm.addNode(newBtn);
newBtn.txt = "New File";
if (cis.totalFile >= 5) {
newBtn._visible = false;
}
newBtn.press = function (Void) {
mainSu.fileName = fn_txt.text;
cis.save(mainSu);
hide();
};
fn_txt.text = mainSu.fileName;
snTxt.txt = mainSu.stageNum;
sTxt.txt = mainSu.score;
cTxt.txt = mainSu.coins;
cancleBtn.txt = "Cancle";
cancleBtn.press = function () {
hide();
};
Symbol 383 MovieClip Frame 1
function swing(_v) {
if (swinging) {
return(undefined);
}
v = _v;
this.onEnterFrame = function () {
var _local2 = 100 - this._xscale;
v = v + (_local2 * 0.2);
v = v * 0.8;
this._xscale = this._xscale + v;
this._yscale = this._yscale - v;
if (((_local2 * _local2) < 1) && ((v * v) < 1)) {
delete this.onEnterFrame;
swinging = false;
this._xscale = (this._yscale = 100);
}
};
}
var v = 0;
var swinging;
this.onRollOver = function () {
swing(10);
rollOver();
};
this.onRollOut = function () {
rollOut();
};
this.onPress = function () {
press();
};
Symbol 393 Button
on (rollOver) {
rollOver();
gotoAndPlay ("show");
}
on (rollOut) {
rollOut();
gotoAndPlay ("hide");
}
on (press) {
press();
gotoAndPlay ("hide");
}
Symbol 394 MovieClip Frame 1
stop();
hitRec._width = txt_mc.labelTxt.textWidth * 0.7;
Symbol 394 MovieClip Frame 9
stop();
Symbol 405 MovieClip Frame 1
function effect(Void) {
gotoAndPlay (2);
}
stop();
Symbol 405 MovieClip Frame 4
onEffect();
Symbol 405 MovieClip Frame 7
onUp();
Symbol 406 MovieClip Frame 1
function effect(Void) {
gotoAndStop (2);
}
function earthquake(flag) {
delayTime = 4;
this.onEnterFrame = function () {
if ((--delayTime) > 0) {
if ((game._x == x0) && (game._y == y0)) {
game._x = game._x + ((Math.random() - 0.5) * 10);
game._y = game._y + ((Math.random() - 0.5) * 10);
} else {
game._x = game._x + ((x0 - game._x) * (1 + Math.random()));
game._y = game._y + ((y0 - game._y) * (1 + Math.random()));
}
} else {
game._x = x0;
game._y = y0;
}
};
if (onEarthquake(flag)) {
onEffect();
hammer_mc.onUp = function () {
gotoAndStop (1);
};
}
}
stop();
Mouse.show();
delete this.onMouseDown;
var onEffect;
var onEarthquake;
var game = _parent.game;
var x0 = game._x;
var y0 = game._y;
var delayTime = 0;
Symbol 406 MovieClip Frame 2
var totalHit = 0;
Mouse.hide();
hammer_mc._x = _xmouse;
hammer_mc._y = _ymouse;
hammer_mc.startDrag(true);
this.onMouseDown = function () {
if (hammer_mc._currentframe == 1) {
hammer_mc.effect();
if ((++totalHit) < 4) {
hammer_mc.onEffect = function () {
earthquake();
};
} else {
hammer_mc.onEffect = function () {
earthquake(true);
};
}
}
};
Symbol 412 Button
on (release) {
gotoAndStop ("submit");
}
Symbol 417 Button
on (release) {
gotoAndStop (1);
}
Symbol 426 Button
on (release) {
gotoAndStop ("submited");
}
Symbol 431 Button
on (release) {
viewHighscore();
}
Symbol 432 MovieClip Frame 1
stop();
_global.game_name = _game_name;
var highscore = eval (score_var);
_global.viewHighscore = function () {
getURL ("http://www.freeworldgroup.com/score/index.asp?game=" + game_name, "_blank");
};
if (highscore == 0) {
this._visible = false;
}
trace(game_name);
trace(highscore);
trace("http://www.freeworldgroup.com/score/index.asp?game=" + game_name);
Symbol 432 MovieClip Frame 3
function sendData() {
send_var.game = game_name;
send_var.score = highscore;
send_var.name = name_txt.text;
if (send_var.name == "") {
send_var.name = "guest" + int(Math.random() * 1000);
}
send_var.sendAndLoad("http://www.freeworldgroup.com/score/score.asp", load_var, "POST");
gotoAndStop ("sending");
}
stop();
name_txt.text = "";
gold_txt.text = highscore;
send_var = new LoadVars();
load_var = new LoadVars();
ok_btn.onRelease = sendData;
load_var.onLoad = function () {
gotoAndStop ("done");
};
Instance of Symbol 414 MovieClip in Symbol 432 MovieClip Frame 3
on (release) {
}
Symbol 444 MovieClip Frame 1
function swing(_v) {
if (swinging) {
return(undefined);
}
v = _v;
this.onEnterFrame = function () {
var _local2 = 100 - this._xscale;
v = v + (_local2 * 0.2);
v = v * 0.8;
this._xscale = this._xscale + v;
this._yscale = this._yscale - v;
if (((_local2 * _local2) < 1) && ((v * v) < 1)) {
delete this.onEnterFrame;
swinging = false;
this._xscale = (this._yscale = 100);
}
};
}
var v = 0;
var swinging;
this.onRollOver = function () {
swing(10);
rollOver();
};
this.onRollOut = function () {
rollOut();
};
this.onPress = function () {
press();
};
Symbol 445 MovieClip Frame 1
btn.icon_mc.gotoAndStop(name);
btn.press = function () {
press();
};
Symbol 447 MovieClip Frame 1
this.onPress = function () {
this.press();
};
Symbol 450 MovieClip Frame 1
function swing(_v) {
if (swinging) {
return(undefined);
}
v = _v;
this.onEnterFrame = function () {
var _local2 = 100 - this._xscale;
v = v + (_local2 * 0.2);
v = v * 0.8;
this._xscale = this._xscale + v;
this._yscale = this._yscale - v;
if (((_local2 * _local2) < 1) && ((v * v) < 1)) {
delete this.onEnterFrame;
swinging = false;
this._xscale = (this._yscale = 100);
}
};
}
var v = 0;
var swinging;
this.onRollOver = function () {
swing(10);
rollOver();
};
this.onRollOut = function () {
rollOut();
};
this.onPress = function () {
press();
};
Symbol 452 MovieClip Frame 1
function swing(_v) {
if (swinging) {
return(undefined);
}
v = _v;
this.onEnterFrame = function () {
var _local2 = 100 - this._xscale;
v = v + (_local2 * 0.2);
v = v * 0.8;
this._xscale = this._xscale + v;
this._yscale = this._yscale - v;
if (((_local2 * _local2) < 1) && ((v * v) < 1)) {
delete this.onEnterFrame;
swinging = false;
this._xscale = (this._yscale = 100);
}
};
}
var v = 0;
var swinging;
this.onRollOver = function () {
swing(10);
rollOver();
};
this.onRollOut = function () {
rollOut();
};
this.onPress = function () {
press();
};
Symbol 458 MovieClip Frame 1
function swing(_v) {
if (swinging) {
return(undefined);
}
v = _v;
this.onEnterFrame = function () {
var _local2 = 100 - this._xscale;
v = v + (_local2 * 0.2);
v = v * 0.8;
this._xscale = this._xscale + v;
this._yscale = this._yscale - v;
if (((_local2 * _local2) < 1) && ((v * v) < 1)) {
delete this.onEnterFrame;
swinging = false;
this._xscale = (this._yscale = 100);
}
};
}
var v = 0;
var swinging;
this.onRollOver = function () {
swing(10);
rollOver();
};
this.onRollOut = function () {
rollOut();
};
this.onPress = function () {
press();
};
Symbol 460 MovieClip Frame 1
function show(msg) {
trace(msg);
gotoAndStop(msg);
}
stop();
Symbol 460 MovieClip Frame 2
okBtn.press = function () {
gotoAndStop (1);
};
Symbol 460 MovieClip Frame 3
okBtn.press = function () {
gotoAndStop (1);
};
Symbol 460 MovieClip Frame 4
okBtn.press = function () {
gotoAndStop (1);
};
Symbol 460 MovieClip Frame 5
okBtn.press = function () {
gotoAndStop (1);
};
Symbol 460 MovieClip Frame 6
yBtn.txt = "YES";
yBtn.press = function () {
onConfirm(true);
gotoAndStop (1);
};
nBtn.txt = "NO";
nBtn.press = function () {
onConfirm(false);
gotoAndStop (1);
};
Symbol 505 MovieClip Frame 1
function swing(_v) {
if (swinging) {
return(undefined);
}
v = _v;
this.onEnterFrame = function () {
var _local2 = 100 - this._xscale;
v = v + (_local2 * 0.2);
v = v * 0.8;
this._xscale = this._xscale + v;
this._yscale = this._yscale - v;
if (((_local2 * _local2) < 1) && ((v * v) < 1)) {
delete this.onEnterFrame;
swinging = false;
this._xscale = (this._yscale = 100);
}
};
}
var v = 0;
var swinging;
this.onRollOver = function () {
swing(10);
rollOver();
};
this.onRollOut = function () {
rollOut();
};
this.onPress = function () {
press();
};
Symbol 517 MovieClip Frame 1
function show(Void) {
gotoAndPlay (2);
}
stop();
Symbol 531 MovieClip Frame 20
mouse_mc.show();
Symbol 531 MovieClip Frame 43
mouse_mc.show();
Symbol 531 MovieClip Frame 99
mouse_mc.show();
Symbol 531 MovieClip Frame 121
mouse_mc.show();
Symbol 531 MovieClip Frame 177
mouse_mc.show();
Symbol 531 MovieClip Frame 198
mouse_mc.show();
Symbol 531 MovieClip Frame 254
mouse_mc.show();
Symbol 531 MovieClip Frame 275
mouse_mc.show();
Symbol 531 MovieClip Frame 332
mouse_mc.show();
Symbol 531 MovieClip Frame 353
mouse_mc.show();
Symbol 531 MovieClip Frame 410
mouse_mc.show();
Symbol 531 MovieClip Frame 432
mouse_mc.show();
Symbol 531 MovieClip Frame 500
mouse_mc.show();
Symbol 531 MovieClip Frame 523
mouse_mc.show();
Symbol 531 MovieClip Frame 619
mouse_mc.show();
Symbol 531 MovieClip Frame 641
mouse_mc.show();
Symbol 531 MovieClip Frame 697
mouse_mc.show();
Symbol 531 MovieClip Frame 718
mouse_mc.show();
Symbol 531 MovieClip Frame 774
mouse_mc.show();
Symbol 531 MovieClip Frame 795
mouse_mc.show();