Frame 1
stop();
Instance of Symbol 90 MovieClip in Frame 1
onClipEvent (load) {
b = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
l = _root.getBytesLoaded();
p = (l / b) * 100;
text = Math.floor(p);
text = text + "%";
if (l >= b) {
_root.gotoAndPlay("init");
}
}
Frame 2
function rCheck(_field, i, j) {
_selected.push(_field[i][j]);
var _local1 = 0;
while (_local1 < 4) {
var _local2 = _field[i + di[_local1]][j + dj[_local1]];
if ((((_local2._currentframe == _color) || (_local2._currentframe == TL_BOMB)) || (_local2._currentframe == (9 + _color))) && (!_selected.search(_local2))) {
rCheck(_field, i + di[_local1], j + dj[_local1]);
}
_local1++;
}
}
function rBCheck(_field, tile) {
power = 0;
playSound("snd_bomb");
var _local6 = new Object();
_local6.x = tile._x;
_local6.y = tile._y;
tile._parent.localToGlobal(_local6);
t_bombdamage._x = _local6.x + (tile._width / 2);
t_bombdamage._y = _local6.y + (tile._height / 2);
var _local4 = 0;
var _local2 = 0;
while (_local2 < 12) {
var _local1 = 15;
while (_local1 > -1) {
if (_field[_local1][_local2]._currentframe == TL_CLEAR) {
break;
}
if (_field[_local1][_local2].hitTest(t_bombdamage)) {
if (_field[_local1][_local2]._currentframe == TL_BOMB) {
power = power + 1;
t_bombdamage._width = t_bombdamage._width + 20;
t_bombdamage._height = t_bombdamage._height + 20;
}
if ((TL_CBOMB <= _field[_local1][_local2]._currentframe) && (_field[_local1][_local2]._currentframe < (TL_CBOMB + 4))) {
rCCheck(_field, _field[_local1][_local2]);
}
explode(_field[_local1][_local2], tile._currentframe, _local4);
_local4++;
_selected.push(_field[_local1][_local2]);
}
_local1--;
}
_local2++;
}
}
function rCCheck(_field, tile) {
playSound("snd_bomb");
var _local5 = 0;
var _local2 = 0;
while (_local2 < 12) {
var _local1 = 15;
while (_local1 > -1) {
if ((_field[_local1][_local2]._currentframe == (tile._currentframe - 9)) || (_field[_local1][_local2]._currentframe == tile._currentframe)) {
explode(_field[_local1][_local2], tile._currentframe, _local5);
_local5++;
_selected.push(_field[_local1][_local2]);
}
if (_field[_local1][_local2]._currentframe == TL_CLEAR) {
break;
}
_local1--;
}
_local2++;
}
}
function pause() {
if (isProcess(PS_PAUSE)) {
_IGNOREUSER = false;
killProcess(PS_PAUSE);
removeMovieClip(w_pause);
} else {
t_pause.duplicateMovieClip("w_pause", 10000);
_root.w_pause.weblink.html = true;
_root.w_pause.weblink.setTextFormat(_root.moreGamesLink);
if (_IGNOREUSER) {
return(undefined);
}
_IGNOREUSER = true;
startProcess(PS_PAUSE, 0);
}
}
function countPoints(selectedLen) {
points = points + selectedLen;
_root._points = points;
}
function preGame() {
_IGNOREUSER = false;
killAllProcess();
removeMovieClip(field);
removeMovieClip(w_pause);
removeMovieClip(w_hiscores);
removeMovieClip(w_promt);
t_pregame.duplicateMovieClip("preScreen", 12345);
t_menu.duplicateMovieClip("w_menu", 123456);
_root.preScreen.weblink.html = true;
_root.preScreen.weblink.selectable = false;
_root.preScreen.weblink.setTextFormat(_root.moreGamesLink);
if (ARCADE) {
w_menu.arcade.gotoAndStop(2);
} else {
w_menu.arcade.gotoAndStop(1);
}
soundon = settings.data.sound;
if (soundon == undefined) {
soundon = true;
}
musicon = settings.data.music;
if (musicon) {
musicEng.soundOn();
_root.preScreen.music_btn.gotoAndStop(1);
_root.music_btn.gotoAndStop(1);
} else {
musicEng.soundOff();
_root.preScreen.music_btn.gotoAndStop(2);
_root.music_btn.gotoAndStop(2);
}
if (soundon) {
_root.sound_btn.gotoAndStop(1);
} else {
_root.sound_btn.gotoAndStop(2);
}
}
function playSound(snd, col) {
if (_root.soundon) {
so = new Sound();
so.attachSound(snd);
if (col == undefined) {
col = 1;
}
so.start(0, 1);
}
}
function barcade() {
if (ARCADE) {
ARCADE = false;
w_menu.arcade.gotoAndStop(1);
} else {
ARCADE = true;
w_menu.arcade.gotoAndStop(2);
}
}
function playAgain() {
killAllProcess();
removeMovieClip(w_pause);
initGame();
_root._IGNOREUSER = false;
}
function showReady() {
_root._IGNOREUSER = true;
field.ST_STOP = true;
clip = t_getready.duplicateMovieClip("getready", 16777);
clip.title = ("Level " + levelNum) + " \n Get Ready";
}
function showOfflinePrompt() {
_root._IGNOREUSER = true;
field.ST_STOP = true;
clip = t_offline.duplicateMovieClip("promt", 16777);
BTN_QUIT = true;
field.clear();
}
function ready() {
removeMovieClip(getready);
field.ST_STOP = false;
_IGNOREUSER = false;
}
function showPromt(_text) {
pause_btn._visible = true;
t_promt.duplicateMovieClip("promt", 19876);
promt._text = _text;
_IGNOREUSER = true;
field.ST_STOP = true;
}
function ok() {
removeMovieClip(promt);
_IGNOREUSER = false;
caseBtn();
field.ST_STOP = false;
if (_root.BTN_EXIT) {
exit();
}
}
function cancel() {
removeMovieClip(promt);
_IGNOREUSER = false;
field.ST_STOP = false;
if (BTN_CLEAR) {
t_hiscores._visible = true;
}
if (BTN_EXIT) {
w_menu._visible = true;
}
BTN_CLEAR = false;
BTN_EXIT = false;
BTN_QUIT = false;
BTN_PLAYAGAIN = false;
}
function caseBtn() {
if (BTN_QUIT) {
preGame();
} else if (BTN_PLAYAGAIN) {
playAgain();
}
BTN_QUIT = false;
BTN_PLAYAGAIN = false;
_IGNOREUSER = false;
}
function defineScoresTable() {
hiScores.data.arr = new Array();
if ((HSINDEX == 0) || (HSINDEX == 1)) {
var _local2 = 0;
while (_local2 < 10) {
hiScores.data.arr.push({name:_root.defUsersStalagmite[_local2].name, scores:_root.defUsersStalagmite[_local2].scores});
_local2++;
}
} else {
var _local2 = 0;
while (_local2 < 10) {
hiScores.data.arr.push({name:_root.defUsersStalactite[_local2].name, scores:_root.defUsersStalactite[_local2].scores});
_local2++;
}
}
}
function showInstructions() {
removeMovieClip(w_menu);
t_instruction.duplicateMovieClip("w_instruction", 123456);
}
function hideInstruction() {
removeMovieClip(w_instruction);
t_menu.duplicateMovieClip("w_menu", 123456);
if (ARCADE) {
w_menu.arcade.gotoAndStop(2);
} else {
w_menu.arcade.gotoAndStop(1);
}
}
function soundOnOff() {
if (soundon) {
_root.sound_btn.gotoAndStop(2);
} else {
_root.sound_btn.gotoAndStop(1);
}
soundon = !soundon;
settings.data.sound = soundon;
}
function musicOnOff() {
if (musicon) {
musicEng.soundOff();
_root.music_btn.gotoAndStop(2);
_root.preScreen.music_btn.gotoAndStop(2);
} else {
musicEng.soundOn();
_root.music_btn.gotoAndStop(1);
_root.preScreen.music_btn.gotoAndStop(1);
}
musicon = !musicon;
settings.data.music = musicon;
}
function stalagmite() {
if (ARCADE) {
HSINDEX = 0;
} else {
HSINDEX = 1;
}
initGame();
}
function stalactite() {
if (ARCADE) {
HSINDEX = 2;
} else {
HSINDEX = 3;
}
initGame();
}
function clearScores() {
removeMovieClip("promt");
_root.defineScoresTable();
_root.showScores();
t_hiscores._visible = true;
_IGNOREUSER = false;
BTN_CLEAR = false;
}
function explode(tile, col, d) {
var _local3 = "botexpl" add col;
_root.field.attachMovie(_local3, "expl" add d, (1000000 + _root.getNextHighestDepth()) + d);
_root.field["expl" add d].stop();
_root.field["expl" add d]._width = 33.6;
_root.field["expl" add d]._height = 33.6;
_root.field["expl" add d]._x = tile._x;
_root.field["expl" add d]._y = tile._y;
_root.field["expl" add d].play();
}
function exit() {
fscommand ("quit");
fscommand ("this.close");
}
function showHint(_text, sender) {
sender.attachMovie("hint", "w_hint", 19876);
with (sender.w_hint) {
txt.text = _text;
_x = sender._xmouse;
_y = sender._ymouse;
_visible = true;
}
}
function hideHint(sender) {
removeMovieClip(sender.w_hint);
}
function makeField(name, x, y, depth) {
var _local1 = t_field.duplicateMovieClip(name, depth);
_local1._x = x;
_local1._y = y;
return(_local1);
}
function mainProcess() {
var _local1 = 0;
while (_local1 < PROCESS.length) {
switch (PROCESS[_local1]) {
case PS_PAUSE :
return(undefined);
case PS_GAME :
game();
}
_local1++;
}
}
function startProcess(ps, priority) {
if (priority == undefined) {
PROCESS.push(ps);
} else {
PROCESS.splice(priority, 0, ps);
}
}
function killProcess(ps) {
var _local1 = 0;
while (_local1 < PROCESS.length) {
if (PROCESS[_local1] == ps) {
PROCESS.splice(_local1, 1);
}
_local1++;
}
}
function killAllProcess() {
PROCESS = new Array();
}
function isProcess(ps) {
var _local1 = 0;
while (_local1 < PROCESS.length) {
if (PROCESS[_local1] == ps) {
return(true);
}
_local1++;
}
return(false);
}
function press(tile) {
if (_IGNOREUSER) {
return(undefined);
}
if (tile._type == "line") {
tile._parent.lineFill();
} else {
check(tile._parent, tile);
}
}
function check(field, tile) {
_selected.length = 0;
if (tile._currentframe == TL_BOMB) {
rBCheck(field._field, tile);
countPoints(_selected.length);
field.remove(_selected);
return(undefined);
}
if (tile._currentframe > 10) {
rCCheck(field._field, tile);
countPoints(_selected.length);
field.remove(_selected);
return(undefined);
}
_color = tile._currentframe;
rCheck(field._field, tile._i, tile._j);
if (_selected.length > 2) {
playSound("snd_hit");
countPoints(_selected.length);
field.remove(_selected);
}
}
function initGame() {
removeMovieClip(w_menu);
removeMovieClip(preScreen);
removeMovieClip(field);
makeField("field", FIELDX, FIELDY, 1000);
startProcess(PS_GAME);
_root.levelNum = 0;
_root._points = 0;
_root.points = 0;
_root._lNum = 0;
_root._linesLeft = 0;
field.gmLevel = cl_levels[0];
_root._lNum = 1;
levelNum++;
_root.music.stop();
_root.music.attachSound("mus_gameplay");
if (_root.musicon) {
_root.music.start(0, 9999);
_root.music_btn.gotoAndStop(1);
} else {
_root.music_btn.gotoAndStop(2);
}
if (HSINDEX < 2) {
rack._y = RACKDOWNY;
} else {
rack._y = RACKUPY;
}
if ((HSINDEX % 2) == 0) {
ARCADE = false;
} else {
ARCADE = true;
}
_root.barcade();
}
function removeClassic() {
removeMovieClip("field");
killProcess(PS_GAME);
}
function game() {
field.main();
}
function gameOver() {
field.stop();
_IGNOREUSER = true;
}
function nextLevel() {
if (ARCADE) {
playSound("snd_nextLevel");
}
field.settings(levelNum);
levelNum++;
_root._lNum = levelNum;
}
function classicLevelFinish() {
killProcess(PS_GAME);
startProcess(PS_LEVELFINISH);
}
function bonus(num) {
playSound("snd_bonus");
_root._bonus = num;
t_bonus.duplicateMovieClip("bonus", _root.getNextHighestDepth());
_root.bonus.play();
}
var TL_CLEAR = 1;
var TL_BOMB = 10;
var TL_CBOMB = 11;
var TL_OVER = 20;
var TL_EBOMB = 25;
var TL_STAR = 26;
var FIELDX = 238;
var FIELDY = 33;
var LINEYDOWN = 515;
var LINEYUP = -5;
var RACKDOWNY = 564;
var RACKUPY = 45;
var ARCADE = false;
var BOMB_SIZE = 130;
var moreGamesLink = new TextFormat();
moreGamesLink.url = "http://www.doublegames.com/?fr=superblockson";
var buyGameLink = new TextFormat();
buyGameLink.url = "http://www.doublegames.com/order.html?fr=superblockson";
var downloadLink = new TextFormat();
downloadLink.url = "http://www.doublegames.com/downloads.html?fr=superblockson";
t_tile._visible = false;
t_bombdamage._visible = false;
t_field._visible = false;
t_pause._visible = false;
t_pregame._visible = false;
t_quit._visible = false;
t_getready._visible = false;
t_promt._visible = false;
t_menu._visible = false;
t_instruction._visible = false;
t_bonus._visible = false;
t_hint._visible = false;
t_offline._visible = false;
linesLeft_lbl.selectable = false;
lNum_lbl.selectable = false;
points_lbl.selectable = false;
var soundon;
var musicon;
var levelNum = 0;
var _bonus = 0;
var _selected = new Array();
var musicEng = (new com.itpremium.utils.WaveEngine(2));
var settings = SharedObject.getLocal("superblocks_v1.0");
_selected.search = function (elem) {
var _local2 = 0;
while (_local2 < this.length) {
if (this[_local2] == elem) {
return(true);
}
_local2++;
}
return(false);
};
var points = 0;
var di = new Array(0, 0, 1, -1);
var dj = new Array(1, -1, 0, 0);
var PS_GAME = 1;
var PS_DROPDOWN = 2;
var PS_CENTRALIZE = 3;
var PS_PAUSE = 10;
var PROCESS = new Array();
globalMusicID = musicEng.addStream("mus_gameplay");
musicEng.play(globalMusicID, 0, 999);
musicEng.soundOff();
preGame();
Frame 3
mainProcess();
Frame 4
gotoAndPlay ("game");
Symbol 11 MovieClip [botexpl14] Frame 5
removeMovieClip(this);
Symbol 13 MovieClip [botexpl13] Frame 5
removeMovieClip(this);
Symbol 15 MovieClip [botexpl11] Frame 5
removeMovieClip(this);
Symbol 18 MovieClip [botexpl12] Frame 5
removeMovieClip(this);
Symbol 26 MovieClip [botexpl10] Frame 5
removeMovieClip(this);
Symbol 37 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 40 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(background_mc, "background");
Symbol 43 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(background_mc, "backgroundDisabled");
Symbol 45 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(background_mc, "backgroundDisabled");
Symbol 48 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(check_mc, "foregroundDisabled");
Symbol 51 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(check_mc, "check");
Symbol 52 MovieClip [fcb_states] Frame 1
stop();
Symbol 52 MovieClip [fcb_states] Frame 2
stop();
Symbol 52 MovieClip [fcb_states] Frame 3
stop();
Symbol 52 MovieClip [fcb_states] Frame 4
stop();
Symbol 52 MovieClip [fcb_states] Frame 5
stop();
Symbol 52 MovieClip [fcb_states] Frame 6
stop();
Symbol 55 MovieClip [FLabelSymbol] Frame 1
#initclip 3
_global.FLabelClass = function () {
if (this.hostComponent == undefined) {
this.hostComponent = ((this._parent.controller == undefined) ? (this._parent) : (this._parent.controller));
}
if (this.customTextStyle == undefined) {
if (this.hostComponent.textStyle == undefined) {
this.hostComponent.textStyle = new TextFormat();
}
this.textStyle = this.hostComponent.textStyle;
this.enable = true;
}
};
FLabelClass.prototype = new MovieClip();
Object.registerClass("FLabelSymbol", FLabelClass);
FLabelClass.prototype.setLabel = function (label) {
var _local2 = this.hostComponent.styleTable.embedFonts.value;
if (_local2 != undefined) {
this.labelField.embedFonts = _local2;
}
this.labelField.setNewTextFormat(this.textStyle);
this.labelField.text = label;
this.labelField._height = this.labelField.textHeight + 2;
};
FLabelClass.prototype.setSize = function (width) {
this.labelField._width = width;
};
FLabelClass.prototype.setEnabled = function (enable) {
this.enable = enable;
var _local2 = this.hostComponent.styleTable[(enable ? "textColor" : "textDisabled")].value;
if (_local2 == undefined) {
_local2 = (enable ? 0 : 8947848);
}
this.setColor(_local2);
};
FLabelClass.prototype.getLabel = function () {
return(this.labelField.text);
};
FLabelClass.prototype.setColor = function (col) {
this.labelField.textColor = col;
};
#endinitclip
Symbol 56 MovieClip [FUIComponentSymbol] Frame 1
#initclip 2
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
FUIComponentClass.prototype.init = function () {
this.enable = true;
this.focused = false;
this.useHandCursor = false;
this._accImpl = new Object();
this._accImpl.stub = true;
this.styleTable = new Array();
if (_global.globalStyleFormat == undefined) {
_global.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_global._focusControl = new Object();
_global._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_global._focusControl);
}
if (this._name != undefined) {
this._focusrect = false;
this.tabEnabled = true;
this.focusEnabled = true;
this.tabChildren = false;
this.tabFocused = true;
if (this.hostStyle == undefined) {
globalStyleFormat.addListener(this);
} else {
this.styleTable = this.hostStyle;
}
this.deadPreview._visible = false;
this.deadPreview._width = (this.deadPreview._height = 1);
this.methodTable = new Object();
this.keyListener = new Object();
this.keyListener.controller = this;
this.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
this.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
for (var _local3 in this.styleFormat_prm) {
this.setStyleProperty(_local3, this.styleFormat_prm[_local3]);
}
}
};
FUIComponentClass.prototype.setEnabled = function (enabledFlag) {
this.enable = ((arguments.length > 0) ? (enabledFlag) : true);
this.tabEnabled = (this.focusEnabled = enabledFlag);
if ((!this.enable) && (this.focused)) {
Selection.setFocus(undefined);
}
};
FUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FUIComponentClass.prototype.setSize = function (w, h) {
this.width = w;
this.height = h;
this.focusRect.removeMovieClip();
};
FUIComponentClass.prototype.setChangeHandler = function (chng, obj) {
this.handlerObj = ((obj == undefined) ? (this._parent) : (obj));
this.changeHandler = chng;
};
FUIComponentClass.prototype.invalidate = function (methodName) {
this.methodTable[methodName] = true;
this.onEnterFrame = this.cleanUI;
};
FUIComponentClass.prototype.cleanUI = function () {
if (this.methodTable.setSize) {
this.setSize(this.width, this.height);
} else {
this.cleanUINotSize();
}
this.methodTable = new Object();
delete this.onEnterFrame;
};
FUIComponentClass.prototype.cleanUINotSize = function () {
for (var _local2 in this.methodTable) {
this[_local2]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var _local4 = this.styleTable.focusRectInner.value;
var _local5 = this.styleTable.focusRectOuter.value;
if (_local4 == undefined) {
_local4 = 16777215 /* 0xFFFFFF */;
}
if (_local5 == undefined) {
_local5 = 0;
}
this.createEmptyMovieClip("focusRect", 1000);
this.focusRect.controller = this;
this.focusRect.lineStyle(1, _local5);
this.focusRect.moveTo(x, y);
this.focusRect.lineTo(x + w, y);
this.focusRect.lineTo(x + w, y + h);
this.focusRect.lineTo(x, y + h);
this.focusRect.lineTo(x, y);
this.focusRect.lineStyle(1, _local4);
this.focusRect.moveTo(x + 1, y + 1);
this.focusRect.lineTo((x + w) - 1, y + 1);
this.focusRect.lineTo((x + w) - 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, y + 1);
};
FUIComponentClass.prototype.pressFocus = function () {
this.tabFocused = false;
this.focusRect.removeMovieClip();
Selection.setFocus(this);
};
FUIComponentClass.prototype.drawFocusRect = function () {
this.drawRect(-2, -2, this.width + 4, this.height + 4);
};
FUIComponentClass.prototype.myOnSetFocus = function () {
this.focused = true;
Key.addListener(this.keyListener);
if (this.tabFocused) {
this.drawFocusRect();
}
};
FUIComponentClass.prototype.myOnKillFocus = function () {
this.tabFocused = true;
this.focused = false;
this.focusRect.removeMovieClip();
Key.removeListener(this.keyListener);
};
FUIComponentClass.prototype.executeCallBack = function () {
this.handlerObj[this.changeHandler](this);
};
FUIComponentClass.prototype.updateStyleProperty = function (styleFormat, propName) {
this.setStyleProperty(propName, styleFormat[propName], styleFormat.isGlobal);
};
FUIComponentClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
if (value == "") {
return(undefined);
}
var _local17 = parseInt(value);
if (!isNaN(_local17)) {
value = _local17;
}
var _local16 = ((arguments.length > 2) ? (isGlobal) : false);
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].useGlobal || (!_local16)) {
this.styleTable[propName].value = value;
if (this.setCustomStyleProperty(propName, value)) {
} else if (propName == "embedFonts") {
this.invalidate("setSize");
} else if (propName.subString(0, 4) == "text") {
if (this.textStyle == undefined) {
this.textStyle = new TextFormat();
}
var _local18 = propName.subString(4, propName.length);
this.textStyle[_local18] = value;
this.invalidate("setSize");
} else {
for (var _local15 in this.styleTable[propName].coloredMCs) {
var _local4 = new Color(this.styleTable[propName].coloredMCs[_local15]);
if (this.styleTable[propName].value == undefined) {
var _local5 = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
_local4.setTransform(_local5);
} else {
_local4.setRGB(value);
}
}
}
this.styleTable[propName].useGlobal = _local16;
}
};
FUIComponentClass.prototype.registerSkinElement = function (skinMCRef, propName) {
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].coloredMCs == undefined) {
this.styleTable[propName].coloredMCs = new Object();
}
this.styleTable[propName].coloredMCs[skinMCRef] = skinMCRef;
if (this.styleTable[propName].value != undefined) {
var _local4 = new Color(skinMCRef);
_local4.setRGB(this.styleTable[propName].value);
}
};
_global.FStyleFormat = function () {
this.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true};
this.listeners = new Object();
this.isGlobal = false;
if (arguments.length > 0) {
for (var _local3 in arguments[0]) {
this[_local3] = arguments[0][_local3];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var _local3 = 0;
while (_local3 < arguments.length) {
var _local4 = arguments[_local3];
this.listeners[arguments[_local3]] = _local4;
for (var _local5 in this) {
if (this.isAStyle(_local5)) {
_local4.updateStyleProperty(this, _local5.toString());
}
}
_local3++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
this.listeners[component] = undefined;
for (var _local4 in this) {
if (this.isAStyle(_local4)) {
if (component.styleTable[_local4].useGlobal == this.isGlobal) {
component.styleTable[_local4].useGlobal = true;
var _local3 = (this.isGlobal ? undefined : (globalStyleFormat[_local4]));
component.setStyleProperty(_local4, _local3, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var _local6 = 0;
for (var _local5 in this.listeners) {
var _local3 = this.listeners[_local5];
if (arguments.length > 0) {
var _local4 = 0;
while (_local4 < arguments.length) {
if (this.isAStyle(arguments[_local4])) {
_local3.updateStyleProperty(this, arguments[_local4]);
}
_local4++;
}
} else {
for (var _local4 in this) {
if (this.isAStyle(_local4)) {
_local3.updateStyleProperty(this, _local4.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 59 MovieClip [FBoundingBoxSymbol] Frame 1
var component = _parent;
component.registerSkinElement(boundingBox, "background");
stop();
Symbol 59 MovieClip [FBoundingBoxSymbol] Frame 2
component.registerSkinElement(boundingBox2, "backgroundDisabled");
stop();
Symbol 62 MovieClip [FCheckBoxSymbol] Frame 1
#initclip 4
function FCheckBoxClass() {
this.init();
}
FCheckBoxClass.prototype = new FUIComponentClass();
Object.registerClass("FCheckBoxSymbol", FCheckBoxClass);
FCheckBoxClass.prototype.init = function () {
super.setSize(this._width, this._height);
this.boundingBox_mc.unloadMovie();
this.attachMovie("fcb_hitArea", "fcb_hitArea_mc", 1);
this.attachMovie("fcb_states", "fcb_states_mc", 2);
this.attachMovie("FLabelSymbol", "fLabel_mc", 3);
super.init();
this.setChangeHandler(this.changeHandler);
this._xscale = 100;
this._yscale = 100;
this.setSize(this.width, this.height);
if (this.initialValue == undefined) {
this.setCheckState(false);
} else {
this.setCheckState(this.initialValue);
}
if (this.label != undefined) {
this.setLabel(this.label);
}
this.ROLE_SYSTEM_CHECKBUTTON = 44;
this.STATE_SYSTEM_CHECKED = 16;
this.EVENT_OBJECT_STATECHANGE = 32778;
this.EVENT_OBJECT_NAMECHANGE = 32780;
this._accImpl.master = this;
this._accImpl.stub = false;
this._accImpl.get_accRole = this.get_accRole;
this._accImpl.get_accName = this.get_accName;
this._accImpl.get_accState = this.get_accState;
this._accImpl.get_accDefaultAction = this.get_accDefaultAction;
this._accImpl.accDoDefaultAction = this.accDoDefaultAction;
};
FCheckBoxClass.prototype.setLabelPlacement = function (pos) {
this.setLabel(this.getLabel());
this.txtFormat(pos);
var _local7 = this.fLabel_mc._height / 2;
var _local8 = this.fcb_states_mc._height / 2;
var _local5 = _local8 - _local7;
var _local6 = this.fcb_states_mc._width;
var _local4 = this.fcb_states_mc;
var _local9 = this.fLabel_mc;
var _local2 = 0;
if (_local4._width > this.width) {
_local2 = 0;
} else {
_local2 = this.width - _local4._width;
}
this.fLabel_mc.setSize(_local2);
if ((pos == "right") || (pos == undefined)) {
this.labelPlacement = "right";
this.fcb_states_mc._x = 0;
this.fLabel_mc._x = _local6;
this.txtFormat("left");
} else if (pos == "left") {
this.labelPlacement = "left";
this.fLabel_mc._x = 0;
this.fcb_states_mc._x = this.width - _local6;
this.txtFormat("right");
}
this.fLabel_mc._y = _local5;
this.fcb_hitArea_mc._y = _local5;
};
FCheckBoxClass.prototype.txtFormat = function (pos) {
var _local3 = this.textStyle;
var _local4 = this.styleTable;
_local3.align = ((_local4.textAlign.value == undefined) ? ((_local3.align = pos)) : undefined);
_local3.leftMargin = ((_local4.textLeftMargin.value == undefined) ? ((_local3.leftMargin = 0)) : undefined);
_local3.rightMargin = ((_local4.textRightMargin.value == undefined) ? ((_local3.rightMargin = 0)) : undefined);
if (this.flabel_mc._height > this.height) {
super.setSize(this.width, this.flabel_mc._height);
} else {
super.setSize(this.width, this.height);
}
this.fLabel_mc.labelField.setTextFormat(this.textStyle);
this.setEnabled(this.enable);
};
FCheckBoxClass.prototype.setHitArea = function (w, h) {
var _local3 = this.fcb_hitArea_mc;
this.hitArea = _local3;
if (this.fcb_states_mc._width > w) {
_local3._width = this.fcb_states_mc._width;
} else {
_local3._width = w;
}
_local3._visible = false;
if (arguments.length > 1) {
_local3._height = h;
}
};
FCheckBoxClass.prototype.setSize = function (w) {
this.setLabel(this.getLabel());
this.setLabelPlacement(this.labelPlacement);
if (this.fcb_states_mc._height < this.flabel_mc.labelField._height) {
super.setSize(w, this.flabel_mc.labelField._height);
}
this.setHitArea(this.width, this.height);
this.setLabelPlacement(this.labelPlacement);
};
FCheckBoxClass.prototype.drawFocusRect = function () {
this.drawRect(-2, -2, this._width + 6, this._height - 1);
};
FCheckBoxClass.prototype.onPress = function () {
this.pressFocus();
_root.focusRect.removeMovieClip();
var _local3 = this.fcb_states_mc;
if (this.getValue()) {
_local3.gotoAndStop("checkedPress");
} else {
_local3.gotoAndStop("press");
}
};
FCheckBoxClass.prototype.onRelease = function () {
this.fcb_states_mc.gotoAndStop("up");
this.setValue(!this.checked);
};
FCheckBoxClass.prototype.onReleaseOutside = function () {
var _local2 = this.fcb_states_mc;
if (this.getValue()) {
_local2.gotoAndStop("checkedEnabled");
} else {
_local2.gotoAndStop("up");
}
};
FCheckBoxClass.prototype.onDragOut = function () {
var _local2 = this.fcb_states_mc;
if (this.getValue()) {
_local2.gotoAndStop("checkedEnabled");
} else {
_local2.gotoAndStop("up");
}
};
FCheckBoxClass.prototype.onDragOver = function () {
var _local2 = this.fcb_states_mc;
if (this.getValue()) {
_local2.gotoAndStop("checkedPress");
} else {
_local2.gotoAndStop("press");
}
};
FCheckBoxClass.prototype.setValue = function (checkedValue) {
if (checkedValue || (checkedValue == undefined)) {
this.setCheckState(checkedValue);
} else if (checkedValue == false) {
this.setCheckState(checkedValue);
}
this.executeCallBack();
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_STATECHANGE, true);
}
};
FCheckBoxClass.prototype.setCheckState = function (checkedValue) {
var _local2 = this.fcb_states_mc;
if (this.enable) {
this.flabel_mc.setEnabled(true);
if (checkedValue || (checkedValue == undefined)) {
_local2.gotoAndStop("checkedEnabled");
this.enabled = true;
this.checked = true;
} else {
_local2.gotoAndStop("up");
this.enabled = true;
this.checked = false;
}
} else {
this.flabel_mc.setEnabled(false);
if (checkedValue || (checkedValue == undefined)) {
_local2.gotoAndStop("checkedDisabled");
this.enabled = false;
this.checked = true;
} else {
_local2.gotoAndStop("uncheckedDisabled");
this.enabled = false;
this.checked = false;
this.focusRect.removeMovieClip();
}
}
};
FCheckBoxClass.prototype.getValue = function () {
return(this.checked);
};
FCheckBoxClass.prototype.setEnabled = function (enable) {
if ((enable == true) || (enable == undefined)) {
this.enable = true;
Super.setEnabled(true);
} else {
this.enable = false;
Super.setEnabled(false);
}
this.setCheckState(this.checked);
};
FCheckBoxClass.prototype.getEnabled = function () {
return(this.enable);
};
FCheckBoxClass.prototype.setLabel = function (label) {
this.fLabel_mc.setLabel(label);
this.txtFormat();
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_NAMECHANGE);
}
};
FCheckBoxClass.prototype.getLabel = function () {
return(this.fLabel_mc.labelField.text);
};
FCheckBoxClass.prototype.setTextColor = function (color) {
this.fLabel_mc.labelField.textColor = color;
};
FCheckBoxClass.prototype.myOnKeyDown = function () {
if (((Key.getCode() == 32) && (this.pressOnce == undefined)) && (this.enabled == true)) {
this.setValue(!this.getValue());
this.pressOnce = true;
}
};
FCheckBoxClass.prototype.myOnKeyUp = function () {
if (Key.getCode() == 32) {
this.pressOnce = undefined;
}
};
FCheckBoxClass.prototype.get_accRole = function (childId) {
return(this.master.ROLE_SYSTEM_CHECKBUTTON);
};
FCheckBoxClass.prototype.get_accName = function (childId) {
return(this.master.getLabel());
};
FCheckBoxClass.prototype.get_accState = function (childId) {
if (this.master.getValue()) {
return(this.master.STATE_SYSTEM_CHECKED);
}
return(0);
};
FCheckBoxClass.prototype.get_accDefaultAction = function (childId) {
if (this.master.getValue()) {
return("UnCheck");
}
return("Check");
};
FCheckBoxClass.prototype.accDoDefaultAction = function (childId) {
this.master.setValue(!this.master.getValue());
};
#endinitclip
boundingBox_mc._visible = false;
deadPreview._visible = false;
Symbol 83 MovieClip [bonus_mc] Frame 1
_num1.text = _root._bonus;
_num2.text = _root._bonus;
Symbol 83 MovieClip [bonus_mc] Frame 41
this._visible = false;
stop();
Symbol 342 MovieClip [__Packages.com.itpremium.utils.WaveEngine] Frame 0
class com.itpremium.utils.WaveEngine
{
var type, stack, debugOn, mute, _mc;
function WaveEngine (type, debugOn) {
this.type = ((type == undefined) ? 1 : (type));
stack = new Object();
this.debugOn = ((type == undefined) ? false : (debugOn));
mute = false;
init();
}
function init() {
_numClass++;
_mc = _root.createEmptyMovieClip((("WaveEngine_" + _numClass) + "_") + type, _root.getNextHighestDepth());
}
function soundOff() {
if (!mute) {
debug("soundOff()");
for (var _local2 in stack) {
stack[_local2]._oldVolume = stack[_local2].getVolume();
setVolume(_local2, 0);
}
mute = true;
}
}
function soundOn() {
if (mute) {
mute = false;
debug("soundOn()");
for (var _local3 in stack) {
var _local2 = ((stack[_local3]._oldVolume == undefined) ? 100 : (stack[_local3]._oldVolume));
setVolume(_local3, _local2);
}
}
}
function getSoundStatus() {
return(!mute);
}
function play(id, secondsOffset, loops, autoDelete) {
if ((id == undefined) || (stack[id] == undefined)) {
return(0);
}
if (type == 2) {
stopAll();
}
secondsOffset = ((secondsOffset == undefined) ? 0 : (secondsOffset));
loops = ((loops == undefined) ? 1 : (loops));
autoDelete = ((autoDelete == undefined) ? true : (autoDelete));
var _local3 = stack[id];
if (mute) {
_local3.setVolume(0);
} else {
_local3.setVolume(100);
}
if (type == 2) {
loops = 65536;
}
_local3.start(secondsOffset, loops);
debug(((((("play(" + _local3.__link) + ", ") + secondsOffset) + ", ") + loops) + ")");
}
function playAll(secondsOffset, loops, autoDelete) {
for (var _local5 in stack) {
play(_local5, secondsOffset, loops, autoDelete);
}
}
function addStream(link_name, autoDelete) {
if (link_name == undefined) {
return(0);
}
autoDelete = ((autoDelete == undefined) ? true : (autoDelete));
var _local4 = _mc.createEmptyMovieClip("attachS_" + (++_numSound), _mc.getNextHighestDepth());
var _local2 = new Sound(_local4);
_local2.attachSound(link_name);
_local2.__parent = this;
_local2.__link = link_name;
_local2.__num = _numSound;
_local2.__mc = _local4;
_local2.__autoDelete = autoDelete;
_local2.onSoundComplete = function () {
if (this.__autoDelete) {
this.__parent.deleteSound(this.__num);
}
};
debug(("addStream(" + link_name) + ")");
stack[_numSound] = _local2;
return(_local2.__num);
}
function deleteSound(id) {
if ((id == undefined) || (stack[id] == undefined)) {
return(0);
}
var _local2 = stack[id];
debug("Stack deletes a " + _local2.__link);
delete stack[id];
removeMovieClip(_local2.__mc);
}
function deleteAllSound() {
debug("deleteAllSound()");
for (var _local2 in stack) {
deleteSound(_local2);
}
}
function stop(id) {
if ((id == undefined) || (stack[id] == undefined)) {
return(0);
}
var _local3 = stack[id];
_local3.stop();
debug(("stop(" + _local3.__link) + ")");
if (_local3.__autoDelete) {
if ((id != _numSound) || (type != 2)) {
deleteSound(id);
}
}
}
function stopAll() {
debug("stopAll()");
for (var _local2 in stack) {
stop(_local2);
}
}
function setVolume(id, volume) {
if (((id == undefined) || (volume == undefined)) || (stack[id] == undefined)) {
return(0);
}
var _local2 = stack[id];
if (mute) {
_local2._oldVolume = volume;
return(0);
}
debug(((("setVolume(" + _local2.__link) + ", ") + volume) + ")");
if (_local2 != undefined) {
_local2.setVolume(volume);
}
}
function setAllVolume(volume) {
for (var _local2 in stack) {
setVolume(_local2, volume);
}
}
function debug(msg) {
if (debugOn) {
trace((type + " ") + msg);
}
}
function toString() {
return(("[class WaveEngine::" + ((type == 1) ? "Sound" : "Music")) + "]");
}
var _numSound = 0;
static var _numClass = 0;
}
Symbol 95 Button
on (press) {
_root.field.lineFill();
}
Symbol 156 Button
on (press) {
if ((_root._IGNOREUSER && (_root.w_pause == undefined)) || (_root.t_hiscores._visible)) {
return(undefined);
}
_root.pause();
}
Symbol 162 Button
on (press) {
trace("Try Quit");
trace((_root._IGNOREUSER + " ") + _root.BTN_QUIT);
if (_root._IGNOREUSER || (_root.BTN_QUIT)) {
return(undefined);
}
trace("QUIT");
_root.BTN_QUIT = true;
_root.showPromt("Do you want \nto quit the \ngame?");
}
Symbol 167 Button
on (press) {
if (_root._IGNOREUSER || (_root.BTN_PLAYAGAIN)) {
return(undefined);
}
_root.BTN_PLAYAGAIN = true;
_root.showPromt("New Game?");
}
Symbol 172 MovieClip Frame 1
onEnterFrame = function () {
if (_root.ARCADE) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
};
Symbol 175 Button
on (press) {
_root.musicOnOff();
}
Symbol 177 MovieClip Frame 1
stop();
Symbol 177 MovieClip Frame 2
stop();
Symbol 179 Button
on (press) {
_root.soundOnOff();
}
Symbol 181 MovieClip Frame 1
stop();
Symbol 181 MovieClip Frame 2
stop();
Symbol 245 Button
on (press) {
_root.hideInstruction();
}
Symbol 255 Button
on (press) {
_root.showInstructions();
}
Symbol 259 Button
on (rollOver) {
_root.showHint("Available in offline \nversion only", this);
}
on (rollOut) {
_root.hideHint(this);
}
Symbol 265 Button
on (press) {
getURL (_root.moreGamesLink.url, "_blank");
}
Symbol 272 Button
on (press) {
getURL (_root.buyGameLink.url, "_blank");
}
Symbol 278 Button
on (press) {
getURL (_root.downloadLink.url, "_blank");
}
Symbol 286 MovieClip Frame 1
onEnterFrame = function () {
if (_root.ARCADE) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
};
stop();
Symbol 293 Button
on (press) {
_root.stalagmite();
}
Symbol 297 Button
on (press) {
_root.stalactite();
}
Instance of Symbol 286 MovieClip in Symbol 298 MovieClip Frame 1
on (press) {
_root.barcade();
if (_root.ARCADE) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 306 MovieClip in Symbol 307 MovieClip Frame 1
on (press) {
_root.ready();
}
Instance of Symbol 312 MovieClip in Symbol 315 MovieClip Frame 1
on (press) {
if (_root.BTN_CLEAR) {
_root.clearScores();
} else {
_root.ok();
}
}
Instance of Symbol 314 MovieClip in Symbol 315 MovieClip Frame 1
on (press) {
_root.cancel();
}
Instance of Symbol 312 MovieClip in Symbol 323 MovieClip Frame 1
on (press) {
if (_root.BTN_CLEAR) {
_root.clearScores();
} else {
_root.ok();
}
}
Instance of Symbol 319 MovieClip in Symbol 323 MovieClip Frame 1
on (press) {
getURL (_root.buyGameLink.url, "_blank");
}
Instance of Symbol 322 MovieClip in Symbol 323 MovieClip Frame 1
on (press) {
getURL (_root.downloadLink.url, "_blank");
}
Symbol 326 Button
on (press) {
_root.press(this);
}
Symbol 338 MovieClip Frame 29
gotoAndPlay(_root.TL_STAR);
Symbol 339 MovieClip Frame 1
function init() {
field();
line();
LOADED = true;
settings(0);
ST_STARTLINES = true;
_root.showReady();
overSound = false;
}
function main() {
if (!LOADED) {
init();
return(undefined);
}
switch (true) {
case ST_STOP :
return(undefined);
case ST_CENTRALIZE :
centralize();
break;
case ST_DROPDOWN :
dropDown();
break;
case ST_END :
end();
return(undefined);
case ST_SAVER :
saver();
return(undefined);
case ST_OVER :
over();
return(undefined);
case ST_STARTLINES :
startLines();
}
linePush();
}
function field() {
var _local4 = 0;
while (_local4 < 15) {
_field[_local4] = new Array(12);
var _local3 = 0;
while (_local3 < 12) {
var _local2 = t_tile.duplicateMovieClip((("tile" + _local4) + "_") + _local3, (FIELDDEPTH + (_local4 * 20)) + _local3);
_local2._x = (t_tile._width + tileIntend) * _local3;
if (_root.HSINDEX < 2) {
_local2._y = (t_tile._height + tileIntend) * _local4;
} else {
_local2._y = (t_tile._height + tileIntend) * (15 - _local4);
}
_local2._i = _local4;
_local2._j = _local3;
_local2.gotoAndStop(_root.TL_CLEAR);
_field[_local4][_local3] = _local2;
_local3++;
}
_local4++;
}
return(true);
}
function line() {
var _local3 = 0;
while (_local3 < 12) {
var _local2 = t_tile.duplicateMovieClip("line" + _local3, LINEDEPTH + _local3);
_local2._x = (t_tile._width + tileIntend) * _local3;
if (_root.HSINDEX < 2) {
_local2._y = _root.LINEYDOWN;
} else {
_local2._y = _root.LINEYUP;
}
_local2.gotoAndStop(_root.TL_CLEAR);
_local2._type = "line";
_line[_local3] = _local2;
_linepos = 0;
_local3++;
}
}
function randomFrame() {
if ((BOMBCHANCE > 0) && (random(BOMBCHANCE + 1) == 1)) {
return(_root.TL_BOMB);
}
if ((CBOMBCHANCE > 0) && (random(CBOMBCHANCE + 1) == 1)) {
return(_root.TL_CBOMB + random(MAXCOLORS));
}
return(random(MAXCOLORS) + 2);
}
function dropDown() {
var _local6 = true;
var _local5 = 0;
var _local4 = 0;
while (_local4 < 12) {
var _local3 = 0;
while (_local3 < 15) {
if ((_field[_local3 + 1][_local4]._currentframe == _root.TL_CLEAR) && (_field[_local3][_local4]._currentframe != _root.TL_CLEAR)) {
_local5++;
var _local2 = _local3 + 1;
while (_local2 > 0) {
_field[_local2][_local4].gotoAndStop(_field[_local2 - 1][_local4]._currentframe);
_local2--;
}
_field[0][_local4].gotoAndStop(_root.TL_CLEAR);
_local3 = 16;
}
_local3++;
}
_local4++;
}
if (!_local5) {
ST_DROPDOWN = false;
ST_CENTRALIZE = true;
_local4 = 0;
while (_local4 < 12) {
if (_field[14][_local4]._currentframe != _root.TL_CLEAR) {
_local6 = false;
}
_local4++;
}
if (_local6) {
_root.bonus(100 * _root.levelNum);
}
}
}
function addLine() {
if (checkEnd()) {
ST_OVER = true;
_root._IGNOREUSER = true;
overI = 0;
return(undefined);
}
if (_lineLimit > 0) {
var _local2 = 0;
while (_local2 < 12) {
rowUp(_local2);
_field[14][_local2].gotoAndStop(_line[_local2]._currentframe);
_line[_local2].gotoAndStop(_root.TL_CLEAR);
_local2++;
}
}
_lineLimit--;
if (_lineLimit >= 0) {
_root._linesLeft = _lineLimit;
}
if (_root.ARCADE && (_lineLimit <= 0)) {
if (_root.levelNum == 4) {
_root.showOfflinePrompt();
return(undefined);
}
_root.nextLevel();
} else if (_lineLimit < 0) {
levelEnd();
}
_linepos = 0;
}
function checkEnd() {
var _local2 = 0;
while (_local2 < 12) {
if (_field[0][_local2]._currentframe != _root.TL_CLEAR) {
return(true);
}
_local2++;
}
return(false);
}
function rowUp(j) {
var _local3 = 14;
while ((_field[_local3][j]._currentframe != _root.TL_CLEAR) && (_field[_local3][j]._currentframe != undefined)) {
_local3--;
}
var _local2 = _local3;
while (_local2 < 14) {
_field[_local2][j].gotoAndStop(_field[_local2 + 1][j]._currentframe);
_local2++;
}
_field[14][j].gotoAndStop(_root.TL_CLEAR);
}
function lineFill() {
if (_root._linesLeft <= 0) {
return(undefined);
}
var _local2 = _linepos;
while (_local2 < 12) {
_line[_local2].gotoAndStop(randomFrame());
_local2++;
}
_linepos = 0;
addLine();
stTime = 0;
}
function linePush() {
if (_linepos >= 12) {
addLine();
}
if (_lineLimit == 0) {
if ((getTimer() - _lastPush) < 100) {
return(false);
}
_line[_linepos].gotoAndStop(_root.TL_CLEAR);
} else {
if ((getTimer() - _lastPush) < (PUSHTIME - 1000)) {
return(false);
}
_line[_linepos].gotoAndStop(randomFrame());
}
_linepos++;
_lastPush = getTimer();
return(true);
}
function centralize() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < 5) {
if ((_field[14][_local2]._currentframe != _root.TL_CLEAR) && (_field[14][_local2 + 1]._currentframe == _root.TL_CLEAR)) {
swap(_local2, _local2 + 1);
_local3++;
}
_local2++;
}
_local2 = 11;
while (_local2 > 6) {
if ((_field[14][_local2]._currentframe != _root.TL_CLEAR) && (_field[14][_local2 - 1]._currentframe == _root.TL_CLEAR)) {
swap(_local2, _local2 - 1);
_local3++;
}
_local2--;
}
if (!_local3) {
ST_CENTRALIZE = false;
}
}
function swap(a, b) {
var _local2 = 14;
while (_local2 > -1) {
if ((_field[_local2][a]._currentframe == _root.TL_CLEAR) && (_field[_local2][b]._currentframe == _root.TL_CLEAR)) {
return(undefined);
}
var _local5 = _field[_local2][a]._currentframe;
_field[_local2][a].gotoAndStop(_field[_local2][b]._currentframe);
_field[_local2][b].gotoAndStop(_local5);
_local2--;
}
}
function remove(_selected) {
if (_selected.length > 30) {
_root.bonus(_selected.length * 3);
_root.countPoints(_selected.length * 2);
}
while (_selected.length > 0) {
_selected.pop().gotoAndStop(_root.TL_CLEAR);
}
ST_DROPDOWN = true;
_root.t_bombdamage._width = _root.BOMB_SIZE;
_root.t_bombdamage._height = _root.BOMB_SIZE;
}
function over() {
if (ST_CENTRALIZE || (ST_DROPDOWN)) {
return(undefined);
}
if (!overSound) {
_root.playSound("snd_gameOver");
overSound = true;
}
var _local2 = 0;
while (_local2 < 12) {
_field[overI][_local2].gotoAndStop(_root.TL_OVER);
_local2++;
}
overI++;
if (overI >= 15) {
_local2 = 0;
while (_local2 < 12) {
_line[_local2].gotoAndStop(_root.TL_OVER);
_local2++;
}
ST_OVER = false;
saverGameOver();
}
}
function stop() {
ST_STOP = true;
}
function settings(levelNum) {
if (levelNum < 4) {
PUSHTIME = PUSHTIME - 100;
} else {
PUSHTIME = PUSHTIME - 50;
}
_lineLimit = 25 + (5 * levelNum);
_startLines = 5;
switch (levelNum) {
case 0 :
MAXCOLORS = 3;
BOMBCHANCE = 0;
CBOMBCHANCE = 0;
PUSHTIME = 1600;
_startLines = 2;
break;
case 2 :
BOMBCHANCE = 140;
_startLines = 5;
break;
case 3 :
MAXCOLORS = 4;
BOMBCHANCE = 120;
CBOMBCHANCE = 120;
break;
case 4 :
BOMBCHANCE = 100;
CBOMBCHANCE = 100;
break;
case 6 :
BOMBCHANCE = 80;
CBOMBCHANCE = 80;
}
_root._linesLeft = _lineLimit;
}
function clear() {
var _local2 = 0;
while (_local2 < 15) {
var _local3 = 0;
while (_local3 < 12) {
_field[_local2][_local3].gotoAndStop(_root.TL_CLEAR);
_local3++;
}
_local2++;
}
var _local3 = 0;
while (_local3 < 12) {
_line[_local3].gotoAndStop(_root.TL_CLEAR);
_local3++;
}
return(true);
}
function saverGameOver() {
message = " Game Over";
_letters = new Array();
var _local1 = 0;
while (_local1 < message.length) {
_field[7][_local1]._text = message.charAt(_local1);
_letters.push(_field[7][_local1]);
_local1++;
}
ST_SAVER = true;
stOver = getTimer();
}
function saver() {
if ((getTimer() - stOver) > 1500) {
_root._IGNOREUSER = false;
clear();
ST_OVER = false;
ST_STOP = true;
ST_SAVER = false;
ST_OVER = false;
ST_STARTLINES = false;
_root.preGame();
}
}
function levelEnd() {
_root.playSound("snd_nextLevel");
ST_END = true;
ST_DROPDOWN = true;
_root._IGNOREUSER = true;
_line[0].gotoAndStop(_root.TL_CLEAR);
ej = 0;
ei = 0;
}
function end() {
if (ST_DROPDOWN || (ST_CENTRALIZE)) {
return(false);
}
ej = 0;
while (ej < 12) {
_field[ei][ej].gotoAndPlay(_root.TL_STAR);
ej++;
}
ei++;
if (ei > 14) {
if (_root.levelNum == 4) {
_root.showOfflinePrompt();
return(undefined);
}
_linePos = 0;
_root.nextLevel();
_root.showReady();
ST_STARTLINES = true;
ST_END = false;
clear();
}
}
function startLines() {
lineFill();
_startLines--;
if (_startLines <= 0) {
ST_STARTLINES = false;
}
}
t_tile._visible = false;
var _field = new Array(15);
var _type = 0;
var _line = new Array(12);
var _linepos = 0;
var _lastPush = 0;
var overSound = false;
var FIELDDEPTH = 100;
var LINEDEPTH = 1000;
var ST_DROPDOWN = false;
var ST_CENTRALIZE = false;
var ST_STOP = false;
var LOADED = false;
var ST_OVER = false;
var ST_SAVER = false;
var ST_STARTLINES = false;
var stTime = 0;
var gmLevel;
var tileIntend = 0;