Frame 1
if (this.inited == undefined) {
this.inited = true;
com.novelgames.flashgames.MainBombazDemo.initialize(this);
this.getEnterPosition = function (from_str) {
if (from_str.substr(0, 3) == "bg_") {
from_str = "bacteria_game";
}
return({x:this.decor.playerPlace._x, y:this.decor.playerPlace._y, cam:this.decor.cam_chamdedal});
};
this.onSpecialCollision = function (instance, chimbo) {
switch (instance) {
case "player_1" :
if (_level0.member_id > 0) {
_level0.server.send("<reqgam p='0' />");
}
break;
case "player_2" :
if (_level0.member_id > 0) {
_level0.server.send("<reqgam p='1' />");
}
break;
case "go_totaj" :
_level0.goto_chimberg("mountain.to_taj");
break;
case "go_chamdedal" :
_level0.goto_chimberg("mountain.chample_dedal");
}
};
this.onSpecialCollisionOut = function (instance, chimbo) {
switch (instance) {
case "player_1" :
case "player_2" :
if (_level0.member_id <= 0) {
break;
}
_level0.server.send("<creqgam/>");
}
};
this.onCustomMessage = function (type, _xml) {
this.kashgame.onCustomMessage(type, _xml);
};
this.cleanBeforeUnload = function () {
clearInterval(decor.cabine.interval);
};
this.prepareToStart = function (chimbo_mc) {
if (this.req0 == "1") {
decor.temoin_p1.gotoAndStop(2);
decor.cabine.socle_p1.play();
} else if (this.req1 == "1") {
decor.temoin_p2.gotoAndStop(2);
decor.cabine.socle_p2.play();
}
};
collclip._xscale = (collclip._yscale = 100);
collclip._x = (collclip._y = 0);
collclip._visible = false;
speCollClip._xscale = (speCollClip._yscale = 100);
speCollClip._x = (speCollClip._y = 0);
speCollClip._visible = false;
decor._xscale = (decor._yscale = 100);
decor._x = (decor._y = 0);
decor.template_character._visible = false;
_level0.chimberg_name = _level0.localString("bombaz");
}
stop();
Symbol 10 MovieClip [explode] Frame 1
#initclip 35
Object.registerClass("explode", com.novelgames.flashgames.bombaz.Explode);
#endinitclip
Symbol 11 MovieClip [fallingBlocks] Frame 1
#initclip 26
Object.registerClass("fallingBlocks", com.novelgames.flashgames.bombaz.FallingBlocks);
#endinitclip
Symbol 17 MovieClip [scorePopup] Frame 1
#initclip 27
Object.registerClass("scorePopup", com.novelgames.flashgames.bombaz.ScorePopup);
#endinitclip
Symbol 31 MovieClip [startButton] Frame 1
#initclip 28
Object.registerClass("startButton", chapatiz.display.MCButton);
#endinitclip
Symbol 36 MovieClip [highScoresButton] Frame 1
#initclip 29
Object.registerClass("highScoresButton", chapatiz.display.MCButton);
#endinitclip
Symbol 37 MovieClip [message] Frame 1
#initclip 30
Object.registerClass("message", com.novelgames.flashgames.bombaz.Message);
#endinitclip
Symbol 40 MovieClip [muteButton] Frame 1
#initclip 31
Object.registerClass("muteButton", com.novelgames.flashgames.bombaz.MuteButton);
#endinitclip
Symbol 69 MovieClip [game] Frame 1
#initclip 32
Object.registerClass("game", com.novelgames.flashgames.bombaz.Game);
#endinitclip
Symbol 84 MovieClip Frame 1
stop();
Symbol 97 MovieClip Frame 1
stop();
Symbol 98 MovieClip [block] Frame 1
#initclip 33
Object.registerClass("block", com.novelgames.flashgames.bombaz.Block);
#endinitclip
Symbol 143 MovieClip Frame 1
stop();
Symbol 145 MovieClip Frame 20
stop();
Symbol 145 MovieClip Frame 30
stop();
Symbol 156 MovieClip Frame 1
stop();
Symbol 156 MovieClip Frame 103
gotoAndStop (1);
Symbol 158 MovieClip Frame 1
stop();
Symbol 158 MovieClip Frame 103
gotoAndStop (1);
Symbol 161 MovieClip [empty] Frame 1
#initclip 34
Object.registerClass("empty", com.novelgames.flashgames.commonAS2.NewMovieClip);
#endinitclip
Symbol 163 MovieClip [__Packages.com.novelgames.flashgames.MainBombazDemo] Frame 0
class com.novelgames.flashgames.MainBombazDemo extends MovieClip
{
var stop, rideau, gotoAndStop, game;
function MainBombazDemo () {
super();
}
static function initialize(movieClip) {
movieClip.__proto__ = com.novelgames.flashgames.MainBombazDemo.prototype;
movieClip.rideau.stop();
movieClip.gotoTitlePage();
com.novelgames.flashgames.bombaz.Config.GAME_DEMO = true;
}
function gotoTitlePage() {
stop();
rideau.screenPlay.gotoAndStop("infos");
rideau.gotoAndPlay("close");
trace(this);
rideau.screenPlay.startButton.onRelease = function () {
this._parent._parent._parent.gotoInstructionsPage();
};
rideau.screenPlay.highScoresButton.onRelease = function () {
this.getURL("http://www.chapatiz.com/games/bombaz/", "_blank");
};
rideau.screenPlay.moreGamesButton.text = "More Games";
rideau.screenPlay.moreGamesButton.onRelease = function () {
this.getURL("http://www.chapatiz.com/games/", "_blank");
};
}
function gotoInstructionsPage() {
rideau.screenPlay.gotoAndStop("instructions");
rideau.screenPlay.startButton.onReleaseMC = function () {
this._parent._parent._parent.rideau.gotoAndPlay("open");
this._parent._parent._parent.gotoGamePage();
};
}
function gotoGamePage() {
gotoAndStop("game");
for (var _local2 in game) {
trace(game[_local2]);
if (typeof(game[_local2]) == "movieclip") {
game[_local2].removeMovieClip();
}
}
game.attachMovie("game", "game", game.getNextHighestDepth(), {_x:0, _y:0});
}
function showHighScores() {
trace("showHighScores()");
}
function showEnterHighScore(score) {
trace(("showEnterHighScore(" + score) + ")");
}
}
Symbol 164 MovieClip [__Packages.com.novelgames.flashgames.bombaz.Config] Frame 0
class com.novelgames.flashgames.bombaz.Config
{
function Config () {
}
static var BLOCKS_SIZE = 25;
static var BLOCKS_DIMENSIONX = 12;
static var BLOCKS_DIMENSIONY = 12;
static var BLOCKS_COLOURS = [2, 3, 5, 4, 6, 7];
static var BLOCKS_MOVETIME = 50;
static var BLOCKS_ROTATETIME = 50;
static var BLOCKS_DROPSPEED = 1000;
static var BLOCKS_GROUPSIZE = 2;
static var BLOCKS_GAMEOVERCOLOUR = 1;
static var CARD_GENERATERATE = 3;
static var EXPLODE_INTERVAL = 50;
static var EXPLODE_APPEARTIME = 150;
static var EXPLODE_ROTATE = 180;
static var EXPLODE_NOOFPIECES = 4;
static var LEVEL_INITIALSPEED = 40;
static var LEVEL_SPEEDINCREASE = 5;
static var LEVEL_MAXSPEED = BLOCKS_DROPSPEED;
static var LEVEL_INITIALCARDRATIO = 40;
static var LEVEL_CARDRATIODECREASE = 5;
static var LEVEL_MINCARDRATIO = 10;
static var LEVEL_INITIALBANKRATIO = 5;
static var LEVEL_BANKRATIOINCREASE = 0;
static var LEVEL_INITIALDESTROYTARGET = 50;
static var LEVEL_DESTROYTARGETINCREASE = 10;
static var LEVEL_INITIALNOOFCOLOURS = 3;
static var LEVEL_NOOFCOLOURSINCREASE = 0.5;
static var LEVELCLEAR_ROWINTERVAL = 100;
static var LEVELCLEAR_EXPLODETIME = 300;
static var SCORE_BLOCK = 50;
static var SCORE_COMBO = 30;
static var SCOREPOPUP_STAYTIME = 500;
static var SCOREPOPUP_DISAPPEARTIME = 200;
static var MESSAGE_LEVELTIME = 2000;
static var MESSAGE_LEVELCLEARTIME = 2500;
static var MESSAGE_GAMEOVERTIME = 1000;
}
Symbol 165 MovieClip [__Packages.com.wiicade.Wii] Frame 0
class com.wiicade.Wii
{
static var instance;
var keyboard, lc;
function Wii () {
if (!_global.Wii) {
_global.Wii = this;
} else {
return;
}
wii = System.capabilities.os == "Nintendo Wii";
com.wiicade.WiiRemote.init();
com.wiicade.KeyboardController.init();
com.wiicade.Browser.init();
var _local3 = 0;
while (_local3 < 4) {
remotes[_local3] = new com.wiicade.WiiRemote(_local3);
_local3++;
}
if (!isWii()) {
keyboard = new com.wiicade.KeyboardController(wiicommand);
}
lc = new LocalConnection();
lc.connect("wii");
lc.wiicommand = function (packet) {
_global.Wii.wiicommand(packet);
};
if (isWii()) {
getURL (((("javascript:initializeWiiCadeAPI(20, " + Stage.width) + ", ") + Stage.height) + ");");
}
}
static function getInstance() {
if (!_global.Wii) {
instance = new com.wiicade.Wii();
}
return(_global.Wii);
}
static function init() {
_global.Wii = null;
instance = new com.wiicade.Wii();
}
static function isWii() {
var _local1 = getInstance();
return(_local1.wii || (_local1.virtualized));
}
function wiicommand(packet) {
var _local4 = getInstance();
var _local2 = (4294901760 & packet) >> 16;
var _local3 = packet & 65535;
if (_local2 < 5) {
_local4.remotes[_local2 - 1].buttonsUpdated(_local3);
} else if (_local2 < 9) {
_local4.remotes[_local2 - 5].twistUpdated(_local3);
} else if (_local2 < 13) {
_local4.remotes[_local2 - 9].distanceUpdated(_local3);
} else if (_local2 == 13) {
parseFlags(_local3);
} else if (_local2 < 18) {
parseAttachment(_local3, _local2 - 14);
} else if (_local2 < 22) {
_local4.remotes[_local2 - 18].cursorXUpdated(_local3);
} else if (_local2 < 32) {
_local4.remotes[_local2 - 22].cursorYUpdated(_local3);
}
}
function parseFlags(flags) {
var _local7 = primary;
var _local3;
var _local4;
var _local5 = 8;
primary = flags & 3;
if (primary != _local7) {
getRemote(_local7).updatePrimary(false);
getRemote(primary).updatePrimary(true);
}
virtualized = (4 & _local5) > 0;
var _local2 = 0;
while (_local2 < 4) {
_local3 = getRemote(_local2);
_local4 = (_local5 & flags) > 0;
if (_local3.isConnected() != _local4) {
_local3.connectedUpdated(_local4);
}
_local5 = _local5 << 1;
_local2++;
}
}
function parseAttachment(data, remote) {
var _local4 = getRemote(remote);
var _local3 = _local4.getAttachment();
var _local2;
var _local1;
if ((data & 256) == 0) {
if (!(_local3 instanceof com.wiicade.Nunchuk)) {
_local3 = new com.wiicade.Nunchuk(_local4);
_local4.updateAttachment(_local3);
}
_local3.updateButtons(data & 3);
_local2 = (data & 28) >>> 2;
_local1 = (data & 224) >>> 5;
if ((_local2 & 4) > 0) {
_local2 = _local2 | 65528;
}
if ((_local1 & 4) > 0) {
_local1 = _local1 | 65528;
}
_local2 = Math.floor((_local2 * 128) / 3);
_local1 = Math.floor((_local1 * 128) / 3);
_local3.updateStick(_local2, _local1);
}
}
static function getRemote(identity) {
var _local1 = getInstance();
if ((!_local1.activated[identity]) && (_local1.isWii())) {
getURL (("javascript:activateWiiRemoteFeature(" + identity) + ", null, true);");
_local1.activated[identity] = true;
}
return(_local1.remotes[identity]);
}
static function getPrimaryRemote() {
var _local1 = getInstance();
return(_local1.remotes[_local1.primary]);
}
static var COMMAND_BUTTONS = 1;
static var COMMAND_TWIST = 5;
static var COMMAND_DISTANCE = 9;
static var COMMAND_FLAGS = 13;
static var COMMAND_ATTACH = 14;
static var COMMAND_CURSORX = 18;
static var COMMAND_CURSORY = 22;
var remotes = new Array();
var activated = new Array();
var primary = 0;
var virtualized = false;
var wii = true;
}
Symbol 166 MovieClip [__Packages.com.wiicade.KeyboardController] Frame 0
class com.wiicade.KeyboardController
{
static var keyCodes, buttonCodes;
var callback;
function KeyboardController (callback) {
this.callback = callback;
Key.addListener(this);
Mouse.addListener(this);
if (!keyCodes) {
init();
}
}
static function init() {
keyCodes = new Array();
buttonCodes = new Array();
keyCodes[37] = com.wiicade.WiiRemote.BUTTON_LEFT;
keyCodes[38] = com.wiicade.WiiRemote.BUTTON_UP;
keyCodes[39] = com.wiicade.WiiRemote.BUTTON_RIGHT;
keyCodes[40] = com.wiicade.WiiRemote.BUTTON_DOWN;
keyCodes[65] = com.wiicade.WiiRemote.BUTTON_1;
keyCodes[83] = com.wiicade.WiiRemote.BUTTON_2;
keyCodes[68] = com.wiicade.WiiRemote.BUTTON_A;
keyCodes[32] = com.wiicade.WiiRemote.BUTTON_B;
keyCodes[187] = com.wiicade.WiiRemote.BUTTON_PLUS;
keyCodes[189] = com.wiicade.WiiRemote.BUTTON_MINUS;
buttonCodes[com.wiicade.WiiRemote.BUTTON_LEFT] = 37;
buttonCodes[com.wiicade.WiiRemote.BUTTON_UP] = 38;
buttonCodes[com.wiicade.WiiRemote.BUTTON_RIGHT] = 39;
buttonCodes[com.wiicade.WiiRemote.BUTTON_DOWN] = 40;
buttonCodes[com.wiicade.WiiRemote.BUTTON_1] = 65;
buttonCodes[com.wiicade.WiiRemote.BUTTON_2] = 83;
buttonCodes[com.wiicade.WiiRemote.BUTTON_A] = 68;
buttonCodes[com.wiicade.WiiRemote.BUTTON_B] = 32;
buttonCodes[com.wiicade.WiiRemote.BUTTON_PLUS] = 187;
buttonCodes[com.wiicade.WiiRemote.BUTTON_MINUS] = 189;
}
function onKeyDown() {
var _local2 = Key.getCode();
if (keyCodes[_local2]) {
bitmap = bitmap | keyCodes[_local2];
callback((com.wiicade.Wii.COMMAND_BUTTONS << 16) | bitmap);
}
}
function onKeyUp() {
var _local2 = Key.getCode();
if (keyCodes[_local2]) {
bitmap = bitmap & (~keyCodes[_local2]);
callback((com.wiicade.Wii.COMMAND_BUTTONS << 16) | bitmap);
}
}
function onMouseDown() {
bitmap = bitmap | com.wiicade.WiiRemote.BUTTON_A;
callback((com.wiicade.Wii.COMMAND_BUTTONS << 16) | bitmap);
}
function onMouseUp() {
bitmap = bitmap & (~com.wiicade.WiiRemote.BUTTON_A);
callback((com.wiicade.Wii.COMMAND_BUTTONS << 16) | bitmap);
}
function onMouseMove() {
callback((com.wiicade.Wii.COMMAND_CURSORX << 16) | _xmouse);
callback((com.wiicade.Wii.COMMAND_CURSORY << 16) | _ymouse);
}
static function getButtonMappingForKey(keyCode) {
if (!keyCodes) {
com.wiicade.Wii.isWii();
}
return(keyCodes[keyCode]);
}
static function getKeyMappingForButton(buttonCode) {
if (!keyCodes) {
com.wiicade.Wii.isWii();
}
return(buttonCodes[buttonCode]);
}
static function setKeyMapping(buttonCode, keyCode) {
if (!keyCodes) {
com.wiicade.Wii.isWii();
}
var _local1 = buttonCodes[buttonCode];
var _local2 = keyCodes[keyCode];
if (_local1) {
keyCodes[_local1] = null;
}
if (_local2) {
buttonCodes[_local2] = null;
}
keyCodes[keyCode] = buttonCode;
buttonCodes[buttonCode] = keyCode;
}
var bitmap = 0;
}
Symbol 167 MovieClip [__Packages.com.wiicade.WiiRemote] Frame 0
class com.wiicade.WiiRemote
{
var identity, attachment, activated, dispatchEvent, oldcursorx, oldcursory;
function WiiRemote (identity) {
this.identity = identity;
allowRotate = com.wiicade.Wii.isWii();
attachment = new com.wiicade.Nunchuk(this);
activated = new Array();
if (this.identity == 0) {
primary = true;
connected = true;
}
mx.events.EventDispatcher.initialize(this);
}
static function init() {
}
function getIdentity() {
return(identity);
}
function isPrimary() {
return(primary);
}
function isConnected() {
return(connected);
}
function isRotated() {
return(rotated);
}
function setRotated(rotate) {
rotated = rotate;
}
function getTwistAngle() {
if ((!activated[com.wiicade.Wii.COMMAND_TWIST]) && (com.wiicade.Wii.isWii())) {
getURL (((("javascript:activateWiiRemoteFeature(" + identity) + ", ") + (com.wiicade.Wii.COMMAND_TWIST + identity)) + ", true);");
activated[com.wiicade.Wii.COMMAND_TWIST] = true;
}
return(twistAngle);
}
function getDistance() {
if ((!activated[com.wiicade.Wii.COMMAND_DISTANCE]) && (com.wiicade.Wii.isWii())) {
getURL (((("javascript:activateWiiRemoteFeature(" + identity) + ", ") + (com.wiicade.Wii.COMMAND_DISTANCE + identity)) + ", true);");
activated[com.wiicade.Wii.COMMAND_DISTANCE] = true;
}
return(distance);
}
function getCursorX() {
if ((!activated[com.wiicade.Wii.COMMAND_CURSORX]) && (com.wiicade.Wii.isWii())) {
getURL (((("javascript:activateWiiRemoteFeature(" + identity) + ", ") + (com.wiicade.Wii.COMMAND_CURSORX + identity)) + ", true);");
activated[com.wiicade.Wii.COMMAND_CURSORX] = true;
}
return(cursorx);
}
function getCursorY() {
if ((!activated[com.wiicade.Wii.COMMAND_CURSORX]) && (com.wiicade.Wii.isWii())) {
getURL (((("javascript:activateWiiRemoteFeature(" + identity) + ", ") + (com.wiicade.Wii.COMMAND_CURSORX + identity)) + ", true);");
activated[com.wiicade.Wii.COMMAND_CURSORX] = true;
}
return(cursory);
}
function isFacingScreen() {
return((cursorx > 0) || (cursory > 0));
}
function isDown(buttonCode) {
if (rotated && (allowRotate)) {
if (buttonCode == BUTTON_UP) {
buttonCode = BUTTON_RIGHT;
} else if (buttonCode == BUTTON_RIGHT) {
buttonCode = BUTTON_DOWN;
} else if (buttonCode == BUTTON_DOWN) {
buttonCode = BUTTON_LEFT;
} else if (buttonCode == BUTTON_LEFT) {
buttonCode = BUTTON_UP;
}
}
return((pressed & buttonCode) > 0);
}
function getAttachment() {
if ((!activated[com.wiicade.Wii.COMMAND_ATTACH]) && (com.wiicade.Wii.isWii())) {
getURL (((("javascript:activateWiiRemoteFeature(" + identity) + ", ") + (com.wiicade.Wii.COMMAND_ATTACH + identity)) + ", true);");
activated[com.wiicade.Wii.COMMAND_ATTACH] = true;
}
return(attachment);
}
function buttonsUpdated(bitmap) {
var _local2 = 1;
var _local8 = pressed;
var _local7;
pressed = bitmap;
_local7 = pressed ^ _local8;
var _local3 = 0;
while (_local3 < 10) {
if ((_local7 & _local2) > 0) {
if ((pressed & _local2) > 0) {
dispatchEvent({type:"buttondown", buttonCode:_local2, identity:identity});
} else {
dispatchEvent({type:"buttonup", buttonCode:_local2, identity:identity});
}
}
_local2 = _local2 << 1;
_local3++;
}
}
function twistUpdated(angle) {
var _local2 = twistAngle;
twistAngle = angle;
if (twistAngle != _local2) {
dispatchEvent({type:"twist", angle:angle, identity:identity});
}
}
function distanceUpdated(distance) {
var _local2 = this.distance;
this.distance = distance;
if (this.distance != _local2) {
dispatchEvent({type:"distance", distance:distance, identity:identity});
}
}
function connectedUpdated(connected) {
var _local2 = this.connected;
this.connected = connected;
if (this.connected != _local2) {
if (connected) {
dispatchEvent({type:"connected", identity:identity});
} else {
dispatchEvent({type:"disconnected", identity:identity});
}
}
}
function cursorXUpdated(cursorx) {
oldcursorx = this.cursorx;
this.cursorx = cursorx;
}
function cursorYUpdated(cursory) {
oldcursory = this.cursory;
this.cursory = cursory;
if ((cursorx != oldcursorx) || (this.cursory != oldcursory)) {
dispatchEvent({type:"pointer", cursorx:cursorx, cursory:this.cursory, identity:identity});
}
}
function updatePrimary(primary) {
this.primary = primary;
}
function updateAttachment(attachment) {
this.attachment = attachment;
}
static var BUTTON_UP = 8;
static var BUTTON_DOWN = 4;
static var BUTTON_RIGHT = 2;
static var BUTTON_LEFT = 1;
static var BUTTON_1 = 64;
static var BUTTON_2 = 32;
static var BUTTON_A = 256;
static var BUTTON_B = 128;
static var BUTTON_PLUS = 16;
static var BUTTON_MINUS = 512;
var primary = false;
var connected = false;
var rotated = false;
var allowRotate = true;
var twistAngle = 0;
var distance = 0;
var cursorx = 0;
var cursory = 0;
var pressed = 0;
}
Symbol 168 MovieClip [__Packages.com.wiicade.Nunchuk] Frame 0
class com.wiicade.Nunchuk
{
var parent, dispatchEvent;
function Nunchuk (parent) {
this.parent = parent;
mx.events.EventDispatcher.initialize(this);
}
function isDown(buttonCode) {
return((pressed & buttonCode) > 0);
}
function getStickX() {
return(stickx);
}
function getStickY() {
return(sticky);
}
function updateButtons(buttons) {
var _local2 = 1;
var _local8 = pressed;
var _local7;
pressed = buttons;
_local7 = pressed ^ _local8;
var _local3 = 0;
while (_local3 < 10) {
if ((_local7 & _local2) > 0) {
if ((pressed & _local2) > 0) {
dispatchEvent({type:"buttondown", buttonCode:_local2, identity:parent.getIdentity()});
} else {
dispatchEvent({type:"buttonup", buttonCode:_local2, identity:parent.getIdentity()});
}
}
_local2 = _local2 << 1;
_local3++;
}
}
function updateStick(x, y) {
stickx = x;
sticky = y;
}
static var BUTTON_C = 2;
static var BUTTON_Z = 1;
var pressed = 0;
var stickx = 0;
var sticky = 0;
}
Symbol 169 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 170 MovieClip [__Packages.com.wiicade.Browser] Frame 0
class com.wiicade.Browser
{
static var buttonEnabled;
function Browser () {
}
static function init() {
buttonEnabled = new Array();
buttonEnabled[com.wiicade.WiiRemote.BUTTON_LEFT] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_UP] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_RIGHT] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_DOWN] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_1] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_2] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_A] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_B] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_PLUS] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_MINUS] = false;
}
static function isDefaultEnabled(buttonCode) {
if (!buttonEnabled) {
com.wiicade.Wii.isWii();
}
return(buttonEnabled[buttonCode]);
}
static function setDefaultEnabled(buttonCode, enabled) {
if (!buttonEnabled) {
com.wiicade.Wii.isWii();
}
buttonEnabled[buttonCode] = enabled;
if (com.wiicade.Wii.isWii()) {
getURL (((("javascript:enableWiiButton(" + buttonCode) + ",") + enabled) + ");");
}
}
static function enableZooming() {
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_PLUS, true);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_MINUS, true);
}
static function disableZooming() {
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_PLUS, false);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_MINUS, false);
}
static function enableScrolling() {
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_LEFT, true);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_RIGHT, true);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_UP, true);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_DOWN, true);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_B, true);
}
static function disableScrolling() {
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_LEFT, false);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_RIGHT, false);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_UP, false);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_DOWN, false);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_B, false);
}
static function setBackgroundColor(color) {
if (com.wiicade.Wii.isWii()) {
getURL (("javascript:setBackgroundColor(" + color) + ");");
}
}
}
Symbol 171 MovieClip [__Packages.com.novelgames.flashgames.bombaz.FallingBlocks] Frame 0
class com.novelgames.flashgames.bombaz.FallingBlocks extends MovieClip
{
var blocks, attachMovie, x, y, rotateState, targetX, targetRotateState, isDropping, _x, _y, lastTime, startMoveTime, startRotateTime, _parent;
function FallingBlocks () {
super();
var _local4;
var _local5;
var _local3;
blocks = new Array();
_local3 = 0;
while (_local3 < com.novelgames.flashgames.bombaz.Config.BLOCKS_GROUPSIZE) {
_local4 = attachMovie("block", "block" + _local3, _local3);
_local5 = _local4;
blocks[_local3] = _local5;
_local3++;
}
}
function reset(basedOnBlocks) {
var _local2;
x = Math.floor((com.novelgames.flashgames.bombaz.Config.BLOCKS_DIMENSIONX - com.novelgames.flashgames.bombaz.Config.BLOCKS_GROUPSIZE) / 2);
y = 0;
rotateState = 0;
targetX = x;
targetRotateState = rotateState;
isDropping = false;
_local2 = 0;
while (_local2 < blocks.length) {
blocks[_local2].initialize(basedOnBlocks[_local2].type, basedOnBlocks[_local2].colour);
blocks[_local2].x = blocks.length - 1;
blocks[_local2].y = _local2;
blocks[_local2].targetX = blocks[_local2].x;
blocks[_local2].targetY = blocks[_local2].y;
blocks[_local2]._x = com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE * blocks[_local2].x;
blocks[_local2]._y = com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE * blocks[_local2].y;
_local2++;
}
_x = com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE * x;
_y = com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE * y;
lastTime = getTimer();
}
function moveLeft() {
if (targetX != x) {
return(undefined);
}
if (!getCanMove(x - 1, y, targetRotateState)) {
return(undefined);
}
targetX = x - 1;
startMoveTime = getTimer();
}
function moveRight() {
if (targetX != x) {
return(undefined);
}
if (!getCanMove(x + 1, y, targetRotateState)) {
return(undefined);
}
targetX = x + 1;
startMoveTime = getTimer();
}
function rotateCCW() {
var _local4 = (rotateState + 3) % 4;
var _local3;
var _local2;
if (rotateState != targetRotateState) {
return(undefined);
}
if (!getCanMove(targetX, y, _local4)) {
return(undefined);
}
targetRotateState = _local4;
_local2 = 0;
while (_local2 < blocks.length) {
_local3 = getBlockXYByRotateState(_local2, targetRotateState);
blocks[_local2].targetX = _local3.x;
blocks[_local2].targetY = _local3.y;
_local2++;
}
startRotateTime = getTimer();
}
function rotateCW() {
var _local4 = (rotateState + 1) % 4;
var _local3;
var _local2;
if (rotateState != targetRotateState) {
return(undefined);
}
if (!getCanMove(targetX, y, _local4)) {
return(undefined);
}
targetRotateState = _local4;
_local2 = 0;
while (_local2 < blocks.length) {
_local3 = getBlockXYByRotateState(_local2, targetRotateState);
blocks[_local2].targetX = _local3.x;
blocks[_local2].targetY = _local3.y;
_local2++;
}
startRotateTime = getTimer();
}
function startDropping() {
isDropping = true;
}
function stopDropping() {
isDropping = false;
}
function move(time) {
var _local6;
var _local3;
var _local4 = false;
var _local2;
doMoveLeftRight(time);
doRotate(time);
_local6 = _y + (((isDropping ? (com.novelgames.flashgames.bombaz.Config.BLOCKS_DROPSPEED) : (_parent._parent.speed)) * (time - lastTime)) / 1000);
_local3 = Math.ceil(_local6 / com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE);
while (!getCanMove(targetX, _local3, targetRotateState)) {
_local4 = true;
_local3--;
}
if (_local4) {
x = targetX;
y = _local3;
rotateState = targetRotateState;
_local2 = 0;
while (_local2 < blocks.length) {
blocks[_local2].x = blocks[_local2].targetX;
blocks[_local2].y = blocks[_local2].targetY;
_local2++;
}
return(true);
}
_y = _local6;
y = _local3;
lastTime = time;
return(false);
}
function getCanMove(x, y, rotateState) {
var _local5;
var _local3;
var _local2;
var _local4;
_local4 = 0;
while (_local4 < blocks.length) {
_local5 = getBlockXYByRotateState(_local4, rotateState);
_local3 = x + _local5.x;
_local2 = y + _local5.y;
if ((_local3 < 0) || (_local3 >= com.novelgames.flashgames.bombaz.Config.BLOCKS_DIMENSIONX)) {
return(false);
}
if ((_local2 < 0) || (_local2 >= com.novelgames.flashgames.bombaz.Config.BLOCKS_DIMENSIONY)) {
return(false);
}
if (_parent._parent.blocks[_local3][_local2] != null) {
return(false);
}
_local4++;
}
return(true);
}
function getBlockXYByRotateState(blockIndex, rotateState) {
var _local1 = new Object();
switch (rotateState) {
case 0 :
_local1.x = com.novelgames.flashgames.bombaz.Config.BLOCKS_GROUPSIZE - 1;
_local1.y = blockIndex;
return(_local1);
case 1 :
_local1.x = (com.novelgames.flashgames.bombaz.Config.BLOCKS_GROUPSIZE - blockIndex) - 1;
_local1.y = com.novelgames.flashgames.bombaz.Config.BLOCKS_GROUPSIZE - 1;
return(_local1);
case 2 :
_local1.x = 0;
_local1.y = (com.novelgames.flashgames.bombaz.Config.BLOCKS_GROUPSIZE - blockIndex) - 1;
return(_local1);
case 3 :
_local1.x = blockIndex;
_local1.y = 0;
return(_local1);
}
}
function doMoveLeftRight(time) {
var _local2;
if (targetX == x) {
return(undefined);
}
_local2 = (time - startMoveTime) / com.novelgames.flashgames.bombaz.Config.BLOCKS_MOVETIME;
if (_local2 > 1) {
_local2 = 1;
}
_x = com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE * ((x * (1 - _local2)) + (targetX * _local2));
if (_local2 == 1) {
x = targetX;
}
}
function doRotate(time) {
var _local3;
var _local2;
if (targetRotateState == rotateState) {
return(undefined);
}
_local3 = (time - startRotateTime) / com.novelgames.flashgames.bombaz.Config.BLOCKS_MOVETIME;
if (_local3 > 1) {
_local3 = 1;
}
_local2 = 0;
while (_local2 < blocks.length) {
blocks[_local2]._x = com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE * ((blocks[_local2].x * (1 - _local3)) + (blocks[_local2].targetX * _local3));
blocks[_local2]._y = com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE * ((blocks[_local2].y * (1 - _local3)) + (blocks[_local2].targetY * _local3));
_local2++;
}
if (_local3 == 1) {
rotateState = targetRotateState;
_local2 = 0;
while (_local2 < blocks.length) {
blocks[_local2].x = blocks[_local2].targetX;
blocks[_local2].y = blocks[_local2].targetY;
_local2++;
}
}
}
}
Symbol 172 MovieClip [__Packages.com.novelgames.flashgames.bombaz.Block] Frame 0
class com.novelgames.flashgames.bombaz.Block extends MovieClip
{
var stop, cacheAsBitmap, type, colour, gotoAndStop, colourDisplay, generateCount;
function Block () {
super();
(stop());// not popped
cacheAsBitmap = true;
}
function initialize(type, colour) {
this.type = type;
this.colour = colour;
switch (type) {
case TYPE_NORMAL :
(gotoAndStop("normal"));// not popped
break;
case TYPE_CARD :
(gotoAndStop("card"));// not popped
break;
case TYPE_BANK :
(gotoAndStop("bank"));// not popped
}
colourDisplay.gotoAndStop(colour);
generateCount = 0;
}
function setColour(colour) {
this.colour = colour;
colourDisplay.gotoAndStop(colour);
}
static var TYPE_NORMAL = 1;
static var TYPE_CARD = 2;
static var TYPE_BANK = 3;
}
Symbol 173 MovieClip [__Packages.com.novelgames.flashgames.bombaz.ScorePopup] Frame 0
class com.novelgames.flashgames.bombaz.ScorePopup extends MovieClip
{
var _x, _y, score, noOfBlocks, startTime, intervalID, _alpha, removeMovieClip;
function ScorePopup () {
super();
}
function initialize(x, y, score, noOfBlocks) {
_x = x;
_y = y;
this.score = score;
this.noOfBlocks = noOfBlocks;
startTime = getTimer();
intervalID = setInterval(this, "onTime", 1);
}
function onTime() {
var _local3 = getTimer() - startTime;
var _local2;
updateAfterEvent();
if (_local3 < com.novelgames.flashgames.bombaz.Config.SCOREPOPUP_STAYTIME) {
return(undefined);
}
_local3 = _local3 - com.novelgames.flashgames.bombaz.Config.SCOREPOPUP_STAYTIME;
_local2 = _local3 / com.novelgames.flashgames.bombaz.Config.SCOREPOPUP_DISAPPEARTIME;
if (_local2 > 1) {
_local2 = 1;
}
_alpha = 100 * (1 - _local2);
if (_local2 == 1) {
clearInterval(intervalID);
removeMovieClip();
}
}
}
Symbol 174 MovieClip [__Packages.chapatiz.display.MCButton] Frame 0
class chapatiz.display.MCButton extends MovieClip
{
var label, gotoAndStop, onRollOverMC, onRollOutMC, onPressMC, onReleaseMC, onReleaseOutsideMC;
function MCButton () {
super();
_text = label.text;
onRollOut();
}
function set lock(bit) {
_lock = bit;
if (!bit) {
onRollOut();
}
//return(lock);
}
function get lock() {
return(_lock);
}
function set text(str) {
_text = ((str != undefined) ? (str) : "");
label.text = _text;
//return(text);
}
function get text() {
return(_text);
}
function onRollOver() {
if (!_lock) {
gotoAndStop(ROLL_OVER);
label.text = _text;
onRollOverMC();
}
}
function onRollOut() {
if (!_lock) {
gotoAndStop(ROLL_OUT);
label.text = _text;
onRollOutMC();
}
}
function onPress() {
if (!_lock) {
gotoAndStop(PRESS);
label.text = _text;
onPressMC();
}
}
function onRelease() {
if (!_lock) {
gotoAndStop(ROLL_OVER);
label.text = _text;
onReleaseMC();
}
}
function onReleaseOutside() {
if (!_lock) {
gotoAndStop(ROLL_OVER);
label.text = _text;
onReleaseOutsideMC();
}
}
static var PRESS = "press";
static var ROLL_OVER = "rollOver";
static var ROLL_OUT = "rollOut";
var _lock = false;
var _text = "";
}
Symbol 175 MovieClip [__Packages.com.novelgames.flashgames.bombaz.Message] Frame 0
class com.novelgames.flashgames.bombaz.Message extends MovieClip
{
var stop, level, gotoAndStop, replayButton, homeButton;
function Message () {
super();
(stop());// not popped
}
function showLevel(level) {
this.level = level;
(gotoAndStop("level"));// not popped
}
function showLevelClear() {
(gotoAndStop("levelClear"));// not popped
}
function showGameOver() {
gotoAndStop("gameOver");
replayButton.onLoad = function () {
this.text = "Replay";
};
replayButton.onReleaseMC = function () {
this._parent._parent._parent._parent.gotoGamePage();
this._parent.hide();
};
homeButton.onLoad = function () {
this.text = "Home";
};
homeButton.onReleaseMC = function () {
this._parent._parent._parent._parent.gotoTitlePage();
this._parent.hide();
};
}
function hide() {
(gotoAndStop("hide"));// not popped
}
}
Symbol 176 MovieClip [__Packages.com.novelgames.flashgames.bombaz.MuteButton] Frame 0
class com.novelgames.flashgames.bombaz.MuteButton extends MovieClip
{
var gotoAndStop;
function MuteButton () {
super();
if (com.novelgames.flashgames.bombaz.NewSound.getIsMuteAll()) {
showOff();
} else {
showOn();
}
}
function onPress() {
if (com.novelgames.flashgames.bombaz.NewSound.getIsMuteAll()) {
com.novelgames.flashgames.bombaz.NewSound.unmuteAll();
showOn();
} else {
com.novelgames.flashgames.bombaz.NewSound.muteAll();
showOff();
}
}
function showOff() {
(gotoAndStop("off"));// not popped
}
function showOn() {
(gotoAndStop("on"));// not popped
}
}
Symbol 177 MovieClip [__Packages.com.novelgames.flashgames.bombaz.NewSound] Frame 0
class com.novelgames.flashgames.bombaz.NewSound extends Sound
{
var attachSound, setVolume, target, symbolName;
function NewSound (target, symbolName) {
super(target);
var _local3;
attachSound(symbolName);
setVolume(volumeAll);
this.target = target;
this.symbolName = symbolName;
sounds.push(this);
_local3 = 0;
while (_local3 < sounds.length) {
if (sounds[_local3] == this) {
} else if ((sounds[_local3].target == target) && (sounds[_local3].symbolName == symbolName)) {
sounds.splice(_local3, 1);
_local3--;
}
_local3++;
}
}
static function setVolumeAll(volume) {
var _local1;
volumeAll = volume;
_local1 = 0;
while (_local1 < sounds.length) {
sounds[_local1].setVolume(volume);
_local1++;
}
}
static function muteAll() {
setVolumeAll(0);
}
static function unmuteAll() {
setVolumeAll(100);
}
static function getIsMuteAll() {
return(volumeAll == 0);
}
static var sounds = new Array();
static var volumeAll = 100;
}
Symbol 178 MovieClip [__Packages.com.novelgames.flashgames.bombaz.Game] Frame 0
class com.novelgames.flashgames.bombaz.Game extends MovieClip
{
var score, message, soundLand, soundDestroy, soundLevelClear, soundGameOver, ornitorinque1, ornitorinque2, blocks, nextBlocks, nextHolder, fallingBlocksHolder, fallingBlocks, level, speed, cardRatio, bankRatio, destroyTarget, noOfColours, casques, combo, noOfBlocksCreated, noOfBlocksDestroyed, nextCardIndex, nextBankIndex, intervalID, onKeyDown, onKeyUp, blocksHolder, shouldGenerateCardBlocks, droppingBlocks, startTime, destroyingBlocks, explodes, explodesHolder, scoresHolder, cardBlocks, clearStartRow, explodeRows, _parent;
function Game () {
super();
score = 0;
message.__proto__ = com.novelgames.flashgames.bombaz.Message.prototype;
initializeBlocks();
soundLand = new com.novelgames.flashgames.bombaz.NewSound(this, "soundLand");
soundDestroy = new com.novelgames.flashgames.bombaz.NewSound(this, "soundDestroy");
soundLevelClear = new com.novelgames.flashgames.bombaz.NewSound(this, "soundLevelClear");
soundGameOver = new com.novelgames.flashgames.bombaz.NewSound(this, "soundGameOver");
ornitorinque1.gotoAndStop(2);
ornitorinque2.gotoAndStop(2);
startLevel(1);
}
function initializeBlocks() {
var _local5;
var _local4;
var _local2;
var _local3;
blocks = new Array(com.novelgames.flashgames.bombaz.Config.BLOCKS_DIMENSIONX);
_local2 = 0;
while (_local2 < blocks.length) {
blocks[_local2] = new Array(com.novelgames.flashgames.bombaz.Config.BLOCKS_DIMENSIONY);
_local3 = 0;
while (_local3 < blocks[_local2].length) {
blocks[_local2][_local3] = null;
_local3++;
}
_local2++;
}
nextBlocks = new Array(com.novelgames.flashgames.bombaz.Config.BLOCKS_GROUPSIZE);
_local2 = 0;
while (_local2 < nextBlocks.length) {
_local5 = nextHolder.attachMovie("block", "block" + _local2, _local2);
_local4 = _local5;
_local4._y = _local2 * com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE;
_local4._visible = false;
nextBlocks[_local2] = _local4;
_local2++;
}
_local5 = fallingBlocksHolder.attachMovie("fallingBlocks", "fallingBlocks", 0);
fallingBlocks = _local5;
fallingBlocks._visible = false;
}
function startLevel(level) {
var _local2;
var _local3;
this.level = level;
speed = com.novelgames.flashgames.bombaz.Config.LEVEL_INITIALSPEED + ((level - 1) * com.novelgames.flashgames.bombaz.Config.LEVEL_SPEEDINCREASE);
if (speed > com.novelgames.flashgames.bombaz.Config.LEVEL_MAXSPEED) {
speed = com.novelgames.flashgames.bombaz.Config.LEVEL_MAXSPEED;
}
cardRatio = com.novelgames.flashgames.bombaz.Config.LEVEL_INITIALCARDRATIO - ((level - 1) * com.novelgames.flashgames.bombaz.Config.LEVEL_CARDRATIODECREASE);
if (cardRatio < com.novelgames.flashgames.bombaz.Config.LEVEL_MINCARDRATIO) {
cardRatio = com.novelgames.flashgames.bombaz.Config.LEVEL_MINCARDRATIO;
}
bankRatio = com.novelgames.flashgames.bombaz.Config.LEVEL_INITIALBANKRATIO + ((level - 1) * com.novelgames.flashgames.bombaz.Config.LEVEL_BANKRATIOINCREASE);
destroyTarget = com.novelgames.flashgames.bombaz.Config.LEVEL_INITIALDESTROYTARGET + ((level - 1) * com.novelgames.flashgames.bombaz.Config.LEVEL_DESTROYTARGETINCREASE);
noOfColours = Math.floor(com.novelgames.flashgames.bombaz.Config.LEVEL_INITIALNOOFCOLOURS + ((level - 1) * com.novelgames.flashgames.bombaz.Config.LEVEL_NOOFCOLOURSINCREASE));
if (noOfColours > com.novelgames.flashgames.bombaz.Config.BLOCKS_COLOURS.length) {
noOfColours = com.novelgames.flashgames.bombaz.Config.BLOCKS_COLOURS.length;
}
_local2 = 0;
while (_local2 < noOfColours) {
casques["casque_" + _local2].gotoAndStop(com.novelgames.flashgames.bombaz.Config.BLOCKS_COLOURS[_local2]);
_local2++;
}
while (_local2 < 6) {
casques["casque_" + _local2].gotoAndStop(1);
_local2++;
}
combo = 0;
noOfBlocksCreated = 0;
noOfBlocksDestroyed = 0;
nextCardIndex = 0;
nextBankIndex = 0;
generateNextCardIndex();
generateNextBankIndex();
_local2 = 0;
while (_local2 < blocks.length) {
_local3 = 0;
while (_local3 < blocks[_local2].length) {
blocks[_local2][_local3].removeMovieClip();
blocks[_local2][_local3] = null;
_local3++;
}
_local2++;
}
nextHolder._visible = false;
message.showLevel(level);
intervalID = setInterval(this, "startPlay", com.novelgames.flashgames.bombaz.Config.MESSAGE_LEVELTIME);
}
function generateNextCardIndex() {
nextCardIndex = nextCardIndex + Math.floor((Math.random() * cardRatio) * 2);
}
function generateNextBankIndex() {
nextBankIndex = nextBankIndex + Math.floor((Math.random() * bankRatio) * 2);
}
function startPlay() {
clearInterval(intervalID);
message.hide();
nextHolder._visible = true;
generateNextBlocks();
startFallingBlocks();
}
function generateNextBlocks() {
var _local4;
var _local3;
var _local2;
_local2 = 0;
while (_local2 < nextBlocks.length) {
_local4 = generateType();
_local3 = com.novelgames.flashgames.bombaz.Config.BLOCKS_COLOURS[Math.floor(Math.random() * noOfColours)];
nextBlocks[_local2].initialize(_local4, _local3);
nextBlocks[_local2]._visible = true;
_local2++;
}
}
function generateType() {
if (noOfBlocksCreated >= nextCardIndex) {
generateNextCardIndex();
return(com.novelgames.flashgames.bombaz.Block.TYPE_CARD);
}
if (noOfBlocksCreated >= nextBankIndex) {
generateNextBankIndex();
return(com.novelgames.flashgames.bombaz.Block.TYPE_BANK);
}
return(com.novelgames.flashgames.bombaz.Block.TYPE_NORMAL);
}
function startFallingBlocks() {
generateFallingBlocks();
if (checkGameOver()) {
return(undefined);
}
onKeyDown = onFallingKeyDown;
onKeyUp = onFallingKeyUp;
Key.addListener(this);
intervalID = setInterval(this, "onFallingTime", 1);
}
function generateFallingBlocks() {
fallingBlocks.reset(nextBlocks);
fallingBlocks._visible = true;
noOfBlocksCreated = noOfBlocksCreated + com.novelgames.flashgames.bombaz.Config.BLOCKS_GROUPSIZE;
generateNextBlocks();
}
function onFallingKeyDown() {
var _local2 = Key.getCode();
switch (_local2) {
case 37 :
fallingBlocks.moveLeft();
ornitorinque1.gotoAndStop(3);
ornitorinque2.gotoAndStop(1);
break;
case 39 :
fallingBlocks.moveRight();
ornitorinque1.gotoAndStop(1);
ornitorinque2.gotoAndStop(3);
break;
case 38 :
fallingBlocks.rotateCCW();
ornitorinque1.gotoAndStop(2);
ornitorinque2.gotoAndStop(2);
break;
case 40 :
fallingBlocks.startDropping();
ornitorinque1.gotoAndStop(2);
ornitorinque2.gotoAndStop(2);
break;
case 32 :
fallingBlocks.rotateCW();
ornitorinque1.gotoAndStop(2);
ornitorinque2.gotoAndStop(2);
}
}
function onFallingKeyUp() {
var _local2 = Key.getCode();
ornitorinque1.gotoAndStop(2);
ornitorinque2.gotoAndStop(2);
if (!(_local2 === 40)) {
} else {
fallingBlocks.stopDropping();
}
}
function onFallingTime() {
var _local2 = getTimer();
updateAfterEvent();
if (!fallingBlocks.move(_local2)) {
return(undefined);
}
createBlocksFromFallingBlocks();
fallingBlocks._visible = false;
soundLand.start();
onKeyDown = null;
onKeyUp = null;
Key.removeListener(this);
clearInterval(intervalID);
checkDropBlocks(true);
}
function createBlocksFromFallingBlocks() {
var _local4;
var _local5;
var _local2;
var _local3;
_local3 = 0;
while (_local3 < fallingBlocks.blocks.length) {
_local4 = blocksHolder.getNextHighestDepth();
_local5 = blocksHolder.attachMovie("block", "block" + _local4, _local4);
_local2 = _local5;
_local2.initialize(fallingBlocks.blocks[_local3].type, fallingBlocks.blocks[_local3].colour);
_local2.x = fallingBlocks.x + fallingBlocks.blocks[_local3].x;
_local2.y = fallingBlocks.y + fallingBlocks.blocks[_local3].y;
_local2._x = _local2.x * com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE;
_local2._y = _local2.y * com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE;
blocks[_local2.x][_local2.y] = _local2;
_local3++;
}
}
function checkDropBlocks(shouldGenerateCardBlocks) {
var _local4;
var _local3;
var _local2;
this.shouldGenerateCardBlocks = shouldGenerateCardBlocks;
droppingBlocks = new Array();
_local3 = 0;
while (_local3 < com.novelgames.flashgames.bombaz.Config.BLOCKS_DIMENSIONX) {
_local4 = 0;
_local2 = com.novelgames.flashgames.bombaz.Config.BLOCKS_DIMENSIONY - 1;
while (_local2 >= 0) {
if (blocks[_local3][_local2] == null) {
_local4++;
} else if (_local4 > 0) {
blocks[_local3][_local2].targetY = blocks[_local3][_local2].y + _local4;
blocks[_local3][blocks[_local3][_local2].targetY] = blocks[_local3][_local2];
droppingBlocks.push(blocks[_local3][_local2]);
blocks[_local3][_local2] = null;
}
_local2--;
}
_local3++;
}
startTime = getTimer();
intervalID = setInterval(this, "onDropTime", 1);
}
function onDropTime() {
var _local3 = getTimer() - startTime;
var _local2;
updateAfterEvent();
_local2 = 0;
while (_local2 < droppingBlocks.length) {
droppingBlocks[_local2]._y = (droppingBlocks[_local2].y * com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE) + ((com.novelgames.flashgames.bombaz.Config.BLOCKS_DROPSPEED * _local3) / 1000);
if (droppingBlocks[_local2]._y >= (droppingBlocks[_local2].targetY * com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE)) {
droppingBlocks[_local2]._y = droppingBlocks[_local2].targetY * com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE;
droppingBlocks[_local2].y = droppingBlocks[_local2].targetY;
droppingBlocks.splice(_local2, 1);
_local2--;
soundLand.start();
}
_local2++;
}
if (droppingBlocks.length == 0) {
clearInterval(intervalID);
if ((!checkDestroy()) && (!checkLevelClear())) {
if (shouldGenerateCardBlocks) {
startCardBlocks();
} else {
startFallingBlocks();
}
}
}
}
function checkDestroy() {
var _local7 = getBanks();
var _local2;
var _local6;
var _local8;
var _local10;
var _local9;
var _local4;
var _local3;
var _local5;
if (_local7.length == 0) {
combo = 0;
return(false);
}
destroyingBlocks = new Array();
explodes = new Array();
_local4 = 0;
while (_local4 < _local7.length) {
_local2 = getAdjacentSameColouredNonBankBlocks(_local7[_local4]);
if (_local2.length == 0) {
} else {
_local7[_local4].noOfStepsFromBank = 0;
destroyingBlocks.push(_local7[_local4]);
_local3 = 0;
while (_local3 < _local2.length) {
if (_local2[_local3].type == com.novelgames.flashgames.bombaz.Block.TYPE_BANK) {
} else {
_local8 = Math.abs(_local2[_local3].x - _local7[_local4].x) + Math.abs(_local2[_local3].y - _local7[_local4].y);
if (_local2[_local3].noOfStepsFromBank == undefined) {
_local2[_local3].noOfStepsFromBank = _local8;
destroyingBlocks.push(_local2[_local3]);
_local6 = getAdjacentSameColouredNonBankBlocks(_local2[_local3]);
_local5 = 0;
while (_local5 < _local6.length) {
if (_local6[_local5].noOfStepsFromBank == undefined) {
_local2.push(_local6[_local5]);
}
_local5++;
}
} else if (_local2[_local3].noOfStepsFromBank > _local8) {
_local2[_local3].noOfStepsFromBank = _local8;
}
}
_local3++;
}
}
_local4++;
}
if (destroyingBlocks.length == 0) {
combo = 0;
return(false);
}
noOfBlocksDestroyed = noOfBlocksDestroyed + destroyingBlocks.length;
createScorePopup(destroyingBlocks, combo);
combo++;
_local4 = 0;
while (_local4 < destroyingBlocks.length) {
blocks[destroyingBlocks[_local4].x][destroyingBlocks[_local4].y] = null;
_local9 = createExplode(destroyingBlocks[_local4]);
_local9._visible = false;
explodes[_local4] = _local9;
_local4++;
}
soundDestroy.start();
startTime = getTimer();
intervalID = setInterval(this, "onDestroyTime", 1);
return(true);
}
function getBanks() {
var _local4 = new Array();
var _local3;
var _local2;
_local3 = 0;
while (_local3 < blocks.length) {
_local2 = 0;
while (_local2 < blocks[_local3].length) {
if (blocks[_local3][_local2].type == com.novelgames.flashgames.bombaz.Block.TYPE_BANK) {
_local4.push(blocks[_local3][_local2]);
}
_local2++;
}
_local3++;
}
return(_local4);
}
function getAdjacentSameColouredNonBankBlocks(block) {
var _local4 = new Array();
var _local5 = block.colour;
var _local2;
var _local7;
var _local6;
if (block.x > 0) {
_local2 = blocks[block.x - 1][block.y];
if ((_local2.type != com.novelgames.flashgames.bombaz.Block.TYPE_BANK) && (_local2.colour == _local5)) {
_local4.push(_local2);
}
}
if (block.x < (com.novelgames.flashgames.bombaz.Config.BLOCKS_DIMENSIONX - 1)) {
_local2 = blocks[block.x + 1][block.y];
if ((_local2.type != com.novelgames.flashgames.bombaz.Block.TYPE_BANK) && (_local2.colour == _local5)) {
_local4.push(_local2);
}
}
if (block.y > 0) {
_local2 = blocks[block.x][block.y - 1];
if ((_local2.type != com.novelgames.flashgames.bombaz.Block.TYPE_BANK) && (_local2.colour == _local5)) {
_local4.push(_local2);
}
}
if (block.y < (com.novelgames.flashgames.bombaz.Config.BLOCKS_DIMENSIONY - 1)) {
_local2 = blocks[block.x][block.y + 1];
if ((_local2.type != com.novelgames.flashgames.bombaz.Block.TYPE_BANK) && (_local2.colour == _local5)) {
_local4.push(_local2);
}
}
return(_local4);
}
function createExplode(block) {
var _local3 = explodesHolder.getNextHighestDepth();
var _local4 = explodesHolder.attachMovie("explode", "explode" + _local3, _local3);
var _local2 = _local4;
_local2.initialize(block.colour);
_local2._x = block._x;
_local2._y = block._y;
return(_local2);
}
function createScorePopup(destroyingBlocks, combo) {
var _local8 = com.novelgames.flashgames.bombaz.Config.SCORE_BLOCK + (combo * com.novelgames.flashgames.bombaz.Config.SCORE_COMBO);
var _local7 = Number.POSITIVE_INFINITY;
var _local5 = Number.NEGATIVE_INFINITY;
var _local6 = Number.POSITIVE_INFINITY;
var _local4 = Number.NEGATIVE_INFINITY;
var _local9;
var _local10;
var _local11;
var _local2;
score = score + (_local8 * destroyingBlocks.length);
_local2 = 0;
while (_local2 < destroyingBlocks.length) {
if (destroyingBlocks[_local2]._x < _local7) {
_local7 = destroyingBlocks[_local2]._x;
}
if (destroyingBlocks[_local2]._y < _local6) {
_local6 = destroyingBlocks[_local2]._y;
}
if (destroyingBlocks[_local2]._x > _local5) {
_local5 = destroyingBlocks[_local2]._x;
}
if (destroyingBlocks[_local2]._y > _local4) {
_local4 = destroyingBlocks[_local2]._y;
}
_local2++;
}
_local9 = scoresHolder.getNextHighestDepth();
_local10 = scoresHolder.attachMovie("scorePopup", "scorePopup" + _local9, _local9);
_local11 = _local10;
_local11.initialize(((_local7 + _local5) + com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE) / 2, ((_local6 + _local4) + com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE) / 2, _local8, destroyingBlocks.length);
}
function onDestroyTime() {
var _local5 = getTimer();
var _local4;
var _local3;
var _local2;
updateAfterEvent();
_local2 = 0;
while (_local2 < destroyingBlocks.length) {
_local4 = (_local5 - startTime) - (destroyingBlocks[_local2].noOfStepsFromBank * com.novelgames.flashgames.bombaz.Config.EXPLODE_INTERVAL);
if (_local4 < 0) {
} else {
destroyingBlocks[_local2]._visible = false;
explodes[_local2]._visible = true;
_local3 = _local4 / com.novelgames.flashgames.bombaz.Config.EXPLODE_APPEARTIME;
if (_local3 > 1) {
_local3 = 1;
}
explodes[_local2].move(_local3);
if (_local3 == 1) {
destroyingBlocks[_local2].removeMovieClip();
explodes[_local2].removeMovieClip();
destroyingBlocks.splice(_local2, 1);
explodes.splice(_local2, 1);
_local2--;
}
}
_local2++;
}
if (destroyingBlocks.length > 0) {
return(undefined);
}
clearInterval(intervalID);
checkDropBlocks(shouldGenerateCardBlocks);
}
function startCardBlocks() {
var _local2;
shouldGenerateCardBlocks = false;
generateCardBlocks();
if (checkGameOver()) {
return(undefined);
}
if (cardBlocks.length == 0) {
startFallingBlocks();
} else {
_local2 = 0;
while (_local2 < cardBlocks.length) {
blocks[cardBlocks[_local2].x][cardBlocks[_local2].y] = cardBlocks[_local2];
_local2++;
}
cardBlocks = new Array();
checkDropBlocks(shouldGenerateCardBlocks);
}
}
function generateCardBlocks() {
var _local7;
var _local5;
var _local6;
var _local8;
var _local4;
var _local3;
var _local2;
cardBlocks = new Array();
_local3 = 0;
while (_local3 < blocks.length) {
_local7 = 0;
_local5 = 0;
_local2 = 0;
while (_local2 < blocks[_local3].length) {
if (blocks[_local3][_local2] == null) {
_local7++;
} else if (blocks[_local3][_local2].type != com.novelgames.flashgames.bombaz.Block.TYPE_CARD) {
} else {
blocks[_local3][_local2].generateCount++;
if (blocks[_local3][_local2].generateCount < com.novelgames.flashgames.bombaz.Config.CARD_GENERATERATE) {
} else {
blocks[_local3][_local2].generateCount = 0;
_local5++;
}
}
_local2++;
}
_local2 = 0;
while (_local2 < _local5) {
_local6 = blocksHolder.getNextHighestDepth();
_local8 = blocksHolder.attachMovie("block", "block" + _local6, _local6);
_local4 = _local8;
_local4.initialize(com.novelgames.flashgames.bombaz.Block.TYPE_NORMAL, com.novelgames.flashgames.bombaz.Config.BLOCKS_COLOURS[Math.floor(Math.random() * noOfColours)]);
_local4.x = _local3;
_local4.y = _local2;
_local4._x = _local3 * com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE;
_local4._y = _local2 * com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE;
_local4.targetY = (_local4.y + _local7) - _local5;
cardBlocks.push(_local4);
_local2++;
}
_local3++;
}
}
function checkLevelClear() {
var _local4;
var _local3;
var _local2;
if (noOfBlocksDestroyed < destroyTarget) {
return(false);
}
clearStartRow = -1;
explodeRows = new Array(com.novelgames.flashgames.bombaz.Config.BLOCKS_DIMENSIONY);
_local3 = 0;
while (_local3 < com.novelgames.flashgames.bombaz.Config.BLOCKS_DIMENSIONY) {
explodeRows[_local3] = new Array(com.novelgames.flashgames.bombaz.Config.BLOCKS_DIMENSIONX);
_local2 = 0;
while (_local2 < com.novelgames.flashgames.bombaz.Config.BLOCKS_DIMENSIONX) {
if (blocks[_local2][_local3] == null) {
} else {
if (clearStartRow == -1) {
clearStartRow = _local3;
}
_local4 = createExplode(blocks[_local2][_local3]);
_local4._visible = false;
explodeRows[_local3][_local2] = _local4;
}
_local2++;
}
_local3++;
}
soundLevelClear.start();
startTime = getTimer();
intervalID = setInterval(this, "onClearTime", 1);
return(true);
}
function onClearTime() {
var _local5 = getTimer();
var _local4;
var _local3;
var _local2;
updateAfterEvent();
_local3 = clearStartRow;
while (_local3 < com.novelgames.flashgames.bombaz.Config.BLOCKS_DIMENSIONY) {
_local4 = (_local5 - startTime) - ((_local3 - clearStartRow) * com.novelgames.flashgames.bombaz.Config.LEVELCLEAR_ROWINTERVAL);
if (_local4 < 0) {
return(undefined);
}
_local2 = 0;
while (_local2 < com.novelgames.flashgames.bombaz.Config.BLOCKS_DIMENSIONX) {
blocks[_local2][_local3]._visible = false;
if (_local4 < com.novelgames.flashgames.bombaz.Config.LEVELCLEAR_EXPLODETIME) {
explodeRows[_local3][_local2].move(_local4 / com.novelgames.flashgames.bombaz.Config.LEVELCLEAR_EXPLODETIME);
explodeRows[_local3][_local2]._visible = true;
} else {
blocks[_local2][_local3].removeMovieClip();
explodeRows[_local3][_local2].removeMovieClip();
}
_local2++;
}
_local3++;
}
if (_local4 >= com.novelgames.flashgames.bombaz.Config.LEVELCLEAR_EXPLODETIME) {
clearInterval(intervalID);
message.showLevelClear();
intervalID = setInterval(this, "startNextLevel", com.novelgames.flashgames.bombaz.Config.MESSAGE_LEVELCLEARTIME);
}
}
function startNextLevel() {
clearInterval(intervalID);
message.hide();
if (com.novelgames.flashgames.bombaz.Config.GAME_DEMO && (level > 4)) {
message.showGameOver();
} else {
startLevel(level + 1);
}
}
function checkGameOver() {
var _local4 = false;
var _local6;
var _local5;
var _local2;
var _local3;
_local2 = 0;
while (_local2 < cardBlocks.length) {
if (blocks[cardBlocks[_local2].x][cardBlocks[_local2].y] != null) {
_local4 = true;
}
_local2++;
}
if (fallingBlocks._visible) {
_local2 = 0;
while (_local2 < fallingBlocks.blocks.length) {
_local6 = fallingBlocks.x + fallingBlocks.blocks[_local2].x;
_local5 = fallingBlocks.y + fallingBlocks.blocks[_local2].y;
if (blocks[_local6][_local5] != null) {
_local4 = true;
}
_local2++;
}
}
if (!_local4) {
return(false);
}
_local2 = 0;
while (_local2 < blocks.length) {
_local3 = 0;
while (_local3 < blocks[_local2].length) {
blocks[_local2][_local3].setColour(com.novelgames.flashgames.bombaz.Config.BLOCKS_GAMEOVERCOLOUR);
_local3++;
}
_local2++;
}
_local2 = 0;
while (_local2 < fallingBlocks.blocks.length) {
fallingBlocks.blocks[_local2].setColour(com.novelgames.flashgames.bombaz.Config.BLOCKS_GAMEOVERCOLOUR);
_local2++;
}
_local2 = 0;
while (_local2 < cardBlocks.length) {
cardBlocks[_local2].setColour(com.novelgames.flashgames.bombaz.Config.BLOCKS_GAMEOVERCOLOUR);
_local2++;
}
soundGameOver.start();
if (com.novelgames.flashgames.bombaz.Config.GAME_DEMO) {
message.showGameOver();
}
_parent._parent.showEnterHighScore(score);
return(true);
}
}
Symbol 179 MovieClip [__Packages.com.novelgames.flashgames.bombaz.Explode] Frame 0
class com.novelgames.flashgames.bombaz.Explode extends MovieClip
{
var pieces, attachMovie, startScale;
function Explode () {
super();
}
function initialize(colour) {
var _local4 = com.novelgames.flashgames.bombaz.Config.BLOCKS_SIZE / com.novelgames.flashgames.bombaz.Config.EXPLODE_NOOFPIECES;
var _local2;
var _local3;
pieces = new Array(com.novelgames.flashgames.bombaz.Config.EXPLODE_NOOFPIECES * com.novelgames.flashgames.bombaz.Config.EXPLODE_NOOFPIECES);
_local3 = 0;
while (_local3 < pieces.length) {
_local2 = attachMovie("colour", "colour" + _local3, _local3);
_local2._width = _local4;
_local2._height = _local4;
startScale = _local2._xscale;
_local2._x = ((_local3 % com.novelgames.flashgames.bombaz.Config.EXPLODE_NOOFPIECES) * _local4) + (_local4 / 2);
_local2._y = (Math.floor(_local3 / com.novelgames.flashgames.bombaz.Config.EXPLODE_NOOFPIECES) * _local4) + (_local4 / 2);
new Color(_local2).setRGB(colour);
pieces[_local3] = _local2;
_local3++;
}
}
function move(ratio) {
var _local2;
_local2 = 0;
while (_local2 < pieces.length) {
pieces[_local2]._rotation = ratio * com.novelgames.flashgames.bombaz.Config.EXPLODE_ROTATE;
pieces[_local2]._xscale = startScale * (1 - ratio);
pieces[_local2]._yscale = startScale * (1 - ratio);
_local2++;
}
}
}
Symbol 180 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.NewMovieClip] Frame 0
class com.novelgames.flashgames.commonAS2.NewMovieClip extends MovieClip
{
var _parent, _x, _y, _rotation, _visible, _alpha, _width, _height, _xscale, _yscale, _xmouse, _ymouse, _totalframes, _currentframe, _name, __mask, useHandCursor, __mouseEnabled, __mouseChildren, __numChildren, getInstanceAtDepth, getNextHighestDepth, onRelease, onRollOver, onRollOut, onPress, onReleaseOutside, onMouseMove, onEnterFrame, getURL, createMovieCount, attachMovie, createEmptyMovieClip;
function NewMovieClip () {
super();
}
function get parent() {
return(_parent);
}
function set x(x) {
_x = x;
//return(this.x);
}
function get x() {
return(_x);
}
function set y(y) {
_y = y;
//return(this.y);
}
function get y() {
return(_y);
}
function set rotation(rotation) {
_rotation = rotation;
//return(this.rotation);
}
function get rotation() {
return(_rotation);
}
function set visible(visible) {
_visible = visible;
//return(this.visible);
}
function get visible() {
return(_visible);
}
function set alpha(alpha) {
_alpha = alpha * 100;
//return(this.alpha);
}
function get alpha() {
return(_alpha / 100);
}
function get width() {
return(_width);
}
function set width(width) {
_width = width;
//return(this.width);
}
function get height() {
return(_height);
}
function set height(height) {
_height = height;
//return(this.height);
}
function set scaleX(scaleX) {
_xscale = scaleX * 100;
//return(this.scaleX);
}
function get scaleX() {
return(_xscale / 100);
}
function set scaleY(scaleY) {
_yscale = scaleY * 100;
//return(this.scaleY);
}
function get scaleY() {
return(_yscale / 100);
}
function set mouseX(mouseX) {
_xmouse = mouseX;
//return(this.mouseX);
}
function get mouseX() {
return(_xmouse);
}
function set mouseY(mouseY) {
_ymouse = mouseY;
//return(this.mouseY);
}
function get mouseY() {
return(_ymouse);
}
function get totalFrames() {
return(_totalframes);
}
function get currentFrame() {
return(_currentframe);
}
function get name() {
return(_name);
}
function set mask(mask) {
__mask = mask;
super.setMask(mask);
//return(this.mask);
}
function get mask() {
return(__mask);
}
function set buttonMode(buttonMode) {
useHandCursor = buttonMode;
//return(this.buttonMode);
}
function get buttonMode() {
return(useHandCursor);
}
function set mouseEnabled(mouseEnabled) {
__mouseEnabled = mouseEnabled;
//return(this.mouseEnabled);
}
function get mouseEnabled() {
return(__mouseEnabled);
}
function set mouseChildren(mouseChildren) {
__mouseChildren = mouseChildren;
//return(this.mouseChildren);
}
function get mouseChildren() {
return(__mouseChildren);
}
function get stage() {
return(com.novelgames.flashgames.commonAS2.NewStage.getNewStage());
}
function set numChildren(numChildren) {
__numChildren = numChildren;
//return(this.numChildren);
}
function get numChildren() {
if (__numChildren == undefined) {
__numChildren = 0;
}
return(__numChildren);
}
function get graphics() {
return(this);
}
function startDrag(lockCenter, bounds) {
if (lockCenter == undefined) {
super.startDrag();
} else if (bounds == undefined) {
super.startDrag(lockCenter);
} else {
super.startDrag(lockCenter, bounds.__get__left(), bounds.__get__top(), bounds.__get__right(), bounds.__get__bottom());
}
}
function beginFill(colour, alpha) {
if (alpha == undefined) {
alpha = 1;
}
super.beginFill(colour, alpha * 100);
}
function getBounds(target) {
var _local2 = super.getBounds(target);
return(new com.novelgames.flashgames.commonAS2.Rectangle(_local2.xMin, _local2.yMin, _local2.xMax - _local2.xMin, _local2.yMax - _local2.yMin));
}
function localToGlobal(point) {
var _local2 = {x:point.x, y:point.y};
super.localToGlobal(_local2);
return(_local2);
}
function globalToLocal(point) {
var _local2 = {x:point.x, y:point.y};
super.globalToLocal(_local2);
return(_local2);
}
function hitTestPoint(x, y, shapeFlag) {
if (shapeFlag == undefined) {
return(super.hitTest(x, y));
}
return(super.hitTest(x, y, shapeFlag));
}
function hitTestObject(obj) {
return(super.hitTest(obj));
}
function addChild(movieClip) {
if (movieClip.addedToParent) {
return(undefined);
}
if (movieClip._parent != this) {
trace("wrong addChild: " + [this, movieClip]);
}
addChildAt(movieClip, numChildren);
}
function addChildAt(movieClip, index) {
if (movieClip.addedToParent) {
return(undefined);
}
if (movieClip._parent != this) {
trace("wrong addChildAt: " + [this, movieClip]);
}
movieClip.addedToParent = true;
numChildren = ((numChildren+1));
setChildIndex(movieClip, index);
}
function removeChild(movieClip) {
if (!movieClip.addedToParent) {
return(undefined);
}
removeChildAt(movieClip.getDepth());
}
function removeChildAt(index) {
var _local5 = getInstanceAtDepth(index);
var _local3;
var _local2;
if (!_local5.addedToParent) {
return(undefined);
}
_local5.removeMovieClip();
_local3 = getNextHighestDepth();
_local2 = index + 1;
while (_local2 < _local3) {
getInstanceAtDepth(_local2).swapDepths(_local2 - 1);
_local2++;
}
numChildren = ((numChildren-1));
}
function setChildIndex(child, index) {
var _local3 = child.getDepth();
var _local2;
var _local1;
if (_local3 == index) {
return(undefined);
}
_local2 = ((_local3 < index) ? 1 : -1);
_local1 = _local3;
while (_local1 != index) {
child.swapDepths(_local1 + _local2);
_local1 = _local1 + _local2;
}
}
function getChildIndex(child) {
return(child.getDepth());
}
function addEventListener(type, listenerObject, listenerFunctionName) {
switch (type) {
case com.novelgames.flashgames.commonAS2.MouseEvent.CLICK :
onRelease = function () {
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.MouseEvent(this));
};
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.ROLL_OVER :
onRollOver = function () {
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.MouseEvent(this));
};
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.ROLL_OUT :
onRollOut = function () {
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.MouseEvent(this));
};
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.MOUSE_DOWN :
onPress = function () {
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.MouseEvent(this));
};
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.MOUSE_UP :
onRelease = function () {
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.MouseEvent(this));
};
onReleaseOutside = onRelease;
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.MOUSE_MOVE :
onMouseMove = function () {
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.MouseEvent(this));
};
break;
case com.novelgames.flashgames.commonAS2.Event.ENTER_FRAME :
onEnterFrame = function () {
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.MouseEvent(this));
};
}
}
function removeEventListener(type) {
switch (type) {
case com.novelgames.flashgames.commonAS2.MouseEvent.CLICK :
onRelease = null;
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.ROLL_OVER :
onRollOver = null;
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.ROLL_OUT :
onRollOut = null;
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.MOUSE_DOWN :
onPress = null;
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.MOUSE_UP :
onRelease = null;
onReleaseOutside = null;
break;
case com.novelgames.flashgames.commonAS2.MouseEvent.MOUSE_MOVE :
onMouseMove = null;
break;
case com.novelgames.flashgames.commonAS2.Event.ENTER_FRAME :
onEnterFrame = null;
}
}
function navigateToURL(urlRequest, window) {
getURL(urlRequest.url, window);
}
function createMovie(name) {
var _local4 = getNextHighestDepth();
var _local2;
if (createMovieCount == undefined) {
createMovieCount = 0;
}
if (name) {
_local2 = attachMovie(name, (name + "_") + createMovieCount, _local4);
} else {
_local2 = createEmptyMovieClip((name + "_") + createMovieCount, _local4);
_local2.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
}
_local2.addedToParent = false;
createMovieCount++;
return(_local2);
}
function createSound(name) {
return(new com.novelgames.flashgames.commonAS2.NewSound(this, name));
}
}
Symbol 181 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.NewStage] Frame 0
class com.novelgames.flashgames.commonAS2.NewStage
{
var addedListener, onKeyDown, onKeyUp;
function NewStage () {
addedListener = false;
onKeyDown = null;
onKeyUp = null;
}
static function getNewStage() {
if (newStage == null) {
newStage = new com.novelgames.flashgames.commonAS2.NewStage();
}
return(newStage);
}
function get stageWidth() {
return(Stage.width);
}
function get stageHeight() {
return(Stage.height);
}
function set focus(object) {
Selection.setFocus(object);
//return(focus);
}
function get focus() {
return(Selection.getFocus());
}
function addEventListener(type, listenerObject, listenerFunctionName) {
if (!addedListener) {
Key.addListener(this);
addedListener = true;
}
switch (type) {
case com.novelgames.flashgames.commonAS2.KeyboardEvent.KEY_DOWN :
onKeyDown = function () {
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.KeyboardEvent(this));
};
break;
case com.novelgames.flashgames.commonAS2.KeyboardEvent.KEY_UP :
onKeyUp = function () {
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.KeyboardEvent(this));
};
}
}
function removeEventListener(type) {
switch (type) {
case com.novelgames.flashgames.commonAS2.KeyboardEvent.KEY_DOWN :
onKeyDown = null;
break;
case com.novelgames.flashgames.commonAS2.KeyboardEvent.KEY_UP :
onKeyUp = null;
}
}
static var newStage = null;
}
Symbol 182 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.KeyboardEvent] Frame 0
class com.novelgames.flashgames.commonAS2.KeyboardEvent
{
var target, currentTarget;
function KeyboardEvent (target) {
this.target = target;
currentTarget = target;
}
function get charCode() {
return(Key.getAscii());
}
function get keyCode() {
return(Key.getCode());
}
function updateAfterEvent() {
_global.updateAfterEvent();
}
static var KEY_DOWN = "keyDown";
static var KEY_UP = "keyUp";
}
Symbol 183 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.Rectangle] Frame 0
class com.novelgames.flashgames.commonAS2.Rectangle
{
var x, y, width, height;
function Rectangle (x, y, width, height) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
function get left() {
return(x);
}
function set left(left) {
x = left;
//return(this.left);
}
function get top() {
return(y);
}
function set top(top) {
y = top;
//return(this.top);
}
function get right() {
return(x + width);
}
function set right(right) {
width = right - x;
//return(this.right);
}
function get bottom() {
return(y + height);
}
function set bottom(bottom) {
height = bottom - y;
//return(this.bottom);
}
function get size() {
return({x:width, y:height});
}
function set size(size) {
width = size.x;
height = size.y;
//return(this.size);
}
function get topLeft() {
return({x:x, y:y});
}
function set topLeft(topLeft) {
x = topLeft.x;
y = topLeft.y;
//return(this.topLeft);
}
function get bottomRight() {
return({x:x + width, y:y + height});
}
function set bottomRight(bottomRight) {
width = x - bottomRight.x;
height = y - bottomRight.y;
//return(this.bottomRight);
}
}
Symbol 184 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.MouseEvent] Frame 0
class com.novelgames.flashgames.commonAS2.MouseEvent
{
var target, currentTarget;
function MouseEvent (target) {
this.target = target;
currentTarget = target;
}
function updateAfterEvent() {
_global.updateAfterEvent();
}
static var CLICK = "click";
static var DOUBLE_CLICK = "doubleClick";
static var MOUSE_DOWN = "mouseDown";
static var MOUSE_MOVE = "mouseMove";
static var MOUSE_OUT = "mouseOut";
static var MOUSE_OVER = "mouseOver";
static var MOUSE_UP = "mouseUp";
static var MOUSE_WHEEL = "mouseWheel";
static var ROLL_OUT = "rollOut";
static var ROLL_OVER = "rollOver";
}
Symbol 185 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.Event] Frame 0
class com.novelgames.flashgames.commonAS2.Event
{
function Event () {
}
static var ENTER_FRAME = "enterFrame";
}
Symbol 186 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.URLRequest] Frame 0
class com.novelgames.flashgames.commonAS2.URLRequest
{
var url;
function URLRequest (url) {
this.url = url;
}
}
Symbol 187 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.NewSound] Frame 0
class com.novelgames.flashgames.commonAS2.NewSound extends Sound
{
var attachSound, start;
function NewSound (target, symbolName) {
super(target);
attachSound(symbolName);
}
function play() {
start();
}
}