Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
MochiAd.showPreGameAd({id:"a9e738e568f0e1f2", res:"550x400"});
__com_mochibot__("fa4a1a6e", this, 10301, true);
mochi.MochiServices.connect("a9e738e568f0e1f2");
Stage.showMenu = false;
Frame 2
stop();
Frame 3
stop();
Frame 4
_global.user_id = 0;
if (v_id != undefined) {
_global.user_id = v_id;
}
_global.user_name = "Visitor";
if (v_nm != undefined) {
_global.user_name = v_nm;
}
welcome.text = ("Welcome " + _global.user_name) + "";
hud.scoreSent.text = "";
btnBack.onRelease = function () {
gotoAndStop ("inGame");
};
btnPlay._alpha = 100;
btnPlay.enabled = true;
btnBack.onLoad = function () {
btnBack._alpha = 0;
btnBack.enabled = false;
};
if (game.htpFunction == 1) {
btnPlay._x = -1000;
btnBack._alpha = 100;
btnBack.enabled = true;
}
btnPlay.onRelease = function () {
gotoAndStop ("inGame");
game.htpFunction = 2;
};
Instance of Symbol 366 MovieClip [Board] "board" in Frame 4
//component parameters
onClipEvent (construct) {
cols = 8;
contentID = "";
rows = 8;
tileID = "Tile";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 360 MovieClip [Game] "game" in Frame 4
//component parameters
onClipEvent (construct) {
extensionScoreBase = 3000;
extensionScoreDelta = 100;
extensionScoreDeltaBreak = 400;
extensionSeconds = 20;
foodPerTint = 3;
initialSeconds = 25;
levelBreak = 6;
matchScore = [];
matchScore[0] = 100;
matchScore[1] = 200;
matchScore[2] = 300;
matchScore[3] = 400;
matchScore[4] = 500;
matchScore[5] = 600;
matchScore[6] = 700;
mismatchPenalty = [];
mismatchPenalty[0] = 100;
mismatchPenalty[1] = 200;
mismatchPenalty[2] = 300;
mismatchPenalty[3] = 400;
mismatchPenalty[4] = 500;
mismatchPenalty[5] = 600;
mismatchPenalty[6] = 700;
visible = true;
minHeight = 0;
minWidth = 0;
}
Frame 5
hud.scoreSent.text = "";
if ((game.isPaused == false) && (game.isPlay == false)) {
btnPlay._alpha = 100;
btnPlay.enabled = true;
btnReset._alpha = 0;
btnReset.enabled = false;
hud.btnPause._alpha = 0;
hud.btnPause.btnPause.enabled = false;
} else if ((game.isPaused == false) && (game.isPlay == true)) {
btnPlay._alpha = 0;
btnPlay.enabled = false;
hud.btnPause._alpha = 100;
hud.btnPause.btnPause.enabled = true;
btnReset._alpha = 100;
btnReset.enabled = true;
} else if ((game.isPaused == true) && (game.isPlay == true)) {
btnPlay._alpha = 0;
btnPlay.enabled = false;
hud.btnPause._alpha = 100;
hud.btnPause.btnPause.enabled = true;
btnReset._alpha = 100;
btnReset.enabled = true;
}
hud.btnHow.enabled = true;
hud.btnHow._alpha = 100;
btnDEasy._alpha = 0;
btnDEasy.enabled = false;
btnDNormal._alpha = 0;
btnDNormal.enabled = false;
btnDHard._alpha = 0;
btnDHard.enabled = false;
if (btnDEasy._x > 0) {
btnDEasy._x = btnDEasy._x - 300;
}
if (btnDNormal._x > 0) {
btnDNormal._x = btnDNormal._x - 300;
}
if (btnDHard._x > 0) {
btnDHard._x = btnDHard._x - 300;
}
if (game.isOver == true) {
hud.gameOver._alpha = 100;
hud.btnPause._alpha = 0;
hud.btnPause.btnPause.enabled = false;
if (game.isScore == false) {
if ((_global.user_id != 0) and (_global.user_id != undefined)) {
hud.btnScore._alpha = 100;
hud.btnScore.enabled = true;
}
}
}
if (game.isScore == false) {
hud.sendScore._alpha = 0;
hud.sendScore.btnScore._alpha = 0;
hud.sendScore.btnScore.enabled = false;
hud.sendScore.playerName.text = "";
hud.sendScore.playerName._x = hud.sendScore.playerName._x - 1000;
}
btnPlay.onRelease = function () {
hud.scoreSent.text = "";
game.isPaused = true;
hud.btnPause._alpha = 0;
hud.btnPause.btnPause.enabled = false;
hud.btnScore._alpha = 0;
hud.btnScore.enabled = false;
btnReset._alpha = 0;
btnReset.enabled = false;
hud.btnHow._alpha = 0;
hud.btnHow.enabled = false;
hud.btnHScore._alpha = 0;
hud.btnHScore.enabled = false;
hud.gameOver._alpha = 0;
hud.sendScore._alpha = 0;
btnDEasy._alpha = 100;
btnDEasy.enabled = true;
btnDNormal._alpha = 100;
btnDNormal.enabled = true;
btnDHard._alpha = 100;
btnDHard.enabled = true;
btnDEasy._x = btnDEasy._x + 300;
btnDNormal._x = btnDNormal._x + 300;
btnDHard._x = btnDHard._x + 300;
btnReset._alpha = 100;
btnReset.enabled = true;
btnPlay._alpha = 0;
btnPlay.enabled = false;
game.htpFunction = 1;
};
hud.btnHow.onRelease = function () {
hud.btnHow._alpha = 0;
hud.btnHow.enabled = false;
hud.btnPause._alpha = 0;
hud.btnPause.btnPause.enabled = false;
hud.btnScore._alpha = 0;
hud.btnScore.enabled = false;
hud.gameOver._alpha = 0;
if (game.isPlay == true) {
game.isPaused = true;
hud.btnPause.gotoAndStop("restart");
}
gotoAndStop ("howToPlay");
hud.scoreSent.text = "";
};
hud.btnHScore.onRelease = function () {
getURL ("http://www.cuaticgames.com/", _blank);
};
hud.sendScore.btnScore.onRelease = function () {
hud.sendScore._alpha = 0;
hud.sendScore.btnScore._alpha = 0;
hud.sendScore.btnScore.enabled = false;
hud.btnHow._alpha = 100;
hud.btnHow.enabled = true;
btnReset._alpha = 100;
btnReset.enabled = true;
game.submitScore(hud.sendScore.playerName.text);
hud.sendScore.playerName.text = "";
hud.sendScore.playerName._x = hud.sendScore.playerName._x - 1000;
game.isScore = true;
};
hud.btnScore.onRelease = function () {
hud.scoreSent.text = "Score Sent!";
hud.btnScore._alpha = 0;
hud.btnScore.enabled = false;
_global.user_name = "Visitor";
_global.user_id = 0;
if (v_id != undefined) {
_global.user_id = v_id;
}
if (v_nm != undefined) {
_global.user_name = v_nm;
}
userx.name_txt.text = ("- " + _global.user_name) + " -";
if (_global.user_id != 0) {
scoreboard_lv = new LoadVars();
scoreboard_lv.l = game.difficulty - 1;
scoreboard_lv.n = _global.user_name;
scoreboard_lv.i = _global.user_id;
scoreboard_lv.s = game.score;
scoreboard_lv.u = this._url;
scoreboard_lv.g = "6716";
scoreboard_lv.sendAndLoad("http://www.arcadepod.com/xpro/game_score.php", scoreboard_lv, "POST");
}
};
btnReset.onRelease = function () {
hud.scoreSent.text = "";
game.isPaused = true;
hud.btnPause._alpha = 0;
hud.btnPause.btnPause.enabled = false;
hud.btnScore._alpha = 0;
hud.btnScore.enabled = false;
btnReset._alpha = 0;
btnReset.enabled = false;
hud.btnHow._alpha = 0;
hud.btnHow.enabled = false;
hud.btnHScore._alpha = 0;
hud.btnHScore.enabled = false;
hud.gameOver._alpha = 0;
hud.sendScore._alpha = 0;
btnDEasy._alpha = 100;
btnDEasy.enabled = true;
btnDNormal._alpha = 100;
btnDNormal.enabled = true;
btnDHard._alpha = 100;
btnDHard.enabled = true;
btnDEasy._x = btnDEasy._x + 300;
btnDNormal._x = btnDNormal._x + 300;
btnDHard._x = btnDHard._x + 300;
};
btnDNormal.onRelease = function () {
game.initialSeconds = 30;
game.extensionSeconds = 25;
game.extensionScoreBase = 3000;
game.extensionScoreDelta = 600;
game.extensionScoreDeltaBreak = 1200;
game.restartGame(hud, board, background);
game.isOver = false;
hud.btnPause.gotoAndStop("pause");
game.isPaused = false;
hud.btnPause._alpha = 100;
hud.btnPause.btnPause.enabled = true;
hud.btnScore._alpha = 0;
hud.btnScore.enabled = false;
game.isScore = false;
btnReset._alpha = 100;
btnReset.enabled = true;
hud.btnHow.enabled = true;
hud.btnHow._alpha = 100;
btnDEasy._alpha = 0;
btnDEasy.enabled = false;
btnDNormal._alpha = 0;
btnDNormal.enabled = false;
btnDHard._alpha = 0;
btnDHard.enabled = false;
btnDEasy._x = btnDEasy._x - 300;
btnDNormal._x = btnDNormal._x - 300;
btnDHard._x = btnDHard._x - 300;
hud.timePlus.valueField.valueA.text = "+" + game.extensionSeconds;
hud.timePlus.valueField.valueB.text = "+" + game.extensionSeconds;
game.difficulty = 2;
};
btnDEasy.onRelease = function () {
game.initialSeconds = 35;
game.extensionSeconds = 30;
game.extensionScoreBase = 3000;
game.extensionScoreDelta = 200;
game.extensionScoreDeltaBreak = 400;
game.restartGame(hud, board, background);
game.isOver = false;
hud.btnPause.gotoAndStop("pause");
game.isPaused = false;
hud.btnPause._alpha = 100;
hud.btnPause.btnPause.enabled = true;
hud.btnScore._alpha = 0;
hud.btnScore.enabled = false;
game.isScore = false;
btnReset._alpha = 100;
btnReset.enabled = true;
hud.btnHow.enabled = true;
hud.btnHow._alpha = 100;
btnDEasy._alpha = 0;
btnDEasy.enabled = false;
btnDNormal._alpha = 0;
btnDNormal.enabled = false;
btnDHard._alpha = 0;
btnDHard.enabled = false;
btnDEasy._x = btnDEasy._x - 300;
btnDNormal._x = btnDNormal._x - 300;
btnDHard._x = btnDHard._x - 300;
hud.timePlus.valueField.valueA.text = "+" + game.extensionSeconds;
hud.timePlus.valueField.valueB.text = "+" + game.extensionSeconds;
game.difficulty = 1;
};
btnDHard.onRelease = function () {
game.initialSeconds = 25;
game.extensionSeconds = 20;
game.extensionScoreBase = 3000;
game.extensionScoreDelta = 600;
game.extensionScoreDeltaBreak = 1200;
game.restartGame(hud, board, background);
game.isOver = false;
hud.btnPause.gotoAndStop("pause");
game.isPaused = false;
hud.btnPause._alpha = 100;
hud.btnPause.btnPause.enabled = true;
hud.btnScore._alpha = 0;
hud.btnScore.enabled = false;
game.isScore = false;
btnReset._alpha = 100;
btnReset.enabled = true;
hud.btnHow.enabled = true;
hud.btnHow._alpha = 100;
btnDEasy._alpha = 0;
btnDEasy.enabled = false;
btnDNormal._alpha = 0;
btnDNormal.enabled = false;
btnDHard._alpha = 0;
btnDHard.enabled = false;
btnDEasy._x = btnDEasy._x - 300;
btnDNormal._x = btnDNormal._x - 300;
btnDHard._x = btnDHard._x - 300;
hud.timePlus.valueField.valueA.text = "+" + game.extensionSeconds;
hud.timePlus.valueField.valueB.text = "+" + game.extensionSeconds;
game.difficulty = 3;
};
if (game.htpFunction == 2) {
game.isPaused = true;
hud.btnPause._alpha = 0;
hud.btnPause.btnPause.enabled = false;
hud.btnScore._alpha = 0;
hud.btnScore.enabled = false;
btnReset._alpha = 0;
btnReset.enabled = false;
hud.btnHow._alpha = 0;
hud.btnHow.enabled = false;
hud.btnHScore._alpha = 0;
hud.btnHScore.enabled = false;
hud.gameOver._alpha = 0;
hud.sendScore._alpha = 0;
btnDEasy._alpha = 100;
btnDEasy.enabled = true;
btnDNormal._alpha = 100;
btnDNormal.enabled = true;
btnDHard._alpha = 100;
btnDHard.enabled = true;
btnDEasy._x = btnDEasy._x + 300;
btnDNormal._x = btnDNormal._x + 300;
btnDHard._x = btnDHard._x + 300;
btnReset._alpha = 100;
btnReset.enabled = true;
btnPlay._alpha = 0;
btnPlay.enabled = false;
game.htpFunction = 1;
}
Symbol 67 MovieClip [foodCoin] Frame 1
#initclip 37
Object.registerClass("foodCoin", Coin);
#endinitclip
stop();
Symbol 67 MovieClip [foodCoin] Frame 2
stop();
Symbol 67 MovieClip [foodCoin] Frame 3
stop();
Symbol 67 MovieClip [foodCoin] Frame 4
stop();
Symbol 67 MovieClip [foodCoin] Frame 5
stop();
Symbol 67 MovieClip [foodCoin] Frame 6
stop();
Symbol 67 MovieClip [foodCoin] Frame 7
stop();
Symbol 67 MovieClip [foodCoin] Frame 8
stop();
Symbol 67 MovieClip [foodCoin] Frame 9
stop();
Symbol 67 MovieClip [foodCoin] Frame 10
stop();
Symbol 67 MovieClip [foodCoin] Frame 11
stop();
Symbol 68 MovieClip [coinEffect] Frame 1
#initclip 32
Object.registerClass("coinEffect", CoinEffect);
#endinitclip
Symbol 70 MovieClip [coin] Frame 1
#initclip 33
Object.registerClass("coin", Coin);
#endinitclip
Symbol 79 MovieClip Frame 1
stop();
Symbol 79 MovieClip Frame 7
stop();
Symbol 80 MovieClip [Background] Frame 1
stop();
Symbol 80 MovieClip [Background] Frame 5
fadeFinished();
Symbol 121 MovieClip [Avatar] Frame 1
#initclip 28
Object.registerClass("Avatar", Avatar);
#endinitclip
Symbol 121 MovieClip [Avatar] Frame 5
animationFinished();
Symbol 121 MovieClip [Avatar] Frame 10
animationFinished();
Symbol 121 MovieClip [Avatar] Frame 15
animationFinished();
Symbol 121 MovieClip [Avatar] Frame 20
animationFinished();
Symbol 142 MovieClip Frame 5
stop();
Symbol 144 Button
on (release) {
if (page < 4) {
page++;
gotoAndStop(page);
}
}
Symbol 150 MovieClip Frame 5
stop();
Symbol 151 Button
on (release) {
if (page > 1) {
page--;
gotoAndStop(page);
}
}
Symbol 212 MovieClip [Food] Frame 1
#initclip 29
Object.registerClass("Food", Food);
#endinitclip
Symbol 223 Button
on (release) {
if (page < 6) {
page++;
gotoAndStop(page);
}
}
Symbol 227 Button
on (release) {
if (page > 1) {
page--;
gotoAndStop(page);
}
}
Symbol 228 MovieClip [instructions] Frame 1
stop();
page = 1;
btPrevious._alpha = 0;
btPrevious.enabled = false;
Instance of Symbol 121 MovieClip [Avatar] in Symbol 228 MovieClip [instructions] Frame 1
//component parameters
onClipEvent (construct) {
direction = "left";
tint = 1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 228 MovieClip [instructions] Frame 2
btPrevious._alpha = 100;
btPrevious.enabled = true;
btNext._alpha = 100;
btNext.enabled = true;
Instance of Symbol 212 MovieClip [Food] in Symbol 228 MovieClip [instructions] Frame 2
//component parameters
onClipEvent (construct) {
tint = 1;
value = 1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 212 MovieClip [Food] in Symbol 228 MovieClip [instructions] Frame 2
//component parameters
onClipEvent (construct) {
tint = 3;
value = 1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 212 MovieClip [Food] in Symbol 228 MovieClip [instructions] Frame 2
//component parameters
onClipEvent (construct) {
tint = 5;
value = 2;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 212 MovieClip [Food] in Symbol 228 MovieClip [instructions] Frame 2
//component parameters
onClipEvent (construct) {
tint = 2;
value = 3;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 212 MovieClip [Food] in Symbol 228 MovieClip [instructions] Frame 2
//component parameters
onClipEvent (construct) {
tint = 1;
value = 2;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 212 MovieClip [Food] in Symbol 228 MovieClip [instructions] Frame 2
//component parameters
onClipEvent (construct) {
tint = 2;
value = 1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 228 MovieClip [instructions] Frame 3
btPrevious._alpha = 100;
btPrevious.enabled = true;
btNext._alpha = 100;
btNext.enabled = true;
Symbol 228 MovieClip [instructions] Frame 4
btNext._alpha = 0;
btNext.enabled = false;
Symbol 233 MovieClip [timeSum] Frame 1
#initclip 34
Object.registerClass("timeSum", TimeSumEffect);
#endinitclip
stop();
Symbol 233 MovieClip [timeSum] Frame 26
gotoAndStop ("blank");
Symbol 236 MovieClip [bgTime] Frame 1
stop();
Symbol 236 MovieClip [bgTime] Frame 20
gotoAndStop (1);
Symbol 236 MovieClip [bgTime] Frame 31
gotoAndStop (1);
Symbol 240 MovieClip [scorePenalty] Frame 1
stop();
Symbol 240 MovieClip [scorePenalty] Frame 26
gotoAndStop ("blank");
Symbol 244 MovieClip Frame 1
stop();
Symbol 244 MovieClip Frame 20
gotoAndStop (1);
Symbol 244 MovieClip Frame 39
gotoAndStop (1);
Symbol 280 MovieClip Frame 5
stop();
Symbol 289 MovieClip Frame 5
stop();
Symbol 296 MovieClip Frame 5
stop();
Symbol 298 MovieClip Frame 1
stop();
btnPause.onRelease = function () {
gotoAndStop ("restart");
_root.game.isPaused = true;
};
Symbol 298 MovieClip Frame 2
stop();
btnPause.onRelease = function () {
gotoAndStop ("pause");
_root.game.isPaused = false;
};
Symbol 304 MovieClip Frame 5
stop();
Symbol 311 MovieClip Frame 5
stop();
Symbol 313 MovieClip Frame 1
stop();
btnSound.onRelease = function () {
gotoAndStop ("soundOn");
_root.game.hud.soundAlarm.setVolume(0);
_root.game.hud.soundError.setVolume(0);
_root.game.hud.soundLevel.setVolume(0);
_root.game.hud.soundClock.setVolume(0);
};
Symbol 313 MovieClip Frame 2
stop();
btnSound.onRelease = function () {
gotoAndStop ("soundOff");
_root.game.hud.soundAlarm.setVolume(85);
_root.game.hud.soundError.setVolume(85);
_root.game.hud.soundLevel.setVolume(85);
_root.game.hud.soundClock.setVolume(85);
};
Symbol 322 MovieClip Frame 5
stop();
Symbol 332 MovieClip Frame 5
stop();
Symbol 342 MovieClip Frame 5
stop();
Symbol 343 Button
on (release) {
getURL ("http://www.arcadepod.com/", "_blank");
}
Symbol 352 MovieClip Frame 5
stop();
Symbol 353 Button
on (release) {
getURL ("http://www.arcadepod.com/free_games_for_website.php", "_blank");
}
Symbol 358 MovieClip [HUD] Frame 1
#initclip 35
Object.registerClass("HUD", HUD);
#endinitclip
Instance of Symbol 355 MovieClip in Symbol 358 MovieClip [HUD] Frame 1
on (release) {
getURL ("http://www.cuaticgames.com/", _blank);
}
Symbol 360 MovieClip [Game] Frame 1
#initclip 36
Object.registerClass("Game", Game);
#endinitclip
Symbol 362 MovieClip Frame 1
stop();
Symbol 363 MovieClip [Tile] Frame 1
#initclip 30
Object.registerClass("Tile", Tile);
#endinitclip
stop();
Symbol 363 MovieClip [Tile] Frame 5
animationFinished();
Symbol 366 MovieClip [Board] Frame 1
#initclip 31
Object.registerClass("Board", Board);
#endinitclip
Symbol 100 MovieClip [__Packages.mx.core.UIObject] Frame 0
class mx.core.UIObject extends MovieClip
{
var _width, _height, _x, _y, _parent, _minHeight, _minWidth, _visible, dispatchEvent, _xscale, _yscale, methodTable, onEnterFrame, tfList, __width, __height, moveTo, lineTo, createTextField, attachMovie, buildDepthTable, findNextAvailableDepth, idNames, childrenCreated, _name, createAccessibilityImplementation, _endInit, validateNow, hasOwnProperty, initProperties, stylecache, className, ignoreClassStyleDeclaration, _tf, fontFamily, fontSize, color, marginLeft, marginRight, fontStyle, fontWeight, textAlign, textIndent, textDecoration, embedFonts, styleName, enabled;
function UIObject () {
super();
constructObject();
}
function get width() {
return(_width);
}
function get height() {
return(_height);
}
function get left() {
return(_x);
}
function get x() {
return(_x);
}
function get top() {
return(_y);
}
function get y() {
return(_y);
}
function get right() {
return(_parent.width - (_x + width));
}
function get bottom() {
return(_parent.height - (_y + height));
}
function getMinHeight(Void) {
return(_minHeight);
}
function setMinHeight(h) {
_minHeight = h;
}
function get minHeight() {
return(getMinHeight());
}
function set minHeight(h) {
setMinHeight(h);
//return(minHeight);
}
function getMinWidth(Void) {
return(_minWidth);
}
function setMinWidth(w) {
_minWidth = w;
}
function get minWidth() {
return(getMinWidth());
}
function set minWidth(w) {
setMinWidth(w);
//return(minWidth);
}
function setVisible(x, noEvent) {
if (x != _visible) {
_visible = x;
if (noEvent != true) {
dispatchEvent({type:(x ? "reveal" : "hide")});
}
}
}
function get visible() {
return(_visible);
}
function set visible(x) {
setVisible(x, false);
//return(visible);
}
function get scaleX() {
return(_xscale);
}
function set scaleX(x) {
_xscale = x;
//return(scaleX);
}
function get scaleY() {
return(_yscale);
}
function set scaleY(y) {
_yscale = y;
//return(scaleY);
}
function doLater(obj, fn) {
if (methodTable == undefined) {
methodTable = new Array();
}
methodTable.push({obj:obj, fn:fn});
onEnterFrame = doLaterDispatcher;
}
function doLaterDispatcher(Void) {
delete onEnterFrame;
if (invalidateFlag) {
redraw();
}
var _local3 = methodTable;
methodTable = new Array();
if (_local3.length > 0) {
var _local2;
while (_local2 = _local3.shift() , _local2 != undefined) {
_local2.obj[_local2.fn]();
}
}
}
function cancelAllDoLaters(Void) {
delete onEnterFrame;
methodTable = new Array();
}
function invalidate(Void) {
invalidateFlag = true;
onEnterFrame = doLaterDispatcher;
}
function invalidateStyle(Void) {
invalidate();
}
function redraw(bAlways) {
if (invalidateFlag || (bAlways)) {
invalidateFlag = false;
var _local2;
for (_local2 in tfList) {
tfList[_local2].draw();
}
draw();
dispatchEvent({type:"draw"});
}
}
function draw(Void) {
}
function move(x, y, noEvent) {
var _local3 = _x;
var _local2 = _y;
_x = x;
_y = y;
if (noEvent != true) {
dispatchEvent({type:"move", oldX:_local3, oldY:_local2});
}
}
function setSize(w, h, noEvent) {
var _local3 = __width;
var _local2 = __height;
__width = w;
__height = h;
size();
if (noEvent != true) {
dispatchEvent({type:"resize", oldWidth:_local3, oldHeight:_local2});
}
}
function size(Void) {
_width = __width;
_height = __height;
}
function drawRect(x1, y1, x2, y2) {
moveTo(x1, y1);
lineTo(x2, y1);
lineTo(x2, y2);
lineTo(x1, y2);
lineTo(x1, y1);
}
function createLabel(name, depth, text) {
createTextField(name, depth, 0, 0, 0, 0);
var _local2 = this[name];
_local2._color = textColorList;
_local2._visible = false;
_local2.__text = text;
if (tfList == undefined) {
tfList = new Object();
}
tfList[name] = _local2;
_local2.invalidateStyle();
invalidate();
_local2.styleName = this;
return(_local2);
}
function createObject(linkageName, id, depth, initobj) {
return(attachMovie(linkageName, id, depth, initobj));
}
function createClassObject(className, id, depth, initobj) {
var _local3 = className.symbolName == undefined;
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className);
}
var _local4 = mx.core.UIObject(createObject(className.symbolOwner.symbolName, id, depth, initobj));
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className.symbolOwner);
}
return(_local4);
}
function createEmptyObject(id, depth) {
return(createClassObject(mx.core.UIObject, id, depth));
}
function destroyObject(id) {
var _local2 = this[id];
if (_local2.getDepth() < 0) {
var _local4 = buildDepthTable();
var _local5 = findNextAvailableDepth(0, _local4, "up");
var _local3 = _local5;
_local2.swapDepths(_local3);
}
_local2.removeMovieClip();
delete this[id];
}
function getSkinIDName(tag) {
return(idNames[tag]);
}
function setSkin(tag, linkageName, initObj) {
if (_global.skinRegistry[linkageName] == undefined) {
mx.skins.SkinElement.registerElement(linkageName, mx.skins.SkinElement);
}
return(createObject(linkageName, getSkinIDName(tag), tag, initObj));
}
function createSkin(tag) {
var _local2 = getSkinIDName(tag);
createEmptyObject(_local2, tag);
return(this[_local2]);
}
function createChildren(Void) {
}
function _createChildren(Void) {
createChildren();
childrenCreated = true;
}
function constructObject(Void) {
if (_name == undefined) {
return(undefined);
}
init();
_createChildren();
createAccessibilityImplementation();
_endInit();
if (validateNow) {
redraw(true);
} else {
invalidate();
}
}
function initFromClipParameters(Void) {
var _local4 = false;
var _local2;
for (_local2 in clipParameters) {
if (hasOwnProperty(_local2)) {
_local4 = true;
this["def_" + _local2] = this[_local2];
delete this[_local2];
}
}
if (_local4) {
for (_local2 in clipParameters) {
var _local3 = this["def_" + _local2];
if (_local3 != undefined) {
this[_local2] = _local3;
}
}
}
}
function init(Void) {
__width = _width;
__height = _height;
if (initProperties == undefined) {
initFromClipParameters();
} else {
initProperties();
}
if (_global.cascadingStyles == true) {
stylecache = new Object();
}
}
function getClassStyleDeclaration(Void) {
var _local4 = this;
var _local3 = className;
while (_local3 != undefined) {
if (ignoreClassStyleDeclaration[_local3] == undefined) {
if (_global.styles[_local3] != undefined) {
return(_global.styles[_local3]);
}
}
_local4 = _local4.__proto__;
_local3 = _local4.className;
}
}
function setColor(color) {
}
function __getTextFormat(tf, bAll) {
var _local8 = stylecache.tf;
if (_local8 != undefined) {
var _local3;
for (_local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
tf[_local3] = _local8[_local3];
}
}
}
return(false);
}
var _local6 = false;
for (var _local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
var _local5 = _tf[_local3];
if (_local5 != undefined) {
tf[_local3] = _local5;
} else if ((_local3 == "font") && (fontFamily != undefined)) {
tf[_local3] = fontFamily;
} else if ((_local3 == "size") && (fontSize != undefined)) {
tf[_local3] = fontSize;
} else if ((_local3 == "color") && (color != undefined)) {
tf[_local3] = color;
} else if ((_local3 == "leftMargin") && (marginLeft != undefined)) {
tf[_local3] = marginLeft;
} else if ((_local3 == "rightMargin") && (marginRight != undefined)) {
tf[_local3] = marginRight;
} else if ((_local3 == "italic") && (fontStyle != undefined)) {
tf[_local3] = fontStyle == _local3;
} else if ((_local3 == "bold") && (fontWeight != undefined)) {
tf[_local3] = fontWeight == _local3;
} else if ((_local3 == "align") && (textAlign != undefined)) {
tf[_local3] = textAlign;
} else if ((_local3 == "indent") && (textIndent != undefined)) {
tf[_local3] = textIndent;
} else if ((_local3 == "underline") && (textDecoration != undefined)) {
tf[_local3] = textDecoration == _local3;
} else if ((_local3 == "embedFonts") && (embedFonts != undefined)) {
tf[_local3] = embedFonts;
} else {
_local6 = true;
}
}
}
}
if (_local6) {
var _local9 = styleName;
if (_local9 != undefined) {
if (typeof(_local9) != "string") {
_local6 = _local9.__getTextFormat(tf, true, this);
} else if (_global.styles[_local9] != undefined) {
_local6 = _global.styles[_local9].__getTextFormat(tf, true, this);
}
}
}
if (_local6) {
var _local10 = getClassStyleDeclaration();
if (_local10 != undefined) {
_local6 = _local10.__getTextFormat(tf, true, this);
}
}
if (_local6) {
if (_global.cascadingStyles) {
if (_parent != undefined) {
_local6 = _parent.__getTextFormat(tf, false);
}
}
}
if (_local6) {
_local6 = _global.style.__getTextFormat(tf, true, this);
}
return(_local6);
}
function _getTextFormat(Void) {
var _local2 = stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
__getTextFormat(_local2, true);
stylecache.tf = _local2;
if (enabled == false) {
var _local3 = getStyle("disabledColor");
_local2.color = _local3;
}
return(_local2);
}
function getStyleName(Void) {
var _local2 = styleName;
if (_local2 != undefined) {
if (typeof(_local2) != "string") {
return(_local2.getStyleName());
}
return(_local2);
}
if (_parent != undefined) {
return(_parent.getStyleName());
}
return(undefined);
}
function getStyle(styleProp) {
var _local3;
_global.getStyleCounter++;
if (this[styleProp] != undefined) {
return(this[styleProp]);
}
var _local6 = styleName;
if (_local6 != undefined) {
if (typeof(_local6) != "string") {
_local3 = _local6.getStyle(styleProp);
} else {
var _local7 = _global.styles[_local6];
_local3 = _local7.getStyle(styleProp);
}
}
if (_local3 != undefined) {
return(_local3);
}
var _local7 = getClassStyleDeclaration();
if (_local7 != undefined) {
_local3 = _local7[styleProp];
}
if (_local3 != undefined) {
return(_local3);
}
if (_global.cascadingStyles) {
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (mx.styles.StyleManager.isColorStyle(styleProp))) {
var _local5 = stylecache;
if (_local5 != undefined) {
if (_local5[styleProp] != undefined) {
return(_local5[styleProp]);
}
}
if (_parent != undefined) {
_local3 = _parent.getStyle(styleProp);
} else {
_local3 = _global.style[styleProp];
}
if (_local5 != undefined) {
_local5[styleProp] = _local3;
}
return(_local3);
}
}
if (_local3 == undefined) {
_local3 = _global.style[styleProp];
}
return(_local3);
}
static function mergeClipParameters(o, p) {
for (var _local3 in p) {
o[_local3] = p[_local3];
}
return(true);
}
static var symbolName = "UIObject";
static var symbolOwner = mx.core.UIObject;
static var version = "2.0.2.127";
static var textColorList = {color:1, disabledColor:1};
var invalidateFlag = false;
var lineWidth = 1;
var lineColor = 0;
var tabEnabled = false;
var clipParameters = {visible:1, minHeight:1, minWidth:1, maxHeight:1, maxWidth:1, preferredHeight:1, preferredWidth:1};
}
Symbol 122 MovieClip [__Packages.mx.skins.SkinElement] Frame 0
class mx.skins.SkinElement extends MovieClip
{
var _visible, _x, _y, _width, _height;
function SkinElement () {
super();
}
static function registerElement(name, className) {
Object.registerClass(name, ((className == undefined) ? (mx.skins.SkinElement) : (className)));
_global.skinRegistry[name] = true;
}
function __set__visible(visible) {
_visible = visible;
}
function move(x, y) {
_x = x;
_y = y;
}
function setSize(w, h) {
_width = w;
_height = h;
}
}
Symbol 123 MovieClip [__Packages.mx.styles.CSSTextStyles] Frame 0
class mx.styles.CSSTextStyles
{
function CSSTextStyles () {
}
static function addTextStyles(o, bColor) {
o.addProperty("textAlign", function () {
return(this._tf.align);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.align = x;
});
o.addProperty("fontWeight", function () {
return(((this._tf.bold != undefined) ? ((this._tf.bold ? "bold" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.bold = x == "bold";
});
if (bColor) {
o.addProperty("color", function () {
return(this._tf.color);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.color = x;
});
}
o.addProperty("fontFamily", function () {
return(this._tf.font);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.font = x;
});
o.addProperty("textIndent", function () {
return(this._tf.indent);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.indent = x;
});
o.addProperty("fontStyle", function () {
return(((this._tf.italic != undefined) ? ((this._tf.italic ? "italic" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.italic = x == "italic";
});
o.addProperty("marginLeft", function () {
return(this._tf.leftMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.leftMargin = x;
});
o.addProperty("marginRight", function () {
return(this._tf.rightMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.rightMargin = x;
});
o.addProperty("fontSize", function () {
return(this._tf.size);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.size = x;
});
o.addProperty("textDecoration", function () {
return(((this._tf.underline != undefined) ? ((this._tf.underline ? "underline" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.underline = x == "underline";
});
o.addProperty("embedFonts", function () {
return(this._tf.embedFonts);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.embedFonts = x;
});
}
}
Symbol 125 MovieClip [__Packages.mx.styles.CSSStyleDeclaration] Frame 0
class mx.styles.CSSStyleDeclaration
{
var _tf;
function CSSStyleDeclaration () {
}
function __getTextFormat(tf, bAll) {
var _local5 = false;
if (_tf != undefined) {
var _local2;
for (_local2 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local2])) {
if (tf[_local2] == undefined) {
var _local3 = _tf[_local2];
if (_local3 != undefined) {
tf[_local2] = _local3;
} else {
_local5 = true;
}
}
}
}
} else {
_local5 = true;
}
return(_local5);
}
function getStyle(styleProp) {
var _local2 = this[styleProp];
var _local3 = mx.styles.StyleManager.getColorName(_local2);
return(((_local3 == undefined) ? (_local2) : (_local3)));
}
static function classConstruct() {
mx.styles.CSSTextStyles.addTextStyles(mx.styles.CSSStyleDeclaration.prototype, true);
return(true);
}
static var classConstructed = classConstruct();
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
}
Symbol 124 MovieClip [__Packages.mx.styles.StyleManager] Frame 0
class mx.styles.StyleManager
{
function StyleManager () {
}
static function registerInheritingStyle(styleName) {
inheritingStyles[styleName] = true;
}
static function isInheritingStyle(styleName) {
return(inheritingStyles[styleName] == true);
}
static function registerColorStyle(styleName) {
colorStyles[styleName] = true;
}
static function isColorStyle(styleName) {
return(colorStyles[styleName] == true);
}
static function registerColorName(colorName, colorValue) {
colorNames[colorName] = colorValue;
}
static function isColorName(colorName) {
return(colorNames[colorName] != undefined);
}
static function getColorName(colorName) {
return(colorNames[colorName]);
}
static var inheritingStyles = {color:true, direction:true, fontFamily:true, fontSize:true, fontStyle:true, fontWeight:true, textAlign:true, textIndent:true};
static var colorStyles = {barColor:true, trackColor:true, borderColor:true, buttonColor:true, color:true, dateHeaderColor:true, dateRollOverColor:true, disabledColor:true, fillColor:true, highlightColor:true, scrollTrackColor:true, selectedDateColor:true, shadowColor:true, strokeColor:true, symbolBackgroundColor:true, symbolBackgroundDisabledColor:true, symbolBackgroundPressedColor:true, symbolColor:true, symbolDisabledColor:true, themeColor:true, todayIndicatorColor:true, shadowCapColor:true, borderCapColor:true, focusColor:true};
static var colorNames = {black:0, white:16777215, red:16711680, green:65280, blue:255, magenta:16711935, yellow:16776960, cyan:65535, haloGreen:8453965, haloBlue:2881013, haloOrange:16761344};
static var TextFormatStyleProps = {font:true, size:true, color:true, leftMargin:false, rightMargin:false, italic:true, bold:true, align:true, indent:true, underline:false, embedFonts:false};
static var TextStyleMap = {textAlign:true, fontWeight:true, color:true, fontFamily:true, textIndent:true, fontStyle:true, lineHeight:true, marginLeft:true, marginRight:true, fontSize:true, textDecoration:true, embedFonts:true};
}
Symbol 466 MovieClip [__Packages.Game] Frame 0
class Game extends mx.core.UIObject
{
var coinEffect, attachMovie, getNextHighestDepth, hud, board, background, level, secondsLeft, initialSeconds, score, nextExtensionReq, extensionScoreBase, nextExtensionAt, maxValueForTint, foodPerTint, timerID, matchScore, mismatchPenalty, levelBreak, extensionScoreDelta, extensionScoreDeltaBreak, extensionSeconds;
function Game () {
super();
}
function startGame(hud, board, background) {
coinEffect = attachMovie("coinEffect", "", getNextHighestDepth(), {_x:167, _y:72});
this.hud = hud;
this.board = board;
this.background = background;
level = 1;
secondsLeft = initialSeconds;
score = 0;
nextExtensionReq = extensionScoreBase;
nextExtensionAt = extensionScoreBase;
hud.__set__currentLevel(1);
hud.__set__secondsLeft(secondsLeft);
hud.__set__score(score);
hud.__set__extensionAt(nextExtensionAt);
var _local3;
maxValueForTint = new Array();
_local3 = 1;
while (_local3 <= MAX_TINT) {
maxValueForTint[_local3] = 3;
var _local2;
_local2 = 0;
while (_local2 < foodPerTint) {
board.addItem("Food", {tint:_local3, maxValue:maxValueForTint[_local3]});
_local2++;
}
_local3++;
}
if (board.__get__avatar() == undefined) {
board.createAvatar("Avatar", {maxTint:MAX_TINT, direction:"left"});
} else {
board.__get__avatar().setRandomTint();
}
board.onItemEaten = mx.utils.Delegate.create(this, onItemEaten);
Key.addListener(this);
timerID = setInterval(this, "onTimer", 1000);
isPlay = true;
}
function stopGame() {
board.__get__avatar().clearQueue();
Key.removeListener(this);
clearInterval(timerID);
hud.gameOver._alpha = 100;
if ((_global.user_id != 0) and (_global.user_id != undefined)) {
hud.btnScore._alpha = 100;
hud.btnScore.enabled = true;
hud.btnHScore._alpha = 100;
hud.btnHScore.enabled = true;
}
hud.btnPause._alpha = 0;
hud.btnPause.btnPause.enabled = false;
isOver = true;
}
function restartGame(_hud, _board, _background) {
board.__get__avatar().clearQueue();
Key.removeListener(this);
clearInterval(timerID);
board.reset();
startGame(_hud, _board, _background);
hud.gameOver._alpha = 0;
hud.btnScore._alpha = 0;
hud.btnScore.enabled = false;
hud.btnHScore._alpha = 0;
hud.btnHScore.enabled = false;
hud.btnPause._alpha = 100;
hud.btnPause.btnPause.enabled = false;
}
function onKeyDown() {
if (isPaused == false) {
switch (Key.getCode()) {
case 37 :
board.__get__avatar().moveTowards(Direction.LEFT);
break;
case 38 :
board.__get__avatar().moveTowards(Direction.UP);
break;
case 39 :
board.__get__avatar().moveTowards(Direction.RIGHT);
break;
case 40 :
board.__get__avatar().moveTowards(Direction.DOWN);
}
}
}
function onItemEaten(avatar, item) {
if (isPaused == false) {
if (item instanceof Food) {
var _local2 = Food(item);
if (avatar.__get__tint() == _local2.__get__tint()) {
score = score + matchScore[_local2.__get__value() - 1];
if (_local2.__get__value() >= 7) {
hud.soundSi.start(0, 1);
} else if (_local2.__get__value() == 6) {
hud.soundLa.start(0, 1);
} else if (_local2.__get__value() == 5) {
hud.soundSol.start(0, 1);
} else if (_local2.__get__value() == 4) {
hud.soundFa.start(0, 1);
} else if (_local2.__get__value() == 3) {
hud.soundMi.start(0, 1);
} else if (_local2.__get__value() == 2) {
hud.soundRe.start(0, 1);
} else if (_local2.__get__value() == 1) {
hud.soundDo.start(0, 1);
}
coinEffect.initAnim(avatar._x, avatar._y, _local2.__get__value(), _local2.__get__tint());
} else {
score = score - mismatchPenalty[_local2.__get__value() - 1];
hud.scoreLess.valueField.valueA.text = ("-" + mismatchPenalty[_local2.__get__value() - 1]) + "!!";
hud.scoreLess.valueField.valueB.text = ("-" + mismatchPenalty[_local2.__get__value() - 1]) + "!!";
hud.scoreLess.gotoAndPlay("plusten");
hud.soundError.start(0, 1);
hud.bgScore.gotoAndPlay("playAnim");
}
hud.__set__score(score);
if (score >= nextExtensionAt) {
level++;
if (level <= levelBreak) {
nextExtensionReq = nextExtensionReq + extensionScoreDelta;
nextExtensionAt = nextExtensionAt + nextExtensionReq;
} else if (level > levelBreak) {
nextExtensionReq = nextExtensionReq + extensionScoreDeltaBreak;
nextExtensionAt = nextExtensionAt + nextExtensionReq;
}
secondsLeft = secondsLeft + extensionSeconds;
extensionSeconds--;
hud.__set__extensionAt(nextExtensionAt);
hud.__set__secondsLeft(secondsLeft);
hud.timePlus.timePlus(extensionSeconds);
hud.__set__currentLevel(level);
hud.soundLevel.start(0, 1);
hud.lero.gotoAndPlay("playAnim");
if (level < 22) {
var _local4 = ((level - 2) % MAX_TINT) + 1;
maxValueForTint[_local4]++;
avatar.__get__board().addItem("Food", {tint:_local4, value:maxValueForTint[_local4]});
}
}
var _local9 = avatar.__get__tint();
avatar.setNextRandomTint(MAX_TINT);
avatar.__get__board().addItem("Food", {tint:_local2.__get__tint(), maxValue:maxValueForTint[_local2.__get__tint()]});
}
}
}
function onTimer() {
if (isPaused == false) {
secondsLeft--;
hud.__set__secondsLeft(secondsLeft);
if (secondsLeft <= 10) {
hud.soundAlarm.start(0, 1);
hud.lero.gotoAndPlay("wrongAnim");
} else if (secondsLeft > 10) {
hud.soundClock.start(0, 1);
}
if (secondsLeft <= 0) {
stopGame();
}
}
}
function submitScore(playerName) {
if (difficulty == 1) {
mochi.MochiScores.setBoardID("040977c309331ff4");
} else if (difficulty == 2) {
mochi.MochiScores.setBoardID("374105dc3547d362");
} else if (difficulty == 3) {
mochi.MochiScores.setBoardID("631e4003f4841987");
}
mochi.MochiScores.submit(score, playerName, this, "scoreSubmitted");
}
function scoreSubmitted(scores) {
}
static var MAX_TINT = 5;
var isPaused = false;
var isPlay = false;
var isOver = false;
var isScore = false;
var difficulty = 1;
}
Symbol 467 MovieClip [__Packages.HUD] Frame 0
class HUD extends MovieClip
{
var soundClock, soundError, soundLevel, soundAlarm, soundDo, soundRe, soundMi, soundFa, soundSol, soundLa, soundSi, gameOver, btnScore, btnHScore, btnPause, btnHow, mPattern, _currentLevel, currentLevelText, _secondsLeft, secondsLeftText, _score, scoreText, extensionAtText, _extensionAt, perfIndicator;
function HUD () {
super();
soundClock = new Sound();
soundError = new Sound();
soundLevel = new Sound();
soundAlarm = new Sound();
soundDo = new Sound();
soundRe = new Sound();
soundMi = new Sound();
soundFa = new Sound();
soundSol = new Sound();
soundLa = new Sound();
soundSi = new Sound();
soundClock.attachSound("soundClock");
soundError.attachSound("soundError");
soundLevel.attachSound("soundLevel");
soundAlarm.attachSound("soundAlarm");
soundDo.attachSound("_do");
soundRe.attachSound("_re");
soundMi.attachSound("_mi");
soundFa.attachSound("_fa");
soundSol.attachSound("_sol");
soundLa.attachSound("_la");
soundSi.attachSound("_si");
soundClock.setVolume(85);
soundError.setVolume(85);
soundLevel.setVolume(85);
soundAlarm.setVolume(85);
soundDo.setVolume(85);
soundRe.setVolume(85);
soundMi.setVolume(85);
soundFa.setVolume(85);
soundSol.setVolume(85);
soundLa.setVolume(85);
soundSi.setVolume(85);
gameOver._alpha = 0;
btnScore._alpha = 0;
btnScore.enabled = false;
btnHScore._alpha = 0;
btnHScore.enabled = false;
btnPause._alpha = 0;
btnPause.btnPause.enabled = false;
btnHow._alpha = 100;
btnHow.enabled = true;
mPattern = new MusicPattern();
}
function get currentLevel() {
return(_currentLevel);
}
function set currentLevel(newValue) {
_currentLevel = newValue;
currentLevelText.text = "" + _currentLevel;
updateAfterEvent();
//return(currentLevel);
}
function get secondsLeft() {
return(_secondsLeft);
}
function set secondsLeft(newValue) {
_secondsLeft = newValue;
secondsLeftText.text = "" + secondsLeft;
updateAfterEvent();
//return(secondsLeft);
}
function get score() {
return(_score);
}
function set score(newValue) {
_score = newValue;
scoreText.text = "" + score;
extensionAtText.text = "" + (extensionAt - score);
updateAfterEvent();
//return(score);
}
function get extensionAt() {
return(_extensionAt);
}
function set extensionAt(newValue) {
_extensionAt = newValue;
extensionAtText.text = "" + (extensionAt - score);
updateAfterEvent();
//return(extensionAt);
}
function indicatePerformance(grade) {
perfIndicator.gotoAndPlay(grade);
}
}
Symbol 468 MovieClip [__Packages.MusicPattern] Frame 0
class MusicPattern
{
var lastNotes;
function MusicPattern () {
lastNotes = new Array();
var _local2 = 0;
while (_local2 < LONG) {
lastNotes[_local2] = 0;
_local2++;
}
}
function checkPattern(note) {
trace("======================");
lastNotes[0] = lastNotes[1];
lastNotes[1] = lastNotes[2];
lastNotes[2] = lastNotes[3];
lastNotes[3] = lastNotes[4];
lastNotes[4] = lastNotes[5];
lastNotes[5] = note;
melodyPlay = true;
var _local2 = 0;
while (_local2 < LONG) {
trace((((((("lastNotes[" + _local2) + "] = ") + lastNotes[_local2]) + " y melody[") + _local2) + "] = ") + melody[_local2]);
if (lastNotes[_local2] != melody[_local2]) {
melodyPlay = false;
_local2 = 100;
}
_local2++;
}
trace("Melody Play: " + melodyPlay);
}
static var LONG = 6;
var melodyPlay = false;
var melody = [1, 1, 2, 2, 3, 3];
}
Symbol 101 MovieClip [__Packages.mx.core.UIComponent] Frame 0
class mx.core.UIComponent extends mx.core.UIObject
{
var __width, __height, invalidate, stylecache, removeEventListener, dispatchEvent, drawFocus, addEventListener, _xscale, _yscale, _focusrect, watch, enabled;
function UIComponent () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
}
function enabledChanged(id, oldValue, newValue) {
setEnabled(newValue);
invalidate();
delete stylecache.tf;
return(newValue);
}
function setEnabled(enabled) {
invalidate();
}
function getFocus() {
var selFocus = Selection.getFocus();
return(((selFocus === null) ? null : (eval (selFocus))));
}
function setFocus() {
Selection.setFocus(this);
}
function getFocusManager() {
var _local2 = this;
while (_local2 != undefined) {
if (_local2.focusManager != undefined) {
return(_local2.focusManager);
}
_local2 = _local2._parent;
}
return(undefined);
}
function onKillFocus(newFocus) {
removeEventListener("keyDown", this);
removeEventListener("keyUp", this);
dispatchEvent({type:"focusOut"});
drawFocus(false);
}
function onSetFocus(oldFocus) {
addEventListener("keyDown", this);
addEventListener("keyUp", this);
dispatchEvent({type:"focusIn"});
if (getFocusManager().bDrawFocus != false) {
drawFocus(true);
}
}
function findFocusInChildren(o) {
if (o.focusTextField != undefined) {
return(o.focusTextField);
}
if (o.tabEnabled == true) {
return(o);
}
return(undefined);
}
function findFocusFromObject(o) {
if (o.tabEnabled != true) {
if (o._parent == undefined) {
return(undefined);
}
if (o._parent.tabEnabled == true) {
o = o._parent;
} else if (o._parent.tabChildren) {
o = findFocusInChildren(o._parent);
} else {
o = findFocusFromObject(o._parent);
}
}
return(o);
}
function pressFocus() {
var _local3 = findFocusFromObject(this);
var _local2 = getFocus();
if (_local3 != _local2) {
_local2.drawFocus(false);
if (getFocusManager().bDrawFocus != false) {
_local3.drawFocus(true);
}
}
}
function releaseFocus() {
var _local2 = findFocusFromObject(this);
if (_local2 != getFocus()) {
_local2.setFocus();
}
}
function isParent(o) {
while (o != undefined) {
if (o == this) {
return(true);
}
o = o._parent;
}
return(false);
}
function size() {
}
function init() {
super.init();
_xscale = 100;
_yscale = 100;
_focusrect = _global.useFocusRect == false;
watch("enabled", enabledChanged);
if (enabled == false) {
setEnabled(false);
}
}
function dispatchValueChangedEvent(value) {
dispatchEvent({type:"valueChanged", value:value});
}
static var symbolName = "UIComponent";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.127";
static var kStretch = 5000;
var focusEnabled = true;
var tabEnabled = true;
var origBorderStyles = {themeColor:16711680};
var clipParameters = {};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.core.UIComponent.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
}
Symbol 126 MovieClip [__Packages.Board] Frame 0
class Board extends mx.core.UIComponent
{
var _width, _height, setSize, _contentID, content, invalidate, _tileID, _rows, _cols, _avatar, items, tiles, destroyObject, createObject, background, createEmptyMovieClip, width, boundingBox, height;
function Board () {
super();
}
function init() {
var _local4 = _width;
var _local3 = _height;
super.init();
setSize(_local4, _local3);
}
function set contentID(value) {
if (_contentID == value) {
return;
}
_contentID = value;
if (content != undefined) {
destroyContent();
}
invalidate();
//return(contentID);
}
function get contentID() {
return(_contentID);
}
function set tileID(value) {
if (_tileID == value) {
return;
}
_tileID = value;
if ((content != undefined) && ((contentID == "") || (contentID == undefined))) {
destroyContent();
}
invalidate();
//return(tileID);
}
function get tileID() {
return(_tileID);
}
function set cols(newValue) {
resizeGrid(newValue, _rows);
//return(cols);
}
function get cols() {
return(_cols);
}
function set rows(newValue) {
resizeGrid(_cols, newValue);
//return(rows);
}
function get rows() {
return(_rows);
}
function get avatar() {
return(_avatar);
}
function resizeGrid(newCols, newRows, forceReset) {
if (((newCols == _cols) && (newRows == _rows)) && (!forceReset)) {
return(undefined);
}
_cols = newCols;
_rows = newRows;
createGrid();
if (content != undefined) {
destroyContent();
}
invalidate();
}
function reset() {
var _local3;
var _local2;
_local3 = 0;
while (_local3 < cols) {
_local2 = 0;
while (_local2 < rows) {
if (items[_local3][_local2] != null) {
removeItem(items[_local3][_local2]);
}
_local2++;
}
_local3++;
}
destroyAvatar();
resetTrail();
}
function getTile(col, row) {
if ((((col < 0) || (row < 0)) || (col >= cols)) || (row >= rows)) {
return(null);
}
return(tiles[col][row]);
}
function getItem(col, row) {
return(items[col][row]);
}
function destroyContent() {
var _local3;
var _local2;
destroyObject("content");
content = undefined;
}
function createContent() {
content = createObject(_contentID, "content", 0, {_x:background._x + CONTENT_X, _y:background._y + CONTENT_Y});
var board = this;
var oldEvent = content.onEnterFrame;
content.onEnterFrame = function () {
this.onEnterFrame = oldEvent;
board.populateGrid();
this.onEnterFrame();
};
}
function createGrid() {
if ((cols == undefined) || (rows == undefined)) {
return(undefined);
}
var _local3;
var _local2;
tiles = new Array();
items = new Array();
_local3 = 0;
while (_local3 < cols) {
tiles[_local3] = new Array();
items[_local3] = new Array();
_local2 = 0;
while (_local2 < rows) {
tiles[_local3][_local2] = null;
items[_local3][_local2] = null;
_local2++;
}
_local3++;
}
}
function generateContent(tileLinkageID) {
var _local3;
var _local2;
var _local7 = tileLinkageID;
if (_local7 == undefined) {
_local7 = tileID;
}
if (_local7 == undefined) {
return(undefined);
}
content = createEmptyMovieClip("content", 0);
content._x = background._x + CONTENT_X;
content._y = background._y + CONTENT_Y;
_local3 = 0;
while (_local3 < cols) {
_local2 = 0;
while (_local2 < rows) {
var _local4 = Tile(content.attachMovie(_local7, (("tile_" + _local3) + "_") + _local2, content.getNextHighestDepth(), {_x:_local3 * Tile.WIDTH, _y:_local2 * Tile.HEIGHT}));
tiles[_local3][_local2] = _local4;
_local4.placedOnto(this, _local3, _local2);
_local2++;
}
_local3++;
}
content._width = cols * Tile.WIDTH;
content._height = rows * Tile.HEIGHT;
}
function populateGrid() {
var _local3;
var _local2;
var _local9;
var _local8;
if (content == undefined) {
return(undefined);
}
var _local7;
for (_local7 in content) {
var _local4 = content[_local7];
if (_local4 instanceof Tile) {
var _local5 = Tile(_local4);
_local3 = Math.floor(_local4._x / Tile.WIDTH);
_local2 = Math.floor(_local4._y / Tile.HEIGHT);
tiles[_local3][_local2] = _local5;
}
if (_local4 instanceof Item) {
var _local6 = Item(_local4);
_local3 = Math.floor(_local4._x / Tile.WIDTH);
_local2 = Math.floor(_local4._y / Tile.HEIGHT);
items[_local3][_local2] = _local6;
}
if (_local4 instanceof Avatar) {
_local9 = Math.floor(_local4._x / Tile.WIDTH);
_local8 = Math.floor(_local4._y / Tile.HEIGHT);
_avatar = Avatar(_local4);
}
}
_local3 = 0;
while (_local3 < cols) {
_local2 = 0;
while (_local2 < rows) {
tiles[_local3][_local2].placedOnto(this, _local3, _local2);
items[_local3][_local2].placedOnto(this, _local3, _local2);
_local2++;
}
_local3++;
}
avatar.placedOnto(this, _local9, _local8);
}
function size() {
boundingBox._width = width;
boundingBox._height = height;
invalidate();
}
function draw() {
background._width = BORDER_WIDTH + (cols * Tile.WIDTH);
background._height = BORDER_HEIGHT + (rows * Tile.HEIGHT);
if (content != undefined) {
content._x = background._x + CONTENT_X;
content._y = background._y + CONTENT_Y;
} else if ((contentID != "") && (contentID != undefined)) {
createContent();
} else if ((tileID != "") && (tileID != undefined)) {
generateContent(tileID);
}
}
function createAvatar(linkageID, initParams) {
if (content == undefined) {
return(undefined);
}
var _local3 = Math.floor(Math.random() * cols);
var _local2 = Math.floor(Math.random() * rows);
while ((tiles[_local3][_local2] == null) || (!tiles[_local3][_local2].canPlaceAvatar())) {
_local3 = Math.floor(Math.random() * cols);
_local2 = Math.floor(Math.random() * rows);
}
var _local4 = content.getNextHighestDepth();
var _local5 = {_x:_local3 * Tile.WIDTH, _y:_local2 * Tile.HEIGHT, initParams:initParams};
_avatar = Avatar(content.attachMovie(linkageID, "avatar", _local4, _local5));
_avatar.placedOnto(this, _local3, _local2);
}
function destroyAvatar() {
if (avatar == undefined) {
return(undefined);
}
avatar.__get__tile().__set__state(Tile.STATE_NORMAL);
if (avatar.getDepth() < 0) {
avatar.swapDepths(content.getNextHighestDepth());
}
avatar.removeMovieClip();
_avatar = undefined;
}
function addItem(linkageID, initParams) {
if (content == undefined) {
return(undefined);
}
var _local4 = Math.floor(Math.random() * cols);
var _local3 = Math.floor(Math.random() * rows);
var _local2 = tiles[_local4][_local3];
while ((_local2 == null) || (!_local2.canPlaceItem())) {
_local4 = Math.floor(Math.random() * cols);
_local3 = Math.floor(Math.random() * rows);
_local2 = tiles[_local4][_local3];
}
var _local6 = content.getNextHighestDepth();
var _local7 = {_x:_local4 * Tile.WIDTH, _y:_local3 * Tile.HEIGHT, initParams:initParams};
var _local5 = Item(content.attachMovie(linkageID, (("food_" + linkageID) + "_") + _local6, _local6, _local7));
items[_local4][_local3] = _local5;
avatar.swapDepths(_local5);
_local5.placedOnto(this, _local4, _local3);
return(_local5);
}
function removeItem(item) {
item.__get__tile().__set__state(Tile.STATE_NORMAL);
if (item.getDepth() < 0) {
item.swapDepths(content.getNextHighestDepth());
}
items[item.__get__col()][item.__get__row()] = null;
item.removeMovieClip();
}
function onItemEaten(avatar, item) {
}
function resetTrail() {
var _local4;
var _local3;
_local4 = 0;
while (_local4 < cols) {
_local3 = 0;
while (_local3 < rows) {
var _local2 = tiles[_local4][_local3];
if ((_local2 != null) && (_local2.__get__state() == Tile.STATE_TRAIL)) {
_local2.__set__state(Tile.STATE_NORMAL);
}
_local3++;
}
_local4++;
}
}
static var CONTENT_X = 24;
static var CONTENT_Y = 24;
static var BORDER_WIDTH = 48;
static var BORDER_HEIGHT = 48;
}
Symbol 102 MovieClip [__Packages.BoardElement] Frame 0
class BoardElement extends mx.core.UIComponent
{
var _board, _col, _row, cacheAsBitmap, onEnterFrame;
function BoardElement () {
super();
}
function get board() {
return(_board);
}
function get col() {
return(_col);
}
function get row() {
return(_row);
}
function placedOnto(theBoard, inCol, inRow) {
_board = theBoard;
_col = inCol;
_row = inRow;
cacheAsBitmap = true;
}
function enteredFrame() {
}
function doLaterDispatcher() {
super.doLaterDispatcher();
if (onEnterFrame == null) {
onEnterFrame = enteredFrame;
}
}
function cancelAllDoLaters() {
super.cancelAllDoLaters();
if (onEnterFrame == null) {
onEnterFrame = enteredFrame;
}
}
}
Symbol 103 MovieClip [__Packages.Avatar] Frame 0
class Avatar extends BoardElement
{
var moveQueue, randomTintSet, initParams, _tile, _direction, _tint, _state, __proto__, __get__board, gotoAndStop, shape;
function Avatar () {
super();
moveQueue = new Array();
randomTintSet = [1, 2, 3, 4, 5];
if (initParams != undefined) {
if (initParams.tint != undefined) {
tint = (initParams.tint);
} else if (initParams.maxTint != undefined) {
setRandomTint(initParams.maxTint);
}
if (initParams.direction != undefined) {
direction = (initParams.direction);
}
}
}
function get tile() {
return(_tile);
}
function set direction(value) {
var _local2 = Direction.parse(value);
if (_direction != _local2) {
_direction = _local2;
directionChanged();
}
//return(direction);
}
function get direction() {
return(_direction);
}
function set tint(value) {
_tint = value;
if (_tint < 1) {
_tint = 1;
}
if (_tint > 6) {
_tint = 6;
}
tintChanged();
//return(tint);
}
function get tint() {
return(_tint);
}
function get state() {
return(_state);
}
function setState(newState) {
if (newState.prototype.__proto__ != AvatarState.prototype) {
return(undefined);
}
leavingState();
_state = newState;
__proto__ = state.prototype;
enteringState();
}
function placedOnto(theBoard, inCol, inRow) {
super.placedOnto(theBoard, inCol, inRow);
_tile = __get__board().getTile(inCol, inRow);
_tile.__set__state(Tile.STATE_AVATAR);
if (state == null) {
setState(AvatarIdle);
}
}
function setRandomTint(maxTint) {
randomTintSet = [1, 2, 3, 4, 5];
var _local2 = Math.floor(Math.random() * maxTint);
tint = (randomTintSet[_local2]);
randomTintSet[_local2] = randomTintSet[maxTint - 1];
randomTintSet[maxTint - 1] = tint;
}
function setNextRandomTint(maxTint) {
var _local2 = Math.floor(Math.random() * (maxTint - 1));
tint = (randomTintSet[_local2]);
randomTintSet[_local2] = randomTintSet[maxTint - 1];
randomTintSet[maxTint - 1] = tint;
}
function enqueueMove(whither) {
moveQueue.push(whither);
}
function processQueue() {
var _local2 = Direction(moveQueue.shift());
while ((_local2 != null) && (!moveTowards(_local2))) {
_local2 = Direction(moveQueue.shift());
}
return(_local2 != null);
}
function clearQueue() {
moveQueue = new Array();
}
function enteredFrame() {
animating();
}
function enteringState() {
}
function leavingState() {
}
function draw() {
}
function directionChanged() {
gotoAndStop(direction + "_idle");
}
function tintChanged() {
shape.gotoAndStop("tint" + tint);
}
function animating() {
}
function animationFinished() {
}
function moveTowards(whither) {
return(false);
}
}
Symbol 127 MovieClip [__Packages.Direction] Frame 0
class Direction extends String
{
function Direction (text) {
super(text);
}
static function parse(text) {
if (text == LEFT) {
return(LEFT);
}
if (text == UP) {
return(UP);
}
if (text == RIGHT) {
return(RIGHT);
}
if (text == DOWN) {
return(DOWN);
}
trace("return null");
return(null);
}
static function opposite(direction) {
switch (direction) {
case LEFT :
return(RIGHT);
case UP :
return(DOWN);
case RIGHT :
return(LEFT);
case DOWN :
return(UP);
}
}
static var LEFT = new Direction("left");
static var UP = new Direction("up");
static var RIGHT = new Direction("right");
static var DOWN = new Direction("down");
}
Symbol 128 MovieClip [__Packages.Tile] Frame 0
class Tile extends BoardElement
{
var __get__row, __get__col, __get__board, nextStateClip, gotoAndPlay, currentStateClip, gotoAndStop;
function Tile () {
super();
}
function get item() {
return(__get__board().items[__get__col()][__get__row()]);
}
function get state() {
return(_state);
}
function set state(newValue) {
if (newValue == _state) {
return;
}
var _local2 = _state;
_state = newValue;
if ((_local2 == STATE_NONE) || (_local2 == STATE_TRAIL)) {
animationFinished();
return;
}
nextStateClip.gotoAndStop(STATE_NAMES[_state]);
gotoAndPlay("animate");
//return(state);
}
function animationFinished() {
currentStateClip.gotoAndStop(STATE_NAMES[_state]);
gotoAndStop("idle");
}
function placedOnto(theBoard, inCol, inRow) {
super.placedOnto(theBoard, inCol, inRow);
if (state == STATE_NONE) {
state = (STATE_NORMAL);
}
}
function getNeighbor(which) {
switch (which) {
case Direction.LEFT :
return(__get__board().getTile(__get__col() - 1, __get__row()));
case Direction.UP :
return(__get__board().getTile(__get__col(), __get__row() - 1));
case Direction.RIGHT :
return(__get__board().getTile(__get__col() + 1, __get__row()));
case Direction.DOWN :
return(__get__board().getTile(__get__col(), __get__row() + 1));
}
return(null);
}
function canMoveOut(avatar, whither) {
return(true);
}
function canMoveIn(avatar, whence) {
return(true);
}
function movedIn(avatar, whence) {
avatar.processQueue();
}
function canPlaceItem() {
return((item == null) && (__get__board().avatar.tile != this));
}
function canPlaceAvatar() {
return(item == null);
}
function toString() {
return(((("[" + __get__col()) + ",") + __get__row()) + "]");
}
static var WIDTH = 32;
static var HEIGHT = 32;
static var STATE_NORMAL = 0;
static var STATE_ITEM = 1;
static var STATE_TRAIL = 2;
static var STATE_AVATAR = 3;
static var STATE_NONE = -1;
static var STATE_NAMES = ["normal", "item", "trail", "avatar"];
var _state = STATE_NONE;
}
Symbol 129 MovieClip [__Packages.Item] Frame 0
class Item extends BoardElement
{
var _tile, __get__board, __get__col, __get__row;
function Item () {
super();
}
function get tile() {
return(_tile);
}
function placedOnto(theBoard, inCol, inRow) {
super.placedOnto(theBoard, inCol, inRow);
_tile = __get__board().getTile(__get__col(), __get__row());
_tile.__set__state(Tile.STATE_ITEM);
}
}
Symbol 130 MovieClip [__Packages.AvatarState] Frame 0
class AvatarState extends Avatar
{
function AvatarState () {
super();
}
}
Symbol 131 MovieClip [__Packages.AvatarIdle] Frame 0
class AvatarIdle extends AvatarState
{
var _x, __get__tile, _y, gotoAndStop, __get__direction, __set__direction, setState;
function AvatarIdle () {
super();
}
function enteringState() {
_x = __get__tile()._x;
_y = __get__tile()._y;
gotoAndStop(__get__direction() + "_idle");
}
function moveTowards(whither) {
if (!__get__tile().canMoveOut(this, whither)) {
return(false);
}
var _local2 = __get__tile().getNeighbor(whither);
if (_local2 == null) {
return(false);
}
if (!_local2.canMoveIn(this, Direction.opposite(whither))) {
return(false);
}
__set__direction(whither);
setState(AvatarWalking);
return(true);
}
}
Symbol 132 MovieClip [__Packages.AvatarWalking] Frame 0
class AvatarWalking extends AvatarState
{
var destTile, __get__tile, __get__direction, gotoAndPlay, shape, __get__board, _tile, setState, enqueueMove;
function AvatarWalking () {
super();
}
function enteringState() {
destTile = __get__tile().getNeighbor(__get__direction());
gotoAndPlay(__get__direction() + "_walk");
__get__tile().__set__state(Tile.STATE_TRAIL);
destTile.__set__state(Tile.STATE_AVATAR);
}
function directionChanged() {
}
function animating() {
var _local2 = destTile.__get__item();
if (_local2 != null) {
if (shape.hitTest(_local2.boundingBox)) {
__get__board().onItemEaten(this, _local2);
__get__board().removeItem(_local2);
__get__board().resetTrail();
}
}
}
function animationFinished() {
_tile = destTile;
setState(AvatarIdle);
__get__tile().movedIn(this, Direction.opposite(__get__direction()));
}
function moveTowards(whither) {
enqueueMove(whither);
return(false);
}
}
Symbol 469 MovieClip [__Packages.Background] Frame 0
class Background extends MovieClip
{
var currentTint, gotoAndStop, currentTintClip, nextTint, gotoAndPlay, nextTintClip;
function Background () {
super();
}
function setTint(newTint) {
currentTint = newTint;
gotoAndStop("idle");
currentTintClip.gotoAndStop("tint" + currentTint);
}
function fadeTint(newTint) {
nextTint = newTint;
gotoAndPlay("start_fade");
nextTintClip.gotoAndStop("tint" + nextTint);
}
function fadeFinished() {
setTint(nextTint);
}
}
Symbol 470 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 154 MovieClip [__Packages.Food] Frame 0
class Food extends Item
{
var initParams, _tint, invalidate, _value, gotoAndStop;
function Food () {
super();
if (initParams != undefined) {
if (initParams.tint != undefined) {
tint = (initParams.tint);
} else if (initParams.tintSet != undefined) {
tint = (initParams.tintSet[Math.floor(Math.random() * initParams.tintSet.length)]);
} else if ((initParams.minTint != undefined) || (initParams.maxTint != undefined)) {
var _local4 = ((initParams.minTint != undefined) ? (initParams.minTint) : 1);
var _local5 = ((initParams.maxTint != undefined) ? (initParams.maxTint) : 5);
tint = (Math.floor(Math.random() * ((_local5 - _local4) + 1)) + _local4);
}
if (initParams.value != undefined) {
value = (initParams.value);
} else if (initParams.valueSet != undefined) {
value = (initParams.valueSet[Math.floor(Math.random() * initParams.valueSet.length)]);
} else if ((initParams.minValue != undefined) || (initParams.maxValue != undefined)) {
var _local3 = ((initParams.minValue != undefined) ? (initParams.minValue) : 1);
var _local6 = ((initParams.maxValue != undefined) ? (initParams.maxValue) : 7);
value = (Math.floor(Math.random() * ((_local6 - _local3) + 1)) + _local3);
}
}
}
function set tint(newTint) {
_tint = newTint;
if (_tint < 1) {
_tint = 1;
}
if (_tint > 5) {
_tint = 5;
}
invalidate();
//return(tint);
}
function get tint() {
return(_tint);
}
function set value(newValue) {
_value = newValue;
if (_value < 1) {
_value = 1;
}
if (_value > 7) {
_value = 7;
}
invalidate();
//return(value);
}
function get value() {
return(_value);
}
function draw() {
super.draw();
gotoAndStop((("value" + value) + "_tint") + tint);
}
}
Symbol 471 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 472 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.32");
}
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 get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 473 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 474 MovieClip [__Packages.CoinEffect] Frame 0
class CoinEffect extends MovieClip
{
var attachMovie, getNextHighestDepth;
function CoinEffect () {
super();
}
function initAnim(xValue, yValue, num, color) {
attachMovie("coin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, _xscale:20, _yscale:20, _alpha:80});
attachMovie("coin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, _xscale:30, _yscale:30, _alpha:80});
attachMovie("coin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, _xscale:50, _yscale:50, _alpha:80});
attachMovie("coin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, _xscale:60, _yscale:60, _alpha:80});
if (num == 1) {
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
} else if (num == 2) {
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
} else if (num == 3) {
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
} else if (num == 4) {
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
} else if (num == 5) {
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
} else if (num == 6) {
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
} else if (num == 7) {
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
attachMovie("foodCoin", "", getNextHighestDepth(), {_x:xValue, _y:yValue, color:color});
}
}
}
Symbol 475 MovieClip [__Packages.Coin] Frame 0
class Coin extends MovieClip
{
var coinID, gotoAndStop, _x, _y, removeMovieClip;
function Coin () {
super();
coinID = setInterval(this, "moveCoin", 40);
rotate = 60 - Math.floor(Math.random() * 120);
yspeed = -10 - Math.floor(Math.random() * 10);
}
function moveCoin() {
gotoAndStop("value1_tint" + color);
_x = _x - (xspeed * Math.sin(rotate / 57.3));
_y = _y + yspeed;
yspeed = yspeed + grav;
if (_y > Stage.height) {
removeMovieClip();
}
}
var grav = 5;
var yspeed = -15;
var xspeed = 15;
var rotate = 0;
var color = 0;
}
Symbol 476 MovieClip [__Packages.TimeSumEffect] Frame 0
class TimeSumEffect extends MovieClip
{
var seconds, gotoAndPlay;
function TimeSumEffect () {
super();
}
function timePlus(plusSecs) {
seconds.secondsLeftText.text = "+" + plusSecs;
gotoAndPlay("plusten");
}
}
Symbol 392 MovieClip Frame 146
stop();
_root.gotoAndStop("splashscreen");
Symbol 401 Button
on (release) {
_root.gotoAndStop("howToPlay");
}
Symbol 402 MovieClip Frame 20
stop();
Instance of Symbol 395 MovieClip in Symbol 402 MovieClip Frame 20
on (release) {
getURL ("http://www.arcadepod.com", "_blank");
}
Symbol 429 MovieClip Frame 5
stop();
Symbol 436 MovieClip Frame 5
stop();
Symbol 443 MovieClip Frame 5
stop();
Symbol 450 MovieClip Frame 5
stop();
Symbol 457 MovieClip Frame 5
stop();
Symbol 464 MovieClip Frame 5
stop();