Frame 1
stop();
System.useCodepage = true;
init = function () {
hh = 0;
pauseTime = 0;
levelNum = 0;
scoreNum = 30;
plusScore = 30;
lengGap = 8;
targetScore = 0;
judArr = [2, -16, -2, 16];
itemArr = [1, 2, 3, 4, 5, 6, 7, 8];
noMatchChkArr = [[-2, -3], [-8, -18], [2, 3], [8, 16]];
itemSpeed = 0.4;
goodS = new Sound(this);
goodS.attachSound("good");
badS = new Sound(this);
badS.attachSound("bad");
clickS = new Sound(this);
clickS.attachSound("click");
startS = new Sound(this);
startS.attachSound("start");
bonusS = new Sound(this);
bonusS.attachSound("bonus");
endS = new Sound(this);
endS.attachSound("end");
bgS = new Sound(this);
bgS.attachSound("bgsnd");
timeS = new Sound(this);
timeS.attachSound("timeLimit");
this.createEmptyMovieClip("waitTimeMc", 10000);
};
gameStart = function () {
gotoAndStop (3);
startS.start(0, 1);
bgS.start(0, 999);
gameST = getTimer() / 1000;
gameArrange();
};
RESTART = function () {
k = 0;
while (k < 5) {
gameOverBoard.rankTMC["mc" + k].gotoAndStop(1);
gameOverBoard.scoreTMC["mc" + k].gotoAndStop(1);
scoreTMC["mc" + k].gotoAndStop(1);
targetScoreTMC["mc" + k].gotoAndStop(1);
k++;
}
gameOverBoard._visible = 0;
levelNum = 0;
scoreNum = 30;
targetScore = 0;
startS.start(0, 1);
bgS.start(0, 999);
gameST = getTimer() / 1000;
gameArrange();
};
gameArrange = function () {
dep = 0;
choose = 0;
matchNum = 0;
pauseTime = 0;
mission02Num = 0;
dupItemMcArr = [];
itemEmptyMcArr = [];
currentScore = 0;
gamePlay = true;
makedLEVELTXT();
scorePlus(0);
mission01Num = random(itemLengChk) + 1;
missionMc01.gotoAndStop(mission01Num);
missionMc02.mission02WaitCHK();
posY = 0;
tempBackDiv = 2;
itemGroup.itemMc._visible = 0;
k = 0;
while (k < lengGap) {
posX = 0;
h = 0;
while (h < lengGap) {
dep++;
temp = itemGroup.itemMc.duplicateMovieClip("item_" + dep, dep);
dupItemMcArr.push(temp);
itemEmptyMcArr.push(temp);
temp.itemDoubleCheck(dep);
temp._x = posX;
temp._y = posY;
temp.xno = dep - 1;
temp.mcx = h + 1;
temp.mcy = k + 1;
posX = posX + 50;
temp.onRollOver = function () {
this.outFrame = this.bg_mc._currentframe;
this.bg_mc.gotoAndStop(2);
};
temp.onRollOut = (temp.onReleaseOutside = function () {
delete this.onEnterFrame;
this.bg_mc.gotoAndStop(this.outFrame);
});
temp.onPress = function () {
this.outFrame = 3;
this.bg_mc.gotoAndStop(3);
this.mc.gotoAndStop(2);
if (choose) {
chooseMc_1 = this;
if (chooseMc_1._name == chooseMc_0._name) {
this.outFrame = 1;
this.bg_mc.gotoAndStop(1);
chooseMc_0 = (chooseMc_1 = null);
choose = 0;
badS.start(0, 1);
} else {
changeItem();
}
} else {
clickS.start(0, 1);
choose++;
chooseMc_0 = this;
this.onEnterFrame = function () {
if ((((this._parent._xmouse > 0) && (this._parent._xmouse < 400)) && (this._parent._ymouse > 0)) && (this._parent._ymouse < 400)) {
if (this._parent._xmouse < (this._x - 5)) {
chooseMc_1 = dupItemMcArr[this.xno - 1];
delete this.onEnterFrame;
changeItem();
} else if (this._parent._xmouse > (this._x + 55)) {
chooseMc_1 = dupItemMcArr[this.xno + 1];
delete this.onEnterFrame;
changeItem();
} else if (this._parent._ymouse < (this._y - 5)) {
chooseMc_1 = dupItemMcArr[this.xno - 8];
delete this.onEnterFrame;
changeItem();
} else if (this._parent._ymouse > (this._y + 55)) {
chooseMc_1 = dupItemMcArr[this.xno + 8];
delete this.onEnterFrame;
changeItem();
}
}
};
}
};
temp.onRelease = function () {
delete this.onEnterFrame;
};
temp.useHandCursor = false;
h++;
}
posY = posY + 50;
k++;
}
gageMc.timeCheckStart();
waitTimeMc.waitTimeCheck(5, 1);
};
nextLevel = function () {
successBoard._visible = 0;
gameArrange();
};
makedLEVELTXT = function () {
levelNum++;
chk = levelNum % 4;
if (chk) {
fn = Math.floor(levelNum / 4) + 1;
bn = levelNum - ((fn - 1) * 4);
} else {
fn = levelNum / 4;
bn = 4;
}
if (fn < 4) {
itemLengChk = 7;
} else {
itemLengChk = 8;
}
targetScore = targetScore + (500 + ((fn - 1) * 500));
levelTxt0Mc.gotoAndStop(fn + 2);
levelTxt1Mc.gotoAndStop(bn + 2);
targetScoreTMC.makedNumbering(targetScore);
gageMc.barMc._xscale = (gageGap = 60 - ((fn - 1) * 5));
};
scorePlus = function (num) {
scoreNum = scoreNum + num;
scoreTMC.makedNumbering(scoreNum);
};
MovieClip.prototype.timeCheckStart = function () {
this.ST = getTimer() / 1000;
this.onEnterFrame = function () {
this.PT = ((getTimer() / 1000) - this.ST) + pauseTime;
scale = gageGap - this.PT;
this.barMc._xscale = this.barMc._xscale + ((scale - this.barMc._xscale) * 0.5);
if (this.barMc._xscale >= 100) {
this.barMc._xscale = 100;
gageGap = 100 + this.PT;
}
if (this.barMc._xscale < 21) {
if (limitSoundCHK) {
timeS.start(0, 2);
limitSoundCHK = false;
this.barMc.gotoAndStop(2);
}
this.gotoAndStop(2);
} else {
limitSoundCHK = true;
this.gotoAndStop(1);
this.barMc.gotoAndStop(1);
}
if (this.barMc._xscale <= 0) {
delete this.onEnterFrame;
gameOver();
}
};
};
changeItem = function () {
hideMc._visible = 1;
tempGap = Math.abs(chooseMc_0.no - chooseMc_1.no);
if ((tempGap == lengGap) || ((tempGap == 1) && (chooseMc_0.rowType == chooseMc_1.rowType))) {
clickS.start(0, 1);
view0Mc = itemGroup.itemMc.duplicateMovieClip("view0", 1000);
view1Mc = itemGroup.itemMc.duplicateMovieClip("view1", 1001);
view0Mc._x = chooseMc_0._x;
view0Mc._y = chooseMc_0._y;
view1Mc._x = chooseMc_1._x;
view1Mc._y = chooseMc_1._y;
view0X = view1Mc._x;
view0Y = view1Mc._y;
view1X = view0Mc._x;
view1Y = view0Mc._y;
view0Mc.itemType = chooseMc_0.itemType;
view1Mc.itemType = chooseMc_1.itemType;
view0Mc.gotoAndStop(chooseMc_0.itemType);
view0Mc.mc.gotoAndStop(2);
view1Mc.gotoAndStop(chooseMc_1.itemType);
view1Mc.mc.gotoAndStop(2);
chooseMc_0._visible = (chooseMc_1._visible = 0);
itemGroup.onEnterFrame = function () {
view0Mc._x = view0Mc._x + ((view0X - view0Mc._x) * itemSpeed);
view0Mc._y = view0Mc._y + ((view0Y - view0Mc._y) * itemSpeed);
view1Mc._x = view1Mc._x + ((view1X - view1Mc._x) * itemSpeed);
view1Mc._y = view1Mc._y + ((view1Y - view1Mc._y) * itemSpeed);
if ((view0Mc._x > (view0X - 1)) && (view0Mc._x < (view0X + 1))) {
if ((view0Mc._y > (view0Y - 1)) && (view0Mc._y < (view0Y + 1))) {
if ((view1Mc._x > (view1X - 1)) && (view1Mc._x < (view1X + 1))) {
if ((view1Mc._y > (view1Y - 1)) && (view1Mc._y < (view1Y + 1))) {
delete this.onEnterFrame;
tempItem = chooseMc_1.itemType;
chooseMc_1.gotoAndStop([chooseMc_0.itemType]);
chooseMc_0.gotoAndStop(tempItem);
chooseMc_1.itemType = chooseMc_0.itemType;
chooseMc_0.itemType = tempItem;
chooseMc_0.outFrame = 1;
chooseMc_1.outFrame = 1;
chooseMc_0.bg_mc.gotoAndStop(1);
chooseMc_1.bg_mc.gotoAndStop(1);
chooseMc_0._visible = (chooseMc_1._visible = 1);
chooseMc_0.mc.gotoAndStop(2);
chooseMc_1.mc.gotoAndStop(2);
view0Mc._visible = 0;
view1Mc._visible = 0;
changeEND();
}
}
}
}
};
} else {
chooseMc_0.enabled = true;
chooseMc_1.enabled = true;
chooseMc_0.outFrame = 1;
chooseMc_1.outFrame = 1;
chooseMc_0.bg_mc.gotoAndStop(1);
chooseMc_1.bg_mc.gotoAndStop(1);
chooseMc_1 = (chooseMc_0 = null);
choose = 0;
if (!pauseMc._visible) {
hideMc._visible = 0;
}
}
};
changeEND = function () {
itemEmptyGetArrRow = [];
itemEmptyGetArrCol = [];
chooseMc_0.matchJud = 0;
chooseMc_1.matchJud = 0;
chooseMc_0.itemMatchCheck(1, -1, chooseMc_0.maxNum, chooseMc_0.minNum, itemEmptyGetArrRow);
chooseMc_0.itemMatchCheck(lengGap, -lengGap, lengGap, lengGap, itemEmptyGetArrCol);
chooseMc_1.itemMatchCheck(1, -1, chooseMc_1.maxNum, chooseMc_1.minNum, itemEmptyGetArrRow);
chooseMc_1.itemMatchCheck(lengGap, -lengGap, lengGap, lengGap, itemEmptyGetArrCol);
if (chooseMc_0.matchJud || (chooseMc_1.matchJud)) {
if (gageGap > 0) {
waitTimeMc.waitTimeCheck(5, 0);
}
} else {
badS.start(0, 1);
view0Mc._visible = (view1Mc._visible = 1);
chooseMc_0._visible = (chooseMc_1._visible = 0);
itemGroup.onEnterFrame = function () {
view0Mc._x = view0Mc._x + ((view1X - view0Mc._x) * itemSpeed);
view0Mc._y = view0Mc._y + ((view1Y - view0Mc._y) * itemSpeed);
view1Mc._x = view1Mc._x + ((view0X - view1Mc._x) * itemSpeed);
view1Mc._y = view1Mc._y + ((view0Y - view1Mc._y) * itemSpeed);
if ((view0Mc._x > (view1X - 1)) && (view0Mc._x < (view1X + 1))) {
if ((view0Mc._y > (view1Y - 1)) && (view0Mc._y < (view1Y + 1))) {
if ((view1Mc._x > (view0X - 1)) && (view1Mc._x < (view0X + 1))) {
if ((view1Mc._y > (view0Y - 1)) && (view1Mc._y < (view0Y + 1))) {
delete this.onEnterFrame;
chooseMc_0.itemType = view0Mc.itemType;
chooseMc_1.itemType = view1Mc.itemType;
chooseMc_0.gotoAndStop(chooseMc_0.itemType);
chooseMc_1.gotoAndStop(chooseMc_1.itemType);
chooseMc_0.enabled = true;
chooseMc_1.enabled = true;
chooseMc_0.outFrame = 1;
chooseMc_1.outFrame = 1;
chooseMc_0.bg_mc.gotoAndStop(1);
chooseMc_1.bg_mc.gotoAndStop(1);
chooseMc_0._visible = (chooseMc_1._visible = 1);
chooseMc_0.mc.gotoAndStop(1);
chooseMc_1.mc.gotoAndStop(1);
chooseMc_1 = (chooseMc_0 = null);
choose = 0;
if (!pauseMc._visible) {
hideMc._visible = 0;
}
view0Mc.removeMovieClip();
view1Mc.removeMovieClip();
}
}
}
}
};
}
};
itemEmptyCheck = function () {
scorePlus(currentScore);
currentScore = 0;
mcNum = lengGap * lengGap;
itemEmptyMcArr = [];
viewEmptyMcArr = [];
k = 0;
while (k < (lengGap - 1)) {
h = 0;
while (h < lengGap) {
if ((!itemGroup["item_" + (mcNum - h)]._visible) || (itemGroup["item_" + (mcNum - h)].lightMc._currentframe > 1)) {
itemGroup["item_" + (mcNum - h)]._visible = 0;
itemGroup["item_" + (mcNum - h)].lightMc.gotoAndStop(1);
itemEmptyMcArr.push(itemGroup["item_" + (mcNum - h)]);
tempNum = 1000 + viewEmptyMcArr.length;
temp = moveItem.itemMc.duplicateMovieClip("view" + tempNum, tempNum);
temp._x = itemGroup["item_" + (mcNum - h)]._x;
temp._y = itemGroup["item_" + (mcNum - h)]._y;
viewEmptyMcArr.push(temp);
tempMcNum = "";
g = 1;
while (g < 8) {
if (itemGroup["item_" + ((mcNum - h) - (g * lengGap))]._visible) {
tempMcNum = (mcNum - h) - (g * lengGap);
break;
}
g++;
}
if (tempMcNum == "") {
tempFrame = random(itemLengChk) + 1;
} else {
tempFrame = itemGroup["item_" + tempMcNum].itemType;
itemGroup["item_" + tempMcNum]._visible = 0;
}
itemGroup["item_" + (mcNum - h)].itemType = tempFrame;
itemGroup["item_" + (mcNum - h)].gotoAndStop(tempFrame);
itemGroup["item_" + (mcNum - h)].mc.gotoAndStop(1);
temp.gotoAndStop(tempFrame);
temp.mc.gotoAndStop(1);
}
h++;
}
mcNum = mcNum - lengGap;
k++;
}
k = 1;
while (k < (lengGap + 1)) {
if ((!itemGroup["item_" + k]._visible) || (itemGroup["item_" + k].lightMc._currentframe > 1)) {
itemEmptyMcArr.push(itemGroup["item_" + k]);
tempNum = 1000 + viewEmptyMcArr.length;
temp = moveItem.itemMc.duplicateMovieClip("view" + tempNum, tempNum);
temp._x = itemGroup["item_" + k]._x;
temp._y = itemGroup["item_" + k]._y;
viewEmptyMcArr.push(temp);
ran = random(itemLengChk) + 1;
itemGroup["item_" + k].itemType = ran;
itemGroup["item_" + k].gotoAndStop(ran);
itemGroup["item_" + k].mc.gotoAndStop(1);
itemGroup["item_" + k]._visible = 0;
itemGroup["item_" + k].lightMc.gotoAndStop(1);
temp.gotoAndStop(ran);
temp.mc.gotoAndStop(1);
}
k++;
}
moveItem.movedMcInitY();
};
roopNoMatchCHK = function () {
matchCHK = 0;
k = 1;
while (k < 65) {
chkMc = itemGroup["item_" + k];
chkMcFrame = chkMc._currentframe;
cx = chkMc.mcx;
cy = chkMc.mcy;
if (cx < 8) {
chkNum = ((cy - 1) * 8) + (cx + 1);
chkCX = itemGroup["item_" + chkNum].mcx;
chkCY = itemGroup["item_" + chkNum].mcy;
if (matchFrameCHK(chkNum, chkCX, chkCY)) {
matchCHK++;
break;
}
}
if (cx > 1) {
chkNum = ((cy - 1) * 8) + (cx - 1);
chkCX = itemGroup["item_" + chkNum].mcx;
chkCY = itemGroup["item_" + chkNum].mcy;
if (matchFrameCHK(chkNum, chkCX, chkCY)) {
matchCHK++;
break;
}
}
if (cy < 8) {
chkNum = (cy * 8) + cx;
chkCX = itemGroup["item_" + chkNum].mcx;
chkCY = itemGroup["item_" + chkNum].mcy;
if (matchFrameCHK(chkNum, chkCX, chkCY)) {
matchCHK++;
break;
}
}
if (cy > 1) {
chkNum = ((cy - 2) * 8) + cx;
chkCX = itemGroup["item_" + chkNum].mcx;
chkCY = itemGroup["item_" + chkNum].mcy;
if (matchFrameCHK(chkNum, chkCX, chkCY)) {
matchCHK++;
break;
}
}
k++;
}
if (matchCHK) {
trace("ok");
continuedGame();
} else {
trace("no");
reflashMc.gotoAndPlay(2);
}
};
matchFrameCHK = function (no, x, y) {
breakCHK = 0;
if (x < 7) {
chkW0McFrame = itemGroup["item_" + (no + 1)]._currentframe;
chkW1McFrame = itemGroup["item_" + (no + 2)]._currentframe;
if (chkMc != itemGroup["item_" + (no + 1)]) {
if ((chkMcFrame == chkW0McFrame) && (chkMcFrame == chkW1McFrame)) {
breakCHK++;
}
}
}
if (y < 7) {
chkW0McFrame = itemGroup["item_" + (no + 8)]._currentframe;
chkW1McFrame = itemGroup["item_" + (no + 16)]._currentframe;
if (chkMc != itemGroup["item_" + (no + 8)]) {
if ((chkMcFrame == chkW0McFrame) && (chkMcFrame == chkW1McFrame)) {
breakCHK++;
}
}
}
if (x > 2) {
chkW0McFrame = itemGroup["item_" + (no - 1)]._currentframe;
chkW1McFrame = itemGroup["item_" + (no - 2)]._currentframe;
if (chkMc != itemGroup["item_" + (no - 1)]) {
if ((chkMcFrame == chkW0McFrame) && (chkMcFrame == chkW1McFrame)) {
breakCHK++;
}
}
}
if (y > 2) {
chkW0McFrame = itemGroup["item_" + (no - 8)]._currentframe;
chkW1McFrame = itemGroup["item_" + (no - 16)]._currentframe;
if (chkMc != itemGroup["item_" + (no - 8)]) {
if ((chkMcFrame == chkW0McFrame) && (chkMcFrame == chkW1McFrame)) {
breakCHK++;
}
}
}
if (breakCHK) {
return(true);
}
return(false);
};
reflashItemMc = function () {
itemEmptyMcArr = [];
k = 1;
while (k < 65) {
itemEmptyMcArr.push(itemGroup["item_" + k]);
itemGroup["item_" + k].ran = random(itemLengChk);
itemGroup["item_" + k].itemType = itemArr[itemGroup["item_" + k].ran];
itemGroup["item_" + k].gotoAndStop(itemGroup["item_" + k].itemType);
itemGroup["item_" + k].mc.gotoAndStop(1);
k++;
}
};
MovieClip.prototype.movedMcInitY = function () {
this._y = this.initY + 30;
this.onEnterFrame = function () {
this._y = this._y + ((this.initY - this._y) * 0.8);
if (this._y < (this.initY + 0.5)) {
delete this.onEnterFrame;
this._y = this.initY;
x = 0;
while (x < viewEmptyMcArr.length) {
viewEmptyMcArr[x].removeMovieClip();
itemEmptyMcArr[x]._visible = 1;
x++;
}
scoreCheck();
}
};
};
scoreCheck = function () {
if (levelNum < 20) {
if (scoreNum >= targetScore) {
gamePlay = false;
if (levelNum >= 20) {
endMc._visible = 1;
} else {
if (bn == 4) {
successBoard.gotoAndStop(2);
} else {
successBoard.gotoAndStop(1);
}
successBoard._visible = 1;
}
clearS.gotoAndPlay(4);
deleteAllItemMc();
} else {
waitTimeMc.waitTimeCheck(5, 1);
}
} else {
waitTimeMc.waitTimeCheck(5, 1);
}
};
gamePause = function (chk) {
if (gamePlay) {
if (chk) {
hideMc._visible = 1;
pauseMc._alpha = 100;
pauseMc._visible = 1;
delete missionMc02.onEnterFrame;
missionMc02.gotoAndStop(1);
pauseTime = gageMc.PT;
delete gageMc.onEnterFrame;
} else {
hideMc._visible = 0;
pauseMc._alpha = 0;
pauseMc._visible = 0;
missionMc02.mission02WaitCHK();
gageMc.timeCheckStart();
}
}
};
gameOver = function () {
bgS.stop();
gamePlay = false;
delete waitTimeMc.onEnterFrame;
delete this.onEnterFrame;
deleteAllItemMc();
gameOverBoard._visible = 1;
gamePT = Math.floor((getTimer() / 1000) - gameST);
sendData = new LoadVars();
sendData.ot1 = ot1;
sendData.ot2 = ot2;
sendData.ot3 = ot3;
sendData.ot4 = ot4;
sendData.ot5 = ot5;
sendData.uid = uid;
sendData.pt = scoreNum;
sendData.rt = gamePT;
sendData.sendAndLoad("http://www.gameangel.com/System/gameangel/game_rank.proc.php", sendData, "POST");
sendData.onLoad = function () {
gameOverBoard.idTxt.text = this.nick;
gameOverBoard.rankTMC.makedNumbering(this.rank);
gameOverBoard.scoreTMC.makedNumbering(scoreNum);
};
};
deleteAllItemMc = function () {
delete gageMc.onEnterFrame;
delete itemGroup.onEnterFrame;
delete waitTimeMc.onEnterFrame;
delete missionMc02.onEnterFrame;
missionMc02.gotoAndStop(1);
hideMc._visible = 1;
view0Mc.itemMcMovedDown();
view1Mc.itemMcMovedDown();
this.onEnterFrame = function () {
leng = random(30) + 30;
k = 0;
while (k < leng) {
ran = random(dupItemMcArr.length);
dupItemMcArr[ran].itemMcMovedDown();
dupItemMcArr.splice(ran, 1);
if (!dupItemMcArr.length) {
delete this.onEnterFrame;
}
k++;
}
};
};
MovieClip.prototype.hideMcLoad = function () {
hideMc = this;
this.onRelease = function () {
};
this.useHandCursor = false;
this._alpha = 0;
this._visible = 1;
};
MovieClip.prototype.loadedMcLoad = function () {
this.maskMc._xscale = 0;
this.onEnterFrame = function () {
this.loadedBytes = getBytesLoaded();
this.totalBytes = getBytesTotal();
this.scale = (this.loadedBytes / this.totalBytes) * 100;
this.maskMc._xscale = this.maskMc._xscale + ((this.scale - this.maskMc._xscale) * 0.1);
this.loadedtxt.text = Math.floor(this.maskMc._xscale) + "%";
if (this.maskMc._xscale >= 99) {
this.loadedtxt.text = "100%";
delete this.onEnterFrame;
nextFrame();
}
};
};
MovieClip.prototype.waitTimeCheck = function (gap, no) {
this.gap = gap;
this.no = no;
this.startTime = getTimer() / 100;
this.onEnterFrame = function () {
this.pastTime = (getTimer() / 100) - this.startTime;
if (this.pastTime >= this.gap) {
delete this.onEnterFrame;
if (this.no == 0) {
itemEmptyCheck();
} else if (this.no == 1) {
itemEmptyGetArrRow = [];
itemEmptyGetArrCol = [];
k = 0;
while (k < itemEmptyMcArr.length) {
itemEmptyMcArr[k].matchJud = 0;
itemEmptyMcArr[k].itemMatchCheck(1, -1, itemEmptyMcArr[k].maxNum, itemEmptyMcArr[k].minNum, itemEmptyGetArrRow);
itemEmptyMcArr[k].itemMatchCheck(lengGap, -lengGap, lengGap, lengGap, itemEmptyGetArrCol);
k++;
}
tempJud = 0;
k = 0;
while (k < itemEmptyMcArr.length) {
if (itemEmptyMcArr[k].matchJud) {
tempJud++;
}
k++;
}
if (tempJud) {
waitTimeMc.waitTimeCheck(5, 0);
} else {
roopNoMatchCHK();
}
}
}
};
};
continuedGame = function () {
chooseMc_0.enabled = true;
chooseMc_1.enabled = true;
chooseMc_0.outFrame = 1;
chooseMc_1.outFrame = 1;
chooseMc_0.bg_mc.gotoAndStop(1);
chooseMc_1.bg_mc.gotoAndStop(1);
chooseMc_0.mc.gotoAndStop(1);
chooseMc_1.mc.gotoAndStop(1);
chooseMc_1 = (chooseMc_0 = null);
choose = 0;
if (!pauseMc._visible) {
hideMc._visible = 0;
}
};
MovieClip.prototype.itemMatchCheck = function (no, num, noLeng, numLeng, Arr) {
this.matchMcArr = [];
this.frameCheck(no, noLeng, Arr);
this.frameCheck(num, numLeng, Arr);
if (this.matchMcArr.length > 1) {
missionMatchNum = 0;
if (mission01Num == this._currentframe) {
missionGap = 2;
} else if (mission02Num == this._currentframe) {
missionGap = 1;
k = 0;
while (k < dupItemMcArr.length) {
if (dupItemMcArr[k] != this) {
jud = 0;
h = 0;
while (h < this.matchMcArr.length) {
if (this.matchMcArr[h] == dupItemMcArr[k]) {
jud++;
break;
}
h++;
}
if (!jud) {
if (dupItemMcArr[k]._currentframe == this._currentframe) {
missionMatchNum++;
dupItemMcArr[k].mc.gotoAndStop(3);
dupItemMcArr[k].lightMc.gotoAndPlay(2);
}
}
}
k++;
}
} else {
missionGap = 1;
}
plus = ((missionMatchNum + 30) + ((this.matchMcArr.length - 2) * 5)) * missionGap;
currentScore = currentScore + plus;
this.matchJud++;
tempGap = Math.floor(((missionMatchNum + this.matchMcArr.length) - 2) / 2) + 2;
gageGap = gageGap + tempGap;
trace("gageGap : " + tempGap);
this.mc.gotoAndStop(3);
this.lightMc.gotoAndPlay(2);
w = 0;
while (w < this.matchMcArr.length) {
this.matchMcArr[w].mc.gotoAndStop(3);
this.matchMcArr[w].lightMc.gotoAndPlay(2);
w++;
}
goodS.start(0, 1);
} else {
this.mc.gotoAndStop(1);
}
};
MovieClip.prototype.frameCheck = function (plusGap, leng, Arr) {
this.gap = 0;
this.tempJud = 0;
z = 0;
while (z < Arr.length) {
if (this._name == Arr[z]) {
this.tempJud++;
break;
}
z++;
}
if (!this.tempJud) {
l = 1;
while (l <= leng) {
this.gap = this.gap + plusGap;
this.other = this._parent["item_" + (this.no + this.gap)].itemType;
if (this.itemType == this.other) {
Arr.push(this._parent["item_" + (this.no + this.gap)]._name);
this.matchMcArr.push(this._parent["item_" + (this.no + this.gap)]);
} else {
break;
}
l++;
}
}
};
MovieClip.prototype.itemDoubleCheck = function (no) {
this.no = no;
this.div = this.no % lengGap;
if (this.div) {
this.minNum = this.no - ((Math.floor(this.no / lengGap) * lengGap) + 1);
this.maxNum = ((((Math.floor(this.no / lengGap) * lengGap) + 1) + lengGap) - 1) - this.no;
} else {
this.maxNum = 0;
this.minNum = lengGap - 1;
}
this.ran = random(itemLengChk);
this.itemType = itemArr[this.ran];
this.gotoAndStop(this.itemType);
this.mc.gotoAndStop(1);
};
MovieClip.prototype.itemMcMovedDown = function () {
this.firstY = this._y - 30;
this.firstX = (this._x - 20) + random(40);
this.onEnterFrame = function () {
this._x = this._x + ((this.firstX - this._x) * 0.6);
this._y = this._y + ((this.firstY - this._y) * 0.6);
if (this._y < (this.firstY + 1)) {
this.onEnterFrame = function () {
this._y = this._y + 40;
if (this._y > 440) {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
}
};
};
MovieClip.prototype.mission02WaitCHK = function () {
this.ST = getTimer() / 1000;
this.GAP = random(8) + 8;
this.onEnterFrame = function () {
this.PT = (getTimer() / 1000) - this.ST;
if (this.PT > this.GAP) {
delete this.onEnterFrame;
missionChkArr = [0, 0, 0, 0, 0, 0, 0, 0];
k = 0;
while (k < dupItemMcArr.length) {
if (mission01Num != dupItemMcArr[k]._currentframe) {
chk = dupItemMcArr[k]._currentframe - 1;
missionChkArr[chk]++;
}
k++;
}
jud = 0;
k = 1;
while (k < missionChkArr.length) {
if (missionChkArr[jud] < missionChkArr[k]) {
jud = k;
}
k++;
}
this.gotoAndPlay(2);
}
};
};
MovieClip.prototype.missionViewCHK = function () {
this.ST = getTimer() / 100;
mission02Num = itemArr[jud];
this.mc.gotoAndStop(mission02Num);
this.onEnterFrame = function () {
this.PT = (getTimer() / 100) - this.ST;
if (this.PT > 35) {
delete this.onEnterFrame;
mission02Num = 0;
this.play();
this.mission02WaitCHK();
}
};
};
MovieClip.prototype.soundConMcLoad = function () {
this.onRelease = function () {
if (this._currentframe == 1) {
bgS.stop();
soundCHK(0);
this.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
this.stop();
delete this.onEnterFrame;
} else {
this.nextFrame();
}
};
} else {
bgS.start(0, 999);
soundCHK(100);
this.onEnterFrame = function () {
if (this._currentframe == 1) {
this.stop();
delete this.onEnterFrame;
} else {
this.prevFrame();
}
};
}
};
};
soundCHK = function (chk) {
goodS.setVolume(chk);
badS.setVolume(chk);
startS.setVolume(chk);
endS.setVolume(chk);
bgS.setVolume(chk);
timeS.setVolume(chk);
if (chk > 0) {
clickS.setVolume(chk);
} else {
clickS.setVolume(0);
}
};
MovieClip.prototype.makedNumbering = function (num) {
numStr = num.toString();
leng = numStr.length;
k = 0;
while (k < leng) {
frameN = Number(numStr.substr((leng - 1) - k, 1)) + 2;
this["mc" + k].gotoAndStop(frameN);
k++;
}
};
MovieClip.prototype.moveItemMcLoad = function () {
moveItem = this;
this.itemMc._visible = 0;
this.initY = this._y;
};
init();
Instance of Symbol 161 MovieClip in Frame 3
onClipEvent (load) {
this.soundConMcLoad();
}
Instance of Symbol 187 MovieClip "itemGroup" in Frame 3
onClipEvent (load) {
this.moveItemMcLoad();
}
Instance of Symbol 202 MovieClip in Frame 3
onClipEvent (load) {
this.hideMcLoad();
}
Instance of Symbol 202 MovieClip "pauseMc" in Frame 3
onClipEvent (load) {
this._alpha = 0;
this._visible = 0;
}
Instance of Symbol 214 MovieClip "successBoard" in Frame 3
onClipEvent (load) {
this._visible = 0;
}
Instance of Symbol 216 MovieClip "endMc" in Frame 3
onClipEvent (load) {
this._visible = 0;
}
Instance of Symbol 237 MovieClip "gameOverBoard" in Frame 3
onClipEvent (load) {
this._visible = 0;
}
Symbol 30 Button
on (release) {
gotoAndStop (2);
}
Symbol 37 Button
on (release) {
gameStart();
}
Symbol 39 Button
on (release) {
getURL ("http://www.gameangel.com");
}
Symbol 44 MovieClip Frame 1
stop();
Symbol 64 Button
on (release) {
getURL ("http://www.gameangel.com");
}
Symbol 65 Button
on (release) {
getURL ("http://www.gameangel.com");
}
Symbol 99 Button
on (release) {
getURL ("http://www.gameangel.com");
}
Symbol 111 MovieClip Frame 1
stop();
Symbol 128 MovieClip Frame 1
stop();
Symbol 134 MovieClip Frame 10
stop();
Symbol 135 MovieClip Frame 10
stop();
Symbol 136 MovieClip Frame 10
stop();
Symbol 140 MovieClip Frame 10
stop();
Symbol 144 MovieClip Frame 10
stop();
Symbol 145 MovieClip Frame 10
stop();
Symbol 146 MovieClip Frame 11
stop();
Symbol 150 MovieClip Frame 10
stop();
Symbol 161 MovieClip Frame 1
stop();
Symbol 165 Button
on (release) {
if (_parent.gamePlay) {
_parent.gamePause(1);
gotoAndStop (2);
}
}
Symbol 169 Button
on (release) {
if (_parent.gamePlay) {
_parent.gamePause(0);
gotoAndStop (1);
}
}
Symbol 170 MovieClip Frame 1
stop();
Symbol 177 MovieClip Frame 1
stop();
Symbol 178 MovieClip Frame 1
stop();
Symbol 178 MovieClip Frame 5
_parent.gotoAndStop(9);
Symbol 178 MovieClip Frame 13
stop();
_parent._visible = 0;
Symbol 186 MovieClip Frame 1
stop();
Symbol 193 MovieClip Frame 1
stop();
Symbol 193 MovieClip Frame 7
_parent.reflashItemMc();
Symbol 193 MovieClip Frame 21
_parent.waitTimeMc.waitTimeCheck(5, 1);
Symbol 195 Button
on (release) {
getURL ("http://www.gameangel.com");
}
Symbol 209 Button
on (release) {
_parent.nextLevel();
}
Symbol 213 Button
on (release) {
_parent.nextLevel();
}
Symbol 214 MovieClip Frame 1
stop();
Symbol 227 MovieClip Frame 1
stop();
Symbol 227 MovieClip Frame 33
stop();
this.missionViewCHK();
Symbol 234 Button
on (release) {
_parent.gotoAndStop(1);
}
Symbol 236 Button
on (release) {
_parent.RESTART();
}
Symbol 237 MovieClip Frame 1
stop();