Frame 1
if (false) {
}
Frame 3
function displayScores(mc) {
names = _root.topnickname.split(",");
scores = _root.topscore.split(",");
i = 0;
while (i <= 19) {
if (names[i] == undefined) {
names[i] = "";
}
if (scores[i] == undefined) {
scores[i] = "";
}
eval ((mc + ".n") + (i + 1)).text = names[i];
eval ((mc + ".p") + (i + 1)).text = scores[i];
i++;
}
}
function cancelSubmit(mc, useridframe) {
trace("cancelSubmit");
delete _root.send_lv.onLoad;
_root.skipsubmit = true;
mc.gotoAndStop(useridframe);
}
function _newUser() {
getURL (_root._registerurl, "_blank");
}
function _trackClickThru(mc) {
if (_root._allowclick) {
mc.hit_area.onRelease = function () {
getURL (_root._clickthru, "_blank");
};
} else {
mc.hit_area.useHandCursor = false;
}
}
function _resetUsername(txt) {
txt.onSetFocus = function () {
if ((this.text == _root._msgValid) or (this.text == "Connecting Error!")) {
this.text = "";
}
};
}
function _readSharedData() {
_root.so_uname = ((_root._sostatus.data.so_uname == undefined) ? "" : (_root._sostatus.data.so_uname));
_root.so_jumpframe = ((_root._sostatus.data.so_jumpframe == undefined) ? "" : (_root._sostatus.data.so_jumpframe));
_root.so_sound = ((_root._sostatus.data.so_sound == undefined) ? 1 : (_root._sostatus.data.so_sound));
_resetString = _root._sostatus.data.so_resetString;
trace("==========================");
trace((("_root.so_jumpframe : " + _root._sostatus.data.so_jumpframe) + " : ") + _root.so_uname);
if (_root.so_jumpframe != "") {
_assignValue(_resetString);
_root.createEmptyMovieClip("eye", _root.getNextHighestDepth());
_root.eye.onEnterFrame = function () {
if ((_root.getBytesTotal() == _root.getBytesLoaded()) and (_root.getBytesLoaded() > 50000)) {
_root.intro = 0;
_root._sostatus.data.so_jumpframe = "";
_root._sostatus.flush();
this.onEnterFrame = null;
_root.gotoAndStop(_root.so_jumpframe);
}
};
} else {
_root.intro = 1;
play();
}
_root.uname = _root.so_uname;
_root.gamesound = _root.so_sound;
}
function _writeSharedData(jumpframe, jumpurl, _resetString) {
_root._sostatus.data.so_uname = ((_root.so_uname == undefined) ? "" : (_root.so_uname));
_root._sostatus.data.so_sound = _root.so_sound;
_root._sostatus.data.so_resetString = _resetString;
_root._sostatus.data.so_jumpframe = jumpframe;
_root._sostatus.flush();
if (jumpurl != "") {
getURL (jumpurl);
} else {
gotoAndPlay (1);
}
}
function _assignValue(_val) {
_arr = new Array();
_arr = _val.split("|");
i = 0;
while (i < (_arr.length / 2)) {
_var2 = ((i * 2) + 1) - 1;
_var3 = _var2 + 1;
_root[_arr[_var2]] = _arr[_var3];
i++;
}
}
function _playAgain(mc, jumpframe, _resetString) {
_root.so_uname = _root.uname;
if ((_root.gurl != undefined) and (_root.gurl != "")) {
_writeSharedData(jumpframe, _root.gurl, _resetString);
} else {
_root.intro = 0;
_assignValue(_resetString);
mc.gotoAndStop(jumpframe);
}
}
var allSounds = new Sound();
trace("Hello");
_root._google_txt.text = "kiss call";
_root._gameid = "1040";
_root._clickthru = "http://www.games2win.com/?utm_campaign=spill_gamesgames_com&utm_source=kiss_call&medium=game";
_root._customer_id = "games2win";
_root.uname = "";
_root.submiturl = "/gamesubmit.asp";
_root.topnickname = [];
_root.topscore = [];
dataSubmit = function (myname, myscore, mygameid, destmc, useridframe, connframe, top10frame, _ord) {
trace("dataSubmit");
_root.skipsubmit = false;
myname = myname.trim();
_loc = eval (destmc);
if (((myname.length == 0) or (myname == "Invalid Nickname!")) or (myname == "Connecting Error!")) {
_root.uname = "Invalid Nickname!";
} else {
_root.send_lv = new LoadVars();
_root.send_lv.onLoad = function (success) {
if (success and (!_root.skipsubmit)) {
if (_root.send_lv.isreg == 0) {
_root.uname = "Invalid Nickname!";
_loc.gotoAndStop(useridframe);
} else if (_root.send_lv.isreg == 1) {
_root.topnickname = send_lv.topnicknames;
_root.topscore = send_lv.topscores;
_loc.gotoAndPlay(top10frame);
}
}
};
_root.send_lv.nickname = myname;
_root.send_lv.points = myscore;
_root.send_lv.gameid = mygameid;
_root.send_lv.order = _ord;
_root.send_lv.sendAndLoad(submiturl, _root.send_lv, "POST");
_loc.gotoAndPlay(connframe);
}
};
String.prototype.trim = function () {
var _local3 = 0;
var _local2 = this.length;
white = new Object();
white._32 = 1;
_local2--;
while (white["_" + ord(this.charAt(_local2))]) {
}
while (white["_" + ord(this.charAt(_local3++))]) {
}
return(this.slice(_local3 - 1, _local2 + 1));
};
_root._registerurl = "http://www.games2win.com/register.asp";
_root._allowclick = true;
var _sostatus = SharedObject.getLocal("gamestatus", "/");
_readSharedData();
Frame 10
stop();
Frame 31
play();
this.onEnterFrame = function () {
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
delete this.onEnterFrame;
mymainloader.gotoAndStop(100);
}
mymainloadertxt = int((_root.getBytesLoaded() * 100) / _root.getBytesTotal());
mymainloader.gotoAndStop(mymainloadertxt);
};
stop();
Instance of Symbol 123 MovieClip in Frame 31
on (release) {
getURL ("http://www.gamesgames.com/moregames/", "_blank");
}
Instance of Symbol 127 MovieClip in Frame 35
on (release) {
this.gotoAndPlay(_currentframe + 1);
}
Frame 35
if (false) {
}
Frame 39
stop();
Frame 41
_root.gotoAndStop("level" + _root.level);
Frame 49
stop();
Frame 56
function checktile() {
var i = 0;
while (i < levelarr1.length) {
temparr = [];
deatharr = [];
arr_val = levelarr1[i];
temptile1 = eval ((("_root.tiles.tiles_" + arr_val[0]) + "_") + arr_val[1]);
temparr.addArrItem(temptile1._name);
action();
if (i == 0) {
val = -1;
} else {
val = 1;
}
if (!game.gameEnd) {
chkloss(levelarr1[i], val);
} else {
_root["lineuparr" + i] = [];
_root["lineuparr" + i] = temparrC;
}
i++;
}
if (game.gameEnd) {
a = 1;
len = 0;
as = "l";
dd = eval ("lineuparr" + target);
}
}
function action() {
if (temparr != undefined) {
var dd = 0;
while (dd < temparr.length) {
nam1 = temparr[dd];
nam_arr = nam1.split("_");
x1 = int(nam_arr[1]);
y1 = int(nam_arr[2]);
nam1 = eval ((("_root.tiles.tiles_" + x1) + "_") + y1);
rcon = nam1.right;
lcon = nam1.left;
ucon = nam1.up;
dcon = nam1.down;
actionbox(rcon, lcon, ucon, dcon, x1, y1);
dd++;
}
}
chkgameover();
}
function actionbox(rcon, lcon, ucon, dcon, x1, y1) {
na = eval ((("_root.tiles.tiles_" + x1) + "_") + y1);
na.checkSign = "full";
if (rcon) {
newnam = eval ((("_root.tiles.tiles_" + (x1 + 1)) + "_") + y1);
if ((newnam != undefined) and newnam.left) {
temparr.addArrItem(newnam._name);
na.side2 = 1;
}
if ((newnam == undefined) and ((x1 + 1) != 6)) {
na.checkSign = "empty";
}
}
if (lcon) {
newnam = eval ((("_root.tiles.tiles_" + (x1 - 1)) + "_") + y1);
if ((newnam != undefined) and newnam.right) {
temparr.addArrItem(newnam._name);
na.side1 = 1;
}
if ((newnam == undefined) and ((x1 - 1) != -1)) {
na.checkSign = "empty";
}
}
if (dcon) {
newnam = eval ((("_root.tiles.tiles_" + x1) + "_") + (y1 + 1));
if ((newnam != undefined) and newnam.up) {
temparr.addArrItem(newnam._name);
na.side4 = 1;
}
if ((newnam == undefined) and ((y1 + 1) != 11)) {
na.checkSign = "empty";
}
}
if (ucon) {
newnam = eval ((("_root.tiles.tiles_" + x1) + "_") + (y1 - 1));
if ((newnam != undefined) and newnam.down) {
temparr.addArrItem(newnam._name);
na.side3 = 1;
}
if (newnam == undefined) {
na.checkSign = "empty";
}
}
scounter = 0;
nam2 = eval ((("_root.tiles.tiles_" + x1) + "_") + y1);
nam2.totalVal = scounter;
scounter = 0;
var i = 1;
while (i < 5) {
numo = eval ((((("_root.tiles.tiles_" + x1) + "_") + y1) + ".side") + i);
if (numo == 1) {
scounter++;
}
i++;
}
nam2.totalVal = scounter;
if (scounter < 2) {
deatharr.addArrItem(nam2._name);
}
}
function chkgameover() {
var dd = 0;
while (dd < deatharr.length) {
nam1 = deatharr[dd];
nam_arr = nam1.split("_");
x1 = int(nam_arr[1]);
y1 = int(nam_arr[2]);
nam = eval ((("_root.tiles.tiles_" + x1) + "_") + y1);
rcon = nam.right;
lcon = nam.left;
ucon = nam.up;
dcon = nam.down;
if ((x1 >= 0) and (x1 <= 5)) {
if (rcon) {
nam1 = eval ((("_root.tiles.tiles_" + (x1 + 1)) + "_") + y1);
if ((nam1 != undefined) and nam1.left) {
scounter = nam1.totalVal;
scounter--;
nam1.totalVal = scounter;
if (nam1.totalVal < 2) {
deatharr.addArrItem(nam1._name);
}
}
}
if (lcon) {
nam1 = eval ((("_root.tiles.tiles_" + (x1 - 1)) + "_") + y1);
if ((nam1 != undefined) and nam1.right) {
scounter = nam1.totalVal;
scounter--;
nam1.totalVal = scounter;
if (nam1.totalVal < 2) {
deatharr.addArrItem(nam1._name);
}
}
}
if (ucon) {
nam1 = eval ((("_root.tiles.tiles_" + x1) + "_") + (y1 - 1));
if ((nam1 != undefined) and nam1.down) {
scounter = nam1.totalVal;
scounter--;
nam1.totalVal = scounter;
if (nam1.totalVal < 2) {
deatharr.addArrItem(nam1._name);
}
}
}
if (dcon) {
nam1 = eval ((("_root.tiles.tiles_" + x1) + "_") + (y1 + 1));
if ((nam1 != undefined) and nam1.up) {
scounter = nam1.totalVal;
scounter--;
nam1.totalVal = scounter;
if (nam1.totalVal < 2) {
deatharr.addArrItem(nam1._name);
}
}
}
}
dd++;
}
temparrC = [];
var i = 0;
while (i < temparr.length) {
nam2 = eval ("_root.tiles." + temparr[i]);
if ((nam2.totalVal < 2) and (nam2.checkSign == "full")) {
nam2.dead = true;
} else {
nam2.dead = false;
temparrC.push(nam2._name);
}
i++;
}
chkcomplate();
}
function chkcomplate() {
cktile = arr1end;
count = 0;
if (!game.gameEnd) {
var j = 0;
while (j < cktile.length) {
arr_val = cktile[j];
temptile1 = (("tiles_" + arr_val[0]) + "_") + arr_val[1];
var i = 0;
while (i < temparrC.length) {
if (temptile1 == temparrC[i]) {
count++;
}
i++;
}
j++;
}
}
if ((count == cktile.length) and (!game.gameEnd)) {
removelist = [];
temparrC1 = [];
game.gameEnd = true;
gameOver_mc1.gotoAndPlay("levelcomplete");
boy_mc.gotoAndStop(2);
lady_mc.gotoAndStop(2);
var i = 1;
while (i < temparrC.length) {
val = temparrC[i];
nam = eval ("_root.tiles." + val);
if (nam.totalVal >= 2) {
nam.mc.gotoAndStop(2);
line_mc.gotoAndPlay(2);
_root.score1 = _root.score1 + 10;
temparrC1.pop(val);
} else {
nam._alpha = 100;
}
i++;
}
}
}
function chkloss(arr, val1) {
ss = 1;
var i = 1;
while (i < temparr.length) {
val = (nam2 = eval ("_root.tiles." + temparr[i]).checkSign);
if (val != "full") {
ss = 0;
}
i++;
}
nam = eval ((("_root.tiles.tiles_" + (int(arr[0]) + val1)) + "_") + arr[1]);
if (nam == undefined) {
ss = 0;
}
if (ss == 1) {
game.gameEnd = true;
gameOver_mc1.gotoAndPlay("gameover");
}
}
stop();
var game = new Object();
game = {tileW:50, tileH:50, tileno:0, type:5, speed:5, maxxtile:6, maxytile:9, keypressed:false, level:1, gameEnd:false};
dir_arr = ["left", "up", "right", "down"];
game.map = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
arr1 = [[6, 10]];
arr1end = [[-1, 8], [5, 10]];
levelarr1 = [[6, 10], [-1, 8]];
removelist = [];
temparrC1 = [];
temparr = [];
temparr = [];
deatharr = [];
temp2 = [];
temp1 = [];
target = 1;
_root.score1 = 0;
_root.score2 = 0;
_root.score3 = 0;
_root.score4 = 0;
_root.rotateMc = true;
_root.totalNoTiles = 0;
game.Tile0 = function () {
};
game.Tile0.prototype.frame = 1;
game.Tile0.prototype.up = false;
game.Tile0.prototype.down = false;
game.Tile0.prototype.right = true;
game.Tile0.prototype.left = true;
game.Tile0.prototype.sideVal = 2;
game.Tile1 = function () {
};
game.Tile1.prototype.frame = 2;
game.Tile1.prototype.up = true;
game.Tile1.prototype.down = true;
game.Tile1.prototype.right = true;
game.Tile1.prototype.left = true;
game.Tile1.prototype.sideVal = 4;
game.Tile2 = function () {
};
game.Tile2.prototype.frame = 3;
game.Tile2.prototype.up = true;
game.Tile2.prototype.down = false;
game.Tile2.prototype.right = false;
game.Tile2.prototype.left = true;
game.Tile2.prototype.sideVal = 2;
game.Tile3 = function () {
};
game.Tile3.prototype.frame = 4;
game.Tile3.prototype.up = true;
game.Tile3.prototype.down = false;
game.Tile3.prototype.right = true;
game.Tile3.prototype.left = true;
game.Tile3.prototype.sideVal = 3;
game.Tile4 = function () {
};
game.Tile4.prototype.frame = 5;
game.Tile4.prototype.up = true;
game.Tile4.prototype.down = true;
game.Tile4.prototype.right = true;
game.Tile4.prototype.left = true;
game.Tile4.prototype.sideVal = 0;
createtile = function () {
if (!game.gameEnd) {
_root.totalNoTiles++;
trace("totalNoTiles : " + _root.totalNoTiles);
_root.rotateMc = true;
x = random(5);
if ((_root.totalNoTiles % 12) == 0) {
type = 4;
} else {
type = random(4);
}
y = 0;
game.clip = _root.tiles;
game.cktile = _root.arr1;
name = "tile_" + game.tileno;
game.tileno++;
game[name] = new game["Tile" + type]();
temptile = game.clip.attachMovie("tiles", name, game.tileno);
trace("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
game.clip[name]._x = x * game.tileW;
game.clip[name]._y = y;
game.clip[name].type = type;
game.clip[name].dir = dir_arr.toString().split(",");
game.clip[name].up = game[name].up;
game.clip[name].down = game[name].down;
game.clip[name].right = game[name].right;
game.clip[name].left = game[name].left;
game.clip[name].side1 = 0;
game.clip[name].side2 = 0;
game.clip[name].side3 = 0;
game.clip[name].side4 = 0;
game.clip[name].move = true;
game.clip[name].gotoAndStop(game[name].frame);
game.clip[name].onRelease = function () {
trace((((((((((this._name + " ") + this.left) + " ") + this.up) + " ") + this.right) + " ") + this.down) + " ") + this._y);
};
game.clip[name].onEnterFrame = function () {
if (this.move and (!game.gameEnd)) {
this.y = Math.ceil((this._y + game.speed) / this._height);
this.x = Math.ceil(this._x / this._width);
nam = this.name;
nam_arr = nam.split("_");
newname = (("tiles_" + this.x) + "_") + this.y;
if ((lastname == undefined) or (lastname != newname)) {
this.name = newname;
lastname = newname;
}
val = game.map[this.y][this.x];
if ((val == 0) and this.move) {
this._y = this._y + game.speed;
_root.cupid._y = this._y - 50;
_root.cupid._x = this._x + 250;
if (_root.cupid._x >= 450) {
_root.cupid._xscale = -100;
_root.cupid._x = this._x + 200;
} else {
_root.cupid._xscale = 100;
}
} else {
this.move = false;
if (this.move == false) {
this._y = (this.y * game.tileH) - game.tileH;
this._x = (this.x * game.tilew) - game.tilew;
trace(this._y);
}
}
} else if (!_root.game.keypressed) {
_root.game.map[this.y - 1][this.x] = 1;
this._name = this.name;
if (this.type != 4) {
checktile();
}
if (((this.y - 1) <= 0) and (this.type != 4)) {
game.gameEnd = true;
gameOver_mc1.gotoAndPlay("gameover");
} else {
temptile.move = false;
_root.create = 1;
_root.snd_mc.gotoAndPlay(2);
temptile = "";
charMove();
}
if (this.type == 4) {
_root.game.map[this.y - 1][this.x] = 0;
_root.game.map[this.y][this.x] = 0;
namnew = eval ((("_root.tiles.tiles_" + this.x) + "_") + (this.y + 1));
namnew.mc.gotoAndPlay("blast");
this.mc.play();
} else {
delete this.onEnterFrame;
}
} else {
this.move = true;
}
};
}
};
createtile();
temparr = [];
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (Key.getCode() == 40) {
_root.keyup = false;
game.speed = 10;
} else {
game.speed = 5;
}
};
keyListener.onKeyUp = function () {
if (Key.getCode() == 40) {
game.speed = 5;
_root.keyup = true;
}
};
Key.addListener(keyListener);
Array.prototype.addArrItem = function (_nam) {
var _local5 = 1;
var _local4 = this.length;
if (_local4 != 0) {
var _local3 = 0;
while (_local3 <= _local4) {
Arrnam = this[_local3];
if (Arrnam == _nam) {
_local5 = 0;
}
_local3++;
}
}
if (_local5 == 1) {
this[_local4] = _nam;
_root.arr++;
}
};
_root.arr = 0;
_root.level = 1;
narr = eval ("arr" + _root.level);
var j = 0;
while (j < narr.length) {
_root["found" + j] = 0;
j++;
}
Array.prototype.lineup = function (x, y) {
var _local8 = new Array();
var _local4 = [];
var _local6 = [];
var _local5 = x;
while (_local5 >= 0) {
var _local2 = 0;
while (_local2 < this.length) {
nam = this[_local2];
_local4 = nam.split("_");
x1 = int(_local4[1]);
if (x1 == _local5) {
_local6.push(this[_local2]);
}
_local2++;
}
_local5--;
}
var _local3 = new Array();
xno = x;
yno = y;
nam = (("tiles_" + xno) + "_") + yno;
_local3.addArrItem(nam);
_local5 = 0;
while (_local5 < _local3.length) {
nam1 = (("tiles_" + xno) + "_") + (yno + 1);
nam2 = (("tiles_" + xno) + "_") + (yno - 1);
nam3 = (("tiles_" + (xno + 1)) + "_") + yno;
nam4 = (("tiles_" + (xno - 1)) + "_") + yno;
var _local2 = 0;
while (_local2 < this.length) {
if (nam1 == this[_local2]) {
rst = _local3.addArrItem(nam1);
if (!rst) {
yno = yno + 1;
this.splice(_local2, 1);
break;
}
} else if (nam2 == this[_local2]) {
rst = _local3.addArrItem(nam2);
if (!rst) {
yno = yno - 1;
this.splice(_local2, 1);
break;
}
} else if (nam3 == this[_local2]) {
rst = _local3.addArrItem(nam3);
if (!rst) {
xno = xno + 1;
this.splice(_local2, 1);
break;
}
} else if (nam4 == this[_local2]) {
rst = _local3.addArrItem(nam4);
if (!rst) {
xno = xno - 1;
this.splice(_local2, 1);
break;
}
}
_local2++;
}
_local5++;
}
return(_local3);
};
Array.prototype.remove = function (_nam) {
var _local5 = [];
var _local2 = 0;
while (_local2 < this.length) {
if (_nam != this[_local2]) {
var _local3 = _local2;
}
_local2++;
}
this.splice(_local2, 1);
};
charMove = function () {
onEnterFrame = function () {
if ((_root.cupid._y <= 0) and (_root.create == 1)) {
createtile();
_root.create = 0;
delete onEnterFrame;
} else if ((_root.cupid._y > 0) and (_root.create == 1)) {
_root.cupid._y = _root.cupid._y - 60;
}
};
};
Frame 66
stop();
Frame 77
stop();
Frame 88
function checktile() {
var i = 0;
while (i < levelarr1.length) {
temparr = [];
deatharr = [];
arr_val = levelarr1[i];
temptile1 = eval ((("_root.tiles.tiles_" + arr_val[0]) + "_") + arr_val[1]);
temparr.addArrItem(temptile1._name);
action();
if ((i == 0) or (i == 3)) {
val = -1;
} else {
val = 1;
}
if (!game.gameEnd) {
chkloss(levelarr1[i], val, i);
} else {
_root["lineuparr" + i] = [];
_root["lineuparr" + i] = temparrC;
}
i++;
}
if (game.gameEnd) {
a = 1;
len = 0;
as = "l";
dd = eval ("lineuparr" + target);
}
}
function action() {
if (temparr != undefined) {
var dd = 0;
while (dd < temparr.length) {
nam1 = temparr[dd];
nam_arr = nam1.split("_");
x1 = int(nam_arr[1]);
y1 = int(nam_arr[2]);
nam1 = eval ((("_root.tiles.tiles_" + x1) + "_") + y1);
rcon = nam1.right;
lcon = nam1.left;
ucon = nam1.up;
dcon = nam1.down;
actionbox(rcon, lcon, ucon, dcon, x1, y1);
dd++;
}
}
chkgameover();
}
function actionbox(rcon, lcon, ucon, dcon, x1, y1) {
na = eval ((("_root.tiles.tiles_" + x1) + "_") + y1);
na.checkSign = "full";
if (rcon) {
newnam = eval ((("_root.tiles.tiles_" + (x1 + 1)) + "_") + y1);
if ((newnam != undefined) and newnam.left) {
temparr.addArrItem(newnam._name);
na.side2 = 1;
}
if ((newnam == undefined) and ((x1 + 1) != 6)) {
na.checkSign = "empty";
}
}
if (lcon) {
newnam = eval ((("_root.tiles.tiles_" + (x1 - 1)) + "_") + y1);
if ((newnam != undefined) and newnam.right) {
temparr.addArrItem(newnam._name);
na.side1 = 1;
}
if ((newnam == undefined) and ((x1 - 1) != -1)) {
na.checkSign = "empty";
}
}
if (dcon) {
newnam = eval ((("_root.tiles.tiles_" + x1) + "_") + (y1 + 1));
if ((newnam != undefined) and newnam.up) {
temparr.addArrItem(newnam._name);
na.side4 = 1;
}
if ((newnam == undefined) and ((y1 + 1) != 11)) {
na.checkSign = "empty";
}
}
if (ucon) {
newnam = eval ((("_root.tiles.tiles_" + x1) + "_") + (y1 - 1));
if ((newnam != undefined) and newnam.down) {
temparr.addArrItem(newnam._name);
na.side3 = 1;
}
if (newnam == undefined) {
na.checkSign = "empty";
}
}
scounter = 0;
nam2 = eval ((("_root.tiles.tiles_" + x1) + "_") + y1);
nam2.totalVal = scounter;
scounter = 0;
var i = 1;
while (i < 5) {
numo = eval ((((("_root.tiles.tiles_" + x1) + "_") + y1) + ".side") + i);
if (numo == 1) {
scounter++;
}
i++;
}
nam2.totalVal = scounter;
if (scounter < 2) {
deatharr.addArrItem(nam2._name);
}
}
function chkgameover() {
var dd = 0;
while (dd < deatharr.length) {
nam1 = deatharr[dd];
nam_arr = nam1.split("_");
x1 = int(nam_arr[1]);
y1 = int(nam_arr[2]);
nam = eval ((("_root.tiles.tiles_" + x1) + "_") + y1);
rcon = nam.right;
lcon = nam.left;
ucon = nam.up;
dcon = nam.down;
if ((x1 >= 0) and (x1 <= 5)) {
if (rcon) {
nam1 = eval ((("_root.tiles.tiles_" + (x1 + 1)) + "_") + y1);
if ((nam1 != undefined) and nam1.left) {
scounter = nam1.totalVal;
scounter--;
nam1.totalVal = scounter;
if (nam1.totalVal < 2) {
deatharr.addArrItem(nam1._name);
}
}
}
if (lcon) {
nam1 = eval ((("_root.tiles.tiles_" + (x1 - 1)) + "_") + y1);
if ((nam1 != undefined) and nam1.right) {
scounter = nam1.totalVal;
scounter--;
nam1.totalVal = scounter;
if (nam1.totalVal < 2) {
deatharr.addArrItem(nam1._name);
}
}
}
if (ucon) {
nam1 = eval ((("_root.tiles.tiles_" + x1) + "_") + (y1 - 1));
if ((nam1 != undefined) and nam1.down) {
scounter = nam1.totalVal;
scounter--;
nam1.totalVal = scounter;
if (nam1.totalVal < 2) {
deatharr.addArrItem(nam1._name);
}
}
}
if (dcon) {
nam1 = eval ((("_root.tiles.tiles_" + x1) + "_") + (y1 + 1));
if ((nam1 != undefined) and nam1.up) {
scounter = nam1.totalVal;
scounter--;
nam1.totalVal = scounter;
if (nam1.totalVal < 2) {
deatharr.addArrItem(nam1._name);
}
}
}
}
dd++;
}
temparrC = [];
var i = 0;
while (i < temparr.length) {
nam2 = eval ("_root.tiles." + temparr[i]);
if ((nam2.totalVal < 2) and (nam2.checkSign == "full")) {
nam2.dead = true;
} else {
nam2.dead = false;
temparrC.push(nam2._name);
}
i++;
}
chkcomplate();
}
function chkcomplate() {
cktile = arr1end;
count = 0;
if (!game.gameEnd) {
var j = 0;
while (j < cktile.length) {
arr_val = cktile[j];
temptile1 = (("tiles_" + arr_val[0]) + "_") + arr_val[1];
var i = 0;
while (i < temparrC.length) {
if (temptile1 == temparrC[i]) {
count++;
}
i++;
}
j++;
}
}
trace(count + " Counter ");
if ((count == 2) and tim) {
gameOver_mc1.gotoAndPlay("greatgoing");
tim = false;
}
if ((count == cktile.length) and (!game.gameEnd)) {
removelist = [];
temparrC1 = [];
game.gameEnd = true;
gameOver_mc1.gotoAndPlay("levelcomplete");
boy_mc.gotoAndStop(2);
lady_mc.gotoAndStop(2);
lady_mc1.gotoAndStop(2);
var i = 1;
while (i < temparrC.length) {
val = temparrC[i];
nam = eval ("_root.tiles." + val);
if (nam.totalVal >= 2) {
nam.mc.gotoAndStop(2);
line_mc.gotoAndPlay(2);
_root.score2 = _root.score2 + 10;
temparrC1.pop(val);
} else {
nam._alpha = 100;
}
i++;
}
}
}
function chkloss(arr, val1, agchk) {
ss = 1;
if (agchk == 3) {
na = _root.tiles.tiles_-1_8;
na.checkSign = "full";
}
var i = 1;
while (i < temparr.length) {
val = eval ("_root.tiles." + temparr[i]).checkSign;
if (val != "full") {
ss = 0;
} else {
temparr[i];
}
i++;
}
nam = eval ((("_root.tiles.tiles_" + (int(arr[0]) + val1)) + "_") + arr[1]);
if (nam == undefined) {
ss = 0;
}
if (ss == 1) {
game.gameEnd = true;
gameOver_mc1.gotoAndPlay("gameover");
}
}
stop();
var game = new Object();
game = {tileW:50, tileH:50, tileno:0, type:5, speed:5, maxxtile:6, maxytile:9, keypressed:false, level:2, gameEnd:false};
dir_arr = ["left", "up", "right", "down"];
game.map = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
arr2 = [[6, 10]];
arr1end = [[-1, 8], [-1, 4], [5, 10]];
levelarr1 = [[6, 10], [-1, 8], [-1, 4], [6, 10]];
removelist = [];
_root.totalNoTiles = 0;
temparrC1 = [];
temparr = [];
temparr = [];
deatharr = [];
temp2 = [];
temp1 = [];
target = 2;
_root.score2 = 0;
_root.rotateMc = true;
game.Tile0 = function () {
};
game.Tile0.prototype.frame = 1;
game.Tile0.prototype.up = false;
game.Tile0.prototype.down = false;
game.Tile0.prototype.right = true;
game.Tile0.prototype.left = true;
game.Tile0.prototype.sideVal = 2;
game.Tile1 = function () {
};
game.Tile1.prototype.frame = 2;
game.Tile1.prototype.up = true;
game.Tile1.prototype.down = true;
game.Tile1.prototype.right = true;
game.Tile1.prototype.left = true;
game.Tile1.prototype.sideVal = 4;
game.Tile2 = function () {
};
game.Tile2.prototype.frame = 3;
game.Tile2.prototype.up = true;
game.Tile2.prototype.down = false;
game.Tile2.prototype.right = false;
game.Tile2.prototype.left = true;
game.Tile2.prototype.sideVal = 2;
game.Tile3 = function () {
};
game.Tile3.prototype.frame = 4;
game.Tile3.prototype.up = true;
game.Tile3.prototype.down = false;
game.Tile3.prototype.right = true;
game.Tile3.prototype.left = true;
game.Tile3.prototype.sideVal = 3;
game.Tile4 = function () {
};
game.Tile4.prototype.frame = 5;
game.Tile4.prototype.up = true;
game.Tile4.prototype.down = true;
game.Tile4.prototype.right = true;
game.Tile4.prototype.left = true;
game.Tile4.prototype.sideVal = 0;
createtile = function () {
if (!game.gameEnd) {
_root.totalNoTiles++;
_root.rotateMc = true;
x = random(5);
if ((_root.totalNoTiles % 12) == 0) {
type = 4;
} else {
type = random(4);
}
y = 0;
game.clip = _root.tiles;
game.cktile = _root.arr2;
name = "tile_" + game.tileno;
game.tileno++;
game[name] = new game["Tile" + type]();
temptile = game.clip.attachMovie("tiles2", name, game.tileno);
game.clip[name]._x = x * game.tileW;
game.clip[name]._y = y;
game.clip[name].type = type;
game.clip[name].dir = dir_arr.toString().split(",");
game.clip[name].up = game[name].up;
game.clip[name].down = game[name].down;
game.clip[name].right = game[name].right;
game.clip[name].left = game[name].left;
game.clip[name].side1 = 0;
game.clip[name].side2 = 0;
game.clip[name].side3 = 0;
game.clip[name].side4 = 0;
game.clip[name].move = true;
game.clip[name].gotoAndStop(game[name].frame);
game.clip[name].onRelease = function () {
};
game.clip[name].onEnterFrame = function () {
if (this.move and (!game.gameEnd)) {
this.y = Math.ceil((this._y + game.speed) / this._height);
this.x = Math.ceil(this._x / this._width);
nam = this.name;
nam_arr = nam.split("_");
newname = (("tiles_" + this.x) + "_") + this.y;
if ((lastname == undefined) or (lastname != newname)) {
this.name = newname;
lastname = newname;
}
val = game.map[this.y][this.x];
if ((val == 0) and this.move) {
this._y = this._y + game.speed;
_root.cupid._y = this._y - 50;
_root.cupid._x = this._x + 250;
if (_root.cupid._x >= 450) {
_root.cupid._xscale = -100;
_root.cupid._x = this._x + 200;
} else {
_root.cupid._xscale = 100;
}
} else {
this.move = false;
if (this.move == false) {
this._y = (this.y * game.tileH) - game.tileH;
this._x = (this.x * game.tilew) - game.tilew;
trace(this._y);
}
}
} else if (!_root.game.keypressed) {
_root.game.map[this.y - 1][this.x] = 1;
this._name = this.name;
if (this.type != 4) {
checktile();
}
if (((this.y - 1) <= 0) and (this.type != 4)) {
game.gameEnd = true;
gameOver_mc1.gotoAndPlay("gameover");
} else {
temptile.move = false;
_root.create = 1;
_root.snd_mc.gotoAndPlay(2);
temptile = "";
charMove();
}
if (this.type == 4) {
_root.game.map[this.y - 1][this.x] = 0;
trace(this._name);
trace(((" " + this.y) + " ") + this.x);
_root.game.map[this.y][this.x] = 0;
namnew = eval ((("_root.tiles.tiles_" + this.x) + "_") + (this.y + 1));
namnew.mc.gotoAndPlay("blast");
this.mc.play();
} else {
delete this.onEnterFrame;
}
} else {
this.move = true;
}
};
}
};
createtile();
temparr = [];
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (Key.getCode() == 40) {
_root.keyup = false;
game.speed = 10;
} else {
game.speed = 5;
}
};
keyListener.onKeyUp = function () {
if (Key.getCode() == 40) {
game.speed = 5;
_root.keyup = true;
}
};
Key.addListener(keyListener);
Array.prototype.addArrItem = function (_nam) {
var _local5 = 1;
var _local4 = this.length;
if (_local4 != 0) {
var _local3 = 0;
while (_local3 <= _local4) {
Arrnam = this[_local3];
if (Arrnam == _nam) {
_local5 = 0;
}
_local3++;
}
}
if (_local5 == 1) {
this[_local4] = _nam;
_root.arr++;
}
};
_root.arr = 0;
_root.level = 2;
narr = arr2;
var j = 0;
while (j < narr.length) {
_root["found" + j] = 0;
j++;
}
Array.prototype.lineup = function (x, y) {
var _local8 = new Array();
var _local4 = [];
var _local6 = [];
var _local5 = x;
while (_local5 >= 0) {
var _local2 = 0;
while (_local2 < this.length) {
nam = this[_local2];
_local4 = nam.split("_");
x1 = int(_local4[1]);
if (x1 == _local5) {
_local6.push(this[_local2]);
}
_local2++;
}
_local5--;
}
var _local3 = new Array();
xno = x;
yno = y;
nam = (("tiles_" + xno) + "_") + yno;
_local3.addArrItem(nam);
_local5 = 0;
while (_local5 < _local3.length) {
nam1 = (("tiles_" + xno) + "_") + (yno + 1);
nam2 = (("tiles_" + xno) + "_") + (yno - 1);
nam3 = (("tiles_" + (xno + 1)) + "_") + yno;
nam4 = (("tiles_" + (xno - 1)) + "_") + yno;
var _local2 = 0;
while (_local2 < this.length) {
if (nam1 == this[_local2]) {
rst = _local3.addArrItem(nam1);
if (!rst) {
yno = yno + 1;
this.splice(_local2, 1);
break;
}
} else if (nam2 == this[_local2]) {
rst = _local3.addArrItem(nam2);
if (!rst) {
yno = yno - 1;
this.splice(_local2, 1);
break;
}
} else if (nam3 == this[_local2]) {
rst = _local3.addArrItem(nam3);
if (!rst) {
xno = xno + 1;
this.splice(_local2, 1);
break;
}
} else if (nam4 == this[_local2]) {
rst = _local3.addArrItem(nam4);
if (!rst) {
xno = xno - 1;
this.splice(_local2, 1);
break;
}
}
_local2++;
}
_local5++;
}
return(_local3);
};
Array.prototype.remove = function (_nam) {
var _local5 = [];
var _local2 = 0;
while (_local2 < this.length) {
if (_nam != this[_local2]) {
var _local3 = _local2;
}
_local2++;
}
this.splice(_local2, 1);
};
charMove = function () {
onEnterFrame = function () {
if ((_root.cupid._y <= 0) and (_root.create == 1)) {
createtile();
_root.create = 0;
delete onEnterFrame;
} else if ((_root.cupid._y > 0) and (_root.create == 1)) {
_root.cupid._y = _root.cupid._y - 60;
}
};
};
tim = true;
Instance of Symbol 345 MovieClip "tiles_-1_8" in Frame 88
onClipEvent (load) {
this.name = "tiles_-1_8";
this.up = false;
this.down = false;
this.right = true;
this.left = true;
this.side1 = 0;
this.side2 = 0;
this.side3 = 0;
this.side4 = 0;
}
Instance of Symbol 345 MovieClip "tiles_5_10" in Frame 88
onClipEvent (load) {
this.name = "tiles_5_10";
this.up = false;
this.down = false;
this.right = true;
this.left = true;
this.side1 = 0;
this.side2 = 0;
this.side3 = 0;
this.side4 = 0;
}
Frame 101
stop();
Frame 112
stop();
Frame 120
function checktile() {
trace("In");
var i = 0;
while (i < levelarr1.length) {
temparr = [];
deatharr = [];
arr_val = levelarr1[i];
temptile1 = eval ((("_root.tiles.tiles_" + arr_val[0]) + "_") + arr_val[1]);
temparr.addArrItem(temptile1._name);
trace(temparr + " temparr");
action();
if ((i == 0) or (i == 3)) {
val = -1;
} else {
val = 1;
}
if (!game.gameEnd) {
chkloss(levelarr1[i], val, i);
} else {
_root["lineuparr" + i] = [];
_root["lineuparr" + i] = temparrC;
}
i++;
}
if (game.gameEnd) {
a = 1;
len = 0;
as = "l";
dd = eval ("lineuparr" + target);
}
}
function action() {
if (temparr != undefined) {
var dd = 0;
while (dd < temparr.length) {
nam1 = temparr[dd];
nam_arr = nam1.split("_");
x1 = int(nam_arr[1]);
y1 = int(nam_arr[2]);
nam1 = eval ((("_root.tiles.tiles_" + x1) + "_") + y1);
rcon = nam1.right;
lcon = nam1.left;
ucon = nam1.up;
dcon = nam1.down;
actionbox(rcon, lcon, ucon, dcon, x1, y1);
dd++;
}
}
chkgameover();
}
function actionbox(rcon, lcon, ucon, dcon, x1, y1) {
na = eval ((("_root.tiles.tiles_" + x1) + "_") + y1);
na.checkSign = "full";
if (rcon) {
newnam = eval ((("_root.tiles.tiles_" + (x1 + 1)) + "_") + y1);
if ((newnam != undefined) and newnam.left) {
temparr.addArrItem(newnam._name);
na.side2 = 1;
}
if ((newnam == undefined) and ((x1 + 1) != 6)) {
na.checkSign = "empty";
}
}
if (lcon) {
newnam = eval ((("_root.tiles.tiles_" + (x1 - 1)) + "_") + y1);
if ((newnam != undefined) and newnam.right) {
temparr.addArrItem(newnam._name);
na.side1 = 1;
}
if ((newnam == undefined) and ((x1 - 1) != -1)) {
na.checkSign = "empty";
}
}
if (dcon) {
newnam = eval ((("_root.tiles.tiles_" + x1) + "_") + (y1 + 1));
if ((newnam != undefined) and newnam.up) {
temparr.addArrItem(newnam._name);
na.side4 = 1;
}
if ((newnam == undefined) and ((y1 + 1) != 11)) {
na.checkSign = "empty";
}
}
if (ucon) {
newnam = eval ((("_root.tiles.tiles_" + x1) + "_") + (y1 - 1));
if ((newnam != undefined) and newnam.down) {
temparr.addArrItem(newnam._name);
na.side3 = 1;
}
if (newnam == undefined) {
na.checkSign = "empty";
}
}
scounter = 0;
nam2 = eval ((("_root.tiles.tiles_" + x1) + "_") + y1);
nam2.totalVal = scounter;
scounter = 0;
var i = 1;
while (i < 5) {
numo = eval ((((("_root.tiles.tiles_" + x1) + "_") + y1) + ".side") + i);
if (numo == 1) {
scounter++;
}
i++;
}
nam2.totalVal = scounter;
if (scounter < 2) {
deatharr.addArrItem(nam2._name);
}
}
function chkgameover() {
var dd = 0;
while (dd < deatharr.length) {
nam1 = deatharr[dd];
nam_arr = nam1.split("_");
x1 = int(nam_arr[1]);
y1 = int(nam_arr[2]);
nam = eval ((("_root.tiles.tiles_" + x1) + "_") + y1);
rcon = nam.right;
lcon = nam.left;
ucon = nam.up;
dcon = nam.down;
if ((x1 >= 0) and (x1 <= 5)) {
if (rcon) {
nam1 = eval ((("_root.tiles.tiles_" + (x1 + 1)) + "_") + y1);
if ((nam1 != undefined) and nam1.left) {
scounter = nam1.totalVal;
scounter--;
nam1.totalVal = scounter;
if (nam1.totalVal < 2) {
deatharr.addArrItem(nam1._name);
}
}
}
if (lcon) {
nam1 = eval ((("_root.tiles.tiles_" + (x1 - 1)) + "_") + y1);
if ((nam1 != undefined) and nam1.right) {
scounter = nam1.totalVal;
scounter--;
nam1.totalVal = scounter;
if (nam1.totalVal < 2) {
deatharr.addArrItem(nam1._name);
}
}
}
if (ucon) {
nam1 = eval ((("_root.tiles.tiles_" + x1) + "_") + (y1 - 1));
if ((nam1 != undefined) and nam1.down) {
scounter = nam1.totalVal;
scounter--;
nam1.totalVal = scounter;
if (nam1.totalVal < 2) {
deatharr.addArrItem(nam1._name);
}
}
}
if (dcon) {
nam1 = eval ((("_root.tiles.tiles_" + x1) + "_") + (y1 + 1));
if ((nam1 != undefined) and nam1.up) {
scounter = nam1.totalVal;
scounter--;
nam1.totalVal = scounter;
if (nam1.totalVal < 2) {
deatharr.addArrItem(nam1._name);
}
}
}
}
dd++;
}
temparrC = [];
var i = 0;
while (i < temparr.length) {
nam2 = eval ("_root.tiles." + temparr[i]);
if ((nam2.totalVal < 2) and (nam2.checkSign == "full")) {
nam2.dead = true;
} else {
nam2.dead = false;
temparrC.push(nam2._name);
}
i++;
}
chkcomplate();
}
function chkcomplate() {
cktile = arr1end;
count = 0;
if (!game.gameEnd) {
var j = 0;
while (j < cktile.length) {
arr_val = cktile[j];
temptile1 = (("tiles_" + arr_val[0]) + "_") + arr_val[1];
var i = 0;
while (i < temparrC.length) {
if (temptile1 == temparrC[i]) {
count++;
}
i++;
}
j++;
}
}
if ((count == 2) and tim) {
gameOver_mc1.gotoAndPlay("greatgoing");
tim = false;
}
if ((count == cktile.length) and (!game.gameEnd)) {
removelist = [];
temparrC1 = [];
if (_root.anty == false) {
game.gameEnd = true;
gameOver_mc1.gotoAndPlay("levelcomplete");
boy_mc.gotoAndStop(2);
lady.lady_mc1.gotoAndStop(2);
lady_mc.gotoAndStop(2);
lady.stop();
var i = 1;
while (i < temparrC.length) {
val = temparrC[i];
nam = eval ("_root.tiles." + val);
if (nam.totalVal >= 2) {
nam.mc.gotoAndStop(2);
line_mc.gotoAndPlay(2);
_root.score3 = _root.score3 + 10;
temparrC1.pop(val);
} else {
nam._alpha = 100;
}
i++;
}
} else {
lady.stop();
game.gameEnd = true;
gameOver_mc1.gotoAndPlay("wrongnumber");
}
}
}
function chkloss(arr, val1, agchk) {
trace((("ss" + arr) + " ") + val);
ss = 1;
if (agchk == 3) {
na = _root.tiles.tiles_-1_8;
na.checkSign = "full";
}
var i = 1;
while (i < temparr.length) {
trace((temparr + " temparr ") + i);
val = eval ("_root.tiles." + temparr[i]).checkSign;
if (val != "full") {
ss = 0;
} else {
temparr[i];
}
i++;
}
nam = eval ((("_root.tiles.tiles_" + (int(arr[0]) + val1)) + "_") + arr[1]);
trace((("_root.tiles.tiles_" + (int(arr[0]) + val1)) + "_") + arr[1]);
trace("nam=" + nam);
if (nam == undefined) {
ss = 0;
}
if (ss == 1) {
game.gameEnd = true;
gameOver_mc1.gotoAndPlay("gameover");
}
}
stop();
var game = new Object();
game = {tileW:50, tileH:50, tileno:0, type:5, speed:5, maxxtile:6, maxytile:9, keypressed:false, level:3, gameEnd:false};
dir_arr = ["left", "up", "right", "down"];
game.map = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
arr3 = [[6, 10]];
arr1end = [[-1, 8], [-1, 4], [5, 10]];
levelarr1 = [[6, 10], [-1, 8], [-1, 4], [6, 10]];
removelist = [];
temparrC1 = [];
_root.totalNoTiles = 0;
temparr = [];
temparr = [];
deatharr = [];
temp2 = [];
temp1 = [];
target = 2;
_root.score3 = 0;
_root.rotateMc = true;
game.Tile0 = function () {
};
game.Tile0.prototype.frame = 1;
game.Tile0.prototype.up = false;
game.Tile0.prototype.down = false;
game.Tile0.prototype.right = true;
game.Tile0.prototype.left = true;
game.Tile0.prototype.sideVal = 2;
game.Tile1 = function () {
};
game.Tile1.prototype.frame = 2;
game.Tile1.prototype.up = true;
game.Tile1.prototype.down = true;
game.Tile1.prototype.right = true;
game.Tile1.prototype.left = true;
game.Tile1.prototype.sideVal = 4;
game.Tile2 = function () {
};
game.Tile2.prototype.frame = 3;
game.Tile2.prototype.up = true;
game.Tile2.prototype.down = false;
game.Tile2.prototype.right = false;
game.Tile2.prototype.left = true;
game.Tile2.prototype.sideVal = 2;
game.Tile3 = function () {
};
game.Tile3.prototype.frame = 4;
game.Tile3.prototype.up = true;
game.Tile3.prototype.down = false;
game.Tile3.prototype.right = true;
game.Tile3.prototype.left = true;
game.Tile3.prototype.sideVal = 3;
game.Tile4 = function () {
};
game.Tile4.prototype.frame = 5;
game.Tile4.prototype.up = true;
game.Tile4.prototype.down = true;
game.Tile4.prototype.right = true;
game.Tile4.prototype.left = true;
game.Tile4.prototype.sideVal = 0;
createtile = function () {
if (!game.gameEnd) {
_root.totalNoTiles++;
_root.rotateMc = true;
x = random(5);
if ((_root.totalNoTiles % 7) == 0) {
type = 4;
} else {
type = random(4);
}
y = 0;
game.clip = _root.tiles;
game.cktile = _root.arr3;
name = "tile_" + game.tileno;
game.tileno++;
game[name] = new game["Tile" + type]();
temptile = game.clip.attachMovie("tiles3", name, game.tileno);
game.clip[name]._x = x * game.tileW;
game.clip[name]._y = y;
game.clip[name].type = type;
game.clip[name].dir = dir_arr.toString().split(",");
game.clip[name].up = game[name].up;
game.clip[name].down = game[name].down;
game.clip[name].right = game[name].right;
game.clip[name].left = game[name].left;
game.clip[name].side1 = 0;
game.clip[name].side2 = 0;
game.clip[name].side3 = 0;
game.clip[name].side4 = 0;
game.clip[name].move = true;
game.clip[name].gotoAndStop(game[name].frame);
game.clip[name].onRelease = function () {
trace((((((((((this._name + " ") + this.left) + " ") + this.up) + " ") + this.right) + " ") + this.down) + " ") + this._y);
};
game.clip[name].onEnterFrame = function () {
if (this.move and (!game.gameEnd)) {
this.y = Math.ceil((this._y + game.speed) / this._height);
this.x = Math.ceil(this._x / this._width);
nam = this.name;
nam_arr = nam.split("_");
newname = (("tiles_" + this.x) + "_") + this.y;
if ((lastname == undefined) or (lastname != newname)) {
this.name = newname;
lastname = newname;
}
val = game.map[this.y][this.x];
if ((val == 0) and this.move) {
this._y = this._y + game.speed;
_root.cupid._y = this._y - 50;
_root.cupid._x = this._x + 250;
if (_root.cupid._x >= 450) {
_root.cupid._xscale = -100;
_root.cupid._x = this._x + 200;
} else {
_root.cupid._xscale = 100;
}
} else {
this.move = false;
if (this.move == false) {
this._y = (this.y * game.tileH) - game.tileH;
this._x = (this.x * game.tilew) - game.tilew;
trace(this._y);
}
}
} else if (!_root.game.keypressed) {
_root.game.map[this.y - 1][this.x] = 1;
this._name = this.name;
if (this.type != 4) {
checktile();
}
if (((this.y - 1) <= 0) and (this.type != 4)) {
game.gameEnd = true;
gameOver_mc1.gotoAndPlay("gameover");
} else {
temptile.move = false;
_root.create = 1;
_root.snd_mc.gotoAndPlay(2);
temptile = "";
charMove();
}
if (this.type == 4) {
_root.game.map[this.y - 1][this.x] = 0;
trace(this._name);
trace(((" " + this.y) + " ") + this.x);
_root.game.map[this.y][this.x] = 0;
namnew = eval ((("_root.tiles.tiles_" + this.x) + "_") + (this.y + 1));
namnew.mc.gotoAndPlay("blast");
this.mc.play();
} else {
delete this.onEnterFrame;
}
} else {
this.move = true;
}
};
}
};
createtile();
temparr = [];
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (Key.getCode() == 40) {
_root.keyup = false;
game.speed = 10;
} else {
game.speed = 5;
}
};
keyListener.onKeyUp = function () {
if (Key.getCode() == 40) {
game.speed = 5;
_root.keyup = true;
}
};
Key.addListener(keyListener);
Array.prototype.addArrItem = function (_nam) {
var _local5 = 1;
var _local4 = this.length;
if (_local4 != 0) {
var _local3 = 0;
while (_local3 <= _local4) {
Arrnam = this[_local3];
if (Arrnam == _nam) {
_local5 = 0;
}
_local3++;
}
}
if (_local5 == 1) {
this[_local4] = _nam;
_root.arr++;
}
};
_root.arr = 0;
_root.level = 3;
narr = arr2;
var j = 0;
while (j < narr.length) {
_root["found" + j] = 0;
j++;
}
Array.prototype.lineup = function (x, y) {
var _local8 = new Array();
var _local4 = [];
var _local6 = [];
var _local5 = x;
while (_local5 >= 0) {
var _local2 = 0;
while (_local2 < this.length) {
nam = this[_local2];
_local4 = nam.split("_");
x1 = int(_local4[1]);
if (x1 == _local5) {
_local6.push(this[_local2]);
}
_local2++;
}
_local5--;
}
var _local3 = new Array();
xno = x;
yno = y;
nam = (("tiles_" + xno) + "_") + yno;
_local3.addArrItem(nam);
_local5 = 0;
while (_local5 < _local3.length) {
nam1 = (("tiles_" + xno) + "_") + (yno + 1);
nam2 = (("tiles_" + xno) + "_") + (yno - 1);
nam3 = (("tiles_" + (xno + 1)) + "_") + yno;
nam4 = (("tiles_" + (xno - 1)) + "_") + yno;
var _local2 = 0;
while (_local2 < this.length) {
if (nam1 == this[_local2]) {
rst = _local3.addArrItem(nam1);
if (!rst) {
yno = yno + 1;
this.splice(_local2, 1);
break;
}
} else if (nam2 == this[_local2]) {
rst = _local3.addArrItem(nam2);
if (!rst) {
yno = yno - 1;
this.splice(_local2, 1);
break;
}
} else if (nam3 == this[_local2]) {
rst = _local3.addArrItem(nam3);
if (!rst) {
xno = xno + 1;
this.splice(_local2, 1);
break;
}
} else if (nam4 == this[_local2]) {
rst = _local3.addArrItem(nam4);
if (!rst) {
xno = xno - 1;
this.splice(_local2, 1);
break;
}
}
_local2++;
}
_local5++;
}
return(_local3);
};
Array.prototype.remove = function (_nam) {
var _local5 = [];
var _local2 = 0;
while (_local2 < this.length) {
if (_nam != this[_local2]) {
var _local3 = _local2;
}
_local2++;
}
this.splice(_local2, 1);
};
charMove = function () {
onEnterFrame = function () {
if ((_root.cupid._y <= 0) and (_root.create == 1)) {
createtile();
_root.create = 0;
delete onEnterFrame;
} else if ((_root.cupid._y > 0) and (_root.create == 1)) {
_root.cupid._y = _root.cupid._y - 60;
}
};
};
tim = true;
Instance of Symbol 345 MovieClip "tiles_-1_8" in Frame 120
onClipEvent (load) {
this.name = "tiles_-1_8";
this.up = false;
this.down = false;
this.right = true;
this.left = true;
this.side1 = 0;
this.side2 = 0;
this.side3 = 0;
this.side4 = 0;
}
Instance of Symbol 345 MovieClip "tiles_5_10" in Frame 120
onClipEvent (load) {
this.name = "tiles_5_10";
this.up = false;
this.down = false;
this.right = true;
this.left = true;
this.side1 = 0;
this.side2 = 0;
this.side3 = 0;
this.side4 = 0;
}
Frame 131
stop();
Frame 143
stop();
Frame 151
function checktile() {
trace("In");
var i = 0;
while (i < levelarr1.length) {
temparr = [];
deatharr = [];
arr_val = levelarr1[i];
temptile1 = eval ((("_root.tiles.tiles_" + arr_val[0]) + "_") + arr_val[1]);
temparr.addArrItem(temptile1._name);
trace(temparr + " temparr");
action();
if ((i == 0) or (i == 3)) {
val = -1;
} else {
val = 1;
}
if (!game.gameEnd) {
chkloss(levelarr1[i], val, i);
} else {
_root["lineuparr" + i] = [];
_root["lineuparr" + i] = temparrC;
}
i++;
}
if (game.gameEnd) {
a = 1;
len = 0;
as = "l";
dd = eval ("lineuparr" + target);
}
}
function action() {
if (temparr != undefined) {
var dd = 0;
while (dd < temparr.length) {
nam1 = temparr[dd];
nam_arr = nam1.split("_");
x1 = int(nam_arr[1]);
y1 = int(nam_arr[2]);
nam1 = eval ((("_root.tiles.tiles_" + x1) + "_") + y1);
rcon = nam1.right;
lcon = nam1.left;
ucon = nam1.up;
dcon = nam1.down;
actionbox(rcon, lcon, ucon, dcon, x1, y1);
dd++;
}
}
chkgameover();
}
function actionbox(rcon, lcon, ucon, dcon, x1, y1) {
na = eval ((("_root.tiles.tiles_" + x1) + "_") + y1);
na.checkSign = "full";
if (rcon) {
newnam = eval ((("_root.tiles.tiles_" + (x1 + 1)) + "_") + y1);
if ((newnam != undefined) and newnam.left) {
temparr.addArrItem(newnam._name);
na.side2 = 1;
}
if ((newnam == undefined) and ((x1 + 1) != 6)) {
na.checkSign = "empty";
}
}
if (lcon) {
newnam = eval ((("_root.tiles.tiles_" + (x1 - 1)) + "_") + y1);
if ((newnam != undefined) and newnam.right) {
temparr.addArrItem(newnam._name);
na.side1 = 1;
}
if ((newnam == undefined) and ((x1 - 1) != -1)) {
na.checkSign = "empty";
}
}
if (dcon) {
newnam = eval ((("_root.tiles.tiles_" + x1) + "_") + (y1 + 1));
if ((newnam != undefined) and newnam.up) {
temparr.addArrItem(newnam._name);
na.side4 = 1;
}
if ((newnam == undefined) and ((y1 + 1) != 11)) {
na.checkSign = "empty";
}
}
if (ucon) {
newnam = eval ((("_root.tiles.tiles_" + x1) + "_") + (y1 - 1));
if ((newnam != undefined) and newnam.down) {
temparr.addArrItem(newnam._name);
na.side3 = 1;
}
if (newnam == undefined) {
na.checkSign = "empty";
}
}
scounter = 0;
nam2 = eval ((("_root.tiles.tiles_" + x1) + "_") + y1);
nam2.totalVal = scounter;
scounter = 0;
var i = 1;
while (i < 5) {
numo = eval ((((("_root.tiles.tiles_" + x1) + "_") + y1) + ".side") + i);
if (numo == 1) {
scounter++;
}
i++;
}
nam2.totalVal = scounter;
if (scounter < 2) {
deatharr.addArrItem(nam2._name);
}
}
function chkgameover() {
var dd = 0;
while (dd < deatharr.length) {
nam1 = deatharr[dd];
nam_arr = nam1.split("_");
x1 = int(nam_arr[1]);
y1 = int(nam_arr[2]);
nam = eval ((("_root.tiles.tiles_" + x1) + "_") + y1);
rcon = nam.right;
lcon = nam.left;
ucon = nam.up;
dcon = nam.down;
if ((x1 >= 0) and (x1 <= 5)) {
if (rcon) {
nam1 = eval ((("_root.tiles.tiles_" + (x1 + 1)) + "_") + y1);
if ((nam1 != undefined) and nam1.left) {
scounter = nam1.totalVal;
scounter--;
nam1.totalVal = scounter;
if (nam1.totalVal < 2) {
deatharr.addArrItem(nam1._name);
}
}
}
if (lcon) {
nam1 = eval ((("_root.tiles.tiles_" + (x1 - 1)) + "_") + y1);
if ((nam1 != undefined) and nam1.right) {
scounter = nam1.totalVal;
scounter--;
nam1.totalVal = scounter;
if (nam1.totalVal < 2) {
deatharr.addArrItem(nam1._name);
}
}
}
if (ucon) {
nam1 = eval ((("_root.tiles.tiles_" + x1) + "_") + (y1 - 1));
if ((nam1 != undefined) and nam1.down) {
scounter = nam1.totalVal;
scounter--;
nam1.totalVal = scounter;
if (nam1.totalVal < 2) {
deatharr.addArrItem(nam1._name);
}
}
}
if (dcon) {
nam1 = eval ((("_root.tiles.tiles_" + x1) + "_") + (y1 + 1));
if ((nam1 != undefined) and nam1.up) {
scounter = nam1.totalVal;
scounter--;
nam1.totalVal = scounter;
if (nam1.totalVal < 2) {
deatharr.addArrItem(nam1._name);
}
}
}
}
dd++;
}
temparrC = [];
var i = 0;
while (i < temparr.length) {
nam2 = eval ("_root.tiles." + temparr[i]);
if ((nam2.totalVal < 2) and (nam2.checkSign == "full")) {
nam2.dead = true;
} else {
nam2.dead = false;
temparrC.push(nam2._name);
}
i++;
}
chkcomplate();
}
function chkcomplate() {
cktile = arr1end;
count = 0;
if (!game.gameEnd) {
var j = 0;
while (j < cktile.length) {
arr_val = cktile[j];
temptile1 = (("tiles_" + arr_val[0]) + "_") + arr_val[1];
var i = 0;
while (i < temparrC.length) {
if (temptile1 == temparrC[i]) {
count++;
}
i++;
}
j++;
}
}
if ((count == 2) and tim) {
gameOver_mc1.gotoAndPlay("greatgoing");
tim = false;
}
if ((count == cktile.length) and (!game.gameEnd)) {
removelist = [];
temparrC1 = [];
if (_root.anty == false) {
game.gameEnd = true;
gameOver_mc1.gotoAndPlay("levelcomplete");
boy_mc.gotoAndStop(2);
lady.lady_mc1.gotoAndStop(2);
lady_mc.gotoAndStop(2);
lady.stop();
var i = 1;
while (i < temparrC.length) {
val = temparrC[i];
nam = eval ("_root.tiles." + val);
if (nam.totalVal >= 2) {
nam.mc.gotoAndStop(2);
line_mc.gotoAndPlay(2);
_root.score4 = _root.score4 + 20;
temparrC1.pop(val);
} else {
nam._alpha = 100;
}
i++;
}
} else {
lady.stop();
game.gameEnd = true;
gameOver_mc1.gotoAndPlay("wrongnumber");
}
}
}
function chkloss(arr, val1, agchk) {
trace((("ss" + arr) + " ") + val);
ss = 1;
if (agchk == 3) {
na = _root.tiles.tiles_-1_8;
na.checkSign = "full";
}
var i = 1;
while (i < temparr.length) {
trace((temparr + " temparr ") + i);
val = eval ("_root.tiles." + temparr[i]).checkSign;
if (val != "full") {
ss = 0;
} else {
temparr[i];
}
i++;
}
nam = eval ((("_root.tiles.tiles_" + (int(arr[0]) + val1)) + "_") + arr[1]);
trace((("_root.tiles.tiles_" + (int(arr[0]) + val1)) + "_") + arr[1]);
trace("nam=" + nam);
if (nam == undefined) {
ss = 0;
}
if (ss == 1) {
game.gameEnd = true;
gameOver_mc1.gotoAndPlay("gameover");
}
}
stop();
var game = new Object();
game = {tileW:50, tileH:50, tileno:0, type:5, speed:8, maxxtile:6, maxytile:9, keypressed:false, level:4, gameEnd:false};
dir_arr = ["left", "up", "right", "down"];
game.map = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
arr4 = [[6, 10]];
arr1end = [[-1, 8], [-1, 4], [5, 10]];
levelarr1 = [[6, 10], [-1, 8], [-1, 4], [6, 10]];
removelist = [];
temparrC1 = [];
temparr = [];
temparr = [];
deatharr = [];
temp2 = [];
_root.totalNoTiles = 0;
temp1 = [];
target = 2;
_root.score4 = 0;
_root.rotateMc = true;
game.Tile0 = function () {
};
game.Tile0.prototype.frame = 1;
game.Tile0.prototype.up = false;
game.Tile0.prototype.down = false;
game.Tile0.prototype.right = true;
game.Tile0.prototype.left = true;
game.Tile0.prototype.sideVal = 2;
game.Tile1 = function () {
};
game.Tile1.prototype.frame = 2;
game.Tile1.prototype.up = true;
game.Tile1.prototype.down = true;
game.Tile1.prototype.right = true;
game.Tile1.prototype.left = true;
game.Tile1.prototype.sideVal = 4;
game.Tile2 = function () {
};
game.Tile2.prototype.frame = 3;
game.Tile2.prototype.up = true;
game.Tile2.prototype.down = false;
game.Tile2.prototype.right = false;
game.Tile2.prototype.left = true;
game.Tile2.prototype.sideVal = 2;
game.Tile3 = function () {
};
game.Tile3.prototype.frame = 4;
game.Tile3.prototype.up = true;
game.Tile3.prototype.down = false;
game.Tile3.prototype.right = true;
game.Tile3.prototype.left = true;
game.Tile3.prototype.sideVal = 3;
game.Tile4 = function () {
};
game.Tile4.prototype.frame = 5;
game.Tile4.prototype.up = true;
game.Tile4.prototype.down = true;
game.Tile4.prototype.right = true;
game.Tile4.prototype.left = true;
game.Tile4.prototype.sideVal = 0;
createtile = function () {
if (!game.gameEnd) {
_root.totalNoTiles++;
_root.rotateMc = true;
x = random(5);
if ((_root.totalNoTiles % 7) == 0) {
type = 4;
} else {
type = random(4);
}
y = 0;
game.clip = _root.tiles;
game.cktile = _root.arr4;
name = "tile_" + game.tileno;
game.tileno++;
game[name] = new game["Tile" + type]();
temptile = game.clip.attachMovie("tiles4", name, game.tileno);
game.clip[name]._x = x * game.tileW;
game.clip[name]._y = y;
game.clip[name].type = type;
game.clip[name].dir = dir_arr.toString().split(",");
game.clip[name].up = game[name].up;
game.clip[name].down = game[name].down;
game.clip[name].right = game[name].right;
game.clip[name].left = game[name].left;
game.clip[name].side1 = 0;
game.clip[name].side2 = 0;
game.clip[name].side3 = 0;
game.clip[name].side4 = 0;
game.clip[name].move = true;
game.clip[name].gotoAndStop(game[name].frame);
game.clip[name].onRelease = function () {
trace((((((((((this._name + " ") + this.left) + " ") + this.up) + " ") + this.right) + " ") + this.down) + " ") + this._y);
};
game.clip[name].onEnterFrame = function () {
if (this.move and (!game.gameEnd)) {
this.y = Math.ceil((this._y + game.speed) / this._height);
this.x = Math.ceil(this._x / this._width);
nam = this.name;
nam_arr = nam.split("_");
newname = (("tiles_" + this.x) + "_") + this.y;
if ((lastname == undefined) or (lastname != newname)) {
this.name = newname;
lastname = newname;
}
val = game.map[this.y][this.x];
if ((val == 0) and this.move) {
this._y = this._y + game.speed;
_root.cupid._y = this._y - 50;
_root.cupid._x = this._x + 250;
if (_root.cupid._x >= 450) {
_root.cupid._xscale = -100;
_root.cupid._x = this._x + 200;
} else {
_root.cupid._xscale = 100;
}
} else {
this.move = false;
if (this.move == false) {
this._y = (this.y * game.tileH) - game.tileH;
this._x = (this.x * game.tilew) - game.tilew;
trace(this._y);
}
}
} else if (!_root.game.keypressed) {
_root.game.map[this.y - 1][this.x] = 1;
this._name = this.name;
if (this.type != 4) {
checktile();
}
if (((this.y - 1) <= 0) and (this.type != 4)) {
game.gameEnd = true;
gameOver_mc1.gotoAndPlay("gameover");
} else {
temptile.move = false;
_root.create = 1;
_root.snd_mc.gotoAndPlay(2);
temptile = "";
charMove();
}
if (this.type == 4) {
_root.game.map[this.y - 1][this.x] = 0;
trace(this._name);
trace(((" " + this.y) + " ") + this.x);
_root.game.map[this.y][this.x] = 0;
namnew = eval ((("_root.tiles.tiles_" + this.x) + "_") + (this.y + 1));
namnew.mc.gotoAndPlay("blast");
this.mc.play();
} else {
delete this.onEnterFrame;
}
} else {
this.move = true;
}
};
}
};
createtile();
temparr = [];
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (Key.getCode() == 40) {
_root.keyup = false;
game.speed = 10;
} else {
game.speed = 8;
}
};
keyListener.onKeyUp = function () {
if (Key.getCode() == 40) {
game.speed = 8;
_root.keyup = true;
}
};
Key.addListener(keyListener);
Array.prototype.addArrItem = function (_nam) {
var _local5 = 1;
var _local4 = this.length;
if (_local4 != 0) {
var _local3 = 0;
while (_local3 <= _local4) {
Arrnam = this[_local3];
if (Arrnam == _nam) {
_local5 = 0;
}
_local3++;
}
}
if (_local5 == 1) {
this[_local4] = _nam;
_root.arr++;
}
};
_root.arr = 0;
_root.level = 4;
narr = arr2;
var j = 0;
while (j < narr.length) {
_root["found" + j] = 0;
j++;
}
Array.prototype.lineup = function (x, y) {
var _local8 = new Array();
var _local4 = [];
var _local6 = [];
var _local5 = x;
while (_local5 >= 0) {
var _local2 = 0;
while (_local2 < this.length) {
nam = this[_local2];
_local4 = nam.split("_");
x1 = int(_local4[1]);
if (x1 == _local5) {
_local6.push(this[_local2]);
}
_local2++;
}
_local5--;
}
var _local3 = new Array();
xno = x;
yno = y;
nam = (("tiles_" + xno) + "_") + yno;
_local3.addArrItem(nam);
_local5 = 0;
while (_local5 < _local3.length) {
nam1 = (("tiles_" + xno) + "_") + (yno + 1);
nam2 = (("tiles_" + xno) + "_") + (yno - 1);
nam3 = (("tiles_" + (xno + 1)) + "_") + yno;
nam4 = (("tiles_" + (xno - 1)) + "_") + yno;
var _local2 = 0;
while (_local2 < this.length) {
if (nam1 == this[_local2]) {
rst = _local3.addArrItem(nam1);
if (!rst) {
yno = yno + 1;
this.splice(_local2, 1);
break;
}
} else if (nam2 == this[_local2]) {
rst = _local3.addArrItem(nam2);
if (!rst) {
yno = yno - 1;
this.splice(_local2, 1);
break;
}
} else if (nam3 == this[_local2]) {
rst = _local3.addArrItem(nam3);
if (!rst) {
xno = xno + 1;
this.splice(_local2, 1);
break;
}
} else if (nam4 == this[_local2]) {
rst = _local3.addArrItem(nam4);
if (!rst) {
xno = xno - 1;
this.splice(_local2, 1);
break;
}
}
_local2++;
}
_local5++;
}
return(_local3);
};
Array.prototype.remove = function (_nam) {
var _local5 = [];
var _local2 = 0;
while (_local2 < this.length) {
if (_nam != this[_local2]) {
var _local3 = _local2;
}
_local2++;
}
this.splice(_local2, 1);
};
charMove = function () {
onEnterFrame = function () {
if ((_root.cupid._y <= 0) and (_root.create == 1)) {
createtile();
_root.create = 0;
delete onEnterFrame;
} else if ((_root.cupid._y > 0) and (_root.create == 1)) {
_root.cupid._y = _root.cupid._y - 60;
}
};
};
tim = true;
Instance of Symbol 345 MovieClip "tiles_5_10" in Frame 151
onClipEvent (load) {
this.name = "tiles_5_10";
this.up = false;
this.down = false;
this.right = true;
this.left = true;
this.side1 = 0;
this.side2 = 0;
this.side3 = 0;
this.side4 = 0;
}
Frame 162
stop();
Frame 172
stop();
if ((_root.score1 == undefined) or (_root.score1 == isNaN)) {
_root.score1 = 0;
}
if ((_root.score2 == undefined) or (_root.score2 == isNaN)) {
_root.score2 = 0;
}
if ((_root.score3 == undefined) or (_root.score3 == isNaN)) {
_root.score3 = 0;
}
if ((_root.score4 == undefined) or (_root.score4 == isNaN)) {
_root.score4 = 0;
}
_root.Score = ((_root.score1 + _root.score2) + _root.score3) + _root.score4;
trace((((((_root.score1 + " ") + _root.score2) + " ") + _root.score3) + " ") + _root.score4);
playAgain_btn.onRelease = function () {
_root.Score = 0;
mystr = "level|" + _root.level;
_root._playAgain(_root, "lblgame", mystr);
};
submit_btn.onRelease = function () {
trace((((_root.score + " ") + _root._gameid) + " ") + _root.uname);
_root.dataSubmit(_root.uname, _root.Score, _root._gameid, _root, "gameOver", "connecting", "highScores");
};
stopAllSounds();
Frame 180
stop();
Frame 188
stop();
Symbol 7 MovieClip Frame 1
stop();
Symbol 7 MovieClip Frame 2
stop();
Symbol 7 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 9 MovieClip Frame 1
stop();
Symbol 9 MovieClip Frame 2
stop();
Symbol 9 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 12 MovieClip Frame 1
stop();
Symbol 12 MovieClip Frame 2
stop();
Symbol 12 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 14 MovieClip Frame 1
stop();
Symbol 14 MovieClip Frame 2
stop();
Symbol 14 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 21 MovieClip Frame 1
stop();
Symbol 21 MovieClip Frame 2
Symbol 21 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 21 MovieClip Frame 10
_parent.removeMovieClip();
Symbol 22 MovieClip [tiles4] Frame 1
stop();
Symbol 22 MovieClip [tiles4] Frame 2
stop();
Symbol 22 MovieClip [tiles4] Frame 3
stop();
Symbol 22 MovieClip [tiles4] Frame 4
stop();
Symbol 22 MovieClip [tiles4] Frame 5
stop();
Symbol 26 MovieClip Frame 1
stop();
Symbol 26 MovieClip Frame 2
stop();
Symbol 26 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 28 MovieClip Frame 1
stop();
Symbol 28 MovieClip Frame 2
stop();
Symbol 28 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 31 MovieClip Frame 1
stop();
Symbol 31 MovieClip Frame 2
stop();
Symbol 31 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 34 MovieClip Frame 1
stop();
Symbol 34 MovieClip Frame 2
stop();
Symbol 34 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 35 MovieClip Frame 1
stop();
Symbol 35 MovieClip Frame 2
Symbol 35 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 35 MovieClip Frame 10
_parent.removeMovieClip();
Symbol 36 MovieClip [tiles3] Frame 1
stop();
Symbol 36 MovieClip [tiles3] Frame 2
stop();
Symbol 36 MovieClip [tiles3] Frame 3
stop();
Symbol 36 MovieClip [tiles3] Frame 4
stop();
Symbol 36 MovieClip [tiles3] Frame 5
stop();
Symbol 40 MovieClip Frame 1
stop();
Symbol 40 MovieClip Frame 2
stop();
Symbol 40 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 42 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 2
stop();
Symbol 42 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 46 MovieClip Frame 1
stop();
Symbol 46 MovieClip Frame 2
stop();
Symbol 46 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 49 MovieClip Frame 1
stop();
Symbol 49 MovieClip Frame 2
stop();
Symbol 49 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 50 MovieClip Frame 1
stop();
Symbol 50 MovieClip Frame 2
Symbol 50 MovieClip Frame 5
_parent.removeMovieClip();
Symbol 50 MovieClip Frame 9
_parent.removeMovieClip();
Symbol 51 MovieClip [tiles2] Frame 1
stop();
Symbol 51 MovieClip [tiles2] Frame 2
stop();
Symbol 51 MovieClip [tiles2] Frame 3
stop();
Symbol 51 MovieClip [tiles2] Frame 4
stop();
Symbol 51 MovieClip [tiles2] Frame 5
stop();
Symbol 55 MovieClip Frame 1
stop();
Symbol 55 MovieClip Frame 2
stop();
Symbol 55 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 56 MovieClip Frame 1
stop();
Symbol 56 MovieClip Frame 2
stop();
Symbol 56 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 58 MovieClip Frame 1
stop();
Symbol 58 MovieClip Frame 2
stop();
Symbol 58 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 60 MovieClip Frame 1
stop();
Symbol 60 MovieClip Frame 2
stop();
Symbol 60 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 61 MovieClip Frame 1
stop();
Symbol 61 MovieClip Frame 6
_parent.removeMovieClip();
Symbol 62 MovieClip [tiles] Frame 1
stop();
Symbol 62 MovieClip [tiles] Frame 2
stop();
Symbol 62 MovieClip [tiles] Frame 3
stop();
Symbol 62 MovieClip [tiles] Frame 4
stop();
Symbol 62 MovieClip [tiles] Frame 5
stop();
Symbol 696 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 697 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 698 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 67 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 1
_root._trackClickThru(this);
Symbol 75 MovieClip Frame 100
stop();
_parent._parent.nextFrame();
Symbol 111 MovieClip Frame 85
_root.gotoAndStop("lblloader");
Symbol 112 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 2
stop();
Instance of Symbol 111 MovieClip in Symbol 112 MovieClip Frame 2
on (release) {
getURL ("http://www.gamesgames.com/moregames/", "_blank");
}
Symbol 118 MovieClip Frame 100
_root.gotoAndStop("lblgameintro");
stop();
Symbol 127 MovieClip Frame 1
stop();
_root.allSounds.setVolume(100);
Symbol 127 MovieClip Frame 2
stop();
_root.allSounds.setVolume(0);
Symbol 139 MovieClip Frame 11
stop();
_root.kissflow();
Symbol 140 MovieClip Frame 11
stop();
_root.kissflow();
Symbol 141 MovieClip Frame 1
stop();
Symbol 143 MovieClip Frame 11
stop();
_root.kissflow();
Symbol 144 MovieClip Frame 11
stop();
_root.kissflow();
Symbol 147 MovieClip Frame 1
stop();
Symbol 149 MovieClip Frame 11
stop();
Symbol 150 MovieClip Frame 11
stop();
_root.kissflow();
Symbol 151 MovieClip Frame 11
stop();
_root.kissflow();
Symbol 152 MovieClip Frame 11
stop();
Symbol 153 MovieClip Frame 11
stop();
Symbol 154 MovieClip Frame 11
stop();
_root.kissflow();
Symbol 155 MovieClip Frame 11
stop();
_root.kissflow();
Symbol 156 MovieClip Frame 11
stop();
Symbol 157 MovieClip Frame 11
stop();
Symbol 158 MovieClip Frame 11
stop();
_root.kissflow();
Symbol 159 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 11
stop();
_root.kissflow();
Symbol 162 MovieClip Frame 11
stop();
_root.kissflow();
Symbol 163 MovieClip Frame 11
stop();
_root.kissflow();
Symbol 164 MovieClip Frame 11
stop();
_root.kissflow();
Symbol 165 MovieClip Frame 11
stop();
_root.kissflow();
Symbol 166 MovieClip Frame 1
stop();
Symbol 209 MovieClip Frame 29
stop();
Symbol 233 MovieClip Frame 1
stop();
Symbol 233 MovieClip Frame 2
stop();
Symbol 233 MovieClip Frame 3
stop();
Symbol 233 MovieClip Frame 4
stop();
Symbol 241 Button
on (release) {
_root.gotoAndStop("level1");
}
Symbol 242 Button
on (release) {
story_mc.gotoAndStop("instruction");
}
Symbol 243 Button
on (release) {
story_mc.gotoAndStop("story");
}
Symbol 249 MovieClip Frame 1
stop();
Symbol 250 Button
on (release) {
gotoAndStop (1);
}
Symbol 251 Button
on (release) {
_root.gotoAndStop("level1");
}
Symbol 255 MovieClip Frame 1
stop();
Symbol 256 MovieClip Frame 1
stop();
Symbol 257 MovieClip Frame 159
stop();
Symbol 308 MovieClip Frame 1
stop();
Symbol 309 Button
on (release) {
_root.gotoAndStop("level1start");
}
Symbol 334 MovieClip Frame 1
stop();
Symbol 334 MovieClip Frame 2
stop();
Symbol 343 MovieClip Frame 1
stop();
Symbol 343 MovieClip Frame 2
stop();
Symbol 345 MovieClip Frame 1
stop();
Symbol 345 MovieClip Frame 2
stop();
Symbol 345 MovieClip Frame 3
stop();
Symbol 345 MovieClip Frame 4
stop();
Instance of Symbol 345 MovieClip "tiles_6_10" in Symbol 346 MovieClip Frame 1
onClipEvent (load) {
this.name = "tiles_5_10";
this.up = false;
this.down = false;
this.right = true;
this.left = true;
this.side1 = 0;
this.side2 = 0;
this.side3 = 0;
this.side4 = 0;
}
Instance of Symbol 345 MovieClip "tiles_-1_8" in Symbol 346 MovieClip Frame 1
onClipEvent (load) {
this.name = "tiles_-1_9";
this.up = false;
this.down = false;
this.right = true;
this.left = true;
this.side1 = 0;
this.side2 = 0;
this.side3 = 0;
this.side4 = 0;
}
Instance of Symbol 345 MovieClip "tiles_6_10" in Symbol 347 MovieClip Frame 1
onClipEvent (load) {
this.name = "tiles_5_10";
this.up = false;
this.down = false;
this.right = true;
this.left = true;
this.side1 = 0;
this.side2 = 0;
this.side3 = 0;
this.side4 = 0;
}
Instance of Symbol 345 MovieClip "tiles_-1_8" in Symbol 347 MovieClip Frame 1
onClipEvent (load) {
this.name = "tiles_-1_8";
this.up = false;
this.down = false;
this.right = true;
this.left = true;
this.side1 = 0;
this.side2 = 0;
this.side3 = 0;
this.side4 = 0;
}
Symbol 350 Button
on (keyPress "<Right>") {
if (!_root.game.keypressed) {
var begin = temptile._x;
var end = Math.round(temptile._x + temptile._width);
var time = 0.001;
val = game.map[temptile.y][temptile.x + 1];
var pos = (Math.ceil(temptile._y / 50) * 50);
diff = pos - temptile._y;
trace((diff + " diff ") + temptile._y);
trace((end + " end Tile ") + (game.maxxtile * temptile._width));
if ((((end < (game.maxxtile * temptile._width)) and (val == 0)) and temptile.move) and (diff > 2)) {
_root.game.keypressed = true;
_root.key_mc.gotoAndPlay(2);
ballTween = new mx.transitions.Tween(temptile, "_x", easeType, begin, end, time, true);
}
}
}
on (keyPress "<Left>") {
if (!game.keypressed) {
var begin = temptile._x;
var end = Math.round(temptile._x - temptile._width);
var time = 0.001;
val = game.map[temptile.y][temptile.x - 1];
var pos = (Math.ceil(temptile._y / 50) * 50);
diff = pos - temptile._y;
if ((((end >= 0) and (val == 0)) and temptile.move) and (diff > 2)) {
_root.game.keypressed = true;
_root.key_mc.gotoAndPlay(2);
ballTween = new mx.transitions.Tween(temptile, "_x", easeType, begin, end, time, true);
}
}
}
on (keyPress "<Space>") {
if (temptile.move) {
_root.rotate_Mc.gotoAndPlay(2);
r1 = temptile.right;
l1 = temptile.left;
d1 = temptile.down;
u1 = temptile.up;
l2 = temptile.side1;
r2 = temptile.side2;
u2 = temptile.side3;
d2 = temptile.side4;
temptile.side2 = u2;
temptile.side3 = l2;
temptile.side1 = d2;
temptile.side4 = r2;
temptile.left = d1;
temptile.down = r1;
temptile.right = u1;
temptile.up = l1;
temptile.mc._rotation = temptile.mc._rotation + 90;
temptile.rotation = temptile.rotation + 1;
if (temptile.rotation == 4) {
temptile.rotation = 0;
}
trace(temptile.rotation);
}
}
Symbol 351 MovieClip Frame 1
stop();
Symbol 351 MovieClip Frame 5
_root.game.keypressed = false;
Symbol 355 MovieClip Frame 1
stop();
Symbol 359 MovieClip Frame 1
stop();
Symbol 361 MovieClip Frame 1
stop();
Symbol 361 MovieClip Frame 7
_root.rotateMc = true;
Symbol 365 MovieClip Frame 51
stop();
Symbol 369 MovieClip Frame 50
stop();
Symbol 370 MovieClip Frame 1
stop();
Symbol 370 MovieClip Frame 2
Symbol 370 MovieClip Frame 35
_root.gotoAndStop("gameOver");
stop();
Symbol 370 MovieClip Frame 108
stop();
_root.gotoAndStop("level1complete");
Symbol 389 MovieClip Frame 1
stop();
Symbol 390 Button
on (release) {
_root.gotoAndStop("level2");
}
Symbol 396 MovieClip Frame 1
stop();
Symbol 397 Button
on (release) {
_root.gotoAndStop("level2start");
}
Symbol 419 MovieClip Frame 1
stop();
Symbol 419 MovieClip Frame 2
stop();
Symbol 437 MovieClip Frame 1
stop();
Symbol 437 MovieClip Frame 2
stop();
Symbol 453 MovieClip Frame 1
stop();
Symbol 453 MovieClip Frame 2
stop();
Instance of Symbol 345 MovieClip "tiles_-1_8" in Symbol 454 MovieClip Frame 1
onClipEvent (load) {
this.name = "tiles_-1_8";
this.up = false;
this.down = false;
this.right = true;
this.left = true;
this.side1 = 0;
this.side2 = 0;
this.side3 = 0;
this.side4 = 0;
}
Instance of Symbol 345 MovieClip "tiles_6_10" in Symbol 454 MovieClip Frame 1
onClipEvent (load) {
this.name = "tiles_6_10";
this.up = false;
this.down = false;
this.right = true;
this.left = true;
this.side1 = 0;
this.side2 = 0;
this.side3 = 0;
this.side4 = 0;
}
Instance of Symbol 345 MovieClip "tiles_-1_4" in Symbol 454 MovieClip Frame 1
onClipEvent (load) {
this.name = "tiles_-1_4";
this.up = false;
this.down = false;
this.right = true;
this.left = true;
this.side1 = 0;
this.side2 = 0;
this.side3 = 0;
this.side4 = 0;
}
Symbol 458 MovieClip Frame 1
stop();
Symbol 459 Button
on (keyPress "<Right>") {
if (!_root.game.keypressed) {
var begin = temptile._x;
var end = Math.round(temptile._x + temptile._width);
var time = 0.001;
val = game.map[temptile.y][temptile.x + 1];
var pos = (Math.ceil(temptile._y / 50) * 50);
diff = pos - temptile._y;
if ((((end < (game.maxxtile * temptile._width)) and (val == 0)) and temptile.move) and (diff > 2)) {
_root.game.keypressed = true;
_root.key_mc.gotoAndPlay(2);
ballTween = new mx.transitions.Tween(temptile, "_x", easeType, begin, end, time, true);
}
}
}
on (keyPress "<Left>") {
if (!game.keypressed) {
var begin = temptile._x;
var end = Math.round(temptile._x - temptile._width);
var time = 0.001;
val = game.map[temptile.y][temptile.x - 1];
var pos = (Math.ceil(temptile._y / 50) * 50);
diff = pos - temptile._y;
if ((((end >= 0) and (val == 0)) and temptile.move) and (diff > 2)) {
_root.game.keypressed = true;
_root.key_mc.gotoAndPlay(2);
ballTween = new mx.transitions.Tween(temptile, "_x", easeType, begin, end, time, true);
}
}
}
on (keyPress "<Space>") {
if (_root.rotateMc) {
_root.rotateMc = false;
_root.rotate_Mc.gotoAndPlay(2);
r1 = temptile.right;
l1 = temptile.left;
d1 = temptile.down;
u1 = temptile.up;
l2 = temptile.side1;
r2 = temptile.side2;
u2 = temptile.side3;
d2 = temptile.side4;
temptile.side2 = u2;
temptile.side3 = l2;
temptile.side1 = d2;
temptile.side4 = r2;
temptile.left = d1;
temptile.down = r1;
temptile.right = u1;
temptile.up = l1;
temptile.mc._rotation = temptile.mc._rotation + 90;
temptile.rotation = temptile.rotation + 1;
if (temptile.rotation == 4) {
temptile.rotation = 0;
}
trace(temptile.rotation);
}
}
Symbol 461 MovieClip Frame 50
stop();
Symbol 464 MovieClip Frame 1
stop();
Symbol 464 MovieClip Frame 2
Symbol 464 MovieClip Frame 55
_root.gotoAndStop("gameOver");
stop();
Symbol 464 MovieClip Frame 106
stop();
_root.gotoAndStop("level2complete");
Symbol 464 MovieClip Frame 107
trace("vcbcvbcv");
Symbol 464 MovieClip Frame 124
stop();
Symbol 475 MovieClip Frame 1
stop();
Symbol 476 Button
on (release) {
_root.gotoAndStop("level3");
}
Symbol 483 MovieClip Frame 1
stop();
Symbol 484 Button
on (release) {
_root.gotoAndStop("level3start");
}
Symbol 497 MovieClip Frame 1
stop();
Symbol 497 MovieClip Frame 2
stop();
Symbol 519 MovieClip Frame 1
stop();
Symbol 519 MovieClip Frame 2
stop();
Symbol 519 MovieClip Frame 3
stop();
Symbol 536 MovieClip Frame 1
stop();
Symbol 536 MovieClip Frame 2
stop();
Symbol 536 MovieClip Frame 3
stop();
Symbol 554 MovieClip Frame 1
stop();
Symbol 554 MovieClip Frame 2
stop();
Symbol 555 MovieClip Frame 1
_root.anty = false;
Symbol 555 MovieClip Frame 150
_root.anty = true;
Instance of Symbol 345 MovieClip "tiles_-1_8" in Symbol 556 MovieClip Frame 1
onClipEvent (load) {
this.name = "tiles_-1_8";
this.up = false;
this.down = false;
this.right = true;
this.left = true;
this.side1 = 0;
this.side2 = 0;
this.side3 = 0;
this.side4 = 0;
}
Instance of Symbol 345 MovieClip "tiles_6_10" in Symbol 556 MovieClip Frame 1
onClipEvent (load) {
this.name = "tiles_6_10";
this.up = false;
this.down = false;
this.right = true;
this.left = true;
this.side1 = 0;
this.side2 = 0;
this.side3 = 0;
this.side4 = 0;
}
Instance of Symbol 345 MovieClip "tiles_-1_4" in Symbol 556 MovieClip Frame 1
onClipEvent (load) {
this.name = "tiles_-1_4";
this.up = false;
this.down = false;
this.right = true;
this.left = true;
this.side1 = 0;
this.side2 = 0;
this.side3 = 0;
this.side4 = 0;
}
Symbol 560 MovieClip Frame 1
stop();
Symbol 561 Button
on (keyPress "<Right>") {
if (!_root.game.keypressed) {
var begin = temptile._x;
var end = Math.round(temptile._x + temptile._width);
var time = 0.001;
val = game.map[temptile.y][temptile.x + 1];
var pos = (Math.ceil(temptile._y / 50) * 50);
diff = pos - temptile._y;
if ((((end < (game.maxxtile * temptile._width)) and (val == 0)) and temptile.move) and (diff > 2)) {
_root.game.keypressed = true;
_root.key_mc.gotoAndPlay(2);
ballTween = new mx.transitions.Tween(temptile, "_x", easeType, begin, end, time, true);
}
}
}
on (keyPress "<Left>") {
if (!game.keypressed) {
var begin = temptile._x;
var end = Math.round(temptile._x - temptile._width);
var time = 0.001;
val = game.map[temptile.y][temptile.x - 1];
var pos = (Math.ceil(temptile._y / 50) * 50);
diff = pos - temptile._y;
if ((((end >= 0) and (val == 0)) and temptile.move) and (diff > 2)) {
_root.game.keypressed = true;
_root.key_mc.gotoAndPlay(2);
ballTween = new mx.transitions.Tween(temptile, "_x", easeType, begin, end, time, true);
}
}
}
on (keyPress "<Space>") {
if (_root.rotateMc) {
_root.rotateMc = false;
_root.rotate_Mc.gotoAndPlay(2);
r1 = temptile.right;
l1 = temptile.left;
d1 = temptile.down;
u1 = temptile.up;
l2 = temptile.side1;
r2 = temptile.side2;
u2 = temptile.side3;
d2 = temptile.side4;
temptile.side2 = u2;
temptile.side3 = l2;
temptile.side1 = d2;
temptile.side4 = r2;
temptile.left = d1;
temptile.down = r1;
temptile.right = u1;
temptile.up = l1;
temptile.mc._rotation = temptile.mc._rotation + 90;
temptile.rotation = temptile.rotation + 1;
if (temptile.rotation == 4) {
temptile.rotation = 0;
}
trace(temptile.rotation);
}
}
Symbol 564 MovieClip Frame 50
stop();
Symbol 565 MovieClip Frame 1
stop();
Symbol 565 MovieClip Frame 2
Symbol 565 MovieClip Frame 35
_root.gotoAndStop("gameOver");
stop();
Symbol 565 MovieClip Frame 90
stop();
_root.gotoAndStop("level3complete");
stop();
_root.gotoAndStop("level3complete");
Symbol 565 MovieClip Frame 92
trace("vcbcvbcv");
Symbol 565 MovieClip Frame 109
stop();
Symbol 565 MovieClip Frame 167
_root.gotoAndStop("gameOver");
Symbol 574 MovieClip Frame 1
stop();
Symbol 575 Button
on (release) {
_root.gotoAndStop("level4");
}
Symbol 582 MovieClip Frame 1
stop();
Symbol 583 Button
on (release) {
_root.gotoAndStop("level4start");
}
Symbol 606 MovieClip Frame 1
stop();
Symbol 606 MovieClip Frame 2
stop();
Symbol 616 MovieClip Frame 1
stop();
Symbol 616 MovieClip Frame 2
stop();
Symbol 616 MovieClip Frame 3
stop();
Symbol 623 MovieClip Frame 1
stop();
Symbol 623 MovieClip Frame 2
stop();
Symbol 623 MovieClip Frame 3
stop();
Symbol 631 MovieClip Frame 1
stop();
Symbol 631 MovieClip Frame 2
stop();
Symbol 632 MovieClip Frame 1
_root.anty = false;
Symbol 632 MovieClip Frame 150
_root.anty = true;
Symbol 636 MovieClip Frame 1
stop();
Symbol 637 Button
on (keyPress "<Right>") {
if (!_root.game.keypressed) {
var begin = temptile._x;
var end = Math.round(temptile._x + temptile._width);
var time = 0.001;
val = game.map[temptile.y][temptile.x + 1];
var pos = (Math.ceil(temptile._y / 50) * 50);
diff = pos - temptile._y;
if ((((end < (game.maxxtile * temptile._width)) and (val == 0)) and temptile.move) and (diff > 2)) {
_root.game.keypressed = true;
_root.key_mc.gotoAndPlay(2);
ballTween = new mx.transitions.Tween(temptile, "_x", easeType, begin, end, time, true);
}
}
}
on (keyPress "<Left>") {
if (!game.keypressed) {
var begin = temptile._x;
var end = Math.round(temptile._x - temptile._width);
var time = 0.001;
val = game.map[temptile.y][temptile.x - 1];
var pos = (Math.ceil(temptile._y / 50) * 50);
diff = pos - temptile._y;
if ((((end >= 0) and (val == 0)) and temptile.move) and (diff > 2)) {
_root.game.keypressed = true;
_root.key_mc.gotoAndPlay(2);
ballTween = new mx.transitions.Tween(temptile, "_x", easeType, begin, end, time, true);
}
}
}
on (keyPress "<Space>") {
if (_root.rotateMc) {
_root.rotateMc = false;
_root.rotate_Mc.gotoAndPlay(2);
r1 = temptile.right;
l1 = temptile.left;
d1 = temptile.down;
u1 = temptile.up;
l2 = temptile.side1;
r2 = temptile.side2;
u2 = temptile.side3;
d2 = temptile.side4;
temptile.side2 = u2;
temptile.side3 = l2;
temptile.side1 = d2;
temptile.side4 = r2;
temptile.left = d1;
temptile.down = r1;
temptile.right = u1;
temptile.up = l1;
temptile.mc._rotation = temptile.mc._rotation + 90;
temptile.rotation = temptile.rotation + 1;
if (temptile.rotation == 4) {
temptile.rotation = 0;
}
trace(temptile.rotation);
}
}
Symbol 638 MovieClip Frame 1
stop();
Symbol 638 MovieClip Frame 2
Symbol 638 MovieClip Frame 35
_root.gotoAndStop("gameOver");
stop();
Symbol 638 MovieClip Frame 86
stop();
_root.gotoAndStop("level4complete");
Symbol 638 MovieClip Frame 145
_root.gotoAndStop("gameOver");
Symbol 638 MovieClip Frame 146
trace("vcbcvbcv");
Symbol 638 MovieClip Frame 163
stop();
Symbol 639 Button
on (keyPress "<Right>") {
if (!_root.game.keypressed) {
var begin = temptile._x;
var end = (temptile._x + temptile._width);
var time = 0.07;
val = game.map[temptile.y][temptile.x + 1];
var pos = (Math.ceil(temptile._y / 50) * 50);
diff = pos - temptile._y;
if ((((end < (game.maxxtile * temptile._width)) and (val == 0)) and temptile.move) and (diff > 2)) {
_root.game.keypressed = true;
_root.key_mc.gotoAndPlay(2);
ballTween = new mx.transitions.Tween(temptile, "_x", easeType, begin, end, time, true);
}
}
}
on (keyPress "<Left>") {
if (!game.keypressed) {
var begin = temptile._x;
var end = (temptile._x - temptile._width);
var time = 0.07;
val = game.map[temptile.y][temptile.x - 1];
var pos = (Math.ceil(temptile._y / 50) * 50);
diff = pos - temptile._y;
if ((((end >= 0) and (val == 0)) and temptile.move) and (diff > 2)) {
_root.game.keypressed = true;
_root.key_mc.gotoAndPlay(2);
ballTween = new mx.transitions.Tween(temptile, "_x", easeType, begin, end, time, true);
}
}
}
on (keyPress "<Space>") {
r1 = temptile.right;
l1 = temptile.left;
d1 = temptile.down;
u1 = temptile.up;
r2 = temptile.side1;
l2 = temptile.side2;
d2 = temptile.side3;
u2 = temptile.side4;
temptile.side2 = d2;
temptile.side3 = r2;
temptile.side1 = u2;
temptile.side4 = l2;
temptile.left = d1;
temptile.down = r1;
temptile.right = u1;
temptile.up = l1;
temptile.mc._rotation = temptile.mc._rotation + 90;
}
Symbol 648 MovieClip Frame 1
stop();
Symbol 649 Button
on (release) {
_root.levelDone = true;
_root.gotoAndStop("gameOver");
}
Symbol 664 MovieClip Frame 1
username_txt.onSetFocus = function () {
if (username_txt.text == "Invalid Nickname!") {
username_txt.text = "";
}
};
Symbol 671 Button
on (release) {
_root.cancelSubmit(_root, "gameOver");
}
Symbol 694 MovieClip Frame 1
stop();
_root.displayScores(this);
Symbol 695 Button
on (release) {
_root.Score = 0;
_root._playAgain(_root, "lblgameintro");
}