Instance of Symbol 38 MovieClip [Game24LogoMc] in Frame 1
//component parameters
onClipEvent (initialize) {
gotoNext = "main";
}
Frame 2
function DispatchGameData() {
var _local1 = _root;
_local1.score = _local1.scoreTxt + 969696;
this.loadVariables((_local1.dir + "game_record.") + _local1.scripttype, "POST");
}
function playSound(num) {
if (soundOn) {
switch (num) {
case 0 :
bgmSound = new Sound();
bgmSound.attachSound("bgm.mp3");
bgmSound.setVolume(100);
bgmSound.start(0, 9999);
break;
case 1 :
startSound = new Sound();
startSound.attachSound("start.wav");
startSound.setVolume(100);
startSound.start();
break;
case 2 :
stepSound = new Sound();
stepSound.attachSound("step.wav");
stepSound.setVolume(100);
stepSound.start();
break;
case 3 :
move1Sound = new Sound();
move1Sound.attachSound("move1.mp3");
move1Sound.setVolume(100);
move1Sound.start();
break;
case 4 :
goodSound = new Sound();
goodSound.attachSound("good.mp3");
goodSound.setVolume(100);
goodSound.start();
}
} else {
stopAllSounds();
}
}
this.stop();
fscommand ("allowscale", "false");
fscommand ("showmenu", "true");
MovieClip.prototype.getProtocol = function (url) {
var _local2 = url;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2.charAt(_local1) == ":") {
return(_local2.substring(0, _local1));
}
_local1++;
}
return(undefined);
};
MovieClip.prototype.getFlashURL = function (url) {
var _local2 = url;
var _local1 = _local2.length;
while (_local1 > 0) {
if ((_local2.charAt(_local1) == "/") || (_local2.charAt(_local1) == "\\")) {
return(_local2.substring(0, _local1 + 1));
}
_local1--;
}
return(undefined);
};
var flashURL = _root.getFlashURL(_root._url);
var score = 0;
game = {};
game.START_XPOS = _root.backImgMc._x + 12;
game.START_YPOS = _root.backImgMc._y + 12;
game.MAX_XBOX = 18;
game.MAX_YBOX = 14;
game.MAX_TILE = 9;
game.MAX_HISTORY = 1000;
game.TILE_XSIZE = 25;
game.TILE_YSIZE = 25;
game.TOTAL_LEVEL = 103;
game.xpos = 0;
game.ypos = 0;
game.MAP_CODE = " 01234567, :o#@XHB";
game.MAP_DATA = [" , , , ###, #o#, #:####, ###H:Ho#, #o:H@###, ####H#, #o#, ###", " , , #####, #@::#, #:HH# ###, #:H:# #o#, ###:###o#, ##::::o#, #:::#::#, #:::####, #####", " , , , #######, #:::::###, ##H###:::#, #:@:H::H:#, #:oo#:H:##, ##oo#:::#, ########", " , , , ####, ##::#, #@H:#, ##H:##, ##:H:#, #oH::#, #ooBo#, ######", " , , #####, #@:###, #:H::#, ###:#:##, #o#:#::#, #oH::#:#, #o:::H:#, ########", " , #######, ####:::::#, #:::o###:#, #:#:#::::##, #:#:H:H#o:#, #:#::B::#:#, #:o#H:H:#:#, ##::::#:#:###, #:###o::::@#, #:::::##:::#, ############", " , , , , #######, ##::#:@#, #:::#::#, #H:H:H:#, #:H##::#, ###:H:#:##, #ooooo::#, #########", " , , , ######, ###::::#, ##o:H##:##, #ooH:H::@#, #oo:H:H:##, ######::#, ####", " , , #########, #::##:::#, #:::H:::#, #H:###:H#, #:#ooo#:#, ##:#ooo#:##, #:H::H::H:#, #:::::#:@:#, ###########", " , , , , ######, #::::#, ###HHH:#, #@:Hoo:#, #:Hooo##, ####::#, ####", " , , , , #### #####, ##::# #:::#, #:H:####H::#, #::Hoooo:H:#, ##::::#:@:##, ##########", " , , , #####, ###::@#, #::Ho:##, #::oHo:#, ###:BH:#, #:::##, #####", " , , , ####, #oo#, ##:o##, #::Ho#, ##:H::##, #::#HH:#, #::@:::#, ########", " , , , ########, #::#:::#, #:HooH:#, #@HoB:##, #:HooH:#, #::#:::#, ########", " , , , ######, ##::::##, #:H:HH:#, #oooooo#, #:HH:H:#, ###:@###, ####, , , , ", " , , ######, #::::###, #:H::::#, ###:H:##:#, #ooo:H:::#, #oooH#H:##, ####:#:H:#, #::@::#, #######, , , ", " , , , ######, #::::#, #:HHH##, #::#oo###, ##::ooH:#, #:@::::#, ########, , , , ", " , , , ########, #:::#o:#, ##::Hooo#, #::H:#Bo#, ##:##H#:##, #:::H::H:#, #:::#::::#, #######@:#, ####, , ", " , , , #######, #oooo:#, ###oooH###, #::H#H:H:#, #:HH::#H:#, #::::#:::#, ####:@:###, #####, , , ", " , , , #######, #ooHoo#, #oo#oo#, #:HHH:#, #::H::#, #:HHH:#, #::#@:#, #######, , , ", " , , , ######, #:ooo#, ####oooo#, #::###H:###, #:H:H::HH:#, #@:H:H::::#, #:::###:::#, ##### #####, , , ", " , , ########, #::::::#, #:#HH::#, #:ooo#:#, ##oooH:##, #:##:H:#, #H::H::#, #::#::@#, ########, , , ", " , , , #####, ###:::####, #:::H:H::#, #:H:::H:@#, ###HH#####, #::oo#, #oooo#, ######, , , ", " , , ###### #####, #::::### #::o#, #::H:H:# #ooo#, #:#::H:###::o#, #::HHH:::H:@o#, ###::H::H#::o#, #::H#H:#ooo#, ##:::::#::o#, ###########", " , , ######, #####o:::#, #::#oo##:#, #::Hoo:::#, #::#:o#:##, ###:##H#::#, #:H::::HH:#, #:#H#::#::#, #@::#######, #####", " , #########, #:::##::####, #:H::::::::#, ##H###:##::#, #::##:B:#:##, #:Hoooooo:#, ##:###:o:#:#, #:::::H###H#, #:::#::::H@#, #####H#:####, #:::#, #####", " , #########, #:::::::#, #:#:#:#:#, #::H:H#:#, #######:::H:::#, #oo#::##:H:H#:#, #oo:::##:H:H::#, #oo#::##:######, #oo#:#:H:H:#, #oo:::::H::#, #::###:@:###, #### #####", " ####,#####::#,#::H:H:# #######,#:::H::# #BoBoB#,##:H:H:###oBoBo#, #H:H::#::BoBoB#, #@H:H::::oBoB##, #H:H::#::BoBoB#,##:H:H:###oBoBo#,#:::H::# #BoBoB#,#::H:H:# #######,#####::#, ####, ", " , , , ########, #oooooo#, #::H:#:##, #:H:#:H:#, ##H:H:H:#, #::@:::#, ########, , , , ", " , , , ##########, ###:::o::::#, #:::##H##::#, #:@Ho:o:oH##, ##:H##H##:#, #::::o:::#, ##########, , , , ", " , , ######, ####o::@#, #::HHH::#, #o##o##o#, #:::H:::#, #::Ho#:##, ####:::#, #####, , , , ", " , , , ######, #o:oo#, #o:Ho#, ###::H##, #:H::H:#, #:#H##:#, #:::@::#, ########, , , ", " , ######, ###::::###, #:::#H:::###, #:::H:::HH:#, #:HH:#H::::#, ##:::H:::H:#, ######:#H#####, #oo@:#H::#, #o#oo::H##, #ooooH#:#, #oooo:::#, #########, ", "###############,#::::::#::::::#,#:H:#H:#:H##H:#,#:#::H:#::::::#,#:::##H#H##HH:#,#:#:#:ooo:#:::#,#:H::o:#:oH:#:#,#:H#@Hooo#:#::#,#::::o:#:o::H:#,#:##oH###Ho:#:#,#:#:Hooooo:##:#,#:::::::::::::#,###############, ", " , , #########, #:::##::#, #:#:H:H:#, #::Bo#::#, ##:#o@o##, ##H###B###, #::::::::#, #:::##:#:#, ######:::#, #####, , ", "########,#::::::#,#:HH:::###,#::H:HHH:#####,##:##:ooo::::##, #:#@#ooo###H:#, #:#:Hooo:::::#,##:#:HoooH:#:##,#::#####:###:#,#::::::H:::H:#,###########::#, ####, , ", " , , , #####, #:@:#, #HHH#, ####:::#, #:::o#H##, #:HoHo:o#, #::#o#o##, ########, , , ", " ############, #ooo:#:::::#, #oo::#:##::#, #oo:::::#::#, #oo::#:H##:#, #ooo:#H:H::#, ######::HH:#, ##::H:HH::#, #@:HHH::#:#, ##:H:##:::#, #::::::::#, ##########, , ", " , , #########, #:::::::#, #::H:H:H#, ##:#H##:#, #:oo:oo##, ##oo:oo:#, #:##H#:##, #H:H:H::#, #::::::@#, #########, , ", "##### ####,#@::########::#,##:H:::::::H::#, #:#:#::####::#, #::H:::####H##, #H:##:#:H:H:#,##:H::H#:::::#,#:::#::::::#:#,#:::#####H####,#####:::#:::#, #ooo::H:#, #oooo#::#, #oooo####, ######", " , , , #####, #####:::#, #:oo:H#:#, #:#oB:::#, ##:Bo#H:##, #:H::H::#, #:::##:@#, #########, , , ", " , , ##### #######, #:::###::#::#, #:H:::::H:@:#, ##:#H##o##::#, #::oooBo:H:#, #:H#:#o#:#:#, ##::::H::::#, #::########, ####, , , ", " ###, ######@##, #oooo#H:##, #oooo#:H:#, #oooo:H::#, #:ooo#:::#,######:#####:##,#:H:H:::H::#::#,#::::HH:::H:H:#,###:H:H:H::####, ##:::H:H:#, #::######, ####, ", " , #####, ###:::###, ##::@H:H:#, #::##:##:##, #:Ho#oH:::#, #:#o#B#:::#, #:Hooo::###, ###H#:###, #:::#, #####, , , ", " , ####, #::######, #::::#::#, #:HH::::#,#######H#::#::#,#::#o:oo:###H##,#::#o#BoH:::::#,#::#o#oB#:#:::#,#:HHoooo#:#####,#:@H:#:##:#,#:HHH#::::#,#::::######,######", "####,#::###,#:H::###,#:H:H::###,#:H:H:H::###,#:H:H:H::::#,#:H:H::#:::##,#:H::##:HHH:#,#@:####:::::##,##:#:#oHHHHHo#, #:###ooooooo##, #:::oBBBBBBBo#, ####ooooooooo#, ###########", " , , #######, #:@#::#####, #:HH::H:::#, #::#o##H#:#, ##H#ooo:::#, ##:ooo##H##, #::##o##::#, #::H::H:::#, #::#:::#::#, ###########, , ", " , , #####, #:@:#, #:H:#, #HoH#, ###oHo##, ##:oHoHo###, #::HoHoH::#, #::::o::::#, ###########, , , ", " , #############, #::H:H:HoBoo#, #:H:H:H:Booo#, #::H:H:HoBoo#, #:H:H:H:Booo#, #::H:H:HoBoo#, #:H:H:H:Booo#, #::H:H:HoBoo#, #:H:H:H:Booo#, #::H:H:HoBoo#, #@H:H:H:Booo#, #############, ", " #, ##, ###, #:::#, ########:#:#, #:H:H:H:H:::#, ##:#o#o#o#@H#,###ooooooo:::##, ##:#:#:#:#H##, #:H:H:H:H:::#, ########:#:#, #:::#, ###, ##", " , , , #######, #::oH:###, #:oHoH::#, #BHoHo@:#, #:oHoH:##, #::oH::#, ########, , , , ", " , , #####, #:::#,##########:B:###,#::::::::::o:::#,#:HHHHBBBBHooo@#,#::::::::::o:::#,##########:B:###, #:::#, #####, , , ", " , , ####, ######::#####, #@H::::H::H:#, #H###:H:#:#:#, #::#::#:H:::#, #:H#::::#:###, #::H:#H#:::#, #ooooooooo:#, ########:::#, #####, , ", " , #####, #:::#, #H::#, ###::H###, #::H::H:#,###:#:###:#######,#:::#:###:##::oo#,#:H::H::::::@:oo#,#####:####:#::oo#, #::::::######, ########, , ", " , , ###########, #::::#::::#, #:H@HHHHH:#, #:::::::::#, #####:#####, #o::#, #o::#, #ooo#, #o::#, #####, , ", " , #####, #:@:#, #:H:#, ###:o:###, #:::B:::#, #:BBBBB:#, #:::B:::#, ###HBH###, #:o:#, #:B:#, #:o:#, #####, ", " , ##############, #o:::::::::::#, #oH:H:H:H:H::#, #o#########::#, #o#oB:H:ooHB##, #o#:H:H:BoH@#, #o#o::H:ooHH#, #o#########o#, #o::::::::::#, #o#H#H#H#H#H#, #o::::::::::#, #############, ", " , , ############, #oo::#:::::###, #oo::#:H::H::#, #oo::#H####::#, #oo::::@:##::#, #oo::#:#::H:##, ######:##H:H:#, #:H::H:H:H:#, #::::#:::::#, ############, , ", " ####, ########::####, #:::##ooooo::#, #::H::##ooo#:#, ##::H::###:#:#, #:#:H::#::::#, #::#:H::#:::#, #:::#:H::#::#, #::::#:H:#:##, ####::#:H::#, ##::#:H:#, ##@#:::#, #######, ", " , , #### ####, #oo########oo#, #BoBoooooBoBo#, #:H:H:H:H:H:H#, #H:H:H@H:H:H:#, #:H:H:H:H:H:H#, #H:H:H:H:H:H:#, #oBoBoooooBoB#, #oo########oo#, #### ####, , ", " , , #####, ##:::####, #:ooB:H:#, ####:#o#:::#, #::::oBo#@##, #:#H##H##:#, #:::::H:H:#, ##::#:::###, ########, , , ", " , , , ######, #::::#, #:H::####, #:HBooB:#, #:BooBH:#, ####::H:#, #:@::#, ######, , , ", " , , , #####, ####o::##, #:HoHo::#, #@H#:#H:#, #:Ho:o::#, ####H#H:#, #o:o::#, #######, , , ", " , , , , ############, #::::ooo:H:#, #:HHHBBB:H@#, #::::ooo:H:#, ############, , , , , ", " , , , , ##########, ##:::::::#, #:::#H#H:#, #:HH::oHo#, #:@###ooo#, ##########, , , , ", " , , ####, #::#####, ##H:##::#, #::H@H::#, #:::##H:#, ###o##:###, #oooH:H:#, ##oo::::#, ########, , , ", "##### ####,#ooo# #::####,#ooo###::H::#,#oooo##:H::H###,##oooo##:::H::#,###ooo:##:H:H:#,#:##::::#::H::#,#::##:#:###:####,#:H:#:#H::H::::#,#::H:@:H::::H::#,#:::#:H:HH:H:###,#::######::###,#:## ####,###", " , , , #######, #o:o:o#, #:HHH:#, #oH@Ho#, #:HHH:#, #o:o:o#, #######, , , , ", " , ####, #######::#, #:::::H::#, #:::H##@H#, ##H#ooo#:#, #:Hooo::#, #:#o:o#:##, #:::#:#H:#, #H::H::::#, #::#######, ####, , ", " , , #########, #:::#:::#, #:::::::#, #####B###:##, #:::ooo:::#, #:#:#B###H##, #:H::::H:::#, #####@:#:::#, ########, , , ", "#####,#ooo# #####,#ooo###:::#,#oooo:::HH#####,#oooo::#::#:::##,#oo#H####:#H#::#,##:H::#:::::HH:#,#::H#:@:H:HH#::#,#:H:H:H:#:::H:##,#:::#::H:##:::#,######:::######, #####, , ", " ,###############,###o#::::::####,##oo#:H::H:#::#,#ooo#:##:H:#::#,#ooooo::#HH:::#,##ooooH::::#H:#,####:#######::#,#:::H::::::::##,#::H:#::H#:H:##,#:H###:H:#:HH:#,#:::@#::##::::#,###############, ", " , ########, #::#:::#, #######:HHooo#, #::::::::#ooo#, #:######H#ooo#,##:#::::::#ooo#,#::#:#H:H:#####,#:#:H:H:H:#,#:@::H:#::#,#####H:HH:#, #:::::#, #######, ", " , #####, ######:::#, ###::::o:H:#, #:H::#Ho#H##, #::#::@o#::#, ##:####o:::#, #:H::#B####, #:##:#o::#, #:::::o#:#, ###H:::::#, #::#####, ####, ", " , , ####, #####::#####, #::::H:::H:#, #::H#H##:::#, ###:#oBo:###, #:ooo:@#, ##:#H###, #:::#, #####, , , ", " , , , ########, ####::::o:#, #::H:H:Ho:#, #::o####o##, #:HoH:H:@#, #::o::####, #######, , , , ", " , , #####, #:::#, ###HoH#####, #:::o:H:::#, #:##H##:@:#, #:::o:#####, ###:o:#, #:::#, #####, , , ", " , , #####, #:@:######, #:#ooB:::#, #:ooo#:::#, ##H##:H:H:#, #:::#H#####, #:::H:::#, #####:#:#, #:::#, #####, , ", " ######, ###::::##, #:::##::#, ###H##::#:#, ##:::::oo#:#, #::H#H#Bo#:#, #:HH@:#oB#:###, #::HH:#oo#:::#, ##::::#ooH:::#, ###H##o:#:###, #::###::#, ##:::::##, #######, ", " , #######, #::#::#, #::HH:#, ######:H#::#, #ooo###:#::##, #o::#::H:#::#, #o::::H:H:H:#, #o::#::H:#::#, #ooo###:#::##, ######:H:::#, #@:#::#, #######, ", " ######, #::::#,##### ###:##:#,#oo:#####:H::#:#,#oo:::::H:::H#:#,#oo::##:##:::#:#,#oo:##:H:#H:H#:#,#oo:#:::::H::#:#,#oo:#::H:###H::#,#oo:#:H:H::H:###,###:##:#:H::::#, #::::#@##:H:#, #########::##, ####", " , , #, #####, ###:@:###, #::H:H::#, #:BoBoB:#, ##:oH:Ho:##, ###:BoBoB:###,####::H:H::####, ######::#, ## ##, , ", " ##############, #:@:B:B:B:#::##, #H#::B:B::#:::#, #:#:B:B:B:::::#, #:#::B:B::##:##, #:#:B:B:B:##:#, #:#::B:B::##:#, #:#:B:B:B:##:#, #:#::B:B::##:#, #:#:B:o:B:##:##,##:##########::#,#::::::::::::::#,#:::#########::#,##### ####", " , , #############, #::::#::##::#, #HHH:#:HH::H##, #:H::#::oooo:#, #::H::#Ho##o:#, #::#:H#:oooo##, ##H:H::#Ho##o:#, #:H::H:@Hoooo:#, #:::###::######, ##### ####, , ", " #########, #:::::::#, #::H#H#:#, ######::#:H:#, #:::#:H::H::#, ##:H:::::###:#, #:::#H####:::#, #::::H:###:###, #####oo:@#:##, #oooH:HH:#, #ooo#::::#, #ooo######, #####, ", "#### ####,#::#######oo###,#:H:H:H::#oooo#,#:H:::HH:#BBBo#,#:H:H:H::#ooBo#,#::H:H:H:#BoBo#,##:H:H:H:oBoBo##,#::H:H:H:oBoBo@#,#::H:H:H:#BoBo##,#:H:H:H::#ooBo#,#:H:::HH:#BBBo#,#:H:H:H::#oooo#,#::#######oo###,#### ####", " #####,#######:::#,#:::##o:::#,#::H#oo::###,##::ooo#HH:#####, #:Ho#oH:::::::#, #:H###H##:#:H:#, #:::#:::::HH#:#, ##HH#:##H#H:::#, #ooo:H@:H:::###, #ooo#H#:::###, #ooo::#####, #######, ", " , #### ######, #::####::::#, ##B:::B:BB::#, #:H:B::::B#:#, #:o:::###:::#, ######:::#@##, #:B:o:B::BB:#, #:::#:::#:::#, ##B:::B:#H#:#, #::#####:::#, #### #####, , ", " , , , #########, #:::#:::#, #:HHHHH:#, ##:H:H:H:#, #:H::@:::#, #:H:####:##, #::#ooooo:#, ##::ooooo:#, ##########, , ", " , #######, #:::::#, #:H:H:##, #####oo#####,######ooBo::H:#,#::H@Hoooo#HH:#,#:::H:#H###:::#,#####:::::::###, ###::####, #::#, ####, , ", " , , , #####, #:::######, #:H:oo:H:#, ##H:ooHH@#, #::oo:H:#, #########, , , , , ", " , , , #####, #:::######, ###H#o:::::#, #:H:ooo#:H:#, #@:Ho#BH:::#, ####::::####, ######, , , , ", " , #####,#####:::#,#:::H:@:#,#::H:#o#####,##H:##o##::####, #::ooooo:H#::#, #:H##o##::#H:#, #:::#o##:::::#, ###:H:#####:##, #:#H:::::H:#, #::::###:::#, ###### #####, ", " , , #######, #::B::#, #:@oH:#, #:Ho::#, #BoBBB#, #::B::#, #:HBH:#, #::o::#, #######, , , ", " #########, #::::#::#,###:#H::H:####,#::H::##oo#::###,#:#::H:#ooH:H::#,#:HH::H#oo::#::#,##::#::ooo#H:::#, #H:@:#ooo#:H::#, #::::#oooH:::##, #:##H:###:::##, #:::H:::::###, #::########, ####, ", " ##########, ####oooooo::#, #:::ooooo#::#, #::#oooooo:##, ##:####H##H#, #@H::H:H:::###, #:HH::::##:::#, #:#::HH##::#:#, #:::H::#:HH::#, #::H::H:::#H:#, ####:::#:H:H:#, #:::#:::::#, ###########, ", " #########, #:::::::#, #H:HHH::#, #:::#:H:#, #:::H@H:#, ###H:H:#:##, #:::H#H#:#,#####:#::#:::#,#ooo::#:H#:###,#ooooo:::#:#,#ooooo#:H#:#,########:::#, #####, ", " , ##### ######, #:::###::::#, ##:H:H:#H:#H#, #::H:@:H::H:##, #:#::##:#oooo#, #::##:H:#o##o#, ##::H::::oooo#, #:HH:#H#oooo#, #:::#:::#H:##, #####:H::::#, ####::##, ####, ", "####,#::#,#::##########,#::::##:::::#,#oo#::::HH#:#,#oo::##:::H:###,#oo#::##H#:H::#,#oo:::#:@H:H::#,#oo#::#:H:H:::#,#:o:::#:H:H:###,#::#::#:::###,#::#::::###,#########, ", " , #####, #:::::#, #::H##::#, #::#:::H:#,# # #:#::#:#:#, # # #:H:H::H:#, #######:#H#::#, #::H:H::::::#, #@ooH:BBo###, #oooooo#####, ############, , ", " , ########, #::::::#, #::H:::#####, ####:::H:::#, #::##H#:H::#, #::::@#:#:#####, ##:##:H:H:HH:::#, #:::#::#:::#:::#,##:::############,#oooo#,#oooo#,######, ", " , ############, #::::o:#:::#, #:::HB:#:H:#, #:::#o:#:###, #::##o#:::#, ##::##o#:H:##, #:::#:o#H#::#, #:@:#:o:::H:#, #::##:BHH#::#, #:::#:o::::##, #:::########, #####, ", " , ,#########,#:::#:::##########,#::H:H::#:::#oooo#,##:H:H:H:H::#oooo#, #@H:H:H:H:HoBoBo#, #:H:H:H:H:HoBoBo#,##:H:H:H:H::#oooo#,#::H:H::#:::#oooo#,#:::#:::##########,#########, , ", " , ##########, ##::##::::#####, ##:::H::#:H::H:#, #:::H##::HH#:::#, #::::H:::#:::::#, #H####:#####:::#, #:#:ooooooo:@:##,##:::oBoBoBo:#:##,#:::######:###::#,#:#H:::::H::::H:#,#:::#############,#####, "];
game.board = [];
game.undoMove = [];
game.undoData = 0;
game.successLevel = [];
game.successLevelCnt = 0;
game.goalCnt = 0;
_root.scoreTxt = 0;
_root.levelTxt = 1;
_root.goalTxt = 0;
_root.stepTxt = 0;
game.myListener = new Object();
game.setCurrentLevel = function (level) {
var _local1 = this;
var _local3 = 0;
var _local2 = 0;
var map_element = 0;
var map_data = "";
_root.goalTxt = 0;
_root.stepTxt = 0;
_local1.goalCnt = 0;
level--;
map_data = _local1.MAP_DATA[level];
i = 0;
while (i < _local1.MAX_YBOX) {
_local1.board[i] = [];
j = 0;
while (j < _local1.MAX_XBOX) {
_local1.board[i][j] = {};
_local1.board[i][j].num = 0;
j++;
}
i++;
}
i = 0;
for ( ; i < map_data.length ; i++) {
map_element = _local1.MAP_CODE.indexOf(map_data.charAt(i)) % 10;
if ((map_element >= _local1.MAX_TILE) || (_local2 >= _local1.MAX_XBOX)) {
_local2 = 0;
_local3++;
if (_local3 >= MAX_YBOX) {
continue;
}
} else {
_local1.board[_local3][_local2].num = map_element;
if ((_local1.board[_local3][_local2].num == 6) || (_local1.board[_local3][_local2].num == 7)) {
_local1.goalCnt++;
_root.goalTxt++;
}
_local2++;
}
}
};
game.setBoard = function () {
var _local1 = this;
i = 0;
while (i < _local1.MAX_YBOX) {
j = 0;
while (j < _local1.MAX_XBOX) {
var _local2 = attachMovie("tileMc", ("tileMc" add i) add j, (j % _local1.MAX_XBOX) + ((i % _local1.MAX_YBOX) * _local1.MAX_XBOX));
_local1.board[i][j].clip = _local2;
_local1.board[i][j].clip.gotoAndStop(_local1.board[i][j].num + 1);
_local1.board[i][j].clip._x = (j * _local1.TILE_XSIZE) + _local1.START_XPOS;
_local1.board[i][j].clip._y = (i * _local1.TILE_YSIZE) + _local1.START_YPOS;
if (_local1.board[i][j].num == 4) {
_local1.ypos = i;
_local1.xpos = j;
}
j++;
}
i++;
}
};
game.checkMove = function (x, y) {
var _local1 = this;
var _local3 = _local1.xpos + x;
var _local2 = _local1.ypos + y;
var map_tile = 0;
var tile1 = _local1.board[_local1.ypos][_local1.xpos].num;
var tile2 = _local1.board[_local2][_local3].num;
var tile3 = _local1.board[_local2 + y][_local3 + x].num;
if ((tile2 == 1) || (tile2 == 2)) {
tile1 = tile1 - 3;
tile2 = tile2 + 3;
map_tile = 1;
} else if (((tile2 == 6) || (tile2 == 7)) && ((tile3 == 1) || (tile3 == 2))) {
tile1 = tile1 - 3;
tile2 = tile2 - 2;
tile3 = tile3 + 5;
map_tile = 2;
_local1.undoData = _local1.undoData + 8;
}
if (map_tile > 0) {
_local1.board[_local1.ypos][_local1.xpos].num = tile1;
_local1.board[_local1.ypos][_local1.xpos].clip.gotoAndStop(_local1.board[_local1.ypos][_local1.xpos].num + 1);
_local1.board[_local2][_local3].num = tile2;
_local1.board[_local2][_local3].clip.gotoAndStop(_local1.board[_local2][_local3].num + 1);
_local1.ypos = _local2;
_local1.xpos = _local3;
if (map_tile == 2) {
_root.playSound(3);
_local2 = _local2 + y;
_local3 = _local3 + x;
_local1.board[_local2][_local3].num = tile3;
_local1.board[_local2][_local3].clip.gotoAndStop(_local1.board[_local2][_local3].num + 1);
}
_local1.undoMove[(_root.stepTxt++) % _local1.MAX_HISTORY] = _local1.undoData;
}
};
game.undoMove = function () {
var _local1 = this;
var x = 0;
var y = 0;
var map_tile = 0;
var _local2 = _local1.undoMove[--_root.stepTxt];
if (_local2 > 0) {
if (_local2 > 8) {
map_tile = 5;
_local2 = _local2 % 8;
}
if (_local2 < 4) {
x = _local2 - 2;
} else {
y = _local2 - 6;
}
if (map_tile > 0) {
var cx = (_local1.xpos + x);
var _local3 = _local1.ypos + y;
_local1.board[_local3][cx].num = _local1.board[_local3][cx].num - 5;
_local1.board[_local3][cx].clip.gotoAndStop(_local1.board[_local3][cx].num + 1);
}
_local1.board[_local1.ypos][_local1.xpos].num = _local1.board[_local1.ypos][_local1.xpos].num + (map_tile - 3);
_local1.board[_local1.ypos][_local1.xpos].clip.gotoAndStop(_local1.board[_local1.ypos][_local1.xpos].num + 1);
_local1.xpos = _local1.xpos - x;
_local1.ypos = _local1.ypos - y;
_local1.board[_local1.ypos][_local1.xpos].num = _local1.board[_local1.ypos][_local1.xpos].num + 3;
_local1.board[_local1.ypos][_local1.xpos].clip.gotoAndStop(_local1.board[_local1.ypos][_local1.xpos].num + 1);
}
};
game.checkSuccess = function () {
var _local1 = this;
var _local2 = _root;
var _local3 = 0;
i = 0;
while (i < _local1.MAX_YBOX) {
j = 0;
while (j < _local1.MAX_XBOX) {
if (_local1.board[i][j].num == 6) {
_local3++;
}
j++;
}
i++;
}
_local2.goalTxt = _local3;
if (_local2.goalTxt == 0) {
var successFlag = false;
i = 0;
while (i < _local1.successLevel.length) {
if (_local2.levelTxt == _local1.successLevel[i]) {
successFlag = true;
}
i++;
}
if (successFlag == false) {
_local1.successLevel[_local1.successLevelCnt] = _local2.levelTxt;
_local2.scoreTxt = _local2.scoreTxt + (((_local2.levelTxt * 10) + (_local1.goalCnt * 100)) - (_local2.stepTxt * 2));
_local1.successLevelCnt++;
}
delete _local1.myListener.onKeyDown;
delete _local2.ppBtn.onPress;
delete _local2.pBtn.onPress;
delete _local2.nBtn.onPress;
delete _local2.nnBtn.onPress;
delete _local2.undoBtn.onPress;
if (_local1.successLevelCnt < _local1.TOTAL_LEVEL) {
_local2.gotoAndPlay("clear");
} else {
_local2.gotoAndPlay("end");
}
}
};
game.removeBoard = function () {
var _local1 = this;
i = 0;
while (i < _local1.MAX_YBOX) {
j = 0;
while (j < _local1.MAX_XBOX) {
_local1.board[i][j].clip.removeMovieClip();
j++;
}
i++;
}
};
game.loadBackImg = function () {
var _local1 = _root;
_local1.backImgMc.loadMovie(((_local1.flashURL + "back/back") + (random(_local1.backimgcnt) + 1)) + ".jpg");
};
_root.startBtn.onPress = function () {
var _local1 = _root;
_local1.playSound(1);
_local1.levelTxt = 1;
_local1.scoreTxt = 0;
_local1.game.successLevelCnt = 0;
_local1.game.successLevel.splice(0, _local1.game.successLevel.length);
_local1.gotoAndStop("play");
};
_root.soundMc.soundBtn.onPress = function () {
var _local1 = _root;
if (_local1.soundOn) {
stopAllSounds();
_local1.soundOn = false;
_local1.soundMc.gotoAndStop("off");
} else {
_local1.soundOn = true;
_local1.soundMc.gotoAndStop("on");
_local1.playSound(0);
}
};
var soundOn = true;
_root.playSound(0);
Frame 11
this.stop();
game.setCurrentLevel(_root.levelTxt);
game.setBoard();
game.myListener.onKeyDown = function () {
var _local1 = _root;
if (Key.isDown(37)) {
game.undoData = 1;
game.checkMove(-1, 0);
game.checkSuccess();
} else if (Key.isDown(39)) {
game.undoData = 3;
game.checkMove(1, 0);
game.checkSuccess();
} else if (Key.isDown(38)) {
game.undoData = 5;
game.checkMove(0, -1);
game.checkSuccess();
} else if (Key.isDown(40)) {
game.undoData = 7;
game.checkMove(0, 1);
game.checkSuccess();
} else if (Key.isDown(32)) {
if (_local1.stepTxt > 0) {
_local1.playSound(1);
_local1.game.undoMove();
}
}
};
Key.addListener(game.myListener);
_root.ppBtn.onPress = function () {
var _local1 = _root;
if (_local1.levelTxt > 10) {
_local1.playSound(2);
_local1.levelTxt = _local1.levelTxt - 10;
}
_local1.game.setCurrentLevel(_local1.levelTxt);
_local1.game.setBoard();
};
_root.pBtn.onPress = function () {
var _local1 = _root;
if (_local1.levelTxt > 1) {
_local1.playSound(2);
_local1.levelTxt--;
}
_local1.game.setCurrentLevel(_local1.levelTxt);
_local1.game.setBoard();
};
_root.nBtn.onPress = function () {
var _local1 = _root;
if (_local1.levelTxt < 103) {
_local1.playSound(2);
_local1.levelTxt++;
}
_local1.game.setCurrentLevel(_local1.levelTxt);
_local1.game.setBoard();
};
_root.nnBtn.onPress = function () {
var _local1 = _root;
if (_local1.levelTxt < 94) {
_local1.playSound(2);
_local1.levelTxt = _local1.levelTxt + 10;
}
_local1.game.setCurrentLevel(_local1.levelTxt);
_local1.game.setBoard();
};
_root.undoBtn.onPress = function () {
var _local1 = _root;
if (_local1.stepTxt > 0) {
_local1.playSound(1);
_local1.game.undoMove();
}
};
Frame 31
_root.playSound(4);
game.removeBoard();
Frame 50
this.stop();
if (_root.dbconnect == "yes") {
DispatchGameData();
}
_root.levelTxt++;
_root.gotoAndStop("play");
Frame 61
this.stop();
if (_root.dbconnect == "yes") {
DispatchGameData();
}
_root.playSound(4);
game.removeBoard();
_root.startBtn.onPress = function () {
var _local1 = _root;
_local1.playSound(1);
_local1.levelTxt = 1;
_local1.scoreTxt = 0;
_local1.game.successLevelCnt = 0;
_local1.game.successLevel.splice(0, _local1.game.successLevel.length);
_local1.gotoAndStop("play");
};
Instance of Symbol 32 MovieClip in Symbol 38 MovieClip [Game24LogoMc] Frame 1
onClipEvent (load) {
var total = _root.getBytesTotal();
var download = _root.getBytesLoaded();
this.percentTxt = 0;
this.bar_mc._xscale = 0;
}
onClipEvent (enterFrame) {
download = _root.getBytesLoaded();
this.percentTxt = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
this.bar_mc._xscale = this.percentTxt;
if (this.percentTxt >= 100) {
_root.gotoAndPlay(_parent.gotoNext);
}
}
Symbol 75 MovieClip Frame 1
this.stop();
Symbol 75 MovieClip Frame 2
this.stop();
Symbol 82 Button
on (release) {
getURL ("http://www.game24.co.kr", "_blank");
}