Frame 1
stop();
_quality = "BEST";
_global._r = this;
Frame 5
_global._SB = new game.sound.SoundBox(this.createEmptyMovieClip("soundbox_mc", 10));
_SB.attachAllSound("sexdown", "sexup", "sexcrash", "down", "up", "stone:50", "bombS:50", "crash:50", "crash2:50", "levelclear2", "levelclear", "gameoverS", "levelblock:50", "loop1:30", "loop2:50", "elecboom", "dropshoes", "dropshoes2", "btn1", "btn2", "win1", "gameover", "levelstart");
Symbol 9 MovieClip Frame 1
this.onEnterFrame = function () {
var _local3 = _r.getBytesLoaded();
var _local2 = _r.getBytesTotal();
var _local1 = (_local3 / _local2) * 100;
per_txt.text = Math.round(_local1);
if (_local1 == 100) {
_r.gotoAndStop("ready");
} else {
bar_mc._xscale = _local1;
}
};
Symbol 406 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 407 MovieClip [__Packages.UpDownBlock] Frame 0
class UpDownBlock
{
var _SB, stage_mc, attachID_obj, block_obj, char_obj, blockBox_c, levelPointBlock_mc, addBlockLineNum, blockBox_mc, boomBox_mc, char_mc, curArrPos, interval;
function UpDownBlock (stage_mc, attachID_obj) {
_SB = _global._SB;
this.stage_mc = stage_mc;
this.attachID_obj = attachID_obj;
block_obj = {w:stage_obj.w / stage_obj.Vline, h:stage_obj.h / stage_obj.Hline, face:6};
char_obj = {x:stage_obj.Vline / 2, y:stage_obj.Hline, dep:50};
blockBox_c = new BlockArr(stage_obj.Vline, stage_obj.Hline, block_obj.w, block_obj.h);
}
function upLevel() {
levelPointBlock_mc.removeMovieClip();
blockBox_c.resetBlockArr();
setPause(true);
curLevel++;
countDelBlock = 0;
addBlockLineNum = 0;
block_obj.face = ((curLevel > 10) ? (face_arr[face_arr.length - 1]) : (face_arr[curLevel]));
trace("block_obj.face = " + block_obj.face);
initBlockBox();
initCharacter();
initBoomBoxView();
setLineBlockTime();
return(curLevel);
}
function stageUplevel() {
function viewUplevel() {
owner.stage_mc.upLevel();
clearInterval(delay);
}
_SB.levelclear2.start(0, 1);
var owner = this;
var delay = setInterval(viewUplevel, 1000);
}
function transLevel() {
_SB.loop1.stop();
_SB.loop2.stop();
_SB.levelclear.start(0, 1);
readyLineBlock = false;
var LowestHline = blockBox_c.getLowestHline();
levelPointBlock_mc = stage_mc.createEmptyMovieClip("levelPointBlock_mc", blockBox_obj.dep - 1);
var levelPointView_mc = levelPointBlock_mc.attachMovie(attachID_obj.levelPointViewID, attachID_obj.levelPointViewID, 1000, {_x:stage_obj.w / 2, _y:stage_obj.h});
var owner = this;
var j = stage_obj.Hline;
var delay = 0;
levelPointBlock_mc.count = 0;
levelPointBlock_mc.onEnterFrame = function () {
if ((delay % 5) == 0) {
owner._SB.levelblock.start(0, 1);
this.count++;
var _local2 = this.count * 5;
owner.score = owner.score + (_local2 * 100);
owner.viewScore();
if (_local2 < 10) {
levelPointView_mc.txt100.gotoAndStop(_local2 + 1);
} else {
levelPointView_mc.txt1000.gotoAndStop(Math.floor(_local2 / 10) + 1);
levelPointView_mc.txt100.gotoAndStop((_local2 % 10) + 1);
}
j = j - 1;
var _local3 = this.attachMovie(owner.attachID_obj.levelPointBlockID, owner.attachID_obj.levelPointBlockID + j, this.count, owner.blockBox_c.getPos(0, j));
_local3.j = j;
if (j == (LowestHline + 1)) {
this.onEnterFrame = null;
owner.stageUplevel();
}
}
delay++;
};
}
function initBlockBox() {
initBlockBoxView();
setRandomBlock(initLine);
setRandomPang();
setRandomStone();
}
function initBlockBoxView() {
stage_mc.BlockBox_mc.removeMovieClip();
blockBox_mc = stage_mc.createEmptyMovieClip("BlockBox_mc", blockBox_obj.dep);
blockBox_mc._x = blockBox_obj.x;
blockBox_mc._y = blockBox_obj.y;
}
function initBoomBoxView() {
stage_mc.BoomBox_mc.removeMovieClip();
boomBox_mc = stage_mc.createEmptyMovieClip("BoomBox_mc", blockBox_obj.dep + 1);
boomBox_mc._x = blockBox_obj.x;
boomBox_mc._y = blockBox_obj.y;
}
function setRandomPang(isLine) {
var _local5 = random(stage_obj.Vline);
if (isLine) {
var _local4 = 0;
} else {
var _local4 = random(initLine);
}
if (blockBox_c.getBlockObj().face != stoneFace) {
var _local3 = blockBox_c.getBlockMc(_local5, _local4);
var _local2 = pangFace;
_local3.mc.gotoAndStop(_local2);
blockBox_c.regBlock(_local5, _local4, _local2, _local3, true);
} else {
setRandomPang();
}
}
function setRandomStone(isLine) {
var _local5 = random(stage_obj.Vline);
if (isLine) {
var _local4 = 0;
} else {
var _local4 = random(initLine);
}
if (blockBox_c.getBlockObj().face != pangFace) {
var _local3 = blockBox_c.getBlockMc(_local5, _local4);
var _local2 = stoneFace;
_local3.mc.gotoAndStop(_local2);
blockBox_c.regBlock(_local5, _local4, _local2, _local3, true);
} else {
setRandomPang();
}
}
function setRandomBlock(initLine) {
var _local5 = 0;
while (_local5 < stage_obj.Vline) {
var _local3 = 0;
while (_local3 < initLine) {
var _local6 = blockBox_mc.getNextHighestDepth();
var _local2 = blockBox_mc.attachMovie(attachID_obj.blockID, attachID_obj.blockID + _local6, _local6, blockBox_c.getPos(_local5, _local3));
_local2._width = block_obj.w;
_local2._height = block_obj.h;
var _local4 = random(block_obj.face) + 1;
_local2.mc.gotoAndStop(_local4);
blockBox_c.regBlock(_local5, _local3, _local4, _local2, true);
_local3++;
}
_local5++;
}
}
function addBlockLineItem() {
var _local3;
var _local2;
if (curLevel < 4) {
_local3 = 2;
_local2 = 4;
} else if (curLevel < 7) {
_local3 = 2;
_local2 = 3;
} else if (curLevel < 10) {
_local3 = 3;
_local2 = 2;
} else {
_local3 = 2;
_local2 = 1;
}
if ((addBlockLineNum % _local2) == 0) {
setRandomStone(true);
}
if ((addBlockLineNum % _local3) == 1) {
setRandomPang(true);
}
}
function addBlockLine() {
setPause(true);
var _local12 = -1;
var _local3 = 0;
while (_local3 < stage_obj.Vline) {
var _local4 = blockBox_mc.getNextHighestDepth();
var _local2 = blockBox_mc.attachMovie(attachID_obj.blockID, attachID_obj.blockID + _local4, _local4, blockBox_c.getPos(_local3, _local12));
_local2._width = block_obj.w;
_local2._height = block_obj.h;
var _local8 = random(block_obj.face) + 1;
_local2.mc.gotoAndStop(_local8);
var _local5 = {x:_local3, y:0, face:_local8, mc:_local2, tog:true};
blockBox_c.addLineBlock(_local5);
_local3++;
}
addBlockLineItem();
var _local6 = block_obj.h;
for (var _local13 in blockBox_mc) {
blockBox_mc[_local13]._y = blockBox_mc[_local13]._y + _local6;
}
for (var _local13 in onCharArr) {
onCharArr[_local13].mc._y = onCharArr[_local13].mc._y - _local6;
}
addBlockLineNum++;
setPause(false);
chkGameover();
}
function initCharacter() {
char_mc = stage_mc.attachMovie(attachID_obj.charID, attachID_obj.charID, char_obj.dep, blockBox_c.getPos(char_obj.x, char_obj.y));
char_mc._x = char_mc._x + (block_obj.w / 2);
char_mc.beam_mc._height = stage_obj.h - blockBox_c.getBeamY(char_obj.x)._y;
char_mc._visible = true;
curArrPos = {x:char_obj.x, y:char_obj.y};
}
function setCharPos() {
var _local2 = blockBox_c.getPos(curArrPos.x, char_obj.y);
char_mc._x = _local2._x + (block_obj.w / 2);
char_mc._y = _local2._y;
char_mc.beam_mc._height = stage_obj.h - blockBox_c.getBeamY(curArrPos.x)._y;
for (var _local3 in onCharArr) {
onCharArr[_local3].mc._x = _local2._x;
}
}
function downBlock() {
var owner = this;
var count = 0;
onCharArr = blockBox_c.downBlock(curArrPos.x);
if (onCharArr.length != 0) {
if (_global.sex) {
_SB.sexdown.start(0, 1);
} else {
_SB.down.start(0, 1);
}
char_mc.chr_mc.gotoAndPlay("down");
for (var _local4 in onCharArr) {
var _local3 = new mx.transitions.Tween(onCharArr[_local4].mc, "_y", mx.transitions.easing.Regular.easeIn, onCharArr[_local4].mc._y, onCharArr[_local4].mc.ty, 1);
onCharArr[_local4].mc.gotoAndPlay("down");
if (onCharArr[_local4].face == pangFace) {
onCharArr[_local4].mc.mc.mc.gotoAndStop("ready");
}
_local3.onMotionFinished = function () {
count++;
if (count == owner.onCharArr.length) {
owner.setPause(false);
}
};
}
} else {
setPause(false);
}
}
function upBlock() {
onCharArr = blockBox_c.upBlock(curArrPos.x);
if (onCharArr.length != 0) {
for (var _local3 in onCharArr) {
onCharArr[_local3].mc._y = onCharArr[_local3].mc.ty;
}
char_mc.chr_mc.gotoAndPlay("up");
}
var _local2 = blockBox_c.reactBlock(curArrPos.x);
for (var _local3 in _local2) {
_local2[_local3].mc.play();
}
onCharArr = [];
delBlock();
}
function delBlock() {
var sameBlockArr = blockBox_c.chkDelBlock();
if (sameBlockArr[0].face == pangFace) {
trace("\uD3ED\uD0C4\uD130\uC84C\uB124");
_SB.bombS.start(0, 1);
var _local5 = true;
}
if (_global.sex) {
_SB.sexup.start(0, 1);
} else {
_SB.up.start(0, 1);
}
var count = 0;
var owner = this;
if (sameBlockArr.length != 0) {
if (!_local5) {
if (_global.sex) {
_SB.sexcrash.start(0, 1);
} else {
_SB.crash.start(0, 1);
}
}
for (var _local6 in sameBlockArr) {
if (_local5) {
var _local3 = boomBox_mc.attachMovie(attachID_obj.bombID, attachID_obj.bombID + countDelBlock, countDelBlock + 1);
_local3._x = sameBlockArr[_local6].mc._x;
_local3._y = sameBlockArr[_local6].mc._y;
} else {
sameBlockArr[_local6].mc.gotoAndPlay("boom");
}
countDelBlock++;
var _local4 = new mx.transitions.Tween(sameBlockArr[_local6].mc, "a", mx.transitions.easing.Regular.easeIn, 100, 0, 10);
_local4.onMotionFinished = function () {
this.obj.removeMovieClip();
count++;
if (count == sameBlockArr.length) {
owner.upAllBlock();
}
};
sameBlockArr[_local6].mc = undefined;
sameBlockArr[_local6].tog = false;
sameBlockArr[_local6].face = 0;
}
comboNum = 1;
trace((("---\uC810\uC218--- " + sameBlockArr.length) + " * ") + "100\uC810");
viewPoint(comboNum, sameBlockArr.length);
} else {
setPause(false);
}
}
function upAllBlockReact(reactChkArr) {
for (var _local4 in reactChkArr) {
if (reactChkArr[_local4]) {
var _local2 = blockBox_c.reactBlock(_local4);
if (_local2.length > 0) {
for (var _local4 in _local2) {
_local2[_local4].mc.play();
}
}
}
}
}
function upAllBlock() {
var owner = this;
var count = 0;
clearInterval(interval);
upAllBlockArr = blockBox_c.upAllBlock();
var reactChkArr = [];
if (upAllBlockArr.length > 0) {
_SB.up.start(0, 1);
for (var _local3 in upAllBlockArr) {
reactChkArr[upAllBlockArr[_local3].x] = true;
var _local2 = new mx.transitions.Tween(upAllBlockArr[_local3].mc, "_y", mx.transitions.easing.Regular.easeIn, upAllBlockArr[_local3].mc._y, upAllBlockArr[_local3].mc.ty, 1);
_local2.onMotionFinished = function () {
count++;
if (count == owner.upAllBlockArr.length) {
owner.upAllBlockReact(reactChkArr);
owner.reChkDelBlock();
}
};
}
} else {
setPause(false);
}
}
function reChkDelBlock() {
var owner = this;
var count = 0;
var _local3 = [];
var _local6 = "";
for (var _local7 in upAllBlockArr) {
if (upAllBlockArr[_local7].face != _local6) {
_local6 = upAllBlockArr[_local7].face;
var _local5 = blockBox_c.reChkDelBlock(upAllBlockArr[_local7]);
if (_local5.length != 0) {
_local3.push(_local5);
}
}
}
if (_local3.length != 0) {
if (_global.sex) {
_SB.sexcrash.start(0, 1);
} else {
_SB.crash.start(0, 1);
}
var _local8 = 0;
for (var _local9 in _local3) {
for (var _local7 in _local3[_local9]) {
_local3[_local9][_local7].mc.gotoAndPlay("boom");
countDelBlock++;
var _local4 = new mx.transitions.Tween(_local3[_local9][_local7].mc, "_alpha", mx.transitions.easing.Regular.easeIn, 100, 100, 10);
_local4.onMotionFinished = function () {
this.obj.removeMovieClip();
count++;
if (count == 1) {
owner.upAllBlock();
}
};
_local3[_local9][_local7].mc = undefined;
_local3[_local9][_local7].tog = false;
_local3[_local9][_local7].face = 0;
}
_local8 = _local8 + _local3[_local9].length;
}
comboNum++;
trace(((((comboNum + "\uB2E8\uCF64\uBCF4 ") + _local8) + " * ") + (comboNum * 100)) + "\uC810");
viewPoint(comboNum, _local8);
} else {
setPause(false);
}
}
function chkLevelUp() {
var _local2 = ((curLevel > 10) ? (levelup_arr[levelup_arr.length - 1]) : (levelup_arr[curLevel]));
return(countDelBlock > _local2);
}
function viewPoint(comboNum, sum) {
var _local2 = boomBox_mc.attachMovie(attachID_obj.pointID, attachID_obj.pointID + comboNum, 1000 - comboNum);
_local2._x = stage_obj.w / 2;
_local2._y = ((stage_obj.h / 2) - 100) + (comboNum * 40);
if (comboNum == 1) {
_local2.mc.gotoAndStop("clear");
} else {
_local2.mc.gotoAndStop("combo");
_local2.mc.comtxt1.gotoAndStop(comboNum + 1);
}
if (sum < 10) {
_local2.mc.txt10._visible = 0;
_local2.mc.txt1.gotoAndStop(sum + 1);
} else {
_local2.mc.txt10.gotoAndStop(Math.floor(sum / 10) + 1);
_local2.mc.txt1.gotoAndStop((sum % 10) + 1);
}
_local2.mc.unittxt100.gotoAndStop(comboNum + 1);
score = score + ((sum * comboNum) * 100);
viewScore();
}
function viewScore() {
trace("score== " + score);
var _local6 = [];
var _local5 = String(score);
var _local7 = Math.floor((_local5.length - 1) / 3);
trace("k= " + _local7);
var _local2 = 0;
while (_local2 < _local7) {
var _local4 = _local5.length - (3 * (_local2 + 1));
var _local3 = _local5.substr(_local4, 3);
_local6.unshift(_local3);
_local2++;
}
var _local8 = _local5.substr(0, _local5.length - (3 * _local7));
trace("head= " + _local8);
_local6.unshift(_local8);
trace("toString =" + _local6.toString());
stage_mc.point_txt.text = _local6.toString();
return(_local6.toString());
}
function onKeyDown() {
if (Key.isDown(32)) {
addBlockLine();
}
}
function onMouseMove() {
var _local2 = stage_mc._xmouse;
var _local3 = stage_mc._ymouse;
if ((((_local2 >= 0) && (_local2 < stage_obj.w)) && (_local3 >= 0)) && (_local3 < stage_obj.h)) {
var _local5 = blockBox_c.getArrPos(_local2, _local3);
if (curArrPos.x != _local5.x) {
if (curArrPos.x < _local5.x) {
var _local4 = curArrPos.x + 1;
} else {
var _local4 = curArrPos.x - 1;
}
if (blockBox_c.getCharMoveBool(_local4)) {
curArrPos.x = _local4;
setCharPos();
updateAfterEvent();
}
}
}
}
function onMouseUp() {
mouseUp = true;
}
function onMouseDown() {
if ((!pause) && (mouseUp)) {
setPause(true);
mouseUp = false;
if (onCharArr.length == 0) {
downBlock();
} else {
upBlock();
}
}
}
function setPause(tog) {
if (!tog) {
setCharPos();
char_mc.beam_mc._visible = 1;
} else {
char_mc.beam_mc._visible = 0;
}
pause = tog;
if (!tog) {
if (readyLineBlock) {
readyLineBlock = false;
addBlockLine();
}
}
if (!tog) {
if (chkLevelUp()) {
delLineBlockTime();
char_mc._visible = false;
pause = true;
transLevel();
}
}
}
function delLineBlockTime() {
stage_mc.timmer_mc.onEnterFrame = null;
stage_mc.timmer_mc.gotoAndStop(1);
}
function setLineBlockTime() {
var _local2 = ((curLevel > 10) ? (lineTime_arr[lineTime_arr.length - 1]) : (lineTime_arr[curLevel]));
trace("LineBlockTime = " + _local2);
var owner = this;
var dt = _local2;
var ct = 0;
stage_mc.timmer_mc.onEnterFrame = function () {
if (!owner.pause) {
var _local2 = Math.round((ct / dt) * 100);
this.gotoAndStop(_local2);
ct++;
if (ct > dt) {
ct = 0;
owner.createLineBlock();
}
}
};
}
function createLineBlock() {
if (pause) {
readyLineBlock = true;
} else {
addBlockLine();
}
}
function chkGameover() {
if (blockBox_c.getGameOverBool(curArrPos.x)) {
trace("\uAC8C\uC784 \uC624\uBC14\uB2E4 \uC4F0\uBC29\uC0C8\uC57C");
setPause(true);
Mouse.removeListener(this);
Key.removeListener(this);
viewGameover();
}
}
function viewGameover() {
_SB.loop1.stop();
_SB.loop2.stop();
_SB.gameoverS.start(0, 1);
var _local2 = stage_mc.attachMovie(attachID_obj.gameoverID, attachID_obj.gameoverID, stage_mc.getNextHighestDepth(), {_x:0, _y:0});
_local2.level = curLevel;
_local2.point = viewScore();
trace("pop_gameover = " + _local2);
}
var pause = true;
var stage_obj = {w:550, h:400, Vline:10, Hline:16};
var blockBox_obj = {x:0, y:0, dep:100};
var initLine = 5;
var deadLine = 30;
var mouseUp = true;
var onCharArr = [];
var upAllBlockArr = [];
var readyLineBlock = false;
var stoneFace = 15;
var pangFace = 10;
var countDelBlock = 0;
var face_arr = [0, 4, 5, 5, 6, 6, 7, 7, 7, 7, 8];
var levelup_arr = [0, 30, 40, 50, 60, 70, 70, 70, 70, 70, 70];
var lineTime_arr = [0, 500, 450, 400, 350, 300, 250, 200, 200, 180, 160];
var curLevel = 0;
var comboNum = 0;
var score = 0;
}
Symbol 408 MovieClip [__Packages.BlockArr] Frame 0
class BlockArr
{
var Vline, Hline, dx, dy, blocks_arr;
function BlockArr (Vline, Hline, dx, dy) {
this.Vline = Vline;
this.Hline = Hline;
this.dx = dx;
this.dy = dy;
createBlockArr();
resetBlockArr();
}
function createBlockArr() {
blocks_arr = [];
var _local2 = 0;
while (_local2 < Vline) {
blocks_arr[_local2] = [];
_local2++;
}
}
function resetBlockArr() {
var _local3 = 0;
while (_local3 < Vline) {
var _local2 = 0;
while (_local2 < Hline) {
blocks_arr[_local3][_local2] = {x:_local3, y:_local2, face:0, mc:undefined, tog:false};
_local2++;
}
_local3++;
}
}
function getBlockMc(i, j) {
return(blocks_arr[i][j].mc);
}
function getBlockObj(i, j) {
return(blocks_arr[i][j]);
}
function getLowestHline() {
var _local3 = Hline - 1;
while (_local3 >= 0) {
var _local2 = 0;
while (_local2 < Vline) {
if (blocks_arr[_local2][_local3].mc != undefined) {
return(_local3);
}
_local2++;
}
_local3--;
}
}
function resetTog() {
var _local3 = 0;
while (_local3 < Vline) {
var _local2 = 0;
while (_local2 < Hline) {
if (blocks_arr[_local3][_local2].mc != undefined) {
blocks_arr[_local3][_local2].tog = true;
} else {
blocks_arr[_local3][_local2].tog = false;
}
_local2++;
}
_local3++;
}
}
function regBlock(i, j, face, mc, tog) {
if (face != null) {
blocks_arr[i][j].face = face;
}
if (mc != null) {
blocks_arr[i][j].mc = mc;
}
if (tog != null) {
blocks_arr[i][j].tog = tog;
}
}
function addLineBlock(obj) {
var _local3 = obj.x;
var _local4 = Hline - 1;
if (downBlockArr.length > 0) {
var _local5 = downBlockArr[downBlockArr.length - 1];
if (_local5.x == _local3) {
_local4 = _local5.y - 1;
}
}
var _local2 = _local4;
while (_local2 > 0) {
blocks_arr[_local3][_local2].face = blocks_arr[_local3][_local2 - 1].face;
blocks_arr[_local3][_local2].mc = blocks_arr[_local3][_local2 - 1].mc;
blocks_arr[_local3][_local2].tog = blocks_arr[_local3][_local2 - 1].tog;
_local2--;
}
blocks_arr[_local3][0] = obj;
}
function getGameOverBool(curVline) {
if (!getCharMoveBool(curVline)) {
return(true);
}
var _local3 = Hline - 1;
var _local2 = 0;
while (_local2 < Vline) {
if (blocks_arr[_local2][_local3].mc != undefined) {
return(true);
}
_local2++;
}
return(false);
}
function getCharMoveBool(chkVline) {
var _local4 = chkVline;
var _local2 = 0;
while (_local2 < Hline) {
if (blocks_arr[_local4][_local2].mc == undefined) {
var _local3 = _local2;
break;
}
_local2++;
}
var _local5 = Hline - 1;
if (downBlockArr.length > 0) {
var _local6 = downBlockArr[downBlockArr.length - 1];
_local5 = _local6.y;
}
return(_local5 > _local3);
}
function getBeamY(curVline) {
var _local3 = curVline;
var _local4;
var _local2 = 0;
while (_local2 < Hline) {
if (blocks_arr[_local3][_local2].mc == undefined) {
_local4 = getPos(_local3, _local2);
break;
}
_local2++;
}
return(_local4);
}
function getPos(x, y) {
var _local2 = {_x:dx * x, _y:dy * y};
return(_local2);
}
function getArrPos(x, y) {
var _local2 = {x:Math.floor(x / dx), y:Math.floor(y / dy)};
return(_local2);
}
function reactBlock(curVline) {
var _local4 = [];
var _local5 = curVline;
var _local2 = 0;
while (_local2 < Hline) {
var _local3 = blocks_arr[_local5][_local2];
if (_local3.mc != undefined) {
_local4.push(_local3);
}
_local2++;
}
return(_local4);
}
function downBlock(curVline) {
var _local3 = [];
var _local7 = curVline;
var _local6 = Hline;
while (_local6 >= 0) {
var _local5 = blocks_arr[_local7][_local6];
if (_local5.mc != undefined) {
if (_local3.length == 0) {
if (_local5.face == stoneFace) {
_local5.mc.gotoAndPlay("down");
_global._SB.stone.start(0, 1);
break;
}
_local3.push(_local5);
} else if (_local3[0].face == _local5.face) {
_local3.push(_local5);
} else {
_local6 = -1;
}
}
_local6--;
}
var _local4 = 0;
while (_local4 < _local3.length) {
_local7 = curVline;
_local6 = (Hline - 2) - _local4;
blocks_arr[_local7][_local6].face = _local3[_local4].face;
blocks_arr[_local7][_local6].mc = _local3[_local4].mc;
blocks_arr[_local7][_local6].mc.ty = (_local6 * dy) - 8;
downBlockArr.push(blocks_arr[_local7][_local6]);
blocks_arr[_local3[_local4].x][_local3[_local4].y].face = 0;
blocks_arr[_local3[_local4].x][_local3[_local4].y].mc = undefined;
_local4++;
}
return(downBlockArr);
}
function upBlock(curVline) {
var _local4 = curVline;
upBlockArr = [];
var _local6;
var _local3 = 0;
while (_local3 < Hline) {
var _local5 = blocks_arr[_local4][_local3].mc;
if (_local5 == undefined) {
_local6 = _local3;
break;
}
_local3++;
}
var _local2 = downBlockArr.length - 1;
while (_local2 >= 0) {
_local4 = curVline;
_local3 = _local6++;
blocks_arr[_local4][_local3].face = downBlockArr[_local2].face;
blocks_arr[_local4][_local3].mc = downBlockArr[_local2].mc;
blocks_arr[_local4][_local3].mc.ty = _local3 * dy;
upBlockArr.push(blocks_arr[_local4][_local3]);
blocks_arr[downBlockArr[_local2].x][downBlockArr[_local2].y].face = 0;
blocks_arr[downBlockArr[_local2].x][downBlockArr[_local2].y].mc = undefined;
_local2--;
}
downBlockArr = [];
return(upBlockArr);
}
function chkDelBlock() {
resetTog();
sameBlockArr = [];
var _local2 = upBlockArr[upBlockArr.length - 1];
_local2.tog = false;
sameBlockArr.push(_local2);
if (_local2.face == pangFace) {
chkDelPang(_local2.x, _local2.y);
} else {
chkChain(_local2.x, _local2.y, _local2.face);
if (sameBlockArr.length < 4) {
sameBlockArr = [];
}
}
return(sameBlockArr);
}
function chkDelPang(x, y) {
var _local4 = x;
var _local2 = y - 1;
while (_local2 >= 0) {
var _local3 = blocks_arr[_local4][_local2];
sameBlockArr.push(_local3);
_local2--;
}
}
function upAllBlock() {
upAllBlockArr = [];
var _local6 = 0;
while (_local6 < Vline) {
var _local4 = 0;
while (_local4 < Hline) {
var _local5 = blocks_arr[_local6][_local4];
if (_local5.face != 0) {
var _local2 = blocks_arr[_local6][_local4 - 1];
if (_local2.face == 0) {
var _local3 = _local4 - 1;
while (_local3 >= 0) {
var _local7 = blocks_arr[_local6][_local3 - 1];
if (_local7.face != 0) {
_local2 = blocks_arr[_local6][_local3];
break;
}
_local3--;
}
_local2.face = _local5.face;
_local2.mc = _local5.mc;
_local2.mc.ty = _local2.y * dy;
upAllBlockArr.push(_local2);
_local5.face = 0;
_local5.mc = undefined;
}
}
_local4++;
}
_local6++;
}
return(upAllBlockArr);
}
function chkChainSub(baseObj, chkObj) {
if (chkObj.tog && (chkObj.face == baseObj.face)) {
chkObj.tog = false;
sameBlockArr.push(chkObj);
chkChain(chkObj.x, chkObj.y, chkObj.face);
}
return(undefined);
}
function chkChain(x, y, face) {
var _local2 = blocks_arr[x][y];
var _local5 = blocks_arr[x - 1][y];
chkChainSub(_local2, _local5);
_local5 = blocks_arr[x + 1][y];
chkChainSub(_local2, _local5);
_local5 = blocks_arr[x][y + 1];
chkChainSub(_local2, _local5);
_local5 = blocks_arr[x][y - 1];
chkChainSub(_local2, _local5);
return(undefined);
}
function reChkDelBlock(obj) {
resetTog();
sameBlockArr = [];
var _local2 = obj;
_local2.tog = false;
sameBlockArr.push(_local2);
chkChain(_local2.x, _local2.y, _local2.face);
if (sameBlockArr.length < 4) {
sameBlockArr = [];
}
return(sameBlockArr);
}
function traceArr() {
var _local3 = 0;
while (_local3 < Hline) {
var _local4 = [];
var _local2 = 0;
while (_local2 < Vline) {
_local4.push(blocks_arr[_local2][_local3].face);
_local2++;
}
_local3++;
}
}
var downBlockArr = [];
var upBlockArr = [];
var sameBlockArr = [];
var upAllBlockArr = [];
var stoneFace = 15;
var pangFace = 10;
}
Symbol 409 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 410 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 411 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 412 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 12 MovieClip Frame 131
gotoAndPlay (25);
Symbol 14 MovieClip Frame 50
gotoAndPlay (22);
Symbol 26 MovieClip Frame 1
stop();
Symbol 39 MovieClip Frame 1
stop();
Symbol 39 MovieClip Frame 10
gotoAndStop (1);
Symbol 117 MovieClip Frame 31
gotoAndPlay (21);
Symbol 121 MovieClip Frame 1
stop();
Symbol 122 MovieClip [gameover] Frame 22
stop();
restart_b.onRollOver = function () {
this.gotoAndStop(2);
};
restart_b.onRollOut = function () {
this.gotoAndStop(1);
};
restart_b.onPress = function () {
_r.loadMovie(_r._url);
};
level_txt.text = level;
point_txt.text = point;
Symbol 144 MovieClip Frame 1
stop();
Symbol 152 MovieClip [block] Frame 1
stop();
Symbol 152 MovieClip [block] Frame 6
gotoAndStop (1);
Symbol 152 MovieClip [block] Frame 16
gotoAndStop (1);
Symbol 152 MovieClip [block] Frame 35
stop();
Symbol 155 MovieClip [levelPointBlock] Frame 9
stop();
Symbol 176 MovieClip Frame 1
stop();
Symbol 202 MovieClip Frame 1
stop();
Symbol 204 MovieClip [point] Frame 45
this.removeMovieClip();
Symbol 206 MovieClip [bomb] Frame 16
this.removeMovieClip();
Symbol 223 MovieClip Frame 1
stop();
Symbol 226 MovieClip [levelPointView] Frame 1
plus_mc._visible = 0;
txt1000._visible = 0;
txt100._visible = 0;
txt10._visible = 0;
txt1._visible = 0;
Symbol 226 MovieClip [levelPointView] Frame 10
stop();
plus_mc._visible = 1;
txt1000._visible = 1;
txt100._visible = 1;
txt10._visible = 1;
txt1._visible = 1;
Symbol 247 MovieClip Frame 1
stop();
Symbol 325 MovieClip Frame 43
gotoAndPlay (12);
Symbol 331 MovieClip Frame 10
stop();
this.onPress = function () {
_r.gotoAndStop("start");
};
Symbol 332 MovieClip Frame 20
stop();
sex_b.useHandCursor = false;
sex_b.onPress = function () {
_global.sex = true;
};
Symbol 396 MovieClip Frame 1
stop();
Symbol 402 MovieClip Frame 1
stop();
Symbol 405 MovieClip Frame 2
stop();
_global._game = this;
var attachID_obj = {};
attachID_obj.blockID = "block";
attachID_obj.charID = "character";
attachID_obj.boomID = "boom";
attachID_obj.bombID = "bomb";
attachID_obj.levelPointBlockID = "levelPointBlock";
attachID_obj.levelPointViewID = "levelPointView";
attachID_obj.pointID = "point";
attachID_obj.gameoverID = "gameover";
var game_c = new UpDownBlock(this, attachID_obj);
Mouse.addListener(game_c);
Key.addListener(game_c);
upLevel = function () {
level_mc.swapDepths(100000);
level_mc.play();
level_mc.onEnterFrame = function () {
var _local2 = this._currentframe;
if (_local2 == 21) {
curLevel = game_c.upLevel();
this.level_txt.text = curLevel;
level_txt.text = curLevel;
}
if (_local2 == this._totalframes) {
if ((curLevel % 2) == 0) {
_SB.loop1.start(0, 999);
} else {
_SB.loop2.start(0, 999);
}
this.onEnterFrame = null;
game_c.pause = false;
}
};
};
upLevel();