Frame 1
this.stop();
Instance of Symbol 52 MovieClip in Frame 1
//component parameters
onClipEvent (initialize) {
nextframe = "GAME";
waitFrames = 20;
}
Frame 2
function sendRankScore(score, score_play) {
var _local1 = _root;
if (_local1.dbconnect == "yes") {
sendObj = new LoadVars();
loadObj = new LoadVars();
sendObj.gametype = _local1.gametype;
sendObj.userid = _local1.userid;
sendObj.score = int(score) + 969696;
sendObj.score_play = score_play;
sendObj.sendAndLoad((_local1.dir + "game_record.") + _local1.scripttype, loadObj, "POST");
loadObj.onLoad = function () {
};
}
}
this.stop();
Instance of Symbol 124 MovieClip [TMPbugengs7w0] in Frame 2
//component parameters
onClipEvent (initialize) {
gameVolume = 100;
boxAB = 40;
maxAB = 10;
testView = false;
}
Symbol 12 MovieClip [bomb] Frame 10
this.removeMovieClip();
Symbol 19 MovieClip Frame 1
this.stop();
Symbol 41 MovieClip [BOX] Frame 1
this.stop();
Symbol 41 MovieClip [BOX] Frame 12
this.stop();
Symbol 43 MovieClip [gameover] Frame 15
this.stop();
Symbol 52 MovieClip Frame 1
function display_one(num) {
var _local3 = num;
var _local1 = this.attachMovie("loadingone", "one" + _local3, -_local3);
_local1._rotation = (15 * _local3) - 90;
var _local2 = (_local1._rotation * Math.PI) / 180;
_local1._x = 125 * Math.cos(_local2);
_local1._y = 125 * Math.sin(_local2);
}
this.per = 0;
this.num = 0;
this.f = 0;
this.onEnterFrame = function () {
var _local1 = this;
if (_local1.per >= 100) {
_local1.f++;
if (_local1.f >= _local1.waitFrames) {
_parent.gotoAndPlay(_local1.nextframe);
}
} else {
_local1.per = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
_local1.BAR._xscale = _local1.per;
_local1.TXT = _local1.per + "% Load";
}
_local1.B2._rotation = _local1.B2._rotation + 4;
};
this.stop();
Symbol 62 MovieClip Frame 1
this.stop();
Symbol 68 Button
on (release) {
_parent._parent.AS.Game_Start();
}
Symbol 71 MovieClip Frame 1
this.stop();
Symbol 71 MovieClip Frame 6
this.stop();
Symbol 78 MovieClip Frame 1
this.stop();
function getFrame(MC) {
var _local1 = this;
f++;
te = getTimer();
t = te - ts;
if (t >= 1000) {
if (_local1._currentframe == 1) {
_local1.frametxt = "";
} else {
_local1.frametxt = f;
}
f = 0;
ts = te;
}
}
function checkKey() {
var _local2 = this;
var _local1 = Key.getAscii();
if (Key.isDown(16) && ((_local1 == 86) || (_local1 == 118))) {
if (_local2._currentframe == 1) {
_local2.gotoAndStop(2);
} else {
_local2.gotoAndStop(1);
}
}
}
f = 0;
ts = getTimer();
Symbol 83 Button
on (release) {
getURL ("http://www.game24.co.kr", "_blank", "GET");
}
Symbol 89 Button
on (release) {
_parent._parent.AS.soundOnOff();
}
Symbol 92 MovieClip Frame 1
this.stop();
Symbol 92 MovieClip Frame 6
this.stop();
Symbol 93 Button
on (release) {
_parent._parent.AS.pauseOnOff();
}
Symbol 96 MovieClip Frame 1
this.stop();
Symbol 96 MovieClip Frame 6
this.stop();
Symbol 97 Button
on (release) {
_parent._parent.AS.helpOnOff();
}
Symbol 100 MovieClip Frame 1
this.stop();
Symbol 100 MovieClip Frame 6
this.stop();
Symbol 105 MovieClip Frame 1
this.stop();
Instance of Symbol 78 MovieClip in Symbol 105 MovieClip Frame 1
onClipEvent (enterFrame) {
this.getFrame();
}
onClipEvent (keyDown) {
this.checkKey();
}
Symbol 108 Button
on (release) {
_parent._parent.AS.helpOnOff();
}
Symbol 115 MovieClip Frame 15
this.stop();
Symbol 124 MovieClip [TMPbugengs7w0] Frame 1
function Setup() {
var _local1 = this;
_local1.score = 0;
var i = 1;
while (i <= _local1.maxNum) {
_local1.CountNum[i] = 0;
_local1.CountTmp[i] = 0;
i++;
}
var n = 0;
var b = 1;
while (b <= _local1.maxAB) {
var _local3 = 1;
while (_local3 <= _local1.maxAB) {
var _local2 = _local1.gameMC.attachMovie("BOX", (("B" + _local3) + "x") + b, n++);
_local2._x = ((_local3 * _local1.boxAB) + _local1.boxX) - Math.round(_local1.boxAB / 2);
_local2._y = ((b * _local1.boxAB) + _local1.boxY) - Math.round(_local1.boxAB / 2);
var r = ((n % maxNum) + 1);
_local2.gotoAndStop(r);
_local1.CountNum[r]++;
_local2.num = ((b - 1) % 5) + 2;
_local2.BOX.gotoAndStop(_local2.num);
_local2.BUTTON.onRelease = function () {
_parent.AS.downBox(this._parent);
};
_local3++;
}
b++;
}
var i = 0;
while (i < (_local1.maxAB * _local1.maxAB)) {
var a1 = (random(_local1.maxAB) + 1);
var b1 = (random(_local1.maxAB) + 1);
var a2 = (random(_local1.maxAB) + 1);
var b2 = (random(_local1.maxAB) + 1);
if ((a1 != a2) && (b1 != b2)) {
var MC1 = _local1.gameMC[(("B" + a1) + "x") + b1];
var MC2 = _local1.gameMC[(("B" + a2) + "x") + b2];
var n = MC1.num;
var c = MC1._currentframe;
MC1.num = MC2.num;
MC1.gotoAndStop(MC2._currentframe);
MC1.BOX.gotoAndStop(MC1.num);
MC2.num = n;
MC2.gotoAndStop(c);
MC2.BOX.gotoAndStop(MC2.num);
}
i++;
}
_local1.rootMC.GAMECLEAR._visible = false;
_local1.rootMC.GAMEOVER._visible = false;
_local1.hideView = 0;
}
function downBox(tMC) {
var _local1 = tMC;
var _local2 = this;
if ((_local2.gameplay == true) && (_local2.hideView == 0)) {
if (_local1.BOX._currentframe == 1) {
_local1.BOX.gotoAndStop(_local1.num);
_local2.boxHide(_local1, -_local1._currentframe);
} else {
_local1.BOX.gotoAndStop(1);
_local2.boxHide(_local1, _local1._currentframe);
}
}
}
function boxHide(tMC, num) {
var _local1 = this;
_local1.checkNum = _local1.checkNum + num;
if (num < 0) {
var i = 0;
while (i < _local1.boxArr.length) {
if (_local1.boxArr[i] == tMC) {
_local1.boxArr[i] = _local1.boxArr[_local1.boxArr.length - 1];
break;
}
i++;
}
_local1.boxArr.pop();
} else {
_local1.boxArr.push(tMC);
}
if (_local1.checkNum > _local1.findNum) {
var b = 1;
while (b <= _local1.maxAB) {
var _local3 = 1;
while (_local3 <= _local1.maxAB) {
var _local2 = _local1.gameMC[(("B" + _local3) + "x") + b];
if (_local2.BOX._currentframe == 1) {
_local2.BUTTON._visible = true;
_local2.BOX.gotoAndStop(_local2.num);
}
_local3++;
}
b++;
}
_local1.checkNum = 0;
_local1.boxArr = [];
_local1.pauseTime = 0;
_local1.soundPlay("s_fail", 1);
} else if (_local1.checkNum == _local1.findNum) {
var i = 0;
while (i < _local1.boxArr.length) {
if ((_local1.boxArr[i]._visible == true) && (_local1.boxArr[i].BOX._currentframe == 1)) {
_local1.Hidden_Box(_local1.boxArr[i], _local1.oneScore * _local1.boxArr.length);
}
i++;
}
var t = (((getTimer() - _local1.ts) - _local1.pauseTime) / 1000);
var r = Math.floor((t / _local1.maxTime) * 100);
_local1.score = _local1.score + (100 - r);
_local1.scoreMC.TXT = _local1.score;
_local1.soundPlay("s_success", 1);
_local1.newNumber();
}
}
function checkNumber() {
var _local3 = this;
var b = 1;
while (b <= _local3.maxAB) {
var a = 1;
while (a <= _local3.maxAB) {
var _local2 = _local3.gameMC[(("B" + a) + "x") + b];
if (_local2.BOX._currentframe == 1) {
_local2.BUTTON._visible = true;
_local2.BOX.gotoAndStop(_local2.num);
}
a++;
}
b++;
}
var total = 0;
_local3.allTotal = 0;
var _local1 = 1;
while (_local1 <= _local3.maxNum) {
_local3.allTotal = _local3.allTotal + (_local1 * _local3.CountNum[_local1]);
_local1++;
}
if (_local3.allTotal <= 0) {
_local3.Game_Clear_Set();
} else {
var n = 0;
while (n < 100) {
var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];
arr.shuffle();
_local1 = 0;
while (_local1 < (random(7) + 1)) {
if (_local3.CountNum[arr[_local1]] > 0) {
if ((total + arr[_local1]) > 20) {
break;
}
total = total + arr[_local1];
}
_local1++;
}
if (total > 0) {
break;
}
n++;
}
}
return(total);
}
function newNumber() {
var _local1 = this;
if (_local1.hideView > 0) {
} else {
_local1.checkNum = 0;
_local1.ts = getTimer();
_local1.boxArr = [];
_local1.pauseTime = 0;
_local1.hideView = 0;
_local1.findNum = _local1.checkNumber();
_local1.startMC.TXT = _local1.findNum;
}
}
function Game_Start() {
var _local1 = this;
_local1.soundPlay("s_start", 1);
_local1.Setup();
_local1.newNumber();
_local1.startMC.gotoAndStop("OFF");
if (_local1.helpOn == true) {
_local1.helpOnOff();
}
if (_local1.pauseOn == true) {
_local1.pauseOnOff();
}
_local1.gameplay = true;
}
function Hidden_Box(MC, score) {
var _local1 = MC;
var _local2 = this;
_local2.CountNum[_local1._currentframe]--;
if (score > 0) {
var _local3 = _local2.gameMC.attachMovie("bomb", _local1._name + "R", _local1.getDepth() + 300);
_local3._x = _local1._x;
_local3._y = _local1._y;
_local3.BOX.TXT = "+" + score;
_local1._visible = false;
} else {
_local1.gotoAndStop(_local1._totalframes);
_local1.TXT = score;
}
_local2.score = _local2.score + score;
_local2.scoreMC.TXT = _local2.score;
}
function Hidden_Next() {
var _local1 = this;
_local1.f++;
if (_local1.f > _local1.hiddenSpeed) {
_local1.f = 0;
while (true) {
var _local2 = _local1.gameMC[(("B" + _local1.hideX) + "x") + _local1.hideY];
if ((_local2._visible == true) && (_local2._currentframe != _local2._totalframes)) {
_local1.Hidden_Box(_local2, (-_local1.oneScore) * 2);
return;
}
_local1.hideX++;
if (_local1.hideX > _local1.maxAB) {
_local1.hideX = 1;
_local1.hideY++;
}
if (_local1.hideY > _local1.maxAB) {
if (_local1.hideView == 1) {
_local1.Game_Over();
} else {
_local1.Game_Clear();
}
_local1.hideView = 0;
return;
}
}
}
}
function Hidden_Button() {
var _local3 = this;
var _local2 = 1;
while (_local2 <= _local3.maxAB) {
var _local1 = 1;
while (_local1 <= _local3.maxAB) {
delete _local3.gameMC[(("B" + _local1) + "x") + _local2].BUTTON.onRelease;
_local1++;
}
_local2++;
}
_local3.hideX = 1;
_local3.hideY = 1;
_local3.f = 0;
_local3.timeMC.TXT = 0;
_local3.timeMC.BAR._rotation = -50;
}
function Game_Over_Set() {
this.Hidden_Button();
this.hideView = 1;
}
function Game_Over() {
var _local1 = this;
_local1.rootMC.GAMEOVER.gotoAndPlay(1);
_local1.rootMC.GAMEOVER._visible = true;
_local1.startMC.gotoAndStop("ON");
_local1.gameplay = false;
_root.sendRankScore(_local1.score, "GAME OVER : " + _local1.score);
}
function Game_Clear_Set() {
this.Hidden_Button();
this.hideView = 2;
}
function Game_Clear() {
var _local1 = this;
_local1.rootMC.GAMECLEAR.gotoAndPlay(1);
_local1.rootMC.GAMECLEAR._visible = true;
_local1.startMC.gotoAndStop("ON");
_local1.gameplay = false;
_root.sendRankScore(_local1.score, "GAME CLEAR : " + _local1.score);
}
var rootMC = _parent.GAME;
var toolMC = _parent.TOOL;
var gameMC = this.rootMC.createEmptyMovieClip("GAME", -10);
this.rootMC.HELP._visible = false;
this.rootMC.HELP.swapDepths(-4);
this.rootMC.GAMEOVER._visible = false;
this.rootMC.GAMEOVER.swapDepths(-3);
this.rootMC.GAMECLEAR._visible = false;
this.rootMC.GAMECLEAR.swapDepths(-2);
this.rootMC.PAUSE._visible = false;
this.rootMC.PAUSE.swapDepths(-1);
var startMC = this.toolMC.STARTBUTTON;
var scoreMC = this.toolMC.scoreMC;
var timeMC = this.toolMC.timeMC;
var boxX = 0;
var boxY = 0;
var findNum = 0;
var findMax = 20;
var checkNum = 0;
var CountNum = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
var CountTmp = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
var maxNum = 9;
var score = 0;
var oneScore = 50;
var ts = 0;
var maxTime = 10;
var gameplay = false;
var hideView = 0;
var hideX = 1;
var hideY = 1;
var f = 0;
var hiddenSpeed = 0;
var boxArr = [];
var allTotal = 0;
var numTotal = 0;
Array.prototype.shuffle = function () {
var _local1 = this;
var len = _local1.length;
var _local2 = 0;
while (_local2 < len) {
var x = random(len);
var _local3 = random(len);
var z = _local1[x];
_local1[x] = _local1[_local3];
_local1[_local3] = z;
_local2++;
}
};
this.onEnterFrame = function () {
var _local1 = this;
if (_local1.gameplay == true) {
if (_local1.hideView == 0) {
if (_local1.pauseOn == false) {
var _local2 = ((getTimer() - _local1.ts) - _local1.pauseTime) / 1000;
var _local3 = (_local2 / _local1.maxTime) * 100;
if (_local3 > 100) {
_local3 = 100;
}
_local1.timeMC.TXT = Math.round(_local1.maxTime - _local2);
_local1.timeMC.BAR._rotation = 50 - _local3;
if (Math.round(_local1.maxTime - _local2) <= 0) {
_local1.Game_Over_Set();
}
}
} else {
_local1.Hidden_Next();
}
}
if (_local1.testView == true) {
_root.testTXT = (((((((((((("total: " + _local1.allTotal) + " | ") + _local1.CountNum) + " | ") + _local1.CountTmp) + " | ") + _local1.findNum) + " = ") + _local1.numTotal) + " (") + _local1.checkNum) + ") : length: ") + _local1.boxArr.length;
}
};
this.timeMC.TXT = 0;
this.timeMC.BAR._rotation = -50;
this.stop();
function helpOnOff() {
var _local1 = this;
if (_local1.helpOn == true) {
_local1.helpView._visible = false;
_local1.helpMC.gotoAndStop("OFF");
_local1.helpOn = false;
} else {
_local1.helpView._visible = true;
_local1.helpMC.gotoAndStop("ON");
_local1.helpOn = true;
}
}
function soundOnOff() {
var _local1 = this;
if (_local1.soundOn == true) {
_local1.soundMC.gotoAndStop("OFF");
_local1.soundOn = false;
stopAllSounds();
} else {
_local1.soundMC.gotoAndStop("ON");
_local1.soundOn = true;
}
}
function pauseOnOff() {
var _local1 = this;
if (_local1.pauseOn == true) {
if (_local1.gameplay == true) {
_local1.pauseTime = _local1.pauseTime + (getTimer() - _local1.pts);
}
_local1.pauseView._visible = false;
_local1.pauseMC.gotoAndStop("OFF");
_local1.pauseOn = false;
} else {
_local1.pts = getTimer();
_local1.pauseView._visible = true;
_local1.pauseMC.gotoAndStop("ON");
_local1.pauseOn = true;
}
}
function soundPlay(name, loop) {
var _local1 = this;
if ((_local1.soundOn == true) && (_local1.gameVolume > 0)) {
_local1.soundObj[name].start(0, loop);
_local1.soundObj[name].setVolume(_local1.gameVolume);
}
}
System.useCodePage = true;
this._name = "AS";
var pts = 0;
var pauseTime = 0;
var helpOn = true;
var helpView = this.rootMC.HELP;
var helpMC = this.toolMC.helpMC;
this.helpView._visible = true;
this.helpMC.gotoAndStop("ON");
var soundOn = true;
var soundMC = this.toolMC.soundMC;
this.soundMC.gotoAndStop("ON");
var pauseOn = false;
var pauseView = this.rootMC.PAUSE;
var pauseMC = this.toolMC.pauseMC;
this.pauseView._visible = false;
this.pauseMC.gotoAndStop("OFF");
var soundName = ["s_start", "s_success", "s_fail", "s_end"];
var soundObj = Array();
if (this.gameVolume < 0) {
this.gameVolume = 0;
}
if (this.gameVolume > 1000) {
this.gameVolume = 1000;
}
var i = 0;
while (i <= soundName.length) {
soundObj[soundName[i]] = new Sound();
soundObj[soundName[i]].attachSound(soundName[i]);
i++;
}