Frame 1
function DoJSCommand(command, params) {
if (doGetURL) {
getURL (((("javascript:GetURL_DoFSCommand('" + command) + "','") + params) + "')");
} else {
fscommand (command, params);
}
}
MyXML = "bejeweled.xml";
ONLINE = false;
hack = false;
DoJSCommand("SessionReady", "<data></data>");
Instance of Symbol 17 MovieClip [Localizer] "Localizer" in Frame 1
onClipEvent (load) {
this.LocalizedXML = new XML();
this.LocalizedXML.ignoreWhite = true;
this.LocalizerHasFailedOnce = false;
this.Localize = function (destname, varname) {
var Dest = eval (destname);
var Text = eval (("_root.Localizer." + varname) + ".text");
if (Text == null) {
Text = "";
}
Dest.text = Text;
var Formatter = new TextFormat();
var Size = eval (("_root.Localizer." + varname) + ".size");
if (Size != null) {
Formatter.size = Size;
}
var Font = eval (("_root.Localizer." + varname) + ".font");
if (Font != null) {
Formatter.font = Font;
}
var Embed = eval (("_root.Localizer." + varname) + ".embed");
if (Embed != null) {
Embed = Embed.toLowerCase();
if (Embed == "true") {
Dest.embedFonts = true;
}
if (Embed == "false") {
Dest.embedFonts = false;
}
}
Dest.setTextFormat(Formatter);
};
this.LocalizeButton = function (destname, varname) {
var _local1 = destname;
var _local2 = varname;
Localize(_local1 + ".UpText", _local2);
Localize(_local1 + ".OverText", _local2);
Localize(_local1 + ".DownText", _local2);
};
this.LocalizeDropShadow = function (destname, varname) {
Localize(destname + "1", varname);
Localize(destname + "2", varname);
};
this.LocalizedXML.onLoad = function (success) {
if (!success) {
_root.Localizer.LocalizerHasFailedOnce = true;
if (_root.Localizer.LocalizerHasFailedOnce) {
fscommand ("LoadFail");
} else {
_root.Localizer.LocalizedXML.load(_root.LocalizationXml);
}
} else {
var _local2 = _root.Localizer.LocalizedXML.firstChild.firstChild;
while (_local2) {
var _local3 = null;
var Size = null;
var Font = null;
var Embed = null;
var _local1 = _local2.firstChild;
while (_local1) {
if (_local1.nodeName == "text") {
_local3 = _local1.firstChild.nodeValue;
} else if (_local1.nodeName == "size") {
Size = _local1.firstChild.nodeValue;
} else if (_local1.nodeName == "font") {
Font = _local1.firstChild.nodeValue;
} else if (_local1.nodeName == "embed") {
Embed = _local1.firstChild.nodeValue;
}
_local1 = _local1.nextSibling;
}
Set("_root.Localizer." + _local2.nodeName, {text:_local3, size:Size, font:Font, embed:Embed});
_local2 = _local2.nextSibling;
}
_root.localizationFinished = true;
}
};
this.LocalizedXML.load(_root.MyXML);
}
Frame 2
if (ONLINE) {
stop();
}
Frame 3
((_framesloaded < 20) ? (play()) : (gotoAndStop ("open")));
Frame 4
prevFrame();
Frame 10
function GetBoolParam(theVar, theDef) {
var _local1 = theVar;
var _local2 = theDef;
if (_local2 == null) {
_local2 = false;
}
if (_local1 == null) {
return(_local2);
}
_local1 = _local1.toLowerCase();
if ((((_local1 == "yes") || (_local1 == "true")) || (_local1 == "on")) || (_local1 == "1")) {
return(true);
}
if ((((_local1 == "no") || (_local1 == "false")) || (_local1 == "off")) || (_local1 == "0")) {
return(false);
}
return(_local2);
}
gotoAndStop ("load");
InitCount = getTimer();
ShowHelp = GetBoolParam(ShowHelp, true);
ShowMute = GetBoolParam(ShowMute, true);
ShowUpsell = GetBoolParam(ShowUpsell, true);
UseInternalGameOverDialog = GetBoolParam(UseInternalGameOverDialog, true);
ShowAd = GetBoolParam(ShowAd, false);
LogUser = GetBoolParam(LogUser, false);
hack = GetBoolParam(hack, false);
HaveCalledGameReady = false;
if ((ScoreUpload == null) || (ScoreUpload.toLowerCase() == "silent")) {
REPORT = -1;
} else {
REPORT = (GetBoolParam(ScoreUpload, false) ? 1 : 0);
}
if (ScoreBroadcast != null) {
ScoreBroadcast = Number(ScoreBroadcast);
} else {
ScoreBroadcast = 0;
}
if (!ONLINE) {
LOGUSER = false;
}
Frame 20
_root.Localizer.Localize("_root.Text_CreatedBy", "CreatedBy");
_root.Localizer.Localize("_root.Text_NowLoading", "NowLoading");
haveLocalizedFrame50 = false;
var down = (getBytesLoaded() / (getBytesTotal() - 48000));
if (down < 0) {
down = 0;
}
if (down > 1) {
down = 1;
}
var waitTime = (ONLINE ? 2000 : 0);
if (((_framesloaded >= 79) && ((getTimer() - InitCount) > waitTime)) && (localizationFinished)) {
meter._xscale = 100;
gotoAndStop ("init");
} else {
meter._xscale = down * 100;
play();
}
Frame 21
prevFrame();
Frame 30
function reset() {
types = 7;
score = 0;
combo = 1;
moveClearCount = 0;
mGameDuration = 0;
stock = 0;
prior = 0;
bonus = false;
award = 0;
value = 0;
gifts = 0;
spots = [];
level = 1;
multi = (timed ? 1.5 : 1);
mark = 0;
auto = 15;
time = 0;
view = 0;
save = 0;
mass = 0;
rate = 0;
long = 0;
last = 0;
best = 0;
rate = 0;
hadMove = false;
startTime = getTimer();
_root.UpgradeButton.tabIndex = 0;
SetupLevelData();
}
function SetupLevelData() {
mLevel = award;
mBonusPenalty = 0;
mNeedDoBonus = false;
if (timed) {
mPointMultiplier = mTimedPMBase + (mLevel * mTimedPMMult);
mPointsPerQuake = (mTimedBonus + (mLevel * mTimedBonusMult)) * mPointMultiplier;
} else {
mPointMultiplier = mNormPMBase + (mLevel * mNormPMMult);
mPointsPerQuake = (mNormBonus + (mLevel * mNormBonusMult)) * mPointMultiplier;
}
mTimedPenaltyVel = (mTimedPVBase + (mLevel * mTimedPVMult)) * mPointMultiplier;
mTimedPenaltyAccel = (mTimedPABase + (mLevel * mTimedPAMult)) * mPointMultiplier;
mNextQuakePoints = score + mPointsPerQuake;
mTimerDelay = 65;
}
gotoAndStop ("code");
base = this;
timed = false;
timep = false;
playing = false;
phase = 0;
pause = false;
ready = true;
board = [];
originx = 180;
originy = 36;
offset = 36;
queue = [];
qdrop = [];
qrate = 20;
frate = 10;
swing = [];
picks = [];
swaps = [];
hints = [];
hintp = 0;
okay = true;
tell = 4;
alert = null;
aware.gotoAndStop("off");
fillCount = 0;
dropCount = 0;
bonusCount = 0;
gameOverCount = 0;
mLevel = 0;
mBonusPenalty = 0;
mNormBonus = 500;
mNormBonusMult = 150;
mNormPMBase = 1;
mNormPMMult = 0.5;
mTimedBonus = 250;
mTimedBonusMult = 10;
mTimedPMBase = 2;
mTimedPMMult = 0.5;
mTimedPVBase = 1;
mTimedPVMult = 2;
mTimedPABase = 0.01;
mTimedPAMult = 0.005;
mTimerDelay = 0;
mNeedDoBonus = false;
mPointMultiplier = 0;
mPointsPerQuake = 0;
mTimedPenaltyVel = 0;
mTimedPenaltyAccel = 0;
mNextQuakePoints = 0;
mLastWarningSound = 0;
mGameDuration = 0;
requestPause = false;
requestResume = false;
reset();
this.attachMovie("empty", "clicks", 1);
this.attachMovie("empty", "effect", 1);
slct = new Sound(clicks);
slct.attachSound("select");
mnuc = new Sound(clicks);
mnuc.attachSound("menuclick");
bads = new Sound(effect);
bads.attachSound("badswap");
gong = new Sound(effect);
gong.attachSound("gemongem");
shim = getTimer();
gset = new Sound(effect);
gset.attachSound("gotset");
gbig = new Sound(effect);
gbig.attachSound("gotsetbig");
mult = new Sound(effect);
mult.attachSound("multishot");
warn = new Sound(effect);
warn.attachSound("warning");
preover = new Sound(effect);
preover.attachSound("preover");
over = new Sound(effect);
over.attachSound("gameover");
win1 = new Sound(effect);
win1.attachSound("combo1");
win2 = new Sound(effect);
win2.attachSound("combo2");
win3 = new Sound(effect);
win3.attachSound("combo3");
win4 = new Sound(effect);
win4.attachSound("combo4");
win5 = new Sound(effect);
win5.attachSound("combo5");
Frame 40
function InitScore() {
reset();
clock.no();
tally.score = 0;
tally.play();
}
function UpdateBar() {
if (bonus) {
} else if (mNeedDoBonus) {
if (ready) {
clock.no(true);
doBonus();
}
} else {
if (timed) {
if (mTimerDelay > 0) {
mTimerDelay--;
}
if ((mTimerDelay == 0) && (ready)) {
mBonusPenalty = mBonusPenalty + ((4 * mTimedPenaltyVel) / 100);
mTimedPenaltyVel = mTimedPenaltyVel + ((4 * mTimedPenaltyAccel) / 100);
}
}
var aTotalBarLen = 100;
var _local2;
if (timed) {
_local2 = (((((score - prior) - mBonusPenalty) * aTotalBarLen) / 2) / (mNextQuakePoints - prior)) + (aTotalBarLen / 2);
} else {
_local2 = (((score - prior) - mBonusPenalty) * aTotalBarLen) / (mNextQuakePoints - prior);
}
if (_local2 > aTotalBarLen) {
_local2 = aTotalBarLen;
}
if (_local2 < 0) {
_local2 = 0;
}
var _local3 = false;
var _local1 = 0;
while (_local1 < 2) {
if (_local2 > stock) {
_local3 = true;
stock = stock + 0.3;
} else if (_local2 < stock) {
stock = stock - 0.3;
}
_local1++;
}
if (stock >= 99) {
stock = 99;
mNeedDoBonus = true;
}
if (timed) {
if ((stock <= 0) && (ready)) {
StartGameOverSequence();
return;
}
if (!_local3) {
var aWarningPeriod = (stock * 16);
if (aWarningPeriod < 80) {
aWarningPeriod = 80;
}
var aTimeNow = (getTimer() / 10);
if ((aWarningPeriod <= 240) && ((aTimeNow - mLastWarningSound) >= aWarningPeriod)) {
warn.start(0);
mLastWarningSound = aTimeNow;
}
if (stock < 15) {
meter.play();
}
}
}
meter._xscale = stock;
}
}
function DoScoreBroadcast() {
DoJSCommand("pc_scorebroadcast", "" + score);
}
function DoGameBreak(isGameOver) {
DoScoreBroadcast();
var _local3 = (timed ? "timed" : "untimed");
var _local2 = award;
if (isGameOver) {
DoJSCommand("pc_gameover", "" + score);
_local2++;
}
var _local1 = "" + _local2;
if (isGameOver) {
_local1 = _local1 + ",GameOver";
}
_local1 = (_local1 + ",") + _local3;
DoJSCommand("pc_gamebreak", _local1);
}
function doBonus() {
if (bulb.fill) {
} else if (!bonus) {
ready = false;
bonusCount = getTimer();
if (picks.length) {
picks = [];
grid.mark1.removeMovieClip();
grid.mark2.removeMovieClip();
}
mark = clock.time;
clock.mean = clock.time;
spots = [];
var _local2 = 0;
while (_local2 < 8) {
var _local1 = 0;
while (_local1 < 8) {
spots.push([_local2, _local1]);
_local1++;
}
_local2++;
}
gifts = 10 + award;
award++;
if (gifts > 32) {
gifts = 32;
}
value = (award * multi) * 10;
score = score + (gifts * value);
tally.play();
if (ScoreBroadcast == -1) {
doReport(true);
}
meter._xscale = 100;
meter.pulse = 8;
meter.play();
flash.pulse = 8;
flash.play();
if (!bulb.fill) {
bulb.glee = 1;
}
bonus = true;
aware.gotoAndStop("bonus");
} else {
var anElapsed = (getTimer() - bonusCount);
if (anElapsed < 225) {
bulb.glee = 1;
} else {
bonusCount = getTimer();
if (!gifts) {
prior = score;
stock = 0;
combo = 1;
moveClearCount = 0;
last = score;
bonus = false;
aware.gotoAndStop("off");
bulb.fill = true;
RemoveMarkedGems();
SetupLevelData();
clock.go();
DoGameBreak(false);
} else {
meter._xscale = 100;
if (!spots.length) {
gifts = 0;
win4.start(0);
bulb.glee = 16;
} else {
var s = random(spots.length);
var aCol = spots[s][0];
var aRow = spots[s][1];
spots.splice(s, 1);
var _local3 = base.attachMovie("gem", "win" + gifts, 10 + gifts);
_local3._x = (aCol * offset) + originx;
_local3._y = (aRow * offset) + originy;
_local3._xscale = (_local3._yscale = 200);
_local3.gotoAndStop((_local3.z = board[aCol][aRow].z));
var aBomb = _local3.attachMovie("BonusBomb", "BonusBomb" + gift, 1 + gift);
aBomb.count = getTimer();
aBomb.growing = false;
var gem = board[aCol][aRow];
gem.remove = true;
gem._visible = false;
var p = base.attachMovie("pop", "pop" + gifts, 1000 + gifts);
p._x = _local3._x;
p._y = _local3._y;
p.score = value;
p.count = getTimer();
p._alpha = 100;
gifts--;
if (gifts) {
bulb.glee = 1;
win1.start(0);
} else {
win4.start(0);
bulb.glee = 16;
}
}
}
}
}
}
function doMode(v) {
if (pause) {
gotoAndStop ("game");
return(undefined);
}
if (ready) {
timep = ((v == 1) ? false : true);
if (okay) {
doGame(true);
} else {
doPause(newgame);
}
}
}
function launchUpgradePage() {
if ((!playing) || (ready)) {
DoJSCommand("CustomEvent", "<gamedata><action1>upgrade</action1></gamedata>");
if (playing && (timed)) {
doPause(suspend);
}
}
}
function ButtonClicked(v) {
var _local1 = v;
mnuc.start(0);
if (_local1 == 1) {
timep = timed;
if (ready) {
doPause(newgame);
}
} else if (_local1 == 2) {
doMode(1);
} else if (_local1 == 3) {
doMode(2);
} else if (_local1 == 5) {
doReport();
} else if (_local1 == 4) {
if (hack) {
if (Key.isDown(17)) {
if (Key.isDown(16)) {
StartGameOverSequence();
} else {
clock.no(true);
prompt.say("PromptNoMoreMoves");
aware.gotoAndStop("noMoreMoves");
doFall();
}
} else if (Key.isDown(16)) {
if (score < mNextQuakePoint) {
score = mNextQuakePoint;
} else {
score = score + 20000;
}
tally.play();
} else {
launchUpgradePage();
}
} else {
launchUpgradePage();
}
}
}
function ShowGems(doShow) {
var _local3 = 0;
while (_local3 < 8) {
var _local1 = 0;
while (_local1 < 8) {
var _local2 = board[_local3][_local1];
_local2._visible = doShow;
_local1++;
}
_local3++;
}
}
function doPause(modal) {
var _local1 = modal;
if (_local1 == endgame) {
mGameDuration = Math.floor((getTimer() - startTime) / 1000);
if (REPORT == -1) {
doReport(false);
}
if (LOGUSER && (REPORT != 1)) {
DoJSCommand("GameEnd", "<gamedata></gamedata>");
}
playing = false;
}
if ((((_local1 == null) && (alert == endgame)) && (REPORT == 1)) && (LOGUSER)) {
DoJSCommand("GameEnd", "<gamedata></gamedata>");
}
if (_local1) {
if (timed) {
ShowGems(false);
}
if ((_local1 != endgame) || (UseInternalGameOverDialog)) {
_local1.view(true);
alert = _local1;
}
} else {
if (timed) {
ShowGems(true);
}
alert = null;
}
if (pause && (!_local1)) {
NewGameButton.SetEnabled(true);
UpgradeButton.SetEnabled(true);
help.frame(1);
SimpleButton.SetEnabled(timed, 2);
TimedButton.SetEnabled(!timed, 2);
pause = false;
clock.go();
ready = true;
if (!hints.length) {
bulb.hint = 1;
}
} else {
ready = false;
clock.no(true);
NewGameButton.SetEnabled(false);
UpgradeButton.SetEnabled(false);
help.frame(((_local1 == assist) ? 2 : 3));
SimpleButton.SetEnabled(false);
TimedButton.SetEnabled(false);
pause = true;
}
if (okay) {
ready = false;
clock.no();
doGame(true);
}
}
function EnableButtons(enable) {
if (enable) {
NewGameButton.SetEnabled(true);
UpgradeButton.SetEnabled(true);
help.frame(1);
SimpleButton.SetEnabled(timed, 2);
TimedButton.SetEnabled(!timed, 2);
} else {
NewGameButton.SetEnabled(false);
UpgradeButton.SetEnabled(false);
help.frame(((modal == assist) ? 2 : 3));
SimpleButton.SetEnabled(false);
TimedButton.SetEnabled(false);
}
}
function doGame(done) {
if (LOGUSER && (!HaveCalledGameReady)) {
HaveCalledGameReady = true;
var aMode = (timed ? "timed" : "untimed");
var aParams = (("<data><mode>" + aMode) + "</mode></data>");
DoJSCommand("GameReady", aParams);
EnableButtons(false);
} else {
okay = false;
ready = false;
pause = false;
timed = timep;
EnableButtons(true);
if (score == 0) {
DoJSCommand("pc_gamestart", (timed ? "timed" : "untimed"));
}
if (done) {
var wasReset = false;
if (playing) {
wasReset = true;
playing = false;
}
if (((ShowAd && (hadMove)) && (random(100) < 75)) && (_framesloaded > 81)) {
ready = false;
hadMove = false;
gotoAndPlay (81);
return;
}
InitScore();
playing = true;
bulb.lastScoreBroadcast = getTimer();
}
if (picks.length) {
picks = [];
grid.mark1.removeMovieClip();
grid.mark2.removeMovieClip();
}
if (board[0][0]) {
var _local3 = 0;
while (_local3 < 8) {
var _local2 = 0;
while (_local2 < 8) {
board[_local3][_local2].removeMovieClip();
_local2++;
}
_local3++;
}
}
while (hasSets()) {
board = [];
var _local3 = 0;
while (_local3 < 8) {
board.push([]);
var _local2 = 0;
while (_local2 < 8) {
var _local1 = new Object();
_local1.x = _local3;
_local1.y = _local2;
_local1.z = random(types) + 1;
board[_local3].push(_local1);
_local2++;
}
_local3++;
}
}
var _local3 = 0;
while (_local3 < 8) {
var _local2 = 0;
while (_local2 < 8) {
var _local1 = base.grid.attachMovie("gem", ("gem" + _local3) + _local2, (_local3 + (_local2 * 8)) + 200);
_local1.x = _local3;
_local1.y = _local2;
_local1.z = board[_local3][_local2].z;
_local1._x = _local3 * offset;
_local1._y = (_local2 * offset) - 360;
_local1.filly = 0;
_local1.gotoAndStop(board[_local3][_local2].z);
board[_local3][_local2] = _local1;
_local1._visible = false;
_local1.GemButton.useHandCursor = false;
var aColor = new Color(_local1);
var aTrans = new Object();
aColor.setTransform(aTrans);
_local1.colorTrans = aTrans;
_local1.myColor = aColor;
_local2++;
}
board[_local3].ease = 1;
_local3++;
}
aware.gotoAndStop("off");
doDrop();
}
}
function doDrop() {
if (!queue.length) {
dropCount = 63;
queue = [1];
if (gong.getVolume()) {
gong.setVolume(50);
}
bulb.drop = true;
var _local3 = 0;
while (_local3 < 8) {
var _local1 = 0;
while (_local1 < 8) {
var _local2 = board[_local3][_local1];
_local2._x = _local3 * offset;
_local2._y = _local1 * offset;
_local2._visible = false;
_local1++;
}
_local3++;
}
}
var moves = 0;
var i = 0;
while (i < 3) {
if (dropCount >= 0) {
var aRow = Math.floor(dropCount / 8);
var aCol = (7 - Math.floor(dropCount % 8));
if (!pause) {
board[aCol][aRow]._visible = true;
}
dropCount--;
}
i++;
}
if (!shim) {
shim = getTimer();
}
if ((getTimer() - shim) > 100) {
gong.start(0);
shim = getTimer();
}
if (dropCount < 0) {
dropCount = 0;
queue = [];
qdrop = [];
if (gong.getVolume()) {
gong.setVolume(100);
}
bulb.drop = false;
hints = [];
bulb.hint = 1;
ready = true;
clock.go();
}
}
function doPick(w, x, y) {
var _local1 = w;
if (!ready) {
} else if (_local1 == null) {
if ((((x < 0) || (y < 0)) || (x >= 8)) || (y >= 8)) {
return;
}
_local1 = board[x][y];
if (_local1 == null) {
} else {
if (picks.length == 2) {
picks = [];
grid.mark1.removeMovieClip();
grid.mark2.removeMovieClip();
}
if (picks.length == 0) {
slct.start(0);
}
if (picks.length == 1) {
var _local2 = Math.abs(x - picks[0].x) + Math.abs(_local1.y - picks[0].y);
if ((_local2 == 0) || (_local2 > 1)) {
picks = [];
grid.mark1.removeMovieClip();
grid.mark2.removeMovieClip();
bads.start(0);
if (tell && (!timed)) {
doPause(illegal);
return;
}
return;
}
} else {
picks.unshift(_local1);
var _local3 = base.grid.attachMovie("marker", "mark" + picks.length, picks.length + 900);
_local3._x = _local1._x;
_local3._y = _local1._y;
if (picks.length == 2) {
ready = false;
var z = picks[0].z;
picks[0].z = picks[1].z;
picks[1].z = z;
if (hasSets()) {
hints = [];
bulb.hint = 0;
hadMove = true;
doSwap(1);
} else {
doSwap(2);
}
}
}
}
} else {
if (picks.length == 2) {
picks = [];
grid.mark1.removeMovieClip();
grid.mark2.removeMovieClip();
}
if (picks.length == 0) {
slct.start(0);
}
if (picks.length == 1) {
var _local2 = Math.abs(x - picks[0].x) + Math.abs(_local1.y - picks[0].y);
if ((_local2 == 0) || (_local2 > 1)) {
picks = [];
grid.mark1.removeMovieClip();
grid.mark2.removeMovieClip();
bads.start(0);
if (tell && (!timed)) {
doPause(illegal);
return;
}
return;
}
} else {
picks.unshift(_local1);
var _local3 = base.grid.attachMovie("marker", "mark" + picks.length, picks.length + 900);
_local3._x = _local1._x;
_local3._y = _local1._y;
if (picks.length == 2) {
ready = false;
var z = picks[0].z;
picks[0].z = picks[1].z;
picks[1].z = z;
if (hasSets()) {
hints = [];
bulb.hint = 0;
hadMove = true;
doSwap(1);
} else {
doSwap(2);
}
}
}
}
}
function hasSets() {
var _local1 = 0;
var aLastType = -1;
var _local2 = 0;
while (_local2 < 8) {
_local1 = 1;
var _local3 = 0;
while (_local3 < 7) {
if (board[_local3][_local2].z == board[_local3 + 1][_local2].z) {
_local1++;
if (_local1 > 2) {
return(true);
}
} else {
_local1 = 1;
}
_local3++;
}
_local2++;
}
var _local3 = 0;
while (_local3 < 8) {
_local1 = 1;
_local2 = 0;
while (_local2 < 7) {
if (board[_local3][_local2].z == board[_local3][_local2 + 1].z) {
_local1++;
if (_local1 > 2) {
return(true);
}
} else {
_local1 = 1;
}
_local2++;
}
_local3++;
}
return(false);
}
function doSwap(trips) {
if (trips) {
swing = [2, 3, 5, 8, 8, 5, 3, 2];
swaps = [];
swaps.push(picks[0].x - picks[1].x);
swaps.push(picks[0].y - picks[1].y);
swaps.push(0);
swaps.push(trips);
}
bulb.swap = false;
if (swaps[2] < offset) {
var _local1 = swing.pop();
swaps[2] = swaps[2] + _local1;
picks[0]._x = picks[0]._x - (swaps[0] * _local1);
picks[1]._x = picks[1]._x + (swaps[0] * _local1);
picks[0]._y = picks[0]._y - (swaps[1] * _local1);
picks[1]._y = picks[1]._y + (swaps[1] * _local1);
bulb.swap = true;
} else if (swaps[3] == 1) {
picks[0]._x = picks[0].x * offset;
picks[0]._y = picks[0].y * offset;
picks[1]._x = picks[1].x * offset;
picks[1]._y = picks[1].y * offset;
picks[0].gotoAndStop(picks[0].z);
picks[1].gotoAndStop(picks[1].z);
grid.mark1.removeMovieClip();
grid.mark2.removeMovieClip();
swaps = [];
doKill();
} else if (swaps[3] == 2) {
if (tell && (!timed)) {
doPause(illegal);
}
swing = [2, 3, 5, 8, 8, 5, 3, 2];
swaps[0] = swaps[0] * -1;
swaps[1] = swaps[1] * -1;
swaps[2] = 0;
swaps[3] = 3;
picks[0].swapDepths(picks[1]);
bads.start(0);
bulb.swap = true;
} else if (swaps[3] > 2) {
grid.mark1.removeMovieClip();
grid.mark2.removeMovieClip();
var _local2 = picks[0].z;
picks[0].z = picks[1].z;
picks[1].z = _local2;
picks = [];
swaps = [];
ready = (pause ? false : true);
}
}
function RemoveMarkedGems() {
var _local2;
var col;
var keepCount;
var removeCount;
var _local3;
var _local1;
var moveAmount;
col = 0;
while (col < 8) {
removeCount = 8;
keepCount = 0;
_local2 = 7;
while (_local2 >= 0) {
_local1 = board[col][_local2];
if (!_local1.remove) {
keepCount++;
removeCount--;
if (removeCount != _local2) {
_local3 = board[col][removeCount];
_local3.gotoAndStop((_local3.z = _local1.z));
_local3._y = _local1._y;
_local3.fally = _local1._y;
_local3._visible = true;
}
} else {
_local1.remove = false;
}
_local2--;
}
moveAmount = offset * removeCount;
_local2 = 0;
while (_local2 < removeCount) {
_local1 = board[col][_local2];
_local1._y = _local1._y - moveAmount;
_local1.fally = _local1._y;
_local1._visible = false;
_local1.gotoAndStop((_local1.z = random(types) + 1));
_local2++;
}
col++;
}
}
function doKill() {
var aFoundCount = 0;
var aCumSetX = 0;
var aCumSetY = 0;
var aBiggestSet = 0;
var aRemoveGemCount = 0;
var i;
var i1;
var i2;
var aBomb;
i = 0;
while (i < 2) {
i1 = 0;
while (i1 < 8) {
var _local3 = 0;
var aLastType = -1;
var aFirstMatchRow = 0;
var aFirstMatchCol = 0;
i2 = 0;
while (i2 < 8) {
var aCol;
var aRow;
if (i == 0) {
aCol = i1;
aRow = i2;
} else {
aCol = i2;
aRow = i1;
}
var pieceMatch = false;
var aPiece = board[aCol][aRow];
if (aPiece.z == aLastType) {
pieceMatch = true;
_local3++;
}
if ((!pieceMatch) || (i2 == 7)) {
if (_local3 >= 3) {
aFoundCount++;
var aTotalX = 0;
var aTotalY = 0;
var aMarkRow;
var aMarkCol;
aMarkRow = aFirstMatchRow;
while (aMarkRow <= aRow) {
aMarkCol = aFirstMatchCol;
while (aMarkCol <= aCol) {
var _local2 = board[aMarkCol][aMarkRow];
if (_local2.z == aLastType) {
aTotalX = aTotalX + ((_local2.x * offset) + originx);
aTotalY = aTotalY + ((_local2.y * offset) + originy);
if (!_local2.remove) {
_local2.remove = true;
aRemoveGemCount++;
aBomb = base.grid.attachMovie("gem", "win" + aRemoveGemCount, 10 + aRemoveGemCount);
aBomb._x = _local2.x * offset;
aBomb._y = _local2.y * offset;
aBomb.gotoAndStop(_local2.z);
aBomb._xscale = 100 + (combo * 10);
aBomb._yscale = 100 + (combo * 10);
var aBomb2 = aBomb.attachMovie("bomb", "bomb", 1);
aBomb2.count = getTimer();
}
}
aMarkCol++;
}
aMarkRow++;
}
var anAvgX = (aTotalX / _local3);
var anAvgY = (aTotalY / _local3);
aCumSetX = aCumSetX + anAvgX;
aCumSetY = aCumSetY + anAvgY;
moveClearCount++;
var _local1 = 10;
if (moveClearCount == 1) {
_local1 = _local1 + 0;
} else if (moveClearCount == 2) {
_local1 = _local1 + 10;
} else if (moveClearCount == 3) {
_local1 = _local1 + 20;
} else if (moveClearCount == 4) {
_local1 = _local1 + 30;
} else if (moveClearCount == 5) {
_local1 = _local1 + 50;
} else if (moveClearCount == 6) {
_local1 = _local1 + 70;
} else if (moveClearCount == 7) {
_local1 = _local1 + 100;
} else if (moveClearCount == 8) {
_local1 = _local1 + 150;
} else {
_local1 = _local1 + 10;
}
if (_local3 > 3) {
_local1 = _local1 + ((_local3 - 3) * 10);
}
if (_local3 > 5) {
_local1 = _local1 + ((_local3 - 5) * 10);
}
_local1 = Math.floor(_local1 * mPointMultiplier);
var p = base.attachMovie("pop", "pop" + moveClearCount, 1000 + moveClearCount);
p._x = anAvgX;
p._y = anAvgY;
p._alpha = 100;
p.count = getTimer();
p.score = _local1;
score = score + _local1;
mass = mass + _local3;
if (_local3 > aBiggestSet) {
aBiggestSet = _local3;
}
}
aLastType = aPiece.z;
_local3 = 1;
aFirstMatchCol = aCol;
aFirstMatchRow = aRow;
}
i2++;
}
i1++;
}
i++;
}
RemoveMarkedGems();
if (aFoundCount > 0) {
mark = clock.time;
if (tell) {
tell--;
}
if (timed) {
meter.play();
}
var aNumMinutes = ((getTimer() - startTime) / 60000);
best = ((best < (score - last)) ? (score - last) : (best));
rate = Math.floor((mass / aNumMinutes) * 10) / 10;
if (aBiggestSet > long) {
long = aBiggestSet;
}
prompt.say(score - last);
combo++;
tally.play();
if (aBiggestSet == 3) {
gset.start(0);
} else {
gbig.start(0);
}
if (combo > 6) {
win5.start(0);
} else if (combo > 5) {
win4.start(0);
} else if (combo > 4) {
win3.start(0);
} else if (combo > 3) {
win2.start(0);
} else if (combo > 2) {
win1.start(0);
}
if (aFoundCount > 1) {
mult.start(0);
}
bulb.fill = true;
if (ScoreBroadcast == -1) {
doReport(true);
}
}
}
function doFill() {
if (win0) {
} else {
var moves = 0;
if (fillCount == 0) {
fillCount = getTimer();
} else {
var anElapsed = (getTimer() - fillCount);
if (anElapsed < 150) {
} else {
var aMoveAmount = ((anElapsed * anElapsed) / 2000);
var col = 0;
while (col < 8) {
if (board[col][0]._y < 0) {
var _local2 = 0;
while (_local2 < 8) {
var _local1 = board[col][_local2];
var _local3 = _local2 * offset;
var mov = aMoveAmount;
if (_local1._y != _local3) {
moves++;
if ((!_local1._visible) && (_local1._y > ((-offset) * 2))) {
_local1._visible = true;
}
_local1._y = _local1.fally + mov;
if (_local1._y >= _local3) {
_local1._y = _local3;
_local1._visible = true;
if (!shim) {
shim = getTimer();
}
if ((getTimer() - shim) > 100) {
gong.start(0);
shim = getTimer();
}
}
}
_local2++;
}
}
col++;
}
if (!moves) {
fillCount = 0;
bulb.fill = false;
if (hasSets()) {
doKill();
} else if (bonus) {
doBonus();
} else {
combo = 1;
moveClearCount = 0;
last = score;
ready = true;
hints = [];
bulb.hint = 1;
}
}
}
}
}
}
function doHint(theCheckRow) {
if (!ready) {
hints = [];
bulb.hint = 1;
} else if ((theCheckRow < 0) || (theCheckRow > 7)) {
} else {
if (theCheckRow == 0) {
hints = [];
}
var aTimeNow = getTimer();
var aSwapArray;
var _local2;
var _local1;
var aSwapIdx;
var _local3;
var aSwapCol;
var aSwapPiece;
var aLeftCol;
var aRightCol;
var aTopRow;
var aBottomRow;
aSwapArray = [[1, 0], [0, 1], [-1, 0], [0, -1]];
_local2 = theCheckRow;
_local1 = 0;
while (_local1 < 8) {
aSwapIdx = 0;
while (aSwapIdx < 4) {
aSwapCol = _local1 + aSwapArray[aSwapIdx][0];
_local3 = _local2 + aSwapArray[aSwapIdx][1];
if ((((aSwapCol > -1) && (aSwapCol < 8)) && (_local3 > -1)) && (_local3 < 8)) {
aSwapPiece = board[_local1][_local2].z;
board[_local1][_local2].z = board[aSwapCol][_local3].z;
board[aSwapCol][_local3].z = aSwapPiece;
aLeftCol = _local1;
aRightCol = _local1;
while ((aLeftCol > 0) && (board[_local1][_local2].z == board[aLeftCol - 1][_local2].z)) {
aLeftCol--;
}
while ((aRightCol < 7) && (board[_local1][_local2].z == board[aRightCol + 1][_local2].z)) {
aRightCol++;
}
aTopRow = _local2;
aBottomRow = _local2;
while ((aTopRow > 0) && (board[_local1][_local2].z == board[_local1][aTopRow - 1].z)) {
aTopRow--;
}
while ((aBottomRow < 7) && (board[_local1][_local2].z == board[_local1][aBottomRow + 1].z)) {
aBottomRow++;
}
aSwapPiece = board[_local1][_local2].z;
board[_local1][_local2].z = board[aSwapCol][_local3].z;
board[aSwapCol][_local3].z = aSwapPiece;
if (((aRightCol - aLeftCol) >= 2) || ((aBottomRow - aTopRow) >= 2)) {
hints = [_local1, _local2, aSwapCol, _local3];
aSwapIdx = 4;
_local1 = 8;
_local2 = 8;
}
}
aSwapIdx++;
}
_local1++;
}
if (_local2 < 7) {
} else {
var anElapsed = (getTimer() - aTimeNow);
if (hints.length) {
} else if (timed) {
clock.no(true);
prompt.say("PromptNoMoreMoves");
aware.gotoAndStop("noMoreMoves");
doFall();
} else {
StartGameOverSequence();
}
}
}
}
function StartGameOverSequence() {
ready = false;
clock.no();
if (picks.length) {
picks = [];
grid.mark1.removeMovieClip();
grid.mark2.removeMovieClip();
}
if (timed) {
prompt.say("PromptTimeIsUp");
aware.gotoAndStop("timeIsUp");
} else {
prompt.say("PromptNoMoreMoves");
aware.gotoAndStop("noMoreMoves");
}
bulb.gameOver = true;
gameOverCount = 0;
gameOverCount2 = 0;
preover.start(0);
}
function doGameOver() {
if (gameOverCount2 == 0) {
var i = 0;
while (i < 3) {
var _local1 = false;
if (gameOverCount < 64) {
var aRow = (7 - Math.floor(gameOverCount / 8));
var aCol = Math.floor(gameOverCount % 8);
var _local2 = board[aCol][aRow];
var _local3 = _local2.colorTrans;
_local3.rb = 200;
_local3.gb = 100;
_local3.bb = 100;
_local2.myColor.setTransform(_local3);
_local1 = true;
}
gameOverCount++;
if (!_local1) {
gameOverCount2++;
gameOverCount = 64;
return;
}
i++;
}
} else if (gameOverCount2 == 1) {
var i = 0;
while (i < 5) {
gameOverCount--;
var _local1 = false;
if ((gameOverCount < -10) && (gameOverCount >= -74)) {
var aRow = (7 - Math.floor((gameOverCount + 74) / 8));
var aCol = Math.floor((gameOverCount + 74) % 8);
var _local2 = board[aCol][aRow];
_local2._visible = false;
_local1 = true;
}
if ((gameOverCount < 16) && (gameOverCount >= -48)) {
var aRow = (7 - Math.floor((gameOverCount + 48) / 8));
var aCol = Math.floor((gameOverCount + 48) % 8);
var _local2 = board[aCol][aRow];
_local2._xscale = (_local2._yscale = 75);
var _local3 = _local2.colorTrans;
_local3.rb = -255;
_local3.gb = -255;
_local3.bb = -255;
_local2.myColor.setTransform(_local3);
_local1 = true;
}
if ((gameOverCount < 40) && (gameOverCount >= -24)) {
var aRow = (7 - Math.floor((gameOverCount + 24) / 8));
var aCol = Math.floor((gameOverCount + 24) % 8);
var _local2 = board[aCol][aRow];
var _local3 = _local2.colorTrans;
_local2._xscale = (_local2._yscale = 100);
_local3.ra = 100;
_local3.ga = 100;
_local3.ba = 100;
_local3.rb = -128;
_local3.gb = -255;
_local3.bb = -255;
_local2.myColor.setTransform(_local3);
_local1 = true;
}
if (gameOverCount >= 0) {
var aRow = (7 - Math.floor(gameOverCount / 8));
var aCol = Math.floor(gameOverCount % 8);
var _local2 = board[aCol][aRow];
var _local3 = _local2.colorTrans;
_local3.rb = 200;
_local3.gb = 200;
_local3.bb = 200;
_local2.myColor.setTransform(_local3);
_local2._xscale = (_local2._yscale = 125);
_local1 = true;
}
if (!_local1) {
gameOverCount = 0;
gameOverCount2 = getTimer();
if (gameOverCount2 < 10) {
gameOverCount2 = 10;
}
break;
}
i++;
}
} else {
var anElapsed = (getTimer() - gameOverCount2);
if ((gameOverCount == 0) && (anElapsed > 250)) {
over.start(0);
aware.gotoAndStop("gameOver");
clock.no();
meter._xscale = 0;
gameOverCount++;
} else if ((UseInternalGameOverDialog && (anElapsed > 500)) || ((!UseInternalGameOverDialog) && (anElapsed > 2000))) {
doPause(endgame);
bulb.gameOver = false;
}
}
}
function ShowHint() {
if ((hints.length >= 4) && (!pause)) {
var _local1 = base.grid.attachMovie("hintSparkle", "HintSpark1", 902);
_local1._x = hints[2] * offset;
_local1._y = (hints[3] * offset) - 12;
}
}
function doFall() {
if (!qdrop.length) {
ready = false;
queue = [0, 1, 2, 3, 4, 5, 6, 7];
var i = random(queue.length);
qdrop.push(queue[i]);
queue.splice(i, 1);
if (gong.getVolume()) {
gong.setVolume(50);
}
bulb.fall = true;
}
var moves = 0;
var i = 0;
while (i < qdrop.length) {
var _local3 = qdrop[i];
board[_local3].ease = board[_local3].ease + 0.2;
var _local1 = 0;
while (_local1 < board[_local3].length) {
var _local2 = board[_local3][_local1];
if (_local2._visible) {
_local2._y = _local2._y + ((qrate + _local1) * board[_local3].ease);
moves++;
if (_local2._y > (offset * 9)) {
_local2._visible = false;
}
}
_local1++;
}
i++;
}
if (!board[qdrop[qdrop.length - 1]][4]._visible) {
var i = random(queue.length);
qdrop.push(queue[i]);
queue.splice(i, 1);
}
if (!moves) {
queue = [];
qdrop = [];
if (gong.getVolume()) {
gong.setVolume(100);
}
bulb.fall = false;
doGame();
}
}
function doTally(who) {
scores.push({player:who, local:1, score:score, mode:(timed ? 1 : 0), time:time, rate:rate});
scores.sortOn(score);
}
function doReport(broadcast) {
scoreString = "";
var _local1 = (mGameDuration ? (mGameDuration) : (Math.floor((getTimer() - startTime) / 1000)));
rate = Math.floor((mass / (_local1 / 60)) * 10) / 10;
scoreString = scoreString + "<game>";
scoreString = scoreString + (("<score>" + score) + "</score>");
scoreString = scoreString + (("<mode>" + (timed ? "timed" : "untimed")) + "</mode>");
scoreString = scoreString + (("<time>" + _local1) + "</time>");
scoreString = scoreString + (("<rate>" + rate) + "</rate>");
scoreString = scoreString + (("<long>" + long) + "</long>");
scoreString = scoreString + (("<best>" + best) + "</best>");
scoreString = scoreString + "</game>";
if (ONLINE) {
if (broadcast) {
DoJSCommand("ScoreBroadcast", scoreString);
} else {
DoJSCommand("ScoreSubmit", scoreString);
}
}
}
gotoAndStop ("game");
Instance of Symbol 76 MovieClip "bulb" in Frame 49
onClipEvent (load) {
base = _parent;
used = 0;
hint = 0;
glee = 0;
gameOver = 0;
drop = false;
fall = false;
fill = false;
swap = false;
lastScoreBroadcast = getTimer();
}
onClipEvent (enterFrame) {
if (hint) {
hint++;
if (hint >= 20) {
base.doHint(hint - 20);
if ((hint >= 27) || (base.hints.length > 0)) {
hint = 0;
}
}
}
if (((base.ScoreBroadcast > 0) && (((getTimer() - lastScoreBroadcast) / 1000) > base.ScoreBroadcast)) && (_parent.playing)) {
lastScoreBroadcast = getTimer();
base.doReport(true);
base.DoScoreBroadcast();
}
if ((base.ready && (!base.pause)) && (base.requestPause)) {
base.doPause(base.suspend);
base.requestPause = false;
} else if ((base.pause && (base.alert == base.suspend)) && (base.requestResume)) {
base.suspend.view(true);
base.requestResume = false;
}
if (gameOver) {
base.doGameOver();
}
if (glee) {
glee--;
if (!glee) {
glee = 0;
base.doBonus();
}
}
if (drop) {
used++;
base.doDrop();
}
if (fall) {
used++;
base.doFall();
}
if (fill) {
used++;
base.doFill();
}
if (swap) {
used++;
base.doSwap();
}
if (used) {
used = 0;
updateAfterEvent();
}
}
onClipEvent (keyDown) {
var k = Key.getCode();
if (k == 32) {
if (base.ready && (!base.pause)) {
base.doPause(base.suspend);
} else if (base.pause && (base.alert == base.suspend)) {
base.suspend.view(true);
}
}
}
Instance of Symbol 115 MovieClip [gem] "exportGem" in Frame 49
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 118 MovieClip [pop] "exportHit" in Frame 49
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 129 MovieClip "off" in Frame 49
onClipEvent (load) {
_x = 116;
_visible = false;
}
Instance of Symbol 147 MovieClip "NewGameButton" in Frame 49
//component parameters
onClipEvent (initialize) {
value = 1;
}
Instance of Symbol 147 MovieClip "UpgradeButton" in Frame 49
//component parameters
onClipEvent (initialize) {
value = 4;
}
Instance of Symbol 157 MovieClip "SimpleButton" in Frame 49
//component parameters
onClipEvent (initialize) {
value = 2;
}
Instance of Symbol 157 MovieClip "TimedButton" in Frame 49
//component parameters
onClipEvent (initialize) {
value = 3;
}
Instance of Symbol 183 MovieClip "prompt" in Frame 49
onClipEvent (load) {
function say(what) {
var _local1 = what;
if (_local1 == Number(_local1)) {
_root.Localizer.Localize("_root.prompt.Text_Label", "PromptNumber");
if (_local1 > 0) {
alert = "\r+" + _local1;
} else {
alert = newline + _local1;
}
} else {
_root.Localizer.Localize("_root.prompt.Text_Label", _local1);
}
_alpha = 100;
this.count = 0;
}
_alpha = 0;
}
onClipEvent (enterFrame) {
if (((this.count++) > 40) && (_alpha)) {
_alpha = (_alpha - 3);
if ((_alpha < 0) || (count > 72)) {
_alpha = 0;
alert = "";
}
}
}
Instance of Symbol 202 MovieClip "clock" in Frame 49
//component parameters
onClipEvent (initialize) {
able = true;
tell = "trace";
user = 0;
term = 10;
fine = false;
}
onClipEvent (load) {
_visible = false;
}
Frame 50
stop();
if (!haveLocalizedFrame50) {
if (!ShowMute) {
mute._visible = false;
}
if (!ShowHelp) {
help._visible = false;
}
if (!ShowUpsell) {
UpgradeButton._visible = false;
}
_root.Localizer.Localize("_root.Text_Score", "Score");
_root.Localizer.LocalizeButton("_root.NewGameButton", "NewGame");
_root.Localizer.LocalizeButton("_root.UpgradeButton", "Upgrade");
_root.Localizer.LocalizeButton("_root.SimpleButton", "Mode1");
_root.Localizer.LocalizeButton("_root.TimedButton", "Mode2");
_root.Localizer.LocalizeDropShadow("_root.newgame.Text_Title", "NewGameTitle");
_root.Localizer.LocalizeButton("_root.newgame.YesButton", "NewGameYes");
_root.Localizer.LocalizeButton("_root.newgame.NoButton", "NewGameNo");
_root.Localizer.LocalizeDropShadow("_root.suspend.Text_Title", "PauseTitle");
_root.Localizer.LocalizeButton("_root.suspend.PlayButton", "PausePlay");
_root.Localizer.LocalizeDropShadow("_root.illegal.Text_Title", "IllegalTitle");
_root.Localizer.LocalizeButton("_root.illegal.HelpButton", "IllegalHelp");
_root.Localizer.LocalizeButton("_root.illegal.PlayButton", "IllegalPlay");
_root.Localizer.Localize("_root.illegal.Text_Explanation", "IllegalExplanation");
_root.assist.ShowOptions = true;
_root.Localizer.LocalizeButton("_root.assist.PlayButton", "AssistPlay");
_root.Localizer.LocalizeButton("_root.assist.PlaySimpleButton", "AssistPlaySimple");
_root.Localizer.LocalizeButton("_root.assist.PlayTimedButton", "AssistPlayTimed");
_root.Localizer.Localize("_root.assist.Text_HelpTip1", "AssistTip1");
_root.Localizer.Localize("_root.assist.Text_HelpTip2", "AssistTip2");
_root.Localizer.Localize("_root.assist.Text_HelpTip3", "AssistTip3");
_root.Localizer.Localize("_root.assist.Text_HelpTip4", "AssistTip4");
_root.Localizer.Localize("_root.assist.Text_HelpTip5", "AssistTip5");
_root.Localizer.LocalizeDropShadow("_root.endgame.Text_Title", "EndGameTitle");
_root.Localizer.LocalizeButton("_root.endgame.PlayButton", "EndGamePlay");
_root.Localizer.Localize("_root.endgame.Text_Duration", "EndGameDuration");
_root.Localizer.Localize("_root.endgame.Text_Cleared", "EndGameCleared");
_root.Localizer.Localize("_root.endgame.Text_PerMinute", "EndGamePerMinute");
_root.Localizer.Localize("_root.endgame.Text_BestMove", "EndGameBestMove");
if (_root.Localizer.BarBonus != null) {
_root.Localizer.Localize("_root.Text_BarBonus", "BarBonus");
_root.flash._visible = false;
} else {
_root.Text_BarBonus._visible = false;
}
haveLocalizedFrame50 = true;
okay = false;
doPause(assist);
}
Frame 51
stop();
Frame 52
prevFrame();
Frame 60
if (!playing) {
if (endgame._visible) {
endgame.view(true);
} else {
okay = true;
doPause();
}
}
play();
Frame 61
stop();
Frame 62
stop();
gset.setVolume(0);
mnuc.setVolume(0);
Frame 63
stop();
gset.setVolume(100);
mnuc.setVolume(100);
Frame 65
stop();
if (alert == null) {
okay = false;
aware.gotoAndStop("off");
_root.assist.ShowOptions = true;
doPause(assist);
}
Frame 66
stop();
requestPause = true;
requestResume = false;
Frame 67
stop();
requestResume = true;
requestPause = false;
Frame 70
stop();
doPause();
scoreString = "";
view = clock.doView();
rate = Math.floor((mass / (clock.time / 60000)) * 10) / 10;
flash._visible = false;
clock._visible = true;
Frame 80
stop();
Frame 82
stop();
Interstitial.view();
Symbol 1 MovieClip [BonusBomb] Frame 1
play();
Symbol 1 MovieClip [BonusBomb] Frame 2
if ((getTimer() - this.count) > 1000) {
stop();
_parent.removeMovieClip();
}
if (this.growing) {
_parent._xscale = _parent._xscale * 1.2;
_parent._yscale = _parent._xscale;
if (_parent._xscale > 150) {
growing = false;
}
prevFrame();
return(undefined);
}
if (_parent._xscale > 50) {
_parent._xscale = _parent._xscale * 0.75;
_parent._yscale = _parent._xscale;
prevFrame();
} else {
stop();
_parent.removeMovieClip();
}
Symbol 2 MovieClip [bomb] Frame 1
play();
Symbol 2 MovieClip [bomb] Frame 2
if ((_parent._xscale > 10) && ((getTimer() - count) < 1000)) {
_parent._xscale = _parent._xscale * 0.65;
_parent._yscale = _parent._xscale;
prevFrame();
} else {
stop();
_parent.removeMovieClip();
}
Symbol 7 MovieClip Frame 51
stop();
Symbol 8 MovieClip [hintSparkle] Frame 65
stop();
Symbol 25 MovieClip Frame 1
stop();
pulse = 1;
bonus = 0;
Symbol 25 MovieClip Frame 10
if (bonus) {
bonus = 0;
stop();
} else {
play();
}
Symbol 25 MovieClip Frame 20
pulse--;
(pulse ? (gotoAndPlay (2)) : (gotoAndStop (1)));
Symbol 40 MovieClip Frame 1
done = false;
gotoAndPlay (2);
Symbol 64 MovieClip Frame 1
stop();
Symbol 73 MovieClip Frame 1
stop();
Symbol 73 MovieClip Frame 2
stop();
Symbol 73 MovieClip Frame 3
stop();
Symbol 73 MovieClip Frame 4
stop();
Symbol 73 MovieClip Frame 5
stop();
Symbol 74 MovieClip Frame 1
stop();
_visible = false;
Symbol 74 MovieClip Frame 2
stop();
this._visible = true;
if (_root.Localizer.Bonus.text != null) {
_root.Localizer.LocalizeButton("_root.aware.CoolText", "Bonus");
CoolTextEnglish._visible = false;
} else {
CoolTextEnglish.gotoAndStop(2);
CoolTextEnglish._visible = true;
CoolText._visible = false;
}
Symbol 74 MovieClip Frame 3
stop();
this._visible = true;
if (_root.Localizer.NoMoreMoves.text != null) {
_root.Localizer.LocalizeButton("_root.aware.CoolText", "NoMoreMoves");
CoolTextEnglish._visible = false;
} else {
CoolTextEnglish.gotoAndStop(3);
CoolTextEnglish._visible = true;
CoolText._visible = false;
}
Symbol 74 MovieClip Frame 4
stop();
this._visible = true;
if (_root.Localizer.GameOver.text != null) {
_root.Localizer.LocalizeButton("_root.aware.CoolText", "GameOver");
CoolTextEnglish._visible = false;
} else {
CoolTextEnglish.gotoAndStop(4);
CoolTextEnglish._visible = true;
CoolText._visible = false;
}
Symbol 74 MovieClip Frame 5
stop();
this._visible = true;
if (_root.Localizer.TimeIsUp.text != null) {
_root.Localizer.LocalizeButton("_root.aware.CoolText", "TimeIsUp");
CoolTextEnglish._visible = false;
} else {
CoolTextEnglish.gotoAndStop(5);
CoolTextEnglish._visible = true;
CoolText._visible = false;
}
Symbol 83 MovieClip Frame 1
function sync() {
var _local2 = _parent;
var _local1 = "</font>" + score.toString();
while (_local1.length < 15) {
_local1 = "0" + _local1;
}
panel = "<font color='#18528C'>" + _local1;
if (_local2.score == score) {
return(false);
}
if (Math.abs(_local2.score - score) < 5) {
score = _local2.score;
return(true);
}
var _local3 = Math.floor((_local2.score - score) / 20);
if (Math.abs(_local3) < 5) {
if (_local3 < 0) {
_local3 = -5;
} else {
_local3 = 5;
}
}
score = score + _local3;
if (((score < _local2.score) && (scoreDiff < 0)) || ((score > _local2.score) && (scoreDiff > 0))) {
score = _local2.score;
}
return(true);
}
stop();
if (!active) {
active = false;
score = 0;
panel = "<font color='#18528C'>0000000</font>0";
}
Symbol 83 MovieClip Frame 2
(active ? (play()) : (stop()));
Symbol 83 MovieClip Frame 3
active = sync();
prevFrame();
Symbol 87 Button
on (press) {
this.mMouseX = this._xmouse;
this.mMouseY = this._ymouse;
if (base.ready) {
if (Key.isDown(16) && (base.hack)) {
z = ((z < base.types) ? (z + 1) : 1);
this.gotoAndStop(z);
} else {
base.doPick(this, this.x, this.y);
}
}
}
on (release, releaseOutside) {
if (base.ready) {
var dx = (_xmouse - this.mMouseX);
var dy = (_ymouse - this.mMouseY);
if (Math.abs(dx) > Math.abs(dy)) {
if (dx >= 12) {
base.dopick(null, this.x + 1, this.y);
} else if (dx <= -12) {
base.dopick(null, this.x - 1, this.y);
}
} else if (dy >= 12) {
base.dopick(null, this.x, this.y + 1);
} else if (dy <= -12) {
base.dopick(null, this.x, this.y - 1);
}
}
}
Symbol 91 MovieClip Frame 1
_xscale = 100;
_yscale = 100;
stop();
Symbol 94 MovieClip Frame 1
_xscale = 100;
_yscale = 100;
stop();
Symbol 98 MovieClip Frame 1
_xscale = 100;
_yscale = 100;
stop();
Symbol 102 MovieClip Frame 1
_xscale = 100;
_yscale = 100;
stop();
Symbol 106 MovieClip Frame 1
_xscale = 100;
_yscale = 100;
stop();
Symbol 110 MovieClip Frame 1
_xscale = 100;
_yscale = 100;
stop();
Symbol 114 MovieClip Frame 1
_xscale = 100;
_yscale = 100;
stop();
Symbol 115 MovieClip [gem] Frame 1
base = _parent._parent;
stop();
Symbol 115 MovieClip [gem] Frame 2
stop();
Symbol 115 MovieClip [gem] Frame 3
stop();
Symbol 115 MovieClip [gem] Frame 4
stop();
Symbol 115 MovieClip [gem] Frame 5
stop();
Symbol 115 MovieClip [gem] Frame 6
stop();
Symbol 115 MovieClip [gem] Frame 7
stop();
Symbol 118 MovieClip [pop] Frame 1
play();
Symbol 118 MovieClip [pop] Frame 2
if (((getTimer() - count) < 1000) && (this._alpha > 20)) {
this._y = this._y - 1;
this._alpha = this._alpha * 0.9;
} else {
this.removeMovieClip();
}
Symbol 127 Button
on (rollOver) {
off._visible = false;
}
on (release) {
(gset.getVolume() ? (gset.setVolume(0)) : (gset.setVolume(100)));
(gset.getVolume() ? (mnuc.setVolume(100)) : (mnuc.setVolume(0)));
gset.start();
}
on (rollOut, release, dragOut, releaseOutside) {
off._visible = (gset.getVolume() ? false : true);
}
Symbol 135 Button
on (release) {
if (Key.isDown(16) && (_parent.hack)) {
_parent.gotoAndStop("dbug");
} else if (_parent.ready) {
_parent.mnuc.start(0);
_parent.doPause(_parent.assist);
}
}
Symbol 136 MovieClip Frame 1
function frame(state) {
this.gotoAndStop(state);
}
stop();
Symbol 136 MovieClip Frame 2
stop();
Symbol 136 MovieClip Frame 3
stop();
Symbol 144 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (press) {
gotoAndStop (3);
}
on (release) {
gotoAndStop (2);
_parent.ButtonClicked(value);
}
on (releaseOutside) {
gotoAndStop (1);
}
Symbol 147 MovieClip Frame 1
function SetEnabled(isEnabled) {
Button.enabled = isEnabled;
if (isEnabled) {
gotoAndStop (1);
} else {
gotoAndStop (3);
}
}
UpText._visible = true;
OverText._visible = false;
DownText._visible = false;
stop();
Symbol 147 MovieClip Frame 2
UpText._visible = false;
OverText._visible = true;
DownText._visible = false;
stop();
Symbol 147 MovieClip Frame 3
UpText._visible = false;
OverText._visible = false;
DownText._visible = true;
stop();
Symbol 154 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (press) {
gotoAndStop (3);
}
on (release) {
gotoAndStop (2);
_parent.ButtonClicked(value);
}
on (releaseOutside) {
gotoAndStop (1);
}
Symbol 157 MovieClip Frame 1
function SetEnabled(isEnabled, disabledFrame) {
Button.enabled = isEnabled;
if (isEnabled) {
gotoAndStop (1);
} else if (disabledFrame != null) {
gotoAndStop(disabledFrame);
} else {
gotoAndStop (3);
}
}
UpText._visible = true;
OverText._visible = false;
DownText._visible = false;
stop();
Symbol 157 MovieClip Frame 2
UpText._visible = false;
OverText._visible = true;
DownText._visible = false;
stop();
Symbol 157 MovieClip Frame 3
UpText._visible = false;
OverText._visible = false;
DownText._visible = true;
stop();
Symbol 173 MovieClip Frame 1
function ButtonClicked(v) {
if (v == 1) {
upload = true;
}
_parent.DoGameBreak(true);
view(true);
}
function view(trigger) {
var _local1 = _parent;
var _local2 = this;
if (trigger) {
if (upload) {
_root.Localizer.LocalizeButton("_root.endgame.UploadButton", "EndGameUploaded");
UploadButton.SetEnabled(false);
upload = false;
_local1.doReport(false);
} else if (_local2._y > open) {
if (OldUploadX == 0) {
OldUploadX = UploadButton._x;
OldPlayX = PlayButton._x;
} else {
UploadButton._x = OldUploadX;
PlayButton._x = OldPlayX;
}
if (_local1.REPORT == -1) {
UploadButton._visible = false;
} else if (_local1.REPORT == 0) {
UploadButton._visible = false;
} else {
_root.Localizer.LocalizeButton("_root.endgame.UploadButton", "EndGameUpload");
UploadButton._visible = true;
UploadButton.SetEnabled(true);
}
if (!_local1.UseInternalGameOverDialog) {
PlayButton._visible = false;
}
if (UploadButton._visible && (!PlayButton._visible)) {
UploadButton._x = (UploadButton._x + PlayButton._x) / 2;
} else if ((!UploadButton._visible) && (PlayButton._visible)) {
PlayButton._x = (UploadButton._x + PlayButton._x) / 2;
}
dest = open;
var _local3 = (_local1.mGameDuration ? (_local1.mGameDuration) : (Math.floor((getTimer() - _local1.startTime) / 1000)));
var secs = (_local3 % 60);
var mins = Math.floor(_local3 / 60);
time = (mins + ((secs < 10) ? ":0" : ":")) + secs;
mass = _local1.mass;
rate = Math.floor((_local1.mass / (_local3 / 60)) * 10) / 10;
best = _local1.best;
_local2._visible = true;
} else {
dest = shut;
}
active = true;
_local2.gotoAndPlay(2);
} else {
if (Math.abs(_local2._y - dest) > 18) {
_local2._y = _local2._y - ((_local2._y - dest) / 3);
return(true);
}
_local2._y = dest;
if (dest == shut) {
_local2._visible = false;
_local1.okay = true;
_local1.doPause();
}
return(false);
}
return(undefined);
}
stop();
if (!dist) {
open = this._y;
dist = 312 - open;
shut = open + dist;
dest = open;
upload = false;
OldUploadX = 0;
OldPlayX = 0;
this._y = shut;
this._visible = false;
}
Instance of Symbol 147 MovieClip "UploadButton" in Symbol 173 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
value = 1;
}
Instance of Symbol 147 MovieClip "PlayButton" in Symbol 173 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
value = 0;
}
Symbol 173 MovieClip Frame 2
(active ? (play()) : (stop()));
Symbol 173 MovieClip Frame 3
active = view();
prevFrame();
Symbol 181 MovieClip Frame 1
function ButtonClicked(v) {
if (v != 0) {
_parent.timep = v == 2;
_parent.okay = true;
}
view(true);
}
function view(trigger) {
var _local1 = this;
if (trigger) {
if (_local1._y > open) {
if (_local1.ShowOptions) {
_root.Localizer.LocalizeDropShadow("_root.assist.Text_Title", "AssistIntroTitle");
PlayButton._visible = false;
PlaySimpleButton._visible = true;
PlayTimedButton._visible = true;
_local1.ShowOptions = false;
} else {
_root.Localizer.LocalizeDropShadow("_root.assist.Text_Title", "AssistTitle");
PlayButton._visible = true;
PlaySimpleButton._visible = false;
PlayTimedButton._visible = false;
}
dest = open;
_local1._visible = true;
} else {
dest = shut;
_parent.grid._visible = true;
}
active = true;
_local1.gotoAndPlay(2);
} else {
if (Math.abs(_local1._y - dest) > 18) {
_local1._y = _local1._y - ((_local1._y - dest) / 3);
return(true);
}
_local1._y = dest;
if (dest == shut) {
_local1._visible = false;
_parent.doPause();
} else {
gotoAndStop ("demo");
}
return(false);
}
return(undefined);
}
stop();
if (!dist) {
open = this._y;
dist = 312 - open;
shut = open + dist;
dest = open;
this._y = shut;
this._visible = false;
}
Instance of Symbol 157 MovieClip "PlayButton" in Symbol 181 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
value = 0;
}
Instance of Symbol 147 MovieClip "PlaySimpleButton" in Symbol 181 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
value = 1;
}
Instance of Symbol 147 MovieClip "PlayTimedButton" in Symbol 181 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
value = 2;
}
Symbol 181 MovieClip Frame 2
(active ? (play()) : (stop()));
Symbol 181 MovieClip Frame 3
active = view();
prevFrame();
Instance of Symbol 94 MovieClip "d42" in Symbol 181 MovieClip Frame 6
onClipEvent (load) {
x = 4;
y = 2;
z = 1;
}
Instance of Symbol 98 MovieClip "d11" in Symbol 181 MovieClip Frame 6
onClipEvent (load) {
wait = 40;
swap = false;
used = 0;
}
onClipEvent (enterFrame) {
if (wait) {
wait--;
if (!wait) {
wait = 0;
_parent.doSwap(2);
}
}
if (swap) {
used++;
_parent.doSwap();
}
if (used) {
used = 0;
updateAfterEvent();
}
}
Instance of Symbol 106 MovieClip "d41" in Symbol 181 MovieClip Frame 6
onClipEvent (load) {
x = 4;
y = 1;
z = 1;
}
Instance of Symbol 15 MovieClip [marker] "mark2" in Symbol 181 MovieClip Frame 6
onClipEvent (load) {
gotoAndPlay (6);
}
Symbol 181 MovieClip Frame 7
function doSwap(trips) {
if (trips) {
offset = 36;
picks = [this.d41, this.d42];
swing = [2, 3, 5, 8, 8, 5, 3, 2];
swaps = [];
swaps.push(picks[0].x - picks[1].x);
swaps.push(picks[0].y - picks[1].y);
swaps.push(0);
swaps.push(trips);
}
d11.swap = false;
if (swaps[2] < offset) {
var _local1 = swing.pop();
swaps[2] = swaps[2] + _local1;
picks[0]._x = picks[0]._x - (swaps[0] * _local1);
picks[1]._x = picks[1]._x + (swaps[0] * _local1);
picks[0]._y = picks[0]._y - (swaps[1] * _local1);
picks[1]._y = picks[1]._y + (swaps[1] * _local1);
d11.swap = true;
} else if (swaps[3] == 1) {
} else if (swaps[3] == 2) {
swing = [2, 3, 5, 8, 8, 5, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0];
swaps[0] = swaps[0] * -1;
swaps[1] = swaps[1] * -1;
swaps[2] = 0;
swaps[3] = 3;
picks[0].swapDepths(picks[1]);
mark1._visible = false;
mark2._visible = false;
d32.play();
d41.play();
d52.play();
d11.swap = true;
} else if (swaps[3] > 2) {
mark1._visible = true;
mark2._visible = true;
d11.wait = 60;
}
}
stop();
_parent.grid._visible = false;
Symbol 181 MovieClip Frame 19
stop();
Symbol 187 MovieClip Frame 1
function ButtonClicked(v) {
if (v == 1) {
help = true;
}
view(true);
}
function view(trigger) {
var _local1 = this;
var _local2 = _parent;
if (trigger) {
if (_local1._y > open) {
dest = open;
_local1._visible = true;
} else {
dest = shut;
}
active = true;
_local1.play();
} else {
if (Math.abs(_local1._y - dest) > 18) {
_local1._y = _local1._y - ((_local1._y - dest) / 3);
return(true);
}
_local1._y = dest;
if (dest == shut) {
_local1._visible = false;
if (help) {
help = false;
_local2.pause = false;
_local2.doPause(_local2.assist);
} else {
_local2.doPause();
}
} else {
_local2.tell--;
}
return(false);
}
return(undefined);
}
stop();
if (!dist) {
help = false;
open = this._y;
dist = 312 - open;
shut = open + dist;
dest = open;
this._y = shut;
this._visible = false;
}
Instance of Symbol 157 MovieClip "HelpButton" in Symbol 187 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
value = 1;
}
Instance of Symbol 157 MovieClip "PlayButton" in Symbol 187 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
value = 0;
}
Symbol 187 MovieClip Frame 2
(active ? (play()) : (stop()));
Symbol 187 MovieClip Frame 3
active = view();
prevFrame();
Symbol 188 Button
on (release) {
view(true);
}
Symbol 191 MovieClip Frame 1
function ButtonClicked(v) {
view(true);
}
function view(trigger) {
var _local1 = this;
if (trigger) {
if (_local1._y > open) {
dest = open;
_local1._visible = true;
} else {
dest = shut;
}
active = true;
_local1.play();
} else {
if (Math.abs(_local1._y - dest) > 18) {
_local1._y = _local1._y - ((_local1._y - dest) / 3);
return(true);
}
_local1._y = dest;
if (dest == shut) {
_local1._visible = false;
_parent.doPause();
}
return(false);
}
return(undefined);
}
stop();
if (!dist) {
open = this._y;
dist = 312 - open;
shut = open + dist;
dest = open;
this._y = shut;
this._visible = false;
}
Instance of Symbol 157 MovieClip "PlayButton" in Symbol 191 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
value = 0;
}
Symbol 191 MovieClip Frame 2
(active ? (play()) : (stop()));
Symbol 191 MovieClip Frame 3
active = view();
prevFrame();
Symbol 194 MovieClip Frame 1
function ButtonClicked(v) {
if (v == 1) {
_parent.okay = true;
}
view(true);
}
function view(trigger) {
var _local1 = this;
if (trigger) {
if (_local1._y > open) {
dest = open;
_local1._visible = true;
} else {
dest = shut;
}
active = true;
_local1.play();
} else {
if (Math.abs(_local1._y - dest) > 18) {
_local1._y = _local1._y - ((_local1._y - dest) / 3);
return(true);
}
_local1._y = dest;
if (dest == shut) {
_local1._visible = false;
_parent.doPause();
}
return(false);
}
return(undefined);
}
stop();
if (!dist) {
open = this._y;
dist = 312 - open;
shut = open + dist;
dest = open;
this._y = shut;
this._visible = false;
}
Instance of Symbol 157 MovieClip "YesButton" in Symbol 194 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
value = 1;
}
Instance of Symbol 157 MovieClip "NoButton" in Symbol 194 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
value = 0;
}
Symbol 194 MovieClip Frame 2
(active ? (play()) : (stop()));
Symbol 194 MovieClip Frame 3
active = view();
prevFrame();
Symbol 196 MovieClip Frame 1
stop();
Symbol 198 MovieClip Frame 1
stop();
Symbol 202 MovieClip Frame 1
function go() {
able = true;
mark = getTimer();
gotoAndPlay ("run");
}
function no(pause) {
if (pause) {
save = time;
} else {
save = 0;
mean = 0;
}
mark = 0;
gotoAndStop ("off");
}
function doView() {
var _local1;
var _local2;
_local2 = Math.floor(time / 60000);
_local1 = Math.floor((time - (_local2 * 60000)) / 1000);
view = (_local2 + ((_local1 < 10) ? ":0" : ":")) + _local1;
if (fine) {
var _local3 = Math.floor(((time - (_local2 * 60000)) - (_local1 * 1000)) / 10);
view = view + ("." + ((_local3 < 10) ? (_local3 + "0") : (_local3)));
}
return(view);
}
function doRun() {
var _local1 = _parent;
_local1.UpdateBar();
if (((time - _local1.mark) > (_local1.auto * 1000)) && (_local1.hints.length)) {
if (_local1.ready) {
_local1.prompt.say("PromptTakeAHint");
_local1.ShowHint();
}
_local1.mark = time;
}
if (_visible) {
doView();
}
}
gotoAndStop ("off");
var mark = 0;
var time = 0;
var view = "";
var down = 0;
var mean = 0;
var able = false;
var fine = false;
var tell = false;
var user = "";
var term = 0;
Symbol 202 MovieClip Frame 10
time = (save + getTimer()) - mark;
doRun();
play();
Symbol 202 MovieClip Frame 11
prevFrame();
Symbol 202 MovieClip Frame 20
(able ? (stop()) : (gotoAndStop ("not")));
Symbol 202 MovieClip Frame 21
prevFrame();
Symbol 202 MovieClip Frame 30
stop();
Symbol 202 MovieClip Frame 31
stop();
Symbol 202 MovieClip Frame 32
prevFrame();
Symbol 208 MovieClip Frame 1
stop();
pulse = 1;
bonus = 0;
Symbol 208 MovieClip Frame 10
if (bonus) {
bonus = 0;
stop();
} else {
play();
}
Symbol 208 MovieClip Frame 20
pulse--;
(pulse ? (gotoAndPlay (2)) : (gotoAndStop (1)));
Symbol 221 Button
on (release) {
_parent.launchUpgradePage();
}
Symbol 226 Button
on (release) {
_parent.okay = true;
_parent.pause = true;
_parent.doPause();
gotoAndStop (1);
_parent.gotoAndStop("game");
}
Symbol 234 MovieClip Frame 1
stop();
Symbol 236 MovieClip Frame 1
stop();
Symbol 238 MovieClip Frame 1
stop();
Symbol 239 MovieClip Frame 1
stop();
Symbol 240 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 1
stop();
Symbol 243 MovieClip Frame 1
stop();
Symbol 249 MovieClip Frame 1
function view() {
gotoAndPlay (2);
this._visible = true;
}
stop();
Symbol 249 MovieClip Frame 89
gotoAndPlay (2);