Combined Code
movieClip 9 {
}
movieClip 11 BlackSquare {
}
movieClip 18 {
frame 12 {
stop();
}
}
movieClip 20 {
}
movieClip 22 {
}
movieClip 23 {
frame 23 {
stop();
}
}
movieClip 24 walk01 {
}
frame 1 {
function sitelock(urls_allowed) {
lock = true;
domain_parts = _url.split('://');
real_domain = domain_parts[1].split('/');
domain.text = real_domain[0];
for (x in urls_allowed) {
if (urls_allowed[x] == real_domain[0]) {
lock = false;
}
}
if (lock) {
_root._visible = false;
_root._alpha = 0;
}
}
Playtomic = {};
Playtomic.Link = {};
Playtomic.Link.Open = function (url) {
getURL(url, '_blank');
};
stop();
Stage.scaleMode = 'noScale';
var custom_menu = new ContextMenu();
custom_menu.hideBuiltInItems();
_root.menu = custom_menu;
_root.tabEnabled = false;
_root.tabChildren = false;
urls_allowed = ['', 'www.flashgamelicense.com'];
Playtomic.Log.View(2441, '305d4cc236f94b32', _root._url);
Log.CustomMetric('GameView');
Log.ForceSend();
Stage.scaleMode = 'noScale';
FrPercent = 0;
_root.onEnterFrame = function () {
percent = Math.floor((_root.getBytesLoaded() / getBytesTotal()) * 100);
++FrPercent;
DisplayPercent = percent < FrPercent ? percent : FrPercent;
if (percent >= 100) {
delete _root.onEnterFrame;
if (_root._visible) {
play();
}
} else {
texto.text = DisplayPercent + '%';
}
};
more.onPress = function () {};
}
movieClip 29 {
}
movieClip 31 {
}
movieClip 33 {
}
movieClip 34 {
}
movieClip 40 {
}
movieClip 41 {
}
movieClip 47 {
}
movieClip 48 {
}
frame 2 {
stop();
AG_mc.onPress = function () {
var v1 = 'http://www.addictinggames.com';
Playtomic.Link.Open(v1, 'AG');
};
AG_mc.onEnterFrame = function () {
if (AG_mc._totalframes == AG_mc._currentframe) {
play();
}
AG_mc.removeMovieClip();
};
}
movieClip 50 {
}
movieClip 53 {
}
movieClip 55 {
}
movieClip 57 {
}
movieClip 58 {
}
movieClip 59 {
}
movieClip 61 {
}
movieClip 63 {
}
movieClip 65 {
}
movieClip 66 {
}
movieClip 68 {
}
movieClip 69 {
}
movieClip 71 {
}
movieClip 73 {
}
movieClip 75 {
}
movieClip 77 {
}
movieClip 79 {
}
movieClip 81 {
}
movieClip 83 {
}
movieClip 86 {
}
movieClip 89 {
}
movieClip 92 {
frame 1 {
}
}
frame 3 {
function PlatformMovement(sp, yield, positions) {
if (this.movement == null) {
this.movement = new Object();
var v3 = this.movement;
v3.state = 0;
v3.yieldTime = 1;
v3.pos = 0;
if (positions[v3.pos] == 'default' || positions[v3.pos] == null) {
positions[v3.pos] = [this.x, this.y];
}
}
v3 = this.movement;
switch (v3.state) {
case 0:
var v2 = positions[v3.pos];
if (v2[1] != this.y || v2[0] != this.x) {
var v7 = Math.atan2(v2[1] - this.y, v2[0] - this.x);
var v5 = sp * Math.cos(v7);
var v6 = sp * Math.sin(v7);
if (this.type == 'solid') {
this.MoveSolid(v5, v6);
this.AddForce = v5;
} else {
this.Move(v5, v6);
}
if (this.type == 'cloud') {
this.AddForce = v5;
}
if (Math.abs(GetDistance(this.x, this.y, v2[0], v2[1])) < sp) {
if (this.type == 'solid') {
this.MoveSolid(v2[0] - this.x, v2[1] - this.y);
} else {
this.Move(v2[0] - this.x, v2[1] - this.y);
}
this.ChangeState(v3, positions);
}
} else {
this.ChangeState(v3, positions);
}
break;
case 1:
this.AddForce = 0;
if (v3.yieldTime-- <= 0) {
v3.state = 0;
v3.yieldTime = yield;
}
}
}
function BubbleMovement(topPoint) {
if (this.movement == null) {
this.movement = new Object();
var v2 = this.movement;
v2.OrigX = this.x;
v2.OrigY = this.y;
v2.Sead = Math.random() * 1000;
}
v2 = this.movement;
this.x = v2.OrigX + Math.sin((v2.Sead + getTimer()) / 200) * this.r / 4;
this.y -= this.r / 15;
if (this.y + this.r < int(topPoint)) {
this.y = H + this.r + int(topPoint);
}
this._x = this.x;
this._y = this.y;
}
function Attachment(obNum, x, y, clamp) {
var v2 = Level[obNum][-1];
movx = v2.x - this.x + x;
movy = v2.y - this.y + y;
this.AddForce = movx;
this.MoveUndefined(movx, movy);
if (clamp) {
if (this.y + this.h < 0) {
this.y = v2.y - H + y;
} else {
if (this.y > H) {
this.y = v2.y + H + y;
}
}
}
this._x = this.x;
this._y = this.y;
}
function HorizontalScrolling(sp) {
this.AddForce = sp;
this.MoveUndefined(sp, 0);
if (this.x + this.w < 0) {
this.x += W + this.w;
} else {
if (this.x > W) {
this.x -= W + this.w;
}
}
this._x = this.x;
this._y = this.y;
}
function CircularMotion(r, pos, speed, ang) {
if (this.movement == null) {
this.movement = new Object();
var v2 = this.movement;
v2.ang = ang;
}
v2 = this.movement;
v2.ang += speed;
this.AddForce = -this.x + (pos[0] + r * Math.cos(v2.ang));
this.MoveUndefined(-this.x + (pos[0] + r * Math.cos(v2.ang)), -this.y + (pos[1] + r * Math.sin(v2.ang)));
if (v2.ang > Math.PI) {
v2.ang -= 6.283185307179586;
} else {
if (v2.ang < -Math.PI) {
v2.ang += 6.283185307179586;
}
}
this._x = this.x;
this._y = this.y;
}
function BallLifter(force) {
for (var v4 in Hammers) {
var v2 = Hammers[v4];
if (intersects(this, v2)) {
LiftPhysicsFall.apply(v2, [force]);
}
}
}
function LiftAllHeammers(force) {
for (var v3 in Hammers) {
var v1 = Hammers[v3];
LiftPhysicsFall.apply(v1, [force]);
}
}
function LiftPhysicsFall(force) {
var v2 = this.movement;
v2.Yacel -= force;
}
function PhysicsFall(fl, AddGr) {
if (this.movement == null) {
this.movement = new Object();
this.type = 'hammer';
Hammers.push(this);
var v2 = this.movement;
v2.Yacel = 0;
v2.CanSoudn = true;
v2.OrigY = this.y;
v2.floor = fl - this.h;
v2.gravity = gravity + ((AddGr == null) ? 0 : AddGr);
}
v2 = this.movement;
v2.Yacel += v2.gravity;
if (v2.CanSoudn && v2.Yacel > 8) {
v2.CanSoudn = false;
if (int(Math.random() * 2) == 0) {
PlaySound('blade');
} else {
PlaySound('blade2');
}
}
this.SetPosition(this.x, this.y + v2.Yacel);
if (this.y > v2.floor) {
v2.CanSoudn = true;
PlaySound('sfx_pow');
this.SetPosition(this.x, v2.floor);
v2.Yacel *= -0.2;
} else {
if (this.y < v2.OrigY) {
this.SetPosition(this.x, v2.OrigY);
v2.Yacel = 0;
}
}
this._x = this.x;
this._y = this.y;
}
function ChangeAllNegatives(BeginState, OnTime, OffTime) {
if (this.movement == null) {
this.movement = new Object();
var v3 = this.movement;
v3.state = (BeginState == null) ? false : BeginState;
v3.time = 0;
for (var v4 in ch_mc.Negatives) {
var v2 = ch_mc.Negatives[v4];
v2.active = v3.state;
if (v3.state) {
v2._alpha = 0;
} else {
v2._alpha = 0;
}
}
}
v3 = this.movement;
if (v3.time++ >= (v3.state ? OnTime : OffTime)) {
v3.state = !v3.state;
v3.time = 0;
for (v4 in ch_mc.Negatives) {
v2 = ch_mc.Negatives[v4];
v2.active = v3.state;
if (v3.state) {
v2._alpha0;
} else {
v2._alpha = 0;
}
}
}
}
function LowerTrigger(Low, sp) {
if (this.movement == null) {
this.movement = new Object();
var v2 = this.movement;
v2.origY = this.YOffset;
}
v2 = this.movement;
if (!this.attachObject.In) {
if (this.YOffset < v2.origY) {
this.YOffset += sp;
} else {
this.YOffset = v2.origY;
}
} else {
if (this.YOffset > v2.origY + Low) {
this.YOffset -= sp;
} else {
this.YOffset = v2.origY + Low;
}
}
}
function CreateSounds() {
if (_root.Sound_mc != null) {
return false;
}
_root.SFX = true;
_root.BGM = true;
_root.createEmptyMovieClip('Sound_mc', 178556);
CreateNewSound('LevelPass');
CreateNewSound('Death_sfx');
CreateNewSound('button_click');
CreateNewSound('sfx_win');
CreateNewSound('GamePlayloop');
CreateNewSound('menuloop');
CreateNewSound('EndMusic');
CreateNewSound('blade');
CreateNewSound('blade2');
CreateNewSound('mecheene');
Sound_mc.RealVolume = 100;
Sound_mc.Volume = 100;
Sound_mc.Song = '';
Sound_mc.Next = '';
Sound_mc.keyListener = new Object();
Sound_mc.keyListener.onKeyDown = function () {
if (Key.isDown(77)) {
SwitchSound();
}
};
Key.addListener(Sound_mc.keyListener);
return true;
}
function CreateNewSound(MyN, NewN) {
if (NewN == null) {
NewN = MyN;
}
Sound_mc.createEmptyMovieClip(NewN + '_mc', Sound_mc.getNextHighestDepth());
Sound_mc[NewN] = new Sound(Sound_mc[NewN + '_mc']);
Sound_mc[NewN].attachSound(MyN);
Sound_mc[NewN + '_mc'].isPlaying = false;
}
function SwitchSound() {
_root.SFX = !_root.SFX;
_root.BGM = _root.SFX;
if (_root.BGM) {
Sound_mc.BGsound.setVolume(Sound_mc.Volume);
Sound_mc.GamePlayloop.setVolume(Sound_mc.Volume);
Sound_mc.menuloop.setVolume(Sound_mc.Volume);
} else {
Sound_mc.BGsound.setVolume(0);
Sound_mc.GamePlayloop.setVolume(0);
Sound_mc.menuloop.setVolume(0);
}
Cont.Snd_mc.gotoAndStop(_root.SFX ? 1 : 2);
Playtomic.Log.CustomMetric(_root.SFX ? 'sound on' : 'sound off', 'Sound');
Playtomic.Log.ForceSend();
}
function PlaySound(sng, vol) {
if (!_root.SFX) {
return undefined;
}
Sound_mc[sng].setVolume((vol == null) ? 60 : vol);
Sound_mc[sng].start();
}
function PlaySong(nxt, canloop, FadeSp) {
if (canloop == null) {
canloop = true;
}
if (FadeSp == null) {
FadeSp = 4;
}
Sound_mc.FadingOut = false;
Sound_mc.FadingIn = false;
Sound_mc.canloop = canloop;
Sound_mc.Next = (nxt == undefined) ? Sound_mc.Next : nxt;
if (Sound_mc.Next == Sound_mc.Song) {
Sound_mc.Next = '';
return undefined;
}
if (Sound_mc.Song == '') {
Sound_mc.Song = Sound_mc.Next;
Sound_mc[Sound_mc.Song].setVolume((vol == null) ? Sound_mc.Volume : vol);
Sound_mc[Sound_mc.Song].start();
if (canloop) {
Sound_mc[Sound_mc.Song].onSoundComplete = function () {
this.start();
};
} else {
Sound_mc[Sound_mc.Song].onSoundComplete = function () {
Sound_mc.Song == '';
};
}
Sound_mc.Next = '';
} else {
Sound_mc.FadeSp = FadeSp;
Sound_mc.onEnterFrame = function () {
this.Volume -= this.FadeSp;
if (_root.BGM) {
this[this.Song].setVolume(this.Volume);
}
if (this.Volume <= 0) {
this.Volume = this.RealVolume;
this[this.Song].stop();
this.Song = this.Next;
if (_root.BGM) {
this[this.Song].setVolume(this.Volume);
}
this[this.Song].stop();
this[this.Song].start();
if (Sound_mc.canloop) {
Sound_mc[Sound_mc.Song].onSoundComplete = function () {
this.start();
};
} else {
Sound_mc[Sound_mc.Song].onSoundComplete = function () {
Sound_mc.Song == '';
};
}
this.Next = '';
delete this.onEnterFrame;
}
};
}
}
function LoopSound(sng, vol) {
Sound_mc.FadingOut = false;
Sound_mc.FadingIn = false;
if (sng == null || Sound_mc[sng + '_mc'].isPlaying == true) {
return false;
}
if (!_root.SFX) {
Sound_mc[sng].setVolume(0);
} else {
Sound_mc[sng].setVolume((vol == null) ? 100 : vol);
}
Sound_mc[sng].start();
Sound_mc[sng].onSoundComplete = function () {
this.start();
};
Sound_mc[sng + '_mc'].isPlaying = true;
return true;
}
function StopLoop(sng) {
Sound_mc.FadingOut = false;
Sound_mc.FadingIn = false;
Sound_mc[sng].stop();
Sound_mc[sng + '_mc'].isPlaying = false;
}
function FadeInSound(FadeSp) {
if (Sound_mc.FadingIn) {
return undefined;
}
if (FadeSp == null) {
FadeSp = 4;
}
Sound_mc.FadingIn = true;
Sound_mc.FadeSp = FadeSp;
Sound_mc.onEnterFrame = function () {
this.Volume += this.FadeSp;
if (this.Volume >= this.RealVolume) {
this.Volume = this.RealVolume;
Sound_mc.FadingOut = false;
Sound_mc.FadingIn = false;
delete this.onEnterFrame;
}
if (_root.BGM) {
this[this.Song].setVolume(this.Volume);
}
};
}
function FadeOutSound(FadeSp) {
if (Sound_mc.FadingOut) {
return undefined;
}
if (FadeSp == null) {
FadeSp = 4;
}
Sound_mc.FadingOut = true;
Sound_mc.FadeSp = FadeSp;
Sound_mc.onEnterFrame = function () {
this.Volume -= this.FadeSp;
if (this.Volume <= 0) {
this.Volume = 0;
Sound_mc.FadingOut = false;
Sound_mc.FadingIn = false;
delete this.onEnterFrame;
}
if (_root.BGM) {
this[this.Song].setVolume(this.Volume);
}
};
}
function ChooseLoop(loop, num, total) {
var v1 = 1;
while (v1 <= total) {
if (v1 == num) {
LoopSound(loop + v1);
} else {
StopLoop(loop + v1);
}
++v1;
}
}
function LoadData(deel) {
Edit = true;
SaveFile = SharedObject.getLocal('AsleepData');
_root.SaveData = SaveFile.data;
LevelNumber = -1;
if (SaveData.Levels == null || deel) {
_root.FirstTimePlaying = true;
SaveData.TotalTime = 0;
SaveData.loops = 0;
SaveData.Levels = [];
SaveData.Levels[1] = {'playable': true};
var v2 = 2;
while (v2 < 31) {
SaveData.Levels[v2] = {'playable': false};
++v2;
}
} else {
_root.FirstTimePlaying = false;
var v2 = 2;
while (v2 < 31) {
if (!SaveData.Levels[v2].playable) {
LevelNumber = v2 - 1;
break;
}
++v2;
}
}
}
MovieClip.prototype.ChangeState = function (mov, positions) {
mov.state = 1;
if (mov.pos >= positions.length - 1) {
mov.pos = 0;
if (positions[mov.pos][0] == null || positions[mov.pos][0] == 'default') {
positions[mov.pos][0] = positions[positions.length - 1][0];
}
if (positions[mov.pos][1] == null || positions[mov.pos][1] == 'default') {
positions[mov.pos][1] = positions[positions.length - 1][1];
}
} else {
++mov.pos;
if (positions[mov.pos][0] == null || positions[mov.pos][0] == 'default') {
positions[mov.pos][0] = positions[mov.pos - 1][0];
}
if (positions[mov.pos][1] == null || positions[mov.pos][1] == 'default') {
positions[mov.pos][1] = positions[mov.pos - 1][1];
}
}
};
LoadData();
}
movieClip 94 {
}
movieClip 95 {
frame 1125 {
stop();
}
}
// unknown tag 88 length 79
movieClip 98 {
}
movieClip 100 {
}
movieClip 102 {
}
movieClip 104 {
}
movieClip 106 {
}
movieClip 108 {
}
movieClip 110 {
}
movieClip 114 {
}
movieClip 115 {
}
movieClip 118 {
}
movieClip 119 OnTop {
}
movieClip 122 {
}
movieClip 126 {
}
movieClip 128 {
}
movieClip 129 {
}
movieClip 130 {
frame 32 {
stop();
}
}
movieClip 134 {
}
movieClip 168 {
}
movieClip 169 {
}
movieClip 170 Intro {
}
movieClip 173 BigBall {
frame 1 {
stop();
}
}
movieClip 175 CloudSquare {
}
movieClip 177 TransSquare {
}
movieClip 179 EditSquare {
}
movieClip 181 HurtSquare {
}
movieClip 183 NegativeSquare {
}
movieClip 185 TriggerSquare {
}
movieClip 187 skip {
}
movieClip 190 Transition1 {
}
movieClip 192 BGText {
}
movieClip 196 {
}
// unknown tag 88 length 74
movieClip 201 {
frame 1 {
stop();
}
}
movieClip 205 {
}
movieClip 206 {
frame 40 {
stop();
}
frame 211 {
stop();
}
}
movieClip 207 menu {
}
movieClip 209 {
}
movieClip 211 DarkLev {
}
movieClip 217 {
frame 1 {
stop();
}
}
movieClip 218 LevelScreen {
}
movieClip 221 Gr_Hammer {
}
movieClip 223 Gr_Switch {
}
movieClip 226 Gr_Follow {
}
movieClip 228 Gr_Platform {
}
movieClip 230 Gr_LSpike {
}
movieClip 233 Gr_Spike1 {
}
movieClip 235 ball {
}
movieClip 237 Gr_ball {
}
movieClip 239 Gr_SingleSpike {
}
movieClip 241 Gr_Spike2 {
}
movieClip 245 {
}
movieClip 247 Gr_Bubble {
frame 2 {
this._rotation = -180 + int(Math.random() * 360);
}
}
movieClip 249 Gr_Spike3 {
}
movieClip 251 Gr_Spike4 {
}
movieClip 253 Gr_SpFloor {
}
movieClip 266 {
}
movieClip 269 {
}
movieClip 271 {
}
movieClip 274 {
}
movieClip 277 {
}
movieClip 281 {
frame 1 {
stop();
}
}
movieClip 282 {
frame 1 {
stop();
}
}
// unknown tag 88 length 181
movieClip 285 {
}
movieClip 286 {
frame 100 {
stop();
}
}
movieClip 287 LevelWon {
}
movieClip 292 {
}
movieClip 298 {
}
movieClip 301 {
}
movieClip 302 {
frame 1000 {
stop();
}
}
movieClip 303 {
frame 1289 {
stop();
}
}
movieClip 306 epilogue {
}
movieClip 310 {
}
movieClip 311 Msg_1 {
}
movieClip 316 soun_mc {
}
movieClip 319 {
}
movieClip 320 {
frame 170 {
stop();
}
}
movieClip 323 {
}
movieClip 324 {
}
movieClip 325 {
}
movieClip 328 {
}
movieClip 329 {
}
movieClip 330 {
}
movieClip 333 {
}
movieClip 334 {
}
movieClip 337 {
}
movieClip 371 {
frame 32 {
stop();
}
}
movieClip 382 {
}
movieClip 383 {
}
movieClip 384 {
frame 121 {
stop();
}
}
movieClip 385 {
}
movieClip 390 {
}
movieClip 393 {
}
movieClip 394 {
}
movieClip 395 {
frame 287 {
stop();
}
}
movieClip 396 RGLogo {
}
movieClip 409 {
}
movieClip 412 {
frame 1 {
stop();
}
}
frame 4 {
function DisplayLogo() {
_root.attachMovie('RGLogo', 'rg_mc', 123);
rg_mc.cont = 240;
rg_mc._x = 0;
rg_mc.onEnterFrame = function () {
if (rg_mc.cont-- <= 0) {
this.removeMovieClip();
DisplayMenu();
}
};
}
function DisplayMenu() {
if (_root.AGLogo_mc == null) {
_root.attachMovie('AGLogo', 'AGLogo_mc', 999999999);
AGLogo_mc._width = 120;
AGLogo_mc._yscale = AGLogo_mc._xscale;
AGLogo_mc._y = 235;
AGLogo_mc._x = 530;
AGLogo_mc.onPress = function () {
var v1 = 'http://www.addictinggames.com';
Playtomic.Link.Open(v1, 'AG');
};
}
_root.attachMovie('menu', 'menu_mc', 100);
menu_mc.more_mc.texto.text = 'more games';
menu_mc.continue_mc.texto.text = 'continue';
menu_mc.JiG_mc.onPress = function () {
Playtomic.Link.Open('http://jayisgames.com', 'JIG');
};
var v3 = 1;
while (v3 < 31) {
++v3;
}
if (LevelNumber <= 1) {
menu_mc.play_mc.texto.text = 'play';
menu_mc.continue_mc._alpha = 50;
} else {
menu_mc.play_mc.texto.text = 'new game';
menu_mc.continue_mc.onPress = function () {
if (Key.isDown(16)) {
LevelSelection();
return undefined;
}
Playtomic.Log.CustomMetric('ContinueButtonPressed');
Playtomic.Log.Play();
Playtomic.Log.ForceSend();
menu_mc.removeMovieClip();
Begin();
};
menu_mc.continue_mc.onMouseMove = SelectButton;
}
CreateSounds();
PlaySong('menuloop');
menu_mc.play_mc.onPress = function () {
menu_mc.removeMovieClip();
LevelNumber = 1;
Playtomic.Log.CustomMetric('PlayButtonPressed');
Playtomic.Log.ForceSend();
LoadData(true);
FirstTimePlaying = false;
Intro();
};
menu_mc.more_mc.onPress = function () {
Playtomic.Link.Open('http://www.addictinggames.com', 'AG');
Playtomic.Log.CustomMetric('MoreGamesButtonPressed');
Playtomic.Log.ForceSend();
};
menu_mc.play_mc.onMouseMove = SelectButton;
menu_mc.more_mc.onMouseMove = SelectButton;
menu_mc.guy.dif = menu_mc.guy._x - menu_mc.sh._x;
menu_mc.guy.onEnterFrame = function () {
this._x += 2;
if (this._x > 650) {
this._x = -20;
}
menu_mc.sh._x = this._x - this.dif;
};
}
function SelectButton() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
function LevelSelection() {
_root.attachMovie('LevelScreen', 'lev_mc', 100);
Playtomic.Log.CustomMetric('LevelSelectionScreen');
Playtomic.Log.Play();
Playtomic.Log.ForceSend();
var v3 = 1;
while (v3 < 31) {
lev_mc['l_' + v3].texto.text = v3;
lev_mc['l_' + v3].num = v3;
if (SaveData.Levels[v3].playable) {
lev_mc['l_' + v3].gotoAndStop(2);
lev_mc['l_' + v3].onPress = function () {
LevelNumber = this.num;
lev_mc.removeMovieClip();
Begin();
Playtomic.Log.Play();
};
}
++v3;
}
}
function Intro() {
PlaySong('menuloop');
_root.attachMovie('Intro ', 'Intro_mc', 100);
Intro_mc.attachMovie('skip', 'x', 100);
Intro_mc.attachMovie('Transition1', 'trans_mc', 150);
Intro_mc.trans_mc._width *= 2;
Intro_mc.trans_mc._height *= 2;
Intro_mc.trans_mc._y -= 35;
Intro_mc.trans_mc.play();
Intro_mc._xscale = 92.30769230769231;
Intro_mc._yscale = 92.30769230769231;
Intro_mc._y += 25;
Intro_mc.End = false;
Intro_mc.gotoAndPlay(835);
Intro_mc.guy.gotoAndPlay(835);
Intro_mc.shadow.gotoAndPlay(835);
Intro_mc.x.onPress = function () {
Intro_mc.End = true;
};
Intro_mc.onEnterFrame = function () {
if (Intro_mc._currentframe >= Intro_mc._totalframes || Key.isDown(27)) {
Intro_mc.End = true;
Intro_mc.stop();
}
if (Intro_mc._currentframe == 1144) {
PlaySong('GamePlayloop');
}
if (Intro_mc.End) {
Intro_mc.trans_mc.prevFrame();
if (Intro_mc.trans_mc._currentframe <= 1) {
if (Intro_mc._currentframe < Intro_mc._totalframes) {
Playtomic.Log.CustomMetric('IntroSkiped');
Playtomic.Log.ForceSend();
}
Playtomic.Log.Play();
Intro_mc.removeMovieClip();
Begin();
}
} else {
if (Intro_mc.trans_mc._currentframe >= Intro_mc.trans_mc._totalframes) {
Intro_mc.trans_mc.stop();
}
}
};
}
function Begin() {
StopLoop('mecheene');
PlaySong('GamePlayloop');
if (Edit == null) {
Edit = false;
}
Stage_W = 600;
W = 600;
Stage_H = 250;
H = 250;
Stage_F = 200;
F = 200;
gravity = 2;
if (LevelNumber == null || LevelNumber < 1) {
LevelNumber = 0;
}
LevelOrder = [13, 1, 2, 16, 11, 15, 7, 14, 3, 12, 6, 21, 5, 23, 19, 9, 18, 4, 22, 17, 10, 8, 24, 25, 26, 27];
BGOrder = [1, 1, 1, 1, 4, 4, 4, 4, 4, 2, 2, 2];
StartLevel();
}
function GetLevelValues(LevelNum) {
F = Stage_F;
W = Stage_W;
H = Stage_H;
var v1 = [];
switch (LevelNum) {
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 0:
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 1:
W = 800;
H = W * Stage_H / Stage_W;
F = int(H - 100);
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 2:
W = 800;
H = W * Stage_H / Stage_W;
F = int(H - 100);
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 3:
W = 500;
H = W * Stage_H / Stage_W;
F = int(H - 60);
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 4:
W = 1500;
H = W * Stage_H / Stage_W;
F = int(H - 50);
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 5:
W = 800;
H = W * Stage_H / Stage_W;
F = int(H - 50);
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 6:
W = 800;
H = W * Stage_H / Stage_W;
F = int(H - 50);
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 8:
W = 800;
H = W * Stage_H / Stage_W;
F = int(H - 50);
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 9:
W = 1500;
H = W * Stage_H / Stage_W;
F = int(H / 2);
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 10:
W = 1500;
H = W * Stage_H / Stage_W;
F = int(H / 2) + 80;
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 11:
W = 800;
H = W * Stage_H / Stage_W;
F = 100;
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 12:
W = 1500;
H = W * Stage_H / Stage_W;
F = int(H - 100);
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 13:
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 15:
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 16:
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 17:
W = 2000;
H = W * Stage_H / Stage_W;
F = 525;
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 18:
W = 1500;
H = W * Stage_H / Stage_W;
F = int(H - 20);
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 19:
W = 2100;
H = W * Stage_H / Stage_W;
F = 135;
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 20:
W = 2000;
H = W * Stage_H / Stage_W;
F = 525;
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 21:
W = 1500;
H = W * Stage_H / Stage_W;
F = int(H - 400);
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 22:
W = 1000;
H = W * Stage_H / Stage_W;
F = 100;
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 23:
W = 1000;
H = W * Stage_H / Stage_W;
F = int(H - 100);
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
case 25:
W = 1000;
H = W * Stage_H / Stage_W;
F = int(H - 50);
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
}
v1[2] = 27;
return {'F': F, 'level': GetLevel(LevelNum), 'W': W, 'H': H, 'Text': v1};
}
function GetLevel(LevelNum) {
var v1 = new Array();
switch (LevelNum) {
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case undefined:
v1 = [['floor'], ['display', 'Msg_1']];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 1:
v1 = [['floor'], ['graphic', 'Gr_Follow', 2, null, null, 1, 1, true, null], ['follow', 0.4], ['graphic', 'Gr_Platform', 4, null, null, 1, 1, true, null], ['cloud', [PlatformMovement, [3, 120, [null, [180, null]]]], W - 280, 100, 80, 16], ['graphic', 'Gr_Platform', 6, null, null, 1, 1, true, null], ['cloud', [PlatformMovement, [3, 120, [null, [W, null]]]], W - 200, 100, 80, 16], ['solid', [PlatformMovement, [3, 24, [null, [null, 100]]]], 100, F, 80, F], ['graphic', 'Gr_Follow', 9, null, 20, null, null, null, null], ['hurt', [PlatformMovement, [2, 100, [null, [null, F - 20]]]], 200, F, W - 200, H - F]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 2:
v1 = [['solid', [PlatformMovement, [3, 60, [null, []]]], 0, F, 475, H], ['graphic', 'BlackSquare', null, null, null, 1, 1, true, null], ['solid', [PlatformMovement, [3, 60, [null, [], [null, F - 75]]]], 150, F, 325, H], ['graphic', 'Gr_LSpike', null, null, null, null, null, null, null], ['hurt', [PlatformMovement, [3, 60, [null, [], [null, F - 75]]]], 125, F, 325, H], ['graphic', 'BlackSquare', null, null, null, 1, 1, true, null], ['solid', [PlatformMovement, [3, 60, [null, [], [], [null, F - 125]]]], 280, F, 195, H], ['graphic', 'Gr_LSpike', null, null, null, null, null, null, null], ['hurt', [PlatformMovement, [3, 60, [null, [], [], [null, F - 125]]]], 260, F, 195, H], ['graphic', 'Gr_Platform', null, null, null, 1, 1, true, null], ['cloud', [PlatformMovement, [3, 120, [null, [475, null]]]], W, 133, 80, 12]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 3:
v1 = [['floor'], ['graphic', 'Gr_Follow', 2, null, null, 1, 1, true, null], ['follow', 0.5], ['graphic', 'Gr_Spike2', null, null, null, null, null, null, null], ['hurt', [PlatformMovement, [3, 120, [null, [null, 50]]]], 250, 235, 25, 100], ['pizza', 75, null, 1, 45, 90]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 4:
v1 = [['floor'], ['graphic', 'Gr_Follow', 2, null, null, 1, 1, true, null], ['follow', 1.2], ['graphic', 'Gr_Hammer', 4, null, null, 1, 1, false, null], ['hurt', [PhysicsFall, [F]], 200, -50, 50, 75], ['graphic', 'Gr_Switch', 6, null, null, 0, 0, false, null, [LowerTrigger, [6, 0.1]]], ['trigger', [LiftAllHeammers, [2.1]], null, null, 150, F - 10, 50, 60], ['graphic', 'Gr_Hammer', 8, null, null, 2, 2, false, null], ['hurt', [PhysicsFall, [F]], 400, -50, 50, 75], ['graphic', 'Gr_Switch', 10, null, null, 0, 0, false, null, [LowerTrigger, [6, 0.1]]], ['trigger', [LiftAllHeammers, [2.1]], null, null, 350, F - 10, 50, 60], ['graphic', 'Gr_Hammer', 12, null, null, 2, 2, false, null], ['hurt', [PhysicsFall, [F]], 600, -50, 50, 75], ['graphic', 'Gr_Switch', 14, null, null, 0, 0, false, null, [LowerTrigger, [6, 0.1]]], ['trigger', [LiftAllHeammers, [2.1]], null, null, 550, F - 10, 50, 60], ['graphic', 'Gr_Hammer', 16, null, null, 2, 2, false, null], ['hurt', [PhysicsFall, [F]], 800, -50, 50, 75], ['graphic', 'Gr_Switch', 18, null, null, 0, 0, false, null, [LowerTrigger, [6, 0.1]]], ['trigger', [LiftAllHeammers, [2.1]], null, null, 750, F - 10, 50, 60], ['graphic', 'Gr_Hammer', 20, null, null, 2, 2, false, null], ['hurt', [PhysicsFall, [F]], 1000, -50, 50, 75], ['graphic', 'Gr_Switch', 22, null, null, 0, 0, false, null, [LowerTrigger, [6, 0.1]]], ['trigger', [LiftAllHeammers, [2.1]], null, null, 950, F - 10, 50, 60], ['graphic', 'Gr_Hammer', 24, null, null, 2, 2, false, null], ['hurt', [PhysicsFall, [F]], 1200, -50, 50, 75], ['graphic', 'Gr_Switch', 26, null, null, 0, 0, false, null, [LowerTrigger, [6, 0.1]]], ['trigger', [LiftAllHeammers, [2.1]], null, null, 1150, F - 10, 50, 60], ['graphic', 'Gr_Hammer', 28, null, null, 2, 2, false, null], ['hurt', [PhysicsFall, [F]], 1400, -50, 50, 75], ['graphic', 'Gr_Switch', 30, null, null, 0, 0, false, null, [LowerTrigger, [6, 0.1]]], ['trigger', [LiftAllHeammers, [2.1]], null, null, 1350, F - 10, 50, 60], ['graphic', 'Gr_Hammer', 32, null, null, 2, 2, false, null], ['hurt', [PhysicsFall, [F]], 1600, -50, 50, 75], ['graphic', 'Gr_Switch', 34, null, null, 0, 0, false, null, [LowerTrigger, [6, 0.1]]], ['trigger', [LiftAllHeammers, [2.1]], null, null, 1550, F - 10, 50, 60]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 5:
v1 = [['floor'], ['graphic', 'Gr_Spike3', null, null, null, 1, 1, true, null], ['hurt', [PlatformMovement, [2, 48, [null, [null, F - 100]]]], 100, F + 25, 100, 100], ['solid', [PlatformMovement, [2, 48, [null, [null, F + 25]]]], 225, F - 100, 100, 100], ['graphic', 'Gr_Spike3', null, null, null, 1, 1, true, null], ['hurt', [PlatformMovement, [2, 48, [null, [null, F - 325]]]], 225, F - 200, 100, 100], ['graphic', 'Gr_Spike3', null, null, null, 1, 1, true, null], ['hurt', [PlatformMovement, [2, 48, [null, [null, F - 100]]]], 325, F + 25, 100, 100], ['solid', [PlatformMovement, [2, 48, [null, [null, F + 25]]]], 450, F - 100, 100, 100], ['graphic', 'Gr_Spike3', null, null, null, 1, 1, true, null], ['hurt', [PlatformMovement, [2, 48, [null, [null, F - 325]]]], 450, F - 200, 100, 100], ['graphic', 'Gr_Spike3', null, null, null, 1, 1, true, null], ['hurt', [PlatformMovement, [2, 48, [null, [null, F - 100]]]], 550, F + 25, 100, 100], ['solid', [PlatformMovement, [2, 48, [null, [null, F + 25]]]], 675, F - 100, 100, 100], ['graphic', 'Gr_Spike3', null, null, null, 1, 1, true, null], ['hurt', [PlatformMovement, [2, 48, [null, [null, F - 325]]]], 675, F - 200, 100, 100]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 6:
v1 = [['floor'], ['graphic', 'BlackSquare', null, null, null, 1, 1, true, null], ['cloud', [PlatformMovement, [3, 24, [null, [null, F + 10]]]], 550, F - 120, 200, 300], ['solid', [PlatformMovement, [3, 24, [null, [680, null]]]], 550, 95, 300, 500], ['graphic', 'Gr_Platform', null, null, null, 0, -4, false, null], ['cloud', [PlatformMovement, [9, 24, [null, [60, null]]]], 450, 175, 125, 25], ['graphic', 'Gr_Platform', null, null, null, 0, -4, false, null], ['cloud', [PlatformMovement, [3, 24, [null, [null, 200]]]], 185, 70, 125, 25], ['graphic', 'BlackSquare', null, null, null, 1, 1, true, null], ['cloud', [PlatformMovement, [3, 24, [null, [440, null]]]], 310, 95, 250, 25], ['pizza', 75, null, 1, 45, 90]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 7:
v1 = [['floor'], ['negative', null, null, [ChangeAllNegatives, [false, 100, 133]], 120, 80, 70, 120], ['negative', null, null, null, 420, 80, 70, 120], ['graphic', 'DarkLev', -1, null, null, 600, 250, null, null]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 8:
v1 = [['floor'], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['bounce', 25, 40, 25, 10, [-10, 10], F], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['bounce', W - 125, 25, 25, -10, [-10, 10], F], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['bounce', W / 2, -150, 32, 0, [-10, 10], F]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 9:
v1 = [['graphic', 'Gr_Platform', null, null, null, 0, -7, false, null], ['solid', null, 0, F, 200, 25], ['graphic', 'Gr_Platform', null, null, null, 0, -7, false, null], ['cloud', [PlatformMovement, [3, 24, [null, [200, null]]]], 400, F, 100, 25], ['graphic', 'Gr_Platform', null, null, null, 0, -7, false, null], ['cloud', [PlatformMovement, [3, 24, [null, [700, null]]]], 500, F, 100, 25], ['graphic', 'Gr_Platform', null, null, null, 0, -7, false, null], ['cloud', [PlatformMovement, [3, 24, [null, [800, null]]]], 1000, F, 100, 25], ['graphic', 'Gr_Platform', null, null, null, 0, -7, false, null], ['cloud', [PlatformMovement, [3, 24, [null, [1300, null]]]], 1100, F, 100, 25], ['graphic', 'Gr_Platform', null, null, null, 0, -7, false, null], ['solid', null, 1400, F, 200, 25]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 10:
v1 = [['solid', [PlatformMovement, [2.5, 1, [null, [W, null]]]], 0, F, 400, 25], ['graphic', 'Gr_Spike3', null, null, null, 1, 1, true, null], ['fall', 250, 70, 100, 8], ['graphic', 'Gr_Spike3', null, null, null, 1, 1, true, null], ['fall', 500, 70, 100, 11], ['graphic', 'Gr_Spike3', null, null, null, 1, 1, true, null], ['fall', 750, 70, 100, 14], ['graphic', 'Gr_Spike3', null, null, null, 1, 1, true, null], ['fall', 1000, 70, 100, 17], ['graphic', 'Gr_Spike3', null, null, null, 1, 1, true, null], ['fall', 1250, 70, 100, 20]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 11:
v1 = [['solid', null, 0, F, W, 12], ['graphic', 'Gr_Spike1', null, null, null, null, null, null, null], ['hurt', [PhysicsFall, [F + 60]], 100, F - 60, 50, 60], ['graphic', 'Gr_Spike1', null, null, null, null, null, null, null], ['hurt', [PhysicsFall, [F + 60]], 200, F - 60, 50, 60], ['graphic', 'Gr_Spike1', null, null, null, null, null, null, null], ['hurt', [PhysicsFall, [F + 60]], 300, F - 60, 50, 60], ['graphic', 'Gr_Spike1', null, null, null, null, null, null, null], ['hurt', [PhysicsFall, [F + 60]], 400, F - 60, 50, 60], ['graphic', 'Gr_Spike1', null, null, null, null, null, null, null], ['hurt', [PhysicsFall, [F + 60]], 500, F - 60, 50, 60], ['graphic', 'Gr_Spike1', null, null, null, null, null, null, null], ['hurt', [PhysicsFall, [F + 60]], 600, F - 60, 50, 60], ['graphic', 'Gr_Spike1', null, null, null, null, null, null, null], ['hurt', [PhysicsFall, [F + 60]], 700, F - 60, 50, 60], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['bounce', W, H, 100, -16, null, H, null, null, [BallLifter, [3]]]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 12:
v1 = [['solid', null, 0, F, W, 12], ['solid', null, W / 2 + 50, 125, W, 12], ['graphic', 'Gr_Platform', null, null, null, 1, 1, true, null], ['cloud', [PlatformMovement, [3, 100, [null, [null, null], [null, null], [null, null], [null, null], [null, null], [null, 125], [W, null]]]], W / 2, F + 2, 50, 12], ['graphic', 'Gr_Follow', null, null, 25, 1, 1, true, null], ['hurt', [PlatformMovement, [0.18, 1, [null, [null, 0]]]], 0, H, W, H]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 13:
v1 = [['floor'], ['graphic', 'Gr_Hammer', 2, null, null, null, null, null, null], ['hurt', [PhysicsFall, [F, -1.8]], 300, -140, 86, 145], ['graphic', 'Gr_Switch', 4, null, null, null, null, null, null, [LowerTrigger, [2, 0.2]]], ['trigger', [LiftAllHeammers, [0.23]], null, null, 250, F - 4, 50, 60]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 14:
v1 = [['floor'], ['graphic', 'Gr_SingleSpike', null, null, null, null, null, null, null], ['fall', 100, 10, 50, 10], ['graphic', 'Gr_SingleSpike', null, null, null, null, null, null, null], ['fall', 200, 10, 50, 10], ['graphic', 'Gr_SingleSpike', null, null, null, null, null, null, null], ['fall', 300, 10, 50, 10], ['graphic', 'Gr_SingleSpike', null, null, null, null, null, null, null], ['fall', 400, 10, 50, 10], ['graphic', 'Gr_SingleSpike', null, null, null, null, null, null, null], ['fall', 500, 10, 50, 10]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 15:
v1 = [['floor'], ['graphic', 'Gr_Follow', 2, null, null, 1, 1, true, null], ['follow', 1.5], ['graphic', 'Gr_SingleSpike', null, null, null, null, null, null, null], ['fall', 300, 10, 50, 9]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 16:
v1 = [['floor'], ['pizza', 125, null, 1, 45, 90]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 17:
v1 = [['solid', null, 0, F, 275, 20], ['graphic', 'Gr_Platform', null, null, null, 1, 1, true, null], ['solid', [CircularMotion, [300, [550, H / 2], 0.02, Math.PI]], 0, 0, 100, 15], ['graphic', 'Gr_Platform', null, null, null, 1, 1, true, null], ['solid', [CircularMotion, [300, [1250, H / 2], -0.02, 0]], 0, 0, 100, 15], ['graphic', 'Gr_Platform', null, null, null, 1, 1, true, null], ['cloud', null, 1630, F, 400, 20]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 18:
v1 = [['solid', null, 0, F, W, 20], ['hurt', null, -W, H, W * 3, H], ['hurt', null, -W, -H, W * 3, H], ['solid', [Attachment, [5, 0, -2, true]], 0, 0, 200, 100], ['graphic', 'Gr_Spike4', null, null, null, 1, 1, true, null], ['fall', 150, 200, 400, -4, 0], ['solid', [Attachment, [8, 0, -2, true]], 0, 0, 200, 100], ['graphic', 'Gr_Spike4', null, null, null, 1, 1, true, null], ['fall', 150, 200, 400, -4, 512.5], ['solid', [Attachment, [11, 0, 0, true]], 0, 0, 200, 100], ['graphic', 'Gr_Spike4', null, null, null, 1, 1, true, null], ['fall', 350, 200, 400, 0, 0], ['solid', [Attachment, [14, 0, 0, true]], 0, 0, 200, 100], ['graphic', 'Gr_Spike4', null, null, null, 1, 1, true, null], ['fall', 350, 200, 400, 0, 512.5], ['solid', [Attachment, [17, 0, -2, true]], 0, 0, 200, 100], ['graphic', 'Gr_Spike4', null, null, null, 1, 1, true, null], ['fall', 550, 200, 400, -4, 0], ['solid', [Attachment, [20, 0, -2, true]], 0, 0, 200, 100], ['graphic', 'Gr_Spike4', null, null, null, 1, 1, true, null], ['fall', 550, 200, 400, -4, 512.5], ['solid', [Attachment, [23, 0, 0, true]], 0, 0, 200, 100], ['graphic', 'Gr_Spike4', null, null, null, 1, 1, true, null], ['fall', 750, 200, 400, 0, 0], ['solid', [Attachment, [26, 0, 0, true]], 0, 0, 200, 100], ['graphic', 'Gr_Spike4', null, null, null, 1, 1, true, null], ['fall', 750, 200, 400, 0, 512.5], ['solid', [Attachment, [29, 0, -2, true]], 0, 0, 200, 100], ['graphic', 'Gr_Spike4', null, null, null, 1, 1, true, null], ['fall', 950, 200, 400, -4, 0], ['solid', [Attachment, [32, 0, -2, true]], 0, 0, 200, 100], ['graphic', 'Gr_Spike4', null, null, null, 1, 1, true, null], ['fall', 950, 200, 400, -4, 512.5], ['solid', [Attachment, [35, 0, 0, true]], 0, 0, 200, 100], ['graphic', 'Gr_Spike4', null, null, null, 1, 1, true, null], ['fall', 1150, 200, 400, 0, 0], ['solid', [Attachment, [38, 0, 0, true]], 0, 0, 200, 100], ['graphic', 'Gr_Spike4', null, null, null, 1, 1, true, null], ['fall', 1150, 200, 400, 0, 512.5], ['solid', null, W - 150, F, 150, 20]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 19:
v1 = [['solid', null, 0, F, 200, 20], ['solid', [HorizontalScrolling, [10]], 0, 525, 100, 15], ['solid', [HorizontalScrolling, [10]], 550, 525, 100, 15], ['solid', [HorizontalScrolling, [10]], 1100, 525, 100, 15], ['solid', [HorizontalScrolling, [10]], 1650, 525, 100, 15], ['graphic', 'Gr_Spike2', null, 10, null, 50, 50, false, null], ['hurt', null, W - 10, 335, 10, 300], ['solid', null, W - 200, H - 20, 200, 20]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 21:
v1 = [['solid', null, 0, F, W, 20], ['graphic', 'Gr_Bubble', null, null, null, 1, 1, true, null], ['circle', 300, 600, 25, [BubbleMovement]], ['graphic', 'Gr_Bubble', null, null, null, 1, 1, true, null], ['circle', 200, 700, 60, [BubbleMovement]], ['graphic', 'Gr_Bubble', null, null, null, 1, 1, true, null], ['circle', 1000, 650, 22, [BubbleMovement]], ['graphic', 'Gr_Bubble', null, null, null, 1, 1, true, null], ['circle', 900, 700, 80, [BubbleMovement]], ['graphic', 'Gr_Bubble', null, null, null, 1, 1, true, null], ['circle', 500, 100, 80, [BubbleMovement]], ['graphic', 'Gr_Bubble', null, null, null, 1, 1, true, null], ['circle', 1400, 900, 60, [BubbleMovement]], ['graphic', 'Gr_Bubble', null, null, null, 1, 1, true, null], ['circle', 1200, 500, 30, [BubbleMovement]], ['graphic', 'Gr_Bubble', null, null, null, 1, 1, true, null], ['circle', 1300, 500, 72, [BubbleMovement]]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 99999999:
trace('this is imposible!!!');
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 23:
v1 = [['solid', null, 0, F, W, H], ['graphic', 'Gr_Ball', null, null, null, 1, 1, true, null], ['circle', 0, 0, 20, [CircularMotion, [200, [500, F], 0.04, 0]]], ['graphic', 'Gr_Ball', null, null, null, 1, 1, true, null], ['circle', 0, 0, 20, [CircularMotion, [200, [500, F], 0.04, 1.570796326794897]]], ['graphic', 'Gr_Ball', null, null, null, 1, 1, true, null], ['circle', 0, 0, 20, [CircularMotion, [200, [500, F], 0.04, Math.PI]]], ['graphic', 'Gr_Ball', null, null, null, 1, 1, true, null], ['circle', 0, 0, 20, [CircularMotion, [200, [500, F], 0.04, 4.71238898038469]]], ['pizza', 150, null, 1, 45, 290, -1]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 20:
v1 = [['cloud', null, 0, F, 280, 20], ['cloud', [CircularMotion, [200, [450, H / 2], 0.04, Math.PI]], 0, 0, 100, 15], ['solid', [CircularMotion, [200, [750, H / 2], 0.04, 0]], 0, 0, 100, 15], ['solid', [CircularMotion, [200, [1050, H / 2], 0.04, Math.PI]], 0, 0, 100, 15], ['solid', [CircularMotion, [200, [1350, H / 2], 0.04, 0]], 0, 0, 100, 15], ['cloud', null, 1630, 330, 400, 20]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 99999998:
trace('this is imposible!!');
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 22:
v1 = [['solid', null, 0, F, W - 600, 20], ['graphic', 'Gr_Platform', null, null, null, 1, 1, true, null], ['solid', [HorizontalScrolling, [-8]], 0, 200, 500, 15], ['graphic', 'Gr_SpFloor', null, null, null, 1, 1, true, null], ['hurt', null, 200, 230, W, 15], ['solid', null, 200, 245, W, 15], ['solid', null, 0, H - 15, W, 15], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['bounce', 400, 250, 25, -6, null, H - 15], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['bounce', 900, 250, 25, -6, [-10, 10], H - 15]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 24:
v1 = [['cloud', null, 0, F, W, 10], ['graphic', 'Gr_Bubble', null, null, null, 1, 1, true, null], ['circle', 100, F, 30, [BubbleMovement]], ['graphic', 'Gr_Bubble', null, null, null, 1, 1, true, null], ['circle', 200, F - 50, 30, [BubbleMovement]], ['graphic', 'Gr_Bubble', null, null, null, 1, 1, true, null], ['circle', 300, F - 100, 30, [BubbleMovement]], ['graphic', 'Gr_Bubble', null, null, null, 1, 1, true, null], ['circle', 400, F - 150, 30, [BubbleMovement]], ['graphic', 'Gr_Bubble', null, null, null, 1, 1, true, null], ['circle', 500, F - 200, 30, [BubbleMovement]], ['graphic', 'Gr_Bubble', null, null, null, 1, 1, true, null], ['circle', 600, F - 250, 30, [BubbleMovement]]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 25:
v1 = [['graphic', 'Gr_Platform', null, null, null, 1, 0.5, true, null], ['solid', null, 0, F, 100, 25], ['graphic', 'Gr_Platform', null, null, null, 1, 0.5, true, null], ['cloud', [PlatformMovement, [1, 48, [null, [null, F - 15]]]], 100, F, 80, 25], ['graphic', 'Gr_Platform', null, null, null, 1, 0.5, true, null], ['cloud', [PlatformMovement, [1, 48, [null, [null, F - 15]]]], 180, F - 30, 80, 25], ['graphic', 'Gr_Platform', null, null, null, 1, 0.5, true, null], ['cloud', [PlatformMovement, [1, 48, [null, [null, F - 45]]]], 260, F - 30, 80, 25], ['graphic', 'Gr_Platform', null, null, null, 1, 0.5, true, null], ['cloud', [PlatformMovement, [1, 48, [null, [null, F - 45]]]], 340, F - 60, 80, 25], ['graphic', 'Gr_Platform', null, null, null, 1, 0.5, true, null], ['cloud', [PlatformMovement, [1, 48, [null, [null, F - 75]]]], 420, F - 60, 80, 25], ['graphic', 'Gr_Platform', null, null, null, 1, 0.5, true, null], ['cloud', [PlatformMovement, [1, 48, [null, [null, F - 75]]]], 500, F - 90, 80, 25], ['graphic', 'Gr_Platform', null, null, null, 1, 0.5, true, null], ['cloud', [PlatformMovement, [1, 48, [null, [null, F - 105]]]], 580, F - 90, 80, 25], ['graphic', 'Gr_Platform', null, null, null, 1, 0.5, true, null], ['cloud', [PlatformMovement, [1, 48, [null, [null, F - 105]]]], 660, F - 120, 80, 25], ['graphic', 'Gr_Platform', null, null, null, 1, 0.5, true, null], ['cloud', [PlatformMovement, [1, 48, [null, [null, F - 135]]]], 740, F - 120, 80, 25], ['graphic', 'Gr_Platform', null, null, null, 1, 0.5, true, null], ['cloud', [PlatformMovement, [1, 48, [null, [null, F - 135]]]], 820, F - 150, 80, 25], ['graphic', 'Gr_Platform', null, null, null, 1, 0.5, true, null], ['cloud', [PlatformMovement, [1, 48, [null, [null, F - 165]]]], 900, F - 150, 80, 25], ['graphic', 'Gr_Platform', null, null, null, 1, 0.5, true, null], ['cloud', [PlatformMovement, [1, 48, [null, [null, F - 165]]]], 980, F - 180, 80, 25]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 26:
v1 = [['solid', null, 0, F, W, 25], ['graphic', 'Gr_Follow', 2, null, null, 1, 1, true, null], ['follow', 1], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 25, [CircularMotion, [25, [100, 105], 0.1, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 25, [CircularMotion, [25, [200, 105], -0.1, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 25, [CircularMotion, [25, [300, 105], 0.1, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 25, [CircularMotion, [25, [400, 105], -0.1, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 25, [CircularMotion, [25, [500, 105], 0.1, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 25, [CircularMotion, [25, [600, 105], -0.1, 0]]]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
case 27:
var v7 = 150;
var v3 = 60;
var v2 = -0.08;
var v6 = 320;
var v4 = 260;
var v8 = 0.08;
var v5 = 490;
v1 = [['floor'], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 8, [CircularMotion, [20, [v7, v3], v2, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 8, [CircularMotion, [40, [v7, v3], v2, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 8, [CircularMotion, [60, [v7, v3], v2, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 8, [CircularMotion, [80, [v7, v3], v2, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 8, [CircularMotion, [100, [v7, v3], v2, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 8, [CircularMotion, [20, [v6, v4], v8, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 8, [CircularMotion, [40, [v6, v4], v8, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 8, [CircularMotion, [60, [v6, v4], v8, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 8, [CircularMotion, [80, [v6, v4], v8, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 8, [CircularMotion, [100, [v6, v4], v8, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 8, [CircularMotion, [20, [v5, v3], v2, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 8, [CircularMotion, [40, [v5, v3], v2, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 8, [CircularMotion, [60, [v5, v3], v2, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 8, [CircularMotion, [80, [v5, v3], v2, 0]]], ['graphic', 'Gr_ball', null, null, null, 1, 1, true, null], ['circle', 300, 600, 8, [CircularMotion, [100, [v5, v3], v2, 0]]]];
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
}
v1.push(['hurt', null, -W, H * 2, W * 3, H]);
v1.push(['hurt', null, -100, -H, 100, H * 3]);
return Duplicate2DArray(v1);
}
function StartLevel(FromReset) {
if (LevelNumber == 27) {
ShowEpilogue();
return undefined;
}
Pause = false;
LevelValues = GetLevelValues(LevelOrder[LevelNumber - 1]);
Level = LevelValues.level;
bg_mc.gotoAndStop(BGOrder[LevelNumber - 1]);
Hammers = [];
if (LevelOrder[LevelNumber - 1] == 18) {
LoopSound('mecheene');
} else {
StopLoop('mecheene');
}
_root.createEmptyMovieClip('Cont', 10);
_root.text_mc.removeMovieClip();
if (LevelValues.Text[0] != null) {
_root.TxtFader(LevelValues.Text[0], LevelValues.Text[1], LevelValues.Text[2]);
}
Cont._xscale = Stage_W * 100 / W;
Cont._yscale = Cont._xscale;
ch_mc = Cont.attachMovie('walk01', 'ch_mc', Cont.getNextHighestDepth());
ObjChar.apply(ch_mc);
for (var v3 in Level) {
var v2 = Level[v3];
v2[-1] = CreateObject(v2, int(v3));
}
Cont.OT_mc.removeMovieClip();
Cont.attachMovie('OnTop', 'OT_mc', Cont.getNextHighestDepth());
Cont.attachMovie('soun_mc', 'Snd_mc', Cont.getNextHighestDepth());
ObjSnd.apply(Cont.Snd_mc);
Cont.OT_mc._xscale = 100 * (100 / Cont._xscale);
Cont.OT_mc._yscale = 100 * (100 / Cont._yscale);
ObjTransition.apply(Cont, [true]);
if (FromReset == false || FromReset == null) {
var v4 = new flash.geom.ColorTransform(1, 1, 1, 1, Math.random() * 100 - 50, Math.random() * 100 - 50, Math.random() * 100 - 50, 0);
var v5 = new flash.geom.Transform(bg_mc);
v5.colorTransform = v4;
}
}
function ShowEpilogue() {
_root.createEmptyMovieClip('Cont', 10);
PlaySong('EndMusic');
Cont.attachMovie('epilogue', 'ep_mc', 10);
Cont.attachMovie('OnTop', 'OT_mc', Cont.getNextHighestDepth());
Cont.ep_mc.cloud_mc.Score_mc._txt.text = 'FINAL SCORE:\nSUBMIT';
Cont.ep_mc.timer = 0;
Cont.ep_mc.onEnterFrame = function () {
if (this.timer++ == 319) {
this.cloud_mc.menu_mc.onPress = function () {
Cont.removeMovieClip();
DisplayMenu();
};
}
if (this.timer == 248) {
var v2 = SaveData.TotalTime / 24;
this.cloud_mc.stats_mc._txt.text = 'Total time: ' + int(v2) + ':' + int((v2 - int(v2)) * 24) + '\nTotal loops:' + SaveData.loops;
}
if (this.timer == 289) {
var v3 = SaveData.TotalTime / 24;
this.cloud_mc.Score_mc._txt.text = 'SUBMIT TIME';
this.cloud_mc.Score_mc.time.text = int(v3) + 's';
this.cloud_mc.Score_mc.loops.text = SaveData.loops;
this.cloud_mc.Score_mc.onPress = function () {};
}
};
}
function NextLevel() {
StopLoop('mecheene');
++LevelNumber;
StartLevel();
}
function LevelStats() {
StopLoop('mecheene');
_root.text_mc.removeMovieClip();
Cont.attachMovie('LevelWon', 'levst_mc', Cont.getNextHighestDepth());
Cont.levst_mc.L_mc.title_mc.title.text = 'Level ' + LevelNumber + ' complete';
Cont.levst_mc.L_mc.circ_mc.gotoAndStop(LevelNumber);
Cont.levst_mc.attachMovie('OnTop', 'OT_mc', Cont.levst_mc.getNextHighestDepth());
var v3 = 1;
while (v3 < 28) {
Cont.levst_mc.L_mc.circ_mc['l_' + v3]._txt.text = v3;
if (v3 <= LevelNumber) {
Cont.levst_mc.L_mc.circ_mc['l_' + v3].gotoAndStop(2);
}
++v3;
}
var v4 = SaveData.TotalTime / 24;
Cont.levst_mc.L_mc.tm_mc.tm.text = int(v4);
Cont.levst_mc.L_mc.lp_mc.lp.text = SaveData.loops;
Cont.levst_mc._xscale = 100 * (100 / Cont._xscale);
Cont.levst_mc._yscale = 100 * (100 / Cont._yscale);
Cont.levst_mc.onPress = function () {
NextLevel();
};
Cont.levst_mc.timer = 0;
Cont.levst_mc.onEnterFrame = function () {
if (this.timer++ >= 48 && Key.isDown(32)) {
NextLevel();
}
};
}
function CreateEditor() {
Mouse.removeListener(mouseListener);
var v2 = Cont.attachMovie('EditSquare', 'editor_mc', Cont.getNextHighestDepth());
v2.sq._width = 0;
v2.sq._height = 0;
v2.pressed = false;
mouseListener = new Object();
mouseListener.ob = v2;
mouseListener.onMouseDown = function () {
this.ob.pressed = true;
this.ob._x = Cont._xmouse;
this.ob._y = Cont._ymouse;
};
mouseListener.onMouseMove = function () {
if (this.ob.pressed) {
this.ob.sq._width = Cont._xmouse - this.ob._x;
this.ob.sq._height = Cont._ymouse - this.ob._y;
this.ob.texto.text = 'x:' + this.ob._x + ', y:' + this.ob._y + ', w:' + this.ob.sq._width + ', h:' + this.ob.sq._height;
updateAfterEvent();
}
};
mouseListener.onMouseUp = function () {
this.ob.pressed = false;
this.ob.sq._width = 0;
this.ob.sq._height = 0;
trace(this.ob.texto.text);
this.ob.texto.text = '';
};
Mouse.addListener(mouseListener);
}
function Reset() {
StopLoop('mecheene');
++SaveData.loops;
Cont.removeMovieClip();
StartLevel(true);
}
function CreateObject(obj, pos) {
switch (obj[0]) {
return storedv2;
case 'display':
var v2 = Cont.attachMovie(obj[1], 'ob_' + Cont.getNextHighestDepth(), Cont.getNextHighestDepth());
ObjDisplay.apply(obj[2], obj[3], obj[4], obj[5]);
return v2;
case 'graphic':
var v2 = Cont.attachMovie(obj[1], 'ob_' + Cont.getNextHighestDepth(), Cont.getNextHighestDepth());
ObjGraphic.apply(v2, [(obj[2] == null) ? int(pos + 1) : obj[2], obj[3], obj[4], obj[5], obj[6], obj[7], obj[8], obj[9]]);
return v2;
case 'floor':
var v2 = Cont.attachMovie('BlackSquare', 'ob_' + Cont.getNextHighestDepth(), Cont.getNextHighestDepth());
ObjSolid.apply(v2, [0, F, W, H - F]);
return v2;
case 'solid':
var v2 = Cont.attachMovie('BlackSquare', 'ob_' + Cont.getNextHighestDepth(), Cont.getNextHighestDepth());
ObjSolid.apply(v2, [obj[2], obj[3], obj[4], obj[5], obj[1]]);
return v2;
case 'cloud':
var v2 = Cont.attachMovie('CloudSquare', 'ob_' + Cont.getNextHighestDepth(), Cont.getNextHighestDepth());
ObjSolid.apply(v2, [obj[2], obj[3], obj[4], obj[5], obj[1]]);
v2.type = 'cloud';
return v2;
case 'hurt':
var v2 = Cont.attachMovie('HurtSquare', 'ob_' + Cont.getNextHighestDepth(), Cont.getNextHighestDepth());
ObjHurt.apply(v2, [obj[2], obj[3], obj[4], obj[5], obj[1], obj[6]]);
return v2;
case 'negative':
var v2 = Cont.attachMovie('NegativeSquare', 'ob_' + Cont.getNextHighestDepth(), Cont.getNextHighestDepth());
ObjNegative.apply(v2, [obj[4], obj[5], obj[6], obj[7], obj[3], obj[1], obj[2]]);
return v2;
case 'trigger':
var v2 = Cont.attachMovie('TriggerSquare', 'ob_' + Cont.getNextHighestDepth(), Cont.getNextHighestDepth());
ObjTrigger.apply(v2, [obj[4], obj[5], obj[6], obj[7], obj[3], obj[1], obj[2]]);
return v2;
case 'pizza':
var v2 = Cont.attachMovie('BigBall', 'ob_' + Cont.getNextHighestDepth(), Cont.getNextHighestDepth());
ObjBigBall.apply(v2, [obj[1], obj[2], obj[3], obj[4], obj[5], obj[6]]);
return v2;
case 'bounce':
var v2 = Cont.attachMovie('ball', 'ob_' + Cont.getNextHighestDepth(), Cont.getNextHighestDepth());
ObjBounce.apply(v2, [obj[1], obj[2], obj[3], obj[4], obj[5], obj[6], obj[7], obj[8], obj[9]]);
return v2;
case 'circle':
var v2 = Cont.attachMovie('ball', 'ob_' + Cont.getNextHighestDepth(), Cont.getNextHighestDepth());
ObjCircle.apply(v2, [obj[1], obj[2], obj[3], obj[4], obj[5], obj[6], obj[7], obj[8], obj[9]]);
return v2;
case 'fall':
var v2 = Cont.attachMovie('HurtSquare', 'ob_' + Cont.getNextHighestDepth(), Cont.getNextHighestDepth());
ObjFallBlock.apply(v2, [obj[1], obj[2], obj[3], obj[4], obj[5]]);
return v2;
case 'fall2':
var v2 = Cont.attachMovie('BlackSquare', 'ob_' + Cont.getNextHighestDepth(), Cont.getNextHighestDepth());
ObjFallSolid.apply(v2, [obj[1], obj[2], obj[3], obj[4], obj[5]]);
return v2;
case 'follow':
var v2 = Cont.attachMovie('HurtSquare', 'ob_' + Cont.getNextHighestDepth(), Cont.getNextHighestDepth());
ObjFollower.apply(v2, [obj[1]]);
return v2;
}
return storedv2;
}
function ObjChar() {
this._width = 29;
this.w = this.HitBox._width * this._xscale / 100;
this._height = 51;
this.h = this.HitBox._height * this._yscale / 100;
this._x = this.w;
this.x = this._x;
this._y = F - this.h - 10;
this.y = this._y;
this.timer = 0;
this.Grounded = false;
this.Yacel = 0;
this.AddForce = 0;
this.Negatives = [];
this.Solids = [];
this.Clouds = [];
this.RectangleColiders = [];
this.Balls = [];
this.PizzaColiders = [];
this.Triggers = [];
this.KeysPressed = [];
this.Clicked = false;
this.ClickedTime = 0;
this.onEnterFrame = function () {
if (Key.isDown(80)) {
this.KeysPressed[80] = true;
} else {
if (this.KeysPressed[80]) {
this.KeysPressed[80] = false;
SwitchPause();
}
}
if (Pause) {
return undefined;
}
++SaveData.TotalTime;
++this.timer;
if (LevelNumber == 0) {
if (this.timer == 1) {
_root.SpacePressed = false;
_root.SpacePressedTime = 0;
} else {
if (!_root.SpacePressed && (Key.isDown(32) || this.Clicked)) {
if (_root.SpacePressedTime++ >= 8) {
_root.SpacePressed = true;
PlaySound('LevelPass');
}
} else {
_root.SpacePressedTime = 0;
}
}
}
if (Key.isDown(82)) {
Playtomic.Log.LevelCounterMetric('Reset', LevelNumber);
Playtomic.Log.ForceSend();
Reset();
return undefined;
}
if (Key.isDown(27)) {
Cont.removeMovieClip();
DisplayMenu();
return undefined;
}
if (Edit) {
if (Key.isDown(78)) {
this.KeysPressed[78] = true;
} else {
if (this.KeysPressed[78] && Edit) {
NextLevel();
return undefined;
}
}
if (Key.isDown(16) && Key.getCode() != 16) {
trace(Key.getCode());
}
var v10 = Key.getCode();
if (v10 >= 49 && v10 <= 57 && this.timer > 6 && Key.isDown(v10)) {
LevelNumber = v10 - 48;
StartLevel();
return undefined;
}
}
var v9 = this.y;
var v12 = this.x;
var v6 = false;
this.Yacel += gravity;
this.y += this.Yacel;
for (var v11 in this.Solids) {
var v4 = this.Solids[v11];
if (v4.type != 'cloud' || v9 + this.h - 5 <= v4.pre_y) {
if (AABB(this, v4)) {
this.y = v4.y - this.h;
this.Yacel = 0;
if (this.y > 0 && v4.AddForce != null && v4.AddForce != 0) {
this.AddForce += v4.AddForce;
}
}
}
}
if (this.Clicked) {
++this.ClickedTime;
}
if (!Key.isDown(32) && !this.Clicked) {
this.x += this.w * 0.16;
} else {
v6 = true;
if (this.ClickedTime == 1 && !Key.isDown(32) && this.Clicked && Cont.Snd_mc.hitTest(_root._xmouse, _root._ymouse)) {
SwitchSound();
}
}
this.x += this.AddForce;
if (this.x >= W - this.w / 2) {
LevelWon();
return undefined;
}
this.AddForce = 0;
for (v11 in this.Solids) {
v4 = this.Solids[v11];
if (v4.type != 'cloud') {
if (AABB(this, v4)) {
this.x = v4.x - this.w;
v6 = true;
}
}
}
for (v11 in this.RectangleColiders) {
v4 = this.RectangleColiders[v11];
if (AABB(this, v4)) {
this.GotHit();
return undefined;
}
}
for (v11 in this.PizzaColiders) {
v4 = this.PizzaColiders[v11];
if (intersects(v4, this)) {
var v3 = Math.atan2(this.y + this.h / 2 - v4.y, this.x + this.w / 2 - v4.x) * 180 / Math.PI;
var v5 = Math.atan2(this.y + this.h - v4.y, this.x + this.w / 2 - v4.x) * 180 / Math.PI;
if (Math.abs(v4._rotation - v3) < v4.gap) {
} else {
this.GotHit(this);
return undefined;
}
} else {}
}
for (v11 in this.Balls) {
v4 = this.Balls[v11];
if (intersects(v4, this)) {
this.GotHit(this);
return undefined;
}
}
for (v11 in this.Triggers) {
v4 = this.Triggers[v11];
if (AABB(this, v4)) {
v4.In = true;
} else {
v4.In = false;
}
}
if (this.Negatives.length > 0) {
var v7 = 0;
var v8 = 0;
for (v11 in this.Negatives) {
v4 = this.Negatives[v11];
if (v4.active) {
++v8;
if (AABB(this, v4)) {
++v7;
}
}
}
if (v8 > 0 && v7 < 1) {
this.GotHit(this);
return undefined;
}
}
this.gotoAndStop(v6 ? 2 : 1);
this._x = this.x;
this._y = this.y;
};
Cont.onPress = function () {
ch_mc.Clicked = true;
ch_mc.ClickedTime = 0;
};
Cont.onRelease = function () {
ch_mc.Clicked = false;
ch_mc.ClickedTime = 0;
};
}
function SwitchPause() {
Pause = !Pause;
ch_mc._visible = !Pause;
}
function LevelWon() {
if (LevelNumber > 0) {
PlaySound('LevelPass');
}
delete Cont.onPress;
delete Cont.onRelease;
SaveData.Levels[LevelNumber + 1].playable = true;
SaveFile.flush();
delete ch_mc.onEnterFrame;
ch_mc._visible = false;
Playtomic.Log.LevelAverageMetric('Time', LevelNumber, int(SaveData.TotalTime / 24));
Playtomic.Log.LevelAverageMetric('Loops', LevelNumber, SaveData.loops);
if (LevelNumber == 0 && !_root.SpacePressed) {
ObjTransition.apply(Cont, [false, Reset]);
Playtomic.Log.CustomMetric('RepeatTutorial');
} else {
if (LevelNumber <= 0) {
ObjTransition.apply(Cont, [false, NextLevel]);
} else {
ObjTransition.apply(Cont, [false, LevelStats]);
}
}
Playtomic.Log.ForceSend();
}
function ObjSnd() {
this.gotoAndStop(_root.SFX ? 1 : 2);
this._xscale = 100 * (100 / Cont._xscale);
this._yscale = this._xscale;
this._x = W - this._width / 2 - 5;
this._y = this._height / 2 + 5;
}
function ObjDisplay(x, y, w, h) {
this.type = 'display';
if (w) {
this.w = w;
this._width = this.w;
}
if (h) {
this.h = h;
this._height = this.h;
}
if (x) {
this._x = x;
this.x = this._x;
}
if (y) {
this._y = y;
this.y = this._y;
}
}
function ObjGraphic(ObNum, x, y, w, h, IsSizeMultiplier, HideShape, controller) {
if (ObNum != null && ObNum != -1) {
this.attachObject = Level[ObNum][-1];
this.XOffset = (x == null) ? 0 : x;
this.YOffset = (y == null) ? 0 : y;
this._x = this.attachObject.x + this.XOffset;
this._y = this.attachObject.y + this.YOffset;
if (HideShape || HideShape == null) {
this.attachObject._alpha = 1;
}
if (IsSizeMultiplier || IsSizeMultiplier == null) {
if (w != null) {
this._width = this.attachObject.w * w;
this.w = this._width;
}
if (h != null) {
this._height = this.attachObject.h * h;
this.h = this._height;
}
} else {
if (w != null) {
this._width = this.attachObject.w + w;
this.w = this._width;
}
if (h != null) {
this._height = this.attachObject.h + h;
this.h = this._height;
}
}
} else {
this._x = x;
this._y = y;
if (IsSizeMultiplier == false) {
if (w != null) {
this._width *= w;
this.w = this._width;
}
if (h != null) {
this._height *= h;
this.h = this._height;
}
} else {
if (w != null) {
this._width = w;
this.w = this._width;
}
if (h != null) {
this._height = h;
this.h = this._height;
}
}
}
this.x = this._x;
this.y = this._y;
if (ObNum != -1) {
this.gotoAndStop(2);
}
if (controller != null) {
this.controller = controller;
}
this.onEnterFrame = function () {
if (Pause) {
return undefined;
}
if (this.attachObject != null) {
this.x = this.attachObject.x + this.XOffset;
this.y = this.attachObject.y + this.YOffset;
this._x = this.x;
this._y = this.y;
}
this.controller[0].apply(this, this.controller[1]);
this._x = this.x;
this._y = this.y;
};
}
function ObjTransition(In, CallBack) {
var v3 = this.getNextHighestDepth();
var v2 = this.attachMovie('Transition1', 'tr_' + v3, v3);
v2._width = W;
v2._height = W;
v2.In = In;
v2.CallBack = CallBack;
if (!In) {
v2.gotoAndStop(v2._totalframes);
}
v2.onEnterFrame = function () {
if (!this.In) {
this.prevFrame();
if (this._currentframe <= 1) {
this.CallBack();
this.removeMovieClip();
}
} else {
if (this._currentframe >= this._totalframes) {
this.CallBack();
this.removeMovieClip();
}
}
};
}
function ObjSolid(x, y, w, h, controller) {
this.type = 'solid';
this.w = w;
this._width = this.w;
this.h = h;
this._height = this.h;
this._x = x;
this.x = this._x;
this._y = y;
this.y = this._y;
this.r = GetDistance(x, y, x + this.w, y + this.h);
ch_mc.Solids.push(this);
if (controller != null) {
this.controller = controller;
this.onEnterFrame = function () {
if (Pause) {
return undefined;
}
this.controller[0].apply(this, this.controller[1]);
};
}
}
function ObjHurt(x, y, w, h, controller, graphic) {
this.type = 'hurt';
this.w = w;
this._width = this.w;
this.h = h;
this._height = this.h;
this._x = x;
this.x = this._x;
this._y = y;
this.y = this._y;
if (graphic != null) {
var v2 = this.attachMovie(graphic, 'graphic_mc', 100);
v2._xscale /= this._xscale / 100;
v2._yscale /= this._yscale / 100;
}
ch_mc.RectangleColiders.push(this);
if (controller != null) {
this.controller = controller;
this.onEnterFrame = function () {
if (Pause) {
return undefined;
}
this.controller[0].apply(this, this.controller[1]);
};
}
}
function ObjTrigger(x, y, w, h, controller, OnFunction, OutFunction) {
this.type = 'trigger';
this.w = w;
this._width = this.w;
this.h = h;
this._height = this.h;
this._x = x;
this.x = this._x;
this._y = y;
this.y = this._y;
this.In = false;
this.LastIn = this.In;
ch_mc.Triggers.push(this);
if (controller != null) {
this.controller = controller;
}
if (OnFunction != null) {
this.OnFunction = OnFunction;
}
if (OutFunction != null) {
this.OutFunction = OutFunction;
}
if (controller != null || OnFunction != null || OutFunction != null) {
this.onEnterFrame = function () {
if (Pause) {
return undefined;
}
this.controller[0].apply(this, this.controller[1]);
if (this.In) {
this.OnFunction[0].apply(this, this.OnFunction[1]);
} else {
this.OutFunction[0].apply(this, this.OutFunction[1]);
}
if (this.LastIn != this.In) {
PlaySound('button_click');
}
this.LastIn = this.In;
};
}
}
function ObjNegative(x, y, w, h, controller, OnFunction, OutFunction) {
this.type = 'negative';
this.w = w;
this._width = this.w;
this.h = h;
this._height = this.h;
this._x = x;
this.x = this._x;
this._y = y;
this.y = this._y;
this.active = false;
ch_mc.Negatives.push(this);
if (controller != null) {
this.controller = controller;
}
if (OnFunction != null) {
this.OnFunction = OnFunction;
}
if (OutFunction != null) {
this.OutFunction = OutFunction;
}
if (controller != null || OnFunction != null || OutFunction != null) {
this.onEnterFrame = function () {
if (Pause) {
return undefined;
}
this.controller[0].apply(this, this.controller[1]);
if (this.active) {
this.OnFunction[0].apply(this, this.OnFunction[1]);
} else {
this.OutFunction[0].apply(this, this.OutFunction[1]);
}
};
}
}
function ObjFallSolid(x, w, h, addSp, y) {
this.type = 'solid';
this.w = w;
this._width = this.w;
this.h = h;
this._height = this.h;
this._x = x;
this.x = this._x;
this._y = -this.h + int(y);
this.y = this._y;
this.speed = 2 + int(addSp);
ch_mc.Solids.push(this);
this.onEnterFrame = function () {
if (Pause) {
return undefined;
}
this.y += this.speed;
if (this.speed > 0) {
if (this.y > H) {
this.y = -this.h;
}
} else {
if (this.speed < 0) {
if (this.y + this.h < 0) {
this.y = H;
}
}
}
this._x = this.x;
this._y = this.y;
};
}
function ObjFallBlock(x, w, h, addSp, y) {
this.type = 'fall_block';
this.w = w;
this._width = this.w;
this.h = h;
this._height = this.h;
this._x = x;
this.x = this._x;
this._y = -this.h + int(y);
this.y = this._y;
this.speed = 2 + int(addSp);
ch_mc.RectangleColiders.push(this);
this.onEnterFrame = function () {
if (Pause) {
return undefined;
}
this.y += this.speed;
if (this.speed > 0) {
if (this.y > H) {
this.y = -this.h;
}
} else {
if (this.speed < 0) {
if (this.y + this.h < 0) {
this.y = H;
}
}
}
this._x = this.x;
this._y = this.y;
};
}
function ObjCircle(x, y, r, controller) {
this.type = 'circle';
this.r = r;
this._height = this.r * 2;
this._width = this._height;
this.h = this._height;
this.w = this._height;
this._x = x;
this.x = this._x;
this._y = y;
this.y = this._y;
ch_mc.Balls.push(this);
if (controller != null) {
this.controller = controller;
this.onEnterFrame = function () {
if (Pause) {
return undefined;
}
this.controller[0].apply(this, this.controller[1]);
};
}
}
function ObjBounce(x, y, r, speed, xlimit, ylimit, impact, resistance, controller) {
this.type = 'bounce';
this.r = r;
this._height = this.r * 2;
this._width = this._height;
this.h = this._height;
this.w = this._height;
this._x = (x == null) ? W + this.r : x;
this.x = this._x;
this._y = (y == null) ? -this.r : y;
this.y = this._y;
this.L_limit = (xlimit == null) ? 0 : xlimit[0];
this.R_limit = (xlimit == null) ? 0 : xlimit[1];
this.ylimit = (ylimit == null) ? F : ylimit;
this.impact = (impact == null) ? -1 : impact;
this.resistance = (resistance == null) ? 0 : resistance;
this.Yacel = 0;
this.speed = (speed == null) ? 0 : speed;
ch_mc.Balls.push(this);
if (controller != null) {
this.controller = controller;
}
this.onEnterFrame = function () {
if (Pause) {
return undefined;
}
this.x += this.speed;
if (this.x < this.L_limit - this.r) {
this.x = this.R_limit + this.r + W;
} else {
if (this.x > this.R_limit + this.r + W) {
this.x = this.L_limit - this.r;
}
}
this.Yacel += gravity / 2;
this.y += this.Yacel;
if (this.y > this.ylimit - this.r) {
this.y = this.ylimit - this.r;
this.Yacel *= this.impact;
}
this.controller[0].apply(this, this.controller[1]);
this._x = this.x;
this._y = this.y;
};
}
function ObjBigBall(r, y, addSp, gap, addRot, RotSp) {
this.type = 'big_ball';
this.r = r;
this._height = this.r * 2;
this._width = this._height;
this.h = this._height;
this.w = this._height;
this._rotation = 90 + int(addRot);
this._x = W + this.r;
this.x = this._x;
this._y = (y == null) ? F + 6 - this.r : y - this.r;
this.y = this._y;
this.speed = 1 + int(addSp);
this.rt = (RotSp == null) ? 0 : RotSp;
this.gap = (gap == null) ? 22.5 : gap / 2;
this.gotoAndStop(2);
ch_mc.PizzaColiders.push(this);
this.onEnterFrame = function () {
if (Pause) {
return undefined;
}
this.x -= this.speed;
this._rotation -= this.speed + this.rt;
if (this.x < -this.r) {
this.x = W + this.r;
}
this._x = this.x;
this._y = this.y;
};
}
function ObjFollower(speed) {
this.type = 'follow';
this._width = W;
this.w = this._width;
this._height = H;
this.h = this._height;
this._x = -W;
this.x = this._x;
this.y = this._y;
this.speed = speed;
ch_mc.RectangleColiders.push(this);
this.onEnterFrame = function () {
if (Pause) {
return undefined;
}
this.Move(this.speed, 0);
};
}
function GetDistance(X1, Y1, X2, Y2) {
return Math.sqrt((X2 - X1) * (X2 - X1) + (Y2 - Y1) * (Y2 - Y1));
}
function AABB(Ob1, Ob2) {
var v7 = Ob1.x;
var v9 = Ob1.x + Ob1.w;
var v3 = Ob1.y;
var v5 = Ob1.y + Ob1.h;
var v6 = Ob2.x;
var v8 = Ob2.x + Ob2.w;
var v10 = Ob2.y;
var v4 = Ob2.y + Ob2.h;
if (v9 > v6 && v7 < v8 && v5 > v10 && v3 < v4) {
return true;
}
return false;
}
function Duplicate2DArray(OldArray) {
var v4 = [];
var v2 = 0;
while (v2 < OldArray.length) {
v4[v2] = [];
var v1 = 0;
while (v1 < OldArray[v2].length) {
v4[v2][v1] = OldArray[v2][v1];
++v1;
}
++v2;
}
return v4;
}
function intersects(circle, rect) {
var v7 = clamp(circle.x, rect.x, rect.x + rect.w);
var v6 = clamp(circle.y, rect.y, rect.y + rect.h);
var v4 = circle.x - v7;
var v3 = circle.y - v6;
var v5 = v4 * v4 + v3 * v3;
return v5 < circle.r * circle.r;
}
function clamp(value, min, max) {
if (value < min) {
return min;
}
if (value > max) {
return max;
}
return value;
}
Stage.scaleMode = 'noScale';
stop();
MovieClip.prototype.GotHit = function () {
PlaySound('Death_sfx');
var v5 = this.x + this.w / 2;
var v4 = this.y + this.h / 2;
var v3 = int(Stage_W * v5 / W);
var v2 = int(Stage_H * v4 / H);
if (v3 < 1) {
v3 = 1;
} else {
if (v3 > Stage_W - 1) {
v3 = Stage_W - 1;
}
}
if (v2 < 1) {
v2 = 1;
Playtomic.Log.Heatmap('deaths', 'L_' + LevelNumber, v3, v2);
this.gotoAndStop(3);
delete this.onEnterFrame;
delete col.onEnterFrame;
ObjTransition.apply(Cont, [false, Reset]);
Playtomic.Log.LevelCounterMetric('Deaths', LevelNumber);
Playtomic.Log.ForceSend();
return undefined;
}
if (v2 > Stage_H - 1) {
v2 = Stage_H - 1;
}
Playtomic.Log.Heatmap('deaths', 'L_' + LevelNumber, v3, v2);
this.gotoAndStop(3);
delete this.onEnterFrame;
delete col.onEnterFrame;
ObjTransition.apply(Cont, [false, Reset]);
Playtomic.Log.LevelCounterMetric('Deaths', LevelNumber);
Playtomic.Log.ForceSend();
return undefined;
};
MovieClip.prototype.SetPosition = function (x, y) {
if (this.type == 'solid') {
this.MoveSolid(x - this.x, y - this.y);
} else {
this.Move(x - this.x, y - this.y);
}
};
MovieClip.prototype.MoveUndefined = function (x, y) {
if (this.type == 'solid') {
this.MoveSolid(x, y);
} else {
this.Move(x, y);
}
};
MovieClip.prototype.MoveSolid = function (x, y) {
this.pre_y = this.y;
this.pre_x = this.x;
var v4 = AABB({'x': this.x, 'y': this.y - 1, 'w': this.w, 'h': this.h}, ch_mc);
if (y != 0 && y != null) {
this.y += y;
this._y = this.y;
if (AABB(this, ch_mc)) {
if (this.type != 'cloud') {
if (y < 0) {
ch_mc.y = this.y - ch_mc.h;
ch_mc.Yacel = 0;
} else {
ch_mc.y = this.y + this.h;
}
}
} else {
if (v4 && this.y > ch_mc.y + ch_mc.h) {
ch_mc.y = this.y - ch_mc.h;
if (ch_mc.x + ch_mc.w > this.x + this.w) {
this.AddForce = 1;
}
}
}
}
if (x != 0 && x != null) {
this.x += x;
this._x = this.x;
if (AABB(this, ch_mc)) {
if (this.type != 'cloud') {
if (x < 0) {
ch_mc.x = this.x - ch_mc.w;
} else {
ch_mc.x = this.x + this.w;
}
}
}
}
};
MovieClip.prototype.Move = function (x, y) {
this.pre_y = this.y;
this.pre_x = this.x;
if (y != 0 && y != null) {
this.y += y;
this._y = this.y;
}
if (x != 0 && x != null) {
this.x += x;
this._x = this.x;
}
};
MovieClip.prototype.TxtFader = function (txt, time, dp) {
this.text_mc.removeMovieClip();
this.attachMovie('BGText', 'text_mc', (dp == null) ? this.getNextHighestDepth() : dp);
this.text_mc.txt.text = txt;
this.text_mc._alpha = 0;
this.text_mc.time = time;
this.text_mc.onEnterFrame = function () {
if (Pause) {
return undefined;
}
if (this._alpha++ >= 100) {
if (this.time == null) {
delete onEnterFrame;
} else {
this.onEnterFrame = function () {
if (Pause) {
return undefined;
}
if (this.time-- <= 0) {
if (this._alpha-- <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
}
}
};
};
DisplayMenu();
}
movieClip 415 {
}
movieClip 416 {
}
movieClip 417 {
}
movieClip 421 {
}
movieClip 424 {
}
movieClip 425 {
}
movieClip 426 {
}
movieClip 427 {
}
movieClip 428 {
}
movieClip 431 {
}
movieClip 432 {
}
movieClip 433 {
}
movieClip 436 {
}
movieClip 437 {
}
movieClip 438 {
}
movieClip 439 {
frame 1 {
stop();
}
}