Frame 1
com.novelgames.flashgames.MainJardinooDemo.initialize(this);
Symbol 5 MovieClip [InstructionsButton] Frame 1
#initclip 52
Object.registerClass("InstructionsButton", com.novelgames.flashgames.commonAS2.InstructionsButton);
#endinitclip
Symbol 9 MovieClip [MuteButton] Frame 1
#initclip 33
Object.registerClass("MuteButton", com.novelgames.flashgames.commonAS2.MuteButton);
#endinitclip
Symbol 32 MovieClip [empty] Frame 1
#initclip 34
Object.registerClass("empty", com.novelgames.flashgames.commonAS2.NewMovieClip);
#endinitclip
Symbol 36 MovieClip [GameOverDialog] Frame 1
#initclip 35
Object.registerClass("GameOverDialog", com.novelgames.flashgames.jardinoo.GameOverDialog);
#endinitclip
Symbol 37 MovieClip [Game] Frame 1
#initclip 36
Object.registerClass("Game", com.novelgames.flashgames.jardinoo.Game);
#endinitclip
Symbol 42 MovieClip [Source_] Frame 1
#initclip 37
Object.registerClass("Source_", com.novelgames.flashgames.jardinoo.Source);
#endinitclip
Symbol 48 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 1
stop();
Symbol 56 MovieClip Frame 1
stop();
Symbol 60 MovieClip Frame 1
stop();
Symbol 65 MovieClip Frame 1
stop();
Symbol 69 MovieClip Frame 1
stop();
Symbol 73 MovieClip Frame 1
stop();
Symbol 77 MovieClip Frame 1
stop();
Symbol 87 MovieClip Frame 1
stop();
Symbol 97 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 1
stop();
Symbol 105 MovieClip Frame 1
stop();
Symbol 109 MovieClip Frame 1
stop();
Symbol 114 MovieClip Frame 1
stop();
Symbol 125 MovieClip Frame 1
stop();
Symbol 127 MovieClip [wire_] Frame 1
#initclip 38
Object.registerClass("wire_", com.novelgames.flashgames.jardinoo.Wire);
#endinitclip
Symbol 152 MovieClip Frame 9
stop();
Symbol 153 MovieClip Frame 15
stop();
Symbol 156 MovieClip Frame 15
stop();
Symbol 159 MovieClip Frame 15
stop();
Symbol 162 MovieClip Frame 15
stop();
Symbol 165 MovieClip Frame 15
stop();
Symbol 168 MovieClip Frame 15
stop();
Symbol 171 MovieClip Frame 15
stop();
Symbol 172 MovieClip [bulb] Frame 1
#initclip 39
Object.registerClass("bulb", com.novelgames.flashgames.commonAS2.NewMovieClip);
#endinitclip
Symbol 176 MovieClip [Block] Frame 1
#initclip 40
Object.registerClass("Block", com.novelgames.flashgames.jardinoo.Block);
#endinitclip
Symbol 194 MovieClip [Title] Frame 1
#initclip 41
Object.registerClass("Title", com.novelgames.flashgames.commonAS2.Title);
#endinitclip
Symbol 199 MovieClip [TipsButtonMovie] Frame 1
#initclip 42
Object.registerClass("TipsButtonMovie", com.novelgames.flashgames.jardinoo.TipsButtonMovie);
#endinitclip
Symbol 204 MovieClip [Instructions] Frame 1
#initclip 43
Object.registerClass("Instructions", com.novelgames.flashgames.commonAS2.Instructions);
#endinitclip
Symbol 211 MovieClip [MessagePlayAgain] Frame 1
#initclip 44
Object.registerClass("MessagePlayAgain", com.novelgames.flashgames.jardinoo.MessagePlayAgain);
#endinitclip
Symbol 218 MovieClip [mc_bt_rejouer] Frame 1
#initclip 45
Object.registerClass("mc_bt_rejouer", chapatiz.display.MCButton);
#endinitclip
Symbol 221 MovieClip [mcbt_chapatiz] Frame 1
#initclip 46
Object.registerClass("mcbt_chapatiz", chapatiz.display.MCButton);
#endinitclip
Symbol 224 MovieClip [mcbt_infos] Frame 1
#initclip 47
Object.registerClass("mcbt_infos", chapatiz.display.MCButton);
#endinitclip
Symbol 227 MovieClip [mcbt_scores] Frame 1
#initclip 48
Object.registerClass("mcbt_scores", chapatiz.display.MCButton);
#endinitclip
Symbol 230 MovieClip [mc_bt_jouer] Frame 1
#initclip 49
Object.registerClass("mc_bt_jouer", chapatiz.display.MCButton);
#endinitclip
Symbol 242 MovieClip [Source] Frame 1
#initclip 50
Object.registerClass("Source", com.novelgames.flashgames.jardinoo.Source);
#endinitclip
Symbol 243 MovieClip Frame 1
stop();
Symbol 249 MovieClip Frame 1
stop();
Symbol 250 MovieClip Frame 1
stop();
Symbol 251 MovieClip Frame 15
stop();
Symbol 256 MovieClip [ascensseur] Frame 1
#initclip 51
Object.registerClass("ascensseur", com.novelgames.flashgames.jardinoo.Ascensseur);
#endinitclip
Symbol 256 MovieClip [ascensseur] Frame 2
stop();
Symbol 256 MovieClip [ascensseur] Frame 4
stop();
Symbol 256 MovieClip [ascensseur] Frame 6
stop();
Symbol 329 MovieClip [__Packages.com.novelgames.flashgames.MainJardinooDemo] Frame 0
class com.novelgames.flashgames.MainJardinooDemo extends MovieClip
{
var ascensseur, game, container, titleDepth;
function MainJardinooDemo () {
super();
}
static function initialize(movieClip) {
com.novelgames.flashgames.jardinoo.Config.GAME_DEMO = true;
com.novelgames.flashgames.jardinoo.Config.URL_REDIRECT = "http://www.chapatiz.com";
_level0.langArray = new Array();
_level0.langArray.JARDINOO_START = "Start";
_level0.langArray.JARDINOO_SCORE = "Scores";
_level0.langArray.JARDINOO_INFO = "Plus de jeux";
_level0.langArray.JARDINOO_REPLAY = "Rejouer";
_level0.langArray.JARDINOO_HOWTOPLAY0 = "Irrigue toutes les plantes du Jardinou.";
_level0.langArray.JARDINOO_HOWTOPLAY1 = "Clique sur le segment de ruisseau que tu veux faire pivoter";
_level0.langArray.JARDINOO_SCORE0 = "Game Over";
_level0.langArray.JARDINOO_SCORE2 = "Tu veux faire un score et \u00EAtre class\u00E9 ? Viens sur Chapatiz pour te comparer aux autres.";
movieClip.__proto__ = com.novelgames.flashgames.MainJardinooDemo.prototype;
movieClip.stop();
movieClip.ascensseur.init();
movieClip.gotoTitlePage();
}
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.jardinoo.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.jardinoo.Game] Frame 0
class com.novelgames.flashgames.jardinoo.Game extends com.novelgames.flashgames.commonAS2.CommonGame
{
var gameOverDialog, timeText, blocksHolder, star, gameOver, startTime, timer, soundMove, createSound, soundWin, soundIrrigation, __time, dimensionX, dimensionY, blocks, sourceX, sourceY, score, __get__parent;
function Game () {
super();
trace("Game");
gameOverDialog.__proto__ = com.novelgames.flashgames.jardinoo.GameOverDialog.prototype;
timeText.__proto__ = com.novelgames.flashgames.commonAS2.NewTextField.prototype;
blocksHolder.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
star.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
gameOver = false;
createTree();
createNet();
updateLights();
time = (0);
startTime = 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();
soundMove = createSound("SoundMove");
soundWin = createSound("SoundWin");
soundIrrigation = createSound("SoundIrrigation");
}
function set time(time) {
__time = time;
var _local3 = time.toString().split("");
var _local2 = 0;
while (_local2 < 8) {
this["timer_" + _local2].gotoAndStop(((!isNaN(Number(_local3[_local3.length - _local2]) + 1)) ? (Number(_local3[_local3.length - _local2]) + 1) : 1));
_local2++;
}
//return(this.time);
}
function get time() {
return(__time);
}
function rotateStarted() {
updateLights();
soundMove.play();
}
function rotateFinished() {
updateLights();
checkWin();
}
function onTime(timerEvent) {
updateTime();
}
function createTree() {
trace("Game.createTree");
var _local8 = 0;
var _local7 = 0;
var _local2 = 0;
var _local4 = 0;
var _local6;
var _local3;
var _local5;
_local5 = 0;
while (_local5 < com.novelgames.flashgames.jardinoo.Config.NET_PATTERN.length) {
_local6 = com.novelgames.flashgames.jardinoo.Config.NET_PATTERN.charAt(_local5);
if (_local6 == "\r") {
_local2 = 0;
_local4++;
_local7 = Math.max(_local7, _local4);
} else {
_local2++;
_local8 = Math.max(_local8, _local2);
}
_local5++;
}
dimensionX = _local8;
dimensionY = _local7 + 1;
blocks = new Array(dimensionX * dimensionY);
_local2 = 0;
_local4 = 0;
_local5 = 0;
while (_local5 < com.novelgames.flashgames.jardinoo.Config.NET_PATTERN.length) {
_local6 = com.novelgames.flashgames.jardinoo.Config.NET_PATTERN.charAt(_local5);
if (_local6 == " ") {
_local2++;
} else if (_local6 == "\r") {
_local2 = 0;
_local4++;
} else if (_local6 == "0") {
_local3 = blocksHolder.createMovie("Block");
_local3.indexX = _local2;
_local3.indexY = _local4;
_local3.x = _local2 * com.novelgames.flashgames.jardinoo.Config.NET_BLOCK_WIDTH;
_local3.y = _local4 * com.novelgames.flashgames.jardinoo.Config.NET_BLOCK_HEIGHT;
blocksHolder.addChild(_local3);
blocks[(_local4 * dimensionX) + _local2] = _local3;
_local2++;
} else if (_local6 == "1") {
_local3 = com.novelgames.flashgames.jardinoo.Source(blocksHolder.createMovie("Source"));
_local3.x = _local2 * com.novelgames.flashgames.jardinoo.Config.NET_BLOCK_WIDTH;
_local3.y = _local4 * com.novelgames.flashgames.jardinoo.Config.NET_BLOCK_HEIGHT;
blocksHolder.addChild(_local3);
sourceX = _local2;
sourceY = _local4;
_local2++;
}
_local5++;
}
}
function createNet() {
trace("Game.createNet");
var _local5 = new Array();
var _local3 = new Array();
var _local8;
var _local9;
var _local2;
var _local7;
var _local6;
var _local10;
var _local4;
_local4 = 0;
while (_local4 < blocks.length) {
if (blocks[_local4] == null) {
_local5[_local4] = -1;
} else {
_local5[_local4] = 0;
}
_local4++;
}
_local8 = ((sourceY + 1) * dimensionX) + sourceX;
_local5[_local8] = com.novelgames.flashgames.jardinoo.Block.DOWN;
_local3.push([_local8, com.novelgames.flashgames.jardinoo.Block.UP]);
_local3.push([_local8, com.novelgames.flashgames.jardinoo.Block.LEFT]);
_local3.push([_local8, com.novelgames.flashgames.jardinoo.Block.RIGHT]);
while (_local3.length > 0) {
_local8 = Math.floor(Math.random() * _local3.length);
_local9 = _local3[_local8][0];
_local7 = _local9 % dimensionX;
_local6 = Math.floor(_local9 / dimensionX);
_local10 = _local3[_local8][1];
switch (_local10) {
case com.novelgames.flashgames.jardinoo.Block.UP :
_local6--;
break;
case com.novelgames.flashgames.jardinoo.Block.DOWN :
_local6++;
break;
case com.novelgames.flashgames.jardinoo.Block.LEFT :
_local7--;
break;
case com.novelgames.flashgames.jardinoo.Block.RIGHT :
_local7++;
}
_local2 = (_local6 * dimensionX) + _local7;
if ((((_local7 < 0) || (_local7 >= dimensionX)) || (_local6 < 0)) || (_local6 >= dimensionY)) {
} else if (_local5[_local2] != 0) {
} else {
_local5[_local9] = _local5[_local9] | _local10;
switch (_local10) {
case com.novelgames.flashgames.jardinoo.Block.UP :
_local5[_local2] = com.novelgames.flashgames.jardinoo.Block.DOWN;
_local3.push([_local2, com.novelgames.flashgames.jardinoo.Block.UP]);
_local3.push([_local2, com.novelgames.flashgames.jardinoo.Block.LEFT]);
_local3.push([_local2, com.novelgames.flashgames.jardinoo.Block.RIGHT]);
break;
case com.novelgames.flashgames.jardinoo.Block.DOWN :
_local5[_local2] = com.novelgames.flashgames.jardinoo.Block.UP;
_local3.push([_local2, com.novelgames.flashgames.jardinoo.Block.DOWN]);
_local3.push([_local2, com.novelgames.flashgames.jardinoo.Block.LEFT]);
_local3.push([_local2, com.novelgames.flashgames.jardinoo.Block.RIGHT]);
break;
case com.novelgames.flashgames.jardinoo.Block.LEFT :
_local5[_local2] = com.novelgames.flashgames.jardinoo.Block.RIGHT;
_local3.push([_local2, com.novelgames.flashgames.jardinoo.Block.UP]);
_local3.push([_local2, com.novelgames.flashgames.jardinoo.Block.DOWN]);
_local3.push([_local2, com.novelgames.flashgames.jardinoo.Block.LEFT]);
break;
case com.novelgames.flashgames.jardinoo.Block.RIGHT :
_local5[_local2] = com.novelgames.flashgames.jardinoo.Block.LEFT;
_local3.push([_local2, com.novelgames.flashgames.jardinoo.Block.UP]);
_local3.push([_local2, com.novelgames.flashgames.jardinoo.Block.DOWN]);
_local3.push([_local2, com.novelgames.flashgames.jardinoo.Block.RIGHT]);
}
}
_local3.splice(_local8, 1);
}
_local4 = 0;
while (_local4 < _local5.length) {
if (_local5[_local4] != -1) {
blocks[_local4].initialize(getRandomRotatedDirection(_local5[_local4]));
}
_local4++;
}
}
function getRandomRotatedDirection(direction) {
var _local1;
switch (direction) {
case com.novelgames.flashgames.jardinoo.Block.UP :
case com.novelgames.flashgames.jardinoo.Block.DOWN :
case com.novelgames.flashgames.jardinoo.Block.LEFT :
case com.novelgames.flashgames.jardinoo.Block.RIGHT :
_local1 = [com.novelgames.flashgames.jardinoo.Block.UP, com.novelgames.flashgames.jardinoo.Block.DOWN, com.novelgames.flashgames.jardinoo.Block.LEFT, com.novelgames.flashgames.jardinoo.Block.RIGHT];
break;
case com.novelgames.flashgames.jardinoo.Block.UP | com.novelgames.flashgames.jardinoo.Block.DOWN :
case com.novelgames.flashgames.jardinoo.Block.LEFT | com.novelgames.flashgames.jardinoo.Block.RIGHT :
_local1 = [com.novelgames.flashgames.jardinoo.Block.UP | com.novelgames.flashgames.jardinoo.Block.DOWN, com.novelgames.flashgames.jardinoo.Block.LEFT | com.novelgames.flashgames.jardinoo.Block.RIGHT];
break;
case com.novelgames.flashgames.jardinoo.Block.UP | com.novelgames.flashgames.jardinoo.Block.LEFT :
case com.novelgames.flashgames.jardinoo.Block.UP | com.novelgames.flashgames.jardinoo.Block.RIGHT :
case com.novelgames.flashgames.jardinoo.Block.LEFT | com.novelgames.flashgames.jardinoo.Block.DOWN :
case com.novelgames.flashgames.jardinoo.Block.RIGHT | com.novelgames.flashgames.jardinoo.Block.DOWN :
_local1 = [com.novelgames.flashgames.jardinoo.Block.UP | com.novelgames.flashgames.jardinoo.Block.LEFT, com.novelgames.flashgames.jardinoo.Block.UP | com.novelgames.flashgames.jardinoo.Block.RIGHT, com.novelgames.flashgames.jardinoo.Block.LEFT | com.novelgames.flashgames.jardinoo.Block.DOWN, com.novelgames.flashgames.jardinoo.Block.RIGHT | com.novelgames.flashgames.jardinoo.Block.DOWN];
break;
case (com.novelgames.flashgames.jardinoo.Block.UP | com.novelgames.flashgames.jardinoo.Block.LEFT) | com.novelgames.flashgames.jardinoo.Block.RIGHT :
case (com.novelgames.flashgames.jardinoo.Block.UP | com.novelgames.flashgames.jardinoo.Block.LEFT) | com.novelgames.flashgames.jardinoo.Block.DOWN :
case (com.novelgames.flashgames.jardinoo.Block.UP | com.novelgames.flashgames.jardinoo.Block.RIGHT) | com.novelgames.flashgames.jardinoo.Block.DOWN :
case (com.novelgames.flashgames.jardinoo.Block.LEFT | com.novelgames.flashgames.jardinoo.Block.RIGHT) | com.novelgames.flashgames.jardinoo.Block.DOWN :
_local1 = [(com.novelgames.flashgames.jardinoo.Block.UP | com.novelgames.flashgames.jardinoo.Block.LEFT) | com.novelgames.flashgames.jardinoo.Block.RIGHT, (com.novelgames.flashgames.jardinoo.Block.UP | com.novelgames.flashgames.jardinoo.Block.LEFT) | com.novelgames.flashgames.jardinoo.Block.DOWN, (com.novelgames.flashgames.jardinoo.Block.UP | com.novelgames.flashgames.jardinoo.Block.RIGHT) | com.novelgames.flashgames.jardinoo.Block.DOWN, (com.novelgames.flashgames.jardinoo.Block.LEFT | com.novelgames.flashgames.jardinoo.Block.RIGHT) | com.novelgames.flashgames.jardinoo.Block.DOWN];
break;
case ((com.novelgames.flashgames.jardinoo.Block.UP | com.novelgames.flashgames.jardinoo.Block.DOWN) | com.novelgames.flashgames.jardinoo.Block.LEFT) | com.novelgames.flashgames.jardinoo.Block.RIGHT :
_local1 = [((com.novelgames.flashgames.jardinoo.Block.UP | com.novelgames.flashgames.jardinoo.Block.DOWN) | com.novelgames.flashgames.jardinoo.Block.LEFT) | com.novelgames.flashgames.jardinoo.Block.RIGHT];
}
return(_local1[Math.floor(Math.random() * _local1.length)]);
}
function updateLights() {
var _local4 = new Array();
var _local2;
var _local3;
_local3 = 0;
while (_local3 < blocks.length) {
if (blocks[_local3] == null) {
} else {
blocks[_local3].isOn = false;
}
_local3++;
}
_local2 = blocks[((sourceY + 1) * dimensionX) + sourceX];
if ((_local2.directions & com.novelgames.flashgames.jardinoo.Block.UP) != 0) {
_local2.isOn = true;
_local4.push(_local2);
}
while (_local4.length > 0) {
_local2 = _local4[0];
if (checkShouldUpdateToOn(_local2, com.novelgames.flashgames.jardinoo.Block.UP)) {
blocks[((_local2.indexY - 1) * dimensionX) + _local2.indexX].isOn = true;
_local4.push(blocks[((_local2.indexY - 1) * dimensionX) + _local2.indexX]);
}
if (checkShouldUpdateToOn(_local2, com.novelgames.flashgames.jardinoo.Block.DOWN)) {
blocks[((_local2.indexY + 1) * dimensionX) + _local2.indexX].isOn = true;
_local4.push(blocks[((_local2.indexY + 1) * dimensionX) + _local2.indexX]);
}
if (checkShouldUpdateToOn(_local2, com.novelgames.flashgames.jardinoo.Block.LEFT)) {
blocks[((_local2.indexY * dimensionX) + _local2.indexX) - 1].isOn = true;
_local4.push(blocks[((_local2.indexY * dimensionX) + _local2.indexX) - 1]);
}
if (checkShouldUpdateToOn(_local2, com.novelgames.flashgames.jardinoo.Block.RIGHT)) {
blocks[((_local2.indexY * dimensionX) + _local2.indexX) + 1].isOn = true;
_local4.push(blocks[((_local2.indexY * dimensionX) + _local2.indexX) + 1]);
}
_local4.splice(0, 1);
}
_local3 = 0;
while (_local3 < blocks.length) {
if (blocks[_local3] == null) {
} else {
blocks[_local3].updatePicture();
}
_local3++;
}
}
function checkShouldUpdateToOn(block, direction) {
var _local3 = block.indexX;
var _local2 = block.indexY;
var _local4;
if ((block.directions & direction) == 0) {
return(false);
}
switch (direction) {
case com.novelgames.flashgames.jardinoo.Block.UP :
_local2--;
_local4 = com.novelgames.flashgames.jardinoo.Block.DOWN;
break;
case com.novelgames.flashgames.jardinoo.Block.DOWN :
_local2++;
_local4 = com.novelgames.flashgames.jardinoo.Block.UP;
break;
case com.novelgames.flashgames.jardinoo.Block.LEFT :
_local3--;
_local4 = com.novelgames.flashgames.jardinoo.Block.RIGHT;
break;
case com.novelgames.flashgames.jardinoo.Block.RIGHT :
_local3++;
_local4 = com.novelgames.flashgames.jardinoo.Block.LEFT;
}
if ((((_local3 < 0) || (_local3 >= dimensionX)) || (_local2 < 0)) || (_local2 >= dimensionY)) {
return(false);
}
if (blocks[(_local2 * dimensionX) + _local3] == null) {
return(false);
}
if (blocks[(_local2 * dimensionX) + _local3].isOn) {
return(false);
}
return((blocks[(_local2 * dimensionX) + _local3].directions & _local4) != 0);
}
function updateTime() {
if (gameOver) {
return(undefined);
}
time = (Math.floor((com.novelgames.flashgames.commonAS2.NewTimer.getTimer() - startTime) / 1000));
}
function checkWin() {
var _local2;
_local2 = 0;
while (_local2 < blocks.length) {
if (blocks[_local2] == null) {
} else if (!blocks[_local2].isOn) {
return(undefined);
}
_local2++;
}
gameOver = true;
star.gotoAndStop("show");
_local2 = 0;
while (_local2 < blocks.length) {
if (blocks[_local2] == null) {
} else {
blocks[_local2].hideButton();
}
_local2++;
}
score = com.novelgames.flashgames.jardinoo.Config.SCORE_BASE - (com.novelgames.flashgames.jardinoo.Config.SCORE_PERTIME * time);
soundWin.play();
timer = new com.novelgames.flashgames.commonAS2.NewTimer(com.novelgames.flashgames.jardinoo.Config.MESSAGE_GAMEOVERTIME, 1);
timer.addEventListener(com.novelgames.flashgames.commonAS2.TimerEvent.TIMER, this, "showPlayAgain");
timer.start();
}
function showPlayAgain(timerEvent) {
trace("Game.showPlayAgain");
Object(__get__parent().parent).showEnterHighScore(score);
}
}
Symbol 343 MovieClip [__Packages.com.novelgames.flashgames.jardinoo.GameOverDialog] Frame 0
class com.novelgames.flashgames.jardinoo.GameOverDialog extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var stop, gotoAndStop, messagePlayAgain, createMovie, addChild, __get__parent;
function GameOverDialog () {
super();
(stop());// not popped
}
function show() {
(gotoAndStop("show"));// not popped
}
function showPlayAgain() {
(gotoAndStop("hide"));// not popped
messagePlayAgain = com.novelgames.flashgames.jardinoo.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.jardinoo.MessagePlayAgain] Frame 0
class com.novelgames.flashgames.jardinoo.MessagePlayAgain extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var playAgainButton, homeButton;
function MessagePlayAgain () {
super();
playAgainButton.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
homeButton.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
}
}
Symbol 345 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 346 MovieClip [__Packages.com.novelgames.flashgames.jardinoo.Config] Frame 0
class com.novelgames.flashgames.jardinoo.Config
{
function Config () {
}
static var NET_PATTERN = " 1\r 000\r 00000000\r000000000\r000000000\r000000000\r000000000\r000000000\r000000000\r000000000\r000000000";
static var NET_BLOCK_WIDTH = 49;
static var NET_BLOCK_HEIGHT = 24;
static var NET_NOOFBULBCOLOURS = 7;
static var NET_ROTATETIME = 200;
static var SCORE_BASE = 50000;
static var SCORE_PERTIME = 100;
static var MESSAGE_GAMEOVERTIME = 1000;
static var TIPS_URL = "http://www.novelgames.com/gametips/#flashGame51";
static var GAME_DEMO = false;
static var URL_REDIRECT = "http://www.chapatiz.com";
}
Symbol 347 MovieClip [__Packages.com.novelgames.flashgames.jardinoo.Source] Frame 0
class com.novelgames.flashgames.jardinoo.Source extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
function Source () {
super();
}
}
Symbol 348 MovieClip [__Packages.com.novelgames.flashgames.jardinoo.Block] Frame 0
class com.novelgames.flashgames.jardinoo.Block extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var button, bulb, wire, stop, directions, bulbIndex, isOn, rotating, oldState, _parent, __get__parent, newDirections, startRotateTime, startRotation, timer;
function Block () {
super();
button.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
bulb.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
wire.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
(stop());// not popped
}
function onLoad() {
updatePicture();
}
function initialize(directions) {
this.directions = directions;
bulbIndex = Math.floor(Math.random() * com.novelgames.flashgames.jardinoo.Config.NET_NOOFBULBCOLOURS);
isOn = false;
rotating = false;
updatePicture();
switch (directions) {
case UP :
case DOWN :
case LEFT :
case RIGHT :
bulb.__set__visible(true);
break;
default :
bulb.__set__visible(false);
}
button.addEventListener(com.novelgames.flashgames.commonAS2.MouseEvent.MOUSE_DOWN, this, "changeRotation");
}
function updatePicture() {
var _local2 = (isOn ? "on" : "off");
switch (directions) {
case UP :
wire.gotoAndStop("U");
wire.__set__rotateDeg(0);
break;
case DOWN :
wire.gotoAndStop("U");
wire.__set__rotateDeg(180);
break;
case LEFT :
wire.gotoAndStop("U");
wire.__set__rotateDeg(-90);
break;
case RIGHT :
wire.gotoAndStop("U");
wire.__set__rotateDeg(90);
break;
case UP | DOWN :
wire.gotoAndStop("UD");
wire.__set__rotateDeg(0);
break;
case LEFT | RIGHT :
wire.gotoAndStop("UD");
wire.__set__rotateDeg(90);
break;
case UP | LEFT :
wire.gotoAndStop("UL");
wire.__set__rotateDeg(0);
break;
case UP | RIGHT :
wire.gotoAndStop("UL");
wire.__set__rotateDeg(90);
break;
case RIGHT | DOWN :
wire.gotoAndStop("UL");
wire.__set__rotateDeg(180);
break;
case LEFT | DOWN :
wire.gotoAndStop("UL");
wire.__set__rotateDeg(-90);
break;
case (UP | LEFT) | RIGHT :
wire.gotoAndStop("ULR");
wire.__set__rotateDeg(0);
break;
case (UP | RIGHT) | DOWN :
wire.gotoAndStop("ULR");
wire.__set__rotateDeg(90);
break;
case (LEFT | RIGHT) | DOWN :
wire.gotoAndStop("ULR");
wire.__set__rotateDeg(180);
break;
case (UP | LEFT) | DOWN :
wire.gotoAndStop("ULR");
wire.__set__rotateDeg(-90);
break;
case ((UP | LEFT) | RIGHT) | DOWN :
wire.gotoAndStop("ULRD");
wire.__set__rotateDeg(0);
}
if (isOn) {
wire.wire.ruisseau.gotoAndStop("full");
} else {
wire.wire.ruisseau.gotoAndStop("empty");
}
if (((!oldState) && (isOn)) && (bulb._visible)) {
_parent._parent.soundIrrigation.play();
}
bulb.gotoAndStop(_local2 + bulbIndex);
oldState = isOn;
}
function hideButton() {
button.__set__visible(false);
}
function changeRotation() {
if (Object(__get__parent().parent).gameOver) {
return(undefined);
}
if (rotating) {
return(undefined);
}
rotating = true;
newDirections = 0;
if ((directions & UP) != 0) {
newDirections = newDirections | RIGHT;
}
if ((directions & DOWN) != 0) {
newDirections = newDirections | LEFT;
}
if ((directions & LEFT) != 0) {
newDirections = newDirections | UP;
}
if ((directions & RIGHT) != 0) {
newDirections = newDirections | DOWN;
}
isOn = false;
updatePicture();
directions = newDirections;
Object(__get__parent().parent).rotateStarted();
rotating = false;
Object(__get__parent().parent).rotateFinished();
}
function startRotate(mouseEvent) {
if (Object(__get__parent().parent).gameOver) {
return(undefined);
}
if (rotating) {
return(undefined);
}
rotating = true;
newDirections = 0;
if ((directions & UP) != 0) {
newDirections = newDirections | RIGHT;
}
if ((directions & DOWN) != 0) {
newDirections = newDirections | LEFT;
}
if ((directions & LEFT) != 0) {
newDirections = newDirections | UP;
}
if ((directions & RIGHT) != 0) {
newDirections = newDirections | DOWN;
}
isOn = false;
updatePicture();
directions = 0;
startRotateTime = com.novelgames.flashgames.commonAS2.NewTimer.getTimer();
startRotation = wire.rotation;
timer = new com.novelgames.flashgames.commonAS2.NewTimer(1, 0);
timer.addEventListener(com.novelgames.flashgames.commonAS2.TimerEvent.TIMER, this, "rotate");
timer.start();
Object(__get__parent().parent).rotateStarted();
}
function rotate(timerEvent) {
var _local3 = com.novelgames.flashgames.commonAS2.NewTimer.getTimer();
var _local2 = (_local3 - startRotateTime) / com.novelgames.flashgames.jardinoo.Config.NET_ROTATETIME;
if (_local2 > 1) {
_local2 = 1;
}
timerEvent.updateAfterEvent();
wire.__set__rotation(startRotation + (_local2 * 90));
if (_local2 < 1) {
return(undefined);
}
directions = newDirections;
timer.stop();
rotating = false;
Object(__get__parent().parent).rotateFinished();
}
static var UP = 1;
static var DOWN = 2;
static var LEFT = 4;
static var RIGHT = 8;
}
Symbol 349 MovieClip [__Packages.com.novelgames.flashgames.jardinoo.Wire] Frame 0
class com.novelgames.flashgames.jardinoo.Wire extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var stop, wire, _currentframe;
function Wire () {
super();
stop();
wire.stop();
wire.ruisseau.stop();
}
function get rotateDeg() {
switch (_currentframe) {
case 1 :
return(0);
case 2 :
return(90);
case 3 :
return(180);
case 4 :
return(-90);
}
return(0);
}
function set rotateDeg(deg) {
switch (deg) {
case 0 :
wire.gotoAndStop(1);
break;
case 90 :
wire.gotoAndStop(2);
break;
case 180 :
wire.gotoAndStop(3);
break;
case -90 :
wire.gotoAndStop(4);
break;
default :
wire.gotoAndStop(1);
}
//return(rotateDeg);
}
}
Symbol 350 MovieClip [__Packages.com.novelgames.flashgames.jardinoo.Ascensseur] Frame 0
class com.novelgames.flashgames.jardinoo.Ascensseur extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var _isClose, _visible, gotoAndStop, bt_play, bt_score, bt_info, bt_chapatiz, howToPlay_0, howToPlay_1, score_0, score_1, score_2, getURL;
function Ascensseur () {
super();
}
function init() {
trace("Ascensseur.init");
open();
}
function open() {
if (!_isClose) {
return(undefined);
}
trace("Ascensseur.open");
_visible = false;
_isClose = false;
}
function close() {
if (_isClose) {
return(undefined);
}
trace("Ascensseur.close");
_visible = true;
_isClose = true;
}
function showAcceuil() {
close();
trace("Ascensseur.showAcceuil");
gotoAndStop("start");
bt_play.onReleaseMC = chapatiz.utils.Delegate.create(this, showInstruction);
bt_score.onReleaseMC = chapatiz.utils.Delegate.create(this, showScore);
bt_info.onReleaseMC = chapatiz.utils.Delegate.create(this, showGames);
bt_chapatiz.onReleaseMC = chapatiz.utils.Delegate.create(this, showGames);
bt_play.__set__text(chapatiz.utils.Localisation.localString("JARDINOO_START"));
bt_score.__set__text(chapatiz.utils.Localisation.localString("JARDINOO_SCORE"));
bt_info.__set__text(chapatiz.utils.Localisation.localString("JARDINOO_INFO"));
}
function showInstruction() {
close();
trace("Ascensseur.showInstruction");
gotoAndStop("instruction");
bt_play.onReleaseMC = function () {
this._parent._parent.gotoGamePage();
};
bt_play.__set__text(chapatiz.utils.Localisation.localString("JARDINOO_START"));
howToPlay_0.text = chapatiz.utils.Localisation.localString("JARDINOO_HOWTOPLAY0");
howToPlay_1.text = chapatiz.utils.Localisation.localString("JARDINOO_HOWTOPLAY1");
}
function showGameOver(score) {
trace("Ascensseur.showGameOver");
close();
gotoAndStop("gameover");
bt_play.onRelease = function () {
this._parent._parent.gotoGamePage();
};
bt_chapatiz.onRelease = chapatiz.utils.Delegate.create(this, showGames);
bt_play.__set__text(chapatiz.utils.Localisation.localString("JARDINOO_REPLAY"));
score_0.text = chapatiz.utils.Localisation.localString("JARDINOO_SCORE0");
score_1.text = score + "";
score_2.text = chapatiz.utils.Localisation.localString("JARDINOO_SCORE2");
}
function showScore() {
getURL(com.novelgames.flashgames.spookiz.Config.URL_REDIRECT + "/games/jardinoo", "_blank");
}
function showGames() {
getURL(com.novelgames.flashgames.spookiz.Config.URL_REDIRECT + "/games", "_blank");
}
}
Symbol 351 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 352 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 353 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) : ""));
}
trace(_level0.langArray[strKey]);
return(_level0.langArray[strKey]);
}
}
Symbol 354 MovieClip [__Packages.com.novelgames.flashgames.spookiz.Config] Frame 0
class com.novelgames.flashgames.spookiz.Config
{
function Config () {
}
static var DIMENSION_X = 6;
static var DIMENSION_Y = 13;
static var INITIALWAITTIME = 1000;
static var BLOCK_TYPES = 6;
static var BLOCK_SIZE = 30;
static var BLOCK_DESTROYTIME = 200;
static var BLOCK_DROPACCELERATION = 1000;
static var COLUMN_SIZE = 3;
static var COLUMN_MOVETIME = 100;
static var COLUMN_ROTATETIME = 100;
static var COLUMN_DROPSPEED = 1000;
static var COLUMN_MAXSTOPTIME = 200;
static var GROUP_SIZE = 3;
static var FIREWORK_HEIGHT = 200;
static var FIREWORK_EXPLODERADIUS = 100;
static var FIREWORK_RISEDOTRADIUS = 5;
static var FIREWORK_RISEDOTCOLOUR = 16777215;
static var FIREWORK_EXPLODEDOTRADIUS = 3;
static var FIREWORK_EXPLODECOLOURS = [16711680, 65280, 255, 16776960, 65535, 16711935, 16777215];
static var FIREWORK_EXPLODEDOTNUMBER = 100;
static var FIREWORK_RISETIME = 1000;
static var FIREWORK_EXPLODETIME = 500;
static var FIREWORK_STARTDISAPPEARTIME = 400;
static var FIREWORK_SCOREHEIGHT = 70;
static var SCORE_GROUP = 200;
static var SCORE_EXTRABLOCK = 100;
static var SCORE_EXTRAGROUP = 200;
static var SCORE_COMBO = 100;
static var LEVEL_INITIALSPEED = 20;
static var LEVEL_SPEEDINCREASE = 10;
static var LEVEL_NOOFFIREWORKS = 10;
static var GAMEOVER_DISAPPEARTIME = 300;
static var GAMEOVER_DISAPPEARROWINTERVAL = 100;
static var MESSAGE_GAMEOVERTIME = 1000;
static var GAME_DEMO = false;
static var URL_REDIRECT = "http://www.chapatiz.com";
}
Symbol 355 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 356 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 357 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 358 MovieClip [__Packages.com.novelgames.flashgames.jardinoo.TipsButtonMovie] Frame 0
class com.novelgames.flashgames.jardinoo.TipsButtonMovie extends com.novelgames.flashgames.commonAS2.NewMovieClip
{
var button, navigateToURL;
function TipsButtonMovie () {
super();
button.__proto__ = com.novelgames.flashgames.commonAS2.NewMovieClip.prototype;
button.addEventListener(com.novelgames.flashgames.commonAS2.MouseEvent.CLICK, this, "buttonClicked");
}
function buttonClicked(mouseEvent) {
navigateToURL(new com.novelgames.flashgames.commonAS2.URLRequest(com.novelgames.flashgames.jardinoo.Config.TIPS_URL), "_blank");
}
}
Symbol 359 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();
}
}
}
Symbol 360 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();
};
}
}