Frame 1
if (this.inited == undefined) {
this.inited = true;
com.novelgames.flashgames.MainClacbrikDemo.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) {
};
this.onSpecialCollisionOut = function (instance, chimbo) {
};
this.onCustomMessage = function (type, _xml) {
this.kashgame.onCustomMessage(type, _xml);
};
this.cleanBeforeUnload = function () {
};
this.prepareToStart = function (chimbo_mc) {
};
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("mountain.bac_expert");
}
stop();
Symbol 29 MovieClip Frame 5
this._parent._parent._parent._visible = false;
Symbol 35 MovieClip Frame 5
this._parent._parent._parent._visible = false;
Symbol 41 MovieClip Frame 5
this._parent._parent._parent._visible = false;
Symbol 47 MovieClip Frame 5
this._parent._parent._parent._visible = false;
Symbol 53 MovieClip Frame 5
this._parent._parent._parent._visible = false;
Symbol 59 MovieClip Frame 5
this._parent._parent._parent._visible = false;
Symbol 74 MovieClip Frame 5
this._parent._parent._parent._visible = false;
Symbol 75 MovieClip Frame 1
stop();
Symbol 85 MovieClip [Block] Frame 1
#initclip 61
Object.registerClass("Block", com.novelgames.flashgames.clacbrik.Block);
#endinitclip
Symbol 87 MovieClip [InstructionsButton] Frame 1
#initclip 40
Object.registerClass("InstructionsButton", com.novelgames.flashgames.commonAS2.InstructionsButton);
#endinitclip
Symbol 93 MovieClip [GameOverDialog] Frame 1
#initclip 41
Object.registerClass("GameOverDialog", com.novelgames.flashgames.clacbrik.GameOverDialog);
#endinitclip
Symbol 97 MovieClip [MuteButton] Frame 1
#initclip 42
Object.registerClass("MuteButton", com.novelgames.flashgames.commonAS2.MuteButton);
#endinitclip
Symbol 109 MovieClip Frame 1
stop();
Symbol 109 MovieClip Frame 2
stop();
Symbol 110 MovieClip [P0] Frame 1
stop();
Symbol 110 MovieClip [P0] Frame 2
stop();
Symbol 117 MovieClip [Board] Frame 1
#initclip 43
Object.registerClass("Board", com.novelgames.flashgames.clacbrik.Board);
#endinitclip
Symbol 118 MovieClip [empty] Frame 1
#initclip 44
Object.registerClass("empty", com.novelgames.flashgames.commonAS2.NewMovieClip);
#endinitclip
Symbol 120 MovieClip [clickDetector] Frame 1
#initclip 45
Object.registerClass("clickDetector", com.novelgames.flashgames.commonAS2.NewMovieClip);
#endinitclip
Symbol 181 MovieClip [mc_bt_jouer] Frame 1
#initclip 46
Object.registerClass("mc_bt_jouer", chapatiz.display.MCButton);
#endinitclip
stop();
Symbol 184 MovieClip [levelWin_mc] Frame 1
#initclip 47
Object.registerClass("levelWin_mc", com.novelgames.flashgames.clacbrik.LevelWinDialog);
#endinitclip
Symbol 185 MovieClip [Game] Frame 1
#initclip 48
Object.registerClass("Game", com.novelgames.flashgames.clacbrik.Game);
#endinitclip
Symbol 206 MovieClip [Title] Frame 1
#initclip 49
Object.registerClass("Title", com.novelgames.flashgames.commonAS2.Title);
#endinitclip
Symbol 211 MovieClip [TipsButtonMovie] Frame 1
#initclip 50
Object.registerClass("TipsButtonMovie", com.novelgames.flashgames.clacbrik.TipsButtonMovie);
#endinitclip
Symbol 215 MovieClip [Instructions] Frame 1
#initclip 51
Object.registerClass("Instructions", com.novelgames.flashgames.commonAS2.Instructions);
#endinitclip
Symbol 222 MovieClip [MessagePlayAgain] Frame 1
#initclip 52
Object.registerClass("MessagePlayAgain", com.novelgames.flashgames.clacbrik.MessagePlayAgain);
#endinitclip
Symbol 224 MovieClip [nextButton] Frame 1
#initclip 53
Object.registerClass("nextButton", chapatiz.display.MCButton);
#endinitclip
Symbol 234 MovieClip Frame 27
this.gotoAndPlay("boucle");
Symbol 235 MovieClip [Ball] Frame 1
#initclip 54
Object.registerClass("Ball", com.novelgames.flashgames.clacbrik.Ball);
#endinitclip
Symbol 239 MovieClip [mc_bt_rejouer] Frame 1
#initclip 55
Object.registerClass("mc_bt_rejouer", chapatiz.display.MCButton);
#endinitclip
Symbol 246 MovieClip [P0] Frame 1
stop();
Symbol 246 MovieClip [P0] Frame 2
stop();
Symbol 250 MovieClip [mc_bt_chapatiz] Frame 1
#initclip 56
Object.registerClass("mc_bt_chapatiz", chapatiz.display.MCButton);
#endinitclip
stop();
Symbol 257 MovieClip [mc_bt_score] Frame 1
#initclip 57
Object.registerClass("mc_bt_score", chapatiz.display.MCButton);
#endinitclip
stop();
Symbol 263 MovieClip [mc_bt_infos] Frame 1
#initclip 58
Object.registerClass("mc_bt_infos", chapatiz.display.MCButton);
#endinitclip
stop();
Symbol 286 MovieClip Frame 1
stop();
Symbol 286 MovieClip Frame 2
stop();
Symbol 288 MovieClip Frame 80
gotoAndPlay (1);
Symbol 294 MovieClip Frame 1
stop();
Symbol 299 MovieClip [battant] Frame 1
#initclip 59
Object.registerClass("battant", com.novelgames.flashgames.clacbrik.Ascensseur);
#endinitclip
Symbol 299 MovieClip [battant] Frame 28
stop();
Symbol 299 MovieClip [battant] Frame 60
stop();
Symbol 302 MovieClip [empty] Frame 1
#initclip 60
Object.registerClass("empty", com.novelgames.flashgames.commonAS2.NewMovieClip);
#endinitclip
Symbol 318 MovieClip Frame 1
stop();
Symbol 318 MovieClip Frame 103
gotoAndStop (1);
Symbol 320 MovieClip Frame 1
stop();
Symbol 320 MovieClip Frame 103
gotoAndStop (1);
Symbol 329 MovieClip [__Packages.com.novelgames.flashgames.MainClacbrikDemo] Frame 0
class com.novelgames.flashgames.MainClacbrikDemo extends MovieClip
{
var ascensseur, game, container, titleDepth;
function MainClacbrikDemo () {
super();
}
static function initialize(movieClip) {
com.novelgames.flashgames.clacbrik.Config.GAME_DEMO = true;
com.novelgames.flashgames.clacbrik.Config.URL_REDIRECT = "http://www.chapatiz.com";
_level0.langArray = new Array();
_level0.langArray.CLACBRIK_START = "Jouer";
_level0.langArray.CLACBRIK_SCORE = "Score";
_level0.langArray.CLACBRIK_MOREGAMES = "+ de jeux";
_level0.langArray.CLACBRIK_REPLAY = "Rejouer";
_level0.langArray.CLACBRIK_LEVELCOMPLETE = "Niveau Termin\u00E9";
_level0.langArray.CLACBRIK_NEXTLEVEL = "Suivant";
_level0.langArray.CLACBRIK_HOWTOPLAY0 = "Utilise la souris pour d\u00E9placer le trampoline";
_level0.langArray.CLACBRIK_SCORE0 = "Ton score";
movieClip.__proto__ = com.novelgames.flashgames.MainClacbrikDemo.prototype;
movieClip.stop();
movieClip.ascensseur.init();
movieClip.gotoTitlePage();
movieClip.onEnterFrame = movieClip.checkTitle;
}
function gotoTitlePage() {
trace("Main.gotoTitlePage");
ascensseur.showAcceuil();
}
function gotoInstructionsPage() {
trace("Main.gotoInstructionsPage");
ascensseur.showInstruction();
}
function gotoGamePage() {
trace("Main.gotoGamePage");
ascensseur.open();
game = com.novelgames.flashgames.clacbrik.Game(container.attachMovie("Game", "game", titleDepth));
}
function showHighScores() {
trace("showHighScores()");
}
function showEnterHighScore(score) {
showPlayAgain(score);
trace(("showEnterHighScore(" + score) + ")");
}
function showGameOver() {
removePage();
}
function showPlayAgain(score) {
removePage();
ascensseur.showGameOver(score);
}
function removePage() {
if (game) {
game.removeMovieClip();
}
}
}
Symbol 330 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));
}
function toString() {
return("newMovieClip");
}
var addedToParent = false;
}
Symbol 331 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 332 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 333 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 334 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 335 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.Event] Frame 0
class com.novelgames.flashgames.commonAS2.Event
{
function Event () {
}
static var ENTER_FRAME = "enterFrame";
}
Symbol 336 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.URLRequest] Frame 0
class com.novelgames.flashgames.commonAS2.URLRequest
{
var url;
function URLRequest (url) {
this.url = url;
}
}
Symbol 337 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();
}
}
Symbol 338 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.CommonGame] Frame 0
class com.novelgames.flashgames.commonAS2.CommonGame extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
function CommonGame () {
super();
}
static function get gameStage() {
return(com.novelgames.flashgames.commonAS2.NewStage.getNewStage());
}
function pause() {
com.novelgames.flashgames.commonAS2.NewTimer.pause();
}
function unpause() {
com.novelgames.flashgames.commonAS2.NewTimer.unpause();
}
}
Symbol 339 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.Timer] Frame 0
interface com.novelgames.flashgames.commonAS2.Timer
{
}
Symbol 340 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.NewTimer] Frame 0
class com.novelgames.flashgames.commonAS2.NewTimer implements com.novelgames.flashgames.commonAS2.Timer
{
static var pauseTime;
var delay, repeatCount, currentCount, listenerObject, listenerFunctionName, adjustedStartTime, usingDelay, intervalID;
function NewTimer (delay, repeatCount) {
if (repeatCount == undefined) {
repeatCount = 0;
}
this.delay = delay;
this.repeatCount = repeatCount;
currentCount = 0;
}
static function getTimer() {
if (paused) {
return(pauseTime - totalPausedTime);
}
return(getTimer() - totalPausedTime);
}
static function pause() {
if (paused) {
return(undefined);
}
paused = true;
pauseTime = getTimer();
}
static function unpause() {
if (!paused) {
return(undefined);
}
paused = false;
totalPausedTime = totalPausedTime + (getTimer() - pauseTime);
}
function addEventListener(type, listenerObject, listenerFunctionName) {
if (type != com.novelgames.flashgames.commonAS2.TimerEvent.TIMER) {
return(undefined);
}
this.listenerObject = listenerObject;
this.listenerFunctionName = listenerFunctionName;
}
function removeEventListener(type) {
if (type != com.novelgames.flashgames.commonAS2.TimerEvent.TIMER) {
return(undefined);
}
listenerObject = null;
listenerFunctionName = null;
}
function start() {
adjustedStartTime = getTimer();
usingDelay = delay;
clearInterval(intervalID);
intervalID = setInterval(this, "timerEventListener", delay);
}
function stop() {
clearInterval(intervalID);
}
function toString() {
return(("NewTimer : " + intervalID) + "");
}
function timerEventListener() {
currentCount++;
if (paused) {
clearInterval(intervalID);
usingDelay = Math.max(delay - (getTimer() - adjustedStartTime), 1);
currentCount--;
intervalID = setInterval(this, "timerEventListener", usingDelay);
return(undefined);
}
if ((getTimer() - adjustedStartTime) >= delay) {
adjustedStartTime = getTimer();
if (usingDelay != delay) {
clearInterval(intervalID);
usingDelay = delay;
intervalID = setInterval(this, "timerEventListener", usingDelay);
}
listenerObject[listenerFunctionName](new com.novelgames.flashgames.commonAS2.TimerEvent());
if ((repeatCount != 0) && (currentCount >= repeatCount)) {
clearInterval(intervalID);
}
} else {
clearInterval(intervalID);
usingDelay = Math.max(delay - (getTimer() - adjustedStartTime), 1);
currentCount--;
intervalID = setInterval(this, "timerEventListener", usingDelay);
}
}
static var paused = false;
static var totalPausedTime = 0;
}
Symbol 341 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.TimerEvent] Frame 0
class com.novelgames.flashgames.commonAS2.TimerEvent
{
function TimerEvent () {
}
function updateAfterEvent() {
_global.updateAfterEvent();
}
static var TIMER = "timer";
}
Symbol 342 MovieClip [__Packages.com.novelgames.flashgames.clacbrik.Game] Frame 0
class com.novelgames.flashgames.clacbrik.Game extends com.novelgames.flashgames.commonAS2.CommonGame
{
var gameOverDialog, scoreText, clickDetector, blocksHolder, ballsHolder, board, soundBoard, createSound, soundBlock1, soundBlock2, soundBlock3, soundNarrow, soundBonus, soundDead1, soundDead2, soundDead3, soundWin, soundLose, lastTime, timer, __score, __level, levelText, blocks, gameStarted, ballStarted, balls, ballsNo, explodesBlocks, addEventListener, mouseX, oldX, _parent, createMovie, levelWin;
function Game () {
super();
gameOverDialog.__proto__ = com.novelgames.flashgames.clacbrik.GameOverDialog.prototype;
scoreText.__proto__ = com.novelgames.flashgames.commonAS2.NewTextField.prototype;
clickDetector.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
blocksHolder.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
ballsHolder.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
board.__proto__ = com.novelgames.flashgames.clacbrik.Board.prototype;
soundBoard = createSound("SoundBoard");
soundBlock1 = createSound("SoundBlock1");
soundBlock2 = createSound("SoundBlock2");
soundBlock3 = createSound("SoundBlock3");
soundNarrow = createSound("SoundNarrow");
soundBonus = createSound("SoundBonus");
soundDead1 = createSound("SoundDead1");
soundDead2 = createSound("SoundDead2");
soundDead3 = createSound("SoundDead3");
soundWin = createSound("SoundWin");
soundLose = createSound("SoundLose");
score = (0);
startLevel(1);
lastTime = com.novelgames.flashgames.commonAS2.NewTimer.getTimer();
timer = new com.novelgames.flashgames.commonAS2.NewTimer(1, 0);
timer.addEventListener(com.novelgames.flashgames.commonAS2.TimerEvent.TIMER, this, "onTime");
timer.start();
}
function set score(score) {
__score = score;
scoreText.text = score.toString();
//return(this.score);
}
function get score() {
return(__score);
}
function set level(lvl) {
__level = lvl;
levelText.text = lvl.toString();
//return(level);
}
function get level() {
return(__level);
}
function onTime(timerEvent) {
var _local2 = com.novelgames.flashgames.commonAS2.NewTimer.getTimer();
timerEvent.updateAfterEvent();
moveBalls(_local2 - lastTime);
lastTime = _local2;
}
function onMouseMoveEvent(mouseEvent) {
moveBoard();
}
function onMouseDownEvent(mouseEvent) {
startBall();
}
function addBlockState(theState) {
var _local2;
do {
_local2 = Math.floor(Math.random() * blocks.length);
} while (blocks[_local2].getState() != com.novelgames.flashgames.clacbrik.Block.NORMAL);
blocks[_local2].setState(theState);
}
function startLevel(lvl) {
level = (lvl);
initLevel();
}
function initLevel() {
trace("initLevel " + __level);
var _local2;
gameStarted = true;
ballStarted = false;
if (balls != undefined) {
for (var _local4 in balls) {
balls[_local4].removeMovieClip();
}
}
balls = new Array();
balls[0] = com.novelgames.flashgames.clacbrik.Ball(ballsHolder.attachMovie("Ball", "Ball_" + ballsHolder.getNextHighestDepth(), ballsHolder.getNextHighestDepth()));
balls[0].x = board._x - ballsHolder._x;
balls[0].y = (board._y - ballsHolder._y) - (balls[0].height / 2);
balls[0].speedX = 0;
balls[0].speedY = 0;
balls[0].speed = 0;
ballsHolder.addChild(balls[0]);
ballsNo = 1;
if (__level == 1) {
com.novelgames.flashgames.clacbrik.Config.DIMENSION_Y = 2;
}
if ((level % 3) == 0) {
com.novelgames.flashgames.clacbrik.Config.DIMENSION_Y++;
}
for (var _local3 in blocks) {
blocks[_local3].removeMovieClip();
}
for (var _local3 in explodesBlocks) {
explodesBlocks[_local3].removeMovieClip();
}
blocks = new Array(com.novelgames.flashgames.clacbrik.Config.DIMENSION_X * com.novelgames.flashgames.clacbrik.Config.DIMENSION_Y);
_local2 = 0;
while (_local2 < (com.novelgames.flashgames.clacbrik.Config.DIMENSION_X * com.novelgames.flashgames.clacbrik.Config.DIMENSION_Y)) {
blocks[_local2] = com.novelgames.flashgames.clacbrik.Block(blocksHolder.attachMovie("Block", "Block_" + blocksHolder.getNextHighestDepth(), blocksHolder.getNextHighestDepth()));
blocks[_local2].initialize(_local2 % com.novelgames.flashgames.clacbrik.Config.DIMENSION_X, Math.floor(_local2 / com.novelgames.flashgames.clacbrik.Config.DIMENSION_X));
blocksHolder.addChild(blocks[_local2]);
_local2++;
}
_local2 = 0;
while (_local2 < com.novelgames.flashgames.clacbrik.Config.SPECIALBLOCKNO_EXTRABALL) {
addBlockState(com.novelgames.flashgames.clacbrik.Block.EXTRABALL);
_local2++;
}
_local2 = 0;
while (_local2 < com.novelgames.flashgames.clacbrik.Config.SPECIALBLOCKNO_WIDE) {
addBlockState(com.novelgames.flashgames.clacbrik.Block.WIDEBOARD);
_local2++;
}
_local2 = 0;
while (_local2 < com.novelgames.flashgames.clacbrik.Config.SPECIALBLOCKNO_NAROOW) {
addBlockState(com.novelgames.flashgames.clacbrik.Block.NARROWBOARD);
_local2++;
}
clickDetector.addEventListener(com.novelgames.flashgames.commonAS2.MouseEvent.MOUSE_DOWN, this, "onMouseDownEvent");
addEventListener(com.novelgames.flashgames.commonAS2.MouseEvent.MOUSE_MOVE, this, "onMouseMoveEvent");
}
function startBall() {
var _local3;
if (!gameStarted) {
return(undefined);
}
if (ballStarted) {
return(undefined);
}
_local3 = (Math.random() * (com.novelgames.flashgames.clacbrik.Config.BEGINANGLE_HIGH - com.novelgames.flashgames.clacbrik.Config.BEGINANGLE_LOW)) + com.novelgames.flashgames.clacbrik.Config.BEGINANGLE_LOW;
var _local2 = com.novelgames.flashgames.clacbrik.Config["BALLSPEED_" + (level % 3)];
balls[0].speed = _local2;
balls[0].speedX = _local2 * Math.sin(_local3);
balls[0].speedY = (-_local2) * Math.cos(_local3);
ballStarted = true;
}
function moveBoard() {
if (!gameStarted) {
return(undefined);
}
board._x = mouseX;
if (oldX < board._x) {
board.board.leftHam.play();
board.board.rightHam.gotoAndStop(1);
} else if (oldX > board._x) {
board.board.leftHam.gotoAndStop(1);
board.board.rightHam.play();
} else if (oldX == board._x) {
board.board.leftHam.gotoAndStop(1);
board.board.rightHam.gotoAndStop(1);
}
if (board._x < (com.novelgames.flashgames.clacbrik.Config.FIELD_X + (board.__get__width() / 2))) {
board._x = com.novelgames.flashgames.clacbrik.Config.FIELD_X + (board.__get__width() / 2);
} else if (board._x > ((com.novelgames.flashgames.clacbrik.Config.FIELD_X + com.novelgames.flashgames.clacbrik.Config.FIELD_WIDTH) - (board.__get__width() / 2))) {
board._x = (com.novelgames.flashgames.clacbrik.Config.FIELD_X + com.novelgames.flashgames.clacbrik.Config.FIELD_WIDTH) - (board.__get__width() / 2);
}
if (!ballStarted) {
balls[0].x = board._x - ballsHolder._x;
}
oldX = board._x;
}
function moveBalls(dTime) {
var _local4;
var _local3;
var _local2;
if (!gameStarted) {
return(undefined);
}
if (!ballStarted) {
return(undefined);
}
_parent.clear();
_local2 = 0;
while (_local2 < balls.length) {
if (balls[_local2]._currentframe > 1) {
} else {
_local4 = balls[_local2].x;
_local3 = balls[_local2].y;
balls[_local2].x = balls[_local2].x + ((balls[_local2].speedX * dTime) / 1000);
balls[_local2].y = balls[_local2].y + ((balls[_local2].speedY * dTime) / 1000);
checkHitBlock(balls[_local2], _local4, _local3);
checkHitWall(balls[_local2]);
checkHitBoard(balls[_local2], _local4, _local3);
checkDead(balls[_local2]);
}
_local2++;
}
}
function checkHitBlock(theBall, oldX, oldY) {
var _local3;
var _local5;
_local3 = 0;
while (_local3 < blocks.length) {
if (!blocks[_local3].visible) {
} else if (blocks[_local3].hitTestObject(theBall)) {
_local5 = getHitDirection(theBall, oldX, oldY, blocks[_local3]);
if (_local5 == HITFROMBOTTOM) {
theBall.speedY = -theBall.speedY;
theBall._y = ((blocks[_local3].y + blocks[_local3].height) + (theBall.__get__height() / 2)) + (((blocks[_local3].y + blocks[_local3].height) + (theBall.__get__height() / 2)) - theBall._y);
} else if (_local5 == HITFROMTOP) {
theBall.speedY = -theBall.speedY;
theBall._y = (blocks[_local3].y - (theBall.__get__height() / 2)) - ((theBall._y + (theBall.__get__height() / 2)) - blocks[_local3].y);
} else if (_local5 == HITFROMRIGHT) {
theBall.speedX = -theBall.speedX;
theBall._x = ((blocks[_local3].x + blocks[_local3].width) + (theBall.__get__width() / 2)) + (((blocks[_local3].x + blocks[_local3].width) + (theBall.__get__width() / 2)) - theBall._x);
} else if (_local5 == HITFROMLEFT) {
theBall.speedX = -theBall.speedX;
theBall._x = (blocks[_local3].x - (theBall.__get__width() / 2)) - ((theBall._x + (theBall.__get__width() / 2)) - blocks[_local3].x);
}
var _local4 = com.novelgames.flashgames.clacbrik.Block(createMovie("Block"));
_local4.initialize(_local3 % com.novelgames.flashgames.clacbrik.Config.DIMENSION_X, Math.floor(_local3 / com.novelgames.flashgames.clacbrik.Config.DIMENSION_X));
_local4.x = _local4.x + blocksHolder._x;
_local4.y = _local4.y + blocksHolder._y;
_local4.setState(blocks[_local3].getState());
_local4.__set__color(blocks[_local3].color);
_local4.explode();
explodesBlocks.push(_local4);
score = score + (blocks[_local3].getScore() * ballsNo);
checkSpecialBlock(blocks[_local3]);
blocks[_local3].visible = false;
checkGameWin();
}
_local3++;
}
}
function getHitDirection(theBall, oldX, oldY, theBlock) {
if (theBall.speedY < 0) {
if (((theBall._y - (theBall.__get__height() / 2)) < (theBlock.__get__y() + theBlock.__get__height())) && ((oldY - (theBall.__get__height() / 2)) >= (theBlock.__get__y() + theBlock.__get__height()))) {
return(HITFROMBOTTOM);
}
}
if (theBall.speedY > 0) {
if (((theBall._y + (theBall.__get__height() / 2)) > theBlock.__get__y()) && ((oldY + (theBall.__get__height() / 2)) <= theBlock.__get__y())) {
return(HITFROMTOP);
}
}
if (theBall.speedX < 0) {
if (((theBall._x - (theBall.__get__width() / 2)) < (theBlock.__get__x() + theBlock.__get__width())) && ((oldX - (theBall.__get__width() / 2)) >= (theBlock.__get__x() + theBlock.__get__width()))) {
return(HITFROMRIGHT);
}
}
if (theBall.speedX > 0) {
if (((theBall._x + (theBall.__get__width() / 2)) > theBlock.__get__x()) && ((oldX + (theBall.__get__width() / 2)) <= theBlock.__get__x())) {
return(HITFROMLEFT);
}
}
return(HITFROMBOTTOM);
}
function checkSpecialBlock(theBlock) {
var _local5 = theBlock.getState();
var _local2;
var _local6;
if (_local5 == com.novelgames.flashgames.clacbrik.Block.EXTRABALL) {
_local2 = balls.length;
balls[_local2] = com.novelgames.flashgames.clacbrik.Ball(ballsHolder.attachMovie("Ball", "Ball_" + ballsHolder.getNextHighestDepth(), ballsHolder.getNextHighestDepth()));
balls[_local2]._x = theBlock._x + (theBlock.__get__width() / 2);
balls[_local2]._y = theBlock._y + (theBlock.__get__height() / 2);
ballsHolder.addChild(balls[_local2]);
_local6 = (Math.random() * (com.novelgames.flashgames.clacbrik.Config.BEGINANGLE_HIGH - com.novelgames.flashgames.clacbrik.Config.BEGINANGLE_LOW)) + com.novelgames.flashgames.clacbrik.Config.BEGINANGLE_LOW;
var _local3 = com.novelgames.flashgames.clacbrik.Config["BALLSPEED_" + (level % 3)];
balls[_local2].speed = _local3;
balls[_local2].speedX = _local3 * Math.sin(_local6);
balls[_local2].speedY = (-_local3) * Math.cos(_local6);
ballsNo++;
soundBonus.play();
} else if (_local5 == com.novelgames.flashgames.clacbrik.Block.NARROWBOARD) {
board.changeToNarrow();
soundNarrow.play();
} else if (_local5 == com.novelgames.flashgames.clacbrik.Block.WIDEBOARD) {
board.changeToWide();
soundBonus.play();
} else {
var _local7 = Math.floor((Math.random() * 2) + 1);
this["soundBlock" + _local7].play();
}
}
function checkHitWall(theBall) {
if (theBall._x < (theBall.__get__width() / 2)) {
theBall._x = ((theBall.__get__width() / 2) + (theBall.__get__width() / 2)) - theBall._x;
theBall.speedX = -theBall.speedX;
} else if (theBall._x > (com.novelgames.flashgames.clacbrik.Config.FIELD_WIDTH - (theBall.__get__width() / 2))) {
theBall._x = (com.novelgames.flashgames.clacbrik.Config.FIELD_WIDTH - (theBall.__get__width() / 2)) - ((theBall._x - com.novelgames.flashgames.clacbrik.Config.FIELD_WIDTH) + (theBall.__get__width() / 2));
theBall.speedX = -theBall.speedX;
}
if (theBall._y < (theBall.__get__height() / 2)) {
theBall._y = ((theBall.__get__height() / 2) + (theBall.__get__height() / 2)) - theBall._y;
theBall.speedY = -theBall.speedY;
}
}
function checkHitBoard(theBall, oldX, oldY) {
var _local4;
var _local6;
var _local3;
if ((((theBall._y + (theBall.__get__height() / 2)) >= (board._y - ballsHolder._y)) && ((oldY + (theBall.__get__height() / 2)) <= (board._y - ballsHolder._y))) || (((theBall._y + (theBall.__get__height() / 2)) >= ((board._y - ballsHolder._y) + 6)) && ((oldY + (theBall.__get__height() / 2)) <= ((board._y - ballsHolder._y) + 6)))) {
if ((((theBall._x - (theBall.__get__height() / 2)) > ((board._x - ballsHolder._x) - (board.__get__width() / 2))) && ((theBall._x - (theBall.__get__height() / 2)) < ((board._x - ballsHolder._x) + (board.__get__width() / 2)))) || (((theBall._x + (theBall.__get__height() / 2)) > ((board._x - ballsHolder._x) - (board.__get__width() / 2))) && ((theBall._x + (theBall.__get__height() / 2)) < ((board._x - ballsHolder._x) + (board.__get__width() / 2))))) {
_local4 = ((theBall._x - (board._x - ballsHolder._x)) / (board.__get__width() / 2)) * com.novelgames.flashgames.clacbrik.Config.BOARDANGLEMAX;
_local6 = -Math.atan(theBall.speedX / theBall.speedY);
_local3 = _local4 * 5;
theBall.speedX = theBall.speed * Math.sin(_local3);
theBall.speedY = (-theBall.speed) * Math.cos(_local3);
theBall._y = ((board._y - ballsHolder._y) - (theBall.__get__height() / 2)) - ((theBall._y + (theBall.__get__height() / 2)) - (board._y - ballsHolder._y));
soundBoard.play();
}
}
}
function checkDead(theBall) {
if ((theBall._y - (theBall.__get__height() / 2)) > com.novelgames.flashgames.clacbrik.Config.FIELD_HEIGHT) {
theBall.gotoAndStop("hitFloor");
ballsNo--;
var _local3 = Math.floor((Math.random() * 2) + 1);
this["soundDead" + _local3].play();
checkGameOver();
}
}
function checkGameOver() {
if (ballsNo > 0) {
return(undefined);
}
gameStarted = false;
gameOver();
}
function checkGameWin() {
var _local2;
_local2 = 0;
while (_local2 < blocks.length) {
if (blocks[_local2].visible) {
return(undefined);
}
_local2++;
}
gameStarted = false;
gameWin();
}
function gameOver() {
soundLose.play();
_parent._parent.showEnterHighScore(score);
}
function gameWin() {
if (com.novelgames.flashgames.clacbrik.Config.GAME_DEMO && (__level > 4)) {
gameOver();
} else {
levelWin.show(level);
soundWin.play();
}
}
static var HITFROMBOTTOM = 1;
static var HITFROMTOP = 2;
static var HITFROMLEFT = 3;
static var HITFROMRIGHT = 4;
}
Symbol 343 MovieClip [__Packages.com.novelgames.flashgames.clacbrik.GameOverDialog] Frame 0
class com.novelgames.flashgames.clacbrik.GameOverDialog extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var gotoAndStop, messagePlayAgain, createMovie, addChild, __get__parent;
function GameOverDialog () {
super();
(gotoAndStop("hide"));// not popped
}
function showGameOver() {
(gotoAndStop("gameOver"));// not popped
}
function showGameWin() {
(gotoAndStop("gameWin"));// not popped
}
function showPlayAgain() {
messagePlayAgain = com.novelgames.flashgames.clacbrik.MessagePlayAgain(createMovie("MessagePlayAgain"));
messagePlayAgain.playAgainButton.addEventListener(com.novelgames.flashgames.commonAS2.MouseEvent.CLICK, this, "playAgainButtonClicked");
messagePlayAgain.homeButton.addEventListener(com.novelgames.flashgames.commonAS2.MouseEvent.CLICK, this, "homeButtonClicked");
addChild(messagePlayAgain);
}
function playAgainButtonClicked(mouseEvent) {
Object(__get__parent().parent).gotoGamePage();
}
function homeButtonClicked(mouseEvent) {
Object(__get__parent().parent).gotoTitlePage();
}
}
Symbol 344 MovieClip [__Packages.com.novelgames.flashgames.clacbrik.MessagePlayAgain] Frame 0
class com.novelgames.flashgames.clacbrik.MessagePlayAgain extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var playAgainButton, homeButton;
function MessagePlayAgain () {
super();
playAgainButton.__proto__ = com.novelgames.flashgames.commonAS2.NewButton.prototype;
homeButton.__proto__ = com.novelgames.flashgames.commonAS2.NewButton.prototype;
}
}
Symbol 345 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.NewButton] Frame 0
class com.novelgames.flashgames.commonAS2.NewButton extends Button
{
var _xmouse, _ymouse, _visible, _alpha, _name, onRelease, onRollOver, onRollOut, onPress, onReleaseOutside;
function NewButton () {
super();
}
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 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 name() {
return(_name);
}
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;
}
}
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;
}
}
}
Symbol 346 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.NewTextField] Frame 0
class com.novelgames.flashgames.commonAS2.NewTextField extends TextField
{
var _x, _y, _rotation, _visible, _alpha, _width, _height, scroll, maxscroll;
function NewTextField () {
super();
}
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 scrollV(scrollV) {
scroll = scrollV;
//return(this.scrollV);
}
function get scrollV() {
return(scroll);
}
function set maxScrollV(maxScrollV) {
maxscroll = maxScrollV;
//return(this.maxScrollV);
}
function get maxScrollV() {
return(maxscroll);
}
function setTextFormat(textFormat, beginIndex, endIndex) {
if ((beginIndex == undefined) || (endIndex == undefined)) {
super.setTextFormat(textFormat);
} else {
super.setTextFormat(beginIndex, endIndex, textFormat);
}
}
}
Symbol 347 MovieClip [__Packages.com.novelgames.flashgames.clacbrik.Board] Frame 0
class com.novelgames.flashgames.clacbrik.Board extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var gotoAndStop;
function Board () {
super();
(gotoAndStop("normal"));// not popped
}
function changeToNarrow() {
(gotoAndStop("narrow"));// not popped
}
function changeToWide() {
(gotoAndStop("wide"));// not popped
}
}
Symbol 348 MovieClip [__Packages.com.novelgames.flashgames.clacbrik.LevelWinDialog] Frame 0
class com.novelgames.flashgames.clacbrik.LevelWinDialog extends MovieClip
{
var _visible, nextButton, nextText, _parent;
function LevelWinDialog () {
super();
_visible = false;
}
function show(level) {
_visible = true;
nextButton.onReleaseMC = chapatiz.utils.Delegate.create(this, gotoNextLevel, level);
nextText.text = chapatiz.utils.Localisation.localString("CLACBRIK_LEVELCOMPLETE");
nextButton.__set__text(chapatiz.utils.Localisation.localString("CLACBRIK_NEXTLEVEL"));
}
function gotoNextLevel(level) {
_parent.startLevel(level + 1);
_visible = false;
}
}
Symbol 349 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();
}
}
function toString() {
return("MCButton");
}
static var PRESS = "press";
static var ROLL_OVER = "rollOver";
static var ROLL_OUT = "rollOut";
var _lock = false;
var _text = "";
}
Symbol 350 MovieClip [__Packages.chapatiz.utils.Delegate] Frame 0
class chapatiz.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local4 = arguments.callee.func;
var _local3 = arguments.callee.args;
return(_local4.apply(_local2, arguments.concat(_local3)));
};
_local2.target = obj;
_local2.func = func;
_local2.args = arguments.slice(2);
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 351 MovieClip [__Packages.chapatiz.utils.Localisation] Frame 0
class chapatiz.utils.Localisation
{
function Localisation () {
}
static function localString(strKey, defaultStr) {
if (((strKey == undefined) || (_level0.langArray == undefined)) || (_level0.langArray[strKey] == undefined)) {
return(((defaultStr != undefined) ? (defaultStr) : ""));
}
return(_level0.langArray[strKey]);
}
}
Symbol 352 MovieClip [__Packages.com.novelgames.flashgames.clacbrik.Block] Frame 0
class com.novelgames.flashgames.clacbrik.Block extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var _color, balloonsContainer, __set__x, __set__y, score, state, gotoAndStop;
function Block () {
super();
}
function get color() {
return(_color);
}
function set color(color) {
_color = color;
balloonsContainer.gotoAndStop(color);
balloonsContainer.balloons.balloon1.stop();
balloonsContainer.balloons.balloon2.stop();
balloonsContainer.balloons.balloon3.stop();
//return(this.color);
}
function initialize(x, y) {
__set__x(x * com.novelgames.flashgames.clacbrik.Config.BLOCK_WIDTH);
__set__y(com.novelgames.flashgames.clacbrik.Config.BLOCKSTARTY + (y * com.novelgames.flashgames.clacbrik.Config.BLOCK_HEIGHT));
score = (com.novelgames.flashgames.clacbrik.Config.DIMENSION_Y - y) * com.novelgames.flashgames.clacbrik.Config.SCOREPERROW;
state = NORMAL;
gotoAndStop("normal");
color = (Math.floor((Math.random() * 5) + 1));
}
function getScore() {
return(score);
}
function getState() {
return(state);
}
function setState(state) {
this.state = state;
switch (state) {
case EXTRABALL :
(gotoAndStop("ball"));// not popped
break;
case WIDEBOARD :
(gotoAndStop("wide"));// not popped
break;
case NARROWBOARD :
(gotoAndStop("narrow"));// not popped
break;
case NORMAL :
(gotoAndStop("normal"));// not popped
color = (_color);
}
}
function explode() {
balloonsContainer.balloons.balloon1.gotoAndStop("explode");
balloonsContainer.balloons.balloon2.gotoAndStop("explode");
balloonsContainer.balloons.balloon3.gotoAndStop("explode");
balloonsContainer.balloon1.gotoAndStop("explode");
}
static var NORMAL = 0;
static var EXTRABALL = 1;
static var WIDEBOARD = 2;
static var NARROWBOARD = 3;
static var BLUE = 1;
static var YELLOW = 2;
static var ORANGE = 3;
static var RED = 4;
static var GREEN = 5;
static var PURPLE = 6;
}
Symbol 353 MovieClip [__Packages.com.novelgames.flashgames.clacbrik.Config] Frame 0
class com.novelgames.flashgames.clacbrik.Config
{
function Config () {
}
static var FIELD_X = 35;
static var FIELD_Y = 10;
static var FIELD_WIDTH = 400;
static var FIELD_HEIGHT = 380;
static var BLOCKSTARTY = 60;
static var DIMENSION_X = 10;
static var DIMENSION_Y = 2;
static var BLOCK_WIDTH = 40;
static var BLOCK_HEIGHT = 20;
static var BALLSPEED_0 = 250;
static var BALLSPEED_1 = 400;
static var BALLSPEED_2 = 550;
static var BEGINANGLE_LOW = -0.785398163397448;
static var BEGINANGLE_HIGH = (Math.PI/4);
static var BOARDANGLEMAX = 0.15707963267949;
static var SCOREPERROW = 10;
static var SPECIALBLOCKNO_EXTRABALL = 2;
static var SPECIALBLOCKNO_WIDE = 1;
static var SPECIALBLOCKNO_NAROOW = 1;
static var MESSAGE_GAMEOVERTIME = 1000;
static var MESSAGE_GAMEWINTIME = 1000;
static var TIPS_URL = "http://www.novelgames.com/gametips/#flashGame1";
static var GAME_DEMO = false;
static var URL_REDIRECT = "http://www.chapatiz.com";
static var PARAM = "cgptl";
}
Symbol 354 MovieClip [__Packages.com.novelgames.flashgames.clacbrik.Ball] Frame 0
class com.novelgames.flashgames.clacbrik.Ball extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var gotoAndStop;
function Ball () {
super();
gotoAndStop("boule");
}
}
Symbol 355 MovieClip [__Packages.com.novelgames.flashgames.clacbrik.Ascensseur] Frame 0
class com.novelgames.flashgames.clacbrik.Ascensseur extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var gotoAndStop, _isClose, gotoAndPlay, menu, getURL;
function Ascensseur () {
super();
trace(this);
}
function init() {
trace("Ascensseur.init");
gotoAndStop("init");
_isClose = false;
}
function open() {
if (!_isClose) {
return(undefined);
}
trace("Ascensseur.open");
trace(this);
gotoAndPlay("open");
_isClose = false;
}
function close() {
if (_isClose) {
return(undefined);
}
trace("Ascensseur.close");
trace(this);
gotoAndPlay("close");
_isClose = true;
}
function showAcceuil() {
close();
trace("Ascensseur.showAcceuil");
menu.gotoAndStop("start");
menu.bt_play.onReleaseMC = chapatiz.utils.Delegate.create(this, showInstruction);
menu.bt_score.onReleaseMC = chapatiz.utils.Delegate.create(this, showScore);
menu.bt_info.onReleaseMC = chapatiz.utils.Delegate.create(this, showGames);
menu.bt_chapatiz.onReleaseMC = chapatiz.utils.Delegate.create(this, gotoChapatiz);
menu.bt_play.text = chapatiz.utils.Localisation.localString("CLACBRIK_START");
menu.bt_score.text = chapatiz.utils.Localisation.localString("CLACBRIK_SCORE");
menu.bt_info.text = chapatiz.utils.Localisation.localString("CLACBRIK_MOREGAMES");
}
function showInstruction() {
close();
trace("Ascensseur.showInstruction");
menu.gotoAndStop("instruction");
menu.bt_play.onReleaseMC = function () {
this._parent._parent._parent.gotoGamePage();
};
menu.bt_play.text = chapatiz.utils.Localisation.localString("CLACBRIK_START");
menu.howToPlay_0.text = chapatiz.utils.Localisation.localString("CLACBRIK_HOWTOPLAY0");
}
function showGameOver(score) {
trace("Ascensseur.showGameOver");
close();
menu.gotoAndStop("gameover");
menu.bt_play.onReleaseMC = function () {
trace(this._parent._parent._parent);
this._parent._parent._parent.gotoGamePage();
};
menu.bt_chapatiz.onReleaseMC = chapatiz.utils.Delegate.create(this, gotoChapatiz);
menu.score_0.text = chapatiz.utils.Localisation.localString("CLACBRIK_SCORE0");
menu.score_1.text = score + "";
menu.bt_play.label.text = chapatiz.utils.Localisation.localString("CLACBRIK_REPLAY");
}
function showScore() {
getURL((com.novelgames.flashgames.clacbrik.Config.URL_REDIRECT + "/games/clacbrik/?from=") + com.novelgames.flashgames.clacbrik.Config.PARAM, "_blank");
}
function showGames() {
getURL((com.novelgames.flashgames.clacbrik.Config.URL_REDIRECT + "/games/?from=") + com.novelgames.flashgames.clacbrik.Config.PARAM, "_blank");
}
function gotoChapatiz() {
getURL((com.novelgames.flashgames.clacbrik.Config.URL_REDIRECT + "/?from=") + com.novelgames.flashgames.clacbrik.Config.PARAM, "_blank");
}
}
Symbol 356 MovieClip [__Packages.chapatiz.rooms.kashgame.Kashgame] Frame 0
class chapatiz.rooms.kashgame.Kashgame
{
var _room, _decor, _collclip, _gameId, score;
function Kashgame (room, gameId) {
_room = room;
_decor = room.decor;
_collclip = room.collclip;
_gameId = gameId;
_level2.kashgameWindow.gameId = gameId;
}
function endGame(s) {
score = s;
_level0.server.send(("<endgame s=\"" + s) + "\"/>");
}
function onCustomMessage(type, _xml) {
var _local3 = new Array();
for (var _local4 in _xml.attributes) {
_local3[_local4] = _xml.attributes[_local4];
}
if (score >= 0) {
_local3.score = score;
}
_level2.kashgameWindow.open(type, _local3);
}
}
Symbol 357 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 358 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 359 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 360 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 361 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 362 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 363 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.InstructionsButton] Frame 0
class com.novelgames.flashgames.commonAS2.InstructionsButton extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var onRelease;
function InstructionsButton () {
super();
onRelease = function () {
this._parent._parent.showInstructionsFromGame();
};
}
}
Symbol 364 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.MuteButton] Frame 0
class com.novelgames.flashgames.commonAS2.MuteButton extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var gotoAndStop;
function MuteButton () {
super();
if (new Sound().getVolume() == 0) {
showOff();
} else {
showOn();
}
}
function onPress() {
if (new Sound().getVolume() == 0) {
new Sound().setVolume(100);
showOn();
} else {
new Sound().setVolume(0);
showOff();
}
}
function showOff() {
(gotoAndStop("off"));// not popped
}
function showOn() {
(gotoAndStop("on"));// not popped
}
}
Symbol 365 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.Title] Frame 0
class com.novelgames.flashgames.commonAS2.Title extends MovieClip
{
var startButton, highScoresButton, moreGamesButton, _parent, getURL;
function Title () {
super();
startButton.onRelease = function () {
this._parent.startButtonClicked();
};
highScoresButton.onRelease = function () {
this._parent.highScoresButtonClicked();
};
moreGamesButton.onRelease = function () {
this._parent.moreGamesButtonClicked();
};
}
function startButtonClicked() {
_parent.gotoInstructionsPage();
}
function highScoresButtonClicked() {
(getURL("http://uk.chapatiz.com/games/blobipop/", "_blank"));// not popped
}
function moreGamesButtonClicked() {
(getURL("http://uk.chapatiz.com/games", "_blank"));// not popped
}
function infoButtonClicked() {
(getURL("http://uk.chapatiz.com/cms/", "_blank"));// not popped
}
}
Symbol 366 MovieClip [__Packages.com.novelgames.flashgames.clacbrik.TipsButtonMovie] Frame 0
class com.novelgames.flashgames.clacbrik.TipsButtonMovie extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var button, navigateToURL;
function TipsButtonMovie () {
super();
button.__proto__ = com.novelgames.flashgames.commonAS2.NewButton.prototype;
button.addEventListener(com.novelgames.flashgames.commonAS2.MouseEvent.CLICK, this, "buttonClicked");
}
function buttonClicked(mouseEvent) {
navigateToURL(new com.novelgames.flashgames.commonAS2.URLRequest(com.novelgames.flashgames.clacbrik.Config.TIPS_URL), "_blank");
}
}
Symbol 367 MovieClip [__Packages.com.novelgames.flashgames.commonAS2.Instructions] Frame 0
class com.novelgames.flashgames.commonAS2.Instructions extends MovieClip
{
var didacticiel, shownFromGame, _parent;
function Instructions () {
super();
didacticiel.nextBt.onRelease = function () {
this._parent._parent.nextButtonClicked();
};
}
function initialize(shownFromGame) {
if (shownFromGame == undefined) {
shownFromGame = false;
}
this.shownFromGame = shownFromGame;
}
function nextButtonClicked() {
didacticiel.gotoAndStop("page2");
didacticiel.startButton.onRelease = function () {
this._parent._parent.startButtonClicked();
};
}
function startButtonClicked() {
if (!shownFromGame) {
_parent.gotoGamePage();
} else {
_parent.hideInstructionsFromGame();
}
}
}