Frame 1
mochi.as2.MochiAd.showPreGameAd({id:"bc40ccb08522a55f", res:"600x450"});
stop();
_root.mccreatc = 0;
var myGame = this;
var createSound = function (mcName, sndName, sndVolume) {
var _local3 = myGame.createEmptyMovieClip(mcName, (myGame.getNextHighestDepth() + 50000) + _root.mccreatc);
_root.mccreatc++;
var _local2 = new Sound(_local3);
_local2.setVolume(sndVolume);
_local2.attachSound(sndName);
return(_local2);
};
var startscreens = createSound("startscreens", "startscreens", 100);
var sndls = createSound("ls", "f8i815.MP3", 100);
var sndls1 = createSound("ls1", "f8i815.MP31", 100);
var backSound = createSound("backSound", "backSound", 100);
var match = createSound("match", "match", 100);
var sea = createSound("sea", "sea", 100);
var wind = createSound("wind", "wind", 100);
Frame 2
gr_game = "5A7DCF72";
loader = {};
Stage.scaleMode = "noScale";
stop();
gamename = "mahjongblackwhite";
url = "www.gamesonly.net";
onEnterFrame = function () {
totalsize = getBytesTotal();
loadsize = getBytesLoaded();
loadper = Math.round((loadsize / totalsize) * 100) + "%";
if (((loadsize >= 1) && (totalsize >= 1)) && (loadsize == totalsize)) {
load_Mc.nextFrame();
delete onEnterFrame;
}
};
Frame 3
function defineLayouts() {
ly11 = [[[0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0]], [[0, 2], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [8, 0], [8, 0]], [[8, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 3], [0, 3]], [[0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0]]];
ly12 = [[[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]];
ly13 = [[[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]];
ly14 = [[[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]];
ly15 = [[[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 4], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]];
layout1 = [ly11, ly12, ly13, ly14, ly15];
ly21 = [[[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1]], [[0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0]], [[0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]];
ly22 = [[[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 1]], [[0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 1], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 1], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 1], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 1], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 1], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 1], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0]], [[0, 1], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]];
ly23 = [[[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]];
ly24 = [[[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]];
ly25 = [[[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]];
layout2 = [ly21, ly22, ly23, ly24, ly25];
ly31 = [[[0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0]]];
ly32 = [[[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]];
ly33 = [[[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]];
ly34 = [[[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]];
ly35 = [[[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]];
layout3 = [ly31, ly32, ly33, ly34, ly35];
layouts = [0, layout1, layout2, layout3];
}
function createTileList() {
delete tiles;
tiles = {};
tiles.types = new Array("ball", "bamboo", "char", "season", "wind", "flower", "dragon");
tiles.ball = new Array(1, 4, 4, 4, 4, 4, 4, 4, 4, 4);
tiles.bamboo = new Array(1, 4, 4, 4, 4, 4, 4, 4, 4, 4);
tiles.char = new Array(1, 4, 4, 4, 4, 4, 4, 4, 4, 4);
tiles.season = new Array(1, 1, 1, 1, 1);
tiles.wind = new Array(1, 4, 4, 4, 4);
tiles.flower = new Array(1, 1, 1, 1, 1);
tiles.dragon = new Array(1, 4, 4, 4);
tiles.count = 0;
delete tiles2;
tiles2 = {};
tiles2.types = new Array("ball", "bamboo", "char", "season", "wind", "flower", "dragon");
tiles2.ball = new Array(1, 4, 4, 4, 4, 4, 4, 4, 4, 4);
tiles2.bamboo = new Array(1, 4, 4, 4, 4, 4, 4, 4, 4, 4);
tiles2.char = new Array(1, 4, 4, 4, 4, 4, 4, 4, 4, 4);
tiles2.season = new Array(1, 1, 1, 1, 1);
tiles2.wind = new Array(1, 4, 4, 4, 4);
tiles2.flower = new Array(1, 1, 1, 1, 1);
tiles2.dragon = new Array(1, 4, 4, 4);
}
function copyTiles() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < tiles.types.length) {
var _local1 = 0;
while (_local1 < tiles[tiles.types[_local2]].length) {
if (_local1 > 0) {
_local3 = _local3 + tiles2[tiles2.types[_local2]][_local1];
}
tiles[tiles.types[_local2]][_local1] = tiles2[tiles2.types[_local2]][_local1];
_local1++;
}
if (_local3 == 0) {
tiles2[tiles.types[_local2]][0] = 0;
tiles[tiles.types[_local2]][0] = 0;
}
_local3 = 0;
_local2++;
}
}
function createTileList2() {
delete tiles;
tiles = {};
tiles.types = new Array("ball", "bamboo", "char", "season", "wind", "flower", "dragon");
tiles.ball = new Array(1, 0, 0, 2, 0, 0, 2, 0, 0, 0);
tiles.bamboo = new Array(1, 0, 0, 0, 2, 0, 0, 0, 2, 0);
tiles.char = new Array(1, 2, 0, 0, 0, 2, 0, 0, 0, 0);
tiles.season = new Array(1, 1, 1, 1, 1);
tiles.wind = new Array(1, 0, 2, 0, 0);
tiles.flower = new Array(0, 0, 0, 0, 0);
tiles.dragon = new Array(1, 2, 0, 2);
tiles.count = 61;
}
function createBoard() {
var _local2 = _root;
board.removeMovieClip();
_local2.createEmptyMovieClip("board", 5);
_local2.board._x = 23;
_local2.board._y = 45;
var _local20 = layouts[game.layout];
var _local21 = _local20.length;
var _local10 = 0;
var _local11 = _local21 - 1;
var _local22 = 0;
shrinker = 87;
cellWidth = 41 * (shrinker / 100);
cellHeight = 50 * (shrinker / 100);
var _local18 = 15 * (shrinker / 100);
var _local17 = 9 * (shrinker / 100);
if (!rRT) {
var _local19 = 0;
while (_local19 < _local21) {
_local2["b" + _local19] = _local20[_local19];
_local19++;
}
} else {
var _local13 = 0;
while (_local13 < 5) {
var _local12 = 0;
while (_local12 < 8) {
var _local9 = 0;
while (_local9 < 15) {
if (_local2["b" + _local13][_local12][_local9][0] == 6) {
_local2["b" + _local13][_local12][_local9][1] = 0;
}
if (_local2["b" + _local13][_local12][_local9][0] != 8) {
_local2["b" + _local13][_local12][_local9][0] = 0;
}
_local9++;
}
_local12++;
}
_local13++;
}
}
var _local26 = {ra:"90", rb:"30", ga:"90", gb:"0", ba:"90", bb:"0", aa:"100", ab:"0"};
var _local27 = {ra:"85", rb:"0", ga:"85", gb:"0", ba:"85", bb:"0", aa:"100", ab:"0"};
var _local25 = {ra:"90", rb:"0", ga:"90", gb:"30", ba:"90", bb:"0", aa:"100", ab:"0"};
var _local24 = {ra:"90", rb:"0", ga:"90", gb:"0", ba:"90", bb:"30", aa:"100", ab:"0"};
var _local23 = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
var _local28 = [_local27, _local26, _local25, _local24, _local23];
_local22 = 72 - tiles.count;
while (_local22-- , _local22 >= 0) {
var _local14 = chooseTile();
var _local8 = findSpots(_local10);
var _local5 = findSpots(_local11);
if (_local8 == 0) {
_local10++;
_local8 = findSpots(_local10);
}
if (_local5 == 0) {
while (_local5 == 0) {
_local11--;
_local5 = findSpots(_local11);
}
}
var _local16 = ["b" + _local10];
var _local15 = ["b" + _local11];
var _local7 = random(_local8.length);
var _local6 = random(_local5.length);
if (_local10 == _local11) {
while (_local6 == _local7) {
_local6 = random(_local5.length);
}
}
var _local4 = [(("t" + _local8[_local7].y) + _local8[_local7].x) + _local10];
var _local3 = [(("t" + _local5[_local6].y) + _local5[_local6].x) + _local11];
depth = ((120 * _local10) + ((11 * _local8[_local7].y) + (10 * _local8[_local7].x))) + 2000;
depth0 = ((120 * _local11) + ((11 * _local5[_local6].y) + (10 * _local5[_local6].x))) + 2000;
if (_local14[0] == "ball") {
board.attachMovie("ballT", _local4, depth);
board.attachMovie("ballT", _local3, depth0);
} else if (_local14[0] == "bamboo") {
board.attachMovie("bambooT", _local4, depth);
board.attachMovie("bambooT", _local3, depth0);
} else if (_local14[0] == "char") {
board.attachMovie("charT", _local4, depth);
board.attachMovie("charT", _local3, depth0);
} else if (_local14[0] == "season") {
board.attachMovie("seasonT", _local4, depth);
board.attachMovie("seasonT", _local3, depth0);
} else if (_local14[0] == "dragon") {
board.attachMovie("dragonT", _local4, depth);
board.attachMovie("dragonT", _local3, depth0);
} else if (_local14[0] == "flower") {
board.attachMovie("flowerT", _local4, depth);
board.attachMovie("flowerT", _local3, depth0);
} else if (_local14[0] == "wind") {
board.attachMovie("windT", _local4, depth);
board.attachMovie("windT", _local3, depth0);
}
_local2.board[_local4]._width = 72.1;
_local2.board[_local4]._height = 77.2;
_local2.board[_local3]._width = 72.1;
_local2.board[_local3]._height = 77.2;
_local2.board[_local4].gotoAndStop(_local14[1]);
_local2.board[_local3].gotoAndStop(_local14[2]);
_local2.board[_local4]._xscale = (_local2.board[_local3]._xscale = shrinker);
_local2.board[_local4]._yscale = (_local2.board[_local3]._yscale = shrinker);
_local2.board[_local4].name = _local4;
_local2.board[_local4].typeT = (_local2.board[_local3].typeT = _local14[0]);
_local2.board[_local4].kind = _local14[1];
_local2.board[_local4].clicked = (_local2.board[_local3].clicked = false);
_local2.board[_local4].ref = _local16;
_local2.board[_local4].ref1 = ["r" + _local10];
_local2.board[_local4].y = _local8[_local7].y;
_local2.board[_local4].x = _local8[_local7].x;
_local2.board[_local4].tt = _local2[_local16][_local8[_local7].y][_local8[_local7].x][1];
_local2.board[_local4].lay = _local10;
_local2.board[_local3].name = _local3;
_local2.board[_local3].kind = _local14[2];
_local2.board[_local3].ref = _local15;
_local2.board[_local3].ref1 = ["r" + _local11];
_local2.board[_local3].y = _local5[_local6].y;
_local2.board[_local3].x = _local5[_local6].x;
_local2.board[_local3].tt = _local2[_local15][_local5[_local6].y][_local5[_local6].x][1];
_local2.board[_local3].lay = _local11;
if (_local2[_local16][_local8[_local7].y][_local8[_local7].x][1] == 1) {
_local2.board[_local4]._x = cellWidth * _local8[_local7].x;
_local2.board[_local4]._y = cellHeight * _local8[_local7].y;
if (_local10 != 0) {
_local2.board[_local4]._x = _local2.board[_local4]._x - (_local17 * _local10);
_local2.board[_local4]._y = _local2.board[_local4]._y - (_local18 * _local10);
}
_local2[_local16][_local8[_local7].y][_local8[_local7].x][0] = 9;
}
if (_local2[_local16][_local8[_local7].y][_local8[_local7].x][1] == 2) {
_local2.board[_local4]._x = cellWidth * _local8[_local7].x;
_local2.board[_local4]._y = (cellHeight * _local8[_local7].y) + (cellHeight / 2);
if (_local10 != 0) {
_local2.board[_local4]._x = _local2.board[_local4]._x - (_local17 * _local10);
_local2.board[_local4]._y = _local2.board[_local4]._y - (_local18 * _local10);
}
_local2[_local16][_local8[_local7].y][_local8[_local7].x][0] = 9;
}
if (_local2[_local16][_local8[_local7].y][_local8[_local7].x][1] == 3) {
_local2.board[_local4]._x = cellWidth * _local8[_local7].x;
_local2.board[_local4]._y = (cellHeight * _local8[_local7].y) - (cellHeight / 2);
if (_local10 != 0) {
_local2.board[_local4]._x = _local2.board[_local4]._x - (_local17 * _local10);
_local2.board[_local4]._y = _local2.board[_local4]._y - (_local18 * _local10);
}
_local2[_local16][_local8[_local7].y][_local8[_local7].x][0] = 9;
}
if (_local2[_local15][_local5[_local6].y][_local5[_local6].x][1] == 1) {
_local2.board[_local3]._x = cellWidth * _local5[_local6].x;
_local2.board[_local3]._y = cellHeight * _local5[_local6].y;
if (_local10 != _local11) {
_local2.board[_local3]._x = _local2.board[_local3]._x - (_local17 * _local11);
_local2.board[_local3]._y = _local2.board[_local3]._y - (_local18 * _local11);
}
_local2[_local15][_local5[_local6].y][_local5[_local6].x][0] = 9;
}
if (_local2[_local15][_local5[_local6].y][_local5[_local6].x][1] == 2) {
_local2.board[_local3]._x = cellWidth * _local5[_local6].x;
_local2.board[_local3]._y = (cellHeight * _local5[_local6].y) + (cellHeight / 2);
if (_local10 != _local11) {
_local2.board[_local3]._x = _local2.board[_local3]._x - (_local17 * _local11);
_local2.board[_local3]._y = _local2.board[_local3]._y - (_local18 * _local11);
}
_local2[_local15][_local5[_local6].y][_local5[_local6].x][0] = 9;
}
if (_local2[_local15][_local5[_local6].y][_local5[_local6].x][1] == 3) {
_local2.board[_local3]._x = cellWidth * _local5[_local6].x;
_local2.board[_local3]._y = (cellHeight * _local5[_local6].y) - (cellHeight / 2);
_local2[_local15][_local5[_local6].y][_local5[_local6].x][0] = 9;
}
if (_local2[_local15][_local5[_local6].y][_local5[_local6].x][1] == 4) {
_local2.board[_local3]._x = (cellWidth * _local5[_local6].x) + (cellWidth / 2);
_local2.board[_local3]._y = (cellHeight * _local5[_local6].y) + (cellHeight / 2);
if (_local10 != _local11) {
_local2.board[_local3]._x = _local2.board[_local3]._x - (_local17 * _local11);
_local2.board[_local3]._y = _local2.board[_local3]._y - (_local18 * _local11);
}
_local2[_local15][_local5[_local6].y][_local5[_local6].x][0] = 9;
}
ll = random(2);
if (ll == 0) {
_local2.board[_local4].cc = 1;
_local2.board[_local3].cc = 2;
_local2.board[_local3].mc.gotoAndStop(2);
} else {
_local2.board[_local4].cc = 2;
_local2.board[_local3].cc = 1;
_local2.board[_local4].mc.gotoAndStop(2);
}
}
}
function findSpots(layer) {
var _local4 = 0;
var _local6 = [];
var _local5 = ["b" + layer];
var _local3 = 0;
while (_local3 < _root[_local5].length) {
var _local2 = 0;
while (_local2 < _root[_local5][0].length) {
if ((_root[_local5][_local3][_local2][1] > 0) && (_root[_local5][_local3][_local2][0] != 9)) {
_local6[_local4] = {};
_local6[_local4].x = _local2;
_local6[_local4].y = _local3;
_local4++;
}
_local2++;
}
_local3++;
}
if (_local4 == 0) {
return(0);
}
return(_local6);
}
function chooseTile() {
var _local5 = [];
var _local1 = 0;
if (tiles.ball[0] == 1) {
_local5[_local1] = 0;
_local1++;
}
if (tiles.bamboo[0] == 1) {
_local5[_local1] = 1;
_local1++;
}
if (tiles.char[0] == 1) {
_local5[_local1] = 2;
_local1++;
}
if (tiles.season[0] == 1) {
_local5[_local1] = 3;
_local1++;
}
if (tiles.wind[0] == 1) {
_local5[_local1] = 4;
_local1++;
}
if (tiles.flower[0] == 1) {
_local5[_local1] = 5;
_local1++;
}
if (tiles.dragon[0] == 1) {
_local5[_local1] = 6;
_local1++;
}
if (_local1 == 0) {
}
var _local7 = 0;
var _local4 = [];
_local7 = random(_local5.length);
n = tiles.types[_local5[_local7]];
switch (n) {
case "season" :
_local1 = 1;
var _local2 = [];
var _local3 = 1;
while (_local3 < tiles.season.length) {
if (tiles.season[_local3] > 0) {
_local2[_local1] = _local3;
_local1++;
}
_local3++;
}
_local1 = random(_local2.length);
if (_local1 == 0) {
_local1++;
}
tiles.season[_local2[_local1]] = tiles.season[_local2[_local1]] - 1;
var _local6 = _local1 + 1;
if (_local6 == 0) {
_local6++;
}
if (_local6 > (_local2.length - 1)) {
_local6 = 1;
}
tiles.season[_local2[_local6]] = tiles.season[_local2[_local6]] - 1;
if (_local2.length == 3) {
tiles.season[0] = 0;
}
_local4[0] = "season";
_local4[1] = _local2[_local1];
_local4[2] = _local2[_local6];
season++;
break;
case "flower" :
_local1 = 1;
_local2 = [];
_local3 = 1;
while (_local3 < tiles.flower.length) {
if (tiles.flower[_local3] > 0) {
_local2[_local1] = _local3;
_local1++;
}
_local3++;
}
_local1 = random(_local2.length);
if (_local1 == 0) {
_local1++;
}
tiles.flower[_local2[_local1]] = tiles.flower[_local2[_local1]] - 1;
_local6 = _local1 + 1;
if (_local6 == 0) {
_local6++;
}
if (_local6 > (_local2.length - 1)) {
_local6 = 1;
}
tiles.flower[_local2[_local6]] = tiles.flower[_local2[_local6]] - 1;
if (_local2.length == 3) {
tiles.flower[0] = 0;
}
_local4[0] = "flower";
_local4[1] = _local2[_local1];
_local4[2] = _local2[_local6];
flower++;
break;
default :
_local1 = 1;
_local2 = [];
_local3 = 1;
while (_local3 < tiles[n].length) {
if (tiles[n][_local3] > 0) {
_local2[_local1] = _local3;
_local1++;
}
_local3++;
}
_local1 = random(_local2.length);
if (_local1 == 0) {
_local1++;
}
tiles[n][_local2[_local1]] = tiles[n][_local2[_local1]] - 2;
if (tiles[n][_local2[_local1]] <= 0) {
if (_local2.length == 2) {
tiles[n][0] = 0;
}
}
_local4[0] = n;
_local4[1] = _local2[_local1];
_local4[2] = _local2[_local1];
if (_local4[1] > 5) {
_local4[1] = _local4[1] - 4;
}
if (_local4[2] <= 5) {
break;
}
_local4[2] = _local4[2] - 4;
}
return(_local4);
}
function lookingfor() {
if (pickSame()) {
game.score = game.score - 100;
statBar.score.text = game.score;
} else {
var _local3 = _root;
_local3.game.selections[0] = 1;
_local3.click.start();
_local3.rRT = true;
_local3.game.score = _local3.game.score - 200;
clearInterval(_local3.timer.timeInt);
_local3.board.removeMovieClip();
var _local2 = 0;
while (_local2 < _local3.levels) {
_local3["b" + _local2] = [];
_local2++;
}
_local3.back.removeMovieClip();
_local3.changeFrames();
_local3.statBar.removeMovieClip();
_local3.confirm.removeMovieClip();
}
}
function pickSame() {
temp = new Array();
temp_1 = new Array();
for (var _local11 in board) {
temp_1.push(board[_local11]);
}
z = 0;
while (z < temp_1.length) {
if (checkit(temp_1[z])) {
temp.push(temp_1[z]);
}
z++;
}
j = 0;
while (j < temp.length) {
k = 0;
while (k < temp.length) {
if (temp[j].name != temp[k].name) {
if (checkCon(temp[j], temp[k])) {
myColor = new Color(temp[j]);
var _local2 = new Object();
_local2 = {ra:"50", rb:"244", ga:"40", gb:"112", ba:"12", bb:"90", aa:"100", ab:"0"};
myColor.setTransform(_local2);
_loc1.clicked = false;
myColor = new Color(temp[k]);
_local2 = new Object();
_local2 = {ra:"50", rb:"244", ga:"40", gb:"112", ba:"12", bb:"90", aa:"100", ab:"0"};
myColor.setTransform(_local2);
_root.game.selections[0] = 1;
return(true);
}
_root.game.selections[0] = 1;
}
k++;
}
j++;
}
return(false);
}
function checkit(mc1) {
var _local2 = mc1;
var _local3 = _root;
if (!game.paused) {
if (game.layout == 1) {
if (_local3[_local2.ref] == _local3.b3) {
if (_local3.b4[3][6][0] == 9) {
return(false);
}
}
}
var _local4 = _local3.game.selections[0];
if (_local3.game.selections[_local4 - 1].name != _local2.name) {
if ((_local3[_local2.ref][_local2.y][_local2.x - 1][0] != 9) || (_local3[_local2.ref][_local2.y][_local2.x + 1][0] != 9)) {
if ((_local3[_local2.ref][_local2.y][_local2.x - 1][0] != 8) || (_local3[_local2.ref][_local2.y][_local2.x + 1][0] != 9)) {
if ((_local3[_local2.ref][_local2.y][_local2.x - 1][0] != 9) || (_local3[_local2.ref][_local2.y][_local2.x + 1][0] != 8)) {
var _local5 = _local2.lay + 1;
if (((_local3["b" + _local5][_local2.y][_local2.x][0] == 0) || (_local2.lay == 4)) || (_local3["b" + _local5][_local2.y][_local2.x][0] == 6)) {
click.start();
_local3.game.selections[_local4].name = _local2.name;
_local3.game.selections[_local4].typeT = _local2.typeT;
_local3.game.selections[_local4].kind = _local2.kind;
_local3.game.selections[_local4].cc = _local2.cc;
_local3.game.selections[0]++;
return(true);
}
}
}
}
}
return(false);
}
}
function checkCon(mc1, mc2) {
var _local10 = _root;
var _local8 = mc1;
var _local9 = mc2;
var _local12 = mc1.ref;
var _local7 = mc1.x;
var _local5 = mc1.y;
var _local11 = mc2.ref;
var _local6 = mc2.x;
var _local4 = mc2.y;
if ((mc1.typeT == mc2.typeT) && (mc1.cc != mc2.cc)) {
if ((mc1.typeT == "flower") || (mc1.typeT == "season")) {
return(true);
}
if (mc1.kind == mc2.kind) {
return(true);
}
}
return(false);
}
function checkMatch() {
var _local2 = _root;
var _local3 = game.selections[1].name;
var _local4 = game.selections[2].name;
var _local10 = _local2.board[_local3].ref;
var _local8 = _local2.board[_local3].x;
var _local6 = _local2.board[_local3].y;
var _local9 = _local2.board[_local4].ref;
var _local7 = _local2.board[_local4].x;
var _local5 = _local2.board[_local4].y;
game.selections[1].cc = _local2.board[_local3].cc;
game.selections[2].cc = _local2.board[_local4].cc;
if ((game.selections[1].typeT == game.selections[2].typeT) && (game.selections[1].cc != game.selections[2].cc)) {
if ((game.selections[1].typeT == "flower") || (game.selections[1].typeT == "season")) {
if ((_local2.board[_local3].tt == 2) || (_local2.board[_local3].tt == 3)) {
if (_local2[_local10][_local6 - 1][_local8][0] == 8) {
_local2[_local10][_local6 - 1][_local8][0] = 0;
}
if (_local2[_local10][_local6 + 1][_local8][0] == 8) {
_local2[_local10][_local6 + 1][_local8][0] = 0;
}
}
if ((_local2.board[_local4].tt == 2) || (_local2.board[_local4].tt == 3)) {
if (_local2[_local9][_local5 - 1][_local7][0] == 8) {
_local2[_local9][_local5 - 1][_local7][0] = 0;
}
if (_local2[_local9][_local5 + 1][_local7][0] == 8) {
_local2[_local9][_local5 + 1][_local7][0] = 0;
}
}
if (game.selections[1].typeT == "season") {
sea.start();
} else {
wind.start();
}
_local2[_local10][_local6][_local8][0] = 6;
_local2[_local9][_local5][_local7][0] = 6;
tiles2[game.selections[1].typeT][game.selections[1].kind] = tiles2[game.selections[1].typeT][game.selections[1].kind] - 1;
tiles2[game.selections[2].typeT][game.selections[2].kind] = tiles2[game.selections[2].typeT][game.selections[2].kind] - 1;
_local2.board.attachMovie("fireWork", "f1", 9017);
_local2.board.attachMovie("fireWork", "f2", 9018);
_local2.board.f1._x = _local8 * cellWidth;
_local2.board.f1._y = _local6 * cellHeight;
_local2.board.f2._x = _local7 * cellWidth;
_local2.board.f2._y = _local5 * cellHeight;
if (hint.fHint) {
if ((_local2.board[hint.t1.name].name == _local2.board[_local3].name) || (_local2.board[hint.t1.name].name == _local2.board[_local4].name)) {
hint.fHint = false;
}
if ((_local2.board[hint.t2.name].name == _local2.board[_local3].name) || (_local2.board[hint.t2.name].name == _local2.board[_local4].name)) {
hint.fHint = false;
}
}
_local2.board[_local3].removeMovieClip();
_local2.board[_local4].removeMovieClip();
game.selections[0] = 1;
updateScore();
} else if (game.selections[1].kind == game.selections[2].kind) {
if ((_local2.board[_local3].tt == 2) || (_local2.board[_local3].tt == 3)) {
if (_local2[_local10][_local6 - 1][_local8][0] == 8) {
_local2[_local10][_local6 - 1][_local8][0] = 0;
}
if (_local2[_local10][_local6 + 1][_local8][0] == 8) {
_local2[_local10][_local6 + 1][_local8][0] = 0;
}
}
if ((_local2.board[_local4].tt == 2) || (_local2.board[_local4].tt == 3)) {
if (_local2[_local9][_local5 - 1][_local7][0] == 8) {
_local2[_local9][_local5 - 1][_local7][0] = 0;
}
if (_local2[_local9][_local5 + 1][_local7][0] == 8) {
_local2[_local9][_local5 + 1][_local7][0] = 0;
}
}
match.start();
tiles2[game.selections[1].typeT][game.selections[1].kind] = tiles2[game.selections[1].typeT][game.selections[1].kind] - 2;
_local2[_local10][_local6][_local8][0] = 6;
_local2[_local9][_local5][_local7][0] = 6;
_local2.board.attachMovie("fireWork", "f1", 9017);
_local2.board.attachMovie("fireWork", "f2", 9018);
_local2.board.f1._x = _local8 * cellWidth;
_local2.board.f1._y = _local6 * cellHeight;
_local2.board.f2._x = _local7 * cellWidth;
_local2.board.f2._y = _local5 * cellHeight;
if (hint.fHint) {
if ((_local2.board[hint.t1.name].name == _local2.board[_local3].name) || (_local2.board[hint.t1.name].name == _local2.board[_local4].name)) {
hint.fHint = false;
}
if ((_local2.board[hint.t2.name].name == _local2.board[_local3].name) || (_local2.board[hint.t2.name].name == _local2.board[_local4].name)) {
hint.fHint = false;
}
}
_local2.board[_local3].removeMovieClip();
_local2.board[_local4].removeMovieClip();
game.selections[0] = 1;
updateScore();
}
}
var _local12 = new Color(_local2.board[_local3]);
var _local11 = new Object();
_local11 = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
_local12.setTransform(_local11);
_local12 = new Color(_local2.board[_local4]);
_local11 = new Object();
_local11 = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
_local12.setTransform(_local11);
_local2.board[_local3].clicked = false;
_local2.board[_local4].clicked = false;
game.selections[0] = 1;
}
function startTimer() {
timer.minute = 20;
timer.second = 0;
timer.timeInt = setInterval(updateTime, 1000);
timer.bonus = 60;
}
function updateTime() {
timer.second--;
if (timer.second < 0) {
if (timer.minute == 0) {
gotoAndStop ("gameover");
}
timer.minute--;
timer.second = 59;
}
timer.bonus--;
if (timer.bonus < 0) {
timer.bonus = 0;
}
if (timer.second < 10) {
statBar.time.text = (timer.minute + ":0") + timer.second;
} else {
statBar.time.text = (timer.minute + ":") + timer.second;
}
}
function updateScore() {
game.score = game.score + (50 + timer.bonus);
timer.bonus = 60;
statBar.score.text = game.score;
tiles.count++;
if (tiles.count == 72) {
gotoAndPlay ("nextl");
} else if (tiles.count >= 70) {
if (pickSame()) {
} else {
gotoAndPlay ("nextl");
}
}
}
function changeBack(num) {
back_mc.gotoAndStop(num);
}
function findHint() {
var _local2 = _root;
if (hint.fAT) {
hint.m = [];
var _local13 = 0;
var _local6 = 0;
var _local10 = hint.t1.sLayer;
while (_local10 > -1) {
var _local8 = ["b" + _local10];
var _local4 = 0;
while (_local4 < 8) {
var _local3 = 0;
while (_local3 < 15) {
var _local9 = _local2[_local8][_local4][_local3][0];
if ((_local9 == 0) || (_local9 == 6)) {
_local13++;
}
if ((_local9 != 0) && (_local9 != 6)) {
if (((_local2[_local8][_local4][_local3 - 1][0] != 9) && (_local2[_local8][_local4][_local3 - 1][0] != 8)) || ((_local2[_local8][_local4][_local3 + 1][0] != 9) && (_local2[_local8][_local4][_local3 + 1][0] != 8))) {
var _local12 = ["b" + (_local10 + 1)];
if (((_local10 == 4) || (_local2[_local12][_local4][_local3][0] == 0)) || (_local2[_local12][_local4][_local3][0] == 6)) {
if ((game.layout == 1) && (_local2[_local8] == _local2.b3)) {
if (_local2.b4[3][6][0] != 9) {
var _local11 = [(("t" + _local4) + _local3) + _local10];
hint.m[_local6] = {};
hint.m[_local6].name = _local11;
hint.m[_local6].typeT = _local2.board[_local11].typeT;
hint.m[_local6].kind = _local2.board[_local11].kind;
_local6++;
}
} else {
var _local11 = [(("t" + _local4) + _local3) + _local10];
hint.m[_local6] = {};
hint.m[_local6].name = _local11;
hint.m[_local6].typeT = _local2.board[_local11].typeT;
hint.m[_local6].kind = _local2.board[_local11].kind;
_local6++;
}
}
}
}
_local3++;
}
_local4++;
}
if (_local13 == 120) {
hint.t1.sLayer--;
}
_local13 = 0;
_local10--;
}
hint.fAT = false;
hint.jma = true;
return(undefined);
}
var _local7 = 0;
while (_local7 < hint.m.length) {
if (_local2.board[hint.m[_local7].name]._name != undefined) {
var _local5 = 0;
while (_local5 < hint.m.length) {
if (hint.m[_local5].name != hint.m[_local7].name) {
if (_local2.board[hint.m[_local5].name]._name != undefined) {
if (hint.m[_local5].typeT == hint.m[_local7].typeT) {
if ((hint.m[_local5].typeT != "flower") && (hint.m[_local5].typeT != "season")) {
if ((hint.m[_local5].kind == hint.m[_local7].kind) && (hint.m[_local5].cc != hint.m[_local7].cc)) {
hint.fHint = true;
hint.t1.name = hint.m[_local5].name;
hint.t1.index = _local5;
hint.t2.name = hint.m[_local7].name;
hint.t2.index = _local7;
hint.jma = false;
return(undefined);
}
} else if (hint.m[_local5].typeT == hint.m[_local7].typeT) {
if (hint.m[_local5].cc != hint.m[_local7].cc) {
hint.fHint = true;
hint.t1.name = hint.m[_local5].name;
hint.t1.index = _local5;
hint.t2.name = hint.m[_local7].name;
hint.t2.index = _local7;
hint.jma = false;
return(undefined);
}
}
}
}
}
_local5++;
}
}
_local7++;
}
if (!hint.fHint) {
if (hint.jma) {
hint.fHint = true;
timer.newInt = setInterval(placeNM, 6500);
return(undefined);
}
hint.fAT = true;
}
}
function placeNM() {
var _local2 = _root;
clearInterval(timer.newInt);
if (_local2.mm._x == undefined) {
_local2.click.start();
_local2.attachMovie("noMatch", "confirm2", 10095);
_local2.confirm2._x = 275;
_local2.confirm2._y = 200;
}
}
function tileFunc() {
}
_root.myGame.startscreens.start(0, 1);
SoundBtn.removeMovieClip();
hintmc.removeMovieClip();
game = {};
game.score = 0;
game.layout = random(3);
game.layout++;
game.selections = [];
game.selections[0] = 1;
game.selections[1] = {};
game.selections[2] = {};
game.js = true;
game.paused = false;
hint = {};
hint.fHint = false;
hint.fAT = true;
hint.t1 = {};
hint.t1.sLayer = 4;
hint.t2 = {};
hint.m = [];
timer = {};
tileFunc.prototype = new MovieClip();
tileFunc.prototype.onRollOver = function () {
if (!game.paused) {
var _local2 = new Color(this);
myColorTransform = new Object();
var myColorTransform = {ra:"50", rb:"244", ga:"40", gb:"112", ba:"12", bb:"90", aa:"100", ab:"0"};
_local2.setTransform(myColorTransform);
}
};
tileFunc.prototype.onReleaseOutside = function () {
if (!this.clicked) {
var _local2 = new Color(this);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
_local2.setTransform(myColorTransform);
}
};
tileFunc.prototype.onRollOut = function () {
if (!this.clicked) {
var _local2 = new Color(this);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
_local2.setTransform(myColorTransform);
}
};
tileFunc.prototype.onRelease = function () {
var _local3 = this;
var _local4 = _root;
if (!game.paused) {
if (game.layout == 1) {
if (_local4[_local3.ref] == _local4.b3) {
if (_local4.b4[3][6][0] == 9) {
return(undefined);
}
}
}
var _local5 = _local4.game.selections[0];
if (_local4.game.selections[_local5 - 1].name != _local3.name) {
if ((_local4[_local3.ref][_local3.y][_local3.x - 1][0] != 9) || (_local4[_local3.ref][_local3.y][_local3.x + 1][0] != 9)) {
if ((_local4[_local3.ref][_local3.y][_local3.x - 1][0] != 8) || (_local4[_local3.ref][_local3.y][_local3.x + 1][0] != 9)) {
if ((_local4[_local3.ref][_local3.y][_local3.x - 1][0] != 9) || (_local4[_local3.ref][_local3.y][_local3.x + 1][0] != 8)) {
var _local7 = _local3.lay + 1;
if (((_local4["b" + _local7][_local3.y][_local3.x][0] == 0) || (_local3.lay == 4)) || (_local4["b" + _local7][_local3.y][_local3.x][0] == 6)) {
click.start();
_local4.game.selections[_local5].name = _local3.name;
_local4.game.selections[_local5].typeT = _local3.typeT;
_local4.game.selections[_local5].kind = _local3.kind;
_local4.game.selections[0]++;
_local3.clicked = true;
if (_local4.game.selections[0] == 3) {
_local4.checkMatch();
}
}
}
}
}
return(undefined);
}
_local4.game.selections[_local5 - 1].name = "";
_local4.game.selections[0]--;
var _local8 = new Color(_local3);
var _local6 = new Object();
_local6 = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
_local8.setTransform(_local6);
_local3.clicked = false;
}
};
Object.registerClass("ballT", tileFunc);
Object.registerClass("bambooT", tileFunc);
Object.registerClass("charT", tileFunc);
Object.registerClass("dragonT", tileFunc);
Object.registerClass("seasonT", tileFunc);
Object.registerClass("windT", tileFunc);
Object.registerClass("flowerT", tileFunc);
wind = new Sound();
wind.attachSound("wind");
keyListener = new Object();
keyListener.onKeyUp = function () {
var _local2 = _root;
if (Key.getCode() == 80) {
if (game.paused) {
timer.timeInt = setInterval(updateTime, 1000);
_local2.paused.removeMovieClip();
game.paused = false;
hintmc._visible = true;
endG._visible = true;
statBar._visible = true;
SoundBtn._visible = true;
return(undefined);
}
clearInterval(timer.timeInt);
_local2.attachMovie("paused", "paused", 10000);
_local2.paused._x = 300;
_local2.paused._y = 225;
hintmc._visible = false;
endG._visible = false;
statBar._visible = false;
SoundBtn._visible = false;
game.paused = true;
}
};
rRT = false;
defineLayouts();
play();
Frame 118
start.onRollOver = function () {
this.bar.gotoAndStop(2);
};
myGame.backSound.stop();
hintmc.removeMovieClip();
SoundBtn.removeMovieClip();
preview.onRollOver = function () {
this.bar.gotoAndStop(2);
};
preview.onRollOut = function () {
this.bar.gotoAndStop(1);
};
preview.onRelease = function () {
click.start();
gotoAndPlay (5);
};
_root.onEnterFrame = function () {
};
stop();
Frame 119
howtoplay_text.text = howtoplaytext;
helptext1_text.text = helptext1;
helptext2_text.text = helptext2;
helptext3_text.text = helptext3;
helptext4_text.text = helptext4;
back_text.text = backtext;
stop();
Frame 120
mm.onRelease = function () {
gotoAndPlay (3);
};
dl.onRelease = function () {
delete game;
delete rRT;
delete keyListener;
delete timer;
delete match;
delete sea;
delete click;
delete wind;
delete hint;
delete defineLayouts;
delete createTileList;
delete copyTiles;
delete createTileList2;
delete createBoard;
delete findSpots;
delete chooseTile;
delete checkMatch;
delete startTimer;
delete updateTime;
delete updateScore;
delete changeBack;
delete findHint;
delete placeNM;
delete tileFunc;
delete changeFrames;
delete loader;
delete frame;
delete ly11;
delete ly12;
delete ly13;
delete ly14;
delete ly15;
delete ly21;
delete ly22;
delete ly23;
delete ly24;
delete ly25;
delete ly31;
delete ly32;
delete ly33;
delete ly34;
delete ly35;
delete layout1;
delete layout2;
delete layout3;
delete layouts;
delete backG;
delete tiles;
delete tiles2;
delete shrinker;
delete cellWidth;
delete cellHeight;
delete b0;
delete b1;
delete b2;
delete b3;
delete b4;
delete n;
delete depth;
delete depth0;
delete season;
delete flower;
delete onEnterFrame;
delete myColorTransform;
};
SoundBtn.removeMovieClip();
stop();
Frame 121
function gogogo() {
clearInterval(gotimer);
play();
}
endG.removeMovieClip();
pausemc.removeMovieClip();
SoundBtn.removeMovieClip();
hintmc.removeMovieClip();
waiting_text.text = waitingtext;
stop();
gotimer = setInterval(gogogo, 3000);
Frame 122
function changeFrames() {
gotoAndPlay ("bgame");
}
myGame.backSound.start(0, 9999);
endG.exit_text.text = exittext;
pausemc.pause_text.text = pausetext;
hintmc.hint_text.text = hinttext;
hintmc.swapDepths(25100);
hintmc.onRelease = function () {
lookingfor();
};
endG.swapDepths(25000);
endG.onRelease = function () {
clearInterval(timer.timeInt);
statBar.removeMovieClip();
back.removeMovieClip();
board.removeMovieClip();
confirm2.removeMovieClip();
bm.removeMovieClip();
confirm.removeMovieClip();
gotoAndPlay ("start");
this.removeMovieClip();
hintmc.removeMovieClip();
pausemc.removeMovieClip();
SoundBtn.removeMovieClip();
};
pausemc.swapDepths(25001);
pausemc.onRelease = function () {
var _local2 = _root;
if (game.paused) {
timer.timeInt = setInterval(updateTime, 1000);
_local2.paused.removeMovieClip();
game.paused = false;
hintmc._visible = true;
endG._visible = true;
statBar._visible = true;
SoundBtn._visible = true;
return(undefined);
}
clearInterval(timer.timeInt);
_local2.attachMovie("paused", "paused", 10000);
_local2.paused._x = 300;
_local2.paused._y = 225;
hintmc._visible = false;
endG._visible = false;
statBar._visible = false;
SoundBtn._visible = false;
game.paused = true;
};
hint.m = [];
Key.addListener(keyListener);
var backg = random(17);
backg++;
changeBack(backg);
if (!rRT) {
createTileList();
}
copyTiles();
createBoard();
if (game.js) {
startTimer();
game.js = false;
} else {
timer.timeInt = setInterval(updateTime, 1000);
}
_root.attachMovie("statBar", "statBar", 9001);
statBar._x = 240;
statBar._y = 414;
statBar.score.text = game.score;
if (timer.second < 10) {
statBar.time.text = (timer.minute + ":0") + timer.second;
} else {
statBar.time.text = (timer.minute + ":") + timer.second;
}
_root.hint.fHint = false;
_root.hint.fAT = true;
_root.onEnterFrame = function () {
};
stop();
var _sound = new Sound(this);
if (_sound.getVolume() == 100) {
SoundBtn.gotoAndStop(1);
} else {
SoundBtn.gotoAndStop(2);
}
SoundBtn.swapDepths(105002);
SoundBtn.onRelease = function () {
if (this._currentframe == 1) {
_sound.setVolume(0);
this.gotoAndStop(2);
} else {
_sound.setVolume(100);
this.gotoAndStop(1);
}
};
Frame 124
function go() {
clearInterval(timer.timeInt);
gotoAndPlay ("bgame");
}
myGame.backSound.stop();
SoundBtn.removeMovieClip();
tonext_text.text = tonexttext;
hintmc.removeMovieClip();
endG.removeMovieClip();
pausemc.removeMovieClip();
qwan.gotoAndPlay("talking");
rRT = false;
clearInterval(timer.timeInt);
timer.timeInt = setInterval(go, 7000);
statBar.removeMovieClip();
back.removeMovieClip();
board.removeMovieClip();
defineLayouts();
game.layout++;
hint.fHint = false;
hint.fAT = true;
if (game.layout > 3) {
game.layout = 1;
}
game.score = game.score + 5000;
_root.onEnterFrame = function () {
};
stop();
Frame 125
function md5(s) {
return(binl2hex(core_md5(str2binl(s), s.length * strsize)));
}
function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local4 = 1732584193 /* 0x67452301 */;
var _local3 = -271733879;
var _local2 = -1732584194;
var _local1 = 271733878 /* 0x10325476 */;
var _local5 = 0;
while (_local5 < x.length) {
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
var _local7 = _local1;
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 0], 7, -680876936);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 1], 12, -389564586);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 2], 17, 606105819);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 3], 22, -1044525330);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 4], 7, -176418897);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 5], 12, 1200080426);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 6], 17, -1473231341);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 7], 22, -45705983);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 8], 7, 1770035416);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 9], 12, -1958414417);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 10], 17, -42063);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 11], 22, -1990404162);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 12], 7, 1804603682);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 13], 12, -40341101);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 14], 17, -1502002290);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 15], 22, 1236535329);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 1], 5, -165796510);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 6], 9, -1069501632);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 11], 14, 643717713);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 0], 20, -373897302);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 5], 5, -701558691);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 10], 9, 38016083);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 15], 14, -660478335);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 4], 20, -405537848);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 9], 5, 568446438);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 14], 9, -1019803690);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 3], 14, -187363961);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 8], 20, 1163531501);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 13], 5, -1444681467);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 2], 9, -51403784);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 7], 14, 1735328473);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 12], 20, -1926607734);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 5], 4, -378558);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 8], 11, -2022574463);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 11], 16, 1839030562);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 14], 23, -35309556);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 1], 4, -1530992060);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 4], 11, 1272893353);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 7], 16, -155497632);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 10], 23, -1094730640);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 13], 4, 681279174);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 0], 11, -358537222);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 3], 16, -722521979);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 6], 23, 76029189);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 9], 4, -640364487);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 12], 11, -421815835);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 15], 16, 530742520);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 2], 23, -995338651);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 0], 6, -198630844);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 7], 10, 1126891415);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 14], 15, -1416354905);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 5], 21, -57434055);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 12], 6, 1700485571);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 3], 10, -1894986606);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 10], 15, -1051523);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 1], 21, -2054922799);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 8], 6, 1873313359);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 15], 10, -30611744);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 6], 15, -1560198380);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 13], 21, 1309151649);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 4], 6, -145523070);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 11], 10, -1120210379);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 2], 15, 718787259);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 9], 21, -343485551);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local1 = safe_add(_local1, _local7);
_local5 = _local5 + 16;
}
return(Array(_local4, _local3, _local2, _local1));
}
function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
function safe_add(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function str2binl(str) {
var _local2 = Array();
var _local4 = (1 << strsize) - 1;
var _local1 = 0;
while (_local1 < (str.length * strsize)) {
_local2[_local1 >> 5] = _local2[_local1 >> 5] | ((str.charCodeAt(_local1 / strsize) & _local4) << (_local1 % 32));
_local1 = _local1 + strsize;
}
return(_local2);
}
function binl2hex(binarray) {
if (hexcase) {
}
var _local4 = "0123456789abcdef";
var _local3 = "";
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local3 = _local3 + (_local4.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local4.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local3);
}
function submitScore() {
hash = md5(((url + gamename) + score) + "zygomaticgames");
getURL (((((("http://www.gamesonly.net/highscore.php?game=" + gamename) + "&score=") + score) + "&otherparam=") + hash) + "", "_blank");
}
clearInterval(timer.timeInt);
myGame.backSound.stop();
SoundBtn.removeMovieClip();
statBar.removeMovieClip();
back.removeMovieClip();
board.removeMovieClip();
confirm2.removeMovieClip();
hintmc.removeMovieClip();
pausemc.removeMovieClip();
endG.removeMovieClip();
bm.removeMovieClip();
confirm.removeMovieClip();
score = game.score;
gcode = _level0.gcode;
gr_game = "5A7DCF72";
gameID = "5A7DCF72";
submit.onRelease = function () {
delete game;
delete rRT;
delete keyListener;
delete timer;
delete match;
delete sea;
delete click;
delete wind;
delete hint;
delete defineLayouts;
delete createTileList;
delete copyTiles;
delete createTileList2;
delete createBoard;
delete findSpots;
delete chooseTile;
delete checkMatch;
delete startTimer;
delete updateTime;
delete updateScore;
delete changeBack;
delete findHint;
delete placeNM;
delete tileFunc;
delete changeFrames;
delete loader;
delete frame;
delete ly11;
delete ly12;
delete ly13;
delete ly14;
delete ly15;
delete ly21;
delete ly22;
delete ly23;
delete ly24;
delete ly25;
delete ly31;
delete ly32;
delete ly33;
delete ly34;
delete ly35;
delete layout1;
delete layout2;
delete layout3;
delete layouts;
delete backG;
delete tiles;
delete tiles2;
delete shrinker;
delete cellWidth;
delete cellHeight;
delete b0;
delete b1;
delete b2;
delete b3;
delete b4;
delete n;
delete depth;
delete depth0;
delete season;
delete flower;
delete onEnterFrame;
delete myColorTransform;
if (score == 0) {
score = 5;
}
submitScore();
};
mm.onRelease = function () {
gotoAndPlay ("start");
};
dl.onRelease = function () {
delete game;
delete rRT;
delete keyListener;
delete timer;
delete match;
delete sea;
delete click;
delete wind;
delete hint;
delete defineLayouts;
delete createTileList;
delete copyTiles;
delete createTileList2;
delete createBoard;
delete findSpots;
delete chooseTile;
delete checkMatch;
delete startTimer;
delete updateTime;
delete updateScore;
delete changeBack;
delete findHint;
delete placeNM;
delete tileFunc;
delete changeFrames;
delete loader;
delete frame;
delete ly11;
delete ly12;
delete ly13;
delete ly14;
delete ly15;
delete ly21;
delete ly22;
delete ly23;
delete ly24;
delete ly25;
delete ly31;
delete ly32;
delete ly33;
delete ly34;
delete ly35;
delete layout1;
delete layout2;
delete layout3;
delete layouts;
delete backG;
delete tiles;
delete tiles2;
delete shrinker;
delete cellWidth;
delete cellHeight;
delete b0;
delete b1;
delete b2;
delete b3;
delete b4;
delete n;
delete depth;
delete depth0;
delete season;
delete flower;
delete onEnterFrame;
delete myColorTransform;
getURL ("http://www.flowgo.com/page.cfm?lk=40657", "_self", "POST");
};
_root.onEnterFrame = function () {
};
stop();
var hexcase = 0;
var strsize = 8;
Symbol 13 MovieClip [paused] Frame 1
paused_text.text = _root.pausedtext;
Symbol 17 MovieClip [firework] Frame 11
this.removeMovieClip();
Symbol 27 MovieClip [statBar] Frame 1
reshuffle_text.text = _root.reshuffletext;
changebackground_text.text = _root.changebackgroundtext;
cb.onRelease = function () {
var _local2 = _root;
_local2.click.start();
_local2.attachMovie("backMenu", "bM", 9010);
_local2.bM._x = 275;
_local2.bm._y = 200;
};
reshuffle.onRelease = function () {
var _local2 = _root;
_local2.click.start();
_local2.attachMovie("confirm", "confirm", 9019);
_local2.confirm._x = 275;
_local2.confirm._y = 200;
};
Symbol 63 MovieClip [backMenu] Frame 1
t1.onRelease = function () {
_root.click.start();
_root.changeBack(1);
};
t2.onRelease = function () {
_root.click.start();
_root.changeBack(2);
};
t3.onRelease = function () {
_root.click.start();
_root.changeBack(3);
};
t4.onRelease = function () {
_root.click.start();
_root.changeBack(4);
};
t5.onRelease = function () {
_root.click.start();
_root.changeBack(5);
};
t6.onRelease = function () {
_root.click.start();
_root.changeBack(6);
};
t7.onRelease = function () {
_root.click.start();
_root.changeBack(7);
};
t8.onRelease = function () {
_root.click.start();
_root.changeBack(8);
};
t9.onRelease = function () {
_root.click.start();
_root.changeBack(9);
};
t10.onRelease = function () {
_root.click.start();
_root.changeBack(10);
};
t11.onRelease = function () {
_root.click.start();
_root.changeBack(11);
};
t12.onRelease = function () {
_root.click.start();
_root.changeBack(12);
};
t13.onRelease = function () {
_root.click.start();
_root.changeBack(13);
};
t14.onRelease = function () {
_root.click.start();
_root.changeBack(14);
};
t15.onRelease = function () {
_root.click.start();
_root.changeBack(15);
};
t16.onRelease = function () {
_root.click.start();
_root.changeBack(16);
};
t17.onRelease = function () {
_root.click.start();
_root.changeBack(17);
};
done_text.text = _root.donetext;
_root.endG._visible = false;
_root.pausemc._visible = false;
_root.hintmc._visible = false;
_root.statBar._visible = false;
done.onRelease = function () {
_root.endG._visible = true;
_root.pausemc._visible = true;
_root.hintmc._visible = true;
_root.statBar._visible = true;
_root.click.start();
_root.bM.removeMovieClip();
};
Symbol 116 MovieClip [confirm] Frame 1
whatwouldyouliketodo_text.text = _root.whatwouldyouliketodotext;
shuffletheremainingtiles_text.text = _root.shuffletheremainingtilestext;
startoverwiththesamelayout_text.text = _root.startoverwiththesamelayouttext;
startoverwithadifferentlayout_text.text = _root.startoverwithadifferentlayouttext;
cancel_text.text = _root.canceltext;
sRT.onRelease = function () {
var _local3 = _root;
_local3.game.selections[0] = 1;
_local3.click.start();
_local3.rRT = true;
_local3.game.score = _local3.game.score - 200;
clearInterval(_local3.timer.timeInt);
_local3.board.removeMovieClip();
var _local2 = 0;
while (_local2 < _local3.levels) {
_local3["b" + _local2] = [];
_local2++;
}
_local3.back.removeMovieClip();
_local3.changeFrames();
_local3.statBar.removeMovieClip();
_local3.confirm.removeMovieClip();
};
sSL.onRelease = function () {
var _local3 = _root;
_local3.game.selections[0] = 1;
_local3.click.start();
_local3.rRT = false;
_local3.game.score = _local3.game.score - 400;
_local3.defineLayouts();
clearInterval(_local3.timer.timeInt);
_local3.board.removeMovieClip();
var _local2 = 0;
while (_local2 < _local3.levels) {
_local3["b" + _local2] = [];
_local2++;
}
_local3.back.removeMovieClip();
_local3.changeFrames();
_local3.statBar.removeMovieClip();
_local3.confirm.removeMovieClip();
};
sDL.onRelease = function () {
var _local3 = _root;
_local3.game.selections[0] = 1;
_local3.click.start();
_local3.rRT = false;
_local3.game.score = _local3.game.score - 400;
_local3.defineLayouts();
_local3.game.layout++;
if (_local3.game.layout == 4) {
_local3.game.layout = 1;
}
clearInterval(_local3.timer.timeInt);
_local3.board.removeMovieClip();
var _local2 = 0;
while (_local2 < _local3.levels) {
_local3["b" + _local2] = [];
_local2++;
}
_local3.back.removeMovieClip();
_local3.changeFrames();
_local3.statBar.removeMovieClip();
_local3.confirm.removeMovieClip();
};
no.onRelease = function () {
_root.click.start();
_root.confirm.removeMovieClip();
};
Symbol 118 MovieClip [noMatch] Frame 1
sRT.onRelease = function () {
var _local3 = _root;
_local3.hint.fHint = false;
_local3.hint.fAT = true;
_local3.click.start();
_local3.rRT = true;
_local3.game.score = _local3.game.score - 500;
clearInterval(_local3.timer.timeInt);
_local3.board.removeMovieClip();
var _local2 = 0;
while (_local2 < _local3.levels) {
_local3["b" + _local2] = [];
_local2++;
}
_local3.back.removeMovieClip();
_local3.changeFrames();
_local3.statBar.removeMovieClip();
_local3.confirm2.removeMovieClip();
};
sSL.onRelease = function () {
var _local3 = _root;
_local3.hint.fHint = false;
_local3.hint.fAT = true;
_local3.click.start();
_local3.rRT = false;
_local3.defineLayouts();
clearInterval(_local3.timer.timeInt);
_local3.board.removeMovieClip();
var _local2 = 0;
while (_local2 < _local3.levels) {
_local3["b" + _local2] = [];
_local2++;
}
_local3.back.removeMovieClip();
_local3.changeFrames();
_local3.statBar.removeMovieClip();
_local3.confirm2.removeMovieClip();
};
sDL.onRelease = function () {
var _local3 = _root;
_local3.hint.fHint = false;
_local3.hint.fAT = true;
_local3.click.start();
_local3.rRT = false;
_local3.defineLayouts();
_local3.game.layout++;
if (_local3.game.layout == 4) {
_local3.game.layout = 1;
}
clearInterval(_local3.timer.timeInt);
_local3.board.removeMovieClip();
var _local2 = 0;
while (_local2 < _local3.levels) {
_local3["b" + _local2] = [];
_local2++;
}
_local3.back.removeMovieClip();
_local3.changeFrames();
_local3.statBar.removeMovieClip();
_local3.confirm2.removeMovieClip();
};
Symbol 122 MovieClip Frame 1
stop();
Symbol 134 MovieClip [ballT] Frame 1
stop();
Symbol 134 MovieClip [ballT] Frame 2
stop();
Symbol 134 MovieClip [ballT] Frame 3
stop();
Symbol 134 MovieClip [ballT] Frame 4
stop();
Symbol 134 MovieClip [ballT] Frame 5
stop();
Symbol 134 MovieClip [ballT] Frame 6
stop();
Symbol 134 MovieClip [ballT] Frame 7
stop();
Symbol 134 MovieClip [ballT] Frame 8
stop();
Symbol 134 MovieClip [ballT] Frame 9
stop();
Symbol 145 MovieClip [bambooT] Frame 1
stop();
Symbol 145 MovieClip [bambooT] Frame 2
stop();
Symbol 145 MovieClip [bambooT] Frame 3
stop();
Symbol 145 MovieClip [bambooT] Frame 4
stop();
Symbol 145 MovieClip [bambooT] Frame 5
stop();
Symbol 145 MovieClip [bambooT] Frame 6
stop();
Symbol 145 MovieClip [bambooT] Frame 7
stop();
Symbol 145 MovieClip [bambooT] Frame 8
stop();
Symbol 145 MovieClip [bambooT] Frame 9
stop();
Symbol 155 MovieClip [charT] Frame 1
stop();
Symbol 155 MovieClip [charT] Frame 2
stop();
Symbol 155 MovieClip [charT] Frame 3
stop();
Symbol 155 MovieClip [charT] Frame 4
stop();
Symbol 155 MovieClip [charT] Frame 5
stop();
Symbol 155 MovieClip [charT] Frame 6
stop();
Symbol 155 MovieClip [charT] Frame 7
stop();
Symbol 155 MovieClip [charT] Frame 8
stop();
Symbol 155 MovieClip [charT] Frame 9
stop();
Symbol 159 MovieClip [dragonT] Frame 1
stop();
Symbol 159 MovieClip [dragonT] Frame 2
stop();
Symbol 159 MovieClip [dragonT] Frame 3
stop();
Symbol 164 MovieClip [flowerT] Frame 1
stop();
Symbol 164 MovieClip [flowerT] Frame 2
stop();
Symbol 164 MovieClip [flowerT] Frame 3
stop();
Symbol 164 MovieClip [flowerT] Frame 4
stop();
Symbol 169 MovieClip [windT] Frame 1
stop();
Symbol 169 MovieClip [windT] Frame 2
stop();
Symbol 169 MovieClip [windT] Frame 3
stop();
Symbol 169 MovieClip [windT] Frame 4
stop();
Symbol 174 MovieClip [seasonT] Frame 1
stop();
Symbol 174 MovieClip [seasonT] Frame 2
stop();
Symbol 174 MovieClip [seasonT] Frame 3
stop();
Symbol 174 MovieClip [seasonT] Frame 4
stop();
Symbol 585 MovieClip [__Packages.mochi.as2.MochiAd] Frame 0
class mochi.as2.MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("3.0 as2");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local7 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local7._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
if (_local7._url.indexOf("http") != 0) {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
}
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
mochi.as2.MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 202 MovieClip Frame 80
stop();
Symbol 206 MovieClip Frame 107
stop();
Symbol 229 Button
on (release) {
_root.myGame.sndls.stop();
_root.nextFrame();
}
Symbol 240 MovieClip Frame 28
_root.myGame.sndls1.start(0, 1);
Symbol 240 MovieClip Frame 34
_root.myGame.sndls1.start(0, 1);
Symbol 240 MovieClip Frame 38
_root.myGame.sndls1.start(0, 1);
Symbol 241 MovieClip Frame 1
_root.myGame.sndls.start(0, 3);
Symbol 241 MovieClip Frame 174
_root.myGame.sndls.stop();
_root.nextFrame();
Symbol 242 MovieClip Frame 1
stop();
Symbol 242 MovieClip Frame 2
stop();
Symbol 301 Button
on (release) {
gotoAndStop ("bgame");
}
Symbol 302 Button
on (release) {
gotoAndStop ("help");
}
Symbol 303 Button
on (release) {
getURL (("http://" + _root.url) + "/highscore.php", "_blank");
}
Symbol 304 Button
on (release) {
getURL ("http://" + _root.url, "_blank");
}
Symbol 314 Button
on (release) {
getURL ("http://" + _root.url, "_blank");
}
Symbol 333 Button
on (release) {
gotoAndPlay ("start");
}
Symbol 545 MovieClip Frame 104
gotoAndPlay ("still");
Symbol 545 MovieClip Frame 176
gotoAndPlay ("talking");
Symbol 561 MovieClip Frame 1
stop();
Symbol 571 MovieClip Frame 1
stop();
Symbol 571 MovieClip Frame 2