Skip to content

Instantly share code, notes, and snippets.

@eXponenta
Created October 26, 2020 15:50
Show Gist options
  • Save eXponenta/4a8beb629d78e6825e8d54beac17e525 to your computer and use it in GitHub Desktop.
Save eXponenta/4a8beb629d78e6825e8d54beac17e525 to your computer and use it in GitHub Desktop.
Mdaaa
package
{
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.net.SharedObject;
import flash.net.URLRequest;
import flash.net.navigateToURL;
public class sugarsugar3 extends MovieClip
{
public static const STATE_INIT_INTRO:int = 55;
public var lvl:int = 1;
public var hoogste:int = 1;
private var savelvl:int;
private var canvasWidth:int;
private var canvasHeight:int;
private var globalscalefactor:Number;
private var tekendikte:Number;
private var testGrad:Sprite;
private var lineSprite:Sprite;
private var lineSprite2:Sprite;
private var screenSprite:Sprite;
private const sugarkleur:uint = 4.294967295E9;
private const oranjekleur:uint = 4.294936576E9;
private const groenkleur:uint = 4.281597696E9;
private const rozekleur:uint = 4.294928127E9;
private const blauwkleur:uint = 4.282636799E9;
private var tekenkleur:uint = 8047341;
private var tekenkleurecht:uint = 14462029;
private var backkleur:uint = 476523;
private var finalBmp:BitmapData;
private var screenBmp:BitmapData;
private var suikerBmp:BitmapData;
private var finalSprite:Sprite;
private var suiker:Array;
private var numSugar:int;
private var numSugarMax:int;
private var valdelay:int;
private var enddelay:int;
private var gravitatie:int;
private var leveldone:Boolean;
private var indivvaldelay:int;
private var maxindivvaldelay:int;
private var suikerstartx:int;
private var suikerstarty:int;
private var zscherm:MovieClip;
private var zscherm2:MovieClip;
private var tel1:int;
private var tel2:int;
private var tel3:int;
private var tel4:int;
private var tel5:int;
private var tel6:int;
private var tel7:int;
private var tel8:int;
private var tel9:int;
private var tel10:int;
private var rechts1:Boolean;
private var rechts2:Boolean;
private var links1:Boolean;
private var links2:Boolean;
private var gravitknop:MovieClip;
private var nextknop:MovieClip;
private var stagebscherm;
private var knop_bolbb:MovieClip;
private var knop_bolblog:MovieClip;
private var knop_boltwitter:MovieClip;
private var knop_bolinstagram:MovieClip;
private var knop_bolfacebook:MovieClip;
private var knop_bolapple:MovieClip;
private var knop_bolgoogle:MovieClip;
private var knop_bolamazon:MovieClip;
private var knop_bolbartbonte:MovieClip;
private var knop_bolplay:MovieClip;
public var sugarshared:SharedObject;
private var retryknop:MovieClip;
private var quitknop:MovieClip;
private var levelup:Boolean;
private var quitit:Boolean;
private var groenknop:MovieClip;
private var geelknop:MovieClip;
private var blauwknop:MovieClip;
private var oranjeknop:MovieClip;
private var rozeknop:MovieClip;
private var bruinknop:MovieClip;
private var knop_muziek:MovieClip;
public var sugarSong:Sound;
public var myChannel:SoundChannel;
public var sugarSongPlaying:Boolean = false;
public var okSound:Sound;
public var koSound:Sound;
private var mc_loading:MovieClip;
var abs;
public var gameState:int = 0;
private var stageWidth:int;
private var stageHeight:int;
private var scalefactor:Number;
private var sceneBed:MovieClip;
private var bedSceneTeller:int = 0;
private var pauzetel:int = 0;
private var c1_xa:Number;
private var c1_xb:Number;
private var c1_ya:Number;
private var c1_yb:Number;
private var c2_xa:Number;
private var c2_xb:Number;
private var c2_ya:Number;
private var c2_yb:Number;
private var c3_xa:Number;
private var c3_xb:Number;
private var c3_ya:Number;
private var c3_yb:Number;
private var c4_xa:Number;
private var c4_xb:Number;
private var c4_ya:Number;
private var c4_yb:Number;
private var c5_xa:Number;
private var c5_xb:Number;
private var c5_ya:Number;
private var c5_yb:Number;
private var c6_xa:Number;
private var c6_xb:Number;
private var c6_ya:Number;
private var c6_yb:Number;
private var c7_xa:Number;
private var c7_xb:Number;
private var c7_ya:Number;
private var c7_yb:Number;
private var c8_xa:Number;
private var c8_xb:Number;
private var c8_ya:Number;
private var c8_yb:Number;
private var c9_xa:Number;
private var c9_xb:Number;
private var c9_ya:Number;
private var c9_yb:Number;
private var c10_xa:Number;
private var c10_xb:Number;
private var c10_ya:Number;
private var c10_yb:Number;
private var f1_xa:Number;
private var f1_xb:Number;
private var f1_ya:Number;
private var f1_yb:Number;
private var f2_xa:Number;
private var f2_xb:Number;
private var f2_ya:Number;
private var f2_yb:Number;
private var f3_xa:Number;
private var f3_xb:Number;
private var f3_ya:Number;
private var f3_yb:Number;
private var f4_xa:Number;
private var f4_xb:Number;
private var f4_ya:Number;
private var f4_yb:Number;
private var t1_xa:Number;
private var t1_xb:Number;
private var t1_ya:Number;
private var t1_yb:Number;
private var t2_xa:Number;
private var t2_xb:Number;
private var t2_ya:Number;
private var t2_yb:Number;
private var t3_xa:Number;
private var t3_xb:Number;
private var t3_ya:Number;
private var t3_yb:Number;
private var to1_x:Number;
private var to1_y:Number;
private var to2_x:Number;
private var to2_y:Number;
private var to3_x:Number;
private var to3_y:Number;
public function sugarsugar3()
{
this.stagebscherm = new zwartscherm();
super();
addFrameScript(0,this.frame1,2,this.frame3,3,this.frame4);
this.mc_loading = new loadingscherm();
this.mc_loading.x = 400;
this.mc_loading.y = 5 * 60;
addChild(this.mc_loading);
addEventListener(Event.ENTER_FRAME,this.handleProgress);
}
private function handleProgress(param1:Event) : void
{
var _loc2_:Number = stage.loaderInfo.bytesLoaded;
var _loc3_:Number = stage.loaderInfo.bytesTotal;
var _loc4_:Number = _loc2_ / _loc3_;
this.UpdateProgress(_loc4_);
if(_loc2_ >= _loc3_)
{
removeEventListener(Event.ENTER_FRAME,this.handleProgress);
addEventListener(Event.ENTER_FRAME,this.gameLoop);
gotoAndPlay(4);
}
}
private function UpdateProgress(param1:Number) : void
{
this.mc_loading.persent.text = Math.floor(100 * param1);
}
private function gameLoop(param1:Event) : void
{
switch(this.gameState)
{
case STATE_INIT_INTRO:
this.init();
}
}
private function init() : void
{
removeEventListener(Event.ENTER_FRAME,this.gameLoop);
this.initBBGame();
}
private function initBBGame() : void
{
this.stageWidth = 800;
this.stageHeight = 10 * 60;
this.sceneBed = new scene_abbgame();
this.scalefactor = this.stageHeight / 10 * 60;
this.sceneBed.width = this.sceneBed.width * this.scalefactor;
this.sceneBed.height = this.sceneBed.height * this.scalefactor;
this.sceneBed.x = this.stageWidth / 2;
this.sceneBed.y = this.stageHeight / 2;
addChild(this.sceneBed);
this.sceneBed.fadeinmovie.gotoAndPlay(2);
this.bedSceneTeller = 0;
this.pauzetel = 100;
addEventListener(Event.ENTER_FRAME,this.bbGameChecker);
}
private function bbGameChecker(param1:Event) : void
{
if(this.pauzetel < 30)
{
this.pauzetel++;
if(this.pauzetel == 30)
{
this.bedSceneTeller++;
}
}
switch(this.bedSceneTeller)
{
case 0:
this.pauzetel = -70;
this.bedSceneTeller = 1;
break;
case 2:
this.sceneBed.fadeoutmovie.gotoAndPlay(2);
this.bedSceneTeller = 3;
break;
case 3:
if(this.sceneBed.fadeoutmovie.fadedone)
{
removeEventListener(Event.ENTER_FRAME,this.bbGameChecker);
removeChild(this.sceneBed);
this.sceneBed = null;
this.initGame();
break;
}
}
}
private function initGame() : void
{
this.sugarSong = new SugarSong();
this.myChannel = this.sugarSong.play(0,9999);
this.sugarSongPlaying = true;
this.okSound = new OkSound();
this.koSound = new ko_Sound();
this.sugarshared = SharedObject.getLocal("sugar3shared");
if(this.sugarshared.data.hoogste != undefined && this.sugarshared.data.hoogste > 1)
{
this.hoogste = this.sugarshared.data.hoogste;
}
this.globalscalefactor = 2;
this.tekendikte = 2;
this.canvasWidth = 800 / this.globalscalefactor;
this.canvasHeight = 10 * 60 / this.globalscalefactor;
this.testGrad = new testgrad();
this.testGrad.x = 400;
this.testGrad.y = 5 * 60;
addChild(this.testGrad);
this.zscherm = new zschermfr();
this.zscherm.width = this.zscherm.width * (1 / this.globalscalefactor);
this.zscherm.height = this.zscherm.height * (1 / this.globalscalefactor);
this.zscherm2 = new zschermf();
this.stagebscherm.scaleX = 2;
this.stagebscherm.scaleY = 2;
stage.addChild(this.stagebscherm);
this.stagebscherm.alpha = 1;
this.lvl = 32;
this.levelup = true;
this.quitit = false;
this.initLevel();
}
public function onRetryClickEvent(param1:MouseEvent) : *
{
this.levelup = false;
this.quitit = false;
this.enddelay = 1;
this.leveldone = true;
}
public function onQuitClickEvent(param1:MouseEvent) : *
{
this.levelup = false;
this.quitit = true;
this.enddelay = 1;
this.leveldone = true;
}
private function initLevel() : void
{
this.levelup = true;
this.quitit = false;
this.stagebscherm.x = 0;
this.lineSprite = new Sprite();
this.lineSprite2 = new Sprite();
this.screenSprite = new Sprite();
this.lineSprite.graphics.lineStyle(2,this.tekenkleur,1);
this.lineSprite2.graphics.lineStyle(2,this.tekenkleurecht,1);
this.finalBmp = new BitmapData(this.canvasWidth,this.canvasHeight,true,this.backkleur);
this.screenBmp = new BitmapData(this.canvasWidth,this.canvasHeight,true,this.backkleur);
this.suikerBmp = new BitmapData(this.canvasWidth,this.canvasHeight,true,this.backkleur);
this.screenSprite.addChild(this.lineSprite);
this.screenSprite.addChild(new Bitmap(this.suikerBmp));
this.screenSprite.scaleX = this.globalscalefactor;
this.screenSprite.scaleY = this.globalscalefactor;
this.finalSprite = new Sprite();
this.finalSprite.addChild(new Bitmap(this.finalBmp));
this.finalSprite.scaleX = this.globalscalefactor;
this.finalSprite.scaleY = this.globalscalefactor;
this.finalSprite.addChild(this.lineSprite2);
addChild(this.finalSprite);
this.initIndivLevel();
if(this.lvl >= 1 && this.lvl <= 30)
{
this.retryknop = new buttonretry();
this.retryknop.x = 400 + 356;
this.retryknop.y = 5 * 60 - 175;
this.retryknop.buttonMode = true;
this.retryknop.useHandCursor = true;
stage.addChild(this.retryknop);
this.retryknop.addEventListener(MouseEvent.CLICK,this.onRetryClickEvent);
this.quitknop = new buttonquit();
this.quitknop.x = 400 + 356;
this.quitknop.y = 5 * 60 - 225;
this.quitknop.buttonMode = true;
this.quitknop.useHandCursor = true;
stage.addChild(this.quitknop);
this.quitknop.addEventListener(MouseEvent.CLICK,this.onQuitClickEvent);
}
if(this.lvl == 4 || this.lvl == 9 || this.lvl == 11 || this.lvl == 12 || this.lvl == 14 || this.lvl == 15 || this.lvl == 16 || this.lvl == 18 || this.lvl == 19 || this.lvl == 20 || this.lvl == 21 || this.lvl == 22 || this.lvl == 24 || this.lvl == 26 || this.lvl == 27 || this.lvl == 28 || this.lvl == 29)
{
this.gravitknop = new buttongravitatie();
this.gravitknop.x = 400 + this.zscherm2.gravit.x;
this.gravitknop.y = 5 * 60 + this.zscherm2.gravit.y;
this.gravitknop.buttonMode = true;
this.gravitknop.useHandCursor = true;
stage.addChild(this.gravitknop);
this.gravitknop.addEventListener(MouseEvent.CLICK,this.onGravitClickEvent);
}
if(this.lvl == 31)
{
this.retryknop = new buttonretry();
this.retryknop.x = 400 - 224;
this.retryknop.y = 5 * 60 + 90;
this.retryknop.buttonMode = true;
this.retryknop.useHandCursor = true;
stage.addChild(this.retryknop);
this.retryknop.addEventListener(MouseEvent.CLICK,this.onRetryClickEvent);
this.groenknop = new buttongroen();
this.groenknop.x = 400 - 316;
this.groenknop.y = 5 * 60 + 78;
this.groenknop.buttonMode = true;
this.groenknop.useHandCursor = true;
stage.addChild(this.groenknop);
this.groenknop.addEventListener(MouseEvent.CLICK,this.onGroenClickEvent);
this.geelknop = new buttongeel();
this.geelknop.x = 400 - 291;
this.geelknop.y = 5 * 60 + 78;
this.geelknop.buttonMode = true;
this.geelknop.useHandCursor = true;
stage.addChild(this.geelknop);
this.geelknop.addEventListener(MouseEvent.CLICK,this.onGeelClickEvent);
this.blauwknop = new buttonblauw();
this.blauwknop.x = 400 - 266;
this.blauwknop.y = 5 * 60 + 78;
this.blauwknop.buttonMode = true;
this.blauwknop.useHandCursor = true;
stage.addChild(this.blauwknop);
this.blauwknop.addEventListener(MouseEvent.CLICK,this.onBlauwClickEvent);
this.oranjeknop = new buttonoranje();
this.oranjeknop.x = 400 - 316;
this.oranjeknop.y = 5 * 60 + 103;
this.oranjeknop.buttonMode = true;
this.oranjeknop.useHandCursor = true;
stage.addChild(this.oranjeknop);
this.oranjeknop.addEventListener(MouseEvent.CLICK,this.onOranjeClickEvent);
this.rozeknop = new buttonroze();
this.rozeknop.x = 400 - 291;
this.rozeknop.y = 5 * 60 + 103;
this.rozeknop.buttonMode = true;
this.rozeknop.useHandCursor = true;
stage.addChild(this.rozeknop);
this.rozeknop.addEventListener(MouseEvent.CLICK,this.onRozeClickEvent);
this.bruinknop = new buttonbruin();
this.bruinknop.x = 400 - 266;
this.bruinknop.y = 5 * 60 + 103;
this.bruinknop.buttonMode = true;
this.bruinknop.useHandCursor = true;
stage.addChild(this.bruinknop);
this.bruinknop.addEventListener(MouseEvent.CLICK,this.onBruinClickEvent);
this.knop_bolbb = new bolbb();
this.knop_bolbb.width = 36;
this.knop_bolbb.height = 36;
this.knop_bolbb.x = 400 + this.zscherm2.bol_bb.x;
this.knop_bolbb.y = 5 * 60 + this.zscherm2.bol_bb.y;
this.knop_bolbb.buttonMode = true;
this.knop_bolbb.useHandCursor = true;
stage.addChild(this.knop_bolbb);
this.knop_bolbb.addEventListener(MouseEvent.CLICK,this.onBolbbClickEvent);
this.knop_bolblog = new bolblog();
this.knop_bolblog.width = 36;
this.knop_bolblog.height = 36;
this.knop_bolblog.x = 400 + this.zscherm2.bol_blog.x;
this.knop_bolblog.y = 5 * 60 + this.zscherm2.bol_blog.y;
this.knop_bolblog.buttonMode = true;
this.knop_bolblog.useHandCursor = true;
stage.addChild(this.knop_bolblog);
this.knop_bolblog.addEventListener(MouseEvent.CLICK,this.onBolblogClickEvent);
this.knop_boltwitter = new boltwitter();
this.knop_boltwitter.width = 36;
this.knop_boltwitter.height = 36;
this.knop_boltwitter.x = 400 + this.zscherm2.bol_twitter.x;
this.knop_boltwitter.y = 5 * 60 + this.zscherm2.bol_twitter.y;
this.knop_boltwitter.buttonMode = true;
this.knop_boltwitter.useHandCursor = true;
stage.addChild(this.knop_boltwitter);
this.knop_boltwitter.addEventListener(MouseEvent.CLICK,this.onBoltwitterClickEvent);
this.knop_bolinstagram = new bolinstagram();
this.knop_bolinstagram.width = 36;
this.knop_bolinstagram.height = 36;
this.knop_bolinstagram.x = 400 + this.zscherm2.bol_instagram.x;
this.knop_bolinstagram.y = 5 * 60 + this.zscherm2.bol_instagram.y;
this.knop_bolinstagram.buttonMode = true;
this.knop_bolinstagram.useHandCursor = true;
stage.addChild(this.knop_bolinstagram);
this.knop_bolinstagram.addEventListener(MouseEvent.CLICK,this.onBolinstagramClickEvent);
this.knop_bolfacebook = new bolfacebook();
this.knop_bolfacebook.width = 36;
this.knop_bolfacebook.height = 36;
this.knop_bolfacebook.x = 400 + this.zscherm2.bol_facebook.x;
this.knop_bolfacebook.y = 5 * 60 + this.zscherm2.bol_facebook.y;
this.knop_bolfacebook.buttonMode = true;
this.knop_bolfacebook.useHandCursor = true;
stage.addChild(this.knop_bolfacebook);
this.knop_bolfacebook.addEventListener(MouseEvent.CLICK,this.onBolfacebookClickEvent);
this.knop_bolapple = new bolapple();
this.knop_bolapple.x = 400 + this.zscherm2.bol_apple.x;
this.knop_bolapple.y = 5 * 60 + this.zscherm2.bol_apple.y;
this.knop_bolapple.buttonMode = true;
this.knop_bolapple.useHandCursor = true;
stage.addChild(this.knop_bolapple);
this.knop_bolapple.addEventListener(MouseEvent.CLICK,this.onBolappleClickEvent);
this.knop_bolgoogle = new bolgoogle();
this.knop_bolgoogle.x = 400 + this.zscherm2.bol_google.x;
this.knop_bolgoogle.y = 5 * 60 + this.zscherm2.bol_google.y;
this.knop_bolgoogle.buttonMode = true;
this.knop_bolgoogle.useHandCursor = true;
stage.addChild(this.knop_bolgoogle);
this.knop_bolgoogle.addEventListener(MouseEvent.CLICK,this.onBolgoogleClickEvent);
this.knop_bolamazon = new bolamazon();
this.knop_bolamazon.x = 400 + this.zscherm2.bol_amazon.x;
this.knop_bolamazon.y = 5 * 60 + this.zscherm2.bol_amazon.y;
this.knop_bolamazon.buttonMode = true;
this.knop_bolamazon.useHandCursor = true;
stage.addChild(this.knop_bolamazon);
this.knop_bolamazon.addEventListener(MouseEvent.CLICK,this.onBolamazonClickEvent);
}
if(this.lvl == 32)
{
this.knop_bolbb = new bolbb();
this.knop_bolbb.width = 36;
this.knop_bolbb.height = 36;
this.knop_bolbb.x = 400 + this.zscherm2.bol_bb.x;
this.knop_bolbb.y = 5 * 60 + this.zscherm2.bol_bb.y;
this.knop_bolbb.buttonMode = true;
this.knop_bolbb.useHandCursor = true;
stage.addChild(this.knop_bolbb);
this.knop_bolbb.addEventListener(MouseEvent.CLICK,this.onBolbbClickEvent);
this.knop_bolblog = new bolblog();
this.knop_bolblog.width = 36;
this.knop_bolblog.height = 36;
this.knop_bolblog.x = 400 + this.zscherm2.bol_blog.x;
this.knop_bolblog.y = 5 * 60 + this.zscherm2.bol_blog.y;
this.knop_bolblog.buttonMode = true;
this.knop_bolblog.useHandCursor = true;
stage.addChild(this.knop_bolblog);
this.knop_bolblog.addEventListener(MouseEvent.CLICK,this.onBolblogClickEvent);
this.knop_boltwitter = new boltwitter();
this.knop_boltwitter.width = 36;
this.knop_boltwitter.height = 36;
this.knop_boltwitter.x = 400 + this.zscherm2.bol_twitter.x;
this.knop_boltwitter.y = 5 * 60 + this.zscherm2.bol_twitter.y;
this.knop_boltwitter.buttonMode = true;
this.knop_boltwitter.useHandCursor = true;
stage.addChild(this.knop_boltwitter);
this.knop_boltwitter.addEventListener(MouseEvent.CLICK,this.onBoltwitterClickEvent);
this.knop_bolinstagram = new bolinstagram();
this.knop_bolinstagram.width = 36;
this.knop_bolinstagram.height = 36;
this.knop_bolinstagram.x = 400 + this.zscherm2.bol_instagram.x;
this.knop_bolinstagram.y = 5 * 60 + this.zscherm2.bol_instagram.y;
this.knop_bolinstagram.buttonMode = true;
this.knop_bolinstagram.useHandCursor = true;
stage.addChild(this.knop_bolinstagram);
this.knop_bolinstagram.addEventListener(MouseEvent.CLICK,this.onBolinstagramClickEvent);
this.knop_bolfacebook = new bolfacebook();
this.knop_bolfacebook.width = 36;
this.knop_bolfacebook.height = 36;
this.knop_bolfacebook.x = 400 + this.zscherm2.bol_facebook.x;
this.knop_bolfacebook.y = 5 * 60 + this.zscherm2.bol_facebook.y;
this.knop_bolfacebook.buttonMode = true;
this.knop_bolfacebook.useHandCursor = true;
stage.addChild(this.knop_bolfacebook);
this.knop_bolfacebook.addEventListener(MouseEvent.CLICK,this.onBolfacebookClickEvent);
this.knop_bolapple = new bolapple();
this.knop_bolapple.x = 400 + this.zscherm2.bol_apple.x;
this.knop_bolapple.y = 5 * 60 + this.zscherm2.bol_apple.y;
this.knop_bolapple.buttonMode = true;
this.knop_bolapple.useHandCursor = true;
stage.addChild(this.knop_bolapple);
this.knop_bolapple.addEventListener(MouseEvent.CLICK,this.onBolappleClickEvent);
this.knop_bolgoogle = new bolgoogle();
this.knop_bolgoogle.x = 400 + this.zscherm2.bol_google.x;
this.knop_bolgoogle.y = 5 * 60 + this.zscherm2.bol_google.y;
this.knop_bolgoogle.buttonMode = true;
this.knop_bolgoogle.useHandCursor = true;
stage.addChild(this.knop_bolgoogle);
this.knop_bolgoogle.addEventListener(MouseEvent.CLICK,this.onBolgoogleClickEvent);
this.knop_bolamazon = new bolamazon();
this.knop_bolamazon.x = 400 + this.zscherm2.bol_amazon.x;
this.knop_bolamazon.y = 5 * 60 + this.zscherm2.bol_amazon.y;
this.knop_bolamazon.buttonMode = true;
this.knop_bolamazon.useHandCursor = true;
stage.addChild(this.knop_bolamazon);
this.knop_bolamazon.addEventListener(MouseEvent.CLICK,this.onBolamazonClickEvent);
this.knop_bolbartbonte = new bolbartbonte();
this.knop_bolbartbonte.x = 400 + this.zscherm2.bol_bartbonte.x;
this.knop_bolbartbonte.y = 5 * 60 + this.zscherm2.bol_bartbonte.y;
this.knop_bolbartbonte.buttonMode = true;
this.knop_bolbartbonte.useHandCursor = true;
this.knop_bolbartbonte.alpha = 0;
stage.addChild(this.knop_bolbartbonte);
this.knop_bolbartbonte.addEventListener(MouseEvent.CLICK,this.onBolbartbonteClickEvent);
this.knop_bolplay = new bolplay();
this.knop_bolplay.x = 400 + this.zscherm2.bol_play.x;
this.knop_bolplay.y = 5 * 60 + this.zscherm2.bol_play.y;
this.knop_bolplay.buttonMode = true;
this.knop_bolplay.useHandCursor = true;
stage.addChild(this.knop_bolplay);
this.knop_bolplay.addEventListener(MouseEvent.CLICK,this.onBolplayClickEvent);
this.knop_muziek = new buttonmuziek();
this.knop_muziek.x = 400 + this.zscherm2.button_muziek.x;
this.knop_muziek.y = 5 * 60 + this.zscherm2.button_muziek.y;
this.knop_muziek.buttonMode = true;
this.knop_muziek.useHandCursor = true;
stage.addChild(this.knop_muziek);
this.knop_muziek.addEventListener(MouseEvent.CLICK,this.onKnopmuziekClickEvent);
if(this.sugarSongPlaying)
{
this.zscherm2.button_muziek.speakersound.visible = true;
this.knop_muziek.speakersound.visible = true;
}
else
{
this.zscherm2.button_muziek.speakersound.visible = false;
this.knop_muziek.speakersound.visible = false;
}
}
if(this.lvl == 33)
{
this.zscherm2.lvlbl1.alpha = 0;
this.zscherm2.lvlbl2.alpha = 0;
this.zscherm2.lvlbl3.alpha = 0;
this.zscherm2.lvlbl4.alpha = 0;
this.zscherm2.lvlbl5.alpha = 0;
this.zscherm2.lvlbl6.alpha = 0;
this.zscherm2.lvlbl7.alpha = 0;
this.zscherm2.lvlbl8.alpha = 0;
this.zscherm2.lvlbl9.alpha = 0;
this.zscherm2.lvlbl10.alpha = 0;
this.zscherm2.lvlbl11.alpha = 0;
this.zscherm2.lvlbl12.alpha = 0;
this.zscherm2.lvlbl13.alpha = 0;
this.zscherm2.lvlbl14.alpha = 0;
this.zscherm2.lvlbl15.alpha = 0;
this.zscherm2.lvlbl16.alpha = 0;
this.zscherm2.lvlbl17.alpha = 0;
this.zscherm2.lvlbl18.alpha = 0;
this.zscherm2.lvlbl19.alpha = 0;
this.zscherm2.lvlbl20.alpha = 0;
this.zscherm2.lvlbl21.alpha = 0;
this.zscherm2.lvlbl22.alpha = 0;
this.zscherm2.lvlbl23.alpha = 0;
this.zscherm2.lvlbl24.alpha = 0;
this.zscherm2.lvlbl25.alpha = 0;
this.zscherm2.lvlbl26.alpha = 0;
this.zscherm2.lvlbl27.alpha = 0;
this.zscherm2.lvlbl28.alpha = 0;
this.zscherm2.lvlbl29.alpha = 0;
this.zscherm2.lvlbl30.alpha = 0;
this.zscherm2.btnlevel1.locksymb.visible = false;
this.zscherm2.btnlevel1.lvltxt.text = "1";
this.zscherm2.lvlbl1.buttonMode = true;
this.zscherm2.lvlbl1.useHandCursor = true;
this.zscherm2.lvlbl1.addEventListener(MouseEvent.CLICK,this.onLevel1ClickEvent);
if(this.hoogste >= 2)
{
this.zscherm2.btnlevel2.locksymb.visible = false;
this.zscherm2.btnlevel2.lvltxt.text = "2";
this.zscherm2.lvlbl2.buttonMode = true;
this.zscherm2.lvlbl2.useHandCursor = true;
this.zscherm2.lvlbl2.addEventListener(MouseEvent.CLICK,this.onLevel2ClickEvent);
}
if(this.hoogste >= 3)
{
this.zscherm2.btnlevel3.locksymb.visible = false;
this.zscherm2.btnlevel3.lvltxt.text = "3";
this.zscherm2.lvlbl3.buttonMode = true;
this.zscherm2.lvlbl3.useHandCursor = true;
this.zscherm2.lvlbl3.addEventListener(MouseEvent.CLICK,this.onLevel3ClickEvent);
}
if(this.hoogste >= 4)
{
this.zscherm2.btnlevel4.locksymb.visible = false;
this.zscherm2.btnlevel4.lvltxt.text = "4";
this.zscherm2.lvlbl4.buttonMode = true;
this.zscherm2.lvlbl4.useHandCursor = true;
this.zscherm2.lvlbl4.addEventListener(MouseEvent.CLICK,this.onLevel4ClickEvent);
}
if(this.hoogste >= 5)
{
this.zscherm2.btnlevel5.locksymb.visible = false;
this.zscherm2.btnlevel5.lvltxt.text = "5";
this.zscherm2.lvlbl5.buttonMode = true;
this.zscherm2.lvlbl5.useHandCursor = true;
this.zscherm2.lvlbl5.addEventListener(MouseEvent.CLICK,this.onLevel5ClickEvent);
}
if(this.hoogste >= 6)
{
this.zscherm2.btnlevel6.locksymb.visible = false;
this.zscherm2.btnlevel6.lvltxt.text = "6";
this.zscherm2.lvlbl6.buttonMode = true;
this.zscherm2.lvlbl6.useHandCursor = true;
this.zscherm2.lvlbl6.addEventListener(MouseEvent.CLICK,this.onLevel6ClickEvent);
}
if(this.hoogste >= 7)
{
this.zscherm2.btnlevel7.locksymb.visible = false;
this.zscherm2.btnlevel7.lvltxt.text = "7";
this.zscherm2.lvlbl7.buttonMode = true;
this.zscherm2.lvlbl7.useHandCursor = true;
this.zscherm2.lvlbl7.addEventListener(MouseEvent.CLICK,this.onLevel7ClickEvent);
}
if(this.hoogste >= 8)
{
this.zscherm2.btnlevel8.locksymb.visible = false;
this.zscherm2.btnlevel8.lvltxt.text = "8";
this.zscherm2.lvlbl8.buttonMode = true;
this.zscherm2.lvlbl8.useHandCursor = true;
this.zscherm2.lvlbl8.addEventListener(MouseEvent.CLICK,this.onLevel8ClickEvent);
}
if(this.hoogste >= 9)
{
this.zscherm2.btnlevel9.locksymb.visible = false;
this.zscherm2.btnlevel9.lvltxt.text = "9";
this.zscherm2.lvlbl9.buttonMode = true;
this.zscherm2.lvlbl9.useHandCursor = true;
this.zscherm2.lvlbl9.addEventListener(MouseEvent.CLICK,this.onLevel9ClickEvent);
}
if(this.hoogste >= 10)
{
this.zscherm2.btnlevel10.locksymb.visible = false;
this.zscherm2.btnlevel10.lvltxt.text = "10";
this.zscherm2.lvlbl10.buttonMode = true;
this.zscherm2.lvlbl10.useHandCursor = true;
this.zscherm2.lvlbl10.addEventListener(MouseEvent.CLICK,this.onLevel10ClickEvent);
}
if(this.hoogste >= 11)
{
this.zscherm2.btnlevel11.locksymb.visible = false;
this.zscherm2.btnlevel11.lvltxt.text = "11";
this.zscherm2.lvlbl11.buttonMode = true;
this.zscherm2.lvlbl11.useHandCursor = true;
this.zscherm2.lvlbl11.addEventListener(MouseEvent.CLICK,this.onLevel11ClickEvent);
}
if(this.hoogste >= 12)
{
this.zscherm2.btnlevel12.locksymb.visible = false;
this.zscherm2.btnlevel12.lvltxt.text = "12";
this.zscherm2.lvlbl12.buttonMode = true;
this.zscherm2.lvlbl12.useHandCursor = true;
this.zscherm2.lvlbl12.addEventListener(MouseEvent.CLICK,this.onLevel12ClickEvent);
}
if(this.hoogste >= 13)
{
this.zscherm2.btnlevel13.locksymb.visible = false;
this.zscherm2.btnlevel13.lvltxt.text = "13";
this.zscherm2.lvlbl13.buttonMode = true;
this.zscherm2.lvlbl3.useHandCursor = true;
this.zscherm2.lvlbl13.addEventListener(MouseEvent.CLICK,this.onLevel13ClickEvent);
}
if(this.hoogste >= 14)
{
this.zscherm2.btnlevel14.locksymb.visible = false;
this.zscherm2.btnlevel14.lvltxt.text = "14";
this.zscherm2.lvlbl14.buttonMode = true;
this.zscherm2.lvlbl14.useHandCursor = true;
this.zscherm2.lvlbl14.addEventListener(MouseEvent.CLICK,this.onLevel14ClickEvent);
}
if(this.hoogste >= 15)
{
this.zscherm2.btnlevel15.locksymb.visible = false;
this.zscherm2.btnlevel15.lvltxt.text = "15";
this.zscherm2.lvlbl15.buttonMode = true;
this.zscherm2.lvlbl15.useHandCursor = true;
this.zscherm2.lvlbl15.addEventListener(MouseEvent.CLICK,this.onLevel15ClickEvent);
}
if(this.hoogste >= 16)
{
this.zscherm2.btnlevel16.locksymb.visible = false;
this.zscherm2.btnlevel16.lvltxt.text = "16";
this.zscherm2.lvlbl16.buttonMode = true;
this.zscherm2.lvlbl16.useHandCursor = true;
this.zscherm2.lvlbl16.addEventListener(MouseEvent.CLICK,this.onLevel16ClickEvent);
}
if(this.hoogste >= 17)
{
this.zscherm2.btnlevel17.locksymb.visible = false;
this.zscherm2.btnlevel17.lvltxt.text = "17";
this.zscherm2.lvlbl17.buttonMode = true;
this.zscherm2.lvlbl17.useHandCursor = true;
this.zscherm2.lvlbl17.addEventListener(MouseEvent.CLICK,this.onLevel17ClickEvent);
}
if(this.hoogste >= 18)
{
this.zscherm2.btnlevel18.locksymb.visible = false;
this.zscherm2.btnlevel18.lvltxt.text = "18";
this.zscherm2.lvlbl18.buttonMode = true;
this.zscherm2.lvlbl18.useHandCursor = true;
this.zscherm2.lvlbl18.addEventListener(MouseEvent.CLICK,this.onLevel18ClickEvent);
}
if(this.hoogste >= 19)
{
this.zscherm2.btnlevel19.locksymb.visible = false;
this.zscherm2.btnlevel19.lvltxt.text = "19";
this.zscherm2.lvlbl19.buttonMode = true;
this.zscherm2.lvlbl19.useHandCursor = true;
this.zscherm2.lvlbl19.addEventListener(MouseEvent.CLICK,this.onLevel19ClickEvent);
}
if(this.hoogste >= 20)
{
this.zscherm2.btnlevel20.locksymb.visible = false;
this.zscherm2.btnlevel20.lvltxt.text = "20";
this.zscherm2.lvlbl20.buttonMode = true;
this.zscherm2.lvlbl20.useHandCursor = true;
this.zscherm2.lvlbl20.addEventListener(MouseEvent.CLICK,this.onLevel20ClickEvent);
}
if(this.hoogste >= 21)
{
this.zscherm2.btnlevel21.locksymb.visible = false;
this.zscherm2.btnlevel21.lvltxt.text = "21";
this.zscherm2.lvlbl21.buttonMode = true;
this.zscherm2.lvlbl21.useHandCursor = true;
this.zscherm2.lvlbl21.addEventListener(MouseEvent.CLICK,this.onLevel21ClickEvent);
}
if(this.hoogste >= 22)
{
this.zscherm2.btnlevel22.locksymb.visible = false;
this.zscherm2.btnlevel22.lvltxt.text = "22";
this.zscherm2.lvlbl22.buttonMode = true;
this.zscherm2.lvlbl22.useHandCursor = true;
this.zscherm2.lvlbl22.addEventListener(MouseEvent.CLICK,this.onLevel22ClickEvent);
}
if(this.hoogste >= 23)
{
this.zscherm2.btnlevel23.locksymb.visible = false;
this.zscherm2.btnlevel23.lvltxt.text = "23";
this.zscherm2.lvlbl23.buttonMode = true;
this.zscherm2.lvlbl23.useHandCursor = true;
this.zscherm2.lvlbl23.addEventListener(MouseEvent.CLICK,this.onLevel23ClickEvent);
}
if(this.hoogste >= 24)
{
this.zscherm2.btnlevel24.locksymb.visible = false;
this.zscherm2.btnlevel24.lvltxt.text = "24";
this.zscherm2.lvlbl24.buttonMode = true;
this.zscherm2.lvlbl24.useHandCursor = true;
this.zscherm2.lvlbl24.addEventListener(MouseEvent.CLICK,this.onLevel24ClickEvent);
}
if(this.hoogste >= 25)
{
this.zscherm2.btnlevel25.locksymb.visible = false;
this.zscherm2.btnlevel25.lvltxt.text = "25";
this.zscherm2.lvlbl25.buttonMode = true;
this.zscherm2.lvlbl25.useHandCursor = true;
this.zscherm2.lvlbl25.addEventListener(MouseEvent.CLICK,this.onLevel25ClickEvent);
}
if(this.hoogste >= 26)
{
this.zscherm2.btnlevel26.locksymb.visible = false;
this.zscherm2.btnlevel26.lvltxt.text = "26";
this.zscherm2.lvlbl26.buttonMode = true;
this.zscherm2.lvlbl26.useHandCursor = true;
this.zscherm2.lvlbl26.addEventListener(MouseEvent.CLICK,this.onLevel26ClickEvent);
}
if(this.hoogste >= 27)
{
this.zscherm2.btnlevel27.locksymb.visible = false;
this.zscherm2.btnlevel27.lvltxt.text = "27";
this.zscherm2.lvlbl27.buttonMode = true;
this.zscherm2.lvlbl27.useHandCursor = true;
this.zscherm2.lvlbl27.addEventListener(MouseEvent.CLICK,this.onLevel27ClickEvent);
}
if(this.hoogste >= 28)
{
this.zscherm2.btnlevel28.locksymb.visible = false;
this.zscherm2.btnlevel28.lvltxt.text = "28";
this.zscherm2.lvlbl28.buttonMode = true;
this.zscherm2.lvlbl28.useHandCursor = true;
this.zscherm2.lvlbl28.addEventListener(MouseEvent.CLICK,this.onLevel28ClickEvent);
}
if(this.hoogste >= 29)
{
this.zscherm2.btnlevel29.locksymb.visible = false;
this.zscherm2.btnlevel29.lvltxt.text = "29";
this.zscherm2.lvlbl29.buttonMode = true;
this.zscherm2.lvlbl29.useHandCursor = true;
this.zscherm2.lvlbl29.addEventListener(MouseEvent.CLICK,this.onLevel29ClickEvent);
}
if(this.hoogste >= 30)
{
this.zscherm2.btnlevel30.locksymb.visible = false;
this.zscherm2.btnlevel30.lvltxt.text = "30";
this.zscherm2.lvlbl30.buttonMode = true;
this.zscherm2.lvlbl30.useHandCursor = true;
this.zscherm2.lvlbl30.addEventListener(MouseEvent.CLICK,this.onLevel30ClickEvent);
}
}
this.screenSprite.graphics.clear();
this.screenSprite.graphics.beginFill(this.backkleur);
this.screenSprite.graphics.drawRect(0,0,this.canvasWidth,this.canvasHeight);
this.screenSprite.graphics.endFill();
stage.removeChild(this.stagebscherm);
stage.addChild(this.stagebscherm);
this.stagebscherm.alpha = 1;
addEventListener(Event.ENTER_FRAME,this.levelLoop);
}
public function onKnopmuziekClickEvent(param1:MouseEvent) : *
{
if(this.sugarSongPlaying)
{
this.sugarSongPlaying = false;
this.myChannel.stop();
this.myChannel = null;
this.sugarSong = null;
this.zscherm2.button_muziek.speakersound.visible = false;
this.knop_muziek.speakersound.visible = false;
}
else
{
this.sugarSongPlaying = true;
this.sugarSong = new SugarSong();
this.myChannel = this.sugarSong.play(0,9999);
this.zscherm2.button_muziek.speakersound.visible = true;
this.knop_muziek.speakersound.visible = true;
}
}
public function onBolbbClickEvent(param1:MouseEvent) : *
{
var _loc2_:String = "http://www.bartbonte.com/";
var _loc3_:URLRequest = new URLRequest(_loc2_);
try
{
navigateToURL(_loc3_,"_blank");
return;
}
catch(e:Error)
{
return;
}
}
public function onBolblogClickEvent(param1:MouseEvent) : *
{
var _loc2_:String = "http://www.bontegames.com/";
var _loc3_:URLRequest = new URLRequest(_loc2_);
try
{
navigateToURL(_loc3_,"_blank");
return;
}
catch(e:Error)
{
return;
}
}
public function onBoltwitterClickEvent(param1:MouseEvent) : *
{
var _loc2_:String = "http://www.twitter.com/bartbonte";
var _loc3_:URLRequest = new URLRequest(_loc2_);
try
{
navigateToURL(_loc3_,"_blank");
return;
}
catch(e:Error)
{
return;
}
}
public function onBolinstagramClickEvent(param1:MouseEvent) : *
{
var _loc2_:String = "http://instagram.com/bartbonte/";
var _loc3_:URLRequest = new URLRequest(_loc2_);
try
{
navigateToURL(_loc3_,"_blank");
return;
}
catch(e:Error)
{
return;
}
}
public function onBolfacebookClickEvent(param1:MouseEvent) : *
{
var _loc2_:String = "http://www.facebook.com/pages/Bontegames/193149514060578";
var _loc3_:URLRequest = new URLRequest(_loc2_);
try
{
navigateToURL(_loc3_,"_blank");
return;
}
catch(e:Error)
{
return;
}
}
public function onBolappleClickEvent(param1:MouseEvent) : *
{
var _loc2_:String = "http://itunes.apple.com/app/sugar-sugar/id568141784?ls=1&mt=8";
var _loc3_:URLRequest = new URLRequest(_loc2_);
try
{
navigateToURL(_loc3_,"_blank");
return;
}
catch(e:Error)
{
return;
}
}
public function onBolgoogleClickEvent(param1:MouseEvent) : *
{
var _loc2_:String = "http://play.google.com/store/apps/details?id=air.air.SugarSugar";
var _loc3_:URLRequest = new URLRequest(_loc2_);
try
{
navigateToURL(_loc3_,"_blank");
return;
}
catch(e:Error)
{
return;
}
}
public function onBolamazonClickEvent(param1:MouseEvent) : *
{
var _loc2_:String = "http://www.amazon.com/gp/product/B00BMNM4H6";
var _loc3_:URLRequest = new URLRequest(_loc2_);
try
{
navigateToURL(_loc3_,"_blank");
return;
}
catch(e:Error)
{
return;
}
}
public function onBolbartbonteClickEvent(param1:MouseEvent) : *
{
var _loc2_:String = "http://www.bartbonte.com/";
var _loc3_:URLRequest = new URLRequest(_loc2_);
try
{
navigateToURL(_loc3_,"_blank");
return;
}
catch(e:Error)
{
return;
}
}
public function onBolplayClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.leveldone = true;
}
private function onLevel1ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 0;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel2ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 1;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel3ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 2;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel4ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 3;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel5ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 4;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel6ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 5;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel7ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 6;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel8ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 7;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel9ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 8;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel10ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 9;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel11ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 10;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel12ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 11;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel13ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 12;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel14ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 13;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel15ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 14;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel16ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 15;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel17ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 16;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel18ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 17;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel19ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 18;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel20ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 19;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel21ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 20;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel22ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 21;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel23ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 22;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel24ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 23;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel25ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 24;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel26ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 25;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel27ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 26;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel28ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 27;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel29ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 28;
this.stagebscherm.x = 0;
this.leveldone = true;
}
private function onLevel30ClickEvent(param1:MouseEvent) : *
{
this.enddelay = 1;
this.lvl = 29;
this.stagebscherm.x = 0;
this.leveldone = true;
}
public function onGroenClickEvent(param1:MouseEvent) : *
{
this.tekenkleurecht = 11584071;
}
public function onGeelClickEvent(param1:MouseEvent) : *
{
this.tekenkleurecht = 0xeeee00;
}
public function onBlauwClickEvent(param1:MouseEvent) : *
{
this.tekenkleurecht = 8047341;
}
public function onOranjeClickEvent(param1:MouseEvent) : *
{
this.tekenkleurecht = 0xffaa00;
}
public function onRozeClickEvent(param1:MouseEvent) : *
{
this.tekenkleurecht = 0xff00ef;
}
public function onBruinClickEvent(param1:MouseEvent) : *
{
this.tekenkleurecht = 0xff3300;
}
public function onGravitClickEvent(param1:MouseEvent) : *
{
this.gravitatie = this.gravitatie * -1;
}
private function initIndivLevel() : void
{
this.suiker = new Array();
this.numSugar = 0;
this.valdelay = 50;
this.enddelay = 50;
this.gravitatie = 1;
this.leveldone = false;
this.indivvaldelay = 2;
this.maxindivvaldelay = this.indivvaldelay;
this.suikerstartx = this.canvasWidth / 2;
this.suikerstarty = 0;
this.zscherm.gotoAndStop(this.lvl);
this.zscherm2.gotoAndStop(this.lvl);
this.resetLevel();
this.zscherm.x = this.canvasWidth / 2;
this.zscherm.y = this.canvasHeight / 2;
this.screenSprite.addChild(this.zscherm);
this.zscherm2.x = 400;
this.zscherm2.y = 5 * 60;
addChild(this.zscherm2);
this.lineSprite.graphics.clear();
this.lineSprite2.graphics.clear();
stage.removeEventListener(MouseEvent.MOUSE_UP,this.stopDrawCanvas);
stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.drawCanvas);
if(stage.hasEventListener(MouseEvent.MOUSE_DOWN) == false)
{
stage.addEventListener(MouseEvent.MOUSE_DOWN,this.startDrawCanvas);
}
}
private function resetLevel() : void
{
switch(this.lvl)
{
case 1:
this.tekenkleurecht = 0xffaa00;
this.numSugarMax = 2000;
this.tel1 = 100;
this.zscherm2.tel1.text = this.tel1;
break;
case 2:
this.tekenkleurecht = 0xff00ef;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.tel3 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
this.zscherm2.tel3.text = this.tel3;
break;
case 3:
this.tekenkleurecht = 11584071;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
break;
case 4:
this.tekenkleurecht = 0xeeee00;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
break;
case 5:
this.tekenkleurecht = 0xffaa00;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
break;
case 6:
this.tekenkleurecht = 8047341;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
break;
case 7:
this.tekenkleurecht = 11584071;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.tel3 = 100;
this.tel4 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
this.zscherm2.tel3.text = this.tel3;
this.zscherm2.tel4.text = this.tel4;
break;
case 8:
this.tekenkleurecht = 0xeeee00;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
break;
case 9:
this.tekenkleurecht = 0xffaa00;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
break;
case 10:
this.tekenkleurecht = 0xff00ef;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.tel3 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
this.zscherm2.tel3.text = this.tel3;
break;
case 11:
this.tekenkleurecht = 0xff3300;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.tel3 = 100;
this.tel4 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
this.zscherm2.tel3.text = this.tel3;
this.zscherm2.tel4.text = this.tel4;
break;
case 12:
this.tekenkleurecht = 11584071;
this.numSugarMax = 4;
this.tel1 = 1;
this.tel2 = 1;
this.tel3 = 1;
this.tel4 = 1;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
this.zscherm2.tel3.text = this.tel3;
this.zscherm2.tel4.text = this.tel4;
break;
case 13:
this.tekenkleurecht = 0xff00ef;
this.numSugarMax = 2000;
this.tel1 = 50;
this.tel2 = 50;
this.zscherm2.tel1.text = this.tel1 + this.tel2;
break;
case 14:
this.tekenkleurecht = 0xeeee00;
this.numSugarMax = 2000;
this.tel1 = 50;
this.tel2 = 50;
this.tel3 = 50;
this.tel4 = 50;
this.zscherm2.tel1.text = this.tel1 + this.tel2;
this.zscherm2.tel2.text = this.tel3 + this.tel4;
break;
case 15:
this.tekenkleurecht = 0xffaa00;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.tel3 = 100;
this.tel4 = 100;
this.tel5 = 100;
this.tel6 = 100;
this.tel7 = 100;
this.tel8 = 100;
this.tel9 = 100;
this.tel10 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
this.zscherm2.tel3.text = this.tel3;
this.zscherm2.tel4.text = this.tel4;
this.zscherm2.tel5.text = this.tel5;
this.zscherm2.tel6.text = this.tel6;
this.zscherm2.tel7.text = this.tel7;
this.zscherm2.tel8.text = this.tel8;
this.zscherm2.tel9.text = this.tel9;
this.zscherm2.tel10.text = this.tel10;
break;
case 16:
this.tekenkleurecht = 11584071;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
break;
case 17:
this.tekenkleurecht = 8047341;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
break;
case 18:
this.tekenkleurecht = 0xff00ef;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.tel3 = 100;
this.tel4 = 100;
this.tel5 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
this.zscherm2.tel3.text = this.tel3;
this.zscherm2.tel4.text = this.tel4;
this.zscherm2.tel5.text = this.tel5;
break;
case 19:
this.tekenkleurecht = 0xeeee00;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.tel3 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
this.zscherm2.tel3.text = this.tel3;
break;
case 20:
this.tekenkleurecht = 0xffaa00;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
break;
case 21:
this.tekenkleurecht = 11584071;
this.numSugarMax = 6;
this.tel1 = 1;
this.tel2 = 1;
this.tel3 = 1;
this.tel4 = 1;
this.tel5 = 1;
this.tel6 = 1;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
this.zscherm2.tel3.text = this.tel3;
this.zscherm2.tel4.text = this.tel4;
this.zscherm2.tel5.text = this.tel5;
this.zscherm2.tel6.text = this.tel6;
break;
case 22:
this.tekenkleurecht = 0xff3300;
this.numSugarMax = 2000;
this.tel1 = 50;
this.tel2 = 50;
this.tel3 = 100;
this.tel4 = 50;
this.tel5 = 50;
this.tel6 = 100;
this.zscherm2.tel1.text = this.tel1 + this.tel2;
this.zscherm2.tel2.text = this.tel3;
this.zscherm2.tel3.text = this.tel4 + this.tel5;
this.zscherm2.tel4.text = this.tel6;
break;
case 23:
this.tekenkleurecht = 8047341;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.tel3 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
this.zscherm2.tel3.text = this.tel3;
break;
case 24:
this.tekenkleurecht = 0xff00ef;
this.numSugarMax = 4;
this.tel1 = 1;
this.tel2 = 1;
this.tel3 = 1;
this.tel4 = 1;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
this.zscherm2.tel3.text = this.tel3;
this.zscherm2.tel4.text = this.tel4;
break;
case 25:
this.tekenkleurecht = 0xeeee00;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.tel3 = 100;
this.tel4 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
this.zscherm2.tel3.text = this.tel3;
this.zscherm2.tel4.text = this.tel4;
break;
case 26:
this.tekenkleurecht = 0xffaa00;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.tel3 = 100;
this.tel4 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
this.zscherm2.tel3.text = this.tel3;
this.zscherm2.tel4.text = this.tel4;
break;
case 27:
this.tekenkleurecht = 8047341;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
break;
case 28:
this.tekenkleurecht = 11584071;
this.numSugarMax = 2000;
this.tel1 = 50;
this.tel2 = 50;
this.tel3 = 100;
this.tel4 = 100;
this.tel5 = 100;
this.zscherm2.tel1.text = this.tel1 + this.tel2;
this.zscherm2.tel2.text = this.tel3;
this.zscherm2.tel3.text = this.tel4;
this.zscherm2.tel4.text = this.tel5;
break;
case 29:
this.tekenkleurecht = 0xeeee00;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 50;
this.tel3 = 50;
this.tel4 = 100;
this.tel5 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2 + this.tel3;
this.zscherm2.tel3.text = this.tel4;
this.zscherm2.tel4.text = this.tel5;
break;
case 30:
this.tekenkleurecht = 8047341;
this.numSugarMax = 2000;
this.tel1 = 100;
this.tel2 = 100;
this.tel3 = 100;
this.tel4 = 100;
this.zscherm2.tel1.text = this.tel1;
this.zscherm2.tel2.text = this.tel2;
this.zscherm2.tel3.text = this.tel3;
this.zscherm2.tel4.text = this.tel4;
break;
case 31:
this.tekenkleurecht = 11584071;
this.numSugarMax = 5000;
break;
case 32:
this.tekenkleurecht = 11584071;
this.numSugarMax = 10000;
break;
case 33:
this.tekenkleurecht = 11584071;
this.numSugarMax = 10000;
}
}
public function onNextKnopClickEvent(param1:MouseEvent) : *
{
this.nextknop.buttonMode = false;
this.nextknop.useHandCursor = false;
this.nextknop.removeEventListener(MouseEvent.CLICK,this.onNextKnopClickEvent);
stage.removeChild(this.nextknop);
this.nextknop = null;
this.enddelay = 1;
}
private function levelLoop(param1:Event) : void
{
var _loc2_:int = 0;
var _loc4_:uint = 0;
var _loc5_:uint = 0;
var _loc6_:Rectangle = null;
var _loc7_:Point = null;
var _loc8_:int = 0;
var _loc9_:uint = 0;
var _loc10_:int = 0;
if(this.leveldone)
{
this.stagebscherm.x = 0;
}
if(!this.leveldone && this.stagebscherm.alpha > 0)
{
this.stagebscherm.alpha = this.stagebscherm.alpha - 0.1;
if(this.stagebscherm.alpha < 0.1)
{
this.stagebscherm.alpha = 0;
this.stagebscherm.x = 800;
}
}
if(this.leveldone)
{
if(this.enddelay == 50)
{
if(this.sugarSongPlaying)
{
this.okSound.play();
}
this.savelvl = this.lvl + 1;
if(this.savelvl <= 30 && this.savelvl > this.hoogste)
{
this.sugarshared.data.hoogste = this.savelvl;
this.sugarshared.close();
this.hoogste = this.savelvl;
}
this.nextknop = new nextlevelknop();
this.nextknop.x = 400;
this.nextknop.y = 5 * 60;
this.nextknop.buttonMode = true;
this.nextknop.useHandCursor = true;
stage.addChild(this.nextknop);
this.nextknop.addEventListener(MouseEvent.CLICK,this.onNextKnopClickEvent);
this.enddelay--;
}
if(this.enddelay != 49)
{
this.enddelay--;
}
if(this.enddelay == 0 && (this.lvl == 4 || this.lvl == 9 || this.lvl == 11 || this.lvl == 12 || this.lvl == 14 || this.lvl == 15 || this.lvl == 16 || this.lvl == 18 || this.lvl == 19 || this.lvl == 20 || this.lvl == 21 || this.lvl == 22 || this.lvl == 24 || this.lvl == 26 || this.lvl == 27 || this.lvl == 28 || this.lvl == 29))
{
if(this.gravitknop != null)
{
this.gravitknop.buttonMode = false;
this.gravitknop.useHandCursor = false;
this.gravitknop.removeEventListener(MouseEvent.CLICK,this.onGravitClickEvent);
stage.removeChild(this.gravitknop);
this.gravitknop = null;
}
}
if(this.enddelay == 0 && this.lvl >= 1 && this.lvl <= 30)
{
if(this.retryknop != null)
{
this.retryknop.buttonMode = false;
this.retryknop.useHandCursor = false;
this.retryknop.removeEventListener(MouseEvent.CLICK,this.onRetryClickEvent);
stage.removeChild(this.retryknop);
this.retryknop = null;
this.quitknop.buttonMode = false;
this.quitknop.useHandCursor = false;
this.quitknop.removeEventListener(MouseEvent.CLICK,this.onQuitClickEvent);
stage.removeChild(this.quitknop);
}
}
if(this.enddelay == 0 && this.lvl == 31)
{
if(this.retryknop != null)
{
this.retryknop.buttonMode = false;
this.retryknop.useHandCursor = false;
this.retryknop.removeEventListener(MouseEvent.CLICK,this.onRetryClickEvent);
stage.removeChild(this.retryknop);
this.retryknop = null;
}
if(this.groenknop != null)
{
this.groenknop.buttonMode = false;
this.groenknop.useHandCursor = false;
stage.removeChild(this.groenknop);
this.groenknop.removeEventListener(MouseEvent.CLICK,this.onGroenClickEvent);
this.groenknop = null;
}
if(this.geelknop != null)
{
this.geelknop.buttonMode = false;
this.geelknop.useHandCursor = false;
stage.removeChild(this.geelknop);
this.geelknop.removeEventListener(MouseEvent.CLICK,this.onGeelClickEvent);
this.geelknop = null;
}
if(this.blauwknop != null)
{
this.blauwknop.buttonMode = false;
this.blauwknop.useHandCursor = false;
stage.removeChild(this.blauwknop);
this.blauwknop.removeEventListener(MouseEvent.CLICK,this.onBlauwClickEvent);
this.blauwknop = null;
}
if(this.oranjeknop != null)
{
this.oranjeknop.buttonMode = false;
this.oranjeknop.useHandCursor = false;
stage.removeChild(this.oranjeknop);
this.oranjeknop.removeEventListener(MouseEvent.CLICK,this.onOranjeClickEvent);
this.oranjeknop = null;
}
if(this.rozeknop != null)
{
this.rozeknop.buttonMode = false;
this.rozeknop.useHandCursor = false;
stage.removeChild(this.rozeknop);
this.rozeknop.removeEventListener(MouseEvent.CLICK,this.onRozeClickEvent);
this.rozeknop = null;
}
if(this.bruinknop != null)
{
this.bruinknop.buttonMode = false;
this.bruinknop.useHandCursor = false;
stage.removeChild(this.bruinknop);
this.bruinknop.removeEventListener(MouseEvent.CLICK,this.onBruinClickEvent);
this.bruinknop = null;
}
this.knop_bolbb.buttonMode = false;
this.knop_bolbb.useHandCursor = false;
this.knop_bolbb.removeEventListener(MouseEvent.CLICK,this.onBolbbClickEvent);
stage.removeChild(this.knop_bolbb);
this.knop_bolbb = null;
this.knop_bolblog.buttonMode = false;
this.knop_bolblog.useHandCursor = false;
this.knop_bolblog.removeEventListener(MouseEvent.CLICK,this.onBolblogClickEvent);
stage.removeChild(this.knop_bolblog);
this.knop_bolblog = null;
this.knop_boltwitter.buttonMode = false;
this.knop_boltwitter.useHandCursor = false;
this.knop_boltwitter.removeEventListener(MouseEvent.CLICK,this.onBoltwitterClickEvent);
stage.removeChild(this.knop_boltwitter);
this.knop_boltwitter = null;
this.knop_bolinstagram.buttonMode = false;
this.knop_bolinstagram.useHandCursor = false;
this.knop_bolinstagram.removeEventListener(MouseEvent.CLICK,this.onBolinstagramClickEvent);
stage.removeChild(this.knop_bolinstagram);
this.knop_bolinstagram = null;
this.knop_bolfacebook.buttonMode = false;
this.knop_bolfacebook.useHandCursor = false;
this.knop_bolfacebook.removeEventListener(MouseEvent.CLICK,this.onBolfacebookClickEvent);
stage.removeChild(this.knop_bolfacebook);
this.knop_bolfacebook = null;
this.knop_bolapple.buttonMode = false;
this.knop_bolapple.useHandCursor = false;
this.knop_bolapple.removeEventListener(MouseEvent.CLICK,this.onBolappleClickEvent);
stage.removeChild(this.knop_bolapple);
this.knop_bolapple = null;
this.knop_bolgoogle.buttonMode = false;
this.knop_bolgoogle.useHandCursor = false;
this.knop_bolgoogle.removeEventListener(MouseEvent.CLICK,this.onBolgoogleClickEvent);
stage.removeChild(this.knop_bolgoogle);
this.knop_bolgoogle = null;
this.knop_bolamazon.buttonMode = false;
this.knop_bolamazon.useHandCursor = false;
this.knop_bolamazon.removeEventListener(MouseEvent.CLICK,this.onBolamazonClickEvent);
stage.removeChild(this.knop_bolamazon);
this.knop_bolamazon = null;
}
if(this.enddelay == 0 && this.lvl == 32)
{
this.knop_bolbb.buttonMode = false;
this.knop_bolbb.useHandCursor = false;
this.knop_bolbb.removeEventListener(MouseEvent.CLICK,this.onBolbbClickEvent);
stage.removeChild(this.knop_bolbb);
this.knop_bolbb = null;
this.knop_bolblog.buttonMode = false;
this.knop_bolblog.useHandCursor = false;
this.knop_bolblog.removeEventListener(MouseEvent.CLICK,this.onBolblogClickEvent);
stage.removeChild(this.knop_bolblog);
this.knop_bolblog = null;
this.knop_boltwitter.buttonMode = false;
this.knop_boltwitter.useHandCursor = false;
this.knop_boltwitter.removeEventListener(MouseEvent.CLICK,this.onBoltwitterClickEvent);
stage.removeChild(this.knop_boltwitter);
this.knop_boltwitter = null;
this.knop_bolinstagram.buttonMode = false;
this.knop_bolinstagram.useHandCursor = false;
this.knop_bolinstagram.removeEventListener(MouseEvent.CLICK,this.onBolinstagramClickEvent);
stage.removeChild(this.knop_bolinstagram);
this.knop_bolinstagram = null;
this.knop_bolfacebook.buttonMode = false;
this.knop_bolfacebook.useHandCursor = false;
this.knop_bolfacebook.removeEventListener(MouseEvent.CLICK,this.onBolfacebookClickEvent);
stage.removeChild(this.knop_bolfacebook);
this.knop_bolfacebook = null;
this.knop_bolapple.buttonMode = false;
this.knop_bolapple.useHandCursor = false;
this.knop_bolapple.removeEventListener(MouseEvent.CLICK,this.onBolappleClickEvent);
stage.removeChild(this.knop_bolapple);
this.knop_bolapple = null;
this.knop_bolgoogle.buttonMode = false;
this.knop_bolgoogle.useHandCursor = false;
this.knop_bolgoogle.removeEventListener(MouseEvent.CLICK,this.onBolgoogleClickEvent);
stage.removeChild(this.knop_bolgoogle);
this.knop_bolgoogle = null;
this.knop_bolamazon.buttonMode = false;
this.knop_bolamazon.useHandCursor = false;
this.knop_bolamazon.removeEventListener(MouseEvent.CLICK,this.onBolamazonClickEvent);
stage.removeChild(this.knop_bolamazon);
this.knop_bolamazon = null;
this.knop_bolbartbonte.buttonMode = false;
this.knop_bolbartbonte.useHandCursor = false;
this.knop_bolbartbonte.removeEventListener(MouseEvent.CLICK,this.onBolbartbonteClickEvent);
stage.removeChild(this.knop_bolbartbonte);
this.knop_bolbartbonte = null;
this.knop_bolplay.buttonMode = false;
this.knop_bolplay.useHandCursor = false;
this.knop_bolplay.removeEventListener(MouseEvent.CLICK,this.onBolplayClickEvent);
stage.removeChild(this.knop_bolplay);
this.knop_bolplay = null;
this.knop_muziek.buttonMode = false;
this.knop_muziek.useHandCursor = false;
this.knop_muziek.removeEventListener(MouseEvent.CLICK,this.onKnopmuziekClickEvent);
stage.removeChild(this.knop_muziek);
this.knop_muziek = null;
}
if(this.enddelay == 0 && this.lvl == 33)
{
this.zscherm2.lvlbl1.buttonMode = false;
this.zscherm2.lvlbl1.useHandCursor = false;
this.zscherm2.lvlbl1.removeEventListener(MouseEvent.CLICK,this.onLevel1ClickEvent);
this.zscherm2.lvlbl2.buttonMode = false;
this.zscherm2.lvlbl2.useHandCursor = false;
this.zscherm2.lvlbl2.removeEventListener(MouseEvent.CLICK,this.onLevel2ClickEvent);
this.zscherm2.lvlbl3.buttonMode = false;
this.zscherm2.lvlbl3.useHandCursor = false;
this.zscherm2.lvlbl3.removeEventListener(MouseEvent.CLICK,this.onLevel3ClickEvent);
this.zscherm2.lvlbl4.buttonMode = false;
this.zscherm2.lvlbl4.useHandCursor = false;
this.zscherm2.lvlbl4.removeEventListener(MouseEvent.CLICK,this.onLevel4ClickEvent);
this.zscherm2.lvlbl5.buttonMode = false;
this.zscherm2.lvlbl5.useHandCursor = false;
this.zscherm2.lvlbl5.removeEventListener(MouseEvent.CLICK,this.onLevel5ClickEvent);
this.zscherm2.lvlbl6.buttonMode = false;
this.zscherm2.lvlbl6.useHandCursor = false;
this.zscherm2.lvlbl6.removeEventListener(MouseEvent.CLICK,this.onLevel6ClickEvent);
this.zscherm2.lvlbl7.buttonMode = false;
this.zscherm2.lvlbl7.useHandCursor = false;
this.zscherm2.lvlbl7.removeEventListener(MouseEvent.CLICK,this.onLevel7ClickEvent);
this.zscherm2.lvlbl8.buttonMode = false;
this.zscherm2.lvlbl8.useHandCursor = false;
this.zscherm2.lvlbl8.removeEventListener(MouseEvent.CLICK,this.onLevel8ClickEvent);
this.zscherm2.lvlbl9.buttonMode = false;
this.zscherm2.lvlbl9.useHandCursor = false;
this.zscherm2.lvlbl9.removeEventListener(MouseEvent.CLICK,this.onLevel9ClickEvent);
this.zscherm2.lvlbl10.buttonMode = false;
this.zscherm2.lvlbl10.useHandCursor = false;
this.zscherm2.lvlbl10.removeEventListener(MouseEvent.CLICK,this.onLevel10ClickEvent);
this.zscherm2.lvlbl11.buttonMode = false;
this.zscherm2.lvlbl11.useHandCursor = false;
this.zscherm2.lvlbl11.removeEventListener(MouseEvent.CLICK,this.onLevel11ClickEvent);
this.zscherm2.lvlbl12.buttonMode = false;
this.zscherm2.lvlbl12.useHandCursor = false;
this.zscherm2.lvlbl12.removeEventListener(MouseEvent.CLICK,this.onLevel12ClickEvent);
this.zscherm2.lvlbl13.buttonMode = false;
this.zscherm2.lvlbl13.useHandCursor = false;
this.zscherm2.lvlbl13.removeEventListener(MouseEvent.CLICK,this.onLevel13ClickEvent);
this.zscherm2.lvlbl14.buttonMode = false;
this.zscherm2.lvlbl14.useHandCursor = false;
this.zscherm2.lvlbl14.removeEventListener(MouseEvent.CLICK,this.onLevel14ClickEvent);
this.zscherm2.lvlbl15.buttonMode = false;
this.zscherm2.lvlbl15.useHandCursor = false;
this.zscherm2.lvlbl15.removeEventListener(MouseEvent.CLICK,this.onLevel15ClickEvent);
this.zscherm2.lvlbl16.buttonMode = false;
this.zscherm2.lvlbl16.useHandCursor = false;
this.zscherm2.lvlbl16.removeEventListener(MouseEvent.CLICK,this.onLevel16ClickEvent);
this.zscherm2.lvlbl17.buttonMode = false;
this.zscherm2.lvlbl17.useHandCursor = false;
this.zscherm2.lvlbl17.removeEventListener(MouseEvent.CLICK,this.onLevel17ClickEvent);
this.zscherm2.lvlbl18.buttonMode = false;
this.zscherm2.lvlbl18.useHandCursor = false;
this.zscherm2.lvlbl18.removeEventListener(MouseEvent.CLICK,this.onLevel18ClickEvent);
this.zscherm2.lvlbl19.buttonMode = false;
this.zscherm2.lvlbl19.useHandCursor = false;
this.zscherm2.lvlbl19.removeEventListener(MouseEvent.CLICK,this.onLevel19ClickEvent);
this.zscherm2.lvlbl20.buttonMode = false;
this.zscherm2.lvlbl20.useHandCursor = false;
this.zscherm2.lvlbl20.removeEventListener(MouseEvent.CLICK,this.onLevel20ClickEvent);
this.zscherm2.lvlbl21.buttonMode = false;
this.zscherm2.lvlbl21.useHandCursor = false;
this.zscherm2.lvlbl21.removeEventListener(MouseEvent.CLICK,this.onLevel21ClickEvent);
this.zscherm2.lvlbl22.buttonMode = false;
this.zscherm2.lvlbl22.useHandCursor = false;
this.zscherm2.lvlbl22.removeEventListener(MouseEvent.CLICK,this.onLevel22ClickEvent);
this.zscherm2.lvlbl23.buttonMode = false;
this.zscherm2.lvlbl23.useHandCursor = false;
this.zscherm2.lvlbl23.removeEventListener(MouseEvent.CLICK,this.onLevel23ClickEvent);
this.zscherm2.lvlbl24.buttonMode = false;
this.zscherm2.lvlbl24.useHandCursor = false;
this.zscherm2.lvlbl24.removeEventListener(MouseEvent.CLICK,this.onLevel24ClickEvent);
this.zscherm2.lvlbl25.buttonMode = false;
this.zscherm2.lvlbl25.useHandCursor = false;
this.zscherm2.lvlbl25.removeEventListener(MouseEvent.CLICK,this.onLevel25ClickEvent);
this.zscherm2.lvlbl26.buttonMode = false;
this.zscherm2.lvlbl26.useHandCursor = false;
this.zscherm2.lvlbl26.removeEventListener(MouseEvent.CLICK,this.onLevel26ClickEvent);
this.zscherm2.lvlbl27.buttonMode = false;
this.zscherm2.lvlbl27.useHandCursor = false;
this.zscherm2.lvlbl27.removeEventListener(MouseEvent.CLICK,this.onLevel27ClickEvent);
this.zscherm2.lvlbl28.buttonMode = false;
this.zscherm2.lvlbl28.useHandCursor = false;
this.zscherm2.lvlbl28.removeEventListener(MouseEvent.CLICK,this.onLevel28ClickEvent);
this.zscherm2.lvlbl29.buttonMode = false;
this.zscherm2.lvlbl29.useHandCursor = false;
this.zscherm2.lvlbl29.removeEventListener(MouseEvent.CLICK,this.onLevel29ClickEvent);
this.zscherm2.lvlbl30.buttonMode = false;
this.zscherm2.lvlbl30.useHandCursor = false;
this.zscherm2.lvlbl30.removeEventListener(MouseEvent.CLICK,this.onLevel30ClickEvent);
}
if(this.enddelay < 0)
{
if(this.enddelay < -10)
{
if(this.levelup)
{
this.lvl++;
}
if(this.quitit)
{
this.lvl = 32;
}
this.zscherm.gotoAndStop(this.lvl);
this.zscherm2.gotoAndStop(this.lvl);
removeEventListener(Event.ENTER_FRAME,this.levelLoop);
removeChild(this.zscherm2);
removeChild(this.finalSprite);
this.initLevel();
}
if(this.stagebscherm.alpha < 1)
{
this.stagebscherm.alpha = this.stagebscherm.alpha + 0.1;
if(this.stagebscherm.alpha > 0.9)
{
this.stagebscherm.alpha = 1;
}
}
}
}
if(this.valdelay > 0)
{
this.valdelay--;
}
else if(this.indivvaldelay > 1)
{
this.indivvaldelay--;
}
else
{
this.indivvaldelay = this.maxindivvaldelay;
if(this.numSugar < this.numSugarMax)
{
this.suiker.push(new Suiker(this.suikerstartx,this.suikerstarty,this.sugarkleur));
this.numSugar++;
}
}
this.screenBmp.draw(this.screenSprite);
this.suikerBmp.lock();
this.suikerBmp.fillRect(new Rectangle(0,0,this.canvasWidth,this.canvasHeight),this.backkleur);
if(this.numSugar < 1)
{
switch(this.lvl)
{
case 1:
this.c1_xa = (400 - 94) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 53) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 + 229) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 2:
this.c1_xa = (400 - 93) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 54) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 + 229) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 + 17) * 1 / this.globalscalefactor;
this.c2_xb = (400 + 56) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 229) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.c3_xa = (400 + 127) * 1 / this.globalscalefactor;
this.c3_xb = (400 + 168) * 1 / this.globalscalefactor;
this.c3_yb = (5 * 60 + 188) * 1 / this.globalscalefactor + 1.5;
this.c3_ya = this.c3_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 3:
this.c1_xa = (400 - 125) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 86) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 + 228) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 - 6) * 1 / this.globalscalefactor;
this.c2_xb = (400 + 35) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 228) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.f1_xa = (400 - 73) * 1 / this.globalscalefactor;
this.f1_xb = (400 - 26) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 + 21) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.f2_xa = (400 + 37) * 1 / this.globalscalefactor;
this.f2_xb = (400 + 85) * 1 / this.globalscalefactor;
this.f2_yb = (5 * 60 + 21) * 1 / this.globalscalefactor + 1.5;
this.f2_ya = this.f2_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 4:
this.c1_xa = (400 - 30) * 1 / this.globalscalefactor;
this.c1_xb = (400 + 10) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 + 111) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 - 28) * 1 / this.globalscalefactor;
this.c2_xb = (400 + 12) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 - 78) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 5:
this.c1_xa = (400 - 38) * 1 / this.globalscalefactor;
this.c1_xb = (400 + 1) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 + 65) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 - 320) * 1 / this.globalscalefactor;
this.c2_xb = (400 - 281) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 - 95) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.f1_xa = (400 - 262) * 1 / this.globalscalefactor;
this.f1_xb = (400 - 215) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 + 290) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 6:
this.c1_xa = (400 - 291) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 251) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 + 221) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 + 82) * 1 / this.globalscalefactor;
this.c2_xb = (400 + 121) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 88) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.f1_xa = (400 - 2) * 1 / this.globalscalefactor;
this.f1_xb = (400 + 44) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 - 74) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.t1_xa = (400 + 172) * 1 / this.globalscalefactor;
this.t1_xb = (400 + 217) * 1 / this.globalscalefactor;
this.t1_yb = (5 * 60 + 60) * 1 / this.globalscalefactor + 1.5;
this.t1_ya = this.t1_yb - 3;
this.to1_x = 395 * 1 / this.globalscalefactor;
this.to1_y = (5 * 60 + 91) * 1 / this.globalscalefactor;
this.suikerstartx = (400 + 21) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 205) * 1 / this.globalscalefactor;
break;
case 7:
this.c1_xa = (400 - 234) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 195) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 - 221) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 - 315) * 1 / this.globalscalefactor;
this.c2_xb = (400 - 276) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 8) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.c3_xa = (400 + 166) * 1 / this.globalscalefactor;
this.c3_xb = (400 + 204) * 1 / this.globalscalefactor;
this.c3_yb = (5 * 60 + 9) * 1 / this.globalscalefactor + 1.5;
this.c3_ya = this.c3_yb - 3;
this.c4_xa = (400 - 77) * 1 / this.globalscalefactor;
this.c4_xb = (400 - 37) * 1 / this.globalscalefactor;
this.c4_yb = (5 * 60 + 99) * 1 / this.globalscalefactor + 1.5;
this.c4_ya = this.c4_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 8:
this.c1_xa = (400 - 176) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 136) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 + 228) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 - 31) * 1 / this.globalscalefactor;
this.c2_xb = (400 + 8) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 228) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.f1_xa = (400 - 27) * 1 / this.globalscalefactor;
this.f1_xb = (400 + 18) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 + 41) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.f2_xa = (400 + 31) * 1 / this.globalscalefactor;
this.f2_xb = (400 + 78) * 1 / this.globalscalefactor;
this.f2_yb = (5 * 60 - 26) * 1 / this.globalscalefactor + 1.5;
this.f2_ya = this.f2_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 9:
this.c1_xa = (400 + 5) * 1 / this.globalscalefactor;
this.c1_xb = (400 + 45) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 + 228) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 - 142) * 1 / this.globalscalefactor;
this.c2_xb = (400 - 101) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 - 152) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.f1_xa = (400 - 76) * 1 / this.globalscalefactor;
this.f1_xb = (400 - 28) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 + 20) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.f2_xa = (400 + 38) * 1 / this.globalscalefactor;
this.f2_xb = (400 + 84) * 1 / this.globalscalefactor;
this.f2_yb = (5 * 60 + 20) * 1 / this.globalscalefactor + 1.5;
this.f2_ya = this.f2_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 10:
this.c1_xa = (400 + 87) * 1 / this.globalscalefactor;
this.c1_xb = (400 + 126) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 + 172) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 + 158) * 1 / this.globalscalefactor;
this.c2_xb = (400 + 198) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 188) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.c3_xa = (400 + 231) * 1 / this.globalscalefactor;
this.c3_xb = (400 + 271) * 1 / this.globalscalefactor;
this.c3_yb = (5 * 60 + 173) * 1 / this.globalscalefactor + 1.5;
this.c3_ya = this.c3_yb - 3;
this.f1_xa = (400 - 390) * 1 / this.globalscalefactor;
this.f1_xb = (400 - 344) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 + 1) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.f2_xa = (400 - 330) * 1 / this.globalscalefactor;
this.f2_xb = (400 - 284) * 1 / this.globalscalefactor;
this.f2_yb = (5 * 60 + 1) * 1 / this.globalscalefactor + 1.5;
this.f2_ya = this.f2_yb - 3;
this.t1_xa = (400 - 49) * 1 / this.globalscalefactor;
this.t1_xb = (400 - 4) * 1 / this.globalscalefactor;
this.t1_yb = (5 * 60 + 221) * 1 / this.globalscalefactor + 1.5;
this.t1_ya = this.t1_yb - 3;
this.to1_x = 313 * 1 / this.globalscalefactor;
this.to1_y = (5 * 60 - 169) * 1 / this.globalscalefactor;
this.t2_xa = (400 - 362) * 1 / this.globalscalefactor;
this.t2_xb = (400 - 318) * 1 / this.globalscalefactor;
this.t2_yb = (5 * 60 + 220) * 1 / this.globalscalefactor + 1.5;
this.t2_ya = this.t2_yb - 3;
this.to2_x = -578 * 1 / this.globalscalefactor;
this.to2_y = (5 * 60 - 169) * 1 / this.globalscalefactor;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 11:
this.c1_xa = (400 - 166) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 125) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 - 62) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 + 113) * 1 / this.globalscalefactor;
this.c2_xb = (400 + 154) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 - 62) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.c3_xa = (400 - 166) * 1 / this.globalscalefactor;
this.c3_xb = (400 - 125) * 1 / this.globalscalefactor;
this.c3_yb = (5 * 60 + 62) * 1 / this.globalscalefactor + 1.5;
this.c3_ya = this.c3_yb - 3;
this.c4_xa = (400 + 113) * 1 / this.globalscalefactor;
this.c4_xb = (400 + 154) * 1 / this.globalscalefactor;
this.c4_yb = (5 * 60 + 62) * 1 / this.globalscalefactor + 1.5;
this.c4_ya = this.c4_yb - 3;
this.f1_xa = (400 - 22) * 1 / this.globalscalefactor;
this.f1_xb = (400 + 23) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 + 171) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 12:
this.c1_xa = (400 - 281) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 241) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 + 228) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 - 121) * 1 / this.globalscalefactor;
this.c2_xb = (400 - 82) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 228) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.c3_xa = (400 + 35) * 1 / this.globalscalefactor;
this.c3_xb = (400 + 74) * 1 / this.globalscalefactor;
this.c3_yb = (5 * 60 + 228) * 1 / this.globalscalefactor + 1.5;
this.c3_ya = this.c3_yb - 3;
this.c4_xa = (400 - 281) * 1 / this.globalscalefactor;
this.c4_xb = (400 - 241) * 1 / this.globalscalefactor;
this.c4_yb = (5 * 60 - 228) * 1 / this.globalscalefactor + 1.5;
this.c4_ya = this.c4_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 13:
this.c1_xa = (400 + 8) * 1 / this.globalscalefactor;
this.c1_xb = (400 + 49) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 + 228) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.f1_xa = (400 - 79) * 1 / this.globalscalefactor;
this.f1_xb = (400 - 33) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 + 31) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.f2_xa = (400 + 161) * 1 / this.globalscalefactor;
this.f2_xb = (400 + 206) * 1 / this.globalscalefactor;
this.f2_yb = (5 * 60 - 39) * 1 / this.globalscalefactor + 1.5;
this.f2_ya = this.f2_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 14:
this.c1_xa = (400 + 14) * 1 / this.globalscalefactor;
this.c1_xb = (400 + 55) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 - 32) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 + 14) * 1 / this.globalscalefactor;
this.c2_xb = (400 + 55) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 85) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.f1_xa = (400 + 132) * 1 / this.globalscalefactor;
this.f1_xb = (400 + 177) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 + 21) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 15:
this.c1_xa = (400 - 141) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 100) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 - 22) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 - 170) * 1 / this.globalscalefactor;
this.c2_xb = (400 - 131) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 30) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.c3_xa = (400 - 112) * 1 / this.globalscalefactor;
this.c3_xb = (400 - 71) * 1 / this.globalscalefactor;
this.c3_yb = (5 * 60 + 30) * 1 / this.globalscalefactor + 1.5;
this.c3_ya = this.c3_yb - 3;
this.c4_xa = (400 - 200) * 1 / this.globalscalefactor;
this.c4_xb = (400 - 159) * 1 / this.globalscalefactor;
this.c4_yb = (5 * 60 + 81) * 1 / this.globalscalefactor + 1.5;
this.c4_ya = this.c4_yb - 3;
this.c5_xa = (400 - 78) * 1 / this.globalscalefactor;
this.c5_xb = (400 - 39) * 1 / this.globalscalefactor;
this.c5_yb = (5 * 60 + 81) * 1 / this.globalscalefactor + 1.5;
this.c5_ya = this.c5_yb - 3;
this.c6_xa = (400 - 231) * 1 / this.globalscalefactor;
this.c6_xb = (400 - 190) * 1 / this.globalscalefactor;
this.c6_yb = (5 * 60 + 131) * 1 / this.globalscalefactor + 1.5;
this.c6_ya = this.c6_yb - 3;
this.c7_xa = (400 - 48) * 1 / this.globalscalefactor;
this.c7_xb = (400 - 8) * 1 / this.globalscalefactor;
this.c7_yb = (5 * 60 + 131) * 1 / this.globalscalefactor + 1.5;
this.c7_ya = this.c7_yb - 3;
this.c8_xa = (400 - 142) * 1 / this.globalscalefactor;
this.c8_xb = (400 - 101) * 1 / this.globalscalefactor;
this.c8_yb = (5 * 60 + 133) * 1 / this.globalscalefactor + 1.5;
this.c8_ya = this.c8_yb - 3;
this.c9_xa = (400 - 170) * 1 / this.globalscalefactor;
this.c9_xb = (400 - 130) * 1 / this.globalscalefactor;
this.c9_yb = (5 * 60 + 184) * 1 / this.globalscalefactor + 1.5;
this.c9_ya = this.c9_yb - 3;
this.c10_xa = (400 - 109) * 1 / this.globalscalefactor;
this.c10_xb = (400 - 70) * 1 / this.globalscalefactor;
this.c10_yb = (5 * 60 + 184) * 1 / this.globalscalefactor + 1.5;
this.c10_ya = this.c10_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 16:
this.c1_xa = (400 - 140) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 100) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 + 52) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 + 98) * 1 / this.globalscalefactor;
this.c2_xb = (400 + 139) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 52) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.f1_xa = (400 - 54) * 1 / this.globalscalefactor;
this.f1_xb = (400 - 8) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 + 107) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.f2_xa = (400 + 8) * 1 / this.globalscalefactor;
this.f2_xb = (400 + 55) * 1 / this.globalscalefactor;
this.f2_yb = (5 * 60 + 107) * 1 / this.globalscalefactor + 1.5;
this.f2_ya = this.f2_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 17:
this.c1_xa = (400 - 189) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 149) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 + 195) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 - 80) * 1 / this.globalscalefactor;
this.c2_xb = (400 - 41) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 223) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.f1_xa = (400 + 48) * 1 / this.globalscalefactor;
this.f1_xb = (400 + 94) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 + 176) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.f2_xa = (400 + 178) * 1 / this.globalscalefactor;
this.f2_xb = (400 + 224) * 1 / this.globalscalefactor;
this.f2_yb = (5 * 60 - 109) * 1 / this.globalscalefactor + 1.5;
this.f2_ya = this.f2_yb - 3;
this.t1_xa = (400 + 48) * 1 / this.globalscalefactor;
this.t1_xb = (400 + 91) * 1 / this.globalscalefactor;
this.t1_yb = (5 * 60 + 262) * 1 / this.globalscalefactor + 1.5;
this.t1_ya = this.t1_yb - 3;
this.to1_x = 261 * 1 / this.globalscalefactor;
this.to1_y = (5 * 60 - 179) * 1 / this.globalscalefactor;
this.t2_xa = (400 - 212) * 1 / this.globalscalefactor;
this.t2_xb = (400 - 168) * 1 / this.globalscalefactor;
this.t2_yb = (5 * 60 + 262) * 1 / this.globalscalefactor + 1.5;
this.t2_ya = this.t2_yb - 3;
this.to2_x = -391 * 1 / this.globalscalefactor;
this.to2_y = (5 * 60 - 179) * 1 / this.globalscalefactor;
this.t3_xa = (400 + 176) * 1 / this.globalscalefactor;
this.t3_xb = (400 + 222) * 1 / this.globalscalefactor;
this.t3_yb = (5 * 60 + 262) * 1 / this.globalscalefactor + 1.5;
this.t3_ya = this.t3_yb - 3;
this.to3_x = 259 * 1 / this.globalscalefactor;
this.to3_y = (5 * 60 - 179) * 1 / this.globalscalefactor;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 18:
this.c1_xa = (400 - 327) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 287) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 - 112) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 - 97) * 1 / this.globalscalefactor;
this.c2_xb = (400 - 57) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 - 152) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.c3_xa = (400 - 87) * 1 / this.globalscalefactor;
this.c3_xb = (400 - 48) * 1 / this.globalscalefactor;
this.c3_yb = (5 * 60 + 139) * 1 / this.globalscalefactor + 1.5;
this.c3_ya = this.c3_yb - 3;
this.c4_xa = (400 + 54) * 1 / this.globalscalefactor;
this.c4_xb = (400 + 93) * 1 / this.globalscalefactor;
this.c4_yb = (5 * 60 + 15) * 1 / this.globalscalefactor + 1.5;
this.c4_ya = this.c4_yb - 3;
this.c5_xa = (400 + 230) * 1 / this.globalscalefactor;
this.c5_xb = (400 + 269) * 1 / this.globalscalefactor;
this.c5_yb = (5 * 60 + 170) * 1 / this.globalscalefactor + 1.5;
this.c5_ya = this.c5_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 19:
this.c1_xa = (400 - 169) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 128) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 - 79) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 + 125) * 1 / this.globalscalefactor;
this.c2_xb = (400 + 166) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 - 80) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.c3_xa = (400 - 170) * 1 / this.globalscalefactor;
this.c3_xb = (400 - 129) * 1 / this.globalscalefactor;
this.c3_yb = (5 * 60 + 140) * 1 / this.globalscalefactor + 1.5;
this.c3_ya = this.c3_yb - 3;
this.f1_xa = (400 - 84) * 1 / this.globalscalefactor;
this.f1_xb = (400 - 36) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 + 31) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.f2_xa = (400 - 24) * 1 / this.globalscalefactor;
this.f2_xb = (400 + 24) * 1 / this.globalscalefactor;
this.f2_yb = (5 * 60 + 31) * 1 / this.globalscalefactor + 1.5;
this.f2_ya = this.f2_yb - 3;
this.f3_xa = (400 + 36) * 1 / this.globalscalefactor;
this.f3_xb = (400 + 81) * 1 / this.globalscalefactor;
this.f3_yb = (5 * 60 + 31) * 1 / this.globalscalefactor + 1.5;
this.f3_ya = this.f3_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 20:
this.c1_xa = (400 - 45) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 5) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 - 45) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 - 46) * 1 / this.globalscalefactor;
this.c2_xb = (400 - 6) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 126) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.f1_xa = (400 + 41) * 1 / this.globalscalefactor;
this.f1_xb = (400 + 88) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 + 41) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.f2_xa = (400 + 99) * 1 / this.globalscalefactor;
this.f2_xb = (400 + 146) * 1 / this.globalscalefactor;
this.f2_yb = (5 * 60 + 41) * 1 / this.globalscalefactor + 1.5;
this.f2_ya = this.f2_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 21:
this.c1_xa = (400 - 236) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 196) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 - 223) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 - 314) * 1 / this.globalscalefactor;
this.c2_xb = (400 - 273) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 228) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.c3_xa = (400 - 76) * 1 / this.globalscalefactor;
this.c3_xb = (400 - 36) * 1 / this.globalscalefactor;
this.c3_yb = (5 * 60 + 97) * 1 / this.globalscalefactor + 1.5;
this.c3_ya = this.c3_yb - 3;
this.c4_xa = (400 + 5) * 1 / this.globalscalefactor;
this.c4_xb = (400 + 45) * 1 / this.globalscalefactor;
this.c4_yb = (5 * 60 + 88) * 1 / this.globalscalefactor + 1.5;
this.c4_ya = this.c4_yb - 3;
this.c5_xa = (400 + 164) * 1 / this.globalscalefactor;
this.c5_xb = (400 + 203) * 1 / this.globalscalefactor;
this.c5_yb = (5 * 60 + 7) * 1 / this.globalscalefactor + 1.5;
this.c5_ya = this.c5_yb - 3;
this.c6_xa = (400 + 247) * 1 / this.globalscalefactor;
this.c6_xb = (400 + 286) * 1 / this.globalscalefactor;
this.c6_yb = (5 * 60 - 2) * 1 / this.globalscalefactor + 1.5;
this.c6_ya = this.c6_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 22:
this.c1_xa = (400 - 266) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 226) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 + 5) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 + 4) * 1 / this.globalscalefactor;
this.c2_xb = (400 + 44) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 5) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.c3_xa = (400 - 267) * 1 / this.globalscalefactor;
this.c3_xb = (400 - 227) * 1 / this.globalscalefactor;
this.c3_yb = (5 * 60 + 132) * 1 / this.globalscalefactor + 1.5;
this.c3_ya = this.c3_yb - 3;
this.c4_xa = (400 + 3) * 1 / this.globalscalefactor;
this.c4_xb = (400 + 44) * 1 / this.globalscalefactor;
this.c4_yb = (5 * 60 + 132) * 1 / this.globalscalefactor + 1.5;
this.c4_ya = this.c4_yb - 3;
this.f1_xa = (400 - 160) * 1 / this.globalscalefactor;
this.f1_xb = (400 - 114) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 + 70) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.f2_xa = (400 - 101) * 1 / this.globalscalefactor;
this.f2_xb = (400 - 56) * 1 / this.globalscalefactor;
this.f2_yb = (5 * 60 + 70) * 1 / this.globalscalefactor + 1.5;
this.f2_ya = this.f2_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 23:
this.c1_xa = (400 + 61) * 1 / this.globalscalefactor;
this.c1_xb = (400 + 101) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 + 39) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 + 311) * 1 / this.globalscalefactor;
this.c2_xb = (400 + 350) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 148) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.c3_xa = (400 - 281) * 1 / this.globalscalefactor;
this.c3_xb = (400 - 242) * 1 / this.globalscalefactor;
this.c3_yb = (5 * 60 + 210) * 1 / this.globalscalefactor + 1.5;
this.c3_ya = this.c3_yb - 3;
this.f1_xa = (400 + 237) * 1 / this.globalscalefactor;
this.f1_xb = (400 + 283) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 + 115) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.f2_xa = (400 - 354) * 1 / this.globalscalefactor;
this.f2_xb = (400 - 309) * 1 / this.globalscalefactor;
this.f2_yb = (5 * 60 + 177) * 1 / this.globalscalefactor + 1.5;
this.f2_ya = this.f2_yb - 3;
this.t1_xa = (400 - 35) * 1 / this.globalscalefactor;
this.t1_xb = (400 + 14) * 1 / this.globalscalefactor;
this.t1_yb = (5 * 60 + 101) * 1 / this.globalscalefactor + 1.5;
this.t1_ya = this.t1_yb - 3;
this.to1_x = -319 * 1 / this.globalscalefactor;
this.to1_y = (5 * 60 + 41) * 1 / this.globalscalefactor;
this.t2_xa = (400 + 287) * 1 / this.globalscalefactor;
this.t2_xb = (400 + 333) * 1 / this.globalscalefactor;
this.t2_yb = (5 * 60 + 216) * 1 / this.globalscalefactor + 1.5;
this.t2_ya = this.t2_yb - 3;
this.to2_x = 592 * 1 / this.globalscalefactor;
this.to2_y = (5 * 60 + 101) * 1 / this.globalscalefactor;
this.t3_xa = (400 - 306) * 1 / this.globalscalefactor;
this.t3_xb = (400 - 261) * 1 / this.globalscalefactor;
this.t3_yb = (5 * 60 + 277) * 1 / this.globalscalefactor + 1.5;
this.t3_ya = this.t3_yb - 3;
this.to3_x = -204 * 1 / this.globalscalefactor;
this.to3_y = (5 * 60 - 169) * 1 / this.globalscalefactor;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 24:
this.c1_xa = (400 - 256) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 215) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 - 227) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 - 189) * 1 / this.globalscalefactor;
this.c2_xb = (400 - 150) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 227) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.c3_xa = (400 - 12) * 1 / this.globalscalefactor;
this.c3_xb = (400 + 29) * 1 / this.globalscalefactor;
this.c3_yb = (5 * 60 + 227) * 1 / this.globalscalefactor + 1.5;
this.c3_ya = this.c3_yb - 3;
this.c4_xa = (400 + 158) * 1 / this.globalscalefactor;
this.c4_xb = (400 + 198) * 1 / this.globalscalefactor;
this.c4_yb = (5 * 60 + 187) * 1 / this.globalscalefactor + 1.5;
this.c4_ya = this.c4_yb - 3;
this.f1_xa = (400 - 194) * 1 / this.globalscalefactor;
this.f1_xb = (400 - 147) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 - 20) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.f2_xa = (400 - 14) * 1 / this.globalscalefactor;
this.f2_xb = (400 + 32) * 1 / this.globalscalefactor;
this.f2_yb = (5 * 60 - 20) * 1 / this.globalscalefactor + 1.5;
this.f2_ya = this.f2_yb - 3;
this.f3_xa = (400 + 172) * 1 / this.globalscalefactor;
this.f3_xb = (400 + 220) * 1 / this.globalscalefactor;
this.f3_yb = (5 * 60 - 20) * 1 / this.globalscalefactor + 1.5;
this.f3_ya = this.f3_yb - 3;
this.f4_xa = (400 - 194) * 1 / this.globalscalefactor;
this.f4_xb = (400 - 147) * 1 / this.globalscalefactor;
this.f4_yb = (5 * 60 + 137) * 1 / this.globalscalefactor + 1.5;
this.f4_ya = this.f4_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 25:
this.c1_xa = (400 + 4) * 1 / this.globalscalefactor;
this.c1_xb = (400 + 44) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 + 61) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 - 37) * 1 / this.globalscalefactor;
this.c2_xb = (400 + 3) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 141) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.c3_xa = (400 - 77) * 1 / this.globalscalefactor;
this.c3_xb = (400 - 37) * 1 / this.globalscalefactor;
this.c3_yb = (5 * 60 + 221) * 1 / this.globalscalefactor + 1.5;
this.c3_ya = this.c3_yb - 3;
this.c4_xa = (400 + 44) * 1 / this.globalscalefactor;
this.c4_xb = (400 + 84) * 1 / this.globalscalefactor;
this.c4_yb = (5 * 60 - 19) * 1 / this.globalscalefactor + 1.5;
this.c4_ya = this.c4_yb - 3;
this.f1_xa = (400 - 81) * 1 / this.globalscalefactor;
this.f1_xb = (400 - 31) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 - 87) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.f2_xa = (400 - 22) * 1 / this.globalscalefactor;
this.f2_xb = (400 + 27) * 1 / this.globalscalefactor;
this.f2_yb = (5 * 60 - 87) * 1 / this.globalscalefactor + 1.5;
this.f2_ya = this.f2_yb - 3;
this.f3_xa = (400 + 40) * 1 / this.globalscalefactor;
this.f3_xb = (400 + 86) * 1 / this.globalscalefactor;
this.f3_yb = (5 * 60 - 87) * 1 / this.globalscalefactor + 1.5;
this.f3_ya = this.f3_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 26:
this.c1_xa = (400 - 121) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 80) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 - 153) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 - 2 * 60) * 1 / this.globalscalefactor;
this.c2_xb = (400 - 80) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 142) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.c3_xa = (400 + 3) * 1 / this.globalscalefactor;
this.c3_xb = (400 + 44) * 1 / this.globalscalefactor;
this.c3_yb = (5 * 60 + 227) * 1 / this.globalscalefactor + 1.5;
this.c3_ya = this.c3_yb - 3;
this.c4_xa = (400 + 231) * 1 / this.globalscalefactor;
this.c4_xb = (400 + 271) * 1 / this.globalscalefactor;
this.c4_yb = (5 * 60 + 170) * 1 / this.globalscalefactor + 1.5;
this.c4_ya = this.c4_yb - 3;
this.f1_xa = (400 - 33) * 1 / this.globalscalefactor;
this.f1_xb = (400 + 11) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 + 31) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.f2_xa = (400 + 28) * 1 / this.globalscalefactor;
this.f2_xb = (400 + 73) * 1 / this.globalscalefactor;
this.f2_yb = (5 * 60 + 31) * 1 / this.globalscalefactor + 1.5;
this.f2_ya = this.f2_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 27:
this.c1_xa = (400 - 142) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 101) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 - 151) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 - 53) * 1 / this.globalscalefactor;
this.c2_xb = (400 - 12) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 - 136) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.f1_xa = (400 + 98) * 1 / this.globalscalefactor;
this.f1_xb = (400 + 145) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 - 28) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.f2_xa = (400 + 317) * 1 / this.globalscalefactor;
this.f2_xb = (400 + 6 * 60) * 1 / this.globalscalefactor;
this.f2_yb = (5 * 60 - 28) * 1 / this.globalscalefactor + 1.5;
this.f2_ya = this.f2_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 28:
this.c1_xa = (400 + 86) * 1 / this.globalscalefactor;
this.c1_xb = (400 + 127) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 + 171) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 + 160) * 1 / this.globalscalefactor;
this.c2_xb = (400 + 200) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 187) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.c3_xa = (400 + 230) * 1 / this.globalscalefactor;
this.c3_xb = (400 + 270) * 1 / this.globalscalefactor;
this.c3_yb = (5 * 60 + 171) * 1 / this.globalscalefactor + 1.5;
this.c3_ya = this.c3_yb - 3;
this.c4_xa = (400 + 333) * 1 / this.globalscalefactor;
this.c4_xb = (400 + 374) * 1 / this.globalscalefactor;
this.c4_yb = (5 * 60 + 172) * 1 / this.globalscalefactor + 1.5;
this.c4_ya = this.c4_yb - 3;
this.f1_xa = (400 - 283) * 1 / this.globalscalefactor;
this.f1_xb = (400 - 237) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 - 140) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.f2_xa = (400 - 283) * 1 / this.globalscalefactor;
this.f2_xb = (400 - 237) * 1 / this.globalscalefactor;
this.f2_yb = (5 * 60 + 0) * 1 / this.globalscalefactor + 1.5;
this.f2_ya = this.f2_yb - 3;
this.f3_xa = (400 - 283) * 1 / this.globalscalefactor;
this.f3_xb = (400 - 237) * 1 / this.globalscalefactor;
this.f3_yb = (5 * 60 + 140) * 1 / this.globalscalefactor + 1.5;
this.f3_ya = this.f3_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 29:
this.c1_xa = (400 - 262) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 222) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 - 227) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 - 226) * 1 / this.globalscalefactor;
this.c2_xb = (400 - 184) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 227) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.c3_xa = (400 + 187) * 1 / this.globalscalefactor;
this.c3_xb = (400 + 227) * 1 / this.globalscalefactor;
this.c3_yb = (5 * 60 + 187) * 1 / this.globalscalefactor + 1.5;
this.c3_ya = this.c3_yb - 3;
this.c4_xa = (400 + 242) * 1 / this.globalscalefactor;
this.c4_xb = (400 + 281) * 1 / this.globalscalefactor;
this.c4_yb = (5 * 60 - 60) * 1 / this.globalscalefactor + 1.5;
this.c4_ya = this.c4_yb - 3;
this.f1_xa = (400 - 305) * 1 / this.globalscalefactor;
this.f1_xb = (400 - 258) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 + 58) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.f2_xa = (400 + 114) * 1 / this.globalscalefactor;
this.f2_xb = (400 + 161) * 1 / this.globalscalefactor;
this.f2_yb = (5 * 60 + 135) * 1 / this.globalscalefactor + 1.5;
this.f2_ya = this.f2_yb - 3;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 30:
this.c1_xa = (400 - 322) * 1 / this.globalscalefactor;
this.c1_xb = (400 - 281) * 1 / this.globalscalefactor;
this.c1_yb = (5 * 60 + 197) * 1 / this.globalscalefactor + 1.5;
this.c1_ya = this.c1_yb - 3;
this.c2_xa = (400 + 150) * 1 / this.globalscalefactor;
this.c2_xb = (400 + 190) * 1 / this.globalscalefactor;
this.c2_yb = (5 * 60 + 1) * 1 / this.globalscalefactor + 1.5;
this.c2_ya = this.c2_yb - 3;
this.c3_xa = (400 - 55) * 1 / this.globalscalefactor;
this.c3_xb = (400 - 15) * 1 / this.globalscalefactor;
this.c3_yb = (5 * 60 + 89) * 1 / this.globalscalefactor + 1.5;
this.c3_ya = this.c3_yb - 3;
this.c4_xa = (400 - 252) * 1 / this.globalscalefactor;
this.c4_xb = (400 - 211) * 1 / this.globalscalefactor;
this.c4_yb = (5 * 60 + 197) * 1 / this.globalscalefactor + 1.5;
this.c4_ya = this.c4_yb - 3;
this.f1_xa = (400 - 174) * 1 / this.globalscalefactor;
this.f1_xb = (400 - 129) * 1 / this.globalscalefactor;
this.f1_yb = (5 * 60 + 77) * 1 / this.globalscalefactor + 1.5;
this.f1_ya = this.f1_yb - 3;
this.f2_xa = (400 + 34) * 1 / this.globalscalefactor;
this.f2_xb = (400 + 81) * 1 / this.globalscalefactor;
this.f2_yb = (5 * 60 + 175) * 1 / this.globalscalefactor + 1.5;
this.f2_ya = this.f2_yb - 3;
this.t1_xa = (400 - 45) * 1 / this.globalscalefactor;
this.t1_xb = (400 + 0) * 1 / this.globalscalefactor;
this.t1_yb = (5 * 60 + 283) * 1 / this.globalscalefactor + 1.5;
this.t1_ya = this.t1_yb - 3;
this.to1_x = 276 * 1 / this.globalscalefactor;
this.to1_y = (5 * 60 - 71) * 1 / this.globalscalefactor;
this.t2_xa = (400 - 176) * 1 / this.globalscalefactor;
this.t2_xb = (400 - 130) * 1 / this.globalscalefactor;
this.t2_yb = (5 * 60 + 239) * 1 / this.globalscalefactor + 1.5;
this.t2_ya = this.t2_yb - 3;
this.to2_x = -321 * 1 / this.globalscalefactor;
this.to2_y = (5 * 60 - 98) * 1 / this.globalscalefactor;
this.t3_xa = (400 + 126) * 1 / this.globalscalefactor;
this.t3_xb = (400 + 172) * 1 / this.globalscalefactor;
this.t3_yb = (5 * 60 + 68) * 1 / this.globalscalefactor + 1.5;
this.t3_ya = this.t3_yb - 3;
this.to3_x = 183 * 1 / this.globalscalefactor;
this.to3_y = (5 * 60 + 39) * 1 / this.globalscalefactor;
this.suikerstartx = (400 + 61) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 190) * 1 / this.globalscalefactor;
break;
case 31:
this.suikerstartx = (400 + 110) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 230) * 1 / this.globalscalefactor;
break;
case 32:
this.suikerstartx = (400 - 26) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 164) * 1 / this.globalscalefactor;
break;
case 33:
this.suikerstartx = (400 - 26) * 1 / this.globalscalefactor;
this.suikerstarty = (5 * 60 - 164) * 1 / this.globalscalefactor;
}
}
_loc2_ = 0;
while(_loc2_ < this.numSugar)
{
if(!this.suiker[_loc2_].incup)
{
_loc8_ = 0;
_loc9_ = 0;
_loc10_ = -1;
while(_loc10_ <= 1)
{
_loc9_ = _loc9_ + this.screenBmp.getPixel(this.suiker[_loc2_].x + _loc10_,this.suiker[_loc2_].y + this.gravitatie);
_loc10_++;
}
if(_loc9_ == this.backkleur)
{
_loc8_ = 0;
}
else
{
_loc8_ = int(Math.random() * 3 - 1.5);
if(this.suiker[_loc2_].x + _loc8_ < 0 || this.suiker[_loc2_].x + _loc8_ >= this.canvasWidth)
{
_loc8_ = 0;
}
}
if(!this.colortest(this.screenBmp.getPixel(this.suiker[_loc2_].x + _loc8_,this.suiker[_loc2_].y + this.gravitatie)))
{
this.suiker[_loc2_].x = this.suiker[_loc2_].x + _loc8_;
this.suiker[_loc2_].y = this.suiker[_loc2_].y + this.gravitatie;
}
else
{
this.rechts1 = !this.colortest(this.screenBmp.getPixel(this.suiker[_loc2_].x + 1,this.suiker[_loc2_].y));
this.rechts2 = !this.colortest(this.screenBmp.getPixel(this.suiker[_loc2_].x + 2,this.suiker[_loc2_].y));
this.links1 = !this.colortest(this.screenBmp.getPixel(this.suiker[_loc2_].x - 1,this.suiker[_loc2_].y));
this.links2 = !this.colortest(this.screenBmp.getPixel(this.suiker[_loc2_].x - 2,this.suiker[_loc2_].y));
if(this.rechts1 && this.rechts2 && !(this.links1 || this.links2))
{
this.suiker[_loc2_].x = this.suiker[_loc2_].x + 1;
}
else if(!(this.rechts1 || this.rechts2) && (this.links1 && this.links2))
{
this.suiker[_loc2_].x = this.suiker[_loc2_].x - 1;
}
}
if(this.suiker[_loc2_].y > this.canvasHeight)
{
this.suiker[_loc2_].y = 0;
}
if(this.suiker[_loc2_].y < 0)
{
this.suiker[_loc2_].y = this.canvasHeight;
}
if(this.suiker[_loc2_].x > this.canvasWidth - 1)
{
this.suiker[_loc2_].x = this.canvasWidth - 1;
}
if(this.suiker[_loc2_].x < 0)
{
this.suiker[_loc2_].x = 0;
}
this.suikerBmp.setPixel32(this.suiker[_loc2_].x,this.suiker[_loc2_].y,this.suiker[_loc2_].kleur);
switch(this.lvl)
{
case 1:
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0)
{
this.leveldone = true;
}
}
break;
case 2:
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0)
{
this.leveldone = true;
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0)
{
this.leveldone = true;
}
}
if(this.tel3 > 0 && this.suiker[_loc2_].x < this.c3_xb && this.suiker[_loc2_].y > this.c3_ya && this.suiker[_loc2_].x > this.c3_xa && this.suiker[_loc2_].y < this.c3_yb)
{
this.suiker[_loc2_].incup = true;
this.tel3--;
this.zscherm2.tel3.text = this.tel3;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0)
{
this.leveldone = true;
}
}
break;
case 3:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.groenkleur;
}
if(this.suiker[_loc2_].y > this.f2_ya && this.suiker[_loc2_].y < this.f2_yb && this.suiker[_loc2_].x > this.f2_xa && this.suiker[_loc2_].x < this.f2_xb)
{
this.suiker[_loc2_].kleur = this.oranjekleur;
}
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.groenkleur)
{
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.oranjekleur)
{
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
}
break;
case 4:
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
break;
case 5:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.rozekleur;
}
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.sugarkleur)
{
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur)
{
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
}
break;
case 6:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.groenkleur;
}
if(this.suiker[_loc2_].y > this.t1_ya && this.suiker[_loc2_].y < this.t1_yb && this.suiker[_loc2_].x > this.t1_xa && this.suiker[_loc2_].x < this.t1_xb)
{
this.suiker[_loc2_].x = this.suiker[_loc2_].x - this.to1_x;
this.suiker[_loc2_].y = this.to1_y;
}
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.sugarkleur)
{
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.groenkleur)
{
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
}
break;
case 7:
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
if(this.tel3 > 0 && this.suiker[_loc2_].x < this.c3_xb && this.suiker[_loc2_].y > this.c3_ya && this.suiker[_loc2_].x > this.c3_xa && this.suiker[_loc2_].y < this.c3_yb)
{
this.suiker[_loc2_].incup = true;
this.tel3--;
this.zscherm2.tel3.text = this.tel3;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
if(this.tel4 > 0 && this.suiker[_loc2_].x < this.c4_xb && this.suiker[_loc2_].y > this.c4_ya && this.suiker[_loc2_].x > this.c4_xa && this.suiker[_loc2_].y < this.c4_yb)
{
this.suiker[_loc2_].incup = true;
this.tel4--;
this.zscherm2.tel4.text = this.tel4;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
break;
case 8:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.rozekleur;
}
if(this.suiker[_loc2_].y > this.f2_ya && this.suiker[_loc2_].y < this.f2_yb && this.suiker[_loc2_].x > this.f2_xa && this.suiker[_loc2_].x < this.f2_xb)
{
this.suiker[_loc2_].kleur = this.groenkleur;
}
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur)
{
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.groenkleur)
{
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
break;
case 9:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.groenkleur;
}
if(this.suiker[_loc2_].y > this.f2_ya && this.suiker[_loc2_].y < this.f2_yb && this.suiker[_loc2_].x > this.f2_xa && this.suiker[_loc2_].x < this.f2_xb)
{
this.suiker[_loc2_].kleur = this.oranjekleur;
}
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.oranjekleur)
{
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.groenkleur)
{
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
break;
case 10:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.groenkleur;
}
if(this.suiker[_loc2_].y > this.f2_ya && this.suiker[_loc2_].y < this.f2_yb && this.suiker[_loc2_].x > this.f2_xa && this.suiker[_loc2_].x < this.f2_xb)
{
this.suiker[_loc2_].kleur = this.rozekleur;
}
if(this.suiker[_loc2_].y > this.t1_ya && this.suiker[_loc2_].y < this.t1_yb && this.suiker[_loc2_].x > this.t1_xa && this.suiker[_loc2_].x < this.t1_xb)
{
this.suiker[_loc2_].x = this.suiker[_loc2_].x - this.to1_x;
this.suiker[_loc2_].y = this.to1_y;
}
if(this.suiker[_loc2_].y > this.t2_ya && this.suiker[_loc2_].y < this.t2_yb && this.suiker[_loc2_].x > this.t2_xa && this.suiker[_loc2_].x < this.t2_xb)
{
this.suiker[_loc2_].x = this.suiker[_loc2_].x - this.to2_x;
this.suiker[_loc2_].y = this.to2_y;
}
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.sugarkleur)
{
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0)
{
this.leveldone = true;
}
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.groenkleur)
{
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0)
{
this.leveldone = true;
}
}
}
if(this.tel3 > 0 && this.suiker[_loc2_].x < this.c3_xb && this.suiker[_loc2_].y > this.c3_ya && this.suiker[_loc2_].x > this.c3_xa && this.suiker[_loc2_].y < this.c3_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur)
{
this.tel3--;
this.zscherm2.tel3.text = this.tel3;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0)
{
this.leveldone = true;
}
}
}
break;
case 11:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.oranjekleur;
}
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.oranjekleur)
{
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.sugarkleur)
{
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
}
if(this.tel3 > 0 && this.suiker[_loc2_].x < this.c3_xb && this.suiker[_loc2_].y > this.c3_ya && this.suiker[_loc2_].x > this.c3_xa && this.suiker[_loc2_].y < this.c3_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.oranjekleur)
{
this.tel3--;
this.zscherm2.tel3.text = this.tel3;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
}
if(this.tel4 > 0 && this.suiker[_loc2_].x < this.c4_xb && this.suiker[_loc2_].y > this.c4_ya && this.suiker[_loc2_].x > this.c4_xa && this.suiker[_loc2_].y < this.c4_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.sugarkleur)
{
this.tel4--;
this.zscherm2.tel4.text = this.tel4;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
}
break;
case 12:
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
if(this.tel3 > 0 && this.suiker[_loc2_].x < this.c3_xb && this.suiker[_loc2_].y > this.c3_ya && this.suiker[_loc2_].x > this.c3_xa && this.suiker[_loc2_].y < this.c3_yb)
{
this.suiker[_loc2_].incup = true;
this.tel3--;
this.zscherm2.tel3.text = this.tel3;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
if(this.tel4 > 0 && this.suiker[_loc2_].x < this.c4_xb && this.suiker[_loc2_].y > this.c4_ya && this.suiker[_loc2_].x > this.c4_xa && this.suiker[_loc2_].y < this.c4_yb)
{
this.suiker[_loc2_].incup = true;
this.tel4--;
this.zscherm2.tel4.text = this.tel4;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
break;
case 13:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.oranjekleur;
}
if(this.suiker[_loc2_].y > this.f2_ya && this.suiker[_loc2_].y < this.f2_yb && this.suiker[_loc2_].x > this.f2_xa && this.suiker[_loc2_].x < this.f2_xb)
{
this.suiker[_loc2_].kleur = this.groenkleur;
}
if((this.tel1 > 0 || this.tel2 > 0) && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.oranjekleur && this.tel1 > 0)
{
this.tel1--;
}
if(this.suiker[_loc2_].kleur == this.groenkleur && this.tel2 > 0)
{
this.tel2--;
}
this.zscherm2.tel1.text = this.tel1 + this.tel2;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
break;
case 14:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.rozekleur;
}
if((this.tel1 > 0 || this.tel2 > 0) && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur && this.tel1 > 0)
{
this.tel1--;
}
if(this.suiker[_loc2_].kleur == this.sugarkleur && this.tel2 > 0)
{
this.tel2--;
}
this.zscherm2.tel1.text = this.tel1 + this.tel2;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
if((this.tel3 > 0 || this.tel4 > 0) && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur && this.tel3 > 0)
{
this.tel3--;
}
if(this.suiker[_loc2_].kleur == this.sugarkleur && this.tel4 > 0)
{
this.tel4--;
}
this.zscherm2.tel2.text = this.tel3 + this.tel4;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
break;
case 15:
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0 && this.tel7 == 0 && this.tel8 == 0 && this.tel9 == 0 && this.tel10 == 0)
{
this.leveldone = true;
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0 && this.tel7 == 0 && this.tel8 == 0 && this.tel9 == 0 && this.tel10 == 0)
{
this.leveldone = true;
}
}
if(this.tel3 > 0 && this.suiker[_loc2_].x < this.c3_xb && this.suiker[_loc2_].y > this.c3_ya && this.suiker[_loc2_].x > this.c3_xa && this.suiker[_loc2_].y < this.c3_yb)
{
this.suiker[_loc2_].incup = true;
this.tel3--;
this.zscherm2.tel3.text = this.tel3;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0 && this.tel7 == 0 && this.tel8 == 0 && this.tel9 == 0 && this.tel10 == 0)
{
this.leveldone = true;
}
}
if(this.tel4 > 0 && this.suiker[_loc2_].x < this.c4_xb && this.suiker[_loc2_].y > this.c4_ya && this.suiker[_loc2_].x > this.c4_xa && this.suiker[_loc2_].y < this.c4_yb)
{
this.suiker[_loc2_].incup = true;
this.tel4--;
this.zscherm2.tel4.text = this.tel4;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0 && this.tel7 == 0 && this.tel8 == 0 && this.tel9 == 0 && this.tel10 == 0)
{
this.leveldone = true;
}
}
if(this.tel5 > 0 && this.suiker[_loc2_].x < this.c5_xb && this.suiker[_loc2_].y > this.c5_ya && this.suiker[_loc2_].x > this.c5_xa && this.suiker[_loc2_].y < this.c5_yb)
{
this.suiker[_loc2_].incup = true;
this.tel5--;
this.zscherm2.tel5.text = this.tel5;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0 && this.tel7 == 0 && this.tel8 == 0 && this.tel9 == 0 && this.tel10 == 0)
{
this.leveldone = true;
}
}
if(this.tel6 > 0 && this.suiker[_loc2_].x < this.c6_xb && this.suiker[_loc2_].y > this.c6_ya && this.suiker[_loc2_].x > this.c6_xa && this.suiker[_loc2_].y < this.c6_yb)
{
this.suiker[_loc2_].incup = true;
this.tel6--;
this.zscherm2.tel6.text = this.tel6;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0 && this.tel7 == 0 && this.tel8 == 0 && this.tel9 == 0 && this.tel10 == 0)
{
this.leveldone = true;
}
}
if(this.tel7 > 0 && this.suiker[_loc2_].x < this.c7_xb && this.suiker[_loc2_].y > this.c7_ya && this.suiker[_loc2_].x > this.c7_xa && this.suiker[_loc2_].y < this.c7_yb)
{
this.suiker[_loc2_].incup = true;
this.tel7--;
this.zscherm2.tel7.text = this.tel7;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0 && this.tel7 == 0 && this.tel8 == 0 && this.tel9 == 0 && this.tel10 == 0)
{
this.leveldone = true;
}
}
if(this.tel8 > 0 && this.suiker[_loc2_].x < this.c8_xb && this.suiker[_loc2_].y > this.c8_ya && this.suiker[_loc2_].x > this.c8_xa && this.suiker[_loc2_].y < this.c8_yb)
{
this.suiker[_loc2_].incup = true;
this.tel8--;
this.zscherm2.tel8.text = this.tel8;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0 && this.tel7 == 0 && this.tel8 == 0 && this.tel9 == 0 && this.tel10 == 0)
{
this.leveldone = true;
}
}
if(this.tel9 > 0 && this.suiker[_loc2_].x < this.c9_xb && this.suiker[_loc2_].y > this.c9_ya && this.suiker[_loc2_].x > this.c9_xa && this.suiker[_loc2_].y < this.c9_yb)
{
this.suiker[_loc2_].incup = true;
this.tel9--;
this.zscherm2.tel9.text = this.tel9;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0 && this.tel7 == 0 && this.tel8 == 0 && this.tel9 == 0 && this.tel10 == 0)
{
this.leveldone = true;
}
}
if(this.tel10 > 0 && this.suiker[_loc2_].x < this.c10_xb && this.suiker[_loc2_].y > this.c10_ya && this.suiker[_loc2_].x > this.c10_xa && this.suiker[_loc2_].y < this.c10_yb)
{
this.suiker[_loc2_].incup = true;
this.tel10--;
this.zscherm2.tel10.text = this.tel10;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0 && this.tel7 == 0 && this.tel8 == 0 && this.tel9 == 0 && this.tel10 == 0)
{
this.leveldone = true;
}
}
break;
case 16:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.rozekleur;
}
if(this.suiker[_loc2_].y > this.f2_ya && this.suiker[_loc2_].y < this.f2_yb && this.suiker[_loc2_].x > this.f2_xa && this.suiker[_loc2_].x < this.f2_xb)
{
this.suiker[_loc2_].kleur = this.groenkleur;
}
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur)
{
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.groenkleur)
{
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
break;
case 17:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.rozekleur;
}
if(this.suiker[_loc2_].y > this.f2_ya && this.suiker[_loc2_].y < this.f2_yb && this.suiker[_loc2_].x > this.f2_xa && this.suiker[_loc2_].x < this.f2_xb)
{
this.suiker[_loc2_].kleur = this.groenkleur;
}
if(this.suiker[_loc2_].y > this.t1_ya && this.suiker[_loc2_].y < this.t1_yb && this.suiker[_loc2_].x > this.t1_xa && this.suiker[_loc2_].x < this.t1_xb)
{
this.suiker[_loc2_].x = this.suiker[_loc2_].x - this.to1_x;
this.suiker[_loc2_].y = this.to1_y;
}
if(this.suiker[_loc2_].y > this.t2_ya && this.suiker[_loc2_].y < this.t2_yb && this.suiker[_loc2_].x > this.t2_xa && this.suiker[_loc2_].x < this.t2_xb)
{
this.suiker[_loc2_].x = this.suiker[_loc2_].x - this.to2_x;
this.suiker[_loc2_].y = this.to2_y;
}
if(this.suiker[_loc2_].y > this.t3_ya && this.suiker[_loc2_].y < this.t3_yb && this.suiker[_loc2_].x > this.t3_xa && this.suiker[_loc2_].x < this.t3_xb)
{
this.suiker[_loc2_].x = this.suiker[_loc2_].x - this.to3_x;
this.suiker[_loc2_].y = this.to3_y;
}
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur)
{
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.sugarkleur)
{
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
}
break;
case 18:
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0)
{
this.leveldone = true;
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0)
{
this.leveldone = true;
}
}
if(this.tel3 > 0 && this.suiker[_loc2_].x < this.c3_xb && this.suiker[_loc2_].y > this.c3_ya && this.suiker[_loc2_].x > this.c3_xa && this.suiker[_loc2_].y < this.c3_yb)
{
this.suiker[_loc2_].incup = true;
this.tel3--;
this.zscherm2.tel3.text = this.tel3;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0)
{
this.leveldone = true;
}
}
if(this.tel4 > 0 && this.suiker[_loc2_].x < this.c4_xb && this.suiker[_loc2_].y > this.c4_ya && this.suiker[_loc2_].x > this.c4_xa && this.suiker[_loc2_].y < this.c4_yb)
{
this.suiker[_loc2_].incup = true;
this.tel4--;
this.zscherm2.tel4.text = this.tel4;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0)
{
this.leveldone = true;
}
}
if(this.tel5 > 0 && this.suiker[_loc2_].x < this.c5_xb && this.suiker[_loc2_].y > this.c5_ya && this.suiker[_loc2_].x > this.c5_xa && this.suiker[_loc2_].y < this.c5_yb)
{
this.suiker[_loc2_].incup = true;
this.tel5--;
this.zscherm2.tel5.text = this.tel5;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0)
{
this.leveldone = true;
}
}
break;
case 19:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.groenkleur;
}
if(this.suiker[_loc2_].y > this.f2_ya && this.suiker[_loc2_].y < this.f2_yb && this.suiker[_loc2_].x > this.f2_xa && this.suiker[_loc2_].x < this.f2_xb)
{
this.suiker[_loc2_].kleur = this.rozekleur;
}
if(this.suiker[_loc2_].y > this.f3_ya && this.suiker[_loc2_].y < this.f3_yb && this.suiker[_loc2_].x > this.f3_xa && this.suiker[_loc2_].x < this.f3_xb)
{
this.suiker[_loc2_].kleur = this.oranjekleur;
}
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur)
{
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0)
{
this.leveldone = true;
}
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.oranjekleur)
{
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0)
{
this.leveldone = true;
}
}
}
if(this.tel3 > 0 && this.suiker[_loc2_].x < this.c3_xb && this.suiker[_loc2_].y > this.c3_ya && this.suiker[_loc2_].x > this.c3_xa && this.suiker[_loc2_].y < this.c3_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.groenkleur)
{
this.tel3--;
this.zscherm2.tel3.text = this.tel3;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0)
{
this.leveldone = true;
}
}
}
break;
case 20:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.oranjekleur;
}
if(this.suiker[_loc2_].y > this.f2_ya && this.suiker[_loc2_].y < this.f2_yb && this.suiker[_loc2_].x > this.f2_xa && this.suiker[_loc2_].x < this.f2_xb)
{
this.suiker[_loc2_].kleur = this.blauwkleur;
}
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.blauwkleur)
{
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.oranjekleur)
{
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
break;
case 21:
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0)
{
this.leveldone = true;
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0)
{
this.leveldone = true;
}
}
if(this.tel3 > 0 && this.suiker[_loc2_].x < this.c3_xb && this.suiker[_loc2_].y > this.c3_ya && this.suiker[_loc2_].x > this.c3_xa && this.suiker[_loc2_].y < this.c3_yb)
{
this.suiker[_loc2_].incup = true;
this.tel3--;
this.zscherm2.tel3.text = this.tel3;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0)
{
this.leveldone = true;
}
}
if(this.tel4 > 0 && this.suiker[_loc2_].x < this.c4_xb && this.suiker[_loc2_].y > this.c4_ya && this.suiker[_loc2_].x > this.c4_xa && this.suiker[_loc2_].y < this.c4_yb)
{
this.suiker[_loc2_].incup = true;
this.tel4--;
this.zscherm2.tel4.text = this.tel4;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0)
{
this.leveldone = true;
}
}
if(this.tel5 > 0 && this.suiker[_loc2_].x < this.c5_xb && this.suiker[_loc2_].y > this.c5_ya && this.suiker[_loc2_].x > this.c5_xa && this.suiker[_loc2_].y < this.c5_yb)
{
this.suiker[_loc2_].incup = true;
this.tel5--;
this.zscherm2.tel5.text = this.tel5;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0)
{
this.leveldone = true;
}
}
if(this.tel6 > 0 && this.suiker[_loc2_].x < this.c6_xb && this.suiker[_loc2_].y > this.c6_ya && this.suiker[_loc2_].x > this.c6_xa && this.suiker[_loc2_].y < this.c6_yb)
{
this.suiker[_loc2_].incup = true;
this.tel6--;
this.zscherm2.tel6.text = this.tel6;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0)
{
this.leveldone = true;
}
}
break;
case 22:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.groenkleur;
}
if(this.suiker[_loc2_].y > this.f2_ya && this.suiker[_loc2_].y < this.f2_yb && this.suiker[_loc2_].x > this.f2_xa && this.suiker[_loc2_].x < this.f2_xb)
{
this.suiker[_loc2_].kleur = this.rozekleur;
}
if((this.tel1 > 0 || this.tel2 > 0) && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur && this.tel1 > 0)
{
this.tel1--;
}
if(this.suiker[_loc2_].kleur == this.sugarkleur && this.tel2 > 0)
{
this.tel2--;
}
this.zscherm2.tel1.text = this.tel1 + this.tel2;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0)
{
this.leveldone = true;
}
}
if(this.tel3 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur)
{
this.tel3--;
this.zscherm2.tel2.text = this.tel3;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0)
{
this.leveldone = true;
}
}
}
if((this.tel4 > 0 || this.tel5 > 0) && this.suiker[_loc2_].x < this.c3_xb && this.suiker[_loc2_].y > this.c3_ya && this.suiker[_loc2_].x > this.c3_xa && this.suiker[_loc2_].y < this.c3_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.groenkleur && this.tel4 > 0)
{
this.tel4--;
}
if(this.suiker[_loc2_].kleur == this.sugarkleur && this.tel5 > 0)
{
this.tel5--;
}
this.zscherm2.tel3.text = this.tel4 + this.tel5;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0)
{
this.leveldone = true;
}
}
if(this.tel6 > 0 && this.suiker[_loc2_].x < this.c4_xb && this.suiker[_loc2_].y > this.c4_ya && this.suiker[_loc2_].x > this.c4_xa && this.suiker[_loc2_].y < this.c4_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.groenkleur)
{
this.tel6--;
this.zscherm2.tel4.text = this.tel6;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0 && this.tel6 == 0)
{
this.leveldone = true;
}
}
}
break;
case 23:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.rozekleur;
}
if(this.suiker[_loc2_].y > this.f2_ya && this.suiker[_loc2_].y < this.f2_yb && this.suiker[_loc2_].x > this.f2_xa && this.suiker[_loc2_].x < this.f2_xb)
{
this.suiker[_loc2_].kleur = this.blauwkleur;
}
if(this.suiker[_loc2_].y > this.t1_ya && this.suiker[_loc2_].y < this.t1_yb && this.suiker[_loc2_].x > this.t1_xa && this.suiker[_loc2_].x < this.t1_xb)
{
this.suiker[_loc2_].x = this.suiker[_loc2_].x - this.to1_x;
this.suiker[_loc2_].y = this.to1_y;
}
if(this.suiker[_loc2_].y > this.t2_ya && this.suiker[_loc2_].y < this.t2_yb && this.suiker[_loc2_].x > this.t2_xa && this.suiker[_loc2_].x < this.t2_xb)
{
this.suiker[_loc2_].x = this.suiker[_loc2_].x - this.to2_x;
this.suiker[_loc2_].y = this.to2_y;
}
if(this.suiker[_loc2_].y > this.t3_ya && this.suiker[_loc2_].y < this.t3_yb && this.suiker[_loc2_].x > this.t3_xa && this.suiker[_loc2_].x < this.t3_xb)
{
this.suiker[_loc2_].x = this.suiker[_loc2_].x - this.to3_x;
this.suiker[_loc2_].y = this.to3_y;
}
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur)
{
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0)
{
this.leveldone = true;
}
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.blauwkleur)
{
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0)
{
this.leveldone = true;
}
}
}
if(this.tel3 > 0 && this.suiker[_loc2_].x < this.c3_xb && this.suiker[_loc2_].y > this.c3_ya && this.suiker[_loc2_].x > this.c3_xa && this.suiker[_loc2_].y < this.c3_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.sugarkleur)
{
this.tel3--;
this.zscherm2.tel3.text = this.tel3;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0)
{
this.leveldone = true;
}
}
}
break;
case 24:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.oranjekleur;
}
if(this.suiker[_loc2_].y > this.f2_ya && this.suiker[_loc2_].y < this.f2_yb && this.suiker[_loc2_].x > this.f2_xa && this.suiker[_loc2_].x < this.f2_xb)
{
this.suiker[_loc2_].kleur = this.groenkleur;
}
if(this.suiker[_loc2_].y > this.f3_ya && this.suiker[_loc2_].y < this.f3_yb && this.suiker[_loc2_].x > this.f3_xa && this.suiker[_loc2_].x < this.f3_xb)
{
this.suiker[_loc2_].kleur = this.rozekleur;
}
if(this.suiker[_loc2_].y > this.f4_ya && this.suiker[_loc2_].y < this.f4_yb && this.suiker[_loc2_].x > this.f4_xa && this.suiker[_loc2_].x < this.f4_xb)
{
this.suiker[_loc2_].kleur = this.blauwkleur;
}
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.oranjekleur)
{
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.blauwkleur)
{
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
if(this.tel3 > 0 && this.suiker[_loc2_].x < this.c3_xb && this.suiker[_loc2_].y > this.c3_ya && this.suiker[_loc2_].x > this.c3_xa && this.suiker[_loc2_].y < this.c3_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.groenkleur)
{
this.tel3--;
this.zscherm2.tel3.text = this.tel3;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
if(this.tel4 > 0 && this.suiker[_loc2_].x < this.c4_xb && this.suiker[_loc2_].y > this.c4_ya && this.suiker[_loc2_].x > this.c4_xa && this.suiker[_loc2_].y < this.c4_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur)
{
this.tel4--;
this.zscherm2.tel4.text = this.tel4;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
break;
case 25:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.groenkleur;
}
if(this.suiker[_loc2_].y > this.f2_ya && this.suiker[_loc2_].y < this.f2_yb && this.suiker[_loc2_].x > this.f2_xa && this.suiker[_loc2_].x < this.f2_xb)
{
this.suiker[_loc2_].kleur = this.rozekleur;
}
if(this.suiker[_loc2_].y > this.f3_ya && this.suiker[_loc2_].y < this.f3_yb && this.suiker[_loc2_].x > this.f3_xa && this.suiker[_loc2_].x < this.f3_xb)
{
this.suiker[_loc2_].kleur = this.oranjekleur;
}
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.groenkleur)
{
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur)
{
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
}
if(this.tel3 > 0 && this.suiker[_loc2_].x < this.c3_xb && this.suiker[_loc2_].y > this.c3_ya && this.suiker[_loc2_].x > this.c3_xa && this.suiker[_loc2_].y < this.c3_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.oranjekleur)
{
this.tel3--;
this.zscherm2.tel3.text = this.tel3;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
}
if(this.tel4 > 0 && this.suiker[_loc2_].x < this.c4_xb && this.suiker[_loc2_].y > this.c4_ya && this.suiker[_loc2_].x > this.c4_xa && this.suiker[_loc2_].y < this.c4_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.sugarkleur)
{
this.tel4--;
this.zscherm2.tel4.text = this.tel4;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
}
break;
case 26:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.blauwkleur;
}
if(this.suiker[_loc2_].y > this.f2_ya && this.suiker[_loc2_].y < this.f2_yb && this.suiker[_loc2_].x > this.f2_xa && this.suiker[_loc2_].x < this.f2_xb)
{
this.suiker[_loc2_].kleur = this.rozekleur;
}
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.sugarkleur)
{
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur)
{
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
if(this.tel3 > 0 && this.suiker[_loc2_].x < this.c3_xb && this.suiker[_loc2_].y > this.c3_ya && this.suiker[_loc2_].x > this.c3_xa && this.suiker[_loc2_].y < this.c3_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.blauwkleur)
{
this.tel3--;
this.zscherm2.tel3.text = this.tel3;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
if(this.tel4 > 0 && this.suiker[_loc2_].x < this.c4_xb && this.suiker[_loc2_].y > this.c4_ya && this.suiker[_loc2_].x > this.c4_xa && this.suiker[_loc2_].y < this.c4_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.sugarkleur)
{
this.tel4--;
this.zscherm2.tel4.text = this.tel4;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
break;
case 27:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.rozekleur;
}
if(this.suiker[_loc2_].y > this.f2_ya && this.suiker[_loc2_].y < this.f2_yb && this.suiker[_loc2_].x > this.f2_xa && this.suiker[_loc2_].x < this.f2_xb)
{
this.suiker[_loc2_].kleur = this.groenkleur;
}
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur)
{
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.groenkleur)
{
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
break;
case 28:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.oranjekleur;
}
if(this.suiker[_loc2_].y > this.f2_ya && this.suiker[_loc2_].y < this.f2_yb && this.suiker[_loc2_].x > this.f2_xa && this.suiker[_loc2_].x < this.f2_xb)
{
this.suiker[_loc2_].kleur = this.groenkleur;
}
if(this.suiker[_loc2_].y > this.f3_ya && this.suiker[_loc2_].y < this.f3_yb && this.suiker[_loc2_].x > this.f3_xa && this.suiker[_loc2_].x < this.f3_xb)
{
this.suiker[_loc2_].kleur = this.rozekleur;
}
if((this.tel1 > 0 || this.tel2 > 0) && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.oranjekleur && this.tel1 > 0)
{
this.tel1--;
}
if(this.suiker[_loc2_].kleur == this.groenkleur && this.tel2 > 0)
{
this.tel2--;
}
this.zscherm2.tel1.text = this.tel1 + this.tel2;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0)
{
this.leveldone = true;
}
}
if(this.tel3 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.sugarkleur)
{
this.tel3--;
this.zscherm2.tel2.text = this.tel3;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0)
{
this.leveldone = true;
}
}
}
if(this.tel4 > 0 && this.suiker[_loc2_].x < this.c3_xb && this.suiker[_loc2_].y > this.c3_ya && this.suiker[_loc2_].x > this.c3_xa && this.suiker[_loc2_].y < this.c3_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur)
{
this.tel4--;
this.zscherm2.tel3.text = this.tel4;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0)
{
this.leveldone = true;
}
}
}
if(this.tel5 > 0 && this.suiker[_loc2_].x < this.c4_xb && this.suiker[_loc2_].y > this.c4_ya && this.suiker[_loc2_].x > this.c4_xa && this.suiker[_loc2_].y < this.c4_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.groenkleur)
{
this.tel5--;
this.zscherm2.tel4.text = this.tel5;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0)
{
this.leveldone = true;
}
}
}
break;
case 29:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.blauwkleur;
}
if(this.suiker[_loc2_].y > this.f2_ya && this.suiker[_loc2_].y < this.f2_yb && this.suiker[_loc2_].x > this.f2_xa && this.suiker[_loc2_].x < this.f2_xb)
{
this.suiker[_loc2_].kleur = this.rozekleur;
}
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur)
{
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
if((this.tel2 > 0 || this.tel3 > 0) && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur && this.tel2 > 0)
{
this.tel2--;
}
if(this.suiker[_loc2_].kleur == this.sugarkleur && this.tel3 > 0)
{
this.tel3--;
}
this.zscherm2.tel2.text = this.tel2 + this.tel3;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0)
{
this.leveldone = true;
}
}
if(this.tel4 > 0 && this.suiker[_loc2_].x < this.c3_xb && this.suiker[_loc2_].y > this.c3_ya && this.suiker[_loc2_].x > this.c3_xa && this.suiker[_loc2_].y < this.c3_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.sugarkleur)
{
this.tel4--;
this.zscherm2.tel3.text = this.tel4;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
if(this.tel5 > 0 && this.suiker[_loc2_].x < this.c4_xb && this.suiker[_loc2_].y > this.c4_ya && this.suiker[_loc2_].x > this.c4_xa && this.suiker[_loc2_].y < this.c4_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.blauwkleur)
{
this.tel5--;
this.zscherm2.tel4.text = this.tel5;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0 && this.tel5 == 0)
{
this.leveldone = true;
}
}
}
break;
case 30:
if(this.suiker[_loc2_].y > this.f1_ya && this.suiker[_loc2_].y < this.f1_yb && this.suiker[_loc2_].x > this.f1_xa && this.suiker[_loc2_].x < this.f1_xb)
{
this.suiker[_loc2_].kleur = this.blauwkleur;
}
if(this.suiker[_loc2_].y > this.f2_ya && this.suiker[_loc2_].y < this.f2_yb && this.suiker[_loc2_].x > this.f2_xa && this.suiker[_loc2_].x < this.f2_xb)
{
this.suiker[_loc2_].kleur = this.rozekleur;
}
if(this.suiker[_loc2_].y > this.t1_ya && this.suiker[_loc2_].y < this.t1_yb && this.suiker[_loc2_].x > this.t1_xa && this.suiker[_loc2_].x < this.t1_xb)
{
this.suiker[_loc2_].x = this.suiker[_loc2_].x - this.to1_x;
this.suiker[_loc2_].y = this.to1_y;
}
if(this.suiker[_loc2_].y > this.t2_ya && this.suiker[_loc2_].y < this.t2_yb && this.suiker[_loc2_].x > this.t2_xa && this.suiker[_loc2_].x < this.t2_xb)
{
this.suiker[_loc2_].x = this.suiker[_loc2_].x - this.to2_x;
this.suiker[_loc2_].y = this.to2_y;
}
if(this.suiker[_loc2_].y > this.t3_ya && this.suiker[_loc2_].y < this.t3_yb && this.suiker[_loc2_].x > this.t3_xa && this.suiker[_loc2_].x < this.t3_xb)
{
this.suiker[_loc2_].x = this.suiker[_loc2_].x - this.to3_x;
this.suiker[_loc2_].y = this.to3_y;
}
if(this.tel1 > 0 && this.suiker[_loc2_].x < this.c1_xb && this.suiker[_loc2_].y > this.c1_ya && this.suiker[_loc2_].x > this.c1_xa && this.suiker[_loc2_].y < this.c1_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.rozekleur)
{
this.tel1--;
this.zscherm2.tel1.text = this.tel1;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
if(this.tel2 > 0 && this.suiker[_loc2_].x < this.c2_xb && this.suiker[_loc2_].y > this.c2_ya && this.suiker[_loc2_].x > this.c2_xa && this.suiker[_loc2_].y < this.c2_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.blauwkleur)
{
this.tel2--;
this.zscherm2.tel2.text = this.tel2;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
if(this.tel3 > 0 && this.suiker[_loc2_].x < this.c3_xb && this.suiker[_loc2_].y > this.c3_ya && this.suiker[_loc2_].x > this.c3_xa && this.suiker[_loc2_].y < this.c3_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.sugarkleur)
{
this.tel3--;
this.zscherm2.tel3.text = this.tel3;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
if(this.tel4 > 0 && this.suiker[_loc2_].x < this.c4_xb && this.suiker[_loc2_].y > this.c4_ya && this.suiker[_loc2_].x > this.c4_xa && this.suiker[_loc2_].y < this.c4_yb)
{
this.suiker[_loc2_].incup = true;
if(this.suiker[_loc2_].kleur == this.blauwkleur)
{
this.tel4--;
this.zscherm2.tel4.text = this.tel4;
if(this.tel1 == 0 && this.tel2 == 0 && this.tel3 == 0 && this.tel4 == 0)
{
this.leveldone = true;
}
}
else if(!this.leveldone)
{
if(this.sugarSongPlaying)
{
this.koSound.play();
}
this.levelup = false;
this.quitit = false;
this.enddelay = 5;
this.leveldone = true;
}
}
}
}
_loc2_++;
}
this.suikerBmp.unlock();
var _loc3_:uint = 7021931;
_loc4_ = 0;
_loc5_ = 4294967295;
_loc6_ = new Rectangle(0,0,this.suikerBmp.width,this.suikerBmp.height);
_loc7_ = new Point(0,0);
this.finalBmp.threshold(this.suikerBmp,_loc6_,_loc7_,"==",this.backkleur,_loc4_,_loc5_,true);
}
private function startDrawCanvas(param1:MouseEvent) : void
{
this.lineSprite.graphics.lineStyle(this.tekendikte,this.tekenkleur);
this.lineSprite.graphics.moveTo(stage.mouseX / this.screenSprite.scaleX,stage.mouseY / this.screenSprite.scaleY);
this.lineSprite2.graphics.lineStyle(this.tekendikte,this.tekenkleurecht);
this.lineSprite2.graphics.moveTo(stage.mouseX / this.screenSprite.scaleX,stage.mouseY / this.screenSprite.scaleY);
stage.removeEventListener(MouseEvent.MOUSE_DOWN,this.startDrawCanvas);
stage.addEventListener(MouseEvent.MOUSE_MOVE,this.drawCanvas);
stage.addEventListener(MouseEvent.MOUSE_UP,this.stopDrawCanvas);
}
private function stopDrawCanvas(param1:MouseEvent) : void
{
stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.drawCanvas);
stage.removeEventListener(MouseEvent.MOUSE_UP,this.stopDrawCanvas);
stage.addEventListener(MouseEvent.MOUSE_DOWN,this.startDrawCanvas);
}
private function drawCanvas(param1:MouseEvent) : void
{
this.lineSprite.graphics.lineTo(stage.mouseX / this.screenSprite.scaleX,stage.mouseY / this.screenSprite.scaleY);
this.lineSprite2.graphics.lineTo(stage.mouseX / this.screenSprite.scaleX,stage.mouseY / this.screenSprite.scaleY);
}
private function colortest(param1:uint) : Boolean
{
var _loc2_:uint = 0;
var _loc3_:uint = 0;
var _loc4_:uint = 0;
var _loc5_:uint = 0;
_loc2_ = param1 >> 16;
_loc3_ = param1 - (_loc2_ << 16);
_loc4_ = _loc3_ >> 8;
_loc5_ = _loc3_ - (_loc4_ << 8);
if(_loc2_ > 140 || _loc4_ > 140 || _loc5_ > 140)
{
return true;
}
return false;
}
function frame1() : *
{
stop();
}
function frame3() : *
{
stop();
}
function frame4() : *
{
this.gameState = STATE_INIT_INTRO;
stop();
}
}
}
class Suiker
{
public var x:int;
public var y:int;
public var kleur:uint;
public var incup:Boolean;
function Suiker(param1:int, param2:int, param3:uint)
{
super();
this.x = param1;
this.y = param2;
this.kleur = param3;
this.incup = false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment