Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("6b4ca7f1", this, 10301, true);
Game.getInstance(this);
Frame 2
MochiAd.showPreGameAd({id:"6a7499107dbf578d", res:"515x386", background:15333119, color:4096978, outline:2641563, no_bg:true});
var _mochiads_game_id = "6a7499107dbf578d";
Frame 3
gdp.core.process.ProcessManager.getInstance().run();
Frame 4
gotoAndPlay (3);
Frame 10
msn.Zone.getInstance().sessionStart();
Frame 20
msn.Zone.getInstance().gameStart();
_root.txt.text = "game start";
Frame 29
msn.Zone.getInstance().gameContinue(this.GameContinueData);
Frame 40
msn.Zone.getInstance().muteOn();
_root.txt.text = "mute on";
Frame 47
msn.Zone.getInstance().muteOff();
_root.txt.text = "mute off";
Frame 54
msn.Zone.getInstance().pauseOn();
Frame 62
msn.Zone.getInstance().pauseOff();
Frame 70
msn.Zone.getInstance().gameMenu();
Frame 79
msn.Zone.getInstance().customReturn(this.CustomData);
Frame 92
stop();
Frame 102
stop();
Symbol 30 MovieClip [fairy] Frame 1
#initclip 212
Object.registerClass("fairy", elements.BrickExplosion);
#endinitclip
Symbol 39 MovieClip [witch_particle] Frame 1
#initclip 106
Object.registerClass("witch_particle", elements.BrickExplosion);
#endinitclip
Symbol 47 MovieClip [particle11] Frame 1
#initclip 107
Object.registerClass("particle11", elements.BrickExplosion);
#endinitclip
Symbol 65 MovieClip [particle3] Frame 1
#initclip 108
Object.registerClass("particle3", elements.BrickExplosion);
#endinitclip
Symbol 77 MovieClip [bombMushroom_particle] Frame 1
#initclip 109
Object.registerClass("bombMushroom_particle", elements.BrickExplosion);
#endinitclip
Symbol 92 MovieClip [fairy_particle] Frame 1
#initclip 110
Object.registerClass("fairy_particle", elements.BrickExplosion);
#endinitclip
Symbol 102 MovieClip [mushroom_particle] Frame 1
#initclip 111
Object.registerClass("mushroom_particle", elements.BrickExplosion);
#endinitclip
Symbol 116 MovieClip [glass_particle] Frame 1
#initclip 112
Object.registerClass("glass_particle", elements.BrickExplosion);
#endinitclip
Symbol 128 MovieClip [particle5] Frame 1
#initclip 113
Object.registerClass("particle5", elements.BrickExplosion);
#endinitclip
Symbol 140 MovieClip [cauldron_particle] Frame 1
#initclip 114
Object.registerClass("cauldron_particle", elements.BrickExplosion);
#endinitclip
Symbol 157 MovieClip [particle6] Frame 1
#initclip 115
Object.registerClass("particle6", elements.BrickExplosion);
#endinitclip
Symbol 165 MovieClip [particle8] Frame 1
#initclip 116
Object.registerClass("particle8", elements.BrickExplosion);
#endinitclip
Symbol 184 MovieClip [particle7] Frame 1
#initclip 117
Object.registerClass("particle7", elements.BrickExplosion);
#endinitclip
Symbol 200 MovieClip [particle4] Frame 1
#initclip 118
Object.registerClass("particle4", elements.BrickExplosion);
#endinitclip
Symbol 217 MovieClip [particle1] Frame 1
#initclip 119
Object.registerClass("particle1", elements.BrickExplosion);
#endinitclip
Symbol 236 MovieClip [particle0] Frame 1
#initclip 120
Object.registerClass("particle0", elements.BrickExplosion);
#endinitclip
Symbol 265 MovieClip Frame 1
stop();
Symbol 265 MovieClip Frame 2
stop();
Symbol 266 MovieClip [mc_GameWindow] Frame 1
#initclip 121
Object.registerClass("mc_GameWindow", windows.GameWindow);
#endinitclip
Symbol 273 MovieClip Frame 1
stop();
Symbol 273 MovieClip Frame 100
stop();
Symbol 287 MovieClip Frame 1
stop();
Symbol 287 MovieClip Frame 2
stop();
Symbol 292 MovieClip Frame 1
stop();
Symbol 292 MovieClip Frame 2
stop();
Symbol 297 MovieClip Frame 1
stop();
Symbol 297 MovieClip Frame 2
stop();
Symbol 302 MovieClip Frame 1
stop();
Symbol 302 MovieClip Frame 2
stop();
Symbol 307 MovieClip Frame 1
stop();
Symbol 307 MovieClip Frame 2
stop();
Symbol 309 MovieClip [mc_ChainBallLocks] Frame 1
stop();
Symbol 309 MovieClip [mc_ChainBallLocks] Frame 2
stop();
Symbol 314 MovieClip [brick2] Frame 1
#initclip 122
Object.registerClass("brick2", elements.Brick);
#endinitclip
stop();
Symbol 314 MovieClip [brick2] Frame 2
stop();
Symbol 319 MovieClip [brick1] Frame 1
#initclip 123
Object.registerClass("brick1", elements.Brick);
#endinitclip
stop();
Symbol 319 MovieClip [brick1] Frame 2
stop();
Symbol 324 MovieClip [brick3] Frame 1
#initclip 124
Object.registerClass("brick3", elements.Brick);
#endinitclip
stop();
Symbol 324 MovieClip [brick3] Frame 2
stop();
Symbol 329 MovieClip [brick4] Frame 1
#initclip 125
Object.registerClass("brick4", elements.Brick);
#endinitclip
stop();
Symbol 329 MovieClip [brick4] Frame 2
stop();
Symbol 334 MovieClip [brick5] Frame 1
#initclip 126
Object.registerClass("brick5", elements.Brick);
#endinitclip
stop();
Symbol 334 MovieClip [brick5] Frame 2
stop();
Symbol 337 MovieClip [brick11] Frame 1
#initclip 127
Object.registerClass("brick11", elements.Brick);
#endinitclip
stop();
Symbol 340 MovieClip [brick26] Frame 1
#initclip 128
Object.registerClass("brick26", elements.Brick);
#endinitclip
stop();
Symbol 343 MovieClip [brick25] Frame 1
#initclip 129
Object.registerClass("brick25", elements.Brick);
#endinitclip
stop();
Symbol 346 MovieClip [brick24] Frame 1
#initclip 130
Object.registerClass("brick24", elements.Brick);
#endinitclip
stop();
Symbol 349 MovieClip [brick23] Frame 1
#initclip 131
Object.registerClass("brick23", elements.Brick);
#endinitclip
stop();
Symbol 352 MovieClip [brick22] Frame 1
#initclip 132
Object.registerClass("brick22", elements.Brick);
#endinitclip
stop();
Symbol 355 MovieClip [brick21] Frame 1
#initclip 133
Object.registerClass("brick21", elements.Brick);
#endinitclip
stop();
Symbol 358 MovieClip [brick48] Frame 1
#initclip 134
Object.registerClass("brick48", elements.Brick);
#endinitclip
stop();
Symbol 361 MovieClip [brick49] Frame 1
#initclip 135
Object.registerClass("brick49", elements.Brick);
#endinitclip
stop();
Symbol 364 MovieClip [brick55] Frame 1
#initclip 136
Object.registerClass("brick55", elements.Brick);
#endinitclip
stop();
Symbol 367 MovieClip [brick56] Frame 1
#initclip 137
Object.registerClass("brick56", elements.Brick);
#endinitclip
stop();
Symbol 370 MovieClip [brick59] Frame 1
#initclip 138
Object.registerClass("brick59", elements.Brick);
#endinitclip
stop();
Symbol 373 MovieClip [brick60] Frame 1
#initclip 139
Object.registerClass("brick60", elements.Brick);
#endinitclip
stop();
Symbol 376 MovieClip [brick61] Frame 1
#initclip 140
Object.registerClass("brick61", elements.Brick);
#endinitclip
stop();
Symbol 379 MovieClip [brick62] Frame 1
#initclip 141
Object.registerClass("brick62", elements.Brick);
#endinitclip
stop();
Symbol 382 MovieClip [brick63] Frame 1
#initclip 142
Object.registerClass("brick63", elements.Brick);
#endinitclip
stop();
Symbol 385 MovieClip [brick64] Frame 1
#initclip 143
Object.registerClass("brick64", elements.Brick);
#endinitclip
stop();
Symbol 388 MovieClip [brick65] Frame 1
#initclip 144
Object.registerClass("brick65", elements.Brick);
#endinitclip
stop();
Symbol 391 MovieClip [brick66] Frame 1
#initclip 145
Object.registerClass("brick66", elements.Brick);
#endinitclip
stop();
Symbol 394 MovieClip [brick70] Frame 1
#initclip 146
Object.registerClass("brick70", elements.Brick);
#endinitclip
stop();
Symbol 397 MovieClip [brick82] Frame 1
#initclip 147
Object.registerClass("brick82", elements.Brick);
#endinitclip
stop();
Symbol 400 MovieClip [brick83] Frame 1
#initclip 148
Object.registerClass("brick83", elements.Brick);
#endinitclip
stop();
Symbol 403 MovieClip [brick84] Frame 1
#initclip 149
Object.registerClass("brick84", elements.Brick);
#endinitclip
stop();
Symbol 406 MovieClip [brick85] Frame 1
#initclip 150
Object.registerClass("brick85", elements.Brick);
#endinitclip
stop();
Symbol 409 MovieClip [brick97] Frame 1
#initclip 151
Object.registerClass("brick97", elements.Brick);
#endinitclip
stop();
Symbol 412 MovieClip [brick98] Frame 1
#initclip 152
Object.registerClass("brick98", elements.Brick);
#endinitclip
stop();
Symbol 415 MovieClip [brick106] Frame 1
#initclip 153
Object.registerClass("brick106", elements.Brick);
#endinitclip
stop();
Symbol 418 MovieClip [brick107] Frame 1
#initclip 154
Object.registerClass("brick107", elements.Brick);
#endinitclip
stop();
Symbol 421 MovieClip [brick105] Frame 1
#initclip 155
Object.registerClass("brick105", elements.Brick);
#endinitclip
stop();
Symbol 424 MovieClip [brick10] Frame 1
#initclip 156
Object.registerClass("brick10", elements.Brick);
#endinitclip
stop();
Symbol 429 MovieClip [brick18] Frame 1
#initclip 157
Object.registerClass("brick18", elements.Brick);
#endinitclip
stop();
Symbol 429 MovieClip [brick18] Frame 2
stop();
Symbol 434 MovieClip [brick17] Frame 1
#initclip 158
Object.registerClass("brick17", elements.Brick);
#endinitclip
stop();
Symbol 434 MovieClip [brick17] Frame 2
stop();
Symbol 439 MovieClip [brick29] Frame 1
#initclip 159
Object.registerClass("brick29", elements.Brick);
#endinitclip
stop();
Symbol 439 MovieClip [brick29] Frame 2
stop();
Symbol 444 MovieClip [brick30] Frame 1
#initclip 160
Object.registerClass("brick30", elements.Brick);
#endinitclip
stop();
Symbol 444 MovieClip [brick30] Frame 2
stop();
Symbol 449 MovieClip [brick31] Frame 1
#initclip 161
Object.registerClass("brick31", elements.Brick);
#endinitclip
stop();
Symbol 449 MovieClip [brick31] Frame 2
stop();
Symbol 454 MovieClip [brick32] Frame 1
#initclip 162
Object.registerClass("brick32", elements.Brick);
#endinitclip
stop();
Symbol 454 MovieClip [brick32] Frame 2
stop();
Symbol 459 MovieClip [brick33] Frame 1
#initclip 163
Object.registerClass("brick33", elements.Brick);
#endinitclip
stop();
Symbol 459 MovieClip [brick33] Frame 2
stop();
Symbol 464 MovieClip [brick34] Frame 1
#initclip 164
Object.registerClass("brick34", elements.Brick);
#endinitclip
stop();
Symbol 464 MovieClip [brick34] Frame 2
stop();
Symbol 469 MovieClip [brick35] Frame 1
#initclip 165
Object.registerClass("brick35", elements.Brick);
#endinitclip
stop();
Symbol 469 MovieClip [brick35] Frame 2
stop();
Symbol 474 MovieClip [brick36] Frame 1
#initclip 166
Object.registerClass("brick36", elements.Brick);
#endinitclip
stop();
Symbol 474 MovieClip [brick36] Frame 2
stop();
Symbol 479 MovieClip [brick37] Frame 1
#initclip 167
Object.registerClass("brick37", elements.Brick);
#endinitclip
stop();
Symbol 479 MovieClip [brick37] Frame 2
stop();
Symbol 484 MovieClip [brick38] Frame 1
#initclip 168
Object.registerClass("brick38", elements.Brick);
#endinitclip
stop();
Symbol 484 MovieClip [brick38] Frame 2
stop();
Symbol 489 MovieClip [brick39] Frame 1
#initclip 169
Object.registerClass("brick39", elements.Brick);
#endinitclip
stop();
Symbol 489 MovieClip [brick39] Frame 2
stop();
Symbol 494 MovieClip [brick40] Frame 1
#initclip 170
Object.registerClass("brick40", elements.Brick);
#endinitclip
stop();
Symbol 494 MovieClip [brick40] Frame 2
stop();
Symbol 499 MovieClip [brick41] Frame 1
#initclip 171
Object.registerClass("brick41", elements.Brick);
#endinitclip
stop();
Symbol 499 MovieClip [brick41] Frame 2
stop();
Symbol 504 MovieClip [brick42] Frame 1
#initclip 172
Object.registerClass("brick42", elements.Brick);
#endinitclip
stop();
Symbol 504 MovieClip [brick42] Frame 2
stop();
Symbol 509 MovieClip [brick43] Frame 1
#initclip 173
Object.registerClass("brick43", elements.Brick);
#endinitclip
stop();
Symbol 509 MovieClip [brick43] Frame 2
stop();
Symbol 514 MovieClip [brick69] Frame 1
#initclip 174
Object.registerClass("brick69", elements.Brick);
#endinitclip
stop();
Symbol 514 MovieClip [brick69] Frame 2
stop();
Symbol 525 MovieClip [brick75] Frame 1
#initclip 175
Object.registerClass("brick75", elements.Brick);
#endinitclip
stop();
Symbol 532 MovieClip [brick96] Frame 1
#initclip 176
Object.registerClass("brick96", elements.Brick);
#endinitclip
stop();
Symbol 532 MovieClip [brick96] Frame 2
stop();
Symbol 532 MovieClip [brick96] Frame 3
stop();
Symbol 539 MovieClip [brick81] Frame 1
#initclip 177
Object.registerClass("brick81", elements.Brick);
#endinitclip
stop();
Symbol 539 MovieClip [brick81] Frame 2
stop();
Symbol 539 MovieClip [brick81] Frame 3
stop();
Symbol 544 MovieClip [brick108] Frame 1
#initclip 178
Object.registerClass("brick108", elements.Brick);
#endinitclip
stop();
Symbol 544 MovieClip [brick108] Frame 2
stop();
Symbol 549 MovieClip [brick109] Frame 1
#initclip 179
Object.registerClass("brick109", elements.Brick);
#endinitclip
stop();
Symbol 549 MovieClip [brick109] Frame 2
stop();
Symbol 554 MovieClip [brick0] Frame 1
#initclip 180
Object.registerClass("brick0", elements.Brick);
#endinitclip
stop();
Symbol 554 MovieClip [brick0] Frame 2
stop();
Symbol 580 MovieClip [mc_CauldronStand] Frame 1
stop();
Symbol 580 MovieClip [mc_CauldronStand] Frame 2
stop();
Symbol 580 MovieClip [mc_CauldronStand] Frame 3
stop();
Symbol 580 MovieClip [mc_CauldronStand] Frame 4
stop();
Symbol 580 MovieClip [mc_CauldronStand] Frame 5
stop();
Symbol 580 MovieClip [mc_CauldronStand] Frame 6
stop();
Symbol 580 MovieClip [mc_CauldronStand] Frame 7
stop();
Symbol 580 MovieClip [mc_CauldronStand] Frame 8
stop();
Symbol 598 MovieClip [mc_CauldronHang] Frame 1
stop();
Symbol 598 MovieClip [mc_CauldronHang] Frame 2
play();
Symbol 598 MovieClip [mc_CauldronHang] Frame 112
gotoAndPlay (2);
Symbol 615 MovieClip [mc_CoinPot] Frame 1
stop();
Symbol 615 MovieClip [mc_CoinPot] Frame 2
stop();
Symbol 615 MovieClip [mc_CoinPot] Frame 3
play();
Symbol 615 MovieClip [mc_CoinPot] Frame 113
gotoAndPlay (3);
Symbol 629 MovieClip [mc_Bonus] Frame 1
#initclip 181
Object.registerClass("mc_Bonus", elements.BonusContainer);
#endinitclip
Symbol 632 MovieClip [mc_Pad] Frame 1
#initclip 182
Object.registerClass("mc_Pad", gameplay.Pad);
#endinitclip
Symbol 640 MovieClip [mc_Ball] Frame 1
#initclip 183
Object.registerClass("mc_Ball", gameplay.Ball);
#endinitclip
stop();
Symbol 640 MovieClip [mc_Ball] Frame 2
stop();
Symbol 640 MovieClip [mc_Ball] Frame 3
stop();
Symbol 664 MovieClip [mc_BallParticle] Frame 1
#initclip 184
Object.registerClass("mc_BallParticle", elements.Particle);
#endinitclip
Symbol 677 MovieClip [particle0_old] Frame 1
#initclip 185
Object.registerClass("particle0_old", elements.Particle);
#endinitclip
Symbol 690 MovieClip [particle1_old] Frame 1
#initclip 186
Object.registerClass("particle1_old", elements.Particle);
#endinitclip
Symbol 703 MovieClip [particle3_old] Frame 1
#initclip 187
Object.registerClass("particle3_old", elements.Particle);
#endinitclip
Symbol 716 MovieClip [particle4_old] Frame 1
#initclip 188
Object.registerClass("particle4_old", elements.Particle);
#endinitclip
Symbol 729 MovieClip [particle7_old] Frame 1
#initclip 189
Object.registerClass("particle7_old", elements.Particle);
#endinitclip
Symbol 742 MovieClip [particle8_old] Frame 1
#initclip 190
Object.registerClass("particle8_old", elements.Particle);
#endinitclip
Symbol 755 MovieClip [particle6_old] Frame 1
#initclip 191
Object.registerClass("particle6_old", elements.BrickExplosion);
#endinitclip
Symbol 760 MovieClip [cauldron_smoke_particle] Frame 1
#initclip 192
Object.registerClass("cauldron_smoke_particle", elements.Particle);
#endinitclip
Symbol 773 MovieClip [cauldron_particle_old] Frame 1
#initclip 193
Object.registerClass("cauldron_particle_old", elements.Particle);
#endinitclip
Symbol 782 MovieClip [glass_particle_old] Frame 1
#initclip 194
Object.registerClass("glass_particle_old", elements.Particle);
#endinitclip
Symbol 791 MovieClip [mushroom_particle_old] Frame 1
#initclip 195
Object.registerClass("mushroom_particle_old", elements.Particle);
#endinitclip
Symbol 802 MovieClip [mc_Bonus_7] Frame 1
#initclip 196
Object.registerClass("mc_Bonus_7", elements.Bonus);
#endinitclip
stop();
Symbol 802 MovieClip [mc_Bonus_7] Frame 2
stop();
Symbol 802 MovieClip [mc_Bonus_7] Frame 3
stop();
Symbol 802 MovieClip [mc_Bonus_7] Frame 4
stop();
Symbol 802 MovieClip [mc_Bonus_7] Frame 5
stop();
Symbol 806 MovieClip [mc_Bonus_21] Frame 1
#initclip 197
Object.registerClass("mc_Bonus_21", elements.Bonus);
#endinitclip
Symbol 809 MovieClip [mc_Bonus_20] Frame 1
#initclip 198
Object.registerClass("mc_Bonus_20", elements.Bonus);
#endinitclip
Symbol 813 MovieClip [mc_Bonus_12] Frame 1
#initclip 199
Object.registerClass("mc_Bonus_12", elements.Bonus);
#endinitclip
Symbol 816 MovieClip [mc_Bonus_11] Frame 1
#initclip 200
Object.registerClass("mc_Bonus_11", elements.Bonus);
#endinitclip
Symbol 817 MovieClip [mc_Bonus_2] Frame 1
#initclip 201
Object.registerClass("mc_Bonus_2", elements.Bonus);
#endinitclip
Symbol 818 MovieClip [mc_Bonus_1] Frame 1
#initclip 202
Object.registerClass("mc_Bonus_1", elements.Bonus);
#endinitclip
Symbol 819 MovieClip [mc_Bonus_0] Frame 1
#initclip 203
Object.registerClass("mc_Bonus_0", elements.Bonus);
#endinitclip
Symbol 828 MovieClip [mc_Coin] Frame 1
#initclip 204
Object.registerClass("mc_Coin", elements.Coin);
#endinitclip
Symbol 828 MovieClip [mc_Coin] Frame 28
gotoAndPlay (1);
Symbol 841 MovieClip [mc_RedLiquid] Frame 1
#initclip 205
Object.registerClass("mc_RedLiquid", elements.RedLiquid);
#endinitclip
stop();
Symbol 841 MovieClip [mc_RedLiquid] Frame 2
stop();
Symbol 841 MovieClip [mc_RedLiquid] Frame 3
stop();
Symbol 841 MovieClip [mc_RedLiquid] Frame 4
stop();
Symbol 841 MovieClip [mc_RedLiquid] Frame 5
stop();
Symbol 841 MovieClip [mc_RedLiquid] Frame 6
stop();
Symbol 856 MovieClip [mc_Spark] Frame 1
#initclip 206
Object.registerClass("mc_Spark", elements.Spark);
#endinitclip
Symbol 865 MovieClip [mc_Drop] Frame 1
#initclip 207
Object.registerClass("mc_Drop", elements.DevilDrop);
#endinitclip
Symbol 870 MovieClip [mc_Frog] Frame 1
#initclip 208
Object.registerClass("mc_Frog", elements.Frog);
#endinitclip
stop();
Symbol 870 MovieClip [mc_Frog] Frame 2
stop();
Symbol 888 MovieClip [mc_ChainBall] Frame 1
#initclip 209
Object.registerClass("mc_ChainBall", gameplay.Chainball);
#endinitclip
Symbol 902 MovieClip Frame 1
stop();
Symbol 906 MovieClip [padInscription] Frame 1
#initclip 210
Object.registerClass("padInscription", elements.BrickExplosion);
#endinitclip
Symbol 936 MovieClip Frame 1
play();
Symbol 936 MovieClip Frame 30
gotoAndPlay (1);
Symbol 936 MovieClip Frame 31
play();
Symbol 936 MovieClip Frame 60
gotoAndPlay (31);
Symbol 936 MovieClip Frame 61
play();
Symbol 936 MovieClip Frame 90
gotoAndPlay (61);
Symbol 936 MovieClip Frame 91
play();
Symbol 936 MovieClip Frame 120
gotoAndPlay (91);
Symbol 937 MovieClip [mc_Fairy] Frame 1
#initclip 211
Object.registerClass("mc_Fairy", elements.Fairy);
#endinitclip
Symbol 949 MovieClip [mc_HighScoresWindow] Frame 1
stop();
Symbol 949 MovieClip [mc_HighScoresWindow] Frame 2
stop();
Symbol 949 MovieClip [mc_HighScoresWindow] Frame 3
stop();
Symbol 949 MovieClip [mc_HighScoresWindow] Frame 4
stop();
Symbol 960 MovieClip [mc_HelpWindow] Frame 1
stop();
Symbol 960 MovieClip [mc_HelpWindow] Frame 2
stop();
Symbol 975 MovieClip [mc_Upsell] Frame 1
stop();
Symbol 975 MovieClip [mc_Upsell] Frame 2
stop();
Symbol 997 MovieClip Frame 1
stop();
Symbol 997 MovieClip Frame 2
stop();
Symbol 997 MovieClip Frame 3
play();
Symbol 997 MovieClip Frame 111
gotoAndPlay (3);
Symbol 1015 MovieClip [__Packages.gdp.core.base.SimpleClass] Frame 0
class gdp.core.base.SimpleClass
{
function SimpleClass () {
nClassId = nClassCounter++;
}
function description() {
return(getClassNameWithPackage());
}
function toString() {
return(description.apply(this, arguments));
}
function getClass() {
return(gdp.env.reflect.ClassInfo.forInstance(this).getType());
}
function getClassName(Void) {
return(gdp.env.reflect.ClassInfo.forInstance(this).getName());
}
function getPackageName(Void) {
return(gdp.env.reflect.ClassInfo.forInstance(this).getPackage().getName());
}
function getClassNameWithPackage(Void) {
return(gdp.env.reflect.ClassInfo.forInstance(this).getFullName());
}
function isEqual(anObject) {
return(this == anObject);
}
function memberWiseClone() {
var _local2 = new Object();
var _local4 = getClass();
_local2.__proto__ = _local4.prototype;
_local2.__constructor__ = _local4;
_local4.apply(_local2);
for (var _local3 in this) {
_local2[_local3] = this[_local3];
}
return(gdp.core.base.BaseClass(_local2));
}
static var nClassCounter = 0;
var nClassId = 0;
}
Symbol 1016 MovieClip [__Packages.gdp.env.events.IEventDispatcher] Frame 0
interface gdp.env.events.IEventDispatcher
{
}
Symbol 1017 MovieClip [__Packages.gdp.env.events.Event] Frame 0
class gdp.env.events.Event extends gdp.core.base.SimpleClass
{
var getClass, getClassName;
function Event (sType, bBubbles, bCancelable) {
super();
this.sType = sType;
if (bBubbles != null) {
this.bBubbles = bBubbles;
}
if (bCancelable != null) {
this.bCancelable = bCancelable;
}
}
function isBubbles(Void) {
return(bBubbles);
}
function isCancelable(Void) {
return(bCancelable);
}
function getCurrentTarget(Void) {
return(oCurrentTarget);
}
function getEventPhase(Void) {
return(nEventPhase);
}
function getTarget(Void) {
return(oTarget);
}
function getType(Void) {
return(sType);
}
function clone(Void) {
return(gdp.env.events.Event(gdp.utils.ClassUtil.createInstance(getClass(), [sType, bBubbles, bCancelable])));
}
function isDefaultPrevented(Void) {
return(null);
}
function preventDefault(Void) {
}
function stopImmediatePropagation(Void) {
}
function stopPropagation(Void) {
}
function description(Void) {
var _local2 = {type:sType, bubbles:bBubbles, cancelable:bCancelable, currentTarget:oCurrentTarget.toString(), eventPhase:nEventPhase, target:oTarget.toString()};
return(getClassName() + gdp.utils.ObjectUtil.classToString(_local2, true));
}
static var ACTIVATE = "activate";
static var ADDED = "added";
static var CANCEL = "cancel";
static var CHANGE = "change";
static var CLOSE = "close";
static var COMPLETE = "complete";
static var CONNECT = "connect";
static var DEACTIVATE = "deactivate";
static var ENTER_FRAME = "enterFrame";
static var ID3 = "id3";
static var INIT = "init";
static var MOUSE_LEAVE = "mouseLeave";
static var OPEN = "open";
static var REMOVED = "removed";
static var RENDER = "render";
static var RESIZE = "resize";
static var SCROLL = "scroll";
static var SELECT = "select";
static var SOUND_COMPLETE = "soundComplete";
static var TAB_CHILDREN_CHANGE = "tabChildrenChange";
static var TAB_ENABLED_CHANGE = "tabEnabledChange";
static var TAB_INDEX_CHANGE = "tabIndexChange";
static var UNLOAD = "unload";
var bBubbles = false;
var bCancelable = false;
var oCurrentTarget = null;
var nEventPhase = null;
var oTarget = null;
var sType = null;
}
Symbol 1018 MovieClip [__Packages.gdp.utils.ClassUtil] Frame 0
class gdp.utils.ClassUtil extends gdp.core.base.BaseClass
{
function ClassUtil () {
super();
}
static function isSubClassOf(subClass, superClass) {
var _local1 = subClass.prototype;
while (!(_local1 === undefined)) {
_local1 = _local1.__proto__;
if (_local1 === superClass.prototype) {
return(true);
}
}
return(false);
}
static function isImplementationOf(clazz, interfaze) {
var _local2 = clazz.prototype;
if (isSubClassOf(clazz, interfaze)) {
return(false);
}
return(createCleanInstance(clazz) instanceof interfaze);
}
static function createCleanInstance(clazz) {
var _local1 = new Object();
_local1.__proto__ = clazz.prototype;
_local1.__constructor__ = clazz;
return(_local1);
}
static function createInstance(clazz, args) {
if (!clazz) {
return(null);
}
var _local1 = new Object();
_local1.__proto__ = clazz.prototype;
_local1.__constructor__ = clazz;
clazz.apply(_local1, args);
return(_local1);
}
static function applyConstructor(clazz, result, args) {
if ((!clazz) || (!result)) {
return(undefined);
}
clazz.apply(result, args);
}
}
Symbol 1019 MovieClip [__Packages.gdp.utils.ObjectUtil] Frame 0
class gdp.utils.ObjectUtil
{
function ObjectUtil () {
}
static function classToString(oClass, bNotWrap) {
if (oClass == undefined) {
return("{}");
}
var _local4 = ((!bNotWrap) ? newline : "");
var _local2 = getPrimitivesOnly(oClass);
var _local1 = 0;
while (_local1 < _local2.length) {
var _local3 = ((_local1 == 0) ? "{" : ", ") + ((!bNotWrap) ? "\n\t" : "");
if (_local2[_local1].data instanceof String) {
_local4 = _local4 + ((((_local3 + _local2[_local1].sName) + ":\"") + _local2[_local1].data) + "\"");
} else if (_local2[_local1].data instanceof Array) {
_local4 = _local4 + ((((_local3 + _local2[_local1].sName) + ":[") + _local2[_local1].data) + "]");
} else {
_local4 = _local4 + (((_local3 + _local2[_local1].sName) + ":") + _local2[_local1].data);
}
_local1++;
}
_local4 = _local4 + ((_local4 == "") ? "{}" : (((!bNotWrap) ? "\n}" : "}")));
return(_local4);
}
static function clone(value) {
if (value.clone instanceof Function) {
return(value.clone());
}
var _local2 = new Object();
for (var _local3 in value) {
if (typeof(value[_local3]) == "object") {
_local2[_local3] = copy(value[_local3]);
} else {
_local2[_local3] = value[_local3];
}
}
return(_local2);
}
static function copy(value) {
return(clone(value));
}
static function mergeObjects(oParent, oChild, ow) {
var _local3;
var _local4;
for (var _local6 in oChild) {
_local3 = oParent[_local6] != undefined;
if (typeof(oChild[_local6].toString()) == "object") {
if (!_local3) {
oParent[_local6] = oChild[_local6];
}
_local4 = oParent[_local6];
_local4 = _local4.mergeObjects(oChild[_local6], ow);
} else {
if (!_local3) {
oParent[_local6] = oChild[_local6];
}
if (_local3 && (ow)) {
oParent[_local6] = oChild[_local6];
}
}
}
}
static function getPrimitivesOnly(oObject, aWithout) {
var _local3 = new Array();
for (var _local7 in oObject) {
if (gdp.utils.ArrayUtil.contains(aWithout, _local7)) {
continue;
}
var _local2 = {sName:_local7, data:oObject[_local7]};
switch (typeof(oObject[_local7])) {
case "string" :
case "boolean" :
case "number" :
_local3.push(_local2);
break;
case "object" :
if (oObject[_local7] instanceof Array) {
_local3.push(_local2);
} else {
if (oObject[_local7].toString() == "[object]") {
break;
}
_local3.push({sName:_local7, data:oObject[_local7].toString(true)});
}
}
}
return(_local3);
}
static function toXML(oData) {
var _local2 = "";
for (var _local3 in oData) {
if (typeof(oData[_local3]) == "object") {
_local2 = _local2 + (((((("<" + _local3) + ">") + toXML(oData[_local3])) + "</") + _local3) + ">");
} else if ((typeof(oData[_local3]) == "number") || (typeof(oData[_local3]) == "string")) {
_local2 = _local2 + (((((("<" + _local3) + ">") + oData[_local3]) + "</") + _local3) + ">");
} else if (oData[_local3] == undefined) {
_local2 = _local2 + (((("<" + _local3) + "></") + _local3) + ">");
}
}
return(new XML(_local2));
}
static function fromXML(xml) {
return(gdp.utils.XMLUtil.toObject(xml));
}
static function typesMatch(object, type) {
if (type === Object) {
return(true);
}
if (isPrimitiveType(object)) {
var _local2 = typeof(object);
if (((type === String) || (gdp.utils.ClassUtil.isSubClassOf(type, String))) && (_local2 == TYPE_STRING)) {
return(true);
}
if (((type === Boolean) || (gdp.utils.ClassUtil.isSubClassOf(type, Boolean))) && (_local2 == TYPE_BOOLEAN)) {
return(true);
}
if (((type === Number) || (gdp.utils.ClassUtil.isSubClassOf(type, Number))) && (_local2 == TYPE_NUMBER)) {
return(true);
}
return(false);
}
return(isInstanceOf(object, type));
}
static function isPrimitiveType(object) {
var _local1 = typeof(object);
return(((_local1 == TYPE_STRING) || (_local1 == TYPE_NUMBER)) || (_local1 == TYPE_BOOLEAN));
}
static function isTypeOf(object, type) {
return(typeof(object) == type);
}
static function isInstanceOf(object, type) {
if (type === Object) {
return(true);
}
return(object instanceof type);
}
static function isExplicitInstanceOf(object, clazz) {
if (clazz == String) {
return(typeof(object) == TYPE_STRING);
}
if (clazz == Number) {
return(typeof(object) == TYPE_NUMBER);
}
if (clazz == Boolean) {
return(typeof(object) == TYPE_BOOLEAN);
}
return((object instanceof clazz) && (!(object.__proto__ instanceof clazz)));
}
static function equals(valueA, valueB) {
if (isPrimitiveType(valueA) && (isPrimitiveType(valueB))) {
return(equalsPrimitive(valueA, valueB));
}
if ((!isPrimitiveType(valueA)) && (!isPrimitiveType(valueB))) {
if (((valueA.isEqual != null) && (valueB.isEqual != null)) && (valueA.isEqual(valueB))) {
return(true);
}
return(valueA == valueB);
}
return(false);
}
static function equalsPrimitive(valueA, valueB) {
return(valueA == valueB);
}
static function isSimpleObject(value) {
if (!(value instanceof Object)) {
return(false);
}
for (var _local2 in value) {
if ((!isPrimitiveType(value[_local2])) && (value[_local2] != null)) {
return(false);
}
}
return(true);
}
static function isSimpleTypedObject(value) {
if (!(value.constructor === Object)) {
return(false);
}
var _local2 = new Array();
for (var _local3 in value) {
_local2.push(value[_local3]);
}
if (!gdp.utils.ArrayUtil.isTypedPrimitiveArray(_local2)) {
return(false);
}
return(true);
}
static function getTypeOfSimpleTypedObject(value) {
if (!isSimpleTypedObject(value)) {
return(null);
}
var _local2 = new Array();
for (var _local3 in value) {
_local2.push(value[_local3]);
}
return(typeof(_local2[0]));
}
static function isSimpleComplexObject(value) {
if (!(value instanceof Object)) {
return(false);
}
for (var _local2 in value) {
if (value[_local2] instanceof Array) {
if (gdp.utils.ArrayUtil.isTypedPrimitiveArray(value[_local2])) {
return(false);
}
} else if ((!isPrimitiveType(value[_local2])) && (value[_local2] != null)) {
return(false);
}
}
return(true);
}
static function getObjectInfo(value) {
var _local2 = new Array();
for (var _local3 in value) {
_local2.push([_local3, value[_local3]]);
}
return(_local2);
}
static var TYPE_STRING = "string";
static var TYPE_NUMBER = "number";
static var TYPE_OBJECT = "object";
static var TYPE_BOOLEAN = "boolean";
static var TYPE_MOVIECLIP = "movieclip";
static var TYPE_FUNCTION = "function";
static var TYPE_UNDEFINED = "undefined";
static var TYPE_NULL = "null";
}
Symbol 1020 MovieClip [__Packages.gdp.utils.ArrayUtil] Frame 0
class gdp.utils.ArrayUtil
{
function ArrayUtil () {
}
static function fillArray(nSize, value) {
var _local2 = new Array();
var _local1 = 0;
while (_local1 < nSize) {
_local2.push(value);
_local1++;
}
return(_local2);
}
static function getRandElem(aArray, nSt, nEnd) {
var _local1 = aArray.slice(nSt | 0, nEnd | aArray.length);
return(_local1[random(_local1.length)]);
}
static function getActualNumbers(aValues, nMinNumber, nMaxNumber) {
var _local6 = aValues.length;
var _local5 = aValues[0];
var _local7 = aValues[_local6 - 1];
if ((_local5 == nMinNumber) && (_local7 == nMaxNumber)) {
return(aValues);
}
var _local4 = new Array();
var _local2;
var _local1 = 0;
while (_local1 < _local6) {
_local2 = (aValues[_local1] - _local5) + nMinNumber;
_local4.push((_local2 / _local7) * nMaxNumber);
_local1++;
}
return(_local4);
}
static function contains(aArray, object) {
var _local1 = 0;
while (_local1 < aArray.length) {
if (aArray[_local1] === object) {
return(true);
}
_local1++;
}
return(false);
}
static function find(aArray, object) {
var _local1 = 0;
while (_local1 < aArray.length) {
if (aArray[_local1] === object) {
return(_local1);
}
_local1++;
}
return(-1);
}
static function allItemsToNumber(aArray) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < aArray.length) {
_local3.push(Number(aArray[_local1]));
_local1++;
}
return(_local3);
}
static function trim(aArray) {
return(leftTrim(rightTrim(aArray)));
}
static function leftTrim(aArray) {
return(leftTrimForValues(aArray, [null, undefined]));
}
static function rightTrim(aArray) {
return(rightTrimForValues(aArray, [null, undefined]));
}
static function leftTrimForValues(aArray, aValues) {
var _local3 = aArray.concat();
var _local2 = 0;
while (_local2 < _local3.length) {
var _local1 = 0;
while (_local1 < aValues.length) {
if (_local3[_local2] == aValues[_local1]) {
_local3.splice(_local2, 1);
} else {
return(_local3);
}
_local1++;
}
_local2--;
_local2++;
}
return(_local3);
}
static function rightTrimForValues(aArray, aValues) {
var _local3 = aArray.concat();
var _local2 = _local3.length - 1;
while (_local2 >= 0) {
var _local1 = 0;
while (_local1 < aValues.length) {
if (_local3[_local2] == aValues[_local1]) {
_local3.splice(_local2, 1);
} else {
return(_local3);
}
_local1++;
}
_local2--;
}
return(_local3);
}
static function merge() {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < arguments.length) {
_local3 = _local3.concat(arguments[_local2]);
_local2++;
}
return(_local3);
}
static function removeDuplicate(aArray) {
var _local1 = 0;
while (_local1 < aArray.length) {
var _local3 = find(aArray, aArray[_local1]);
if ((_local3 != -1) && (_local3 != _local1)) {
aArray.splice(_local1--, 1);
}
_local1++;
}
return(aArray);
}
static function equals(aA, aB) {
if (aA == aB) {
return(true);
}
if (aA.length != aB.length) {
return(false);
}
var _local1 = 0;
while (_local1 < aA.length) {
if (!gdp.utils.ObjectUtil.equals(aA[_local1], aB[_local1])) {
return(false);
}
_local1++;
}
return(true);
}
static function isTypedPrimitiveArray(aArray) {
var _local3 = typeof(aArray[0]);
var _local1 = 1;
while (_local1 < aArray.length) {
if (aArray[_local1] instanceof Object) {
return(false);
}
if ((typeof(aArray[_local1]) != _local3) && (aArray[_local1] != null)) {
return(false);
}
_local1++;
}
return(true);
}
static function isMatrix(aArray) {
if (aArray instanceof gdp.core.type.array.Matrix) {
return(true);
}
var _local3 = aArray[0].length;
var _local1 = 0;
while (_local1 < aArray.length) {
if (aArray[_local1].length != _local3) {
return(false);
}
_local1++;
}
return(true);
}
static function matrixToString(aMatrix, sRowSeparator, sColSeparator) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < aMatrix.length) {
_local3.push(aMatrix[_local1].join(sColSeparator));
_local1++;
}
return(_local3.join(sRowSeparator));
}
}
Symbol 1021 MovieClip [__Packages.gdp.core.type.array.Array2D] Frame 0
class gdp.core.type.array.Array2D extends Array
{
function Array2D (nRows, nCols, defaultValue) {
super();
initArray(nRows, nCols, defaultValue);
}
function initArray(nRows, nCols, defaultValue) {
this.nRows = nRows;
this.nCols = nCols;
var _local4 = 0;
while (_local4 < nRows) {
this[_local4] = new Array(nCols);
var _local3 = 0;
while (_local3 < nCols) {
if (defaultValue instanceof Function) {
this[_local4][_local3] = defaultValue();
} else if (defaultValue.clone != null) {
this[_local4][_local3] = defaultValue.clone();
} else {
this[_local4][_local3] = defaultValue;
}
_local3++;
}
_local4++;
}
_global.ASSetPropFlags(this, ["nRows", "nCols"], 1, true);
}
function getRowLength(Void) {
return(nRows);
}
function getColLength(Void) {
return(nCols);
}
function getUp(nRow, nCol) {
return(this[nRow][nCol - 1]);
}
function getDown(nRow, nCol) {
return(this[nRow][nCol + 1]);
}
function getRight(nRow, nCol) {
return(this[nRow + 1][nCol]);
}
function getLeft(nRow, nCol) {
return(this[nRow - 1][nCol]);
}
function getUpLeft(nRow, nCol) {
return(this[nRow - 1][nCol - 1]);
}
function getUpRight(nRow, nCol) {
return(this[nRow + 1][nCol - 1]);
}
function getDownLeft(nRow, nCol) {
return(this[nRow - 1][nCol + 1]);
}
function getDownRight(nRow, nCol) {
return(this[nRow + 1][nCol + 1]);
}
var nRows = null;
var nCols = null;
}
Symbol 1022 MovieClip [__Packages.gdp.core.type.array.Matrix] Frame 0
class gdp.core.type.array.Matrix extends gdp.core.type.array.Array2D
{
var initArray, nRows;
function Matrix (nSize, nDefaultValue) {
super();
initArray(nSize, nSize, nDefaultValue);
}
static function fromArray(aArray) {
var _local4 = new gdp.core.type.array.Matrix(getMatrixSize(aArray), null);
var _local2 = 0;
while (_local2 < aArray.length) {
var _local1 = 0;
while (_local1 < aArray[_local1].length) {
_local4[_local2][_local1] = aArray[_local2][_local1];
_local1++;
}
_local2++;
}
return(_local4);
}
static function getMatrixSize(aArray) {
var _local3 = 0;
var _local1 = 0;
while (_local1 < aArray.length) {
if (aArray[_local1].length > _local3) {
_local3 = aArray[_local1].length;
}
_local1++;
}
return(_local3);
}
function getSize(Void) {
return(nRows);
}
}
Symbol 1023 MovieClip [__Packages.gdp.utils.XMLUtil] Frame 0
class gdp.utils.XMLUtil extends gdp.core.base.BaseClass
{
function XMLUtil () {
super();
}
static function isHasAttributes(node) {
for (var _local2 in node.attributes) {
return(true);
}
return(false);
}
static function toObject(node, oRes) {
if (oRes == undefined) {
oRes = new Object();
}
node.ignoreWhite = true;
var _local3 = node.childNodes.length - 1;
while (_local3 >= 0) {
var _local1 = node.childNodes[_local3];
if (_local1.childNodes[0].nodeValue == undefined) {
var _local4 = new Object();
if (isHasAttributes(_local1)) {
_local4.attributes = gdp.utils.ObjectUtil.copy(_local1.attributes);
}
toObject(_local1, _local4);
oRes[_local1.nodeName] = _local4;
} else if (_local1.hasChildNodes()) {
if ((_local1.nodeName == node.childNodes[_local3 - 1].nodeName) || (oRes[_local1.nodeName] instanceof Array)) {
if (!(oRes[_local1.nodeName] instanceof Array)) {
oRes[_local1.nodeName] = new Array();
}
oRes[_local1.nodeName].unshift(_local1.firstChild.nodeValue);
} else {
oRes[_local1.nodeName] = _local1.firstChild.nodeValue;
}
}
_local3--;
}
return(oRes);
}
static function format(xmlData, sMargin) {
if (sMargin == null) {
sMargin = newline;
}
var _local3 = "";
var _local2 = 0;
while (_local2 < xmlData.childNodes.length) {
var _local1 = xmlData.childNodes[_local2];
if (_local1.nodeType == 1) {
var _local7 = formateAttributes(_local1.attributes);
var _local4 = format(_local1, sMargin + "\t");
_local3 = _local3 + (((sMargin + "<") + _local1.nodeName) + _local7);
var _local6 = ((_local1.firstChild.nodeType == 1) ? (sMargin) : "");
if (_local4 == "") {
_local3 = _local3 + "/>";
} else {
_local3 = _local3 + (((((">" + _local4) + _local6) + "</") + _local1.nodeName) + ">");
}
} else if (_local1.nodeType == 3) {
_local3 = _local3 + _local1.nodeValue;
}
_local2++;
}
if (sMargin == newline) {
return(_local3.substring(1));
}
return(_local3);
}
static function formateAttributes(oAttributes) {
var _local2 = "";
for (var _local3 in oAttributes) {
_local2 = _local2 + ((((" " + _local3) + "=\"") + oAttributes[_local3]) + "\"");
}
return(_local2);
}
}
Symbol 1024 MovieClip [__Packages.gdp.core.base.BaseInterface] Frame 0
interface gdp.core.base.BaseInterface extends gdp.env.events.IEventDispatcher
{
}
Symbol 1025 MovieClip [__Packages.gdp.env.reflect.MemberInfo] Frame 0
interface gdp.env.reflect.MemberInfo extends gdp.core.base.BaseInterface
{
}
Symbol 1026 MovieClip [__Packages.gdp.env.reflect.PackageMemberInfo] Frame 0
interface gdp.env.reflect.PackageMemberInfo extends gdp.env.reflect.MemberInfo
{
}
Symbol 1027 MovieClip [__Packages.gdp.env.reflect.TypeInfo] Frame 0
interface gdp.env.reflect.TypeInfo extends gdp.env.reflect.PackageMemberInfo
{
}
Symbol 1028 MovieClip [__Packages.gdp.env.reflect.PackageInfo] Frame 0
class gdp.env.reflect.PackageInfo extends gdp.core.base.BaseClass implements gdp.env.reflect.PackageMemberInfo
{
static var packageAlgorithm, packageMemberAlgorithm, rootPackage;
var package, name, parent, fullName, members;
function PackageInfo (package, name, parent) {
super();
this.package = package;
this.name = name;
this.parent = parent;
}
static function forName(packageName) {
return(getPackageAlgorithm().executeByName(packageName));
}
static function forPackage(package) {
if ((package === null) || (package === undefined)) {
throw new gdp.env.except.IllegalArgumentException(("Argument 'package' [" + package) + "] must not be 'null' nor 'undefined'.", this, arguments);
}
var packageInfo = gdp.env.reflect.ReflectConfig.getCache().getPackage(package);
if (packageInfo) {
return(packageInfo);
}
return(gdp.env.reflect.ReflectConfig.getCache().addPackage(new gdp.env.reflect.PackageInfo(package)));
}
static function setPackageAlgorithm(newPackageAlgorithm) {
packageAlgorithm = newPackageAlgorithm;
}
static function getPackageAlgorithm(Void) {
if (!packageAlgorithm) {
packageAlgorithm = new gdp.env.reflect.algorithm.PackageAlgorithm();
}
return(packageAlgorithm);
}
static function setPackageMemberAlgorithm(newPackageMemberAlgorithm) {
packageMemberAlgorithm = newPackageMemberAlgorithm;
}
static function getPackageMemberAlgorithm(Void) {
if (!packageMemberAlgorithm) {
packageMemberAlgorithm = new gdp.env.reflect.algorithm.PackageMemberAlgorithm();
}
return(packageMemberAlgorithm);
}
static function getRootPackage(Void) {
if (!rootPackage) {
rootPackage = new gdp.env.reflect.PackageInfo(_global, "_global", null);
}
return(rootPackage);
}
static function setRootPackage(newRootPackage) {
rootPackage = newRootPackage;
}
function getName(Void) {
if (name === undefined) {
initNameAndParent();
}
return(name);
}
function getFullName(Void) {
if (fullName === undefined) {
if (getParent().isRoot() || (isRoot())) {
return((fullName = getName()));
}
fullName = (getParent().getFullName() + ".") + getName();
}
return(fullName);
}
function getPackage(Void) {
return(package);
}
function getParent(Void) {
if (parent === undefined) {
initNameAndParent();
}
return(parent);
}
function initNameAndParent(Void) {
var _local2 = getPackageAlgorithm().execute(getPackage());
if (name === undefined) {
name = ((_local2.name == null) ? null : (_local2.name));
}
if (parent === undefined) {
parent = ((_local2.parent == null) ? null : (_local2.parent));
}
}
function getMembers() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([], getMembersByFlag);
_local3.addHandler([Boolean], getMembersByFlag);
_local3.addHandler([gdp.env.reflect.PackageMemberFilter], getMembersByFilter);
return(_local3.forward(arguments));
}
function getMembersByFlag(filterSubPackages) {
if ((getPackage() === null) || (getPackage() === undefined)) {
return(null);
}
if (filterSubPackages == null) {
filterSubPackages = true;
}
if (members === undefined) {
members = getPackageMemberAlgorithm().execute(this);
}
var _local3 = members.concat();
if (!filterSubPackages) {
var _local4 = members.packages;
var _local2 = 0;
while (_local2 < _local4.length) {
_local3 = _local3.concat(gdp.env.reflect.PackageInfo(_local4[_local2]).getMembersByFlag(filterSubPackages));
_local2++;
}
}
return(_local3);
}
function getMembersByFilter(packageMemberFilter) {
if ((getPackage() === null) || (getPackage() === undefined)) {
return(null);
}
if (!packageMemberFilter) {
return(getMembersByFlag(true));
}
var _local3 = getMembersByFlag(packageMemberFilter.filterSubPackages());
var _local2 = 0;
while (_local2 < _local3.length) {
if (packageMemberFilter.filter(gdp.env.reflect.PackageMemberInfo(_local3[_local2]))) {
_local3.splice(_local2, 1);
_local2--;
}
_local2++;
}
return(_local3);
}
function getMemberClasses() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([], getMemberClassesByFlag);
_local3.addHandler([Boolean], getMemberClassesByFlag);
_local3.addHandler([gdp.env.reflect.PackageMemberFilter], getMemberClassesByFilter);
return(_local3.forward(arguments));
}
function getMemberClassesByFlag(filterSubPackages) {
if ((getPackage() === null) || (getPackage() === undefined)) {
return(null);
}
if (filterSubPackages == null) {
filterSubPackages = true;
}
if (members === undefined) {
members = getPackageMemberAlgorithm().execute(this);
}
var _local3 = members.classes.concat();
if (!filterSubPackages) {
var _local4 = members.packages;
var _local2 = 0;
while (_local2 < _local4.length) {
_local3 = _local3.concat(gdp.env.reflect.PackageInfo(_local4[_local2]).getMemberClassesByFlag(filterSubPackages));
_local2++;
}
}
return(_local3);
}
function getMemberClassesByFilter(classFilter) {
if ((getPackage() === null) || (getPackage() === undefined)) {
return(null);
}
if (!classFilter) {
return(getMemberClassesByFlag(true));
}
var _local3 = getMemberClassesByFlag(classFilter.filterSubPackages());
var _local2 = 0;
while (_local2 < _local3.length) {
if (classFilter.filter(gdp.env.reflect.ClassInfo(_local3[_local2]))) {
_local3.splice(_local2, 1);
_local2--;
}
_local2++;
}
return(_local3);
}
function getMemberPackages() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([], getMemberPackagesByFlag);
_local3.addHandler([Boolean], getMemberPackagesByFlag);
_local3.addHandler([gdp.env.reflect.PackageMemberFilter], getMemberPackagesByFilter);
return(_local3.forward(arguments));
}
function getMemberPackagesByFlag(filterSubPackages) {
if ((getPackage() === null) || (getPackage() === undefined)) {
return(null);
}
if (filterSubPackages == null) {
filterSubPackages = true;
}
if (members === undefined) {
members = getPackageMemberAlgorithm().execute(this);
}
var _local3 = members.packages.concat();
if (!filterSubPackages) {
var _local4 = members.packages;
var _local2 = 0;
while (_local2 < _local4.length) {
_local3 = _local3.concat(gdp.env.reflect.PackageInfo(_local4[_local2]).getMemberPackagesByFlag(filterSubPackages));
_local2++;
}
}
return(_local3);
}
function getMemberPackagesByFilter(packageFilter) {
if ((getPackage() === null) || (getPackage() === undefined)) {
return(null);
}
if (!packageFilter) {
return(getMemberPackagesByFlag(true));
}
var _local3 = getMemberPackagesByFlag(packageFilter.filterSubPackages());
var _local2 = 0;
while (_local2 < _local3.length) {
if (packageFilter.filter(gdp.env.reflect.PackageInfo(_local3[_local2]))) {
_local3.splice(_local2, 1);
_local2--;
}
_local2++;
}
return(_local3);
}
function getMember() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([String], getMemberByName);
_local3.addHandler([Object], getMemberByMember);
return(_local3.forward(arguments));
}
function getMemberByName(memberName) {
if (memberName == null) {
return(null);
}
if (getMembersByFlag(true)) {
if (members[memberName]) {
return(members[memberName]);
}
var _local4 = members.packages;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = gdp.env.reflect.PackageInfo(_local4[_local2]).getMemberByName(memberName);
if (_local3) {
return(_local3);
}
_local2++;
}
}
return(null);
}
function getMemberByMember(concreteMember) {
if (concreteMember == null) {
return(null);
}
if (typeof(concreteMember) == "function") {
return(getMemberClassByClass(concreteMember));
}
return(getMemberPackageByPackage(concreteMember));
}
function getMemberClass(clazz) {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([String], getMemberClassByName);
_local3.addHandler([Function], getMemberClassByClass);
return(_local3.forward(arguments));
}
function getMemberClassByName(className) {
if (className == null) {
return(null);
}
if (getMemberClassesByFlag(true)) {
if (members.classes[className]) {
return(members.classes[className]);
}
}
var _local4 = getMemberPackagesByFlag(true);
if (_local4) {
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = gdp.env.reflect.PackageInfo(_local4[_local2]).getMemberClassByName(className);
if (_local3) {
return(_local3);
}
_local2++;
}
}
return(null);
}
function getMemberClassByClass(concreteClass) {
if (!concreteClass) {
return(null);
}
var _local4 = getMemberClassesByFlag(true);
if (_local4) {
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
if (_local3.getType().valueOf() == concreteClass.valueOf()) {
return(_local3);
}
_local2++;
}
}
var _local5 = getMemberPackagesByFlag(true);
if (_local5) {
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = gdp.env.reflect.PackageInfo(_local5[_local2]).getMemberClassByClass(concreteClass);
if (_local3) {
return(_local3);
}
_local2++;
}
}
return(null);
}
function getMemberPackage(package) {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([String], getMemberPackageByName);
_local3.addHandler([Object], getMemberPackageByPackage);
return(_local3.forward(arguments));
}
function getMemberPackageByName(packageName) {
if (packageName == null) {
return(null);
}
if (getMemberPackagesByFlag(true)) {
if (members.packages[packageName]) {
return(members.packages[packageName]);
}
var _local4 = members.packages;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = gdp.env.reflect.PackageInfo(_local4[_local2]).getMemberPackageByName(packageName);
if (_local3) {
return(_local3);
}
_local2++;
}
}
return(null);
}
function getMemberPackageByPackage(concretePackage) {
if (concretePackage == null) {
return(null);
}
var _local3 = getMemberPackagesByFlag(true);
if (_local3) {
var _local2 = 0;
while (_local2 < _local3.length) {
var _local4 = _local3[_local2];
if (_local4.getPackage().valueOf() == concretePackage.valueOf()) {
return(_local4);
}
_local2++;
}
_local2 = 0;
while (_local2 < _local3.length) {
var _local4 = gdp.env.reflect.PackageInfo(_local3[_local2]).getMemberPackageByPackage(concretePackage);
if (_local4) {
return(_local4);
}
_local2++;
}
}
return(null);
}
function isRoot(Void) {
return(!getParent());
}
function isParentPackage(package) {
if (!package) {
return(false);
}
if (package == this) {
return(false);
}
while (package) {
if (package.isRoot()) {
return(false);
}
package = package.getParent();
if (package == this) {
return(true);
}
}
return(false);
}
function toString() {
var _local5 = "[reflection " + getFullName();
if (arguments[0] == true) {
var _local4 = getMembers();
var _local3 = 0;
while (_local3 < _local4.length) {
_local5 = _local5 + (newline + gdp.utils.StringUtil.addSpaceIndent(_local4[_local3].toString(true), 2));
_local3++;
}
if (_local4.length > 0) {
_local5 = _local5 + newline;
}
}
return(_local5 + "]");
}
}
Symbol 1029 MovieClip [__Packages.gdp.env.reflect.algorithm.PackageAlgorithm] Frame 0
class gdp.env.reflect.algorithm.PackageAlgorithm extends gdp.core.base.BaseClass
{
var c, p;
function PackageAlgorithm (Void) {
super();
}
function setCache(cache) {
c = cache;
}
function getCache(Void) {
if (!c) {
c = gdp.env.reflect.ReflectConfig.getCache();
}
return(c);
}
function execute(o) {
if ((o === null) || (o === undefined)) {
return(null);
}
p = null;
_global.ASSetPropFlags(o, null, 0, true);
_global.ASSetPropFlags(o, ["__proto__", "constructor", "__constructor__", "prototype"], 1, true);
findAndStore(getCache().getRoot(), o);
return(p);
}
function findAndStore(a, o) {
var _local7 = a.getPackage();
var _local4;
for (_local4 in _local7) {
var _local2 = _local7[_local4];
if (typeof(_local2) == "object") {
if (_local2.valueOf() == o.valueOf()) {
p = new Object();
p.package = o;
p.name = _local4;
p.parent = a;
return(true);
}
var _local3 = c.getPackage(_local2);
if (!_local3) {
_local3 = c.addPackage(new gdp.env.reflect.PackageInfo(_local2, _local4, a));
}
if (!_local3.isParentPackage(a)) {
if (findAndStore(_local3, o)) {
return(true);
}
}
}
}
return(false);
}
function executeByName(n) {
if (!n) {
throw new gdp.env.except.IllegalArgumentException(("The passed-in package name '" + n) + "' is not allowed to be null, undefined or an empty string.", this, arguments);
}
var p = getCache().getRoot();
var x = p.getFullName();
if (!x) {
x = "_global";
}
var f = eval ((x + ".") + n);
if ((f === null) || (f === undefined)) {
throw new gdp.env.reflect.PackageNotFoundException(("A package with the name '" + n) + "' could not be found.", this, arguments);
}
if (typeof(f) != "object") {
throw new gdp.env.except.IllegalArgumentException(("The object corresponding to the passed-in package name '" + n) + "' is not of type object.", this, arguments);
}
var r = c.getPackage(f);
if (r) {
return(r);
}
var a = n.split(".");
var g = p.getPackage();
var i = 0;
while (i < a.length) {
g = g[a[i]];
p = c.addPackage(new gdp.env.reflect.PackageInfo(g, a[i], p));
i++;
}
return(p);
}
}
Symbol 1030 MovieClip [__Packages.gdp.env.reflect.Cache] Frame 0
interface gdp.env.reflect.Cache extends gdp.core.base.BaseInterface
{
}
Symbol 1031 MovieClip [__Packages.gdp.env.reflect.ReflectConfig] Frame 0
class gdp.env.reflect.ReflectConfig extends gdp.core.base.BaseClass
{
static var cache;
function ReflectConfig (Void) {
super();
}
static function getCache(Void) {
if (!cache) {
cache = new gdp.env.reflect.SimpleCache(gdp.env.reflect.PackageInfo.getRootPackage());
}
return(cache);
}
static function setCache(newCache) {
cache = newCache;
}
}
Symbol 1032 MovieClip [__Packages.gdp.env.reflect.SimpleCache] Frame 0
class gdp.env.reflect.SimpleCache extends gdp.core.base.BaseClass implements gdp.env.reflect.Cache
{
var root, cache;
function SimpleCache (root) {
super();
this.root = root;
releaseAll();
}
function getClass() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([Function], getClassByClass);
_local3.addHandler([Object], getClassByInstance);
return(_local3.forward(arguments));
}
function getClassByClass(clazz) {
if ((clazz === null) || (clazz === undefined)) {
return(null);
}
var _local3 = clazz.prototype;
var _local2 = _local3.__as2lib__hashCode;
if (_local2 == undefined) {
return(null);
}
if (_local2 == _local3.__proto__.__as2lib__hashCode) {
return(null);
}
return(cache[_local2]);
}
function getClassByInstance(instance) {
if ((instance === null) || (instance === undefined)) {
return(null);
}
var _local3 = instance.__proto__;
var _local2 = _local3.__as2lib__hashCode;
if (_local2 == undefined) {
return(null);
}
if (_local2 == _local3.__proto__.__as2lib__hashCode) {
return(null);
}
return(cache[_local2]);
}
function addClass(info) {
if (!info) {
return(null);
}
var _local3 = info.getType().prototype;
var _local5 = _local3.__as2lib__hashCode;
if ((_local5 != null) && (_local5 != _local3.__proto__.__as2lib__hashCode)) {
cache[_local5] = info;
} else {
cache[(_local3.__as2lib__hashCode = hashCodeCounter++)] = info;
_global.ASSetPropFlags(_local3, "__as2lib__hashCode", 1, true);
}
return(info);
}
function getPackage(package) {
if ((package === null) || (package === undefined)) {
return(null);
}
var _local2 = package.__as2lib__hashCode;
if (_local2 == null) {
return(null);
}
if (_local2 == package.__proto__.__as2lib__hashCode) {
return(null);
}
return(cache[_local2]);
}
function addPackage(info) {
if (!info) {
return(null);
}
var _local3 = info.getPackage();
var _local5 = _local3.__as2lib__hashCode;
if ((_local5 != null) && (_local5 != _local3.__proto__.__as2lib__hashCode)) {
cache[_local5] = info;
} else {
cache[(_local3.__as2lib__hashCode = hashCodeCounter++)] = info;
_global.ASSetPropFlags(_local3, "__as2lib__hashCode", 1, true);
}
return(info);
}
function getRoot(Void) {
return(root);
}
function releaseAll(Void) {
cache = new Array();
addPackage(root);
}
static var hashCodeCounter = 0;
}
Symbol 1033 MovieClip [__Packages.gdp.env.overload.Overload] Frame 0
class gdp.env.overload.Overload extends gdp.core.base.BaseClass
{
var handlers, target, defaultHandler;
function Overload (target) {
super();
handlers = new Array();
this.target = target;
}
function setDefaultHandler(method) {
if (typeof(method) == "function") {
defaultHandler = new gdp.env.overload.SimpleOverloadHandler(null, method);
} else {
removeDefaultHandler();
}
}
function removeDefaultHandler(Void) {
defaultHandler = null;
}
function addHandler() {
var _local6 = arguments.length;
if (_local6 == 1) {
var _local5 = arguments[0];
if ((_local5 == null) || (_local5 instanceof gdp.env.overload.OverloadHandler)) {
addHandlerByHandler(_local5);
return(undefined);
}
}
if (_local6 == 2) {
var _local3 = arguments[0];
var _local4 = arguments[1];
if (((_local3 == null) || (_local3 instanceof Array)) && ((_local4 == null) || (_local4 instanceof Function))) {
return(addHandlerByValue(_local3, _local4));
}
}
throw new gdp.env.except.IllegalArgumentException(("The types and count of the passed-in arguments [" + arguments) + "] must match one of the available choices.", this, arguments);
}
function addHandlerByHandler(handler) {
if (handler) {
handlers.push(handler);
}
}
function addHandlerByValue(argumentsTypes, method) {
var _local2 = new gdp.env.overload.SimpleOverloadHandler(argumentsTypes, method);
handlers.push(_local2);
return(_local2);
}
function removeHandler(handler) {
if (handler) {
var _local2 = handlers.length;
while (_local2-- , _local2 - -1) {
if (handlers[_local2] == handler) {
handlers.splice(_local2, 1);
}
}
}
}
function forward(args) {
return(doGetMatchingHandler(arguments.caller, args).getMethod().apply(target, args));
}
function getMatchingHandler(args) {
return(doGetMatchingHandler(arguments.caller, args));
}
function doGetMatchingHandler(overloadedMethod, overloadArguments) {
if (!overloadArguments) {
overloadArguments = [];
}
var _local5 = getMatchingHandlers(overloadArguments);
var _local3 = _local5.length;
if (_local3 == 0) {
if (defaultHandler) {
return(defaultHandler);
}
throw new gdp.env.overload.UnknownOverloadHandlerException("No appropriate OverloadHandler found.", this, arguments, target, overloadedMethod, overloadArguments, handlers);
}
_local3--;
var _local6 = _local5[_local3];
while (_local3-- , _local3 - -1) {
var _local4 = _local6.isMoreExplicit(_local5[_local3]);
if (_local4 == null) {
throw new gdp.env.overload.SameTypeSignatureException("Two OverloadHandlers have the same type signature.", this, arguments, target, overloadedMethod, overloadArguments, [_local6, _local5[_local3]]);
}
if (!_local4) {
_local6 = _local5[_local3];
}
}
return(_local6);
}
function getMatchingHandlers(args) {
var _local4 = new Array();
var _local3 = handlers.length;
while (_local3-- , _local3 - -1) {
var _local2 = handlers[_local3];
if (_local2.matches(args)) {
_local4.push(_local2);
}
}
return(_local4);
}
}
Symbol 1034 MovieClip [__Packages.gdp.env.overload.OverloadHandler] Frame 0
interface gdp.env.overload.OverloadHandler extends gdp.core.base.BaseInterface
{
}
Symbol 1035 MovieClip [__Packages.gdp.env.overload.SimpleOverloadHandler] Frame 0
class gdp.env.overload.SimpleOverloadHandler extends gdp.core.base.BaseClass implements gdp.env.overload.OverloadHandler
{
var argumentsTypes, method;
function SimpleOverloadHandler (argumentsTypes, method) {
super();
if (!method) {
throw new gdp.env.except.IllegalArgumentException("Method to be executed by the overload handler must not be null or undefined.", this, arguments);
}
if (!argumentsTypes) {
argumentsTypes = [];
}
this.argumentsTypes = argumentsTypes;
this.method = method;
}
function matches(realArguments) {
if (!realArguments) {
realArguments = [];
}
var _local2 = realArguments.length;
if (_local2 != argumentsTypes.length) {
return(false);
}
while (_local2-- , _local2 - -1) {
if (realArguments[_local2] != null) {
if (argumentsTypes[_local2] != null) {
if (!gdp.utils.ObjectUtil.typesMatch(realArguments[_local2], argumentsTypes[_local2])) {
return(false);
}
}
}
}
return(true);
}
function execute(target, args) {
return(method.apply(target, args));
}
function isMoreExplicit(handler) {
if (!handler) {
return(true);
}
var _local3 = 0;
var _local5 = handler.getArgumentsTypes();
if (!_local5) {
_local5 = [];
}
var _local2 = argumentsTypes.length;
if (_local2 != _local5.length) {
return(true);
}
while (_local2-- , _local2 - -1) {
if (argumentsTypes[_local2] != _local5[_local2]) {
var _local4 = new Object();
_local4.__proto__ = argumentsTypes[_local2].prototype;
if (!argumentsTypes[_local2]) {
_local3--;
} else if (!_local5[_local2]) {
_local3 = _local3 - -1;
} else if (gdp.utils.ObjectUtil.isInstanceOf(_local4, _local5[_local2])) {
_local3 = _local3 - -1;
} else {
_local3--;
}
}
}
if (_local3 == 0) {
return(null);
}
return(_local3 > 0);
}
function getArgumentsTypes(Void) {
return(argumentsTypes);
}
function getMethod(Void) {
return(method);
}
function toString() {
var _local3 = "[object SimpleOverloadHandler";
var _local4 = argumentsTypes.length;
if (_local4 > 0) {
_local3 = _local3 + "(";
}
var _local2 = 0;
while (_local2 < _local4) {
if (_local2 != 0) {
_local3 = _local3 + ", ";
}
_local3 = _local3 + gdp.env.reflect.ReflectUtil.getTypeName(argumentsTypes[_local2]);
_local2++;
}
if (_local4 > 0) {
_local3 = _local3 + ")";
}
return(_local3 + "]");
}
}
Symbol 1036 MovieClip [__Packages.gdp.env.except.AbstractThrowable] Frame 0
class gdp.env.except.AbstractThrowable extends Error
{
var message, thrower, aArgs, name, cause;
function AbstractThrowable (message, thrower, aArgs) {
super();
this.message = message;
this.thrower = thrower;
this.aArgs = aArgs;
name = getClassName();
if (gdp.core.logger.LogWrapper.getLog() != null) {
trace(toString());
}
}
function getMessage(Void) {
return(message);
}
function getThrowerName(Void) {
return(gdp.env.reflect.ClassInfo.forObject(thrower).getName());
}
function getThrowerNameWithPackage(Void) {
return(gdp.env.reflect.ClassInfo.forObject(thrower).getFullName());
}
function getArguments(Void) {
return(aArgs);
}
function getClass(Void) {
return(Object(this).__constructor__);
}
function getClassName(Void) {
return(gdp.env.reflect.ClassInfo.forObject(this).getName());
}
function getPackageName(Void) {
return(gdp.env.reflect.ClassInfo.forObject(this).getPackage().getName());
}
function getClassNameWithPackage(Void) {
return(gdp.env.reflect.ClassInfo.forObject(this).getFullName());
}
function getCause(Void) {
return(cause);
}
function initCause(newCause) {
if (!newCause) {
throw new gdp.env.except.IllegalArgumentException("Cause must not be null or undefined.", this, arguments);
}
if (cause) {
throw new gdp.env.except.IllegalStateException(("The cause [" + cause) + "] has already been initialized.", this, arguments);
}
cause = newCause;
return(gdp.env.except.Throwable(this));
}
function toString() {
return((((("[" + getClassName()) + " in ") + getThrowerName()) + "] :: ") + getMessage());
}
}
Symbol 1037 MovieClip [__Packages.gdp.core.logger.LogWrapper] Frame 0
class gdp.core.logger.LogWrapper
{
static var _instance;
var _log;
function LogWrapper () {
}
static function mtascTrace(message, level, className, fileName, lineNumber) {
var _local1;
switch (level) {
case FATAL :
_local1 = "fatal";
break;
case ERROR :
_local1 = "error";
break;
case WARN :
_local1 = "warn";
break;
case INFO :
_local1 = "info";
break;
case DEBUG :
_local1 = "debug";
break;
default :
lineNumber = Number(fileName);
fileName = className;
className = String(level);
_local1 = "debug";
}
if (logCallingFile) {
getLog()[_local1](((((className + " [") + fileName) + ":") + lineNumber) + "]");
}
getLog()[_local1](message);
}
function init(logId) {
_log = new gdp.core.logger.Logger(logId);
}
function addConsolePublisher() {
_log.addPublisher(new gdp.core.logger.publisher.ConsolePublisher());
}
function addTracePublisher() {
_log.addPublisher(new gdp.core.logger.publisher.TracePublisher());
}
static function getInstance() {
if (_instance == undefined) {
_instance = new gdp.core.logger.LogWrapper();
}
return(_instance);
}
static function getLog() {
return(getInstance()._log);
}
function toString() {
return("[Object - gdp.core.logger.LogWrapper]");
}
static var logCallingFile = true;
static var DEBUG = 2;
static var INFO = 4;
static var WARN = 8;
static var ERROR = 16;
static var FATAL = 32;
}
Symbol 1038 MovieClip [__Packages.gdp.core.logger.Logger] Frame 0
class gdp.core.logger.Logger
{
var _loggerId, _level, _publishers;
function Logger (logId) {
_loggerId = logId;
_level = gdp.core.logger.event.Level.LOG;
_publishers = new Object();
_instances[logId] = log;
}
static function getLogger(logId, maxDepth) {
if (logId.length > 0) {
var _local1 = _instances[logId];
if (_local1 == undefined) {
_local1 = new gdp.core.logger.Logger(logId);
var _local2 = new gdp.core.logger.publisher.TracePublisher();
var _local4 = new gdp.core.logger.publisher.ConsolePublisher();
if (maxDepth == undefined) {
maxDepth = 3;
}
_local2.__set__maxDepth(maxDepth);
_local4.__set__maxDepth(maxDepth);
_local1.addPublisher(_local2);
_local1.addPublisher(_local4);
}
return(_local1);
}
return(null);
}
function log(argument) {
publish(argument, gdp.core.logger.event.Level.LOG);
}
function debug(argument) {
publish(argument, gdp.core.logger.event.Level.DEBUG);
}
function info(argument) {
publish(argument, gdp.core.logger.event.Level.INFO);
}
function warn(argument) {
publish(argument, gdp.core.logger.event.Level.WARN);
}
function error(argument) {
publish(argument, gdp.core.logger.event.Level.ERROR);
}
function fatal(argument) {
publish(argument, gdp.core.logger.event.Level.FATAL);
}
function getId() {
return(_loggerId);
}
function setLevel(level) {
_level = level;
}
function getLevel() {
return(_level);
}
function addPublisher(publisher) {
if (!_publishers[publisher.toString()]) {
_publishers[publisher.toString()] = publisher;
}
}
function removePublisher(publisher) {
delete _publishers[publisher.toString()];
}
function getPublishers() {
return(_publishers);
}
function toString() {
return("[object gdp.core.logger.Logger]");
}
function publish(argument, level) {
if (level.getValue() >= _level.getValue()) {
var _local2 = new gdp.core.logger.event.LogEvent(_loggerId, argument, level);
for (var _local3 in _publishers) {
gdp.core.logger.publisher.IPublisher(_publishers[_local3]).publish(_local2);
}
}
}
static var _instances = new Object();
}
Symbol 1039 MovieClip [__Packages.gdp.core.logger.publisher.IPublisher] Frame 0
interface gdp.core.logger.publisher.IPublisher
{
}
Symbol 1040 MovieClip [__Packages.gdp.core.logger.event.LogEvent] Frame 0
class gdp.core.logger.event.LogEvent
{
var loggerId, argument, level, time;
function LogEvent (loggerId, argument, level) {
this.loggerId = loggerId;
this.argument = argument;
this.level = level;
time = new Date();
}
static function serialize(logEvent) {
var _local1 = new Object();
_local1.loggerId = logEvent.loggerId;
_local1.time = logEvent.time;
_local1.levelName = logEvent.level.getName();
_local1.argument = logEvent.argument;
return(_local1);
}
static function deserialize(o) {
var _local3 = gdp.core.logger.event.Level["" + o.levelName];
var _local1 = new gdp.core.logger.event.LogEvent(o.loggerId, o.argument, _local3);
_local1.time = o.time;
return(_local1);
}
function toString() {
return("[object gdp.core.logger.event.LogEvent]");
}
}
Symbol 1041 MovieClip [__Packages.gdp.core.logger.event.Level] Frame 0
class gdp.core.logger.event.Level
{
var _name, _value;
function Level (name, value) {
_name = name;
_value = value;
}
function getName() {
return(_name);
}
function getValue() {
return(_value);
}
function toString() {
return(("[object gdp.core.logger.event.Level." + getName()) + "]");
}
static var ALL = new gdp.core.logger.event.Level("ALL", 1);
static var LOG = new gdp.core.logger.event.Level("LOG", 1);
static var DEBUG = new gdp.core.logger.event.Level("DEBUG", 2);
static var INFO = new gdp.core.logger.event.Level("INFO", 4);
static var WARN = new gdp.core.logger.event.Level("WARN", 8);
static var ERROR = new gdp.core.logger.event.Level("ERROR", 16);
static var FATAL = new gdp.core.logger.event.Level("FATAL", 32);
static var NONE = new gdp.core.logger.event.Level("NONE", 1024);
}
Symbol 1042 MovieClip [__Packages.gdp.core.logger.publisher.TracePublisher] Frame 0
class gdp.core.logger.publisher.TracePublisher implements gdp.core.logger.publisher.IPublisher
{
var _maxDepth, inProgress;
function TracePublisher () {
maxDepth = (4);
}
function set maxDepth(value) {
_maxDepth = ((_maxDepth > 255) ? 255 : (value));
//return(maxDepth);
}
function get maxDepth() {
return(_maxDepth);
}
function publish(e) {
inProgress = new Array();
var _local4 = e.argument;
var _local2 = ("*" + e.level.getName()) + "*";
if (e.loggerId) {
_local2 = _local2 + (":" + e.loggerId);
}
_local2 = _local2 + ":";
_local2 = _local2 + analyzeObj(_local4, 1);
trace(_local2);
}
function toString() {
return("gdp.core.logger.publisher.TracePublisher");
}
function analyzeObj(o, depth) {
var _local6 = "";
var _local5 = typeof(o);
if (_local5 == "string") {
_local6 = _local6 + (("\"" + o) + "\"");
} else if ((_local5 == "boolean") || (_local5 == "number")) {
_local6 = _local6 + o;
} else if ((_local5 == "undefined") || (_local5 == "null")) {
_local6 = _local6 + (("(" + _local5) + ")");
} else {
var _local8 = false;
var _local9 = true;
if (o instanceof Array) {
_local5 = "array";
_local8 = false;
} else if (o instanceof Button) {
_local5 = "button";
_local8 = true;
} else if (o instanceof Date) {
_local5 = "date";
_local9 = false;
_local8 = true;
} else if (o instanceof Color) {
_local5 = "color";
_local9 = false;
_local8 = true;
o = o.getRGB().toString(16);
} else if (o instanceof MovieClip) {
_local5 = "movieclip";
_local8 = true;
} else if (o instanceof XML) {
_local5 = "xml";
_local9 = false;
_local8 = true;
} else if (o instanceof XMLNode) {
_local5 = "xmlnode";
_local9 = false;
_local8 = true;
} else if (o instanceof Sound) {
_local5 = "sound";
} else if (o instanceof TextField) {
_local5 = "textfield";
_local8 = true;
} else if (o instanceof Function) {
_local5 = "function";
_local9 = false;
}
_local6 = _local6 + "(";
if (_local8) {
_local6 = _local6 + ((_local5 + " ") + o);
} else if (_local5 == "object") {
_local6 = _local6 + o;
} else if (_local5 == "array") {
_local6 = _local6 + ((_local5 + ":") + o.length);
} else {
_local6 = _local6 + _local5;
}
_local6 = _local6 + ")";
var _local3 = 0;
while (_local3 < inProgress.length) {
if (inProgress[_local3] == o) {
return(_local6 + ": **cross-reference**");
}
_local3++;
}
inProgress.push(o);
if (_local9 && (depth <= _maxDepth)) {
var _local7 = "";
if (_local5 == "array") {
_local3 = 0;
while (_local3 < o.length) {
_local7 = _local7 + ((((newline + gdp.utils.StringUtil.multiply("\t", depth + 1)) + _local3) + ":") + analyzeObj(o[_local3], depth + 1));
_local3++;
}
} else {
for (var _local10 in o) {
_local7 = _local7 + ((((newline + gdp.utils.StringUtil.multiply("\t", depth + 1)) + _local10) + ":") + analyzeObj(o[_local10], depth + 1));
}
}
if (_local7.length > 0) {
_local6 = _local6 + ((((" {" + _local7) + newline) + gdp.utils.StringUtil.multiply("\t", depth)) + "}");
}
}
inProgress.pop();
}
return(_local6);
}
}
Symbol 1043 MovieClip [__Packages.gdp.utils.StringUtil] Frame 0
class gdp.utils.StringUtil
{
function StringUtil () {
}
static function addCharsToRight(sString, sChars, nCount) {
var _local1 = 0;
while (_local1 < nCount) {
sString = sString + sChars;
_local1++;
}
return(sString);
}
static function addCharsToLeft(sString, sChars, nCount) {
var _local1 = 0;
while (_local1 < nCount) {
sString = sChars + sString;
_local1++;
}
return(sString);
}
static function isNumber(sString) {
return(((Number(sString) == sString) ? true : false));
}
static function replace(sString, sWhat, sTo) {
return(String(sString.split(sWhat).join(sTo)));
}
static function replaceAll(sString, sWhat, sTo) {
sString = String(sString.split(sWhat).join(sTo));
if (sString.indexOf(sWhat) != -1) {
return(replaceAll(sString, sWhat, sTo));
}
return(sString);
}
static function trim(sString) {
return(leftTrim(rightTrim(sString)));
}
static function leftTrim(sString) {
return(leftTrimForChars(sString, "\n\t\n " + unescape("%0D%0A")));
}
static function rightTrim(sString) {
return(rightTrimForChars(sString, "\n\t\n " + unescape("%0D%0A")));
}
static function leftTrimForChars(sString, sChars) {
var _local1 = 0;
var _local3 = sString.length;
while ((_local1 < _local3) && (sChars.indexOf(sString.charAt(_local1)) >= 0)) {
_local1++;
}
return(String(((_local1 > 0) ? (sString.substr(_local1, _local3)) : (sString))));
}
static function rightTrimForChars(sString, sChars) {
var _local2 = 0;
var _local1 = sString.length - 1;
while ((_local2 < _local1) && (sChars.indexOf(sString.charAt(_local1)) >= 0)) {
_local1--;
}
return(String(((_local1 >= 0) ? (sString.substr(_local2, _local1 + 1)) : (sString))));
}
static function checkEmail(sEmail) {
if (sEmail.length < 6) {
return(false);
}
if ((sEmail.split("@").length > 2) || (sEmail.indexOf("@") < 0)) {
return(false);
}
if (sEmail.lastIndexOf("@") > sEmail.lastIndexOf(".")) {
return(false);
}
if (sEmail.lastIndexOf(".") > (sEmail.length - 3)) {
return(false);
}
if (sEmail.lastIndexOf(".") <= (sEmail.lastIndexOf("@") + 1)) {
return(false);
}
return(true);
}
static function assureLength(sString, nLength) {
if ((nLength < 0) || ((!nLength) && (!(nLength === 0)))) {
return(sString.length >= nLength);
}
}
static function contains(sString, sChars) {
if (((sChars == null) || (sString == null)) || (sChars.length > sString.length)) {
return(false);
}
if (sString.indexOf(sChars) >= 0) {
return(true);
}
return(false);
}
static function startsWith(sString, sSearchString) {
if (sString.indexOf(sSearchString) == 0) {
return(true);
}
return(false);
}
static function endsWith(sString, sSearchString) {
if (sString.lastIndexOf(sSearchString) == (sString.length - sSearchString.length)) {
return(true);
}
return(false);
}
static function addSpaceIndent(sString, nSize) {
if (sString == null) {
sString = "";
}
if (nSize < 0) {
return(String(""));
}
var _local1 = multiply(" ", nSize);
return(_local1 + replace(sString, newline, newline + _local1));
}
static function multiply(sString, nFactor) {
var _local2 = "";
var _local1 = nFactor;
while (_local1 > 0) {
_local2 = _local2 + sString;
_local1--;
}
return(_local2);
}
static function ucFirst(sString) {
return(String(sString.charAt(0).toUpperCase() + sString.substr(1)));
}
static function ucWords(sString) {
var _local2 = sString.split(" ");
var _local3 = _local2.length;
var _local1 = 0;
while (_local1 < _local3) {
_local2[_local1] = ucFirst(_local2[_local1]);
_local1++;
}
return(String(_local2.join(" ")));
}
static function firstChar(sString) {
return(String(sString.charAt(0)));
}
static function lastChar(sString) {
return(String(sString.charAt(sString.length - 1)));
}
static function toBoolean(value) {
if ((value == "1") || (value == "true")) {
return(true);
}
return(false);
}
static function toNumber(value) {
var _local3 = parseInt(value);
var _local2 = parseFloat(value);
if (value == _local3) {
return(_local3);
}
if (value == _local2) {
return(_local2);
}
return(Number.NaN);
}
static function toArray(sString, sDelimeters, bTrim, bIgnoreEmpty) {
var _local7 = new Array();
var _local5 = sDelimeters.split("");
var _local6 = -1;
var _local3 = 0;
while (_local3 <= sString.length) {
var _local2 = 0;
while (_local2 < _local5.length) {
if ((sString.substr(_local3, 1) == _local5[_local2]) || ((_local2 == (_local5.length - 1)) && (_local3 == sString.length))) {
var _local1 = String(sString.slice(_local6 + 1, _local3));
if (bTrim) {
_local1 = trim(_local1);
}
if (!(bIgnoreEmpty && (_local1.length == 0))) {
_local7.push(_local1);
}
_local6 = _local3;
break;
}
_local2++;
}
_local3++;
}
return(_local7);
}
static function toTypedArray(sString, sDelimeters, fType, bTrim, bIgnoreEmpty) {
var _local2 = toArray(sString, sDelimeters, bTrim, bIgnoreEmpty);
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = fType(_local2[_local1]);
_local1++;
}
return(_local2);
}
static function getPath() {
}
}
Symbol 1044 MovieClip [__Packages.gdp.core.logger.publisher.ConsolePublisher] Frame 0
class gdp.core.logger.publisher.ConsolePublisher implements gdp.core.logger.publisher.IPublisher
{
var _maxDepth, _inProgressObjs, _inProgressSerial;
function ConsolePublisher () {
maxDepth = (4);
}
function set maxDepth(value) {
_maxDepth = ((_maxDepth > 255) ? 255 : (value));
//return(maxDepth);
}
function get maxDepth() {
return(_maxDepth);
}
function set showFunctions(value) {
_showFunctions = value;
//return(showFunctions);
}
function get showFunctions() {
return(_showFunctions);
}
function publish(e) {
_inProgressObjs = new Array();
_inProgressSerial = new Array();
var _local2 = gdp.core.logger.event.LogEvent.serialize(e);
_local2.argument = serializeObj(_local2.argument, 1);
_local2.version = _version;
var _local3 = new LocalConnection();
_local3.send("_luminicbox_log_console", "log", _local2);
}
function toString() {
return("gdp.core.logger.publisher.ConsolePublisher");
}
function serializeObj(o, depth) {
var _local15 = new Object();
var _local2 = getType(o);
_local15.type = _local2.name;
if (!_local2.inspectable) {
_local15.value = o;
} else if (_local2.stringify) {
_local15.value = o.toString();
} else {
var _local9 = new Array();
_local15.value = _local9;
if ((((_local2.name == "movieclip") || (_local2.name == "button")) || (_local2.name == "object")) || (_local2.name == "textfield")) {
_local15.id = "" + o;
}
var _local3 = 0;
while (_local3 < _inProgressObjs.length) {
if (_inProgressObjs[_local3] == o) {
var _local5 = _inProgressSerial[_local3];
var _local8 = {value:_local5.value, type:_local5.type, crossRef:true};
if (_local5.id) {
_local8.id = _local5.id;
}
return(_local8);
}
_local3++;
}
_inProgressObjs.push(o);
_inProgressSerial.push(_local15);
if (depth <= _maxDepth) {
if (_local2.properties) {
var _local14 = new Object();
_local3 = 0;
while (_local3 < _local2.properties.length) {
_local14[_local2.properties[_local3]] = o[_local2.properties[_local3]];
_local3++;
}
_local14 = serializeObj(_local14, _maxDepth);
_local14.type = "properties";
_local9.push({property:"$properties", value:_local14});
}
if (o instanceof Array) {
var _local6 = 0;
while (_local6 < o.length) {
_local9.push({property:_local6, value:serializeObj(o[_local6], depth + 1)});
_local6++;
}
} else {
for (var _local16 in o) {
if (!((o[_local16] instanceof Function) && (!_showFunctions))) {
var _local7 = true;
if (_local2.properties) {
_local3 = 0;
while (_local3 < _local2.properties.length) {
if (_local16 == _local2.properties[_local3]) {
_local7 = false;
}
_local3++;
}
}
if (_local7) {
_local9.push({property:_local16, value:serializeObj(o[_local16], depth + 1)});
}
}
}
}
} else {
_local15.reachLimit = true;
}
_inProgressObjs.pop();
_inProgressSerial.pop();
}
return(_local15);
}
function getType(o) {
var _local3 = typeof(o);
var _local1 = new Object();
_local1.inspectable = true;
_local1.name = _local3;
if (((((_local3 == "string") || (_local3 == "boolean")) || (_local3 == "number")) || (_local3 == "undefined")) || (_local3 == "null")) {
_local1.inspectable = false;
} else if (o instanceof Date) {
_local1.inspectable = false;
_local1.name = "date";
} else if (o instanceof Array) {
_local1.name = "array";
} else if (o instanceof Button) {
_local1.name = "button";
_local1.properties = gdp.core.logger.event.PropertyInspector.buttonProperties;
} else if (o instanceof MovieClip) {
_local1.name = "movieclip";
_local1.properties = gdp.core.logger.event.PropertyInspector.movieClipProperties;
} else if (o instanceof XML) {
_local1.name = "xml";
_local1.stringify = true;
} else if (o instanceof XMLNode) {
_local1.name = "xmlnode";
_local1.stringify = true;
} else if (o instanceof Color) {
_local1.name = "color";
} else if (o instanceof Sound) {
_local1.name = "sound";
_local1.properties = gdp.core.logger.event.PropertyInspector.soundProperties;
} else if (o instanceof TextField) {
_local1.name = "textfield";
_local1.properties = gdp.core.logger.event.PropertyInspector.textFieldProperties;
}
return(_local1);
}
var _version = 0.15;
var _showFunctions = false;
}
Symbol 1045 MovieClip [__Packages.gdp.core.logger.event.PropertyInspector] Frame 0
class gdp.core.logger.event.PropertyInspector
{
function PropertyInspector () {
}
static var movieClipProperties = new Array("_alpha", "_currentframe", "_droptarget", "enabled", "focusEnabled", "_focusrect", "_framesloaded", "_height", "hitArea", "_lockroot", "menu", "_name", "_parent", "_quality", "_rotation", "_soundbuftime", "tabChildren", "tabEnabled", "tabIndex", "_target", "_totalframes", "trackAsMenu", "_url", "useHandCursor", "_visible", "_width", "_x", "_xmouse", "_xscale", "_y", "_ymouse", "_yscale");
static var buttonProperties = new Array("_alpha", "enabled", "_focusrect", "_height", "_quality", "menu", "_name", "_parent", "_quality", "_rotation", "_soundbuftime", "tabEnabled", "tabIndex", "_target", "trackAsMenu", "_url", "useHandCursor", "_visible", "_width", "_x", "_xmouse", "_xscale", "_y", "_ymouse", "_yscale");
static var soundProperties = new Array("duration", "id3", "position");
static var textFieldProperties = new Array("_alpha", "autoSize", "background", "backgroundColor", "border", "borderColor", "bottomScroll", "condenseWhite", "embedFonts", "_height", "hscroll", "html", "htmlText", "length", "maxChars", "maxhscroll", "maxscroll", "menu", "mouseWheelEnabled", "multiline", "_name", "_parent", "password", "_quality", "restrict", "_rotation", "scroll", "selectable", "styleSheet", "tabEnabled", "tabIndex", "_target", "text", "textColor", "textHeight", "textWidth", "type", "_url", "variable", "_visible", "_width", "wordWrap", "_x", "_xmouse", "_xscale", "_y", "_ymouse", "_yscale");
}
Symbol 1046 MovieClip [__Packages.gdp.env.except.Throwable] Frame 0
interface gdp.env.except.Throwable
{
}
Symbol 1047 MovieClip [__Packages.gdp.env.except.IllegalStateException] Frame 0
class gdp.env.except.IllegalStateException extends gdp.env.except.FatalException
{
function IllegalStateException (message, thrower, aArgs) {
super(message, thrower, aArgs);
}
}
Symbol 1048 MovieClip [__Packages.gdp.env.except.FatalException] Frame 0
class gdp.env.except.FatalException extends gdp.env.except.AbstractThrowable implements gdp.env.except.Throwable
{
function FatalException (message, thrower, aArgs) {
super(message, thrower, aArgs);
}
}
Symbol 1049 MovieClip [__Packages.gdp.env.except.IllegalArgumentException] Frame 0
class gdp.env.except.IllegalArgumentException extends gdp.env.except.FatalException
{
var aArgs;
function IllegalArgumentException (message, thrower, args) {
super(message, thrower, aArgs);
}
}
Symbol 1050 MovieClip [__Packages.gdp.env.reflect.ReflectUtil] Frame 0
class gdp.env.reflect.ReflectUtil extends gdp.core.base.BaseClass
{
function ReflectUtil (Void) {
super();
}
static function getUnusedMemberName(object) {
var _local1 = 10000;
var _local3 = MEMBER_PREFIX + "_";
var _local2 = MEMBER_PREFIX + "-";
while (_local1-- , _local1 - -1) {
if (object[_local3 + _local1] === undefined) {
return(_local3 + _local1);
}
if (object[_local2 + _local1] === undefined) {
return(_local2 + _local1);
}
}
return(null);
}
static function getTypeAndMethodInfo(object, method) {
if ((object === null) || (object === undefined)) {
return(null);
}
if (typeof(object) == "function") {
return(getTypeAndMethodInfoByType(object, method));
}
return(getTypeAndMethodInfoByInstance(object, method));
}
static function getTypeAndMethodInfoByType(type, method) {
if ((type === null) || (type === undefined)) {
return(null);
}
if (method.valueOf() == type.valueOf()) {
return([false, getTypeNameForType(type), CONSTRUCTOR]);
}
var _local2 = getMethodNameByObject(method, type);
if ((!(_local2 === null)) && (!(_local2 === undefined))) {
return([true, getTypeNameForType(type), _local2]);
}
return(getTypeAndMethodInfoByPrototype(type.prototype, method));
}
static function getTypeAndMethodInfoByInstance(instance, method) {
if ((instance === null) || (instance === undefined)) {
return(null);
}
if (instance.__constructor__) {
if (instance.__constructor__.prototype == instance.__proto__) {
return(getTypeAndMethodInfoByType(instance.__constructor__, method));
}
}
if (instance.constructor) {
var _local2 = instance.constructor;
if (_local2.prototype == instance.__proto__) {
return(getTypeAndMethodInfoByType(instance.constructor, method));
}
}
return(getTypeAndMethodInfoByPrototype(instance.__proto__, method));
}
static function getTypeAndMethodInfoByPrototype(p, m) {
if ((p === null) || (p === undefined)) {
return(null);
}
var _local6 = p;
_global.ASSetPropFlags(_global, null, 0, true);
var _local4;
while (p) {
if (p.constructor.valueOf() == m.valueOf()) {
_local4 = CONSTRUCTOR;
} else {
_local4 = getMethodNameByObject(m, p);
}
if (_local4 != null) {
var _local3 = new Array();
_local3[0] = false;
_local3[1] = getTypeNameByPrototype(p, _global, "", [_global]);
_local3[2] = _local4;
return(_local3);
}
p = p.__proto__;
}
return([null, getTypeNameByPrototype(_local6, _global, "", [_global]), null]);
}
static function getTypeName(object) {
if ((object === null) || (object === undefined)) {
return(null);
}
if (typeof(object) == "function") {
return(getTypeNameForType(object));
}
return(getTypeNameForInstance(object));
}
static function getTypeNameForInstance(instance) {
if ((instance === null) || (instance === undefined)) {
return(null);
}
_global.ASSetPropFlags(_global, null, 0, true);
return(getTypeNameByPrototype(instance.__proto__, _global, "", [_global]));
}
static function getTypeNameForType(type) {
if ((type === null) || (type === undefined)) {
return(null);
}
_global.ASSetPropFlags(_global, null, 0, true);
return(getTypeNameByPrototype(type.prototype, _global, "", [_global]));
}
static function getTypeNameByPrototype(c, p, n, a) {
var y = c.__as2lib__typeName;
if ((y != null) && (y != c.__proto__.__as2lib__typeName)) {
return(y);
}
if (n == null) {
n = "";
}
var s = _global.ASSetPropFlags;
for (var r in p) {
try {
if (((!eval ("_global." + r.split("_").join("."))) || (r.indexOf("_") < 0)) && (p[r].prototype === c)) {
var x = (n + r);
c.__as2lib__typeName = x;
s(c, "__as2lib__typeName", 1, true);
return(x);
}
if (p[r].__constructor__.valueOf() == Object) {
var f = false;
var i = 0;
while (i < a.length) {
if (a[i].valueOf() == p[r].valueOf()) {
f = true;
}
i++;
}
if (!f) {
a.push(p[r]);
r = getTypeNameByPrototype(c, p[r], (n + r) + ".", a);
if (r) {
return(r);
}
}
} else if (typeof(p[r]) == "function") {
p[r].prototype.__as2lib__typeName = n + r;
s(p[r].prototype, "__as2lib__typeName", 1, true);
}
} catch(e) {
}
}
return(null);
}
static function getMethodName(method, object) {
if (((!method) || (object === null)) || (object === undefined)) {
return(null);
}
if (typeof(object) == "function") {
return(getMethodNameByType(method, object));
}
return(getMethodNameByInstance(method, object));
}
static function getMethodNameByInstance(method, instance) {
if (((!method) || (instance === null)) || (instance === undefined)) {
return(null);
}
if (instance.__constructor__) {
if (instance.__constructor__.prototype == instance.__proto__) {
return(getMethodNameByType(method, instance.__constructor__));
}
}
if (instance.constructor) {
var _local3 = instance.constructor;
if (_local3.prototype == instance.__proto__) {
return(getMethodNameByType(method, instance.constructor));
}
}
return(getMethodNameByPrototype(method, instance.__proto__));
}
static function getMethodNameByType(method, type) {
if ((!method) || (!type)) {
return(null);
}
var _local1 = getMethodNameByPrototype(method, type.prototype);
if (_local1 != null) {
return(_local1);
}
return(getMethodNameByObject(method, type));
}
static function getMethodNameByPrototype(m, p) {
if ((((m === null) || (m === undefined)) || (p === null)) || (p === undefined)) {
return(null);
}
while (p) {
var _local2 = getMethodNameByObject(m, p);
if (_local2 != null) {
return(_local2);
}
p = p.__proto__;
}
return(null);
}
static function getMethodNameByObject(m, o) {
var _local6 = m.__as2lib__methodName;
if (_local6 != null) {
return(_local6);
}
var _local5 = _global.ASSetPropFlags;
_local5(o, null, 0, true);
_local5(o, ["__proto__", "prototype", "__constructor__", "constructor"], 7, true);
for (var _local4 in o) {
try {
if (o[_local4].valueOf() == m.valueOf()) {
m.__as2lib__methodName = _local4;
return(_local4);
}
if (typeof(o[_local4]) == "function") {
o[_local4].__as2lib__methodName = _local4;
}
} catch(e) {
}
}
_local5(o, null, 1, true);
return(null);
}
static function isMethodStatic(methodName, object) {
if (((!methodName) || (object === null)) || (object === undefined)) {
return(false);
}
if (typeof(object) == "function") {
return(isMethodStaticByType(methodName, object));
}
return(isMethodStaticByInstance(methodName, object));
}
static function isMethodStaticByInstance(methodName, instance) {
if (((!methodName) || (instance === null)) || (instance === undefined)) {
return(false);
}
return(isMethodStaticByType(methodName, (instance.__constructor__ ? (instance.__constructor) : (instance.constructor))));
}
static function isMethodStaticByType(methodName, type) {
if ((!methodName) || (!type)) {
return(false);
}
try {
if (type[methodName]) {
return(true);
}
} catch(e) {
}
return(false);
}
static function isConstructor(constructor, object) {
if ((((constructor === null) || (constructor === undefined)) || (object === null)) || (object === undefined)) {
return(false);
}
if (typeof(object) == "function") {
return(isConstructorByType(constructor, object));
}
return(isConstructorByInstance(constructor, object));
}
static function isConstructorByInstance(method, instance) {
if (((!method) || (instance === null)) || (instance === undefined)) {
return(false);
}
return(isConstructorByType(method, (instance.__constructor__ ? (instance.__constructor__) : (instance.constructor))));
}
static function isConstructorByType(method, type) {
if ((((method === null) || (method === undefined)) || (type === null)) || (type === undefined)) {
return(false);
}
return(method.valueOf() == type.valueOf());
}
static function getVariableNames(instance) {
var _local3 = new Array();
var _local5 = _global.ASSetPropFlags;
_local5(instance, null, 0, true);
_local5(instance, ["__proto__", "prototype", "__constructor__", "constructor"], 7, true);
for (var _local4 in instance) {
try {
if (typeof(instance[_local4]) != "function") {
_local3.push(_local4);
}
} catch(e) {
}
}
_local5(instance, null, 1, true);
return(_local3);
}
static function getTypeByName(path) {
var result = eval ("_global." + path);
if (!result) {
result = eval ("_global." + path.split(".").join("_"));
}
return(result);
}
static var CONSTRUCTOR = "new";
static var UNKNOWN = "[unknown]";
static var MEMBER_PREFIX = "__as2lib__member";
}
Symbol 1051 MovieClip [__Packages.gdp.env.overload.OverloadException] Frame 0
class gdp.env.overload.OverloadException extends gdp.env.except.FatalException
{
function OverloadException (message, thrower, args) {
super(message, thrower, args);
}
}
Symbol 1052 MovieClip [__Packages.gdp.env.overload.UnknownOverloadHandlerException] Frame 0
class gdp.env.overload.UnknownOverloadHandlerException extends gdp.env.overload.OverloadException
{
var overloadTarget, overloadedMethod, overloadArguments, overloadHandlers, asString, message;
function UnknownOverloadHandlerException (message, thrower, args, overloadTarget, overloadedMethod, overloadArguments, overloadHandlers) {
super(message, thrower, args);
this.overloadTarget = overloadTarget;
this.overloadedMethod = overloadedMethod;
this.overloadArguments = overloadArguments;
this.overloadHandlers = overloadHandlers;
}
function toString(Void) {
if (!asString) {
asString = message;
var _local3 = gdp.env.reflect.ReflectUtil.getTypeAndMethodInfo(overloadTarget, overloadedMethod);
asString = asString + "\n Overloaded Method: ";
asString = asString + ((_local3[0] == null) ? "[unknown]" : ((_local3[0] ? "static " : "")));
asString = asString + ((_local3[1] == null) ? "[unknown]" : (_local3[1]));
asString = asString + ("." + ((_local3[2] == null) ? "[unknown]" : (_local3[2])));
asString = asString + (("\n Used Arguments[" + overloadArguments.length) + "]: ");
var _local2 = 0;
while (_local2 < overloadArguments.length) {
if (_local2 != 0) {
asString = asString + ", ";
}
asString = asString + overloadArguments[_local2];
_local2++;
}
asString = asString + "\n Used Handlers: ";
_local2 = 0;
while (_local2 < overloadHandlers.length) {
asString = asString + ("\n " + overloadHandlers[_local2].toString());
_local2++;
}
}
return(asString);
}
}
Symbol 1053 MovieClip [__Packages.gdp.env.overload.SameTypeSignatureException] Frame 0
class gdp.env.overload.SameTypeSignatureException extends gdp.env.overload.OverloadException
{
var overloadTarget, overloadedMethod, overloadArguments, overloadHandlers, asString, message;
function SameTypeSignatureException (message, thrower, args, overloadTarget, overloadedMethod, overloadArguments, overloadHandlers) {
super(message, thrower, args);
this.overloadTarget = overloadTarget;
this.overloadedMethod = overloadedMethod;
this.overloadArguments = overloadArguments;
this.overloadHandlers = overloadHandlers;
}
function toString(Void) {
if (!asString) {
asString = message;
var _local3 = gdp.env.reflect.ReflectUtil.getTypeAndMethodInfo(overloadTarget, overloadedMethod);
asString = asString + "\n Overloaded Method: ";
asString = asString + ((_local3[0] == null) ? "[unknown]" : ((_local3[0] ? "static " : "")));
asString = asString + ((_local3[1] == null) ? "[unknown]" : (_local3[1]));
asString = asString + ("." + ((_local3[2] == null) ? "[unknown]" : (_local3[2])));
asString = asString + (("\n Used Arguments[" + overloadArguments.length) + "]: ");
var _local2 = 0;
while (_local2 < overloadArguments.length) {
if (_local2 != 0) {
asString = asString + ", ";
}
asString = asString + overloadArguments[_local2];
_local2++;
}
asString = asString + "\n Used Handlers: ";
_local2 = 0;
while (_local2 < overloadHandlers.length) {
asString = asString + ("\n " + overloadHandlers[_local2].toString());
_local2++;
}
}
return(asString);
}
}
Symbol 1054 MovieClip [__Packages.gdp.env.except.Exception] Frame 0
class gdp.env.except.Exception extends gdp.env.except.AbstractThrowable implements gdp.env.except.Throwable
{
var aArgs;
function Exception (message, thrower, args) {
super(message, thrower, aArgs);
}
}
Symbol 1055 MovieClip [__Packages.gdp.env.reflect.ReflectionException] Frame 0
class gdp.env.reflect.ReflectionException extends gdp.env.except.Exception
{
function ReflectionException (message, thrower, args) {
super(message, thrower, args);
}
}
Symbol 1056 MovieClip [__Packages.gdp.env.reflect.PackageNotFoundException] Frame 0
class gdp.env.reflect.PackageNotFoundException extends gdp.env.reflect.ReflectionException
{
function PackageNotFoundException (message, thrower, args) {
super(message, thrower, args);
}
}
Symbol 1057 MovieClip [__Packages.gdp.env.reflect.algorithm.PackageMemberAlgorithm] Frame 0
class gdp.env.reflect.algorithm.PackageMemberAlgorithm extends gdp.core.base.BaseClass
{
var c;
function PackageMemberAlgorithm (Void) {
super();
}
function setCache(cache) {
c = cache;
}
function getCache(Void) {
if (!c) {
c = gdp.env.reflect.ReflectConfig.getCache();
}
return(c);
}
function execute(p) {
if (p == null) {
return(null);
}
var t = p.getPackage();
if (!t) {
return(null);
}
_global.ASSetPropFlags(t, null, 0, true);
_global.ASSetPropFlags(t, ["__proto__", "constructor", "__constructor__", "prototype"], 1, true);
getCache();
var r = new Array();
var n = new Array();
r.classes = n;
var m = new Array();
r.packages = m;
var i;
for (i in t) {
if (((typeof(t[i]) == "function") && (!(t[i].prototype === undefined))) && (!(t[i].prototype === null))) {
if ((!eval ("_global." + i.split("_").join("."))) || (i.indexOf("_") < 0)) {
var b = c.getClassByClass(t[i]);
if (!b) {
b = c.addClass(new gdp.env.reflect.ClassInfo(t[i], i, p));
}
r[r.length] = b;
r[i] = b;
n[n.length] = b;
n[i] = b;
}
} else if (typeof(t[i]) == "object") {
var a = c.getPackage(t[i]);
if (!a) {
a = c.addPackage(new gdp.env.reflect.PackageInfo(t[i], i, p));
}
r[r.length] = a;
r[i] = a;
m[m.length] = a;
m[i] = a;
}
}
return(r);
}
}
Symbol 1058 MovieClip [__Packages.gdp.env.reflect.PackageMemberFilter] Frame 0
interface gdp.env.reflect.PackageMemberFilter extends gdp.core.base.BaseInterface
{
}
Symbol 1059 MovieClip [__Packages.gdp.env.reflect.TypeMemberFilter] Frame 0
interface gdp.env.reflect.TypeMemberFilter extends gdp.core.base.BaseInterface
{
}
Symbol 1060 MovieClip [__Packages.gdp.env.reflect.TypeMemberInfo] Frame 0
interface gdp.env.reflect.TypeMemberInfo extends gdp.env.reflect.MemberInfo
{
}
Symbol 1061 MovieClip [__Packages.gdp.env.reflect.MethodInfo] Frame 0
class gdp.env.reflect.MethodInfo extends gdp.core.base.BaseClass implements gdp.env.reflect.TypeMemberInfo
{
static var stringifier;
var name, declaringType, staticFlag, method;
function MethodInfo (name, declaringType, staticFlag, method) {
super();
this.name = name;
this.declaringType = declaringType;
this.staticFlag = staticFlag;
this.method = method;
}
static function getStringifier(Void) {
if (!stringifier) {
stringifier = new gdp.env.reflect.stringifier.MethodInfoStringifier();
}
return(stringifier);
}
static function setStringifier(methodInfoStringifier) {
stringifier = methodInfoStringifier;
}
function getName(Void) {
return(name);
}
function getFullName(Void) {
if (declaringType.getFullName()) {
return((declaringType.getFullName() + ".") + name);
}
return(name);
}
function getMethod(Void) {
if (!(method === undefined)) {
return(method);
}
var _local2 = declaringType.getType();
if (staticFlag) {
if (_local2[name] != _local2.__proto__[name]) {
return(_local2[name]);
}
}
var _local3 = _local2.prototype;
if (_local3[name] != _local3.__proto__[name]) {
return(_local3[name]);
}
return(null);
}
function getDeclaringType(Void) {
return(declaringType);
}
function invoke(scope, args) {
if (!staticFlag) {
var _local5 = declaringType.getType();
if (scope instanceof _local5) {
var _local3 = _local5.prototype;
if (scope.__proto__ != _local3) {
var _local2 = scope.__proto__;
while (_local2.__proto__ != _local3) {
_local2 = _local2.__proto__;
}
_local2.__as2lib__invoker = INVOKER;
return(scope.__as2lib__invoker(_local2, getMethod(), args));
}
}
}
return(getMethod().apply(scope, args));
}
function isStatic(Void) {
return(staticFlag);
}
function snapshot(Void) {
return(new gdp.env.reflect.MethodInfo(name, declaringType, staticFlag, getMethod()));
}
function toString() {
return(getStringifier().execute(this));
}
function INVOKER(object, method, args) {
delete object.__as2lib__invoker;
return(method.apply(super, args));
}
}
Symbol 1062 MovieClip [__Packages.gdp.utils.Stringifier] Frame 0
interface gdp.utils.Stringifier extends gdp.core.base.BaseInterface
{
}
Symbol 1063 MovieClip [__Packages.gdp.env.reflect.stringifier.MethodInfoStringifier] Frame 0
class gdp.env.reflect.stringifier.MethodInfoStringifier extends gdp.core.base.BaseClass implements gdp.utils.Stringifier
{
function MethodInfoStringifier () {
super();
}
function execute(target) {
var _local2 = gdp.env.reflect.MethodInfo(target);
var _local1 = "";
if (_local2.isStatic()) {
_local1 = _local1 + "static ";
}
_local1 = _local1 + _local2.getDeclaringType().getFullName();
_local1 = _local1 + ("." + _local2.getName());
return(_local1);
}
}
Symbol 1064 MovieClip [__Packages.gdp.env.reflect.ClassInfo] Frame 0
class gdp.env.reflect.ClassInfo extends gdp.core.base.BaseClass implements gdp.env.reflect.TypeInfo
{
static var classAlgorithm, methodAlgorithm, propertyAlgorithm;
var clazz, name, package, fullName, classConstructor, superClass, methods, properties;
function ClassInfo (clazz, name, package) {
super();
this.clazz = clazz;
this.name = name;
this.package = package;
}
static function forName(className) {
return(getClassAlgorithm().executeByName(className));
}
static function forObject(object) {
if ((object === null) || (object === undefined)) {
throw new gdp.env.except.IllegalArgumentException(("Argument 'object' [" + object) + "] must not be 'null' or 'undefined'.", this, arguments);
}
var classInfo = gdp.env.reflect.ReflectConfig.getCache().getClass(object);
if (classInfo) {
return(classInfo);
}
if (typeof(object) == "function") {
return(forClass(object));
}
return(forInstance(object));
}
static function forInstance(instance) {
if ((instance === null) || (instance === undefined)) {
throw new gdp.env.except.IllegalArgumentException(("Argument 'instance' [" + instance) + "] must not be 'null' or 'undefined'.", this, arguments);
}
var classInfo = gdp.env.reflect.ReflectConfig.getCache().getClassByInstance(instance);
if (classInfo) {
return(classInfo);
}
if (instance.__constructor__) {
if (instance.__constructor__.prototype == instance.__proto__) {
return(gdp.env.reflect.ReflectConfig.getCache().addClass(new gdp.env.reflect.ClassInfo(instance.__constructor__)));
}
}
if (instance.constructor) {
var _constructor = instance.constructor;
if (_constructor.prototype == instance.__proto__) {
return(gdp.env.reflect.ReflectConfig.getCache().addClass(new gdp.env.reflect.ClassInfo(instance.constructor)));
}
}
var info = getClassAlgorithm().executeByInstance(instance);
if (info) {
if (info.name == null) {
info.name = null;
}
if (!info.clazz) {
info.clazz = null;
}
if (!info.package) {
info.package = null;
}
return(gdp.env.reflect.ReflectConfig.getCache().addClass(new gdp.env.reflect.ClassInfo(info.clazz, info.name, info.package)));
}
throw new gdp.env.reflect.ClassNotFoundException(("The class corresponding to the passed-in instance '" + instance) + "' could not be found.", this, arguments);
}
static function forClass(clazz) {
if ((clazz === null) || (clazz === undefined)) {
throw new gdp.env.except.IllegalArgumentException(("Argument 'clazz' [" + clazz) + "] must not be 'null' or 'undefined'.", this, arguments);
}
var classInfo = gdp.env.reflect.ReflectConfig.getCache().getClassByClass(clazz);
if (classInfo) {
return(classInfo);
}
return(gdp.env.reflect.ReflectConfig.getCache().addClass(new gdp.env.reflect.ClassInfo(clazz)));
}
static function setClassAlgorithm(newClassAlgorithm) {
classAlgorithm = newClassAlgorithm;
}
static function getClassAlgorithm(Void) {
if (!classAlgorithm) {
classAlgorithm = new gdp.env.reflect.algorithm.ClassAlgorithm();
}
return(classAlgorithm);
}
static function setMethodAlgorithm(newMethodAlgorithm) {
methodAlgorithm = newMethodAlgorithm;
}
static function getMethodAlgorithm(Void) {
if (!methodAlgorithm) {
methodAlgorithm = new gdp.env.reflect.algorithm.MethodAlgorithm();
}
return(methodAlgorithm);
}
static function setPropertyAlgorithm(newPropertyAlgorithm) {
propertyAlgorithm = newPropertyAlgorithm;
}
static function getPropertyAlgorithm(Void) {
if (!propertyAlgorithm) {
propertyAlgorithm = new gdp.env.reflect.algorithm.PropertyAlgorithm();
}
return(propertyAlgorithm);
}
function getName(Void) {
if (name === undefined) {
initNameAndPackage();
}
return(name);
}
function getFullName(Void) {
if (fullName === undefined) {
if (getPackage().isRoot() || (!getPackage())) {
return((fullName = getName()));
}
fullName = (getPackage().getFullName() + ".") + getName();
}
return(fullName);
}
function getType(Void) {
return(clazz);
}
function getConstructor(Void) {
if (classConstructor === undefined) {
classConstructor = new gdp.env.reflect.ConstructorInfo(this);
}
return(classConstructor);
}
function getSuperType(Void) {
if (superClass === undefined) {
if (clazz === Object) {
superClass = null;
} else if (clazz.prototype.__proto__) {
superClass = forInstance(clazz.prototype);
} else {
superClass = null;
}
}
return(superClass);
}
function newInstance() {
return(gdp.utils.ClassUtil.createInstance(getConstructor().getMethod(), arguments));
}
function getPackage(Void) {
if (package === undefined) {
initNameAndPackage();
}
return(package);
}
function initNameAndPackage(Void) {
var _local2 = getClassAlgorithm().executeByClass(clazz);
if (name === undefined) {
name = ((_local2.name == null) ? null : (_local2.name));
}
if (package === undefined) {
package = ((_local2.package == null) ? null : (_local2.package));
}
}
function hasMethod(methodName, filterStaticMethods) {
if (methodName == null) {
return(false);
}
if (filterStaticMethods == null) {
filterStaticMethods = false;
}
if (clazz.prototype[methodName]) {
return(true);
}
if (filterStaticMethods) {
return(false);
}
if (clazz[methodName]) {
return(true);
}
var _local2 = getSuperType();
while (_local2) {
if (_local2.getType()[methodName]) {
return(true);
}
_local2 = _local2.getSuperType();
}
return(false);
}
function getMethods() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([], getMethodsByFlag);
_local3.addHandler([Boolean], getMethodsByFlag);
_local3.addHandler([gdp.env.reflect.TypeMemberFilter], getMethodsByFilter);
return(_local3.forward(arguments));
}
function getMethodsByFlag(filterSuperClasses) {
if (!clazz) {
return(null);
}
if (methods === undefined) {
methods = getMethodAlgorithm().execute(this);
}
var _local2 = methods.concat();
if (!filterSuperClasses) {
if (getSuperType() != null) {
_local2 = _local2.concat(getSuperType().getMethodsByFlag(filterSuperClasses));
}
}
return(_local2);
}
function getMethodsByFilter(methodFilter) {
if (!clazz) {
return(null);
}
if (!methodFilter) {
return(getMethodsByFlag(false));
}
var _local3 = getMethodsByFlag(methodFilter.filterSuperTypes());
var _local2 = 0;
while (_local2 < _local3.length) {
if (methodFilter.filter(_local3[_local2])) {
_local3.splice(_local2, 1);
_local2--;
}
_local2++;
}
return(_local3);
}
function getMethod() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([String], getMethodByName);
_local3.addHandler([Function], getMethodByMethod);
return(_local3.forward(arguments));
}
function getMethodByName(methodName) {
if (methodName == null) {
return(null);
}
if (getMethodsByFlag(true)) {
if (methods[methodName]) {
return(methods[methodName]);
}
}
if (getSuperType()) {
return(getSuperType().getMethodByName(methodName));
}
return(null);
}
function getMethodByMethod(concreteMethod) {
if (!concreteMethod) {
return(null);
}
var _local4 = getMethodsByFlag(true);
if (_local4) {
var _local5 = _local4.length;
var _local2 = 0;
while (_local2 < _local5) {
var _local3 = _local4[_local2];
if (_local3.getMethod().valueOf() == concreteMethod.valueOf()) {
return(_local3);
}
_local2 = _local2 - -1;
}
}
if (getSuperType()) {
return(getSuperType().getMethodByMethod(concreteMethod));
}
return(null);
}
function hasProperty(propertyName, filterStaticProperties) {
if (propertyName == null) {
return(false);
}
if (filterStaticProperties == null) {
filterStaticProperties = false;
}
if (clazz.prototype["__get__" + propertyName]) {
return(true);
}
if (clazz.prototype["__set__" + propertyName]) {
return(true);
}
if (filterStaticProperties) {
return(false);
}
if (clazz[propertyName]) {
return(true);
}
var _local2 = getSuperType();
while (_local2) {
if (_local2.getType()["__set__" + propertyName] || (_local2.getType()["__get__" + propertyName])) {
return(true);
}
_local2 = _local2.getSuperType();
}
return(false);
}
function getProperties() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([], getPropertiesByFlag);
_local3.addHandler([Boolean], getPropertiesByFlag);
_local3.addHandler([gdp.env.reflect.TypeMemberFilter], getPropertiesByFilter);
return(_local3.forward(arguments));
}
function getPropertiesByFlag(filterSuperClasses) {
if (!clazz) {
return(null);
}
if (properties === undefined) {
properties = getPropertyAlgorithm().execute(this);
}
var _local2 = properties.concat();
if (!filterSuperClasses) {
if (getSuperType() != null) {
_local2 = _local2.concat(gdp.env.reflect.ClassInfo(getSuperType()).getPropertiesByFlag(filterSuperClasses));
}
}
return(_local2);
}
function getPropertiesByFilter(propertyFilter) {
if (!clazz) {
return(null);
}
if (!propertyFilter) {
return(getPropertiesByFlag(false));
}
var _local3 = getPropertiesByFlag(propertyFilter.filterSuperTypes());
var _local2 = 0;
while (_local2 < _local3.length) {
if (propertyFilter.filter(gdp.env.reflect.PropertyInfo(_local3[_local2]))) {
_local3.splice(_local2, 1);
_local2--;
}
_local2++;
}
return(_local3);
}
function getProperty() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([String], getPropertyByName);
_local3.addHandler([Function], getPropertyByProperty);
return(_local3.forward(arguments));
}
function getPropertyByName(propertyName) {
if (propertyName == null) {
return(null);
}
if (getPropertiesByFlag(true)) {
if (properties[propertyName]) {
return(properties[propertyName]);
}
}
if (getSuperType()) {
return(gdp.env.reflect.ClassInfo(getSuperType()).getPropertyByName(propertyName));
}
return(null);
}
function getPropertyByProperty(concreteProperty) {
if (concreteProperty == null) {
return(null);
}
var _local5 = getPropertiesByFlag(true);
if (_local5) {
var _local6 = _local5.length;
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = _local5[_local3];
if ((_local2.getGetter().getMethod().valueOf() == concreteProperty.valueOf()) || (_local2.getSetter().getMethod().valueOf() == concreteProperty.valueOf())) {
return(_local2);
}
_local3++;
}
}
if (getSuperType()) {
return(gdp.env.reflect.ClassInfo(getSuperType()).getPropertyByProperty(concreteProperty));
}
return(null);
}
function toString() {
var _local5 = "[reflection " + getFullName();
if (arguments[0] == true) {
var _local4 = getMethods();
var _local3 = 0;
while (_local3 < _local4.length) {
_local5 = _local5 + (newline + gdp.utils.StringUtil.addSpaceIndent(_local4[_local3].toString(), 2));
_local3++;
}
if (_local4.length > 0) {
_local5 = _local5 + newline;
}
}
return(_local5 + "]");
}
}
Symbol 1065 MovieClip [__Packages.gdp.env.reflect.algorithm.ClassAlgorithm] Frame 0
class gdp.env.reflect.algorithm.ClassAlgorithm extends gdp.core.base.BaseClass
{
var c, r;
function ClassAlgorithm (Void) {
super();
}
function setCache(cache) {
c = cache;
}
function getCache(Void) {
if (!c) {
c = gdp.env.reflect.ReflectConfig.getCache();
}
return(c);
}
function execute(d) {
if (typeof(d) == "function") {
return(executeByClass(d));
}
return(executeByInstance(d));
}
function executeByClass(d) {
if ((d === null) || (d === undefined)) {
return(null);
}
return(executeByComparator(function (f) {
return(f.valueOf() == d.valueOf());
}));
}
function executeByInstance(d) {
if ((d === null) || (d === undefined)) {
return(null);
}
return(executeByComparator(function (f) {
return(f.prototype === d.__proto__);
}));
}
function executeByComparator(v) {
if (!v) {
return(null);
}
r = null;
var _local4 = getCache().getRoot();
var _local3 = _local4.getPackage();
if (!_local3) {
_local3 = _global;
}
_global.ASSetPropFlags(_local3, null, 0, true);
_global.ASSetPropFlags(_local3, ["__proto__", "constructor", "__constructor__", "prototype"], 1, true);
findAndStore(_local4, v);
return(r);
}
function findAndStore(a, v) {
var p = a.getPackage();
var i;
for (i in p) {
var f = p[i];
if (typeof(f) == "function") {
if (v(f)) {
if ((!eval ("_global." + i.split("_").join("."))) || (i.indexOf("_") < 0)) {
r = new Object();
r.clazz = f;
r.name = i;
r.package = a;
return(true);
}
}
} else if (typeof(f) == "object") {
var e = c.getPackage(f);
if (!e) {
e = c.addPackage(new gdp.env.reflect.PackageInfo(f, i, a));
}
if (!e.isParentPackage(a)) {
if (findAndStore(e, v)) {
return(true);
}
}
}
}
return(false);
}
function executeByName(n) {
if (!n) {
throw new gdp.env.except.IllegalArgumentException(("The passed-in class name '" + n) + "' is not allowed to be null, undefined or an empty string.", this, arguments);
}
var p = getCache().getRoot();
var x = p.getFullName();
if (!x) {
x = "_global";
}
var f = eval ((x + ".") + n);
if (!f) {
throw new gdp.env.reflect.ClassNotFoundException(("A class with the name '" + n) + "' could not be found.", this, arguments);
}
if (typeof(f) != "function") {
throw new gdp.env.except.IllegalArgumentException(("The object corresponding to the passed-in class name '" + n) + "' is not of type function.", this, arguments);
}
var r = c.getClassByClass(f);
if (r) {
return(r);
}
var a = n.split(".");
var g = p.getPackage();
var i = 0;
while (i < a.length) {
if (i == (a.length - 1)) {
return(c.addClass(new gdp.env.reflect.ClassInfo(f, a[i], p)));
}
g = g[a[i]];
p = c.addPackage(new gdp.env.reflect.PackageInfo(g, a[i], p));
i++;
}
return(null);
}
}
Symbol 1066 MovieClip [__Packages.gdp.env.reflect.ClassNotFoundException] Frame 0
class gdp.env.reflect.ClassNotFoundException extends gdp.env.reflect.ReflectionException
{
function ClassNotFoundException (message, thrower, args) {
super(message, thrower, args);
}
}
Symbol 1067 MovieClip [__Packages.gdp.env.reflect.algorithm.MethodAlgorithm] Frame 0
class gdp.env.reflect.algorithm.MethodAlgorithm extends gdp.core.base.BaseClass
{
var i, r, s;
function MethodAlgorithm (Void) {
super();
}
function execute(i) {
if (i == null) {
return(null);
}
var _local3 = i.getType();
if (!_local3) {
return(null);
}
this.i = i;
r = new Array();
s = true;
_global.ASSetPropFlags(_local3, null, 0, true);
_global.ASSetPropFlags(_local3, ["__proto__", "constructor", "__constructor__", "prototype"], 1, true);
search(_local3);
s = false;
var _local4 = _local3.prototype;
_global.ASSetPropFlags(_local4, null, 0, true);
_global.ASSetPropFlags(_local4, ["__proto__", "constructor", "__constructor__", "prototype"], 1, true);
search(_local4);
_global.ASSetPropFlags(_local3, null, 1, true);
_global.ASSetPropFlags(_local4, null, 1, true);
return(r);
}
function search(t) {
var _local2;
for (_local2 in t) {
if (((typeof(t[_local2]) == "function") && (_local2.indexOf("__get__") < 0)) && (_local2.indexOf("__set__") < 0)) {
r[r.length] = new gdp.env.reflect.MethodInfo(_local2, i, s);
r[_local2] = r[r.length - 1];
}
}
}
}
Symbol 1068 MovieClip [__Packages.gdp.env.reflect.algorithm.PropertyAlgorithm] Frame 0
class gdp.env.reflect.algorithm.PropertyAlgorithm extends gdp.core.base.BaseClass
{
var c, r, g, s, a;
function PropertyAlgorithm (Void) {
super();
}
function execute(c) {
if (c == null) {
return(null);
}
var _local3 = c.getType();
if (!_local3) {
return(null);
}
this.c = c;
r = new Array();
g = new Object();
s = new Object();
a = true;
_global.ASSetPropFlags(_local3, null, 0, true);
_global.ASSetPropFlags(_local3, ["__proto__", "constructor", "prototype"], 1, true);
search(_local3);
a = false;
var _local4 = _local3.prototype;
_global.ASSetPropFlags(_local4, null, 0, true);
_global.ASSetPropFlags(_local4, ["__proto__", "constructor", "__constructor__"], 1, true);
search(_local4);
_global.ASSetPropFlags(_local3, null, 1, true);
_global.ASSetPropFlags(_local4, null, 1, true);
return(r);
}
function search(t) {
var _local3;
for (_local3 in t) {
if (typeof(t[_local3]) == "function") {
var _local2 = _local3.substring(7);
if (_local3.indexOf("__get__") == 0) {
g[_local2] = true;
if (!s[_local2]) {
r[r.length] = new gdp.env.reflect.PropertyInfo(_local2, c, a, t["__set__" + _local2], t[_local3]);
r[_local2] = r[r.length - 1];
}
} else if (_local3.indexOf("__set__") == 0) {
s[_local2] = true;
if (!g[_local2]) {
r[r.length] = new gdp.env.reflect.PropertyInfo(_local2, c, a, t[_local3], t["__get__" + _local2]);
r[_local2] = r[r.length - 1];
}
}
}
}
}
}
Symbol 1069 MovieClip [__Packages.gdp.env.reflect.PropertyInfo] Frame 0
class gdp.env.reflect.PropertyInfo extends gdp.core.base.BaseClass implements gdp.env.reflect.TypeMemberInfo
{
static var stringifier;
var name, declaringType, staticFlag, setter, getter;
function PropertyInfo (name, declaringType, staticFlag, setter, getter) {
super();
this.name = name;
this.declaringType = declaringType;
this.staticFlag = staticFlag;
this.setter = new gdp.env.reflect.MethodInfo("__set__" + name, declaringType, staticFlag, setter);
this.getter = new gdp.env.reflect.MethodInfo("__get__" + name, declaringType, staticFlag, getter);
}
static function getStringifier(Void) {
if (!stringifier) {
stringifier = new gdp.env.reflect.stringifier.PropertyInfoStringifier();
}
return(stringifier);
}
static function setStringifier(propertyInfoStringifier) {
stringifier = propertyInfoStringifier;
}
function getName(Void) {
return(name);
}
function getFullName(Void) {
if (declaringType.getFullName()) {
return((declaringType.getFullName() + ".") + name);
}
return(name);
}
function getSetter(Void) {
if (setter.getMethod()) {
return(setter);
}
return(null);
}
function getGetter(Void) {
if (getter.getMethod()) {
return(getter);
}
return(null);
}
function getDeclaringType(Void) {
return(declaringType);
}
function isWritable(Void) {
return(getSetter() != null);
}
function isReadable(Void) {
return(getGetter() != null);
}
function isStatic(Void) {
return(staticFlag);
}
function snapshot(Void) {
var _local3 = null;
if (getSetter()) {
_local3 = getSetter().getMethod();
}
var _local2 = null;
if (getGetter()) {
_local2 = getGetter().getMethod();
}
return(new gdp.env.reflect.PropertyInfo(name, declaringType, staticFlag, _local3, _local2));
}
function toString() {
return(getStringifier().execute(this));
}
}
Symbol 1070 MovieClip [__Packages.gdp.env.reflect.stringifier.PropertyInfoStringifier] Frame 0
class gdp.env.reflect.stringifier.PropertyInfoStringifier extends gdp.core.base.BaseClass implements gdp.utils.Stringifier
{
function PropertyInfoStringifier () {
super();
}
function execute(target) {
var _local2 = gdp.env.reflect.PropertyInfo(target);
var _local1 = "";
if (_local2.isStatic()) {
_local1 = _local1 + "static ";
}
_local1 = _local1 + _local2.getDeclaringType().getFullName();
_local1 = _local1 + ("." + _local2.getName());
return(_local1);
}
}
Symbol 1071 MovieClip [__Packages.gdp.env.reflect.ConstructorInfo] Frame 0
class gdp.env.reflect.ConstructorInfo extends gdp.env.reflect.MethodInfo
{
var __proto__, name, method, declaringType, staticFlag;
function ConstructorInfo (declaringClass, constructor) {
super();
__proto__.__proto__ = gdp.env.reflect.MethodInfo.prototype;
name = NAME;
method = constructor;
declaringType = declaringClass;
staticFlag = false;
}
function getMethod(Void) {
if (!(method === undefined)) {
return(method);
}
if ((declaringType.getPackage().getPackage() == null) || (declaringType.getName() == null)) {
return(declaringType.getType());
}
return(declaringType.getPackage().getPackage()[declaringType.getName()]);
}
function snapshot(Void) {
return(new gdp.env.reflect.ConstructorInfo(gdp.env.reflect.ClassInfo(declaringType), getMethod()));
}
static var NAME = "new";
}
Symbol 1072 MovieClip [__Packages.gdp.core.base.BaseClass] Frame 0
class gdp.core.base.BaseClass extends gdp.core.base.SimpleClass implements gdp.core.base.BaseInterface
{
function BaseClass () {
super();
if (gdp.core.logger.LogWrapper.getLog() == null) {
initLogger();
}
eventDispatcher = new gdp.env.events.EventDispatcher();
}
function initLogger() {
gdp.core.logger.LogWrapper.getInstance().init("gdp_log");
gdp.core.logger.LogWrapper.getInstance().addConsolePublisher();
gdp.core.logger.LogWrapper.logCallingFile = false;
}
function addEventListener(sType, fListener, bUseCapture, nPriority) {
eventDispatcher.addEventListener(sType, fListener, bUseCapture, nPriority);
}
function dispatchEvent(event) {
Object(event).oTarget = this;
return(eventDispatcher.dispatchEvent(event));
}
function hasEventListener(sType) {
return(eventDispatcher.hasEventListener(sType));
}
function removeEventListener(sType, fListener, bUseCapture) {
eventDispatcher.removeEventListener(sType, fListener, bUseCapture);
}
function willTrigger(sType) {
return(eventDispatcher.willTrigger(sType));
}
var eventDispatcher = null;
}
Symbol 1073 MovieClip [__Packages.gdp.env.events.EventDispatcher] Frame 0
class gdp.env.events.EventDispatcher extends gdp.core.base.SimpleClass implements gdp.env.events.IEventDispatcher
{
function EventDispatcher () {
super();
oQueues = new Object();
}
function addEventListener(sType, fListener, bUseCapture, nPriority) {
if (bUseCapture == null) {
bUseCapture = false;
}
if (nPriority == null) {
nPriority = gdp.env.events.EventPriority.DEFAULT;
}
var _local2 = oQueues[sType];
if (oQueues[sType] == null) {
_local2 = (oQueues[sType] = new gdp.env.events.QueueListeners());
}
_local2.addListener(fListener, bUseCapture, nPriority);
}
function dispatchEvent(event) {
var _local7 = false;
var _local5 = gdp.env.events.QueueListeners(oQueues[event.getType()]).getListeners();
var _local3 = 0;
while (_local3 < _local5.length) {
var _local4 = _local5[_local3];
var _local2 = _local4.getFunction();
if (gdp.utils.Delegate.isDelegate(_local2)) {
_local2.bMerge = true;
_local2.apply(null, [event]);
} else {
_local4.getFunction().apply(null, [event]);
}
_local7 = true;
_local3++;
}
return(_local7);
}
function hasEventListener(sType) {
var _local2 = oQueues[sType];
if (_local2.getListeners().length > 0) {
return(true);
}
return(false);
}
function removeEventListener(sType, fListener, bUseCapture) {
var _local2 = oQueues[sType];
_local2.removeListener(fListener, bUseCapture);
}
function willTrigger(sType) {
return(null);
}
var oQueues = null;
}
Symbol 1074 MovieClip [__Packages.gdp.env.events.EventPriority] Frame 0
class gdp.env.events.EventPriority extends gdp.core.base.BaseClass
{
function EventPriority () {
super();
}
static var BINDING = 100;
static var DEFAULT = 0;
static var DEFAULT_HANDLER = -50;
static var EFFECT = -100;
}
Symbol 1075 MovieClip [__Packages.gdp.env.events.QueueListeners] Frame 0
class gdp.env.events.QueueListeners extends gdp.core.base.BaseClass
{
function QueueListeners () {
super();
aCaptureListeners = new Array();
aBubbleListeners = new Array();
}
function addListener(fListener, bUseCapture, nPriority) {
var _local2 = new gdp.env.events.EventListener(fListener, nPriority);
if (bUseCapture) {
aCaptureListeners.push(_local2);
aCaptureListeners.sort(sortListenersByPriority);
} else {
aBubbleListeners.push(_local2);
aBubbleListeners.sort(sortListenersByPriority);
}
}
function removeListener(fListener, bUseCapture) {
if (bUseCapture) {
var _local2 = 0;
while (_local2 < aCaptureListeners.length) {
if (gdp.utils.Delegate.equals(aCaptureListeners[_local2].getFunction(), fListener)) {
aCaptureListeners.splice(_local2--, 1);
}
_local2++;
}
} else {
var _local2 = 0;
while (_local2 < aBubbleListeners.length) {
if (gdp.utils.Delegate.equals(aBubbleListeners[_local2].getFunction(), fListener)) {
aBubbleListeners.splice(_local2--, 1);
}
_local2++;
}
}
}
function getListeners(Void) {
var _local3 = aCaptureListeners.concat(aBubbleListeners);
var _local2 = 0;
while (_local2 < _local3.length) {
if (!_local3[_local2].isValid()) {
_local3.splice(_local2--, 1);
}
_local2++;
}
return(_local3);
}
function sortListenersByPriority(elA, elB) {
if (elA.getPriority() == elB.getPriority()) {
return(0);
}
if (elA.getPriority() > elB.getPriority()) {
return(-1);
}
return(1);
}
var aCaptureListeners = null;
var aBubbleListeners = null;
}
Symbol 1076 MovieClip [__Packages.gdp.env.events.EventListener] Frame 0
class gdp.env.events.EventListener extends gdp.core.base.BaseClass
{
function EventListener (fListener, nPriority) {
super();
this.fListener = fListener;
this.nPriority = ((nPriority == null) ? 0 : (nPriority));
}
function isValid(Void) {
if (fListener == null) {
return(false);
}
if (gdp.utils.Delegate.isDelegate(fListener) && ((fListener.target == null) || (fListener.func == null))) {
return(false);
}
return(true);
}
function setFunction(fListener) {
this.fListener = fListener;
}
function getFunction(Void) {
return(fListener);
}
function setPriority(nPriority) {
this.nPriority = nPriority;
}
function getPriority(Void) {
return(nPriority);
}
var nPriority = null;
var fListener = null;
}
Symbol 1077 MovieClip [__Packages.gdp.utils.Delegate] Frame 0
class gdp.utils.Delegate extends gdp.core.base.BaseClass
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(oClass, fFunc, aArgs, bMerge) {
var _local3 = function () {
var _local5 = arguments.callee.target;
var _local4 = arguments.callee.func;
var _local6 = arguments.callee.bMerge;
var _local3;
if (_local6) {
_local3 = arguments;
var _local2 = 0;
while (_local2 < arguments.callee.aArgs.length) {
_local3.push(arguments.callee.aArgs[_local2]);
_local2++;
}
} else {
_local3 = ((arguments.length > 0) ? arguments : (arguments.callee.aArgs));
}
_local4.___nCount = arguments.callee.nCount;
return(_local4.apply(_local5, _local3));
};
_local3.type = "Delegate";
_local3.target = oClass;
_local3.func = fFunc;
_local3.nCount = ++nCount;
if (_local3.func.___aInnerValues == undefined) {
_local3.func.___aInnerValues = new Array();
}
_local3.func.___aInnerValues[nCount] = new Object();
_local3.aArgs = aArgs;
_local3.bMerge = bMerge;
return(_local3);
}
static function set(sValueName, value) {
return((arguments.caller.___aInnerValues[arguments.caller.___nCount][sValueName] = value));
}
static function setTo(fFunction, sValueName, value) {
return((fFunction.___aInnerValues[fFunction.___nCount][sValueName] = value));
}
static function get(sValueName) {
return(arguments.caller.___aInnerValues[arguments.caller.___nCount][sValueName]);
}
static function equals(fFunctionA, fFunctionB) {
if (isDelegate(fFunctionA) && (isDelegate(fFunctionB))) {
return(((fFunctionA.func == fFunctionB.func) && (fFunctionA.target == fFunctionB.target)) && (gdp.utils.ArrayUtil.equals(fFunctionA.aArgs, fFunctionB.aArgs)));
}
if ((!isDelegate(fFunctionA)) && (!isDelegate(fFunctionB))) {
return(fFunctionA.func == fFunctionB.func);
}
return(false);
}
static function isDelegate(fFunction) {
return(fFunction.type == "Delegate");
}
static function clone(fDelegate) {
if ((fDelegate.target != undefined) && (fDelegate.func != undefined)) {
return(create(fDelegate.target, fDelegate.func, fDelegate.aArgs, fDelegate.bMerge));
}
return(fDelegate);
}
static function toString(fDelegate) {
if (isDelegate(fDelegate)) {
var _local3 = ((fDelegate.target.getClassNameWithPackage == null) ? (gdp.env.reflect.ReflectUtil.getTypeName(fDelegate.target)) : (fDelegate.target.getClassNameWithPackage(true)));
var _local2 = gdp.env.reflect.ReflectUtil.getMethodName(fDelegate.func, fDelegate.target);
var _local4 = fDelegate.aArgs.toString();
return(((((("Delegate {class:" + _local3) + ", method:") + _local2) + ", arguments:") + _local4) + "}");
}
return("[Function]");
}
function createDelegate(obj) {
return(create(obj, func));
}
static var nCount = 0;
}
Symbol 1078 MovieClip [__Packages.Game] Frame 0
class Game extends gdp.core.base.BaseClass
{
function Game (mcParent) {
super();
Mouse.show();
bSound = true;
bLoading = true;
soundManager = new gdp.io.sound.WaveEngine(1);
musicManager = new gdp.io.sound.WaveEngine(2);
musicManager.debugOn = true;
gdp.core.time.FrameTimer.getInstance().setFps(31);
windows.GameWindow.getInstance(mcParent);
msn.Zone.getInstance().onSessionStart = gdp.utils.Delegate.create(this, showPregame, [true]);
msn.Zone.getInstance().onGameStart = gdp.utils.Delegate.create(this, startGame);
msn.Zone.getInstance().onGameContinue = gdp.utils.Delegate.create(windows.GameWindow.getInstance(), windows.GameWindow.getInstance().initLevel);
msn.Zone.getInstance().onGameMute = gdp.utils.Delegate.create(this, mute);
msn.Zone.getInstance().onGameMenu = gdp.utils.Delegate.create(windows.GameWindow.getInstance(), windows.GameWindow.getInstance().exitGame);
msn.Zone.getInstance().onGamePause = gdp.utils.Delegate.create(windows.GameWindow.getInstance(), windows.GameWindow.getInstance().onGamePause);
mcCursor = mcParent.attachMovie("mc_Cursor", "mcCursor", 1000);
mcCursor.onMouseMove = gdp.utils.Delegate.create(this, onMouseMove);
this.mcParent = mcParent;
managers.BrickManager.getInstance();
managers.LevelManager.getInstance();
startLoading();
}
function onMouseMove(Void) {
mcCursor._x = mcParent._xmouse;
mcCursor._y = mcParent._ymouse;
updateAfterEvent();
}
function startLoading(Void) {
mcBlackScreen = mcParent.attachMovie("mc_BlackScreen", "mcBlackScreen", mcParent.getNextHighestDepth());
aProgress = [0, 0];
}
function setLoadingProgress(nPercent, nSender) {
trace(("Game.setLoadingProgress(" + [arguments]) + ")");
aProgress[nSender] = nPercent;
var _local3 = Math.floor((aProgress[0] + aProgress[1]) / 2);
if (mcBlackScreen != null) {
mcBlackScreen.removeMovieClip();
mcBlackScreen = null;
mcLoading = mcParent.attachMovie("mc_Loading", "mcLoading", mcParent.getNextHighestDepth());
Mouse.hide();
}
mcLoading.mcBar.gotoAndStop(_local3);
if (_local3 == 100) {
aProgress = null;
msn.Zone.getInstance().sessionReady();
mochi.MochiServices.connect("df5963d9c1f98b8f");
bLoading = false;
}
}
function fromPregametoInstructions(Void) {
if (mcBlackScreen != null) {
return(undefined);
}
mcPregame.btnPlay.onRelease = null;
mcPregame.btnHelp.onRelease = null;
mcPregame.btnMoreGames.onRelease = null;
mcPregame.btnHighScores.onRelease = null;
mcPregame.btnDownload.onRelease = null;
if (mcBlackScreen == null) {
mcBlackScreen = mcParent.attachMovie("mc_BlackScreen", "mcBlackScreen", mcParent.getNextHighestDepth());
} else {
gdp.core.process.ProcessManager.getInstance().removeProcess(processChange);
}
mcBlackScreen._alpha = 0;
bUp = true;
processChange = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psChange, [gdp.utils.Delegate.create(this, hidePregame, [false]), gdp.utils.Delegate.create(this, showInstructions)]));
gdp.core.process.ProcessManager.getInstance().addProcess(processChange);
windows.GameWindow.getInstance().pause();
}
function fromInstructionstoPregame(Void) {
if (mcBlackScreen != null) {
return(undefined);
}
mcInstructions.btnMainMenu.onRelease = null;
mcInstructions.btnNext.onRelease = null;
if (mcBlackScreen == null) {
mcBlackScreen = mcParent.attachMovie("mc_BlackScreen", "mcBlackScreen", mcParent.getNextHighestDepth());
} else {
gdp.core.process.ProcessManager.getInstance().removeProcess(processChange);
}
mcBlackScreen._alpha = 0;
bUp = true;
processChange = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psChange, [gdp.utils.Delegate.create(this, hideInstructions), gdp.utils.Delegate.create(this, showPregame, [false])]));
gdp.core.process.ProcessManager.getInstance().addProcess(processChange);
windows.GameWindow.getInstance().pause();
}
function fromPregametoHighScores(Void) {
if (mcBlackScreen != null) {
return(undefined);
}
mcPregame.btnPlay.onRelease = null;
mcPregame.btnHelp.onRelease = null;
mcPregame.btnMoreGames.onRelease = null;
mcPregame.btnHighScores.onRelease = null;
mcPregame.btnDownload.onRelease = null;
if (mcBlackScreen == null) {
mcBlackScreen = mcParent.attachMovie("mc_BlackScreen", "mcBlackScreen", mcParent.getNextHighestDepth());
} else {
gdp.core.process.ProcessManager.getInstance().removeProcess(processChange);
}
mcBlackScreen._alpha = 0;
bUp = true;
processChange = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psChange, [gdp.utils.Delegate.create(this, hidePregame, [false]), gdp.utils.Delegate.create(this, showHighScore)]));
gdp.core.process.ProcessManager.getInstance().addProcess(processChange);
windows.GameWindow.getInstance().pause();
}
function fromHighScorestoPregame(Void) {
if (mcBlackScreen != null) {
return(undefined);
}
mcHighScores.btnContinue.onRelease = null;
if (mcBlackScreen == null) {
mcBlackScreen = mcParent.attachMovie("mc_BlackScreen", "mcBlackScreen", mcParent.getNextHighestDepth());
} else {
gdp.core.process.ProcessManager.getInstance().removeProcess(processChange);
}
mcBlackScreen._alpha = 0;
bUp = true;
processChange = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psChange, [gdp.utils.Delegate.create(this, hideHighScores), gdp.utils.Delegate.create(this, showPregame, [false])]));
gdp.core.process.ProcessManager.getInstance().addProcess(processChange);
windows.GameWindow.getInstance().pause();
}
function showHighScore(Void) {
mcHighScores = mcParent.attachMovie("mc_HighScoresWindow", "mcHighScores", mcParent.getNextHighestDepth());
trace(("Game.showHighScores(" + [mcHighScores.btnContinue]) + ")");
mcHighScores.btnContinue.onRelease = gdp.utils.Delegate.create(this, fromHighScorestoPregame);
mochi.MochiScores.showLeaderboard({boardID:"df5963d9c1f98b8f", clip:mcHighScores, res:"515x350", hideDoneButton:true});
showCursor(mcHighScores);
}
function hideHighScores(Void) {
mochi.MochiScores.closeLeaderboard();
hideCursor();
mcHighScores.removeMovieClip();
mcHighScores = null;
}
function moreGames(Void) {
getURL (sMoreGames, sTargetOptions);
}
function downloadFullVersion(Void) {
getURL (sGetFullVersion, sTargetOptions);
}
function startGame(Void) {
soundManager.stopAll();
trace(("Game.startGame(" + [arguments]) + ")");
windows.GameWindow.getInstance().removeLevel();
fromPregametoGame();
}
function fromPregametoGame(Void) {
mcPregame.btnPlay.onRelease = null;
mcPregame.btnHelp.onRelease = null;
mcPregame.btnMoreGames.onRelease = null;
mcPregame.btnHighScores.onRelease = null;
mcPregame.btnDownload.onRelease = null;
if (mcBlackScreen == null) {
mcBlackScreen = mcParent.attachMovie("mc_BlackScreen", "mcBlackScreen", mcParent.getNextHighestDepth());
} else {
gdp.core.process.ProcessManager.getInstance().removeProcess(processChange);
}
mcBlackScreen._alpha = 0;
bUp = true;
processChange = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psChange, [gdp.utils.Delegate.create(this, hidePregame, [true]), gdp.utils.Delegate.create(this, showGame)]));
gdp.core.process.ProcessManager.getInstance().addProcess(processChange);
windows.GameWindow.getInstance().pause();
}
function fromGametoPregame(Void) {
if (mcBlackScreen == null) {
mcBlackScreen = mcParent.attachMovie("mc_BlackScreen", "mcBlackScreen", mcParent.getNextHighestDepth());
} else {
gdp.core.process.ProcessManager.getInstance().removeProcess(processChange);
}
mcBlackScreen._alpha = 0;
bUp = true;
processChange = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psChange, [gdp.utils.Delegate.create(this, hideGame), gdp.utils.Delegate.create(this, showPregame, [true])]));
gdp.core.process.ProcessManager.getInstance().addProcess(processChange);
}
function showPregame(bMusic) {
soundManager.stopAll();
mcLoading.removeMovieClip();
mcLoading = null;
trace(("Game.showPregame(" + [arguments]) + ")");
if (mcPregame == null) {
mcPregame = mcParent.attachMovie("mc_MainMenu", "mcPregame", mcParent.getNextHighestDepth());
}
mcPregame.btnPlay.onRelease = gdp.utils.Delegate.create(this, onBtnPlay);
mcPregame.btnHelp.onRelease = gdp.utils.Delegate.create(this, fromPregametoInstructions);
mcPregame.btnMoreGames.onRelease = gdp.utils.Delegate.create(this, moreGames);
mcPregame.btnHighScores.onRelease = gdp.utils.Delegate.create(this, fromPregametoHighScores);
mcPregame.btnDownload.onRelease = gdp.utils.Delegate.create(this, downloadFullVersion);
showCursor(mcPregame);
musicManager.stopAll();
if (bMusic) {
if (bSound) {
musicManager.play(musicManager.addStream("level_start"));
}
}
}
function onBtnPlay(Void) {
if (mcBlackScreen != null) {
return(undefined);
}
msn.Zone.getInstance().gameReady();
}
function hidePregame(bMusic) {
hideCursor();
mcPregame.removeMovieClip();
mcPregame = null;
if (bMusic) {
musicManager.stopAll();
}
}
function showGame(Void) {
hideCursor();
windows.GameWindow.getInstance().startGame();
}
function hideGame(Void) {
soundManager.stopAll();
windows.GameWindow.getInstance().removeUpsell();
}
function showInstructions(Void) {
mcInstructions = mcParent.attachMovie("mc_HelpWindow", "mcInstructions", mcParent.getNextHighestDepth());
trace(("Game.showInstructions(" + [mcInstructions.btnMainMenu, mcInstructions.btnNext]) + ")");
mcInstructions.btnMainMenu.onRelease = gdp.utils.Delegate.create(this, fromInstructionstoPregame);
mcInstructions.btnNext.onRelease = gdp.utils.Delegate.create(this, nextInstruction);
showCursor(mcInstructions);
}
function nextInstruction(Void) {
if (mcInstructions._currentframe == mcInstructions._totalframes) {
mcInstructions.gotoAndStop(1);
} else {
mcInstructions.gotoAndStop(mcInstructions._currentframe + 1);
}
}
function hideInstructions(Void) {
hideCursor();
mcInstructions.removeMovieClip();
mcInstructions = null;
}
function psChange(fHideCallback, fShowCallback) {
if (bUp) {
mcBlackScreen._alpha = mcBlackScreen._alpha + 4;
if (mcBlackScreen._alpha > 100) {
windows.GameWindow.getInstance().removeUpsell();
bUp = false;
fHideCallback();
fShowCallback();
}
} else {
mcBlackScreen._alpha = mcBlackScreen._alpha - 6;
if (mcBlackScreen._alpha < 0) {
mcBlackScreen.removeMovieClip();
mcBlackScreen = null;
gdp.core.process.ProcessManager.getInstance().removeProcess(processChange);
}
}
}
function playSound(sound) {
if (bSound) {
var _local2 = 0;
if (sound == "level_start") {
_local2 = 2;
}
soundManager.play(soundManager.addStream(sound), 0, _local2);
}
}
function mute(bOn) {
trace(("Game.mute(" + [arguments]) + ")");
bSound = bOn;
if (!bSound) {
if ((mcPregame != null) || (mcInstructions != null)) {
musicManager.soundOn();
}
} else {
musicManager.soundOff();
soundManager.stopAll();
}
}
function showCursor(mc) {
if (mcCursor.getDepth() < mc.getDepth()) {
mcCursor.swapDepths(mc);
}
mcCursor._visible = true;
}
function hideCursor(Void) {
mcCursor._visible = false;
}
function isGame(Void) {
if (mcLoading != null) {
return(false);
}
if (mcPregame != null) {
return(false);
}
if (mcInstructions != null) {
return(false);
}
if (mcHighScores != null) {
return(false);
}
if (mcBlackScreen != null) {
return(false);
}
return(true);
}
function setGetFullVersion(str) {
sGetFullVersion = str;
}
function setTargetOptions(str) {
sTargetOptions = str;
}
function setGisApiOn(bOn) {
bGisApiOn = bOn;
}
function doScore(nScore) {
if (!bGisApiOn) {
return(undefined);
}
oberon.GIS_Helper.StartEvent("SYS_EndGame");
oberon.GIS_Helper.EventValue("Score", nScore.toString());
oberon.GIS_Helper.SendEvent();
}
static function getInstance(mcParent) {
trace(("Game.getInstance(" + [arguments]) + ")");
if (instance == null) {
instance = new Game(mcParent);
}
return(instance);
}
var mcParent = null;
static var instance = null;
var mcLoading = null;
var aProgress = null;
var mcPregame = null;
var mcInstructions = null;
var mcHighScores = null;
var mcCursor = null;
var mcBlackScreen = null;
var processChange = null;
var bUp = null;
var bSound = null;
var bLoading = null;
var soundManager = null;
var musicManager = null;
var sGetFullVersion = "http://www.gameonsoftware.com/fairy-treasure/?r=ftmo";
var sMoreGames = "http://www.gameonsoftware.com/?r=ftmo";
var sTargetOptions = "_blank";
var bGisApiOn = false;
}
Symbol 1079 MovieClip [__Packages.gdp.core.process.Process] Frame 0
class gdp.core.process.Process extends gdp.core.base.BaseClass
{
var fFunc, aArgs, nPriority, nId, bReadOnly;
function Process (fFunc, aArgs, nPriority) {
super();
setFunction(fFunc);
setArguments(((aArgs == null) ? ([]) : (aArgs)));
setPriority(nPriority | -1);
}
function run(Void) {
return(Number(fFunc.apply(null, aArgs)));
}
function setFunction(fFunc) {
this.fFunc = fFunc;
gdp.utils.Delegate.setTo(fFunc, "process", this);
}
function getFunction(Void) {
return(fFunc);
}
function setArguments(aArgs) {
this.aArgs = aArgs;
}
function getArguments(Void) {
return(aArgs);
}
function setPriority(nPriority) {
this.nPriority = nPriority;
}
function getPriority(Void) {
return(nPriority);
}
function getId(Void) {
return(nId);
}
function setReadOnly(bReadOnly) {
this.bReadOnly = bReadOnly;
}
function isReadOnly(Void) {
return(bReadOnly);
}
function isValid(Void) {
if ((fFunc == null) || (typeof(fFunc) != "function")) {
return(false);
}
return(true);
}
function isEqual(process) {
if (((!gdp.utils.Delegate.equals(process.getFunction(), fFunc)) || ((!process.getId()) != nId)) || (!checkArguments(process))) {
return(false);
}
return(true);
}
function checkArguments(process) {
var _local3 = process.getArguments();
var _local4 = aArgs;
if (_local3.length != _local4.length) {
return(false);
}
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2] != _local4[_local2]) {
return(false);
}
_local2++;
}
return(true);
}
function description(Void) {
var _local2 = {func:gdp.utils.Delegate.toString(fFunc), args:aArgs, id:nId};
return("Process " + gdp.utils.ObjectUtil.classToString(_local2, true));
}
}
Symbol 1080 MovieClip [__Packages.gdp.io.sound.WaveEngine] Frame 0
class gdp.io.sound.WaveEngine
{
var type, stack, debugOn, mute, _mc;
function WaveEngine (type, debugOn) {
this.type = ((type == undefined) ? 1 : (type));
stack = new Object();
this.debugOn = ((type == undefined) ? false : (debugOn));
mute = false;
init();
}
function init() {
_numClass++;
_mc = _root.createEmptyMovieClip((("CWaveEngine_" + _numClass) + "_") + type, _root.getNextHighestDepth());
}
function soundOff() {
if (!mute) {
debug("soundOff()");
for (var _local2 in stack) {
stack[_local2]._oldVolume = stack[_local2].getVolume();
setVolume(Number(_local2), 0);
}
mute = true;
}
}
function soundOn() {
if (mute) {
mute = false;
debug("soundOn()");
for (var _local3 in stack) {
var _local2 = ((stack[_local3]._oldVolume == undefined) ? 100 : (stack[_local3]._oldVolume));
setVolume(Number(_local3), _local2);
}
}
}
function getSoundStatus() {
return(!mute);
}
function play(id, secondsOffset, loops) {
if ((id == undefined) || (stack[id] == undefined)) {
return(0);
}
if (type == 2) {
stopAll();
}
secondsOffset = ((secondsOffset == undefined) ? 0 : (secondsOffset));
loops = ((loops == undefined) ? 1 : (loops));
var _local3 = stack[id];
if (mute) {
_local3.setVolume(0);
} else {
_local3.setVolume(100);
}
if (type == 2) {
loops = 65536;
}
_local3.start(secondsOffset, loops);
debug(((((("play(" + _local3.__link) + ", ") + secondsOffset) + ", ") + loops) + ")");
}
function playAll(secondsOffset, loops, autoDelete) {
for (var _local5 in stack) {
play(Number(_local5), secondsOffset, loops, autoDelete);
}
}
function addStream(link_name, autoDelete) {
if (link_name == undefined) {
return(0);
}
autoDelete = ((autoDelete == undefined) ? true : (autoDelete));
var _local4 = _mc.createEmptyMovieClip("attachS_" + (++_numSound), _mc.getNextHighestDepth());
var _local2 = new Sound(_local4);
_local2.attachSound(link_name);
_local2.__parent = this;
_local2.__link = link_name;
_local2.__num = _numSound;
_local2.__mc = _local4;
_local2.__autoDelete = autoDelete;
_local2.onSoundComplete = function () {
if (this.__autoDelete) {
this.__parent.deleteSound(this.__num);
}
};
debug(("addStream(" + link_name) + ")");
stack[_numSound] = _local2;
return(_local2.__num);
}
function deleteSound(id) {
if ((id == undefined) || (stack[id] == undefined)) {
return(0);
}
var _local2 = stack[id];
debug("Stack deletes a " + _local2.__link);
delete stack[id];
_local2.__mc.removeMovieClip();
}
function deleteAllSound() {
debug("deleteAllSound()");
for (var _local2 in stack) {
deleteSound(Number(_local2));
}
}
function stop(id) {
if ((id == undefined) || (stack[id] == undefined)) {
return(0);
}
var _local3 = stack[id];
_local3.stop();
debug(("stop(" + _local3.__link) + ")");
if (_local3.__autoDelete) {
if ((id != _numSound) || (type != 2)) {
deleteSound(id);
}
}
}
function stopAll() {
debug("stopAll()");
for (var _local2 in stack) {
stop(Number(_local2));
}
}
function setVolume(id, volume) {
if (((id == undefined) || (volume == undefined)) || (stack[id] == undefined)) {
return(0);
}
var _local2 = stack[id];
if (mute) {
_local2._oldVolume = volume;
return(0);
}
debug(((("setVolume(" + _local2.__link) + ", ") + volume) + ")");
if (_local2 != undefined) {
_local2.setVolume(volume);
}
}
function setAllVolume(volume) {
for (var _local2 in stack) {
setVolume(Number(_local2), volume);
}
}
function debug(msg) {
if (debugOn) {
trace((type + " ") + msg);
}
}
function toString() {
return("[sound.CWaveEngine]");
}
var _numSound = 0;
static var _numClass = 0;
}
Symbol 1081 MovieClip [__Packages.gdp.core.time.FrameTimer] Frame 0
class gdp.core.time.FrameTimer extends gdp.core.base.BaseClass
{
static var instance;
function FrameTimer () {
super();
nFramesCount = 0;
nFps = 0;
var _local3 = new gdp.core.process.Process(gdp.utils.Delegate.create(this, addFrame), [], 0);
gdp.core.process.ProcessManager.getInstance().addProcess(_local3);
}
static function getInstance() {
if (instance == null) {
instance = new gdp.core.time.FrameTimer();
}
return(instance);
}
function addFrame(Void) {
nFramesCount++;
}
function setFps(nFps) {
this.nFps = nFps;
}
function getFps(Void) {
return(nFps);
}
function getTime(Void) {
return(int((nFramesCount / nFps) * 1000));
}
function getFrames(Void) {
return(nFramesCount);
}
function frameToMilliseconds(nFrame) {
return(int((nFrame / nFps) * 1000));
}
function millisecondsToFrame(nMs) {
return(Math.round((nMs * nFps) / 1000));
}
var nFps = null;
var nFramesCount = null;
}
Symbol 1082 MovieClip [__Packages.gdp.core.process.ProcessManager] Frame 0
class gdp.core.process.ProcessManager extends gdp.core.base.BaseClass
{
static var instance;
function ProcessManager () {
super();
aProcessesList = new Array();
aAddingProcessesList = new Array();
aRemovingProcessesList = new Array();
}
static function getInstance() {
if (instance == null) {
instance = new gdp.core.process.ProcessManager();
}
return(instance);
}
function run(Void) {
bWaiting = true;
var _local2 = 0;
while (_local2 < aProcessesList.length) {
var _local3 = aProcessesList[_local2];
if ((aRemovingProcessesList.length > 0) && (gdp.utils.ArrayUtil.contains(aRemovingProcessesList, _local3))) {
} else {
var _local4 = _local3.run();
if ((_local4 == PROCESS_KILL) || (!_local3.isValid())) {
aProcessesList.splice(_local2--, 1);
} else if (_local4 == PROCESS_HOLD) {
return(undefined);
}
}
_local2++;
}
bWaiting = false;
if ((aRemovingProcessesList.length > 0) || (aAddingProcessesList.length > 0)) {
updateProcessList();
}
}
function updateProcessList(Void) {
if (bWaiting) {
return(undefined);
}
while (aRemovingProcessesList.length) {
var _local3 = gdp.utils.ArrayUtil.find(aProcessesList, aRemovingProcessesList.shift());
if (_local3 != -1) {
aProcessesList.splice(_local3, 1);
}
}
while (aAddingProcessesList.length) {
var _local2 = aAddingProcessesList.shift();
if (_local2.getPriority() > -1) {
aProcessesList.splice(_local2.getPriority(), 0, _local2);
} else {
aProcessesList.push(_local2);
}
}
}
function addProcess(process) {
if (process.isValid()) {
process.nId = nNextFreeId++;
aAddingProcessesList.push(process);
updateProcessList();
return(process.nId);
}
return(-1);
}
function getProcess(nId) {
var _local2 = 0;
while (_local2 < aProcessesList.length) {
if (aProcessesList[_local2].getId() == nId) {
return(aProcessesList[_local2]);
}
_local2++;
}
}
function removeProcess(value) {
if (typeof(value) == "number") {
return(removeProcessById(value));
}
if (value instanceof gdp.core.process.Process) {
return(removeProcessByProcess(value));
}
return(false);
}
function removeProcessById(nId) {
var _local2 = 0;
while (_local2 < aProcessesList.length) {
if (aProcessesList[_local2].getId() == nId) {
aRemovingProcessesList.push(aProcessesList[_local2]);
updateProcessList();
return(true);
}
_local2++;
}
return(false);
}
function removeProcessByProcess(process) {
return(removeProcessById(process.getId()));
}
function hasProcess(process) {
var _local2 = 0;
while (_local2 < aProcessesList.length) {
if (aProcessesList[_local2].isEqual(process)) {
return(true);
}
_local2++;
}
return(false);
}
static var PROCESS_KILL = 0;
static var PROCESS_HOLD = -1;
var aProcessesList = null;
var aAddingProcessesList = null;
var aRemovingProcessesList = null;
var bWaiting = false;
var nNextFreeId = 0;
}
Symbol 1083 MovieClip [__Packages.gdp.core.base.SimpleMovieClip] Frame 0
class gdp.core.base.SimpleMovieClip extends MovieClip
{
var _yscale, _xscale, _alpha, _height, _width, _name;
function SimpleMovieClip () {
super();
nClassId = nClassCounter++;
}
function description() {
var _local2 = {_name:_name, _width:_width, _height:_height, _alpha:_alpha, _xscale:_xscale, _yscale:_yscale};
return("BaseMovieClip " + gdp.utils.ObjectUtil.classToString(_local2, true));
}
function toString() {
return(description.apply(this, arguments));
}
function getClass() {
return(gdp.env.reflect.ClassInfo.forInstance(this).getType());
}
function getClassName(Void) {
return(gdp.env.reflect.ClassInfo.forInstance(this).getName());
}
function getPackageName(Void) {
return(gdp.env.reflect.ClassInfo.forInstance(this).getPackage().getName());
}
function getClassNameWithPackage(Void) {
return(gdp.env.reflect.ClassInfo.forInstance(this).getFullName());
}
function isEqual(anObject) {
return(this == anObject);
}
function createEmptyMovieClipWithParams(sName, nDepth, oParams) {
super.createEmptyMovieClip(sName, nDepth);
var _local4 = this[sName];
for (var _local5 in oParams) {
_local4[_local5] = oParams[_local5];
}
return(_local4);
}
static var bCompiledByMTASC = false;
static var nClassCounter = 0;
var nClassId = 0;
}
Symbol 1084 MovieClip [__Packages.gdp.core.base.BaseMovieClip] Frame 0
class gdp.core.base.BaseMovieClip extends gdp.core.base.SimpleMovieClip
{
function BaseMovieClip () {
super();
eventDispatcher = new gdp.env.events.EventDispatcher();
var _local3 = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psInitMovieClip));
gdp.core.process.ProcessManager.getInstance().addProcess(_local3);
}
function initLogger() {
gdp.core.logger.LogWrapper.getInstance().init("gdp_log");
gdp.core.logger.LogWrapper.getInstance().addConsolePublisher();
gdp.core.logger.LogWrapper.logCallingFile = false;
}
function psInitMovieClip(Void) {
dispatchEvent(new gdp.core.base.BaseMovieClipEvent(gdp.env.events.Event.INIT));
return(0);
}
function addEventListener(sType, fListener, bUseCapture, nPriority) {
eventDispatcher.addEventListener(sType, fListener, bUseCapture, nPriority);
}
function dispatchEvent(event) {
Object(event).oTarget = this;
return(eventDispatcher.dispatchEvent(event));
}
function hasEventListener(sType) {
return(eventDispatcher.hasEventListener(sType));
}
function removeEventListener(sType, fListener, bUseCapture) {
eventDispatcher.removeEventListener(sType, fListener, bUseCapture);
}
function willTrigger(sType) {
return(eventDispatcher.willTrigger(sType));
}
var eventDispatcher = null;
}
Symbol 1085 MovieClip [__Packages.gdp.core.base.BaseMovieClipEvent] Frame 0
class gdp.core.base.BaseMovieClipEvent extends gdp.env.events.Event
{
function BaseMovieClipEvent (sType, bBubbles, bCancelable) {
super(sType, bBubbles, bCancelable);
}
}
Symbol 1086 MovieClip [__Packages.windows.GameWindow] Frame 0
class windows.GameWindow extends gdp.core.base.BaseMovieClip
{
var createEmptyMovieClip, getNextHighestDepth, mcWater, attachMovie, _parent, mcBackground;
function GameWindow () {
super();
bUserPause = false;
mcBricks = createEmptyMovieClip("mcBricks", getNextHighestDepth());
gameplay.Field.getInstance(mcBricks).setWaterLine(370);
mcBalls = createEmptyMovieClip("mcBalls", getNextHighestDepth());
gameplay.Field.getInstance().setBallsLayer(mcBalls);
gameplay.Pad.getInstance(this);
mcWater = attachMovie("mc_Water", "mcWater", getNextHighestDepth(), {_x:-109.3, _y:361.4});
mcInterface = attachMovie("mc_LeftPanel", "mcInterface", getNextHighestDepth());
var _local3 = new Object();
_local3.onKeyDown = gdp.utils.Delegate.create(this, keyDown);
Key.addListener(_local3);
initChainball();
}
function startGame(Void) {
nLevel = 0;
setPoints(0);
setLives(nLivesCount);
setCoins(0);
gameplay.Field.getInstance().startGame();
initLevel();
resetChainball();
nUpsellType = 0;
mcPauseWindow.removeMovieClip();
mcPauseWindow = null;
}
function initLevel(Void) {
nextLevel();
Game.getInstance().playSound("level_start");
gameplay.Pad.getInstance().up();
trace(("windows.GameWindow.initLevel(" + [arguments]) + ")");
gameplay.Field.getInstance().initField(nLevel, gdp.utils.Delegate.create(this, startLevel));
}
function startLevel(Void) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sLevelStart);
}
unpause();
showInscription("game_on", gdp.utils.Delegate.create(gameplay.Field.getInstance(), gameplay.Field.getInstance().startBall));
gameplay.Field.getInstance().startLevel();
}
function continueLevel(Void) {
mcInscription.removeMovieClip();
gameplay.Field.getInstance().continueLevel();
gameplay.Field.getInstance().startBall();
}
function nextLevel(Void) {
setLevel(nLevel + 1);
}
function completeLevel(Void) {
trace(("windows.GameWindow.completeLevel(" + [arguments]) + ")");
Game.getInstance().playSound("level_complete");
removeLevel();
if (nLevel >= managers.LevelManager.getInstance().getLevelsCount()) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sGameWin);
}
gameComplete();
} else {
nUpsellType = 1;
if (nLevel == 5) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sAreaWin);
}
showInscription("area_complete", gdp.utils.Delegate.create(msn.Zone.getInstance(), msn.Zone.getInstance().gameBreak, [nLevel]));
} else {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sLevelWin);
}
showInscription("level_complete", gdp.utils.Delegate.create(msn.Zone.getInstance(), msn.Zone.getInstance().gameBreak, [nLevel]));
}
}
}
function removeLevel(Void) {
gameplay.Field.getInstance().removeLevel();
}
function gameOver(Void) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sLevelOver);
}
gameplay.Field.getInstance().chainballEnd();
nUpsellType = 2;
bNewHighScore = true;
showInscription("game_over", gdp.utils.Delegate.create(this, gotoPregame2));
}
function gotoPregame2(Void) {
}
function gameComplete(Void) {
gameplay.Field.getInstance().chainballEnd();
nUpsellType = 2;
bNewHighScore = true;
showInscription("game_complete", gdp.utils.Delegate.create(this, gotoPregame2));
}
function gotoPregame(Void) {
trace(("windows.GameWindow.gotoPregame(" + [arguments]) + ")");
mcUpsell.removeMovieClip();
mcUpsell = _parent.attachMovie("mc_Upsell", "mcUpsell", _parent.getNextHighestDepth());
mcUpsell.gotoAndStop(2);
removeLevel();
Game.getInstance().fromGametoPregame();
}
function showInscription(sMessage, callback) {
if (mcInscription != null) {
mcInscription.removeMovieClip();
}
mcInscription = attachMovie("mc_Inscription", "mcInscription", getNextHighestDepth(), {_x:200, _y:170});
fCallBack = callback;
mcInscription.gotoAndStop(sMessage);
if (mcPauseWindow != null) {
mcPauseWindow.swapDepths(mcInscription);
}
}
function initChainball(Void) {
nNextChainBallLock = 1;
mcChainBall = mcInterface.attachMovie("mc_ChainBallLocks", "mcChainBallLocks", mcInterface.getNextHighestDepth(), {_x:459, _y:262});
}
function resetChainball(Void) {
var _local2 = 1;
while (_local2 <= nChainballLocksCount) {
mcChainBall["mcLock_" + _local2].gotoAndStop(1);
_local2++;
}
}
function unlockChainball(lockIndex) {
getInstance().gotChainballKey();
gameplay.Pad.getInstance().addInscription(9, "0");
Game.getInstance().playSound("good_bonus");
trace(("windows.GameWindow.unlockChainball(" + [arguments]) + ")");
mcChainBall["mcLock_" + lockIndex].gotoAndPlay(2);
trace(("windows.GameWindow.unlockChainball(" + [nNextChainBallLock < nChainballLocksCount]) + ")");
if (nNextChainBallLock < nChainballLocksCount) {
nNextChainBallLock++;
} else {
getInstance().gotChainball();
resetChainball();
mcChainBall.gotoAndStop(2);
gameplay.Field.getInstance().addChainball(new gdp.utils.math.helpers.Point(mcChainBall._x, mcChainBall._y));
}
}
function removeChainball(Void) {
nNextChainBallLock = 1;
mcChainBall.gotoAndStop(1);
gameplay.Field.getInstance().removeChainball();
}
function getNextChainballLock(Void) {
return(nNextChainBallLock);
}
function padReady(Void) {
gameplay.Field.getInstance().ballToPad();
}
function exitGame(Void) {
gameplay.Field.getInstance().chainballEnd();
mcInscription.removeMovieClip();
mcInscription = null;
unpauseGame();
removeLevel();
Game.getInstance().fromGametoPregame();
}
function pauseGame(Void) {
if (mcPausedWindow != null) {
mcPausedWindow.removeMovieClip();
}
if (mcPauseWindow == null) {
mcPauseWindow = _parent.attachMovie("mc_pause", "mcPauseWindow", _parent.getNextHighestDepth());
Game.getInstance().showCursor(mcPauseWindow);
mcPauseWindow.btnResume.onRelease = gdp.utils.Delegate.create(this, unpauseGame);
mcPauseWindow.btnExit.onRelease = gdp.utils.Delegate.create(this, exitGame);
trace(("windows.GameWindow.pauseGame(" + [mcPauseWindow.btnResume.onRelease, mcPauseWindow.btnExit.onRelease]) + ")");
}
bUserPause = true;
pause();
}
function unpauseGame(Void) {
Game.getInstance().hideCursor();
mcPauseWindow.removeMovieClip();
mcPauseWindow = null;
bUserPause = false;
unpause();
}
function pause(Void) {
gameplay.Pad.getInstance().pause();
gameplay.Field.getInstance().pause();
}
function unpause(Void) {
gameplay.Pad.getInstance().unpause();
gameplay.Field.getInstance().unpause();
}
function onGamePause(bP) {
if (bP) {
pauseGame();
} else {
unpauseGame();
}
}
function onMouseDown(Void) {
if (Game.getInstance().bLoading != true) {
bMouseDown = true;
}
}
function onPress(Void) {
if (Game.getInstance().bLoading != true) {
bMouseDown = true;
if (mcHighScores != null) {
return(undefined);
}
if (!Game.getInstance().isGame()) {
return(undefined);
}
if (mcBlackScreen != null) {
return(undefined);
}
if (mcPauseWindow != null) {
return(undefined);
}
if (mcUpsell != null) {
return(undefined);
}
trace(("windows.GameWindow.onPress(" + [arguments]) + ")");
if (gameplay.Field.getInstance().isLevelShowing()) {
gameplay.Field.getInstance().endShowingLevel();
return(undefined);
}
if (fCallBack != null) {
mcInscription.removeMovieClip();
mcInscription = null;
if (nUpsellType != 0) {
pause();
if (nUpsellType == 2) {
if (bNewHighScore == true) {
showHighScoreWithFade();
} else {
showUpsellWithFade();
}
} else {
showUpsellWithFade();
}
} else {
Game.getInstance().hideCursor();
fCallBack();
fCallBack = null;
}
} else {
Game.getInstance().hideCursor();
if (gameplay.Field.getInstance().isBallsOnPad()) {
gameplay.Field.getInstance().startBall();
} else {
gameplay.Field.getInstance().startChainball();
}
}
}
}
function onMouseUp(Void) {
if (Game.getInstance().bLoading != true) {
bMouseDown = false;
Mouse.hide();
}
}
function onRollOut(Void) {
if (bMouseDown == true) {
return(undefined);
}
if (mcBlackScreen != null) {
return(undefined);
}
if (mcHighScores != null) {
return(undefined);
}
if (((_parent._ymouse > 30) && (_parent._ymouse < 356)) && ((_parent._xmouse < 80) || (_parent._xmouse > 435))) {
return(undefined);
}
if (!Game.getInstance().isGame()) {
return(undefined);
}
if (Game.getInstance().bLoading == true) {
return(undefined);
}
if (mcUpsell != null) {
return(undefined);
}
if (mcPauseWindow != null) {
return(undefined);
}
if (mcInscription != null) {
return(undefined);
}
if (gameplay.Field.getInstance().isLevelShowing()) {
return(undefined);
}
trace(("windows.GameWindow.onRollOut(" + [arguments]) + ")");
if (mcPausedWindow == null) {
mcPausedWindow = _parent.attachMovie("mc_paused", "mcPausedWindow", _parent.getNextHighestDepth());
}
bUserPause = true;
bMouseDown = false;
pause();
}
function onRollOver(Void) {
if (mcPauseWindow != null) {
return(undefined);
}
if (mcPausedWindow != null) {
mcPausedWindow.removeMovieClip();
}
mcPausedWindow = null;
bUserPause = false;
unpause();
}
function showHighScoreWithFade(Void) {
trace(("windows.GameWindow.showUpsellWithFade(" + [arguments]) + ")");
mcBlackScreen = _parent.attachMovie("mc_BlackScreen", "mcBlackScreen", _parent.getNextHighestDepth());
mcBlackScreen._alpha = 0;
bUp = true;
processChange = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psChange));
gdp.core.process.ProcessManager.getInstance().addProcess(processChange);
}
function showUpsellWithFade(Void) {
trace(("windows.GameWindow.showUpsellWithFade(" + [arguments]) + ")");
mcBlackScreen = _parent.attachMovie("mc_BlackScreen", "mcBlackScreen", _parent.getNextHighestDepth());
mcBlackScreen._alpha = 0;
bUp = true;
processChange = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psChange));
gdp.core.process.ProcessManager.getInstance().addProcess(processChange);
}
function psChange(Void) {
trace(("windows.GameWindow.psChange(" + [mcBlackScreen._alpha]) + ")");
if (bUp) {
mcBlackScreen._alpha = mcBlackScreen._alpha + 2;
if (mcBlackScreen._alpha > 100) {
bUp = false;
if (bNewHighScore2 == true) {
bNewHighScore2 = false;
mochi.MochiScores.closeLeaderboard();
mcHighScores.removeMovieClip();
mcHighScores = null;
}
if (bNewHighScore == true) {
removeLevel();
mcHighScores.removeMovieClip();
mcHighScores = _parent.attachMovie("mc_HighScoresWindow", "mcHighScores", _parent.getNextHighestDepth());
mcHighScores.gotoAndStop(3);
Mouse.hide();
Game.getInstance().showCursor(mcHighScores);
} else if (nUpsellType == 1) {
removeLevel();
mcUpsell.removeMovieClip();
mcUpsell = _parent.attachMovie("mc_Upsell", "mcUpsell", _parent.getNextHighestDepth());
mcAdHolder = mcUpsell.attachMovie("mc_AdHolder", "mcAdHolder", mcUpsell.getNextHighestDepth(), {_x:110, _y:10});
MochiAd.showClickAwayAd({clip:mcAdHolder, id:"6a7499107dbf578d"});
mcUpsell.gotoAndStop(1);
mcUpsell.btnContinue.enabled(false);
mcUpsell.btnContinue._alpha = 50;
Mouse.hide();
Game.getInstance().showCursor(mcUpsell);
} else if (nUpsellType == 5) {
mcUpsell.removeMovieClip();
mcUpsell = null;
} else {
removeLevel();
mcUpsell.removeMovieClip();
mcUpsell = _parent.attachMovie("mc_Upsell", "mcUpsell", _parent.getNextHighestDepth());
mcUpsell.gotoAndStop(2);
Mouse.hide();
Game.getInstance().showCursor(mcUpsell);
}
}
} else {
if (nUpsellType == 1) {
mcBlackScreen._alpha = mcBlackScreen._alpha - 1;
} else {
mcBlackScreen._alpha = mcBlackScreen._alpha - 2;
}
if (mcBlackScreen._alpha < 0) {
if (bNewHighScore == true) {
bNewHighScore = false;
bNewHighScore2 = true;
mcHighScores.btnContinue.onRelease = gdp.utils.Delegate.create(this, hideHighScores);
mochi.MochiScores.showLeaderboard({boardID:"df5963d9c1f98b8f", clip:mcHighScores, res:"515x350", score:nPoints, hideDoneButton:true});
} else if (nUpsellType == 5) {
nUpsellType = 0;
fCallBack();
fCallBack = null;
} else {
if (nUpsellType == 1) {
mcUpsell.btnContinue.enabled(true);
mcUpsell.btnContinue._alpha = 100;
Mouse.hide();
Game.getInstance().showCursor(mcUpsell);
}
mcUpsell.btnDownload.onRelease = gdp.utils.Delegate.create(Game.getInstance(), Game.getInstance().downloadFullVersion);
mcUpsell.btnContinue.onRelease = gdp.utils.Delegate.create(this, removeUpsell2);
mcUpsell.btnPlayAgain.onRelease = gdp.utils.Delegate.create(this, onGameEnd);
}
mcBlackScreen.removeMovieClip();
mcBlackScreen = null;
gdp.core.process.ProcessManager.getInstance().removeProcess(processChange);
}
}
}
function hideHighScores(Void) {
showUpsellWithFade();
}
function onGameEnd(Void) {
gotoPregame();
}
function removeUpsell2(Void) {
trace(("windows.GameWindow.removeUpsell2(" + [arguments]) + ")");
mcBlackScreen = _parent.attachMovie("mc_BlackScreen", "mcBlackScreen", _parent.getNextHighestDepth());
mcBlackScreen._alpha = 0;
nUpsellType = 5;
bUp = true;
processChange = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psChange));
gdp.core.process.ProcessManager.getInstance().addProcess(processChange);
Mouse.hide();
Game.getInstance().hideCursor();
}
function removeUpsell(Void) {
trace(("windows.GameWindow.removeUpsell(" + [arguments]) + ")");
Game.getInstance().hideCursor();
mcUpsell.removeMovieClip();
mcUpsell = null;
nUpsellType = 0;
fCallBack();
fCallBack = null;
}
function isUserPause(Void) {
return(bUserPause);
}
function keyDown(Void) {
trace(("windows.GameWindow.keyDown(" + [arguments]) + ")");
if (Key.isDown(27) || (Key.isDown(32))) {
if (!Game.getInstance().isGame()) {
return(undefined);
}
if (mcUpsell != null) {
return(undefined);
}
if (mcPausedWindow != null) {
return(undefined);
}
if (mcInscription != null) {
return(undefined);
}
if (mcHighScores != null) {
return(undefined);
}
if (gameplay.Field.getInstance().isPause()) {
gameplay.Pad.getInstance().unpause();
unpauseGame();
} else {
gameplay.Pad.getInstance().pause();
pauseGame();
}
}
if (bCheats) {
if (Key.isDown(69)) {
addLive();
}
if (Key.isDown(80)) {
mcInscription.removeMovieClip();
completeLevel();
}
if (Key.isDown(82)) {
mcInscription.removeMovieClip();
pause();
nLevel--;
removeLevel();
nUpsellType = 1;
showInscription("level_complete", gdp.utils.Delegate.create(msn.Zone.getInstance(), msn.Zone.getInstance().gameBreak, [nLevel]));
}
if (Key.isDown(67)) {
var _local3 = 1;
while (_local3 <= nChainballLocksCount) {
unlockChainball(_local3);
_local3++;
}
}
}
}
function setLevel(level) {
nLevel = level;
if (level < 6) {
mcInterface.tfLevel.text = ("Castle " + level.toString()) + "/5";
mcBackground.gotoAndStop(1);
} else {
mcInterface.tfLevel.text = ("Forest " + (level - 5).toString()) + "/5";
mcBackground.gotoAndStop(2);
}
}
function setPoints(points) {
nPoints = points;
var _local4 = [];
var _local6 = 1000;
var _local7 = points % _local6;
_local4.unshift(_local7);
var _local5 = Math.floor(points / _local6);
while (_local5 != 0) {
_local7 = _local5 % _local6;
_local4.unshift(_local7);
_local5 = Math.floor(_local5 / _local6);
}
var _local8 = "";
var _local2;
var _local3 = 0;
while (_local3 < _local4.length) {
_local2 = _local4[_local3].toString();
if (_local3 != 0) {
while (_local2.length < 3) {
_local2 = "0" + _local2;
}
}
_local8 = _local8 + _local2;
if (_local3 != (_local4.length - 1)) {
_local8 = _local8 + ",";
}
_local3++;
}
mcInterface.tfPoints.text = _local8;
}
function getLevel(Void) {
return(nLevel);
}
function addPoints(points) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sScoreChanged);
}
setPoints(nPoints + points);
msn.Zone.getInstance().scoreBroadcast(nPoints + points, gdp.core.time.FrameTimer.getInstance().getTime());
}
function setLives(lives) {
nLives = lives;
var _local2 = lives.toString();
if (_local2.length < 2) {
_local2 = "0" + _local2;
}
mcInterface.tfLives.text = _local2;
}
function addLive(Void) {
setLives(nLives + 1);
}
function removeLive(Void) {
if (nLives == 0) {
gameplay.Field.getInstance().removeBalls();
gameplay.Pad.getInstance().down(false);
gameOver();
} else {
Game.getInstance().playSound("life_lost");
showInscription("life_lost", gdp.utils.Delegate.create(this, continueLevel));
gameplay.Pad.getInstance().down(true);
gameplay.Field.getInstance().removeBalls();
setLives(nLives - 1);
}
}
function setCoins(coins) {
nCoins = coins;
if (nCoins >= nCoinsForLive) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sLifeAdd);
}
addLive();
nCoins = nCoins - nCoinsForLive;
}
if (nCoins < 0) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sLifeLost);
}
removeLive();
nCoins = nCoinsForLive + nCoins;
}
mcInterface.mcGoldenWing.gotoAndStop(nCoins + 1);
var _local2 = nCoins.toString();
if (_local2.length < 2) {
_local2 = "0" + _local2;
}
mcInterface.tfCoins.text = _local2;
}
function addCoin(Void) {
gotCoin();
Game.getInstance().playSound("coin");
gameplay.Pad.getInstance().addInscription(1, "0");
setCoins(nCoins + 1);
}
function catchDevilDrop(Void) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sCatchDevilDrop);
}
Game.getInstance().playSound("hit_by_flame");
var _local2 = nCoinsAfterDropMin + random((nCoinsAfterDropMax - nCoinsAfterDropMin) + 1);
setCoins(nCoins - _local2);
}
function gotRedJewel(Void) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sRedJewel);
}
}
function gotBlueJewel(Void) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sBlueJewel);
}
}
function gotYellowJewel(Void) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sYellowJewel);
}
}
function gotThreeBall(Void) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sBonusThreeBall);
}
}
function gotStrongBall(Void) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sBonusStrongBall);
}
}
function gotWackyBall(Void) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sBonusWackyBall);
}
}
function gotSpeedUp(Void) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sBonusSpeedUp);
}
}
function gotSpeedDown(Void) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sBonusSpeedDown);
}
}
function gotCoin(Void) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sCoin);
}
}
function gotFairy(Void) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sFairy);
}
}
function gotChainballKey(Void) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sChainballKey);
}
}
function gotChainball(Void) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sChainball);
}
}
function notgotBonus(Void) {
if (bDiamondApiOn) {
fscommand ("DataBroadcast", sBonusNotPicked);
}
}
function setCheats(bOn) {
bCheats = bOn;
}
function setLivesCount(lives) {
nLivesCount = lives;
}
function setCoinsForLive(coins) {
nCoinsForLive = coins;
}
function setCoinsAfterDropMin(coins) {
nCoinsAfterDropMin = coins;
}
function setCoinsAfterDropMax(coins) {
nCoinsAfterDropMax = coins;
}
function setTexts(oTexts) {
sLevelStart = ("<game><data>" + oTexts.sLevelStart) + "<data></game>";
sLevelWin = ("<game><data>" + oTexts.sLevelWin) + "<data></game>";
sAreaWin = ("<game><data>" + oTexts.sAreaWin) + "<data></game>";
sGameWin = ("<game><data>" + oTexts.sGameWin) + "<data></game>";
sLevelOver = ("<game><data>" + oTexts.sLevelOver) + "<data></game>";
sRedJewel = ("<game><data>" + oTexts.sRedJewel) + "<data></game>";
sBlueJewel = ("<game><data>" + oTexts.sBlueJewel) + "<data></game>";
sYellowJewel = ("<game><data>" + oTexts.sYellowJewel) + "<data></game>";
sBonusThreeBall = ("<game><data>" + oTexts.sBonusThreeBall) + "<data></game>";
sBonusStrongBall = ("<game><data>" + oTexts.sBonusStrongBall) + "<data></game>";
sBonusWackyBall = ("<game><data>" + oTexts.sBonusWackyBall) + "<data></game>";
sBonusSpeedUp = ("<game><data>" + oTexts.sBonusSpeedUp) + "<data></game>";
sBonusSpeedDown = ("<game><data>" + oTexts.sBonusSpeedDown) + "<data></game>";
sCoin = ("<game><data>" + oTexts.sCoin) + "<data></game>";
sFairy = ("<game><data>" + oTexts.sFairy) + "<data></game>";
sChainballKey = ("<game><data>" + oTexts.sChainballKey) + "<data></game>";
sChainball = ("<game><data>" + oTexts.sChainball) + "<data></game>";
sLifeAdd = ("<game><data>" + oTexts.sLifeAdd) + "<data></game>";
sLifeLost = ("<game><data>" + oTexts.sLifeLost) + "<data></game>";
sCatchDevilDrop = ("<game><data>" + oTexts.sCatchDevilDrop) + "<data></game>";
sScoreChanged = ("<game><data>" + oTexts.sScoreChanged) + "<data></game>";
sBonusNotPicked = ("<game><data>" + oTexts.sBonusNotPicked) + "<data></game>";
}
function setDiamondApiOn(bOn) {
bDiamondApiOn = bOn;
}
static function getInstance(mcParent, oParams) {
if (instance == null) {
instance = windows.GameWindow(mcParent.attachMovie("mc_GameWindow", "mcGameWindow", mcParent.getNextHighestDepth(), oParams));
}
return(instance);
}
static var instance = null;
var nLivesCount = 3;
var nCoinsForLive = 100;
var nLevel = null;
var nPoints = null;
var nLives = null;
var nCoins = null;
var nCoinsAfterDropMin = 15;
var nCoinsAfterDropMax = 20;
var mcInterface = null;
var mcBalls = null;
var mcBricks = null;
var mcChainBall = null;
var mcInscription = null;
var mcUpsell = null;
var fCallBack = null;
var nChainballLocksCount = 5;
var nNextChainBallLock = null;
var nUpsellType = null;
var mcAdHolder = null;
var mcHighScores = null;
var bNewHighScore = false;
var bNewHighScore2 = false;
var mcBlackScreen = null;
var processChange = null;
var bUp = null;
var bCheats = false;
var sLevelStart = "Start Level!";
var sLevelWin = "Win Level!";
var sAreaWin = "Win Area!";
var sGameWin = "Win Game!";
var sLevelOver = "Game Over :( !";
var sRedJewel = "RedJewel";
var sBlueJewel = "BlueJewel";
var sYellowJewel = "YellowJewel";
var sBonusThreeBall = "BonusThreeBall";
var sBonusStrongBall = "BonusStrongBall";
var sBonusWackyBall = "BonusWackyBall";
var sBonusSpeedUp = "BonusSpeedUp";
var sBonusSpeedDown = "BonusSpeedDown";
var sCoin = "Coin";
var sFairy = "Fairy";
var sChainballKey = "ChainballKey";
var sChainball = "Chainball";
var sLifeAdd = "LifeAdd";
var sLifeLost = "LifeLost";
var sCatchDevilDrop = "CatchDevilDrop";
var sScoreChanged = "ScoreChanged";
var sBonusNotPicked = "BonusNotPicked";
var bUserPause = null;
var mcPauseWindow = null;
var mcPausedWindow = null;
var bMouseDown = false;
var bDiamondApiOn = false;
}
Symbol 1087 MovieClip [__Packages.gameplay.Field] Frame 0
class gameplay.Field extends gdp.core.base.BaseClass
{
function Field (mcParent) {
super();
this.mcParent = mcParent;
bGame = false;
}
function initField(levelNumber, fCallback) {
trace(("gameplay.Field.initField(" + [mcParent]) + ")");
gameplay.Grid.getInstance().init();
currentLevel = managers.LevelManager.getInstance().getLevel(levelNumber);
initBricks();
initBonuses();
currentElement = 0;
elementLastAppearTime = null;
fShowCallback = fCallback;
processShowLevel = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psShowLevel));
gdp.core.process.ProcessManager.getInstance().addProcess(processShowLevel);
trace(("gameplay.Field.initField(" + [arguments]) + ")");
bFairy = false;
aFairies = [];
aDevilDrops = [];
aSparks = [];
aCoins = [];
processFairy = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psFairy));
gdp.core.process.ProcessManager.getInstance().addProcess(processFairy);
}
function initBall(Void) {
var _local2 = 0;
while (_local2 < aBalls.length) {
aBalls[_local2].death();
_local2++;
}
aBalls = [];
var _local3 = gameplay.Ball(mcBallsParent.attachMovie("mc_Ball", "mcBall_0", mcBallsParent.getNextHighestDepth()));
aBalls.push(_local3);
trace(("gameplay.Field.initBall(" + [_local3]) + ")");
}
function initBricks(Void) {
trace(("gameplay.Field.initBricks(" + [arguments]) + ")");
aBricks = [];
aRemovedBricks = [];
aBricksToFairyDestroy = [];
aBricksOrder = [];
var _local4 = null;
var _local6 = null;
nBricksOnFieldCount = 0;
var _local9 = currentLevel.getBricksCount();
var _local5 = 0;
while (_local5 < _local9) {
_local4 = currentLevel.getBrickData(_local5);
if (_local4.ID != -1) {
_local6 = elements.Brick(mcParent.attachMovie(managers.BrickManager.getInstance().getBrickImage(_local4.Type), "mcBrick_" + _local5, mcParent.getNextHighestDepth()));
_local6.init(_local4, aBricks.length);
_local6.hide();
if (_local6.getFlags()[0] == 0) {
gameplay.Grid.getInstance().addBrick(_local6, aBricks.length);
}
if (_local6.isFairyHelp()) {
if ((managers.BrickManager.getInstance().getFlags(_local4.Type)[0] != 1) && (managers.BrickManager.getInstance().getFlags(_local4.Type)[2] != 1)) {
if (managers.BrickManager.getInstance().getID(_local4.Type) != 6) {
aBricksToFairyDestroy.push(aBricks.length);
}
}
}
if (_local4.Type < 0) {
aBricks.push(null);
} else {
aBricks.push(_local6);
}
aBricksOrder.push(_local5);
if ((_local6 != null) && (managers.BrickManager.getInstance().getID(_local4.Type) != 6)) {
if ((managers.BrickManager.getInstance().getFlags(_local4.Type)[0] != 1) && (managers.BrickManager.getInstance().getFlags(_local4.Type)[2] != 1)) {
nBricksOnFieldCount++;
}
}
}
_local5++;
}
aFrogs = [];
var _local7;
var _local10 = currentLevel.getFrogsCount();
_local5 = 0;
while (_local5 < _local10) {
var _local8 = currentLevel.getFrogData(_local5);
_local7 = elements.Frog(mcParent.attachMovie("mc_Frog", "mcFrog" + _local5, mcParent.getNextHighestDepth()));
_local7.init(_local8);
aFrogs.push(_local7);
_local5++;
}
aBricksOrder.sort(gdp.utils.Delegate.create(this, orderBricks));
_local5 = 0;
while (_local5 < aBricks.length) {
if (aBricks[_local5].isMoving()) {
var _local3 = 0;
while (_local3 < aBricks.length) {
if (!aBricks[_local3].isMoving()) {
if (aBricks[_local5].getDepth() < aBricks[_local3].getDepth()) {
aBricks[_local5].swapDepths(aBricks[_local3]);
}
}
_local3++;
}
}
_local5++;
}
}
function initBonuses(Void) {
aBonuses = [];
var _local4 = null;
var _local3 = null;
var _local2 = 0;
while (_local2 < currentLevel.getBonusesCount()) {
_local4 = currentLevel.getBonusData(_local2);
_local3 = elements.BonusContainer(mcParent.attachMovie("mc_Bonus", "mcBonus_" + _local2, mcParent.getNextHighestDepth()));
_local3.init(_local4, aBonuses.length);
aBricks[_local4.Brick].setConcernedBonus(aBonuses.length);
_local3.hide();
gameplay.Grid.getInstance().addBonus(_local3, aBonuses.length);
aBonuses.push(_local3);
_local2++;
}
}
function psShowLevel(Void) {
if (isPause()) {
return(undefined);
}
if (elementLastAppearTime == null) {
elementLastAppearTime = gdp.core.time.FrameTimer.getInstance().getTime();
}
if (currentElement >= aBricksOrder.length) {
if ((gdp.core.time.FrameTimer.getInstance().getTime() - elementLastAppearTime) > elementAppearDelay) {
aBonuses[currentElement - aBricksOrder.length].show();
currentElement++;
}
if (currentElement >= (aBricksOrder.length + aBonuses.length)) {
currentElement = null;
elementLastAppearTime = null;
fShowCallback();
gdp.core.process.ProcessManager.getInstance().removeProcess(processShowLevel);
processShowLevel = null;
}
} else if ((gdp.core.time.FrameTimer.getInstance().getTime() - elementLastAppearTime) > elementAppearDelay) {
aBricks[aBricksOrder[currentElement]].show();
currentElement++;
}
}
function endShowingLevel(Void) {
trace(("gameplay.Field.endShowingLevel(" + [processShowLevel]) + ")");
if (processShowLevel == null) {
return(undefined);
}
gdp.core.process.ProcessManager.getInstance().removeProcess(processShowLevel);
processShowLevel = null;
while (currentElement < (aBricksOrder.length + aBonuses.length)) {
if (currentElement >= aBricksOrder.length) {
aBonuses[currentElement - aBricksOrder.length].show();
} else {
aBricks[aBricksOrder[currentElement]].show();
}
currentElement++;
}
fShowCallback();
}
function startGame(Void) {
}
function startLevel(Void) {
bGame = true;
}
function continueLevel(Void) {
}
function completeLevel(Void) {
nCompleteLevelTime = gdp.core.time.FrameTimer.getInstance().getTime();
processDelayAfterLevelComplete = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psDelayAfterLevelComplete));
gdp.core.process.ProcessManager.getInstance().addProcess(processDelayAfterLevelComplete);
}
function psDelayAfterLevelComplete(Void) {
trace(("gameplay.Field.psDelayAfterLevelComplete(" + [arguments]) + ")");
if ((gdp.core.time.FrameTimer.getInstance().getTime() - nCompleteLevelTime) > nDelayAfterCompleteLevel) {
bGame = false;
pause();
windows.GameWindow.getInstance().completeLevel();
gdp.core.process.ProcessManager.getInstance().removeProcess(processDelayAfterLevelComplete);
}
}
function removeLevel(Void) {
bGame = false;
removeBricks();
removeBonuses();
removeBalls();
removeFairies();
removeDevilDrops();
removeSparks();
removeCoins();
}
function removeBricks(Void) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processShowLevel);
processShowLevel = null;
var _local2 = 0;
while (_local2 < aBricks.length) {
aBricks[_local2].remove();
_local2++;
}
aBricks = [];
_local2 = 0;
while (_local2 < aFrogs.length) {
aFrogs[_local2].remove();
_local2++;
}
}
function removeBonuses(Void) {
var _local2 = 0;
while (_local2 < aBonuses.length) {
aBonuses[_local2].remove();
_local2++;
}
}
function removeBalls(Void) {
var _local2 = 0;
while (_local2 < aBalls.length) {
aBalls[_local2].remove();
_local2++;
}
aBalls = [];
}
function removeFairies(Void) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processFairy);
var _local2 = 0;
while (_local2 < aFairies.length) {
aFairies[_local2].remove();
_local2++;
}
aFairies = [];
}
function removeDevilDrops(Void) {
var _local2 = 0;
while (_local2 < aDevilDrops.length) {
aDevilDrops[_local2].remove();
_local2++;
}
aDevilDrops = [];
}
function removeSparks(Void) {
var _local2 = 0;
while (_local2 < aSparks.length) {
aSparks[_local2].remove();
_local2++;
}
aSparks = [];
}
function removeCoins(Void) {
var _local2 = 0;
while (_local2 < aCoins.length) {
aCoins[_local2].remove();
_local2++;
}
aCoins = [];
}
function ballMove(Void) {
aBalls[0].testMoving();
}
function startBall(Void) {
if (bPause) {
return(undefined);
}
var _local2 = 0;
while (_local2 < aBalls.length) {
aBalls[_local2].start();
_local2++;
}
}
function ballToPad(Void) {
initBall();
}
function ballDeath(ball) {
var _local2 = 0;
while (_local2 < aBalls.length) {
if (aBalls[_local2] == ball) {
aBalls.splice(_local2, 1);
}
_local2++;
}
if (aBalls.length == 0) {
windows.GameWindow.getInstance().removeLive();
}
}
function isBallsOnPad(Void) {
var _local2 = 0;
while (_local2 < aBalls.length) {
if (aBalls[_local2].isOnPad()) {
return(true);
}
_local2++;
}
return(false);
}
function ballsFollowPad(Void) {
var _local2 = 0;
while (_local2 < aBalls.length) {
if (aBalls[_local2].isOnPad()) {
aBalls[_local2].followPad();
}
_local2++;
}
if (aBalls.length != 0) {
if ((mcChainballUp != null) && (mcChainballUp._visible == true)) {
mcChainballUp.followPad();
}
if ((mcChainballDown != null) && (mcChainballDown._visible == true)) {
mcChainballDown.followPad();
}
}
}
function addDevilDrop(drop) {
aDevilDrops.push(drop);
}
function addSpark(spark) {
aSparks.push(spark);
}
function addCoin(coin) {
aCoins.push(coin);
}
function addFairy(position) {
windows.GameWindow.getInstance().gotFairy();
var _local2;
if (position == null) {
if (random(2) == 0) {
_local2 = new gdp.utils.math.helpers.Point(-20 - random(100), nUpBorder + random(200));
} else {
_local2 = new gdp.utils.math.helpers.Point(random(nRightBorder), -20 - random(100));
}
} else {
_local2 = position;
}
if (aFairies == null) {
aFairies = [];
}
var _local3 = mcParent.getNextHighestDepth();
var _local4 = mcParent.attachMovie("mc_Fairy", "mcFairy" + _local3, _local3, {_x:_local2.nX, _y:_local2.nY});
trace(("gameplay.Field.addFairy(" + [_local2, _local4]) + ")");
aFairies.push(_local4);
}
function addBonus(bonus) {
aBonuses.push(bonus);
}
function addChainball(pos) {
if (mcChainballUp == null) {
mcChainballUp = gameplay.Chainball(windows.GameWindow.getInstance().attachMovie("mc_ChainBall", "mcChainBallUp", windows.GameWindow.getInstance().getNextHighestDepth(), {_x:pos.nX, _y:pos.nY}));
mcChainballDown = gameplay.Chainball(mcBallsParent.attachMovie("mc_ChainBall", "mcChainBallDown", mcBallsParent.getNextHighestDepth(), {_x:pos.nX, _y:pos.nY}));
mcChainballUp.goToPad();
mcChainballDown.setType(false);
mcChainballUp.setType(true);
mcChainballDown._visible = false;
}
}
function startChainball(Void) {
if (mcChainballUp != null) {
Game.getInstance().playSound("fire");
mcChainballDown.start();
}
}
function removeChainball(Void) {
mcChainballUp = null;
mcChainballDown = null;
}
function chainballReady(Void) {
trace(("gameplay.Field.chainballReady(" + [arguments]) + ")");
mcChainballUp._visible = false;
mcChainballDown.setActive(new gdp.utils.math.helpers.Point(mcChainballUp._x, mcChainballUp._y));
}
function chainballEnd(Void) {
mcChainballUp.goAway(new gdp.utils.math.helpers.Point(mcChainballDown._x, mcChainballDown._y));
mcChainballDown.removeMovieClip();
}
function getLeftBorder(Void) {
return(nLeftBorder);
}
function getRightBorder(Void) {
return(nRightBorder);
}
function getUpBorder(Void) {
return(nUpBorder);
}
function getDownBorder(Void) {
return(nDownBorder);
}
function getBrick(type) {
return(aBricks[type]);
}
function getBonus(type) {
return(aBonuses[type]);
}
function getWaterLine(Void) {
return(nWaterLine);
}
function getFloor(Void) {
return(nDownBorder);
}
function getFrogs(Void) {
return(aFrogs);
}
function setWaterLine(waterline) {
nWaterLine = waterline;
}
function setBallsLayer(mc) {
mcBallsParent = mc;
}
function resurrectBrick(type) {
Game.getInstance().playSound("brick_resurrected");
var _local4;
var _local6 = currentLevel.getBrickData(type);
if (_local6.ID != -1) {
_local4 = elements.Brick(mcParent.attachMovie(managers.BrickManager.getInstance().getBrickImage(_local6.Type), "mcBrick_" + type, mcParent.getNextHighestDepth()));
_local4.init(_local6, type);
trace(("gameplay.Field.initBricks(" + [_local4]) + ")");
if (_local4.getFlags()[0] == 0) {
gameplay.Grid.getInstance().addBrick(_local4, type);
}
if (managers.BrickManager.getInstance().getFlags(_local4.getType())[3] == 1) {
var _local2 = 0;
while (_local2 < aBricks.length) {
if (_local4.getDepth() > aBricks[_local2].getDepth()) {
_local4.swapDepths(aBricks[_local2]);
}
_local2++;
}
}
aBricks[type] = _local4;
if (_local4 != null) {
nBricksOnFieldCount++;
}
}
var _local3 = 0;
while (_local3 < aRemovedBricks.length) {
if (aRemovedBricks[_local3] == type) {
aRemovedBricks.splice(_local3, 1);
break;
}
_local3++;
}
}
function bombMushroomExplode(bricks, bonuses) {
Game.getInstance().playSound("explosion");
var _local5;
var _local3;
var _local6;
var _local2 = 0;
while (_local2 < bricks.length) {
_local5 = bricks[_local2].brick;
_local3 = aBricks[_local5];
if ((managers.BrickManager.getInstance().getFlags(_local3.getType())[0] != 1) && (managers.BrickManager.getInstance().getFlags(_local3.getType())[2] != 1)) {
_local6 = (nMushroomExplodeMaxDelay * bricks[_local2].distance) / 100;
_local3.deathWithDelay(_local6);
}
_local2++;
}
_local2 = 0;
while (_local2 < bonuses.length) {
bonuses[_local2].hit((Math.PI/2));
_local2++;
}
}
function removeBrick(type) {
var _local4 = managers.BrickManager.getInstance().getScore(aBricks[type].getType());
windows.GameWindow.getInstance().addPoints(_local4);
if ((((managers.BrickManager.getInstance().getFlags(aBricks[type].getType())[0] != 1) && (managers.BrickManager.getInstance().getFlags(aBricks[type].getType())[2] != 1)) && (managers.BrickManager.getInstance().getFlags(aBricks[type].getType())[7] != 1)) && (managers.BrickManager.getInstance().getFlags(aBricks[type].getType())[8] != 1)) {
if (!aBricks[type].isMoving()) {
aRemovedBricks.push(type);
}
}
if (managers.BrickManager.getInstance().getID(aBricks[type].getType()) != 6) {
if ((managers.BrickManager.getInstance().getFlags(aBricks[type].getType())[0] != 1) && (managers.BrickManager.getInstance().getFlags(aBricks[type].getType())[2] != 1)) {
trace(("gameplay.Field.removeBrick(" + [nBricksOnFieldCount]) + ")");
nBricksOnFieldCount--;
if (nBricksOnFieldCount <= 0) {
completeLevel();
}
}
}
aBricks[type] = null;
var _local2 = 0;
while (_local2 < aBricksToFairyDestroy.length) {
if (aBricksToFairyDestroy[_local2] == type) {
aBricksToFairyDestroy.splice(_local2, 1);
_local2--;
}
_local2++;
}
if (nBricksOnFieldCount <= nLeftBricksForFairy) {
bFairy = true;
}
}
function removeBonus(type) {
aBonuses[type] = null;
}
function removeFairy(fairy) {
var _local2 = 0;
while (_local2 < aFairies.length) {
if (aFairies[_local2] == fairy) {
aFairies.splice(_local2, 1);
}
_local2++;
}
}
function addExplosion(be) {
brickExplosion = be;
}
function hitBonus(type) {
trace(("gameplay.Field.hitBonus(" + [type]) + ")");
aBonuses[type].hitConnectedBrick();
}
function createBonus(type, position, direction) {
var _local4 = mcParent.getNextHighestDepth();
var _local2 = "";
switch (type) {
case 3 :
_local2 = "mc_Coin";
break;
default :
_local2 = "mc_Bonus_" + type;
}
var _local3 = elements.Bonus(mcParent.attachMovie(_local2, "mcBonus_" + _local4, _local4, {_x:position.nX, _y:position.nY}));
_local3.setType(type);
_local3.init(direction, nBonusSpeed);
_local3.setLockToCatch();
}
function addPointsForJewel(points) {
Game.getInstance().playSound("score");
gameplay.Pad.getInstance().addInscription(2, points.toString());
windows.GameWindow.getInstance().addPoints(points);
}
function threeBall(Void) {
windows.GameWindow.getInstance().gotThreeBall();
Game.getInstance().playSound("good_bonus");
gameplay.Pad.getInstance().addInscription(3, "0");
if (aBalls.length == 0) {
return(undefined);
}
var _local4 = 3 - aBalls.length;
var _local3;
var _local2 = 0;
while (_local2 < _local4) {
_local3 = gameplay.Ball(mcBallsParent.attachMovie("mc_Ball", "mcBall_2" + _local2, mcBallsParent.getNextHighestDepth()));
_local3.setStand(-20 + (50 * _local2));
aBalls.push(_local3);
_local2++;
}
}
function strongBall(Void) {
windows.GameWindow.getInstance().gotStrongBall();
Game.getInstance().playSound("good_bonus");
gameplay.Pad.getInstance().addInscription(4, "0");
var _local2 = 0;
while (_local2 < aBalls.length) {
aBalls[_local2].setStrong();
_local2++;
}
}
function fireBall(Void) {
Game.getInstance().playSound("good_bonus");
gameplay.Pad.getInstance().addInscription(5, "0");
var _local2 = 0;
while (_local2 < aBalls.length) {
aBalls[_local2].setFire();
_local2++;
}
}
function speedUp(Void) {
windows.GameWindow.getInstance().gotSpeedUp();
Game.getInstance().playSound("bad_bonus");
gameplay.Pad.getInstance().addInscription(6, "0");
var _local2 = 0;
while (_local2 < aBalls.length) {
aBalls[_local2].speedUp();
_local2++;
}
}
function speedDown(Void) {
windows.GameWindow.getInstance().gotSpeedDown();
Game.getInstance().playSound("bad_bonus");
gameplay.Pad.getInstance().addInscription(7, "0");
var _local2 = 0;
while (_local2 < aBalls.length) {
aBalls[_local2].speedDown();
_local2++;
}
}
function catchRedLiquid(Void) {
windows.GameWindow.getInstance().gotWackyBall();
Game.getInstance().playSound("hit_by_flame");
Game.getInstance().playSound("bad_bonus");
var _local2 = 0;
while (_local2 < aBalls.length) {
aBalls[_local2].setWacky();
_local2++;
}
}
function getBrickToResurrect(Void) {
trace(("gameplay.Field.getBrickToResurrect(" + [aRemovedBricks]) + ")");
if (aRemovedBricks.length == 0) {
return(null);
}
var _local2 = random(aRemovedBricks.length);
var _local3 = aRemovedBricks[_local2];
aRemovedBricks.splice(_local2, 1);
return(_local3);
}
function setReadyToSpark(Void) {
var _local2 = 0;
while (_local2 < aBricks.length) {
aBricks[_local2].setReadyToSpark();
_local2++;
}
}
function getBrickToFairyDestroy(Void) {
if (aBricksToFairyDestroy.length == 0) {
return(null);
}
var _local2 = random(aBricksToFairyDestroy.length);
var _local3 = aBricksToFairyDestroy[_local2];
aBricksToFairyDestroy.splice(_local2, 1);
return(_local3);
}
function getBrickPosition(type) {
var _local2 = currentLevel.getBrickData(type);
var _local4 = managers.BrickManager.getInstance().getWidth(_local2.Type);
var _local3 = managers.BrickManager.getInstance().getHeight(_local2.Type);
trace(("gameplay.Field.getBrickPosition(" + [_local2, _local4, _local3]) + ")");
trace(("gameplay.Field.getBrickPosition(" + [_local2.PositionPoints[0].nX + (_local4 / 2), _local2.PositionPoints[0].nY + (_local3 / 2)]) + ")");
return(new gdp.utils.math.helpers.Point(_local2.PositionPoints[0].nX + (_local4 / 2), _local2.PositionPoints[0].nY + (_local3 / 2)));
}
function sendMessage(messageReceiver, message) {
if (messageReceiver != -1) {
aBricks[messageReceiver].receive(message);
}
}
function psFairy(Void) {
if (isPause()) {
return(undefined);
}
var _local2 = 0;
while (_local2 < aFrogs.length) {
aFrogs[_local2].setStart();
_local2++;
}
if (nFairyAppearanceTime == null) {
nFairyAppearanceTime = gdp.core.time.FrameTimer.getInstance().getTime();
nFairyAppearanceDelay = nMinFairyAppearanceDelay + random(nMaxFairyAppearanceDelay - nMinFairyAppearanceDelay);
}
if (!bFairy) {
return(undefined);
}
if ((gdp.core.time.FrameTimer.getInstance().getTime() - nFairyAppearanceTime) > nFairyAppearanceDelay) {
if (aFairies.length >= 2) {
return(undefined);
}
addFairy(null);
if (aFairies.length == 1) {
nFairyAppearanceDelay = nMinFairyAppearanceDelay + random(1000);
} else {
nFairyAppearanceDelay = nMinFairyAppearanceDelay + random(nMaxFairyAppearanceDelay - nMinFairyAppearanceDelay);
}
nFairyAppearanceTime = gdp.core.time.FrameTimer.getInstance().getTime();
}
}
function orderBricks(a, b) {
var _local2 = aBricks[a].getPositionPoints()[0];
var _local3 = aBricks[b].getPositionPoints()[0];
if (_local2.nY < _local3.nY) {
return(-1);
}
if (_local2.nY > _local3.nY) {
return(1);
}
if (_local2.nX < _local3.nX) {
return(-1);
}
if (_local2.nX > _local3.nX) {
return(1);
}
return(0);
}
function pause(Void) {
trace(("gameplay.Field.pause(" + [bPause]) + ")");
bPause = true;
trace(("gameplay.Field.pause(" + [bPause]) + ")");
}
function unpause(Void) {
trace(("gameplay.Field.unpause(" + [bPause]) + ")");
bPause = false;
trace(("gameplay.Field.unpause(" + [bPause]) + ")");
}
function isPause(Void) {
return(bPause);
}
function isEndOfLevel(Void) {
return(nBricksOnFieldCount <= 0);
}
function isLevelShowing(Void) {
return(processShowLevel != null);
}
function setBonusSpeed(speed) {
nBonusSpeed = speed;
trace(("gameplay.Field.setBonusSpeed(" + [nBonusSpeed]) + ")");
}
function setMushroomExplodeMaxDelay(delay) {
nMushroomExplodeMaxDelay = delay;
trace(("gameplay.Field.setMushroomExplodeMaxDelay(" + [nMushroomExplodeMaxDelay]) + ")");
}
function setDelayAfterCompleteLevel(delay) {
nDelayAfterCompleteLevel = delay;
trace(("gameplay.Field.setDelayAfterCompleteLevel(" + [nDelayAfterCompleteLevel]) + ")");
}
function setLeftBricksForFairy(count) {
nLeftBricksForFairy = count;
trace(("gameplay.Field.setLeftBricksForFairy(" + [nLeftBricksForFairy]) + ")");
}
function setMinFairyAppearanceDelay(delay) {
nMinFairyAppearanceDelay = delay;
trace(("gameplay.Field.setMinFairyAppearanceDelay(" + [nMinFairyAppearanceDelay]) + ")");
}
function setMaxFairyAppearanceDelay(delay) {
nMaxFairyAppearanceDelay = delay;
trace(("gameplay.Field.setMaxFairyAppearanceDelay(" + [nMaxFairyAppearanceDelay]) + ")");
}
static function getInstance(mcParent) {
if (instance == null) {
instance = new gameplay.Field(mcParent);
}
return(instance);
}
static var instance = null;
var mcParent = null;
var mcBallsParent = null;
var bPause = null;
var bGame = null;
var nWaterLine = null;
var currentLevel = null;
var nBricksOnFieldCount = null;
var aBricks = null;
var aRemovedBricks = null;
var aBricksOrder = null;
var aBonuses = null;
var nBonusSpeed = 5;
var nMushroomExplodeMaxDelay = 1000;
var processShowLevel = null;
var currentElement = null;
var elementLastAppearTime = null;
var elementAppearDelay = 100;
var fShowCallback = null;
var nLeftBorder = 8;
var nRightBorder = 400;
var nUpBorder = 8;
var nDownBorder = 400;
var nDelayAfterCompleteLevel = 500;
var nCompleteLevelTime = null;
var processDelayAfterLevelComplete = null;
var aBalls = null;
var mcChainballUp = null;
var mcChainballDown = null;
var aFrogs = null;
var aFairies = null;
var aDevilDrops = null;
var aSparks = null;
var aCoins = null;
var aBricksToFairyDestroy = null;
var nLeftBricksForFairy = 40;
var bFairy = null;
var processFairy = null;
var nFairyAppearanceTime = null;
var nMinFairyAppearanceDelay = 2000;
var nMaxFairyAppearanceDelay = 15000;
var nFairyAppearanceDelay = null;
var brickExplosion = null;
}
Symbol 1088 MovieClip [__Packages.managers.Level] Frame 0
class managers.Level extends gdp.core.base.BaseClass
{
function Level (oData) {
super();
nNumber = oData.LevelNumber;
nBricksCount = oData.Bricks.Count;
aBricks = oData.Bricks.List;
nBonusesCount = oData.Bonuses.Count;
aBonuses = oData.Bonuses.List;
aFrogs = oData.Bricks.Frogs;
}
function getNumber(Void) {
return(nNumber);
}
function getBricksCount(Void) {
return(nBricksCount);
}
function getBonusesCount(Void) {
return(nBonusesCount);
}
function getFrogsCount(Void) {
return(aFrogs.length);
}
function getBrickData(index) {
return(aBricks[index]);
}
function getBonusData(index) {
return(aBonuses[index]);
}
function getFrogData(index) {
return(aFrogs[index]);
}
var nNumber = null;
var nBricksCount = null;
var aBricks = null;
var nBonusesCount = null;
var aBonuses = null;
var aFrogs = null;
}
Symbol 1089 MovieClip [__Packages.gameplay.Chainball] Frame 0
class gameplay.Chainball extends gdp.core.base.BaseMovieClip
{
var _x, _y, _visible, removeMovieClip, hitTest, _parent;
function Chainball () {
super();
interfacePosition = new gdp.utils.math.helpers.Point(_x, _y);
nHitsDone = 0;
bPause = false;
}
function setType(bType) {
bInterface = bType;
}
function setActive(pos) {
bPause = true;
_x = pos.nX;
_y = pos.nY;
_visible = true;
processMove = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psMoving));
gdp.core.process.ProcessManager.getInstance().addProcess(processMove);
}
function psMovingToPad(Void) {
if (!gameplay.Field.getInstance().isEndOfLevel()) {
if (gameplay.Field.getInstance().isPause()) {
return(undefined);
}
}
var _local2 = 10;
var _local3 = 5;
if (Math.abs(_x - gameplay.Pad.getInstance()._x) < _local2) {
_x = gameplay.Pad.getInstance()._x;
} else if (_x > gameplay.Pad.getInstance()._x) {
_x = _x - _local2;
} else {
_x = _x + _local2;
}
if (Math.abs((_y - gameplay.Pad.getInstance()._y) + nStartHeight) < _local3) {
_y = gameplay.Pad.getInstance()._y - nStartHeight;
} else {
_y = _y + _local3;
}
if ((_x == gameplay.Pad.getInstance()._x) && (_y == (gameplay.Pad.getInstance()._y - nStartHeight))) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processGoToPad);
gameplay.Field.getInstance().chainballReady();
bPause = true;
}
}
function psMovingToInterface(Void) {
if (!gameplay.Field.getInstance().isEndOfLevel()) {
if (gameplay.Field.getInstance().isPause()) {
return(undefined);
}
}
var _local3 = 10;
var _local2 = 5;
if (Math.abs(_x - interfacePosition.nX) < _local3) {
_x = interfacePosition.nX;
} else if (_x > interfacePosition.nX) {
_x = _x - _local3;
} else {
_x = _x + _local3;
}
if (Math.abs(_y - interfacePosition.nY) < _local2) {
_y = interfacePosition.nY;
} else if (_y > interfacePosition.nY) {
_y = _y - _local2;
} else {
_y = _y + _local2;
}
if ((_x == interfacePosition.nX) && (_y == interfacePosition.nY)) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processGoToInterface);
bPause = true;
remove();
}
}
function followPad(Void) {
if (bInterface) {
return(undefined);
}
trace(("gameplay.Chainball.followPad(" + [this]) + ")");
_y = gameplay.Pad.getInstance()._y - nStartHeight;
}
function goToPad(Void) {
processGoToPad = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psMovingToPad));
gdp.core.process.ProcessManager.getInstance().addProcess(processGoToPad);
}
function psMoving(Void) {
if (!gameplay.Field.getInstance().isEndOfLevel()) {
if (gameplay.Field.getInstance().isPause()) {
return(undefined);
}
}
if (bPause) {
if (Math.abs(_x - gameplay.Pad.getInstance()._x) < nSpeedX) {
_x = gameplay.Pad.getInstance()._x;
} else if (_x > gameplay.Pad.getInstance()._x) {
_x = _x - nSpeedX;
} else {
_x = _x + nSpeedX;
}
}
_y = _y - nCurrentSpeed;
if (nCurrentSpeed > 0) {
if (collideWithBricks()) {
nCurrentSpeed = -nCurrentSpeed;
} else if (_y <= gameplay.Field.getInstance().getUpBorder()) {
nCurrentSpeed = -nCurrentSpeed;
}
}
if (nCurrentSpeed < 0) {
if (Math.abs(_x - gameplay.Pad.getInstance()._x) < nSpeedX) {
_x = gameplay.Pad.getInstance()._x;
} else if (_x > gameplay.Pad.getInstance()._x) {
_x = _x - nSpeedX;
} else {
_x = _x + nSpeedX;
}
if (_y >= (gameplay.Pad.getInstance()._y - nStartHeight)) {
bPause = true;
_y = gameplay.Pad.getInstance()._y - nStartHeight;
if (nHitsDone >= nChainballHitsCount) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processMove);
gameplay.Field.getInstance().chainballEnd();
}
}
}
}
function goAway(pos) {
_x = pos.nX;
_y = pos.nY;
_visible = true;
processGoToInterface = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psMovingToInterface));
gdp.core.process.ProcessManager.getInstance().addProcess(processGoToInterface);
}
function remove(Void) {
windows.GameWindow.getInstance().removeChainball();
removeMovieClip();
}
function start(Void) {
if (bPause) {
nHitsDone++;
nCurrentSpeed = nSpeed;
bPause = false;
}
}
function collideWithBricks(Void) {
var _local8 = new gdp.utils.math.helpers.Point(_x, _y);
var _local3 = gameplay.Grid.getInstance().getNeibousBricks(_local8);
var _local6 = 0;
while (_local6 < _local3.length) {
if (hitTest(gameplay.Field.getInstance().getBrick(_local3[_local6]))) {
var _local7 = null;
_local7 = elements.BrickExplosion(_parent.attachMovie("bombMushroom_particle", "mcCauldronParticle", _parent.getNextHighestDepth(), {_x:_x, _y:_y}));
Game.getInstance().playSound("explosion");
_local3 = gameplay.Grid.getInstance().getBricksInRange(_local8, nRange);
var _local4;
var _local5;
var _local2 = 0;
while (_local2 < _local3.length) {
_local4 = gameplay.Field.getInstance().getBrick(_local3[_local2].brick);
_local5 = (nChainballExplodeMaxDelay * _local3[_local2].distance) / 100;
if ((managers.BrickManager.getInstance().getFlags(_local4.getType())[2] != 1) && (managers.BrickManager.getInstance().getID(_local4.getType()) != 6)) {
_local4.deathWithDelay(_local5);
}
_local2++;
}
return(true);
}
_local6++;
}
return(false);
}
var nStartHeight = 20;
var nSpeed = 13;
var nCurrentSpeed = null;
var nRange = 50;
var nChainballHitsCount = 8;
var nHitsDone = null;
var processMove = null;
var processGoToPad = null;
var processGoToInterface = null;
var interfacePosition = null;
var bPause = null;
var nChainballExplodeMaxDelay = 500;
var nSpeedX = 10;
var nType = null;
var bInterface = null;
}
Symbol 1090 MovieClip [__Packages.gdp.utils.math.helpers.Point] Frame 0
class gdp.utils.math.helpers.Point extends gdp.core.base.BaseClass
{
var nX, nY;
function Point (nX, nY) {
super();
this.nX = nX;
this.nY = nY;
}
function clone() {
return(new gdp.utils.math.helpers.Point(nX, nY));
}
function isEqual(other) {
return((nX == other.nX) && (nY == other.nY));
}
function description() {
return(((("Point (nX:" + nX) + ", nY:") + nY) + ")");
}
static function sum(point1, point2) {
return(new gdp.utils.math.helpers.Point(point2.nX + point1.nX, point2.nY + point1.nY));
}
static function subtract(point1, point2) {
return(new gdp.utils.math.helpers.Point(point2.nX - point1.nX, point2.nY - point1.nY));
}
static var ZeroPoint = new gdp.utils.math.helpers.Point(0, 0);
}
Symbol 1091 MovieClip [__Packages.gameplay.Pad] Frame 0
class gameplay.Pad extends gdp.core.base.BaseMovieClip
{
var _x, _y, _parent, _width;
function Pad () {
super();
bPause = false;
bMove = false;
var _local3 = new Object();
_local3.onMouseMove = gdp.utils.Delegate.create(this, onMouseMove);
Mouse.addListener(_local3);
_x = nStartX;
_y = gameplay.Field.getInstance().getFloor();
}
function align(Void) {
if (_x < gameplay.Field.getInstance().getLeftBorder()) {
_x = gameplay.Field.getInstance().getLeftBorder();
}
if (_x > gameplay.Field.getInstance().getRightBorder()) {
_x = gameplay.Field.getInstance().getRightBorder();
}
}
function down(bUp) {
bMove = true;
Game.getInstance().playSound("water");
trace(("gameplay.Pad.down(" + [arguments]) + ")");
processDown = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psDown, [bUp]));
gdp.core.process.ProcessManager.getInstance().addProcess(processDown);
}
function up(Void) {
windows.GameWindow.getInstance().padReady();
bMove = true;
trace(("gameplay.Pad.up(" + [arguments]) + ")");
_x = nStartX;
processUp = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psUp));
gdp.core.process.ProcessManager.getInstance().addProcess(processUp);
}
function psDown(bUp) {
_y = _y + nSpeed;
follow();
if (_y > gameplay.Field.getInstance().getFloor()) {
bMove = false;
if (bUp) {
up();
}
gdp.core.process.ProcessManager.getInstance().removeProcess(processDown);
}
}
function psUp(Void) {
_y = _y - nSpeed;
follow();
if (_y <= nStartY) {
bMove = false;
_y = nStartY;
gdp.core.process.ProcessManager.getInstance().removeProcess(processUp);
}
}
function follow(Void) {
gameplay.Field.getInstance().ballsFollowPad();
}
function isMove(Void) {
return(bMove);
}
function addInscription(type, sPoints) {
var _local2 = "";
switch (type) {
case 1 :
_local2 = sCoinInscription;
break;
case 2 :
_local2 = sPoints;
break;
case 3 :
_local2 = sThreeBallInscription;
break;
case 4 :
_local2 = sStrongBallInscription;
break;
case 5 :
_local2 = sFireBallInscription;
break;
case 6 :
_local2 = sSpeedUpInscription;
break;
case 7 :
_local2 = sSpeedDownInscription;
break;
case 8 :
_local2 = sFairyThankInscription;
break;
case 9 :
_local2 = sChainballInscription;
break;
case 10 :
_local2 = sUnlockInscription;
}
if ((mcInscription != null) && (mcInscription != undefined)) {
if (mcInscription.mc_Inscription.tf_Inscription.text == _local2) {
return(undefined);
}
}
mcInscription = elements.BrickExplosion(_parent.attachMovie("padInscription", "mcPadInscription", _parent.getNextHighestDepth(), {_x:_x, _y:_y}));
mcInscription.mc_Inscription.tf_Inscription.text = _local2;
}
function setInscriptions(oInscriptions) {
sCoinInscription = oInscriptions.sCoinInscription;
sThreeBallInscription = oInscriptions.sThreeBallInscription;
sStrongBallInscription = oInscriptions.sStrongBallInscription;
sFireBallInscription = oInscriptions.sFireBallInscription;
sSpeedUpInscription = oInscriptions.sSpeedUpInscription;
sSpeedDownInscription = oInscriptions.sSpeedDownInscription;
sFairyThankInscription = oInscriptions.sFairyThankInscription;
sChainballInscription = oInscriptions.sChainballInscription;
sUnlockInscription = oInscriptions.sUnlockInscription;
}
function pause(Void) {
bPause = true;
}
function unpause(Void) {
bPause = false;
}
function getLeftBorder(Void) {
return((_x - (_width / 2)) + 5);
}
function getRightBorder(Void) {
return((_x + (_width / 2)) - 5);
}
function getBallHeight(Void) {
return(0);
}
function onMouseMove(Void) {
if (!gameplay.Field.getInstance().isEndOfLevel()) {
if (gameplay.Field.getInstance().isPause()) {
return(undefined);
}
}
if (bPause) {
return(undefined);
}
_x = _parent._xmouse - 53;
align();
}
static function getInstance(mcParent, oParams) {
if (instance == null) {
instance = gameplay.Pad(mcParent.attachMovie("mc_Pad", "mcPad", mcParent.getNextHighestDepth(), oParams));
}
return(instance);
}
function setStartPositionX(x) {
nStartX = x;
}
function setStartPositionY(y) {
nStartY = y;
}
function setSpeed(speed) {
nSpeed = speed;
}
static var instance = null;
var nStartX = 200;
var nStartY = 355;
var processDown = null;
var processUp = null;
var nSpeed = 1;
var mcInscription = null;
var sCoinInscription = "COIN";
var sThreeBallInscription = "THREE BALL";
var sStrongBallInscription = "STRONG BALL";
var sFireBallInscription = "FIRE BALL";
var sSpeedUpInscription = "FAST";
var sSpeedDownInscription = "SLOW";
var sFairyThankInscription = "THANK YOU";
var sChainballInscription = "CHAINBALL KEY";
var sUnlockInscription = "UNLOCK";
var bMove = null;
var bPause = null;
}
Symbol 1092 MovieClip [__Packages.elements.BrickExplosion] Frame 0
class elements.BrickExplosion extends gdp.core.base.BaseMovieClip
{
var _totalframes, _currentframe, removeMovieClip;
function BrickExplosion () {
super();
}
function onEnterFrame(Void) {
if (_currentframe == _totalframes) {
removeMovieClip();
}
}
}
Symbol 1093 MovieClip [__Packages.gameplay.Grid] Frame 0
class gameplay.Grid extends gdp.core.base.BaseClass
{
function Grid () {
super();
}
function init(Void) {
aGrid = new Array(nGridWidth);
var _local3 = 0;
while (_local3 < aGrid.length) {
aGrid[_local3] = new Array(nGridHeight);
var _local2 = 0;
while (_local2 < aGrid[_local3].length) {
aGrid[_local3][_local2] = new Object();
aGrid[_local3][_local2].bricks = new Array();
aGrid[_local3][_local2].bonuses = new Array();
_local2++;
}
_local3++;
}
}
function addBrick(brick, type) {
var _local10 = brick.getPositionPoints();
var _local8 = brick.getBrickPolygonPoints();
var _local17 = [];
var _local5 = null;
var _local4 = null;
var _local6 = [];
var _local7 = [];
var _local9 = 0;
while (_local9 < _local10.length) {
var _local3 = 0;
while (_local3 < _local8.length) {
_local5 = getCells(new gdp.utils.math.helpers.Point(_local10[_local9].nX + _local8[_local3].nX, _local10[_local9].nY + _local8[_local3].nY));
var _local2 = 0;
while (_local2 < _local5.length) {
_local4 = _local5[_local2];
_local6.push(_local4.nX);
_local7.push(_local4.nY);
_local2++;
}
_local3++;
}
_local9++;
}
var _local13 = nGridWidth;
var _local14 = 0;
_local9 = 0;
while (_local9 < _local6.length) {
if (_local6[_local9] < _local13) {
_local13 = _local6[_local9];
}
if (_local6[_local9] > _local14) {
_local14 = _local6[_local9];
}
_local9++;
}
var _local12 = nGridHeight;
var _local11 = 0;
_local9 = 0;
while (_local9 < _local7.length) {
if (_local7[_local9] < _local12) {
_local12 = _local7[_local9];
}
if (_local7[_local9] > _local11) {
_local11 = _local7[_local9];
}
_local9++;
}
_local9 = _local13;
while (_local9 <= _local14) {
var _local3 = _local12;
while (_local3 <= _local11) {
aGrid[_local9][_local3].bricks.push(type);
_local3++;
}
_local9++;
}
}
function addBonus(bonus, type) {
var _local10 = bonus.getPosition();
var _local9 = getCell(_local10);
var _local7 = _local9.nX - 1;
var _local8 = _local9.nX + 1;
var _local5 = _local9.nY - 1;
var _local4 = _local9.nY + 1;
var _local3 = _local7;
while (_local3 <= _local8) {
var _local2 = _local5;
while (_local2 <= _local4) {
aGrid[_local3][_local2].bonuses.push(type);
_local2++;
}
_local3++;
}
}
function getCell(point) {
return(new gdp.utils.math.helpers.Point(Math.floor(point.nX / (nFieldWidth / nGridWidth)), Math.floor(point.nY / (nFieldHeight / nGridHeight))));
}
function getCells(point) {
var _local5 = 0;
var _local3 = 0;
var _local4 = [];
var _local6 = new gdp.utils.math.helpers.Point(point.nX / (nFieldWidth / nGridWidth), point.nY / (nFieldHeight / nGridHeight));
var _local2 = new gdp.utils.math.helpers.Point(Math.floor(_local6.nX), Math.floor(_local6.nY));
_local4.push(_local2);
var _local8 = _local6.nX - _local2.nX;
if (_local8 > 0.5) {
_local8 = _local8 - 1;
}
var _local7 = _local6.nY - _local2.nY;
if (_local7 > 0.5) {
_local7 = _local7 - 1;
}
if (Math.abs(_local8) < 0.3) {
if (_local8 > 0) {
_local5 = -1;
} else {
_local5 = 1;
}
}
if (Math.abs(_local7) < 0.3) {
if (_local7 > 0) {
_local3 = -1;
} else {
_local3 = 1;
}
}
if (_local5 != 0) {
if (_local3 != 0) {
_local4.push(new gdp.utils.math.helpers.Point(_local2.nX + _local5, _local2.nY));
_local4.push(new gdp.utils.math.helpers.Point(_local2.nX + _local5, _local2.nY + _local3));
_local4.push(new gdp.utils.math.helpers.Point(_local2.nX, _local2.nY + _local3));
} else {
_local4.push(new gdp.utils.math.helpers.Point(_local2.nX + _local5, _local2.nY));
}
} else if (_local3 != 0) {
_local4.push(new gdp.utils.math.helpers.Point(_local2.nX, _local2.nY + _local3));
}
return(_local4);
}
function getNeibousBricks(point, p2) {
var _local6 = getCell(point);
var _local3 = getCellBricks(_local6.nX, _local6.nY);
if (p2 != undefined) {
var _local5 = getCell(p2);
if ((_local6.nX != _local5.nX) || (_local6.nY != _local5.nY)) {
_local3 = _local3.concat(getCellBricks(_local5.nX, _local5.nY));
}
}
var _local4 = 0;
while (_local4 < _local3.length) {
var _local2 = 0;
while (_local2 < _local4) {
if (_local3[_local4] == _local3[_local2]) {
_local3.splice(_local4, 1);
_local4--;
_local2--;
}
_local2++;
}
_local4++;
}
_local4 = 0;
while (_local4 < _local3.length) {
if (gameplay.Field.getInstance().getBrick(_local3[_local4]) == null) {
_local3.splice(_local4, 1);
_local4--;
}
_local4++;
}
return(_local3);
}
function getNeibousBonuses(point) {
var _local5 = getCell(point);
var _local4 = getCellBonuses(_local5.nX, _local5.nY);
_local4 = _local4.concat(getCellBonuses(_local5.nX - 1, _local5.nY - 1));
_local4 = _local4.concat(getCellBonuses(_local5.nX - 1, _local5.nY));
_local4 = _local4.concat(getCellBonuses(_local5.nX - 1, _local5.nY + 1));
_local4 = _local4.concat(getCellBonuses(_local5.nX, _local5.nY - 1));
_local4 = _local4.concat(getCellBonuses(_local5.nX, _local5.nY + 1));
_local4 = _local4.concat(getCellBonuses(_local5.nX + 1, _local5.nY - 1));
_local4 = _local4.concat(getCellBonuses(_local5.nX + 1, _local5.nY));
_local4 = _local4.concat(getCellBonuses(_local5.nX + 1, _local5.nY + 1));
var _local3 = 0;
while (_local3 < _local4.length) {
var _local2 = 0;
while (_local2 < _local3) {
if (_local4[_local3] == _local4[_local2]) {
_local4.splice(_local3, 1);
_local3--;
_local2--;
}
_local2++;
}
_local3++;
}
return(_local4);
}
function getBricksInRange(point, range) {
var _local10 = [];
var _local6 = getCell(point);
var _local8 = Math.floor(range / (nFieldWidth / nGridWidth));
if (_local8 == 0) {
_local8 = 1;
}
var _local5 = Math.floor(range / (nFieldHeight / nGridHeight));
if (_local5 == 0) {
_local5 = 1;
}
var _local3 = [];
var _local4 = -_local8;
while (_local4 <= _local8) {
var _local2 = -_local5;
while (_local2 <= _local5) {
_local3 = _local3.concat(getCellBricks(_local6.nX + _local4, _local6.nY + _local2));
_local2++;
}
_local4++;
}
var _local9 = null;
var _local7;
_local4 = 0;
while (_local4 < _local3.length) {
_local9 = gameplay.Field.getInstance().getBrick(_local3[_local4]);
if (_local9 != null) {
_local7 = distance(new gdp.utils.math.helpers.Point(_local9._x + (_local9._width / 2), _local9._y + (_local9._height / 2)), point);
if (_local7 <= range) {
_local10.push({brick:_local3[_local4], distance:_local7});
}
}
_local4++;
}
return(_local10);
}
function getBonusesInRange(point, range) {
var _local11 = [];
var _local7 = getCell(point);
var _local9 = Math.floor(range / (nFieldWidth / nGridWidth));
if (_local9 == 0) {
_local9 = 1;
}
var _local6 = Math.floor(range / (nFieldHeight / nGridHeight));
if (_local6 == 0) {
_local6 = 1;
}
var _local3 = [];
var _local5 = -_local9;
while (_local5 <= _local9) {
var _local2 = -_local6;
while (_local2 <= _local6) {
_local3 = _local3.concat(getCellBonuses(_local7.nX + _local5, _local7.nY + _local2));
_local2++;
}
_local5++;
}
var _local4 = null;
var _local8;
_local5 = 0;
while (_local5 < _local3.length) {
_local4 = gameplay.Field.getInstance().getBonus(_local3[_local5]);
if (_local4 != null) {
_local8 = distance(new gdp.utils.math.helpers.Point(_local4._x + (_local4._width / 2), _local4._y + (_local4._height / 2)), point);
if (_local8 <= range) {
_local11.push({brick:_local3[_local5], distance:_local8});
}
}
_local5++;
}
return(_local11);
}
function distance(point1, point2) {
return(Math.sqrt(((point1.nX - point2.nX) * (point1.nX - point2.nX)) + ((point1.nY - point2.nY) * (point1.nY - point2.nY))));
}
function getCellBricks(i, j) {
if (aGrid[i][j] == undefined) {
return([]);
}
return(aGrid[i][j].bricks);
}
function getCellBonuses(i, j) {
if (aGrid[i][j] == undefined) {
return([]);
}
return(aGrid[i][j].bonuses);
}
static function getInstance() {
if (instance == null) {
instance = new gameplay.Grid();
}
return(instance);
}
function setFieldWidth(width) {
nFieldWidth = width;
}
function setFieldHeight(height) {
nFieldHeight = height;
}
function setGridWidth(width) {
nGridWidth = width;
}
function setGridHeight(height) {
nGridHeight = height;
}
static var instance = null;
var nFieldWidth = 400;
var nFieldHeight = 300;
var aGrid = null;
var nGridWidth = 15;
var nGridHeight = 10;
}
Symbol 1094 MovieClip [__Packages.elements.Brick] Frame 0
class elements.Brick extends gdp.core.base.BaseMovieClip
{
var _x, _y, _width, _height, _visible, _currentframe, gotoAndStop, _parent, removeMovieClip, play, _totalframes;
function Brick () {
super();
}
function init(oData, fieldType) {
nType = oData.Type;
nFieldType = fieldType;
nPositionPointsCount = oData.PositionPointsCount;
aPositionPoints = oData.PositionPoints;
_x = aPositionPoints[0].nX;
_y = aPositionPoints[0].nY;
center = new gdp.utils.math.helpers.Point(_x + (_width / 2), _y + (_height / 2));
trace(("elements.Brick.Brick(" + [center]) + ")");
nSpeed = oData.Speed;
nMessageReceiver = oData.MessageReceiver;
nMessage = oData.Message;
nBonusType = oData.BonusType;
if (oData.Loop == 0) {
bLoop = true;
} else {
bLoop = false;
}
if (oData.FairieHelp == 1) {
bFairieHelp = false;
}
bFairieHelp = true;
if (nPositionPointsCount > 1) {
psMove();
}
if (managers.BrickManager.getInstance().getID(nType) == 3) {
bReadyToSpark = true;
processWitch = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psWitch));
gdp.core.process.ProcessManager.getInstance().addProcess(processWitch);
}
if (managers.BrickManager.getInstance().getID(nType) == 4) {
processDevil = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psDevil));
gdp.core.process.ProcessManager.getInstance().addProcess(processDevil);
}
var _local3 = managers.BrickManager.getInstance().getPolygon(nType).getArr();
var _local2 = 0;
while (_local2 < _local3.length) {
_local3[_local2].nX = _local3[_local2].nX + _x;
_local3[_local2].nY = _local3[_local2].nY + _y;
_local2++;
}
polygon = new geometry.Polygon(_local3);
}
function setConcernedBonus(type) {
if (aConcernedBonusType == null) {
aConcernedBonusType = [];
}
aConcernedBonusType.push(type);
}
function show(Void) {
_visible = true;
}
function hit(direction) {
if (managers.BrickManager.getInstance().getFlags(nType)[2]) {
Game.getInstance().playSound("bat");
return(undefined);
}
if (managers.BrickManager.getInstance().getID(nType) == 6) {
if (_currentframe > 1) {
Game.getInstance().playSound("bat");
return(undefined);
}
Game.getInstance().playSound("switch");
gameplay.Pad.getInstance().addInscription(10, "0");
gameplay.Field.getInstance().sendMessage(nMessageReceiver, nMessage);
if (aConcernedBonusType != null) {
var _local2 = 0;
while (_local2 < aConcernedBonusType.length) {
gameplay.Field.getInstance().hitBonus(aConcernedBonusType[_local2]);
_local2++;
}
}
(gotoAndStop(_currentframe + 1));// not popped
return(undefined);
}
if (_currentframe < managers.BrickManager.getInstance().getStamina(nType)) {
Game.getInstance().playSound("brick_hit");
(gotoAndStop(_currentframe + 1));// not popped
} else {
death(direction);
}
}
function hitStrongBall(direction) {
if (managers.BrickManager.getInstance().getFlags(nType)[2] == 1) {
Game.getInstance().playSound("bat");
return(undefined);
}
if (managers.BrickManager.getInstance().getID(nType) == 6) {
if (_currentframe > 1) {
Game.getInstance().playSound("bat");
return(undefined);
}
Game.getInstance().playSound("switch");
gameplay.Field.getInstance().sendMessage(nMessageReceiver, nMessage);
if (aConcernedBonusType != null) {
var _local2 = 0;
while (_local2 < aConcernedBonusType.length) {
gameplay.Field.getInstance().hitBonus(aConcernedBonusType[_local2]);
_local2++;
}
}
(gotoAndStop(_currentframe + 1));// not popped
return(undefined);
}
death(direction);
}
function death(direction) {
createBonus(direction);
gameplay.Field.getInstance().removeBrick(nFieldType);
gameplay.Field.getInstance().sendMessage(nMessageReceiver, nMessage);
if (aConcernedBonusType != null) {
var _local4 = 0;
while (_local4 < aConcernedBonusType.length) {
gameplay.Field.getInstance().hitBonus(aConcernedBonusType[_local4]);
_local4++;
}
}
var _local8 = null;
var _local7 = managers.BrickManager.getInstance().getParticleImage(nType);
if (_local7 != "null") {
_local8 = elements.BrickExplosion(_parent.attachMovie(_local7, "mcParticle", _parent.getNextHighestDepth(), {_x:_x, _y:_y}));
gameplay.Field.getInstance().addExplosion(_local8);
}
if (managers.BrickManager.getInstance().getID(nType) == 3) {
Game.getInstance().playSound("witch_scream");
if ((mcSpark != null) && (!mcSpark.isMove())) {
mcSpark.removeMovieClip();
}
} else if (managers.BrickManager.getInstance().getID(nType) == 4) {
trace(("elements.Brick.death(" + [nDevilExplodeMaxDelay, center]) + ")");
_local8 = null;
_local8 = elements.BrickExplosion(_parent.attachMovie("bombMushroom_particle", "mcCauldronParticle", _parent.getNextHighestDepth(), {_x:_x, _y:_y}));
Game.getInstance().playSound("explosion");
var _local5 = gameplay.Grid.getInstance().getBricksInRange(center, nDevilDestroyRange);
trace(("elements.Brick.death(" + [_local5]) + ")");
var _local2;
var _local6;
var _local3 = 0;
while (_local3 < _local5.length) {
_local2 = gameplay.Field.getInstance().getBrick(_local5[_local3].brick);
trace(("elements.Brick.death(" + [_local2, (managers.BrickManager.getInstance().getFlags(_local2.getType())[2] == 1) || (managers.BrickManager.getInstance().getID(_local2.getType()) == 6)]) + ")");
trace(("elements.Brick.death(" + [_local6]) + ")");
_local6 = (nDevilExplodeMaxDelay * _local5[_local3].distance) / 100;
if ((managers.BrickManager.getInstance().getFlags(_local2.getType())[2] != 1) && (managers.BrickManager.getInstance().getID(_local2.getType()) != 6)) {
_local2.deathWithDelay(_local6);
}
_local3++;
}
} else if ((managers.BrickManager.getInstance().getID(nType) == 1) || (managers.BrickManager.getInstance().getID(nType) == 2)) {
Game.getInstance().playSound("troll");
} else if (managers.BrickManager.getInstance().getFlags(nType)[3] == 1) {
Game.getInstance().playSound("leaves");
} else if (managers.BrickManager.getInstance().getFlags(nType)[7] == 1) {
Game.getInstance().playSound("score");
} else if ((managers.BrickManager.getInstance().getBrickImage(nType) != "brick10") && (managers.BrickManager.getInstance().getBrickImage(nType) != "brick11")) {
Game.getInstance().playSound("brick_destroyed");
}
remove();
}
function remove(Void) {
if (nPositionPointsCount > 1) {
mcTween.stop();
}
if (managers.BrickManager.getInstance().getID(nType) == 3) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processWitch);
}
if (managers.BrickManager.getInstance().getID(nType) == 4) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processDevil);
}
gdp.core.process.ProcessManager.getInstance().removeProcess(processDelay1);
gdp.core.process.ProcessManager.getInstance().removeProcess(processDelay2);
removeMovieClip();
}
function deathAfterDelay(Void) {
receiveMessageTime = gdp.core.time.FrameTimer.getInstance().getTime();
processDelay1 = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psDelay, [nDeleteDelay]));
gdp.core.process.ProcessManager.getInstance().addProcess(processDelay1);
}
function deathWithDelay(nDelay) {
if (processDelay2 == null) {
receiveMessageTime = gdp.core.time.FrameTimer.getInstance().getTime();
processDelay2 = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psDelay, [nDelay]));
gdp.core.process.ProcessManager.getInstance().addProcess(processDelay2);
}
}
function createBonus(direction) {
if (direction == undefined) {
direction = (Math.PI/2);
}
var _local2 = new gdp.utils.math.helpers.Point(_x + (_width / 2), _y + (_height / 2));
if (nBonusType != -1) {
gameplay.Field.getInstance().createBonus(nBonusType, _local2, direction);
var _local4 = managers.BrickManager.getInstance().getID(nType);
if ((_local4 == 1) || (_local4 == 2)) {
gameplay.Field.getInstance().createBonus(nBonusType, _local2, direction + (Math.PI/2));
gameplay.Field.getInstance().createBonus(nBonusType, _local2, direction - (Math.PI/2));
}
}
}
function getFieldType(Void) {
return(nFieldType);
}
function psDelay(nDelay) {
if ((gdp.core.time.FrameTimer.getInstance().getTime() - receiveMessageTime) > nDelay) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processDelay1);
gdp.core.process.ProcessManager.getInstance().removeProcess(processDelay2);
death(Math.PI - random(6));
}
}
function hide(Void) {
_visible = false;
}
function getPositionPoints(Void) {
return(aPositionPoints);
}
function getBrickPolygonPoints(Void) {
return(managers.BrickManager.getInstance().getPoligonPoints(nType));
}
function getFlags(Void) {
return(managers.BrickManager.getInstance().getFlags(nType));
}
function getType(Void) {
return(nType);
}
function getAxes(Void) {
return(managers.BrickManager.getInstance().getAxes(nType));
}
function getPolygon(Void) {
if (isMoving()) {
var _local3 = managers.BrickManager.getInstance().getPolygon(nType).getArr();
var _local2 = 0;
while (_local2 < _local3.length) {
_local3[_local2].nX = _local3[_local2].nX + _x;
_local3[_local2].nY = _local3[_local2].nY + _y;
_local2++;
}
return(new geometry.Polygon(_local3));
}
return(polygon);
}
function getCheckPosition(p1, p2) {
var _local4 = Number.MAX_VALUE;
var _local3;
var _local8 = Math.sqrt(((p1.nX - p2.nX) * (p1.nX - p2.nX)) + ((p1.nY - p2.nY) * (p1.nY - p2.nY)));
var _local5;
var _local2 = 0;
while (_local2 < polygon.size()) {
_local5 = polygon.edge();
_local3 = _local5.getDistance(p1);
if (_local3 < _local4) {
_local4 = _local3;
}
polygon.advance();
_local2++;
}
if (_local4 > _local8) {
return(p2);
}
return(new gdp.utils.math.helpers.Point((p1.nX + p2.nX) / 2, (p1.nY + p2.nY) / 2));
}
function getDistance(point) {
var _local8 = new Object();
var _local5 = [];
var _local4 = Number.MAX_VALUE;
var _local3;
var _local6;
var _local2 = 0;
while (_local2 < polygon.size()) {
_local6 = polygon.edge();
_local3 = _local6.getDistance(point);
if (_local3 < _local4) {
_local4 = _local3;
_local5 = [];
_local5.push(_local2);
} else if (_local3 == _local4) {
_local5.push(_local2);
}
polygon.advance();
_local2++;
}
_local8.brick = this;
_local8.d = _local4;
return(_local8);
}
function getDistanceFromCenter(point) {
var _local2 = new Object();
_local2.brick = this;
_local2.d = Math.sqrt(((center.nX - point.nX) * (center.nX - point.nX)) + ((center.nY - point.nY) * (center.nY - point.nY)));
return(_local2);
}
function isFairyHelp(Void) {
return(bFairieHelp);
}
function isRectangle(Void) {
return(managers.BrickManager.getInstance().isRectangle(nType));
}
function isBounce(Void) {
if ((((managers.BrickManager.getInstance().getFlags(nType)[0] == 1) || (managers.BrickManager.getInstance().getFlags(nType)[3] == 1)) || (managers.BrickManager.getInstance().getFlags(nType)[7] == 1)) || (managers.BrickManager.getInstance().getFlags(nType)[8] == 1)) {
return(false);
}
return(true);
}
function isMoving(Void) {
return(nPositionPointsCount > 1);
}
function isTweaked(Void) {
return(managers.BrickManager.getInstance().getFlags(nType)[3] == 1);
}
function getMessageReceiver(Void) {
return(nMessageReceiver);
}
function getMessage(Void) {
return(nMessage);
}
function receive(message) {
if (message == 1) {
death((Math.PI/2));
} else if ((message == 15) || (message == 16)) {
deathAfterDelay();
}
}
function psWitch(Void) {
if (gameplay.Field.getInstance().isPause()) {
if ((mcSpark != null) && (!mcSpark.isMove())) {
mcSpark.removeMovieClip();
}
return(undefined);
}
if (bReadyToSpark) {
if (nResurrectTime == null) {
nResurrectTime = gdp.core.time.FrameTimer.getInstance().getTime();
}
if ((gdp.core.time.FrameTimer.getInstance().getTime() - nResurrectTime) > nResurrectDelay) {
if (_currentframe == 1) {
var _local2 = _parent.getNextHighestDepth();
mcSpark = elements.Spark(_parent.attachMovie("mc_Spark", "mcSpark", _local2, {_x:_x + 32, _y:_y + 9}));
gameplay.Field.getInstance().addSpark(mcSpark);
(play());// not popped
}
if ((_currentframe % 10) == 1) {
var _local3 = Math.floor(_currentframe / 10) - 1;
mcSpark._y = mcSpark._y - (_local3 * 2);
}
if (_currentframe == _totalframes) {
bReadyToSpark = false;
mcSpark.go();
nResurrectTime = null;
(gotoAndStop(1));// not popped
}
}
}
}
function setReadyToSpark(Void) {
bReadyToSpark = true;
}
function psDevil(Void) {
if (gameplay.Field.getInstance().isPause()) {
return(undefined);
}
if (nDevilDropTime == null) {
nDevilDropTime = gdp.core.time.FrameTimer.getInstance().getTime();
nDevilDropDelay = nDevilDropDelayMin + random((nDevilDropDelayMax - nDevilDropDelayMin) + 1);
}
if ((gdp.core.time.FrameTimer.getInstance().getTime() - nDevilDropTime) > nDevilDropDelay) {
var _local2 = _parent.getNextHighestDepth();
var _local3 = elements.DevilDrop(_parent.attachMovie("mc_Drop", "mcDrop", _local2, {_x:_x + 17.5, _y:_y + 23}));
gameplay.Field.getInstance().addDevilDrop(_local3);
nDevilDropTime = gdp.core.time.FrameTimer.getInstance().getTime();
nDevilDropDelay = nDevilDropDelayMin + random((nDevilDropDelayMax - nDevilDropDelayMin) + 1);
}
}
function psMove(Void) {
if (currentPoint == null) {
currentPoint = 0;
nextPoint = 1;
}
mcTween = new gdp.ui.effects.tween.Tween(this, aPositionPoints[currentPoint], aPositionPoints[nextPoint], nSpeed);
mcTween.onEnd = gdp.utils.Delegate.create(this, psMove);
mcTween.run();
currentPoint = nextPoint;
nextPoint = currentPoint + 1;
if (nextPoint >= aPositionPoints.length) {
nextPoint = 0;
}
}
var nType = null;
var nFieldType = null;
var nPositionPointsCount = null;
var aPositionPoints = null;
var mcTween = null;
var currentPoint = null;
var nextPoint = null;
var nSpeed = null;
var bLoop = null;
var receiveMessageTime = null;
var nDeleteDelay = 200;
var processDelay1 = null;
var processDelay2 = null;
var bFairieHelp = null;
var nMessageReceiver = null;
var nMessage = null;
var nBonusType = null;
var aConcernedBonusType = null;
var processWitch = null;
var nResurrectTime = null;
var nResurrectDelay = 6000;
var mcSpark = null;
var bReadyToSpark = null;
var processDevil = null;
var nDevilDropTime = null;
var nDevilDropDelay = null;
var nDevilDropDelayMin = 5500;
var nDevilDropDelayMax = 6500;
var nDevilDestroyRange = 50;
var nDevilExplodeMaxDelay = 500;
var polygon = null;
var center = null;
}
Symbol 1095 MovieClip [__Packages.gdp.ui.effects.tween.Tween] Frame 0
class gdp.ui.effects.tween.Tween extends gdp.core.base.BaseClass
{
var dispatchEvent;
function Tween (mcObject, pntStart, pntEnd, nSpeed, nAcc) {
super();
this.mcObject = mcObject;
this.pntStart = pntStart;
this.pntEnd = pntEnd;
this.nSpeed = nSpeed;
this.nAcc = ((nAcc == null) ? 1 : (nAcc));
pntLocation = pntStart.clone();
init();
}
function init(Void) {
var _local4 = pntEnd.nX - pntStart.nX;
var _local3 = pntEnd.nY - pntStart.nY;
var _local2 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local5 = _local2 / Math.floor(_local2 / nSpeed);
var _local7 = (_local4 / _local2) * _local5;
var _local6 = (_local3 / _local2) * _local5;
pntVelocity = new gdp.utils.math.helpers.Point(_local7, _local6);
}
function psTween(Void) {
if (mcObject == null) {
return(0);
}
if ((Math.abs(pntLocation.nX - pntEnd.nX) <= Math.abs(pntVelocity.nX)) && (Math.abs(pntLocation.nY - pntEnd.nY) <= Math.abs(pntVelocity.nY))) {
return(end());
}
pntLocation = gdp.utils.math.helpers.Point.sum(pntLocation, pntVelocity);
mcObject._x = pntLocation.nX;
mcObject._y = pntLocation.nY;
dispatchEvent(new gdp.ui.effects.EffectEvent(gdp.ui.effects.EffectEvent.MOVE, null, null, mcObject));
pntVelocity.nX = pntVelocity.nX * nAcc;
pntVelocity.nY = pntVelocity.nY * nAcc;
}
function end(Void) {
bRun = false;
mcObject._x = pntEnd.nX;
mcObject._y = pntEnd.nY;
dispatchEvent(new gdp.ui.effects.EffectEvent(gdp.ui.effects.EffectEvent.END, null, null, mcObject));
onEnd();
return(0);
}
function run(Void) {
if (bRun) {
return(undefined);
}
bRun = true;
mcObject._x = pntStart.nX;
mcObject._y = pntStart.nY;
process = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psTween));
gdp.core.process.ProcessManager.getInstance().addProcess(process);
}
function stop(Void) {
if (!bRun) {
return(undefined);
}
gdp.core.process.ProcessManager.getInstance().removeProcess(process);
dispatchEvent(new gdp.ui.effects.EffectEvent(gdp.ui.effects.EffectEvent.STOP, null, null, mcObject));
bRun = false;
}
var mcObject = null;
var pntStart = null;
var pntEnd = null;
var pntVelocity = null;
var pntLocation = null;
var nSpeed = null;
var nAcc = null;
var process = null;
var bRun = false;
var onEnd = null;
}
Symbol 1096 MovieClip [__Packages.gdp.ui.effects.EffectEvent] Frame 0
class gdp.ui.effects.EffectEvent extends gdp.env.events.Event
{
function EffectEvent (sType, bBubbles, bCancelable, mcObject) {
super(sType, bBubbles, bCancelable);
this.mcObject = mcObject;
}
function getMovieClip(Void) {
return(mcObject);
}
static var END = "effect_end";
static var STOP = "effect_stop";
static var MOVE = "effect_move";
var mcObject = null;
}
Symbol 1097 MovieClip [__Packages.elements.Spark] Frame 0
class elements.Spark extends gdp.core.base.BaseMovieClip
{
var _y, _x, _parent, removeMovieClip;
function Spark () {
super();
}
function go(Void) {
bMoveToBrick = false;
brickToResurrect = gameplay.Field.getInstance().getBrickToResurrect();
trace(("elements.Spark.go(" + [brickToResurrect]) + ")");
if (brickToResurrect == null) {
death();
} else {
brickPosition = gameplay.Field.getInstance().getBrickPosition(brickToResurrect);
trace(("elements.Spark.go(" + [brickPosition]) + ")");
bMove = true;
nDirection = (Math.PI*2) - random(Math.PI);
nBirnTime = gdp.core.time.FrameTimer.getInstance().getTime();
nCurrentChangeDirectionDelay = nMinChangeDirectionDelay - random((nMaxChangeDirectionDelay - nMinChangeDirectionDelay) + 1);
nLastChangeDirectionTime = nBirnTime;
processMove = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psMove));
gdp.core.process.ProcessManager.getInstance().addProcess(processMove);
}
}
function psMove(Void) {
if (windows.GameWindow.getInstance().isUserPause()) {
return(undefined);
}
if (!gameplay.Field.getInstance().isEndOfLevel()) {
if (gameplay.Field.getInstance().isPause()) {
return(undefined);
}
}
if ((gdp.core.time.FrameTimer.getInstance().getTime() - nBirnTime) > nBeforeResurrectTime) {
var _local2 = Math.sqrt(((_x - brickPosition.nX) * (_x - brickPosition.nX)) + ((_y - brickPosition.nY) * (_y - brickPosition.nY)));
if (!bMoveToBrick) {
bMoveToBrick = true;
changeDirection(brickPosition.nX, brickPosition.nY, _local2);
}
if (lastDistance == null) {
lastDistance = _local2;
} else {
if (lastDistance > _local2) {
changeDirection(brickPosition.nX, brickPosition.nY, _local2);
}
lastDistance = _local2;
}
if (_local2 < 5) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processMove);
gameplay.Field.getInstance().resurrectBrick(brickToResurrect);
death();
}
} else if ((gdp.core.time.FrameTimer.getInstance().getTime() - nLastChangeDirectionTime) > nCurrentChangeDirectionDelay) {
nDirection = Math.PI - random((Math.PI*2));
nCurrentChangeDirectionDelay = nMinChangeDirectionDelay - random((nMaxChangeDirectionDelay - nMinChangeDirectionDelay) + 1);
nLastChangeDirectionTime = gdp.core.time.FrameTimer.getInstance().getTime();
}
if (nDirection != null) {
_x = _x + (nSpeed * Math.cos(nDirection));
_y = _y + ((-nSpeed) * Math.sin(nDirection));
} else {
_x = _x + vx;
_y = _y + vy;
}
}
function isMove(Void) {
return(bMove);
}
function death(Void) {
gameplay.Field.getInstance().setReadyToSpark();
elements.BrickExplosion(_parent.attachMovie("witch_particle", "mcWitchParticle", _parent.getNextHighestDepth(), {_x:_x, _y:_y}));
removeMovieClip();
}
function remove(Void) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processMove);
removeMovieClip();
}
function changeDirection(x, y, d) {
nDirection = null;
vx = ((x - _x) * nSpeed) / d;
vy = ((y - _y) * nSpeed) / d;
}
var processMove = null;
var nSpeed = 1.5;
var nDirection = null;
var vx = null;
var vy = null;
var bMove = false;
var nBirnTime = null;
var nBeforeResurrectTime = 8000;
var nMinChangeDirectionDelay = 2000;
var nMaxChangeDirectionDelay = 2200;
var nLastChangeDirectionTime = null;
var nCurrentChangeDirectionDelay = null;
var brickToResurrect = null;
var brickPosition = null;
var bMoveToBrick = null;
var lastDistance = null;
}
Symbol 1098 MovieClip [__Packages.geometry.Polygon] Frame 0
class geometry.Polygon extends gdp.core.base.BaseClass
{
function Polygon (arr) {
super();
aVertexes = [];
arrayAppearance = arr;
var _local3 = 0;
while (_local3 < arr.length) {
insert(arr[_local3].nX, arr[_local3].nY);
_local3++;
}
}
function getArr(Void) {
var _local3 = [];
var _local2 = 0;
while (_local2 < aVertexes.length) {
_local3.push(new gdp.utils.math.helpers.Point(aVertexes[_local2].x, aVertexes[_local2].y));
_local2++;
}
return(_local3);
}
function size(Void) {
return(aVertexes.length);
}
function advance() {
if (aVertexes.length == 0) {
return(null);
}
currentVertex++;
if (currentVertex >= aVertexes.length) {
currentVertex = 0;
}
return(aVertexes[currentVertex]);
}
function edge(Void) {
var _local2 = currentVertex + 1;
if (_local2 >= aVertexes.length) {
_local2 = 0;
}
return(new geometry.Edge(aVertexes[currentVertex].point(), aVertexes[_local2].point()));
}
function insert(x, y) {
aVertexes.push(new geometry.Vertex(x, y));
area = null;
}
function remove(i) {
aVertexes.splice(i, 1);
area = null;
}
function toBegin(Void) {
currentVertex = 0;
}
function getVertex(i) {
return(new gdp.utils.math.helpers.Point(aVertexes[i].x, aVertexes[i].y));
}
function getArea(Void) {
if (area != null) {
return(area);
}
var _local3 = 0;
var _local2 = 0;
while (_local2 < (aVertexes.length - 1)) {
_local3 = _local3 + (Math.abs((aVertexes[_local2].x + aVertexes[_local2 + 1].x) * (aVertexes[_local2].y - aVertexes[_local2 + 1].y)) / 2);
_local2++;
}
_local3 = _local3 + (Math.abs((aVertexes[aVertexes.length - 1].x + aVertexes[0].x) * (aVertexes[aVertexes.length - 1].y - aVertexes[0].y)) / 2);
area = _local3;
trace(("geometry.Polygon.getArea(" + [_local3]) + ")");
return(_local3);
}
function getEdge(index) {
var _local2 = index + 1;
if (_local2 >= aVertexes.length) {
_local2 = 0;
}
return(new geometry.Edge(aVertexes[index].point(), aVertexes[_local2].point()));
}
function toArray(Void) {
return(arrayAppearance);
}
function getRandomBoundaryPoint(Void) {
var _local3 = random(aVertexes.length);
var _local2 = _local3 + 1;
if (_local2 >= aVertexes.length) {
_local2 = 0;
}
var _local4 = new geometry.Edge(aVertexes[_local3].point(), aVertexes[_local2].point());
var _local5 = _local4.getRandomPoint();
return(_local5);
}
function getRandomNearBoundaryPoint(point) {
var _local5 = Number.MAX_VALUE;
var _local6;
var _local4 = 0;
while (_local4 < size()) {
var _local2 = edge();
var _local3 = _local2.getDistance(point);
if (_local3 < _local5) {
_local5 = _local3;
_local6 = _local2.getRandomPoint();
}
advance();
_local4++;
}
return([_local5, _local6]);
}
function getDestinationPoint(begin, end) {
var _local3 = 0;
while (_local3 < size()) {
var _local2 = edge();
var _local4 = _local2.isCross(begin, end);
if (_local4) {
return(_local2.getCross(begin, end));
}
advance();
_local3++;
}
return(null);
}
function toString(Void) {
return(("Polygon:[" + aVertexes.toString()) + "]");
}
var arrayAppearance = null;
var aVertexes = [];
var currentVertex = 0;
var area = null;
}
Symbol 1099 MovieClip [__Packages.geometry.Vertex] Frame 0
class geometry.Vertex extends gdp.core.base.BaseClass
{
function Vertex (nx, ny) {
super();
x = nx;
y = ny;
}
function point(Void) {
var _local2 = new geometry.MyPoint(x, y);
return(_local2);
}
function toString(Void) {
return(("Vertex:[" + [x, y]) + "]");
}
var x = null;
var y = null;
}
Symbol 1100 MovieClip [__Packages.geometry.MyPoint] Frame 0
class geometry.MyPoint extends gdp.core.base.BaseClass
{
function MyPoint (nx, ny) {
super();
x = nx;
y = ny;
}
function classifyPoints(p0, p1) {
var _local4 = this;
var _local3 = new geometry.MyPoint(p1.x - p0.x, p1.y - p0.y);
var _local2 = new geometry.MyPoint(_local4.x - p0.x, _local4.y - p0.y);
var _local6 = (_local3.x * _local2.y) - (_local2.x * _local3.y);
if (_local6 > 0) {
return(geometry.Geometry.LEFT);
}
if (_local6 < 0) {
return(geometry.Geometry.RIGHT);
}
if (((_local3.x * _local2.x) < 0) || ((_local3.y * _local2.y) < 0)) {
return(geometry.Geometry.BEHIND);
}
if (_local3.length() < _local2.length()) {
return(geometry.Geometry.BEYOND);
}
if (p0 == _local4) {
return(geometry.Geometry.ORIGIN);
}
if (p1 == _local4) {
return(geometry.Geometry.DESTINATION);
}
return(geometry.Geometry.BETWEEN);
}
function classifyEdge(e) {
return(classifyPoints(e.org, e.dest));
}
function length(Void) {
return(Math.sqrt((x * x) + (y * y)));
}
function toString(Void) {
return(("MyPoint: [" + [x, y]) + "]");
}
var x = null;
var y = null;
}
Symbol 1101 MovieClip [__Packages.geometry.Geometry] Frame 0
class geometry.Geometry extends gdp.core.base.BaseClass
{
function Geometry () {
super();
}
function pointInPolygon(a, p) {
trace(("geometry.Geometry.pointInPolygon(" + [arguments]) + ")");
var _local4 = 0;
var _local5;
var _local7 = p.size();
var _local3 = 0;
while (_local3 < _local7) {
_local5 = p.edge();
switch (edgeType(a, _local5)) {
case TOUCHING :
return(BOUNDARY);
case CROSSING :
_local4 = 1 - _local4;
}
p.advance();
_local3++;
}
return((_local4 ? (INSIDE) : (OUTSIDE)));
}
function edgeType(a, e) {
var _local2 = e.org;
var _local3 = e.dest;
switch (a.classifyEdge(e)) {
case LEFT :
return((((_local2.y < a.y) && (a.y <= _local3.y)) ? (CROSSING) : (INESSENTIAL)));
case RIGHT :
return((((_local3.y < a.y) && (a.y <= _local2.y)) ? (CROSSING) : (INESSENTIAL)));
case BETWEEN :
case ORIGIN :
case DESTINATION :
return(TOUCHING);
}
return(INESSENTIAL);
}
static function getInstance() {
if (instance == null) {
instance = new geometry.Geometry();
}
return(instance);
}
function getEdgesCross(p1, p2, p3, p4) {
return(cross(p1, p2, p3, p4));
}
function cross(p1, p2, p3, p4) {
var _local6 = ((p4.nY - p3.nY) * (p2.x - p1.x)) - ((p4.nX - p3.nX) * (p2.y - p1.y));
var _local5 = (((p4.nX - p3.nX) * (p1.y - p3.nY)) - ((p4.nY - p3.nY) * (p1.x - p3.nX))) / _local6;
var _local8 = (((p2.x - p1.x) * (p1.y - p3.nY)) - ((p2.y - p1.y) * (p1.x - p3.nX))) / _local6;
if ((((_local5 >= 0) && (_local5 <= 1)) && (_local8 >= 0)) && (_local8 <= 1)) {
var _local3 = new Object();
_local3.point = new gdp.utils.math.helpers.Point(p1.x + (_local5 * (p2.x - p1.x)), p1.y + (_local5 * (p2.y - p1.y)));
_local3.distance = Math.sqrt(((_local3.point.nX - p3.nX) * (_local3.point.nX - p3.nX)) + ((_local3.point.nY - p3.nY) * (_local3.point.nY - p3.nY)));
return(_local3);
}
return(null);
}
function getD(p1, p2, p3, p4) {
var _local5 = ((p4.nY - p3.nY) * (p2.x - p1.x)) - ((p4.nX - p3.nX) * (p2.y - p1.y));
var _local7 = (((p4.nX - p3.nX) * (p1.y - p3.nY)) - ((p4.nY - p3.nY) * (p1.x - p3.nX))) / _local5;
var _local8 = (((p2.x - p1.x) * (p1.y - p3.nY)) - ((p2.y - p1.y) * (p1.x - p3.nX))) / _local5;
var _local4 = new gdp.utils.math.helpers.Point(p1.x + (_local7 * (p2.x - p1.x)), p1.y + (_local7 * (p2.y - p1.y)));
return(Math.sqrt(((_local4.nX - p3.nX) * (_local4.nX - p3.nX)) + ((_local4.nY - p3.nY) * (_local4.nY - p3.nY))));
}
static var instance = null;
static var INSIDE = 1;
static var OUTSIDE = 2;
static var BOUNDARY = 3;
static var TOUCHING = 11;
static var CROSSING = 12;
static var INESSENTIAL = 13;
static var LEFT = 21;
static var RIGHT = 22;
static var BEYOND = 23;
static var BEHIND = 24;
static var BETWEEN = 25;
static var ORIGIN = 26;
static var DESTINATION = 27;
}
Symbol 1102 MovieClip [__Packages.geometry.Edge] Frame 0
class geometry.Edge extends gdp.core.base.BaseClass
{
function Edge (_org, _dest) {
super();
org = _org;
dest = _dest;
A = dest.y - org.y;
B = -(dest.x - org.x);
C = (org.y * dest.x) - (org.x * dest.y);
}
function getRandomPoint(Void) {
var _local2 = new gdp.utils.math.helpers.Point();
if (dest.x == org.x) {
_local2.nX = org.x;
if (org.y > dest.y) {
_local2.nY = dest.y + random(org.y - dest.y);
} else {
_local2.nY = org.y + random(dest.y - org.y);
}
return(_local2);
}
if (dest.y == org.y) {
_local2.nY = org.y;
if (org.x > dest.x) {
_local2.nX = dest.x + random(org.x - dest.x);
} else {
_local2.nX = org.x + random(dest.x - org.x);
}
return(_local2);
}
var _local4 = (dest.y - org.y) / (dest.x - org.x);
var _local3 = ((org.y * dest.x) - (org.x * dest.y)) / (dest.x - org.x);
if (org.x > dest.x) {
_local2.nX = dest.x + random(org.x - dest.x);
} else {
_local2.nX = org.x + random(dest.x - org.x);
}
_local2.nY = Math.floor((_local4 * _local2.nX) + _local3);
return(_local2);
}
function getDistance(point) {
var _local2 = new gdp.utils.math.helpers.Point(dest.x - org.x, dest.y - org.y);
var _local8 = new gdp.utils.math.helpers.Point(point.nX - org.x, point.nY - org.y);
var _local4 = (_local8.nX * _local2.nX) + (_local8.nY * _local2.nY);
if (_local4 <= 0) {
return(d(point.nX, point.nY, org.x, org.y));
}
var _local6 = (_local2.nX * _local2.nX) + (_local2.nY * _local2.nY);
if (_local6 <= _local4) {
return(d(point.nX, point.nY, dest.x, dest.y));
}
var _local5 = _local4 / _local6;
var _local7 = new gdp.utils.math.helpers.Point(org.x + (_local5 * _local2.nX), org.y + (_local5 * _local2.nY));
return(d(point.nX, point.nY, _local7.nX, _local7.nY));
}
function getDistance2(p3, p4) {
var _local5 = ((p4.nY - p3.nY) * (dest.x - org.x)) - ((p4.nX - p3.nX) * (dest.y - org.y));
var _local4 = (((p4.nX - p3.nX) * (org.y - p3.nY)) - ((p4.nY - p3.nY) * (org.x - p3.nX))) / _local5;
var _local7 = (((dest.x - org.x) * (org.y - p3.nY)) - ((dest.y - org.y) * (org.x - p3.nX))) / _local5;
if ((((_local4 >= 0) && (_local4 <= 1)) && (_local7 >= 0)) && (_local7 <= 1)) {
var _local3 = new Object();
_local3.point = new gdp.utils.math.helpers.Point(org.x + (_local4 * (dest.x - org.x)), org.y + (_local4 * (dest.y - org.y)));
_local3.distance = Math.sqrt(((_local3.point.nX - p3.nX) * (_local3.point.nX - p3.nX)) + ((_local3.point.nY - p3.nY) * (_local3.point.nY - p3.nY)));
return(_local3.distance);
}
return(null);
}
function getLargeDistance(point) {
var _local2 = new gdp.utils.math.helpers.Point(dest.x - org.x, dest.y - org.y);
var _local5 = new gdp.utils.math.helpers.Point(point.nX - org.x, point.nY - org.y);
var _local4 = (_local5.nX * _local2.nX) + (_local5.nY * _local2.nY);
if (_local4 <= 0) {
return(d(point.nX, point.nY, dest.x, dest.y));
}
var _local6 = (_local2.nX * _local2.nX) + (_local2.nY * _local2.nY);
if (_local6 <= _local4) {
return(d(point.nX, point.nY, org.x, org.y));
}
}
function getAngle(Void) {
var _local2 = -Math.atan((-A) / B);
return((_local2 * 180) / Math.PI);
}
function d(x1, y1, x2, y2) {
return(Math.sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2))));
}
function toString(Void) {
return(((("Edge: [" + [org.x, org.y]) + "]&[") + [dest.x, dest.y]) + "]");
}
function isCross(begin, end) {
return(((((A * begin.nX) + (B * begin.nY)) + C) * (((A * end.nX) + (B * end.nY)) + C)) < 0);
}
function getCross(begin, end) {
var _local2 = new gdp.utils.math.helpers.Point();
var _local4 = end.nY - begin.nY;
var _local7 = -(end.nX - begin.nX);
var _local6 = (begin.nY * end.nX) - (begin.nX * end.nY);
if (A == 0) {
_local2.nY = (-C) / B;
_local2.nX = (-((_local7 * _local2.nY) + _local6)) / _local4;
} else {
_local2.nY = ((_local4 * C) - (A * _local6)) / ((A * _local7) - (_local4 * B));
_local2.nX = (-((B * _local2.nY) + C)) / A;
}
var _local8 = isBetween(org, dest, _local2.nX, _local2.nY);
if (!_local8) {
return(begin);
}
_local2.nX = Math.floor(_local2.nX);
_local2.nY = Math.floor(_local2.nY);
return(_local2);
}
function isBetween(a, b, x, y) {
var _local4 = a.x;
var _local2 = b.x;
var _local3 = a.y;
var _local1 = b.y;
if (_local4 > _local2) {
_local4 = b.x;
_local2 = a.x;
}
if (_local3 > _local1) {
_local3 = b.y;
_local1 = a.y;
}
if ((((_local4 <= x) && (x <= _local2)) && (_local3 <= y)) && (y <= _local1)) {
return(true);
}
return(false);
}
var org = null;
var dest = null;
var A = null;
var B = null;
var C = null;
}
Symbol 1103 MovieClip [__Packages.managers.BrickManager] Frame 0
class managers.BrickManager extends gdp.core.base.BaseClass
{
function BrickManager () {
super();
trace(("managers.BrickManager.BrickManager(" + [arguments]) + ")");
processLoading = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psLoading));
gdp.core.process.ProcessManager.getInstance().addProcess(processLoading);
}
function psLoading(Void) {
convert(aBricks);
gdp.core.process.ProcessManager.getInstance().removeProcess(processLoading);
}
function onBricksLoad(bSuccess) {
Game.getInstance().setLoadingProgress(100, 0);
trace(("managers.BrickManager.onBricksLoad(" + [arguments]) + ")");
}
function addBrick(oData) {
aBricksTemplates.push(new elements.BrickTemplate(oData));
var _local3 = (aBricksTemplates.length / nBricksCount) * 100;
trace(("managers.BrickManager.addBrick(" + [aBricksTemplates.length, nBricksCount, _local3]) + ")");
Game.getInstance().setLoadingProgress(_local3, 0);
trace(("managers.BrickManager.addBrick(" + [arguments]) + ")");
}
function setBricksCount(nCount) {
nBricksCount = nCount;
}
function getID(type) {
return(aBricksTemplates[type].getID());
}
function getFlags(type) {
return(aBricksTemplates[type].getFlags());
}
function getScore(type) {
return(aBricksTemplates[type].getScore());
}
function getStamina(type) {
return(aBricksTemplates[type].getStamina());
}
function getPoligonPointsCount(type) {
return(aBricksTemplates[type].getPoligonPointsCount());
}
function getPoligonPoints(type) {
return(aBricksTemplates[type].getPoligonPoints());
}
function getWidth(type) {
return(aBricksTemplates[type].getWidth());
}
function getHeight(type) {
return(aBricksTemplates[type].getHeight());
}
function getBrickImage(type) {
return(aBricksTemplates[type].getBrickImage());
}
function getParticleImage(type) {
return(aBricksTemplates[type].getParticleImage());
}
function getPolygon(type) {
return(aBricksTemplates[type].getPolygon());
}
function getAxes(type) {
return(aBricksTemplates[type].getAxes());
}
function isRectangle(type) {
return(aBricksTemplates[type].isRectangle());
}
function convert(bricks) {
trace(("managers.BrickManager.convert(" + [bricks.length]) + ")");
setBricksCount(bricks.length);
var _local2 = 0;
while (_local2 < bricks.length) {
trace(("managers.BrickManager.convert(" + [_local2]) + ")");
addBrick(parseBrick(bricks[_local2]));
_local2++;
}
}
function parseBrick(brick) {
trace(("managers.BrickManager.parseBrick(" + [arguments]) + ")");
var _local7 = new Object();
var _local9 = brick;
var _local4 = _local9.split(";");
var _local3 = 0;
while (_local3 < _local4.length) {
_local4[_local3] = _local4[_local3].split("\t");
var _local5 = 0;
while (_local5 < _local4[_local3].length) {
if (_local4[_local3][_local5] == "") {
_local4[_local3].splice(_local5, 1);
_local5--;
}
_local5++;
}
if (_local4[_local3].length == 0) {
_local4.splice(_local3, 1);
_local3--;
} else {
_local4[_local3] = _local4[_local3][0];
}
_local3++;
}
var _local8 = _local4[0];
_local7.ID = gdp.utils.StringUtil.toNumber(_local8);
_local7.Flags = gdp.utils.StringUtil.toNumber(_local4[1]);
_local7.Score = gdp.utils.StringUtil.toNumber(_local4[2]);
_local7.Stamina = gdp.utils.StringUtil.toNumber(_local4[3]);
_local7.PoligonPointsCount = gdp.utils.StringUtil.toNumber(_local4[5]);
_local7.PoligonPoints = new Array();
var _local6 = 0;
while (_local6 < _local7.PoligonPointsCount) {
_local7.PoligonPoints.push(parsePoint(_local4[6 + _local6]));
_local6++;
}
_local7.BrickImage = _local4[6 + _local7.PoligonPointsCount];
_local7.ParticleImage = _local4[(6 + _local7.PoligonPointsCount) + 1];
return(_local7);
}
function parsePoint(sPoint) {
var _local1 = sPoint.split(" ");
return(new gdp.utils.math.helpers.Point(gdp.utils.StringUtil.toNumber(_local1[0]) * 0.7, gdp.utils.StringUtil.toNumber(_local1[1]) * 0.7));
}
static function getInstance() {
trace(("managers.BrickManager.getInstance(" + [arguments]) + ")");
if (instance == null) {
instance = new managers.BrickManager();
}
return(instance);
}
static var instance = null;
var processLoading = null;
var nBricksCount = null;
var aBricksTemplates = [];
var aBricks = ["0;0;20;2;;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick0;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick1;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick2;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick3;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 20.0;0.0 20.0;brick4;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 20.0;0.0 20.0;brick5;particle0;0.0 0.0;0.0 0.0", "-1;0;20;2;4;4;0.0 0.0;80.0 0.0;80.0 40.0;0.0 40.0;brick6;particle0;0.0 0.0;0.0 0.0", "-1;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 20.0;0.0 20.0;brick7;particle1;0.0 0.0;0.0 0.0", "-1;0;40;3;4;8;0.0 0.0;80.0 0.0;80.0 24.0;71.0 34.0;52.0 40.0;28.0 40.0;9.0 34.0;0.0 24.0;brick8;particle1;0.0 0.0;0.0 0.0", "-1;0;20;2;4;4;8.0 0.0;32.0 0.0;40.0 60.0;0.0 60.0;brick9;particle9;0.0 0.0;0.0 0.0", "0;1;10;1;4;4;0.0 0.0;40.0 0.0;40.0 10.0;0.0 10.0;brick10;particle0;0.0 0.0;0.0 0.0", "0;1;10;1;4;4;0.0 0.0;40.0 0.0;40.0 10.0;0.0 10.0;brick11;particle0;0.0 0.0;0.0 0.0", "-1;0;10;2;4;4;0.0 0.0;80.0 0.0;80.0 40.0;0.0 40.0;brick12;particle0;0.0 0.0;0.0 0.0", "-1;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick13;particle1;0.0 0.0;0.0 0.0", ";-1;0;20;\t2;4;4;0.0 0.0;60.0 0.0;60.0 40.0;0.0 40.0;brick14;particle1;0.0 0.0;0.0 0.0", "-1;0;20;2;4;7;40.0 0.0;58.0 4.0;72.0 12.0;80.0 30.0;0.0 30.0;8.0 12.0;22.0 4.0;brick15;particle0;0.0 0.0;0.0 0.0", "-1;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 30.0;0.0 30.0;brick16;particle1;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 30.0;0.0 30.0;brick17;particle1;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 30.0;0.0 30.0;brick18;particle1;0.0 0.0;0.0 0.0", "-1;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 30.0;0.0 30.0;brick19;particle1;0.0 0.0;0.0 0.0", "-1;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 30.0;0.0 30.0;brick20;particle1;0.0 0.0;0.0 0.0", "0;0;10;1;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick21;particle4;0.0 0.0;0.0 0.0", "0;0;10;1;4;8;15.0 0.0;40.0 0.0;40.0 40.0;15.0 40.0;5.0 35.0;0.0 25.0;0.0 15.0;5.0 5.0;brick22;particle4;0.0 0.0;0.0 0.0", "0;0;10;1;4;8;0.0 0.0;25.0 0.0;35.0 5.0;40.0 15.0;40.0 25.0;35.0 35.0;25.0 40.0;0.0 40.0;brick23;particle4;0.0 0.0;0.0 0.0", "0;0;10;1;4;8;15.0 0.0;25.0 0.0;35.0 5.0;40.0 15.0;40.0 40.0;0.0 40.0;0.0 15.0;5.0 5.0;brick24;particle4;0.0 0.0;0.0 0.0", "0;0;10;1;4;8;0.0 0.0;40.0 0.0;40.0 25.0;35.0 35.0;25.0 40.0;15.0 40.0;5.0 35.0;0.0 25.0;brick25;particle4;0.0 0.0;0.0 0.0", "0;0;10;1;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick26;particle4;0.0 0.0;0.0 0.0", "-1;0;10;1;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick27;particle4;0.0 0.0;0.0 0.0", "-1;0;10;1;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick28;particle4;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick29;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 20.0;\t0.0 20.0;brick30;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;0.0 0.0;20.0 0.0;20.0 40.0;0.0 40.0;brick31;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;0.0 0.0;40.0 0.0;20.0 40.0;0.0 40.0;brick32;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 40.0;20.0 40.0;brick33;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;0.0 0.0;20.0 0.0;40.0 40.0;0.0 40.0;brick34;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;20.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick35;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 20.0;0.0 40.0;brick36;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 20.0;brick37;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;0.0 0.0;40.0 20.0;40.0 40.0;0.0 40.0;brick38;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;0.0 20.0;40.0 0.0;40.0 40.0;0.0 40.0;brick39;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;3;0.0 0.0;40.0 0.0;0.0 40.0;brick40;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;3;0.0 0.0;40.0 0.0;40.0 40.0;brick41;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;3;0.0 0.0;40.0 40.0;0.0 40.0;brick42;particle0;0.0 0.0;0.0 0.0", "0;0;20;2;4;3;40.0 0.0;40.0 40.0;0.0 40.0;brick43;particle0;0.0 0.0;0.0 0.0", "-1;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick44;particle0;0.0 0.0;0.0 0.0", "-1;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick45;particle0;0.0 0.0;0.0 0.0", "-1;0;10;1;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick46;particle4;0.0 0.0;0.0 0.0", "-1;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 30.0;0.0 30.0;brick47;particle1;0.0 0.0;0.0 0.0", "1;0;100;1;6;12;29.0 1.0;41.0 1.0;56.0 11.0;56.0 24.0;69.0 46.0;69.0 54.0;62.0 60.0;8.0 60.0;1.0 54.0;1.0 46.0;14.0 24.0;14.0 11.0;brick48;particle0;0.0 0.0;0.0 0.0", "2;0;100;1;6;8;16.0 2.0;55.0 2.0;56.0 38.0;70.0 51.0;42.0 67.0;28.0 72.0;1.0 51.0;13.0 38.0;brick49;particle0;0.0 0.0;0.0 0.0", "-1;32;20;2;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick50;particle1;0.0 0.0;0.0 0.0", "-1;1;0;1;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick51;particle11;0.0 0.0;0.0 0.0", "-1;1;0;1;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick52;particle11;0.0 0.0;0.0 0.0", "-1;1;0;1;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick53;particle11;0.0 0.0;0.0 0.0", "-1;1;0;1;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick54;particle11;0.0 0.0;0.0 0.0", "0;1;0;1;4;4;0.0 0.0;40.0 0.0;40.0 10.0;0.0 10.0;brick55;particle11;0.0 0.0;0.0 0.0", "0;1;0;1;4;4;0.0 0.0;10.0 0.0;10.0 40.0;0.0 40.0;brick56;particle11;0.0 0.0;0.0 0.0", "-1;1;0;1;4;4;0.0 0.0;20.0 0.0;20.0 10.0;0.0 10.0;brick57;particle11;0.0 0.0;0.0 0.0", "-1;1;0;1;4;4;0.0 0.0;10.0 0.0;10.0 20.0;0.0 20.0;brick58;particle11;0.0 0.0;0.0 0.0", "0;4;10;1;4;4;0.0 0.0;40.0 0.0;40.0 20.0;0.0 20.0;brick59;particle3;0.0 0.0;0.0 0.0", "0;4;10;1;4;4;0.0 0.0;20.0 0.0;20.0 40.0;0.0 40.0;brick60;particle3;0.0 0.0;0.0 0.0", "0;4;10;1;4;6;0.0 0.0;40.0 0.0;40.0 20.0;20.0 20.0;20.0 40.0;0.0 40.0;brick61;particle3;0.0 0.0;0.0 0.0", "0;4;10;1;4;6;0.0 0.0;40.0 0.0;40.0 40.0;20.0 40.0;20.0 20.0;0.0 20.0;brick62;particle3;0.0 0.0;0.0 0.0", "0;4;10;1;4;6;20.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;0.0 20.0;20.0 20.0;brick63;particle3;0.0 0.0;0.0 0.0", "0;4;10;1;4;6;0.0 0.0;20.0 0.0;20.0 20.0;40.0 20.0;40.0 40.0;0.0 40.0;brick64;particle3;0.0 0.0;0.0 0.0", "0;4;10;1;4;4;0.0 0.0;40.0 0.0;40.0 20.0;0.0 20.0;brick65;particle3;0.0 0.0;0.0 0.0", "0;4;10;1;4;4;0.0 0.0;40.0 0.0;40.0 20.0;0.0 20.0;brick66;particle3;0.0 0.0;0.0 0.0", "-1;4;10;1;4;4;0.0 0.0;20.0 0.0;20.0 40.0;0.0 40.0;brick67;particle3;0.0 0.0;0.0 0.0", "-1;4;10;1;4;4;0.0 0.0;20.0 0.0;20.0 40.0;0.0 40.0;brick68;particle3;0.0 0.0;0.0 0.0", "6;32;10;2;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick69;particle1;0.0 0.0;0.0 0.0", "11;4;10;1;4;4;0.0 0.0;30.0 0.0;30.0 30.0;0.0 30.0;brick70;particle0;0.0 0.0;0.0 0.0", "-1;4;100;1;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick71;particle0;0.0 0.0;0.0 0.0", "-1;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick72;particle0;0.0 0.0;0.0 0.0", "-1;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 20.0;0.0 20.0;brick73;particle1;0.0 0.0;0.0 0.0", "-1;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick74;particle1;0.0 0.0;0.0 0.0", "3;0;500;1;4;7;22.0 11.0;50.0 8.0;50.0 81.0;26.0 100.0;8.0 96.0;0.0 68.0;3.0 37.0;brick75;particle5;0.0 0.0;0.0 0.0", "-1;0;40;3;4;4;0.0 0.0;40.0 0.0;40.0 20.0;0.0 20.0;brick76;particle2;0.0 0.0;0.0 0.0", "-1;0;40;3;4;4;0.0 0.0;40.0 0.0;40.0 20.0;0.0 20.0;brick77;particle4;0.0 0.0;0.0 0.0", "-1;1;10;1;4;4;0.0 0.0;40.0 0.0;40.0 10.0;0.0 10.0;brick78;particle0;0.0 0.0;0.0 0.0", "-1;0;20;2;4;3;20.0 0.0;40.0 40.0;0.0 40.0;brick79;particle1;0.0 0.0;0.0 0.0", "-1;0;20;2;4;3;0.0 0.0;40.0 0.0;20.0 40.0;brick80;particle1;0.0 0.0;0.0 0.0", "0;0;100;3;4;4;0.0 0.0;50.0 0.0;50.0 40.0;0.0 40.0;brick81;particle0;0.0 0.0;0.0 0.0", "0;1;0;1;4;4;0.0 0.0;20.0 0.0;20.0 20.0;0.0 20.0;brick82;null;0.0 0.0;0.0 0.0", "0;128;100;1;4;4;0.0 0.0;30.0 0.0;30.0 30.0;0.0 30.0;brick83;particle6;0.0 0.0;0.0 0.0", "0;128;200;1;4;4;0.0 0.0;30.0 0.0;30.0 30.0;0.0 30.0;brick84;particle6;0.0 0.0;0.0 0.0", "0;128;300;1;4;4;0.0 0.0;30.0 0.0;30.0 30.0;0.0 30.0;brick85;particle6;0.0 0.0;0.0 0.0", "-1;0;40;3;4;4;0.0 0.0;40.0 0.0;40.0 20.0;0.0 20.0;brick86;particle1;0.0 0.0;0.0 0.0", "-1;0;40;3;4;4;0.0 0.0;40.0 0.0;40.0 20.0;0.0 20.0;brick87;particle1;0.0 0.0;0.0 0.0", "-1;0;40;3;4;4;0.0 0.0;60.0 0.0;60.0 40.0;0.0 40.0;brick88;particle1;0.0 0.0;0.0 0.0", "-1;0;40;3;4;4;0.0 0.0;40.0 0.0;40.0 60.0;0.0 60.0;brick89;particle1;0.0 0.0;0.0 0.0", "-1;0;40;3;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick90;particle2;0.0 0.0;0.0 0.0", "-1;0;40;3;4;4;0.0 0.0;40.0 0.0;40.0 20.0;0.0 20.0;brick91;particle2;0.0 0.0;0.0 0.0", "-1;0;40;3;4;4;0.0 0.0;20.0 0.0;20.0 40.0;0.0 40.0;brick92;particle2;0.0 0.0;0.0 0.0", "-1;0;40;3;4;5;20.0 0.0;40.0 0.0;40.0 40.0;20.0 40.0;0.0 20.0;brick93;particle2;0.0 0.0;0.0 0.0", "-1;0;40;3;4;5;0.0 0.0;20.0 0.0;40.0 20.0;20.0 40.0;0.0 40.0;brick94;particle2;0.0 0.0;0.0 0.0", "-1;0;100;3;4;4;0.0 0.0;50.0 0.0;50.0 40.0;00.0 40.0;brick95;particle1;0.0 0.0;0.0 0.0", "4;0;500;3;4;4;0.0 0.0;50.0 0.0;50.0 40.0;00.0 40.0;brick96;particle7;0.0 0.0;0.0 0.0", "0;8;10;1;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick97;particle8;0.0 0.0;0.0 0.0", "0;8;10;1;4;4;0.0 0.0;40.0 0.0;40.0 40.0;0.0 40.0;brick98;particle8;0.0 0.0;0.0 0.0", "-1;8;10;1;4;4;0.0 0.0;30.0 0.0;30.0 40.0;0.0 40.0;brick99;particle8;0.0 0.0;0.0 0.0", "-1;8;10;1;4;4;0.0 0.0;40.0 0.0;40.0 30.0;0.0 30.0;brick100;particle8;0.0 0.0;0.0 0.0", "-8;0;500;1;4;7;22.0 11.0;50.0 8.0;50.0 81.0;26.0 100.0;8.0 96.0;0.0 68.0;3.0 37.0;brick101;particle10;0.0 0.0;0.0 0.0", "-1;0;20;2;4;4;0.0 0.0;40.0 0.0;40.0 80.0;0.0 80.0;brick102;particle0;0.0 0.0;0.0 0.0", "-1;4;10;1;4;4;0.0 0.0;40.0 0.0;40.0 20.0;0.0 20.0;brick103;particle0;0.0 0.0;0.0 0.0", "-1;4;10;1;4;4;0.0 0.0;20.0 0.0;20.0 40.0;0.0 40.0;brick104;particle0;0.0 0.0;0.0 0.0", "0;264;0;1;4;4;0.0 0.0;24.0 0.0;24.0 24.0;0.0 24.0;brick105;null;0.0 0.0;0.0 0.0", "0;264;0;1;4;4;12.0 0.0;24.0 12.0;12.0 24.0;0.0 12.0;brick106;null;0.0 0.0;0.0 0.0", "0;264;0;1;4;3;0.0 0.0;24.0 0.0;12.0 24.0;brick107;null;0.0 0.0;0.0 0.0", "0;0;20;2;4;4;0.0 0.0;20.0 0.0;20.0 40.0;0.0 40.0;brick108;particle0;0.0 0.0;0.0 0.0;0;0;20;2;4;4;0.0 0.0;20.0 0.0;20.0 40.0;0.0 40.0;brick109;particle0;0.0 0.0;0.0 0.0", "-1;0;100;1;6;12;29.0 1.0;41.0 1.0;56.0 11.0;56.0 24.0;69.0 46.0;69.0 54.0;62.0 60.0;8.0 60.0;1.0 54.0;1.0 46.0;14.0 24.0;14.0 11.0;brick110;particle0;0.0 0.0;0.0 0.0", "-2;0;100;1;6;8;16.0 2.0;55.0 2.0;56.0 38.0;70.0 51.0;42.0 67.0;28.0 72.0;1.0 51.0;13.0 38.0;brick111;particle0;0.0 0.0;0.0 0.0"];
}
Symbol 1104 MovieClip [__Packages.elements.BrickTemplate] Frame 0
class elements.BrickTemplate extends gdp.core.base.BaseClass
{
function BrickTemplate (oData) {
super();
nID = oData.ID;
var _local4 = oData.Flags;
aFlags = new Array(9);
var _local5 = 2;
var _local3 = 0;
while (_local3 < aFlags.length) {
aFlags[_local3] = _local4 % _local5;
_local4 = Math.floor(_local4 / _local5);
_local3++;
}
nScore = oData.Score;
nStamina = oData.Stamina;
nPoligonPointsCount = oData.PoligonPointsCount;
aPoligonPoints = oData.PoligonPoints;
sBrickImage = oData.BrickImage;
sParticleImage = oData.ParticleImage;
polygon = new geometry.Polygon(aPoligonPoints);
if (nPoligonPointsCount != 4) {
bRectangle = false;
} else if (aPoligonPoints[0].nY != aPoligonPoints[1].nY) {
bRectangle = false;
} else if (aPoligonPoints[1].nX != aPoligonPoints[2].nX) {
bRectangle = false;
} else if (aPoligonPoints[2].nY != aPoligonPoints[3].nY) {
bRectangle = false;
} else if (aPoligonPoints[3].nX != aPoligonPoints[0].nX) {
bRectangle = false;
} else {
bRectangle = true;
}
nWidth = Number.MIN_VALUE;
nHeight = Number.MIN_VALUE;
_local3 = 0;
while (_local3 < aPoligonPoints.length) {
if (aPoligonPoints[_local3].nX > nWidth) {
nWidth = aPoligonPoints[_local3].nX;
}
if (aPoligonPoints[_local3].nY > nHeight) {
nHeight = aPoligonPoints[_local3].nY;
}
_local3++;
}
aAxes = [];
_local3 = 0;
while (_local3 < (aPoligonPoints.length - 1)) {
findNormal(aPoligonPoints[_local3], aPoligonPoints[_local3 + 1]);
_local3++;
}
findNormal(aPoligonPoints[aPoligonPoints.length - 1], aPoligonPoints[0]);
}
function isRectangle(Void) {
return(bRectangle);
}
function findNormal(startPoint, endPoint) {
aAxes.push(new gdp.utils.math.helpers.Point(endPoint.nY - startPoint.nY, startPoint.nX - endPoint.nX));
}
function getID(Void) {
return(nID);
}
function getFlags(Void) {
return(aFlags);
}
function getScore(Void) {
return(nScore);
}
function getStamina(Void) {
return(nStamina);
}
function getPoligonPointsCount(Void) {
return(nPoligonPointsCount);
}
function getWidth(Void) {
return(nWidth);
}
function getHeight(Void) {
return(nHeight);
}
function getPoligonPoints(Void) {
return(aPoligonPoints);
}
function getBrickImage(Void) {
return(sBrickImage);
}
function getParticleImage(Void) {
return(sParticleImage);
}
function getPolygon(Void) {
return(polygon);
}
function getAxes(Void) {
return(aAxes);
}
var nID = null;
var aFlags = null;
var nScore = null;
var nStamina = null;
var nPoligonPointsCount = null;
var aPoligonPoints = null;
var nWidth = null;
var nHeight = null;
var sBrickImage = null;
var sParticleImage = null;
var bRectangle = null;
var polygon = null;
var aAxes = null;
}
Symbol 1105 MovieClip [__Packages.elements.DevilDrop] Frame 0
class elements.DevilDrop extends gdp.core.base.BaseMovieClip
{
var _y, removeMovieClip, _x;
function DevilDrop () {
super();
processFall = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psFall));
gdp.core.process.ProcessManager.getInstance().addProcess(processFall);
}
function psFall(Void) {
if (windows.GameWindow.getInstance().isUserPause()) {
return(undefined);
}
if (!gameplay.Field.getInstance().isEndOfLevel()) {
if (gameplay.Field.getInstance().isPause()) {
return(undefined);
}
}
if (_y >= gameplay.Field.getInstance().getFloor()) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processFall);
removeMovieClip();
}
if ((_y >= gameplay.Pad.getInstance()._y) && (_y < (gameplay.Pad.getInstance()._y + gameplay.Pad.getInstance()._height))) {
if ((_x >= (gameplay.Pad.getInstance()._x - (gameplay.Pad.getInstance()._width / 2))) && (_x <= (gameplay.Pad.getInstance()._x + (gameplay.Pad.getInstance()._width / 2)))) {
windows.GameWindow.getInstance().catchDevilDrop();
gdp.core.process.ProcessManager.getInstance().removeProcess(processFall);
removeMovieClip();
}
}
_y = _y + nSpeed;
}
function remove(Void) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processFall);
removeMovieClip();
}
var processFall = null;
var nSpeed = 4;
}
Symbol 1106 MovieClip [__Packages.managers.LevelManager] Frame 0
class managers.LevelManager extends gdp.core.base.BaseClass
{
function LevelManager () {
super();
levels = [[level0_bricks, level0_bonuses], [level1_bricks, level1_bonuses], [level2_bricks, level2_bonuses], [level3_bricks, level3_bonuses], [level4_bricks, level4_bonuses], [level5_bricks, level5_bonuses], [level6_bricks, level6_bonuses], [level7_bricks, level7_bonuses], [level8_bricks, level8_bonuses], [level9_bricks, level9_bonuses]];
nLoadingState = -1;
processLoading = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psLoading));
gdp.core.process.ProcessManager.getInstance().addProcess(processLoading);
}
function psLoading(Void) {
nLoadingState++;
if (nLoadingState >= nLevelsCount) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processLoading);
}
addLevel(parseLevel(levels[nLoadingState][0], levels[nLoadingState][1], nLoadingState));
}
function addLevel(oData) {
aLevels.push(new managers.Level(oData));
var _local2 = (aLevels.length / nLevelsCount) * 100;
Game.getInstance().setLoadingProgress(_local2, 1);
}
function onLevelsLoad(bSuccess) {
Game.getInstance().setLoadingProgress(100, 1);
var _local3 = null;
var _local4 = null;
var _local2 = 0;
while (_local2 < aLevels.length) {
_local3 = aLevels[_local2].getNumber();
_local2++;
}
nLevelsCount = aLevels.length;
}
function getLevel(level) {
return(aLevels[level - 1]);
}
function getLevelsCount(Void) {
return(nLevelsCount);
}
function parseLevel(sBricks, sBonuses, levelNumber) {
var _local2 = new Object();
_local2.LevelNumber = levelNumber;
_local2.Bricks = parseBricks(sBricks);
_local2.Bonuses = parseBonuses(sBonuses);
return(_local2);
}
function parseBricks(bricks) {
var _local5 = new Object();
_local5.Count = bricks.length;
_local5.List = [];
_local5.Frogs = [];
var _local3;
var _local2 = 0;
while (_local2 < bricks.length) {
var _local4 = bricks[_local2];
_local3 = parseBrick(_local4);
if (_local3.Type < 0) {
_local5.Frogs.push(_local3);
}
_local5.List.push(_local3);
_local2++;
}
return(_local5);
}
function parseBrick(sBrick) {
var _local5 = new Object();
var _local8 = sBrick;
var _local3 = _local8.split(";");
var _local2 = 0;
while (_local2 < _local3.length) {
_local3[_local2] = _local3[_local2].split("\t");
var _local4 = 0;
while (_local4 < _local3[_local2].length) {
if (_local3[_local2][_local4] == "") {
_local3[_local2].splice(_local4, 1);
_local4--;
}
_local4++;
}
if (_local3[_local2].length == 0) {
_local3.splice(_local2, 1);
_local2--;
} else {
_local3[_local2] = _local3[_local2][0];
}
_local2++;
}
var _local7 = _local3[0].split(" ");
_local5.Type = gdp.utils.StringUtil.toNumber(_local7[0]);
_local5.PositionPointsCount = gdp.utils.StringUtil.toNumber(_local7[1]);
_local5.PositionPoints = new Array();
var _local6 = 0;
while (_local6 < _local5.PositionPointsCount) {
_local5.PositionPoints.push(parsePoint(_local3[1 + _local6]));
_local6++;
}
_local5.Speed = gdp.utils.StringUtil.toNumber(_local3[1 + _local5.PositionPointsCount]);
_local7 = _local3[(1 + _local5.PositionPointsCount) + 1].split(" ");
_local5.MessageReceiver = gdp.utils.StringUtil.toNumber(_local7[0]);
_local5.Message = gdp.utils.StringUtil.toNumber(_local7[1]);
_local5.BonusType = gdp.utils.StringUtil.toNumber(_local3[(1 + _local5.PositionPointsCount) + 2]);
_local5.Loop = gdp.utils.StringUtil.toNumber(_local3[(1 + _local5.PositionPointsCount) + 3]);
_local5.FairieHelp = gdp.utils.StringUtil.toNumber(_local3[(1 + _local5.PositionPointsCount) + 4]);
if (managers.BrickManager.getInstance().getFlags(_local5.Type)[8] == 1) {
_local6 = 0;
while (_local6 < _local5.PositionPoints.length) {
_local5.PositionPoints[_local6].nX = _local5.PositionPoints[_local6].nX + 9;
_local5.PositionPoints[_local6].nY = _local5.PositionPoints[_local6].nY + 9;
_local6++;
}
}
return(_local5);
}
function parseBonuses(bonuses) {
var _local5 = new Object();
_local5.Count = bonuses.length;
_local5.List = [];
var _local2 = 0;
while (_local2 < bonuses.length) {
var _local3 = bonuses[_local2];
_local5.List.push(parseBonus(_local3));
_local2++;
}
return(_local5);
}
function parseBonus(sBonus) {
var _local4 = new Object();
var _local5 = sBonus;
var _local2 = _local5.split(";");
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = _local2[_local1].split("\t");
var _local3 = 0;
while (_local3 < _local2[_local1].length) {
if (_local2[_local1][_local3] == "") {
_local2[_local1].splice(_local3, 1);
_local3--;
}
_local3++;
}
if (_local2[_local1].length == 0) {
_local2.splice(_local1, 1);
_local1--;
} else {
_local2[_local1] = _local2[_local1][0];
}
_local1++;
}
_local2 = _local2[0].split(" ");
_local4.Type = gdp.utils.StringUtil.toNumber(_local2[0]);
_local4.Brick = gdp.utils.StringUtil.toNumber(_local2[1]);
_local4.Position = new gdp.utils.math.helpers.Point((gdp.utils.StringUtil.toNumber(_local2[2]) * 0.7) + 8, (gdp.utils.StringUtil.toNumber(_local2[3]) * 0.7) + 8);
return(_local4);
}
function parsePoint(sPoint) {
var _local1 = sPoint.split(" ");
return(new gdp.utils.math.helpers.Point((gdp.utils.StringUtil.toNumber(_local1[0]) * 0.7) + 8, (gdp.utils.StringUtil.toNumber(_local1[1]) * 0.7) + 8));
}
static function getInstance() {
if (instance == null) {
instance = new managers.LevelManager();
}
return(instance);
}
static var instance = null;
var processLoading = null;
var nLoadingState = null;
var levels = [];
var nLevelsCount = 10;
var aLevels = [];
var level0_bricks = ["2 1;120.000000 180.000000;0.000000;-1 0;2;0;0", "4 1;40.000000 220.000000;0.000000;-1 0;-1;0;0", "4 1;40.000000 160.000000;0.000000;-1 0;-1;0;0", "4 1;120.000000 160.000000;0.000000;-1 0;-1;0;0", "4 1;120.000000 220.000000;0.000000;-1 0;-1;0;0", "2 1;40.000000 180.000000;0.000000;-1 0;12;0;0", "2 1;400.000000 180.000000;0.000000;91 1;2;0;0", "2 1;480.000000 180.000000;0.000000;-1 0;2;0;0", "4 1;480.000000 160.000000;0.000000;-1 0;-1;0;0", "4 1;480.000000 220.000000;0.000000;-1 0;-1;0;0", "4 1;400.000000 220.000000;0.000000;-1 0;-1;0;0", "4 1;400.000000 160.000000;0.000000;-1 0;-1;0;0", "37 1;40.000000 240.000000;0.000000;93 1;-1;0;0", "38 1;480.000000 120.000000;0.000000;-1 0;-1;0;0", "39 1;40.000000 120.000000;0.000000;-1 0;-1;0;0", "36 1;480.000000 240.000000;0.000000;94 1;-1;0;0", "17 1;520.000000 185.000000;0.000000;-1 0;-1;0;0", "17 1;0.000000 185.000000;0.000000;-1 0;-1;0;0", "29 1;120.000000 120.000000;0.000000;-1 0;-1;0;0", "29 1;120.000000 240.000000;0.000000;-1 0;-1;0;0", "29 1;400.000000 120.000000;0.000000;-1 0;-1;0;0", "29 1;400.000000 240.000000;0.000000;-1 0;-1;0;0", "18 1;180.000000 210.000000;0.000000;-1 0;-1;0;0", "18 1;340.000000 210.000000;0.000000;-1 0;-1;0;0", "5 1;440.000000 120.000000;0.000000;-1 0;-1;0;0", "5 1;440.000000 260.000000;0.000000;-1 0;-1;0;0", "5 1;80.000000 120.000000;0.000000;92 1;-1;0;0", "5 1;80.000000 260.000000;0.000000;-1 0;-1;0;0", "22 1;40.000000 320.000000;0.000000;-1 0;-1;0;0", "23 1;200.000000 320.000000;0.000000;-1 0;-1;0;0", "23 1;480.000000 320.000000;0.000000;-1 0;-1;0;0", "22 1;320.000000 320.000000;0.000000;-1 0;-1;0;0", "26 1;400.000000 320.000000;0.000000;-1 0;0;0;0", "26 1;120.000000 320.000000;0.000000;-1 0;0;0;0", "21 1;360.000000 320.000000;0.000000;-1 0;-1;0;0", "21 1;440.000000 320.000000;0.000000;-1 0;0;0;0", "21 1;160.000000 320.000000;0.000000;-1 0;0;0;0", "21 1;80.000000 320.000000;0.000000;90 1;-1;0;0", "25 1;120.000000 360.000000;0.000000;76 1;-1;0;0", "25 1;400.000000 360.000000;0.000000;77 1;-1;0;0", "26 1;80.000000 40.000000;0.000000;-1 0;1;0;0", "26 1;160.000000 40.000000;0.000000;-1 0;1;0;0", "26 1;360.000000 40.000000;0.000000;-1 0;1;0;0", "26 1;440.000000 40.000000;0.000000;-1 0;1;0;0", "23 1;480.000000 40.000000;0.000000;-1 0;-1;0;0", "23 1;200.000000 40.000000;0.000000;-1 0;-1;0;0", "22 1;40.000000 40.000000;0.000000;-1 0;-1;0;0", "22 1;320.000000 40.000000;0.000000;-1 0;-1;0;0", "24 1;80.000000 0.000000;0.000000;78 1;-1;0;0", "24 1;160.000000 0.000000;0.000000;79 1;-1;0;0", "24 1;360.000000 0.000000;0.000000;80 1;-1;0;0", "24 1;440.000000 0.000000;0.000000;81 1;-1;0;0", "97 1;80.000000 140.000000;0.000000;-1 0;-1;0;0", "97 1;440.000000 220.000000;0.000000;-1 0;-1;0;0", "85 1;445.000000 215.000000;0.000000;-1 0;-1;0;0", "85 1;85.000000 155.000000;0.000000;-1 0;-1;0;0", "98 1;440.000000 140.000000;0.000000;-1 0;-1;0;0", "98 1;80.000000 220.000000;0.000000;-1 0;-1;0;0", "85 1;445.000000 155.000000;0.000000;-1 0;-1;0;0", "85 1;85.000000 215.000000;0.000000;-1 0;-1;0;0", "98 1;80.000000 180.000000;0.000000;-1 0;-1;0;0", "98 1;440.000000 180.000000;0.000000;-1 0;-1;0;0", "81 1;395.000000 80.000000;0.000000;-1 0;-1;0;0", "81 1;115.000000 80.000000;0.000000;-1 0;-1;0;0", "56 1;275.000000 280.000000;0.000000;67 16;-1;0;0", "56 1;275.000000 80.000000;0.000000;66 16;-1;0;0", "56 1;275.000000 120.000000;0.000000;68 16;-1;0;0", "56 1;275.000000 240.000000;0.000000;69 16;-1;0;0", "56 1;275.000000 40.000000;0.000000;71 16;-1;0;0", "56 1;275.000000 320.000000;0.000000;70 16;-1;0;0", "82 1;270.000000 220.000000;0.000000;73 16;-1;0;0", "82 1;270.000000 160.000000;0.000000;72 16;-1;0;0", "82 1;270.000000 20.000000;0.000000;-1 0;-1;0;0", "82 1;270.000000 360.000000;0.000000;-1 0;-1;0;0", "1 2;260.000000 240.000000;260.000000 320.000000;1.000000;64 15;21;0;0", "1 2;260.000000 120.000000;260.000000 40.000000;1.000000;65 15;20;0;0", "84 1;125.000000 365.000000;0.000000;-1 0;-1;0;0", "84 1;405.000000 365.000000;0.000000;-1 0;-1;0;0", "84 1;85.000000 5.000000;0.000000;-1 0;-1;0;0", "84 1;165.000000 5.000000;0.000000;-1 0;-1;0;0", "84 1;365.000000 5.000000;0.000000;-1 0;-1;0;0", "84 1;445.000000 5.000000;0.000000;-1 0;-1;0;0", "107 4;-6.000000 35.000000;-1.000000 0.000000;34.000000 -5.000000;-1.000000 0.000000;0.250000;-1 0;2;0;0", "107 4;514.000000 35.000000;509.000000 0.000000;474.000000 -5.000000;509.000000 0.000000;0.250000;-1 0;2;0;0", "107 4;-6.000000 315.000000;-1.000000 350.000000;34.000000 355.000000;-1.000000 350.000000;0.250000;-1 0;2;0;0", "107 4;514.000000 315.000000;509.000000 350.000000;474.000000 355.000000;509.000000 350.000000;0.250000;-1 0;2;0;0", "83 1;205.000000 85.000000;0.000000;-1 0;-1;0;0", "83 1;325.000000 85.000000;0.000000;-1 0;-1;0;0", "83 1;205.000000 285.000000;0.000000;-1 0;-1;0;0", "83 1;325.000000 285.000000;0.000000;-1 0;-1;0;0", "11 1;80.000000 320.000000;0.000000;-1 0;-1;0;0", "10 1;400.000000 180.000000;0.000000;-1 0;-1;0;0", "10 1;80.000000 120.000000;0.000000;-1 0;-1;0;0", "10 1;40.000000 240.000000;0.000000;-1 0;-1;0;0", "11 1;480.000000 240.000000;0.000000;-1 0;-1;0;0", "0 1;360.000000 240.000000;0.000000;-1 0;-1;0;0", "0 1;320.000000 240.000000;0.000000;-1 0;-1;0;0", "0 1;320.000000 120.000000;0.000000;103 1;-1;0;0", "0 1;360.000000 120.000000;0.000000;103 1;-1;0;0", "0 1;160.000000 120.000000;0.000000;-1 0;-1;0;0", "0 1;200.000000 120.000000;0.000000;105 1;-1;0;0", "0 1;200.000000 240.000000;0.000000;104 1;-1;0;0", "0 1;160.000000 240.000000;0.000000;104 1;-1;0;0", "11 1;335.000000 120.000000;0.000000;-1 0;-1;0;0", "11 1;185.000000 240.000000;0.000000;-1 0;-1;0;0", "10 1;200.000000 120.000000;0.000000;-1 0;-1;0;0"];
var level1_bricks = ["1 1;0.000000 230.000000;0.000000;-1 0;-1;0;0", "1 1;0.000000 170.000000;0.000000;85 1;-1;0;0", "1 1;0.000000 110.000000;0.000000;101 1;-1;0;0", "1 1;80.000000 290.000000;0.000000;90 1;-1;0;0", "1 1;80.000000 230.000000;0.000000;98 1;-1;0;0", "1 1;80.000000 110.000000;0.000000;-1 0;-1;0;0", "1 1;80.000000 50.000000;0.000000;89 1;-1;0;0", "1 1;520.000000 110.000000;0.000000;-1 0;-1;0;0", "1 1;520.000000 170.000000;0.000000;86 1;-1;0;0", "1 1;520.000000 230.000000;0.000000;-1 0;-1;0;0", "4 1;520.000000 270.000000;0.000000;-1 0;-1;0;0", "4 1;520.000000 210.000000;0.000000;-1 0;-1;0;0", "4 1;520.000000 150.000000;0.000000;-1 0;-1;0;0", "4 1;520.000000 90.000000;0.000000;-1 0;-1;0;0", "4 1;80.000000 90.000000;0.000000;-1 0;-1;0;0", "4 1;80.000000 150.000000;0.000000;-1 0;-1;0;0", "4 1;80.000000 210.000000;0.000000;-1 0;-1;0;0", "4 1;80.000000 270.000000;0.000000;-1 0;-1;0;0", "4 1;0.000000 270.000000;0.000000;-1 0;-1;0;0", "4 1;0.000000 210.000000;0.000000;-1 0;-1;0;0", "4 1;0.000000 150.000000;0.000000;-1 0;-1;0;0", "4 1;0.000000 90.000000;0.000000;-1 0;-1;0;0", "1 1;440.000000 50.000000;0.000000;88 1;-1;0;0", "1 1;440.000000 110.000000;0.000000;-1 0;-1;0;0", "1 1;440.000000 230.000000;0.000000;-1 0;-1;0;0", "1 1;440.000000 290.000000;0.000000;87 1;-1;0;0", "4 1;440.000000 270.000000;0.000000;-1 0;-1;0;0", "4 1;440.000000 210.000000;0.000000;104 1;-1;0;0", "4 1;440.000000 150.000000;0.000000;-1 0;-1;0;0", "4 1;440.000000 90.000000;0.000000;-1 0;-1;0;0", "2 1;520.000000 50.000000;0.000000;99 1;0;0;0", "2 1;520.000000 290.000000;0.000000;-1 0;12;0;0", "2 1;440.000000 170.000000;0.000000;-1 0;1;0;0", "2 1;0.000000 50.000000;0.000000;-1 0;2;0;0", "2 1;0.000000 290.000000;0.000000;-1 0;0;0;0", "2 1;80.000000 170.000000;0.000000;-1 0;1;0;0", "4 1;40.000000 300.000000;0.000000;-1 0;-1;0;0", "4 1;40.000000 240.000000;0.000000;-1 0;-1;0;0", "4 1;40.000000 180.000000;0.000000;-1 0;-1;0;0", "4 1;40.000000 120.000000;0.000000;-1 0;-1;0;0", "4 1;40.000000 60.000000;0.000000;-1 0;-1;0;0", "4 1;480.000000 60.000000;0.000000;-1 0;-1;0;0", "4 1;480.000000 120.000000;0.000000;-1 0;-1;0;0", "4 1;480.000000 180.000000;0.000000;-1 0;-1;0;0", "4 1;480.000000 240.000000;0.000000;-1 0;-1;0;0", "4 1;480.000000 300.000000;0.000000;-1 0;-1;0;0", "83 1;45.000000 205.000000;0.000000;-1 0;-1;0;0", "83 1;45.000000 85.000000;0.000000;-1 0;-1;0;0", "83 1;485.000000 205.000000;0.000000;-1 0;-1;0;0", "83 1;485.000000 85.000000;0.000000;-1 0;-1;0;0", "24 1;0.000000 10.000000;0.000000;-1 0;-1;0;0", "24 1;80.000000 10.000000;0.000000;-1 0;-1;0;0", "24 1;440.000000 10.000000;0.000000;-1 0;-1;0;0", "24 1;520.000000 10.000000;0.000000;-1 0;-1;0;0", "25 1;520.000000 330.000000;0.000000;-1 0;-1;0;0", "25 1;440.000000 330.000000;0.000000;-1 0;-1;0;0", "25 1;80.000000 330.000000;0.000000;-1 0;-1;0;0", "25 1;0.000000 330.000000;0.000000;-1 0;-1;0;0", "26 1;340.000000 270.000000;0.000000;-1 0;-1;0;0", "26 1;180.000000 270.000000;0.000000;102 1;-1;0;0", "26 1;340.000000 70.000000;0.000000;103 1;-1;0;0", "26 1;180.000000 70.000000;0.000000;-1 0;-1;0;0", "24 1;340.000000 230.000000;0.000000;-1 0;-1;0;0", "24 1;180.000000 230.000000;0.000000;-1 0;-1;0;0", "25 1;180.000000 110.000000;0.000000;-1 0;-1;0;0", "25 1;340.000000 110.000000;0.000000;-1 0;-1;0;0", "22 1;300.000000 70.000000;0.000000;-1 0;-1;0;0", "22 1;140.000000 70.000000;0.000000;-1 0;-1;0;0", "22 1;140.000000 270.000000;0.000000;-1 0;-1;0;0", "23 1;220.000000 270.000000;0.000000;-1 0;-1;0;0", "23 1;220.000000 70.000000;0.000000;-1 0;-1;0;0", "23 1;380.000000 70.000000;0.000000;-1 0;-1;0;0", "23 1;380.000000 270.000000;0.000000;-1 0;-1;0;0", "22 1;300.000000 270.000000;0.000000;-1 0;-1;0;0", "1 1;160.000000 170.000000;0.000000;-1 0;-1;0;0", "41 1;400.000000 210.000000;0.000000;-1 0;-1;0;0", "42 1;120.000000 130.000000;0.000000;-1 0;-1;0;0", "40 1;120.000000 210.000000;0.000000;-1 0;-1;0;0", "43 1;400.000000 130.000000;0.000000;-1 0;-1;0;0", "29 1;400.000000 170.000000;0.000000;-1 0;-1;0;0", "29 1;120.000000 170.000000;0.000000;97 1;-1;0;0", "29 1;320.000000 170.000000;0.000000;96 1;-1;0;0", "29 1;200.000000 170.000000;0.000000;-1 0;-1;0;0", "5 1;360.000000 170.000000;0.000000;100 1;-1;0;0", "5 1;360.000000 190.000000;0.000000;-1 0;-1;0;0", "84 1;5.000000 175.000000;0.000000;-1 0;-1;0;0", "84 1;525.000000 175.000000;0.000000;-1 0;-1;0;0", "84 1;445.000000 295.000000;0.000000;-1 0;-1;0;0", "84 1;445.000000 55.000000;0.000000;-1 0;-1;0;0", "84 1;85.000000 55.000000;0.000000;-1 0;-1;0;0", "84 1;85.000000 295.000000;0.000000;-1 0;-1;0;0", "83 1;45.000000 335.000000;0.000000;-1 0;-1;0;0", "83 1;485.000000 335.000000;0.000000;-1 0;-1;0;0", "105 2;119.000000 100.000000;139.000000 120.000000;0.250000;-1 0;0;0;0", "105 2;369.000000 120.000000;389.000000 100.000000;0.250000;-1 0;0;0;0", "106 8;254.000000 -10.000000;274.000000 0.000000;279.000000 15.000000;274.000000 30.000000;254.000000 40.000000;234.000000 30.000000;229.000000 15.000000;234.000000 0.000000;0.250000;-1 0;1;0;0", "10 1;320.000000 170.000000;0.000000;-1 0;-1;0;0", "10 1;120.000000 170.000000;0.000000;-1 0;-1;0;0", "10 1;80.000000 230.000000;0.000000;-1 0;-1;0;0", "11 1;520.000000 50.000000;0.000000;-1 0;-1;0;0", "11 1;360.000000 170.000000;0.000000;-1 0;-1;0;0", "11 1;0.000000 110.000000;0.000000;-1 0;-1;0;0", "11 1;180.000000 270.000000;0.000000;-1 0;-1;0;0", "10 1;340.000000 70.000000;0.000000;-1 0;-1;0;0", "11 1;440.000000 210.000000;0.000000;-1 0;-1;0;0", "1 1;240.000000 170.000000;0.000000;107 1;-1;0;0", "1 1;280.000000 170.000000;0.000000;107 1;-1;0;0", "48 1;245.000000 110.000000;0.000000;-1 0;0;0;0"];
var level2_bricks = ["37 1;0.000000 175.000000;0.000000;-1 0;-1;0;0", "41 1;40.000000 215.000000;0.000000;-1 0;-1;0;0", "37 1;80.000000 235.000000;0.000000;-1 0;-1;0;0", "30 1;120.000000 255.000000;0.000000;89 1;-1;0;0", "36 1;160.000000 235.000000;0.000000;-1 0;-1;0;0", "36 1;520.000000 175.000000;0.000000;-1 0;-1;0;0", "40 1;480.000000 215.000000;0.000000;-1 0;-1;0;0", "36 1;440.000000 235.000000;0.000000;-1 0;-1;0;0", "30 1;400.000000 255.000000;0.000000;-1 0;-1;0;0", "37 1;360.000000 235.000000;0.000000;-1 0;-1;0;0", "40 1;200.000000 215.000000;0.000000;-1 0;-1;0;0", "41 1;320.000000 215.000000;0.000000;-1 0;-1;0;0", "36 1;240.000000 175.000000;0.000000;-1 0;-1;0;0", "37 1;280.000000 175.000000;0.000000;-1 0;-1;0;0", "30 1;120.000000 235.000000;0.000000;-1 0;-1;0;0", "30 1;400.000000 235.000000;0.000000;-1 0;-1;0;0", "5 1;80.000000 155.000000;0.000000;-1 0;-1;0;0", "5 1;160.000000 155.000000;0.000000;-1 0;-1;0;0", "5 1;360.000000 155.000000;0.000000;92 1;-1;0;0", "5 1;440.000000 155.000000;0.000000;-1 0;-1;0;0", "2 1;520.000000 135.000000;0.000000;-1 0;-1;0;0", "2 1;0.000000 135.000000;0.000000;90 1;-1;0;0", "38 1;40.000000 135.000000;0.000000;-1 0;-1;0;0", "39 1;480.000000 135.000000;0.000000;-1 0;-1;0;0", "38 1;320.000000 135.000000;0.000000;-1 0;-1;0;0", "39 1;200.000000 135.000000;0.000000;-1 0;-1;0;0", "30 1;400.000000 155.000000;0.000000;-1 0;-1;0;0", "30 1;120.000000 155.000000;0.000000;93 1;-1;0;0", "97 1;360.000000 195.000000;0.000000;-1 0;-1;0;0", "97 1;160.000000 195.000000;0.000000;-1 0;-1;0;0", "97 1;40.000000 175.000000;0.000000;-1 0;-1;0;0", "97 1;480.000000 175.000000;0.000000;-1 0;-1;0;0", "98 1;440.000000 195.000000;0.000000;-1 0;-1;0;0", "98 1;80.000000 195.000000;0.000000;-1 0;-1;0;0", "97 1;105.000000 195.000000;0.000000;-1 0;-1;0;0", "97 1;135.000000 195.000000;0.000000;-1 0;-1;0;0", "97 1;75.000000 175.000000;0.000000;-1 0;-1;0;0", "97 1;200.000000 175.000000;0.000000;-1 0;-1;0;0", "97 1;180.000000 175.000000;0.000000;-1 0;-1;0;0", "97 1;110.000000 175.000000;0.000000;-1 0;-1;0;0", "97 1;145.000000 175.000000;0.000000;-1 0;-1;0;0", "97 1;395.000000 175.000000;0.000000;-1 0;-1;0;0", "98 1;430.000000 175.000000;0.000000;-1 0;-1;0;0", "98 1;360.000000 175.000000;0.000000;-1 0;-1;0;0", "98 1;325.000000 175.000000;0.000000;-1 0;-1;0;0", "97 1;400.000000 195.000000;0.000000;-1 0;-1;0;0", "97 1;455.000000 175.000000;0.000000;-1 0;-1;0;0", "42 1;320.000000 175.000000;0.000000;-1 0;-1;0;0", "42 1;40.000000 175.000000;0.000000;-1 0;-1;0;0", "43 1;200.000000 175.000000;0.000000;-1 0;-1;0;0", "43 1;480.000000 175.000000;0.000000;-1 0;-1;0;0", "3 1;400.000000 295.000000;0.000000;-1 0;-1;0;0", "3 1;120.000000 295.000000;0.000000;110 1;-1;0;0", "3 1;340.000000 55.000000;0.000000;91 1;-1;0;0", "3 1;460.000000 55.000000;0.000000;-1 0;-1;0;0", "3 1;180.000000 55.000000;0.000000;-1 0;-1;0;0", "3 1;60.000000 55.000000;0.000000;-1 0;-1;0;0", "56 1;275.000000 235.000000;0.000000;58 16;-1;0;0", "56 1;275.000000 275.000000;0.000000;63 16;-1;0;0", "55 1;280.000000 270.000000;0.000000;61 16;-1;0;0", "55 1;240.000000 270.000000;0.000000;59 16;-1;0;0", "82 1;320.000000 265.000000;0.000000;-1 0;-1;0;0", "82 1;220.000000 265.000000;0.000000;60 16;-1;0;0", "82 1;270.000000 315.000000;0.000000;62 16;-1;0;0", "82 1;270.000000 215.000000;0.000000;57 16;-1;0;0", "17 8;260.000000 235.000000;260.000000 260.000000;280.000000 260.000000;260.000000 260.000000;260.000000 285.000000;260.000000 260.000000;240.000000 260.000000;260.000000 260.000000;1.000000;64 15;-1;0;0", "56 1;15.000000 295.000000;0.000000;71 16;-1;0;0", "56 1;535.000000 295.000000;0.000000;69 16;-1;0;0", "56 1;535.000000 255.000000;0.000000;67 16;-1;0;0", "56 1;535.000000 335.000000;0.000000;72 16;-1;0;0", "56 1;15.000000 255.000000;0.000000;66 16;-1;0;0", "56 1;15.000000 335.000000;0.000000;75 16;-1;0;0", "82 1;530.000000 375.000000;0.000000;-1 0;-1;0;0", "82 1;530.000000 235.000000;0.000000;68 16;-1;0;0", "82 1;10.000000 235.000000;0.000000;70 16;-1;0;0", "82 1;10.000000 375.000000;0.000000;-1 0;-1;0;0", "17 2;520.000000 255.000000;520.000000 345.000000;1.000000;73 15;-1;0;0", "17 2;0.000000 345.000000;0.000000 255.000000;1.000000;74 15;-1;0;0", "18 1;120.000000 25.000000;0.000000;-1 0;7;0;0", "18 1;400.000000 25.000000;0.000000;-1 0;12;0;0", "25 1;480.000000 335.000000;0.000000;94 1;-1;0;0", "25 1;40.000000 335.000000;0.000000;-1 0;-1;0;0", "24 1;460.000000 15.000000;0.000000;-1 0;-1;0;0", "24 1;60.000000 15.000000;0.000000;-1 0;-1;0;0", "83 1;5.000000 60.000000;0.000000;-1 0;-1;0;0", "83 1;525.000000 60.000000;0.000000;-1 0;-1;0;0", "105 4;94.000000 325.000000;114.000000 330.000000;134.000000 325.000000;114.000000 330.000000;0.250000;-1 0;0;0;0", "105 4;414.000000 325.000000;394.000000 330.000000;374.000000 325.000000;394.000000 330.000000;0.250000;-1 0;0;0;0", "105 4;234.000000 10.000000;254.000000 5.000000;274.000000 10.000000;254.000000 5.000000;0.250000;-1 0;0;0;0", "11 1;120.000000 255.000000;0.000000;-1 0;-1;0;0", "11 1;0.000000 135.000000;0.000000;-1 0;-1;0;0", "11 1;340.000000 55.000000;0.000000;-1 0;-1;0;0", "10 1;360.000000 155.000000;0.000000;-1 0;-1;0;0", "10 1;120.000000 155.000000;0.000000;-1 0;-1;0;0", "10 1;480.000000 335.000000;0.000000;-1 0;-1;0;0", "1 1;240.000000 135.000000;0.000000;97 1;-1;0;0", "1 1;280.000000 135.000000;0.000000;97 1;-1;0;0", "75 1;255.000000 55.000000;0.000000;-1 0;-1;0;0", "1 1;100.000000 55.000000;0.000000;112 1;-1;0;0", "1 1;140.000000 55.000000;0.000000;112 1;-1;0;0", "1 1;380.000000 55.000000;0.000000;113 1;-1;0;0", "1 1;420.000000 55.000000;0.000000;113 1;-1;0;0", "1 1;160.000000 295.000000;0.000000;-1 0;-1;0;0", "1 1;80.000000 295.000000;0.000000;110 1;-1;0;0", "1 1;360.000000 295.000000;0.000000;111 1;-1;0;0", "1 1;440.000000 295.000000;0.000000;-1 0;-1;0;0", "2 1;480.000000 295.000000;0.000000;-1 0;-1;0;0", "2 1;320.000000 295.000000;0.000000;-1 0;-1;0;0", "2 1;200.000000 295.000000;0.000000;-1 0;-1;0;0", "2 1;40.000000 295.000000;0.000000;-1 0;-1;0;0", "11 1;100.000000 295.000000;0.000000;-1 0;-1;0;0", "11 1;360.000000 295.000000;0.000000;-1 0;-1;0;0", "84 1;125.000000 60.000000;0.000000;-1 0;-1;0;0", "84 1;405.000000 60.000000;0.000000;-1 0;-1;0;0"];
var level3_bricks = ["69 1;0.000000 200.000000;0.000000;16 16;-1;0;0", "69 1;520.000000 200.000000;0.000000;20 16;-1;0;0", "29 1;0.000000 240.000000;0.000000;69 1;-1;0;0", "29 1;520.000000 240.000000;0.000000;-1 0;-1;0;0", "29 1;520.000000 160.000000;0.000000;-1 0;-1;0;0", "29 1;0.000000 160.000000;0.000000;-1 0;-1;0;0", "36 1;40.000000 240.000000;0.000000;-1 0;-1;0;0", "37 1;480.000000 240.000000;0.000000;-1 0;-1;0;0", "40 1;80.000000 220.000000;0.000000;-1 0;-1;0;0", "41 1;440.000000 220.000000;0.000000;-1 0;-1;0;0", "43 1;440.000000 180.000000;0.000000;-1 0;-1;0;0", "42 1;80.000000 180.000000;0.000000;-1 0;-1;0;0", "38 1;40.000000 160.000000;0.000000;-1 0;-1;0;0", "39 1;480.000000 160.000000;0.000000;-1 0;-1;0;0", "29 1;480.000000 200.000000;0.000000;61 1;-1;0;0", "29 1;40.000000 200.000000;0.000000;60 1;-1;0;0", "59 1;0.000000 100.000000;0.000000;17 16;-1;0;0", "59 1;40.000000 100.000000;0.000000;18 16;-1;0;0", "59 1;80.000000 100.000000;0.000000;19 16;-1;0;0", "63 1;120.000000 80.000000;0.000000;26 16;-1;0;0", "59 1;520.000000 100.000000;0.000000;21 16;-1;0;0", "59 1;480.000000 100.000000;0.000000;22 16;-1;0;0", "59 1;440.000000 100.000000;0.000000;23 16;-1;0;0", "64 1;400.000000 80.000000;0.000000;24 16;-1;0;0", "60 1;400.000000 40.000000;0.000000;29 16;-1;0;0", "60 1;400.000000 0.000000;0.000000;-1 0;-1;0;0", "60 1;140.000000 40.000000;0.000000;28 16;-1;0;0", "60 1;140.000000 0.000000;0.000000;-1 0;-1;0;0", "70 1;135.000000 40.000000;0.000000;27 16;-1;0;0", "70 1;395.000000 40.000000;0.000000;25 16;-1;0;0", "3 1;200.000000 40.000000;0.000000;-1 0;-1;0;0", "3 1;320.000000 40.000000;0.000000;83 1;-1;0;0", "2 1;140.000000 160.000000;0.000000;-1 0;-1;0;0", "2 1;380.000000 160.000000;0.000000;71 1;-1;0;0", "0 1;140.000000 200.000000;0.000000;-1 0;-1;0;0", "0 1;380.000000 200.000000;0.000000;-1 0;-1;0;0", "2 1;140.000000 240.000000;0.000000;-1 0;-1;0;0", "2 1;380.000000 240.000000;0.000000;-1 0;-1;0;0", "38 1;320.000000 140.000000;0.000000;-1 0;-1;0;0", "39 1;200.000000 140.000000;0.000000;-1 0;-1;0;0", "32 1;320.000000 180.000000;0.000000;70 1;-1;0;0", "33 1;200.000000 180.000000;0.000000;-1 0;-1;0;0", "35 1;200.000000 220.000000;0.000000;-1 0;-1;0;0", "34 1;320.000000 220.000000;0.000000;-1 0;-1;0;0", "36 1;320.000000 260.000000;0.000000;-1 0;-1;0;0", "37 1;200.000000 260.000000;0.000000;-1 0;-1;0;0", "-2 1;260.000000 195.000000;0.000000;-1 0;-1;0;0", "26 1;50.000000 30.000000;0.000000;72 1;-1;0;1", "26 1;470.000000 30.000000;0.000000;-1 0;-1;0;1", "22 1;430.000000 30.000000;0.000000;-1 0;-1;0;1", "22 1;10.000000 30.000000;0.000000;-1 0;-1;0;1", "23 1;90.000000 30.000000;0.000000;-1 0;-1;0;1", "23 1;510.000000 30.000000;0.000000;-1 0;-1;0;1", "23 1;90.000000 320.000000;0.000000;-1 0;-1;0;0", "26 1;50.000000 320.000000;0.000000;73 1;-1;0;0", "22 1;10.000000 320.000000;0.000000;73 1;-1;0;0", "23 1;510.000000 320.000000;0.000000;-1 0;-1;0;0", "26 1;470.000000 320.000000;0.000000;68 1;-1;0;0", "22 1;430.000000 320.000000;0.000000;-1 0;-1;0;0", "81 1;255.000000 100.000000;0.000000;-1 0;7;0;0", "84 1;45.000000 205.000000;0.000000;-1 0;-1;0;0", "84 1;485.000000 205.000000;0.000000;-1 0;-1;0;0", "83 1;385.000000 290.000000;0.000000;-1 0;-1;0;0", "83 1;145.000000 290.000000;0.000000;-1 0;-1;0;0", "83 1;5.000000 125.000000;0.000000;-1 0;-1;0;0", "83 1;525.000000 125.000000;0.000000;-1 0;-1;0;0", "106 4;44.000000 360.000000;74.000000 350.000000;44.000000 360.000000;14.000000 350.000000;0.250000;-1 0;1;0;0", "106 4;464.000000 360.000000;434.000000 350.000000;464.000000 360.000000;494.000000 350.000000;0.250000;-1 0;1;0;0", "11 1;470.000000 320.000000;0.000000;-1 0;-1;0;0", "11 1;0.000000 240.000000;0.000000;-1 0;-1;0;0", "10 1;320.000000 180.000000;0.000000;-1 0;-1;0;0", "10 1;380.000000 160.000000;0.000000;-1 0;-1;0;0", "10 1;50.000000 30.000000;0.000000;-1 0;-1;0;0", "10 1;30.000000 320.000000;0.000000;-1 0;-1;0;0", "1 1;240.000000 260.000000;0.000000;-1 0;-1;0;0", "1 1;280.000000 260.000000;0.000000;81 1;-1;0;0", "1 1;280.000000 140.000000;0.000000;80 1;-1;0;0", "1 1;240.000000 140.000000;0.000000;80 1;-1;0;0", "1 1;240.000000 40.000000;0.000000;82 1;-1;0;0", "1 1;280.000000 40.000000;0.000000;83 1;-1;0;0", "11 1;255.000000 140.000000;0.000000;-1 0;-1;0;0", "10 1;280.000000 260.000000;0.000000;-1 0;-1;0;0", "10 1;240.000000 40.000000;0.000000;84 1;-1;0;0", "10 1;300.000000 40.000000;0.000000;84 1;-1;0;0", "84 1;265.000000 45.000000;0.000000;-1 0;-1;0;0"];
var level4_bricks = ["4 1;40.000000 80.000000;0.000000;-1 0;-1;0;0", "4 1;120.000000 80.000000;0.000000;74 1;-1;0;0", "4 1;120.000000 140.000000;0.000000;-1 0;-1;0;0", "4 1;40.000000 140.000000;0.000000;-1 0;-1;0;0", "4 1;400.000000 80.000000;0.000000;-1 0;-1;0;0", "4 1;480.000000 80.000000;0.000000;-1 0;-1;0;0", "4 1;480.000000 140.000000;0.000000;-1 0;-1;0;0", "4 1;400.000000 140.000000;0.000000;-1 0;-1;0;0", "5 1;440.000000 140.000000;0.000000;-1 0;-1;0;0", "5 1;440.000000 80.000000;0.000000;-1 0;-1;0;0", "5 1;80.000000 80.000000;0.000000;-1 0;-1;0;0", "5 1;80.000000 140.000000;0.000000;-1 0;-1;0;0", "21 1;40.000000 100.000000;0.000000;69 1;-1;0;0", "21 1;120.000000 100.000000;0.000000;-1 0;-1;0;0", "21 1;400.000000 100.000000;0.000000;73 1;-1;0;0", "21 1;480.000000 100.000000;0.000000;-1 0;-1;0;0", "26 1;440.000000 100.000000;0.000000;-1 0;0;0;0", "26 1;80.000000 100.000000;0.000000;-1 0;0;0;0", "4 1;200.000000 80.000000;0.000000;-1 0;-1;0;0", "4 1;320.000000 80.000000;0.000000;-1 0;-1;0;0", "5 1;240.000000 80.000000;0.000000;70 1;-1;0;0", "5 1;280.000000 80.000000;0.000000;-1 0;-1;0;0", "21 1;200.000000 100.000000;0.000000;-1 0;-1;0;0", "21 1;320.000000 100.000000;0.000000;-1 0;-1;0;0", "108 1;240.000000 100.000000;0.000000;-1 0;-1;0;0", "108 1;300.000000 100.000000;0.000000;-1 0;-1;0;0", "108 1;240.000000 180.000000;0.000000;-1 0;-1;0;0", "108 1;300.000000 180.000000;0.000000;-1 0;-1;0;0", "109 1;240.000000 140.000000;0.000000;-1 0;-1;0;0", "109 1;300.000000 140.000000;0.000000;-1 0;-1;0;0", "109 1;240.000000 220.000000;0.000000;-1 0;-1;0;0", "109 1;300.000000 220.000000;0.000000;-1 0;-1;0;0", "108 1;240.000000 260.000000;0.000000;-1 0;-1;0;0", "108 1;300.000000 260.000000;0.000000;-1 0;-1;0;0", "5 1;240.000000 300.000000;0.000000;-1 0;-1;0;0", "5 1;280.000000 300.000000;0.000000;-1 0;-1;0;0", "2 1;260.000000 180.000000;0.000000;-1 0;12;0;0", "21 1;260.000000 140.000000;0.000000;-1 0;-1;0;0", "21 1;260.000000 220.000000;0.000000;-1 0;-1;0;0", "26 1;260.000000 260.000000;0.000000;-1 0;1;0;0", "26 1;260.000000 100.000000;0.000000;-1 0;2;0;0", "4 1;80.000000 240.000000;0.000000;-1 0;-1;0;0", "4 1;120.000000 240.000000;0.000000;-1 0;-1;0;0", "4 1;120.000000 300.000000;0.000000;-1 0;-1;0;0", "4 1;80.000000 300.000000;0.000000;-1 0;-1;0;0", "4 1;400.000000 240.000000;0.000000;-1 0;-1;0;0", "4 1;440.000000 240.000000;0.000000;72 1;-1;0;0", "4 1;440.000000 300.000000;0.000000;-1 0;-1;0;0", "4 1;400.000000 300.000000;0.000000;-1 0;-1;0;0", "4 1;200.000000 300.000000;0.000000;75 1;-1;0;0", "4 1;320.000000 300.000000;0.000000;-1 0;-1;0;0", "4 1;0.000000 300.000000;0.000000;-1 0;-1;0;0", "4 1;520.000000 300.000000;0.000000;-1 0;-1;0;0", "21 1;200.000000 260.000000;0.000000;-1 0;-1;0;0", "21 1;320.000000 260.000000;0.000000;-1 0;-1;0;0", "26 1;520.000000 260.000000;0.000000;-1 0;1;0;0", "26 1;0.000000 260.000000;0.000000;71 1;0;0;0", "81 1;155.000000 40.000000;0.000000;-1 0;0;0;0", "81 1;355.000000 40.000000;0.000000;-1 0;11;0;0", "81 1;35.000000 200.000000;0.000000;-1 0;1;0;0", "81 1;475.000000 200.000000;0.000000;-1 0;20;0;0", "97 1;80.000000 260.000000;0.000000;-1 0;-1;0;0", "97 1;440.000000 260.000000;0.000000;-1 0;-1;0;0", "98 1;120.000000 260.000000;0.000000;-1 0;-1;0;0", "98 1;400.000000 260.000000;0.000000;-1 0;-1;0;0", "18 1;0.000000 50.000000;0.000000;-1 0;12;0;0", "18 1;520.000000 50.000000;0.000000;-1 0;0;0;0", "85 2;105.000000 175.000000;105.000000 195.000000;0.250000;-1 0;-1;0;0", "85 2;425.000000 195.000000;425.000000 175.000000;0.250000;-1 0;-1;0;0", "11 1;40.000000 100.000000;0.000000;-1 0;-1;0;0", "11 1;240.000000 80.000000;0.000000;-1 0;-1;0;0", "11 1;0.000000 260.000000;0.000000;-1 0;-1;0;0", "10 1;440.000000 240.000000;0.000000;-1 0;-1;0;0", "10 1;400.000000 100.000000;0.000000;-1 0;-1;0;0", "10 1;120.000000 80.000000;0.000000;-1 0;-1;0;0", "10 1;200.000000 300.000000;0.000000;-1 0;-1;0;0", "106 2;519.000000 0.000000;509.000000 0.000000;0.250000;-1 0;1;0;0", "106 2;-11.000000 0.000000;-1.000000 0.000000;0.250000;-1 0;1;0;0", "1 1;480.000000 240.000000;0.000000;-1 0;-1;0;0", "1 1;480.000000 280.000000;0.000000;-1 0;-1;0;0", "1 1;360.000000 240.000000;0.000000;97 1;-1;0;0", "1 1;360.000000 280.000000;0.000000;97 1;-1;0;0", "1 1;40.000000 240.000000;0.000000;-1 0;-1;0;0", "1 1;40.000000 280.000000;0.000000;-1 0;-1;0;0", "1 1;160.000000 240.000000;0.000000;96 1;-1;0;0", "1 1;160.000000 280.000000;0.000000;96 1;-1;0;0", "1 1;360.000000 80.000000;0.000000;-1 0;-1;0;0", "1 1;360.000000 120.000000;0.000000;-1 0;-1;0;0", "1 1;0.000000 80.000000;0.000000;95 1;-1;0;0", "1 1;0.000000 120.000000;0.000000;95 1;-1;0;0", "1 1;160.000000 80.000000;0.000000;-1 0;-1;0;0", "1 1;160.000000 120.000000;0.000000;-1 0;-1;0;0", "1 1;520.000000 80.000000;0.000000;94 1;-1;0;0", "1 1;520.000000 120.000000;0.000000;94 1;-1;0;0", "84 1;525.000000 105.000000;0.000000;-1 0;-1;0;0", "84 1;5.000000 105.000000;0.000000;-1 0;-1;0;0", "84 1;165.000000 265.000000;0.000000;-1 0;-1;0;0", "84 1;365.000000 265.000000;0.000000;-1 0;-1;0;0"];
var level5_bricks = ["40 1;0.000000 280.000000;0.000000;-1 0;-1;0;0", "36 1;40.000000 240.000000;0.000000;-1 0;-1;0;0", "30 1;80.000000 240.000000;0.000000;-1 0;-1;0;0", "30 1;120.000000 240.000000;0.000000;-1 0;-1;0;0", "37 1;160.000000 240.000000;0.000000;-1 0;0;0;0", "41 1;200.000000 280.000000;0.000000;-1 0;-1;0;0", "33 1;240.000000 320.000000;0.000000;-1 0;-1;0;0", "41 1;520.000000 280.000000;0.000000;-1 0;-1;0;0", "37 1;480.000000 240.000000;0.000000;-1 0;0;0;0", "30 1;440.000000 240.000000;0.000000;-1 0;-1;0;0", "30 1;400.000000 240.000000;0.000000;-1 0;-1;0;0", "36 1;360.000000 240.000000;0.000000;81 1;-1;0;0", "40 1;320.000000 280.000000;0.000000;-1 0;-1;0;0", "32 1;280.000000 320.000000;0.000000;-1 0;-1;0;0", "29 1;0.000000 240.000000;0.000000;-1 0;1;0;0", "29 1;520.000000 240.000000;0.000000;-1 0;20;0;0", "29 1;200.000000 240.000000;0.000000;77 1;0;0;0", "29 1;320.000000 240.000000;0.000000;78 1;2;0;0", "30 1;240.000000 240.000000;0.000000;-1 0;-1;0;0", "30 1;280.000000 240.000000;0.000000;-1 0;-1;0;0", "30 1;240.000000 300.000000;0.000000;-1 0;-1;0;0", "30 1;280.000000 300.000000;0.000000;-1 0;-1;0;0", "31 1;240.000000 260.000000;0.000000;-1 0;0;0;0", "31 1;300.000000 260.000000;0.000000;-1 0;12;0;0", "38 1;40.000000 200.000000;0.000000;-1 0;-1;0;0", "42 1;0.000000 160.000000;0.000000;-1 0;-1;0;0", "43 1;520.000000 160.000000;0.000000;-1 0;-1;0;0", "39 1;480.000000 200.000000;0.000000;-1 0;-1;0;0", "30 1;120.000000 220.000000;0.000000;85 1;-1;0;0", "30 1;400.000000 220.000000;0.000000;86 1;-1;0;0", "5 1;440.000000 220.000000;0.000000;86 1;-1;0;0", "5 1;360.000000 220.000000;0.000000;-1 0;-1;0;0", "5 1;160.000000 220.000000;0.000000;-1 0;-1;0;0", "5 1;80.000000 220.000000;0.000000;-1 0;-1;0;0", "29 1;520.000000 200.000000;0.000000;-1 0;0;0;0", "29 1;0.000000 200.000000;0.000000;82 1;1;0;0", "39 1;200.000000 200.000000;0.000000;-1 0;-1;0;0", "38 1;320.000000 200.000000;0.000000;-1 0;-1;0;0", "60 1;200.000000 0.000000;0.000000;-1 0;-1;0;0", "60 1;340.000000 0.000000;0.000000;38 16;-1;0;0", "60 1;200.000000 40.000000;0.000000;39 16;-1;0;0", "60 1;340.000000 40.000000;0.000000;40 16;-1;0;0", "63 1;320.000000 80.000000;0.000000;43 16;-1;0;0", "64 1;200.000000 80.000000;0.000000;41 16;-1;0;0", "59 1;240.000000 100.000000;0.000000;42 16;-1;0;0", "59 1;280.000000 100.000000;0.000000;44 16;-1;0;0", "70 1;265.000000 95.000000;0.000000;45 16;-1;0;0", "69 1;260.000000 260.000000;0.000000;46 16;-1;0;0", "40 1;0.000000 120.000000;0.000000;-1 0;-1;0;0", "36 1;40.000000 80.000000;0.000000;-1 0;21;0;0", "41 1;520.000000 120.000000;0.000000;-1 0;-1;0;0", "37 1;480.000000 80.000000;0.000000;87 1;1;0;0", "30 1;80.000000 80.000000;0.000000;-1 0;-1;0;0", "30 1;440.000000 80.000000;0.000000;87 1;-1;0;0", "81 1;435.000000 40.000000;0.000000;-1 0;7;0;0", "81 1;75.000000 40.000000;0.000000;-1 0;7;0;0", "39 1;0.000000 80.000000;0.000000;-1 0;-1;0;0", "38 1;520.000000 80.000000;0.000000;-1 0;-1;0;0", "43 1;400.000000 80.000000;0.000000;-1 0;-1;0;0", "42 1;120.000000 80.000000;0.000000;-1 0;-1;0;0", "40 1;120.000000 120.000000;0.000000;-1 0;-1;0;0", "41 1;400.000000 120.000000;0.000000;-1 0;-1;0;0", "36 1;440.000000 120.000000;0.000000;-1 0;2;0;0", "37 1;80.000000 120.000000;0.000000;-1 0;2;0;0", "30 1;440.000000 100.000000;0.000000;-1 0;-1;0;0", "30 1;80.000000 100.000000;0.000000;83 1;-1;0;0", "26 1;100.000000 320.000000;0.000000;-1 0;-1;0;0", "26 1;420.000000 320.000000;0.000000;84 1;-1;0;0", "22 2;380.000000 320.000000;360.000000 320.000000;0.250000;-1 0;-1;0;0", "23 2;460.000000 320.000000;480.000000 320.000000;0.250000;-1 0;-1;0;0", "23 2;140.000000 320.000000;160.000000 320.000000;0.250000;-1 0;-1;0;0", "22 2;60.000000 320.000000;40.000000 320.000000;0.250000;-1 0;-1;0;0", "18 1;260.000000 35.000000;0.000000;-1 0;12;0;1", "83 4;25.000000 145.000000;35.000000 155.000000;25.000000 145.000000;35.000000 135.000000;0.250000;-1 0;-1;0;0", "83 4;505.000000 145.000000;495.000000 135.000000;505.000000 145.000000;495.000000 155.000000;0.250000;-1 0;-1;0;0", "105 2;214.000000 15.000000;214.000000 25.000000;0.250000;-1 0;0;0;1", "105 2;294.000000 30.000000;294.000000 20.000000;0.250000;-1 0;0;0;1", "84 1;205.000000 245.000000;0.000000;-1 0;-1;0;0", "84 1;325.000000 245.000000;0.000000;-1 0;-1;0;0", "85 1;25.000000 25.000000;0.000000;-1 0;-1;0;0", "85 1;505.000000 25.000000;0.000000;-1 0;-1;0;0", "11 1;360.000000 240.000000;0.000000;-1 0;-1;0;0", "11 1;0.000000 200.000000;0.000000;-1 0;-1;0;0", "11 1;80.000000 100.000000;0.000000;-1 0;-1;0;0", "11 1;420.000000 320.000000;0.000000;-1 0;-1;0;0", "10 1;120.000000 220.000000;0.000000;-1 0;-1;0;0", "10 1;420.000000 220.000000;0.000000;-1 0;-1;0;0", "10 1;455.000000 80.000000;0.000000;-1 0;-1;0;0", "1 1;240.000000 200.000000;0.000000;90 1;-1;0;0", "1 1;280.000000 200.000000;0.000000;90 1;-1;0;0", "75 1;255.000000 120.000000;0.000000;-1 0;-1;0;0"];
var level6_bricks = ["59 1;0.000000 130.000000;0.000000;-1 0;-1;0;0", "59 1;0.000000 190.000000;0.000000;0 16;-1;0;0", "59 1;40.000000 130.000000;0.000000;1 16;-1;0;0", "59 1;40.000000 190.000000;0.000000;2 16;-1;0;0", "62 1;80.000000 130.000000;0.000000;3 16;-1;0;0", "59 1;520.000000 130.000000;0.000000;8 16;-1;0;0", "59 1;480.000000 130.000000;0.000000;7 16;-1;0;0", "59 1;480.000000 190.000000;0.000000;5 16;-1;0;0", "59 1;520.000000 190.000000;0.000000;-1 0;-1;0;0", "61 1;440.000000 130.000000;0.000000;10 16;-1;0;0", "64 1;440.000000 170.000000;0.000000;6 16;-1;0;0", "63 1;80.000000 170.000000;0.000000;4 16;-1;0;0", "2 1;30.000000 150.000000;0.000000;96 1;12;0;1", "2 1;490.000000 150.000000;0.000000;100 1;12;0;1", "108 1;470.000000 150.000000;0.000000;100 1;-1;0;1", "108 1;530.000000 150.000000;0.000000;-1 0;-1;0;1", "108 1;70.000000 150.000000;0.000000;-1 0;-1;0;1", "108 1;10.000000 150.000000;0.000000;-1 0;-1;0;1", "70 1;435.000000 155.000000;0.000000;9 16;-1;0;0", "70 1;95.000000 155.000000;0.000000;11 16;-1;0;0", "69 1;30.000000 40.000000;0.000000;19 16;-1;0;0", "69 1;485.000000 40.000000;0.000000;18 16;-1;0;0", "36 1;505.000000 80.000000;0.000000;95 1;21;0;0", "36 1;50.000000 80.000000;0.000000;-1 0;1;0;0", "37 1;10.000000 80.000000;0.000000;-1 0;0;0;0", "37 1;465.000000 80.000000;0.000000;95 1;1;0;0", "39 1;470.000000 220.000000;0.000000;-1 0;-1;0;0", "38 1;510.000000 220.000000;0.000000;-1 0;-1;0;0", "38 1;50.000000 220.000000;0.000000;-1 0;-1;0;0", "39 1;10.000000 220.000000;0.000000;-1 0;-1;0;0", "108 1;470.000000 260.000000;0.000000;-1 0;-1;0;0", "108 1;530.000000 260.000000;0.000000;-1 0;-1;0;0", "108 1;465.000000 40.000000;0.000000;-1 0;-1;0;0", "108 1;525.000000 40.000000;0.000000;-1 0;-1;0;0", "108 1;70.000000 40.000000;0.000000;-1 0;-1;0;0", "108 1;10.000000 40.000000;0.000000;-1 0;-1;0;0", "108 1;70.000000 260.000000;0.000000;-1 0;-1;0;0", "108 1;10.000000 260.000000;0.000000;-1 0;-1;0;0", "39 1;160.000000 130.000000;0.000000;-1 0;-1;0;0", "38 1;360.000000 130.000000;0.000000;-1 0;-1;0;0", "37 1;160.000000 170.000000;0.000000;-1 0;0;0;0", "36 1;360.000000 170.000000;0.000000;-1 0;2;0;0", "30 1;200.000000 130.000000;0.000000;-1 0;-1;0;0", "30 1;240.000000 130.000000;0.000000;-1 0;-1;0;0", "30 1;280.000000 130.000000;0.000000;-1 0;-1;0;0", "30 1;320.000000 130.000000;0.000000;-1 0;-1;0;0", "30 1;320.000000 190.000000;0.000000;-1 0;-1;0;0", "30 1;280.000000 190.000000;0.000000;-1 0;-1;0;0", "30 1;240.000000 190.000000;0.000000;-1 0;-1;0;0", "30 1;200.000000 190.000000;0.000000;-1 0;-1;0;0", "40 1;320.000000 210.000000;0.000000;-1 0;-1;0;0", "41 1;200.000000 210.000000;0.000000;-1 0;-1;0;0", "42 1;320.000000 90.000000;0.000000;-1 0;-1;0;0", "43 1;200.000000 90.000000;0.000000;-1 0;-1;0;0", "5 1;240.000000 110.000000;0.000000;-1 0;-1;0;0", "5 1;280.000000 110.000000;0.000000;98 1;-1;0;0", "5 1;280.000000 210.000000;0.000000;-1 0;-1;0;0", "97 1;200.000000 150.000000;0.000000;-1 0;-1;0;0", "97 1;320.000000 150.000000;0.000000;-1 0;-1;0;0", "97 1;260.000000 150.000000;0.000000;-1 0;-1;0;0", "98 1;230.000000 150.000000;0.000000;-1 0;-1;0;0", "98 1;285.000000 150.000000;0.000000;-1 0;-1;0;0", "96 1;255.000000 150.000000;0.000000;-1 0;7;0;0", "5 1;240.000000 210.000000;0.000000;93 1;-1;0;0", "5 1;120.000000 30.000000;0.000000;97 1;-1;0;0", "5 1;400.000000 30.000000;0.000000;-1 0;-1;0;0", "5 1;400.000000 290.000000;0.000000;99 1;-1;0;0", "5 1;120.000000 290.000000;0.000000;-1 0;-1;0;0", "39 1;160.000000 270.000000;0.000000;-1 0;-1;0;0", "37 1;160.000000 30.000000;0.000000;94 1;0;0;0", "36 1;360.000000 30.000000;0.000000;-1 0;0;0;0", "38 1;360.000000 270.000000;0.000000;-1 0;-1;0;0", "38 1;280.000000 70.000000;0.000000;-1 0;-1;0;0", "39 1;240.000000 70.000000;0.000000;-1 0;-1;0;0", "37 1;240.000000 230.000000;0.000000;-1 0;1;0;0", "36 1;280.000000 230.000000;0.000000;-1 0;20;0;0", "82 1;220.000000 290.000000;0.000000;80 16;-1;0;0", "82 1;320.000000 290.000000;0.000000;-1 0;-1;0;0", "82 1;320.000000 30.000000;0.000000;83 16;-1;0;0", "82 1;220.000000 30.000000;0.000000;-1 0;-1;0;0", "55 1;240.000000 295.000000;0.000000;81 16;-1;0;0", "55 1;280.000000 295.000000;0.000000;77 16;-1;0;0", "55 1;240.000000 35.000000;0.000000;79 16;-1;0;0", "55 1;280.000000 35.000000;0.000000;82 16;-1;0;0", "17 2;240.000000 285.000000;280.000000 285.000000;1.000000;76 15;0;0;0", "17 2;280.000000 25.000000;240.000000 25.000000;1.000000;78 15;12;0;0", "39 1;320.000000 270.000000;0.000000;-1 0;-1;0;0", "38 1;200.000000 270.000000;0.000000;-1 0;-1;0;0", "36 1;200.000000 30.000000;0.000000;94 1;0;0;0", "37 1;320.000000 30.000000;0.000000;-1 0;2;0;0", "83 2;250.000000 335.000000;280.000000 335.000000;0.250000;-1 0;-1;0;0", "106 2;394.000000 125.000000;394.000000 155.000000;0.250000;-1 0;1;0;0", "106 2;114.000000 155.000000;114.000000 125.000000;0.250000;-1 0;1;0;0", "11 1;240.000000 210.000000;0.000000;-1 0;-1;0;0", "11 1;180.000000 30.000000;0.000000;-1 0;-1;0;0", "11 1;485.000000 80.000000;0.000000;-1 0;-1;0;0", "11 1;30.000000 150.000000;0.000000;-1 0;-1;0;0", "10 1;120.000000 30.000000;0.000000;-1 0;-1;0;0", "10 1;280.000000 110.000000;0.000000;-1 0;-1;0;0", "10 1;400.000000 290.000000;0.000000;-1 0;-1;0;0", "10 1;470.000000 150.000000;0.000000;-1 0;-1;0;0", "1 1;465.000000 0.000000;0.000000;111 1;-1;0;0", "1 1;505.000000 0.000000;0.000000;111 1;-1;0;0", "1 1;50.000000 0.000000;0.000000;112 1;-1;0;0", "1 1;10.000000 0.000000;0.000000;112 1;-1;0;0", "1 1;10.000000 300.000000;0.000000;110 1;-1;0;0", "1 1;50.000000 300.000000;0.000000;110 1;-1;0;0", "1 1;470.000000 300.000000;0.000000;109 1;-1;0;0", "1 1;510.000000 300.000000;0.000000;109 1;-1;0;0", "10 1;490.000000 300.000000;0.000000;-1 0;-1;0;0", "11 1;30.000000 300.000000;0.000000;-1 0;-1;0;0", "84 1;490.000000 5.000000;0.000000;-1 0;-1;0;0", "84 1;35.000000 5.000000;0.000000;-1 0;-1;0;0"];
var level7_bricks = ["36 1;0.000000 285.000000;0.000000;83 1;-1;0;0", "38 1;0.000000 245.000000;0.000000;-1 0;-1;0;0", "39 1;520.000000 245.000000;0.000000;-1 0;-1;0;0", "37 1;520.000000 285.000000;0.000000;80 1;-1;0;0", "5 2;480.000000 285.000000;440.000000 285.000000;1.000000;-1 0;1;0;0", "5 2;40.000000 285.000000;80.000000 285.000000;1.000000;-1 0;2;0;0", "5 2;80.000000 265.000000;40.000000 265.000000;1.000000;-1 0;0;0;0", "5 2;440.000000 265.000000;480.000000 265.000000;1.000000;-1 0;1;0;0", "29 1;400.000000 265.000000;0.000000;-1 0;-1;0;0", "29 1;120.000000 265.000000;0.000000;77 1;-1;0;0", "5 2;160.000000 265.000000;200.000000 265.000000;1.000000;-1 0;2;0;0", "5 2;200.000000 285.000000;160.000000 285.000000;1.000000;-1 0;0;0;0", "5 2;360.000000 265.000000;320.000000 265.000000;1.000000;-1 0;1;0;0", "5 2;320.000000 285.000000;360.000000 285.000000;1.000000;-1 0;2;0;0", "29 1;240.000000 265.000000;0.000000;76 1;-1;0;0", "29 1;280.000000 265.000000;0.000000;76 1;-1;0;0", "26 1;120.000000 185.000000;0.000000;-1 0;12;0;0", "26 1;400.000000 185.000000;0.000000;-1 0;11;0;0", "21 1;440.000000 185.000000;0.000000;-1 0;-1;0;0", "21 1;360.000000 185.000000;0.000000;84 1;-1;0;0", "21 1;160.000000 185.000000;0.000000;-1 0;-1;0;0", "21 1;80.000000 185.000000;0.000000;-1 0;-1;0;0", "21 1;400.000000 225.000000;0.000000;-1 0;-1;0;0", "21 1;120.000000 225.000000;0.000000;-1 0;-1;0;0", "22 1;320.000000 185.000000;0.000000;-1 0;-1;0;0", "23 1;480.000000 185.000000;0.000000;-1 0;-1;0;0", "22 1;40.000000 185.000000;0.000000;-1 0;-1;0;0", "23 1;200.000000 185.000000;0.000000;-1 0;-1;0;0", "25 1;400.000000 305.000000;0.000000;47 1;20;0;0", "25 1;120.000000 305.000000;0.000000;48 1;21;0;0", "36 1;0.000000 125.000000;0.000000;-1 0;-1;0;0", "37 1;520.000000 125.000000;0.000000;-1 0;-1;0;0", "40 1;40.000000 105.000000;0.000000;-1 0;-1;0;0", "41 1;480.000000 105.000000;0.000000;-1 0;-1;0;0", "36 1;320.000000 105.000000;0.000000;-1 0;-1;0;0", "37 1;200.000000 105.000000;0.000000;-1 0;-1;0;0", "35 1;200.000000 65.000000;0.000000;-1 0;-1;0;0", "34 1;320.000000 65.000000;0.000000;-1 0;-1;0;0", "35 1;480.000000 65.000000;0.000000;-1 0;-1;0;0", "34 1;40.000000 65.000000;0.000000;-1 0;-1;0;0", "30 1;240.000000 125.000000;0.000000;-1 0;-1;0;0", "30 1;280.000000 125.000000;0.000000;-1 0;-1;0;0", "5 1;520.000000 105.000000;0.000000;-1 0;-1;0;0", "5 1;0.000000 105.000000;0.000000;82 1;-1;0;0", "5 1;240.000000 105.000000;0.000000;-1 0;-1;0;0", "5 1;280.000000 105.000000;0.000000;78 1;-1;0;0", "-2 1;260.000000 40.000000;0.000000;-1 0;-1;0;0", "84 1;405.000000 310.000000;0.000000;-1 0;-1;0;0", "84 1;125.000000 310.000000;0.000000;-1 0;-1;0;0", "40 1;280.000000 305.000000;0.000000;-1 0;-1;0;0", "41 1;240.000000 305.000000;0.000000;-1 0;-1;0;0", "26 1;120.000000 65.000000;0.000000;-1 0;0;0;0", "26 1;400.000000 65.000000;0.000000;79 1;1;0;0", "24 1;120.000000 25.000000;0.000000;-1 0;0;0;0", "24 1;400.000000 25.000000;0.000000;-1 0;2;0;0", "22 1;360.000000 65.000000;0.000000;65 1;-1;0;0", "22 1;80.000000 65.000000;0.000000;67 1;-1;0;0", "23 1;160.000000 65.000000;0.000000;66 1;-1;0;0", "23 1;440.000000 65.000000;0.000000;68 1;-1;0;0", "21 1;120.000000 105.000000;0.000000;-1 0;-1;0;0", "21 1;120.000000 145.000000;0.000000;81 1;-1;0;0", "21 1;400.000000 105.000000;0.000000;-1 0;-1;0;0", "21 1;400.000000 145.000000;0.000000;-1 0;-1;0;0", "18 1;490.000000 35.000000;0.000000;-1 0;0;0;0", "18 1;30.000000 35.000000;0.000000;-1 0;0;0;0", "84 1;365.000000 70.000000;0.000000;-1 0;-1;0;0", "84 1;165.000000 70.000000;0.000000;-1 0;-1;0;0", "84 1;85.000000 70.000000;0.000000;-1 0;-1;0;0", "84 1;445.000000 70.000000;0.000000;-1 0;-1;0;0", "81 1;40.000000 145.000000;0.000000;-1 0;7;0;0", "81 1;470.000000 145.000000;0.000000;-1 0;12;0;0", "83 1;265.000000 160.000000;0.000000;-1 0;-1;0;0", "83 1;215.000000 25.000000;0.000000;-1 0;-1;0;0", "83 1;315.000000 25.000000;0.000000;-1 0;-1;0;0", "105 4;-6.000000 180.000000;-1.000000 200.000000;-6.000000 180.000000;-1.000000 160.000000;0.250000;-1 0;0;0;0", "105 5;514.000000 180.000000;509.000000 160.000000;514.000000 180.000000;509.000000 200.000000;514.000000 180.000000;0.250000;-1 0;0;0;0", "49 1;245.000000 215.000000;0.000000;-1 0;1;0;0", "11 1;120.000000 265.000000;0.000000;-1 0;-1;0;0", "11 1;280.000000 105.000000;0.000000;-1 0;-1;0;0", "11 1;400.000000 65.000000;0.000000;-1 0;-1;0;0", "11 1;520.000000 285.000000;0.000000;-1 0;-1;0;0", "10 1;120.000000 145.000000;0.000000;-1 0;-1;0;0", "10 1;0.000000 105.000000;0.000000;-1 0;-1;0;0", "10 1;0.000000 285.000000;0.000000;-1 0;-1;0;0", "10 1;360.000000 185.000000;0.000000;-1 0;-1;0;0"];
var level8_bricks = ["59 1;0.000000 160.000000;0.000000;1 16;-1;0;0", "59 1;40.000000 160.000000;0.000000;53 16;-1;0;0", "59 1;520.000000 160.000000;0.000000;3 16;-1;0;0", "59 1;480.000000 160.000000;0.000000;54 16;-1;0;0", "59 1;80.000000 160.000000;0.000000;5 16;-1;0;0", "59 1;120.000000 160.000000;0.000000;8 16;-1;0;0", "59 1;440.000000 160.000000;0.000000;7 16;-1;0;0", "59 1;400.000000 160.000000;0.000000;9 16;-1;0;0", "63 1;160.000000 140.000000;0.000000;11 16;-1;0;0", "64 1;360.000000 140.000000;0.000000;10 16;-1;0;0", "60 1;360.000000 100.000000;0.000000;13 16;-1;0;0", "60 1;180.000000 100.000000;0.000000;12 16;-1;0;0", "61 1;180.000000 60.000000;0.000000;14 16;-1;0;0", "62 1;340.000000 60.000000;0.000000;15 16;-1;0;0", "63 1;220.000000 40.000000;0.000000;16 16;-1;0;0", "64 1;300.000000 40.000000;0.000000;17 16;-1;0;0", "60 1;240.000000 0.000000;0.000000;-1 0;-1;0;0", "60 1;300.000000 0.000000;0.000000;-1 0;-1;0;0", "69 1;200.000000 80.000000;0.000000;0 16;-1;0;0", "69 1;320.000000 80.000000;0.000000;2 16;0;0;0", "4 1;200.000000 160.000000;0.000000;101 1;-1;0;0", "4 1;320.000000 160.000000;0.000000;-1 0;-1;0;0", "5 1;240.000000 160.000000;0.000000;-1 0;-1;0;0", "5 1;280.000000 160.000000;0.000000;-1 0;-1;0;0", "4 1;240.000000 140.000000;0.000000;28 1;-1;0;0", "4 1;280.000000 140.000000;0.000000;28 1;-1;0;0", "5 1;200.000000 140.000000;0.000000;-1 0;-1;0;0", "5 1;320.000000 140.000000;0.000000;-1 0;-1;0;0", "75 1;260.000000 60.000000;0.000000;-1 0;12;0;0", "29 1;0.000000 240.000000;0.000000;-1 0;-1;0;0", "29 1;520.000000 240.000000;0.000000;-1 0;-1;0;0", "3 1;480.000000 240.000000;0.000000;-1 0;12;0;0", "3 1;40.000000 240.000000;0.000000;98 1;11;0;0", "2 1;440.000000 320.000000;0.000000;-1 0;1;0;0", "2 1;80.000000 320.000000;0.000000;100 1;2;0;0", "2 1;450.000000 60.000000;0.000000;-1 0;2;0;0", "2 1;70.000000 60.000000;0.000000;96 1;7;0;0", "0 1;450.000000 100.000000;0.000000;-1 0;-1;0;0", "0 1;410.000000 60.000000;0.000000;86 1;-1;0;0", "0 1;450.000000 20.000000;0.000000;97 1;-1;0;0", "0 1;70.000000 20.000000;0.000000;-1 0;-1;0;0", "0 1;110.000000 60.000000;0.000000;85 1;-1;0;0", "0 1;70.000000 100.000000;0.000000;-1 0;-1;0;0", "36 1;110.000000 100.000000;0.000000;-1 0;-1;0;0", "36 1;490.000000 100.000000;0.000000;-1 0;-1;0;0", "37 1;410.000000 100.000000;0.000000;102 1;-1;0;0", "37 1;30.000000 100.000000;0.000000;103 1;-1;0;0", "38 1;490.000000 20.000000;0.000000;-1 0;-1;0;0", "39 1;30.000000 20.000000;0.000000;-1 0;-1;0;0", "38 1;110.000000 20.000000;0.000000;-1 0;-1;0;0", "39 1;410.000000 20.000000;0.000000;-1 0;-1;0;0", "0 1;490.000000 60.000000;0.000000;87 1;-1;0;0", "0 1;30.000000 60.000000;0.000000;88 1;-1;0;0", "70 1;75.000000 155.000000;0.000000;4 16;-1;0;0", "70 1;455.000000 155.000000;0.000000;6 16;-1;0;0", "29 1;440.000000 240.000000;0.000000;-1 0;-1;0;0", "29 1;80.000000 240.000000;0.000000;98 1;-1;0;0", "39 1;240.000000 200.000000;0.000000;-1 0;-1;0;0", "38 1;280.000000 200.000000;0.000000;-1 0;-1;0;0", "36 1;280.000000 320.000000;0.000000;95 1;-1;0;0", "37 1;240.000000 320.000000;0.000000;-1 0;-1;0;0", "40 1;320.000000 300.000000;0.000000;-1 0;-1;0;0", "41 1;200.000000 300.000000;0.000000;-1 0;-1;0;0", "39 1;200.000000 220.000000;0.000000;-1 0;-1;0;0", "38 1;320.000000 220.000000;0.000000;-1 0;-1;0;0", "36 1;120.000000 240.000000;0.000000;-1 0;-1;0;0", "37 1;400.000000 240.000000;0.000000;-1 0;-1;0;0", "30 1;360.000000 240.000000;0.000000;99 1;-1;0;0", "30 1;160.000000 240.000000;0.000000;-1 0;-1;0;0", "4 1;240.000000 300.000000;0.000000;-1 0;-1;0;0", "4 1;280.000000 300.000000;0.000000;-1 0;-1;0;0", "4 1;280.000000 240.000000;0.000000;-1 0;-1;0;0", "4 1;240.000000 240.000000;0.000000;104 1;-1;0;0", "96 1;35.000000 200.000000;0.000000;-1 0;7;0;0", "96 1;475.000000 200.000000;0.000000;-1 0;12;0;0", "97 1;440.000000 280.000000;0.000000;-1 0;-1;0;0", "97 1;0.000000 280.000000;0.000000;-1 0;-1;0;0", "85 1;465.000000 285.000000;0.000000;-1 0;-1;0;0", "98 1;480.000000 280.000000;0.000000;-1 0;-1;0;0", "97 1;520.000000 280.000000;0.000000;-1 0;-1;0;0", "97 1;80.000000 280.000000;0.000000;-1 0;-1;0;0", "85 1;505.000000 285.000000;0.000000;-1 0;-1;0;0", "85 1;65.000000 285.000000;0.000000;-1 0;-1;0;0", "85 1;20.000000 285.000000;0.000000;-1 0;-1;0;0", "98 1;40.000000 280.000000;0.000000;-1 0;-1;0;0", "84 1;115.000000 65.000000;0.000000;-1 0;-1;0;0", "84 1;415.000000 65.000000;0.000000;-1 0;-1;0;0", "84 1;495.000000 65.000000;0.000000;-1 0;-1;0;0", "84 1;35.000000 65.000000;0.000000;-1 0;-1;0;0", "105 4;374.000000 280.000000;399.000000 295.000000;374.000000 310.000000;349.000000 295.000000;0.250000;-1 0;0;0;0", "105 4;134.000000 310.000000;159.000000 295.000000;134.000000 280.000000;109.000000 295.000000;0.250000;-1 0;0;0;0", "106 2;139.000000 40.000000;139.000000 70.000000;0.250000;-1 0;1;0;0", "106 2;-11.000000 70.000000;-11.000000 40.000000;0.250000;-1 0;1;0;0", "106 2;369.000000 40.000000;369.000000 70.000000;0.250000;-1 0;1;0;0", "106 2;519.000000 70.000000;519.000000 40.000000;0.250000;-1 0;1;0;0", "11 1;280.000000 320.000000;0.000000;-1 0;-1;0;0", "11 1;70.000000 60.000000;0.000000;-1 0;-1;0;0", "11 1;450.000000 20.000000;0.000000;-1 0;-1;0;0", "11 1;60.000000 240.000000;0.000000;-1 0;-1;0;0", "10 1;360.000000 240.000000;0.000000;-1 0;-1;0;0", "10 1;80.000000 320.000000;0.000000;-1 0;-1;0;0", "10 1;200.000000 160.000000;0.000000;-1 0;-1;0;0", "10 1;410.000000 100.000000;0.000000;-1 0;-1;0;0", "10 1;30.000000 100.000000;0.000000;-1 0;-1;0;0", "10 1;240.000000 240.000000;0.000000;-1 0;-1;0;0", "83 1;265.000000 25.000000;0.000000;-1 0;-1;0;0", "82 1;260.000000 270.000000;0.000000;-1 0;-1;0;0", "82 1;280.000000 270.000000;0.000000;-1 0;-1;0;0", "55 1;300.000000 275.000000;0.000000;107 16;-1;0;0", "55 1;340.000000 275.000000;0.000000;108 16;-1;0;0", "55 1;220.000000 275.000000;0.000000;106 16;-1;0;0", "55 1;180.000000 275.000000;0.000000;110 16;-1;0;0", "82 1;160.000000 270.000000;0.000000;111 16;-1;0;0", "82 1;380.000000 270.000000;0.000000;109 16;-1;0;0", "83 1;335.000000 190.000000;0.000000;-1 0;-1;0;0", "83 1;195.000000 190.000000;0.000000;-1 0;-1;0;0", "17 2;180.000000 265.000000;220.000000 265.000000;1.000000;112 15;20;0;0", "17 2;340.000000 265.000000;300.000000 265.000000;1.000000;113 15;2;0;0", "2 1;520.000000 320.000000;0.000000;-1 0;-1;0;0", "2 1;0.000000 320.000000;0.000000;-1 0;-1;0;0", "0 1;480.000000 320.000000;0.000000;-1 0;-1;0;0", "0 1;40.000000 320.000000;0.000000;-1 0;-1;0;0"];
var level9_bricks = ["33 1;40.000000 80.000000;0.000000;-1 0;-1;0;0", "33 1;60.000000 120.000000;0.000000;107 1;-1;0;0", "33 1;80.000000 160.000000;0.000000;-1 0;-1;0;0", "33 1;100.000000 200.000000;0.000000;-1 0;-1;0;0", "43 1;80.000000 240.000000;0.000000;-1 0;-1;0;0", "43 1;40.000000 280.000000;0.000000;-1 0;-1;0;0", "43 1;0.000000 320.000000;0.000000;-1 0;-1;0;0", "36 1;40.000000 320.000000;0.000000;105 1;-1;0;0", "36 1;80.000000 300.000000;0.000000;-1 0;-1;0;0", "36 1;120.000000 280.000000;0.000000;-1 0;-1;0;0", "36 1;160.000000 260.000000;0.000000;-1 0;-1;0;0", "42 1;80.000000 80.000000;0.000000;-1 0;-1;0;0", "42 1;120.000000 120.000000;0.000000;-1 0;-1;0;0", "42 1;160.000000 160.000000;0.000000;-1 0;-1;0;0", "32 1;480.000000 80.000000;0.000000;-1 0;-1;0;0", "32 1;460.000000 120.000000;0.000000;103 1;-1;0;0", "32 1;440.000000 160.000000;0.000000;-1 0;-1;0;0", "32 1;420.000000 200.000000;0.000000;-1 0;-1;0;0", "43 1;440.000000 80.000000;0.000000;-1 0;-1;0;0", "43 1;400.000000 120.000000;0.000000;-1 0;-1;0;0", "43 1;360.000000 160.000000;0.000000;-1 0;-1;0;0", "42 1;440.000000 240.000000;0.000000;-1 0;-1;0;0", "42 1;480.000000 280.000000;0.000000;-1 0;-1;0;0", "42 1;520.000000 320.000000;0.000000;-1 0;-1;0;0", "37 1;480.000000 320.000000;0.000000;-1 0;-1;0;0", "37 1;440.000000 300.000000;0.000000;-1 0;-1;0;0", "37 1;400.000000 280.000000;0.000000;106 1;-1;0;0", "37 1;360.000000 260.000000;0.000000;-1 0;-1;0;0", "37 1;200.000000 260.000000;0.000000;-1 0;-1;0;0", "36 1;320.000000 260.000000;0.000000;-1 0;-1;0;0", "40 1;280.000000 300.000000;0.000000;108 1;-1;0;0", "41 1;240.000000 300.000000;0.000000;-1 0;-1;0;0", "39 1;200.000000 180.000000;0.000000;-1 0;-1;0;0", "38 1;320.000000 180.000000;0.000000;-1 0;-1;0;0", "42 1;280.000000 140.000000;0.000000;-1 0;-1;0;0", "43 1;240.000000 140.000000;0.000000;-1 0;-1;0;0", "31 1;100.000000 120.000000;0.000000;107 1;-1;0;0", "31 1;440.000000 120.000000;0.000000;-1 0;-1;0;0", "30 1;440.000000 280.000000;0.000000;-1 0;-1;0;0", "30 1;80.000000 280.000000;0.000000;-1 0;-1;0;0", "29 1;120.000000 240.000000;0.000000;88 1;-1;0;0", "29 1;120.000000 160.000000;0.000000;87 1;-1;0;0", "29 1;400.000000 160.000000;0.000000;86 1;-1;0;0", "29 1;400.000000 240.000000;0.000000;89 1;-1;0;0", "31 1;400.000000 200.000000;0.000000;-1 0;-1;0;0", "31 1;140.000000 200.000000;0.000000;-1 0;-1;0;0", "30 1;160.000000 200.000000;0.000000;-1 0;-1;0;0", "30 1;360.000000 200.000000;0.000000;-1 0;-1;0;0", "36 1;240.000000 180.000000;0.000000;109 1;-1;0;0", "37 1;280.000000 180.000000;0.000000;109 1;-1;0;0", "38 1;240.000000 260.000000;0.000000;-1 0;-1;0;0", "39 1;280.000000 260.000000;0.000000;-1 0;-1;0;0", "65 1;240.000000 340.000000;0.000000;-1 0;-1;0;0", "66 1;280.000000 340.000000;0.000000;-1 0;-1;0;0", "66 1;280.000000 120.000000;0.000000;-1 0;-1;0;0", "65 1;240.000000 120.000000;0.000000;-1 0;-1;0;0", "55 1;320.000000 345.000000;0.000000;-1 0;-1;0;0", "55 1;360.000000 345.000000;0.000000;56 16;-1;0;0", "55 1;400.000000 345.000000;0.000000;57 16;-1;0;0", "55 1;200.000000 345.000000;0.000000;-1 0;-1;0;0", "55 1;160.000000 345.000000;0.000000;59 16;-1;0;0", "55 1;120.000000 345.000000;0.000000;60 16;-1;0;0", "82 1;440.000000 340.000000;0.000000;58 16;-1;0;0", "82 1;100.000000 340.000000;0.000000;61 16;-1;0;0", "55 1;200.000000 125.000000;0.000000;67 16;-1;0;0", "55 1;320.000000 125.000000;0.000000;66 16;-1;0;0", "55 1;360.000000 125.000000;0.000000;69 16;-1;0;0", "55 1;160.000000 125.000000;0.000000;68 16;-1;0;0", "82 1;140.000000 120.000000;0.000000;-1 0;-1;0;0", "82 1;400.000000 120.000000;0.000000;-1 0;-1;0;0", "17 2;200.000000 115.000000;160.000000 115.000000;1.000000;64 15;12;0;0", "17 2;320.000000 115.000000;360.000000 115.000000;1.000000;65 15;2;0;0", "75 1;260.000000 40.000000;0.000000;-1 0;-1;0;0", "81 1;475.000000 40.000000;0.000000;-1 0;20;0;0", "56 1;515.000000 200.000000;0.000000;76 16;-1;0;0", "56 1;515.000000 160.000000;0.000000;74 16;-1;0;0", "56 1;515.000000 240.000000;0.000000;80 16;-1;0;0", "56 1;35.000000 240.000000;0.000000;83 16;-1;0;0", "56 1;35.000000 200.000000;0.000000;77 16;-1;0;0", "56 1;35.000000 160.000000;0.000000;78 16;-1;0;0", "82 1;510.000000 280.000000;0.000000;-1 0;-1;0;0", "82 1;510.000000 140.000000;0.000000;75 16;-1;0;0", "82 1;30.000000 140.000000;0.000000;79 16;-1;0;0", "82 1;30.000000 280.000000;0.000000;-1 0;-1;0;0", "18 2;500.000000 160.000000;500.000000 250.000000;1.000000;81 15;11;0;0", "18 2;20.000000 250.000000;20.000000 160.000000;1.000000;82 15;2;0;0", "84 1;405.000000 165.000000;0.000000;-1 0;-1;0;0", "84 1;125.000000 165.000000;0.000000;-1 0;-1;0;0", "84 1;125.000000 245.000000;0.000000;102 1;-1;0;0", "84 1;405.000000 245.000000;0.000000;-1 0;-1;0;0", "22 1;220.000000 220.000000;0.000000;-1 0;2;0;0", "23 1;300.000000 220.000000;0.000000;-1 0;2;0;0", "5 1;200.000000 40.000000;0.000000;104 1;-1;0;0", "5 1;320.000000 40.000000;0.000000;-1 0;-1;0;0", "96 1;35.000000 40.000000;0.000000;-1 0;12;0;0", "83 1;185.000000 295.000000;0.000000;-1 0;-1;0;0", "83 1;345.000000 295.000000;0.000000;-1 0;-1;0;0", "83 1;145.000000 65.000000;0.000000;-1 0;-1;0;0", "83 1;385.000000 65.000000;0.000000;-1 0;-1;0;0", "105 2;444.000000 210.000000;454.000000 175.000000;0.250000;-1 0;0;0;0", "105 2;54.000000 175.000000;64.000000 210.000000;0.250000;-1 0;0;0;0", "-2 1;260.000000 215.000000;0.000000;-1 0;-1;0;0", "11 1;120.000000 240.000000;0.000000;-1 0;-1;0;0", "11 1;460.000000 120.000000;0.000000;-1 0;-1;0;0", "11 1;200.000000 40.000000;0.000000;-1 0;-1;0;0", "11 1;40.000000 320.000000;0.000000;-1 0;-1;0;0", "10 1;400.000000 280.000000;0.000000;-1 0;-1;0;0", "10 1;80.000000 120.000000;0.000000;-1 0;-1;0;0", "10 1;280.000000 300.000000;0.000000;-1 0;-1;0;0", "10 1;260.000000 180.000000;0.000000;-1 0;-1;0;0", "17 2;120.000000 335.000000;200.000000 335.000000;1.000000;63 15;20;0;0", "17 2;400.000000 335.000000;320.000000 335.000000;1.000000;62 15;1;0;0"];
var level0_bonuses = ["4 31 329.000000 360.000000", "4 29 199.000000 360.000000", "3 16 520.000000 215.000000", "3 17 0.000000 215.000000", "11 22 180.000000 170.000000", "12 23 340.000000 170.000000", "7 63 120.000000 40.000000", "7 62 400.000000 40.000000", "16 32 410.000000 280.000000", "16 17 0.000000 145.000000", "16 47 325.000000 0.000000"];
var level1_bonuses = ["17 36 40.000000 260.000000", "17 38 40.000000 140.000000", "17 40 40.000000 20.000000", "17 41 480.000000 20.000000", "17 43 480.000000 140.000000", "17 45 480.000000 260.000000", "12 59 175.000000 310.000000", "11 60 340.000000 30.000000", "20 58 335.000000 310.000000", "7 61 180.000000 30.000000", "4 56 84.000000 370.000000", "4 55 444.000000 370.000000", "16 68 145.000000 230.000000", "16 71 375.000000 30.000000", "16 82 210.000000 130.000000", "3 105 230.000000 210.000000", "3 106 290.000000 210.000000"];
var level2_bonuses = ["4 26 404.000000 175.000000", "4 27 124.000000 175.000000", "12 55 180.000000 15.000000", "2 53 340.000000 15.000000", "16 21 0.000000 95.000000", "16 79 400.000000 -15.000000", "3 56 60.000000 95.000000", "3 54 460.000000 95.000000", "4 108 204.000000 335.000000", "4 107 324.000000 335.000000", "20 109 40.000000 255.000000", "11 106 480.000000 255.000000", "3 -1 10.000000 0.000000", "3 -1 510.000000 0.000000"];
var level3_bonuses = ["11 30 195.000000 80.000000", "2 31 315.000000 80.000000", "4 18 99.000000 120.000000", "4 22 429.000000 120.000000", "12 54 50.000000 280.000000", "21 57 470.000000 280.000000", "16 32 140.000000 120.000000", "16 21 470.000000 60.000000", "3 74 225.000000 300.000000", "3 75 295.000000 300.000000", "16 74 235.000000 220.000000", "16 79 270.000000 0.000000"];
var level4_bonuses = ["4 57 164.000000 70.000000", "4 58 364.000000 70.000000", "12 53 200.000000 220.000000", "2 54 320.000000 220.000000", "12 9 440.000000 40.000000", "7 10 80.000000 40.000000", "19 55 520.000000 220.000000", "16 21 290.000000 40.000000", "16 59 40.000000 160.000000", "19 71 0.000000 220.000000", "4 83 44.000000 320.000000", "4 79 484.000000 320.000000", "3 91 160.000000 160.000000", "3 87 360.000000 160.000000", "3 -1 260.000000 0.000000"];
var level5_bonuses = ["20 66 100.000000 280.000000", "21 67 420.000000 280.000000", "12 32 160.000000 180.000000", "11 31 360.000000 180.000000", "3 43 200.000000 120.000000", "3 42 320.000000 120.000000", "22 33 80.000000 180.000000", "22 30 440.000000 180.000000", "16 49 45.000000 40.000000", "16 51 480.000000 40.000000", "4 66 104.000000 360.000000", "4 67 424.000000 360.000000"];
var level6_bonuses = ["12 67 120.000000 250.000000", "11 65 395.000000 50.000000", "21 64 115.000000 50.000000", "20 66 400.000000 250.000000", "4 71 364.000000 310.000000", "4 68 164.000000 310.000000", "16 9 440.000000 90.000000", "16 88 200.000000 -10.000000", "17 109 490.000000 260.000000", "17 110 30.000000 260.000000"];
var level7_bonuses = ["4 56 84.000000 105.000000", "3 57 160.000000 105.000000", "4 58 444.000000 105.000000", "3 55 360.000000 105.000000", "12 43 0.000000 65.000000", "11 42 520.000000 65.000000", "16 27 195.000000 145.000000", "16 63 490.000000 -5.000000"];
var level8_bonuses = ["11 65 120.000000 200.000000", "2 66 400.000000 200.000000", "22 5 120.000000 120.000000", "22 7 400.000000 120.000000", "16 99 355.000000 200.000000", "16 29 0.000000 200.000000", "16 15 320.000000 20.000000", "3 -1 160.000000 0.000000", "3 -1 360.000000 0.000000"];
var level9_bonuses = ["20 10 160.000000 220.000000", "4 -1 144.000000 0.000000", "4 -1 384.000000 0.000000", "3 93 320.000000 60.000000", "3 92 200.000000 60.000000", "2 27 360.000000 220.000000", "16 93 330.000000 0.000000"];
}
Symbol 1107 MovieClip [__Packages.gameplay.Ball] Frame 0
class gameplay.Ball extends gdp.core.base.BaseMovieClip
{
var _x, _y, _height, removeMovieClip, gotoAndStop, _width;
function Ball () {
super();
frametimer = gdp.core.time.FrameTimer.getInstance();
geom = geometry.Geometry.getInstance();
trace(("gameplay.Ball.Ball(" + [nDelayAfterSpit]) + ")");
bOnPad = true;
bSlide = true;
bPause = false;
bStrong = false;
bFire = false;
bWacky = false;
bCatch = false;
bDelayAfterCatch = false;
bDelayAfterSpitOut = false;
bSpeedBig = false;
bSpeedUp = false;
bSpeedDown = false;
processMove = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psMoving));
gdp.core.process.ProcessManager.getInstance().addProcess(processMove);
_x = gameplay.Pad.getInstance()._x;
_y = gameplay.Pad.getInstance()._y - (_height / 4);
}
function psMoving(Void) {
if (gameplay.Field.getInstance().isPause()) {
return(undefined);
}
if (bCatch) {
return(undefined);
}
if (bDelayAfterCatch) {
if ((frametimer.getTime() - nCatchTime) > nCatchDelay) {
spitOut();
}
return(undefined);
}
if (bWacky) {
if ((frametimer.getTime() - nWackyBeginTime) > nWackyTime) {
setNormal();
}
}
if (bSpeedUp) {
if ((frametimer.getTime() - nSpeedUpTime) > nSpeedUpDelay) {
bSpeedUp = false;
nSpeed = nSpeed - nSpeedBonusIncrement;
}
}
if (bSpeedDown) {
if ((frametimer.getTime() - nSpeedDownTime) > nSpeedDownDelay) {
bSpeedDown = false;
nSpeed = nSpeed + nSpeedBonusIncrement;
}
}
if (bOnPad) {
if (bSlide) {
var _local3 = gameplay.Pad.getInstance().getLeftBorder();
if (_x < _local3) {
_x = _local3;
} else {
var _local2 = gameplay.Pad.getInstance().getRightBorder();
if (_x > _local2) {
_x = _local2;
}
}
} else {
followPad();
}
} else {
if (isParalllelToFloor()) {
if (nBeginParallelToFloor == null) {
nBeginParallelToFloor = gdp.core.time.FrameTimer.getInstance().getTime();
}
} else {
nBeginParallelToFloor = null;
}
collideWithFrogs();
distance = nSpeed;
center = new gdp.utils.math.helpers.Point(_x, _y);
collideWithBricks();
if (distance > 0) {
collideWithBricks();
}
collideWithBonuses();
if (!collideWithWalls()) {
collideWitnPad();
}
if (bStrong) {
if (nStrongHitsCurrentCount >= nStrongHitsMaxCount) {
setNormal();
}
}
if (_y >= gameplay.Field.getInstance().getFloor()) {
Game.getInstance().playSound("water");
death();
}
if (!bSpeedBig) {
if (nSpeed > (_height / 2)) {
bSpeedBig = true;
}
}
}
}
function isParalllelToFloor(Void) {
var _local2 = (((nDirection < nParallelRange) && (nDirection > (-nParallelRange))) || (nDirection < (-3.14159265358979 + nParallelRange))) || (nDirection > (Math.PI - nParallelRange));
return((((nDirection < nParallelRange) && (nDirection > (-nParallelRange))) || (nDirection < (-3.14159265358979 + nParallelRange))) || (nDirection > (Math.PI - nParallelRange)));
}
function start(Void) {
if (bOnPad) {
bOnPad = false;
nDirection = ((((nBatAngle / 2) + (gameplay.Pad.getInstance()._width / 2)) + (gameplay.Pad.getInstance()._x - _x)) / (gameplay.Pad.getInstance()._width + nBatAngle)) * Math.PI;
nSpeed = nSpeedBegin + ((windows.GameWindow.getInstance().getLevel() - 1) * (nSpeedLevelsIncrement / (managers.LevelManager.getInstance().getLevelsCount() - 1)));
}
}
function move(d) {
oldpos = new gdp.utils.math.helpers.Point(_x, _y);
if (bWacky) {
var _local3 = nWackyRandomRange - ((Math.random() * 2) * nWackyRandomRange);
nDirection = nDirection + _local3;
}
_x = _x + (d * Math.cos(nDirection));
_y = _y + ((-d) * Math.sin(nDirection));
nextpos = new gdp.utils.math.helpers.Point(_x + (d * Math.cos(nDirection)), _y - (d * Math.sin(nDirection)));
nextposHalf = new gdp.utils.math.helpers.Point(_x + ((d / 2) * Math.cos(nDirection)), _y - ((d / 2) * Math.sin(nDirection)));
distance = distance - d;
}
function remove(Void) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processMove);
removeMovieClip();
}
function isOnPad(Void) {
return(bOnPad);
}
function isCapture(Void) {
return(bCatch);
}
function followPad(Void) {
if (nPositionOnPad == null) {
nPositionOnPad = 0;
}
_x = gameplay.Pad.getInstance()._x + nPositionOnPad;
if (gameplay.Pad.getInstance().isMove()) {
_y = gameplay.Pad.getInstance()._y - (_height / 6);
}
}
function setStand(dx) {
nPositionOnPad = dx;
_x = _x + dx;
bSlide = false;
}
function setStrong(Void) {
bWacky = false;
bFire = false;
nStrongHitsCurrentCount = 0;
bStrong = true;
(gotoAndStop(2));// not popped
}
function setFire(Void) {
bWacky = false;
bStrong = false;
bFire = true;
(gotoAndStop(4));// not popped
}
function setNormal(Void) {
trace(("gameplay.Ball.setNormal(" + [arguments]) + ")");
bWacky = false;
bStrong = false;
bFire = false;
(gotoAndStop(1));// not popped
}
function setWacky(Void) {
bStrong = false;
bFire = false;
bWacky = true;
(gotoAndStop(3));// not popped
nWackyBeginTime = gdp.core.time.FrameTimer.getInstance().getTime();
}
function getDirection(Void) {
return(nDirection);
}
function speedUp(Void) {
bSpeedUp = true;
nSpeed = nSpeed + nSpeedBonusIncrement;
nSpeedUpTime = gdp.core.time.FrameTimer.getInstance().getTime();
}
function speedDown(Void) {
bSpeedDown = true;
nSpeed = nSpeed - nSpeedBonusIncrement;
nSpeedDownTime = gdp.core.time.FrameTimer.getInstance().getTime();
}
function death(Void) {
trace(("gameplay.Ball.death(" + [arguments]) + ")");
gdp.core.process.ProcessManager.getInstance().removeProcess(processMove);
gameplay.Field.getInstance().ballDeath(this);
removeMovieClip();
}
function collideWithBricks() {
center = new gdp.utils.math.helpers.Point(_x, _y);
var _local3 = gameplay.Grid.getInstance().getNeibousBricks(center, nextpos);
_local3 = sortByDistance(center, _local3);
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2] != null) {
if (nLastHitedBrick != _local3[_local2].getFieldType()) {
if (collideVsPoligonalBrick(_local3[_local2])) {
nLastHitedBrick = _local3[_local2].getFieldType();
if (bStrong || (bFire)) {
_local3[_local2].hitStrongBall(nDirection);
} else {
_local3[_local2].hit(nDirection);
}
return(undefined);
}
}
}
_local2++;
}
move(distance);
return(undefined);
}
function collideWithBonuses(Void) {
var _local4 = gameplay.Grid.getInstance().getNeibousBonuses(new gdp.utils.math.helpers.Point(_x, _y));
var _local3 = 0;
while (_local3 < _local4.length) {
var _local2 = gameplay.Field.getInstance().getBonus(_local4[_local3]);
if (_local2 != null) {
if (myHitTest(_local2)) {
nLastHitedBrick = null;
_local2.hit(nDirection);
return(true);
}
}
_local3++;
}
return(false);
}
function collideWithWalls(Void) {
if ((_x - (_width / 2)) < gameplay.Field.getInstance().getLeftBorder()) {
Game.getInstance().playSound("bat");
nLastHitedBrick = null;
reflectionY();
_x = gameplay.Field.getInstance().getLeftBorder() + (_width / 2);
return(true);
}
if ((_x + (_width / 2)) > gameplay.Field.getInstance().getRightBorder()) {
Game.getInstance().playSound("bat");
nLastHitedBrick = null;
reflectionY();
_x = gameplay.Field.getInstance().getRightBorder() - (_width / 2);
return(true);
}
if ((_y - (_height / 2)) < gameplay.Field.getInstance().getUpBorder()) {
Game.getInstance().playSound("bat");
nLastHitedBrick = null;
reflectionX();
_y = gameplay.Field.getInstance().getUpBorder() + (_height / 2);
return(true);
}
return(false);
}
function collideWitnPad(Void) {
if (((_y + (_height / 4)) > (gameplay.Pad.getInstance()._y - (_height / 6))) && ((_y + (_height / 2)) < (gameplay.Pad.getInstance()._y + (2 * _height)))) {
if ((_x > (gameplay.Pad.getInstance()._x - (gameplay.Pad.getInstance()._width / 2))) && (_x < (gameplay.Pad.getInstance()._x + (gameplay.Pad.getInstance()._width / 2)))) {
nLastHitedBrick = null;
_y = _y - (_height / 4);
if (nDirection < 0) {
Game.getInstance().playSound("bat");
}
nDirection = ((((nBatAngle / 2) + (gameplay.Pad.getInstance()._width / 2)) + (gameplay.Pad.getInstance()._x - _x)) / (gameplay.Pad.getInstance()._width + nBatAngle)) * Math.PI;
return(true);
}
}
return(false);
}
function collideWithFrogs(Void) {
var _local3 = gameplay.Field.getInstance().getFrogs();
var _local2 = 0;
while (_local2 < _local3.length) {
_local3[_local2].capture(this);
_local2++;
}
}
function reflectionX(Void) {
if (isParalllelToFloor()) {
if ((gdp.core.time.FrameTimer.getInstance().getTime() - nBeginParallelToFloor) > nParallelToFloorDelay) {
if (((nDirection >= 0) && (nDirection < (Math.PI/2))) || ((nDirection >= Math.PI) && (nDirection < -1.5707963267949))) {
nDirection = nDirection + nParallelToFloorChange;
} else {
nDirection = nDirection - nParallelToFloorChange;
}
nBeginParallelToFloor = null;
}
}
nDirection = -nDirection;
}
function reflectionY(Void) {
if (isParalllelToFloor()) {
if ((gdp.core.time.FrameTimer.getInstance().getTime() - nBeginParallelToFloor) > nParallelToFloorDelay) {
if (((nDirection >= 0) && (nDirection < (Math.PI/2))) || ((nDirection >= Math.PI) && (nDirection < -1.5707963267949))) {
nDirection = nDirection + nParallelToFloorChange;
} else {
nDirection = nDirection - nParallelToFloorChange;
}
nBeginParallelToFloor = null;
}
}
nDirection = Math.PI - nDirection;
if (nDirection > Math.PI) {
nDirection = nDirection - (Math.PI*2);
}
if (nDirection < -3.14159265358979) {
nDirection = nDirection + (Math.PI*2);
}
}
function reflectionByEdge(edge) {
if (bFire) {
return(undefined);
}
oldpos = new gdp.utils.math.helpers.Point(_x, _y);
var _local2 = edge.getDistance(center);
_local2 = _local2 - (_height / 2);
_x = _x + (_local2 * Math.cos(nDirection));
_y = _y + ((-_local2) * Math.sin(nDirection));
_local2 = distance - Math.abs(_local2);
if (_local2 < 0) {
_local2 = 0;
}
distance = _local2;
if (edge.org.x == edge.dest.x) {
reflectionY();
if (nSpeed < nSpeedMax) {
nSpeed = nSpeed + nSpeedHitIncrement;
}
_x = _x + (_local2 * Math.cos(nDirection));
_y = _y + ((-_local2) * Math.sin(nDirection));
center = new gdp.utils.math.helpers.Point(_x, _y);
nextpos = new gdp.utils.math.helpers.Point(_x + (distance * Math.cos(nDirection)), _y - (distance * Math.sin(nDirection)));
nextposHalf = new gdp.utils.math.helpers.Point(_x + ((distance / 2) * Math.cos(nDirection)), _y - ((distance / 2) * Math.sin(nDirection)));
return(undefined);
}
if (edge.org.y == edge.dest.y) {
reflectionX();
if (nSpeed < nSpeedMax) {
nSpeed = nSpeed + nSpeedHitIncrement;
}
_x = _x + (_local2 * Math.cos(nDirection));
_y = _y + ((-_local2) * Math.sin(nDirection));
center = new gdp.utils.math.helpers.Point(_x, _y);
nextpos = new gdp.utils.math.helpers.Point(_x + (distance * Math.cos(nDirection)), _y - (distance * Math.sin(nDirection)));
nextposHalf = new gdp.utils.math.helpers.Point(_x + ((distance / 2) * Math.cos(nDirection)), _y - ((distance / 2) * Math.sin(nDirection)));
return(undefined);
}
if (isParalllelToFloor()) {
if ((gdp.core.time.FrameTimer.getInstance().getTime() - nBeginParallelToFloor) > nParallelToFloorDelay) {
if (((nDirection >= 0) && (nDirection < (Math.PI/2))) || ((nDirection >= Math.PI) && (nDirection < -1.5707963267949))) {
nDirection = nDirection + nParallelToFloorChange;
} else {
nDirection = nDirection - nParallelToFloorChange;
}
nBeginParallelToFloor = null;
}
}
nDirection = (nDirection * 180) / Math.PI;
var _local4 = edge.getAngle();
var _local3 = 0;
if (_local4 > 0) {
if (nDirection > 0) {
_local3 = (2 * _local4) - nDirection;
} else {
_local3 = (2 * _local4) - nDirection;
}
} else if (nDirection < 0) {
_local3 = (-nDirection) + (2 * _local4);
} else {
_local3 = (-nDirection) + (2 * _local4);
}
nDirection = (_local3 * Math.PI) / 180;
if (nDirection > Math.PI) {
nDirection = nDirection - (Math.PI*2);
}
if (nDirection < -3.14159265358979) {
nDirection = nDirection + (Math.PI*2);
}
_x = _x + (_local2 * Math.cos(nDirection));
_y = _y + ((-_local2) * Math.sin(nDirection));
center = new gdp.utils.math.helpers.Point(_x, _y);
nextpos = new gdp.utils.math.helpers.Point(_x + (distance * Math.cos(nDirection)), _y - (distance * Math.sin(nDirection)));
nextposHalf = new gdp.utils.math.helpers.Point(_x + ((distance / 2) * Math.cos(nDirection)), _y - ((distance / 2) * Math.sin(nDirection)));
if (nSpeed < nSpeedMax) {
nSpeed = nSpeed + nSpeedHitIncrement;
}
return(undefined);
}
function tweakedDirection(Void) {
nDirection = (nDirection + nTweakedRange) - ((Math.random() * 2) * nTweakedRange);
}
function collideVsBrick(brick) {
return(collideVsPoligonalBrick(brick));
}
function collideVsPoligonalBrick(brick) {
var _local3 = _width / 2;
var _local2 = brick;
var _local5 = (_local2._x + _local2._width) + nSpeed;
var _local4 = (_local2._y + _local2._height) + nSpeed;
var _local11 = _local2._width + nSpeed;
var _local10 = _local2._height + nSpeed;
var _local7 = nextpos.nX - _local5;
var _local9 = (_local11 + _local3) - Math.abs(_local7);
if (0 < _local9) {
var _local6 = nextpos.nY - _local4;
var _local8 = (_local10 + _local3) - Math.abs(_local6);
if (0 < _local8) {
if (projCircle_Polygon(_local2) != COL_NONE) {
return(true);
}
}
}
return(false);
}
function projCircle_Polygon(t) {
var _local3 = t.getPolygon();
var _local2 = [];
var _local4 = Number.MAX_VALUE;
var _local19;
var _local6;
var _local5 = 0;
while (_local5 < _local3.size()) {
_local6 = _local3.edge();
_local19 = _local6.getDistance(nextpos);
if (_local19 < _local4) {
_local4 = _local19;
_local2 = [];
_local2.push(_local5);
} else if (_local19 == _local4) {
_local2.push(_local5);
}
_local3.advance();
_local5++;
}
if (_local4 > (_width / 2)) {
_local4 = Number.MAX_VALUE;
_local2 = [];
_local5 = 0;
while (_local5 < _local3.size()) {
_local6 = _local3.edge();
_local19 = _local6.getDistance2(nextposHalf);
if (_local19 < _local4) {
_local4 = _local19;
_local2 = [];
_local2.push(_local5);
} else if (_local19 == _local4) {
_local2.push(_local5);
}
_local3.advance();
_local5++;
}
}
if (_local4 <= (_width / 2)) {
if (t.isBounce()) {
var _local10;
if (_local2.length == 1) {
var _local9 = _local3.getEdge(_local2[0]);
var _local8 = new gdp.utils.math.helpers.Point(_local9.org.x, _local9.org.y);
var _local7 = new gdp.utils.math.helpers.Point(_local9.dest.x, _local9.dest.y);
_local19 = Math.sqrt(((_local8.nX - _local7.nX) * (_local8.nX - _local7.nX)) + ((_local8.nY - _local7.nY) * (_local8.nY - _local7.nY)));
var _local11 = (_local19 - 5) / 5;
var _local16 = 5 / (_local19 - 5);
var _local13 = new gdp.utils.math.helpers.Point((_local8.nX + (_local11 * _local7.nX)) / (1 + _local11), (_local8.nY + (_local11 * _local7.nY)) / (1 + _local11));
var _local12 = new gdp.utils.math.helpers.Point((_local8.nX + (_local16 * _local7.nX)) / (1 + _local16), (_local8.nY + (_local16 * _local7.nY)) / (1 + _local16));
var _local18 = new gdp.utils.math.helpers.Point(_local13.nX - (50 * Math.cos(nDirection)), _local13.nY + (50 * Math.sin(nDirection)));
var _local21 = new gdp.utils.math.helpers.Point(_local13.nX + (50 * Math.cos(nDirection)), _local13.nY - (50 * Math.sin(nDirection)));
var _local25 = new gdp.utils.math.helpers.Point(_local12.nX - (50 * Math.cos(nDirection)), _local12.nY + (50 * Math.sin(nDirection)));
var _local20 = new gdp.utils.math.helpers.Point(_local12.nX + (50 * Math.cos(nDirection)), _local12.nY - (50 * Math.sin(nDirection)));
var _local15 = _local2[0] - 1;
if (_local15 < 0) {
_local15 = _local3.size() - 1;
}
var _local14 = _local2[0] + 1;
if (_local14 >= _local3.size()) {
_local14 = 0;
}
var _local23 = _local3.getEdge(_local15);
var _local22 = _local3.getEdge(_local14);
var _local17 = geom.getEdgesCross(_local23.org, _local23.dest, _local18, _local21);
var _local24 = geom.getEdgesCross(_local22.org, _local22.dest, _local25, _local20);
if ((_local17 == null) && (_local24 == null)) {
_local10 = _local2[0];
} else {
var _local28 = geom.getEdgesCross(_local9.org, _local9.dest, _local18, _local21);
var _local27 = geom.getEdgesCross(_local9.org, _local9.dest, _local25, _local20);
if (_local17 != null) {
if (_local17.distance < _local28.distance) {
_local10 = _local15;
} else {
_local10 = _local2[0];
}
} else if (_local24.distance < _local27.distance) {
_local10 = _local14;
} else {
_local10 = _local2[0];
}
}
} else {
_local10 = chooseEdge2(_local2, _local3);
}
nStrongHitsCurrentCount++;
reflectionByEdge(_local3.getEdge(_local10));
}
if (t.isTweaked()) {
tweakedDirection();
}
return(COL_AXIS);
}
return(COL_NONE);
}
function chooseEdge2(aEdges, polygon) {
var _local4 = aEdges[0];
if ((aEdges[1] - aEdges[0]) != 1) {
var _local16 = aEdges[0];
aEdges[0] = aEdges[1];
aEdges[1] = _local16;
}
var _local3 = polygon.getEdge(aEdges[0]);
var _local6 = polygon.getEdge(aEdges[1]);
var _local5 = new gdp.utils.math.helpers.Point(_local3.dest.x, _local3.dest.y);
var _local14 = new gdp.utils.math.helpers.Point(_local3.org.x, _local3.org.y);
var _local12 = new gdp.utils.math.helpers.Point(_local6.dest.x, _local6.dest.y);
var _local7 = new gdp.utils.math.helpers.Point((_local14.nX + _local12.nX) / 2, (_local14.nY + _local12.nY) / 2);
var _local17 = Math.sqrt(((_local5.nX - _local7.nX) * (_local5.nX - _local7.nX)) + ((_local5.nY - _local7.nY) * (_local5.nY - _local7.nY)));
var _local9 = 0.5 / (_local17 - 0.5);
var _local8 = new gdp.utils.math.helpers.Point((_local5.nX + (_local9 * _local7.nX)) / (1 + _local9), (_local5.nY + (_local9 * _local7.nY)) / (1 + _local9));
var _local15 = new gdp.utils.math.helpers.Point(_local8.nX - (50 * Math.cos(nDirection)), _local8.nY + (50 * Math.sin(nDirection)));
var _local13 = new gdp.utils.math.helpers.Point(_local8.nX + (50 * Math.cos(nDirection)), _local8.nY - (50 * Math.sin(nDirection)));
var _local11 = geom.getEdgesCross(_local3.org, _local3.dest, _local15, _local13);
var _local10 = geom.getEdgesCross(_local6.org, _local6.dest, _local15, _local13);
if ((_local11 == null) && (_local10 == null)) {
_local4 = chooseEdgeByAngle(_local3, _local6, aEdges);
} else if (_local11 == null) {
_local4 = aEdges[1];
} else if (_local10 == null) {
_local4 = aEdges[0];
} else if (_local11.distance < _local10.distance) {
_local4 = aEdges[0];
} else if (_local11.distance > _local10.distance) {
_local4 = aEdges[1];
} else {
_local4 = chooseEdgeByAngle(_local3, _local6, aEdges);
}
return(_local4);
}
function chooseEdgeByAngle(edge1, edge2, aEdges) {
var _local2;
edge1 = new geometry.Edge(edge1.dest, edge1.org);
var _local5 = (Math.PI * edge1.getAngle()) / 180;
var _local4 = (Math.PI * edge2.getAngle()) / 180;
var _local7 = _local5 - nDirection;
var _local6 = _local4 - nDirection;
if (Math.abs(_local7) < Math.abs(_local6)) {
_local2 = aEdges[0];
} else {
_local2 = aEdges[1];
}
return(_local2);
}
function pull(direction) {
if (bDelayAfterSpitOut) {
return(undefined);
}
nDirection = direction;
if (nDirection > Math.PI) {
nDirection = nDirection - (Math.PI*2);
}
if (nDirection < -3.14159265358979) {
nDirection = nDirection + (Math.PI*2);
}
}
function readyToSpitOut(direction) {
trace(("gameplay.Ball.readyToSpitOut(" + [arguments]) + ")");
nLastHitedBrick = null;
nDirection = direction;
bCatch = false;
bDelayAfterCatch = true;
nCatchTime = gdp.core.time.FrameTimer.getInstance().getTime();
}
function spitOut(Void) {
trace(("gameplay.Ball.spitOut(" + [arguments]) + ")");
Game.getInstance().playSound("frog_spit");
bDelayAfterCatch = false;
}
function catchByFrog(x, y, d, callBack) {
trace(("gameplay.Ball.catchByFrog(" + [bCatch]) + ")");
bCatch = true;
var _local2 = new gdp.ui.effects.tween.Tween(this, new gdp.utils.math.helpers.Point(_x, _y), new gdp.utils.math.helpers.Point(x, y), nSpeed);
_local2.onEnd = callBack;
_local2.run();
}
function myHitTest(mc) {
if ((_x > mc.getX()) && (_x < (mc.getX() + mc.getWidth()))) {
if ((_y > mc.getY()) && (_y < (mc.getY() + mc.getHeight()))) {
return(true);
}
}
return(false);
}
function sortByDistance(point, bricks) {
var _local5 = [];
var _local3 = [];
var _local4;
var _local2 = 0;
while (_local2 < bricks.length) {
_local4 = gameplay.Field.getInstance().getBrick(bricks[_local2]);
if (_local4 != null) {
_local3.push({_index:_local2, data:_local4.getDistanceFromCenter(point)});
} else {
_local3.push(null);
}
_local2++;
}
_local3.sort(gdp.utils.Delegate.create(this, order));
_local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2] != null) {
_local5.push(_local3[_local2].data.brick);
} else {
_local5.push(null);
}
_local2++;
}
return(_local5);
}
function testMoving(Void) {
gdp.core.process.ProcessManager.getInstance().addProcess(processMove);
}
function order(a, b) {
var _local2 = a.data.d;
var _local1 = b.data.d;
if (_local2 < _local1) {
return(-1);
}
if (_local2 > _local1) {
return(1);
}
return(0);
}
static var COL_AXIS = 0;
static var COL_OTHER = 1;
static var COL_NONE = 2;
static var nSpeedBegin = 5;
static var nSpeedBonusIncrement = 2;
static var nSpeedLevelsIncrement = 2;
static var nSpeedHitIncrement = 0.025;
var nSpeedMax = 7;
var geom = null;
var frametimer = null;
var nWackyTime = 30000;
var nWackyBeginTime = null;
var oldpos = null;
var nextpos = null;
var nextposHalf = null;
var bOnPad = null;
var nPositionOnPad = null;
var bSlide = null;
var bPause = null;
var bStrong = null;
var nStrongHitsMaxCount = 20;
var nStrongHitsCurrentCount = null;
var bFire = null;
var bWacky = null;
var nSpeed = null;
var nDirection = null;
var processMove = null;
var nWackyRandomRange = 0.5;
var bCatch = null;
var bDelayAfterCatch = null;
var nCatchTime = null;
var nCatchDelay = 1000;
var vx = null;
var vy = null;
var bDelayAfterSpitOut = null;
var nSpitTime = null;
var nDelayAfterSpit = 1500;
var nLastHitedBrick = null;
var bSpeedBig = null;
var bSpeedUp = null;
var nSpeedUpTime = null;
var nSpeedUpDelay = 10000;
var bSpeedDown = null;
var nSpeedDownTime = null;
var nSpeedDownDelay = 10000;
var nBeginParallelToFloor = null;
var nParallelToFloorDelay = 5000;
var nParallelToFloorChange = 0.2;
var nParallelRange = 0.04;
var nTweakedRange = 0.04;
var nBatAngle = 20;
var distance = null;
var center = null;
}
Symbol 1108 MovieClip [__Packages.elements.Frog] Frame 0
class elements.Frog extends gdp.core.base.BaseMovieClip
{
var _x, _y, gotoAndStop, _width, _height, removeMovieClip;
function Frog () {
super();
}
function init(oData) {
_x = oData.PositionPoints[0].nX;
_y = oData.PositionPoints[0].nY;
center = new gdp.utils.math.helpers.Point(_x + 14, _y + 20);
}
function setEyeClose(Void) {
trace(("elements.Frog.setEyeClose(" + [arguments]) + ")");
(gotoAndStop(1));// not popped
}
function setStart(Void) {
if (bBallsFar) {
(gotoAndStop(1));// not popped
}
bStart = true;
}
function capture(ball) {
if (bStart) {
bStart = false;
bBallsFar = true;
}
if (ball.isCapture()) {
bBallsFar = false;
return(undefined);
}
if (nBeginFreeseTime != null) {
if ((gdp.core.time.FrameTimer.getInstance().getTime() - nBeginFreeseTime) > nFreeseTime) {
nBeginFreeseTime = null;
} else {
return(undefined);
}
}
var _local3 = Math.sqrt(((ball._x - center.nX) * (ball._x - center.nX)) + ((ball._y - center.nY) * (ball._y - center.nY)));
if (_local3 > nRange) {
return(undefined);
}
bBallsFar = false;
pull(_local3, ball);
(gotoAndStop(2));// not popped
}
function spitOut(ball) {
ball.readyToSpitOut(Math.PI - ((Math.random() * 2) * Math.PI));
}
function pull(distance, ball) {
var _local2 = ball.getDirection();
var _local3 = _local2;
if (ball._x < (center.nX + (_width / 2))) {
if (ball._x > (center.nX - (_width / 2))) {
if (ball._y < (center.nY + (_height / 2))) {
if (ball._y > (center.nY - (_height / 2))) {
if (nBeginFreeseTime == null) {
nBeginFreeseTime = gdp.core.time.FrameTimer.getInstance().getTime();
}
ball.catchByFrog(center.nX, center.nY, distance, gdp.utils.Delegate.create(this, spitOut, [ball]));
} else if ((_local2 > -1.5707963267949) && (_local2 < (Math.PI/2))) {
if ((_local2 + (Math.PI/2)) > nPullSpeed) {
_local3 = _local3 - nPullSpeed;
} else {
_local3 = -1.5707963267949;
}
} else {
if (_local2 > 0) {
_local2 = _local2 - (Math.PI*2);
}
if ((-1.5707963267949 - _local2) > nPullSpeed) {
_local3 = _local3 + nPullSpeed;
} else {
_local3 = -1.5707963267949;
}
}
} else if ((_local2 > -1.5707963267949) && (_local2 < (Math.PI/2))) {
if (((Math.PI/2) - _local2) > nPullSpeed) {
_local3 = _local3 + nPullSpeed;
} else {
_local3 = (Math.PI/2);
}
} else {
if (_local2 < 0) {
_local2 = _local2 + (Math.PI*2);
}
if ((_local2 - (Math.PI/2)) > nPullSpeed) {
_local3 = _local3 - nPullSpeed;
} else {
_local3 = (Math.PI/2);
}
}
} else if (ball._y < (center.nY + (_height / 2))) {
if (ball._y > (center.nY - (_height / 2))) {
if ((_local2 > 0) && (_local2 < Math.PI)) {
if (_local2 > nPullSpeed) {
_local3 = _local3 - nPullSpeed;
} else {
_local3 = 0;
}
} else if ((-_local2) < nPullSpeed) {
_local3 = _local3 + nPullSpeed;
} else {
_local3 = 0;
}
} else if ((_local2 > -0.785398163397448) && (_local2 < 2.35619449019234)) {
if ((_local2 + (Math.PI/4)) > nPullSpeed) {
_local3 = _local3 - nPullSpeed;
} else {
_local3 = -0.785398163397448;
}
} else {
if (_local2 > 0) {
_local2 = _local2 - (Math.PI*2);
}
if ((-0.785398163397448 - _local2) < nPullSpeed) {
_local3 = _local3 + nPullSpeed;
} else {
_local3 = -0.785398163397448;
}
}
} else if ((_local2 > -2.35619449019234) && (_local2 < (Math.PI/4))) {
if (((Math.PI/4) - _local2) > nPullSpeed) {
_local3 = _local3 + nPullSpeed;
} else {
_local3 = (Math.PI/4);
}
} else {
if (_local2 < 0) {
_local2 = _local2 + (Math.PI*2);
}
if ((_local2 - (Math.PI/4)) < nPullSpeed) {
_local3 = _local3 - nPullSpeed;
} else {
_local3 = (Math.PI/4);
}
}
} else if (ball._y < (center.nY + (_height / 2))) {
if (ball._y > (center.nY - (_height / 2))) {
if ((_local2 > 0) && (_local2 < Math.PI)) {
if ((Math.PI - _local2) > nPullSpeed) {
_local3 = _local3 + nPullSpeed;
} else {
_local3 = Math.PI;
}
} else if ((_local2 - Math.PI) < nPullSpeed) {
_local3 = _local3 - nPullSpeed;
} else {
_local3 = Math.PI;
}
} else if ((_local2 > -2.35619449019234) && (_local2 < (Math.PI/4))) {
if ((_local2 + 2.35619449019234) > nPullSpeed) {
_local3 = _local3 - nPullSpeed;
} else {
_local3 = -2.35619449019234;
}
} else {
if (_local2 > 0) {
_local2 = _local2 - (Math.PI*2);
}
if ((-2.35619449019234 - _local2) < nPullSpeed) {
_local3 = _local3 + nPullSpeed;
} else {
_local3 = -2.35619449019234;
}
}
} else if ((_local2 > -0.785398163397448) && (_local2 < 2.35619449019234)) {
if ((2.35619449019234 - _local2) < nPullSpeed) {
_local3 = _local3 + nPullSpeed;
} else {
_local3 = 2.35619449019234;
}
} else {
if (_local2 < 0) {
_local2 = _local2 + (Math.PI*2);
}
if ((_local2 - 2.35619449019234) < nPullSpeed) {
_local3 = _local3 - nPullSpeed;
} else {
_local3 = 2.35619449019234;
}
}
ball.pull(_local3);
}
function remove(Void) {
removeMovieClip();
}
var nRange = 50;
var nPullSpeed = 0.1;
var nFreeseTime = 1500;
var nBeginFreeseTime = null;
var center = null;
var bStart = null;
var bBallsFar = null;
}
Symbol 1109 MovieClip [__Packages.elements.BonusContainer] Frame 0
class elements.BonusContainer extends gdp.core.base.BaseMovieClip
{
var _x, _y, removeMovieClip, attachMovie, getNextHighestDepth, _parent, _height, _width, _visible;
function BonusContainer () {
super();
}
function init(oData, order) {
nOrder = order;
nType = oData.Type;
nBrick = oData.Brick;
pPosition = oData.Position;
_x = pPosition.nX;
_y = pPosition.nY;
bFall = false;
switch (nType) {
case 0 :
case 1 :
case 2 :
case 7 :
case 11 :
case 12 :
case 13 :
case 20 :
case 21 :
setContainerCauldron();
break;
case 3 :
setContainerCoinPot();
break;
case 4 :
setContainerLamp();
break;
case 16 :
setContainerMushroom();
break;
case 17 :
setContainerBombMushroom();
break;
case 19 :
setContainerFairyBubble();
break;
case 22 :
setContainerRedBottle();
}
}
function remove(Void) {
if (bFall) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processBonusContainerFall);
}
removeMovieClip();
}
function getPosition(Void) {
return(pPosition);
}
function setContainerCauldron(Void) {
var _local2 = gameplay.Field.getInstance().getBrick(nBrick);
if (pPosition.nY < _local2.getPositionPoints()[0].nY) {
mcBonusContainer = attachMovie("mc_CauldronStand", "mcContainer", getNextHighestDepth());
mcBonusContainer.gotoAndStop(1 + random(4));
bHangCauldron = false;
} else {
mcBonusContainer = attachMovie("mc_CauldronHang", "mcContainer", getNextHighestDepth());
mcBonusContainer.gotoAndPlay(2);
bHangCauldron = true;
}
}
function setContainerCoinPot(Void) {
mcBonusContainer = attachMovie("mc_CoinPot", "mcContainer", getNextHighestDepth());
var _local2 = gameplay.Field.getInstance().getBrick(nBrick);
if (pPosition.nY < _local2.getPositionPoints()[0].nY) {
mcBonusContainer.gotoAndStop(2);
} else {
mcBonusContainer.gotoAndPlay(3);
}
}
function setContainerLamp(Void) {
mcBonusContainer = attachMovie("mc_Lamp", "mcContainer", getNextHighestDepth());
mcBonusContainer.lamp.gotoAndPlay(3);
}
function setContainerMushroom(Void) {
mcBonusContainer = attachMovie("mc_Mushroom", "mcContainer", getNextHighestDepth());
}
function setContainerBombMushroom(Void) {
mcBonusContainer = attachMovie("mc_BombMushroom", "mcContainer", getNextHighestDepth());
}
function setContainerFairyBubble(Void) {
mcBonusContainer = attachMovie("mc_FairyBubble", "mcContainer", getNextHighestDepth());
}
function setContainerRedBottle(Void) {
mcBonusContainer = attachMovie("mc_RedBottle", "mcContainer", getNextHighestDepth());
}
function hit(direction) {
if (bFall) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processBonusContainerFall);
}
switch (nType) {
case 0 :
case 1 :
case 2 :
case 7 :
case 11 :
case 12 :
case 13 :
case 20 :
case 21 :
hitContainerCauldron(direction);
break;
case 3 :
hitCoinPot(direction);
break;
case 4 :
hitContainerLamp();
break;
case 16 :
hitContainerMushroom();
break;
case 17 :
hitContainerBombMushroom();
break;
case 19 :
hitContainerFairyBubble();
break;
case 22 :
hitContainerRedBottle(direction);
}
}
function hitConnectedBrick(Void) {
switch (nType) {
case 0 :
case 1 :
case 2 :
case 7 :
case 11 :
case 12 :
case 13 :
case 20 :
case 21 :
fallContainerCauldron();
break;
case 3 :
fallCoinPot();
break;
case 4 :
fallContainerLamp();
break;
case 16 :
hitContainerMushroom();
break;
case 17 :
hitContainerBombMushroom();
break;
case 19 :
hitContainerFairyBubble();
break;
case 22 :
fallContainerRedBottle();
}
}
function hitContainerCauldron(direction) {
Game.getInstance().playSound("cauldron");
var _local2 = null;
_local2 = elements.BrickExplosion(_parent.attachMovie("cauldron_particle", "mcCauldronParticle", _parent.getNextHighestDepth(), {_x:_x + (_width / 2), _y:_y + (_height / 2)}));
createBonus(direction);
crashContainer();
}
function hitCoinPot(direction) {
Game.getInstance().playSound("cauldron");
var _local5 = null;
var _local2;
var _local6;
var _local3 = 0;
while (_local3 < nCoinsCount) {
_local2 = (_x + mcBonusContainer._x) + (mcBonusContainer._width / 2);
if (_local2 < gameplay.Field.getInstance().getLeftBorder()) {
_local2 = (2 * gameplay.Field.getInstance().getLeftBorder()) - _local2;
}
if (_local2 > gameplay.Field.getInstance().getRightBorder()) {
_local2 = (2 * gameplay.Field.getInstance().getRightBorder()) - _local2;
}
_local6 = (_y + mcBonusContainer._y) + (mcBonusContainer._height / 2);
_local5 = elements.Coin(_parent.attachMovie("mc_Coin", "mcCoin" + _local3, _parent.getNextHighestDepth(), {_x:_local2, _y:_local6}));
var _local4 = Math.PI - ((Math.random() * 2) * Math.PI);
_local5.init(_local4, nCoinSpeed);
_local3++;
}
crashContainer();
}
function hitContainerLamp(Void) {
Game.getInstance().playSound("glass");
var _local2 = null;
_local2 = elements.BrickExplosion(_parent.attachMovie("glass_particle", "mcCauldronParticle", _parent.getNextHighestDepth(), {_x:_x + (_width / 2), _y:_y + (_height / 2)}));
crashContainer();
}
function hitContainerMushroom(Void) {
var _local2 = null;
_local2 = elements.BrickExplosion(_parent.attachMovie("mushroom_particle", "mcMushroomParticle", _parent.getNextHighestDepth(), {_x:_x + (_width / 2), _y:_y + (_height / 2)}));
crashContainer();
}
function hitContainerBombMushroom(Void) {
var _local5 = null;
_local5 = elements.BrickExplosion(_parent.attachMovie("bombMushroom_particle", "mcCauldronParticle", _parent.getNextHighestDepth(), {_x:_x + (_width / 2), _y:_y + (_height / 2)}));
var _local2 = new gdp.utils.math.helpers.Point((_x + mcBonusContainer._x) + (mcBonusContainer._width / 2), (_y + mcBonusContainer._y) + (mcBonusContainer._height / 2));
var _local3 = gameplay.Grid.getInstance().getBricksInRange(_local2, nBombMushroomRange);
var _local4 = gameplay.Grid.getInstance().getBonusesInRange(_local2, nBombMushroomRange);
gameplay.Field.getInstance().bombMushroomExplode(_local3, _local4);
crashContainer();
}
function hitContainerFairyBubble(Void) {
var _local2 = new gdp.utils.math.helpers.Point(_x + (mcBonusContainer._width / 2), _y + (mcBonusContainer._height / 2));
trace(("elements.BonusContainer.hitContainerFairyBubble(" + [_local2]) + ")");
Game.getInstance().playSound("glass");
gameplay.Field.getInstance().addFairy(_local2);
crashContainer();
var _local3 = null;
_local3 = elements.BrickExplosion(_parent.attachMovie("glass_particle", "mcFairyParticle", _parent.getNextHighestDepth(), {_x:_local2.nX, _y:_local2.nY}));
gameplay.Pad.getInstance().addInscription(8, "0");
}
function hitContainerRedBottle(direction) {
Game.getInstance().playSound("glass");
var _local2 = null;
_local2 = elements.BrickExplosion(_parent.attachMovie("glass_particle", "mcCauldronParticle", _parent.getNextHighestDepth(), {_x:_x + (_width / 2), _y:_y + (_height / 2)}));
createRedLiquid(direction);
crashContainer();
}
function fallContainerCauldron(Void) {
var _local2 = gameplay.Field.getInstance().getBrick(nBrick);
if (bHangCauldron) {
mcBonusContainer.gotoAndStop(1);
} else {
mcBonusContainer.gotoAndStop(mcBonusContainer._currentframe + 4);
}
bFall = true;
processBonusContainerFall = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psBonusContainerFall));
gdp.core.process.ProcessManager.getInstance().addProcess(processBonusContainerFall);
}
function fallCoinPot(Void) {
mcBonusContainer.gotoAndStop(2);
bFall = true;
processBonusContainerFall = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psBonusContainerFall));
gdp.core.process.ProcessManager.getInstance().addProcess(processBonusContainerFall);
}
function fallContainerLamp(Void) {
mcBonusContainer.lamp.gotoAndStop(2);
bFall = true;
processBonusContainerFall = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psBonusContainerFall));
gdp.core.process.ProcessManager.getInstance().addProcess(processBonusContainerFall);
}
function fallContainerFairyBubble(Void) {
trace(("elements.BonusContainer.fallContainerFairyBubble(" + [arguments]) + ")");
bFall = true;
processBonusContainerFall = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psBonusContainerFall));
gdp.core.process.ProcessManager.getInstance().addProcess(processBonusContainerFall);
}
function fallContainerRedBottle(Void) {
bFall = true;
processBonusContainerFall = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psBonusContainerFall));
gdp.core.process.ProcessManager.getInstance().addProcess(processBonusContainerFall);
}
function createBonus(direction) {
var _local2 = new gdp.utils.math.helpers.Point((_x + mcBonusContainer._x) + (mcBonusContainer._width / 2), (_y + mcBonusContainer._y) + (mcBonusContainer._height / 2));
gameplay.Field.getInstance().createBonus(nType, _local2, direction);
}
function createRedLiquid(direction) {
var _local4;
trace(("elements.BonusContainer.hitContainerRedBottle(" + [_parent.attachMovie]) + ")");
var _local2 = 0;
while (_local2 < nDropsCount) {
_local4 = _parent.attachMovie("mc_RedLiquid", "mcRedLiquid" + _local2, _parent.getNextHighestDepth(), {_x:(_x + 50) - random(100), _y:(_y + 25) - random(50)});
direction = Math.PI - random(6);
_local4.init(direction, nDropSpeed);
_local2++;
}
}
function crashContainer(Void) {
mcBonusContainer.removeMovieClip();
mcBonusContainer = null;
gameplay.Field.getInstance().removeBonus();
}
function psBonusContainerFall(Void) {
if (windows.GameWindow.getInstance().isUserPause()) {
return(undefined);
}
if (!gameplay.Field.getInstance().isEndOfLevel()) {
if (gameplay.Field.getInstance().isPause()) {
return(undefined);
}
}
if (mcBonusContainer == null) {
return(undefined);
}
if (_y >= gameplay.Field.getInstance().getFloor()) {
Game.getInstance().playSound("water");
gdp.core.process.ProcessManager.getInstance().removeProcess(processBonusContainerFall);
removeMovieClip();
}
if (((_y + _height) >= gameplay.Pad.getInstance()._y) && ((_y + _height) < (gameplay.Pad.getInstance()._y + gameplay.Pad.getInstance()._height))) {
if ((_x >= (gameplay.Pad.getInstance()._x - (gameplay.Pad.getInstance()._width / 2))) && (_x <= (gameplay.Pad.getInstance()._x + (gameplay.Pad.getInstance()._width / 2)))) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processBonusContainerFall);
hit((Math.PI/2));
}
}
var _local4 = gameplay.Grid.getInstance().getNeibousBricks(new gdp.utils.math.helpers.Point(_x, _y));
var _local3 = null;
var _local2 = 0;
while (_local2 < _local4.length) {
_local3 = gameplay.Field.getInstance().getBrick(_local4[_local2]);
if (_local3 != null) {
if (mcBonusContainer.hitTest(_local3) && (_local3._y > _y)) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processBonusContainerFall);
hit((Math.PI/2));
break;
}
}
_local2++;
}
_y = _y + nBonusContainerSpeed;
}
function getX(Void) {
return(_x + mcBonusContainer._x);
}
function getY(Void) {
return(_y + mcBonusContainer._y);
}
function getWidth(Void) {
return(mcBonusContainer._width);
}
function getHeight(Void) {
return(mcBonusContainer._height);
}
function hide(Void) {
_visible = false;
}
function show(Void) {
_visible = true;
}
var nOrder = null;
var nType = null;
var nBrick = null;
var pPosition = null;
var bFall = null;
var mcBonusContainer = null;
var processBonusContainerFall = null;
var nBonusContainerSpeed = 6;
var nCoinsCount = 8;
var nDropsCount = 10;
var nDropSpeed = 4;
var nBombMushroomRange = 75;
var bHangCauldron = null;
var nCoinSpeed = 1;
}
Symbol 1110 MovieClip [__Packages.elements.Coin] Frame 0
class elements.Coin extends gdp.core.base.BaseMovieClip
{
var _y, _x, removeMovieClip, _width;
function Coin () {
super();
gameplay.Field.getInstance().addCoin(this);
}
function init(direction, speed) {
vx = (speed * Math.cos(direction)) + 2;
vy = (-speed) * Math.sin(direction);
processFall = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psFall));
gdp.core.process.ProcessManager.getInstance().addProcess(processFall);
}
function psFall(Void) {
if (windows.GameWindow.getInstance().isUserPause()) {
return(undefined);
}
if (!gameplay.Field.getInstance().isEndOfLevel()) {
if (gameplay.Field.getInstance().isPause()) {
return(undefined);
}
}
if (_y >= gameplay.Field.getInstance().getFloor()) {
if ((_x >= (gameplay.Pad.getInstance()._x - (gameplay.Pad.getInstance()._width / 2))) && (_x <= (gameplay.Pad.getInstance()._x + (gameplay.Pad.getInstance()._width / 2)))) {
windows.GameWindow.getInstance().addCoin();
}
gdp.core.process.ProcessManager.getInstance().removeProcess(processFall);
removeMovieClip();
}
if ((_y >= gameplay.Pad.getInstance()._y) && (_y < (gameplay.Pad.getInstance()._y + gameplay.Pad.getInstance()._height))) {
if ((_x >= (gameplay.Pad.getInstance()._x - (gameplay.Pad.getInstance()._width / 2))) && (_x <= (gameplay.Pad.getInstance()._x + (gameplay.Pad.getInstance()._width / 2)))) {
windows.GameWindow.getInstance().addCoin();
gdp.core.process.ProcessManager.getInstance().removeProcess(processFall);
removeMovieClip();
}
}
if (((_x - (_width / 2)) < gameplay.Field.getInstance().getLeftBorder()) || ((_x + (_width / 2)) > gameplay.Field.getInstance().getRightBorder())) {
vx = -vx;
}
_x = _x + vx;
_y = _y - vy;
if ((vx < (-nAccelerationX)) && (vx > nAccelerationX)) {
if (vx > 0) {
vx = vx - nAccelerationX;
} else {
vx = vx + nAccelerationX;
}
}
vy = vy - nAccelerationY;
}
function remove(Void) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processFall);
removeMovieClip();
}
var processFall = null;
var pSpeedBegin = null;
var nAccelerationX = 0.05;
var nAccelerationY = 0.3;
var vx = null;
var vy = null;
}
Symbol 1111 MovieClip [__Packages.elements.Bonus] Frame 0
class elements.Bonus extends gdp.core.base.BaseMovieClip
{
var _x, _y, removeMovieClip, _height, _width, gotoAndStop, _currentframe;
function Bonus () {
super();
}
function init(direction, speed) {
vx = speed * Math.cos(direction);
vy = speed * Math.sin(direction);
_x = _x + vx;
_y = _y - vy;
processBonusFall = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psBonusFall));
gdp.core.process.ProcessManager.getInstance().addProcess(processBonusFall);
}
function setLockToCatch(Void) {
bLockToCatch = true;
nLockTime = gdp.core.time.FrameTimer.getInstance().getTime();
}
function psBonusFall(Void) {
if (windows.GameWindow.getInstance().isUserPause()) {
return(undefined);
}
if (!gameplay.Field.getInstance().isEndOfLevel()) {
if (gameplay.Field.getInstance().isPause()) {
return(undefined);
}
}
if (_y >= gameplay.Field.getInstance().getFloor()) {
windows.GameWindow.getInstance().notgotBonus();
Game.getInstance().playSound("water");
gdp.core.process.ProcessManager.getInstance().removeProcess(processBonusFall);
removeMovieClip();
}
if (bLockToCatch) {
if ((gdp.core.time.FrameTimer.getInstance().getTime() - nLockTime) > nLockDelay) {
bLockToCatch = false;
}
}
if (((_y + _height) >= gameplay.Pad.getInstance()._y) && ((_y + _height) < (gameplay.Pad.getInstance()._y + gameplay.Pad.getInstance()._height))) {
if ((_x >= (gameplay.Pad.getInstance()._x - (gameplay.Pad.getInstance()._width / 2))) && (_x <= (gameplay.Pad.getInstance()._x + (gameplay.Pad.getInstance()._width / 2)))) {
if (!bLockToCatch) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processBonusFall);
catchBonus();
removeMovieClip();
}
}
}
if (((_x - (_width / 2)) < gameplay.Field.getInstance().getLeftBorder()) || ((_x + (_width / 2)) > gameplay.Field.getInstance().getRightBorder())) {
vx = -vx;
if ((((_x + vx) - (_width / 2)) < gameplay.Field.getInstance().getLeftBorder()) || (((_x + vx) + (_width / 2)) > gameplay.Field.getInstance().getRightBorder())) {
vx = 0;
}
}
_x = _x + vx;
_y = _y - vy;
if ((vx < (-nAccelerationX)) && (vx > nAccelerationX)) {
if (vx != 0) {
if (vx > 0) {
vx = vx - nAccelerationX;
} else {
vx = vx + nAccelerationX;
}
}
}
vy = vy - nAccelerationY;
}
function setType(type) {
nType = type;
if (nType == 7) {
(gotoAndStop(windows.GameWindow.getInstance().getNextChainballLock()));// not popped
}
}
function catchBonus(Void) {
switch (nType) {
case 0 :
gameplay.Field.getInstance().addPointsForJewel(nBlueJewelScore);
windows.GameWindow.getInstance().gotBlueJewel();
break;
case 1 :
gameplay.Field.getInstance().addPointsForJewel(nRedJevelScore);
windows.GameWindow.getInstance().gotRedJewel();
break;
case 2 :
gameplay.Field.getInstance().addPointsForJewel(nYellowJewelScore);
windows.GameWindow.getInstance().gotYellowJewel();
break;
case 7 :
windows.GameWindow.getInstance().unlockChainball(_currentframe);
break;
case 11 :
gameplay.Field.getInstance().threeBall();
break;
case 12 :
gameplay.Field.getInstance().strongBall();
break;
case 13 :
gameplay.Field.getInstance().fireBall();
break;
case 20 :
gameplay.Field.getInstance().speedUp();
break;
case 21 :
gameplay.Field.getInstance().speedDown();
}
}
var nType = null;
var processBonusFall = null;
var nAccelerationX = 0.1;
var nAccelerationY = 0.3;
var vx = null;
var vy = null;
var nBlueJewelScore = 100;
var nRedJevelScore = 200;
var nYellowJewelScore = 400;
var bLockToCatch = false;
var nLockTime = null;
var nLockDelay = 100;
}
Symbol 1112 MovieClip [__Packages.elements.Fairy] Frame 0
class elements.Fairy extends gdp.core.base.BaseMovieClip
{
var _y, _x, fairy, _totalframes, _currentframe, _parent, gotoAndPlay, removeMovieClip;
function Fairy () {
super();
nBrickToDestroy = gameplay.Field.getInstance().getBrickToFairyDestroy();
trace(("elements.Fairy.Fairy(" + [nBrickToDestroy]) + ")");
if (nBrickToDestroy == null) {
remove();
} else {
brickPosition = gameplay.Field.getInstance().getBrickPosition(nBrickToDestroy);
trace(("elements.Fairy.Fairy(" + [this, "start"]) + ")");
var _local3 = Math.sqrt(((_x - brickPosition.nX) * (_x - brickPosition.nX)) + ((_y - brickPosition.nY) * (_y - brickPosition.nY)));
lastDistance = _local3;
changeDirection(brickPosition.nX, brickPosition.nY, _local3);
processWait = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psWait));
processMove = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psMoving));
gdp.core.process.ProcessManager.getInstance().addProcess(processMove);
}
}
function psMoving(Void) {
if (windows.GameWindow.getInstance().isUserPause()) {
return(undefined);
}
if (!gameplay.Field.getInstance().isEndOfLevel()) {
if (gameplay.Field.getInstance().isPause()) {
return(undefined);
}
}
var _local3 = Math.sqrt(((_x - brickPosition.nX) * (_x - brickPosition.nX)) + ((_y - brickPosition.nY) * (_y - brickPosition.nY)));
if (lastDistance < _local3) {
changeDirection(brickPosition.nX, brickPosition.nY, _local3);
}
lastDistance = _local3;
if (_local3 < 5) {
var _local2 = gameplay.Field.getInstance().getBrick(nBrickToDestroy);
trace(("elements.Fairy.psMoving(" + [_local2]) + ")");
if ((_local2 == null) || (_local2 == undefined)) {
nBrickToDestroy = gameplay.Field.getInstance().getBrickToFairyDestroy();
if (nBrickToDestroy == null) {
flyAway();
} else {
brickPosition = gameplay.Field.getInstance().getBrickPosition(nBrickToDestroy);
_local3 = Math.sqrt(((_x - brickPosition.nX) * (_x - brickPosition.nX)) + ((_y - brickPosition.nY) * (_y - brickPosition.nY)));
lastDistance = _local3;
changeDirection(brickPosition.nX, brickPosition.nY, _local3);
}
} else {
gdp.core.process.ProcessManager.getInstance().removeProcess(processMove);
if (vx < 0) {
fairy.gotoAndPlay("right_destroy");
} else {
fairy.gotoAndPlay("left_destroy");
}
gdp.core.process.ProcessManager.getInstance().addProcess(processWait);
}
}
trace(("elements.Fairy.psMoving(" + [this, vx, vy]) + ")");
_x = _x + vx;
_y = _y + vy;
}
function psWait(Void) {
if ((_currentframe == _totalframes) || (_currentframe == 1)) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processWait);
destroyBrick();
}
}
function destroyBrick(Void) {
var _local2 = gameplay.Field.getInstance().getBrick(nBrickToDestroy);
if ((_local2 != null) && (_local2 != undefined)) {
elements.BrickExplosion(_parent.attachMovie("fairy", "mcFairyParticle", _parent.getNextHighestDepth(), {_x:_x, _y:_y}));
_local2.death((Math.PI/2));
flyAway();
return(true);
}
nBrickToDestroy = gameplay.Field.getInstance().getBrickToFairyDestroy();
trace(("elements.Fairy.Fairy(" + [nBrickToDestroy]) + ")");
if (nBrickToDestroy == null) {
flyAway();
} else {
brickPosition = gameplay.Field.getInstance().getBrickPosition(nBrickToDestroy);
var _local3 = Math.sqrt(((_x - brickPosition.nX) * (_x - brickPosition.nX)) + ((_y - brickPosition.nY) * (_y - brickPosition.nY)));
lastDistance = _local3;
changeDirection(brickPosition.nX, brickPosition.nY, _local3);
gdp.core.process.ProcessManager.getInstance().addProcess(processMove);
}
return(false);
}
function flyAway(Void) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processWait);
gdp.core.process.ProcessManager.getInstance().removeProcess(processMove);
position = new gdp.utils.math.helpers.Point(-20 - random(100), gameplay.Field.getInstance().getUpBorder() + random(200));
var _local2 = Math.sqrt(((_x - position.nX) * (_x - position.nX)) + ((_y - position.nY) * (_y - position.nY)));
lastDistance = _local2;
changeDirection(position.nX, position.nY, _local2);
if (vx < 0) {
(gotoAndPlay("right"));// not popped
}
processFlyAway = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psFlyingAway));
gdp.core.process.ProcessManager.getInstance().addProcess(processFlyAway);
}
function psFlyingAway(Void) {
if (gameplay.Field.getInstance().isPause()) {
return(undefined);
}
var _local2 = Math.sqrt(((_x - position.nX) * (_x - position.nX)) + ((_y - position.nY) * (_y - position.nY)));
if (lastDistance == null) {
lastDistance = _local2;
} else {
if (lastDistance < _local2) {
changeDirection(position.nX, position.nY, _local2);
}
lastDistance = _local2;
}
if (_local2 < 5) {
gameplay.Field.getInstance().removeFairy(this);
gdp.core.process.ProcessManager.getInstance().removeProcess(processFlyAway);
remove();
}
trace(("elements.Fairy.psFlyingAway(" + [vx, vy]) + ")");
_x = _x + vx;
_y = _y + vy;
}
function remove(Void) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processWait);
gdp.core.process.ProcessManager.getInstance().removeProcess(processMove);
gdp.core.process.ProcessManager.getInstance().removeProcess(processFlyAway);
removeMovieClip();
}
function changeDirection(x, y, d) {
vx = ((x - _x) * nSpeed) / d;
vy = ((y - _y) * nSpeed) / d;
if (vx < 0) {
fairy.gotoAndPlay("right");
} else {
fairy.gotoAndPlay("left");
}
}
var processMove = null;
var processFlyAway = null;
var processWait = null;
var nSpeed = 2;
var lastDistance = null;
var nBrickToDestroy = null;
var brickPosition = null;
var position = null;
var vx = null;
var vy = null;
}
Symbol 1113 MovieClip [__Packages.msn.Zone] Frame 0
class msn.Zone
{
static var instance;
var bEmulation, onSessionStart, onGameStart, onGameContinue, onGameMenu, onGameMute, onGamePause, onCustomReturn;
function Zone () {
bEmulation = true;
}
static function getInstance() {
if (instance == null) {
instance = new msn.Zone();
}
return(instance);
}
function setEmulation(bEmulation) {
this.bEmulation = bEmulation;
}
function isEmulation(Void) {
return(bEmulation);
}
function customEvent(data) {
if (bEmulation) {
return(customReturn());
}
if (data == undefined) {
fscommand ("CustomEvent", "<gamedata>CustomEvent</gamedata>");
} else {
fscommand ("CustomEvent", gdp.utils.ObjectUtil.toXML({gamedata:data}));
}
}
function gameBreak(nValue) {
trace(("msn.Zone.gameBreak(" + [arguments]) + ")");
if (bEmulation) {
return(gameContinue());
}
fscommand ("GameBreak", gdp.utils.ObjectUtil.toXML({data:{breakpoint:nValue}}));
}
function gameEnd(data) {
if (bEmulation) {
return(gameStart());
}
fscommand ("GameEnd", "<gamedata></gamedata>");
}
function gameError(sErrorType) {
if (bEmulation) {
return(undefined);
}
fscommand ("GameError", sErrorType);
}
function gameReady() {
if (bEmulation) {
return(gameStart());
}
fscommand ("GameReady", "<data><mode></mode><difficulty></difficulty><startlevel></startlevel></data>");
}
function loadBroadcast(nValue) {
if (bEmulation) {
return(undefined);
}
fscommand ("LoadBroadcast", gdp.utils.ObjectUtil.toXML({data:{percentcomplete:nValue}}));
}
function scoreBroadcast(nScore, nTime) {
if (bEmulation) {
return(undefined);
}
fscommand ("ScoreBroadcast", gdp.utils.ObjectUtil.toXML({game:{score:nScore, time:nTime}}));
}
function scoreSubmit(nScore, nTime) {
if (bEmulation) {
return(undefined);
}
fscommand ("ScoreSubmit", gdp.utils.ObjectUtil.toXML({game:{score:nScore, time:nTime}}));
}
function sessionReady() {
if (bEmulation) {
return(sessionStart());
}
fscommand ("SessionReady", "<data></data>");
}
function sessionStart() {
onSessionStart();
}
function gameStart() {
onGameStart();
}
function gameContinue(sData) {
onGameContinue(parseData(sData));
}
function gameMenu() {
onGameMenu();
}
function muteOn() {
onGameMute(false);
}
function muteOff() {
onGameMute(true);
}
function pauseOn() {
onGamePause(true);
}
function pauseOff() {
onGamePause(false);
}
function customReturn(sData) {
onCustomReturn(parseData(sData));
}
function parseData(sData) {
return(gdp.utils.XMLUtil.toObject(new XML(sData)));
}
}
Symbol 1114 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 1115 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.35");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static function addLinkEvent(url, burl, btn, onClick) {
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
var _local3;
var _local2 = new LoadVars();
var timeout = 1500;
var t0 = getTimer();
var ping = this.createEmptyMovieClip("ping", 777);
this.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
delete this.ping;
getURL (url + s, "_blank");
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
delete this.ping;
getURL (burl, "_blank");
}
};
ping.loadMovie("http://x.mochiads.com/linkping.swf?t=" + getTimer());
if (onClick != undefined) {
onClick();
}
};
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 1116 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.7");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 1117 MovieClip [__Packages.oberon.GIS_Helper] Frame 0
class oberon.GIS_Helper extends Object
{
static var listeners, interval;
function GIS_Helper () {
super();
}
static function StartEvent(name) {
fscommand ("GIS_StartEvent", name);
}
static function EventValue(name, value) {
fscommand ("GIS_EventValue", (name + ",") + value);
}
static function SendEvent() {
fscommand ("GIS_SendEvent");
}
static function GetResponse() {
fscommand ("GIS_GetResponse");
}
static function addListener(scope, func) {
if (listeners == null) {
Listen();
listeners = new Array();
}
listeners.push({scope:scope, func:func});
}
static function Listen() {
if (interval == null) {
interval = setInterval(function () {
oberon.GIS_Helper.checkResponse();
}, 50);
}
}
static function EndEvent() {
fscommand ("GIS_EndEvent");
}
static function EndGameScore(mode, score, reason) {
StartEvent("SYS_EndGame");
EventValue("Score", score);
EventValue("mode", mode);
EventValue("reason", reason);
SendEvent();
}
static function checkResponse() {
var _local4;
var _local6;
var _local5 = {};
_local5.GetValue = function ($name) {
return(this[$name]);
};
if (_root.GIS_Response != null) {
_local6 = _root.GIS_Response.split(",");
var _local3 = 0;
while (_local3 < _local6.length) {
_local4 = _local6[_local3].split("=");
_local5[_local4[0]] = _local4[1];
_local3++;
}
_local3 = 0;
while (_local3 < listeners.length) {
listeners[_local3].func.apply(listeners[_local3].scope, [_local5]);
_local3++;
}
_root.GIS_Response = null;
}
}
}
Symbol 1118 MovieClip [__Packages.elements.Particle] Frame 0
class elements.Particle extends gdp.core.base.BaseMovieClip
{
var _totalframes, gotoAndStop, removeMovieClip, _x, _y;
function Particle () {
super();
nBirnTime = gdp.core.time.FrameTimer.getInstance().getTime();
processLife = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psLife));
gdp.core.process.ProcessManager.getInstance().addProcess(processLife);
}
function init(lifeTime, move, direction, speed, animation) {
nLifeTime = lifeTime;
bMove = move;
bAnimation = animation;
if (bMove) {
pSpeedBegin = new gdp.utils.math.helpers.Point(speed * Math.cos(direction), (-speed) * Math.sin(direction));
processMove = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psMove));
gdp.core.process.ProcessManager.getInstance().addProcess(processMove);
}
}
function psLife(Void) {
if (bAnimation) {
var _local2 = Math.floor(((gdp.core.time.FrameTimer.getInstance().getTime() - nBirnTime) / nLifeTime) * _totalframes);
gotoAndStop(_local2);
}
if ((gdp.core.time.FrameTimer.getInstance().getTime() - nBirnTime) > nLifeTime) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processLife);
if (bMove) {
gdp.core.process.ProcessManager.getInstance().removeProcess(processMove);
}
removeMovieClip();
}
}
function psMove(Void) {
var _local2 = (gdp.core.time.FrameTimer.getInstance().getFps() * (gdp.core.time.FrameTimer.getInstance().getTime() - nBirnTime)) / 2000;
var _local4 = pSpeedBegin.nX * _local2;
var _local3 = ((-pSpeedBegin.nY) * _local2) - ((2 * _local2) * _local2);
_x = _x + _local4;
_y = _y - _local3;
}
var nLifeTime = null;
var nBirnTime = null;
var processLife = null;
var nAcceleration = 1;
var bMove = null;
var bAnimation = null;
var pSpeedBegin = null;
var processMove = null;
}
Symbol 1119 MovieClip [__Packages.elements.RedLiquid] Frame 0
class elements.RedLiquid extends gdp.core.base.BaseMovieClip
{
var gotoAndStop, _totalframes, _y, _x, removeMovieClip, _width;
function RedLiquid () {
super();
trace(("elements.RedLiquid.RedLiquid(" + [this]) + ")");
(gotoAndStop(1 + random(_totalframes)));// not popped
}
function init(direction, speed) {
nBirnTime = gdp.core.time.FrameTimer.getInstance().getTime();
pSpeedBegin = new gdp.utils.math.helpers.Point(speed * Math.cos(direction), (-speed) * Math.sin(direction));
processFall = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psFall));
trace(("elements.RedLiquid.init(" + [processFall]) + ")");
gdp.core.process.ProcessManager.getInstance().addProcess(processFall);
}
function psFall(Void) {
if (windows.GameWindow.getInstance().isUserPause()) {
return(undefined);
}
if (!gameplay.Field.getInstance().isEndOfLevel()) {
if (gameplay.Field.getInstance().isPause()) {
return(undefined);
}
}
if (_y >= gameplay.Field.getInstance().getFloor()) {
if ((_x >= (gameplay.Pad.getInstance()._x - (gameplay.Pad.getInstance()._width / 2))) && (_x <= (gameplay.Pad.getInstance()._x + (gameplay.Pad.getInstance()._width / 2)))) {
gameplay.Field.getInstance().catchRedLiquid();
}
gdp.core.process.ProcessManager.getInstance().removeProcess(processFall);
removeMovieClip();
}
if ((_y >= gameplay.Pad.getInstance()._y) && (_y < (gameplay.Pad.getInstance()._y + gameplay.Pad.getInstance()._height))) {
if ((_x >= (gameplay.Pad.getInstance()._x - (gameplay.Pad.getInstance()._width / 2))) && (_x <= (gameplay.Pad.getInstance()._x + (gameplay.Pad.getInstance()._width / 2)))) {
gameplay.Field.getInstance().catchRedLiquid();
gdp.core.process.ProcessManager.getInstance().removeProcess(processFall);
removeMovieClip();
}
}
if (((_x - (_width / 2)) < gameplay.Field.getInstance().getLeftBorder()) || ((_x + (_width / 2)) > gameplay.Field.getInstance().getRightBorder())) {
pSpeedBegin.nX = -pSpeedBegin.nX;
}
var _local2 = (gdp.core.time.FrameTimer.getInstance().getFps() * (gdp.core.time.FrameTimer.getInstance().getTime() - nBirnTime)) / 2000;
var _local4 = pSpeedBegin.nX * _local2;
var _local3 = (pSpeedBegin.nY * _local2) - ((6 * _local2) * _local2);
trace(("elements.RedLiquid.psFall(" + [_local4, _local3]) + ")");
_x = _x + _local4;
_y = _y - _local3;
}
var processFall = null;
var pSpeedBegin = null;
var nBirnTime = null;
}