Frame 1
stop();
fscommand ("allowscale", false);
Stage.showMenu = false;
Button.prototype.tabEnabled = false;
Frame 5
function startGame() {
gotoAndStop ("game");
}
function openHelp() {
help_mc.open();
}
stop();
_global._r = this;
var currentLabel = "intro";
_global._SB = new game.sound.SoundBox(this.createEmptyMovieClip("soundbox_mc", 10));
_SB.attachAllSound("kongturn", "kongsave", "kongpang", "kongfly", "focusmove:20", "shook", "levelclear", "levelstart", "button:50", "gameover", "loop1:0", "baby", "combo");
Frame 10
stop();
currentLabel = "game";
help_b.onPress = function () {
if (!help_mc.openBool) {
_SB.button.start(0, 1);
_game.helpOpen();
help_mc.open();
}
};
stog = true;
soundtog_mc.onPress = function () {
if (stog) {
_SB.setAllMute();
this.gotoAndStop("off");
} else {
_SB.setAllOn();
this.gotoAndStop("on");
}
stog = !stog;
};
Symbol 10 MovieClip Frame 1
var loader = (new game.loader.JLoader(_root, this));
loader.onLoadProgress = function (per, gBL, gBT) {
bar_mc._xscale = per;
txt.text = per;
};
loader.onLoaded = function () {
_root.gotoAndStop("intro");
};
Symbol 292 MovieClip [__Packages.game.loader.JLoader] Frame 0
class game.loader.JLoader
{
function JLoader (targetM, viewM) {
trace("mc=" + targetM);
var owner = this;
viewM.targetM = targetM;
viewM.onEnterFrame = function () {
var _local4 = this.targetM.getBytesTotal();
var _local2 = this.targetM.getBytesLoaded();
if (_local2 > 4) {
var _local3 = Math.floor((_local2 / _local4) * 100);
if (_local3 >= 100) {
owner.onLoaded();
this.onEnterFrame = null;
} else {
owner.onLoadProgress(_local3, _local2, _local4);
}
}
};
}
function onLoadProgress(per, gBL, gBT) {
}
function onLoaded() {
}
}
Symbol 293 MovieClip [__Packages.game.sound.SoundBox] Frame 0
class game.sound.SoundBox
{
var soundbox_mc, soundbox;
function SoundBox (mc) {
trace("soundbox_Class Loaded");
soundbox_mc = mc;
soundbox = new Sound(mc);
}
function attachAllSound() {
for (var _local6 in arguments) {
var _local4 = arguments[_local6].split(":");
var _local5 = _local4[0].split("_");
var _local3 = _local4[0];
soundbox_mc.createEmptyMovieClip(_local3 + "_mc", dep++);
this[_local3] = new Sound(soundbox_mc[_local3 + "_mc"]);
this[_local3].attachSound(_local5[0]);
if (_local4[1] == undefined) {
this[_local3].setVolume(100);
} else {
this[_local3].setVolume(Number(_local4[1]));
}
soundbox_arr[_local6] = this[_local3];
}
}
function setAllMute() {
soundbox.setVolume(0);
}
function setAllOn() {
soundbox.setVolume(100);
}
function fadeIn(s, tv, df, B) {
fade("IN", s, tv, df, B);
}
function fadeOut(s, tv, df, B) {
fade("OUT", s, tv, df, B);
}
function fade(tog, s, tv, df, B) {
if ((tog == "IN") && (B)) {
this[s].start(0, 99999);
}
var _local2 = soundbox_mc[s + "_mc"];
var owner = this;
_local2.cv = this[s].getVolume();
_local2.dv = (tv - _local2.cv) / df;
_local2.tv = tv;
_local2.df = df;
_local2.tog = tog;
_local2.count = 0;
_local2.onEnterFrame = function () {
this.count++;
this.cv = this.cv + this.dv;
owner[s].setVolume(Math.round(this.cv));
if (this.count == this.df) {
owner[s].setVolume(this.tv);
if ((tog == "OUT") && (B)) {
this[s].stop();
}
this.onEnterFrame = null;
}
};
}
var dep = 0;
var soundbox_arr = [];
}
Symbol 294 MovieClip [__Packages.ViewNumMC] Frame 0
class ViewNumMC
{
var view_mc, att_name, align, dx, numClip_arr, strN;
function ViewNumMC (view_mc, att_name, align, dx) {
this.view_mc = view_mc;
this.att_name = att_name;
this.align = align;
this.dx = dx;
numClip_arr = [];
}
function setNumber(n) {
strN = String(n);
chkClipNum();
var _local2 = 0;
while (_local2 < strN.length) {
var _local3 = Number(strN.substr((strN.length - 1) - _local2, 1));
numClip_arr[_local2].gotoAndStop(_local3 + 1);
_local2++;
}
alignClip();
}
function alignClip() {
var _local4 = getInitX();
var _local2 = 0;
while (_local2 < numClip_arr.length) {
var _local3 = numClip_arr[_local2];
_local3._x = _local4 - (dx * _local2);
_local3._y = 0;
_local2++;
}
}
function getInitX() {
var _local2;
switch (align) {
case "center" :
_local2 = (dx * (strN.length - 1)) / 2;
_local2 = _local2 - (dx / 2);
break;
case "left" :
_local2 = dx * (strN.length - 1);
break;
case "right" :
_local2 = 0;
_local2 = _local2 - dx;
}
return(_local2);
}
function chkClipNum() {
if (strN.length > numClip_arr.length) {
var _local2 = numClip_arr.length;
while (_local2 < strN.length) {
var _local3 = view_mc.attachMovie(att_name, "N" + _local2, view_mc.getNextHighestDepth());
numClip_arr.push(_local3);
_local2++;
}
} else if (strN.length < numClip_arr.length) {
var _local2 = numClip_arr.length - 1;
while (_local2 >= strN.length) {
numClip_arr[_local2].removeMovieClip();
numClip_arr.pop();
_local2--;
}
}
}
}
Symbol 295 MovieClip [__Packages.BlockControll] Frame 0
class BlockControll
{
var root, blockStage_o, arrayPos_c, blockView_c, score, _SB, pause, delBlockCount, delBlockFinish, timmer_c, blockArr_arr, cap_o, copycap_o, transNum, transRotation_arr, allDownBlock_arr, sameBlockArr;
function BlockControll (row, col, dx, dy, faceNum, root) {
trace("----------BlockControll Class Loaded----------");
this.root = root;
blockStage_o = {row:row, col:col, dx:dx, dy:dy, faceNum:faceNum};
arrayPos_c = new ArrayPos(row, col, dx, dy);
blockView_c = new BlockView(root, this);
score = 0;
_SB = _global._SB;
pause = true;
init();
}
function init() {
delBlockCount = 0;
setInitBlock();
setInitCap();
}
function start(dt, delBlockFinish) {
this.delBlockFinish = delBlockFinish;
setTimmer(3000, dt);
pause = false;
trace((((("\uC0C8\uB85C\uC2DC\uC791\uD588\uB2E4 " + dt) + "/") + delBlockFinish) + "/") + pause);
}
function reset() {
timmer_c.reset();
blockView_c.reset();
init();
}
function setInitBlock() {
blockArr_arr = [];
var _local4 = 0;
while (_local4 < blockStage_o.col) {
blockArr_arr[_local4] = [];
var _local3 = 0;
while (_local3 < blockStage_o.row) {
var _local2 = {};
_local2.ax = _local4;
_local2.ay = _local3;
_local2.x = arrayPos_c.getPosX(_local4);
_local2.y = arrayPos_c.getPosY(_local3);
_local2.face = getFace(_local4, _local3, true);
_local2.mc = blockView_c.attachBlock(_local2.x, _local2.y, _local2.face);
blockArr_arr[_local4][_local3] = _local2;
_local3++;
}
_local4++;
}
}
function setInitCap() {
cap_o = {};
cap_o.ax = 0;
cap_o.ay = 0;
cap_o.x = 0;
cap_o.y = 0;
cap_o.mc = blockView_c.attachCap(cap_o.x, cap_o.y);
}
function getFace(ax, ay, init) {
var _local2 = random(blockStage_o.faceNum) + 1;
if (init) {
if ((((blockArr_arr[ax - 1][ay].face == _local2) || (blockArr_arr[ax + 1][ay].face == _local2)) || (blockArr_arr[ax][ay - 1].face == _local2)) || (blockArr_arr[ax][ay + 1].face == _local2)) {
_local2 = getFace(ax, ay, true);
}
}
return(_local2);
}
function onMouseMove() {
if (!pause) {
var _local4 = root._xmouse;
var _local3 = root._ymouse;
if (arrayPos_c.chkInside(_local4, _local3)) {
var _local2 = arrayPos_c.getPosAXY(_local4 - (blockStage_o.dx / 2), _local3 + (blockStage_o.dy / 2));
if ((_local2.ax != cap_o.ax) || (_local2.ay != cap_o.ay)) {
if (_local2.ax < 0) {
_local2.ax = 0;
}
if (_local2.ay < 0) {
_local2.ay = 0;
}
if (_local2.ax > (blockStage_o.col - 2)) {
_local2.ax = blockStage_o.col - 2;
}
if (_local2.ay > (blockStage_o.row - 2)) {
_local2.ay = blockStage_o.row - 2;
}
if ((_local2.ax != cap_o.ax) || (_local2.ay != cap_o.ay)) {
_SB.focusmove.start(0, 1);
}
cap_o.ax = _local2.ax;
cap_o.ay = _local2.ay;
cap_o.x = arrayPos_c.getPosX(_local2.ax);
cap_o.y = arrayPos_c.getPosY(_local2.ay);
blockView_c.moveCap(cap_o);
blockView_c.resetBlockFace(blockArr_arr);
blockView_c.setCapBlockFace(getCapBlocks(cap_o.ax, cap_o.ay), "huk");
updateAfterEvent();
}
}
}
}
function onMouseDown() {
if (!pause) {
var _local3 = root._xmouse;
var _local2 = root._ymouse;
if ((arrayPos_c.chkInside(_local3, _local2) && (!transChk_bool)) && (!pause)) {
if ((!transRotation_bool) || ((transRotation_bool && (copycap_o.ax == cap_o.ax)) && (copycap_o.ay == cap_o.ay))) {
transBlockRotation();
}
}
}
}
function getCapBlocks(ax, ay) {
var _local4 = [blockArr_arr[ax][ay], blockArr_arr[ax][ay + 1], blockArr_arr[ax + 1][ay + 1], blockArr_arr[ax + 1][ay]];
return(_local4);
}
function transBlockRotation() {
_SB.kongturn.start(0, 1);
transNum = (transRotation_bool ? (transNum + 4) : 4);
transRotation_bool = true;
copycap_o = copyObject(cap_o);
var _local3 = getCapBlocks(cap_o.ax, cap_o.ay);
_local3.push(copyObject(_local3[0]));
var _local2 = 0;
while (_local2 < 4) {
_local3[_local2].x = _local3[_local2 + 1].x;
_local3[_local2].y = _local3[_local2 + 1].y;
_local3[_local2].ax = _local3[_local2 + 1].ax;
_local3[_local2].ay = _local3[_local2 + 1].ay;
blockArr_arr[_local3[_local2].ax][_local3[_local2].ay] = _local3[_local2];
blockView_c.moveBlock(_local3[_local2]);
_local2++;
}
_local3.pop();
transRotation_arr = _local3;
}
function moveBlockEnd() {
transNum--;
if (transNum == 0) {
copycap_o = undefined;
transRotation_bool = false;
transBlockEnd(transRotation_arr);
}
}
function transBlockEnd(arr) {
var owner = this;
transChk_bool = true;
timmer_c.setPause(true);
var _local5 = [];
var _local4 = "";
for (var _local6 in arr) {
if (arr[_local6].face != _local4) {
_local4 = arr[_local6].face;
var _local3 = chkDelBlock(arr[_local6]);
if (_local3.length != 0) {
_local5.push(_local3);
}
}
}
if (_local5.length != 0) {
_SB.kongpang.start(0, 1);
_SB.kongpang.onSoundComplete = function () {
this.onSoundComplete = null;
owner._SB.kongfly.start(0, 1);
};
transNum = _local5.toString().split(",").length;
blockView_c.removeBlock(_local5);
} else {
delComboCount = 0;
transChk_bool = false;
timmer_c.setPause(false);
chkClearLevel();
}
}
function chkClearLevel() {
if (delBlockFinish < delBlockCount) {
trace("\uB808\uBCA8 \uD074\uB9AD\uC5B4 \uD588\uB124");
timmer_c.setPause(true);
pause = true;
var _local2 = timmer_c.getRestTime();
root.clearLevel(_local2);
}
}
function removeBlockEnd(k) {
if (k != undefined) {
delBlockCount++;
}
transNum--;
if (transNum == 0) {
delComboCount++;
attachNewBlock();
}
}
function attachNewBlock() {
transNum = 0;
var _local6 = [];
allDownBlock_arr = [];
var _local2 = 0;
while (_local2 < blockStage_o.col) {
var _local7 = [];
var _local5 = 0;
while (_local5 < blockStage_o.row) {
var _local3 = blockArr_arr[_local2][_local5];
if (_local3.mc._visible == undefined) {
if (_local6[_local2] == undefined) {
_local6[_local2] = [_local5];
} else {
_local6[_local2].push(_local5);
}
blockArr_arr[_local2][_local5] = undefined;
var _local9 = (blockStage_o.row + _local6[_local2].length) - 1;
_local3 = {};
_local3.ax = _local2;
_local3.ay = _local9;
_local3.x = arrayPos_c.getPosX(_local2);
_local3.y = arrayPos_c.getPosY(_local9);
_local3.face = getFace();
_local3.mc = blockView_c.attachBlock(_local3.x, _local3.y, _local3.face);
_local3.tog = true;
_local7.push(copyObject(_local3));
} else if (_local6[_local2][0] < _local5) {
_local7.push(copyObject(_local3));
}
_local5++;
}
allDownBlock_arr = allDownBlock_arr.concat(_local7);
transNum = transNum + _local7.length;
var _local8 = 0;
while (_local8 < _local7.length) {
var _local3 = _local7[_local8];
var _local10;
var _local4 = 0;
while (_local4 < _local6[_local2].length) {
if (_local6[_local2][_local4] > _local3.ay) {
_local3.mc.txt.text = "";
break;
}
_local10 = _local4 + 1;
_local4++;
}
_local3.ay = _local3.ay - _local10;
_local3.y = arrayPos_c.getPosY(_local3.ay);
blockView_c.downBlock(_local3);
blockArr_arr[_local2][_local3.ay] = _local3;
_local8++;
}
_local2++;
}
}
function downBlockEnd() {
transNum--;
if (transNum == 0) {
transBlockEnd(allDownBlock_arr);
}
}
function downAllBlock() {
}
function chkDelBlock(o) {
resetTog();
sameBlockArr = [];
var _local2 = o;
_local2.tog = false;
sameBlockArr.push(_local2);
chkChain(_local2.ax, _local2.ay, _local2.face);
if (sameBlockArr.length < 3) {
sameBlockArr = [];
}
return(sameBlockArr);
}
function chkChain(ax, ay, face) {
var _local2 = blockArr_arr[ax][ay];
var _local5 = blockArr_arr[ax - 1][ay];
chkChainSub(_local2, _local5);
_local5 = blockArr_arr[ax + 1][ay];
chkChainSub(_local2, _local5);
_local5 = blockArr_arr[ax][ay + 1];
chkChainSub(_local2, _local5);
_local5 = blockArr_arr[ax][ay - 1];
chkChainSub(_local2, _local5);
return(undefined);
}
function chkChainSub(baseObj, chkObj) {
if (chkObj.tog && (chkObj.face == baseObj.face)) {
chkObj.tog = false;
sameBlockArr.push(chkObj);
chkChain(chkObj.ax, chkObj.ay, chkObj.face);
}
return(undefined);
}
function resetTog() {
var _local3 = 0;
while (_local3 < blockStage_o.col) {
var _local2 = 0;
while (_local2 < blockStage_o.row) {
blockArr_arr[_local3][_local2].tog = true;
_local2++;
}
_local3++;
}
}
function setWatch(mc) {
timmer_c = new Timmer(mc);
timmer_c.addEventListener("timeOut", this);
}
function setTimmer(t, dt) {
timmer_c.setTotalTime(t);
timmer_c.start(dt);
}
function timeOut() {
trace("\uD0C0\uC784\uC544\uC6C3\uC774\uB780\uB2E4 ");
root.gameover(score);
timmer_c.setPause(true);
timmer_c.reset();
pause = true;
}
function addScore(point) {
score = score + point;
root.viewScore(score);
}
function copyObject(o) {
var _local2 = {};
for (var _local3 in o) {
_local2[_local3] = o[_local3];
}
return(_local2);
}
function delay(t, callback) {
function temp() {
clearInterval(interval);
owner[callback]();
}
var owner = this;
var interval = setInterval(temp, t);
}
function trace_face() {
var _local4 = 0;
while (_local4 < blockStage_o.col) {
var _local2 = 0;
while (_local2 < blockStage_o.row) {
var _local3 = blockArr_arr[_local4][_local2];
_local3.mc.txt.text = _local3.face;
_local2++;
}
_local4++;
}
}
function setBezierControll(ct1, ct2, ac2) {
blockView_c.setBezierControll(ct1, ct2, ac2);
}
function onHelpOpen() {
timmer_c.setPause(true);
}
var transRotation_bool = false;
var transChk_bool = false;
var delComboCount = 0;
}
Symbol 296 MovieClip [__Packages.ArrayPos] Frame 0
class ArrayPos
{
var row, col, dx, dy, bound_o;
function ArrayPos (row, col, dx, dy, root) {
trace("----------ArrayPos Class Loaded----------");
this.row = row;
this.col = col;
this.dx = dx;
this.dy = dy;
bound_o = {xmin:0, ymin:0, xmax:dx * col, ymax:dy * row};
}
function getPosX(ax) {
return(ax * dx);
}
function getPosY(ay) {
return((ay * dy) * -1);
}
function getPosXY(ax, ay) {
var _local2 = {};
_local2.x = getPosX(ax);
_local2.y = getPosY(ay);
return(_local2);
}
function getPosAX(x) {
return(Math.floor(x / dx));
}
function getPosAY(y) {
return(Math.floor((y * -1) / dy));
}
function getPosAXY(x, y) {
var _local2 = {};
_local2.ax = getPosAX(x);
_local2.ay = getPosAY(y);
return(_local2);
}
function chkInside(x, y) {
return((((x > bound_o.xmin) && (x < bound_o.xmax)) && (y < bound_o.ymin)) && (y > (bound_o.ymax * -1)));
}
}
Symbol 297 MovieClip [__Packages.BlockView] Frame 0
class BlockView
{
var root, blockControll_c, _SB, att_dep, blockBox_mc, pointBox_mc, cap_mc, ct1, ct2, ac2;
function BlockView (root, blockControll_c) {
trace("----------BlockView Class Loaded----------");
this.root = root;
this.blockControll_c = blockControll_c;
_SB = _global._SB;
init();
}
function init() {
att_dep = 0;
blockBox_mc = root.createEmptyMovieClip("blockBox", root.getNextHighestDepth());
pointBox_mc = root.createEmptyMovieClip("pointBox", root.getNextHighestDepth());
}
function reset() {
blockBox_mc.removeMovieClip();
pointBox_mc.removeMovieClip();
cap_mc.removeMovieClip();
init();
}
function attachBlock(x, y, face) {
var _local3 = att_dep++;
var _local2 = blockBox_mc.attachMovie("att_block", "block_" + _local3, _local3, {_x:x, _y:y});
_local2._width = blockControll_c.blockStage_o.dx;
_local2._height = blockControll_c.blockStage_o.dy;
_local2.gotoAndStop(face);
return(_local2);
}
function moveBlock(o) {
var owner = this;
var callback = blockControll_c;
if (o.mc._x != o.x) {
var _local3 = new mx.transitions.Tween(o.mc, "_x", mx.transitions.easing.Regular.easeOut, o.mc._x, o.x, 10);
}
if (o.mc._y != o.y) {
var _local3 = new mx.transitions.Tween(o.mc, "_y", mx.transitions.easing.Regular.easeOut, o.mc._y, o.y, 10);
}
_local3.onMotionFinished = function () {
owner.setCapBlockFace(this.obj, "hehe");
callback.moveBlockEnd();
};
}
function downBlock(o) {
var callback = blockControll_c;
if (o.mc._x != o.x) {
var _local3 = new mx.transitions.Tween(o.mc, "_x", mx.transitions.easing.Regular.easeIn, o.mc._x, o.x, 10);
}
if (o.mc._y != o.y) {
var _local3 = new mx.transitions.Tween(o.mc, "_y", mx.transitions.easing.Regular.easeIn, o.mc._y, o.y, 10);
}
_local3.onMotionFinished = function () {
callback.downBlockEnd();
};
}
function chkSameBlock(str) {
}
function removeBlock(delBlockBox) {
var _local5 = 0;
var _local6 = {};
var callback = blockControll_c;
if (blockControll_c.delComboCount > 0) {
addDelComboPoint(blockControll_c.delComboCount, delBlockBox[0][0].mc._x);
}
for (var _local8 in delBlockBox) {
for (var _local7 in delBlockBox[_local8]) {
_local5++;
if (_local6[delBlockBox[_local8][_local7].mc._name] == undefined) {
_local6[delBlockBox[_local8][_local7].mc._name] = true;
addDelPoint(delBlockBox[_local8][_local7], _local5);
delBlockBox[_local8][_local7].mc.gotoAndStop(delBlockBox[_local8][_local7].face + 20);
}
var _local3 = new mx.transitions.Tween(delBlockBox[_local8][_local7].mc, "_alpha", mx.transitions.easing.Regular.easeIn, 100, 100, 10);
_local3.onMotionFinished = function () {
var _local2 = this.obj._name;
this.obj.removeMovieClip();
callback.removeBlockEnd(_local2);
};
}
}
}
function addDelComboPoint(count, x) {
_SB.combo.start(0, 1);
_SB.combo.setVolume(30 + (count * 7));
var _local3 = pointBox_mc.getNextHighestDepth();
var _local2 = pointBox_mc.attachMovie("att_combo", "C_" + _local3, _local3);
_local2._x = 150;
_local2._y = -120;
var _local4 = 100 * count;
_local2.txt.text = _local4;
blockControll_c.addScore(_local4);
_local2._xscale = (_local2._yscale = 80 + (count * 20));
var _local5 = _local2._y - 50;
var _local6 = new mx.transitions.Tween(_local2, "_y", mx.transitions.easing.None.easeNone, _local2._y, _local5, 30);
_local6.onMotionFinished = function () {
this.obj.removeMovieClip();
};
}
function addDelPoint(o, count) {
var _local4 = pointBox_mc.getNextHighestDepth();
var _local2 = pointBox_mc.createEmptyMovieClip("P_" + _local4, _local4);
_local2._x = o.mc._x + (o.mc._width / 2);
_local2._y = o.mc._y - (o.mc._height / 2);
_local2._xscale = (_local2._yscale = 50);
var _local8 = new ViewNumMC(_local2, "att_levelNum", "center", 20);
var _local5 = count * 10;
_local8.setNumber(_local5);
blockControll_c.addScore(_local5);
var _local6 = _local2._y - 5;
var _local7 = new mx.transitions.Tween(_local2, "_y", mx.transitions.easing.None.easeNone, _local2._y, _local6, 10);
_local7.onMotionFinished = function () {
this.obj.removeMovieClip();
};
flyPointClip(o, count);
}
function flyPointClip(o, count) {
var owner = this;
var _local4 = pointBox_mc.getNextHighestDepth();
var _local2 = pointBox_mc.attachMovie("att_flyPoint", "att_flyPoint" + _local4, _local4);
_local2.gotoAndStop(o.face);
_local2.initx = (_local2._x = o.mc._x + (o.mc._width / 2));
_local2.inity = (_local2._y = o.mc._y - (o.mc._height / 2));
_local2._width = (_local2._height = 10);
var _local5 = new mx.transitions.Tween(_local2, "t", mx.transitions.easing.Regular.easeIn, 0, 1, 20 + (count * 2));
_local5.onMotionChanged = function () {
this.obj._x = owner.getBezier(this.obj.t, owner.ct1._x, owner.ct2._x, this.obj.initx, owner.ac2._x);
this.obj._y = owner.getBezier(this.obj.t, owner.ct1._y, owner.ct2._y, this.obj.inity, owner.ac2._y);
};
_local5.onMotionFinished = function () {
owner._SB.kongsave.start(0, 1);
this.obj.removeMovieClip();
owner.root.addKong();
};
}
function getBezier(t, ct1, ct2, ac1, ac2) {
var _local4;
var _local3;
var _local2;
_local2 = 3 * (ct1 - ac1);
_local3 = (3 * (ct2 - ct1)) - _local2;
_local4 = ((ac2 - ac1) - _local3) - _local2;
return((((((_local4 * t) * t) * t) + ((_local3 * t) * t)) + (_local2 * t)) + ac1);
}
function setBezierControll(ct1, ct2, ac2) {
this.ct1 = ct1;
this.ct2 = ct2;
this.ac2 = ac2;
}
function attachCap(x, y) {
cap_mc = root.attachMovie("att_cap", "cap", root.getNextHighestDepth(), {_x:x, _y:y});
cap_mc.swapDepths(pointBox_mc);
return(cap_mc);
}
function moveCap(cap_o) {
cap_mc._x = cap_o.x;
cap_mc._y = cap_o.y;
}
function setCapBlockFace(cap_arr, face) {
if (cap_arr instanceof Array) {
for (var _local3 in cap_arr) {
cap_arr[_local3].mc.face_mc.gotoAndStop(face);
}
} else if (cap_arr instanceof MovieClip) {
cap_arr.face_mc.gotoAndStop(face);
}
}
function resetBlockFace(o) {
for (var _local3 in o) {
for (var _local2 in o[_local3]) {
o[_local3][_local2].mc.face_mc.gotoAndStop(1);
}
}
}
function trace_del(o) {
root.trace_mc.removeMovieClip();
var _local5 = root.createEmptyMovieClip("trace_mc", root.getNextHighestDepth());
_local5._x = 300;
for (var _local7 in o) {
for (var _local6 in o[_local7]) {
var _local4 = _local5.getNextHighestDepth();
var _local2 = _local5.attachMovie("att_block", "trace_block" + _local4, _local4);
_local2._x = o[_local7][_local6].mc._x;
_local2._y = o[_local7][_local6].mc._y;
_local2.gotoAndStop(o[_local7][_local6].mc._currentframe);
}
}
}
}
Symbol 298 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");
};
}
}
}
Symbol 299 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++;
}
}
}
Symbol 300 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 __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 301 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
}
Symbol 302 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 303 MovieClip [__Packages.Timmer] Frame 0
class Timmer
{
var mc, curTime, totalTime, dispatchEvent;
function Timmer (mc) {
trace("----------Timmer Class Loaded----------");
this.mc = mc;
mx.events.EventDispatcher.initialize(this);
}
function reset() {
curTime = totalTime;
viewTime();
}
function setTotalTime(totalTime) {
this.totalTime = totalTime;
curTime = totalTime;
}
function setCurTime(curTime) {
this.curTime = curTime;
}
function start(dt) {
setPause(false);
var owner = this;
var dt = dt;
mc.onEnterFrame = function () {
if ((!owner.pause) && (!this._parent.help_mc.openBool)) {
owner.curTime = owner.curTime - dt;
owner.viewTime();
}
};
}
function viewTime() {
var _local2 = (curTime / totalTime) * 100;
mc.bar_mc._xscale = _local2;
mc.warn_mc.gotoAndStop(((_local2 < 30) ? 2 : 1));
if (curTime < 0) {
timeOver();
}
}
function timeOver() {
dispatchEvent({type:"timeOut", target:this});
setPause(true);
mc.onEnterFrame = null;
}
function setPause(b) {
pause = b;
}
function getRestTime() {
return(curTime);
}
var pause = false;
}
Symbol 304 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1};
}
Symbol 26 MovieClip Frame 1
stop();
Symbol 26 MovieClip Frame 6
stop();
Symbol 26 MovieClip Frame 11
stop();
Symbol 46 MovieClip Frame 11
stop();
Symbol 47 MovieClip [att_block] Frame 1
boomFrame = 20;
Symbol 61 MovieClip Frame 1
stop();
Symbol 95 MovieClip [att_flyPoint] Frame 1
stop();
Symbol 114 MovieClip Frame 1
stop();
Symbol 145 Button
on (press) {
_SB.button.start(0, 1);
_r.startGame();
}
Symbol 146 Button
on (press) {
_SB.button.start(0, 1);
_r.openHelp();
start_b.enabled = false;
help_b.enabled = false;
}
Symbol 147 MovieClip Frame 36
stop();
Symbol 188 Button
on (press) {
_SB.button.start(0, 1);
_game.helpClose();
close();
}
Symbol 189 Button
on (press) {
_r.startGame();
close();
}
Symbol 190 MovieClip Frame 1
function open() {
trace("\uB3C4\uC6C0\uB9D0\uC5F4\uC5B4\uB77C" + openBool);
if (!openBool) {
this._visible = 1;
play();
}
}
function close() {
trace("\uB3C4\uC6C0\uB9D0\uB2EB\uC544\uB77C" + openBool);
if (openBool) {
gotoAndStop (1);
openBool = false;
}
}
stop();
this._visible = 0;
under_mc.onPress = function () {
};
under_mc.useHandCursor = false;
Symbol 190 MovieClip Frame 11
stop();
this.openBool = true;
if (_r.currentLabel == "game") {
close_b._visible = true;
start_b._visible = false;
} else {
close_b._visible = false;
start_b._visible = true;
}
Symbol 196 MovieClip Frame 1
stop();
this._visible = 0;
Symbol 196 MovieClip Frame 2
this._visible = 1;
Symbol 206 MovieClip Frame 1
stop();
this.bonus = 0;
this.end = false;
Symbol 206 MovieClip Frame 20
this.txt.text = this.bonus;
Symbol 206 MovieClip Frame 50
this.end = true;
Symbol 227 MovieClip Frame 1
stop();
Symbol 227 MovieClip Frame 20
id_txt.text = _root.id + " \uB2D8\uC758 \uAC8C\uC784 \uC810\uC218";
score_txt.text = this.score;
Symbol 227 MovieClip Frame 21
stop();
replay_b.onPress = function () {
_SB.button.start(0, 1);
getURL ("javascript:document.location.reload()");
};
close_b.onPress = function () {
_SB.button.start(0, 1);
getURL ("javascript:close()");
};
Symbol 236 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 1
stop();
Symbol 259 MovieClip Frame 1
stop();
Symbol 259 MovieClip Frame 10
stop();
Symbol 283 MovieClip Frame 50
stop();
this.onEnterFrame = function () {
this.prevFrame();
if (this._currentframe == 1) {
this.onEnterFrame = null;
_parent.gotoAndStop(1);
}
};
Symbol 284 MovieClip Frame 1
stop();
Symbol 291 MovieClip Frame 1
function viewScore(score) {
score_mc.txt.text = score;
score_mc.gotoAndPlay(2);
}
function addKong() {
kongCount++;
kongBox_mc["p" + kongCount].play();
}
function resetKongBox() {
kongBox_mc.gotoAndStop(2);
}
function gameover(score) {
_SB.loop1.setVolume(0);
_SB.loop1.stop();
delete blockControll_c;
clearLevel = null;
gameover_mc.score = score;
gameover_mc.play();
_SB.gameover.start(0, 1);
}
function getDtime(level) {
return(1 + (level / 4));
}
function getFinishNum(level) {
return(50);
}
function clearLevel(restTime) {
levelClearSoundOn();
resetKongBox();
clearLevel_mc.bonus = Math.round((restTime * Level) * 0.2);
clearLevel_mc.play();
clearLevel_mc.onEnterFrame = function () {
if (this.end) {
this.end = false;
blockControll_c.addScore(this.bonus);
upLevel();
}
if (this._totalframes == this._currentframe) {
this.stop();
if (!help_mc.openBool) {
this.gotoAndStop(1);
this.onEnterFrame = null;
startLevel();
}
}
};
}
function startLevel() {
levelStartSoundOn();
nowLevel_mc.play();
nowLevel_mc.onEnterFrame = function () {
if (this._totalframes == this._currentframe) {
this.onEnterFrame = null;
blockControll_c.start(getDtime(Level), getFinishNum(Level));
}
};
}
function upLevel() {
kongCount = 0;
Level++;
numClip_1.setNumber(Level);
numClip_2.setNumber(Level);
blockControll_c.reset();
}
function helpClose() {
Mouse.addListener(blockControll_c);
}
function helpOpen() {
_SB.shook.start(0, 1);
Mouse.removeListener(blockControll_c);
}
function levelStartSoundOn() {
_SB.fadeIn("loop1", 30, 60, true);
_SB.shook.start(0, 1);
_SB.shook.onSoundComplete = function () {
this.onSoundComplete = null;
_SB.levelstart.start(0, 1);
};
}
function levelClearSoundOn() {
_SB.loop1.setVolume(0);
_SB.loop1.stop();
_SB.shook.start(0, 1);
_SB.levelclear.start(0, 1);
_SB.levelclear.onSoundComplete = function () {
this.onSoundComplete = null;
_SB.baby.start(0, 1);
};
}
stop();
_global._game = this;
var clearLevel_mc = _r.clearLevel_mc;
var nowLevel_mc = _r.nowLevel_mc;
var gameover_mc = _r.gameover_mc;
var score_mc = _r.score_mc;
var kongBox_mc = _r.kongBox_mc;
var help_mc = _r.help_mc;
var Level = 1;
var numClip_1 = new ViewNumMC(_r.nowLevel_mc.pan_mc.numPos_mc, "att_levelNum", "center", 30);
var numClip_2 = new ViewNumMC(_r.numPos_mc, "att_levelNum", "center", 30);
numClip_1.setNumber(Level);
numClip_2.setNumber(Level);
levelStartSoundOn();
nowLevel_mc.play();
trace("nowLevel_mc= " + nowLevel_mc);
var blockControll_c = new BlockControll(6, 6, 50, 50, 8, this);
blockControll_c.setWatch(_r.timmer_mc);
blockControll_c.setBezierControll(ct1, ct2, ac2);
blockControll_c.start(getDtime(Level), getFinishNum(Level));
Mouse.addListener(blockControll_c);
var kongCount = 0;