Section 1
//bakgrund_tonasupp_197 (jelly_swelly_fla.bakgrund_tonasupp_197)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class bakgrund_tonasupp_197 extends MovieClip {
public function bakgrund_tonasupp_197(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 2
//bakgrund_tonasupp_halloween_139 (jelly_swelly_fla.bakgrund_tonasupp_halloween_139)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class bakgrund_tonasupp_halloween_139 extends MovieClip {
public function bakgrund_tonasupp_halloween_139(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 3
//bat_189 (jelly_swelly_fla.bat_189)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class bat_189 extends MovieClip {
public function bat_189(){
addFrameScript(0, frame1, 39, frame40);
}
function frame40(){
gotoAndPlay(2);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 4
//blood_1_116 (jelly_swelly_fla.blood_1_116)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class blood_1_116 extends MovieClip {
public function blood_1_116(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 5
//blood_2_117 (jelly_swelly_fla.blood_2_117)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class blood_2_117 extends MovieClip {
public function blood_2_117(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 6
//blood_3_118 (jelly_swelly_fla.blood_3_118)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class blood_3_118 extends MovieClip {
public function blood_3_118(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 7
//blood_4_119 (jelly_swelly_fla.blood_4_119)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class blood_4_119 extends MovieClip {
public function blood_4_119(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 8
//blood_5_120 (jelly_swelly_fla.blood_5_120)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class blood_5_120 extends MovieClip {
public function blood_5_120(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 9
//blood_6_121 (jelly_swelly_fla.blood_6_121)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class blood_6_121 extends MovieClip {
public function blood_6_121(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 10
//blood_7_122 (jelly_swelly_fla.blood_7_122)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class blood_7_122 extends MovieClip {
public function blood_7_122(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 11
//blood_8_123 (jelly_swelly_fla.blood_8_123)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class blood_8_123 extends MovieClip {
public function blood_8_123(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 12
//blood_meter_115 (jelly_swelly_fla.blood_meter_115)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class blood_meter_115 extends MovieClip {
public var mcNextBonus:MovieClip;
public function blood_meter_115(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 13
//bonus_star_105 (jelly_swelly_fla.bonus_star_105)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class bonus_star_105 extends MovieClip {
public var mcText:MovieClip;
public function bonus_star_105(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 14
//bubbla1_87 (jelly_swelly_fla.bubbla1_87)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class bubbla1_87 extends MovieClip {
public function bubbla1_87(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 15
//bubbla2_88 (jelly_swelly_fla.bubbla2_88)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class bubbla2_88 extends MovieClip {
public function bubbla2_88(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 16
//bubbla3_89 (jelly_swelly_fla.bubbla3_89)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class bubbla3_89 extends MovieClip {
public function bubbla3_89(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 17
//bubbla4_90 (jelly_swelly_fla.bubbla4_90)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class bubbla4_90 extends MovieClip {
public function bubbla4_90(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 18
//bubbla5_91 (jelly_swelly_fla.bubbla5_91)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class bubbla5_91 extends MovieClip {
public function bubbla5_91(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 19
//bubbla6_92 (jelly_swelly_fla.bubbla6_92)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class bubbla6_92 extends MovieClip {
public function bubbla6_92(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 20
//bubbla7_93 (jelly_swelly_fla.bubbla7_93)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class bubbla7_93 extends MovieClip {
public function bubbla7_93(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 21
//bubbla8_94 (jelly_swelly_fla.bubbla8_94)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class bubbla8_94 extends MovieClip {
public function bubbla8_94(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 22
//bubbles_86 (jelly_swelly_fla.bubbles_86)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class bubbles_86 extends MovieClip {
public var mcNextBonus:MovieClip;
public function bubbles_86(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 23
//ExplosionBlue_60 (jelly_swelly_fla.ExplosionBlue_60)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class ExplosionBlue_60 extends MovieClip {
public function ExplosionBlue_60(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 24
//ExplosionGreen_62 (jelly_swelly_fla.ExplosionGreen_62)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class ExplosionGreen_62 extends MovieClip {
public function ExplosionGreen_62(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 25
//ExplosionPink_61 (jelly_swelly_fla.ExplosionPink_61)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class ExplosionPink_61 extends MovieClip {
public function ExplosionPink_61(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 26
//ExplosionSmallBlue_57 (jelly_swelly_fla.ExplosionSmallBlue_57)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class ExplosionSmallBlue_57 extends MovieClip {
public function ExplosionSmallBlue_57(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 27
//ExplosionSmallGreen_59 (jelly_swelly_fla.ExplosionSmallGreen_59)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class ExplosionSmallGreen_59 extends MovieClip {
public function ExplosionSmallGreen_59(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 28
//ExplosionSmallPink_56 (jelly_swelly_fla.ExplosionSmallPink_56)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class ExplosionSmallPink_56 extends MovieClip {
public function ExplosionSmallPink_56(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 29
//ExplosionSmallWhite_58 (jelly_swelly_fla.ExplosionSmallWhite_58)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class ExplosionSmallWhite_58 extends MovieClip {
public function ExplosionSmallWhite_58(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 30
//ExplosionWhite_63 (jelly_swelly_fla.ExplosionWhite_63)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class ExplosionWhite_63 extends MovieClip {
public function ExplosionWhite_63(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 31
//gameover_flimmer_142 (jelly_swelly_fla.gameover_flimmer_142)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class gameover_flimmer_142 extends MovieClip {
public function gameover_flimmer_142(){
addFrameScript(0, frame1, 15, frame16);
}
function frame16(){
gotoAndPlay(2);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 32
//gameoverpinksim_animation_198 (jelly_swelly_fla.gameoverpinksim_animation_198)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class gameoverpinksim_animation_198 extends MovieClip {
public var mcGameOverTextBox:MovieClip;
public var mcText1:MovieClip;
public var mcText2:MovieClip;
public var mcText3:MovieClip;
public var mcFlimmer:MovieClip;
public function gameoverpinksim_animation_198(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 33
//gameoverpinksim_animation_helloween_141 (jelly_swelly_fla.gameoverpinksim_animation_helloween_141)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class gameoverpinksim_animation_helloween_141 extends MovieClip {
public var mcGameOverTextBox:MovieClip;
public var mcText1:MovieClip;
public var mcText2:MovieClip;
public var mcText3:MovieClip;
public var mcFlimmer:MovieClip;
public function gameoverpinksim_animation_helloween_141(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 34
//gameoverturkossim_animation_202 (jelly_swelly_fla.gameoverturkossim_animation_202)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class gameoverturkossim_animation_202 extends MovieClip {
public var mcText3:MovieClip;
public var mcText1:MovieClip;
public var mcText2:MovieClip;
public function gameoverturkossim_animation_202(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 35
//gameoverturkossim_animation_helloween_146 (jelly_swelly_fla.gameoverturkossim_animation_helloween_146)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class gameoverturkossim_animation_helloween_146 extends MovieClip {
public var mcText3:MovieClip;
public var mcText1:MovieClip;
public var mcText2:MovieClip;
public function gameoverturkossim_animation_helloween_146(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 36
//intro_maneter_26 (jelly_swelly_fla.intro_maneter_26)
package jelly_swelly_fla {
import flash.display.*;
import flash.text.*;
public dynamic class intro_maneter_26 extends MovieClip {
public var mcIcons:MovieClip;
public var txtText:TextField;
public function intro_maneter_26(){
addFrameScript(0, frame1, 45, frame46);
}
function frame1(){
stop();
}
function frame46(){
stop();
}
}
}//package jelly_swelly_fla
Section 37
//liten_markering_82 (jelly_swelly_fla.liten_markering_82)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class liten_markering_82 extends MovieClip {
public function liten_markering_82(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 38
//markerade_rutor_paket_80 (jelly_swelly_fla.markerade_rutor_paket_80)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class markerade_rutor_paket_80 extends MovieClip {
public var mcMarking:MovieClip;
public function markerade_rutor_paket_80(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 39
//meter_green_131 (jelly_swelly_fla.meter_green_131)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class meter_green_131 extends MovieClip {
public var mcFill:MovieClip;
public function meter_green_131(){
addFrameScript(0, frame1, 1000, frame1001);
}
function frame1(){
stop();
}
function frame1001(){
stop();
}
}
}//package jelly_swelly_fla
Section 40
//meter_pink_103 (jelly_swelly_fla.meter_pink_103)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class meter_pink_103 extends MovieClip {
public var mcFill:MovieClip;
public function meter_pink_103(){
addFrameScript(0, frame1, 1000, frame1001);
}
function frame1(){
stop();
}
function frame1001(){
stop();
}
}
}//package jelly_swelly_fla
Section 41
//meter_turkos_104 (jelly_swelly_fla.meter_turkos_104)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class meter_turkos_104 extends MovieClip {
public var mcFill:MovieClip;
public function meter_turkos_104(){
addFrameScript(0, frame1, 1000, frame1001);
}
function frame1(){
stop();
}
function frame1001(){
stop();
}
}
}//package jelly_swelly_fla
Section 42
//meter_white_133 (jelly_swelly_fla.meter_white_133)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class meter_white_133 extends MovieClip {
public var mcFill:MovieClip;
public function meter_white_133(){
addFrameScript(0, frame1, 1000, frame1001);
}
function frame1(){
stop();
}
function frame1001(){
stop();
}
}
}//package jelly_swelly_fla
Section 43
//music_on_6 (jelly_swelly_fla.music_on_6)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class music_on_6 extends MovieClip {
public function music_on_6(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 44
//NextBonus_96 (jelly_swelly_fla.NextBonus_96)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class NextBonus_96 extends MovieClip {
public function NextBonus_96(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 45
//NextBonusHalloween_125 (jelly_swelly_fla.NextBonusHalloween_125)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class NextBonusHalloween_125 extends MovieClip {
public function NextBonusHalloween_125(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 46
//out_of_colour_text_180 (jelly_swelly_fla.out_of_colour_text_180)
package jelly_swelly_fla {
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.xml.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
public dynamic class out_of_colour_text_180 extends MovieClip {
public var txtOOC:TextField;
public function out_of_colour_text_180(){
addFrameScript(0, frame1);
}
function frame1(){
this.txtOOC.text = MovieClip(root).txtOOC;
}
}
}//package jelly_swelly_fla
Section 47
//out_of_colour_text_52 (jelly_swelly_fla.out_of_colour_text_52)
package jelly_swelly_fla {
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.xml.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
public dynamic class out_of_colour_text_52 extends MovieClip {
public var txtOOC:TextField;
public function out_of_colour_text_52(){
addFrameScript(0, frame1);
}
function frame1(){
this.txtOOC.text = MovieClip(root).txtOOC;
}
}
}//package jelly_swelly_fla
Section 48
//PieceBlue_67 (jelly_swelly_fla.PieceBlue_67)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class PieceBlue_67 extends MovieClip {
public function PieceBlue_67(){
addFrameScript(0, frame1, 38, frame39, 161, frame162);
}
function frame162(){
gotoAndStop(1);
}
function frame39(){
gotoAndStop(1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 49
//PieceGreen_70 (jelly_swelly_fla.PieceGreen_70)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class PieceGreen_70 extends MovieClip {
public function PieceGreen_70(){
addFrameScript(0, frame1, 3, frame4, 7, frame8, 48, frame49, 69, frame70);
}
function frame49(){
gotoAndStop(1);
}
function frame1(){
stop();
}
function frame70(){
gotoAndStop(1);
}
function frame4(){
stop();
}
function frame8(){
stop();
}
}
}//package jelly_swelly_fla
Section 50
//PiecePink_68 (jelly_swelly_fla.PiecePink_68)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class PiecePink_68 extends MovieClip {
public function PiecePink_68(){
addFrameScript(0, frame1, 3, frame4, 7, frame8, 48, frame49, 89, frame90);
}
function frame49(){
gotoAndStop(1);
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame8(){
stop();
}
function frame90(){
gotoAndStop(1);
}
}
}//package jelly_swelly_fla
Section 51
//PieceWhite_69 (jelly_swelly_fla.PieceWhite_69)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class PieceWhite_69 extends MovieClip {
public function PieceWhite_69(){
addFrameScript(0, frame1, 38, frame39, 161, frame162);
}
function frame162(){
gotoAndStop(1);
}
function frame39(){
gotoAndStop(1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 52
//postitanimation_2 (jelly_swelly_fla.postitanimation_2)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class postitanimation_2 extends MovieClip {
public var mcPostIt:MovieClip;
public function postitanimation_2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 53
//power_on_7 (jelly_swelly_fla.power_on_7)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class power_on_7 extends MovieClip {
public function power_on_7(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 54
//pumpkin_animation_218 (jelly_swelly_fla.pumpkin_animation_218)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class pumpkin_animation_218 extends MovieClip {
public var mcPumpText:MovieClip;
public function pumpkin_animation_218(){
addFrameScript(0, frame1, 118, frame119, 155, frame156);
}
function frame1(){
stop();
}
function frame156(){
stop();
}
function frame119(){
stop();
}
}
}//package jelly_swelly_fla
Section 55
//SmallKritor_85 (jelly_swelly_fla.SmallKritor_85)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class SmallKritor_85 extends MovieClip {
public function SmallKritor_85(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 56
//sound_on_5 (jelly_swelly_fla.sound_on_5)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class sound_on_5 extends MovieClip {
public function sound_on_5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 57
//special_pink_fill_98 (jelly_swelly_fla.special_pink_fill_98)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class special_pink_fill_98 extends MovieClip {
public var mcText:MovieClip;
public function special_pink_fill_98(){
addFrameScript(0, frame1, 35, frame36, 52, frame53, 53, frame54, 65, frame66);
}
function frame36(){
stop();
}
function frame1(){
stop();
}
function frame53(){
stop();
}
function frame54(){
stop();
}
function frame66(){
gotoAndStop(1);
}
}
}//package jelly_swelly_fla
Section 58
//special_pink_fill_halloween_129 (jelly_swelly_fla.special_pink_fill_halloween_129)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class special_pink_fill_halloween_129 extends MovieClip {
public var mcText:MovieClip;
public function special_pink_fill_halloween_129(){
addFrameScript(0, frame1, 35, frame36, 52, frame53, 53, frame54, 66, frame67);
}
function frame36(){
stop();
}
function frame1(){
stop();
}
function frame53(){
stop();
}
function frame54(){
stop();
}
function frame67(){
gotoAndStop(1);
}
}
}//package jelly_swelly_fla
Section 59
//special_turkos_fill_101 (jelly_swelly_fla.special_turkos_fill_101)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class special_turkos_fill_101 extends MovieClip {
public var mcText:MovieClip;
public function special_turkos_fill_101(){
addFrameScript(0, frame1, 34, frame35, 51, frame52, 52, frame53, 65, frame66);
}
function frame1(){
stop();
}
function frame52(){
stop();
}
function frame53(){
stop();
}
function frame66(){
gotoAndStop(1);
}
function frame35(){
stop();
}
}
}//package jelly_swelly_fla
Section 60
//special_turkos_fill_halloween_127 (jelly_swelly_fla.special_turkos_fill_halloween_127)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class special_turkos_fill_halloween_127 extends MovieClip {
public var mcText:MovieClip;
public function special_turkos_fill_halloween_127(){
addFrameScript(0, frame1, 34, frame35, 51, frame52, 52, frame53, 65, frame66);
}
function frame1(){
stop();
}
function frame52(){
stop();
}
function frame53(){
stop();
}
function frame66(){
gotoAndStop(1);
}
function frame35(){
stop();
}
}
}//package jelly_swelly_fla
Section 61
//starsnurr1_109 (jelly_swelly_fla.starsnurr1_109)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class starsnurr1_109 extends MovieClip {
public function starsnurr1_109(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 62
//Time_78 (jelly_swelly_fla.Time_78)
package jelly_swelly_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Time_78 extends MovieClip {
public var mcTime:MovieClip;
public var txtTimeLable:TextField;
public function Time_78(){
addFrameScript(0, frame1, 76, frame77);
}
function frame1(){
stop();
}
function frame77(){
gotoAndPlay(8);
}
}
}//package jelly_swelly_fla
Section 63
//val_1_186 (jelly_swelly_fla.val_1_186)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class val_1_186 extends MovieClip {
public var mcBat:MovieClip;
public function val_1_186(){
addFrameScript(0, frame1, 94, frame95);
}
function frame95(){
stop();
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 64
//val_2_193 (jelly_swelly_fla.val_2_193)
package jelly_swelly_fla {
import flash.display.*;
public dynamic class val_2_193 extends MovieClip {
public function val_2_193(){
addFrameScript(0, frame1, 38, frame39);
}
function frame39(){
gotoAndPlay(10);
}
function frame1(){
stop();
}
}
}//package jelly_swelly_fla
Section 65
//Communicator (src.comm.Communicator)
package src.comm {
import flash.system.*;
public class Communicator {
private var hasSentLastTick;// = false
private var hasSentGameEnd;// = false
private var hasSentGameOver;// = false
private var hasSentGameStart;// = false
private static var CMD_SEND_SCORE = 216;
private static var CMD_LAST_TICK = 779;
private static var CMD_SET_SOUND_STATES = 436;
private static var CMD_BRICK_CLICKED = 123;
private static var CMD_START_ROUND = 611;
private static var CMD_SEND_BONUS = 111;
private static var CMD_SEND_MOD = 217;
private static var CMD_SEND_RANDOM = 926;
private static var CMD_BRICK_OVER = 456;
private static var CMD_MOUSE_UP = 789;
private static var CMD_BONUS_PINK = 955;
private static var CMD_BONUS_BLUE = 855;
public function mouseUp(_arg1, _arg2){
fscommand("playData", ((((CMD_MOUSE_UP + ",") + _arg1) + " ") + _arg2));
}
public function gameQuit(){
trace("GAME QUIT");
if (!hasSentGameOver){
hasSentGameOver = true;
fscommand("gameQuit");
};
}
public function pieceOver(_arg1, _arg2, _arg3){
fscommand("playData", ((((((CMD_BRICK_OVER + ",") + _arg1) + " ") + _arg2) + " ") + _arg3));
}
public function triggerBonusBlue(_arg1){
fscommand("playData", ((CMD_BONUS_BLUE + ",") + _arg1));
}
public function gameEnd(_arg1){
trace("GAME ENDS");
if (!hasSentGameEnd){
hasSentGameEnd = true;
fscommand("gameEnd", _arg1);
};
}
public function sendRandom(_arg1, _arg2, _arg3){
fscommand("playData", ((((((CMD_SEND_RANDOM + ",") + _arg1) + " ") + _arg2) + " ") + _arg3));
}
public function startRound(_arg1, _arg2){
fscommand("playData", ((((CMD_START_ROUND + ",") + _arg1) + " ") + _arg2));
}
public function addBonus(_arg1){
fscommand("playData", ((CMD_SEND_BONUS + ",") + _arg1));
}
public function gameStarted(){
trace("GAME START");
if (!hasSentGameStart){
hasSentGameStart = true;
fscommand("gameStart");
};
}
public function sendScore(_arg1, _arg2, _arg3, _arg4){
fscommand("playData", ((((((((CMD_SEND_SCORE + ",") + _arg1) + " ") + _arg2) + " ") + _arg3) + " ") + _arg4));
}
public function sendMod(_arg1){
fscommand("playData", ((CMD_SEND_MOD + ",") + _arg1));
}
public function sendSoundStates(_arg1, _arg2){
fscommand("playData", ((((CMD_SET_SOUND_STATES + ",") + _arg1) + " ") + _arg2));
}
public function pieceClicked(_arg1, _arg2, _arg3){
fscommand("playData", ((((((CMD_BRICK_CLICKED + ",") + _arg1) + " ") + _arg2) + " ") + _arg3));
}
public function lastTick(_arg1, _arg2, _arg3){
fscommand("playData", ((((CMD_LAST_TICK + ",") + _arg1) + " ") + _arg2));
}
public function triggerBonusPink(_arg1){
fscommand("playData", ((CMD_BONUS_PINK + ",") + _arg1));
}
}
}//package src.comm
Section 66
//GameDataParser (src.comm.GameDataParser)
package src.comm {
import flash.xml.*;
public class GameDataParser {
public static var records:Object;
public static var textMappings:Object;
public static var sounds:Object;
public static function parseGameData(_arg1:String):Object{
var _local2:Object = new Object();
var _local3:XMLDocument = new XMLDocument(_arg1);
textMappings = new Object();
_local2.textMappings = textMappings;
var _local4:* = _local3.firstChild.childNodes;
records = new Object();
_local2.records = records;
sounds = new Object();
_local2.sounds = sounds;
var _local5:int = parseInt(_local3.firstChild.attributes.randomseed);
_local2.randomSeed = _local5;
var _local6:String = String(_local3.firstChild.attributes.relaxMode);
_local2.relaxGame = false;
if (_local6 == "true"){
_local2.relaxGame = true;
};
var _local7:* = 0;
while (_local7 < _local4.length) {
if (_local4[_local7].nodeName == "id"){
};
if (_local4[_local7].nodeName == "game"){
_local2.gameType = new String(_local4[_local7].attributes.type);
};
if (_local4[_local7].nodeName == "userType"){
_local2.userType = new String(_local4[_local7].firstChild.nodeValue);
};
if (_local4[_local7].nodeName == "text"){
if ((((_local4[_local7].firstChild == null)) || ((_local4[_local7].firstChild == undefined)))){
textMappings[_local4[_local7].attributes.id] = (("[" + _local4[_local7].attributes.id) + "]");
} else {
textMappings[_local4[_local7].attributes.id] = new String(_local4[_local7].firstChild.nodeValue);
};
};
if (_local4[_local7].nodeName == "records"){
if ((((_local4[_local7].firstChild == null)) || ((_local4[_local7].firstChild == undefined)))){
records[_local4[_local7].attributes.id] = (("[" + _local4[_local7].attributes.id) + "]");
} else {
records[_local4[_local7].attributes.id] = new String(_local4[_local7].firstChild.nodeValue);
};
};
if (_local4[_local7].nodeName == "sounds"){
if ((((_local4[_local7].firstChild == null)) || ((_local4[_local7].firstChild == undefined)))){
sounds[_local4[_local7].attributes.id] = (("[" + _local4[_local7].attributes.id) + "]");
} else {
sounds[_local4[_local7].attributes.id] = new String(_local4[_local7].firstChild.nodeValue);
};
};
_local7++;
};
return (_local2);
}
}
}//package src.comm
Section 67
//replayer (src.comm.replayer)
package src.comm {
import flash.xml.*;
public class replayer {
public static var root;
public static var actionArr_;
public function replayer(_arg1){
root = _arg1;
var _local2:* = ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((("<gameover time=\"2009-01-12 11:36:16\" lastplaydataid=\"262\">" + "<entry id=\"1\" time=\"2009-01-12 11:33:22\"><![CDATA[611,382 1.0]]></entry>") + "<entry id=\"2\" time=\"2009-01-12 11:33:24\"><![CDATA[123,424 5 8]]></entry>") + "<entry id=\"3\" time=\"2009-01-12 11:33:24\"><![CDATA[456,425 4 8]]></entry>") + "<entry id=\"4\" time=\"2009-01-12 11:33:24\"><![CDATA[456,426 3 8]]></entry>") + "<entry id=\"5\" time=\"2009-01-12 11:33:24\"><![CDATA[456,427 2 8]]></entry>") + "<entry id=\"6\" time=\"2009-01-12 11:33:24\"><![CDATA[456,427 1 8]]></entry>") + "<entry id=\"7\" time=\"2009-01-12 11:33:24\"><![CDATA[789,431 5-8_4-8_3-8_2-8]]></entry>") + "<entry id=\"8\" time=\"2009-01-12 11:33:25\"><![CDATA[216,460 566 135 1]]></entry>") + "<entry id=\"9\" time=\"2009-01-12 11:33:30\"><![CDATA[123,589 5 7]]></entry>") + "<entry id=\"10\" time=\"2009-01-12 11:33:31\"><![CDATA[456,592 4 7]]></entry>") + "<entry id=\"11\" time=\"2009-01-12 11:33:31\"><![CDATA[456,597 4 6]]></entry>") + "<entry id=\"12\" time=\"2009-01-12 11:33:31\"><![CDATA[456,599 4 5]]></entry>") + "<entry id=\"13\" time=\"2009-01-12 11:33:31\"><![CDATA[456,602 3 5]]></entry>") + "<entry id=\"14\" time=\"2009-01-12 11:33:31\"><![CDATA[456,605 2 5]]></entry>") + "<entry id=\"15\" time=\"2009-01-12 11:33:31\"><![CDATA[789,605 5-7_4-7_4-6_4-5]]></entry>") + "<entry id=\"16\" time=\"2009-01-12 11:33:32\"><![CDATA[216,626 323 161 1]]></entry>") + "<entry id=\"17\" time=\"2009-01-12 11:33:35\"><![CDATA[123,690 3 4]]></entry>") + "<entry id=\"18\" time=\"2009-01-12 11:33:35\"><![CDATA[456,692 4 4]]></entry>") + "<entry id=\"19\" time=\"2009-01-12 11:33:35\"><![CDATA[456,693 4 5]]></entry>") + "<entry id=\"20\" time=\"2009-01-12 11:33:35\"><![CDATA[456,696 4 6]]></entry>") + "<entry id=\"21\" time=\"2009-01-12 11:33:35\"><![CDATA[456,699 5 5]]></entry>") + "<entry id=\"22\" time=\"2009-01-12 11:33:35\"><![CDATA[456,704 5 6]]></entry>") + "<entry id=\"23\" time=\"2009-01-12 11:33:35\"><![CDATA[456,708 5 5]]></entry>") + "<entry id=\"24\" time=\"2009-01-12 11:33:35\"><![CDATA[456,709 4 5]]></entry>") + "<entry id=\"25\" time=\"2009-01-12 11:33:36\"><![CDATA[456,715 5 5]]></entry>") + "<entry id=\"26\" time=\"2009-01-12 11:33:36\"><![CDATA[456,719 5 6]]></entry>") + "<entry id=\"27\" time=\"2009-01-12 11:33:36\"><![CDATA[456,720 5 8]]></entry>") + "<entry id=\"28\" time=\"2009-01-12 11:33:36\"><![CDATA[789,725 3-4_4-4_4-5_5-5]]></entry>") + "<entry id=\"29\" time=\"2009-01-12 11:33:37\"><![CDATA[216,746 277 178 1]]></entry>") + "<entry id=\"30\" time=\"2009-01-12 11:33:39\"><![CDATA[123,808 5 6]]></entry>") + "<entry id=\"31\" time=\"2009-01-12 11:33:39\"><![CDATA[456,808 5 7]]></entry>") + "<entry id=\"32\" time=\"2009-01-12 11:33:39\"><![CDATA[456,813 4 7]]></entry>") + "<entry id=\"33\" time=\"2009-01-12 11:33:40\"><![CDATA[456,817 4 8]]></entry>") + "<entry id=\"34\" time=\"2009-01-12 11:33:40\"><![CDATA[456,820 4 9]]></entry>") + "<entry id=\"35\" time=\"2009-01-12 11:33:40\"><![CDATA[789,823 5-6_5-7_4-7_4-8]]></entry>") + "<entry id=\"36\" time=\"2009-01-12 11:33:41\"><![CDATA[216,841 222 196 2]]></entry>") + "<entry id=\"37\" time=\"2009-01-12 11:33:43\"><![CDATA[123,903 2 4]]></entry>") + "<entry id=\"38\" time=\"2009-01-12 11:33:43\"><![CDATA[456,904 3 4]]></entry>") + "<entry id=\"39\" time=\"2009-01-12 11:33:43\"><![CDATA[789,908 2-4_3-4]]></entry>") + "<entry id=\"40\" time=\"2009-01-12 11:33:44\"><![CDATA[216,925 184 211 2]]></entry>") + "<entry id=\"41\" time=\"2009-01-12 11:33:46\"><![CDATA[123,976 4 5]]></entry>") + "<entry id=\"42\" time=\"2009-01-12 11:33:46\"><![CDATA[456,978 4 6]]></entry>") + "<entry id=\"43\" time=\"2009-01-12 11:33:46\"><![CDATA[456,981 3 6]]></entry>") + "<entry id=\"44\" time=\"2009-01-12 11:33:46\"><![CDATA[789,986 4-5_4-6_3-6]]></entry>") + "<entry id=\"45\" time=\"2009-01-12 11:33:47\"><![CDATA[216,1001 144 226 2]]></entry>") + "<entry id=\"46\" time=\"2009-01-12 11:33:49\"><![CDATA[123,1042 6 1]]></entry>") + "<entry id=\"47\" time=\"2009-01-12 11:33:49\"><![CDATA[456,1044 5 1]]></entry>") + "<entry id=\"48\" time=\"2009-01-12 11:33:49\"><![CDATA[456,1045 5 2]]></entry>") + "<entry id=\"49\" time=\"2009-01-12 11:33:49\"><![CDATA[456,1048 5 3]]></entry>") + "<entry id=\"50\" time=\"2009-01-12 11:33:49\"><![CDATA[789,1054 6-1_5-1_5-2_5-3]]></entry>") + "<entry id=\"51\" time=\"2009-01-12 11:33:50\"><![CDATA[216,1075 370 238 3]]></entry>") + "<entry id=\"52\" time=\"2009-01-12 11:33:54\"><![CDATA[123,1169 4 2]]></entry>") + "<entry id=\"53\" time=\"2009-01-12 11:33:54\"><![CDATA[456,1169 5 2]]></entry>") + "<entry id=\"54\" time=\"2009-01-12 11:33:54\"><![CDATA[456,1172 6 2]]></entry>") + "<entry id=\"55\" time=\"2009-01-12 11:33:54\"><![CDATA[456,1176 6 1]]></entry>") + "<entry id=\"56\" time=\"2009-01-12 11:33:54\"><![CDATA[789,1183 4-2_5-2_6-2_6-1]]></entry>") + "<entry id=\"57\" time=\"2009-01-12 11:33:55\"><![CDATA[216,1195 94 253 3]]></entry>") + "<entry id=\"58\" time=\"2009-01-12 11:33:58\"><![CDATA[123,1271 4 1]]></entry>") + "<entry id=\"59\" time=\"2009-01-12 11:33:58\"><![CDATA[789,1273 4-1]]></entry>") + "<entry id=\"60\" time=\"2009-01-12 11:33:58\"><![CDATA[216,1277 10 262 4]]></entry>") + "<entry id=\"61\" time=\"2009-01-12 11:33:59\"><![CDATA[123,1300 6 1]]></entry>") + "<entry id=\"62\" time=\"2009-01-12 11:33:59\"><![CDATA[456,1301 7 1]]></entry>") + "<entry id=\"63\" time=\"2009-01-12 11:33:59\"><![CDATA[456,1302 8 1]]></entry>") + "<entry id=\"64\" time=\"2009-01-12 11:33:59\"><![CDATA[789,1306 6-1_7-1_8-1]]></entry>") + "<entry id=\"65\" time=\"2009-01-12 11:33:59\"><![CDATA[216,1310 10 266 4]]></entry>") + "<entry id=\"66\" time=\"2009-01-12 11:34:00\"><![CDATA[111,1337]]></entry>") + "<entry id=\"67\" time=\"2009-01-12 11:34:03\"><![CDATA[123,1413 8 5]]></entry>") + "<entry id=\"68\" time=\"2009-01-12 11:34:04\"><![CDATA[456,1417 7 4]]></entry>") + "<entry id=\"69\" time=\"2009-01-12 11:34:04\"><![CDATA[456,1428 8 4]]></entry>") + "<entry id=\"70\" time=\"2009-01-12 11:34:04\"><![CDATA[456,1434 7 4]]></entry>") + "<entry id=\"71\" time=\"2009-01-12 11:34:05\"><![CDATA[789,1444 8-5_8-4_7-4]]></entry>") + "<entry id=\"72\" time=\"2009-01-12 11:34:06\"><![CDATA[216,1468 360 271 4]]></entry>") + "<entry id=\"73\" time=\"2009-01-12 11:34:09\"><![CDATA[123,1552 6 6]]></entry>") + "<entry id=\"74\" time=\"2009-01-12 11:34:09\"><![CDATA[456,1555 7 6]]></entry>") + "<entry id=\"75\" time=\"2009-01-12 11:34:09\"><![CDATA[456,1556 8 6]]></entry>") + "<entry id=\"76\" time=\"2009-01-12 11:34:09\"><![CDATA[456,1559 8 5]]></entry>") + "<entry id=\"77\" time=\"2009-01-12 11:34:10\"><![CDATA[789,1568 6-6_7-6_8-6_8-5]]></entry>") + "<entry id=\"78\" time=\"2009-01-12 11:34:10\"><![CDATA[216,1572 10 293 4]]></entry>") + "<entry id=\"79\" time=\"2009-01-12 11:34:11\"><![CDATA[111,1600]]></entry>") + "<entry id=\"80\" time=\"2009-01-12 11:34:12\"><![CDATA[123,1636 5 4]]></entry>") + "<entry id=\"81\" time=\"2009-01-12 11:34:13\"><![CDATA[456,1638 6 4]]></entry>") + "<entry id=\"82\" time=\"2009-01-12 11:34:13\"><![CDATA[456,1642 6 3]]></entry>") + "<entry id=\"83\" time=\"2009-01-12 11:34:13\"><![CDATA[456,1648 7 3]]></entry>") + "<entry id=\"84\" time=\"2009-01-12 11:34:13\"><![CDATA[456,1653 7 2]]></entry>") + "<entry id=\"85\" time=\"2009-01-12 11:34:13\"><![CDATA[789,1659 5-4_6-4_6-3_7-3_7-2]]></entry>") + "<entry id=\"86\" time=\"2009-01-12 11:34:14\"><![CDATA[216,1678 266 298 4]]></entry>") + "<entry id=\"87\" time=\"2009-01-12 11:34:18\"><![CDATA[123,1765 1 1]]></entry>") + "<entry id=\"88\" time=\"2009-01-12 11:34:18\"><![CDATA[456,1769 1 2]]></entry>") + "<entry id=\"89\" time=\"2009-01-12 11:34:18\"><![CDATA[456,1769 1 3]]></entry>") + "<entry id=\"90\" time=\"2009-01-12 11:34:18\"><![CDATA[456,1776 2 3]]></entry>") + "<entry id=\"91\" time=\"2009-01-12 11:34:18\"><![CDATA[456,1780 2 4]]></entry>") + "<entry id=\"92\" time=\"2009-01-12 11:34:18\"><![CDATA[456,1784 1 4]]></entry>") + "<entry id=\"93\" time=\"2009-01-12 11:34:19\"><![CDATA[789,1790 1-1_1-2_1-3_2-3_2-4]]></entry>") + "<entry id=\"94\" time=\"2009-01-12 11:34:19\"><![CDATA[216,1813 386 313 4]]></entry>") + "<entry id=\"95\" time=\"2009-01-12 11:34:22\"><![CDATA[123,1876 8 7]]></entry>") + "<entry id=\"96\" time=\"2009-01-12 11:34:22\"><![CDATA[456,1880 8 8]]></entry>") + "<entry id=\"97\" time=\"2009-01-12 11:34:22\"><![CDATA[456,1882 7 8]]></entry>") + "<entry id=\"98\" time=\"2009-01-12 11:34:22\"><![CDATA[789,1888 8-7_8-8_7-8]]></entry>") + "<entry id=\"99\" time=\"2009-01-12 11:34:23\"><![CDATA[216,1900 78 331 5]]></entry>") + "<entry id=\"100\" time=\"2009-01-12 11:34:24\"><![CDATA[111,1937]]></entry>") + "<entry id=\"101\" time=\"2009-01-12 11:34:25\"><![CDATA[123,1957 5 3]]></entry>") + "<entry id=\"102\" time=\"2009-01-12 11:34:25\"><![CDATA[456,1962 5 2]]></entry>") + "<entry id=\"103\" time=\"2009-01-12 11:34:26\"><![CDATA[456,1965 6 2]]></entry>") + "<entry id=\"104\" time=\"2009-01-12 11:34:26\"><![CDATA[456,1967 7 2]]></entry>") + "<entry id=\"105\" time=\"2009-01-12 11:34:26\"><![CDATA[456,1969 8 2]]></entry>") + "<entry id=\"106\" time=\"2009-01-12 11:34:26\"><![CDATA[456,1975 8 3]]></entry>") + "<entry id=\"107\" time=\"2009-01-12 11:34:26\"><![CDATA[456,1982 8 4]]></entry>") + "<entry id=\"108\" time=\"2009-01-12 11:34:26\"><![CDATA[789,1982 5-3_5-2_6-2_7-2_8-2]]></entry>") + "<entry id=\"109\" time=\"2009-01-12 11:34:26\"><![CDATA[216,1990 40 344 5]]></entry>") + "<entry id=\"110\" time=\"2009-01-12 11:34:28\"><![CDATA[123,2034 7 2]]></entry>") + "<entry id=\"111\" time=\"2009-01-12 11:34:28\"><![CDATA[456,2035 8 2]]></entry>") + "<entry id=\"112\" time=\"2009-01-12 11:34:29\"><![CDATA[456,2039 8 3]]></entry>") + "<entry id=\"113\" time=\"2009-01-12 11:34:29\"><![CDATA[456,2040 8 4]]></entry>") + "<entry id=\"114\" time=\"2009-01-12 11:34:29\"><![CDATA[456,2054 8 5]]></entry>") + "<entry id=\"115\" time=\"2009-01-12 11:34:29\"><![CDATA[456,2059 7 5]]></entry>") + "<entry id=\"116\" time=\"2009-01-12 11:34:29\"><![CDATA[456,2060 6 5]]></entry>") + "<entry id=\"117\" time=\"2009-01-12 11:34:30\"><![CDATA[789,2068 7-2_8-2_8-3_8-4_8-5]]></entry>") + "<entry id=\"118\" time=\"2009-01-12 11:34:30\"><![CDATA[216,2076 40 351 5]]></entry>") + "<entry id=\"119\" time=\"2009-01-12 11:34:32\"><![CDATA[123,2129 8 1]]></entry>") + "<entry id=\"120\" time=\"2009-01-12 11:34:32\"><![CDATA[456,2130 7 1]]></entry>") + "<entry id=\"121\" time=\"2009-01-12 11:34:32\"><![CDATA[456,2133 6 1]]></entry>") + "<entry id=\"122\" time=\"2009-01-12 11:34:32\"><![CDATA[456,2135 6 2]]></entry>") + "<entry id=\"123\" time=\"2009-01-12 11:34:33\"><![CDATA[456,2140 5 2]]></entry>") + "<entry id=\"124\" time=\"2009-01-12 11:34:33\"><![CDATA[456,2142 4 2]]></entry>") + "<entry id=\"125\" time=\"2009-01-12 11:34:33\"><![CDATA[789,2146 8-1_7-1_6-1_6-2_5-2]]></entry>") + "<entry id=\"126\" time=\"2009-01-12 11:34:33\"><![CDATA[216,2155 50 358 5]]></entry>") + "<entry id=\"127\" time=\"2009-01-12 11:34:35\"><![CDATA[123,2199 8 2]]></entry>") + "<entry id=\"128\" time=\"2009-01-12 11:34:35\"><![CDATA[789,2201 8-2]]></entry>") + "<entry id=\"129\" time=\"2009-01-12 11:34:35\"><![CDATA[216,2206 15 366 5]]></entry>") + "<entry id=\"130\" time=\"2009-01-12 11:34:37\"><![CDATA[123,2244 8 2]]></entry>") + "<entry id=\"131\" time=\"2009-01-12 11:34:37\"><![CDATA[456,2246 7 2]]></entry>") + "<entry id=\"132\" time=\"2009-01-12 11:34:37\"><![CDATA[456,2250 6 2]]></entry>") + "<entry id=\"133\" time=\"2009-01-12 11:34:38\"><![CDATA[456,2267 6 1]]></entry>") + "<entry id=\"134\" time=\"2009-01-12 11:34:38\"><![CDATA[456,2272 6 0]]></entry>") + "<entry id=\"135\" time=\"2009-01-12 11:34:38\"><![CDATA[456,2278 7 0]]></entry>") + "<entry id=\"136\" time=\"2009-01-12 11:34:38\"><![CDATA[456,2280 8 0]]></entry>") + "<entry id=\"137\" time=\"2009-01-12 11:34:39\"><![CDATA[789,2289 8-2_7-2_6-2_6-1_6-0]]></entry>") + "<entry id=\"138\" time=\"2009-01-12 11:34:39\"><![CDATA[216,2298 50 371 5]]></entry>") + "<entry id=\"139\" time=\"2009-01-12 11:34:40\"><![CDATA[123,2335 8 1]]></entry>") + "<entry id=\"140\" time=\"2009-01-12 11:34:40\"><![CDATA[456,2336 8 0]]></entry>") + "<entry id=\"141\" time=\"2009-01-12 11:34:41\"><![CDATA[456,2340 7 0]]></entry>") + "<entry id=\"142\" time=\"2009-01-12 11:34:41\"><![CDATA[456,2343 6 0]]></entry>") + "<entry id=\"143\" time=\"2009-01-12 11:34:41\"><![CDATA[456,2344 5 0]]></entry>") + "<entry id=\"144\" time=\"2009-01-12 11:34:41\"><![CDATA[789,2349 8-1_8-0_7-0_6-0_5-0]]></entry>") + "<entry id=\"145\" time=\"2009-01-12 11:34:41\"><![CDATA[216,2359 55 379 5]]></entry>") + "<entry id=\"146\" time=\"2009-01-12 11:34:43\"><![CDATA[111,2399]]></entry>") + "<entry id=\"147\" time=\"2009-01-12 11:34:44\"><![CDATA[123,2435 7 2]]></entry>") + "<entry id=\"148\" time=\"2009-01-12 11:34:44\"><![CDATA[456,2437 7 3]]></entry>") + "<entry id=\"149\" time=\"2009-01-12 11:34:45\"><![CDATA[456,2443 6 3]]></entry>") + "<entry id=\"150\" time=\"2009-01-12 11:34:45\"><![CDATA[456,2450 6 4]]></entry>") + "<entry id=\"151\" time=\"2009-01-12 11:34:45\"><![CDATA[456,2453 5 4]]></entry>") + "<entry id=\"152\" time=\"2009-01-12 11:34:45\"><![CDATA[456,2454 4 4]]></entry>") + "<entry id=\"153\" time=\"2009-01-12 11:34:45\"><![CDATA[789,2461 7-2_7-3_6-3_6-4_5-4]]></entry>") + "<entry id=\"154\" time=\"2009-01-12 11:34:46\"><![CDATA[216,2489 650 390 5]]></entry>") + "<entry id=\"155\" time=\"2009-01-12 11:34:50\"><![CDATA[123,2578 6 0]]></entry>") + "<entry id=\"156\" time=\"2009-01-12 11:34:50\"><![CDATA[456,2579 5 0]]></entry>") + "<entry id=\"157\" time=\"2009-01-12 11:34:50\"><![CDATA[456,2585 5 1]]></entry>") + "<entry id=\"158\" time=\"2009-01-12 11:34:50\"><![CDATA[456,2588 4 1]]></entry>") + "<entry id=\"159\" time=\"2009-01-12 11:34:50\"><![CDATA[456,2588 3 1]]></entry>") + "<entry id=\"160\" time=\"2009-01-12 11:34:51\"><![CDATA[456,2590 2 1]]></entry>") + "<entry id=\"161\" time=\"2009-01-12 11:34:51\"><![CDATA[789,2596 6-0_5-0_5-1_4-1_3-1]]></entry>") + "<entry id=\"162\" time=\"2009-01-12 11:34:51\"><![CDATA[216,2605 45 411 6]]></entry>") + "<entry id=\"163\" time=\"2009-01-12 11:34:53\"><![CDATA[123,2651 2 10]]></entry>") + "<entry id=\"164\" time=\"2009-01-12 11:34:53\"><![CDATA[456,2653 3 10]]></entry>") + "<entry id=\"165\" time=\"2009-01-12 11:34:53\"><![CDATA[456,2658 3 11]]></entry>") + "<entry id=\"166\" time=\"2009-01-12 11:34:54\"><![CDATA[456,2665 4 11]]></entry>") + "<entry id=\"167\" time=\"2009-01-12 11:34:54\"><![CDATA[456,2668 4 12]]></entry>") + "<entry id=\"168\" time=\"2009-01-12 11:34:54\"><![CDATA[789,2674 2-10_3-10_3-11_4-11_4-12]]></entry>") + "<entry id=\"169\" time=\"2009-01-12 11:34:55\"><![CDATA[216,2695 300 420 6]]></entry>") + "<entry id=\"170\" time=\"2009-01-12 11:34:57\"><![CDATA[123,2755 2 5]]></entry>") + "<entry id=\"171\" time=\"2009-01-12 11:34:57\"><![CDATA[456,2757 3 5]]></entry>") + "<entry id=\"172\" time=\"2009-01-12 11:34:58\"><![CDATA[456,2769 3 4]]></entry>") + "<entry id=\"173\" time=\"2009-01-12 11:34:58\"><![CDATA[456,2773 4 4]]></entry>") + "<entry id=\"174\" time=\"2009-01-12 11:34:58\"><![CDATA[456,2779 4 3]]></entry>") + "<entry id=\"175\" time=\"2009-01-12 11:34:58\"><![CDATA[789,2787 2-5_3-5_3-4_4-4_4-3]]></entry>") + "<entry id=\"176\" time=\"2009-01-12 11:34:59\"><![CDATA[216,2803 163 438 6]]></entry>") + "<entry id=\"177\" time=\"2009-01-12 11:35:01\"><![CDATA[123,2861 6 3]]></entry>") + "<entry id=\"178\" time=\"2009-01-12 11:35:01\"><![CDATA[456,2863 5 3]]></entry>") + "<entry id=\"179\" time=\"2009-01-12 11:35:02\"><![CDATA[456,2866 5 4]]></entry>") + "<entry id=\"180\" time=\"2009-01-12 11:35:02\"><![CDATA[456,2872 6 4]]></entry>") + "<entry id=\"181\" time=\"2009-01-12 11:35:02\"><![CDATA[789,2879 6-3_5-3_5-4_6-4]]></entry>") + "<entry id=\"182\" time=\"2009-01-12 11:35:02\"><![CDATA[216,2884 15 451 7]]></entry>") + "<entry id=\"183\" time=\"2009-01-12 11:35:04\"><![CDATA[123,2918 6 0]]></entry>") + "<entry id=\"184\" time=\"2009-01-12 11:35:04\"><![CDATA[456,2920 6 1]]></entry>") + "<entry id=\"185\" time=\"2009-01-12 11:35:04\"><![CDATA[456,2938 6 1]]></entry>") + "<entry id=\"186\" time=\"2009-01-12 11:35:04\"><![CDATA[456,2938 7 1]]></entry>") + "<entry id=\"187\" time=\"2009-01-12 11:35:05\"><![CDATA[456,2945 7 2]]></entry>") + "<entry id=\"188\" time=\"2009-01-12 11:35:05\"><![CDATA[456,2945 7 3]]></entry>") + "<entry id=\"189\" time=\"2009-01-12 11:35:05\"><![CDATA[456,2947 7 4]]></entry>") + "<entry id=\"190\" time=\"2009-01-12 11:35:05\"><![CDATA[456,2947 7 5]]></entry>") + "<entry id=\"191\" time=\"2009-01-12 11:35:05\"><![CDATA[456,2948 7 6]]></entry>") + "<entry id=\"192\" time=\"2009-01-12 11:35:05\"><![CDATA[456,2950 7 7]]></entry>") + "<entry id=\"193\" time=\"2009-01-12 11:35:05\"><![CDATA[789,2956 6-0_6-1_7-1_7-2_7-3]]></entry>") + "<entry id=\"194\" time=\"2009-01-12 11:35:05\"><![CDATA[216,2965 50 456 7]]></entry>") + "<entry id=\"195\" time=\"2009-01-12 11:35:08\"><![CDATA[123,3014 7 4]]></entry>") + "<entry id=\"196\" time=\"2009-01-12 11:35:08\"><![CDATA[456,3016 8 4]]></entry>") + "<entry id=\"197\" time=\"2009-01-12 11:35:08\"><![CDATA[456,3020 8 3]]></entry>") + "<entry id=\"198\" time=\"2009-01-12 11:35:08\"><![CDATA[456,3020 8 2]]></entry>") + "<entry id=\"199\" time=\"2009-01-12 11:35:08\"><![CDATA[456,3022 8 1]]></entry>") + "<entry id=\"200\" time=\"2009-01-12 11:35:08\"><![CDATA[789,3029 7-4_8-4_8-3_8-2_8-1]]></entry>") + "<entry id=\"201\" time=\"2009-01-12 11:35:08\"><![CDATA[216,3038 45 464 7]]></entry>") + "<entry id=\"202\" time=\"2009-01-12 11:35:10\"><![CDATA[111,3074]]></entry>") + "<entry id=\"203\" time=\"2009-01-12 11:35:10\"><![CDATA[111,3077]]></entry>") + "<entry id=\"204\" time=\"2009-01-12 11:35:11\"><![CDATA[123,3104 5 4]]></entry>") + "<entry id=\"205\" time=\"2009-01-12 11:35:11\"><![CDATA[456,3107 5 3]]></entry>") + "<entry id=\"206\" time=\"2009-01-12 11:35:11\"><![CDATA[456,3111 4 3]]></entry>") + "<entry id=\"207\" time=\"2009-01-12 11:35:11\"><![CDATA[456,3112 3 3]]></entry>") + "<entry id=\"208\" time=\"2009-01-12 11:35:12\"><![CDATA[456,3117 3 2]]></entry>") + "<entry id=\"209\" time=\"2009-01-12 11:35:12\"><![CDATA[789,3126 5-4_5-3_4-3_3-3_3-2]]></entry>") + "<entry id=\"210\" time=\"2009-01-12 11:35:13\"><![CDATA[216,3143 214 475 7]]></entry>") + "<entry id=\"211\" time=\"2009-01-12 11:35:15\"><![CDATA[123,3200 4 9]]></entry>") + "<entry id=\"212\" time=\"2009-01-12 11:35:15\"><![CDATA[456,3201 4 8]]></entry>") + "<entry id=\"213\" time=\"2009-01-12 11:35:15\"><![CDATA[456,3207 3 8]]></entry>") + "<entry id=\"214\" time=\"2009-01-12 11:35:15\"><![CDATA[456,3214 3 7]]></entry>") + "<entry id=\"215\" time=\"2009-01-12 11:35:16\"><![CDATA[456,3221 3 7]]></entry>") + "<entry id=\"216\" time=\"2009-01-12 11:35:16\"><![CDATA[456,3222 4 7]]></entry>") + "<entry id=\"217\" time=\"2009-01-12 11:35:16\"><![CDATA[456,3234 5 7]]></entry>") + "<entry id=\"218\" time=\"2009-01-12 11:35:17\"><![CDATA[789,3244 4-9_4-8_3-8_3-7_4-7]]></entry>") + "<entry id=\"219\" time=\"2009-01-12 11:35:17\"><![CDATA[216,3257 109 488 7]]></entry>") + "<entry id=\"220\" time=\"2009-01-12 11:35:21\"><![CDATA[123,3343 5 8]]></entry>") + "<entry id=\"221\" time=\"2009-01-12 11:35:21\"><![CDATA[456,3344 6 8]]></entry>") + "<entry id=\"222\" time=\"2009-01-12 11:35:21\"><![CDATA[456,3345 7 8]]></entry>") + "<entry id=\"223\" time=\"2009-01-12 11:35:21\"><![CDATA[456,3346 8 8]]></entry>") + "<entry id=\"224\" time=\"2009-01-12 11:35:21\"><![CDATA[789,3352 5-8_6-8_7-8_8-8]]></entry>") + "<entry id=\"225\" time=\"2009-01-12 11:35:21\"><![CDATA[216,3357 15 498 8]]></entry>") + "<entry id=\"226\" time=\"2009-01-12 11:35:22\"><![CDATA[111,3386]]></entry>") + "<entry id=\"227\" time=\"2009-01-12 11:35:25\"><![CDATA[123,3445 3 9]]></entry>") + "<entry id=\"228\" time=\"2009-01-12 11:35:25\"><![CDATA[456,3449 3 10]]></entry>") + "<entry id=\"229\" time=\"2009-01-12 11:35:25\"><![CDATA[456,3453 4 10]]></entry>") + "<entry id=\"230\" time=\"2009-01-12 11:35:25\"><![CDATA[456,3458 4 11]]></entry>") + "<entry id=\"231\" time=\"2009-01-12 11:35:25\"><![CDATA[456,3460 4 12]]></entry>") + "<entry id=\"232\" time=\"2009-01-12 11:35:25\"><![CDATA[456,3461 4 13]]></entry>") + "<entry id=\"233\" time=\"2009-01-12 11:35:26\"><![CDATA[456,3468 3 12]]></entry>") + "<entry id=\"234\" time=\"2009-01-12 11:35:26\"><![CDATA[456,3476 4 12]]></entry>") + "<entry id=\"235\" time=\"2009-01-12 11:35:26\"><![CDATA[456,3478 4 12]]></entry>") + "<entry id=\"236\" time=\"2009-01-12 11:35:26\"><![CDATA[456,3481 4 11]]></entry>") + "<entry id=\"237\" time=\"2009-01-12 11:35:26\"><![CDATA[456,3484 3 11]]></entry>") + "<entry id=\"238\" time=\"2009-01-12 11:35:27\"><![CDATA[456,3492 3 12]]></entry>") + "<entry id=\"239\" time=\"2009-01-12 11:35:27\"><![CDATA[456,3499 4 12]]></entry>") + "<entry id=\"240\" time=\"2009-01-12 11:35:27\"><![CDATA[789,3507 3-9_3-10_4-10_4-11_3-11_3-12]]></entry>") + "<entry id=\"241\" time=\"2009-01-12 11:35:28\"><![CDATA[216,3529 329 504 8]]></entry>") + "<entry id=\"242\" time=\"2009-01-12 11:35:31\"><![CDATA[123,3593 3 3]]></entry>") + "<entry id=\"243\" time=\"2009-01-12 11:35:31\"><![CDATA[456,3595 2 3]]></entry>") + "<entry id=\"244\" time=\"2009-01-12 11:35:31\"><![CDATA[456,3597 2 4]]></entry>") + "<entry id=\"245\" time=\"2009-01-12 11:35:31\"><![CDATA[456,3599 2 5]]></entry>") + "<entry id=\"246\" time=\"2009-01-12 11:35:31\"><![CDATA[456,3604 2 6]]></entry>") + "<entry id=\"247\" time=\"2009-01-12 11:35:31\"><![CDATA[456,3609 3 6]]></entry>") + "<entry id=\"248\" time=\"2009-01-12 11:35:32\"><![CDATA[789,3615 3-3_2-3_2-4_2-5_2-6_3-6]]></entry>") + "<entry id=\"249\" time=\"2009-01-12 11:35:32\"><![CDATA[216,3631 163 523 8]]></entry>") + "<entry id=\"250\" time=\"2009-01-12 11:35:33\"><![CDATA[955,3656]]></entry>") + "<entry id=\"251\" time=\"2009-01-12 11:35:46\"><![CDATA[955,3989]]></entry>") + "<entry id=\"252\" time=\"2009-01-12 11:36:00\"><![CDATA[955,4323]]></entry>") + "<entry id=\"253\" time=\"2009-01-12 11:36:06\"><![CDATA[123,4472 3 6]]></entry>") + "<entry id=\"254\" time=\"2009-01-12 11:36:06\"><![CDATA[456,4474 3 7]]></entry>") + "<entry id=\"255\" time=\"2009-01-12 11:36:06\"><![CDATA[789,4478 3-6_3-7]]></entry>") + "<entry id=\"256\" time=\"2009-01-12 11:36:07\"><![CDATA[216,4497 228 537 8]]></entry>") + "<entry id=\"257\" time=\"2009-01-12 11:36:10\"><![CDATA[855,4583]]></entry>") + "<entry id=\"258\" time=\"2009-01-12 11:36:15\"><![CDATA[123,4703 4 9]]></entry>") + "<entry id=\"259\" time=\"2009-01-12 11:36:15\"><![CDATA[456,4706 3 9]]></entry>") + "<entry id=\"260\" time=\"2009-01-12 11:36:15\"><![CDATA[789,4708 4-9_3-9]]></entry>") + "<entry id=\"261\" time=\"2009-01-12 11:36:16\"><![CDATA[779,4719 554]]></entry>") + "<entry id=\"262\" time=\"2009-01-12 11:36:16\"><![CDATA[436,0 0]]></entry>") + "</gameover>");
parseData(_local2);
}
public function checkTick(_arg1:Number){
var _local3:*;
var _local4:*;
var _local2:* = 0;
while (_local2 < actionArr_.length) {
_local3 = actionArr_[_local2].split(",");
_local4 = _local3[1].split(" ");
if (Number(_local4[0]) == _arg1){
switch (_local3[0]){
case "123":
root.pieceClicked(root.gameGridObj[Number(_local4[1])][Number(_local4[2])]);
break;
case "456":
root.mouseOverPiece(root.gameGridObj[Number(_local4[1])][Number(_local4[2])], true);
break;
case "789":
root.mouseUpReplay();
break;
};
};
_local2++;
};
}
public static function parseData(_arg1:String):void{
actionArr_ = new Array();
var _local2:XMLDocument = new XMLDocument(_arg1);
var _local3:* = _local2.firstChild.childNodes;
var _local4:* = 0;
while (_local4 < _local3.length) {
if (_local3[_local4].nodeName == "entry"){
actionArr_.push(new String(_local3[_local4].firstChild.nodeValue));
};
_local4++;
};
}
}
}//package src.comm
Section 68
//MtRandom (src.math.MtRandom)
package src.math {
import flash.utils.*;
public class MtRandom {
private var mti:uint;
private var mt:Array;
public static var MATRIX_A:uint = 2567483615;
public static var UPPER_MASK:uint = 2147483648;
public static var LOWER_MASK:uint = 2147483647;
public static var M:int = 397;
public static var N:int = 624;
private static var mag01:Array = [uint(0), uint(MATRIX_A)];
public function MtRandom(_arg1:uint=0){
mti = (N + 1);
super();
if (_arg1 == 0){
_arg1 = getTimer();
};
mt = new Array(N);
init_genrand(_arg1);
}
private function genrand_int32():uint{
var _local1:Number;
var _local2:uint;
if (mti >= N){
if (mti == (N + 1)){
init_genrand(5489);
};
_local2 = 0;
while (_local2 < (N - M)) {
_local1 = ((mt[_local2] & UPPER_MASK) | (mt[(_local2 + 1)] & LOWER_MASK));
mt[_local2] = ((mt[(_local2 + M)] ^ (_local1 >>> 1)) ^ mag01[uint((_local1 & 1))]);
_local2++;
};
while (_local2 < (N - 1)) {
_local1 = ((mt[_local2] & UPPER_MASK) | (mt[(_local2 + 1)] & LOWER_MASK));
mt[_local2] = ((mt[(_local2 + (M - N))] ^ (_local1 >>> 1)) ^ mag01[uint((_local1 & 1))]);
_local2++;
};
_local1 = ((mt[(N - 1)] & UPPER_MASK) | (mt[0] & LOWER_MASK));
mt[(N - 1)] = ((mt[(M - 1)] ^ (_local1 >>> 1)) ^ mag01[uint((_local1 & 1))]);
mti = 0;
};
_local1 = mt[mti++];
_local1 = (_local1 ^ (_local1 >>> 11));
_local1 = (_local1 ^ ((_local1 << 7) & 2636928640));
_local1 = (_local1 ^ ((_local1 << 15) & 4022730752));
_local1 = (_local1 ^ (_local1 >>> 18));
return (uint(_local1));
}
private function next(_arg1:uint):uint{
return ((genrand_int32() & ((uint(1) << _arg1) - uint(1))));
}
private function init_genrand(_arg1:uint){
var _local2:uint;
var _local3:uint;
mt[0] = uint(_arg1);
mti = 1;
while (mti < N) {
_local2 = (mt[(mti - 1)] ^ (mt[(mti - 1)] >>> 30));
_local3 = uint((_local2 * 1289));
_local3 = uint((_local3 * 1406077));
_local3 = uint((_local3 + mti));
mt[mti] = _local3;
mti++;
};
}
public function nextFloat():Number{
return ((next(24) / 16777216));
}
public function setSeed(_arg1:uint):void{
init_genrand(_arg1);
}
public function nextDouble():Number{
return ((next(24) / 16777216));
}
public function nextInt(_arg1:uint):uint{
return (((genrand_int32() & 2147483647) % _arg1));
}
}
}//package src.math
Section 69
//ManagedSound (src.sound.ManagedSound)
package src.sound {
import flash.media.*;
public class ManagedSound {
public var activeSounds:Array;
private var manager:SoundManager;
private var ClassReference:Class;
public function ManagedSound(_arg1:SoundManager, _arg2:Class){
activeSounds = new Array();
super();
this.manager = _arg1;
this.ClassReference = _arg2;
}
public function stop():void{
var _local1:int;
while (_local1 < activeSounds.length) {
activeSounds[_local1].stop();
_local1++;
};
}
public function play(_arg1:Number=1, _arg2:Number=0):ManagedSoundChannel{
var _local3:SoundChannel = new ClassReference().play(0, 0, new SoundTransform(_arg1, _arg2));
return (new ManagedSoundChannel(manager, this, _local3));
}
public function loop(_arg1:Number=1, _arg2:Number=0):ManagedSoundChannel{
var _local3:SoundChannel = new ClassReference().play(0, 999999999, new SoundTransform(_arg1, _arg2));
return (new ManagedSoundChannel(manager, this, _local3));
}
public function fadeToAndStop(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].fadeToAndStop(_arg1, _arg2);
_local3++;
};
}
public function isPlaying():Boolean{
return ((activeSounds.length > 0));
}
public function update():void{
var _local1:int;
while (_local1 < activeSounds.length) {
activeSounds[_local1].update();
_local1++;
};
}
public function fadeTo(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].fadeTo(_arg1, _arg2);
_local3++;
};
}
public function panTo(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].panTo(_arg1, _arg2);
_local3++;
};
}
public function setPan(_arg1:Number):void{
var _local2:int;
while (_local2 < activeSounds.length) {
activeSounds[_local2].setPan(_arg1);
_local2++;
};
}
public function setVolume(_arg1:Number):void{
var _local2:int;
while (_local2 < activeSounds.length) {
activeSounds[_local2].setVolume(_arg1);
_local2++;
};
}
}
}//package src.sound
Section 70
//ManagedSoundChannel (src.sound.ManagedSoundChannel)
package src.sound {
import flash.media.*;
import flash.events.*;
import flash.utils.*;
public class ManagedSoundChannel {
private var fadeStartVolume:Number;// = -1
private var channel:SoundChannel;
private var fadeEndVolume:Number;// = -1
private var targetVolume:Number;
private var targetPan:Number;
private var sound:ManagedSound;
private var stopAfterFade:Boolean;// = false
private var panEndTime:Number;// = -1
private var fadeEndTime:Number;// = -1
private var manager:SoundManager;
private var playing:Boolean;// = true
private var panStartTime:Number;// = -1
private var fadeStartTime:Number;// = -1
private var panEndVolume:Number;// = -1
private var panStartVolume:Number;// = -1
public function ManagedSoundChannel(_arg1:SoundManager, _arg2:ManagedSound, _arg3:SoundChannel){
this.manager = _arg1;
this.sound = _arg2;
this.channel = _arg3;
_arg2.activeSounds.push(this);
_arg3.addEventListener(Event.SOUND_COMPLETE, soundComplete);
targetVolume = _arg3.soundTransform.volume;
targetPan = _arg3.soundTransform.pan;
update();
}
public function stop():void{
if (!playing){
return;
};
channel.stop();
soundComplete(null);
}
public function update():void{
var _local1:Number;
if (!playing){
return;
};
if (fadeStartTime >= 0){
_local1 = ((getTimer() - fadeStartTime) / (fadeEndTime - fadeStartTime));
if (_local1 < 0){
_local1 = 0;
};
if (_local1 > 1){
_local1 = 1;
};
targetVolume = (fadeStartVolume + ((fadeEndVolume - fadeStartVolume) * _local1));
targetVolume = (targetVolume * targetVolume);
if (_local1 == 1){
fadeStartTime = -1;
};
if ((((_local1 == 1)) && (stopAfterFade))){
stop();
};
};
if (panStartTime >= 0){
_local1 = ((getTimer() - panStartTime) / (panEndTime - panStartTime));
if (_local1 < 0){
_local1 = 0;
};
if (_local1 > 1){
_local1 = 1;
};
targetPan = (panStartVolume + ((panEndVolume - panStartVolume) * _local1));
if (_local1 == 1){
panStartTime = -1;
};
};
var _local2:Number = (targetVolume * manager.volume);
var _local3:Number = targetPan;
if (((!((_local2 == channel.soundTransform.volume))) || (!((_local3 == channel.soundTransform.pan))))){
channel.soundTransform = new SoundTransform(_local2, _local3);
};
}
public function panTo(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
panStartVolume = targetPan;
panEndVolume = _arg1;
panStartTime = getTimer();
panEndTime = (getTimer() + _arg2);
}
public function fadeTo(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
fadeStartVolume = Math.sqrt(targetVolume);
fadeEndVolume = Math.sqrt(_arg1);
fadeStartTime = getTimer();
fadeEndTime = (getTimer() + _arg2);
stopAfterFade = false;
}
public function setPan(_arg1:Number):void{
if (!playing){
return;
};
channel.soundTransform.pan = _arg1;
panStartTime = -1;
update();
}
public function fadeToAndStop(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
fadeTo(_arg1, _arg2);
stopAfterFade = true;
}
public function setVolume(_arg1:Number):void{
if (!playing){
return;
};
stopAfterFade = false;
this.targetVolume = _arg1;
fadeStartTime = -1;
update();
}
public function soundComplete(_arg1:Event):void{
if (!playing){
return;
};
sound.activeSounds.splice(sound.activeSounds.indexOf(this), 1);
playing = false;
}
public function isPlaying():Boolean{
return (playing);
}
}
}//package src.sound
Section 71
//SoundManager (src.sound.SoundManager)
package src.sound {
import flash.utils.*;
public class SoundManager {
private var fadeStartVolume:Number;// = -1
private var lastTime:Number;// = -1
private var managedSounds:Array;
private var fadeEndTime:Number;// = -1
private var fadeStartTime:Number;// = -1
private var fadeEndVolume:Number;// = -1
public var volume:Number;// = 1
private var managedSoundMap:Object;
public function SoundManager(){
managedSoundMap = new Object();
managedSounds = new Array();
super();
}
public function update():void{
var _local3:Number;
var _local1:Number = getTimer();
if (lastTime < 0){
lastTime = _local1;
};
if (fadeStartTime >= 0){
_local3 = ((getTimer() - fadeStartTime) / (fadeEndTime - fadeStartTime));
if (_local3 < 0){
_local3 = 0;
};
if (_local3 > 1){
_local3 = 1;
};
volume = (fadeStartVolume + ((fadeEndVolume - fadeStartVolume) * _local3));
volume = (volume * volume);
if (_local3 == 1){
fadeStartTime = -1;
};
};
var _local2:int;
while (_local2 < managedSounds.length) {
managedSounds[_local2].update();
_local2++;
};
}
public function stopAll():void{
var _local1:int;
while (_local1 < managedSounds.length) {
managedSounds[_local1].stop();
_local1++;
};
}
public function get(_arg1:String):ManagedSound{
var _local2:Class;
if (managedSoundMap[_arg1] == null){
_local2 = (getDefinitionByName(_arg1) as Class);
if (_local2 == null){
_local2 = (getDefinitionByName(("sound." + _arg1)) as Class);
};
if (_local2 == null){
_local2 = (getDefinitionByName(("snd." + _arg1)) as Class);
};
if (_local2 == null){
throw (new Error(("Failed to find sound " + _arg1)));
};
managedSoundMap[_arg1] = new ManagedSound(this, _local2);
managedSounds.push(managedSoundMap[_arg1]);
};
return (managedSoundMap[_arg1]);
}
public function fadeTo(_arg1:Number, _arg2:Number):void{
fadeStartVolume = Math.sqrt(volume);
fadeEndVolume = Math.sqrt(_arg1);
fadeStartTime = getTimer();
fadeEndTime = (getTimer() + _arg2);
}
public function setVolume(_arg1:Number):void{
this.volume = _arg1;
fadeStartTime = -1;
}
}
}//package src.sound
Section 72
//IFloat (src.timing.IFloat)
package src.timing {
public class IFloat {
public var ivalue:Number;
private var lastValue:Number;
private static var alpha:Number;
public function IFloat(_arg1:Number){
ivalue = _arg1;
lastValue = _arg1;
alpha = 0;
}
public function get value():Number{
return ((lastValue + ((ivalue - lastValue) * alpha)));
}
public function set(_arg1:Number){
lastValue = ivalue;
ivalue = _arg1;
}
public function get(_arg1:Number){
return ((lastValue + ((ivalue - lastValue) * _arg1)));
}
public function set value(_arg1:Number):void{
ivalue = _arg1;
lastValue = _arg1;
}
public function setTo(_arg1:Number){
ivalue = _arg1;
lastValue = _arg1;
}
public static function setAlpha(_arg1:Number):void{
alpha = _arg1;
}
}
}//package src.timing
Section 73
//Timeable (src.timing.Timeable)
package src.timing {
public interface Timeable {
function tick(_arg1:Number):void;
function render(_arg1:Number, _arg2:Number):void;
}
}//package src.timing
Section 74
//Timer (src.timing.Timer)
package src.timing {
import flash.utils.*;
public class Timer {
private var unprocessedTime:Number;// = 0
private var lastTime:Number;// = 0
private var millisPerGameTick:Number;// = 0
private var timeable:Timeable;
private var maxTickTime:Number;// = -1
private var startTime:Number;// = -1
private var time:Number;// = 0
private var tick:Number;// = 0
public function Timer(_arg1:Timeable, _arg2:Number){
millisPerGameTick = (1000 / _arg2);
this.timeable = _arg1;
this.maxTickTime = 500;
}
public function getMillisPerTick():Number{
return (millisPerGameTick);
}
public function advanceTime2():void{
var _local4:*;
var _local1:* = getTimer();
if (startTime < 0){
startTime = _local1;
unprocessedTime = millisPerGameTick;
};
time = (_local1 - startTime);
var _local2:* = (time - lastTime);
lastTime = time;
unprocessedTime = (unprocessedTime + _local2);
if (unprocessedTime >= millisPerGameTick){
_local4 = (maxTickTime + _local1);
do {
timeable.tick(tick);
tick++;
unprocessedTime = (unprocessedTime - millisPerGameTick);
} while ((((unprocessedTime >= millisPerGameTick)) && ((getTimer() < _local4))));
};
var _local3:Number = ((unprocessedTime % millisPerGameTick) / millisPerGameTick);
IFloat.setAlpha(_local3);
timeable.render(tick, _local3);
}
public function advanceTime(){
time = getTimer();
var _local1:* = (time - lastTime);
lastTime = time;
unprocessedTime = (unprocessedTime + _local1);
var _local2:Number = 0;
while (unprocessedTime > millisPerGameTick) {
unprocessedTime = (unprocessedTime - millisPerGameTick);
timeable.tick(tick);
tick++;
_local2++;
if (_local2 >= 10){
unprocessedTime = 0;
};
};
var _local3:Number = (unprocessedTime / millisPerGameTick);
timeable.render(tick, _local3);
}
public function setMaxTickTime(_arg1:Number):void{
maxTickTime = _arg1;
}
}
}//package src.timing
Section 75
//BlueBonusAnim (src.BlueBonusAnim)
package src {
import flash.display.*;
public class BlueBonusAnim extends MovieClip {
public var delay;
public var type;// = 0
public var animAt;// = 0
public function BlueBonusAnim(_arg1){
addFrameScript(0, frame1);
this.delay = (_arg1 * 10);
x = -3;
y = 546;
}
function frame1(){
stop();
}
}
}//package src
Section 76
//Explosion (src.Explosion)
package src {
import src.timing.*;
import flash.events.*;
import flash.display.*;
public class Explosion extends MovieClip {
public var delay;// = 0
public var mcExplosionWhite:MovieClip;
public var reference;
public var state;// = 1
public var large;
public var animLength;// = 15
public var target;
public var mcExplosionBlue:MovieClip;
public var yPos;
public var xPos;
public var mcExplosionSmallWhite:MovieClip;
public var mcExplosionSmallBlue:MovieClip;
public var mcExplosionGreen:MovieClip;
public var animAt;// = 1
public var mcExplosionPink:MovieClip;
public var mcExplosionSmallGreen:MovieClip;
private var currentTick;
public var mcExplosionSmallPink:MovieClip;
public function Explosion(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function init(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9):void{
reference = _arg6;
y = _arg1;
x = _arg2;
this.yPos = _arg7;
this.xPos = _arg8;
this.large = _arg5;
mcExplosionBlue.visible = false;
mcExplosionPink.visible = false;
mcExplosionSmallPink.visible = false;
mcExplosionSmallBlue.visible = false;
mcExplosionWhite.visible = false;
mcExplosionGreen.visible = false;
mcExplosionSmallGreen.visible = false;
mcExplosionSmallWhite.visible = false;
if (_arg9 == 0){
if (_arg4 == 0){
if (_arg5){
target = mcExplosionBlue;
} else {
target = mcExplosionSmallBlue;
};
} else {
if (_arg5){
target = mcExplosionPink;
} else {
target = mcExplosionSmallPink;
};
};
} else {
if (_arg4 == 0){
if (_arg5){
target = mcExplosionWhite;
} else {
target = mcExplosionSmallWhite;
};
} else {
if (_arg5){
target = mcExplosionGreen;
} else {
target = mcExplosionSmallGreen;
};
};
};
target.visible = true;
this.delay = (_arg3 * 2);
visible = true;
}
public function tick(_arg1:Number, _arg2:Number):void{
currentTick = _arg1;
}
public function render(_arg1:Number, _arg2:Number):void{
}
}
}//package src
Section 77
//GameHalloween (src.GameHalloween)
package src {
import src.sound.*;
import src.timing.*;
import flash.events.*;
import src.math.*;
import src.comm.*;
import flash.display.*;
import flash.utils.*;
import flash.external.*;
public class GameHalloween extends MovieClip {
private var yFloatArr:Array;
private var explosionArr:Array;
public var bonusSizeInc;// = 0
private var targetArr:Array;
private var dropCounter;
private var addedBrick;// = ""
private var largestCombo;// = 0
private var numberJellySqashes;// = 0
private var noOfBonusTypes:Number;
private var blueAlpha;// = 1
private var allowedNoTargets;
private var soundCount;// = 0
public var sfxOn;
private var nextBonusType;
public var mcPinkBar:MovieClip;
private var replayData;
private var noOfBlueBonus;// = 0
private var starBonusCounter;// = 0
private var communicator;
private var startTime;
private var explosionMode;// = false
private var blueAlphaAnim;// = -1
private var addedBrickTick;// = ""
private var firstTarget:Piece;
public var mcBlueButton:MovieClip;
private var visualExplosionArr;
private var scoreArr;
public var mcMarker:MovieClip;
private var starBonusAnimAt;// = 1
private var warnTime;// = false
private var timeLeft;
private var highestComboScore;// = 0
private var bonusAnimArr;
private var themeMod:Number;
public var mcPinkButton:MovieClip;
private var noOfRandoms:Number;// = 0
private var vertExplArr:Array;
public var mcTime:MovieClip;
private var pinkAlpha;// = 1
private var noOfBonusRandoms:Number;// = 0
private var pieceID;// = 0
private var score;// = 0
public var mcBonusCounter:MovieClip;
private var horiExplArr:Array;
private var starBonusMultiplier;// = 2
public var gameGridObj:Array;
private var blueBarValue;
public var mcScore:MovieClip;
private var bonusXFloatArr;
private var bonusYFloatArr;
private var sfxManager:SoundManager;
private var boardFull;// = true
private var deadObjectArr;
private var checked;
public var mcStarBonusAnim:MovieClip;
private var userType:Number;
private var noOfPinkBonus;// = 0
private var playOut;// = false
private var pinkBarValue;
private var currentTick:Number;
private var bonusRotFloatArr;
public var mcChalkMarker:MovieClip;
private var starBonusAnimStop;// = 1
private var relaxTickTime:int;// = 1
private var random;
private var lastTarget:Piece;
private var pinkAlphaAnim;// = -1
private var gameState:Number;
private var musicManager:SoundManager;
private var bonusArr;
private var bonusRandom;
private var bonusCounter;// = 0
public var mcBlueBar:MovieClip;
public var musicOn;
private var noOfTypes:Number;
private var checkCounterArr:Array;
private var gameRoot;
private var barMod;// = 1
private static var BOARD_HEIGHT = 9;
private static var STATE_NOT_RUNNING = 1;
private static var TOTAL_TIME = 4500;
public static var RELAX_GAME_START_SPEED:Number = 0.3;
private static var STATE_RUNNING = 0;
private static var MIN_LENGTH = 4;
private static var BONUS_OBJ = 8;
private static var RESET_DROP_COUNTER = 1;
public static var RELAX_GAME_SPEED_INCREASE_INTERVAL:int = 750;
private static var BOARD_WIDTH = 15;
private static var RESET_BAR_VALUE = 5000;
private static var STATE_BONUS_ANIM = 2;
public static var RELAX_GAME_SPEED_INCREASE:Number = 0.1;
private static var REPLAY_MODE = false;
public function GameHalloween(){
gameGridObj = new Array();
yFloatArr = new Array();
vertExplArr = new Array();
horiExplArr = new Array();
explosionArr = new Array();
checkCounterArr = new Array();
visualExplosionArr = new Array();
scoreArr = new Array();
bonusArr = new Array();
bonusYFloatArr = new Array();
bonusXFloatArr = new Array();
bonusRotFloatArr = new Array();
bonusAnimArr = new Array();
deadObjectArr = new Array();
targetArr = new Array();
blueBarValue = RESET_BAR_VALUE;
pinkBarValue = RESET_BAR_VALUE;
super();
trace("a Game crated");
mcBlueButton.gotoAndStop(1);
mcPinkButton.gotoAndStop(1);
mcBlueButton.addEventListener(MouseEvent.MOUSE_UP, triggerBonusBlue);
mcPinkButton.addEventListener(MouseEvent.MOUSE_UP, triggerBonusPink);
mcStarBonusAnim.visible = false;
if (REPLAY_MODE){
replayData = new replayer(this);
};
gameState = STATE_NOT_RUNNING;
}
public function calcBonusScore(){
var _local2:*;
var _local3:*;
sfxManager.get("TimeWarning").stop();
sfxManager.get("GameOverSplash").play(0.7);
communicator.lastTick((currentTick + 1), noOfRandoms, noOfBonusRandoms);
var _local1:* = 0;
_local2 = 0;
while (_local2 < noOfPinkBonus) {
var _temp1 = _local1;
_local1 = (_local1 + 1);
_local3 = new GreenBonusAnim(_temp1);
bonusAnimArr.push(_local3);
addChild(_local3);
_local2++;
};
_local2 = 0;
while (_local2 < noOfBlueBonus) {
var _temp2 = _local1;
_local1 = (_local1 + 1);
_local3 = new WhiteBonusAnim(_temp2);
bonusAnimArr.push(_local3);
addChild(_local3);
_local2++;
};
clearBoard();
gameRoot.mcEndGame.visible = false;
gameState = STATE_BONUS_ANIM;
}
public function checkForVerticalExplosion(_arg1){
var _local2:*;
vertExplArr.push(_arg1);
_arg1.cfv = true;
if (_arg1.posY < (BOARD_HEIGHT - 1)){
_local2 = gameGridObj[(_arg1.posY + 1)][_arg1.posX];
if (((((!((_local2 == null))) && (!(_local2.collapsing)))) && (!(_local2.exploding)))){
if ((((_local2.type == _arg1.type)) && (!(_local2.cfv)))){
checkForVerticalExplosion(_local2);
};
};
};
}
public function createBonus(_arg1:Number, _arg2:Number, _arg3:Boolean){
var _local4:* = nextBonusType;
var _local5:* = new Piece();
_local5.init(_arg1, _arg2, _local4, this, _arg3, pieceID, 1);
pieceID++;
addChild(_local5);
return (_local5);
}
public function createPieceForBoard(_arg1:Number, _arg2:Number, _arg3:Boolean){
var _local4:* = getRandom(noOfTypes);
var _local5:* = new Piece();
_local5.init(_arg1, _arg2, _local4, this, _arg3, pieceID, 1);
pieceID++;
addChild(_local5);
return (_local5);
}
public function createBonusRemovePuff(_arg1){
}
public function addBonus(_arg1:Number){
trace("addBonus");
communicator.addBonus(currentTick);
switch (_arg1){
case 2:
if (noOfBlueBonus == 0){
mcBlueButton.gotoAndPlay(2);
};
noOfBlueBonus++;
mcBlueButton.mcText.txtNum.text = ("x" + noOfBlueBonus);
sfxManager.get("BlueBoost").play();
break;
case 3:
if (noOfPinkBonus == 0){
mcPinkButton.gotoAndPlay(2);
};
noOfPinkBonus++;
mcPinkButton.mcText.txtNum.text = ("x" + noOfPinkBonus);
sfxManager.get("PinkBoost").play();
break;
case 4:
sfxManager.get("StarBonus").play();
if (starBonusCounter > 0){
starBonusMultiplier++;
starBonusCounter = (starBonusCounter + 325);
} else {
starBonusMultiplier = 3;
starBonusCounter = 325;
musicManager.get("GameLoop").stop();
musicManager.get("BonusMode").loop();
};
mcStarBonusAnim.visible = true;
mcStarBonusAnim.mcText.mcText.txtNum.text = ("x" + (starBonusMultiplier - 2));
switch (starBonusMultiplier){
case 2:
starBonusAnimStop = 35;
starBonusAnimAt = 1;
break;
case 3:
starBonusAnimStop = 35;
starBonusAnimAt = 1;
break;
case 4:
starBonusAnimStop = 43;
break;
case 5:
starBonusAnimStop = 51;
break;
case 6:
starBonusAnimStop = 60;
break;
case 7:
starBonusAnimStop = 69;
break;
case 8:
starBonusAnimStop = 77;
break;
case 9:
starBonusAnimStop = 85;
break;
};
break;
case 5:
allowedNoTargets = Math.min((allowedNoTargets + 1), 6);
mcMarker.gotoAndStop((allowedNoTargets - 3));
mcChalkMarker.gotoAndStop((allowedNoTargets - 3));
sfxManager.get("Selector").play();
break;
};
}
public function testClick(){
var _local1:* = gameGridObj[getRandom(BOARD_HEIGHT)][getRandom(BOARD_WIDTH)];
while (_local1 == null) {
_local1 = gameGridObj[getRandom(BOARD_HEIGHT)][getRandom(BOARD_WIDTH)];
};
pieceClicked(_local1);
}
public function calcFrame(){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local1:* = 0;
while (_local1 < targetArr.length) {
_local2 = targetArr[_local1];
_local3 = true;
_local4 = true;
_local5 = true;
_local6 = true;
if ((((_local2.posY > 0)) && (!((gameGridObj[(_local2.posY - 1)][_local2.posX] == null))))){
if (gameGridObj[(_local2.posY - 1)][_local2.posX].marked){
_local3 = false;
};
};
if ((((_local2.posX < (BOARD_WIDTH - 1))) && (!((gameGridObj[_local2.posY][(_local2.posX + 1)] == null))))){
if (gameGridObj[_local2.posY][(_local2.posX + 1)].marked){
_local4 = false;
};
};
if ((((_local2.posY < (BOARD_HEIGHT - 1))) && (!((gameGridObj[(_local2.posY + 1)][_local2.posX] == null))))){
if (gameGridObj[(_local2.posY + 1)][_local2.posX].marked){
_local5 = false;
};
};
if ((((_local2.posX > 0)) && (!((gameGridObj[_local2.posY][(_local2.posX - 1)] == null))))){
if (gameGridObj[_local2.posY][(_local2.posX - 1)].marked){
_local6 = false;
};
};
_local2.setFrame(_local3, _local4, _local5, _local6, allowedNoTargets);
_local1++;
};
}
public function getBonusRandom(_arg1:Number){
noOfBonusRandoms++;
return (bonusRandom.nextInt(_arg1));
}
public function mouseUp(_arg1:Event){
var _local2:*;
var _local3:*;
addedBrickTick = "";
addedBrick = "";
if (((!((targetArr.length == 0))) && ((gameState == STATE_RUNNING)))){
_local2 = "";
_local3 = 0;
while (_local3 < targetArr.length) {
_local2 = (_local2 + ((targetArr[_local3].posY + "-") + targetArr[_local3].posX));
if (_local3 < (targetArr.length - 1)){
_local2 = (_local2 + "_");
};
_local3++;
};
communicator.mouseUp((currentTick + 1), _local2);
_local3 = 0;
while (_local3 < targetArr.length) {
targetArr[_local3].type = ((targetArr[_local3].type + 1) % 2);
targetArr[_local3].switchPiece();
targetArr[_local3].unMark();
_local3++;
};
checkForExplosions();
targetArr = [];
};
}
public function mouseUpReplay(){
var _local1:*;
var _local2:*;
addedBrickTick = "";
addedBrick = "";
if (((!((targetArr.length == 0))) && ((gameState == STATE_RUNNING)))){
_local1 = "";
_local2 = 0;
while (_local2 < targetArr.length) {
_local1 = (_local1 + ((targetArr[_local2].posY + "-") + targetArr[_local2].posX));
if (_local2 < (targetArr.length - 1)){
_local1 = (_local1 + "_");
};
_local2++;
};
communicator.mouseUp((currentTick + 1), _local1);
_local2 = 0;
while (_local2 < targetArr.length) {
targetArr[_local2].type = ((targetArr[_local2].type + 1) % 2);
targetArr[_local2].switchPiece();
targetArr[_local2].unMark();
_local2++;
};
checkForExplosions();
targetArr = [];
};
}
public function calcScore(_arg1){
var _local5:*;
var _local9:*;
var _local2:* = 0;
var _local3:* = 0;
var _local4:* = 0;
_local5 = 0;
while (_local5 < explosionArr[_arg1].length) {
_local9 = 0;
while (_local9 < explosionArr[_arg1][_local5].length) {
_local2++;
_local3 = (_local3 + _local2);
if (explosionArr[_arg1][_local5][_local9].state == 8){
_local4++;
};
_local9++;
};
_local5++;
};
_local4 = (_local4 / 2);
_local3 = Math.round((_local3 * (1 + (_local4 * 0.1))));
if (starBonusCounter > 0){
_local3 = Math.round(((starBonusMultiplier / 2) * _local3));
};
var _local6:* = (Math.round((explosionArr[_arg1].length / 2)) - 1);
var _local7:* = 0;
_local5 = 0;
while (_local5 < _local6) {
_local7 = (_local7 + explosionArr[_arg1][_local5].length);
_local5++;
};
var _local8:* = (Math.round((explosionArr[_arg1][_local6].length / 2)) - 1);
_local7 = (_local7 + _local8);
_local7 = (_local7 + 15);
createScorePop(_local3, explosionArr[_arg1][_local6][_local8].y, explosionArr[_arg1][_local6][_local8].x, _local7);
communicator.sendScore((currentTick + 1), _local3, noOfRandoms, noOfBonusRandoms);
score = (score + _local3);
highestComboScore = Math.max(highestComboScore, _local3);
}
public function triggerBonusBlue(_arg1:Event){
if (noOfBlueBonus > 0){
communicator.triggerBonusBlue((currentTick + 1));
sfxManager.get("BoostMeter").play();
noOfBlueBonus--;
blueAlpha = 1;
mcBlueButton.mcText.txtNum.text = ("x" + noOfBlueBonus);
if (noOfBlueBonus == 0){
mcBlueButton.gotoAndPlay(54);
} else {
mcBlueButton.gotoAndPlay(36);
};
blueBarValue = Math.min((blueBarValue + (RESET_BAR_VALUE * 0.2)), RESET_BAR_VALUE);
};
}
public function printExpl(){
var _local2:*;
var _local3:*;
var _local1:* = 0;
while (_local1 < explosionArr.length) {
_local2 = 0;
while (_local2 < explosionArr[_local1].length) {
_local3 = 0;
while (_local3 < explosionArr[_local1][_local2].length) {
trace(((((explosionArr[_local1][_local2][_local3].posY + " ") + explosionArr[_local1][_local2][_local3].posX) + " - ") + explosionArr[_local1][_local2][_local3].exploding));
_local3++;
};
trace("---");
_local2++;
};
trace("_____________________");
_local1++;
};
}
public function createBoard(){
var _local2:Array;
var _local3:Array;
var _local4:*;
var _local5:*;
var _local6:*;
var _local1:* = (BOARD_HEIGHT - 1);
while (_local1 >= 0) {
_local2 = new Array();
_local3 = new Array();
_local4 = 0;
while (_local4 < BOARD_WIDTH) {
_local5 = createPieceForBoard(_local1, _local4, false);
_local6 = new IFloat(_local5.theY);
_local2.push(_local5);
_local3.push(_local6);
_local4++;
};
gameGridObj[_local1] = _local2;
yFloatArr[_local1] = _local3;
_local1--;
};
}
public function createPiece(_arg1:Number, _arg2:Number, _arg3:Boolean){
var _local4:* = getRandom(noOfTypes);
var _local5:* = deadObjectArr[0];
deadObjectArr.splice(0, 1);
_local5.init(_arg1, _arg2, _local4, this, _arg3, pieceID, 1);
pieceID++;
return (_local5);
}
public function startRound(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8){
stage.addEventListener(MouseEvent.MOUSE_UP, mouseUp);
_arg5.startRound((_arg6 + 1), _arg7);
this.gameRoot = _arg1;
this.random = _arg2;
this.bonusRandom = _arg3;
this.userType = _arg4;
this.communicator = _arg5;
this.currentTick = _arg6;
this.themeMod = _arg8;
startTime = _arg6;
timeLeft = TOTAL_TIME;
if (_arg4 == 0){
timeLeft = (timeLeft / 3);
};
dropCounter = RESET_DROP_COUNTER;
noOfTypes = 2;
noOfBonusTypes = 4;
allowedNoTargets = 4;
musicManager = _arg1.musicManager;
sfxManager = _arg1.sfxManager;
createBoard();
setBonusType();
gameState = STATE_RUNNING;
}
public function pieceClicked(_arg1:Piece){
if ((((((((((((((targetArr[0] == null)) && (!(_arg1.collapsing)))) && (!(_arg1.exploding)))) && ((_arg1.type < 2)))) && ((explosionArr.length == 0)))) && ((visualExplosionArr.length == 0)))) && (!(playOut)))){
communicator.pieceClicked((currentTick + 1), _arg1.posY, _arg1.posX);
addedBrickTick = (addedBrickTick + (" " + currentTick));
addedBrick = (addedBrick + (((" " + _arg1.posY) + "-") + _arg1.posX));
targetArr[0] = _arg1;
_arg1.mark();
calcFrame();
};
}
public function collapseBoard(){
var _local2:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local1:* = getTimer();
_local2 = 0;
while (_local2 < BOARD_WIDTH) {
if (((((!((gameGridObj[(BOARD_HEIGHT - 1)][_local2] == null))) && ((gameGridObj[(BOARD_HEIGHT - 1)][_local2].type > (noOfTypes - 1))))) && ((gameGridObj[(BOARD_HEIGHT - 1)][_local2].theY == gameGridObj[(BOARD_HEIGHT - 1)][_local2].gotoY)))){
createBonusRemovePuff(gameGridObj[(BOARD_HEIGHT - 1)][_local2]);
moveBonus(gameGridObj[(BOARD_HEIGHT - 1)][_local2]);
gameGridObj[(BOARD_HEIGHT - 1)][_local2] = null;
};
_local2++;
};
var _local3:* = (BOARD_HEIGHT - 1);
while (_local3 >= 0) {
_local2 = 0;
while (_local2 < BOARD_WIDTH) {
_local5 = false;
_local6 = -1;
_local7 = 0;
while (_local7 < _local3) {
_local8 = 0;
while (_local8 < targetArr.length) {
if (gameGridObj[_local7][_local2] == targetArr[_local8]){
_local6 = _local7;
};
_local8++;
};
if (((!((gameGridObj[_local7][_local2] == null))) && (gameGridObj[_local7][_local2].exploding))){
_local5 = true;
};
_local7++;
};
if ((((((gameGridObj[_local3][_local2] == null)) && ((_local3 > 0)))) && (!(_local5)))){
_local9 = (_local3 - 1);
while (_local9 > _local6) {
if (gameGridObj[_local9][_local2] != null){
_local10 = gameGridObj[_local9][_local2];
_local11 = yFloatArr[_local9][_local2];
gameGridObj[_local9][_local2] = null;
gameGridObj[_local3][_local2] = _local10;
gameGridObj[_local3][_local2].goto(_local3, _local2);
yFloatArr[_local9][_local2] = null;
yFloatArr[_local3][_local2] = _local11;
_local9 = -1;
};
_local9--;
};
};
_local2++;
};
_local3--;
};
var _local4:* = (getTimer() - _local1);
if (_local4 > 20){
};
}
public function triggerBonusPink(_arg1:Event){
if (noOfPinkBonus > 0){
communicator.triggerBonusPink((currentTick + 1));
sfxManager.get("BoostMeter").play();
noOfPinkBonus--;
pinkAlpha = 1;
mcPinkButton.mcText.txtNum.text = ("x" + noOfPinkBonus);
if (noOfPinkBonus == 0){
mcPinkButton.gotoAndPlay(55);
} else {
mcPinkButton.gotoAndPlay(37);
};
pinkBarValue = Math.min((pinkBarValue + (RESET_BAR_VALUE * 0.2)), RESET_BAR_VALUE);
};
}
public function mouseOverPiece(_arg1:Piece, _arg2){
var _local3:*;
var _local4:Boolean;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
if (((((((!((targetArr[0] == null))) && (!(_arg1.collapsing)))) && (!(_arg1.exploding)))) && ((_arg1.type < 2)))){
if (_arg2){
addedBrickTick = (addedBrickTick + (" " + currentTick));
addedBrick = (addedBrick + (((" " + _arg1.posY) + "-") + _arg1.posX));
communicator.pieceOver((currentTick + 1), _arg1.posY, _arg1.posX);
};
_local3 = targetArr[(targetArr.length - 1)];
_local4 = false;
_local5 = 0;
while (_local5 < (targetArr.length - 1)) {
if (targetArr[_local5] == _arg1){
_local4 = true;
_local6 = (targetArr.length - 1);
while (_local6 > _local5) {
targetArr[_local6].unMark();
_local6--;
};
_local7 = (targetArr.length - 1);
while (_local7 > _local5) {
targetArr.splice(_local7, 1);
_local7--;
};
calcFrame();
return (true);
};
_local5++;
};
if (!_local4){
_local8 = false;
if ((((_arg1.posX == _local3.posX)) && ((_arg1.posY == (_local3.posY - 1))))){
_local8 = true;
} else {
if ((((_arg1.posX == _local3.posX)) && ((_arg1.posY == (_local3.posY + 1))))){
_local8 = true;
} else {
if ((((_arg1.posY == _local3.posY)) && ((_arg1.posX == (_local3.posX - 1))))){
_local8 = true;
} else {
if ((((_arg1.posY == _local3.posY)) && ((_arg1.posX == (_local3.posX + 1))))){
_local8 = true;
};
};
};
};
if (((_local8) && ((targetArr.length < allowedNoTargets)))){
_arg1.mark();
targetArr.push(_arg1);
calcFrame();
return (true);
};
if (!_local8){
if (_arg1.posY == _local3.posY){
if ((((_arg1.posX > _local3.posX)) && ((((targetArr.length < allowedNoTargets)) || ((_local3.posX < targetArr[0].posX)))))){
_local5 = (_local3.posX + 1);
while (_local5 <= _arg1.posX) {
if (gameGridObj[_arg1.posY][_local5] != null){
_local9 = mouseOverPiece(gameGridObj[_arg1.posY][_local5], false);
if (!_local9){
_local5 = (_arg1.posX + 1);
};
} else {
return (false);
};
_local5++;
};
} else {
if ((((targetArr.length < allowedNoTargets)) || ((_local3.posX > targetArr[0].posX)))){
_local5 = (_local3.posX - 1);
while (_local5 >= _arg1.posX) {
if (gameGridObj[_arg1.posY][_local5] != null){
_local9 = mouseOverPiece(gameGridObj[_arg1.posY][_local5], false);
if (!_local9){
_local5 = (_arg1.posX - 1);
};
} else {
return (false);
};
_local5--;
};
};
};
} else {
if (_arg1.posX == _local3.posX){
if ((((_arg1.posY > _local3.posY)) && ((((targetArr.length < allowedNoTargets)) || ((_local3.posY < targetArr[0].posY)))))){
_local5 = (_local3.posY + 1);
while (_local5 <= _arg1.posY) {
if (gameGridObj[_local5][_arg1.posX] != null){
_local9 = mouseOverPiece(gameGridObj[_local5][_arg1.posX], false);
if (!_local9){
_local5 = (_arg1.posY + 1);
};
} else {
return (false);
};
_local5++;
};
} else {
if ((((targetArr.length < allowedNoTargets)) || ((_local3.posY > targetArr[0].posY)))){
_local5 = (_local3.posY - 1);
while (_local5 >= _arg1.posY) {
if (gameGridObj[_local5][_arg1.posX] != null){
_local9 = mouseOverPiece(gameGridObj[_local5][_arg1.posX], false);
if (!_local9){
_local5 = (_arg1.posY - 1);
};
} else {
return (false);
};
_local5--;
};
};
};
};
};
};
};
};
return (false);
}
public function endGame(_arg1){
clearBoard();
sfxManager.get("TimeWarning").stop();
if (!_arg1){
sfxManager.get("GameOverBad").play();
};
trace("END GAME");
if (mcScore.txtScore.text != score){
mcScore.txtScore.text = score;
};
gameState = STATE_NOT_RUNNING;
if (_arg1){
} else {
communicator.lastTick((currentTick + 1), noOfRandoms, noOfBonusRandoms);
};
gameRoot.endGame(_arg1, score, largestCombo, highestComboScore, numberJellySqashes);
}
public function createScorePop(_arg1, _arg2, _arg3, _arg4){
var _local5:* = getTimer();
var _local6:* = new ScorePop();
var _local7:* = (getTimer() - _local5);
if (_local7 > 10){
};
_local6.init(_arg1, _arg2, _arg3, _arg4);
gameRoot.addChild(_local6);
scoreArr.push(_local6);
}
public function createExplosion(_arg1, _arg2){
var _local3:*;
var _local4:*;
var _local5:*;
_arg1.cE = true;
if (_arg1.state < 4){
_local3 = getTimer();
_local4 = new Explosion();
_local5 = (getTimer() - _local3);
if (_local5 > 10){
};
_local4.init(_arg1.y, _arg1.x, _arg2, _arg1.type, false, _arg1, _arg1.posY, _arg1.posX, 1);
addChild(_local4);
visualExplosionArr.push(_local4);
} else {
_local3 = getTimer();
_local4 = new Explosion();
_local5 = (getTimer() - _local3);
if (_local5 > 10){
};
_local4.init(_arg1.y, _arg1.x, _arg2, _arg1.type, true, _arg1, _arg1.posY, _arg1.posX, 1);
addChild(_local4);
visualExplosionArr.push(_local4);
createBonusDot();
};
}
public function clearBoard(){
var _local1:*;
var _local2:*;
trace("clearBoard()");
_local1 = 0;
while (_local1 < scoreArr.length) {
scoreArr[_local1].visible = false;
_local1++;
};
_local1 = 0;
while (_local1 < visualExplosionArr.length) {
removeChild(visualExplosionArr[_local1]);
_local1++;
};
visualExplosionArr = [];
_local1 = 0;
while (_local1 < gameGridObj.length) {
_local2 = 0;
while (_local2 < gameGridObj[_local1].length) {
if (gameGridObj[_local1][_local2] != null){
removeChild(gameGridObj[_local1][_local2]);
gameGridObj[_local1][_local2] = null;
};
_local2++;
};
_local1++;
};
mcStarBonusAnim.visible = false;
}
public function render(_arg1:Number, _arg2:Number){
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local3:* = getTimer();
switch (gameState){
case STATE_RUNNING:
if (mcBlueBar.mcFill.alpha != blueAlpha){
mcBlueBar.mcFill.alpha = blueAlpha;
};
if (mcPinkBar.mcFill.alpha != pinkAlpha){
mcPinkBar.mcFill.alpha = pinkAlpha;
};
if (starBonusAnimAt < starBonusAnimStop){
mcStarBonusAnim.gotoAndStop(starBonusAnimAt);
};
if ((_arg1 % 5) == 0){
mcBlueBar.gotoAndStop(Math.round(((RESET_BAR_VALUE - blueBarValue) / 5)));
mcPinkBar.gotoAndStop(Math.round(((RESET_BAR_VALUE - pinkBarValue) / 5)));
};
_local4 = 0;
while (_local4 < BOARD_HEIGHT) {
_local10 = 0;
while (_local10 < BOARD_WIDTH) {
if (gameGridObj[_local4][_local10] != null){
if (gameGridObj[_local4][_local10].y != gameGridObj[_local4][_local10].gotoY){
gameGridObj[_local4][_local10].y = yFloatArr[_local4][_local10].get(_arg2);
};
if (gameGridObj[_local4][_local10].state != gameGridObj[_local4][_local10].animAt){
gameGridObj[_local4][_local10].animAt++;
gameGridObj[_local4][_local10].target.gotoAndStop(gameGridObj[_local4][_local10].animAt);
};
};
_local10++;
};
_local4++;
};
_local4 = 0;
while (_local4 < visualExplosionArr.length) {
if (visualExplosionArr[_local4] != null){
if (visualExplosionArr[_local4].state >= visualExplosionArr[_local4].animLength){
} else {
if (visualExplosionArr[_local4].state != visualExplosionArr[_local4].animAt){
visualExplosionArr[_local4].target.gotoAndStop(visualExplosionArr[_local4].state);
visualExplosionArr[_local4].animAt = visualExplosionArr[_local4].state;
};
};
};
_local4++;
};
if (mcScore.txtScore.text != score){
mcScore.txtScore.text = score;
};
_local5 = Math.round((timeLeft / 25));
_local6 = Math.floor((_local5 / 60));
_local7 = (_local5 - (_local6 * 60));
_local8 = "";
if (_local7.toString().length == 1){
_local8 = "0";
};
_local9 = (((("0" + _local6) + ":") + _local8) + _local7);
if (_local9 != mcTime.mcTime.txtTime.text){
mcTime.mcTime.txtTime.text = _local9;
};
if (warnTime){
warnTime = false;
mcTime.play();
sfxManager.get("TimeWarning").loop(0.2);
};
_local4 = 0;
while (_local4 < bonusArr.length) {
if (bonusArr[_local4] != null){
bonusArr[_local4].rotation = bonusRotFloatArr[_local4].get(_arg2);
if (bonusArr[_local4].y != bonusArr[_local4].gotoY){
bonusArr[_local4].y = bonusYFloatArr[_local4].get(_arg2);
};
if (bonusArr[_local4].x != bonusArr[_local4].gotoX){
bonusArr[_local4].x = bonusXFloatArr[_local4].get(_arg2);
};
if ((((bonusArr[_local4].x == bonusArr[_local4].gotoX)) && ((bonusArr[_local4].y == bonusArr[_local4].gotoY)))){
removeChild(bonusArr[_local4]);
bonusArr.splice(_local4, 1);
bonusYFloatArr.splice(_local4, 1);
bonusXFloatArr.splice(_local4, 1);
_local4--;
};
};
_local4++;
};
_local4 = 0;
while (_local4 < scoreArr.length) {
if (scoreArr[_local4] != null){
if (scoreArr[_local4].animGo != scoreArr[_local4].animAt){
if ((((scoreArr[_local4].animGo > 1)) && ((scoreArr[_local4].visible == false)))){
scoreArr[_local4].visible = true;
};
scoreArr[_local4].gotoAndStop(scoreArr[_local4].animGo);
scoreArr[_local4].animAt = scoreArr[_local4].animGo;
if (scoreArr[_local4].animAt == scoreArr[_local4].animLength){
gameRoot.removeChild(scoreArr[_local4]);
scoreArr.splice(_local4, 1);
_local4--;
};
};
};
_local4++;
};
break;
case STATE_BONUS_ANIM:
_local4 = 0;
while (_local4 < bonusAnimArr.length) {
if (bonusAnimArr[_local4] != null){
bonusAnimArr[_local4].gotoAndStop(bonusAnimArr[_local4].animAt);
};
_local4++;
};
if (mcScore.txtScore.text != score){
mcScore.txtScore.text = score;
};
break;
};
}
public function tick(_arg1:Number){
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
if (relaxTickTime == 1){
if (JellySwelly.relaxGame){
barMod = RELAX_GAME_START_SPEED;
};
};
if (REPLAY_MODE){
checkTick(_arg1);
};
currentTick = _arg1;
var _local2:* = getTimer();
if ((_arg1 % 3) == 0){
};
switch (gameState){
case STATE_RUNNING:
if (starBonusAnimAt < starBonusAnimStop){
starBonusAnimAt++;
};
if ((_arg1 % 50) == 0){
if (getClientRandom(10) > 2){
_local4 = gameGridObj[getClientRandom(BOARD_HEIGHT)][getClientRandom(BOARD_WIDTH)];
while (_local4 == null) {
_local4 = gameGridObj[getClientRandom(BOARD_HEIGHT)][getClientRandom(BOARD_WIDTH)];
};
if ((((((((_local4.state == 1)) && (!(_local4.exploding)))) && (!(_local4.collapsing)))) && ((_local4.type < 2)))){
_local4.target.gotoAndPlay(9);
};
} else {
_local4 = gameGridObj[getClientRandom(BOARD_HEIGHT)][getClientRandom((BOARD_WIDTH - 1))];
_local5 = null;
if (_local4 != null){
_local5 = gameGridObj[_local4.posY][(_local4.posX + 1)];
};
_local6 = 0;
while ((((((((_local4 == null)) || (!((_local4.type == 1))))) || ((_local5 == null)))) || (((!((_local5.type == 0))) && ((_local6 < 100)))))) {
_local4 = gameGridObj[getClientRandom(BOARD_HEIGHT)][getClientRandom((BOARD_WIDTH - 1))];
if (_local4 != null){
_local5 = gameGridObj[_local4.posY][(_local4.posX + 1)];
};
_local6++;
};
if (_local6 < 100){
if ((((((((((((_local4.state == 1)) && (!(_local4.exploding)))) && (!(_local4.collapsing)))) && ((_local5.state == 1)))) && (!(_local5.exploding)))) && (!(_local5.collapsing)))){
_local4.target.gotoAndPlay(50);
_local5.target.gotoAndPlay(50);
};
};
};
};
if (starBonusCounter > 0){
starBonusCounter--;
if (starBonusCounter == 0){
mcStarBonusAnim.visible = false;
musicManager.get("GameLoop").loop();
musicManager.get("BonusMode").stop();
};
};
if (JellySwelly.relaxGame == false){
timeLeft--;
};
if (!playOut){
if ((((blueBarValue > 800)) && (((blueBarValue - barMod) <= 800)))){
sfxManager.get("Warning").play();
};
if ((((pinkBarValue > 800)) && (((pinkBarValue - barMod) <= 800)))){
sfxManager.get("Warning").play();
};
blueBarValue = (blueBarValue - barMod);
pinkBarValue = (pinkBarValue - barMod);
dropCounter--;
collapseBoard();
};
if (dropCounter == 0){
if (bonusCounter >= BONUS_OBJ){
newDropBonus();
} else {
newDropPiece();
};
};
if (explosionArr.length > 0){
_local7 = 0;
while (_local7 < explosionArr.length) {
_local8 = 0;
_local9 = explosionArr[_local7].length;
_local10 = true;
_local3 = 0;
while (_local3 < _local9) {
_local11 = explosionArr[_local7][_local3].length;
_local12 = 0;
while (_local12 < _local11) {
if (_local8 == checkCounterArr[_local7]){
soundCount++;
if ((soundCount % 4) == 0){
sfxManager.get("Swell").play();
};
if (explosionArr[_local7][_local3][_local12].state == 1){
explosionArr[_local7][_local3][_local12].state = 3;
} else {
explosionArr[_local7][_local3][_local12].state = 8;
};
if ((((_local3 == (explosionArr[_local7].length - 1))) && ((_local12 == (explosionArr[_local7][_local3].length - 1))))){
calcBonusTime(_local7);
explodeBoard(_local7);
calcScore(_local7);
explosionArr.splice(_local7, 1);
checkCounterArr.splice(_local7, 1);
_local7--;
_local10 = false;
} else {
_local12 = explosionArr[_local7][_local3].length;
_local3 = explosionArr[_local7].length;
};
};
_local8++;
_local12++;
};
_local3++;
};
if (_local10){
var _local14 = checkCounterArr;
var _local15 = _local7;
var _local16 = (_local14[_local15] + 1);
_local14[_local15] = _local16;
};
_local7++;
};
};
boardFull = true;
_local3 = 0;
while (_local3 < BOARD_HEIGHT) {
_local12 = 0;
while (_local12 < BOARD_WIDTH) {
if (gameGridObj[_local3][_local12] != null){
if (gameGridObj[_local3][_local12].theY != gameGridObj[_local3][_local12].gotoY){
boardFull = false;
gameGridObj[_local3][_local12].calcSpeed();
gameGridObj[_local3][_local12].theY = Math.min((gameGridObj[_local3][_local12].theY + gameGridObj[_local3][_local12].speed), gameGridObj[_local3][_local12].gotoY);
yFloatArr[_local3][_local12].set(gameGridObj[_local3][_local12].theY);
if (gameGridObj[_local3][_local12].theY == gameGridObj[_local3][_local12].gotoY){
yFloatArr[_local3][_local12].set(gameGridObj[_local3][_local12].theY);
gameGridObj[_local3][_local12].collapsing = false;
};
};
};
_local12++;
};
_local3++;
};
_local3 = 0;
while (_local3 < visualExplosionArr.length) {
if (visualExplosionArr[_local3].delay == 0){
visualExplosionArr[_local3].state++;
} else {
visualExplosionArr[_local3].delay--;
if (visualExplosionArr[_local3].delay == 0){
if (visualExplosionArr[_local3].large){
explodeSound(1);
} else {
explodeSound(0);
};
};
};
if (visualExplosionArr[_local3].state == visualExplosionArr[_local3].animLength){
if (gameGridObj[visualExplosionArr[_local3].yPos][visualExplosionArr[_local3].xPos] != null){
deadObjectArr.push(gameGridObj[visualExplosionArr[_local3].yPos][visualExplosionArr[_local3].xPos]);
gameGridObj[visualExplosionArr[_local3].yPos][visualExplosionArr[_local3].xPos] = null;
yFloatArr[visualExplosionArr[_local3].yPos][visualExplosionArr[_local3].xPos] = null;
};
removeChild(visualExplosionArr[_local3]);
visualExplosionArr.splice(_local3, 1);
_local3--;
};
_local3++;
};
_local3 = 0;
while (_local3 < bonusArr.length) {
bonusArr[_local3].rot = (bonusArr[_local3].rot + 40);
bonusRotFloatArr[_local3].set(bonusArr[_local3].rot);
_local13 = true;
if (bonusArr[_local3].theY != bonusArr[_local3].gotoY){
_local13 = false;
bonusArr[_local3].theY = Math.min((bonusArr[_local3].theY + 8), bonusArr[_local3].gotoY);
bonusYFloatArr[_local3].set(bonusArr[_local3].theY);
if (bonusArr[_local3].theY == bonusArr[_local3].gotoY){
bonusYFloatArr[_local3].set(bonusArr[_local3].theY);
};
};
if (bonusArr[_local3].theX != bonusArr[_local3].gotoX){
_local13 = false;
if (bonusArr[_local3].theX > bonusArr[_local3].gotoX){
bonusArr[_local3].theX = Math.max((bonusArr[_local3].theX - 25), bonusArr[_local3].gotoX);
} else {
bonusArr[_local3].theX = Math.min((bonusArr[_local3].theX + 25), bonusArr[_local3].gotoX);
};
bonusXFloatArr[_local3].set(bonusArr[_local3].theX);
if (bonusArr[_local3].theX == bonusArr[_local3].gotoX){
bonusXFloatArr[_local3].set(bonusArr[_local3].theX);
};
};
if ((((((bonusArr[_local3].theX == bonusArr[_local3].gotoX)) && ((bonusArr[_local3].theY == bonusArr[_local3].gotoY)))) && (!(_local13)))){
addBonus(bonusArr[_local3].type);
};
_local3++;
};
_local3 = 0;
while (_local3 < scoreArr.length) {
if (scoreArr[_local3].delay > 0){
scoreArr[_local3].delay--;
if (scoreArr[_local3].delay == 0){
if (sfxOn){
sfxManager.get("ScorePopSound").play();
};
};
} else {
scoreArr[_local3].animGo = Math.min((scoreArr[_local3].animGo + 1), scoreArr[_local3].animLength);
};
_local3++;
};
if (timeLeft == 375){
warnTime = true;
};
if (JellySwelly.relaxGame){
relaxTickTime++;
if ((relaxTickTime % RELAX_GAME_SPEED_INCREASE_INTERVAL) == 0){
barMod = (barMod + RELAX_GAME_SPEED_INCREASE);
};
} else {
if ((timeLeft % (TOTAL_TIME / 3)) == 0){
barMod++;
};
};
if (timeLeft == 0){
if ((((visualExplosionArr.length > 0)) || ((explosionArr.length > 0)))){
playOut = true;
timeLeft++;
} else {
calcBonusScore();
};
};
if ((((blueBarValue <= 0)) || ((pinkBarValue <= 0)))){
endGame(false);
};
if (blueBarValue < 800){
blueAlpha = (blueAlpha + (0.2 * blueAlphaAnim));
blueAlpha = (Math.round((blueAlpha * 10)) / 10);
if ((((blueAlpha == 0)) || ((blueAlpha == 1)))){
blueAlphaAnim = (blueAlphaAnim * -1);
};
} else {
blueAlphaAnim = -1;
};
if (pinkBarValue < 800){
pinkAlpha = (pinkAlpha + (0.2 * pinkAlphaAnim));
pinkAlpha = (Math.round((pinkAlpha * 10)) / 10);
if ((((pinkAlpha == 0)) || ((pinkAlpha == 1)))){
pinkAlphaAnim = (pinkAlphaAnim * -1);
};
} else {
pinkAlphaAnim = -1;
};
break;
case STATE_NOT_RUNNING:
break;
case STATE_BONUS_ANIM:
_local3 = 0;
while (_local3 < bonusAnimArr.length) {
if (bonusAnimArr[_local3].delay == 0){
bonusAnimArr[_local3].animAt++;
} else {
bonusAnimArr[_local3].delay--;
};
if (bonusAnimArr[_local3].animAt == 1){
sfxManager.get("ScorePopSound").play();
if (bonusAnimArr[_local3].type == 0){
mcBlueButton.mcText.txtNum.text = ("x" + --noOfBlueBonus);
} else {
mcPinkButton.mcText.txtNum.text = ("x" + --noOfPinkBonus);
};
};
if (bonusAnimArr[_local3].animAt == 30){
score = (score + 500);
removeChild(bonusAnimArr[_local3]);
bonusAnimArr.splice(_local3, 1);
_local3--;
};
_local3++;
};
if (bonusAnimArr.length == 0){
endGame(true);
};
break;
};
}
public function setBonusType(){
nextBonusType = (noOfTypes + getBonusRandom(noOfBonusTypes));
nextBonusType = Math.min(4, nextBonusType);
if (nextBonusType == 4){
if (bonusSizeInc < 2){
nextBonusType = 5;
bonusSizeInc++;
};
};
mcBonusCounter.mcNextBonus.mcNextBonus.gotoAndStop(nextBonusType);
}
public function newDropPiece(){
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local1:* = getTimer();
var _local2:* = 0;
dropCounter = RESET_DROP_COUNTER;
var _local3:* = (BOARD_HEIGHT - 1);
while (_local3 >= 0) {
_local5 = 0;
while (_local5 < BOARD_WIDTH) {
_local6 = false;
_local7 = _local3;
while (_local7 >= 0) {
_local2++;
if (gameGridObj[_local7][_local5] != null){
_local6 = true;
};
_local7--;
};
if ((((gameGridObj[_local3][_local5] == null)) && (!(_local6)))){
_local8 = getTimer();
_local9 = createPiece(_local3, _local5, true);
_local10 = getTimer();
_local11 = new IFloat(_local9.theY);
_local12 = (getTimer() - _local10);
if (_local12 > 10){
};
gameGridObj[_local3][_local5] = _local9;
yFloatArr[_local3][_local5] = _local11;
_local3 = -1;
_local5 = BOARD_WIDTH;
_local13 = (getTimer() - _local8);
};
_local5++;
};
_local3--;
};
var _local4:* = (getTimer() - _local1);
if (_local4 > 20){
};
}
public function explodeBoard(_arg1:Number){
var _local4:*;
var _local5:*;
var _local6:*;
explosionMode = false;
var _local2:* = 0;
var _local3:* = (explosionArr[_arg1].length - 1);
while (_local3 >= 0) {
_local4 = 0;
while (_local4 < explosionArr[_arg1][_local3].length) {
if (gameGridObj[explosionArr[_arg1][_local3][_local4].posY][explosionArr[_arg1][_local3][_local4].posX] != null){
_local5 = false;
_local6 = 0;
while (_local6 < visualExplosionArr.length) {
if ((((visualExplosionArr[_local6].yPos == explosionArr[_arg1][_local3][_local4].posY)) && ((visualExplosionArr[_local6].xPos == explosionArr[_arg1][_local3][_local4].posX)))){
_local5 = true;
numberJellySqashes++;
explosionArr[_arg1][_local3][_local4].blaj = true;
};
_local6++;
};
if (!_local5){
var _temp1 = _local2;
_local2 = (_local2 + 1);
createExplosion(explosionArr[_arg1][_local3][_local4], _temp1);
gameGridObj[explosionArr[_arg1][_local3][_local4].posY][explosionArr[_arg1][_local3][_local4].posX].visible = false;
};
};
_local4++;
};
_local3--;
};
largestCombo = Math.max(largestCombo, _local2);
}
public function checkForExplosions(){
var _local2:*;
var _local3:*;
var _local4:*;
var _local1:* = new Array();
_local2 = 0;
while (_local2 < targetArr.length) {
_local3 = targetArr[_local2];
_local4 = _local3.posX;
while (_local4 >= 0) {
if ((((((((gameGridObj[_local3.posY][_local4] == null)) || (!((_local3.type == gameGridObj[_local3.posY][_local4].type))))) || (gameGridObj[_local3.posY][_local4].collapsing))) || (gameGridObj[_local3.posY][_local4].exploding))){
checkForHorizontalExplosion(gameGridObj[_local3.posY][(_local4 + 1)]);
_local4 = -1;
break;
} else {
if (_local4 == 0){
checkForHorizontalExplosion(gameGridObj[_local3.posY][_local4]);
_local4 = -1;
break;
};
};
_local4--;
};
if (horiExplArr.length >= MIN_LENGTH){
_local1.push(horiExplArr);
};
horiExplArr = [];
_local2++;
};
_local2 = 0;
while (_local2 < targetArr.length) {
_local3 = targetArr[_local2];
_local4 = _local3.posY;
while (_local4 >= 0) {
if ((((((((gameGridObj[_local4][_local3.posX] == null)) || (!((_local3.type == gameGridObj[_local4][_local3.posX].type))))) || (gameGridObj[_local4][_local3.posX].collapsing))) || (gameGridObj[_local4][_local3.posX].exploding))){
checkForVerticalExplosion(gameGridObj[(_local4 + 1)][_local3.posX]);
_local4 = -1;
break;
} else {
if (_local4 == 0){
checkForVerticalExplosion(gameGridObj[_local4][_local3.posX]);
_local4 = -1;
break;
};
};
_local4--;
};
if (vertExplArr.length >= MIN_LENGTH){
_local1.push(vertExplArr);
};
vertExplArr = [];
_local2++;
};
_local2 = 0;
while (_local2 < BOARD_HEIGHT) {
_local4 = 0;
while (_local4 < BOARD_WIDTH) {
if (gameGridObj[_local2][_local4] != null){
gameGridObj[_local2][_local4].cfh = false;
gameGridObj[_local2][_local4].cfv = false;
};
_local4++;
};
_local2++;
};
targetArr = [];
if (_local1.length > 0){
_local2 = 0;
while (_local2 < _local1.length) {
_local4 = 0;
while (_local4 < _local1[_local2].length) {
_local1[_local2][_local4].exploding = true;
_local4++;
};
_local2++;
};
explosionArr.push(_local1);
explosionMode = true;
checkCounterArr.push(0);
};
}
public function checkTick(_arg1){
replayData.checkTick(_arg1);
}
public function createBonusDot(){
bonusCounter++;
mcBonusCounter.gotoAndStop((bonusCounter + 1));
}
public function newDropBonus(){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
dropCounter = RESET_DROP_COUNTER;
var _local1:* = (BOARD_HEIGHT - 1);
while (_local1 >= 0) {
_local2 = 0;
while (_local2 < BOARD_WIDTH) {
_local3 = false;
_local4 = _local1;
while (_local4 >= 0) {
if (gameGridObj[_local4][_local2] != null){
_local3 = true;
};
_local4--;
};
if ((((gameGridObj[_local1][_local2] == null)) && (!(_local3)))){
_local5 = createBonus(_local1, _local2, true);
_local6 = new IFloat(_local5.theY);
gameGridObj[_local1][_local2] = _local5;
yFloatArr[_local1][_local2] = _local6;
bonusCounter = (bonusCounter - 8);
mcBonusCounter.gotoAndStop((bonusCounter + 1));
setBonusType();
_local1 = -1;
_local2 = BOARD_WIDTH;
};
_local2++;
};
_local1--;
};
}
public function moveBonus(_arg1:Piece){
switch (_arg1.type){
case 2:
_arg1.gotoY = 570;
_arg1.gotoX = 22;
break;
case 3:
_arg1.gotoY = 570;
_arg1.gotoX = 62;
break;
case 4:
_arg1.gotoY = 540;
_arg1.gotoX = 300;
break;
case 5:
if (allowedNoTargets == 4){
_arg1.gotoY = 570;
_arg1.gotoX = 275;
} else {
_arg1.gotoY = 570;
_arg1.gotoX = 306;
};
break;
};
bonusArr.push(_arg1);
var _local2:IFloat = new IFloat(_arg1.y);
var _local3:IFloat = new IFloat(_arg1.x);
var _local4:IFloat = new IFloat(_arg1.rot);
bonusYFloatArr.push(_local2);
bonusXFloatArr.push(_local3);
bonusRotFloatArr.push(_local4);
}
public function calcBonusTime(_arg1){
var _local9:*;
var _local2:* = 0;
var _local3:* = 1;
var _local4:* = 0;
var _local5:* = 1;
var _local6:* = 0;
var _local7:* = 0;
var _local8:* = 0;
while (_local8 < explosionArr[_arg1].length) {
_local9 = 0;
while (_local9 < explosionArr[_arg1][_local8].length) {
if (explosionArr[_arg1][_local8][_local9].type == 0){
_local2 = (_local2 + _local3);
_local3++;
if (explosionArr[_arg1][_local8][_local9].state == 8){
_local6++;
};
} else {
_local4 = (_local4 + _local5);
_local5++;
if (explosionArr[_arg1][_local8][_local9].state == 8){
_local7++;
};
};
_local9++;
};
_local8++;
};
_local6 = (_local6 / 2);
_local7 = (_local7 / 2);
blueBarValue = Math.min((blueBarValue + _local2), RESET_BAR_VALUE);
pinkBarValue = Math.min((pinkBarValue + _local4), RESET_BAR_VALUE);
if (blueBarValue > 800){
blueAlpha = 1;
};
if (pinkBarValue > 800){
pinkAlpha = 1;
};
}
public function getRandom(_arg1:Number){
noOfRandoms++;
return (random.nextInt(_arg1));
}
public function explodeSound(_arg1){
if (_arg1 == 0){
sfxManager.get("ExplosionSmall1").play(0.5);
} else {
sfxManager.get("ExplosionSmall2").play(0.7);
};
}
public function getClientRandom(_arg1:Number){
return (Math.floor((Math.random() * _arg1)));
}
public function checkForHorizontalExplosion(_arg1){
var _local2:*;
horiExplArr.push(_arg1);
_arg1.cfh = true;
if (_arg1.posX < (BOARD_WIDTH - 1)){
_local2 = gameGridObj[_arg1.posY][(_arg1.posX + 1)];
if (((((!((_local2 == null))) && (!(_local2.collapsing)))) && (!(_local2.exploding)))){
if ((((_local2.type == _arg1.type)) && (!(_local2.cfh)))){
checkForHorizontalExplosion(_local2);
};
};
};
}
}
}//package src
Section 78
//GameNormal (src.GameNormal)
package src {
import src.sound.*;
import src.timing.*;
import flash.events.*;
import src.math.*;
import src.comm.*;
import flash.display.*;
import flash.utils.*;
import flash.external.*;
public class GameNormal extends MovieClip {
private var yFloatArr:Array;
private var explosionArr:Array;
public var bonusSizeInc;// = 0
private var targetArr:Array;
private var dropCounter;
private var addedBrick;// = ""
private var largestCombo;// = 0
private var numberJellySqashes;// = 0
private var noOfBonusTypes:Number;
private var blueAlpha;// = 1
private var allowedNoTargets;
private var soundCount;// = 0
public var sfxOn;
private var nextBonusType;
public var mcPinkBar:MovieClip;
private var replayData;
private var noOfBlueBonus;// = 0
private var starBonusCounter;// = 0
private var communicator;
private var startTime;
private var explosionMode;// = false
private var blueAlphaAnim;// = -1
private var addedBrickTick;// = ""
private var firstTarget:Piece;
public var mcBlueButton:MovieClip;
private var visualExplosionArr;
private var scoreArr;
public var mcMarker:MovieClip;
private var starBonusAnimAt;// = 1
private var warnTime;// = false
private var timeLeft;
private var highestComboScore;// = 0
private var bonusAnimArr;
private var themeMod:Number;
public var mcPinkButton:MovieClip;
private var noOfRandoms:Number;// = 0
private var vertExplArr:Array;
public var mcTime:MovieClip;
private var pinkAlpha;// = 1
private var noOfBonusRandoms:Number;// = 0
private var pieceID;// = 0
private var score;// = 0
public var mcBonusCounter:MovieClip;
private var horiExplArr:Array;
private var starBonusMultiplier;// = 2
public var gameGridObj:Array;
private var blueBarValue;
public var mcScore:MovieClip;
private var bonusXFloatArr;
private var bonusYFloatArr;
private var sfxManager:SoundManager;
private var boardFull;// = true
private var deadObjectArr;
private var checked;
public var mcStarBonusAnim:MovieClip;
private var userType:Number;
private var noOfPinkBonus;// = 0
private var playOut;// = false
private var pinkBarValue;
private var currentTick:Number;
private var bonusRotFloatArr;
public var mcChalkMarker:MovieClip;
private var starBonusAnimStop;// = 1
private var relaxTickTime:int;// = 1
private var random;
private var lastTarget:Piece;
private var pinkAlphaAnim;// = -1
private var gameState:Number;
private var musicManager:SoundManager;
private var bonusArr;
private var bonusRandom;
private var bonusCounter;// = 0
public var mcBlueBar:MovieClip;
public var musicOn;
private var noOfTypes:Number;
private var checkCounterArr:Array;
private var gameRoot;
private var barMod;// = 1
private static var BOARD_HEIGHT = 9;
private static var STATE_NOT_RUNNING = 1;
private static var TOTAL_TIME = 4500;
public static var RELAX_GAME_START_SPEED:Number = 0.3;
private static var STATE_RUNNING = 0;
private static var MIN_LENGTH = 4;
private static var BONUS_OBJ = 8;
private static var RESET_DROP_COUNTER = 1;
public static var RELAX_GAME_SPEED_INCREASE_INTERVAL:int = 750;
private static var BOARD_WIDTH = 15;
private static var RESET_BAR_VALUE = 5000;
private static var STATE_BONUS_ANIM = 2;
public static var RELAX_GAME_SPEED_INCREASE:Number = 0.1;
private static var REPLAY_MODE = false;
public function GameNormal(){
gameGridObj = new Array();
yFloatArr = new Array();
vertExplArr = new Array();
horiExplArr = new Array();
explosionArr = new Array();
checkCounterArr = new Array();
visualExplosionArr = new Array();
scoreArr = new Array();
bonusArr = new Array();
bonusYFloatArr = new Array();
bonusXFloatArr = new Array();
bonusRotFloatArr = new Array();
bonusAnimArr = new Array();
deadObjectArr = new Array();
targetArr = new Array();
blueBarValue = RESET_BAR_VALUE;
pinkBarValue = RESET_BAR_VALUE;
super();
trace("a Game crated");
mcBlueButton.gotoAndStop(1);
mcPinkButton.gotoAndStop(1);
mcBlueButton.addEventListener(MouseEvent.MOUSE_UP, triggerBonusBlue);
mcPinkButton.addEventListener(MouseEvent.MOUSE_UP, triggerBonusPink);
mcStarBonusAnim.visible = false;
if (REPLAY_MODE){
replayData = new replayer(this);
};
gameState = STATE_NOT_RUNNING;
}
public function calcBonusScore(){
var _local2:*;
var _local3:*;
sfxManager.get("TimeWarning").stop();
sfxManager.get("GameOverSplash").play(0.7);
communicator.lastTick((currentTick + 1), noOfRandoms, noOfBonusRandoms);
var _local1:* = 0;
_local2 = 0;
while (_local2 < noOfPinkBonus) {
var _temp1 = _local1;
_local1 = (_local1 + 1);
_local3 = new PinkBonusAnim(_temp1);
bonusAnimArr.push(_local3);
addChild(_local3);
_local2++;
};
_local2 = 0;
while (_local2 < noOfBlueBonus) {
var _temp2 = _local1;
_local1 = (_local1 + 1);
_local3 = new BlueBonusAnim(_temp2);
bonusAnimArr.push(_local3);
addChild(_local3);
_local2++;
};
clearBoard();
gameRoot.mcEndGame.visible = false;
gameState = STATE_BONUS_ANIM;
}
public function checkForVerticalExplosion(_arg1){
var _local2:*;
vertExplArr.push(_arg1);
_arg1.cfv = true;
if (_arg1.posY < (BOARD_HEIGHT - 1)){
_local2 = gameGridObj[(_arg1.posY + 1)][_arg1.posX];
if (((((!((_local2 == null))) && (!(_local2.collapsing)))) && (!(_local2.exploding)))){
if ((((_local2.type == _arg1.type)) && (!(_local2.cfv)))){
checkForVerticalExplosion(_local2);
};
};
};
}
public function createBonus(_arg1:Number, _arg2:Number, _arg3:Boolean){
var _local4:* = nextBonusType;
var _local5:* = new Piece();
_local5.init(_arg1, _arg2, _local4, this, _arg3, pieceID, 0);
pieceID++;
addChild(_local5);
return (_local5);
}
public function createPieceForBoard(_arg1:Number, _arg2:Number, _arg3:Boolean){
var _local4:* = getRandom(noOfTypes);
var _local5:* = new Piece();
_local5.init(_arg1, _arg2, _local4, this, _arg3, pieceID, 0);
pieceID++;
addChild(_local5);
return (_local5);
}
public function createBonusRemovePuff(_arg1){
}
public function addBonus(_arg1:Number){
trace("addBonus");
communicator.addBonus(currentTick);
switch (_arg1){
case 2:
if (noOfBlueBonus == 0){
mcBlueButton.gotoAndPlay(2);
};
noOfBlueBonus++;
mcBlueButton.mcText.txtNum.text = ("x" + noOfBlueBonus);
sfxManager.get("BlueBoost").play();
break;
case 3:
if (noOfPinkBonus == 0){
mcPinkButton.gotoAndPlay(2);
};
noOfPinkBonus++;
mcPinkButton.mcText.txtNum.text = ("x" + noOfPinkBonus);
sfxManager.get("PinkBoost").play();
break;
case 4:
sfxManager.get("StarBonus").play();
if (starBonusCounter > 0){
starBonusMultiplier++;
starBonusCounter = (starBonusCounter + 325);
} else {
starBonusMultiplier = 3;
starBonusCounter = 325;
musicManager.get("GameLoop").stop();
musicManager.get("BonusMode").loop();
};
mcStarBonusAnim.visible = true;
mcStarBonusAnim.mcText.mcText.txtNum.text = ("x" + (starBonusMultiplier - 2));
switch (starBonusMultiplier){
case 2:
starBonusAnimStop = 35;
starBonusAnimAt = 1;
break;
case 3:
starBonusAnimStop = 35;
starBonusAnimAt = 1;
break;
case 4:
starBonusAnimStop = 43;
break;
case 5:
starBonusAnimStop = 51;
break;
case 6:
starBonusAnimStop = 60;
break;
case 7:
starBonusAnimStop = 69;
break;
case 8:
starBonusAnimStop = 77;
break;
case 9:
starBonusAnimStop = 85;
break;
};
break;
case 5:
allowedNoTargets = Math.min((allowedNoTargets + 1), 6);
mcMarker.gotoAndStop((allowedNoTargets - 3));
mcChalkMarker.gotoAndStop((allowedNoTargets - 3));
sfxManager.get("Selector").play();
break;
};
}
public function testClick(){
var _local1:* = gameGridObj[getRandom(BOARD_HEIGHT)][getRandom(BOARD_WIDTH)];
while (_local1 == null) {
_local1 = gameGridObj[getRandom(BOARD_HEIGHT)][getRandom(BOARD_WIDTH)];
};
pieceClicked(_local1);
}
public function calcFrame(){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local1:* = 0;
while (_local1 < targetArr.length) {
_local2 = targetArr[_local1];
_local3 = true;
_local4 = true;
_local5 = true;
_local6 = true;
if ((((_local2.posY > 0)) && (!((gameGridObj[(_local2.posY - 1)][_local2.posX] == null))))){
if (gameGridObj[(_local2.posY - 1)][_local2.posX].marked){
_local3 = false;
};
};
if ((((_local2.posX < (BOARD_WIDTH - 1))) && (!((gameGridObj[_local2.posY][(_local2.posX + 1)] == null))))){
if (gameGridObj[_local2.posY][(_local2.posX + 1)].marked){
_local4 = false;
};
};
if ((((_local2.posY < (BOARD_HEIGHT - 1))) && (!((gameGridObj[(_local2.posY + 1)][_local2.posX] == null))))){
if (gameGridObj[(_local2.posY + 1)][_local2.posX].marked){
_local5 = false;
};
};
if ((((_local2.posX > 0)) && (!((gameGridObj[_local2.posY][(_local2.posX - 1)] == null))))){
if (gameGridObj[_local2.posY][(_local2.posX - 1)].marked){
_local6 = false;
};
};
_local2.setFrame(_local3, _local4, _local5, _local6, allowedNoTargets);
_local1++;
};
}
public function getBonusRandom(_arg1:Number){
noOfBonusRandoms++;
return (bonusRandom.nextInt(_arg1));
}
public function mouseUp(_arg1:Event){
var _local2:*;
var _local3:*;
trace("mmouseUp");
addedBrickTick = "";
addedBrick = "";
if (((!((targetArr.length == 0))) && ((gameState == STATE_RUNNING)))){
_local2 = "";
_local3 = 0;
while (_local3 < targetArr.length) {
_local2 = (_local2 + ((targetArr[_local3].posY + "-") + targetArr[_local3].posX));
if (_local3 < (targetArr.length - 1)){
_local2 = (_local2 + "_");
};
_local3++;
};
communicator.mouseUp((currentTick + 1), _local2);
_local3 = 0;
while (_local3 < targetArr.length) {
targetArr[_local3].type = ((targetArr[_local3].type + 1) % 2);
targetArr[_local3].switchPiece();
targetArr[_local3].unMark();
_local3++;
};
checkForExplosions();
targetArr = [];
};
}
public function mouseUpReplay(){
var _local1:*;
var _local2:*;
addedBrickTick = "";
addedBrick = "";
if (((!((targetArr.length == 0))) && ((gameState == STATE_RUNNING)))){
_local1 = "";
_local2 = 0;
while (_local2 < targetArr.length) {
_local1 = (_local1 + ((targetArr[_local2].posY + "-") + targetArr[_local2].posX));
if (_local2 < (targetArr.length - 1)){
_local1 = (_local1 + "_");
};
_local2++;
};
communicator.mouseUp((currentTick + 1), _local1);
_local2 = 0;
while (_local2 < targetArr.length) {
targetArr[_local2].type = ((targetArr[_local2].type + 1) % 2);
targetArr[_local2].switchPiece();
targetArr[_local2].unMark();
_local2++;
};
checkForExplosions();
targetArr = [];
};
}
public function calcScore(_arg1){
var _local5:*;
var _local9:*;
var _local2:* = 0;
var _local3:* = 0;
var _local4:* = 0;
_local5 = 0;
while (_local5 < explosionArr[_arg1].length) {
_local9 = 0;
while (_local9 < explosionArr[_arg1][_local5].length) {
_local2++;
_local3 = (_local3 + _local2);
if (explosionArr[_arg1][_local5][_local9].state == 8){
_local4++;
};
_local9++;
};
_local5++;
};
_local4 = (_local4 / 2);
_local3 = Math.round((_local3 * (1 + (_local4 * 0.1))));
if (starBonusCounter > 0){
_local3 = Math.round(((starBonusMultiplier / 2) * _local3));
};
var _local6:* = (Math.round((explosionArr[_arg1].length / 2)) - 1);
var _local7:* = 0;
_local5 = 0;
while (_local5 < _local6) {
_local7 = (_local7 + explosionArr[_arg1][_local5].length);
_local5++;
};
var _local8:* = (Math.round((explosionArr[_arg1][_local6].length / 2)) - 1);
_local7 = (_local7 + _local8);
_local7 = (_local7 + 15);
createScorePop(_local3, explosionArr[_arg1][_local6][_local8].y, explosionArr[_arg1][_local6][_local8].x, _local7);
communicator.sendScore((currentTick + 1), _local3, noOfRandoms, noOfBonusRandoms);
score = (score + _local3);
highestComboScore = Math.max(highestComboScore, _local3);
}
public function triggerBonusBlue(_arg1:Event){
if (noOfBlueBonus > 0){
communicator.triggerBonusBlue((currentTick + 1));
sfxManager.get("BoostMeter").play();
noOfBlueBonus--;
blueAlpha = 1;
mcBlueButton.mcText.txtNum.text = ("x" + noOfBlueBonus);
if (noOfBlueBonus == 0){
mcBlueButton.gotoAndPlay(54);
} else {
mcBlueButton.gotoAndPlay(36);
};
blueBarValue = Math.min((blueBarValue + (RESET_BAR_VALUE * 0.2)), RESET_BAR_VALUE);
trace(("blueBarValue " + blueBarValue));
};
}
public function printExpl(){
var _local2:*;
var _local3:*;
var _local1:* = 0;
while (_local1 < explosionArr.length) {
_local2 = 0;
while (_local2 < explosionArr[_local1].length) {
_local3 = 0;
while (_local3 < explosionArr[_local1][_local2].length) {
trace(((((explosionArr[_local1][_local2][_local3].posY + " ") + explosionArr[_local1][_local2][_local3].posX) + " - ") + explosionArr[_local1][_local2][_local3].exploding));
_local3++;
};
trace("---");
_local2++;
};
trace("_____________________");
_local1++;
};
}
public function createBoard(){
var _local2:Array;
var _local3:Array;
var _local4:*;
var _local5:*;
var _local6:*;
var _local1:* = (BOARD_HEIGHT - 1);
while (_local1 >= 0) {
_local2 = new Array();
_local3 = new Array();
_local4 = 0;
while (_local4 < BOARD_WIDTH) {
_local5 = createPieceForBoard(_local1, _local4, false);
_local6 = new IFloat(_local5.theY);
_local2.push(_local5);
_local3.push(_local6);
_local4++;
};
gameGridObj[_local1] = _local2;
yFloatArr[_local1] = _local3;
_local1--;
};
}
public function createPiece(_arg1:Number, _arg2:Number, _arg3:Boolean){
var _local4:* = getRandom(noOfTypes);
var _local5:* = deadObjectArr[0];
deadObjectArr.splice(0, 1);
_local5.init(_arg1, _arg2, _local4, this, _arg3, pieceID, 0);
pieceID++;
return (_local5);
}
public function startRound(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8){
stage.addEventListener(MouseEvent.MOUSE_UP, mouseUp);
_arg5.startRound((_arg6 + 1), _arg7);
this.gameRoot = _arg1;
this.random = _arg2;
this.bonusRandom = _arg3;
this.userType = _arg4;
this.communicator = _arg5;
this.currentTick = _arg6;
this.themeMod = _arg8;
startTime = _arg6;
timeLeft = TOTAL_TIME;
if (_arg4 == 0){
timeLeft = (timeLeft / 3);
};
dropCounter = RESET_DROP_COUNTER;
noOfTypes = 2;
noOfBonusTypes = 4;
allowedNoTargets = 4;
musicManager = _arg1.musicManager;
sfxManager = _arg1.sfxManager;
createBoard();
setBonusType();
gameState = STATE_RUNNING;
}
public function pieceClicked(_arg1:Piece){
if ((((((((((((((targetArr[0] == null)) && (!(_arg1.collapsing)))) && (!(_arg1.exploding)))) && ((_arg1.type < 2)))) && ((explosionArr.length == 0)))) && ((visualExplosionArr.length == 0)))) && (!(playOut)))){
communicator.pieceClicked((currentTick + 1), _arg1.posY, _arg1.posX);
addedBrickTick = (addedBrickTick + (" " + currentTick));
addedBrick = (addedBrick + (((" " + _arg1.posY) + "-") + _arg1.posX));
targetArr[0] = _arg1;
_arg1.mark();
calcFrame();
};
}
public function collapseBoard(){
var _local2:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local1:* = getTimer();
_local2 = 0;
while (_local2 < BOARD_WIDTH) {
if (((((!((gameGridObj[(BOARD_HEIGHT - 1)][_local2] == null))) && ((gameGridObj[(BOARD_HEIGHT - 1)][_local2].type > (noOfTypes - 1))))) && ((gameGridObj[(BOARD_HEIGHT - 1)][_local2].theY == gameGridObj[(BOARD_HEIGHT - 1)][_local2].gotoY)))){
createBonusRemovePuff(gameGridObj[(BOARD_HEIGHT - 1)][_local2]);
moveBonus(gameGridObj[(BOARD_HEIGHT - 1)][_local2]);
gameGridObj[(BOARD_HEIGHT - 1)][_local2] = null;
};
_local2++;
};
var _local3:* = (BOARD_HEIGHT - 1);
while (_local3 >= 0) {
_local2 = 0;
while (_local2 < BOARD_WIDTH) {
_local5 = false;
_local6 = -1;
_local7 = 0;
while (_local7 < _local3) {
_local8 = 0;
while (_local8 < targetArr.length) {
if (gameGridObj[_local7][_local2] == targetArr[_local8]){
_local6 = _local7;
};
_local8++;
};
if (((!((gameGridObj[_local7][_local2] == null))) && (gameGridObj[_local7][_local2].exploding))){
_local5 = true;
};
_local7++;
};
if ((((((gameGridObj[_local3][_local2] == null)) && ((_local3 > 0)))) && (!(_local5)))){
_local9 = (_local3 - 1);
while (_local9 > _local6) {
if (gameGridObj[_local9][_local2] != null){
_local10 = gameGridObj[_local9][_local2];
_local11 = yFloatArr[_local9][_local2];
gameGridObj[_local9][_local2] = null;
gameGridObj[_local3][_local2] = _local10;
gameGridObj[_local3][_local2].goto(_local3, _local2);
yFloatArr[_local9][_local2] = null;
yFloatArr[_local3][_local2] = _local11;
_local9 = -1;
};
_local9--;
};
};
_local2++;
};
_local3--;
};
var _local4:* = (getTimer() - _local1);
if (_local4 > 20){
};
}
public function triggerBonusPink(_arg1:Event){
if (noOfPinkBonus > 0){
communicator.triggerBonusPink((currentTick + 1));
sfxManager.get("BoostMeter").play();
noOfPinkBonus--;
pinkAlpha = 1;
mcPinkButton.mcText.txtNum.text = ("x" + noOfPinkBonus);
if (noOfPinkBonus == 0){
mcPinkButton.gotoAndPlay(55);
} else {
mcPinkButton.gotoAndPlay(37);
};
pinkBarValue = Math.min((pinkBarValue + (RESET_BAR_VALUE * 0.2)), RESET_BAR_VALUE);
trace(("pinkBarValue " + pinkBarValue));
};
}
public function mouseOverPiece(_arg1:Piece, _arg2){
var _local3:*;
var _local4:Boolean;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
if (((((((!((targetArr[0] == null))) && (!(_arg1.collapsing)))) && (!(_arg1.exploding)))) && ((_arg1.type < 2)))){
if (_arg2){
addedBrickTick = (addedBrickTick + (" " + currentTick));
addedBrick = (addedBrick + (((" " + _arg1.posY) + "-") + _arg1.posX));
communicator.pieceOver((currentTick + 1), _arg1.posY, _arg1.posX);
};
_local3 = targetArr[(targetArr.length - 1)];
_local4 = false;
_local5 = 0;
while (_local5 < (targetArr.length - 1)) {
if (targetArr[_local5] == _arg1){
_local4 = true;
_local6 = (targetArr.length - 1);
while (_local6 > _local5) {
targetArr[_local6].unMark();
_local6--;
};
_local7 = (targetArr.length - 1);
while (_local7 > _local5) {
targetArr.splice(_local7, 1);
_local7--;
};
calcFrame();
return (true);
};
_local5++;
};
if (!_local4){
_local8 = false;
if ((((_arg1.posX == _local3.posX)) && ((_arg1.posY == (_local3.posY - 1))))){
_local8 = true;
} else {
if ((((_arg1.posX == _local3.posX)) && ((_arg1.posY == (_local3.posY + 1))))){
_local8 = true;
} else {
if ((((_arg1.posY == _local3.posY)) && ((_arg1.posX == (_local3.posX - 1))))){
_local8 = true;
} else {
if ((((_arg1.posY == _local3.posY)) && ((_arg1.posX == (_local3.posX + 1))))){
_local8 = true;
};
};
};
};
if (((_local8) && ((targetArr.length < allowedNoTargets)))){
_arg1.mark();
targetArr.push(_arg1);
calcFrame();
return (true);
};
if (!_local8){
if (_arg1.posY == _local3.posY){
if ((((_arg1.posX > _local3.posX)) && ((((targetArr.length < allowedNoTargets)) || ((_local3.posX < targetArr[0].posX)))))){
_local5 = (_local3.posX + 1);
while (_local5 <= _arg1.posX) {
if (gameGridObj[_arg1.posY][_local5] != null){
_local9 = mouseOverPiece(gameGridObj[_arg1.posY][_local5], false);
if (!_local9){
_local5 = (_arg1.posX + 1);
};
} else {
return (false);
};
_local5++;
};
} else {
if ((((targetArr.length < allowedNoTargets)) || ((_local3.posX > targetArr[0].posX)))){
_local5 = (_local3.posX - 1);
while (_local5 >= _arg1.posX) {
if (gameGridObj[_arg1.posY][_local5] != null){
_local9 = mouseOverPiece(gameGridObj[_arg1.posY][_local5], false);
if (!_local9){
_local5 = (_arg1.posX - 1);
};
} else {
return (false);
};
_local5--;
};
};
};
} else {
if (_arg1.posX == _local3.posX){
if ((((_arg1.posY > _local3.posY)) && ((((targetArr.length < allowedNoTargets)) || ((_local3.posY < targetArr[0].posY)))))){
_local5 = (_local3.posY + 1);
while (_local5 <= _arg1.posY) {
if (gameGridObj[_local5][_arg1.posX] != null){
_local9 = mouseOverPiece(gameGridObj[_local5][_arg1.posX], false);
if (!_local9){
_local5 = (_arg1.posY + 1);
};
} else {
return (false);
};
_local5++;
};
} else {
if ((((targetArr.length < allowedNoTargets)) || ((_local3.posY > targetArr[0].posY)))){
_local5 = (_local3.posY - 1);
while (_local5 >= _arg1.posY) {
if (gameGridObj[_local5][_arg1.posX] != null){
_local9 = mouseOverPiece(gameGridObj[_local5][_arg1.posX], false);
if (!_local9){
_local5 = (_arg1.posY - 1);
};
} else {
return (false);
};
_local5--;
};
};
};
};
};
};
};
};
return (false);
}
public function endGame(_arg1){
clearBoard();
sfxManager.get("TimeWarning").stop();
if (!_arg1){
sfxManager.get("GameOverBad").play();
};
trace("END GAME");
if (mcScore.txtScore.text != score){
mcScore.txtScore.text = score;
};
gameState = STATE_NOT_RUNNING;
if (_arg1){
} else {
communicator.lastTick((currentTick + 1), noOfRandoms, noOfBonusRandoms);
};
gameRoot.endGame(_arg1, score, largestCombo, highestComboScore, numberJellySqashes);
}
public function createScorePop(_arg1, _arg2, _arg3, _arg4){
var _local5:* = getTimer();
var _local6:* = new ScorePop();
var _local7:* = (getTimer() - _local5);
if (_local7 > 10){
};
_local6.init(_arg1, _arg2, _arg3, _arg4);
gameRoot.addChild(_local6);
scoreArr.push(_local6);
}
public function createExplosion(_arg1, _arg2){
var _local3:*;
var _local4:*;
var _local5:*;
_arg1.cE = true;
if (_arg1.state < 4){
_local3 = getTimer();
_local4 = new Explosion();
_local5 = (getTimer() - _local3);
if (_local5 > 10){
};
_local4.init(_arg1.y, _arg1.x, _arg2, _arg1.type, false, _arg1, _arg1.posY, _arg1.posX, 0);
addChild(_local4);
visualExplosionArr.push(_local4);
} else {
_local3 = getTimer();
_local4 = new Explosion();
_local5 = (getTimer() - _local3);
if (_local5 > 10){
};
_local4.init(_arg1.y, _arg1.x, _arg2, _arg1.type, true, _arg1, _arg1.posY, _arg1.posX, 0);
addChild(_local4);
visualExplosionArr.push(_local4);
createBonusDot();
};
}
public function clearBoard(){
var _local1:*;
var _local2:*;
trace("clearBoard()");
_local1 = 0;
while (_local1 < scoreArr.length) {
scoreArr[_local1].visible = false;
_local1++;
};
_local1 = 0;
while (_local1 < visualExplosionArr.length) {
removeChild(visualExplosionArr[_local1]);
_local1++;
};
visualExplosionArr = [];
_local1 = 0;
while (_local1 < gameGridObj.length) {
_local2 = 0;
while (_local2 < gameGridObj[_local1].length) {
if (gameGridObj[_local1][_local2] != null){
removeChild(gameGridObj[_local1][_local2]);
gameGridObj[_local1][_local2] = null;
};
_local2++;
};
_local1++;
};
mcStarBonusAnim.visible = false;
}
public function render(_arg1:Number, _arg2:Number){
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local3:* = getTimer();
switch (gameState){
case STATE_RUNNING:
if (mcBlueBar.mcFill.alpha != blueAlpha){
mcBlueBar.mcFill.alpha = blueAlpha;
};
if (mcPinkBar.mcFill.alpha != pinkAlpha){
mcPinkBar.mcFill.alpha = pinkAlpha;
};
if (starBonusAnimAt < starBonusAnimStop){
mcStarBonusAnim.gotoAndStop(starBonusAnimAt);
};
if ((_arg1 % 5) == 0){
mcBlueBar.gotoAndStop(Math.round(((RESET_BAR_VALUE - blueBarValue) / 5)));
mcPinkBar.gotoAndStop(Math.round(((RESET_BAR_VALUE - pinkBarValue) / 5)));
};
_local4 = 0;
while (_local4 < BOARD_HEIGHT) {
_local10 = 0;
while (_local10 < BOARD_WIDTH) {
if (gameGridObj[_local4][_local10] != null){
if (gameGridObj[_local4][_local10].y != gameGridObj[_local4][_local10].gotoY){
gameGridObj[_local4][_local10].y = yFloatArr[_local4][_local10].get(_arg2);
};
if (gameGridObj[_local4][_local10].state != gameGridObj[_local4][_local10].animAt){
gameGridObj[_local4][_local10].animAt++;
gameGridObj[_local4][_local10].target.gotoAndStop(gameGridObj[_local4][_local10].animAt);
};
};
_local10++;
};
_local4++;
};
_local4 = 0;
while (_local4 < visualExplosionArr.length) {
if (visualExplosionArr[_local4] != null){
if (visualExplosionArr[_local4].state >= visualExplosionArr[_local4].animLength){
} else {
if (visualExplosionArr[_local4].state != visualExplosionArr[_local4].animAt){
visualExplosionArr[_local4].target.gotoAndStop(visualExplosionArr[_local4].state);
visualExplosionArr[_local4].animAt = visualExplosionArr[_local4].state;
};
};
};
_local4++;
};
if (mcScore.txtScore.text != score){
mcScore.txtScore.text = score;
};
_local5 = Math.round((timeLeft / 25));
_local6 = Math.floor((_local5 / 60));
_local7 = (_local5 - (_local6 * 60));
_local8 = "";
if (_local7.toString().length == 1){
_local8 = "0";
};
_local9 = (((("0" + _local6) + ":") + _local8) + _local7);
if (_local9 != mcTime.mcTime.txtTime.text){
mcTime.mcTime.txtTime.text = _local9;
};
if (warnTime){
warnTime = false;
mcTime.play();
sfxManager.get("TimeWarning").loop(0.2);
};
_local4 = 0;
while (_local4 < bonusArr.length) {
if (bonusArr[_local4] != null){
bonusArr[_local4].rotation = bonusRotFloatArr[_local4].get(_arg2);
if (bonusArr[_local4].y != bonusArr[_local4].gotoY){
bonusArr[_local4].y = bonusYFloatArr[_local4].get(_arg2);
};
if (bonusArr[_local4].x != bonusArr[_local4].gotoX){
bonusArr[_local4].x = bonusXFloatArr[_local4].get(_arg2);
};
if ((((bonusArr[_local4].x == bonusArr[_local4].gotoX)) && ((bonusArr[_local4].y == bonusArr[_local4].gotoY)))){
removeChild(bonusArr[_local4]);
bonusArr.splice(_local4, 1);
bonusYFloatArr.splice(_local4, 1);
bonusXFloatArr.splice(_local4, 1);
_local4--;
};
};
_local4++;
};
_local4 = 0;
while (_local4 < scoreArr.length) {
if (scoreArr[_local4] != null){
if (scoreArr[_local4].animGo != scoreArr[_local4].animAt){
if ((((scoreArr[_local4].animGo > 1)) && ((scoreArr[_local4].visible == false)))){
scoreArr[_local4].visible = true;
};
scoreArr[_local4].gotoAndStop(scoreArr[_local4].animGo);
scoreArr[_local4].animAt = scoreArr[_local4].animGo;
if (scoreArr[_local4].animAt == scoreArr[_local4].animLength){
gameRoot.removeChild(scoreArr[_local4]);
scoreArr.splice(_local4, 1);
_local4--;
};
};
};
_local4++;
};
break;
case STATE_BONUS_ANIM:
_local4 = 0;
while (_local4 < bonusAnimArr.length) {
if (bonusAnimArr[_local4] != null){
bonusAnimArr[_local4].gotoAndStop(bonusAnimArr[_local4].animAt);
};
_local4++;
};
if (mcScore.txtScore.text != score){
mcScore.txtScore.text = score;
};
break;
};
}
public function tick(_arg1:Number){
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
if (relaxTickTime == 1){
if (JellySwelly.relaxGame){
barMod = RELAX_GAME_START_SPEED;
};
};
if (REPLAY_MODE){
checkTick(_arg1);
};
currentTick = _arg1;
var _local2:* = getTimer();
if ((_arg1 % 3) == 0){
};
switch (gameState){
case STATE_RUNNING:
if (starBonusAnimAt < starBonusAnimStop){
starBonusAnimAt++;
};
if ((_arg1 % 50) == 0){
if (getClientRandom(10) > 2){
_local4 = gameGridObj[getClientRandom(BOARD_HEIGHT)][getClientRandom(BOARD_WIDTH)];
while (_local4 == null) {
_local4 = gameGridObj[getClientRandom(BOARD_HEIGHT)][getClientRandom(BOARD_WIDTH)];
};
if ((((((((_local4.state == 1)) && (!(_local4.exploding)))) && (!(_local4.collapsing)))) && ((_local4.type < 2)))){
_local4.target.gotoAndPlay(9);
};
} else {
_local4 = gameGridObj[getClientRandom(BOARD_HEIGHT)][getClientRandom((BOARD_WIDTH - 1))];
_local5 = null;
if (_local4 != null){
_local5 = gameGridObj[_local4.posY][(_local4.posX + 1)];
};
_local6 = 0;
while ((((((((_local4 == null)) || (!((_local4.type == 1))))) || ((_local5 == null)))) || (((!((_local5.type == 0))) && ((_local6 < 100)))))) {
_local4 = gameGridObj[getClientRandom(BOARD_HEIGHT)][getClientRandom((BOARD_WIDTH - 1))];
if (_local4 != null){
_local5 = gameGridObj[_local4.posY][(_local4.posX + 1)];
};
_local6++;
};
if (_local6 < 100){
if ((((((((((((_local4.state == 1)) && (!(_local4.exploding)))) && (!(_local4.collapsing)))) && ((_local5.state == 1)))) && (!(_local5.exploding)))) && (!(_local5.collapsing)))){
_local4.target.gotoAndPlay(50);
_local5.target.gotoAndPlay(50);
};
};
};
};
if (starBonusCounter > 0){
starBonusCounter--;
if (starBonusCounter == 0){
mcStarBonusAnim.visible = false;
musicManager.get("GameLoop").loop();
musicManager.get("BonusMode").stop();
};
};
if (JellySwelly.relaxGame == false){
timeLeft--;
};
if (!playOut){
if ((((blueBarValue > 800)) && (((blueBarValue - barMod) <= 800)))){
sfxManager.get("Warning").play();
};
if ((((pinkBarValue > 800)) && (((pinkBarValue - barMod) <= 800)))){
sfxManager.get("Warning").play();
};
blueBarValue = (blueBarValue - barMod);
pinkBarValue = (pinkBarValue - barMod);
dropCounter--;
collapseBoard();
};
if (dropCounter == 0){
if (bonusCounter >= BONUS_OBJ){
newDropBonus();
} else {
newDropPiece();
};
};
if (explosionArr.length > 0){
_local7 = 0;
while (_local7 < explosionArr.length) {
_local8 = 0;
_local9 = explosionArr[_local7].length;
_local10 = true;
_local3 = 0;
while (_local3 < _local9) {
_local11 = explosionArr[_local7][_local3].length;
_local12 = 0;
while (_local12 < _local11) {
if (_local8 == checkCounterArr[_local7]){
soundCount++;
if ((soundCount % 4) == 0){
sfxManager.get("Swell").play();
};
if (explosionArr[_local7][_local3][_local12].state == 1){
explosionArr[_local7][_local3][_local12].state = 3;
} else {
explosionArr[_local7][_local3][_local12].state = 8;
};
if ((((_local3 == (explosionArr[_local7].length - 1))) && ((_local12 == (explosionArr[_local7][_local3].length - 1))))){
calcBonusTime(_local7);
explodeBoard(_local7);
calcScore(_local7);
explosionArr.splice(_local7, 1);
checkCounterArr.splice(_local7, 1);
_local7--;
_local10 = false;
} else {
_local12 = explosionArr[_local7][_local3].length;
_local3 = explosionArr[_local7].length;
};
};
_local8++;
_local12++;
};
_local3++;
};
if (_local10){
var _local14 = checkCounterArr;
var _local15 = _local7;
var _local16 = (_local14[_local15] + 1);
_local14[_local15] = _local16;
};
_local7++;
};
};
boardFull = true;
_local3 = 0;
while (_local3 < BOARD_HEIGHT) {
_local12 = 0;
while (_local12 < BOARD_WIDTH) {
if (gameGridObj[_local3][_local12] != null){
if (gameGridObj[_local3][_local12].theY != gameGridObj[_local3][_local12].gotoY){
boardFull = false;
gameGridObj[_local3][_local12].calcSpeed();
gameGridObj[_local3][_local12].theY = Math.min((gameGridObj[_local3][_local12].theY + gameGridObj[_local3][_local12].speed), gameGridObj[_local3][_local12].gotoY);
yFloatArr[_local3][_local12].set(gameGridObj[_local3][_local12].theY);
if (gameGridObj[_local3][_local12].theY == gameGridObj[_local3][_local12].gotoY){
yFloatArr[_local3][_local12].set(gameGridObj[_local3][_local12].theY);
gameGridObj[_local3][_local12].collapsing = false;
};
};
};
_local12++;
};
_local3++;
};
_local3 = 0;
while (_local3 < visualExplosionArr.length) {
if (visualExplosionArr[_local3].delay == 0){
visualExplosionArr[_local3].state++;
} else {
visualExplosionArr[_local3].delay--;
if (visualExplosionArr[_local3].delay == 0){
if (visualExplosionArr[_local3].large){
explodeSound(1);
} else {
explodeSound(0);
};
};
};
if (visualExplosionArr[_local3].state == visualExplosionArr[_local3].animLength){
if (gameGridObj[visualExplosionArr[_local3].yPos][visualExplosionArr[_local3].xPos] != null){
deadObjectArr.push(gameGridObj[visualExplosionArr[_local3].yPos][visualExplosionArr[_local3].xPos]);
gameGridObj[visualExplosionArr[_local3].yPos][visualExplosionArr[_local3].xPos] = null;
yFloatArr[visualExplosionArr[_local3].yPos][visualExplosionArr[_local3].xPos] = null;
};
removeChild(visualExplosionArr[_local3]);
visualExplosionArr.splice(_local3, 1);
_local3--;
};
_local3++;
};
_local3 = 0;
while (_local3 < bonusArr.length) {
bonusArr[_local3].rot = (bonusArr[_local3].rot + 40);
bonusRotFloatArr[_local3].set(bonusArr[_local3].rot);
_local13 = true;
if (bonusArr[_local3].theY != bonusArr[_local3].gotoY){
_local13 = false;
bonusArr[_local3].theY = Math.min((bonusArr[_local3].theY + 8), bonusArr[_local3].gotoY);
bonusYFloatArr[_local3].set(bonusArr[_local3].theY);
if (bonusArr[_local3].theY == bonusArr[_local3].gotoY){
bonusYFloatArr[_local3].set(bonusArr[_local3].theY);
};
};
if (bonusArr[_local3].theX != bonusArr[_local3].gotoX){
_local13 = false;
if (bonusArr[_local3].theX > bonusArr[_local3].gotoX){
bonusArr[_local3].theX = Math.max((bonusArr[_local3].theX - 25), bonusArr[_local3].gotoX);
} else {
bonusArr[_local3].theX = Math.min((bonusArr[_local3].theX + 25), bonusArr[_local3].gotoX);
};
bonusXFloatArr[_local3].set(bonusArr[_local3].theX);
if (bonusArr[_local3].theX == bonusArr[_local3].gotoX){
bonusXFloatArr[_local3].set(bonusArr[_local3].theX);
};
};
if ((((((bonusArr[_local3].theX == bonusArr[_local3].gotoX)) && ((bonusArr[_local3].theY == bonusArr[_local3].gotoY)))) && (!(_local13)))){
addBonus(bonusArr[_local3].type);
};
_local3++;
};
_local3 = 0;
while (_local3 < scoreArr.length) {
if (scoreArr[_local3].delay > 0){
scoreArr[_local3].delay--;
if (scoreArr[_local3].delay == 0){
if (sfxOn){
sfxManager.get("ScorePopSound").play();
};
};
} else {
scoreArr[_local3].animGo = Math.min((scoreArr[_local3].animGo + 1), scoreArr[_local3].animLength);
};
_local3++;
};
if (timeLeft == 375){
warnTime = true;
};
if (JellySwelly.relaxGame){
relaxTickTime++;
if ((relaxTickTime % RELAX_GAME_SPEED_INCREASE_INTERVAL) == 0){
barMod = (barMod + RELAX_GAME_SPEED_INCREASE);
};
} else {
if ((timeLeft % (TOTAL_TIME / 3)) == 0){
barMod++;
};
};
if (timeLeft == 0){
if ((((visualExplosionArr.length > 0)) || ((explosionArr.length > 0)))){
playOut = true;
timeLeft++;
} else {
calcBonusScore();
};
};
if ((((blueBarValue <= 0)) || ((pinkBarValue <= 0)))){
endGame(false);
};
if (blueBarValue < 800){
blueAlpha = (blueAlpha + (0.2 * blueAlphaAnim));
blueAlpha = (Math.round((blueAlpha * 10)) / 10);
if ((((blueAlpha == 0)) || ((blueAlpha == 1)))){
blueAlphaAnim = (blueAlphaAnim * -1);
};
} else {
blueAlphaAnim = -1;
};
if (pinkBarValue < 800){
pinkAlpha = (pinkAlpha + (0.2 * pinkAlphaAnim));
pinkAlpha = (Math.round((pinkAlpha * 10)) / 10);
if ((((pinkAlpha == 0)) || ((pinkAlpha == 1)))){
pinkAlphaAnim = (pinkAlphaAnim * -1);
};
} else {
pinkAlphaAnim = -1;
};
break;
case STATE_NOT_RUNNING:
break;
case STATE_BONUS_ANIM:
_local3 = 0;
while (_local3 < bonusAnimArr.length) {
if (bonusAnimArr[_local3].delay == 0){
bonusAnimArr[_local3].animAt++;
} else {
bonusAnimArr[_local3].delay--;
};
if (bonusAnimArr[_local3].animAt == 1){
sfxManager.get("ScorePopSound").play();
if (bonusAnimArr[_local3].type == 0){
mcBlueButton.mcText.txtNum.text = ("x" + --noOfBlueBonus);
} else {
mcPinkButton.mcText.txtNum.text = ("x" + --noOfPinkBonus);
};
};
if (bonusAnimArr[_local3].animAt == 30){
score = (score + 500);
removeChild(bonusAnimArr[_local3]);
bonusAnimArr.splice(_local3, 1);
_local3--;
};
_local3++;
};
if (bonusAnimArr.length == 0){
endGame(true);
};
break;
};
}
public function setBonusType(){
nextBonusType = (noOfTypes + getBonusRandom(noOfBonusTypes));
nextBonusType = Math.min(4, nextBonusType);
if (nextBonusType == 4){
if (bonusSizeInc < 2){
nextBonusType = 5;
bonusSizeInc++;
};
};
mcBonusCounter.mcNextBonus.mcNextBonus.gotoAndStop(nextBonusType);
}
public function newDropPiece(){
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local1:* = getTimer();
var _local2:* = 0;
dropCounter = RESET_DROP_COUNTER;
var _local3:* = (BOARD_HEIGHT - 1);
while (_local3 >= 0) {
_local5 = 0;
while (_local5 < BOARD_WIDTH) {
_local6 = false;
_local7 = _local3;
while (_local7 >= 0) {
_local2++;
if (gameGridObj[_local7][_local5] != null){
_local6 = true;
};
_local7--;
};
if ((((gameGridObj[_local3][_local5] == null)) && (!(_local6)))){
_local8 = getTimer();
_local9 = createPiece(_local3, _local5, true);
_local10 = getTimer();
_local11 = new IFloat(_local9.theY);
_local12 = (getTimer() - _local10);
if (_local12 > 10){
};
gameGridObj[_local3][_local5] = _local9;
yFloatArr[_local3][_local5] = _local11;
_local3 = -1;
_local5 = BOARD_WIDTH;
_local13 = (getTimer() - _local8);
};
_local5++;
};
_local3--;
};
var _local4:* = (getTimer() - _local1);
if (_local4 > 20){
};
}
public function explodeBoard(_arg1:Number){
var _local4:*;
var _local5:*;
var _local6:*;
explosionMode = false;
var _local2:* = 0;
var _local3:* = (explosionArr[_arg1].length - 1);
while (_local3 >= 0) {
_local4 = 0;
while (_local4 < explosionArr[_arg1][_local3].length) {
if (gameGridObj[explosionArr[_arg1][_local3][_local4].posY][explosionArr[_arg1][_local3][_local4].posX] != null){
_local5 = false;
_local6 = 0;
while (_local6 < visualExplosionArr.length) {
if ((((visualExplosionArr[_local6].yPos == explosionArr[_arg1][_local3][_local4].posY)) && ((visualExplosionArr[_local6].xPos == explosionArr[_arg1][_local3][_local4].posX)))){
_local5 = true;
numberJellySqashes++;
explosionArr[_arg1][_local3][_local4].blaj = true;
};
_local6++;
};
if (!_local5){
var _temp1 = _local2;
_local2 = (_local2 + 1);
createExplosion(explosionArr[_arg1][_local3][_local4], _temp1);
gameGridObj[explosionArr[_arg1][_local3][_local4].posY][explosionArr[_arg1][_local3][_local4].posX].visible = false;
};
};
_local4++;
};
_local3--;
};
largestCombo = Math.max(largestCombo, _local2);
}
public function checkForExplosions(){
var _local2:*;
var _local3:*;
var _local4:*;
var _local1:* = new Array();
_local2 = 0;
while (_local2 < targetArr.length) {
_local3 = targetArr[_local2];
_local4 = _local3.posX;
while (_local4 >= 0) {
if ((((((((gameGridObj[_local3.posY][_local4] == null)) || (!((_local3.type == gameGridObj[_local3.posY][_local4].type))))) || (gameGridObj[_local3.posY][_local4].collapsing))) || (gameGridObj[_local3.posY][_local4].exploding))){
checkForHorizontalExplosion(gameGridObj[_local3.posY][(_local4 + 1)]);
_local4 = -1;
break;
} else {
if (_local4 == 0){
checkForHorizontalExplosion(gameGridObj[_local3.posY][_local4]);
_local4 = -1;
break;
};
};
_local4--;
};
if (horiExplArr.length >= MIN_LENGTH){
_local1.push(horiExplArr);
};
horiExplArr = [];
_local2++;
};
_local2 = 0;
while (_local2 < targetArr.length) {
_local3 = targetArr[_local2];
_local4 = _local3.posY;
while (_local4 >= 0) {
if ((((((((gameGridObj[_local4][_local3.posX] == null)) || (!((_local3.type == gameGridObj[_local4][_local3.posX].type))))) || (gameGridObj[_local4][_local3.posX].collapsing))) || (gameGridObj[_local4][_local3.posX].exploding))){
checkForVerticalExplosion(gameGridObj[(_local4 + 1)][_local3.posX]);
_local4 = -1;
break;
} else {
if (_local4 == 0){
checkForVerticalExplosion(gameGridObj[_local4][_local3.posX]);
_local4 = -1;
break;
};
};
_local4--;
};
if (vertExplArr.length >= MIN_LENGTH){
_local1.push(vertExplArr);
};
vertExplArr = [];
_local2++;
};
_local2 = 0;
while (_local2 < BOARD_HEIGHT) {
_local4 = 0;
while (_local4 < BOARD_WIDTH) {
if (gameGridObj[_local2][_local4] != null){
gameGridObj[_local2][_local4].cfh = false;
gameGridObj[_local2][_local4].cfv = false;
};
_local4++;
};
_local2++;
};
targetArr = [];
if (_local1.length > 0){
_local2 = 0;
while (_local2 < _local1.length) {
_local4 = 0;
while (_local4 < _local1[_local2].length) {
_local1[_local2][_local4].exploding = true;
_local4++;
};
_local2++;
};
explosionArr.push(_local1);
explosionMode = true;
checkCounterArr.push(0);
};
}
public function checkTick(_arg1){
replayData.checkTick(_arg1);
}
public function createBonusDot(){
bonusCounter++;
mcBonusCounter.gotoAndStop((bonusCounter + 1));
}
public function newDropBonus(){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
dropCounter = RESET_DROP_COUNTER;
var _local1:* = (BOARD_HEIGHT - 1);
while (_local1 >= 0) {
_local2 = 0;
while (_local2 < BOARD_WIDTH) {
_local3 = false;
_local4 = _local1;
while (_local4 >= 0) {
if (gameGridObj[_local4][_local2] != null){
_local3 = true;
};
_local4--;
};
if ((((gameGridObj[_local1][_local2] == null)) && (!(_local3)))){
_local5 = createBonus(_local1, _local2, true);
_local6 = new IFloat(_local5.theY);
gameGridObj[_local1][_local2] = _local5;
yFloatArr[_local1][_local2] = _local6;
bonusCounter = (bonusCounter - 8);
mcBonusCounter.gotoAndStop((bonusCounter + 1));
setBonusType();
_local1 = -1;
_local2 = BOARD_WIDTH;
};
_local2++;
};
_local1--;
};
}
public function moveBonus(_arg1:Piece){
switch (_arg1.type){
case 2:
_arg1.gotoY = 570;
_arg1.gotoX = 22;
break;
case 3:
_arg1.gotoY = 570;
_arg1.gotoX = 62;
break;
case 4:
_arg1.gotoY = 540;
_arg1.gotoX = 300;
break;
case 5:
if (allowedNoTargets == 4){
_arg1.gotoY = 570;
_arg1.gotoX = 275;
} else {
_arg1.gotoY = 570;
_arg1.gotoX = 306;
};
break;
};
bonusArr.push(_arg1);
var _local2:IFloat = new IFloat(_arg1.y);
var _local3:IFloat = new IFloat(_arg1.x);
var _local4:IFloat = new IFloat(_arg1.rot);
bonusYFloatArr.push(_local2);
bonusXFloatArr.push(_local3);
bonusRotFloatArr.push(_local4);
}
public function calcBonusTime(_arg1){
var _local9:*;
trace(("calcBonusTime() " + currentTick));
var _local2:* = 0;
var _local3:* = 1;
var _local4:* = 0;
var _local5:* = 1;
var _local6:* = 0;
var _local7:* = 0;
var _local8:* = 0;
while (_local8 < explosionArr[_arg1].length) {
_local9 = 0;
while (_local9 < explosionArr[_arg1][_local8].length) {
if (explosionArr[_arg1][_local8][_local9].type == 0){
_local2 = (_local2 + _local3);
_local3++;
if (explosionArr[_arg1][_local8][_local9].state == 8){
_local6++;
};
} else {
_local4 = (_local4 + _local5);
_local5++;
if (explosionArr[_arg1][_local8][_local9].state == 8){
_local7++;
};
};
_local9++;
};
_local8++;
};
_local6 = (_local6 / 2);
_local7 = (_local7 / 2);
blueBarValue = Math.min((blueBarValue + _local2), RESET_BAR_VALUE);
pinkBarValue = Math.min((pinkBarValue + _local4), RESET_BAR_VALUE);
if (blueBarValue > 800){
blueAlpha = 1;
};
if (pinkBarValue > 800){
pinkAlpha = 1;
};
trace(("blueBarValue " + blueBarValue));
trace(("pinkBarValue " + pinkBarValue));
}
public function getRandom(_arg1:Number){
noOfRandoms++;
return (random.nextInt(_arg1));
}
public function explodeSound(_arg1){
if (_arg1 == 0){
sfxManager.get("ExplosionSmall1").play(0.5);
} else {
sfxManager.get("ExplosionSmall2").play(0.7);
};
}
public function getClientRandom(_arg1:Number){
return (Math.floor((Math.random() * _arg1)));
}
public function checkForHorizontalExplosion(_arg1){
var _local2:*;
horiExplArr.push(_arg1);
_arg1.cfh = true;
if (_arg1.posX < (BOARD_WIDTH - 1)){
_local2 = gameGridObj[_arg1.posY][(_arg1.posX + 1)];
if (((((!((_local2 == null))) && (!(_local2.collapsing)))) && (!(_local2.exploding)))){
if ((((_local2.type == _arg1.type)) && (!(_local2.cfh)))){
checkForHorizontalExplosion(_local2);
};
};
};
}
}
}//package src
Section 79
//GameOverHalloween (src.GameOverHalloween)
package src {
import flash.display.*;
public dynamic class GameOverHalloween extends MovieClip {
public var mcBlue:MovieClip;
public var mcBG:MovieClip;
public var mcPink:MovieClip;
}
}//package src
Section 80
//GameOverNormal (src.GameOverNormal)
package src {
import flash.display.*;
public dynamic class GameOverNormal extends MovieClip {
public var mcBlue:MovieClip;
public var mcPumpa:MovieClip;
public var mcBG:MovieClip;
public var mcPink:MovieClip;
}
}//package src
Section 81
//GreenBonusAnim (src.GreenBonusAnim)
package src {
import flash.display.*;
public class GreenBonusAnim extends MovieClip {
public var delay;
public var type;// = 1
public var animAt;// = 0
public function GreenBonusAnim(_arg1){
addFrameScript(0, frame1);
this.delay = (_arg1 * 10);
x = 42;
y = 548;
}
function frame1(){
stop();
}
}
}//package src
Section 82
//IntroHalloween (src.IntroHalloween)
package src {
import flash.display.*;
import flash.text.*;
public dynamic class IntroHalloween extends MovieClip {
public var txtClickToStart:TextField;
public var mcTimeLine:MovieClip;
public var txtGameStartsIn:TextField;
public var txtIntroHeadLine:TextField;
}
}//package src
Section 83
//IntroNormal (src.IntroNormal)
package src {
import flash.display.*;
import flash.text.*;
public dynamic class IntroNormal extends MovieClip {
public var txtClickToStart:TextField;
public var mcTimeLine:MovieClip;
public var txtGameStartsIn:TextField;
public var txtIntroHeadLine:TextField;
}
}//package src
Section 84
//JellySwelly (src.JellySwelly)
package src {
import src.sound.*;
import src.timing.*;
import flash.events.*;
import src.math.*;
import src.comm.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.external.*;
import flash.filters.*;
public class JellySwelly extends MovieClip implements Timeable {
private var recordLargestCombo;
public var mcSFX:MovieClip;
private var gameOverAnim;// = 0
public var mcPostIt:MovieClip;
public var mcMusic:MovieClip;
private var animDone;// = false
private var sfxOn;// = true
private var soundOn;// = true
private var startTime;
private var communicator:Communicator;
public var txtFPS:TextField;
private var recordNumberJellySqashes;
public var sfxManager:SoundManager;
public var mcGameOverHolder:MovieClip;
private var lastFps;
private var mcIntro;
private var themeMod:Number;
public var mcGameHolder:MovieClip;
private var pressedGO;// = false
private var clientVersion;// = "1.0"
private var recordHighestScoreCombo;
private var score;// = 0
private var ticksLeft;
private var mPlayed;// = false
private var mcGameOver;
var firstFrame:Boolean;// = true
private var userType;
private var frames;
private var mcGame;
private var introAnimAt;// = 1
private var currentTick;
private var m_mainTimer;
private var gameState;
private var noOfRend;// = 0
public var mcIntroHolder:MovieClip;
private var random:MtRandom;
private var recordHighScore;
private var bonusRandom:MtRandom;
private var themeUnlocked:Boolean;// = false
public var musicManager:SoundManager;
private var fpsTimer;
private var musicOn;// = true
private var fps;
public var txtOOC;// = ""
public var parsedGameData:Object;// = null
public var mcEndGame:MovieClip;
private var mcThemeSelection;
private var endGameClicked;// = false
private static var STATE_SHOW_RECORD = 2;
private static var TICKS_PER_SEC = 25;
private static var STATE_END_GAME = 4;
private static var STATE_NOT_RUNNING = 5;
private static var STATE_PLAY_GAME = 3;
private static var THEME_NEEDED = 5;
private static var STATE_PRE_QUIT = 6;
private static var DEBUG_GAME_DATA = (((((((((((((((((((((((((((((((((((((((((((((("<gamedata randomseed=\"603165812\" timelimit=\"660\" lang=\"de\" relaxMode=\"false\">" + "<text id=\"game_starts_in\">Game starts in [0] seconds!</text>") + "<text id=\"game_next_screen\">Next screen in [0] seconds!</text>") + "<text id=\"game_ends_in\">Game ends in [0] seconds!</text>") + "<text id=\"round_starts_in\">Round strats in [0] seconds!</text>") + "<text id=\"game_starts_in\">Game starts in [0] seconds!</text>") + "<text id=\"intro1\">Text för intro 1</text>") + "<text id=\"intro2\">Text för intro 2</text>") + "<text id=\"intro3\">Text för intro 3</text>") + "<text id=\"intro4\">Text för intro 4</text>") + "<text id=\"icon_pink_vial\">down with the pink vial</text>") + "<text id=\"icon_blue_vial\">down with the blue vial</text>") + "<text id=\"icon_white_vial\">down with the white vial</text>") + "<text id=\"icon_green_vial\">down with the green vial</text>") + "<text id=\"icon_star\">star icon</text>") + "<text id=\"icon_chalk\">chalk icon</text>") + "<text id=\"txtIcons1\">rubbe icons1</text>") + "<text id=\"txtIcons2\">rubbe icons2</text>") + "<text id=\"txtClickToStart\">Click to Start</text>") + "<text id=\"txtGameStartsIn\">Game starts in [0] secs</text>") + "<text id=\"txtIntroHeadLine\">Play like this</text>") + "<text id=\"txtGameOver\">Game Over!</text>") + "<text id=\"txtGameOverBad\">Our of color. You lose.</text>") + "<text id=\"txtOOC\">Out Of Color!</text>") + "<text id=\"txtOpenGameEnd\">txtOpenGameEnd</text>") + "<text id=\"score\">Score:</text>") + "<text id=\"high_score\">High score:</text>") + "<text id=\"largest_combo\">Largest Combo:</text>") + "<text id=\"now\">Now:</text>") + "<text id=\"best\">Best:</text>") + "<text id=\"highest_combo_score\">Highest Combo Score:</text>") + "<text id=\"jelly_squashes\">Jelly Squashes:</text>") + "<text id=\"time\">Time:</text>") + "<text id=\"txtChooseTheme\">Choose Theme</text>") + "<text id=\"txtThemeStartsIn\">Theme starts in [0] seconds</text>") + "<text id=\"txtPlayToUnlock\">Play 5 times to unlock this theme!</text>") + "<text id=\"txtThemeUnlocked\">Theme Unlocked!</text>") + "<text id=\"txtGamesPlayed\">[0]/5 games played to unlock halloween theme</text>") + "<records id=\"recordScore\">603165</records>") + "<records id=\"recordSizeCombo\">33</records>") + "<records id=\"recordAmountExplosion\">565</records>") + "<records id=\"recordScoreCombo\">33483</records>\n") + "<records id=\"gamesPlayed\">87</records>") + "<sounds id=\"sfxOn\">1</sounds>") + "<sounds id=\"musicOn\">1</sounds>") + "<userType id=\"0\">1</userType>") + "</gamedata>");
public static var relaxGame:Boolean;
private static var STATE_WAIT_FOR_GAMEDATA = 0;
private static var DEBUG_MODE = false;
private static var STATE_SHOW_INFO_SCREEN = 1;
private static var STATE_SHOW_THEME_SELECTION_SCREEN = 7;
public function JellySwelly(){
var _local1:Object;
var _local2:String;
musicManager = new SoundManager();
sfxManager = new SoundManager();
super();
m_mainTimer = new Timer(this, TICKS_PER_SEC);
addEventListener("enterFrame", drive);
communicator = new Communicator();
if (DEBUG_MODE){
_local1 = new Object();
_local1.message = DEBUG_GAME_DATA;
_local1.success = true;
} else {
_local1 = ExternalInterface.call("getGameData");
};
if ((((_local1 == null)) || (!(_local1.success)))){
trace(("oa kuka ur " + _local1));
} else {
_local2 = _local1.message;
if (!DEBUG_MODE){
};
parsedGameData = GameDataParser.parseGameData(_local2);
random = new MtRandom(parsedGameData.randomSeed);
bonusRandom = new MtRandom(random.nextInt(10000));
userType = parsedGameData.userType;
relaxGame = parsedGameData.relaxGame;
recordHighScore = parsedGameData.records["recordScore"];
recordLargestCombo = parsedGameData.records["recordSizeCombo"];
recordHighestScoreCombo = parsedGameData.records["recordScoreCombo"];
recordNumberJellySqashes = parsedGameData.records["recordAmountExplosion"];
if (Number(parsedGameData.records["gamesPlayed"]) >= THEME_NEEDED){
themeUnlocked = true;
};
mcSFX.addEventListener(MouseEvent.CLICK, sfxButtonClicked);
mcMusic.addEventListener(MouseEvent.CLICK, musicButtonClicked);
mcPostIt.mcPostIt.txtHighScore.text = parsedGameData.records["recordScore"];
mcPostIt.mcPostIt.txtHighScoreLabel.text = parsedGameData.textMappings["high_score"];
txtOOC = parsedGameData.textMappings["txtOOC"];
if (Number(parsedGameData.sounds["sfxOn"]) == 1){
mcSFX.gotoAndStop(10);
sfxOn = false;
sfxManager.setVolume(0);
};
if (Number(parsedGameData.sounds["musicOn"]) == 1){
mcMusic.gotoAndStop(10);
musicOn = false;
musicManager.setVolume(0);
};
if (userType != 0){
showThemeSelectionsScreen();
} else {
setTheme(0);
};
};
}
public function sfxButtonClicked(_arg1:Event){
if (sfxOn){
sfxManager.fadeTo(0, 500);
mcSFX.gotoAndStop(10);
sfxOn = false;
mcGame.sfxOn = false;
} else {
sfxManager.fadeTo(1, 500);
mcSFX.gotoAndStop(1);
sfxOn = true;
mcGame.sfxOn = true;
};
}
public function introPressed(_arg1:Event){
if (gameState == STATE_SHOW_INFO_SCREEN){
ticksLeft = 1;
};
}
public function themeDataSetup(){
mcGameOver.addEventListener(MouseEvent.CLICK, outroPressed);
mcEndGame.addEventListener(MouseEvent.CLICK, endGamePressed);
mcIntro.addEventListener(MouseEvent.CLICK, introPressed);
if (relaxGame){
mcGame.mcTime.visible = false;
mcPostIt.visible = false;
mcGameOver.mcBlue.mcText1.mcBest.txtBest.visible = false;
mcGameOver.mcBlue.mcText1.mcNow.txtNow.visible = false;
mcGameOver.mcBlue.mcText1.line_mc.visible = false;
mcGameOver.mcBlue.mcText1.mcLCR.visible = false;
mcGameOver.mcBlue.mcText2.mcCSR.visible = false;
mcGameOver.mcBlue.mcText3.mcJSR.visible = false;
mcGameOver.mcBlue.mcText3.mcJSR.visible = false;
};
mcIntro.mcTimeLine.mcIcons.icon_star.text = parsedGameData.textMappings["icon_star"];
mcIntro.mcTimeLine.mcIcons.icon_chalk.text = parsedGameData.textMappings["icon_chalk"];
mcIntro.mcTimeLine.mcIcons.txtIcons1.text = parsedGameData.textMappings["txtIcons1"];
mcIntro.mcTimeLine.mcIcons.txtIcons2.text = parsedGameData.textMappings["txtIcons2"];
mcIntro.txtClickToStart.text = parsedGameData.textMappings["txtClickToStart"];
mcIntro.txtIntroHeadLine.text = parsedGameData.textMappings["txtIntroHeadLine"];
mcGame.mcTime.txtTimeLable.text = parsedGameData.textMappings["time"];
mcGame.mcScore.txtScoreLable.text = parsedGameData.textMappings["score"];
mcGameOver.mcPink.mcText1.txtScoreLabel.text = parsedGameData.textMappings["score"];
mcGameOver.mcPink.mcText2.txtPBLabel.text = parsedGameData.textMappings["high_score"];
mcGameOver.mcPink.mcText3.txtPBLabel.text = parsedGameData.textMappings["high_score"];
mcGameOver.mcBlue.mcText1.mcLCLabel.txtLCLabel.text = parsedGameData.textMappings["largest_combo"];
mcGameOver.mcBlue.mcText1.mcNow.txtNow.text = parsedGameData.textMappings["now"];
mcGameOver.mcBlue.mcText1.mcBest.txtBest.text = parsedGameData.textMappings["best"];
mcGameOver.mcBlue.mcText2.mcHCSLabel.txtHCSLabel.text = parsedGameData.textMappings["highest_combo_score"];
mcGameOver.mcBlue.mcText3.mcJSLabel.txtJSLabel.text = parsedGameData.textMappings["jelly_squashes"];
mcGameOver.mcPink.mcGameOverTextBox.txtGameOver.text = parsedGameData.textMappings["txtGameOver"];
mcGame.sfxOn = sfxOn;
mcGame.musicOn = musicOn;
if (themeMod == 0){
if (Number(parsedGameData.records["gamesPlayed"]) < (THEME_NEEDED - 1)){
mcGameOver.mcPumpa.mcPumpText.txtPumpa.text = parsedGameData.textMappings["txtGamesPlayed"].split("[0]").join(("" + (Number(parsedGameData.records["gamesPlayed"]) + 1)));
} else {
if (Number(parsedGameData.records["gamesPlayed"]) == (THEME_NEEDED - 1)){
mcGameOver.mcPumpa.mcPumpText.txtPumpa.text = parsedGameData.textMappings["txtThemeUnlocked"];
} else {
mcGameOver.mcPumpa.mcPumpText.txtPumpa.text = "";
};
};
mcIntro.mcTimeLine.mcIcons.icon_pink_vial.text = parsedGameData.textMappings["icon_pink_vial"];
mcIntro.mcTimeLine.mcIcons.icon_blue_vial.text = parsedGameData.textMappings["icon_blue_vial"];
} else {
mcIntro.mcTimeLine.mcIcons.icon_pink_vial.text = parsedGameData.textMappings["icon_green_vial"];
mcIntro.mcTimeLine.mcIcons.icon_blue_vial.text = parsedGameData.textMappings["icon_white_vial"];
};
mcEndGame.visible = false;
mcGameOver.visible = false;
}
public function gamePreQuit():void{
gameState = STATE_PRE_QUIT;
ticksLeft = 45;
}
public function startRound():void{
communicator.gameStarted();
communicator.sendMod(themeMod);
mcEndGame.visible = true;
musicManager.get("Intro").fadeToAndStop(0, 500);
musicManager.get("GameLoop").loop(0).fadeTo(0.6, 500);
mcPostIt.visible = false;
gameState = STATE_PLAY_GAME;
mcGame.startRound(this, random, bonusRandom, userType, communicator, currentTick, clientVersion, themeMod);
}
public function gameQuit():void{
communicator.gameQuit();
}
public function endGame(_arg1, _arg2, _arg3, _arg4, _arg5):void{
var _local6:*;
var _local7:*;
trace("endgameeeeeee");
this.score = _arg2;
musicManager.get("Intro").stop();
musicManager.get("GameLoop").stop();
musicManager.get("BonusMode").stop();
if (_arg1){
musicManager.get("Outro").play();
mPlayed = true;
} else {
mcGameOver.mcPink.mcGameOverTextBox.txtGameOver.text = parsedGameData.textMappings["txtGameOverBad"];
};
if (userType == 0){
mcGameOver.mcPink.mcGameOverTextBox.txtOpen.text = parsedGameData.textMappings["txtOpenGameEnd"];
};
_local7 = 0;
_local6 = _local7;
if (!sfxOn){
_local6 = 1;
};
if (!musicOn){
_local7 = 1;
};
communicator.sendSoundStates(_local6, _local7);
mcGameOver.visible = true;
communicator.gameEnd(_arg2);
var _local8:* = Math.max(_arg2, recordHighScore);
var _local9:* = Math.max(recordLargestCombo, _arg3);
var _local10:* = Math.max(recordHighestScoreCombo, _arg4);
var _local11:* = Math.max(recordNumberJellySqashes, _arg5);
mcGameOver.mcPink.mcText2.visible = false;
mcGameOver.mcPink.mcText3.visible = false;
var _local12:* = mcGameOver.mcPink.mcText2;
if (_arg2 <= recordHighScore){
mcGameOver.mcPink.mcFlimmer.visible = false;
_local12 = mcGameOver.mcPink.mcText3;
} else {
mcGameOver.mcPink.mcFlimmer.play();
};
_local12.visible = true;
mcGameOver.mcPink.mcText1.txtScore.text = _arg2;
_local12.txtPB.text = _local8;
mcGameOver.mcBlue.mcText1.mcLC.txtLC.text = _arg3;
mcGameOver.mcBlue.mcText1.mcLCR.txtLCR.text = _local9;
mcGameOver.mcBlue.mcText2.mcHCS.txtHCS.text = _arg4;
mcGameOver.mcBlue.mcText2.mcCSR.txtCSR.text = _local10;
mcGameOver.mcBlue.mcText3.mcJS.txtJS.text = _arg5;
mcGameOver.mcBlue.mcText3.mcJSR.txtJSR.text = _local11;
if (_arg3 > recordLargestCombo){
addGlow(mcGameOver.mcBlue.mcText1.mcLC.txtLC);
};
if (_arg4 > recordHighestScoreCombo){
addGlow(mcGameOver.mcBlue.mcText2.mcHCS.txtHCS);
};
if (_arg5 > recordNumberJellySqashes){
addGlow(mcGameOver.mcBlue.mcText3.mcJS.txtJS);
};
if ((((themeMod == 0)) && (!((userType == 0))))){
if (Number(parsedGameData.records["gamesPlayed"]) < (THEME_NEEDED - 1)){
mcGameOver.mcPumpa.gotoAndPlay(2);
} else {
if (Number(parsedGameData.records["gamesPlayed"]) == (THEME_NEEDED - 1)){
mcGameOver.mcPumpa.gotoAndPlay(124);
} else {
mcGameOver.mcPumpa.gotoAndStop(1);
};
};
} else {
if ((((themeMod == 0)) && ((userType == 0)))){
mcGameOver.mcPumpa.gotoAndStop(1);
};
};
ticksLeft = (TICKS_PER_SEC * 11);
gameState = STATE_END_GAME;
if (relaxGame){
_local12.visible = false;
mcGameOver.mcPink.mcFlimmer.visible = false;
};
}
public function musicButtonClicked(_arg1:Event){
if (musicOn){
musicManager.fadeTo(0, 500);
mcMusic.gotoAndStop(10);
musicOn = false;
mcGame.musicOn = false;
} else {
musicManager.fadeTo(1, 500);
mcMusic.gotoAndStop(1);
musicOn = true;
mcGame.musicOn = true;
};
}
public function setTheme(_arg1:Number):void{
themeMod = _arg1;
if (themeMod == 0){
mcGame = new GameNormal();
mcIntro = new IntroNormal();
mcGameOver = new GameOverNormal();
mcGameOverHolder.addChild(mcGameOver);
mcGameOver.x = 123;
mcGameOver.y = -67;
} else {
mcGame = new GameHalloween();
mcIntro = new IntroHalloween();
mcGameOver = new GameOverHalloween();
mcGameOverHolder.addChild(mcGameOver);
mcGameOver.x = 377;
mcGameOver.y = 300;
};
mcGameHolder.addChild(mcGame);
mcIntroHolder.addChild(mcIntro);
mcGame.mcBlueBar.gotoAndStop(1);
mcGame.mcPinkBar.gotoAndStop(1);
mcGame.mcTime.gotoAndStop(1);
mcIntro.mcTimeLine.stop();
mcIntro.x = 377;
mcIntro.y = 299;
themeDataSetup();
showInfoScreen();
}
private function drive(_arg1:Event){
if (firstFrame){
firstFrame = false;
};
m_mainTimer.advanceTime2();
}
public function quitButtonClicked(_arg1:Event){
}
public function render(_arg1:Number, _arg2:Number):void{
var a:*;
var tick = _arg1;
var alpha = _arg2;
try {
musicManager.update();
sfxManager.update();
if (noOfRend == 0){
startTime = getTimer();
};
noOfRend++;
a = (getTimer() - startTime);
if (a > 2000){
txtFPS.text = String(Math.round(((noOfRend * 1000) / a)));
noOfRend = 0;
};
switch (gameState){
case STATE_SHOW_INFO_SCREEN:
mcIntro.mcTimeLine.gotoAndStop(introAnimAt);
break;
case STATE_SHOW_RECORD:
mcPostIt.gotoAndStop(ticksLeft);
break;
case STATE_PLAY_GAME:
mcGame.render(tick, alpha);
break;
case STATE_END_GAME:
if (!animDone){
mcGameOver.mcPink.gotoAndStop(gameOverAnim);
if (gameOverAnim > 90){
animDone = true;
};
};
mcGameOver.mcBlue.gotoAndStop(gameOverAnim);
mcGameOver.mcBG.gotoAndStop(gameOverAnim);
break;
};
} catch(e) {
trace("Error in render()");
trace(e);
trace(("gameState " + gameState));
trace(("mcGame " + mcGame));
trace("");
};
}
public function outroPressed(_arg1:Event){
if ((((gameState == STATE_END_GAME)) && ((ticksLeft < 225)))){
if (!pressedGO){
gameOverAnim = 125;
pressedGO = true;
} else {
ticksLeft = 1;
};
};
}
public function showThemeSelectionsScreen():void{
mcThemeSelection = new ThemeSelection(themeUnlocked, this);
mcThemeSelection.x = 377;
mcThemeSelection.y = 300;
addChild(mcThemeSelection);
if (Number(parsedGameData.records["gamesPlayed"]) >= THEME_NEEDED){
mcThemeSelection.txtPlayToUnlock.text = "";
mcThemeSelection.mcArrow.visible = false;
} else {
mcThemeSelection.txtPlayToUnlock.text = parsedGameData.textMappings["txtPlayToUnlock"];
};
mcThemeSelection.txtChooseTheme.text = parsedGameData.textMappings["txtChooseTheme"];
ticksLeft = (TICKS_PER_SEC * 10);
gameState = STATE_SHOW_THEME_SELECTION_SCREEN;
}
public function tick(_arg1:Number):void{
currentTick = _arg1;
switch (gameState){
case STATE_SHOW_THEME_SELECTION_SCREEN:
mcThemeSelection.txtThemeStartsIn.text = parsedGameData.textMappings["txtThemeStartsIn"].split("[0]").join(("" + Math.round((ticksLeft / TICKS_PER_SEC))));
ticksLeft = (ticksLeft - 1);
if (ticksLeft == 0){
if (((!((themeMod == 0))) && (!((themeMod == 1))))){
setTheme(0);
};
};
break;
case STATE_SHOW_INFO_SCREEN:
ticksLeft = (ticksLeft - 1);
introAnimAt++;
if (introAnimAt < 101){
mcIntro.mcTimeLine.txtText.text = parsedGameData.textMappings["intro1"];
} else {
if (introAnimAt < 245){
mcIntro.mcTimeLine.txtText.text = parsedGameData.textMappings["intro2"];
} else {
if (introAnimAt < 365){
mcIntro.mcTimeLine.txtText.text = parsedGameData.textMappings["intro3"];
} else {
if (introAnimAt < 530){
mcIntro.mcTimeLine.txtText.text = parsedGameData.textMappings["intro4"];
};
};
};
};
mcIntro.txtGameStartsIn.text = parsedGameData.textMappings["txtGameStartsIn"].split("[0]").join(("" + Math.round((ticksLeft / TICKS_PER_SEC))));
if (ticksLeft <= 0){
trace("killing intro");
mcIntroHolder.removeChild(mcIntro);
showRecord();
};
break;
case STATE_SHOW_RECORD:
ticksLeft = (ticksLeft + 1);
if (relaxGame){
ticksLeft = 65;
};
if (ticksLeft == 65){
startRound();
};
break;
case STATE_PLAY_GAME:
mcGame.tick(_arg1);
break;
case STATE_END_GAME:
ticksLeft = (ticksLeft - 1);
gameOverAnim++;
if ((((ticksLeft == ((TICKS_PER_SEC * 10) - 50))) && (!(mPlayed)))){
musicManager.get("Outro").play();
};
if (ticksLeft == 0){
gamePreQuit();
};
break;
case STATE_NOT_RUNNING:
break;
case STATE_PRE_QUIT:
ticksLeft--;
if (ticksLeft == 0){
gameQuit();
};
break;
};
}
public function showInfoScreen():void{
musicManager.get("Intro").play();
if (userType != 0){
removeChild(mcThemeSelection);
};
ticksLeft = (TICKS_PER_SEC * 28);
gameState = STATE_SHOW_INFO_SCREEN;
}
public function showRecord(){
ticksLeft = 0;
gameState = STATE_SHOW_RECORD;
}
public function addGlow(_arg1){
var _local2:GlowFilter = new GlowFilter();
_local2.color = 16777164;
_local2.blurY = 10;
_local2.blurX = 10;
_local2.strength = 3;
_local2.quality = 2;
_arg1.filters = [_local2];
}
public function openGameEnd(_arg1, _arg2, _arg3):void{
ticksLeft = (10 * TICKS_PER_SEC);
gameState = STATE_END_GAME;
}
public function endGamePressed(_arg1:Event):void{
trace("endGamePressed");
if ((((gameState == STATE_SHOW_INFO_SCREEN)) || ((gameState == STATE_SHOW_RECORD)))){
endGame(false, 0, 0, 0, 0);
} else {
if (gameState != STATE_END_GAME){
mcGame.endGame(false);
};
};
}
}
}//package src
Section 85
//Piece (src.Piece)
package src {
import src.timing.*;
import flash.events.*;
import flash.display.*;
public class Piece extends MovieClip {
public var posX;
public var posY;
public var theX;
public var theY;
public var state;// = 1
public var target;
public var mcFrame1:MovieClip;
public var mcFrame2:MovieClip;
public var mcFrame3:MovieClip;
private var firstTime;// = true
public var mcPieceColWhite:MovieClip;
public var animAt;// = 1
public var mcBonus1:MovieClip;
public var mcBonus2:MovieClip;
public var mcBonus3:MovieClip;
public var mcBonus4:MovieClip;
public var marked;// = false
private var frameArr:Array;
private var currentTick;
public var collapsing;
public var type;
public var mcBonus1h:MovieClip;
public var speed;// = 1
public var cE;// = false
public var gotoX;
public var rot;// = 0
public var gotoY;
public var exploding;// = false
public var mcBonus2h:MovieClip;
public var id;
public var mcPieceColBlue:MovieClip;
public var cfh;// = false
private var theme;
public var frameTarget;
private var game;
public var cfv;// = false
public var blaj;// = false
public var mcPieceColGreen:MovieClip;
public var mcPieceColPink:MovieClip;
private static var WIDTH = 39;
private static var HEIGHT = 53;
private static var MAX_SPEED = 40;
public function Piece(){
frameArr = new Array();
super();
addFrameScript(0, frame1);
addEventListener(MouseEvent.MOUSE_DOWN, pieceClicked);
addEventListener(MouseEvent.ROLL_OVER, mouseOver);
}
public function unMark(){
marked = false;
mcFrame1.mcTopFrame.visible = false;
mcFrame1.mcTopFrame.gotoAndStop(1);
mcFrame1.mcRightFrame.visible = false;
mcFrame1.mcRightFrame.gotoAndStop(1);
mcFrame1.mcBottomFrame.visible = false;
mcFrame1.mcBottomFrame.gotoAndStop(1);
mcFrame1.mcLeftFrame.visible = false;
mcFrame1.mcLeftFrame.gotoAndStop(1);
mcFrame2.mcTopFrame.visible = false;
mcFrame2.mcTopFrame.gotoAndStop(1);
mcFrame2.mcRightFrame.visible = false;
mcFrame2.mcRightFrame.gotoAndStop(1);
mcFrame2.mcBottomFrame.visible = false;
mcFrame2.mcBottomFrame.gotoAndStop(1);
mcFrame2.mcLeftFrame.visible = false;
mcFrame2.mcLeftFrame.gotoAndStop(1);
mcFrame3.mcTopFrame.visible = false;
mcFrame3.mcTopFrame.gotoAndStop(1);
mcFrame3.mcRightFrame.visible = false;
mcFrame3.mcRightFrame.gotoAndStop(1);
mcFrame3.mcBottomFrame.visible = false;
mcFrame3.mcBottomFrame.gotoAndStop(1);
mcFrame3.mcLeftFrame.visible = false;
mcFrame3.mcLeftFrame.gotoAndStop(1);
firstTime = false;
}
function frame1(){
stop();
}
public function render(_arg1:Number, _arg2:Number):void{
}
public function init(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7):void{
this.theme = _arg7;
speed = 1;
marked = false;
cfv = false;
cfh = false;
state = 1;
animAt = 1;
exploding = false;
blaj = false;
cE = false;
rot = 0;
collapsing = _arg5;
if (collapsing){
x = ((_arg2 * WIDTH) + 105);
y = -100;
} else {
x = ((_arg2 * WIDTH) + 105);
y = ((_arg1 * HEIGHT) + 90);
};
posX = _arg2;
posY = _arg1;
theX = x;
theY = y;
gotoX = ((_arg2 * WIDTH) + 105);
gotoY = ((_arg1 * HEIGHT) + 90);
this.type = _arg3;
this.game = _arg4;
this.id = _arg6;
mcPieceColPink.gotoAndStop(1);
mcPieceColBlue.gotoAndStop(1);
mcPieceColGreen.gotoAndStop(1);
mcPieceColWhite.gotoAndStop(1);
mcPieceColBlue.visible = false;
mcPieceColPink.visible = false;
mcPieceColWhite.visible = false;
mcPieceColGreen.visible = false;
mcBonus1.visible = false;
mcBonus1.stop();
mcBonus2.visible = false;
mcBonus2.stop();
mcBonus3.visible = false;
mcBonus3.stop();
mcBonus4.visible = false;
mcBonus4.stop();
mcBonus1h.visible = false;
mcBonus2h.visible = false;
switch (_arg3){
case 0:
if (_arg7 == 0){
target = mcPieceColBlue;
target.visible = true;
} else {
target = mcPieceColWhite;
target.visible = true;
};
break;
case 1:
if (_arg7 == 0){
target = mcPieceColPink;
target.visible = true;
} else {
target = mcPieceColGreen;
target.visible = true;
};
break;
case 2:
if (_arg7 == 0){
target = mcBonus1;
} else {
target = mcBonus1h;
};
target.visible = true;
break;
case 3:
if (_arg7 == 0){
target = mcBonus2;
} else {
target = mcBonus2h;
};
target.visible = true;
break;
case 4:
target = mcBonus3;
target.visible = true;
break;
case 5:
target = mcBonus4;
target.visible = true;
break;
};
visible = true;
var _local8:* = 0;
while (_local8 < frameArr.length) {
frameArr[_local8].visible = false;
frameArr[_local8].gotoAndStop(1);
_local8++;
};
unMark();
}
public function mouseOver(_arg1:Event){
game.mouseOverPiece(this, true);
}
public function setFrame(_arg1, _arg2, _arg3, _arg4, _arg5){
switch (_arg5){
case 4:
frameTarget = mcFrame1;
break;
case 5:
frameTarget = mcFrame2;
break;
case 6:
frameTarget = mcFrame3;
break;
};
frameTarget.mcTopFrame.visible = _arg1;
if (_arg1 == 0){
frameTarget.mcTopFrame.gotoAndStop(1);
} else {
frameTarget.mcTopFrame.gotoAndPlay(1);
};
frameTarget.mcRightFrame.visible = _arg2;
if (_arg2 == 0){
frameTarget.mcRightFrame.gotoAndStop(1);
} else {
frameTarget.mcRightFrame.gotoAndPlay(1);
};
frameTarget.mcBottomFrame.visible = _arg3;
if (_arg3 == 0){
frameTarget.mcBottomFrame.gotoAndStop(1);
} else {
frameTarget.mcBottomFrame.gotoAndPlay(1);
};
frameTarget.mcLeftFrame.visible = _arg4;
if (_arg4 == 0){
frameTarget.mcLeftFrame.gotoAndStop(1);
} else {
frameTarget.mcLeftFrame.gotoAndPlay(1);
};
}
public function tick(_arg1:Number, _arg2:Number):void{
currentTick = _arg1;
}
public function mark(){
marked = true;
}
public function switchPiece(){
switch (type){
case 0:
if (theme == 0){
mcPieceColPink.visible = false;
mcPieceColBlue.visible = true;
target = mcPieceColBlue;
} else {
mcPieceColGreen.visible = false;
mcPieceColWhite.visible = true;
target = mcPieceColWhite;
};
break;
case 1:
if (theme == 0){
mcPieceColBlue.visible = false;
mcPieceColPink.visible = true;
target = mcPieceColPink;
} else {
mcPieceColWhite.visible = false;
mcPieceColGreen.visible = true;
target = mcPieceColGreen;
};
break;
};
}
public function pieceClicked(_arg1:Event){
game.pieceClicked(this);
}
public function goto(_arg1, _arg2){
posY = _arg1;
posX = _arg2;
gotoY = ((_arg1 * HEIGHT) + 90);
gotoX = ((_arg2 * WIDTH) + 105);
collapsing = true;
}
public function calcSpeed(){
speed = Math.min((speed * 2), MAX_SPEED);
}
}
}//package src
Section 86
//PinkBonusAnim (src.PinkBonusAnim)
package src {
import flash.display.*;
public class PinkBonusAnim extends MovieClip {
public var delay;
public var type;// = 1
public var animAt;// = 0
public function PinkBonusAnim(_arg1){
addFrameScript(0, frame1);
this.delay = (_arg1 * 10);
x = 42;
y = 548;
}
function frame1(){
stop();
}
}
}//package src
Section 87
//ScorePop (src.ScorePop)
package src {
import src.timing.*;
import flash.events.*;
import flash.display.*;
public class ScorePop extends MovieClip {
public var delay;
public var animAt;// = 1
private var currentTick;
public var animLength;// = 25
public var animGo;// = 1
public var mcScore:MovieClip;
public function ScorePop(){
addFrameScript(0, frame1);
}
public function render(_arg1:Number, _arg2:Number):void{
}
function frame1(){
stop();
}
public function init(_arg1, _arg2, _arg3, _arg4):void{
y = _arg2;
x = _arg3;
this.delay = _arg4;
width = (width * 2);
height = (height * 2);
mcScore.txtScore.text = _arg1;
visible = false;
this.mouseEnabled = false;
}
public function tick(_arg1:Number, _arg2:Number):void{
currentTick = _arg1;
}
}
}//package src
Section 88
//ThemeSelection (src.ThemeSelection)
package src {
import src.timing.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class ThemeSelection extends MovieClip {
public var txtChooseTheme:TextField;
public var txtPlayToUnlock:TextField;
private var unlocked:Boolean;
public var txtThemeStartsIn:TextField;
public var mcArrow:MovieClip;
private var gameRoot:JellySwelly;
public var mcTheme1:MovieClip;
public var mcTheme2:MovieClip;
public function ThemeSelection(_arg1:Boolean, _arg2:JellySwelly){
this.gameRoot = _arg2;
this.unlocked = _arg1;
mcTheme2.mcBat.visible = false;
if (_arg1){
mcTheme2.mcBat.visible = true;
mcTheme2.gotoAndStop(95);
};
setup();
}
public function theme2Selected(_arg1:Event){
if (unlocked){
mcTheme1.removeEventListener(MouseEvent.MOUSE_DOWN, theme1Selected);
mcTheme2.removeEventListener(MouseEvent.MOUSE_DOWN, theme2Selected);
gameRoot.setTheme(1);
};
}
public function theme2MouseOver(_arg1:Event){
mcTheme2.mcBat.mcBat.gotoAndPlay(2);
}
public function theme1MouseOver(_arg1:Event){
mcTheme1.gotoAndPlay(10);
}
public function theme1Selected(_arg1:Event){
mcTheme1.removeEventListener(MouseEvent.MOUSE_DOWN, theme1Selected);
mcTheme2.removeEventListener(MouseEvent.MOUSE_DOWN, theme2Selected);
gameRoot.setTheme(0);
}
public function theme1MouseOut(_arg1:Event){
mcTheme1.gotoAndStop(1);
}
public function theme2MouseOut(_arg1:Event){
mcTheme2.mcBat.mcBat.gotoAndStop(1);
}
public function setup(){
mcTheme1.addEventListener(MouseEvent.MOUSE_DOWN, theme1Selected);
mcTheme2.addEventListener(MouseEvent.MOUSE_DOWN, theme2Selected);
mcTheme1.addEventListener(MouseEvent.ROLL_OVER, theme1MouseOver);
mcTheme1.addEventListener(MouseEvent.ROLL_OUT, theme1MouseOut);
mcTheme2.addEventListener(MouseEvent.ROLL_OVER, theme2MouseOver);
mcTheme2.addEventListener(MouseEvent.ROLL_OUT, theme2MouseOut);
}
}
}//package src
Section 89
//WhiteBonusAnim (src.WhiteBonusAnim)
package src {
import flash.display.*;
public class WhiteBonusAnim extends MovieClip {
public var delay;
public var type;// = 1
public var animAt;// = 0
public function WhiteBonusAnim(_arg1){
addFrameScript(0, frame1);
this.delay = (_arg1 * 10);
x = 42;
y = 548;
}
function frame1(){
stop();
}
}
}//package src
Section 90
//BlueBoost (BlueBoost)
package {
import flash.media.*;
public dynamic class BlueBoost extends Sound {
}
}//package
Section 91
//BonusMode (BonusMode)
package {
import flash.media.*;
public dynamic class BonusMode extends Sound {
}
}//package
Section 92
//BoostMeter (BoostMeter)
package {
import flash.media.*;
public dynamic class BoostMeter extends Sound {
}
}//package
Section 93
//ExplosionLarge2 (ExplosionLarge2)
package {
import flash.media.*;
public dynamic class ExplosionLarge2 extends Sound {
}
}//package
Section 94
//ExplosionSmall1 (ExplosionSmall1)
package {
import flash.media.*;
public dynamic class ExplosionSmall1 extends Sound {
}
}//package
Section 95
//ExplosionSmall2 (ExplosionSmall2)
package {
import flash.media.*;
public dynamic class ExplosionSmall2 extends Sound {
}
}//package
Section 96
//GameLoop (GameLoop)
package {
import flash.media.*;
public dynamic class GameLoop extends Sound {
}
}//package
Section 97
//GameOverBad (GameOverBad)
package {
import flash.media.*;
public dynamic class GameOverBad extends Sound {
}
}//package
Section 98
//GameOverSplash (GameOverSplash)
package {
import flash.media.*;
public dynamic class GameOverSplash extends Sound {
}
}//package
Section 99
//Intro (Intro)
package {
import flash.media.*;
public dynamic class Intro extends Sound {
}
}//package
Section 100
//Outro (Outro)
package {
import flash.media.*;
public dynamic class Outro extends Sound {
}
}//package
Section 101
//PinkBoost (PinkBoost)
package {
import flash.media.*;
public dynamic class PinkBoost extends Sound {
}
}//package
Section 102
//ScorePopSound (ScorePopSound)
package {
import flash.media.*;
public dynamic class ScorePopSound extends Sound {
}
}//package
Section 103
//Selector (Selector)
package {
import flash.media.*;
public dynamic class Selector extends Sound {
}
}//package
Section 104
//StarBonus (StarBonus)
package {
import flash.media.*;
public dynamic class StarBonus extends Sound {
}
}//package
Section 105
//Swell (Swell)
package {
import flash.media.*;
public dynamic class Swell extends Sound {
}
}//package
Section 106
//TimeWarning (TimeWarning)
package {
import flash.media.*;
public dynamic class TimeWarning extends Sound {
}
}//package
Section 107
//Warning (Warning)
package {
import flash.media.*;
public dynamic class Warning extends Sound {
}
}//package