Section 1
//Background (background.Background)
package background {
import flash.display.*;
import flash.events.*;
public class Background {
private var mc:MovieClip;
private var clouds:Array;
public function Background(){
var _local1:*;
var _local2:int;
clouds = new Array();
super();
this.mc = new Back();
_local1 = 0;
while (_local1 < 10) {
_local2 = 0;
while (_local2 < 10) {
clouds.push(new Cloud(((_local1 * 80) - (_local2 * 80)), (_local1 * 80)));
this.mc.addChild(clouds[(clouds.length - 1)]);
_local2++;
};
_local1++;
};
}
public function setAnimation(_arg1:String):void{
switch (_arg1){
case "gameover":
mc.backAnimation.gotoAndPlay("gameover");
break;
case "stageclear":
mc.backAnimation.gotoAndPlay("stageclear");
break;
case "nextlevel":
mc.backAnimation.gotoAndPlay("nextlevel");
break;
case "reset":
mc.backAnimation.gotoAndPlay("reset");
break;
};
}
public function getMc():MovieClip{
return (this.mc);
}
}
}//package background
Section 2
//Cloud (background.Cloud)
package background {
import flash.display.*;
import flash.events.*;
public class Cloud extends MovieClip {
public var velocidadeX:Number;
public var velocidadeY:Number;
public var initX:Number;
public var initY:Number;
public function Cloud(_arg1:int, _arg2:int){
this.initX = (_arg1 - 300);
this.initY = (_arg2 - 200);
this.velocidadeX = -1;
this.velocidadeY = 1;
this.rotation = 45;
this.addEventListener(Event.ENTER_FRAME, think);
initValues();
}
private function think(_arg1:Event):void{
this.x = (this.x + velocidadeX);
this.y = (this.y + velocidadeY);
if (this.y >= 400){
this.y = (this.y - 800);
};
if (this.x <= -400){
this.x = (this.x + 800);
};
}
private function initValues():void{
this.x = this.initX;
this.y = this.initY;
}
}
}//package background
Section 3
//BlackBlock (classes.BlackBlock)
package classes {
import util.*;
public class BlackBlock extends Block {
public function BlackBlock(_arg1, _arg2:int){
this.setX(_arg1);
this.setY(_arg2);
this.x = (3 + (_arg1 * 32));
this.y = ((32 + (_arg2 * 32)) - 416);
var _local3:* = ((this.x * 2) + (this.y + 400));
TimerLite.delay(_local3, initAnimation, this);
}
override public function getType():String{
return ("black");
}
}
}//package classes
Section 4
//Block (classes.Block)
package classes {
import util.*;
import flash.display.*;
import util.easing.*;
public class Block extends MovieClip {
private var positionX;
private var positionY;
public function getX():int{
return (positionX);
}
public function getY():int{
return (positionY);
}
private function setDown():void{
TweenLite.to(this, 1.5, {y:"+500", ease:Bounce.easeOut});
}
public function downAnimation():void{
var _local1:* = ((this.x * 7) + ((this.y - ((this.y - 200) * 2)) * 4));
TimerLite.delay(_local1, setDown, this);
}
public function getColor():String{
return (BlockColor.NONE);
}
public function initAnimation():void{
TweenLite.to(this, 1.5, {y:"+400", ease:Bounce.easeOut});
}
public function setX(_arg1:int):void{
this.positionX = _arg1;
}
public function setY(_arg1:int):void{
this.positionY = _arg1;
}
public function upAnimation():void{
var _local1:* = ((this.x * 7) + ((this.y - ((this.y - 200) * 2)) * 4));
TimerLite.delay(_local1, setUp, this);
}
private function setUp():void{
TweenLite.to(this, 1.5, {y:"-500", ease:Bounce.easeOut});
}
public function getType():String{
return ("");
}
}
}//package classes
Section 5
//BlockColor (classes.BlockColor)
package classes {
public class BlockColor {
private var color:String;
public static const GREEN:String = "green";
public static const COLOR:Array = new Array(YELLOW, BLUE, PINK, GREEN, RED, NONE);
public static const RED:String = "red";
public static const PINK:String = "pink";
public static const NONE:String = "none";
public static const BLUE:String = "blue";
public static const YELLOW:String = "yellow";
public static const BLACK:String = "black";
public function setColor(_arg1:String):void{
this.color = _arg1;
}
public function getColor():String{
return (this.color);
}
}
}//package classes
Section 6
//BlockStatus (classes.BlockStatus)
package classes {
public class BlockStatus {
private var status:String;
public static const DISABLED:String = "disabled";
public static const LEFT:String = "left";
public static const DOWN:String = "down";
public static const ENTERING:String = "entering";
public static const INSIDE:String = "inside";
public static const STOPPED:String = "stopped";
public static const UP:String = "up";
public static const RIGHT:String = "right";
public function BlockStatus(){
this.status = STOPPED;
}
public function getStatus():String{
return (this.status);
}
public function setStatus(_arg1:String):void{
this.status = _arg1;
}
}
}//package classes
Section 7
//Bottom (classes.Bottom)
package classes {
import util.*;
public class Bottom extends Block {
private var targetColor:BlockColor;
public function Bottom(_arg1, _arg2:int, _arg3:String){
targetColor = new BlockColor();
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
this.targetColor.setColor(_arg3);
this.gotoAndStop(_arg3);
this.setX(_arg1);
this.setY(_arg2);
this.x = (3 + (_arg1 * 32));
this.y = ((40 + (_arg2 * 32)) - 416);
var _local4:* = ((this.x * 2) + (this.y + 400));
TimerLite.delay(_local4, initAnimation, this);
}
override public function getType():String{
return ("bottom");
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
override public function getColor():String{
return (targetColor.getColor());
}
public function full():void{
this.targetColor.setColor(BlockColor.NONE);
}
}
}//package classes
Section 8
//ColorBlock (classes.ColorBlock)
package classes {
import util.*;
import flash.events.*;
import util.easing.*;
public class ColorBlock extends Block {
private var level:Level;
public var blockFace:Face;
private var color:BlockColor;
private var status:BlockStatus;
private var finished:Boolean;// = false
public static var command = new Command();
public static var TIMEMOTION:Number = 0.05;
public function ColorBlock(_arg1, _arg2:int, _arg3:String, _arg4:Level){
color = new BlockColor();
status = new BlockStatus();
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
this.color.setColor(_arg3);
this.status.setStatus(BlockStatus.DISABLED);
this.gotoAndPlay(color.getColor());
this.level = _arg4;
this.setX(_arg1);
this.setY(_arg2);
this.x = (3 + (_arg1 * 32));
this.y = ((32 + (_arg2 * 32)) - 416);
this.addEventListener(MouseEvent.MOUSE_OVER, onOver);
var _local5:* = ((this.x * 4) + ((this.y + 400) * 2));
TimerLite.delay(_local5, initAnimation, this);
}
private function initAnimationFinish():void{
this.status.setStatus(BlockStatus.STOPPED);
}
public function getLevel():Level{
return (level);
}
public function move(_arg1:String):void{
level.soundManager.play("SfxMove");
this.status.setStatus(_arg1);
motion();
}
private function onOver(_arg1:MouseEvent):void{
if (status.getStatus() == BlockStatus.STOPPED){
command.start(this);
};
}
private function enter():void{
command.setMoving(false);
this.status.setStatus(BlockStatus.ENTERING);
this.finished = true;
TweenLite.to(this, 1, {y:"+8", ease:Bounce.easeOut});
if (this.color.getColor() == level.getBottomPerPosition(this.getX(), this.getY()).getColor()){
level.soundManager.play("SfxBlockIn");
level.finishBlock(this.getX(), this.getY());
this.blockFace.setHumor(FaceAnimation.HAPPY);
if (level.getColorBlockCount() == 0){
level.stageClear();
};
} else {
this.blockFace.setHumor(FaceAnimation.ANGRY);
level.finishBlock(this.getX(), this.getY());
level.stageFail();
};
}
override public function initAnimation():void{
TweenLite.to(this, 1.5, {y:"+400", ease:Bounce.easeOut, onComplete:initAnimationFinish});
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
override public function getColor():String{
return (color.getColor());
}
override public function getType():String{
if (!finished){
return ("color");
};
return ("finished");
}
public function setStatus(_arg1:String):void{
this.status.setStatus(_arg1);
}
private function motion():void{
var _local1:String;
if (level.getBottomPerPosition(this.getX(), this.getY()) != null){
enter();
};
if (level.getGrayPerPosition(this.getX(), this.getY()) != null){
_local1 = level.getGrayPerPosition(this.getX(), this.getY()).getDirection();
if (_local1 != GrayBlock.NONE){
level.soundManager.play("SfxChange");
this.setStatus(_local1);
};
};
switch (status.getStatus()){
case BlockStatus.UP:
if (level.getBlockPerPosition(this.getX(), (this.getY() - 1)) == null){
TweenLite.to(this, TIMEMOTION, {y:"-32", ease:Linear.easeNone, onComplete:motion});
level.sortLevelBlocks();
this.setY((this.getY() - 1));
} else {
stopBlock();
};
break;
case BlockStatus.DOWN:
if (level.getBlockPerPosition(this.getX(), (this.getY() + 1)) == null){
TweenLite.to(this, TIMEMOTION, {y:"+32", ease:Linear.easeNone, onComplete:motion});
this.setY((this.getY() + 1));
level.sortLevelBlocks();
} else {
stopBlock();
};
break;
case BlockStatus.LEFT:
if (level.getBlockPerPosition((this.getX() - 1), this.getY()) == null){
TweenLite.to(this, TIMEMOTION, {x:"-32", ease:Linear.easeNone, onComplete:motion});
this.setX((this.getX() - 1));
level.sortLevelBlocks();
} else {
stopBlock();
};
break;
case BlockStatus.RIGHT:
if (level.getBlockPerPosition((this.getX() + 1), this.getY()) == null){
TweenLite.to(this, TIMEMOTION, {x:"+32", ease:Linear.easeNone, onComplete:motion});
this.setX((this.getX() + 1));
level.sortLevelBlocks();
} else {
stopBlock();
};
break;
};
}
private function stopBlock():void{
level.soundManager.play("SfxImpact");
level.sortLevelBlocks();
var _local1:int = (((stage.mouseX - 19) / 32) + 1);
var _local2:int = (((stage.mouseY - 48) / 32) + 1);
var _local3:* = level.getBlockPerPosition(_local1, _local2);
status.setStatus(BlockStatus.STOPPED);
command.setMoving(false);
if (((!((_local3 == null))) && (!((_local3.getColor() == BlockColor.NONE))))){
command.start(_local3);
};
}
function frame1(){
stop();
}
}
}//package classes
Section 9
//Command (classes.Command)
package classes {
import flash.display.*;
import flash.events.*;
public class Command extends MovieClip {
private var active:Boolean;// = false
public var left:MovieClip;
private var mcUp;
private var moving:Boolean;// = false
private var mcDown;
public var up:MovieClip;
private var actualBlock:ColorBlock;
public var down:MovieClip;
public var right:MovieClip;
private var mcRight:MovieClip;
private var mcLeft;
public function Command(){
mcUp = MovieClip(getChildByName("up"));
mcDown = MovieClip(getChildByName("down"));
mcLeft = MovieClip(getChildByName("left"));
mcRight = MovieClip(getChildByName("right"));
mcUp.addEventListener(MouseEvent.CLICK, onClick);
mcDown.addEventListener(MouseEvent.CLICK, onClick);
mcLeft.addEventListener(MouseEvent.CLICK, onClick);
mcRight.addEventListener(MouseEvent.CLICK, onClick);
mcUp.addEventListener(MouseEvent.MOUSE_OUT, onOut);
mcDown.addEventListener(MouseEvent.MOUSE_OUT, onOut);
mcLeft.addEventListener(MouseEvent.MOUSE_OUT, onOut);
mcRight.addEventListener(MouseEvent.MOUSE_OUT, onOut);
mcUp.addFrameScript(12, finish);
mcDown.addFrameScript(12, finish);
mcLeft.addFrameScript(12, finish);
mcRight.addFrameScript(12, finish);
}
private function onClick(_arg1:MouseEvent):void{
actualBlock.move(_arg1.target.parent.name);
this.moving = true;
this.hide();
}
public function hide():void{
mcUp.gotoAndStop(0);
mcDown.gotoAndStop(0);
mcLeft.gotoAndStop(0);
mcRight.gotoAndStop(0);
active = false;
}
public function setMoving(_arg1:Boolean):void{
moving = _arg1;
}
private function finish():void{
mcUp.stop();
mcDown.stop();
mcLeft.stop();
mcRight.stop();
active = false;
}
private function onOut(_arg1:MouseEvent):void{
if (!active){
this.hide();
};
}
public function start(_arg1:ColorBlock):void{
if (actualBlock != _arg1){
active = false;
};
if (((!(active)) && (!(moving)))){
actualBlock = _arg1;
this.x = actualBlock.x;
this.y = actualBlock.y;
if (_arg1.getLevel().getBlockPerPosition(_arg1.getX(), (_arg1.getY() - 1)) == null){
mcUp.gotoAndPlay("show");
} else {
mcUp.gotoAndStop(0);
};
if (_arg1.getLevel().getBlockPerPosition(_arg1.getX(), (_arg1.getY() + 1)) == null){
mcDown.gotoAndPlay("show");
} else {
mcDown.gotoAndStop(0);
};
if (_arg1.getLevel().getBlockPerPosition((_arg1.getX() - 1), _arg1.getY()) == null){
mcLeft.gotoAndPlay("show");
} else {
mcLeft.gotoAndStop(0);
};
if (_arg1.getLevel().getBlockPerPosition((_arg1.getX() + 1), _arg1.getY()) == null){
mcRight.gotoAndPlay("show");
} else {
mcRight.gotoAndStop(0);
};
active = true;
};
}
}
}//package classes
Section 10
//Face (classes.Face)
package classes {
import flash.display.*;
import flash.events.*;
public class Face extends MovieClip {
private var animation:FaceAnimation;
private var humorCount:int;// = 1
public function Face(){
animation = new FaceAnimation();
super();
addFrameScript(0, frame1, 6, frame7, 48, frame49, 74, frame75, 75, frame76, 81, frame82, 123, frame124, 149, frame150, 150, frame151, 156, frame157, 198, frame199, 224, frame225, 225, frame226, 231, frame232, 273, frame274, 299, frame300);
this.addEventListener(Event.ENTER_FRAME, think);
}
function frame151(){
stop();
}
public function setHumor(_arg1:String):void{
animation.setHumor(_arg1);
if (_arg1 == FaceAnimation.HAPPY){
humorCount = 0;
};
}
function frame274(){
this.setNormalAnimation();
}
function frame124(){
this.setNormalAnimation();
}
function frame82(){
this.setNormalAnimation();
}
function frame226(){
stop();
}
function frame7(){
this.setNormalAnimation();
}
function frame1(){
stop();
}
function frame157(){
this.setNormalAnimation();
}
function frame76(){
stop();
}
function frame225(){
this.setNormalAnimation();
}
function frame232(){
this.setNormalAnimation();
}
private function think(_arg1:Event){
if (this.animation.getAnimation() == FaceAnimation.NORMAL){
this.animation.setRandomAnimation();
this.gotoAndPlay((animation.getHumor() + animation.getAnimation()));
if (humorCount > 0){
humorCount = (humorCount + (1 + (Math.random() * 10)));
if (humorCount > 3000){
humorCount = 1;
badHumor();
};
};
};
}
function frame300(){
this.setNormalAnimation();
}
function frame49(){
this.setNormalAnimation();
}
function frame75(){
this.setNormalAnimation();
}
private function setNormalAnimation(){
this.animation.setAnimation(FaceAnimation.NORMAL);
}
function frame199(){
this.setNormalAnimation();
}
private function badHumor():void{
switch (animation.getHumor()){
case FaceAnimation.HAPPY:
setHumor(FaceAnimation.JOYFUL);
break;
case FaceAnimation.JOYFUL:
setHumor(FaceAnimation.SERIOUS);
break;
case FaceAnimation.SERIOUS:
setHumor(FaceAnimation.ANGRY);
break;
};
}
function frame150(){
this.setNormalAnimation();
}
}
}//package classes
Section 11
//FaceAnimation (classes.FaceAnimation)
package classes {
public class FaceAnimation {
private var animation:String;
private var humor:String;
public static const HAPPY:String = "happy";
public static const ANGRY:String = "angry";
public static const HUMOR:Array = new Array(HAPPY, JOYFUL, SERIOUS, ANGRY);
public static const SERIOUS:String = "serious";
public static const JOYFUL:String = "joyful";
public static const ANIMATION:Array = new Array(NORMAL, BLINK, CLOSE, ANIM);
public static const NORMAL:String = "normal";
public static const ANIM:String = "animation";
public static const BLINK:String = "blink";
public static const CLOSE:String = "close";
public function FaceAnimation(){
this.humor = HUMOR[Math.floor((Math.random() * 3))];
this.animation = NORMAL;
}
public function setHumor(_arg1:String):void{
this.humor = _arg1;
}
public function setAnimation(_arg1:String){
this.animation = _arg1;
}
public function getHumor():String{
return (this.humor);
}
public function getAnimation():String{
return (this.animation);
}
public function setRandomAnimation():void{
var _local1:* = Math.floor((Math.random() * 100));
if (_local1 < 4){
this.animation = ANIMATION[_local1];
} else {
this.animation = NORMAL;
};
}
}
}//package classes
Section 12
//Game (classes.Game)
package classes {
import util.*;
import flash.display.*;
import flash.events.*;
import mochi.as3.*;
import background.*;
import util.easing.*;
import flash.net.*;
public dynamic class Game extends MovieClip {
private var level:Level;
private var savedData:int;
public var soundManager:SoundManager;
public var splash:MovieClip;
public var back:Background;
public var soundEnabled:Boolean;
public static const AD_ID:String = "358248a59c449634";
public static const GAME_ID:String = "358248a59c449634";
public static var GAME_OPTIONS:Object = {id:"358248a59c449634", res:"550x400"};
public static var MAIN_CLASS:String = "Game";
public static var LANG:String = "EN";
public function Game():void{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stop();
MochiAd.showPreGameAd({id:AD_ID, clip:this, res:"550x400", ad_finished:splashScreen});
}
private function splashScreen(){
this.splash = new MCSplashScreen();
splash.x = 275;
splash.y = 200;
this.addChild(splash);
TimerLite.delay(6000, init, this);
}
public function disableSound():void{
soundEnabled = false;
soundManager.disableSound();
soundManager.disableMusic();
}
private function updateSavedData():void{
var _local1:SharedObject = SharedObject.getLocal("pushsnap2");
if (_local1.size == 0){
savedData = 1;
} else {
savedData = _local1.data.level;
};
_local1.data.level = savedData;
_local1.flush();
}
public function enableSound():void{
soundEnabled = true;
soundManager.enableSound();
soundManager.enableMusic();
}
private function init(){
this.removeChild(this.splash);
initSound();
updateSavedData();
loadBackground();
TimerLite.delay(2000, title, this);
}
private function onLanguage(_arg1:MouseEvent):void{
soundManager.play("SfxClick");
if (Game.LANG == "EN"){
_arg1.target.gotoAndStop(2);
Game.LANG = "PT";
MovieClip(getChildByName("start_sprite")).mcEN.visible = false;
MovieClip(getChildByName("start_sprite")).mcPT.visible = true;
if (savedData > 1){
MovieClip(getChildByName("continue_sprite")).mcEN.visible = false;
MovieClip(getChildByName("continue_sprite")).mcPT.visible = true;
};
} else {
_arg1.target.gotoAndStop(1);
Game.LANG = "EN";
MovieClip(getChildByName("start_sprite")).mcEN.visible = true;
MovieClip(getChildByName("start_sprite")).mcPT.visible = false;
if (savedData > 1){
MovieClip(getChildByName("continue_sprite")).mcEN.visible = true;
MovieClip(getChildByName("continue_sprite")).mcPT.visible = false;
};
};
}
private function title():void{
var startButon:MovieClip;
var continueButon:MovieClip;
var nome:NameModotti;
var language:MovieClip;
var title:Title = new Title();
startButon = new MainBtnStartGame();
continueButon = new MainBtnContinue();
var logo:LogoModotti = new LogoModotti();
nome = new NameModotti();
var sound:SoundIcon = new SoundIcon();
language = new McLanguage();
language.name = "language_sprite";
language.x = 550;
language.y = 400;
language.buttonMode = true;
TimerLite.delay(1200, function (){
TweenLite.from(language, 2, {y:450, alpha:0, ease:Cubic.easeOut});
this.addChild(language);
}, this);
if (Game.LANG == "PT"){
language.gotoAndStop(2);
};
language.addEventListener(MouseEvent.CLICK, onLanguage);
startButon.name = "start_sprite";
startButon.x = 275;
startButon.y = 310;
TimerLite.delay(1200, function (){
TweenLite.from(startButon, 2, {y:550, alpha:0, ease:Cubic.easeOut});
this.addChild(startButon);
}, this);
startButon.addEventListener(MouseEvent.CLICK, onClickStart);
if (savedData > 1){
continueButon.name = "continue_sprite";
continueButon.x = 275;
continueButon.y = 345;
TimerLite.delay(1200, function (){
TweenLite.from(continueButon, 2, {y:550, alpha:0, ease:Cubic.easeOut});
this.addChild(continueButon);
}, this);
continueButon.addEventListener(MouseEvent.CLICK, onClickContinue);
};
logo.name = "logo_sprite";
logo.x = 0;
logo.y = -20;
logo.alpha = 0;
logo.buttonMode = true;
TweenLite.to(logo, 3, {alpha:1, y:38, ease:Elastic.easeOut});
this.addChild(logo);
nome.name = "name_sprite";
nome.x = 275;
nome.y = 386;
TimerLite.delay(1200, function (){
TweenLite.from(nome, 4, {y:420});
this.addChild(nome);
}, this);
title.name = "title_sprite";
title.x = 275;
title.y = 160;
TweenLite.from(title, 2, {y:-100, alpha:0, ease:Elastic.easeOut});
this.addChild(title);
sound.name = "sound_sprite";
sound.x = 35;
sound.y = 425;
sound.alpha = 0;
TweenLite.to(sound, 3, {alpha:1, y:365, ease:Elastic.easeOut});
this.addChild(sound);
sound.addEventListener(MouseEvent.CLICK, onClickSound);
if (!soundEnabled){
MovieClip(getChildByName("sound_sprite")).gotoAndStop(2);
};
soundManager.play("Title");
if (Game.LANG == "EN"){
startButon.mcPT.visible = false;
continueButon.mcPT.visible = false;
};
if (Game.LANG == "PT"){
startButon.mcEN.visible = false;
continueButon.mcEN.visible = false;
};
}
private function initSound():void{
soundManager = SoundManager.getInstance();
soundEnabled = true;
soundManager.addLibraryMusic(MusicTitle, "Title");
soundManager.addLibraryMusic(MusicIngame, "Ingame");
soundManager.addLibrarySound(Sfx1, "SfxClick");
soundManager.addLibrarySound(SfxStageClear, "SfxStageClear");
soundManager.addLibrarySound(SfxGameOver, "SfxGameOver");
soundManager.addLibrarySound(SfxBlockIn, "SfxBlockIn");
soundManager.addLibrarySound(SfxImpact, "SfxImpact");
soundManager.addLibrarySound(SfxMove, "SfxMove");
soundManager.addLibrarySound(SfxChange, "SfxChange");
}
public function returnTitle():void{
updateSavedData();
title();
}
private function onClickSound(_arg1:MouseEvent):void{
soundManager.play("SfxClick");
if (soundEnabled){
disableSound();
MovieClip(getChildByName("sound_sprite")).gotoAndStop(2);
} else {
enableSound();
MovieClip(getChildByName("sound_sprite")).gotoAndStop(1);
};
}
public function finalGame():void{
var _local1:MovieClip;
if (Game.LANG == "EN"){
_local1 = new ThankYouEN();
};
if (Game.LANG == "PT"){
_local1 = new ThankYouPT();
};
_local1.name = "final_sprite";
_local1.x = 275;
_local1.y = 200;
TweenLite.from(_local1, 5, {y:-100, alpha:0, ease:Elastic.easeOut});
this.addChild(_local1);
}
private function onClickContinue(_arg1:MouseEvent):void{
soundManager.play("SfxClick");
prepareLevel();
level = new Level(this, savedData);
}
private function loadBackground():void{
this.back = new Background();
var _local1:MovieClip = back.getMc();
_local1.x = 275;
_local1.y = 200;
this.addChild(_local1);
}
private function onClickStart(_arg1:MouseEvent):void{
soundManager.play("SfxClick");
prepareLevel();
level = new Level(this);
}
public function destroy(){
}
private function prepareLevel():void{
var title:Title;
var startButon:MovieClip;
var continueButon:MovieClip;
var logo:LogoModotti;
var nome:NameModotti;
var sound:SoundIcon;
var language:MovieClip;
title = Title(getChildByName("title_sprite"));
startButon = MovieClip(getChildByName("start_sprite"));
logo = LogoModotti(getChildByName("logo_sprite"));
nome = NameModotti(getChildByName("name_sprite"));
sound = SoundIcon(getChildByName("sound_sprite"));
language = MovieClip(getChildByName("language_sprite"));
if (savedData > 1){
continueButon = MovieClip(getChildByName("continue_sprite"));
TweenLite.to(continueButon, 2, {y:550, alpha:0, ease:Cubic.easeOut});
TimerLite.delay(3000, function (){
this.removeChild(continueButon);
}, this);
};
TweenLite.to(title, 2, {y:-200, alpha:0, ease:Elastic.easeOut});
TweenLite.to(startButon, 2, {y:550, alpha:0, ease:Cubic.easeOut});
TweenLite.to(logo, 3, {alpha:0, y:-40, ease:Cubic.easeOut});
TweenLite.to(nome, 1, {y:420});
TweenLite.to(sound, 3, {alpha:0, y:450, ease:Elastic.easeOut});
TweenLite.to(language, 3, {alpha:0, y:450, ease:Cubic.easeOut});
TimerLite.delay(3000, function (){
this.removeChild(title);
this.removeChild(startButon);
this.removeChild(logo);
this.removeChild(nome);
this.removeChild(sound);
this.removeChild(language);
}, this);
soundManager.fadeSound("Title", 0, 1);
}
}
}//package classes
Section 13
//GameOverEN (classes.GameOverEN)
package classes {
import util.*;
import flash.display.*;
import flash.events.*;
public class GameOverEN extends MovieClip {
private var level:Level;
public var yes_btn:SimpleButton;
public var no_btn:SimpleButton;
public function GameOverEN(_arg1:Level){
this.x = 275;
this.y = 200;
this.alpha = 0;
this.level = _arg1;
TimerLite.delay(1500, setInAnimation, this);
this.yes_btn.addEventListener(MouseEvent.CLICK, onClick);
this.no_btn.addEventListener(MouseEvent.CLICK, onClick);
}
private function onClick(_arg1:MouseEvent):void{
level.soundManager.play("SfxClick");
switch (_arg1.target.name){
case "yes_btn":
level.tryAgain();
TweenLite.to(this, 1, {alpha:0});
break;
case "no_btn":
level.returnTitle();
TweenLite.to(this, 1, {alpha:0});
break;
};
}
private function setInAnimation():void{
TweenLite.to(this, 2, {alpha:1});
}
}
}//package classes
Section 14
//GameOverPT (classes.GameOverPT)
package classes {
import util.*;
import flash.display.*;
import flash.events.*;
public class GameOverPT extends MovieClip {
private var level:Level;
public var yes_btn:SimpleButton;
public var no_btn:SimpleButton;
public function GameOverPT(_arg1:Level){
this.x = 275;
this.y = 200;
this.alpha = 0;
this.level = _arg1;
TimerLite.delay(1500, setInAnimation, this);
this.yes_btn.addEventListener(MouseEvent.CLICK, onClick);
this.no_btn.addEventListener(MouseEvent.CLICK, onClick);
}
private function onClick(_arg1:MouseEvent):void{
level.soundManager.play("SfxClick");
switch (_arg1.target.name){
case "yes_btn":
level.tryAgain();
TweenLite.to(this, 1, {alpha:0});
break;
case "no_btn":
level.returnTitle();
TweenLite.to(this, 1, {alpha:0});
break;
};
}
private function setInAnimation():void{
TweenLite.to(this, 2, {alpha:1});
}
}
}//package classes
Section 15
//GrayBlock (classes.GrayBlock)
package classes {
import util.*;
public class GrayBlock extends Block {
private var direction:String;
public static const DOWN:String = "down";
public static const LEFT:String = "left";
public static const UP:String = "up";
public static const RIGHT:String = "right";
public static const NONE:String = "none";
public function GrayBlock(_arg1, _arg2:int, _arg3:String="none"){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
this.setX(_arg1);
this.setY(_arg2);
this.x = (3 + (_arg1 * 32));
this.y = ((40 + (_arg2 * 32)) - 416);
this.direction = _arg3;
if (this.direction != NONE){
this.gotoAndPlay(this.direction);
};
var _local4:* = ((this.x * 2) + (this.y + 400));
TimerLite.delay(_local4, initAnimation, this);
}
override public function getType():String{
return ("gray");
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
public function getDirection():String{
return (direction);
}
}
}//package classes
Section 16
//Level (classes.Level)
package classes {
import util.*;
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class Level {
private var finishBlocks:Array;
private var objectLevel:Object;
private var grayBlocks:Array;
private var levelStatus:LevelStatus;
public var soundManager:SoundManager;
private var language:MovieClip;
private var restartButton:MovieClip;
private var levelNo:StageNo;
private var soundButton:SoundIcon;
private var levelBlocks:Array;
private var levelNumber:int;
private var game:Game;
private var moreGames:MovieClip;
private var status:LevelStatus;
public function Level(_arg1:Game, _arg2:int=1){
levelBlocks = new Array();
grayBlocks = new Array();
finishBlocks = new Array();
status = new LevelStatus();
levelStatus = new LevelStatus();
super();
game = _arg1;
this.levelNumber = _arg2;
var _local3:SharedObject = SharedObject.getLocal("pushsnap2");
_local3.data.level = levelNumber;
_local3.flush();
language = new McLanguage();
language.name = "language";
language.x = 550;
language.y = 400;
language.alpha = 0;
language.buttonMode = true;
language.addEventListener(MouseEvent.CLICK, onLanguage);
if (Game.LANG == "PT"){
language.gotoAndStop(2);
};
game.addChild(language);
moreGames = new MoreGames();
moreGames.name = "moreGames";
moreGames.x = 275;
moreGames.y = 392;
moreGames.alpha = 0;
moreGames.buttonMode = true;
moreGames.addEventListener(MouseEvent.CLICK, onMoreGames);
game.addChild(moreGames);
restartButton = new MainBtnRestart();
restartButton.name = "restartButton";
restartButton.x = 15;
restartButton.y = 35;
restartButton.alpha = 0;
restartButton.addEventListener(MouseEvent.CLICK, onRestart);
game.addChild(restartButton);
levelNo = new StageNo();
levelNo.name = "levelNo";
levelNo.x = 450;
levelNo.y = 35;
levelNo.alpha = 0;
game.addChild(levelNo);
soundButton = new SoundIcon();
soundButton.name = "sound_sprite";
soundButton.x = 35;
soundButton.y = 365;
soundButton.alpha = 0;
game.addChild(soundButton);
soundButton.addEventListener(MouseEvent.CLICK, onClickSound);
if (!game.soundEnabled){
soundButton.gotoAndStop(2);
};
TimerLite.delay(1500, loadLevel, this);
soundManager = SoundManager.getInstance();
if (Game.LANG == "EN"){
restartButton.mcPT.visible = false;
levelNo.TxtLevel.text = "LEVEL";
moreGames.mcPT.visible = false;
};
if (Game.LANG == "PT"){
restartButton.mcEN.visible = false;
levelNo.TxtLevel.text = "NÍVEL";
moreGames.mcEN.visible = false;
};
}
public function getBlockIndexPerPosition(_arg1, _arg2:int):int{
var _local3:int;
while (_local3 < levelBlocks.length) {
if ((((levelBlocks[_local3].getX() == _arg1)) && ((levelBlocks[_local3].getY() == _arg2)))){
return (_local3);
};
_local3++;
};
return (-1);
}
private function updateLevelNumber():void{
var _local1:String;
if (levelNumber < 10){
_local1 = ("0" + levelNumber.toString());
} else {
_local1 = levelNumber.toString();
};
levelNo.TxtNo.text = _local1;
}
public function returnTitle():void{
game.back.setAnimation("reset");
this.clean();
TimerLite.delay(1500, function (){
game.removeChild(game.getChildByName("gameOver_mc"));
}, this);
game.removeChild(game.getChildByName("restartButton"));
game.removeChild(game.getChildByName("levelNo"));
game.removeChild(game.getChildByName("sound_sprite"));
game.removeChild(game.getChildByName("moreGames"));
game.removeChild(game.getChildByName("language"));
TimerLite.delay(1500, function (){
game.returnTitle();
}, this);
}
public function stageFail():void{
var i:int;
var gameOver:MovieClip;
var all:Array = new Array();
levelStatus.setStatus(LevelStatus.GAMEOVER);
i = 0;
while (i < grayBlocks.length) {
all.push(grayBlocks[i]);
i = (i + 1);
};
i = 0;
while (i < finishBlocks.length) {
all.push(finishBlocks[i]);
i = (i + 1);
};
i = 0;
while (i < levelBlocks.length) {
all.push(levelBlocks[i]);
if (levelBlocks[i].getColor() != BlockColor.NONE){
levelBlocks[i].setStatus(BlockStatus.DISABLED);
};
i = (i + 1);
};
i = 0;
while (i < all.length) {
all[i].downAnimation();
i = (i + 1);
};
if (Game.LANG == "EN"){
gameOver = new GameOverEN(this);
};
if (Game.LANG == "PT"){
gameOver = new GameOverPT(this);
};
gameOver.name = "gameOver_mc";
game.addChild(gameOver);
game.back.setAnimation("gameover");
soundManager.fadeSound("Ingame", 0, 1.5);
TimerLite.delay(1000, function (){
soundManager.play("SfxGameOver");
}, this);
}
public function getBottomPerPosition(_arg1, _arg2:int):Bottom{
var _local3:int;
while (_local3 < grayBlocks.length) {
if (grayBlocks[_local3].getColor() != BlockColor.NONE){
if ((((grayBlocks[_local3].getX() == _arg1)) && ((grayBlocks[_local3].getY() == _arg2)))){
return (grayBlocks[_local3]);
};
};
_local3++;
};
return (null);
}
public function getGrayPerPosition(_arg1, _arg2:int):GrayBlock{
var _local3:int;
while (_local3 < grayBlocks.length) {
if (grayBlocks[_local3].getType() == "gray"){
if ((((grayBlocks[_local3].getX() == _arg1)) && ((grayBlocks[_local3].getY() == _arg2)))){
return (grayBlocks[_local3]);
};
};
_local3++;
};
return (null);
}
public function getBlockPerPosition(_arg1, _arg2:int):Block{
var _local3:int;
while (_local3 < levelBlocks.length) {
if ((((levelBlocks[_local3].getX() == _arg1)) && ((levelBlocks[_local3].getY() == _arg2)))){
return (levelBlocks[_local3]);
};
_local3++;
};
return (null);
}
public function clean():void{
var _local1:int;
_local1 = 0;
while (_local1 < grayBlocks.length) {
game.removeChild(grayBlocks[_local1]);
_local1++;
};
grayBlocks.splice(0, grayBlocks.length);
_local1 = 0;
while (_local1 < levelBlocks.length) {
game.removeChild(levelBlocks[_local1]);
_local1++;
};
levelBlocks.splice(0, levelBlocks.length);
_local1 = 0;
while (_local1 < finishBlocks.length) {
game.removeChild(finishBlocks[_local1]);
_local1++;
};
finishBlocks.splice(0, finishBlocks.length);
game.removeChild(ColorBlock.command);
}
private function onMoreGames(_arg1:MouseEvent):void{
var _local2:URLRequest = new URLRequest("http://www.onjogos.com");
navigateToURL(_local2, "_blank");
}
private function onLanguage(_arg1:MouseEvent):void{
soundManager.play("SfxClick");
if (Game.LANG == "EN"){
_arg1.target.gotoAndStop(2);
Game.LANG = "PT";
MovieClip(game.getChildByName("moreGames")).mcEN.visible = false;
MovieClip(game.getChildByName("moreGames")).mcPT.visible = true;
MovieClip(game.getChildByName("restartButton")).mcEN.visible = false;
MovieClip(game.getChildByName("restartButton")).mcPT.visible = true;
MovieClip(game.getChildByName("levelNo")).TxtLevel.text = "NÍVEL";
} else {
_arg1.target.gotoAndStop(1);
Game.LANG = "EN";
MovieClip(game.getChildByName("moreGames")).mcEN.visible = true;
MovieClip(game.getChildByName("moreGames")).mcPT.visible = false;
MovieClip(game.getChildByName("restartButton")).mcEN.visible = true;
MovieClip(game.getChildByName("restartButton")).mcPT.visible = false;
MovieClip(game.getChildByName("levelNo")).TxtLevel.text = "LEVEL";
};
}
private function factory():void{
var _local1:*;
var _local2:*;
var _local3:int;
var _local4:String;
var _local5:String;
if (levelStatus.getStatus() != LevelStatus.PLAY){
_local1 = 0;
while (_local1 < objectLevel.grayblock.length) {
_local2 = objectLevel.grayblock[_local1].x;
_local3 = objectLevel.grayblock[_local1].y;
_local4 = objectLevel.grayblock[_local1].color;
_local5 = objectLevel.grayblock[_local1].direction;
if (_local4 == BlockColor.NONE){
grayBlocks.push(new GrayBlock(_local2, _local3, _local5));
} else {
grayBlocks.push(new Bottom(_local2, _local3, _local4));
};
_local1++;
};
_local1 = 0;
while (_local1 < objectLevel.blackblock.length) {
_local2 = objectLevel.blackblock[_local1].x;
_local3 = objectLevel.blackblock[_local1].y;
levelBlocks.push(new BlackBlock(_local2, _local3));
_local1++;
};
_local1 = 0;
while (_local1 < objectLevel.colorblock.length) {
_local2 = objectLevel.colorblock[_local1].x;
_local3 = objectLevel.colorblock[_local1].y;
_local4 = objectLevel.colorblock[_local1].color;
levelBlocks.push(new ColorBlock(_local2, _local3, _local4, this));
_local1++;
};
grayBlocks.sortOn("y", Array.NUMERIC);
_local1 = 0;
while (_local1 < grayBlocks.length) {
game.addChild(grayBlocks[_local1]);
_local1++;
};
levelBlocks.sortOn("y", Array.NUMERIC);
_local1 = 0;
while (_local1 < levelBlocks.length) {
game.addChild(levelBlocks[_local1]);
_local1++;
};
game.addChild(ColorBlock.command);
ColorBlock.command.hide();
sortLevelBlocks();
levelStatus.setStatus(LevelStatus.PLAY);
soundManager.play("Ingame");
};
}
public function finishBlock(_arg1, _arg2:int):void{
var _local3:int = getBlockIndexPerPosition(_arg1, _arg2);
var _local4:Bottom = this.getBottomPerPosition(_arg1, _arg2);
finishBlocks.push(levelBlocks[_local3]);
levelBlocks.splice(_local3, 1);
_local4.full();
sortLevelBlocks();
}
public function nextLevel():void{
var cookie:SharedObject = SharedObject.getLocal("pushsnap2");
this.levelNumber++;
if (this.levelNumber < 26){
cookie.data.level = levelNumber;
cookie.flush();
this.updateLevelNumber();
this.clean();
this.loadLevel();
TimerLite.delay(1000, function (){
game.removeChild(game.getChildByName("stageClear_mc"));
}, this);
game.back.setAnimation("nextlevel");
} else {
cookie.data.level = 1;
cookie.flush();
game.removeChild(game.getChildByName("levelNo"));
game.removeChild(game.getChildByName("restartButton"));
game.removeChild(game.getChildByName("sound_sprite"));
game.removeChild(game.getChildByName("moreGames"));
game.removeChild(game.getChildByName("language"));
this.clean();
TimerLite.delay(1000, function (){
game.removeChild(game.getChildByName("stageClear_mc"));
game.finalGame();
}, this);
};
}
private function onClickSound(_arg1:MouseEvent):void{
soundManager.play("SfxClick");
if (this.levelStatus.getStatus() == LevelStatus.PLAY){
if (game.soundEnabled){
game.disableSound();
soundButton.gotoAndStop(2);
} else {
game.enableSound();
soundButton.gotoAndStop(1);
};
};
}
public function getColorBlockCount():int{
var _local1:int;
var _local2:int;
while (_local2 < levelBlocks.length) {
if (levelBlocks[_local2].getColor() != BlockColor.NONE){
_local1++;
};
_local2++;
};
return (_local1);
}
private function sortBlock(_arg1, _arg2:Block):int{
var _local3:Number = _arg1.getY();
var _local4:Number = _arg2.getY();
if (_arg1.getType() == "finished"){
_local3 = (_local3 - 0.1);
};
if (_arg2.getType() == "finished"){
_local4 = (_local4 - 0.1);
};
if ((((_arg1.getType() == "gray")) || ((_arg1.getType() == "bottom")))){
_local3 = (_local3 - 0.5);
};
if ((((_arg2.getType() == "gray")) || ((_arg2.getType() == "bottom")))){
_local4 = (_local4 - 0.5);
};
if (_local3 < _local4){
return (-1);
};
if (_local3 == _local4){
return (0);
};
return (1);
}
public function tryAgain():void{
game.back.setAnimation("reset");
this.clean();
TimerLite.delay(1500, factory, this);
TimerLite.delay(1500, function (){
game.removeChild(game.getChildByName("gameOver_mc"));
}, this);
}
public function stageClear():void{
var i:int;
var stageClear:MovieClip;
var all:Array = new Array();
levelStatus.setStatus(LevelStatus.STAGECLEAR);
i = 0;
while (i < grayBlocks.length) {
all.push(grayBlocks[i]);
i = (i + 1);
};
i = 0;
while (i < finishBlocks.length) {
all.push(finishBlocks[i]);
i = (i + 1);
};
i = 0;
while (i < levelBlocks.length) {
all.push(levelBlocks[i]);
if (levelBlocks[i].getColor() != BlockColor.NONE){
levelBlocks[i].setStatus(BlockStatus.DISABLED);
};
i = (i + 1);
};
i = 0;
while (i < all.length) {
all[i].upAnimation();
i = (i + 1);
};
if (Game.LANG == "EN"){
stageClear = new StageClearEN(this);
};
if (Game.LANG == "PT"){
stageClear = new StageClearPT(this);
};
stageClear.name = "stageClear_mc";
game.addChild(stageClear);
game.back.setAnimation("stageclear");
TimerLite.delay(1000, function (){
soundManager.fadeSound("Ingame", 0, 0.5);
soundManager.play("SfxStageClear");
}, this);
}
private function onRestart(_arg1:MouseEvent):void{
ColorBlock.command.hide();
if (this.levelStatus.getStatus() == LevelStatus.PLAY){
this.clean();
this.levelStatus.setStatus(LevelStatus.INIT);
this.factory();
};
}
public function sortLevelBlocks():void{
var _local1:int;
var _local2:Array = new Array();
_local1 = 0;
while (_local1 < grayBlocks.length) {
_local2.push(grayBlocks[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < finishBlocks.length) {
_local2.push(finishBlocks[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < levelBlocks.length) {
_local2.push(levelBlocks[_local1]);
_local1++;
};
_local2.sort(sortBlock);
_local1 = 0;
while (_local1 < _local2.length) {
game.setChildIndex(_local2[_local1], _local1);
_local1++;
};
game.setChildIndex(restartButton, 2);
game.setChildIndex(levelNo, 3);
game.setChildIndex(soundButton, 4);
game.setChildIndex(game.back.getMc(), 0);
}
private function loadLevel():void{
TweenLite.to(restartButton, 1, {alpha:1});
TweenLite.to(levelNo, 1, {alpha:1});
TweenLite.to(soundButton, 1, {alpha:1});
TweenLite.to(moreGames, 1, {alpha:1});
TweenLite.to(language, 1, {alpha:1});
updateLevelNumber();
objectLevel = XMLManager.XMLToObject(XMLLevel.getXMLLevel(levelNumber));
this.factory();
}
}
}//package classes
Section 17
//LevelStatus (classes.LevelStatus)
package classes {
public class LevelStatus {
private var status:String;
public static const INIT:String = "init";
public static const PLAY:String = "play";
public static const GAMEOVER:String = "gameover";
public static const EMPTY:String = "empty";
public static const STAGECLEAR:String = "stageclear";
public function LevelStatus(){
this.status = LevelStatus.INIT;
}
public function getStatus():String{
return (this.status);
}
public function setStatus(_arg1:String):void{
this.status = _arg1;
}
}
}//package classes
Section 18
//StageClearEN (classes.StageClearEN)
package classes {
import util.*;
import flash.display.*;
public class StageClearEN extends MovieClip {
private var level:Level;
public function StageClearEN(_arg1:Level){
this.x = 275;
this.y = 200;
this.alpha = 0;
this.level = _arg1;
TimerLite.delay(1500, setInAnimation, this);
}
private function setInAnimation():void{
TweenLite.to(this, 2, {alpha:1});
TimerLite.delay(4000, setOutAnimation, this);
}
private function setOutAnimation():void{
level.nextLevel();
TweenLite.to(this, 1, {alpha:0});
}
}
}//package classes
Section 19
//StageClearPT (classes.StageClearPT)
package classes {
import util.*;
import flash.display.*;
public class StageClearPT extends MovieClip {
private var level:Level;
public function StageClearPT(_arg1:Level){
this.x = 275;
this.y = 200;
this.alpha = 0;
this.level = _arg1;
TimerLite.delay(1500, setInAnimation, this);
}
private function setInAnimation():void{
TweenLite.to(this, 2, {alpha:1});
TimerLite.delay(4000, setOutAnimation, this);
}
private function setOutAnimation():void{
level.nextLevel();
TweenLite.to(this, 1, {alpha:0});
}
}
}//package classes
Section 20
//XMLLevel (classes.XMLLevel)
package classes {
public class XMLLevel {
public static function getXMLLevel(_arg1:int):XML{
var _local2:XML;
switch (_arg1){
case 1:
_local2 = <level>
<blackblock y="4" x="4"/>
<blackblock y="3" x="5"/>
<blackblock y="2" x="6"/>
<blackblock y="2" x="7"/>
<blackblock y="2" x="8"/>
<blackblock y="2" x="10"/>
<blackblock y="2" x="9"/>
<blackblock y="2" x="11"/>
<blackblock y="3" x="12"/>
<blackblock y="4" x="13"/>
<blackblock y="5" x="13"/>
<blackblock y="6" x="13"/>
<blackblock y="7" x="13"/>
<blackblock y="8" x="12"/>
<blackblock y="7" x="4"/>
<blackblock y="6" x="4"/>
<blackblock y="5" x="4"/>
<blackblock y="8" x="5"/>
<blackblock y="9" x="6"/>
<blackblock y="9" x="7"/>
<blackblock y="9" x="8"/>
<blackblock y="9" x="9"/>
<blackblock y="9" x="10"/>
<blackblock y="9" x="11"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="green"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="red"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="2" x="6" direction="none" color="none"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="2" x="8" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="2" x="11" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="2" x="9" direction="none" color="none"/>
<grayblock y="9" x="6" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="9" x="8" direction="none" color="none"/>
<grayblock y="9" x="9" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<colorblock y="7" x="6" color="green"/>
<colorblock y="4" x="6" color="red"/>
</level>
;
break;
case 2:
_local2 = <level>
<blackblock y="3" x="5"/>
<blackblock y="3" x="6"/>
<blackblock y="3" x="7"/>
<blackblock y="3" x="10"/>
<blackblock y="3" x="11"/>
<blackblock y="3" x="12"/>
<blackblock y="8" x="12"/>
<blackblock y="8" x="11"/>
<blackblock y="8" x="10"/>
<blackblock y="8" x="7"/>
<blackblock y="8" x="6"/>
<blackblock y="8" x="5"/>
<blackblock y="7" x="4"/>
<blackblock y="6" x="3"/>
<blackblock y="4" x="4"/>
<blackblock y="4" x="5"/>
<blackblock y="5" x="3"/>
<blackblock y="4" x="13"/>
<blackblock y="5" x="14"/>
<blackblock y="6" x="14"/>
<blackblock y="7" x="13"/>
<blackblock y="4" x="8"/>
<blackblock y="4" x="9"/>
<blackblock y="7" x="8"/>
<blackblock y="7" x="9"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="5" x="3" direction="none" color="none"/>
<grayblock y="6" x="3" direction="none" color="none"/>
<grayblock y="5" x="14" direction="none" color="none"/>
<grayblock y="6" x="14" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="blue"/>
<grayblock y="5" x="4" direction="none" color="blue"/>
<grayblock y="6" x="9" direction="none" color="yellow"/>
<grayblock y="5" x="8" direction="none" color="yellow"/>
<colorblock y="5" x="7" color="blue"/>
<colorblock y="6" x="10" color="blue"/>
<colorblock y="5" x="11" color="yellow"/>
<colorblock y="6" x="6" color="yellow"/>
</level>
;
break;
case 3:
_local2 = <level>
<blackblock y="2" x="6"/>
<blackblock y="2" x="7"/>
<blackblock y="2" x="8"/>
<blackblock y="2" x="9"/>
<blackblock y="2" x="10"/>
<blackblock y="2" x="11"/>
<blackblock y="9" x="11"/>
<blackblock y="9" x="10"/>
<blackblock y="9" x="9"/>
<blackblock y="9" x="8"/>
<blackblock y="9" x="7"/>
<blackblock y="9" x="6"/>
<blackblock y="4" x="13"/>
<blackblock y="5" x="13"/>
<blackblock y="6" x="13"/>
<blackblock y="7" x="13"/>
<blackblock y="7" x="4"/>
<blackblock y="6" x="4"/>
<blackblock y="5" x="4"/>
<blackblock y="4" x="4"/>
<blackblock y="3" x="5"/>
<blackblock y="3" x="12"/>
<blackblock y="8" x="12"/>
<blackblock y="8" x="5"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="2" x="11" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="2" x="9" direction="none" color="none"/>
<grayblock y="2" x="8" direction="none" color="none"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="2" x="6" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="none"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="9" x="6" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="9" x="8" direction="none" color="none"/>
<grayblock y="9" x="9" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="red"/>
<grayblock y="6" x="10" direction="none" color="red"/>
<grayblock y="4" x="8" direction="none" color="pink"/>
<grayblock y="7" x="9" direction="none" color="pink"/>
<colorblock y="5" x="7" color="red"/>
<colorblock y="6" x="6" color="red"/>
<colorblock y="5" x="9" color="pink"/>
<colorblock y="6" x="8" color="pink"/>
</level>
;
break;
case 4:
_local2 = <level>
<blackblock y="3" x="4"/>
<blackblock y="4" x="4"/>
<blackblock y="5" x="4"/>
<blackblock y="6" x="4"/>
<blackblock y="7" x="4"/>
<blackblock y="8" x="4"/>
<blackblock y="9" x="4"/>
<blackblock y="10" x="5"/>
<blackblock y="10" x="6"/>
<blackblock y="10" x="7"/>
<blackblock y="10" x="8"/>
<blackblock y="10" x="9"/>
<blackblock y="10" x="10"/>
<blackblock y="10" x="11"/>
<blackblock y="10" x="12"/>
<blackblock y="9" x="13"/>
<blackblock y="8" x="13"/>
<blackblock y="7" x="13"/>
<blackblock y="6" x="13"/>
<blackblock y="5" x="13"/>
<blackblock y="4" x="13"/>
<blackblock y="3" x="13"/>
<blackblock y="2" x="12"/>
<blackblock y="2" x="11"/>
<blackblock y="2" x="10"/>
<blackblock y="2" x="9"/>
<blackblock y="2" x="8"/>
<blackblock y="2" x="7"/>
<blackblock y="2" x="6"/>
<blackblock y="2" x="5"/>
<grayblock y="9" x="6" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="8" x="8" direction="right" color="none"/>
<grayblock y="4" x="7" direction="none" color="green"/>
<grayblock y="8" x="10" direction="none" color="green"/>
<grayblock y="5" x="7" direction="right" color="none"/>
<grayblock y="7" x="10" direction="left" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="yellow"/>
<grayblock y="7" x="6" direction="none" color="yellow"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="9" x="9" direction="none" color="none"/>
<grayblock y="4" x="9" direction="left" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="9" x="5" direction="none" color="none"/>
<grayblock y="9" x="12" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="9" x="8" direction="none" color="none"/>
<grayblock y="2" x="12" direction="none" color="none"/>
<grayblock y="2" x="11" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="2" x="9" direction="none" color="none"/>
<grayblock y="2" x="8" direction="none" color="none"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="2" x="6" direction="none" color="none"/>
<grayblock y="2" x="5" direction="none" color="none"/>
<grayblock y="10" x="5" direction="none" color="none"/>
<grayblock y="10" x="6" direction="none" color="none"/>
<grayblock y="10" x="7" direction="none" color="none"/>
<grayblock y="10" x="8" direction="none" color="none"/>
<grayblock y="10" x="9" direction="none" color="none"/>
<grayblock y="10" x="10" direction="none" color="none"/>
<grayblock y="10" x="11" direction="none" color="none"/>
<grayblock y="10" x="12" direction="none" color="none"/>
<grayblock y="9" x="4" direction="none" color="none"/>
<grayblock y="8" x="4" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="8" x="13" direction="none" color="none"/>
<grayblock y="9" x="13" direction="none" color="none"/>
<colorblock y="6" x="9" color="green"/>
<colorblock y="6" x="8" color="green"/>
<colorblock y="6" x="10" color="yellow"/>
<colorblock y="6" x="7" color="yellow"/>
</level>
;
break;
case 5:
_local2 = <level>
<blackblock y="8" x="3"/>
<blackblock y="9" x="4"/>
<blackblock y="10" x="5"/>
<blackblock y="10" x="6"/>
<blackblock y="10" x="7"/>
<blackblock y="10" x="10"/>
<blackblock y="10" x="11"/>
<blackblock y="10" x="12"/>
<blackblock y="9" x="13"/>
<blackblock y="8" x="14"/>
<blackblock y="4" x="3"/>
<blackblock y="3" x="4"/>
<blackblock y="2" x="5"/>
<blackblock y="2" x="6"/>
<blackblock y="2" x="7"/>
<blackblock y="2" x="10"/>
<blackblock y="2" x="11"/>
<blackblock y="2" x="12"/>
<blackblock y="3" x="13"/>
<blackblock y="4" x="14"/>
<blackblock y="3" x="8"/>
<blackblock y="3" x="9"/>
<blackblock y="9" x="8"/>
<blackblock y="9" x="9"/>
<blackblock y="5" x="14"/>
<blackblock y="6" x="14"/>
<blackblock y="7" x="14"/>
<blackblock y="5" x="3"/>
<blackblock y="7" x="3"/>
<blackblock y="6" x="3"/>
<blackblock y="8" x="7"/>
<blackblock y="8" x="10"/>
<grayblock y="8" x="13" direction="none" color="none"/>
<grayblock y="9" x="4" direction="none" color="none"/>
<grayblock y="10" x="5" direction="none" color="none"/>
<grayblock y="10" x="6" direction="none" color="none"/>
<grayblock y="10" x="7" direction="none" color="none"/>
<grayblock y="10" x="10" direction="none" color="none"/>
<grayblock y="10" x="11" direction="none" color="none"/>
<grayblock y="10" x="12" direction="none" color="none"/>
<grayblock y="9" x="13" direction="none" color="none"/>
<grayblock y="8" x="14" direction="none" color="none"/>
<grayblock y="8" x="3" direction="none" color="none"/>
<grayblock y="8" x="4" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="9" x="6" direction="none" color="none"/>
<grayblock y="9" x="8" direction="none" color="none"/>
<grayblock y="9" x="9" direction="none" color="none"/>
<grayblock y="9" x="12" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="4" x="3" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="4" x="14" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="2" x="12" direction="none" color="none"/>
<grayblock y="2" x="11" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="2" x="5" direction="none" color="none"/>
<grayblock y="2" x="6" direction="none" color="none"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="9" x="5" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="7" x="14" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="5" x="14" direction="none" color="none"/>
<grayblock y="6" x="14" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="6" x="3" direction="none" color="none"/>
<grayblock y="7" x="3" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="5" x="3" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="blue"/>
<grayblock y="6" x="9" direction="none" color="blue"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="red"/>
<grayblock y="8" x="8" direction="none" color="red"/>
<grayblock y="6" x="4" direction="right" color="none"/>
<grayblock y="6" x="13" direction="left" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<colorblock y="5" x="6" color="blue"/>
<colorblock y="4" x="8" color="red"/>
<colorblock y="4" x="9" color="red"/>
<colorblock y="5" x="11" color="blue"/>
</level>
;
break;
case 6:
_local2 = <level>
<blackblock y="4" x="2"/>
<blackblock y="5" x="2"/>
<blackblock y="6" x="2"/>
<blackblock y="7" x="2"/>
<blackblock y="8" x="2"/>
<blackblock y="3" x="2"/>
<blackblock y="2" x="3"/>
<blackblock y="2" x="4"/>
<blackblock y="2" x="13"/>
<blackblock y="2" x="14"/>
<blackblock y="3" x="15"/>
<blackblock y="4" x="15"/>
<blackblock y="5" x="15"/>
<blackblock y="6" x="15"/>
<blackblock y="7" x="15"/>
<blackblock y="8" x="15"/>
<blackblock y="9" x="14"/>
<blackblock y="9" x="13"/>
<blackblock y="9" x="4"/>
<blackblock y="9" x="3"/>
<blackblock y="1" x="10"/>
<blackblock y="1" x="9"/>
<blackblock y="1" x="8"/>
<blackblock y="1" x="7"/>
<blackblock y="10" x="7"/>
<blackblock y="10" x="8"/>
<blackblock y="10" x="9"/>
<blackblock y="10" x="10"/>
<blackblock y="5" x="11"/>
<blackblock y="6" x="11"/>
<blackblock y="6" x="6"/>
<blackblock y="5" x="6"/>
<blackblock y="1" x="12"/>
<blackblock y="1" x="11"/>
<blackblock y="1" x="5"/>
<blackblock y="1" x="6"/>
<blackblock y="10" x="12"/>
<blackblock y="10" x="11"/>
<blackblock y="10" x="5"/>
<blackblock y="10" x="6"/>
<blackblock y="4" x="10"/>
<blackblock y="4" x="7"/>
<blackblock y="7" x="7"/>
<blackblock y="7" x="10"/>
<blackblock y="4" x="8"/>
<blackblock y="4" x="9"/>
<blackblock y="7" x="9"/>
<blackblock y="7" x="8"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="6" x="14" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="8" x="14" direction="none" color="none"/>
<grayblock y="8" x="13" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="5" x="14" direction="none" color="none"/>
<grayblock y="4" x="14" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="3" x="14" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="3" x="3" direction="none" color="none"/>
<grayblock y="2" x="14" direction="none" color="none"/>
<grayblock y="2" x="13" direction="none" color="none"/>
<grayblock y="2" x="4" direction="none" color="none"/>
<grayblock y="2" x="3" direction="none" color="none"/>
<grayblock y="9" x="13" direction="none" color="none"/>
<grayblock y="9" x="14" direction="none" color="none"/>
<grayblock y="3" x="15" direction="none" color="none"/>
<grayblock y="4" x="15" direction="none" color="none"/>
<grayblock y="5" x="15" direction="none" color="none"/>
<grayblock y="6" x="15" direction="none" color="none"/>
<grayblock y="7" x="15" direction="none" color="none"/>
<grayblock y="8" x="15" direction="none" color="none"/>
<grayblock y="3" x="2" direction="none" color="none"/>
<grayblock y="4" x="2" direction="none" color="none"/>
<grayblock y="5" x="3" direction="none" color="none"/>
<grayblock y="6" x="3" direction="none" color="none"/>
<grayblock y="7" x="3" direction="none" color="none"/>
<grayblock y="8" x="3" direction="none" color="none"/>
<grayblock y="8" x="4" direction="none" color="none"/>
<grayblock y="9" x="4" direction="none" color="none"/>
<grayblock y="9" x="3" direction="none" color="none"/>
<grayblock y="8" x="2" direction="none" color="none"/>
<grayblock y="7" x="2" direction="none" color="none"/>
<grayblock y="6" x="2" direction="none" color="none"/>
<grayblock y="5" x="2" direction="none" color="none"/>
<grayblock y="1" x="7" direction="none" color="none"/>
<grayblock y="1" x="8" direction="none" color="none"/>
<grayblock y="1" x="9" direction="none" color="none"/>
<grayblock y="10" x="10" direction="none" color="none"/>
<grayblock y="10" x="9" direction="none" color="none"/>
<grayblock y="10" x="8" direction="none" color="none"/>
<grayblock y="2" x="5" direction="none" color="none"/>
<grayblock y="2" x="6" direction="none" color="none"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="2" x="8" direction="none" color="none"/>
<grayblock y="2" x="9" direction="none" color="none"/>
<grayblock y="2" x="11" direction="none" color="none"/>
<grayblock y="9" x="12" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="9" x="9" direction="none" color="none"/>
<grayblock y="9" x="8" direction="none" color="none"/>
<grayblock y="9" x="6" direction="none" color="none"/>
<grayblock y="9" x="5" direction="none" color="none"/>
<grayblock y="10" x="5" direction="none" color="none"/>
<grayblock y="10" x="6" direction="none" color="none"/>
<grayblock y="10" x="7" direction="none" color="none"/>
<grayblock y="10" x="12" direction="none" color="none"/>
<grayblock y="10" x="11" direction="none" color="none"/>
<grayblock y="1" x="12" direction="none" color="none"/>
<grayblock y="1" x="11" direction="none" color="none"/>
<grayblock y="1" x="10" direction="none" color="none"/>
<grayblock y="1" x="6" direction="none" color="none"/>
<grayblock y="1" x="5" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="black"/>
<grayblock y="8" x="5" direction="none" color="black"/>
<grayblock y="8" x="10" direction="none" color="yellow"/>
<grayblock y="3" x="7" direction="none" color="yellow"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="black"/>
<grayblock y="3" x="5" direction="none" color="black"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="2" x="12" direction="none" color="none"/>
<grayblock y="4" x="3" direction="none" color="pink"/>
<grayblock y="7" x="14" direction="none" color="pink"/>
<colorblock y="4" x="13" color="yellow"/>
<colorblock y="7" x="4" color="yellow"/>
<colorblock y="7" x="13" color="pink"/>
<colorblock y="4" x="4" color="pink"/>
</level>
;
break;
case 7:
_local2 = <level>
<blackblock y="8" x="3"/>
<blackblock y="9" x="4"/>
<blackblock y="10" x="5"/>
<blackblock y="10" x="6"/>
<blackblock y="10" x="11"/>
<blackblock y="10" x="12"/>
<blackblock y="9" x="13"/>
<blackblock y="8" x="14"/>
<blackblock y="7" x="3"/>
<blackblock y="5" x="3"/>
<blackblock y="4" x="3"/>
<blackblock y="3" x="4"/>
<blackblock y="2" x="5"/>
<blackblock y="2" x="6"/>
<blackblock y="2" x="11"/>
<blackblock y="2" x="12"/>
<blackblock y="3" x="13"/>
<blackblock y="4" x="14"/>
<blackblock y="5" x="14"/>
<blackblock y="7" x="14"/>
<blackblock y="6" x="3"/>
<blackblock y="6" x="14"/>
<blackblock y="10" x="7"/>
<blackblock y="2" x="7"/>
<blackblock y="3" x="10"/>
<blackblock y="2" x="10"/>
<blackblock y="3" x="7"/>
<blackblock y="9" x="7"/>
<blackblock y="9" x="10"/>
<blackblock y="10" x="10"/>
<blackblock y="8" x="9"/>
<blackblock y="8" x="8"/>
<blackblock y="4" x="8"/>
<blackblock y="4" x="9"/>
<grayblock y="9" x="4" direction="none" color="none"/>
<grayblock y="10" x="5" direction="none" color="none"/>
<grayblock y="10" x="6" direction="none" color="none"/>
<grayblock y="10" x="11" direction="none" color="none"/>
<grayblock y="10" x="12" direction="none" color="none"/>
<grayblock y="9" x="13" direction="none" color="none"/>
<grayblock y="8" x="14" direction="none" color="none"/>
<grayblock y="8" x="3" direction="none" color="none"/>
<grayblock y="8" x="4" direction="none" color="none"/>
<grayblock y="9" x="6" direction="none" color="none"/>
<grayblock y="9" x="12" direction="none" color="none"/>
<grayblock y="9" x="5" direction="none" color="none"/>
<grayblock y="7" x="14" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="7" x="3" direction="none" color="none"/>
<grayblock y="5" x="14" direction="none" color="none"/>
<grayblock y="5" x="3" direction="none" color="none"/>
<grayblock y="4" x="3" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="4" x="14" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="2" x="12" direction="none" color="none"/>
<grayblock y="2" x="11" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="2" x="5" direction="none" color="none"/>
<grayblock y="2" x="6" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="6" x="14" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="6" x="3" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="blue"/>
<grayblock y="5" x="4" direction="none" color="blue"/>
<grayblock y="8" x="11" direction="none" color="black"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="8" x="13" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="black"/>
<grayblock y="4" x="6" direction="none" color="black"/>
<grayblock y="8" x="6" direction="none" color="black"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="red"/>
<grayblock y="7" x="4" direction="none" color="red"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="10" x="7" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="10" x="10" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="none"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<colorblock y="5" x="12" color="blue"/>
<colorblock y="7" x="5" color="blue"/>
<colorblock y="7" x="12" color="red"/>
<colorblock y="5" x="5" color="red"/>
</level>
;
break;
case 8:
_local2 = <level>
<blackblock y="2" x="13"/>
<blackblock y="2" x="12"/>
<blackblock y="2" x="11"/>
<blackblock y="2" x="6"/>
<blackblock y="2" x="5"/>
<blackblock y="2" x="4"/>
<blackblock y="3" x="3"/>
<blackblock y="4" x="2"/>
<blackblock y="5" x="2"/>
<blackblock y="6" x="2"/>
<blackblock y="7" x="2"/>
<blackblock y="8" x="14"/>
<blackblock y="3" x="14"/>
<blackblock y="4" x="15"/>
<blackblock y="5" x="15"/>
<blackblock y="6" x="15"/>
<blackblock y="7" x="15"/>
<blackblock y="9" x="13"/>
<blackblock y="9" x="12"/>
<blackblock y="9" x="11"/>
<blackblock y="9" x="6"/>
<blackblock y="9" x="5"/>
<blackblock y="9" x="4"/>
<blackblock y="8" x="3"/>
<blackblock y="5" x="8"/>
<blackblock y="6" x="8"/>
<blackblock y="6" x="9"/>
<blackblock y="5" x="9"/>
<blackblock y="1" x="9"/>
<blackblock y="1" x="8"/>
<blackblock y="10" x="8"/>
<blackblock y="10" x="9"/>
<blackblock y="1" x="10"/>
<blackblock y="1" x="7"/>
<blackblock y="10" x="10"/>
<blackblock y="10" x="7"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="2" x="11" direction="none" color="none"/>
<grayblock y="2" x="12" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="2" x="6" direction="none" color="none"/>
<grayblock y="2" x="5" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="2" x="13" direction="none" color="none"/>
<grayblock y="8" x="14" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="8" x="4" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="9" x="12" direction="none" color="none"/>
<grayblock y="9" x="13" direction="none" color="none"/>
<grayblock y="9" x="6" direction="none" color="none"/>
<grayblock y="9" x="5" direction="none" color="none"/>
<grayblock y="3" x="14" direction="none" color="none"/>
<grayblock y="4" x="14" direction="none" color="none"/>
<grayblock y="5" x="14" direction="none" color="none"/>
<grayblock y="6" x="14" direction="none" color="none"/>
<grayblock y="7" x="14" direction="none" color="none"/>
<grayblock y="7" x="15" direction="none" color="none"/>
<grayblock y="6" x="15" direction="none" color="none"/>
<grayblock y="5" x="15" direction="none" color="none"/>
<grayblock y="4" x="15" direction="none" color="none"/>
<grayblock y="3" x="3" direction="none" color="none"/>
<grayblock y="4" x="3" direction="none" color="none"/>
<grayblock y="5" x="3" direction="none" color="none"/>
<grayblock y="6" x="3" direction="none" color="none"/>
<grayblock y="7" x="3" direction="none" color="none"/>
<grayblock y="4" x="2" direction="none" color="none"/>
<grayblock y="5" x="2" direction="none" color="none"/>
<grayblock y="6" x="2" direction="none" color="none"/>
<grayblock y="7" x="2" direction="none" color="none"/>
<grayblock y="2" x="4" direction="none" color="none"/>
<grayblock y="9" x="4" direction="none" color="none"/>
<grayblock y="8" x="3" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="4" x="6" direction="down" color="none"/>
<grayblock y="7" x="11" direction="up" color="none"/>
<grayblock y="8" x="6" direction="right" color="none"/>
<grayblock y="3" x="11" direction="left" color="none"/>
<grayblock y="8" x="13" direction="none" color="pink"/>
<grayblock y="3" x="4" direction="none" color="pink"/>
<grayblock y="3" x="5" direction="none" color="green"/>
<grayblock y="8" x="12" direction="none" color="green"/>
<grayblock y="8" x="5" direction="none" color="black"/>
<grayblock y="3" x="12" direction="none" color="black"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="2" x="9" direction="none" color="none"/>
<grayblock y="2" x="8" direction="none" color="none"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="1" x="7" direction="none" color="none"/>
<grayblock y="1" x="8" direction="none" color="none"/>
<grayblock y="1" x="9" direction="none" color="none"/>
<grayblock y="1" x="10" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="9" x="9" direction="none" color="none"/>
<grayblock y="9" x="8" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="10" x="7" direction="none" color="none"/>
<grayblock y="10" x="8" direction="none" color="none"/>
<grayblock y="10" x="9" direction="none" color="none"/>
<grayblock y="10" x="10" direction="none" color="none"/>
<colorblock y="4" x="10" color="green"/>
<colorblock y="7" x="7" color="green"/>
<colorblock y="7" x="12" color="pink"/>
<colorblock y="4" x="5" color="pink"/>
</level>
;
break;
case 9:
_local2 = <level>
<blackblock y="9" x="4"/>
<blackblock y="10" x="5"/>
<blackblock y="10" x="7"/>
<blackblock y="10" x="8"/>
<blackblock y="10" x="9"/>
<blackblock y="10" x="10"/>
<blackblock y="10" x="12"/>
<blackblock y="9" x="13"/>
<blackblock y="3" x="4"/>
<blackblock y="2" x="5"/>
<blackblock y="2" x="7"/>
<blackblock y="2" x="8"/>
<blackblock y="2" x="9"/>
<blackblock y="2" x="10"/>
<blackblock y="2" x="12"/>
<blackblock y="3" x="13"/>
<blackblock y="8" x="4"/>
<blackblock y="4" x="4"/>
<blackblock y="4" x="13"/>
<blackblock y="8" x="13"/>
<blackblock y="5" x="12"/>
<blackblock y="7" x="12"/>
<blackblock y="6" x="13"/>
<blackblock y="5" x="5"/>
<blackblock y="7" x="5"/>
<blackblock y="6" x="4"/>
<blackblock y="3" x="11"/>
<blackblock y="3" x="6"/>
<blackblock y="9" x="6"/>
<blackblock y="9" x="11"/>
<blackblock y="8" x="8"/>
<blackblock y="8" x="9"/>
<blackblock y="4" x="9"/>
<blackblock y="4" x="8"/>
<grayblock y="8" x="13" direction="none" color="none"/>
<grayblock y="9" x="4" direction="none" color="none"/>
<grayblock y="10" x="5" direction="none" color="none"/>
<grayblock y="10" x="7" direction="none" color="none"/>
<grayblock y="10" x="8" direction="none" color="none"/>
<grayblock y="10" x="9" direction="none" color="none"/>
<grayblock y="10" x="10" direction="none" color="none"/>
<grayblock y="10" x="12" direction="none" color="none"/>
<grayblock y="9" x="13" direction="none" color="none"/>
<grayblock y="8" x="4" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="2" x="12" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="2" x="9" direction="none" color="none"/>
<grayblock y="2" x="5" direction="none" color="none"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="2" x="8" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="none"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="9" x="9" direction="none" color="none"/>
<grayblock y="9" x="8" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="9" x="6" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="blue"/>
<grayblock y="9" x="5" direction="none" color="blue"/>
<grayblock y="9" x="12" direction="none" color="yellow"/>
<grayblock y="3" x="5" direction="none" color="yellow"/>
<grayblock y="6" x="7" direction="down" color="none"/>
<grayblock y="6" x="10" direction="up" color="none"/>
<grayblock y="8" x="7" direction="left" color="none"/>
<grayblock y="4" x="10" direction="right" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="black"/>
<grayblock y="5" x="9" direction="none" color="black"/>
<colorblock y="6" x="12" color="blue"/>
<colorblock y="6" x="5" color="yellow"/>
<colorblock y="6" x="9" color="yellow"/>
<colorblock y="6" x="8" color="blue"/>
</level>
;
break;
case 10:
_local2 = <level>
<blackblock y="9" x="4"/>
<blackblock y="10" x="5"/>
<blackblock y="10" x="12"/>
<blackblock y="9" x="13"/>
<blackblock y="3" x="4"/>
<blackblock y="3" x="13"/>
<blackblock y="8" x="4"/>
<blackblock y="4" x="4"/>
<blackblock y="4" x="13"/>
<blackblock y="8" x="13"/>
<blackblock y="5" x="4"/>
<blackblock y="6" x="4"/>
<blackblock y="7" x="4"/>
<blackblock y="10" x="6"/>
<blackblock y="10" x="7"/>
<blackblock y="10" x="8"/>
<blackblock y="10" x="9"/>
<blackblock y="10" x="10"/>
<blackblock y="10" x="11"/>
<blackblock y="7" x="13"/>
<blackblock y="6" x="13"/>
<blackblock y="5" x="13"/>
<blackblock y="2" x="13"/>
<blackblock y="1" x="12"/>
<blackblock y="1" x="11"/>
<blackblock y="1" x="10"/>
<blackblock y="1" x="9"/>
<blackblock y="1" x="8"/>
<blackblock y="1" x="7"/>
<blackblock y="1" x="6"/>
<blackblock y="1" x="5"/>
<blackblock y="2" x="4"/>
<blackblock y="4" x="6"/>
<blackblock y="3" x="7"/>
<blackblock y="8" x="10"/>
<blackblock y="7" x="11"/>
<blackblock y="5" x="8"/>
<blackblock y="6" x="9"/>
<blackblock y="7" x="12"/>
<blackblock y="4" x="5"/>
<grayblock y="8" x="13" direction="none" color="none"/>
<grayblock y="9" x="4" direction="none" color="none"/>
<grayblock y="10" x="5" direction="none" color="none"/>
<grayblock y="10" x="12" direction="none" color="none"/>
<grayblock y="9" x="13" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="8" x="4" direction="none" color="none"/>
<grayblock y="10" x="6" direction="none" color="none"/>
<grayblock y="10" x="7" direction="none" color="none"/>
<grayblock y="10" x="8" direction="none" color="none"/>
<grayblock y="10" x="9" direction="none" color="none"/>
<grayblock y="10" x="10" direction="none" color="none"/>
<grayblock y="10" x="11" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="9" x="9" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="9" x="12" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="2" x="13" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="2" x="8" direction="none" color="none"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="2" x="6" direction="none" color="none"/>
<grayblock y="2" x="5" direction="none" color="none"/>
<grayblock y="2" x="4" direction="none" color="none"/>
<grayblock y="1" x="5" direction="none" color="none"/>
<grayblock y="1" x="6" direction="none" color="none"/>
<grayblock y="1" x="7" direction="none" color="none"/>
<grayblock y="1" x="8" direction="none" color="none"/>
<grayblock y="1" x="9" direction="none" color="none"/>
<grayblock y="1" x="10" direction="none" color="none"/>
<grayblock y="1" x="11" direction="none" color="none"/>
<grayblock y="1" x="12" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="black"/>
<grayblock y="5" x="10" direction="none" color="black"/>
<grayblock y="2" x="9" direction="right" color="none"/>
<grayblock y="9" x="8" direction="left" color="none"/>
<grayblock y="4" x="9" direction="none" color="green"/>
<grayblock y="7" x="8" direction="none" color="green"/>
<grayblock y="9" x="6" direction="none" color="red"/>
<grayblock y="2" x="11" direction="none" color="red"/>
<grayblock y="2" x="12" direction="none" color="pink"/>
<grayblock y="9" x="5" direction="none" color="pink"/>
<colorblock y="3" x="11" color="green"/>
<colorblock y="8" x="6" color="green"/>
<colorblock y="5" x="9" color="red"/>
<colorblock y="6" x="8" color="red"/>
<colorblock y="3" x="6" color="pink"/>
<colorblock y="8" x="11" color="pink"/>
</level>
;
break;
case 11:
_local2 = <level>
<blackblock y="9" x="4"/>
<blackblock y="10" x="5"/>
<blackblock y="10" x="6"/>
<blackblock y="10" x="7"/>
<blackblock y="10" x="8"/>
<blackblock y="10" x="9"/>
<blackblock y="10" x="10"/>
<blackblock y="10" x="11"/>
<blackblock y="10" x="12"/>
<blackblock y="9" x="13"/>
<blackblock y="3" x="4"/>
<blackblock y="2" x="5"/>
<blackblock y="2" x="6"/>
<blackblock y="2" x="7"/>
<blackblock y="2" x="8"/>
<blackblock y="2" x="9"/>
<blackblock y="2" x="10"/>
<blackblock y="2" x="11"/>
<blackblock y="2" x="12"/>
<blackblock y="3" x="13"/>
<blackblock y="5" x="5"/>
<blackblock y="7" x="5"/>
<blackblock y="8" x="4"/>
<blackblock y="4" x="4"/>
<blackblock y="5" x="12"/>
<blackblock y="4" x="13"/>
<blackblock y="7" x="12"/>
<blackblock y="8" x="13"/>
<blackblock y="6" x="11"/>
<blackblock y="6" x="6"/>
<blackblock y="7" x="4"/>
<blackblock y="5" x="4"/>
<blackblock y="6" x="5"/>
<blackblock y="5" x="13"/>
<blackblock y="7" x="13"/>
<blackblock y="6" x="12"/>
<grayblock y="8" x="13" direction="none" color="none"/>
<grayblock y="9" x="4" direction="none" color="none"/>
<grayblock y="10" x="5" direction="none" color="none"/>
<grayblock y="10" x="6" direction="none" color="none"/>
<grayblock y="10" x="7" direction="none" color="none"/>
<grayblock y="10" x="8" direction="none" color="none"/>
<grayblock y="10" x="9" direction="none" color="none"/>
<grayblock y="10" x="10" direction="none" color="none"/>
<grayblock y="10" x="11" direction="none" color="none"/>
<grayblock y="10" x="12" direction="none" color="none"/>
<grayblock y="9" x="13" direction="none" color="none"/>
<grayblock y="8" x="4" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="2" x="12" direction="none" color="none"/>
<grayblock y="2" x="11" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="2" x="9" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="2" x="5" direction="none" color="none"/>
<grayblock y="2" x="6" direction="none" color="none"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="2" x="8" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="9" x="5" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="none"/>
<grayblock y="9" x="9" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="black"/>
<grayblock y="9" x="10" direction="none" color="black"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="red"/>
<grayblock y="5" x="6" direction="none" color="red"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="black"/>
<grayblock y="9" x="6" direction="none" color="black"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="9" x="12" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="yellow"/>
<grayblock y="4" x="5" direction="none" color="yellow"/>
<grayblock y="3" x="9" direction="none" color="blue"/>
<grayblock y="9" x="8" direction="none" color="blue"/>
<colorblock y="7" x="10" color="red"/>
<colorblock y="5" x="7" color="red"/>
<colorblock y="6" x="9" color="yellow"/>
<colorblock y="6" x="8" color="yellow"/>
<colorblock y="5" x="10" color="blue"/>
<colorblock y="7" x="7" color="blue"/>
</level>
;
break;
case 12:
_local2 = <level>
<blackblock y="8" x="3"/>
<blackblock y="8" x="14"/>
<blackblock y="7" x="3"/>
<blackblock y="5" x="3"/>
<blackblock y="4" x="3"/>
<blackblock y="2" x="5"/>
<blackblock y="2" x="6"/>
<blackblock y="2" x="11"/>
<blackblock y="2" x="12"/>
<blackblock y="4" x="14"/>
<blackblock y="5" x="14"/>
<blackblock y="7" x="14"/>
<blackblock y="6" x="14"/>
<blackblock y="6" x="3"/>
<blackblock y="9" x="10"/>
<blackblock y="8" x="10"/>
<blackblock y="7" x="10"/>
<blackblock y="7" x="9"/>
<blackblock y="7" x="8"/>
<blackblock y="7" x="7"/>
<blackblock y="8" x="7"/>
<blackblock y="9" x="7"/>
<blackblock y="3" x="7"/>
<blackblock y="4" x="7"/>
<blackblock y="5" x="7"/>
<blackblock y="5" x="8"/>
<blackblock y="5" x="9"/>
<blackblock y="5" x="10"/>
<blackblock y="4" x="10"/>
<blackblock y="3" x="10"/>
<blackblock y="3" x="14"/>
<blackblock y="3" x="3"/>
<blackblock y="2" x="13"/>
<blackblock y="2" x="4"/>
<blackblock y="9" x="3"/>
<blackblock y="10" x="6"/>
<blackblock y="10" x="5"/>
<blackblock y="10" x="4"/>
<blackblock y="10" x="13"/>
<blackblock y="10" x="12"/>
<blackblock y="10" x="11"/>
<blackblock y="9" x="14"/>
<grayblock y="8" x="13" direction="none" color="none"/>
<grayblock y="8" x="14" direction="none" color="none"/>
<grayblock y="8" x="3" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="7" x="14" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="7" x="3" direction="none" color="none"/>
<grayblock y="5" x="14" direction="none" color="none"/>
<grayblock y="4" x="3" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="4" x="14" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="2" x="12" direction="none" color="none"/>
<grayblock y="2" x="11" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="2" x="5" direction="none" color="none"/>
<grayblock y="2" x="6" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="5" x="3" direction="none" color="none"/>
<grayblock y="6" x="3" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="6" x="14" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="black"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="3" x="3" direction="none" color="none"/>
<grayblock y="3" x="14" direction="none" color="none"/>
<grayblock y="2" x="13" direction="none" color="none"/>
<grayblock y="2" x="4" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="green"/>
<grayblock y="3" x="12" direction="none" color="pink"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="9" x="3" direction="none" color="none"/>
<grayblock y="9" x="4" direction="none" color="none"/>
<grayblock y="10" x="4" direction="none" color="none"/>
<grayblock y="10" x="5" direction="none" color="none"/>
<grayblock y="10" x="6" direction="none" color="none"/>
<grayblock y="9" x="13" direction="none" color="none"/>
<grayblock y="9" x="12" direction="none" color="none"/>
<grayblock y="10" x="12" direction="none" color="none"/>
<grayblock y="10" x="13" direction="none" color="none"/>
<grayblock y="9" x="14" direction="none" color="none"/>
<grayblock y="10" x="11" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="9" x="6" direction="none" color="black"/>
<grayblock y="9" x="5" direction="none" color="pink"/>
<grayblock y="8" x="4" direction="none" color="green"/>
<colorblock y="6" x="7" color="pink"/>
<colorblock y="6" x="10" color="pink"/>
<colorblock y="6" x="9" color="green"/>
<colorblock y="6" x="8" color="green"/>
</level>
;
break;
case 13:
_local2 = <level>
<blackblock y="4" x="16"/>
<blackblock y="5" x="16"/>
<blackblock y="6" x="16"/>
<blackblock y="4" x="1"/>
<blackblock y="5" x="1"/>
<blackblock y="6" x="1"/>
<blackblock y="3" x="2"/>
<blackblock y="3" x="3"/>
<blackblock y="3" x="4"/>
<blackblock y="3" x="5"/>
<blackblock y="3" x="6"/>
<blackblock y="3" x="11"/>
<blackblock y="3" x="12"/>
<blackblock y="3" x="13"/>
<blackblock y="3" x="14"/>
<blackblock y="3" x="15"/>
<blackblock y="7" x="15"/>
<blackblock y="7" x="14"/>
<blackblock y="7" x="13"/>
<blackblock y="7" x="12"/>
<blackblock y="7" x="11"/>
<blackblock y="7" x="6"/>
<blackblock y="7" x="5"/>
<blackblock y="7" x="4"/>
<blackblock y="7" x="3"/>
<blackblock y="7" x="2"/>
<blackblock y="6" x="2"/>
<blackblock y="4" x="15"/>
<blackblock y="2" x="8"/>
<blackblock y="2" x="9"/>
<blackblock y="8" x="9"/>
<blackblock y="8" x="8"/>
<blackblock y="2" x="10"/>
<blackblock y="2" x="7"/>
<blackblock y="8" x="7"/>
<blackblock y="8" x="10"/>
<grayblock y="4" x="1" direction="none" color="none"/>
<grayblock y="4" x="3" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="4" x="14" direction="none" color="none"/>
<grayblock y="6" x="16" direction="none" color="none"/>
<grayblock y="6" x="14" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="6" x="3" direction="none" color="none"/>
<grayblock y="6" x="2" direction="none" color="none"/>
<grayblock y="6" x="1" direction="none" color="none"/>
<grayblock y="5" x="1" direction="none" color="none"/>
<grayblock y="5" x="3" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="5" x="14" direction="none" color="none"/>
<grayblock y="5" x="15" direction="none" color="none"/>
<grayblock y="5" x="16" direction="none" color="none"/>
<grayblock y="3" x="14" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="3" x="3" direction="none" color="none"/>
<grayblock y="3" x="2" direction="none" color="none"/>
<grayblock y="7" x="2" direction="none" color="none"/>
<grayblock y="7" x="3" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="7" x="15" direction="none" color="none"/>
<grayblock y="7" x="14" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="3" x="15" direction="none" color="none"/>
<grayblock y="4" x="15" direction="none" color="none"/>
<grayblock y="4" x="16" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="black"/>
<grayblock y="6" x="9" direction="none" color="black"/>
<grayblock y="6" x="6" direction="none" color="black"/>
<grayblock y="4" x="11" direction="none" color="black"/>
<grayblock y="4" x="2" direction="none" color="red"/>
<grayblock y="6" x="4" direction="none" color="red"/>
<grayblock y="4" x="6" direction="none" color="red"/>
<grayblock y="5" x="2" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="blue"/>
<grayblock y="6" x="11" direction="none" color="blue"/>
<grayblock y="6" x="15" direction="none" color="blue"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="none"/>
<grayblock y="2" x="8" direction="none" color="none"/>
<grayblock y="2" x="9" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<colorblock y="5" x="14" color="red"/>
<colorblock y="5" x="12" color="red"/>
<colorblock y="5" x="10" color="red"/>
<colorblock y="5" x="3" color="blue"/>
<colorblock y="5" x="5" color="blue"/>
<colorblock y="5" x="7" color="blue"/>
</level>
;
break;
case 14:
_local2 = <level>
<blackblock y="4" x="13"/>
<blackblock y="4" x="4"/>
<blackblock y="7" x="4"/>
<blackblock y="7" x="13"/>
<blackblock y="3" x="12"/>
<blackblock y="3" x="11"/>
<blackblock y="2" x="10"/>
<blackblock y="2" x="9"/>
<blackblock y="2" x="8"/>
<blackblock y="2" x="7"/>
<blackblock y="3" x="6"/>
<blackblock y="3" x="5"/>
<blackblock y="8" x="12"/>
<blackblock y="8" x="11"/>
<blackblock y="9" x="10"/>
<blackblock y="9" x="9"/>
<blackblock y="9" x="8"/>
<blackblock y="9" x="7"/>
<blackblock y="8" x="6"/>
<blackblock y="8" x="5"/>
<blackblock y="5" x="14"/>
<blackblock y="6" x="14"/>
<blackblock y="5" x="3"/>
<blackblock y="6" x="3"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="2" x="9" direction="none" color="none"/>
<grayblock y="2" x="8" direction="none" color="none"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="9" x="9" direction="none" color="none"/>
<grayblock y="9" x="8" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="black"/>
<grayblock y="8" x="9" direction="none" color="black"/>
<grayblock y="5" x="14" direction="none" color="none"/>
<grayblock y="6" x="14" direction="none" color="none"/>
<grayblock y="5" x="3" direction="none" color="none"/>
<grayblock y="6" x="3" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="yellow"/>
<grayblock y="5" x="9" direction="none" color="yellow"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="red"/>
<grayblock y="5" x="6" direction="none" color="red"/>
<colorblock y="7" x="7" color="yellow"/>
<colorblock y="4" x="10" color="yellow"/>
<colorblock y="7" x="10" color="red"/>
<colorblock y="4" x="7" color="red"/>
</level>
;
break;
case 15:
_local2 = <level>
<blackblock y="4" x="12"/>
<blackblock y="4" x="11"/>
<blackblock y="4" x="10"/>
<blackblock y="5" x="10"/>
<blackblock y="6" x="10"/>
<blackblock y="7" x="10"/>
<blackblock y="7" x="11"/>
<blackblock y="7" x="12"/>
<blackblock y="7" x="7"/>
<blackblock y="6" x="7"/>
<blackblock y="5" x="7"/>
<blackblock y="4" x="7"/>
<blackblock y="4" x="6"/>
<blackblock y="4" x="5"/>
<blackblock y="7" x="5"/>
<blackblock y="7" x="6"/>
<blackblock y="1" x="13"/>
<blackblock y="1" x="12"/>
<blackblock y="1" x="11"/>
<blackblock y="1" x="10"/>
<blackblock y="1" x="9"/>
<blackblock y="1" x="8"/>
<blackblock y="1" x="7"/>
<blackblock y="1" x="6"/>
<blackblock y="1" x="5"/>
<blackblock y="1" x="4"/>
<blackblock y="10" x="4"/>
<blackblock y="10" x="5"/>
<blackblock y="10" x="6"/>
<blackblock y="10" x="7"/>
<blackblock y="10" x="8"/>
<blackblock y="10" x="9"/>
<blackblock y="10" x="10"/>
<blackblock y="10" x="11"/>
<blackblock y="10" x="12"/>
<blackblock y="10" x="13"/>
<blackblock y="5" x="5"/>
<blackblock y="6" x="5"/>
<blackblock y="5" x="12"/>
<blackblock y="6" x="12"/>
<blackblock y="2" x="14"/>
<blackblock y="3" x="14"/>
<blackblock y="4" x="14"/>
<blackblock y="5" x="14"/>
<blackblock y="6" x="14"/>
<blackblock y="7" x="14"/>
<blackblock y="8" x="14"/>
<blackblock y="9" x="14"/>
<blackblock y="9" x="3"/>
<blackblock y="8" x="3"/>
<blackblock y="7" x="3"/>
<blackblock y="6" x="3"/>
<blackblock y="5" x="3"/>
<blackblock y="4" x="3"/>
<blackblock y="3" x="3"/>
<blackblock y="2" x="3"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="1" x="6" direction="none" color="none"/>
<grayblock y="1" x="5" direction="none" color="none"/>
<grayblock y="1" x="4" direction="none" color="none"/>
<grayblock y="10" x="4" direction="none" color="none"/>
<grayblock y="10" x="5" direction="none" color="none"/>
<grayblock y="10" x="6" direction="none" color="none"/>
<grayblock y="10" x="7" direction="none" color="none"/>
<grayblock y="10" x="8" direction="none" color="none"/>
<grayblock y="10" x="9" direction="none" color="none"/>
<grayblock y="10" x="10" direction="none" color="none"/>
<grayblock y="10" x="11" direction="none" color="none"/>
<grayblock y="10" x="12" direction="none" color="none"/>
<grayblock y="10" x="13" direction="none" color="none"/>
<grayblock y="1" x="13" direction="none" color="none"/>
<grayblock y="1" x="12" direction="none" color="none"/>
<grayblock y="1" x="11" direction="none" color="none"/>
<grayblock y="1" x="10" direction="none" color="none"/>
<grayblock y="1" x="9" direction="none" color="none"/>
<grayblock y="1" x="8" direction="none" color="none"/>
<grayblock y="1" x="7" direction="none" color="none"/>
<grayblock y="2" x="4" direction="none" color="none"/>
<grayblock y="2" x="5" direction="none" color="none"/>
<grayblock y="2" x="6" direction="none" color="none"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="2" x="11" direction="none" color="none"/>
<grayblock y="2" x="12" direction="none" color="none"/>
<grayblock y="9" x="13" direction="none" color="none"/>
<grayblock y="9" x="12" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="9" x="6" direction="none" color="none"/>
<grayblock y="9" x="5" direction="none" color="none"/>
<grayblock y="7" x="3" direction="none" color="none"/>
<grayblock y="5" x="3" direction="none" color="none"/>
<grayblock y="3" x="3" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="7" x="14" direction="none" color="none"/>
<grayblock y="8" x="14" direction="none" color="none"/>
<grayblock y="8" x="13" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="none"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="8" x="4" direction="none" color="none"/>
<grayblock y="8" x="3" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="6" x="14" direction="none" color="none"/>
<grayblock y="4" x="14" direction="none" color="none"/>
<grayblock y="3" x="14" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="4" x="3" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="9" x="8" direction="none" color="blue"/>
<grayblock y="2" x="9" direction="none" color="blue"/>
<grayblock y="9" x="9" direction="none" color="pink"/>
<grayblock y="2" x="8" direction="none" color="pink"/>
<grayblock y="9" x="14" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="9" x="4" direction="none" color="green"/>
<grayblock y="2" x="13" direction="none" color="green"/>
<grayblock y="2" x="3" direction="none" color="none"/>
<grayblock y="2" x="14" direction="none" color="none"/>
<grayblock y="9" x="3" direction="none" color="none"/>
<grayblock y="5" x="14" direction="none" color="none"/>
<grayblock y="6" x="3" direction="none" color="none"/>
<colorblock y="7" x="8" color="pink"/>
<colorblock y="4" x="9" color="pink"/>
<colorblock y="4" x="8" color="green"/>
<colorblock y="7" x="9" color="green"/>
<colorblock y="6" x="4" color="blue"/>
<colorblock y="5" x="13" color="blue"/>
</level>
;
break;
case 16:
_local2 = <level>
<blackblock y="5" x="2"/>
<blackblock y="6" x="2"/>
<blackblock y="5" x="15"/>
<blackblock y="1" x="9"/>
<blackblock y="1" x="8"/>
<blackblock y="10" x="8"/>
<blackblock y="10" x="9"/>
<blackblock y="4" x="14"/>
<blackblock y="4" x="13"/>
<blackblock y="4" x="12"/>
<blackblock y="2" x="10"/>
<blackblock y="2" x="7"/>
<blackblock y="4" x="5"/>
<blackblock y="4" x="4"/>
<blackblock y="4" x="3"/>
<blackblock y="7" x="3"/>
<blackblock y="7" x="4"/>
<blackblock y="7" x="5"/>
<blackblock y="9" x="7"/>
<blackblock y="9" x="10"/>
<blackblock y="7" x="12"/>
<blackblock y="7" x="13"/>
<blackblock y="7" x="14"/>
<blackblock y="6" x="15"/>
<blackblock y="2" x="6"/>
<blackblock y="3" x="5"/>
<blackblock y="2" x="11"/>
<blackblock y="3" x="12"/>
<blackblock y="8" x="12"/>
<blackblock y="9" x="11"/>
<blackblock y="9" x="6"/>
<blackblock y="8" x="5"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="4" x="3" direction="none" color="none"/>
<grayblock y="5" x="2" direction="none" color="none"/>
<grayblock y="6" x="2" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="4" x="14" direction="none" color="none"/>
<grayblock y="5" x="15" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="5" x="14" direction="none" color="none"/>
<grayblock y="7" x="14" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="7" x="3" direction="none" color="none"/>
<grayblock y="6" x="3" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="2" x="9" direction="none" color="none"/>
<grayblock y="1" x="9" direction="none" color="none"/>
<grayblock y="1" x="8" direction="none" color="none"/>
<grayblock y="2" x="8" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="9" x="9" direction="none" color="none"/>
<grayblock y="9" x="8" direction="none" color="none"/>
<grayblock y="10" x="8" direction="none" color="none"/>
<grayblock y="10" x="9" direction="none" color="none"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="6" x="15" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="9" x="6" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="2" x="11" direction="none" color="none"/>
<grayblock y="2" x="6" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="red"/>
<grayblock y="7" x="10" direction="none" color="red"/>
<grayblock y="4" x="10" direction="none" color="red"/>
<grayblock y="4" x="7" direction="none" color="red"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="yellow"/>
<grayblock y="5" x="9" direction="none" color="yellow"/>
<grayblock y="6" x="8" direction="none" color="yellow"/>
<grayblock y="8" x="9" direction="none" color="yellow"/>
<grayblock y="6" x="14" direction="none" color="green"/>
<grayblock y="5" x="3" direction="none" color="green"/>
<colorblock y="5" x="5" color="red"/>
<colorblock y="6" x="5" color="red"/>
<colorblock y="6" x="12" color="red"/>
<colorblock y="5" x="12" color="red"/>
<colorblock y="2" x="8" color="yellow"/>
<colorblock y="2" x="9" color="yellow"/>
<colorblock y="9" x="9" color="yellow"/>
<colorblock y="9" x="8" color="yellow"/>
<colorblock y="5" x="8" color="green"/>
<colorblock y="6" x="9" color="green"/>
</level>
;
break;
case 17:
_local2 = <level>
<blackblock y="2" x="13"/>
<blackblock y="2" x="12"/>
<blackblock y="2" x="11"/>
<blackblock y="2" x="6"/>
<blackblock y="2" x="5"/>
<blackblock y="2" x="4"/>
<blackblock y="3" x="3"/>
<blackblock y="8" x="14"/>
<blackblock y="3" x="14"/>
<blackblock y="9" x="13"/>
<blackblock y="9" x="12"/>
<blackblock y="9" x="11"/>
<blackblock y="9" x="6"/>
<blackblock y="9" x="5"/>
<blackblock y="9" x="4"/>
<blackblock y="8" x="3"/>
<blackblock y="3" x="15"/>
<blackblock y="4" x="16"/>
<blackblock y="5" x="16"/>
<blackblock y="6" x="16"/>
<blackblock y="7" x="16"/>
<blackblock y="8" x="15"/>
<blackblock y="8" x="2"/>
<blackblock y="3" x="2"/>
<blackblock y="4" x="1"/>
<blackblock y="5" x="1"/>
<blackblock y="6" x="1"/>
<blackblock y="7" x="1"/>
<blackblock y="2" x="7"/>
<blackblock y="2" x="8"/>
<blackblock y="2" x="9"/>
<blackblock y="2" x="10"/>
<blackblock y="9" x="9"/>
<blackblock y="9" x="8"/>
<blackblock y="9" x="7"/>
<blackblock y="9" x="10"/>
<blackblock y="8" x="7"/>
<blackblock y="3" x="7"/>
<blackblock y="3" x="10"/>
<blackblock y="8" x="10"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="2" x="11" direction="none" color="none"/>
<grayblock y="2" x="12" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="2" x="6" direction="none" color="none"/>
<grayblock y="2" x="5" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="2" x="13" direction="none" color="none"/>
<grayblock y="8" x="14" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="8" x="4" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="9" x="12" direction="none" color="none"/>
<grayblock y="9" x="13" direction="none" color="none"/>
<grayblock y="9" x="6" direction="none" color="none"/>
<grayblock y="9" x="5" direction="none" color="none"/>
<grayblock y="3" x="14" direction="none" color="none"/>
<grayblock y="3" x="3" direction="none" color="none"/>
<grayblock y="5" x="3" direction="none" color="none"/>
<grayblock y="7" x="3" direction="none" color="none"/>
<grayblock y="2" x="4" direction="none" color="none"/>
<grayblock y="9" x="4" direction="none" color="none"/>
<grayblock y="8" x="3" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="8" x="13" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="7" x="16" direction="none" color="none"/>
<grayblock y="6" x="16" direction="none" color="none"/>
<grayblock y="5" x="16" direction="none" color="none"/>
<grayblock y="4" x="16" direction="none" color="none"/>
<grayblock y="4" x="2" direction="none" color="none"/>
<grayblock y="7" x="1" direction="none" color="none"/>
<grayblock y="6" x="1" direction="none" color="none"/>
<grayblock y="5" x="1" direction="none" color="none"/>
<grayblock y="4" x="1" direction="none" color="none"/>
<grayblock y="3" x="2" direction="none" color="none"/>
<grayblock y="8" x="2" direction="none" color="none"/>
<grayblock y="3" x="15" direction="none" color="none"/>
<grayblock y="8" x="15" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="9" x="8" direction="none" color="none"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="9" x="9" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="none"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="2" x="8" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="2" x="9" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="7" x="15" direction="none" color="none"/>
<grayblock y="6" x="14" direction="none" color="none"/>
<grayblock y="4" x="14" direction="none" color="none"/>
<grayblock y="5" x="15" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="black"/>
<grayblock y="3" x="5" direction="none" color="black"/>
<grayblock y="3" x="12" direction="none" color="black"/>
<grayblock y="8" x="12" direction="none" color="black"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="6" x="2" direction="none" color="none"/>
<grayblock y="7" x="2" direction="none" color="blue"/>
<grayblock y="6" x="3" direction="none" color="blue"/>
<grayblock y="5" x="2" direction="none" color="blue"/>
<grayblock y="4" x="3" direction="none" color="blue"/>
<grayblock y="7" x="14" direction="none" color="pink"/>
<grayblock y="6" x="15" direction="none" color="pink"/>
<grayblock y="5" x="14" direction="none" color="pink"/>
<grayblock y="4" x="15" direction="none" color="pink"/>
<colorblock y="4" x="6" color="pink"/>
<colorblock y="5" x="6" color="pink"/>
<colorblock y="6" x="6" color="pink"/>
<colorblock y="7" x="6" color="pink"/>
<colorblock y="4" x="11" color="blue"/>
<colorblock y="5" x="11" color="blue"/>
<colorblock y="6" x="11" color="blue"/>
<colorblock y="7" x="11" color="blue"/>
</level>
;
break;
case 18:
_local2 = <level>
<blackblock y="6" x="2"/>
<blackblock y="5" x="2"/>
<blackblock y="4" x="3"/>
<blackblock y="3" x="4"/>
<blackblock y="7" x="3"/>
<blackblock y="8" x="4"/>
<blackblock y="8" x="5"/>
<blackblock y="3" x="5"/>
<blackblock y="3" x="6"/>
<blackblock y="8" x="6"/>
<blackblock y="2" x="7"/>
<blackblock y="1" x="8"/>
<blackblock y="1" x="9"/>
<blackblock y="2" x="10"/>
<blackblock y="3" x="11"/>
<blackblock y="3" x="12"/>
<blackblock y="3" x="13"/>
<blackblock y="4" x="14"/>
<blackblock y="5" x="15"/>
<blackblock y="6" x="15"/>
<blackblock y="7" x="14"/>
<blackblock y="8" x="13"/>
<blackblock y="8" x="12"/>
<blackblock y="8" x="11"/>
<blackblock y="9" x="7"/>
<blackblock y="10" x="8"/>
<blackblock y="10" x="9"/>
<blackblock y="9" x="10"/>
<blackblock y="5" x="8"/>
<blackblock y="6" x="9"/>
<blackblock y="5" x="5"/>
<blackblock y="6" x="12"/>
<blackblock y="4" x="11"/>
<blackblock y="7" x="6"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="10" x="9" direction="none" color="none"/>
<grayblock y="10" x="8" direction="none" color="none"/>
<grayblock y="9" x="8" direction="none" color="none"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="none"/>
<grayblock y="9" x="9" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="6" x="3" direction="none" color="none"/>
<grayblock y="6" x="2" direction="none" color="none"/>
<grayblock y="5" x="3" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="7" x="3" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="8" x="4" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="6" x="15" direction="none" color="none"/>
<grayblock y="6" x="14" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="7" x="14" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="8" x="13" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="none"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="2" x="8" direction="none" color="none"/>
<grayblock y="2" x="9" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="5" x="14" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="1" x="8" direction="none" color="none"/>
<grayblock y="1" x="9" direction="none" color="none"/>
<grayblock y="4" x="14" direction="none" color="none"/>
<grayblock y="5" x="15" direction="none" color="none"/>
<grayblock y="4" x="3" direction="none" color="none"/>
<grayblock y="5" x="2" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="red"/>
<grayblock y="7" x="10" direction="none" color="red"/>
<grayblock y="7" x="12" direction="none" color="red"/>
<grayblock y="8" x="7" direction="none" color="red"/>
<grayblock y="4" x="5" direction="none" color="green"/>
<grayblock y="4" x="7" direction="none" color="green"/>
<grayblock y="5" x="9" direction="none" color="green"/>
<grayblock y="3" x="10" direction="none" color="green"/>
<colorblock y="2" x="8" color="red"/>
<colorblock y="2" x="9" color="red"/>
<colorblock y="5" x="14" color="red"/>
<colorblock y="6" x="14" color="red"/>
<colorblock y="5" x="3" color="green"/>
<colorblock y="6" x="3" color="green"/>
<colorblock y="9" x="8" color="green"/>
<colorblock y="9" x="9" color="green"/>
</level>
;
break;
case 19:
_local2 = <level>
<blackblock y="3" x="16"/>
<blackblock y="4" x="16"/>
<blackblock y="5" x="16"/>
<blackblock y="6" x="16"/>
<blackblock y="7" x="16"/>
<blackblock y="8" x="16"/>
<blackblock y="8" x="1"/>
<blackblock y="7" x="1"/>
<blackblock y="6" x="1"/>
<blackblock y="5" x="1"/>
<blackblock y="4" x="1"/>
<blackblock y="3" x="1"/>
<blackblock y="9" x="3"/>
<blackblock y="2" x="3"/>
<blackblock y="3" x="4"/>
<blackblock y="3" x="5"/>
<blackblock y="3" x="6"/>
<blackblock y="8" x="4"/>
<blackblock y="8" x="5"/>
<blackblock y="8" x="6"/>
<blackblock y="9" x="7"/>
<blackblock y="10" x="8"/>
<blackblock y="10" x="9"/>
<blackblock y="9" x="10"/>
<blackblock y="2" x="7"/>
<blackblock y="1" x="8"/>
<blackblock y="1" x="9"/>
<blackblock y="2" x="10"/>
<blackblock y="3" x="11"/>
<blackblock y="3" x="12"/>
<blackblock y="3" x="13"/>
<blackblock y="2" x="14"/>
<blackblock y="9" x="14"/>
<blackblock y="8" x="13"/>
<blackblock y="8" x="12"/>
<blackblock y="8" x="11"/>
<blackblock y="2" x="15"/>
<blackblock y="2" x="2"/>
<blackblock y="9" x="15"/>
<blackblock y="9" x="2"/>
<grayblock y="10" x="9" direction="none" color="none"/>
<grayblock y="9" x="9" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="9" x="8" direction="none" color="none"/>
<grayblock y="10" x="8" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="1" x="8" direction="none" color="none"/>
<grayblock y="1" x="9" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="8" x="4" direction="none" color="none"/>
<grayblock y="8" x="13" direction="none" color="none"/>
<grayblock y="9" x="3" direction="none" color="none"/>
<grayblock y="7" x="3" direction="none" color="none"/>
<grayblock y="6" x="3" direction="none" color="none"/>
<grayblock y="4" x="3" direction="none" color="none"/>
<grayblock y="3" x="3" direction="none" color="none"/>
<grayblock y="2" x="3" direction="none" color="none"/>
<grayblock y="3" x="2" direction="none" color="none"/>
<grayblock y="4" x="2" direction="none" color="none"/>
<grayblock y="5" x="2" direction="none" color="none"/>
<grayblock y="6" x="2" direction="none" color="none"/>
<grayblock y="7" x="2" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="2" x="14" direction="none" color="none"/>
<grayblock y="3" x="14" direction="none" color="none"/>
<grayblock y="4" x="14" direction="none" color="none"/>
<grayblock y="6" x="14" direction="none" color="none"/>
<grayblock y="7" x="14" direction="none" color="none"/>
<grayblock y="9" x="14" direction="none" color="none"/>
<grayblock y="7" x="15" direction="none" color="none"/>
<grayblock y="6" x="15" direction="none" color="none"/>
<grayblock y="5" x="15" direction="none" color="none"/>
<grayblock y="4" x="15" direction="none" color="none"/>
<grayblock y="3" x="15" direction="none" color="none"/>
<grayblock y="3" x="1" direction="none" color="none"/>
<grayblock y="4" x="1" direction="none" color="none"/>
<grayblock y="5" x="1" direction="none" color="none"/>
<grayblock y="6" x="1" direction="none" color="none"/>
<grayblock y="7" x="1" direction="none" color="none"/>
<grayblock y="8" x="1" direction="none" color="none"/>
<grayblock y="8" x="16" direction="none" color="none"/>
<grayblock y="7" x="16" direction="none" color="none"/>
<grayblock y="6" x="16" direction="none" color="none"/>
<grayblock y="5" x="16" direction="none" color="none"/>
<grayblock y="4" x="16" direction="none" color="none"/>
<grayblock y="3" x="16" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="blue"/>
<grayblock y="8" x="7" direction="none" color="blue"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="5" x="14" direction="none" color="none"/>
<grayblock y="5" x="3" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="black"/>
<grayblock y="6" x="10" direction="none" color="black"/>
<grayblock y="8" x="3" direction="none" color="yellow"/>
<grayblock y="3" x="7" direction="none" color="yellow"/>
<grayblock y="2" x="8" direction="none" color="yellow"/>
<grayblock y="2" x="9" direction="none" color="yellow"/>
<grayblock y="3" x="10" direction="none" color="yellow"/>
<grayblock y="8" x="14" direction="none" color="yellow"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="2" x="15" direction="none" color="none"/>
<grayblock y="2" x="2" direction="none" color="none"/>
<grayblock y="8" x="15" direction="none" color="black"/>
<grayblock y="8" x="2" direction="none" color="black"/>
<grayblock y="9" x="15" direction="none" color="none"/>
<grayblock y="9" x="2" direction="none" color="none"/>
<colorblock y="4" x="8" color="blue"/>
<colorblock y="4" x="9" color="blue"/>
<colorblock y="8" x="8" color="yellow"/>
<colorblock y="8" x="9" color="yellow"/>
<colorblock y="5" x="12" color="yellow"/>
<colorblock y="6" x="13" color="yellow"/>
<colorblock y="6" x="4" color="yellow"/>
<colorblock y="5" x="5" color="yellow"/>
</level>
;
break;
case 20:
_local2 = <level>
<blackblock y="3" x="3"/>
<blackblock y="4" x="2"/>
<blackblock y="5" x="2"/>
<blackblock y="6" x="2"/>
<blackblock y="7" x="2"/>
<blackblock y="8" x="14"/>
<blackblock y="3" x="14"/>
<blackblock y="4" x="15"/>
<blackblock y="5" x="15"/>
<blackblock y="6" x="15"/>
<blackblock y="7" x="15"/>
<blackblock y="8" x="3"/>
<blackblock y="8" x="10"/>
<blackblock y="8" x="9"/>
<blackblock y="8" x="8"/>
<blackblock y="8" x="7"/>
<blackblock y="3" x="7"/>
<blackblock y="3" x="8"/>
<blackblock y="3" x="9"/>
<blackblock y="3" x="10"/>
<blackblock y="5" x="5"/>
<blackblock y="6" x="5"/>
<blackblock y="5" x="12"/>
<blackblock y="6" x="12"/>
<blackblock y="2" x="4"/>
<blackblock y="1" x="5"/>
<blackblock y="2" x="6"/>
<blackblock y="2" x="11"/>
<blackblock y="1" x="12"/>
<blackblock y="2" x="13"/>
<blackblock y="9" x="13"/>
<blackblock y="10" x="12"/>
<blackblock y="9" x="11"/>
<blackblock y="9" x="6"/>
<blackblock y="10" x="5"/>
<blackblock y="9" x="4"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="8" x="14" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="3" x="14" direction="none" color="none"/>
<grayblock y="5" x="14" direction="none" color="none"/>
<grayblock y="6" x="14" direction="none" color="none"/>
<grayblock y="7" x="15" direction="none" color="none"/>
<grayblock y="6" x="15" direction="none" color="none"/>
<grayblock y="5" x="15" direction="none" color="none"/>
<grayblock y="4" x="15" direction="none" color="none"/>
<grayblock y="3" x="3" direction="none" color="none"/>
<grayblock y="6" x="3" direction="none" color="none"/>
<grayblock y="4" x="2" direction="none" color="none"/>
<grayblock y="5" x="2" direction="none" color="none"/>
<grayblock y="6" x="2" direction="none" color="none"/>
<grayblock y="7" x="2" direction="none" color="none"/>
<grayblock y="8" x="3" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="none"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="7" x="14" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="7" x="3" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="green"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="green"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="black"/>
<grayblock y="5" x="9" direction="none" color="black"/>
<grayblock y="4" x="14" direction="none" color="red"/>
<grayblock y="4" x="3" direction="none" color="red"/>
<grayblock y="5" x="3" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="8" x="13" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="8" x="4" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="9" x="4" direction="none" color="none"/>
<grayblock y="9" x="6" direction="none" color="none"/>
<grayblock y="9" x="13" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="2" x="4" direction="none" color="none"/>
<grayblock y="2" x="6" direction="none" color="none"/>
<grayblock y="2" x="11" direction="none" color="none"/>
<grayblock y="2" x="13" direction="none" color="none"/>
<grayblock y="1" x="12" direction="none" color="none"/>
<grayblock y="1" x="5" direction="none" color="none"/>
<grayblock y="10" x="5" direction="none" color="none"/>
<grayblock y="10" x="12" direction="none" color="none"/>
<grayblock y="2" x="5" direction="none" color="black"/>
<grayblock y="2" x="12" direction="none" color="black"/>
<grayblock y="9" x="12" direction="none" color="black"/>
<grayblock y="9" x="5" direction="none" color="black"/>
<grayblock y="5" x="6" direction="none" color="pink"/>
<grayblock y="7" x="6" direction="none" color="pink"/>
<grayblock y="7" x="8" direction="none" color="yellow"/>
<grayblock y="7" x="9" direction="none" color="yellow"/>
<colorblock y="5" x="7" color="green"/>
<colorblock y="6" x="7" color="green"/>
<colorblock y="7" x="12" color="red"/>
<colorblock y="7" x="5" color="red"/>
<colorblock y="5" x="10" color="pink"/>
<colorblock y="6" x="10" color="pink"/>
<colorblock y="4" x="12" color="yellow"/>
<colorblock y="4" x="5" color="yellow"/>
</level>
;
break;
case 21:
_local2 = <level>
<blackblock y="8" x="3"/>
<blackblock y="9" x="4"/>
<blackblock y="10" x="5"/>
<blackblock y="10" x="12"/>
<blackblock y="9" x="13"/>
<blackblock y="8" x="14"/>
<blackblock y="7" x="3"/>
<blackblock y="5" x="3"/>
<blackblock y="4" x="3"/>
<blackblock y="3" x="4"/>
<blackblock y="2" x="5"/>
<blackblock y="2" x="6"/>
<blackblock y="2" x="12"/>
<blackblock y="3" x="13"/>
<blackblock y="4" x="14"/>
<blackblock y="5" x="14"/>
<blackblock y="7" x="14"/>
<blackblock y="6" x="3"/>
<blackblock y="6" x="14"/>
<blackblock y="10" x="11"/>
<blackblock y="10" x="6"/>
<blackblock y="2" x="11"/>
<blackblock y="9" x="6"/>
<blackblock y="9" x="7"/>
<blackblock y="9" x="8"/>
<blackblock y="9" x="9"/>
<blackblock y="9" x="10"/>
<blackblock y="9" x="11"/>
<blackblock y="2" x="10"/>
<blackblock y="3" x="9"/>
<blackblock y="3" x="8"/>
<blackblock y="2" x="7"/>
<blackblock y="6" x="7"/>
<blackblock y="7" x="7"/>
<blackblock y="6" x="10"/>
<blackblock y="7" x="10"/>
<grayblock y="9" x="4" direction="none" color="none"/>
<grayblock y="10" x="5" direction="none" color="none"/>
<grayblock y="10" x="12" direction="none" color="none"/>
<grayblock y="9" x="13" direction="none" color="none"/>
<grayblock y="8" x="14" direction="none" color="none"/>
<grayblock y="8" x="3" direction="none" color="none"/>
<grayblock y="7" x="14" direction="none" color="none"/>
<grayblock y="7" x="3" direction="none" color="none"/>
<grayblock y="5" x="14" direction="none" color="none"/>
<grayblock y="5" x="3" direction="none" color="none"/>
<grayblock y="4" x="3" direction="none" color="none"/>
<grayblock y="4" x="14" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="2" x="12" direction="none" color="none"/>
<grayblock y="2" x="5" direction="none" color="none"/>
<grayblock y="2" x="6" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="6" x="14" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="10" x="11" direction="none" color="none"/>
<grayblock y="10" x="6" direction="none" color="none"/>
<grayblock y="2" x="11" direction="none" color="none"/>
<grayblock y="9" x="9" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="6" x="3" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="9" x="6" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="9" x="8" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="black"/>
<grayblock y="3" x="12" direction="none" color="black"/>
<grayblock y="8" x="5" direction="down" color="none"/>
<grayblock y="8" x="12" direction="down" color="none"/>
<grayblock y="8" x="13" direction="none" color="yellow"/>
<grayblock y="8" x="4" direction="none" color="yellow"/>
<grayblock y="8" x="6" direction="none" color="pink"/>
<grayblock y="8" x="11" direction="none" color="red"/>
<grayblock y="6" x="4" direction="none" color="pink"/>
<grayblock y="8" x="8" direction="left" color="none"/>
<grayblock y="8" x="9" direction="right" color="none"/>
<grayblock y="6" x="13" direction="none" color="red"/>
<grayblock y="9" x="12" direction="none" color="green"/>
<grayblock y="9" x="5" direction="none" color="green"/>
<colorblock y="3" x="7" color="green"/>
<colorblock y="3" x="10" color="green"/>
<colorblock y="5" x="10" color="yellow"/>
<colorblock y="5" x="7" color="yellow"/>
<colorblock y="6" x="8" color="pink"/>
<colorblock y="7" x="9" color="pink"/>
<colorblock y="7" x="8" color="red"/>
<colorblock y="6" x="9" color="red"/>
</level>
;
break;
case 22:
_local2 = <level>
<blackblock y="1" x="4"/>
<blackblock y="1" x="5"/>
<blackblock y="1" x="6"/>
<blackblock y="1" x="7"/>
<blackblock y="1" x="8"/>
<blackblock y="1" x="9"/>
<blackblock y="1" x="10"/>
<blackblock y="1" x="11"/>
<blackblock y="1" x="12"/>
<blackblock y="1" x="13"/>
<blackblock y="10" x="13"/>
<blackblock y="10" x="12"/>
<blackblock y="10" x="11"/>
<blackblock y="10" x="10"/>
<blackblock y="10" x="9"/>
<blackblock y="10" x="8"/>
<blackblock y="10" x="7"/>
<blackblock y="10" x="6"/>
<blackblock y="10" x="5"/>
<blackblock y="10" x="4"/>
<blackblock y="3" x="15"/>
<blackblock y="3" x="2"/>
<blackblock y="8" x="2"/>
<blackblock y="8" x="15"/>
<blackblock y="7" x="6"/>
<blackblock y="4" x="6"/>
<blackblock y="4" x="11"/>
<blackblock y="7" x="11"/>
<blackblock y="5" x="10"/>
<blackblock y="6" x="10"/>
<blackblock y="5" x="7"/>
<blackblock y="6" x="7"/>
<blackblock y="4" x="2"/>
<blackblock y="5" x="2"/>
<blackblock y="6" x="2"/>
<blackblock y="7" x="2"/>
<blackblock y="4" x="15"/>
<blackblock y="5" x="15"/>
<blackblock y="6" x="15"/>
<blackblock y="7" x="15"/>
<blackblock y="5" x="5"/>
<blackblock y="5" x="12"/>
<blackblock y="6" x="12"/>
<blackblock y="6" x="5"/>
<blackblock y="3" x="9"/>
<blackblock y="3" x="8"/>
<blackblock y="2" x="14"/>
<blackblock y="2" x="3"/>
<blackblock y="9" x="15"/>
<blackblock y="10" x="14"/>
<blackblock y="10" x="3"/>
<blackblock y="9" x="2"/>
<grayblock y="1" x="6" direction="none" color="none"/>
<grayblock y="1" x="7" direction="none" color="none"/>
<grayblock y="1" x="8" direction="none" color="none"/>
<grayblock y="1" x="9" direction="none" color="none"/>
<grayblock y="1" x="10" direction="none" color="none"/>
<grayblock y="1" x="11" direction="none" color="none"/>
<grayblock y="1" x="12" direction="none" color="none"/>
<grayblock y="1" x="13" direction="none" color="none"/>
<grayblock y="1" x="5" direction="none" color="none"/>
<grayblock y="1" x="4" direction="none" color="none"/>
<grayblock y="10" x="13" direction="none" color="none"/>
<grayblock y="10" x="12" direction="none" color="none"/>
<grayblock y="10" x="11" direction="none" color="none"/>
<grayblock y="10" x="10" direction="none" color="none"/>
<grayblock y="10" x="9" direction="none" color="none"/>
<grayblock y="10" x="8" direction="none" color="none"/>
<grayblock y="10" x="7" direction="none" color="none"/>
<grayblock y="10" x="6" direction="none" color="none"/>
<grayblock y="10" x="5" direction="none" color="none"/>
<grayblock y="10" x="4" direction="none" color="none"/>
<grayblock y="9" x="4" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="3" x="15" direction="none" color="none"/>
<grayblock y="8" x="2" direction="none" color="none"/>
<grayblock y="2" x="12" direction="none" color="none"/>
<grayblock y="3" x="2" direction="none" color="none"/>
<grayblock y="2" x="5" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="9" x="13" direction="none" color="none"/>
<grayblock y="8" x="15" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="7" x="14" direction="none" color="none"/>
<grayblock y="5" x="14" direction="none" color="none"/>
<grayblock y="4" x="14" direction="none" color="none"/>
<grayblock y="4" x="15" direction="none" color="none"/>
<grayblock y="5" x="15" direction="none" color="none"/>
<grayblock y="6" x="15" direction="none" color="none"/>
<grayblock y="5" x="3" direction="none" color="none"/>
<grayblock y="4" x="3" direction="none" color="none"/>
<grayblock y="4" x="2" direction="none" color="none"/>
<grayblock y="5" x="2" direction="none" color="none"/>
<grayblock y="6" x="2" direction="none" color="none"/>
<grayblock y="7" x="2" direction="none" color="none"/>
<grayblock y="7" x="15" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="6" x="14" direction="none" color="none"/>
<grayblock y="7" x="3" direction="none" color="none"/>
<grayblock y="6" x="3" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="2" x="13" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="8" x="14" direction="none" color="none"/>
<grayblock y="8" x="13" direction="none" color="none"/>
<grayblock y="9" x="12" direction="none" color="none"/>
<grayblock y="8" x="4" direction="none" color="none"/>
<grayblock y="2" x="4" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="2" x="9" direction="none" color="none"/>
<grayblock y="2" x="8" direction="none" color="none"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="9" x="5" direction="none" color="none"/>
<grayblock y="9" x="6" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="9" x="8" direction="none" color="none"/>
<grayblock y="9" x="9" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="none"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="8" x="3" direction="none" color="none"/>
<grayblock y="2" x="14" direction="none" color="none"/>
<grayblock y="2" x="3" direction="none" color="none"/>
<grayblock y="9" x="15" direction="none" color="none"/>
<grayblock y="10" x="14" direction="none" color="none"/>
<grayblock y="10" x="3" direction="none" color="none"/>
<grayblock y="9" x="2" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="3" x="3" direction="down" color="none"/>
<grayblock y="3" x="14" direction="down" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="red"/>
<grayblock y="9" x="3" direction="none" color="red"/>
<grayblock y="7" x="13" direction="none" color="green"/>
<grayblock y="2" x="6" direction="none" color="green"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="2" x="11" direction="none" color="yellow"/>
<grayblock y="7" x="4" direction="none" color="yellow"/>
<grayblock y="5" x="13" direction="none" color="blue"/>
<grayblock y="9" x="14" direction="none" color="blue"/>
<colorblock y="8" x="6" color="red"/>
<colorblock y="8" x="5" color="red"/>
<colorblock y="2" x="10" color="green"/>
<colorblock y="3" x="12" color="green"/>
<colorblock y="2" x="7" color="yellow"/>
<colorblock y="3" x="5" color="yellow"/>
<colorblock y="8" x="12" color="blue"/>
<colorblock y="8" x="11" color="blue"/>
</level>
;
break;
case 23:
_local2 = <level>
<blackblock y="2" x="13"/>
<blackblock y="2" x="12"/>
<blackblock y="2" x="11"/>
<blackblock y="2" x="6"/>
<blackblock y="2" x="5"/>
<blackblock y="2" x="4"/>
<blackblock y="3" x="3"/>
<blackblock y="8" x="14"/>
<blackblock y="3" x="14"/>
<blackblock y="9" x="13"/>
<blackblock y="9" x="12"/>
<blackblock y="9" x="11"/>
<blackblock y="9" x="6"/>
<blackblock y="9" x="5"/>
<blackblock y="9" x="4"/>
<blackblock y="8" x="3"/>
<blackblock y="3" x="7"/>
<blackblock y="4" x="8"/>
<blackblock y="4" x="9"/>
<blackblock y="3" x="10"/>
<blackblock y="8" x="10"/>
<blackblock y="7" x="9"/>
<blackblock y="7" x="8"/>
<blackblock y="8" x="7"/>
<blackblock y="4" x="1"/>
<blackblock y="5" x="1"/>
<blackblock y="6" x="1"/>
<blackblock y="7" x="1"/>
<blackblock y="4" x="16"/>
<blackblock y="5" x="16"/>
<blackblock y="6" x="16"/>
<blackblock y="7" x="16"/>
<blackblock y="8" x="15"/>
<blackblock y="3" x="15"/>
<blackblock y="3" x="2"/>
<blackblock y="8" x="2"/>
<blackblock y="5" x="3"/>
<blackblock y="6" x="3"/>
<blackblock y="5" x="14"/>
<blackblock y="6" x="14"/>
<grayblock y="2" x="11" direction="none" color="none"/>
<grayblock y="2" x="12" direction="none" color="none"/>
<grayblock y="2" x="6" direction="none" color="none"/>
<grayblock y="2" x="5" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="2" x="13" direction="none" color="none"/>
<grayblock y="8" x="14" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="9" x="12" direction="none" color="none"/>
<grayblock y="9" x="13" direction="none" color="none"/>
<grayblock y="9" x="6" direction="none" color="none"/>
<grayblock y="9" x="5" direction="none" color="none"/>
<grayblock y="3" x="14" direction="none" color="none"/>
<grayblock y="3" x="3" direction="none" color="none"/>
<grayblock y="2" x="4" direction="none" color="none"/>
<grayblock y="9" x="4" direction="none" color="none"/>
<grayblock y="8" x="3" direction="none" color="none"/>
<grayblock y="8" x="13" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="8" x="4" direction="none" color="none"/>
<grayblock y="4" x="14" direction="none" color="none"/>
<grayblock y="5" x="14" direction="none" color="none"/>
<grayblock y="6" x="14" direction="none" color="none"/>
<grayblock y="7" x="14" direction="none" color="none"/>
<grayblock y="7" x="3" direction="none" color="none"/>
<grayblock y="6" x="3" direction="none" color="none"/>
<grayblock y="5" x="3" direction="none" color="none"/>
<grayblock y="4" x="3" direction="none" color="none"/>
<grayblock y="5" x="15" direction="none" color="none"/>
<grayblock y="6" x="15" direction="none" color="none"/>
<grayblock y="7" x="16" direction="none" color="none"/>
<grayblock y="6" x="16" direction="none" color="none"/>
<grayblock y="5" x="16" direction="none" color="none"/>
<grayblock y="4" x="16" direction="none" color="none"/>
<grayblock y="7" x="1" direction="none" color="none"/>
<grayblock y="6" x="1" direction="none" color="none"/>
<grayblock y="5" x="1" direction="none" color="none"/>
<grayblock y="4" x="1" direction="none" color="none"/>
<grayblock y="5" x="2" direction="none" color="none"/>
<grayblock y="6" x="2" direction="none" color="none"/>
<grayblock y="3" x="2" direction="none" color="none"/>
<grayblock y="8" x="2" direction="none" color="none"/>
<grayblock y="3" x="15" direction="none" color="none"/>
<grayblock y="8" x="15" direction="none" color="none"/>
<grayblock y="7" x="15" direction="none" color="black"/>
<grayblock y="4" x="2" direction="none" color="black"/>
<grayblock y="7" x="11" direction="none" color="pink"/>
<grayblock y="7" x="13" direction="none" color="pink"/>
<grayblock y="4" x="4" direction="none" color="pink"/>
<grayblock y="4" x="6" direction="none" color="pink"/>
<grayblock y="4" x="15" direction="none" color="yellow"/>
<grayblock y="7" x="2" direction="none" color="yellow"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="green"/>
<grayblock y="4" x="13" direction="none" color="green"/>
<grayblock y="7" x="4" direction="none" color="green"/>
<grayblock y="7" x="6" direction="none" color="green"/>
<colorblock y="6" x="9" color="pink"/>
<colorblock y="6" x="10" color="pink"/>
<colorblock y="5" x="8" color="pink"/>
<colorblock y="5" x="7" color="pink"/>
<colorblock y="7" x="10" color="yellow"/>
<colorblock y="4" x="7" color="yellow"/>
<colorblock y="6" x="7" color="green"/>
<colorblock y="6" x="8" color="green"/>
<colorblock y="5" x="9" color="green"/>
<colorblock y="5" x="10" color="green"/>
</level>
;
break;
case 24:
_local2 = <level>
<blackblock y="1" x="4"/>
<blackblock y="1" x="5"/>
<blackblock y="1" x="6"/>
<blackblock y="1" x="7"/>
<blackblock y="1" x="8"/>
<blackblock y="1" x="9"/>
<blackblock y="1" x="10"/>
<blackblock y="1" x="11"/>
<blackblock y="1" x="12"/>
<blackblock y="1" x="13"/>
<blackblock y="4" x="15"/>
<blackblock y="4" x="14"/>
<blackblock y="4" x="13"/>
<blackblock y="4" x="12"/>
<blackblock y="4" x="2"/>
<blackblock y="4" x="3"/>
<blackblock y="4" x="4"/>
<blackblock y="4" x="5"/>
<blackblock y="7" x="15"/>
<blackblock y="7" x="12"/>
<blackblock y="7" x="13"/>
<blackblock y="7" x="14"/>
<blackblock y="10" x="13"/>
<blackblock y="10" x="12"/>
<blackblock y="10" x="11"/>
<blackblock y="10" x="10"/>
<blackblock y="10" x="9"/>
<blackblock y="10" x="8"/>
<blackblock y="10" x="7"/>
<blackblock y="10" x="6"/>
<blackblock y="10" x="5"/>
<blackblock y="10" x="4"/>
<blackblock y="7" x="2"/>
<blackblock y="7" x="3"/>
<blackblock y="7" x="4"/>
<blackblock y="7" x="5"/>
<blackblock y="6" x="6"/>
<blackblock y="5" x="6"/>
<blackblock y="5" x="11"/>
<blackblock y="6" x="11"/>
<blackblock y="5" x="7"/>
<blackblock y="6" x="10"/>
<blackblock y="9" x="9"/>
<blackblock y="2" x="8"/>
<blackblock y="2" x="10"/>
<blackblock y="9" x="7"/>
<blackblock y="5" x="15"/>
<blackblock y="6" x="15"/>
<blackblock y="5" x="2"/>
<blackblock y="6" x="2"/>
<blackblock y="2" x="3"/>
<blackblock y="3" x="3"/>
<blackblock y="2" x="14"/>
<blackblock y="3" x="14"/>
<blackblock y="8" x="3"/>
<blackblock y="9" x="3"/>
<blackblock y="8" x="14"/>
<blackblock y="9" x="14"/>
<grayblock y="6" x="7" direction="none" color="none"/>
<grayblock y="6" x="10" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="2" x="12" direction="none" color="none"/>
<grayblock y="2" x="5" direction="none" color="none"/>
<grayblock y="1" x="6" direction="none" color="none"/>
<grayblock y="1" x="7" direction="none" color="none"/>
<grayblock y="1" x="8" direction="none" color="none"/>
<grayblock y="1" x="9" direction="none" color="none"/>
<grayblock y="1" x="10" direction="none" color="none"/>
<grayblock y="1" x="11" direction="none" color="none"/>
<grayblock y="1" x="12" direction="none" color="none"/>
<grayblock y="1" x="13" direction="none" color="none"/>
<grayblock y="3" x="14" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="2" x="13" direction="none" color="none"/>
<grayblock y="2" x="14" direction="none" color="none"/>
<grayblock y="1" x="5" direction="none" color="none"/>
<grayblock y="1" x="4" direction="none" color="none"/>
<grayblock y="2" x="3" direction="none" color="none"/>
<grayblock y="2" x="4" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="7" x="2" direction="none" color="none"/>
<grayblock y="7" x="3" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="7" x="14" direction="none" color="none"/>
<grayblock y="7" x="15" direction="none" color="none"/>
<grayblock y="10" x="13" direction="none" color="none"/>
<grayblock y="10" x="12" direction="none" color="none"/>
<grayblock y="10" x="11" direction="none" color="none"/>
<grayblock y="10" x="10" direction="none" color="none"/>
<grayblock y="10" x="9" direction="none" color="none"/>
<grayblock y="10" x="8" direction="none" color="none"/>
<grayblock y="10" x="7" direction="none" color="none"/>
<grayblock y="10" x="6" direction="none" color="none"/>
<grayblock y="10" x="5" direction="none" color="none"/>
<grayblock y="10" x="4" direction="none" color="none"/>
<grayblock y="8" x="3" direction="none" color="none"/>
<grayblock y="8" x="4" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="9" x="14" direction="none" color="none"/>
<grayblock y="9" x="13" direction="none" color="none"/>
<grayblock y="9" x="12" direction="none" color="none"/>
<grayblock y="9" x="5" direction="none" color="none"/>
<grayblock y="9" x="4" direction="none" color="none"/>
<grayblock y="9" x="3" direction="none" color="none"/>
<grayblock y="4" x="2" direction="none" color="none"/>
<grayblock y="4" x="3" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="4" x="14" direction="none" color="none"/>
<grayblock y="4" x="15" direction="none" color="none"/>
<grayblock y="8" x="13" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="2" x="8" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<grayblock y="2" x="10" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="9" x="7" direction="none" color="none"/>
<grayblock y="9" x="9" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="9" x="8" direction="none" color="red"/>
<grayblock y="2" x="9" direction="none" color="red"/>
<grayblock y="9" x="11" direction="none" color="red"/>
<grayblock y="2" x="6" direction="none" color="red"/>
<grayblock y="2" x="7" direction="none" color="none"/>
<grayblock y="2" x="11" direction="none" color="none"/>
<grayblock y="9" x="6" direction="none" color="none"/>
<grayblock y="5" x="2" direction="none" color="none"/>
<grayblock y="6" x="2" direction="none" color="none"/>
<grayblock y="5" x="15" direction="none" color="none"/>
<grayblock y="6" x="15" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="green"/>
<grayblock y="6" x="8" direction="none" color="green"/>
<grayblock y="8" x="14" direction="none" color="yellow"/>
<grayblock y="3" x="5" direction="none" color="yellow"/>
<grayblock y="3" x="3" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="yellow"/>
<colorblock y="4" x="11" color="red"/>
<colorblock y="4" x="6" color="red"/>
<colorblock y="7" x="6" color="red"/>
<colorblock y="7" x="11" color="red"/>
<colorblock y="2" x="11" color="yellow"/>
<colorblock y="9" x="6" color="yellow"/>
<colorblock y="3" x="4" color="green"/>
<colorblock y="8" x="13" color="green"/>
</level>
;
break;
case 25:
_local2 = <level>
<blackblock y="1" x="7"/>
<blackblock y="1" x="6"/>
<blackblock y="1" x="5"/>
<blackblock y="1" x="4"/>
<blackblock y="2" x="2"/>
<blackblock y="3" x="1"/>
<blackblock y="4" x="1"/>
<blackblock y="5" x="2"/>
<blackblock y="6" x="2"/>
<blackblock y="7" x="1"/>
<blackblock y="8" x="1"/>
<blackblock y="9" x="2"/>
<blackblock y="10" x="3"/>
<blackblock y="10" x="4"/>
<blackblock y="10" x="5"/>
<blackblock y="10" x="6"/>
<blackblock y="10" x="7"/>
<blackblock y="9" x="8"/>
<blackblock y="9" x="9"/>
<blackblock y="2" x="8"/>
<blackblock y="2" x="9"/>
<blackblock y="1" x="10"/>
<blackblock y="1" x="11"/>
<blackblock y="1" x="12"/>
<blackblock y="1" x="13"/>
<blackblock y="2" x="15"/>
<blackblock y="3" x="16"/>
<blackblock y="4" x="16"/>
<blackblock y="5" x="15"/>
<blackblock y="6" x="15"/>
<blackblock y="7" x="16"/>
<blackblock y="8" x="16"/>
<blackblock y="9" x="15"/>
<blackblock y="10" x="14"/>
<blackblock y="10" x="13"/>
<blackblock y="10" x="12"/>
<blackblock y="10" x="11"/>
<blackblock y="10" x="10"/>
<blackblock y="6" x="8"/>
<blackblock y="6" x="9"/>
<blackblock y="5" x="9"/>
<blackblock y="5" x="8"/>
<blackblock y="2" x="14"/>
<blackblock y="2" x="3"/>
<grayblock y="3" x="9" direction="none" color="none"/>
<grayblock y="3" x="8" direction="none" color="none"/>
<grayblock y="3" x="7" direction="none" color="none"/>
<grayblock y="3" x="6" direction="none" color="none"/>
<grayblock y="2" x="2" direction="none" color="none"/>
<grayblock y="1" x="13" direction="none" color="none"/>
<grayblock y="1" x="12" direction="none" color="none"/>
<grayblock y="1" x="11" direction="none" color="none"/>
<grayblock y="1" x="10" direction="none" color="none"/>
<grayblock y="1" x="7" direction="none" color="none"/>
<grayblock y="1" x="6" direction="none" color="none"/>
<grayblock y="1" x="5" direction="none" color="none"/>
<grayblock y="1" x="4" direction="none" color="none"/>
<grayblock y="8" x="1" direction="none" color="none"/>
<grayblock y="10" x="5" direction="none" color="none"/>
<grayblock y="10" x="6" direction="none" color="none"/>
<grayblock y="10" x="7" direction="none" color="none"/>
<grayblock y="10" x="10" direction="none" color="none"/>
<grayblock y="10" x="11" direction="none" color="none"/>
<grayblock y="10" x="12" direction="none" color="none"/>
<grayblock y="10" x="13" direction="none" color="none"/>
<grayblock y="10" x="14" direction="none" color="none"/>
<grayblock y="8" x="16" direction="none" color="none"/>
<grayblock y="7" x="16" direction="none" color="none"/>
<grayblock y="4" x="16" direction="none" color="none"/>
<grayblock y="3" x="16" direction="none" color="none"/>
<grayblock y="2" x="15" direction="none" color="none"/>
<grayblock y="2" x="13" direction="none" color="none"/>
<grayblock y="2" x="11" direction="none" color="none"/>
<grayblock y="3" x="2" direction="none" color="none"/>
<grayblock y="3" x="1" direction="none" color="none"/>
<grayblock y="4" x="1" direction="none" color="none"/>
<grayblock y="7" x="1" direction="none" color="none"/>
<grayblock y="5" x="2" direction="none" color="none"/>
<grayblock y="6" x="2" direction="none" color="none"/>
<grayblock y="8" x="2" direction="none" color="none"/>
<grayblock y="9" x="2" direction="none" color="none"/>
<grayblock y="10" x="3" direction="none" color="none"/>
<grayblock y="8" x="3" direction="none" color="none"/>
<grayblock y="5" x="4" direction="none" color="none"/>
<grayblock y="6" x="4" direction="none" color="none"/>
<grayblock y="10" x="4" direction="none" color="none"/>
<grayblock y="9" x="4" direction="none" color="none"/>
<grayblock y="7" x="5" direction="none" color="none"/>
<grayblock y="9" x="15" direction="none" color="none"/>
<grayblock y="9" x="13" direction="none" color="none"/>
<grayblock y="9" x="11" direction="none" color="none"/>
<grayblock y="9" x="6" direction="none" color="none"/>
<grayblock y="8" x="15" direction="none" color="none"/>
<grayblock y="6" x="15" direction="none" color="none"/>
<grayblock y="5" x="15" direction="none" color="none"/>
<grayblock y="3" x="15" direction="none" color="none"/>
<grayblock y="3" x="14" direction="none" color="none"/>
<grayblock y="3" x="11" direction="none" color="none"/>
<grayblock y="3" x="10" direction="none" color="none"/>
<grayblock y="4" x="13" direction="none" color="none"/>
<grayblock y="4" x="14" direction="none" color="none"/>
<grayblock y="6" x="13" direction="none" color="none"/>
<grayblock y="5" x="13" direction="none" color="none"/>
<grayblock y="8" x="10" direction="none" color="none"/>
<grayblock y="7" x="6" direction="none" color="none"/>
<grayblock y="7" x="7" direction="none" color="none"/>
<grayblock y="6" x="12" direction="none" color="none"/>
<grayblock y="6" x="5" direction="none" color="none"/>
<grayblock y="5" x="5" direction="none" color="none"/>
<grayblock y="5" x="6" direction="none" color="none"/>
<grayblock y="5" x="11" direction="none" color="none"/>
<grayblock y="5" x="12" direction="none" color="none"/>
<grayblock y="2" x="9" direction="none" color="none"/>
<grayblock y="2" x="8" direction="none" color="none"/>
<grayblock y="9" x="8" direction="none" color="none"/>
<grayblock y="9" x="9" direction="none" color="none"/>
<grayblock y="2" x="6" direction="none" color="none"/>
<grayblock y="2" x="4" direction="none" color="none"/>
<grayblock y="7" x="8" direction="none" color="none"/>
<grayblock y="6" x="6" direction="none" color="none"/>
<grayblock y="7" x="2" direction="none" color="none"/>
<grayblock y="4" x="8" direction="none" color="none"/>
<grayblock y="5" x="10" direction="none" color="none"/>
<grayblock y="6" x="11" direction="none" color="none"/>
<grayblock y="3" x="13" direction="none" color="none"/>
<grayblock y="3" x="12" direction="none" color="none"/>
<grayblock y="4" x="12" direction="none" color="none"/>
<grayblock y="4" x="11" direction="none" color="none"/>
<grayblock y="4" x="10" direction="none" color="none"/>
<grayblock y="4" x="9" direction="none" color="none"/>
<grayblock y="6" x="8" direction="none" color="none"/>
<grayblock y="6" x="9" direction="none" color="none"/>
<grayblock y="5" x="9" direction="none" color="none"/>
<grayblock y="5" x="8" direction="none" color="none"/>
<grayblock y="5" x="7" direction="none" color="none"/>
<grayblock y="4" x="7" direction="none" color="none"/>
<grayblock y="4" x="6" direction="none" color="none"/>
<grayblock y="4" x="5" direction="none" color="none"/>
<grayblock y="3" x="5" direction="none" color="none"/>
<grayblock y="3" x="4" direction="none" color="none"/>
<grayblock y="4" x="4" direction="none" color="none"/>
<grayblock y="4" x="3" direction="none" color="none"/>
<grayblock y="6" x="3" direction="none" color="none"/>
<grayblock y="7" x="3" direction="none" color="none"/>
<grayblock y="7" x="4" direction="none" color="none"/>
<grayblock y="8" x="4" direction="none" color="none"/>
<grayblock y="8" x="5" direction="none" color="none"/>
<grayblock y="8" x="6" direction="none" color="none"/>
<grayblock y="8" x="7" direction="none" color="none"/>
<grayblock y="8" x="8" direction="none" color="none"/>
<grayblock y="8" x="9" direction="none" color="none"/>
<grayblock y="7" x="9" direction="none" color="none"/>
<grayblock y="7" x="10" direction="none" color="none"/>
<grayblock y="7" x="11" direction="none" color="none"/>
<grayblock y="8" x="11" direction="none" color="none"/>
<grayblock y="7" x="13" direction="none" color="none"/>
<grayblock y="7" x="12" direction="none" color="none"/>
<grayblock y="8" x="12" direction="none" color="none"/>
<grayblock y="8" x="13" direction="none" color="none"/>
<grayblock y="7" x="14" direction="none" color="none"/>
<grayblock y="6" x="14" direction="none" color="none"/>
<grayblock y="4" x="2" direction="none" color="none"/>
<grayblock y="4" x="15" direction="none" color="none"/>
<grayblock y="3" x="3" direction="none" color="none"/>
<grayblock y="8" x="14" direction="none" color="none"/>
<grayblock y="7" x="15" direction="none" color="none"/>
<grayblock y="9" x="10" direction="none" color="black"/>
<grayblock y="9" x="7" direction="none" color="black"/>
<grayblock y="5" x="3" direction="up" color="none"/>
<grayblock y="5" x="14" direction="up" color="none"/>
<grayblock y="6" x="10" direction="down" color="none"/>
<grayblock y="6" x="7" direction="down" color="none"/>
<grayblock y="2" x="5" direction="none" color="red"/>
<grayblock y="2" x="7" direction="none" color="red"/>
<grayblock y="9" x="5" direction="none" color="blue"/>
<grayblock y="9" x="3" direction="none" color="blue"/>
<grayblock y="9" x="14" direction="none" color="yellow"/>
<grayblock y="9" x="12" direction="none" color="yellow"/>
<grayblock y="2" x="10" direction="none" color="green"/>
<grayblock y="2" x="12" direction="none" color="green"/>
<grayblock y="2" x="14" direction="none" color="none"/>
<grayblock y="2" x="3" direction="none" color="none"/>
<colorblock y="3" x="12" color="red"/>
<colorblock y="4" x="13" color="red"/>
<colorblock y="7" x="13" color="blue"/>
<colorblock y="8" x="12" color="blue"/>
<colorblock y="8" x="5" color="yellow"/>
<colorblock y="7" x="4" color="yellow"/>
<colorblock y="4" x="4" color="green"/>
<colorblock y="3" x="5" color="green"/>
</level>
;
break;
};
return (_local2);
}
}
}//package classes
Section 21
//backAnimation_20 (Game_fla.backAnimation_20)
package Game_fla {
import flash.display.*;
public dynamic class backAnimation_20 extends MovieClip {
public function backAnimation_20(){
addFrameScript(38, frame39, 94, frame95, 122, frame123, 176, frame177, 192, frame193);
}
function frame177(){
stop();
}
function frame123(){
stop();
}
function frame95(){
stop();
}
function frame39(){
stop();
}
function frame193(){
gotoAndPlay("init");
}
}
}//package Game_fla
Section 22
//Button_38 (Game_fla.Button_38)
package Game_fla {
import flash.display.*;
public dynamic class Button_38 extends MovieClip {
public function Button_38(){
addFrameScript(0, frame1, 12, frame13);
}
function frame1(){
stop();
}
function frame13(){
stop();
}
}
}//package Game_fla
Section 23
//MainTimeline (Game_fla.MainTimeline)
package Game_fla {
import flash.display.*;
public dynamic class MainTimeline extends MovieClip {
public function MainTimeline(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 24
//McBackground_47 (Game_fla.McBackground_47)
package Game_fla {
import flash.display.*;
public dynamic class McBackground_47 extends MovieClip {
public function McBackground_47(){
addFrameScript(249, frame250);
}
function frame250(){
stop();
}
}
}//package Game_fla
Section 25
//McLogo_51 (Game_fla.McLogo_51)
package Game_fla {
import flash.display.*;
public dynamic class McLogo_51 extends MovieClip {
public function McLogo_51(){
addFrameScript(249, frame250);
}
function frame250(){
stop();
}
}
}//package Game_fla
Section 26
//McMascotAnimation_53 (Game_fla.McMascotAnimation_53)
package Game_fla {
import flash.display.*;
public dynamic class McMascotAnimation_53 extends MovieClip {
public function McMascotAnimation_53(){
addFrameScript(198, frame199);
}
function frame199(){
stop();
}
}
}//package Game_fla
Section 27
//MochiAd (mochi.as3.MochiAd)
package mochi.as3 {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showClickAwayAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:5500, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
var _local1:Object = this.parent._mochiad_ctr;
var _local2:Number = (getTimer() - this.started);
var _local3:Boolean;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType == "application"){
return (_local2);
};
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:5500, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
var _local1:Object = this.parent._mochiad_ctr;
var _local2:Number = (getTimer() - this.started);
var _local3:Boolean;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
var _local3:Object = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
var idx:Number = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var clip:Object;
var mc:MovieClip;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
var DEFAULTS:Object = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!(clip is DisplayObject)){
trace("Warning: Object passed as container clip not a descendant of the DisplayObject type");
return (null);
};
if (MovieClip(clip).stage == null){
trace("Warning: Container clip for ad is not attached to the stage");
return (null);
};
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
var depth:Number = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
var wh:Array = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
} else {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
};
var lv:URLVariables = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{
trace("[MochiAds] Blocked URL");
});
if (!options.skip){
loader.load(req);
};
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array = _arg2.split(".");
var _local5:Number = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local6:Array;
var _local3:Object = _arg2.getBounds(_arg2.root);
var _local4:Number = 0;
var _local5:Number = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.right - _local3.left);
_local5 = (_local3.top - _local3.bottom);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array = _arg2.split(".");
var _local4:Number = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array = _arg2.split(".");
var _local5:Number = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var complete:Boolean;
var unloaded:Boolean;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:5500, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}, progress_override:function (_arg1:Object):Number{
return (NaN);
}, bar_offset:0};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
if (options.skip){
ad_timeout = 0;
};
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
var fn:Function = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
var bar:MovieClip = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = (10 + options.bar_offset);
bar.y = (h - 20);
};
var bar_w:Number = ((w - bar.x) - 10);
var bar_color:Number = options.color;
delete options.color;
var bar_background:Number = options.background;
delete options.background;
var bar_outline:Number = options.outline;
delete options.outline;
var backing_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 1);
var backing:Object = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo(bar_w, 0);
backing.lineTo(bar_w, 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
var inside_mc:MovieClip = createEmptyMovieClip(bar, "_inside", 2);
var inside:Object = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo(bar_w, 0);
inside.lineTo(bar_w, 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
var outline_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 3);
var outline:Object = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo(bar_w, 0);
outline.lineTo(bar_w, 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
var progress:Number = Math.min(1, options.progress_override(clip));
var f:Function = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
if (!isNaN(progress)){
complete = (progress == 1);
} else {
if (clip.loaderInfo.bytesLoaded == clip.loaderInfo.bytesTotal){
complete = true;
} else {
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local12:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
var _local1:Object = this.parent.parent.root;
var _local2:Object = this.parent._mochiad_ctr;
var _local3:Number = (getTimer() - this.started);
var _local4:Boolean;
var _local5:Number = _local1.loaderInfo.bytesTotal;
var _local6:Number = _local1.loaderInfo.bytesLoaded;
var _local7:Number = Math.min(1, options.progress_override(_local1));
if (_local7 == 1){
complete = true;
};
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
var _local8:Number = ((100 * _local6) / _local5);
if (!isNaN(_local7)){
_local8 = (100 * _local7);
};
var _local9:Number = ((100 * _local3) / chk.ad_msec);
var _local10:Object = this._mochiad_bar._inside;
var _local11:Number = Math.min(100, Math.min(((_local8) || (0)), _local9));
_local11 = Math.max(this.last_pcnt, _local11);
this.last_pcnt = _local11;
_local10.scaleX = (_local11 * 0.01);
options.ad_progress(_local11);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local8});
if (_local8 >= 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local12 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local12 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local8 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (unloaded){
MochiAd.unload(_local1);
} else {
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var mc = _arg1;
var f:Function = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package mochi.as3
Section 28
//MochiCoins (mochi.as3.MochiCoins)
package mochi.as3 {
public class MochiCoins {
public static const STORE_HIDE:String = "StoreHide";
public static const NO_USER:String = "NoUser";
public static const IO_ERROR:String = "IOError";
public static const ITEM_NEW:String = "ItemNew";
public static const ITEM_OWNED:String = "ItemOwned";
public static const STORE_ITEMS:String = "StoreItems";
public static const ERROR:String = "Error";
public static const STORE_SHOW:String = "StoreShow";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static var _inventory:MochiInventory;
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function getStoreItems():void{
MochiServices.send("coins_getStoreItems");
}
public static function get inventory():MochiInventory{
return (_inventory);
}
public static function showStore(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showStore", {options:_arg1}, null, null);
}
public static function requestFunding(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_requestFunding", _arg1);
}
public static function showItem(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showItem call must pass an Object with an item key");
return;
};
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showItem", {options:_arg1}, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showVideo(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showVideo call must pass an Object with an item key");
return;
};
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showVideo", {options:_arg1}, null, null);
}
addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_inventory = new MochiInventory();
});
addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_inventory = null;
});
}
}//package mochi.as3
Section 29
//MochiDigits (mochi.as3.MochiDigits)
package mochi.as3 {
public final class MochiDigits {
private var Sibling:MochiDigits;
private var Fragment:Number;
private var Encoder:Number;
public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{
Encoder = 0;
setValue(_arg1, _arg2);
}
public function reencode():void{
var _local1:uint = int((2147483647 * Math.random()));
Fragment = (Fragment ^ (_local1 ^ Encoder));
Encoder = _local1;
}
public function set value(_arg1:Number):void{
setValue(_arg1);
}
public function toString():String{
var _local1:String = String.fromCharCode((Fragment ^ Encoder));
if (Sibling != null){
_local1 = (_local1 + Sibling.toString());
};
return (_local1);
}
public function setValue(_arg1:Number=0, _arg2:uint=0):void{
var _local3:String = _arg1.toString();
var _temp1 = _arg2;
_arg2 = (_arg2 + 1);
Fragment = (_local3.charCodeAt(_temp1) ^ Encoder);
if (_arg2 < _local3.length){
Sibling = new MochiDigits(_arg1, _arg2);
} else {
Sibling = null;
};
reencode();
}
public function get value():Number{
return (Number(this.toString()));
}
public function addValue(_arg1:Number):void{
value = (value + _arg1);
}
}
}//package mochi.as3
Section 30
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher)
package mochi.as3 {
public class MochiEventDispatcher {
private var eventTable:Object;
public function MochiEventDispatcher():void{
eventTable = {};
}
public function triggerEvent(_arg1:String, _arg2:Object):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
return;
};
for (_local3 in eventTable[_arg1]) {
var _local6 = eventTable[_arg1];
_local6[_local3](_arg2);
};
}
public function removeEventListener(_arg1:String, _arg2:Function):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
eventTable[_arg1] = [];
return;
};
for (_local3 in eventTable[_arg1]) {
if (eventTable[_arg1][_local3] != _arg2){
} else {
eventTable[_arg1].splice(Number(_local3), 1);
};
};
}
public function addEventListener(_arg1:String, _arg2:Function):void{
removeEventListener(_arg1, _arg2);
eventTable[_arg1].push(_arg2);
}
}
}//package mochi.as3
Section 31
//MochiEvents (mochi.as3.MochiEvents)
package mochi.as3 {
import flash.display.*;
public class MochiEvents {
public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL";
public static const FORMAT_LONG:String = "LongForm";
public static const ALIGN_BOTTOM:String = "ALIGN_B";
public static const ACHIEVEMENT_RECEIVED:String = "AchievementReceived";
public static const FORMAT_SHORT:String = "ShortForm";
public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR";
public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR";
public static const ALIGN_TOP:String = "ALIGN_T";
public static const ALIGN_LEFT:String = "ALIGN_L";
public static const ALIGN_RIGHT:String = "ALIGN_R";
public static const ALIGN_TOP_LEFT:String = "ALIGN_TL";
public static const ALIGN_CENTER:String = "ALIGN_C";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
private static var gameStart:Number;
private static var levelStart:Number;
public static function endPlay():void{
MochiServices.send("events_clearRoundID", null, null, null);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function trackEvent(_arg1:String, _arg2=null):void{
MochiServices.send("events_trackEvent", {tag:_arg1, value:_arg2}, null, null);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function startSession(_arg1:String):void{
MochiServices.send("events_beginSession", {achievementID:_arg1}, null, null);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function setNotifications(_arg1:MovieClip, _arg2:Object):void{
var _local4:Object;
var _local3:Object = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
_local3.clip = _arg1;
MochiServices.send("events_setNotifications", _local3, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function startPlay(_arg1:String="gameplay"):void{
MochiServices.send("events_setRoundID", {tag:String(_arg1)}, null, null);
}
}
}//package mochi.as3
Section 32
//MochiInventory (mochi.as3.MochiInventory)
package mochi.as3 {
import flash.events.*;
import flash.utils.*;
public dynamic class MochiInventory extends Proxy {
private var _timer:Timer;
private var _names:Array;
private var _syncID:Number;
private var _consumableProperties:Object;
private var _storeSync:Object;
private var _outstandingID:Number;
private var _syncPending:Boolean;
public static const READY:String = "InvReady";
public static const ERROR:String = "Error";
public static const IO_ERROR:String = "IoError";
private static const KEY_SALT:String = " syncMaint";
public static const WRITTEN:String = "InvWritten";
public static const NOT_READY:String = "InvNotReady";
public static const VALUE_ERROR:String = "InvValueError";
private static const CONSUMER_KEY:String = "MochiConsumables";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public function MochiInventory():void{
MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, itemOwned);
MochiCoins.addEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, loggedOut);
_storeSync = new Object();
_syncPending = false;
_outstandingID = 0;
_syncID = 0;
_timer = new Timer(1000);
_timer.addEventListener(TimerEvent.TIMER, sync);
_timer.start();
if (MochiSocial.loggedIn){
loggedIn();
} else {
loggedOut();
};
}
private function newItems(_arg1:Object):void{
if (!this[(_arg1.id + KEY_SALT)]){
this[(_arg1.id + KEY_SALT)] = 0;
};
if (!this[_arg1.id]){
this[_arg1.id] = 0;
};
this[(_arg1.id + KEY_SALT)] = (this[(_arg1.id + KEY_SALT)] + _arg1.count);
this[_arg1.id] = (this[_arg1.id] + _arg1.count);
if (((_arg1.privateProperties) && (_arg1.privateProperties.consumable))){
if (!this[_arg1.privateProperties.tag]){
this[_arg1.privateProperties.tag] = 0;
};
this[_arg1.privateProperties.tag] = (this[_arg1.privateProperties.tag] + (_arg1.privateProperties.inc * _arg1.count));
};
}
public function release():void{
MochiCoins.removeEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.removeEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.removeEventListener(MochiSocial.LOGGED_OUT, loggedOut);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (-1);
};
if (_consumableProperties[_arg1]){
return (MochiDigits(_consumableProperties[_arg1]).value);
};
return (undefined);
}
private function loggedIn(_arg1:Object=null):void{
MochiUserData.get(CONSUMER_KEY, getConsumableBag);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (false);
};
if (_consumableProperties[_arg1] == undefined){
return (false);
};
return (true);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{
return (((_arg1)>=_names.length) ? 0 : (_arg1 + 1));
}
private function putConsumableBag(_arg1:MochiUserData):void{
_syncPending = false;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
_outstandingID = -1;
};
triggerEvent(WRITTEN, {});
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var _local3:MochiDigits;
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return;
};
if (!(_arg2 is Number)){
triggerEvent(ERROR, {type:VALUE_ERROR, error:"Invalid type", arg:_arg2});
return;
};
if (_consumableProperties[_arg1]){
_local3 = MochiDigits(_consumableProperties[_arg1]);
if (_local3.value == _arg2){
return;
};
_local3.value = _arg2;
} else {
_names.push(_arg1);
_consumableProperties[_arg1] = new MochiDigits(_arg2);
};
_syncID++;
}
private function itemOwned(_arg1:Object):void{
_storeSync[_arg1.id] = {properties:_arg1.properties, count:_arg1.count};
}
private function sync(_arg1:Event=null):void{
var _local3:String;
if (((_syncPending) || ((_syncID == _outstandingID)))){
return;
};
_outstandingID = _syncID;
var _local2:Object = {};
for (_local3 in _consumableProperties) {
_local2[_local3] = MochiDigits(_consumableProperties[_local3]).value;
};
MochiUserData.put(CONSUMER_KEY, _local2, putConsumableBag);
_syncPending = true;
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{
return (_names[(_arg1 - 1)]);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{
if (!_consumableProperties[_arg1]){
return (false);
};
_names.splice(_names.indexOf(_arg1), 1);
delete _consumableProperties[_arg1];
return (true);
}
private function getConsumableBag(_arg1:MochiUserData):void{
var _local2:String;
var _local3:Number;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
return;
};
_consumableProperties = {};
_names = new Array();
if (_arg1.data){
for (_local2 in _arg1.data) {
_names.push(_local2);
_consumableProperties[_local2] = new MochiDigits(_arg1.data[_local2]);
};
};
for (_local2 in _storeSync) {
_local3 = _storeSync[_local2].count;
if (_consumableProperties[(_local2 + KEY_SALT)]){
_local3 = (_local3 - _consumableProperties[(_local2 + KEY_SALT)].value);
};
if (_local3 == 0){
} else {
newItems({id:_local2, count:_local3, properties:_storeSync[_local2].properties});
};
};
triggerEvent(READY, {});
}
private function loggedOut(_arg1:Object=null):void{
_consumableProperties = null;
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
}
}//package mochi.as3
Section 33
//MochiServices (mochi.as3.MochiServices)
package mochi.as3 {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.geom.*;
import flash.system.*;
public class MochiServices {
public static const CONNECTED:String = "onConnected";
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _queue:Array;
private static var _swfVersion:String;
private static var _preserved:Object;
public static var netupAttempted:Boolean = false;
private static var _sendChannel:LocalConnection;
private static var _nextCallbackID:Number;
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _id:String;
private static var _services:String = "services.swf";
private static var _servURL:String = "http://www.mochiads.com/static/lib/services/";
public static var widget:Boolean = false;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
private static var _callbacks:Object;
private static var _connecting:Boolean = false;
private static var _mochiLocalConnection:MovieClip;
private static var _listenChannelName:String = "__ms_";
public static var onError:Object;
public static var netup:Boolean = true;
private static var _mochiLC:String = "MochiLC.swf";
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function get connected():Boolean{
return (_connected);
}
private static function onReceive(_arg1:Object):void{
var methodName:String;
var pkg = _arg1;
var cb:String = pkg.callbackID;
var cblst:Object = _callbacks[cb];
if (!cblst){
return;
};
var method:* = cblst.callbackMethod;
methodName = "";
var obj:Object = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete _callbacks[cb];
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_nextCallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + _arg1));
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_queue.push({methodName:_arg1, args:_arg2, callbackID:_nextCallbackID});
};
if (_clip != null){
if (_callbacks != null){
_callbacks[_nextCallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_nextCallbackID++;
};
};
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local4:int;
var _local14:Loader;
var _local3:Array = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23];
var _local5:Array = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
var _local6:Array = [0, 64, 0, 0, 0];
var _local7:MovieClip = new MovieClip();
var _local8:LocalConnection = new LocalConnection();
var _local9:String = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().time));
_local8 = new LocalConnection();
_local7.lc = _local8;
_local7.click = _arg2;
_local8.client = _local7;
_local8.connect(_local9);
var _local10:ByteArray = new ByteArray();
var _local11:ByteArray = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
var _local12:uint = ((_local3.length + _local11.length) + 4);
var _local13:uint = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
private static function detach(_arg1:Event):void{
var _local2:LoaderInfo = LoaderInfo(_arg1.target);
_local2.removeEventListener(Event.COMPLETE, detach);
_local2.removeEventListener(IOErrorEvent.IO_ERROR, detach);
_local2.removeEventListener(Event.COMPLETE, loadLCBridgeComplete);
_local2.removeEventListener(IOErrorEvent.IO_ERROR, loadError);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
private static function loadLCBridgeComplete(_arg1:Event):void{
var _local2:Loader = LoaderInfo(_arg1.target).loader;
_mochiLocalConnection = MovieClip(_local2.content);
listen();
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_mochiLocalConnection.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, connectWait);
_timer = null;
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType != "application"){
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
};
return (_local2);
}
public static function getVersion():String{
return ("3.9.1 as3");
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
}
public static function warnID(_arg1:String, _arg2:Boolean):void{
_arg1 = _arg1.toLowerCase();
if (_arg1.length != 16){
trace((("WARNING: " + (_arg2) ? "board" : "game") + " ID is not the appropriate length"));
return;
} else {
if (_arg1 == "1e113c7239048b3f"){
if (_arg2){
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
};
return;
} else {
if (_arg1 == "84993a1de4031cd8"){
if (_arg2){
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
};
return;
};
};
};
var _local3:Number = 0;
while (_local3 < _arg1.length) {
switch (_arg1.charAt(_local3)){
case "0":
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
case "8":
case "9":
case "a":
case "b":
case "c":
case "d":
case "e":
case "f":
break;
default:
trace(("WARNING: Board ID contains illegal characters: " + _arg1));
return;
};
_local3++;
};
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (((_clip) && (_queue))){
while (_queue.length > 0) {
_local2 = _queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _callbacks[_local2.callbackID];
};
delete _callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
}
public static function get id():String{
return (_id);
}
private static function onEvent(_arg1:Object):void{
var _local2:String = _arg1.target;
var _local3:String = _arg1.event;
switch (_local2){
case "services":
MochiServices.triggerEvent(_arg1.event, _arg1.args);
break;
case "events":
MochiEvents.triggerEvent(_arg1.event, _arg1.args);
break;
case "coins":
MochiCoins.triggerEvent(_arg1.event, _arg1.args);
break;
case "social":
MochiSocial.triggerEvent(_arg1.event, _arg1.args);
break;
};
}
private static function urlOptions(_arg1:Object):Object{
var _local3:String;
var _local4:Array;
var _local5:Number;
var _local6:Array;
var _local2:Object = {};
if (_arg1.stage){
_local3 = _arg1.stage.loaderInfo.parameters.mochiad_options;
} else {
_local3 = _arg1.loaderInfo.parameters.mochiad_options;
};
if (_local3){
_local4 = _local3.split("&");
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5].split("=");
_local2[unescape(_local6[0])] = unescape(_local6[1]);
_local5++;
};
};
return (_local2);
}
public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{
var avm1Click:DisplayObject;
var x:String;
var req:URLRequest;
var loader:Loader;
var setURL:Function;
var err:Function;
var complete:Function;
var url = _arg1;
var burl = _arg2;
var btn = _arg3;
var onClick = _arg4;
var vars:Object = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
var s = "?";
var i:Number = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://link.mochiads.com/linkping.swf");
loader = new Loader();
setURL = function (_arg1:String):void{
if (avm1Click){
btn.removeChild(avm1Click);
};
avm1Click = clickMovie(_arg1, onClick);
var _local2:Rectangle = btn.getBounds(btn);
btn.addChild(avm1Click);
avm1Click.x = _local2.x;
avm1Click.y = _local2.y;
avm1Click.scaleX = (0.01 * _local2.width);
avm1Click.scaleY = (0.01 * _local2.height);
};
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
setURL(burl);
};
complete = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
if (netup){
setURL((url + s));
} else {
setURL(burl);
};
if (!((netupAttempted) || (_connected))){
netupAttempted = true;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
};
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_clip.parent){
_clip.parent.removeChild(_clip);
};
if (_arg1 != null){
if ((_arg1 is DisplayObjectContainer)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is DisplayObjectContainer)){
DisplayObjectContainer(_container).addChild(_clip);
};
};
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError.apply(null, ["NotConnected"]);
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError.apply(null, ["NotConnected"]);
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
private static function loadError(_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
}
public static function get childClip():Object{
return (_clip);
}
private static function initComChannels():void{
if (!_connected){
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_clip.onReceive = onReceive;
_clip.onEvent = onEvent;
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
while (_queue.length > 0) {
_mochiLocalConnection.send(_sendChannelName, "onReceive", _queue.shift());
};
};
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
private static function listen():void{
_mochiLocalConnection.connect(_listenChannelName);
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
trace("Waiting for MochiAds services to connect...");
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
private static function loadLCBridge(_arg1:Object):void{
var _local2:Loader = new Loader();
var _local3:String = (_servURL + _mochiLC);
var _local4:URLRequest = new URLRequest(_local3);
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, detach);
_local2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, detach);
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, loadLCBridgeComplete);
_local2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
_local2.load(_local4);
_arg1.addChild(_local2);
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
if (urlOptions(_arg2).servURL){
_servURL = urlOptions(_arg2).servURL;
};
var _local3:String = (_servURL + _services);
if (urlOptions(_arg2).servicesURL){
_local3 = urlOptions(_arg2).servicesURL;
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999))));
MochiServices.allowDomains(_local3);
_clip = new MovieClip();
loadLCBridge(_clip);
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, detach);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, detach);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
var _local4:URLRequest = new URLRequest(_local3);
var _local5:URLVariables = new URLVariables();
_local5.listenLC = _listenChannelName;
_local5.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options;
_local5.api_version = getVersion();
if (widget){
_local5.widget = true;
};
_local4.data = _local5;
_loader.load(_local4);
_clip.addChild(_loader);
_sendChannel = new LocalConnection();
_queue = [];
_nextCallbackID = 0;
_callbacks = {};
_timer = new Timer(10000, 1);
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
return (_clip);
}
public static function get clip():Object{
return (_container);
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
warnID(id, false);
if ((clip is DisplayObject)){
if (clip.stage == null){
trace("MochiServices connect requires the containing clip be attached to the stage");
};
if (((!(_connected)) && ((_clip == null)))){
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
}
public static function bringToTop(_arg1:Event=null):void{
var e = _arg1;
if (((!((MochiServices.clip == null))) && (!((MochiServices.childClip == null))))){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
}
public static function connectWait(_arg1:TimerEvent):void{
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load. (timeout)");
MochiServices.disconnect();
MochiServices.onError("IOError");
} else {
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, connectWait);
_timer = null;
};
}
}
}//package mochi.as3
Section 34
//MochiSocial (mochi.as3.MochiSocial)
package mochi.as3 {
public class MochiSocial {
public static const LOGGED_IN:String = "LoggedIn";
public static const ACTION_CANCELED:String = "onCancel";
public static const PROPERTIES_SIZE:String = "PropertiesSize";
public static const IO_ERROR:String = "IOError";
public static const NO_USER:String = "NoUser";
public static const FRIEND_LIST:String = "FriendsList";
public static const PROFILE_DATA:String = "ProfileData";
public static const GAMEPLAY_DATA:String = "GameplayData";
public static const ACTION_COMPLETE:String = "onComplete";
public static const LOGIN_SHOW:String = "LoginShow";
public static const PROFILE_HIDE:String = "ProfileHide";
public static const USER_INFO:String = "UserInfo";
public static const PROPERTIES_SAVED:String = "PropertySaved";
public static const WIDGET_LOADED:String = "WidgetLoaded";
public static const ERROR:String = "Error";
public static const LOGGED_OUT:String = "LoggedOut";
public static const PROFILE_SHOW:String = "ProfileShow";
public static const LOGIN_HIDE:String = "LoginHide";
public static const LOGIN_SHOWN:String = "LoginShown";
public static var _user_info:Object = null;
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static function requestFan(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_requestFan", _arg1);
}
public static function postToStream(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_postToStream", _arg1);
}
public static function getFriendsList(_arg1:Object=null):void{
MochiServices.send("social_getFriendsList", _arg1);
}
public static function requestLogin(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_requestLogin", _arg1);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function saveUserProperties(_arg1:Object):void{
MochiServices.send("social_saveUserProperties", _arg1);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function inviteFriends(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_inviteFriends", _arg1);
}
public static function get loggedIn():Boolean{
return (!((_user_info == null)));
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function showLoginWidget(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_showLoginWidget", {options:_arg1});
}
public static function getAPIURL():String{
if (!_user_info){
return (null);
};
return (_user_info.api_url);
}
public static function hideLoginWidget():void{
MochiServices.send("social_hideLoginWidget");
}
public static function getAPIToken():String{
if (!_user_info){
return (null);
};
return (_user_info.api_token);
}
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_user_info = _arg1;
});
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_user_info = null;
});
}
}//package mochi.as3
Section 35
//MochiUserData (mochi.as3.MochiUserData)
package mochi.as3 {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
public class MochiUserData extends EventDispatcher {
public var callback:Function;// = null
public var operation:String;// = null
public var error:Event;// = null
public var data;// = null
public var _loader:URLLoader;
public var key:String;// = null
public function MochiUserData(_arg1:String="", _arg2:Function=null){
this.key = _arg1;
this.callback = _arg2;
}
public function serialize(_arg1):ByteArray{
var _local2:ByteArray = new ByteArray();
_local2.objectEncoding = ObjectEncoding.AMF3;
_local2.writeObject(_arg1);
_local2.compress();
return (_local2);
}
public function errorHandler(_arg1:IOErrorEvent):void{
data = null;
error = _arg1;
if (callback != null){
performCallback();
} else {
dispatchEvent(_arg1);
};
close();
}
public function putEvent(_arg1):void{
request("put", serialize(_arg1));
}
public function deserialize(_arg1:ByteArray){
_arg1.objectEncoding = ObjectEncoding.AMF3;
_arg1.uncompress();
return (_arg1.readObject());
}
public function securityErrorHandler(_arg1:SecurityErrorEvent):void{
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + _arg1.toString())));
}
public function getEvent():void{
request("get", serialize(null));
}
override public function toString():String{
return ((((((((("[MochiUserData operation=" + operation) + " key=\"") + key) + "\" data=") + data) + " error=\"") + error) + "\"]"));
}
public function performCallback():void{
try {
callback(this);
} catch(e:Error) {
trace(("[MochiUserData] exception during callback: " + e));
};
}
public function request(_arg1:String, _arg2:ByteArray):void{
var _operation = _arg1;
var _data = _arg2;
operation = _operation;
var api_url:String = MochiSocial.getAPIURL();
var api_token:String = MochiSocial.getAPIToken();
if ((((api_url == null)) || ((api_token == null)))){
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "not logged in"));
return;
};
_loader = new URLLoader();
var args:URLVariables = new URLVariables();
args.op = _operation;
args.key = key;
var req:URLRequest = new URLRequest((((MochiSocial.getAPIURL() + "/") + "MochiUserData?") + args.toString()));
req.method = URLRequestMethod.POST;
req.contentType = "application/x-mochi-userdata";
req.requestHeaders = [new URLRequestHeader("x-mochi-services-version", MochiServices.getVersion()), new URLRequestHeader("x-mochi-api-token", api_token)];
req.data = _data;
_loader.dataFormat = URLLoaderDataFormat.BINARY;
_loader.addEventListener(Event.COMPLETE, completeHandler);
_loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
try {
_loader.load(req);
} catch(e:SecurityError) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + e.toString())));
};
}
public function completeHandler(_arg1:Event):void{
var event = _arg1;
try {
if (_loader.data.length){
data = deserialize(_loader.data);
} else {
data = null;
};
} catch(e:Error) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("deserialize error: " + e.toString())));
return;
};
if (callback != null){
performCallback();
} else {
dispatchEvent(event);
};
close();
}
public function close():void{
if (_loader){
_loader.removeEventListener(Event.COMPLETE, completeHandler);
_loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
_loader.close();
_loader = null;
};
error = null;
callback = null;
}
public static function get(_arg1:String, _arg2:Function):void{
var _local3:MochiUserData = new MochiUserData(_arg1, _arg2);
_local3.getEvent();
}
public static function put(_arg1:String, _arg2, _arg3:Function):void{
var _local4:MochiUserData = new MochiUserData(_arg1, _arg3);
_local4.putEvent(_arg2);
}
}
}//package mochi.as3
Section 36
//Bounce (util.easing.Bounce)
package util.easing {
public class Bounce {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 - easeOut((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (((easeIn((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOut(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
}
}//package util.easing
Section 37
//Cubic (util.easing.Cubic)
package util.easing {
public class Cubic {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2));
}
}
}//package util.easing
Section 38
//Elastic (util.easing.Elastic)
package util.easing {
public class Elastic {
private static const _2PI:Number = 6.28318530717959;
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
--_arg1;
return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6)))) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * (0.3 * 1.5));
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6)))) + _arg2));
};
--_arg1;
return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6))) * 0.5) + _arg3) + _arg2));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6))) + _arg3) + _arg2));
}
}
}//package util.easing
Section 39
//Linear (util.easing.Linear)
package util.easing {
public class Linear {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
}
}//package util.easing
Section 40
//SoundManager (util.SoundManager)
package util {
import flash.media.*;
import flash.events.*;
import flash.utils.*;
public class SoundManager {
private var _soundsDict:Dictionary;
private var _enabledMusic:Boolean;
private var _volumeSound:Number;
private var _sounds:Array;
private var _volumeMusic:Number;
private var _enabledSound:Boolean;
private static var _instance:SoundManager;
private static var _allowInstance:Boolean;
public function SoundManager(){
this._soundsDict = new Dictionary(true);
this._sounds = new Array();
this._enabledSound = true;
this._enabledMusic = true;
this._volumeSound = 1;
this._volumeMusic = 0.8;
if (!SoundManager._allowInstance){
throw (new Error("Error: Use SoundManager.getInstance() instead of the new keyword."));
};
}
public function playAllSound():void{
var _local2:String;
var _local3:String;
var _local1:int;
while (_local1 < this._sounds.length) {
_local2 = this._sounds[_local1].name;
_local3 = this._sounds[_local1].type;
if (((this._soundsDict[_local2].pausedByAll) && ((_local3 == "sound")))){
this._soundsDict[_local2].pausedByAll = false;
this.play(_local2);
};
_local1++;
};
}
public function get sounds():Array{
return (this._sounds);
}
public function setSoundVolume(_arg1:Number):void{
var _local3:Object;
var _local4:SoundTransform;
this._volumeSound = _arg1;
var _local2:int;
while (_local2 < this._sounds.length) {
if (this._sounds[_local2].type == "sound"){
_local3 = this._soundsDict[this._sounds[_local2].name];
_local4 = _local3.channel.soundTransform;
_local4.volume = _volumeSound;
_local3.channel.soundTransform = _local4;
};
_local2++;
};
}
public function playSound(_arg1:String, _arg2:Number=1, _arg3:Number=0, _arg4:int=0):void{
var _local5:Object = this._soundsDict[_arg1];
_local5.volume = _arg2;
_local5.startTime = _arg3;
_local5.loops = _arg4;
if (_local5.paused){
_local5.channel = _local5.sound.play(_local5.position, _local5.loops, new SoundTransform(_local5.volume));
} else {
_local5.channel = _local5.sound.play(_arg3, _local5.loops, new SoundTransform(_local5.volume));
};
_local5.paused = false;
}
public function enableSound():void{
this._enabledSound = true;
this.playAllSound();
}
public function disableSound():void{
this._enabledSound = false;
this.stopAllSound();
}
public function stopAllSound():void{
var _local2:String;
var _local3:String;
var _local1:int;
while (_local1 < this._sounds.length) {
_local2 = this._sounds[_local1].name;
_local3 = this._sounds[_local1].type;
if (((!(this._soundsDict[_local2].paused)) && ((_local3 == "sound")))){
this.stopSound(_local2);
};
_local1++;
};
}
public function isSoundPaused(_arg1:String):Boolean{
return (this._soundsDict[_arg1].paused);
}
public function getSoundDuration(_arg1:String):Number{
return (this._soundsDict[_arg1].sound.length);
}
public function addLibrarySound(_arg1, _arg2:String):Boolean{
var _local3:int;
while (_local3 < this._sounds.length) {
if (this._sounds[_local3].name == _arg2){
return (false);
};
_local3++;
};
var _local4:Object = new Object();
var _local5:Sound = new (_arg1);
_local4.name = _arg2;
_local4.sound = _local5;
_local4.channel = new SoundChannel();
_local4.position = 0;
_local4.paused = true;
_local4.volume = 1;
_local4.startTime = 0;
_local4.loops = 0;
_local4.pausedByAll = false;
_local4.type = "sound";
this._soundsDict[_arg2] = _local4;
this._sounds.push(_local4);
return (true);
}
public function toString():String{
return (getQualifiedClassName(this));
}
public function setMusicVolume(_arg1:Number):void{
var _local3:Object;
var _local4:SoundTransform;
this._volumeMusic = _arg1;
var _local2:int;
while (_local2 < this._sounds.length) {
if (this._sounds[_local2].type == "music"){
_local3 = this._soundsDict[this._sounds[_local2].name];
_local4 = _local3.channel.soundTransform;
_local4.volume = _volumeSound;
_local3.channel.soundTransform = _local4;
};
_local2++;
};
}
public function playAllMusic():void{
var _local2:String;
var _local3:String;
var _local1:int;
while (_local1 < this._sounds.length) {
_local2 = this._sounds[_local1].name;
_local3 = this._sounds[_local1].type;
if (((this._soundsDict[_local2].pausedByAll) && ((_local3 == "music")))){
this._soundsDict[_local2].pausedByAll = false;
this.play(_local2);
};
_local1++;
};
}
public function removeAllSounds():void{
var _local1:int;
while (_local1 < this._sounds.length) {
this._sounds[_local1] = null;
_local1++;
};
this._sounds = new Array();
this._soundsDict = new Dictionary(true);
}
public function getSoundPosition(_arg1:String):Number{
return (this._soundsDict[_arg1].channel.position);
}
public function disableMusic():void{
this._enabledMusic = false;
this.stopAllMusic();
}
public function stopAllMusic():void{
var _local2:String;
var _local3:String;
var _local1:int;
while (_local1 < this._sounds.length) {
_local2 = this._sounds[_local1].name;
_local3 = this._sounds[_local1].type;
if (((!(this._soundsDict[_local2].paused)) && ((_local3 == "music")))){
this.stopSound(_local2);
this._soundsDict[_local2].pausedByAll = true;
};
_local1++;
};
}
public function getMusicVolume():Number{
return (this._volumeMusic);
}
public function removeSound(_arg1:String):void{
var _local2:int;
while (_local2 < this._sounds.length) {
if (this._sounds[_local2].name == _arg1){
this._sounds[_local2] = null;
this._sounds.splice(_local2, 1);
};
_local2++;
};
delete this._soundsDict[_arg1];
}
public function pauseAllSounds(_arg1:Boolean=true):void{
var _local3:String;
var _local2:int;
while (_local2 < this._sounds.length) {
_local3 = this._sounds[_local2].name;
if (_arg1){
if (!this._soundsDict[_local3].paused){
this._soundsDict[_local3].pausedByAll = true;
this.pauseSound(_local3);
};
} else {
this.pauseSound(_local3);
};
_local2++;
};
}
public function enableMusic():void{
this._enabledMusic = true;
this.playAllMusic();
}
public function addLibraryMusic(_arg1, _arg2:String):Boolean{
var _local3:int;
while (_local3 < this._sounds.length) {
if (this._sounds[_local3].name == _arg2){
return (false);
};
_local3++;
};
var _local4:Object = new Object();
var _local5:Sound = new (_arg1);
_local4.name = _arg2;
_local4.sound = _local5;
_local4.channel = new SoundChannel();
_local4.position = 0;
_local4.paused = true;
_local4.volume = 1;
_local4.startTime = 0;
_local4.loops = 0;
_local4.pausedByAll = false;
_local4.type = "music";
this._soundsDict[_arg2] = _local4;
this._sounds.push(_local4);
return (true);
}
public function play(_arg1:String, _arg2:int=0):void{
var $name = _arg1;
var $loops = _arg2;
var snd:Object = this._soundsDict[$name];
snd.startTime = 0;
snd.loops = $loops;
switch (snd.type){
case "sound":
snd.volume = this._volumeSound;
if (this._enabledSound){
stopSound($name);
snd.channel = snd.sound.play(snd.startTime, snd.loops, new SoundTransform(snd.volume));
snd.channel.addEventListener(Event.SOUND_COMPLETE, function (_arg1){
stopSound($name);
});
snd.paused = false;
};
break;
case "music":
snd.volume = this._volumeMusic;
if (this._enabledMusic){
stopSound($name);
snd.channel = snd.sound.play(snd.startTime, 0, new SoundTransform(snd.volume));
snd.channel.addEventListener(Event.SOUND_COMPLETE, function (_arg1){
play($name);
});
snd.paused = false;
} else {
snd.pausedByAll = true;
};
break;
};
}
public function getSoundVolume():Number{
return (this._volumeSound);
}
public function isSoundPausedByAll(_arg1:String):Boolean{
return (this._soundsDict[_arg1].pausedByAll);
}
public function getSoundObject(_arg1:String):Sound{
return (this._soundsDict[_arg1].sound);
}
public function pauseSound(_arg1:String):void{
var _local2:Object = this._soundsDict[_arg1];
_local2.paused = true;
_local2.position = _local2.channel.position;
_local2.channel.stop();
}
public function fadeSound(_arg1:String, _arg2:Number=0, _arg3:Number=1):void{
var $name = _arg1;
var $targVolume = _arg2;
var $fadeLength = _arg3;
var fadeChannel:SoundChannel = this._soundsDict[$name].channel;
TweenLite.to(fadeChannel, $fadeLength, {volume:$targVolume, onComplete:function (){
stopSound($name);
}});
}
public function stopSound(_arg1:String):void{
var _local2:Object = this._soundsDict[_arg1];
_local2.pausedByAll = false;
_local2.paused = true;
_local2.channel.stop();
_local2.position = _local2.channel.position;
}
public static function getInstance():SoundManager{
if (SoundManager._instance == null){
SoundManager._allowInstance = true;
SoundManager._instance = new (SoundManager);
SoundManager._allowInstance = false;
};
return (SoundManager._instance);
}
}
}//package util
Section 41
//TimerLite (util.TimerLite)
package util {
import flash.events.*;
import flash.utils.*;
public class TimerLite {
protected var callBackClass:Object;
protected var timer:Timer;
protected var callBack:Function;
private function delayComplete():void{
this.callBack.call(this.callBackClass);
}
public static function delay(_arg1:Number, _arg2:Function, _arg3:Object):TimerLite{
var lite:TimerLite;
var time = _arg1;
var callBack = _arg2;
var callBackClass = _arg3;
lite = new (TimerLite);
lite.timer = new Timer(time, 1);
lite.callBack = callBack;
lite.callBackClass = callBackClass;
lite.timer.addEventListener(TimerEvent.TIMER_COMPLETE, function (_arg1){
lite.delayComplete();
});
lite.timer.start();
return (lite);
}
}
}//package util
Section 42
//TweenLite (util.TweenLite)
package util {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
public class TweenLite {
public var started:Boolean;
public var delay:Number;
protected var _hasUpdate:Boolean;
protected var _subTweens:Array;
public var initted:Boolean;
public var active:Boolean;
public var startTime:Number;
public var target:Object;
public var duration:Number;
protected var _hst:Boolean;
public var gc:Boolean;
protected var _isDisplayObject:Boolean;
public var tweens:Array;
public var vars:Object;
public var ease:Function;
protected var _specialVars:Object;
public var initTime:Number;
public var combinedTimeScale:Number;
private static var _timer:Timer = new Timer(2000);
private static var _classInitted:Boolean;
public static var defaultEase:Function = TweenLite.easeOut;
public static var version:Number = 9.29;
public static var masterList:Dictionary = new Dictionary(false);
public static var currentTime:uint;
public static var overwriteManager:Object;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public static var timingSprite:Sprite = new Sprite();
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
if (_arg1 == null){
return;
};
if (!_classInitted){
currentTime = getTimer();
timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
_timer.addEventListener("timer", killGarbage, false, 0, true);
_timer.start();
_classInitted = true;
};
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
this.combinedTimeScale = ((_arg3.timeScale) || (1));
this.active = Boolean((((_arg2 == 0)) && ((this.delay == 0))));
this.target = _arg1;
_isDisplayObject = Boolean((_arg1 is DisplayObject));
if (!(this.vars.ease is Function)){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
this.ease = this.vars.ease;
if (!isNaN(Number(this.vars.autoAlpha))){
this.vars.alpha = Number(this.vars.autoAlpha);
this.vars.visible = Boolean((this.vars.alpha > 0));
};
_specialVars = ((this.vars.isTV)==true) ? this.vars.exposedProps : this.vars;
this.tweens = [];
_subTweens = [];
_hst = (this.initted = false);
this.initTime = currentTime;
this.startTime = (this.initTime + (this.delay * 1000));
var _local4:int = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
if ((((masterList[_arg1] == undefined)) || (((!((_arg1 == null))) && ((_local4 == 1)))))){
masterList[_arg1] = [];
};
masterList[_arg1].push(this);
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (this.active))){
initTweenVals();
if (this.active){
render((this.startTime + 1));
} else {
render(this.startTime);
};
if (((((!((_specialVars.visible == null))) && ((this.vars.runBackwards == true)))) && (_isDisplayObject))){
this.target.visible = _specialVars.visible;
};
};
}
public function get enabled():Boolean{
return ((this.gc) ? false : true);
}
public function render(_arg1:uint):void{
var _local3:Number;
var _local4:Object;
var _local5:int;
var _local2:Number = ((_arg1 - this.startTime) * 0.001);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0;
} else {
_local3 = this.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4[0][_local4[1]] = (_local4[2] + (_local3 * _local4[3]));
_local5--;
};
if (_hst){
_local5 = (_subTweens.length - 1);
while (_local5 > -1) {
_subTweens[_local5].proxy(_subTweens[_local5], _local2);
_local5--;
};
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
public function set enabled(_arg1:Boolean):void{
var _local2:Array;
var _local3:Boolean;
var _local4:int;
if (_arg1){
if (masterList[this.target] == undefined){
masterList[this.target] = [this];
} else {
_local2 = masterList[this.target];
_local4 = (_local2.length - 1);
while (_local4 > -1) {
if (_local2[_local4] == this){
_local3 = true;
break;
};
_local4--;
};
if (!_local3){
masterList[this.target].push(this);
};
};
};
this.gc = (_arg1) ? false : true;
if (this.gc){
this.active = false;
} else {
this.active = this.started;
};
}
public function activate():void{
this.started = (this.active = true);
if (!this.initted){
initTweenVals();
};
if (this.vars.onStart != null){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
}
public function clear():void{
this.tweens = [];
_subTweens = [];
this.vars = {};
_hst = (_hasUpdate = false);
}
protected function addSubTween(_arg1:String, _arg2:Function, _arg3:Object, _arg4:Object, _arg5:Object=null):void{
var _local6:String;
_subTweens[_subTweens.length] = {name:_arg1, proxy:_arg2, target:_arg3, info:_arg5};
for (_local6 in _arg4) {
if (typeof(_arg4[_local6]) == "number"){
this.tweens[this.tweens.length] = [_arg3, _local6, _arg3[_local6], (_arg4[_local6] - _arg3[_local6]), _arg1];
} else {
this.tweens[this.tweens.length] = [_arg3, _local6, _arg3[_local6], Number(_arg4[_local6]), _arg1];
};
};
_hst = true;
}
public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{
var _local3:String;
var _local4:int;
var _local5:Array;
var _local6:ColorTransform;
var _local7:ColorTransform;
var _local8:Object;
if (((!(_arg1)) && (overwriteManager.enabled))){
overwriteManager.manageOverwrites(this, masterList[this.target]);
};
if ((this.target is Array)){
_local5 = ((this.vars.endArray) || ([]));
_local4 = 0;
while (_local4 < _local5.length) {
if (((!((this.target[_local4] == _local5[_local4]))) && (!((this.target[_local4] == undefined))))){
this.tweens[this.tweens.length] = [this.target, _local4.toString(), this.target[_local4], (_local5[_local4] - this.target[_local4]), _local4.toString()];
};
_local4++;
};
} else {
if (((((!((typeof(_specialVars.tint) == "undefined"))) || ((this.vars.removeTint == true)))) && (_isDisplayObject))){
_local6 = this.target.transform.colorTransform;
_local7 = new ColorTransform();
if (_specialVars.alpha != undefined){
_local7.alphaMultiplier = _specialVars.alpha;
delete _specialVars.alpha;
} else {
_local7.alphaMultiplier = this.target.alpha;
};
if (((!((this.vars.removeTint == true))) && (((((!((_specialVars.tint == null))) && (!((_specialVars.tint == ""))))) || ((_specialVars.tint == 0)))))){
_local7.color = _specialVars.tint;
};
addSubTween("tint", tintProxy, {progress:0}, {progress:1}, {target:this.target, color:_local6, endColor:_local7});
};
if (((!((_specialVars.frame == null))) && (_isDisplayObject))){
addSubTween("frame", frameProxy, {frame:this.target.currentFrame}, {frame:_specialVars.frame}, {target:this.target});
};
if (((!(isNaN(this.vars.volume))) && (this.target.hasOwnProperty("soundTransform")))){
addSubTween("volume", volumeProxy, this.target.soundTransform, {volume:this.vars.volume}, {target:this.target});
};
if (((!((_specialVars.visible == null))) && (_isDisplayObject))){
addSubTween("visible", visibleProxy, {}, {}, {tween:this});
};
for (_local3 in _specialVars) {
if ((((((((((((((((((((((((((((((((((((((_local3 == "ease")) || ((_local3 == "delay")))) || ((_local3 == "overwrite")))) || ((_local3 == "onComplete")))) || ((_local3 == "onCompleteParams")))) || ((_local3 == "runBackwards")))) || ((_local3 == "visible")))) || ((_local3 == "autoOverwrite")))) || ((_local3 == "persist")))) || ((_local3 == "onUpdate")))) || ((_local3 == "onUpdateParams")))) || ((_local3 == "autoAlpha")))) || ((((_local3 == "timeScale")) && (!((this.target is TweenLite))))))) || ((_local3 == "onStart")))) || ((_local3 == "onStartParams")))) || ((_local3 == "renderOnStart")))) || ((_local3 == "proxiedEase")))) || ((_local3 == "easeParams")))) || (((_arg1) && (!((_arg2.indexOf(((" " + _local3) + " ")) == -1))))))){
} else {
if (((!(((_isDisplayObject) && ((((((_local3 == "tint")) || ((_local3 == "removeTint")))) || ((_local3 == "frame"))))))) && (!((((_local3 == "volume")) && (this.target.hasOwnProperty("soundTransform"))))))){
if (typeof(_specialVars[_local3]) == "number"){
this.tweens[this.tweens.length] = [this.target, _local3, this.target[_local3], (_specialVars[_local3] - this.target[_local3]), _local3];
} else {
this.tweens[this.tweens.length] = [this.target, _local3, this.target[_local3], Number(_specialVars[_local3]), _local3];
};
};
};
};
};
if (this.vars.runBackwards == true){
_local4 = (this.tweens.length - 1);
while (_local4 > -1) {
_local8 = this.tweens[_local4];
_local8[2] = (_local8[2] + _local8[3]);
_local8[3] = (_local8[3] * -1);
_local4--;
};
};
if (this.vars.onUpdate != null){
_hasUpdate = true;
};
this.initted = true;
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public function killVars(_arg1:Object):void{
if (overwriteManager.enabled){
overwriteManager.killVars(_arg1, this.vars, this.tweens, _subTweens, []);
};
}
public function complete(_arg1:Boolean=false):void{
if (!_arg1){
if (!this.initted){
initTweenVals();
};
this.startTime = (currentTime - ((this.duration * 1000) / this.combinedTimeScale));
render(currentTime);
return;
};
if (this.vars.persist != true){
this.enabled = false;
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
};
}
public static function frameProxy(_arg1:Object, _arg2:Number=0):void{
_arg1.info.target.gotoAndStop(Math.round(_arg1.target.frame));
}
public static function removeTween(_arg1:TweenLite, _arg2:Boolean=true):void{
if (_arg1 != null){
if (_arg2){
_arg1.clear();
};
_arg1.enabled = false;
};
}
public static function visibleProxy(_arg1:Object, _arg2:Number):void{
var _local3:TweenLite = _arg1.info.tween;
if (_local3.duration == _arg2){
if (((!((_local3.vars.runBackwards == true))) && ((_local3.ease == _local3.vars.ease)))){
_local3.target.visible = _local3.vars.visible;
};
} else {
if (_local3.target.visible != true){
_local3.target.visible = true;
};
};
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Array;
var _local4:int;
var _local5:TweenLite;
if (((!((_arg1 == null))) && (!((masterList[_arg1] == undefined))))){
_local3 = masterList[_arg1];
_local4 = (_local3.length - 1);
while (_local4 > -1) {
_local5 = _local3[_local4];
if (((_arg2) && (!(_local5.gc)))){
_local5.complete(false);
};
_local5.clear();
_local4--;
};
delete masterList[_arg1];
};
}
public static function updateAll(_arg1:Event=null):void{
var _local4:Array;
var _local5:int;
var _local6:TweenLite;
var _local2:uint = (currentTime = getTimer());
var _local3:Dictionary = masterList;
for each (_local4 in _local3) {
_local5 = (_local4.length - 1);
while (_local5 > -1) {
_local6 = _local4[_local5];
if (_local6 == null){
} else {
if (_local6.active){
_local6.render(_local2);
} else {
if (_local6.gc){
_local4.splice(_local5, 1);
} else {
if (_local2 >= _local6.startTime){
_local6.activate();
_local6.render(_local2);
};
};
};
};
_local5--;
};
};
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0}));
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function tintProxy(_arg1:Object, _arg2:Number=0):void{
var _local3:Number = _arg1.target.progress;
var _local4:Number = (1 - _local3);
var _local5:Object = _arg1.info.color;
var _local6:Object = _arg1.info.endColor;
_arg1.info.target.transform.colorTransform = new ColorTransform(((_local5.redMultiplier * _local4) + (_local6.redMultiplier * _local3)), ((_local5.greenMultiplier * _local4) + (_local6.greenMultiplier * _local3)), ((_local5.blueMultiplier * _local4) + (_local6.blueMultiplier * _local3)), ((_local5.alphaMultiplier * _local4) + (_local6.alphaMultiplier * _local3)), ((_local5.redOffset * _local4) + (_local6.redOffset * _local3)), ((_local5.greenOffset * _local4) + (_local6.greenOffset * _local3)), ((_local5.blueOffset * _local4) + (_local6.blueOffset * _local3)), ((_local5.alphaOffset * _local4) + (_local6.alphaOffset * _local3)));
}
public static function volumeProxy(_arg1:Object, _arg2:Number=0):void{
_arg1.info.target.soundTransform = _arg1.target;
}
protected static function killGarbage(_arg1:TimerEvent):void{
var _local3:Object;
var _local4:Array;
var _local2:Dictionary = masterList;
for (_local3 in _local2) {
if (_local2[_local3].length == 0){
delete _local2[_local3];
};
};
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package util
Section 43
//XMLManager (util.XMLManager)
package util {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
public class XMLManager extends EventDispatcher {
public var parseLineBreaks:Boolean;// = false
private var _request:URLRequest;
private var _onComplete:Function;
private var _xml:XML;
public var keepRootNode:Boolean;// = false
private var _loaded:Boolean;// = false
private var _loader:URLLoader;
private static var _all:Array = [];
public function XMLManager(){
XML.ignoreWhitespace = (XML.ignoreComments = true);
_loader = new URLLoader();
setupListeners();
_all.push(this);
}
public function destroy():void{
cancel();
_xml = new XML();
var _local1:int = (_all.length - 1);
while (_local1 >= 0) {
if (this == _all[_local1]){
_all.splice(_local1, 1);
break;
};
_local1--;
};
}
private function setupListeners():void{
_loader.addEventListener(Event.COMPLETE, parseLoadedXML);
_loader.addEventListener(Event.OPEN, onEvent);
_loader.addEventListener(ProgressEvent.PROGRESS, onEvent);
_loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, onEvent);
_loader.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
_loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError);
}
private function onIOError(_arg1:IOErrorEvent):void{
trace(("IO error while loading " + _request.url));
_onComplete({target:this, success:false});
}
public function initSendAndLoad(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Boolean=false, _arg5:Boolean=false):void{
var _local6:XML;
_request = new URLRequest(_arg2);
_onComplete = _arg3;
this.keepRootNode = _arg4;
this.parseLineBreaks = _arg5;
if ((_arg1 is XML)){
_local6 = (_arg1 as XML);
} else {
_local6 = objectToXML(_arg1);
};
_xml = new XML();
_loaded = false;
_request.contentType = "text/xml";
_request.data = _xml.toXMLString();
_request.method = URLRequestMethod.POST;
_loader.load(_request);
}
private function onSecurityError(_arg1:SecurityErrorEvent):void{
trace(("Security error while loading " + _request.url));
_onComplete({target:this, success:false});
}
public function initLoad(_arg1:String, _arg2:Function=null, _arg3:Boolean=false, _arg4:Boolean=false):void{
_request = new URLRequest(_arg1);
_onComplete = _arg2;
this.keepRootNode = _arg3;
this.parseLineBreaks = _arg4;
_xml = new XML();
_loaded = false;
_loader.load(_request);
}
public function get bytesTotal():Number{
if (_loaded){
return (((_loader.bytesTotal) || (0)));
};
return (((_loader.bytesTotal) || (0x0400)));
}
public function get xml():XML{
return (_xml);
}
protected function parseLoadedXML(_arg1:Event):void{
_loader.removeEventListener(Event.COMPLETE, parseLoadedXML);
var _local2:URLLoader = (_arg1.target as URLLoader);
if (_local2 == null){
_onComplete({target:this, success:false});
onEvent(new ErrorEvent(ErrorEvent.ERROR, false, false, "Failed to load the XML"));
return;
};
_xml = new XML(_local2.data);
var _local3:Object = XMLToObject(_xml, this.keepRootNode, this.parseLineBreaks);
_onComplete({target:this, success:true, parsedObject:_local3, xml:_xml});
}
public function get bytesLoaded():Number{
return (((_loader.bytesLoaded) || (0)));
}
public function get percentLoaded():Number{
return (((this.bytesLoaded / this.bytesTotal) * 100));
}
public function get progress():Number{
return ((this.bytesLoaded / this.bytesTotal));
}
public function cancel():void{
_loader.close();
}
private function onEvent(_arg1):void{
dispatchEvent(_arg1);
}
private static function clean(_arg1:String, _arg2:Boolean=false):Object{
if (((((!(isNaN(Number(_arg1)))) && (!((_arg1 == ""))))) && (!((_arg1.substr(0, 1) == "0"))))){
return (Number(_arg1));
};
if (_arg2){
return (_arg1.split("\\n").join("\n"));
};
return (_arg1);
}
public static function XMLToObject(_arg1:XML, _arg2:Boolean=false, _arg3:Boolean=false):Object{
var _local8:Object;
var _local9:XMLList;
var _local10:XML;
var _local11:XML;
var _local12:Object;
var _local4:Object = {};
var _local5:Array = [];
var _local6:XML = _arg1.copy();
var _local7:XML = _local6;
if (!_arg2){
_local7 = _local6.children()[(_local6.children().length() - 1)];
_local6 = _local6.children()[0];
};
while (_local6 != null) {
if (_local6.nodeKind() == "element"){
_local8 = {};
if (_local6.text().toString() != ""){
_local8.nodeValue = clean(_local6.text().toString(), _arg3);
};
_local9 = _local6.attributes();
for each (_local10 in _local9) {
_local8[_local10.name().toString()] = clean(_local10, _arg3);
};
if (_local6.parent() == undefined){
_local12 = _local4;
} else {
_local12 = ((_local5[_local6.parent().@_objLookupIndex]) || (_local4));
};
if (_local12[_local6.name()] == undefined){
_local12[_local6.name()] = [];
};
_local12[_local6.name()].push(_local8);
_local6.@_objLookupIndex = _local5.length;
_local5.push(_local8);
};
if (_local6.children().length() != 0){
_local6 = _local6.children()[0];
} else {
_local11 = _local6;
while (((!((_local11.parent() == undefined))) && ((_local11.parent().children().length() < (_local11.childIndex() + 2))))) {
_local11 = _local11.parent();
};
if (((!((_local11.parent() == undefined))) && (!((_local11 == _local7))))){
_local6 = _local11.parent().children()[(_local11.childIndex() + 1)];
} else {
_local6 = null;
};
};
};
return (_local4);
}
public static function sendAndLoad(_arg1:Object, _arg2:String, _arg3:Function=null, _arg4:Boolean=false, _arg5:Boolean=false):XMLManager{
var _local6:XMLManager = new (XMLManager);
_local6.initSendAndLoad(_arg1, _arg2, _arg3, _arg4, _arg5);
return (_local6);
}
public static function load(_arg1:String, _arg2:Function=null, _arg3:Boolean=false, _arg4:Boolean=false):XMLManager{
var _local5:XMLManager = new (XMLManager);
_local5.initLoad(_arg1, _arg2, _arg3, _arg4);
return (_local5);
}
protected static function arrayToNodes(_arg1:Array, _arg2:XML, _arg3:XML, _arg4:String):void{
var _local6:Array;
var _local7:String;
var _local8:XML;
var _local9:Object;
var _local10:int;
var _local11:int;
var _local12:String;
var _local5:Array = [];
_local10 = (_arg1.length - 1);
while (_local10 >= 0) {
_local8 = new XML((("<" + _arg4) + " />"));
_local9 = _arg1[_local10];
_local6 = [];
for (_local12 in _local9) {
_local6.push(_local12);
};
_local11 = (_local6.length - 1);
while (_local11 >= 0) {
_local7 = _local6[_local11];
if ((_local9[_local7] is Array)){
arrayToNodes(_local9[_local7], _local8, _arg3, _local7);
} else {
if (_local7 != "nodeValue"){
_local8.@[_local7] = _local9[_local7];
} else {
_local8.appendChild(new XML(_local9.nodeValue));
};
};
_local11--;
};
_local5.push(_local8);
_local10--;
};
_local10 = (_local5.length - 1);
while (_local10 >= 0) {
_arg2.appendChild(_local5[_local10]);
_local10--;
};
}
public static function objectToXML(_arg1:Object, _arg2:String="XML"):XML{
var _local6:int;
var _local7:*;
var _local8:String;
var _local3:XML = new XML((("<" + _arg2) + " />"));
var _local4:XML = _local3;
var _local5:Array = [];
for (_local8 in _arg1) {
_local5.push(_local8);
};
_local6 = (_local5.length - 1);
while (_local6 > -1) {
_local7 = _local5[_local6];
if ((_arg1[_local7] is Array)){
if (_arg1[_local7].length != 0){
arrayToNodes(_arg1[_local7], _local4, _local3, _local7);
};
} else {
if (_local7 == "nodeValue"){
_local4.appendChild(new XML(_arg1.nodeValue));
} else {
_local4.@[_local7] = _arg1[_local7];
};
};
_local6--;
};
return (_local3);
}
public static function get active():Boolean{
if (_all.length > 0){
return (true);
};
return (false);
}
}
}//package util
Section 44
//Back (Back)
package {
import flash.display.*;
public dynamic class Back extends MovieClip {
public var backAnimation:MovieClip;
}
}//package
Section 45
//LogoModotti (LogoModotti)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class LogoModotti extends MovieClip {
public var link:MovieClip;
public function LogoModotti(){
addFrameScript(0, frame1);
}
public function onClick(_arg1:MouseEvent):void{
var _local2:URLRequest = new URLRequest("http://www.onjogos.com.br");
navigateToURL(_local2, "_blank");
}
function frame1(){
link.addEventListener(MouseEvent.CLICK, onClick);
}
}
}//package
Section 46
//MainBtnContinue (MainBtnContinue)
package {
import flash.display.*;
public dynamic class MainBtnContinue extends MovieClip {
public var mcPT:SimpleButton;
public var mcEN:SimpleButton;
}
}//package
Section 47
//MainBtnRestart (MainBtnRestart)
package {
import flash.display.*;
public dynamic class MainBtnRestart extends MovieClip {
public var mcPT:SimpleButton;
public var mcEN:RestartButton;
}
}//package
Section 48
//MainBtnStartGame (MainBtnStartGame)
package {
import flash.display.*;
public dynamic class MainBtnStartGame extends MovieClip {
public var mcPT:SimpleButton;
public var mcEN:SimpleButton;
}
}//package
Section 49
//McLanguage (McLanguage)
package {
import flash.display.*;
public dynamic class McLanguage extends MovieClip {
public function McLanguage(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 50
//MCSplashScreen (MCSplashScreen)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class MCSplashScreen extends MovieClip {
public var btnSplash:SimpleButton;
public function MCSplashScreen(){
addFrameScript(0, frame1);
}
function frame1(){
btnSplash.addEventListener(MouseEvent.CLICK, onJogos);
}
public function onJogos(_arg1:MouseEvent):void{
var _local2:URLRequest = new URLRequest("http://www.onjogos.com/");
navigateToURL(_local2, "_blank");
}
}
}//package
Section 51
//MoreGames (MoreGames)
package {
import flash.display.*;
public dynamic class MoreGames extends MovieClip {
public var mcPT:MovieClip;
public var mcEN:MovieClip;
}
}//package
Section 52
//MusicIngame (MusicIngame)
package {
import flash.media.*;
public dynamic class MusicIngame extends Sound {
}
}//package
Section 53
//MusicTitle (MusicTitle)
package {
import flash.media.*;
public dynamic class MusicTitle extends Sound {
}
}//package
Section 54
//NameModotti (NameModotti)
package {
import flash.display.*;
public dynamic class NameModotti extends MovieClip {
}
}//package
Section 55
//RestartButton (RestartButton)
package {
import flash.display.*;
public dynamic class RestartButton extends SimpleButton {
}
}//package
Section 56
//Sfx1 (Sfx1)
package {
import flash.media.*;
public dynamic class Sfx1 extends Sound {
}
}//package
Section 57
//SfxBlockIn (SfxBlockIn)
package {
import flash.media.*;
public dynamic class SfxBlockIn extends Sound {
}
}//package
Section 58
//SfxChange (SfxChange)
package {
import flash.media.*;
public dynamic class SfxChange extends Sound {
}
}//package
Section 59
//SfxGameOver (SfxGameOver)
package {
import flash.media.*;
public dynamic class SfxGameOver extends Sound {
}
}//package
Section 60
//SfxImpact (SfxImpact)
package {
import flash.media.*;
public dynamic class SfxImpact extends Sound {
}
}//package
Section 61
//SfxMove (SfxMove)
package {
import flash.media.*;
public dynamic class SfxMove extends Sound {
}
}//package
Section 62
//SfxStageClear (SfxStageClear)
package {
import flash.media.*;
public dynamic class SfxStageClear extends Sound {
}
}//package
Section 63
//SoundIcon (SoundIcon)
package {
import flash.display.*;
public dynamic class SoundIcon extends MovieClip {
public function SoundIcon(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 64
//StageNo (StageNo)
package {
import flash.display.*;
import flash.text.*;
public dynamic class StageNo extends MovieClip {
public var TxtNo:TextField;
public var TxtLevel:TextField;
}
}//package
Section 65
//ThankYouEN (ThankYouEN)
package {
import flash.display.*;
public dynamic class ThankYouEN extends MovieClip {
}
}//package
Section 66
//ThankYouPT (ThankYouPT)
package {
import flash.display.*;
public dynamic class ThankYouPT extends MovieClip {
}
}//package
Section 67
//Title (Title)
package {
import flash.display.*;
public dynamic class Title extends MovieClip {
}
}//package