Combined Code
movieClip 53 {
frame 1 {
this.onEnterFrame = function () {
this._x -= 12;
if (!this.hitTest(_root.cam)) {
this.removeMovieClip();
}
};
}
}
movieClip 54 fire {
}
movieClip 56 tportthing {
frame 20 {
this.removeMovieClip();
}
}
movieClip 68 {
}
movieClip 78 push1 {
frame 1 {
youknowit = 'manc';
touched = false;
counter = 0;
if (_root.sethdirec == 'left') {
youknowit = 'left';
}
if (_root.sethdirec == 'right') {
youknowit = 'right';
}
if (_root.mobility == false) {
stop();
}
if (_root.mobility == true) {
play();
}
onEnterFrame = function () {
if (_root.mobility == true) {
++counter;
if (counter == 4) {
counter = 0;
_root.pushdust();
}
if (youknowit == 'left') {
this._x -= 10;
this._xscale = scale;
}
if (youknowit == 'right') {
this._x += 10;
this._xscale = -scale;
}
}
};
}
frame 65 {
this.unloadMovie();
}
frame 73 {
this.unloadMovie();
}
}
movieClip 81 energyblast {
frame 1 {
hitted = false;
onEnterFrame = function () {
if (_root.mobility == true) {
play();
}
if (_root.mobility == false) {
stop();
}
};
}
frame 25 {
this.unloadMovie();
}
}
movieClip 83 ebar {
frame 1 {
timer = 0;
onEnterFrame = function () {
++timer;
if (timer == 3000) {
this.unloadMovie();
}
};
}
}
movieClip 97 dustsmall {
frame 14 {
this.unloadMovie();
}
}
movieClip 98 dust {
}
movieClip 100 upgradeflash {
frame 10 {
this.unloadMovie();
}
}
movieClip 109 {
}
movieClip 110 snowball {
frame 1 {
direc == 'notsure';
hit = false;
hitnum = 0;
onEnterFrame = function () {
if (_root.mobility == true) {
if (hit == true) {
++hitnum;
if (hitnum == 10) {
this.unloadMovie();
}
}
if (_root.mobility == true && hit == false) {
play();
}
if (mobility == false) {
stop();
}
if (this.hitTest(_root.player)) {
if (_root.magic == true) {
hited = true;
gotoAndStop('hit');
}
}
if (this.hitTest(_root.player)) {
if (hit == false && _root.painallowed == true) {
gotoAndStop('hit');
hit = true;
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.mypunch_hit.start();
_root.health -= 5;
_root.attacking = false;
if (direc == 'left') {
_root.momentum = 5;
}
if (direc == 'right') {
_root.momentum = -15;
}
}
}
if (direc == 'left') {
this._x += 15;
this._xscale = scale;
}
if (direc == 'right') {
this._x -= 15;
this._xscale = -scale;
}
}
};
}
frame 56 {
this.unloadMovie();
}
}
movieClip 119 boss2flash {
frame 9 {
this.unloadMovie();
}
}
movieClip 121 boss2boom {
frame 25 {
this.unloadMovie();
}
}
movieClip 146 transformd {
frame 20 {
this.unloadMovie();
}
}
movieClip 159 upthrust {
frame 12 {
this.unloadMovie();
}
}
movieClip 171 scarfhand {
frame 39 {
this.unloadMovie();
}
}
movieClip 185 slowburn {
frame 14 {
this.unloadMovie();
}
}
movieClip 194 {
}
movieClip 200 {
frame 66 {
_parent.unloadMovie();
}
}
movieClip 201 boss2ball {
frame 1 {
fallnumber = 4;
hit = false;
hitcount = 0;
fallnumber = Math.random(Math.random() * 10) + 10;
stop();
onEnterFrame = function () {
if (_root.mobility == true) {
this._y += fallnumber;
gotoAndStop(1);
if (this._y >= 500) {
this.unloadMovie();
}
if (this.hitTest(_root.player)) {
if (_root.painallowed == true && hit == false) {
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 8;
hit = true;
}
}
if (hit == true) {
++hitcount;
trace(hitcount);
gotoAndStop('burst');
if (hitcount >= 5) {
this.unloadMovie();
}
}
}
};
}
frame 2 {
_root.flame.start();
}
}
movieClip 203 boss2energyball {
}
movieClip 205 preboom {
frame 30 {
stop();
}
}
movieClip 213 boss2blast {
frame 22 {
this.unloadMovie();
}
}
movieClip 214 hover {
frame 27 {
this.unloadMovie();
}
}
// unknown tag 88 length 119
movieClip 220 expgain {
frame 1 {
onEnterFrame = function () {
--this._y;
};
}
frame 119 {
this.unloadMovie();
}
}
movieClip 225 boss3thorns {
frame 1 {
thornspeed = 2;
scale = this._xscale;
onEnterFrame = function () {
if (_root.mobility == false) {
this.stop();
}
if (_root.mobility == true) {
this.play();
if (_root.boss3.lightson == true) {
this.unloadMovie();
}
if (direc == 'left') {
this._x -= thornspeed;
this._xscale = scale;
}
if (direc == 'right') {
this._x += thornspeed;
this._xscale = -scale;
}
if (this.hitTest(_root.player)) {
if (_root.painallowed == true) {
_root.attacking = false;
_root.magic = false;
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 5;
if (direc == 'left') {
_root.momentum = -8;
}
if (direc == 'right') {
_root.momentum = 8;
}
}
}
}
};
}
frame 45 {
this.unloadMovie();
}
}
movieClip 227 boss3groundcheaker {
frame 1 {
aboutTime = 0;
speeder = 10;
overalltime = 0;
ex = 5;
onEnterFrame = function () {
if (_root.mobility == true) {
if (_root.boss3.lightson == true) {
this.unloadMovie();
}
++overalltime;
++aboutTime;
if (direc == 'left') {
this._x -= speeder;
}
if (direc == 'right') {
this._x += speeder;
}
if (aboutTime == 7) {
++_root.loaditems;
_root.attachMovie('boss3groundthorn', 'belowthorn' + _root.loaditems, _root.getNextHighestDepth());
_root['belowthorn' + _root.loaditems]._x = this._x;
_root['belowthorn' + _root.loaditems]._y = this._y + 5;
if (_root.boss3.lightson == true) {
_root['belowthorn' + _root.loaditems].unloadMovie();
}
aboutTime = 0;
}
if (_root.ground1.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this.unloadMovie();
}
if (_root.ground1.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this.unloadMovie();
}
}
};
}
}
movieClip 245 boss3groundthorn {
frame 1 {
_root.crackle.start();
}
frame 1 {
onEnterFrame = function () {
if (_root.mobility == false) {
this.stop();
}
if (_root.mobility == true) {
play();
if (_root.boss3.lightson == true) {
this.unloadMovie();
}
if (_root.painallowed == true) {
if (this.hitTest(_root.player)) {
_root.otheraction = true;
_root.attacking = false;
_root.magic = false;
_root.player.gotoAndStop('hited');
_root.health -= 5;
}
}
}
};
}
frame 18 {
this.unloadMovie();
}
}
movieClip 247 {
frame 29 {
_root.crackle.start();
}
}
movieClip 249 boss3ball {
frame 1 {
speed = 5;
timemax = 50;
timetime = 0;
onEnterFrame = function () {
if (_root.mobility == false) {
turner.stop();
}
if (_root.mobility == true) {
turner.play();
if (_root.boss3.lightson == true) {
this.unloadMovie();
}
if (this._x > _root.player._x) {
this._x -= speed;
}
if (this._x < _root.player._x) {
this._x += speed;
}
if (this._y < _root.player._y - 100) {
this._y += speed / 2;
}
if (this._y > _root.player._y - 100) {
this._y -= speed / 2;
}
++timetime;
if (timetime == timemax) {
_root.thump.start();
_root.crackle.start();
++_root.loaditems;
_root.attachMovie('boss3ballboom', 'ballboom' + _root.loaditems, _root.getNextHighestDepth());
_root['ballboom' + _root.loaditems]._x = this._x;
_root['ballboom' + _root.loaditems]._y = this._y;
this.unloadMovie();
}
}
};
}
}
movieClip 264 boss3ballboom {
frame 1 {
onEnterFrame = function () {
if (_root.mobility == false) {
this.stop();
}
if (_root.mobility == true) {
play();
if (_root.boss3.lightson == true) {
this.unloadMovie();
}
if (_root.painallowed == true) {
if (this.hitTest(_root.player)) {
_root.otheraction = true;
_root.player._y - 8;
_root.player.grav = -8;
_root.airhit = true;
_root.health -= 10;
if (this._x > _root.player._x) {
_root.momentum = -20;
}
if (this._x < _root.player._x) {
_root.momentum = 20;
}
}
}
}
};
}
frame 17 {
this.unloadMovie();
}
}
movieClip 274 boss3vine {
frame 1 {
ehp = 20;
++_root.loaditems;
thisbar = _root.loaditems;
_root.attachMovie('ebar', 'echum' + thisbar, _root.getNextHighestDepth());
onEnterFrame = function () {
if (_root.health <= 0) {
_root['echum' + thisbar].unloadMovie();
this.unloadMovie();
}
if (_root.mobility == true) {
if (_root.boss3.lightson == true) {
this.unloadMovie();
_root['echum' + thisbar].unloadMovie();
}
if (ehp >= 0) {
_root['echum' + thisbar]._width = ehp * 6;
_root['echum' + thisbar]._x = this._x - 60;
_root['echum' + thisbar]._y = this._y - 200;
if (this.hitTest(_root.player)) {
if (_root.magic == false) {
_root.momentum = 0;
if (this._x > _root.player._x) {
_root.player.tmove = 0;
_root.player._x -= _root.player.speed;
}
if (this._x < _root.player._x) {
_root.player.tmove = 0;
_root.player._x += _root.player.speed;
}
}
if (_root.magic == true) {
if (_root.classi == 'fire1' || _root.classi == 'fire2' || _root.classi == 'fire3') {
if (_root.classi == 'fire3') {
--this.ehp;
}
if (_root.classi == 'fire2') {
this.ehp -= 0.7;
}
if (_root.classi == 'fire1') {
this.ehp -= 0.5;
}
} else {
_root.momentum = 0;
if (this._x > _root.player._x) {
_root.player.tmove = 0;
_root.player._x -= _root.player.speed;
}
if (this._x < _root.player._x) {
_root.player.tmove = 0;
_root.player._x += _root.player.speed;
}
}
}
}
} else {
this.play();
_root['echum' + thisbar].unloadMovie();
}
}
};
}
frame 15 {
stop();
}
frame 26 {
this.unloadMovie();
}
}
movieClip 276 immunity {
frame 16 {
this.unloadMovie();
}
}
movieClip 279 smokey {
frame 16 {
this.unloadMovie();
}
}
movieClip 299 azielfire {
frame 1 {
scale = this._xscale;
if (direc == right) {
this._xscale = -scale;
}
onEnterFrame = function () {
if (_root.painallowed == true && this.hitTest(_root.player)) {
if (this._x > _root.player._x) {
_root.momentum = -10;
} else {
_root.momentum = 10;
}
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 20;
}
};
}
frame 20 {
this.unloadMovie();
}
}
movieClip 315 {
frame 15 {
_parent.unloadMovie();
}
}
movieClip 316 azielthunder {
frame 1 {
scale = this._xscale;
if (direc == right) {
this._xscale = -scale;
}
onEnterFrame = function () {
if (_root.painallowed == true && this.hitTest(_root.player)) {
if (this._x > _root.player._x) {
_root.momentum = -10;
} else {
_root.momentum = 10;
}
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 20;
}
};
stop();
}
}
movieClip 325 thunderflash {
frame 8 {
this.unloadMovie();
}
}
movieClip 328 {
}
movieClip 331 {
}
movieClip 333 {
}
movieClip 334 bvortex {
frame 1 {
timer = 0;
vortexcapture = false;
allowed = true;
trace('comeagain');
_root.wind.start();
_root.angrywind.start();
onEnterFrame = function () {
if (_root.mobility == true) {
++timer;
vortexer.localToGlobal();
if (vortexcapture == false && allowed == true) {
if (this._x > _root.player._x) {
_root.player._x += 13.5;
}
if (this._x < _root.player._x) {
_root.player._x -= 13.5;
}
}
if (vortexer.hitTest(_root.player) && allowed == true) {
_root.player.grav = 0;
_root.otheraction = true;
_root.player._x = this._x;
_root.player._y = this._y + 50;
_root.attacking = false;
_root.magic = false;
_root.player.gotoAndStop('vortex');
vortexcapture = true;
timer += 5;
}
if (timer >= 100) {
allowed = false;
_root.angrywind.stop('angrywind');
this.play();
if (vortexcapture == false) {
_root.azielstunfunc();
}
if (vortexcapture == true) {
_root.player.gotoAndStop('implode');
}
}
}
};
}
frame 6 {
stop();
}
frame 7 {
_root.wind.start();
}
frame 12 {
this.unloadMovie();
}
}
movieClip 345 explosion {
frame 11 {
this.unloadMovie();
}
}
movieClip 347 {
}
movieClip 348 azielenergybeam {
frame 1 {
direc = 10;
touched = false;
_xscale = scale;
beamspeed = 100;
onEnterFrame = function () {
if (_root.mobility == true) {
_root.cam._y -= 10;
_root.player.globalToLocal();
if (touched == false) {
if (direc == 'right') {
_xscale = -scale;
this.beam._width += beamspeed;
} else {
this.beam._width += beamspeed;
}
}
if (this.hitTest(_root.player)) {
if (touched == false) {
touched = true;
_root.player.gotoAndStop('enerybeam');
_root.aziel.beamtouch();
}
}
}
};
}
}
movieClip 354 {
}
movieClip 355 azielenergyball {
frame 1 {
thingspeed = 2;
yourspeed = 5.5;
onEnterFrame = function () {
if (_root.mobility == true) {
this.localToGlobal();
if (_root.player._x > this._x) {
if (Key.isDown(75)) {
trace('right');
this._x -= yourspeed;
}
this._x += thingspeed;
if (this.hitTest(_root.aziel)) {
_root.aziel.lostenergy();
_root['azielenergybeam' + _root.loaditems].unloadMovie();
this.unloadMovie();
}
if (this.hitTest(_root.player)) {
_root['azielenergybeam' + _root.loaditems].unloadMovie();
_root.health -= 15;
_root.otheraction = true;
_root.airhit = true;
_root.momentum = 15;
_root.mobility = true;
this.unloadMovie();
}
}
if (_root.player._x < this._x) {
if (Key.isDown(75)) {
trace('left');
this._x += yourspeed;
}
if (this.hitTest(_root.aziel)) {
_root.aziel.lostenergy();
_root['azielenergybeam' + _root.loaditems].unloadMovie();
this.unloadMovie();
}
this._x -= thingspeed;
if (this.hitTest(_root.player)) {
_root['azielenergybeam' + _root.loaditems].unloadMovie();
_root.health -= 15;
_root.otheraction = true;
_root.mobility = true;
_root.airhit = true;
_root.momentum = -15;
}
}
}
};
}
}
movieClip 359 thornentrance {
frame 20 {
this.unloadMovie();
}
}
movieClip 362 {
}
movieClip 366 {
}
movieClip 367 sethbar {
}
movieClip 391 {
}
movieClip 404 {
}
movieClip 415 {
}
movieClip 424 {
}
movieClip 434 {
}
movieClip 445 {
}
movieClip 456 {
}
movieClip 459 {
}
movieClip 475 {
}
movieClip 485 {
}
movieClip 487 seth {
}
movieClip 489 stopper {
frame 1 {
onEnterFrame = function () {
_root.otheraction = false;
trace(_root.otheraction);
trace(_root.mobility);
trace(_root.teleportding);
};
}
frame 7 {
this.unloadMovie();
}
}
movieClip 492 {
}
movieClip 493 {
}
movieClip 495 {
}
movieClip 497 {
frame 1 {
stop();
}
}
movieClip 500 {
}
movieClip 501 {
}
movieClip 504 {
}
movieClip 507 {
frame 1 {
stop();
}
}
movieClip 508 Preloader {
frame 1 {
function enterFrameHandler() {
var v2 = 0;
v2 = _root.getBytesLoaded() / _root.getBytesTotal();
if (loadingBar) {
loadingBar.gotoAndStop(int(v2 * (loadingBar._totalframes - 1)) + 1);
}
if (v2 >= 1 && haltComplete != true) {
onEnterFrame = null;
gotoAndStop('loaded');
}
}
stop();
var autoPlay;
var className;
var haltComplete;
onEnterFrame = enterFrameHandler;
}
frame 10 {
function _onPlayClick() {
_root.nextFrame();
_root.play();
_parent._onLoaded();
}
if (playButton) {
playButton.onRelease = _onPlayClick;
playButton.stop();
}
if (autoPlay) {
_onPlayClick(null);
}
}
}
movieClip 510 Newgrounds API Classes {
#initclip
Object.registerClass('Newgrounds API Classes', com.newgrounds.shims.APIShim);
#endinitclip
}
movieClip 550 {
}
movieClip 553 {
}
movieClip 558 {
}
movieClip 562 {
}
movieClip 563 {
}
movieClip 564 {
}
movieClip 565 FlashAd {
#initclip
Object.registerClass('FlashAd', com.newgrounds.components.FlashAdBase);
#endinitclip
frame 1 {
function initPlayButton() {
if (this.playButton) {
this.playButton.onRelease = onPlayClick;
if (!this.showPlayButton) {
this.playButton._visible = false;
}
}
}
function onPlayClick() {
removeAd();
_visible = false;
}
stop();
}
frame 2 {
initPlayButton();
}
frame 10 {
initPlayButton();
}
frame 20 {
initPlayButton();
}
}
movieClip 566 APIConnector {
frame 1 {
function _onLoaded() {
gotoAndStop('invisible');
if (_redirect) {
com.newgrounds.API.loadOfficialVersion();
return undefined;
}
}
function _apiConnect() {
var v2 = com.newgrounds.API;
if (v2 && !v2.connected) {
if (!apiId) {
com.newgrounds.Logger.logError('No API ID entered in the API Connector component.', 'You can create an API ID for this submission at http://newgrounds.com/account/flashapi', 'Enter your API ID into the API Connector using the Component Inspector (Window -> Component Inspector).');
return undefined;
}
switch (debugMode) {
case 'Off':
default:
v2.debugMode = v2.RELEASE_MODE;
goto 1319;
case 'Simulate Logged-in User':
//Invalid switch }
v2.debugMode = v2.DEBUG_MODE_LOGGED_IN;
goto 1319;
case 'Off':
v2.debugMode = v2.DEBUG_MODE_LOGGED_OUT;
goto 1319;
case 'Simulate Logged-in User':
v2.debugMode = v2.DEBUG_MODE_NEW_VERSION;
goto 1319;
case 'Simulate Logged-out User':
v2.debugMode = v2.DEBUG_MODE_HOST_BLOCKED;
label 1319:
if (loader) {
loader.haltComplete = true;
}
v2.addEventListener(com.newgrounds.APIEvent.API_CONNECTED, _onConnected);
v2.connect(_root, apiId, encryptionKey, movieVersion);
}
}
function _onConnected(event) {
if (loader) {
loader.haltComplete = false;
}
if (redirectOnNewVersion && event.__get__success() && (event.__get__data()).newVersion) {
_redirect = true;
}
if (redirectOnHostBlocked && !event.__get__success() && event.__get__error() == com.newgrounds.APIEvent.ERROR_HOST_BLOCKED) {
_redirect = true;
}
if (_redirect) {
gotoAndStop('adPreloader');
forceAlwaysOnTop();
}
}
function forceAlwaysOnTop() {
var v2 = getNextHighestDepth();
swapDepths(v2);
if (Stage) {
_x = (Stage.width - _width) / 2;
_y = (Stage.height - _height) / 2;
_visible = true;
}
if (_root && _root instanceof MovieClip) {
(MovieClip(_root)).stop();
}
}
stop();
if (_root && _root instanceof MovieClip) {
(MovieClip(_root)).stop();
}
var apiId;
var encryptionKey;
var movieVersion;
var debugMode;
var connectorType;
var redirectOnHostBlocked;
var redirectOnNewVersion;
var adType;
var className;
var _redirect;
_x = int(_x);
_y = int(_y);
if (!debugMode) {
debugMode = 'Simulate Logged-in User';
}
if (!connectorType) {
connectorType = 'Flash Ad + Preloader';
}
if (!adType) {
adType = 'Video';
}
if (ad) {
ad.adType = adType;
}
switch (connectorType) {
case 'Flash Ad + Preloader':
gotoAndStop('adPreloader');
break;
case 'Flash Ad Only':
gotoAndStop('ad');
break;
case 'Invisible':
gotoAndStop('invisible');
}
_apiConnect();
}
instance ad of movieClip 565 FlashAd {
onClipEvent (construct) {
apiId = '';
showBorder = true;
adType = 'Video';
}
}
instance loader of movieClip 508 Preloader {
onClipEvent (construct) {
autoPlay = false;
mainClass = '';
}
}
}
frame 1 {
stop();
stopAllSounds();
}
instance of movieClip 565 FlashAd {
onClipEvent (construct) {
apiId = '30054:9s16HUx7';
showBorder = true;
adType = 'Video';
}
}
instance of movieClip 566 APIConnector {
onClipEvent (construct) {
apiId = '30054:9s16HUx7';
encryptionKey = '72dz1ULGLeRtz55Ck3xrh6bnjnRuy8dd';
debugMode = 'Simulate Logged-in User';
movieVersion = '';
connectorType = 'Flash Ad + Preloader';
redirectOnNewVersion = true;
redirectOnHostBlocked = true;
adType = 'Video';
}
}
button 571 {
on (press) {
getURL('http://www.izaacbarratt.newgrounds.com', '');
}
}
movieClip 518 __Packages.com.newgrounds.APIConnection {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.APIConnection) {
var v1 = function () {
this.reset();
};
com.newgrounds.APIConnection = v1;
var v2 = v1.prototype;
v2.__get__hostURL = function () {
return this._hostURL;
};
v2.__set__hostURL = function (value) {
this._hostURL = value;
this.hostDomain = null;
if (this._hostURL) {
var v2 = this._hostURL.split('/');
if (v2[0] != 'file:' && this._hostURL != 'localhost') {
this.hostDomain = v2[2];
}
}
if (!this.hostDomain) {
this.hostDomain = 'localhost';
}
return this.__get__hostURL();
};
v2.__get__sandboxType = function () {
return System.security.sandboxType;
};
v2.__get__isNetworkHost = function () {
switch (this.__get__sandboxType()) {
return true;
case 'localWithFile':
case 'localWithNetwork':
case 'localTrusted':
case 'application':
return false;
case 'remote':
}
return true;
};
v2.__get__hasUserSession = function () {
return this.sessionId != null && this.sessionId != '' && this.publisherId != 0;
};
v2.__get__connected = function () {
return this.connectionState == com.newgrounds.APIConnection.CONNECTED;
};
v2.reset = function () {
this.connectionState = com.newgrounds.APIConnection.NOT_CONNECTED;
this.encryptionKey = null;
this.sessionId = null;
this.userEmail = null;
this.username = null;
this.userId = 0;
this.userpageFormat = 0;
};
v2.assertInitialized = function () {
if (!this.initialized) {
com.newgrounds.Logger.logError('You must initialized the API using API.connect() before using this command.');
return false;
}
return true;
};
v2.assertConnected = function () {
if (!this.connectionState == com.newgrounds.APIConnection.CONNECTED) {
com.newgrounds.Logger.logError('You must establish a connection using API.connect() before using this command.');
return false;
}
return true;
};
v2.sendSimpleCommand = function (command, completeHandler, parameters, secureParameters) {
if (parameters == undefined) {
parameters = null;
}
if (secureParameters == undefined) {
secureParameters = null;
}
var v2 = new com.newgrounds.APICommand(command);
v2.__set__parameters(parameters);
v2.__set__secureParameters(secureParameters);
if (completeHandler != null) {
v2.addEventListener(com.newgrounds.APIEvent.COMMAND_COMPLETE, completeHandler);
}
v2.send(this);
};
v2.sendCommand = function (command) {
command.send(this);
};
v2.loadInBrowser = function (command, newWindow, parameters) {
if (newWindow == undefined) {
newWindow = true;
}
if (parameters == undefined) {
parameters = null;
}
var v2 = new com.newgrounds.APICommand(command);
v2.__set__parameters(parameters);
v2.loadInBrowser(this, newWindow);
};
v1.NOT_CONNECTED = 'notConnected';
v1.CONNECTING = 'connecting';
v1.CONNECTED = 'connected';
v2.connectionState = com.newgrounds.APIConnection.NOT_CONNECTED;
v2.apiURL = 'http://www.ngads.com/gateway_v2.php';
v2.addProperty('connected', v2.__get__connected, function () {});
v2.addProperty('hasUserSession', v2.__get__hasUserSession, function () {});
v2.addProperty('hostURL', v2.__get__hostURL, v2.__set__hostURL);
v2.addProperty('isNetworkHost', v2.__get__isNetworkHost, function () {});
v2.addProperty('sandboxType', v2.__get__sandboxType, function () {});
ASSetPropFlags(com.newgrounds.APIConnection.prototype, null, 1);
}
#endinitclip
}
movieClip 512 __Packages.com.newgrounds.EventDispatcher {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.EventDispatcher) {
var v1 = function () {
this._listeners = {};
};
com.newgrounds.EventDispatcher = v1;
var v2 = v1.prototype;
v2.addEventListener = function (type, listener) {
if (!this._listeners[type]) {
this._listeners[type] = [];
}
if (typeof listener == 'function') {
this._listeners[type].push({'target': null, 'func': listener});
} else {
this._listeners[type].push(listener);
}
};
v2.removeEventListener = function (type, listener) {
var v3 = this._listeners[type];
if (v3) {
var v5 = v3.length;
var v2 = 0;
while (v2 < v5) {
if (v3[v2].func == listener || v3[v2] == listener) {
v3.splice(v2, 1);
return undefined;
}
++v2;
}
}
};
v2.dispatchEvent = function (event) {
var v4 = this._listeners[event.__get__type()];
if (v4) {
var v5 = v4.length;
var v2 = 0;
while (v2 < v5) {
var v3 = v4[v2];
v3.func.call(v3.target, event);
++v2;
}
}
return true;
};
ASSetPropFlags(com.newgrounds.EventDispatcher.prototype, null, 1);
}
#endinitclip
}
movieClip 511 __Packages.com.newgrounds.Event {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.Event) {
var v1 = function (type) {
this._type = type;
};
com.newgrounds.Event = v1;
var v2 = v1.prototype;
v2.__get__type = function () {
return this._type;
};
v2.addProperty('type', v2.__get__type, function () {});
ASSetPropFlags(com.newgrounds.Event.prototype, null, 1);
}
#endinitclip
}
movieClip 513 __Packages.com.newgrounds.APIEventDispatcher {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.APIEventDispatcher) {
var v1 = function () {
super();
};
com.newgrounds.APIEventDispatcher = v1;
com.newgrounds.APIEventDispatcher extends com.newgrounds.EventDispatcher;
var v2 = v1.prototype;
v1.__get__globalDispatcher = function () {
return com.newgrounds.APIEventDispatcher._globalDispatcher;
};
v1.__set__globalDispatcher = function (value) {
com.newgrounds.APIEventDispatcher._globalDispatcher = value;
return com.newgrounds.APIEventDispatcher.__get__globalDispatcher();
};
v1.initEventQueue = function () {
setInterval(com.newgrounds.APIEventDispatcher.runEventQueue, 50);
return [];
};
v2.dispatchEvent = function (event) {
com.newgrounds.APIEventDispatcher._eventQueue.push({'dispatcher': this, 'event': event});
return true;
};
v2.actualDispatchEvent = function (event) {
var v3 = super.dispatchEvent(event);
if (com.newgrounds.APIEventDispatcher._globalDispatcher && this != com.newgrounds.APIEventDispatcher._globalDispatcher) {
com.newgrounds.APIEventDispatcher._globalDispatcher.dispatchEvent(event);
}
};
v1.runEventQueue = function (event) {
var v3 = com.newgrounds.APIEventDispatcher._eventQueue.length;
if (v3) {
var v4 = com.newgrounds.APIEventDispatcher._eventQueue;
com.newgrounds.APIEventDispatcher._eventQueue = [];
var v1 = 0;
while (v1 < v3) {
var v2 = v4[v1];
v2.dispatcher.actualDispatchEvent(v2.event);
++v1;
}
}
};
v1._eventQueue = com.newgrounds.APIEventDispatcher.initEventQueue();
v1.addProperty('globalDispatcher', v1.__get__globalDispatcher, v1.__set__globalDispatcher);
ASSetPropFlags(com.newgrounds.APIEventDispatcher.prototype, null, 1);
}
#endinitclip
}
movieClip 516 __Packages.com.newgrounds.encoders.BaseN {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.encoders) {
_global.com.newgrounds.encoders = new Object();
}
if (!_global.com.newgrounds.encoders.BaseN) {
var v1 = function (hash) {
if (hash) {
this._hash = hash;
} else {
this._hash = com.newgrounds.encoders.BaseN.DEFAULT_HASH;
}
this._base = this._hash.length;
this._reverseHash = new Object();
var v2 = 0;
while (v2 < this._hash.length) {
this._reverseHash[this._hash.charAt(v2)] = v2;
++v2;
}
};
com.newgrounds.encoders.BaseN = v1;
var v2 = v1.prototype;
v2.encodeUint = function (number, minimumChars) {
if (minimumChars == undefined) {
minimumChars = 1;
}
var v2 = '';
var v3 = number;
while (v3 != 0) {
v2 = this._hash.charAt(v3 % this._base) + v2;
v3 /= this._base;
v3 = int(v3);
}
while (v2.length < minimumChars) {
v2 = this._hash.charAt(0) + v2;
}
return v2;
};
v2.decodeUint = function (encodedNumber) {
var v3 = 0;
var v2 = 0;
while (v2 < encodedNumber.length) {
v3 *= this._base;
v3 += this._reverseHash[encodedNumber.charAt(v2)];
++v2;
}
return v3;
};
v1.DEFAULT_HASH = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/';
ASSetPropFlags(com.newgrounds.encoders.BaseN.prototype, null, 1);
}
#endinitclip
}
movieClip 522 __Packages.com.newgrounds.APICommand {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.APICommand) {
var v1 = function (command) {
super();
this._command = command;
this._parameters = new Object();
this._secureParameters = new Object();
this._hasTimeout = true;
};
com.newgrounds.APICommand = v1;
com.newgrounds.APICommand extends com.newgrounds.APIEventDispatcher;
var v2 = v1.prototype;
v1.stopPendingCommands = function () {
for (var v2 in com.newgrounds.APICommand._pendingCommands) {
var v1 = com.newgrounds.APICommand._pendingCommands[v2];
v1.close();
}
com.newgrounds.APICommand._pendingCommands = [];
};
v1.onThrottleTimer = function (event) {
if (getTimer() - com.newgrounds.APICommand._throttleTimestamp >= com.newgrounds.APICommand.THROTTLE_INTERVAL) {
com.newgrounds.APICommand._throttleCount = 0;
com.newgrounds.APICommand._throttleCount = 0;
for (;;) {
if (!(com.newgrounds.APICommand._commandQueue.length && com.newgrounds.APICommand._throttleCount < com.newgrounds.APICommand.THROTTLE_THRESHOLD)) break;
var v1 = com.newgrounds.APICommand._commandQueue.shift();
v1.command.send(v1.connection);
++com.newgrounds.APICommand._throttleCount;
}
}
};
v1.encryptHex = function (hexValue) {
var v4 = hexValue.length % 6;
var v3 = '';
var v1 = 0;
while (v1 < hexValue.length) {
v3 += com.newgrounds.APICommand._encryptor.encodeUint(int('0x' + hexValue.substr(v1, 6)), 4);
v1 += 6;
}
return v4.toString() + v3;
};
v2.__get__command = function () {
return this._command;
};
v2.__set__command = function (value) {
this._command = value;
return this.__get__command();
};
v2.__get__hasTimeout = function () {
return this._hasTimeout;
};
v2.__set__hasTimeout = function (val) {
this._hasTimeout = val;
return this.__get__hasTimeout();
};
v2.__get__parameters = function () {
return this._parameters;
};
v2.__set__parameters = function (object) {
this._parameters = new Object();
if (object) {
for (var v3 in object) {
this._parameters[v3] = object[v3];
}
}
return this.__get__parameters();
};
v2.__get__preventCache = function () {
return this._preventCache;
};
v2.__set__preventCache = function (value) {
this._preventCache = value;
return this.__get__preventCache();
};
v2.__get__secureParameters = function () {
return this._secureParameters;
};
v2.__set__secureParameters = function (object) {
this._secureParameters = new Object();
if (object) {
for (var v3 in object) {
this._secureParameters[v3] = object[v3];
}
}
return this.__get__secureParameters();
};
v2.__get__hasSecureParameters = function () {
for (var v2 in this._secureParameters) {
return true;
}
return false;
};
v2.addFile = function (filename, data, dataField, contentType) {
if (contentType == undefined) {
contentType = 'application/octet-stream';
}
if (!this._files) {
this._files = new Object();
}
var v3 = {'filename': filename, 'data': data, 'dataField': dataField, 'contentType': contentType};
this._files[filename] = v3;
};
v2.removeFile = function (filename) {
if (this._files) {
delete this._files[filename];
}
};
v2.clearFiles = function () {
this._files = null;
};
v2.close = function () {
if (this._loader) {
clearInterval(this._timeoutTimer);
var v2 = 0;
while (v2 < com.newgrounds.APICommand._pendingCommands.length) {
if (com.newgrounds.APICommand._pendingCommands[v2] == this) {
com.newgrounds.APICommand._pendingCommands.splice(v2, 1);
break;
}
++v2;
}
this._loader = null;
}
};
v2.loadInBrowser = function (connection, newWindow) {
this._parameters.command_id = this._command;
this._parameters.tracker_id = connection.apiId ? connection.apiId : 1;
if (connection.debug) {
this._parameters.debug = 1;
}
var v3 = connection.apiURL + '?host=' + escape(connection.hostDomain);
for (var v4 in this._parameters) {
v3 += '&' + escape(v4) + '=' + escape(this._parameters[v4]);
}
var v6;
if (newWindow) {
v6 = '_blank';
} else {
v6 = '_top';
}
_root.getURL(v3, v6);
};
v2.send = function (connection) {
if (com.newgrounds.APICommand._throttleCount >= com.newgrounds.APICommand.THROTTLE_THRESHOLD) {
com.newgrounds.APICommand._commandQueue.push({'connection': connection, 'command': this});
} else {
this.sendInternal(connection);
}
};
v2.sendInternal = function (connection) {
var v4;
v4 = new LoadVars();
v4.command_id = this._command;
v4.tracker_id = connection.apiId;
if (connection.debug) {
v4.debug = 1;
}
if (this._preventCache) {
v4.seed = Math.random();
}
var v2;
var v3;
var v7;
for (v2 in this._parameters) {
v3 = this._parameters[v2];
if (v3 != null) {
if (typeof v3 == 'boolean') {
v4[v2] = int(v3);
} else {
v4[v2] = v3;
}
}
}
if (this.__get__hasSecureParameters()) {
var v6 = new Object();
for (v2 in this._secureParameters) {
v3 = this._secureParameters[v2];
if (v3 != null) {
if (typeof v3 == 'boolean') {
v6[v2] = int(v3);
} else {
v6[v2] = v3;
}
}
}
var v8 = '';
v7 = 0;
while (v7 < 16) {
v8 += com.newgrounds.APICommand.ENCRYPTOR_RADIX.charAt(int(Math.random() * com.newgrounds.APICommand.ENCRYPTOR_RADIX.length));
++v7;
}
v4.command_id = 'securePacket';
v6.command_id = this._command;
v6.as_version = 3;
v6.session_id = connection.sessionId;
v6.user_email = connection.userEmail;
v6.publisher_id = connection.publisherId;
v6.seed = v8;
var v13 = com.newgrounds.crypto.MD5.hash(v8);
var v11 = com.newgrounds.crypto.RC4.encrypt(com.newgrounds.encoders.json.JSON.encode(v6), connection.encryptionKey);
v4.secure = com.newgrounds.APICommand.encryptHex(v13 + v11);
}
com.newgrounds.Logger.logInternal('Sending packet:', v4);
var v12;
v12 = 'application/x-www-form-urlencoded';
for (v2 in v4) {
if (typeof v4[v2] == 'object') {
v4[v2] = com.newgrounds.encoders.json.JSON.encode(v4[v2]);
}
}
if (this._files) {
for (var v10 in this._files) {
var v5 = this._files[v10];
if (typeof v5.data == 'string') {
v4[v10] = v5.data;
} else {
v4[v10] = com.newgrounds.encoders.json.JSON.encode(v5.data);
}
}
}
com.newgrounds.APICommand._pendingCommands.push(this);
++com.newgrounds.APICommand._throttleCount;
com.newgrounds.APICommand._throttleTimestamp = getTimer();
this.startLoader(connection.apiURL, v4, v12);
};
v2.startLoader = function (url, data, contentType) {
this._loader = LoadVars(data);
this._loader.onData = this.as2CompleteHandler;
this._loader.contentType = contentType;
this._loader.sendAndLoad(url, this._loader, 'POST');
if (this._hasTimeout) {
setInterval(this, this.onTimeout, com.newgrounds.APICommand.TIMEOUT_INTERVAL);
}
};
v2.as2CompleteHandler = function (data) {
var v3;
var v2 = 0;
while (v2 < com.newgrounds.APICommand._pendingCommands.length) {
if (com.newgrounds.APICommand._pendingCommands[v2]._loader == this) {
v3 = com.newgrounds.APICommand._pendingCommands[v2];
break;
}
++v2;
}
v3.onComplete(data);
};
v2.onTimeout = function (event) {
this.close();
com.newgrounds.Logger.logError('Command timed out.');
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, null, com.newgrounds.APIEvent.ERROR_TIMED_OUT));
};
v2.onError = function (error) {
com.newgrounds.Logger.logError('Error when sending command:', error);
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, null, com.newgrounds.APIEvent.ERROR_UNKNOWN));
this.close();
};
v2.onComplete = function (data) {
com.newgrounds.Logger.logInternal('Received packet:', data);
try {
if (!data || data == '') {
throw new Error();
}
var v2 = com.newgrounds.encoders.json.JSON.decode(data);
if (!v2) {
throw new Error();
}
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, v2, (v2 && v2.success) ? com.newgrounds.APIEvent.ERROR_NONE : com.newgrounds.APIEvent.ERROR_COMMAND_FAILED));
if (com.newgrounds.APICommand.bridge) {
com.newgrounds.APICommand.bridge.sendEvent(v2.command_id, v2);
}
}
catch (e) {
com.newgrounds.Logger.logError('Invalid response returned from server: ' + data);
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, null, com.newgrounds.APIEvent.ERROR_BAD_RESPONSE));
}
this.close();
};
v1.TIMEOUT_INTERVAL = 10000;
v1.THROTTLE_INTERVAL = 10050;
v1.THROTTLE_TICK_INTERVAL = 1000;
v1.THROTTLE_THRESHOLD = 24;
v1._throttleCount = 0;
v1._commandQueue = [];
v1._throttleTimer = setInterval(com.newgrounds.APICommand.onThrottleTimer, com.newgrounds.APICommand.THROTTLE_TICK_INTERVAL);
v1.ENCRYPTOR_RADIX = '/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X';
v1._encryptor = new com.newgrounds.encoders.BaseN(com.newgrounds.APICommand.ENCRYPTOR_RADIX);
v1._pendingCommands = [];
v1.CRLF = '\r\n';
v2.addProperty('command', v2.__get__command, v2.__set__command);
v2.addProperty('hasSecureParameters', v2.__get__hasSecureParameters, function () {});
v2.addProperty('hasTimeout', v2.__get__hasTimeout, v2.__set__hasTimeout);
v2.addProperty('parameters', v2.__get__parameters, v2.__set__parameters);
v2.addProperty('preventCache', v2.__get__preventCache, v2.__set__preventCache);
v2.addProperty('secureParameters', v2.__get__secureParameters, v2.__set__secureParameters);
ASSetPropFlags(com.newgrounds.APICommand.prototype, null, 1);
}
#endinitclip
}
movieClip 517 __Packages.com.newgrounds.Bridge {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.Bridge) {
var v1 = function (id) {
this._widgetId = id;
this._inConnection = new LocalConnection();
this._outConnection = new LocalConnection();
this._inConnection.receiveEvent = this.receiveEvent;
this._inConnection.connect('rec_' + this._widgetId);
com.newgrounds.Logger.addEventListener(com.newgrounds.APIEvent.LOG, {'target': this, 'func': this.onLogMessage});
};
com.newgrounds.Bridge = v1;
var v2 = v1.prototype;
v2.onLogMessage = function (event) {
try {
this._outConnection.send(this._widgetId, 'sendEvent', 'trace', String(event.__get__data()));
}
};
v2.sendEvent = function (command, parameters) {
if (this._outConnection) {
parameters = {'data': parameters};
try {
this._outConnection.send(this._widgetId, 'sendEvent', command, parameters);
}
}
};
v2.receiveEvent = function (event, parameters) {};
v2.onStatus = function (event) {};
ASSetPropFlags(com.newgrounds.Bridge.prototype, null, 1);
}
#endinitclip
}
movieClip 514 __Packages.com.newgrounds.APIEvent {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.APIEvent) {
var v1 = function (type, data, error) {
super(type);
if (data == undefined) {
data = null;
}
if (error == undefined) {
error = null;
}
if (!error || error == '' || error == com.newgrounds.APIEvent.ERROR_NONE) {
this._error = com.newgrounds.APIEvent.ERROR_NONE;
this._success = true;
} else {
this._error = error;
this._success = false;
}
if (data) {
this._data = data;
} else {
this._data = {};
}
};
com.newgrounds.APIEvent = v1;
com.newgrounds.APIEvent extends com.newgrounds.Event;
var v2 = v1.prototype;
v2.clone = function () {
return new com.newgrounds.APIEvent(this.__get__type(), this._data, this._error);
};
v2.__get__success = function () {
return this._success;
};
v2.__get__data = function () {
return this._data;
};
v2.__get__error = function () {
return this._error;
};
v1.COMMAND_COMPLETE = 'commandComplete';
v1.MEDAL_UNLOCK_CONFIRMED = 'medalUnlockConfirmed';
v1.ICON_LOADED = 'iconLoaded';
v1.API_CONNECTED = 'movieConnected';
v1.LOG = 'log';
v1.MEDAL_UNLOCKED = 'medalUnlocked';
v1.SCORES_LOADED = 'scoresLoaded';
v1.SCORE_POSTED = 'scorePosted';
v1.QUERY_COMPLETE = 'queryComplete';
v1.FILE_LOADED = 'fileLoaded';
v1.FILE_SAVED = 'fileSaved';
v1.FILE_DELETED = 'fileDeleted';
v1.FILE_REQUESTED = 'fileRequested';
v1.VOTE_COMPLETE = 'voteComplete';
v1.ERROR_NONE = 'noError';
v1.ERROR_UNKNOWN = 'unknownError';
v1.ERROR_COMMAND_FAILED = 'commandFailed';
v1.ERROR_NOT_CONNECTED = 'notConnected';
v1.ERROR_INVALID_ARGUMENT = 'invalidArgument';
v1.ERROR_TIMED_OUT = 'timedOut';
v1.ERROR_BAD_FILE = 'badFile';
v1.ERROR_BAD_RESPONSE = 'badResponse';
v1.ERROR_SENDING_COMMAND = 'errorSendingCommand';
v1.ERROR_HOST_BLOCKED = 'hostBlocked';
v1.ERROR_ALREADY_VOTED = 'alreadyVoted';
v1.ERROR_NOT_LOGGED_IN = 'notLoggedIn';
v1.ERROR_WRONG_ENCRYPTION_KEY = 'wrongEncryptionKey';
v2.addProperty('data', v2.__get__data, function () {});
v2.addProperty('error', v2.__get__error, function () {});
v2.addProperty('success', v2.__get__success, function () {});
ASSetPropFlags(com.newgrounds.APIEvent.prototype, null, 1);
}
#endinitclip
}
movieClip 533 __Packages.com.newgrounds.API {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.API) {
var v1 = function () {};
com.newgrounds.API = v1;
var v2 = v1.prototype;
v1.__get__connected = function () {
return com.newgrounds.API._connection.__get__connected();
};
v1.__get__isNetworkHost = function () {
return com.newgrounds.API._connection.__get__isNetworkHost();
};
v1.__get__apiId = function () {
com.newgrounds.API._connection.assertInitialized();
return com.newgrounds.API._connection.apiId;
};
v1.__get__debugMode = function () {
return com.newgrounds.API._debugMode;
};
v1.__set__debugMode = function (val) {
com.newgrounds.API._debugMode = val;
return com.newgrounds.API.__get__debugMode();
};
v1.__get__publisherId = function () {
com.newgrounds.API._connection.assertInitialized();
return com.newgrounds.API._connection.publisherId;
};
v1.__get__sessionId = function () {
com.newgrounds.API._connection.assertInitialized();
return com.newgrounds.API._connection.sessionId;
};
v1.__get__hostDomain = function () {
com.newgrounds.API._connection.assertInitialized();
return com.newgrounds.API._connection.hostDomain;
};
v1.__get__hostURL = function () {
com.newgrounds.API._connection.assertInitialized();
return com.newgrounds.API._connection.__get__hostURL();
};
v1.__get__isNewgrounds = function () {
return com.newgrounds.API._connection.publisherId == 1;
};
v1.__get__hasUserSession = function () {
com.newgrounds.API._connection.assertInitialized();
return com.newgrounds.API._connection.__get__hasUserSession();
};
v1.__get__username = function () {
com.newgrounds.API._connection.assertInitialized();
return com.newgrounds.API._connection.username;
};
v1.__get__userId = function () {
com.newgrounds.API._connection.assertInitialized();
return com.newgrounds.API._connection.userId;
};
v1.assertConnected = function (eventType) {
if (eventType == undefined) {
eventType = null;
}
if (com.newgrounds.API._connection.assertConnected()) {
return true;
} else {
if (eventType) {
com.newgrounds.API.dispatchEvent(eventType, null, com.newgrounds.APIEvent.ERROR_NOT_CONNECTED);
}
return false;
}
};
v1.__get__serverTime = function () {
return com.newgrounds.API._serverTime;
};
v1.__get__adsApproved = function () {
return com.newgrounds.API._adsApproved;
};
v1.__get__adFeedURL = function () {
return com.newgrounds.API._adFeedURL;
};
v1.__get__medals = function () {
return com.newgrounds.API._medalsArray;
};
v1.__get__scoreBoards = function () {
return com.newgrounds.API._scoreBoardsArray;
};
v1.__get__saveGroups = function () {
return com.newgrounds.API._saveGroupsArray;
};
v1.connect = function (_root, apiId, encryptionKey, movieVersion) {
if (encryptionKey == undefined) {
encryptionKey = null;
}
if (movieVersion == undefined) {
movieVersion = '';
}
com.newgrounds.APIEventDispatcher.__set__globalDispatcher(com.newgrounds.API._dispatcher);
System.security.loadPolicyFile('http://apifiles.ngfiles.com/crossdomain.xml');
if (com.newgrounds.API._connection.initialized) {
com.newgrounds.Logger.logError('Connection already in progress. Please call API.disconnect() before attempting another connection.');
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, false, com.newgrounds.APIEvent.ERROR_NOT_CONNECTED);
return undefined;
}
apiId = com.newgrounds.API.trimWhitespace(apiId);
if (encryptionKey) {
encryptionKey = com.newgrounds.API.trimWhitespace(encryptionKey);
}
if (!apiId || apiId == '') {
com.newgrounds.Logger.logError('No apiId given. Please use the API ID from your API settings page.');
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, false, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT);
return undefined;
}
com.newgrounds.Logger.logMessage('====== Newgrounds API v' + com.newgrounds.API.VERSION + ' ======');
com.newgrounds.API._connection.connectionState = com.newgrounds.APIConnection.CONNECTING;
_root = _root;
com.newgrounds.API._movieVersion = movieVersion;
com.newgrounds.API._connection.apiId = apiId;
var v4;
v4 = apiId.indexOf(':');
if (v4 != -1) {
com.newgrounds.API._connection.trackerId = int(apiId.substring(0, v4));
} else {
com.newgrounds.API._connection.trackerId = int(apiId);
}
if (!com.newgrounds.API._connection.trackerId) {
com.newgrounds.Logger.logError('Invalid API ID: ' + apiId);
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, false, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT);
return undefined;
}
com.newgrounds.API._connection.encryptionKey = encryptionKey;
com.newgrounds.API._connection.initialized = true;
com.newgrounds.API._connection.__set__hostURL(_root._url);
com.newgrounds.API.doConnect(_root);
};
v1.doConnect = function (flashVars) {
if (com.newgrounds.API.__get__isNetworkHost() && com.newgrounds.API._debugMode != com.newgrounds.API.RELEASE_MODE) {
com.newgrounds.Logger.logMessage('Live file detected, turning off debug mode.');
com.newgrounds.API._debugMode = com.newgrounds.API.RELEASE_MODE;
}
if (flashVars && flashVars.NewgroundsAPI_SandboxID) {
com.newgrounds.API._bridge = new com.newgrounds.Bridge(flashVars.NewgroundsAPI_SandboxID);
com.newgrounds.APICommand.bridge = com.newgrounds.API._bridge;
}
if (com.newgrounds.API._debugMode == com.newgrounds.API.RELEASE_MODE) {
if (flashVars) {
if (flashVars.NewgroundsAPI_UserName) {
com.newgrounds.API._connection.username = flashVars.NewgroundsAPI_UserName;
}
if (flashVars.NewgroundsAPI_UserID) {
com.newgrounds.API._connection.userId = flashVars.NewgroundsAPI_UserID;
}
if (flashVars.NewgroundsAPI_PublisherID) {
com.newgrounds.API._connection.publisherId = flashVars.NewgroundsAPI_PublisherID;
}
if (flashVars.NewgroundsAPI_UserpageFormat) {
com.newgrounds.API._connection.userpageFormat = flashVars.NewgroundsAPI_UserpageFormat;
}
if (flashVars.NewgroundsAPI_SessionID) {
com.newgrounds.API._connection.sessionId = flashVars.NewgroundsAPI_SessionID;
}
if (flashVars.NewgroundsAPI_SaveGroupID) {
com.newgrounds.API._requestedSaveGroupId = flashVars.NewgroundsAPI_SaveGroupID;
}
if (flashVars.NewgroundsAPI_SaveFileID) {
com.newgrounds.API._requestedSaveFileId = flashVars.NewgroundsAPI_SaveFileID;
}
}
} else {
com.newgrounds.API._connection.debug = true;
if (com.newgrounds.API._debugMode == com.newgrounds.API.DEBUG_MODE_LOGGED_IN || com.newgrounds.API._debugMode == com.newgrounds.API.DEBUG_MODE_LOGGED_OUT) {
com.newgrounds.API._connection.publisherId = 1;
}
if (com.newgrounds.API._debugMode == com.newgrounds.API.DEBUG_MODE_LOGGED_IN) {
com.newgrounds.API._connection.sessionId = 'D3bu64p1U53R';
com.newgrounds.API._connection.userId = 10;
com.newgrounds.API._connection.username = 'API-Debugger';
}
}
com.newgrounds.API._connection.sendSimpleCommand('connectMovie', com.newgrounds.API.onConnect, {'host': com.newgrounds.API._connection.hostDomain, 'movie_version': com.newgrounds.API._movieVersion, 'publisher_id': com.newgrounds.API._connection.publisherId});
};
v1.onConnect = function (event) {
var v1 = event.__get__data();
if (!event.__get__success()) {
com.newgrounds.Logger.logError('Unable to connect to the API.');
com.newgrounds.API._connection.reset();
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, event.__get__data(), event.__get__error());
return undefined;
}
if (com.newgrounds.API.__get__debugMode() != com.newgrounds.API.RELEASE_MODE) {
com.newgrounds.API._adFeedURL = com.newgrounds.API.TEST_AD_FEED_URL;
} else {
if (v1.ad_url) {
com.newgrounds.API._adFeedURL = unescape(v1.ad_url);
}
}
switch (v1.ad_status) {
case -1:
com.newgrounds.Logger.logWarning('Your movie is not approved to run Flash Ads.');
break;
case 0:
com.newgrounds.Logger.logWarning('Your movie is still awaiting approval to run Flash Ads.');
break;
case 1:
com.newgrounds.Logger.logMessage('Your movie is approved to run Flash Ads!');
}
com.newgrounds.API._adsApproved = v1.ad_status == 1;
if (com.newgrounds.API._debugMode == com.newgrounds.API.DEBUG_MODE_HOST_BLOCKED || v1.deny_host) {
com.newgrounds.Logger.logWarning(com.newgrounds.API._connection.hostDomain + ' does not have permission to host this movie!', 'Update your API configuration to allow this host.');
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, {'officialURL': unescape(v1.movie_url)}, com.newgrounds.APIEvent.ERROR_HOST_BLOCKED);
com.newgrounds.API._connection.reset();
return undefined;
}
com.newgrounds.API._movieName = v1.movieName ? v1.movieName : '';
com.newgrounds.Logger.logMessage('Connecting to the Newgrounds API Gateway...', '----- ' + v1.movie_name + ' -----');
if (com.newgrounds.API._debugMode == com.newgrounds.API.DEBUG_MODE_NEW_VERSION) {
v1.movie_version = 'Debug Mode';
}
if (v1.movie_version) {
com.newgrounds.Logger.logMessage('A new version of this movie is available.', 'Current version:\t' + com.newgrounds.API._movieVersion, 'Newest version:\t' + v1.movie_version, 'Use API.loadOfficialVersion() to link to the latest version.');
com.newgrounds.API._newVersion = true;
} else {
com.newgrounds.API._newVersion = false;
}
com.newgrounds.API._serverTime = new Date(int(v1.time) * 1000);
if (v1.request_portal_url) {
com.newgrounds.API._connection.sendSimpleCommand('setPortalID', null, {'portal_url': com.newgrounds.API._connection.__get__hostURL()});
}
com.newgrounds.API._connection.sendSimpleCommand('preloadSettings', com.newgrounds.API.onMetadataLoaded, {'publisher_id': com.newgrounds.API._connection.publisherId, 'user_id': com.newgrounds.API._connection.userId});
};
v1.onMetadataLoaded = function (event) {
var v11 = event.__get__data();
var v4;
var v1;
if (!event.__get__success()) {
com.newgrounds.Logger.logWarning('Unable to load movie metadata.');
com.newgrounds.API.disconnect();
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, null, event.__get__error());
return undefined;
}
var v10 = 0;
if (v11.medals) {
v10 = v11.medals.length;
var v18;
if (com.newgrounds.API.__get__hasUserSession()) {
v18 = com.newgrounds.API.loadLocal('medals_unlocked_' + com.newgrounds.API.__get__username());
} else {
v18 = com.newgrounds.API.loadLocal('medals_unlocked');
}
v4 = 0;
while (v4 < v10) {
var v5 = v11.medals[v4];
var v15 = v5.medal_unlocked;
var v17 = v18 && v18[v5.medal_id];
var v14 = com.newgrounds.API.__get__hasUserSession() ? v15 : v17;
if (com.newgrounds.API.__get__debugMode() != com.newgrounds.API.RELEASE_MODE) {
v14 = false;
}
var v6 = new com.newgrounds.Medal(com.newgrounds.API._connection, v5.medal_id, v5.medal_name, v5.medal_description, Boolean(int(v5.secret)), v14, v5.medal_value, v5.medal_difficulty, v5.medal_icon);
v6.addEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCKED, com.newgrounds.API.onMedalUnlocked, false, 0, true);
v6.addEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCK_CONFIRMED, com.newgrounds.API.onMedalUnlockConfirmed, false, 0, true);
com.newgrounds.API._medals[v6.__get__name()] = v6;
com.newgrounds.API._medalsArray.push(v6);
com.newgrounds.Logger.logMessage(v6);
if (com.newgrounds.API.__get__hasUserSession() && v17 && !v15) {
com.newgrounds.Logger.logMessage('Server missed the "' + v6.__get__name() + '" unlock. Resending...');
v6.unlock();
}
++v4;
}
}
com.newgrounds.Logger.logMessage(v10 + ' medal' + ((v10 != 1) ? 's' : '') + ' initialized.');
v10 = 0;
if (v11.score_boards) {
v10 = v11.score_boards.length;
v4 = 0;
while (v4 < v10) {
var v16 = v11.score_boards[v4];
var v9 = new com.newgrounds.ScoreBoard(com.newgrounds.API._connection, v16.name, v16.id);
com.newgrounds.API._scoreBoards[v9.__get__name()] = v9;
com.newgrounds.API._scoreBoardsArray.push(v9);
com.newgrounds.Logger.logMessage(v9);
++v4;
}
}
com.newgrounds.Logger.logMessage(v10 + ' scoreboard' + ((v10 != 1) ? 's' : '') + ' initialized.');
v10 = 0;
if (v11.save_groups) {
v10 = v11.save_groups.length;
v4 = 0;
while (v4 < v10) {
var v2 = v11.save_groups[v4];
var v13 = [];
if (v2.keys) {
v1 = 0;
while (v1 < v2.keys.length) {
var v7 = v2.keys[v1];
v13.push(new com.newgrounds.SaveKey(v7.name, v7.id, v7.type));
++v1;
}
}
var v12 = [];
if (v2.ratings) {
v1 = 0;
while (v1 < v2.ratings.length) {
var v3 = v2.ratings[v1];
v12.push(new com.newgrounds.SaveRating(v3.name, v3.id, v3.float, v3.min, v3.max));
++v1;
}
}
var v8 = new com.newgrounds.SaveGroup(com.newgrounds.API._connection, v2.group_name, v2.group_id, v2.group_type, v13, v12);
com.newgrounds.API._saveGroups[v8.__get__name()] = v8;
com.newgrounds.API._saveGroupsArray.push(v8);
com.newgrounds.Logger.logMessage(v8);
++v4;
}
}
com.newgrounds.Logger.logMessage(v10 + ' save group' + ((v10 != 1) ? 's' : '') + ' initialized.');
if (v11.save_file_path) {
com.newgrounds.API._saveFilePath = v11.save_file_path + '/';
com.newgrounds.SaveFile._saveFilePath = com.newgrounds.API._saveFilePath;
com.newgrounds.Logger.logInternal('Save file path: ' + com.newgrounds.API._saveFilePath);
}
if (v11.image_file_path) {
com.newgrounds.API._imageFilePath = v11.image_file_path + '/';
com.newgrounds.SaveFile._imageFilePath = com.newgrounds.API._imageFilePath;
com.newgrounds.Logger.logInternal('Image file path: ' + com.newgrounds.API._imageFilePath);
}
com.newgrounds.Logger.logMessage('Connection complete!');
com.newgrounds.API._connection.connectionState = com.newgrounds.APIConnection.CONNECTED;
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, {'movieName': com.newgrounds.API._movieName, 'newVersion': com.newgrounds.API._newVersion});
if (com.newgrounds.API._requestedSaveFileId && com.newgrounds.API._requestedSaveGroupId) {
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.FILE_LOADED, com.newgrounds.API.onRequestedFileLoaded);
com.newgrounds.API.loadSaveFile(com.newgrounds.API._requestedSaveFileId, false);
}
};
v1.disconnect = function () {
if (!com.newgrounds.API._connection.__get__connected()) {
com.newgrounds.Logger.logWarning('The Newgrounds API is already disconnected.');
return undefined;
}
com.newgrounds.API._connection.reset();
for (var v2 in com.newgrounds.API._medals) {
var v1 = com.newgrounds.API._medals[v2];
v1.removeEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCKED, com.newgrounds.API.onMedalUnlocked);
v1.removeEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCK_CONFIRMED, com.newgrounds.API.onMedalUnlockConfirmed);
}
com.newgrounds.API._newVersion = false;
com.newgrounds.API._medals = new Object();
com.newgrounds.API._medalsArray = [];
com.newgrounds.API._scoreBoards = new Object();
com.newgrounds.API._scoreBoardsArray = [];
com.newgrounds.API._saveGroups = new Object();
com.newgrounds.API._saveGroupsArray = [];
com.newgrounds.API._sharedObjects = new Object();
com.newgrounds.API._imageFilePath = null;
com.newgrounds.API._saveFilePath = null;
com.newgrounds.Logger.logMessage('Disconnected from the Newgrounds API.');
};
v1.loadNewgrounds = function () {
com.newgrounds.API._connection.loadInBrowser('loadNewgrounds');
};
v1.loadOfficialVersion = function () {
if (com.newgrounds.API._connection.assertInitialized()) {
com.newgrounds.API._connection.loadInBrowser('loadOfficialVersion', false);
}
};
v1.loadMySite = function () {
if (com.newgrounds.API._connection.assertInitialized()) {
com.newgrounds.API._connection.loadInBrowser('loadMySite');
}
};
v1.loadCustomLink = function (linkName) {
if (com.newgrounds.API._connection.assertInitialized()) {
com.newgrounds.API._connection.loadInBrowser('loadCustomLink', true, {'link': linkName});
}
};
v1.getMedal = function (medalName) {
return com.newgrounds.API._medals[medalName];
};
v1.unlockMedal = function (medalName) {
if (!com.newgrounds.API.assertConnected()) {
return undefined;
}
var v1 = com.newgrounds.API._medals[medalName];
if (!v1) {
com.newgrounds.Logger.logError('No medal named "' + medalName + '" w.');
return undefined;
}
v1.unlock();
};
v1.onMedalUnlocked = function (event) {
if (event.__get__success()) {
var v2 = com.newgrounds.Medal(event.__get__data());
var v1;
if (com.newgrounds.API.__get__hasUserSession()) {
v1 = com.newgrounds.API.loadLocal('medals_unlocked_' + com.newgrounds.API.__get__username());
if (!v1) {
v1 = new Object();
}
v1[v2.__get__id()] = true;
com.newgrounds.API.saveLocal('medals_unlocked_' + com.newgrounds.API.__get__username(), v1);
} else {
v1 = com.newgrounds.API.loadLocal('medals_unlocked');
if (!v1) {
v1 = new Object();
}
v1[(com.newgrounds.Medal(event.__get__data())).__get__id()] = true;
com.newgrounds.API.saveLocal('medals_unlocked', v1);
com.newgrounds.Logger.logMessage('User instanceof not logged in. Medal "' + v2.__get__name() + '" unlocked locally.');
}
}
};
v1.onMedalUnlockConfirmed = function (event) {
if (com.newgrounds.API.__get__hasUserSession()) {
var v1 = com.newgrounds.API.loadLocal('medals_unlocked_' + com.newgrounds.API.__get__username());
if (!v1) {
v1 = new Object();
} else {
delete v1[(com.newgrounds.Medal(event.__get__data())).__get__id()];
}
com.newgrounds.API.saveLocal('medals_unlocked_' + com.newgrounds.API.__get__username(), v1);
}
};
v1.clearLocalMedals = function () {
for (var v2 in com.newgrounds.API._medals) {
var v1 = com.newgrounds.API._medals[v2];
v1.setUnlocked(false);
}
if (!com.newgrounds.API.__get__hasUserSession()) {
com.newgrounds.API.saveLocal('medals_unlocked', new Object());
}
};
v1.getScoreBoard = function (scoreBoardName) {
if (!com.newgrounds.API.assertConnected()) {
return null;
}
return com.newgrounds.API._scoreBoards[scoreBoardName];
};
v1.loadScores = function (scoreBoardName, period, firstResult, numResults, tag) {
if (period == undefined) {
period = 'All-Time';
}
if (firstResult == undefined) {
firstResult = 1;
}
if (numResults == undefined) {
numResults = 10;
}
if (tag == undefined) {
tag = null;
}
if (!com.newgrounds.API.assertConnected()) {
return null;
}
var v1 = com.newgrounds.API._scoreBoards[scoreBoardName];
if (!v1) {
com.newgrounds.Logger.logError('No scoreboard named "' + scoreBoardName + '" w.');
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.SCORES_LOADED, null, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT);
return null;
}
v1.__set__period(period);
v1.__set__firstResult(firstResult);
v1.__set__numResults(numResults);
v1.__set__tag(tag);
v1.loadScores();
return v1;
};
v1.postScore = function (scoreBoardName, numericScore, tag) {
if (tag == undefined) {
tag = null;
}
if (!com.newgrounds.API.assertConnected()) {
return undefined;
}
if (!com.newgrounds.API.__get__hasUserSession()) {
com.newgrounds.Logger.logError('The user must be logged-in to post a score.');
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.SCORE_POSTED, null, com.newgrounds.APIEvent.ERROR_NOT_LOGGED_IN);
return undefined;
}
var v1 = com.newgrounds.API._scoreBoards[scoreBoardName];
if (!v1) {
com.newgrounds.Logger.logError('No scoreboard named "' + scoreBoardName + '" w.');
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.SCORE_POSTED, null, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT);
return undefined;
}
v1.postScore(numericScore, tag);
};
v1.getSaveGroup = function (groupName) {
if (!com.newgrounds.API.assertConnected()) {
return null;
}
return com.newgrounds.API._saveGroups[groupName];
};
v1.getSaveGroupById = function (id) {
for (var v3 in com.newgrounds.API._saveGroups) {
var v1 = com.newgrounds.API._saveGroups[v3];
if (v1.__get__id() == id) {
return v1;
}
}
return null;
};
v1.createSaveFile = function (groupName) {
if (!com.newgrounds.API.assertConnected()) {
return null;
}
var v1 = com.newgrounds.API.getSaveGroup(groupName);
if (!v1) {
com.newgrounds.Logger.logError('The save group "' + groupName + '" w found.');
return null;
}
return new com.newgrounds.SaveFile(v1);
};
v1.loadSaveFile = function (saveId, loadContents) {
if (loadContents == undefined) {
loadContents = true;
}
com.newgrounds.API._connection.sendSimpleCommand('loadSaveFile', com.newgrounds.API.onFileLoaded, {'save_id': saveId, 'get_contents': loadContents});
};
v1.onFileLoaded = function (event) {
var v2;
if (event.__get__success()) {
v2 = com.newgrounds.SaveFile.fromObject(com.newgrounds.API.getSaveGroupById((event.__get__data()).group_id), (event.__get__data()).file);
if ((event.__get__data()).get_contents) {
v2.load();
} else {
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.FILE_LOADED, v2);
}
} else {
com.newgrounds.Logger.logError('Unable to load file:', event.__get__error());
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.FILE_LOADED, null, event.__get__error());
}
};
v1.createSaveQuery = function (groupName) {
if (!com.newgrounds.API.assertConnected()) {
return null;
}
var v1 = com.newgrounds.API.getSaveGroup(groupName);
if (!v1) {
com.newgrounds.Logger.logError('The save group "' + groupName + '" w found.');
return null;
}
var v2 = new com.newgrounds.SaveQuery(v1);
return v2;
};
v1.createSaveQueryByDate = function (groupName, sortDescending) {
if (sortDescending == undefined) {
sortDescending = true;
}
var v1 = com.newgrounds.API.createSaveQuery(groupName);
if (!v1) {
return null;
}
v1.sortOn(com.newgrounds.SaveQuery.CREATED_ON, sortDescending);
return v1;
};
v1.createSaveQueryByName = function (groupName, filename, exactMatch, sortDescending) {
if (exactMatch == undefined) {
exactMatch = false;
}
if (sortDescending == undefined) {
sortDescending = false;
}
var v1 = com.newgrounds.API.createSaveQuery(groupName);
if (!exactMatch) {
v1.addCondition(com.newgrounds.SaveQuery.FILE_NAME, com.newgrounds.SaveQuery.OPERATOR_CONTAINS, filename);
return v1;
}
v1.addCondition(com.newgrounds.SaveQuery.FILE_NAME, com.newgrounds.SaveQuery.OPERATOR_EQUAL, filename);
return v1;
};
v1.createSaveQueryByRating = function (groupName, ratingName, sortDescending) {
if (sortDescending == undefined) {
sortDescending = true;
}
var v1 = com.newgrounds.API.createSaveQuery(groupName);
v1.sortOn(ratingName, sortDescending);
return v1;
};
v1.onRequestedFileLoaded = function (event) {
com.newgrounds.API.removeEventListener(com.newgrounds.APIEvent.FILE_LOADED, com.newgrounds.API.onRequestedFileLoaded);
if (event.__get__success()) {
var v1 = event.__get__data();
if (v1) {
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.FILE_REQUESTED, v1);
}
}
};
v1.addEventListener = function (eventType, listener, priority, useWeakReference) {
if (priority == undefined) {
priority = 0;
}
if (useWeakReference == undefined) {
useWeakReference = true;
}
com.newgrounds.API._dispatcher.addEventListener(eventType, listener, false, priority, useWeakReference);
};
v1.removeEventListener = function (eventType, listener) {
com.newgrounds.API._dispatcher.removeEventListener(eventType, listener);
};
v1.dispatchEvent = function (event, data, error) {
if (data == undefined) {
data = null;
}
if (error == undefined) {
error = null;
}
com.newgrounds.API._dispatcher.dispatchEvent(new com.newgrounds.APIEvent(event, data, error));
};
v1.saveLocal = function (saveId, saveData) {
try {
var v3;
var v2 = 'ng_ap_secure_' + com.newgrounds.API._connection.trackerId + '_' + com.newgrounds.crypto.RC4.encrypt(saveId, com.newgrounds.API._connection.encryptionKey);
if (!com.newgrounds.API._sharedObjects[saveId]) {
com.newgrounds.API._sharedObjects[saveId] = SharedObject.getLocal(v2);
}
v3 = com.newgrounds.API._sharedObjects[saveId];
v3.data.data = com.newgrounds.API.encodeData(saveData);
}
catch (v0) {
if (Error(v0) != null) {
var error = Error(v0);
com.newgrounds.Logger.logError('Unable to save local data.', error);
return false;
return true;
}
throw v0;
}
return true;
};
v1.loadLocal = function (saveId) {
try {
var v1;
var v3 = 'ng_ap_secure_' + com.newgrounds.API._connection.trackerId + '_' + com.newgrounds.crypto.RC4.encrypt(saveId, com.newgrounds.API._connection.encryptionKey);
if (!com.newgrounds.API._sharedObjects[saveId]) {
com.newgrounds.API._sharedObjects[saveId] = SharedObject.getLocal(v3);
}
v1 = com.newgrounds.API._sharedObjects[saveId];
if (v1 && v1.data && v1.data.data) {
return com.newgrounds.API.decodeData(v1.data.data);
}
return null;
}
catch (v0) {
if (Error(v0) != null) {
var error = Error(v0);
com.newgrounds.Logger.logError('Unable to load local data.', error);
return null;
}
throw v0;
}
return null;
};
v1.logCustomEvent = function (eventName) {
if (com.newgrounds.API.assertConnected()) {
com.newgrounds.Logger.logMessage('Logged event: ' + eventName);
com.newgrounds.API._connection.sendSimpleCommand('logCustomEvent', null, {'event': eventName});
}
};
v1.encodeData = function (data) {
if (!com.newgrounds.API._connection.assertInitialized()) {
return null;
}
return com.newgrounds.crypto.RC4.encrypt(com.newgrounds.encoders.json.JSON.encode(data), com.newgrounds.API._connection.encryptionKey);
};
v1.decodeData = function (data) {
if (!com.newgrounds.API._connection.assertInitialized()) {
return null;
}
try {
return com.newgrounds.encoders.json.JSON.decode(com.newgrounds.crypto.RC4.decrypt(data, com.newgrounds.API._connection.encryptionKey));
}
catch (v0) {
if (Error(v0) != null) {
var error = Error(v0);
return null;
}
throw v0;
}
return null;
};
v1.stopPendingCommands = function () {
com.newgrounds.APICommand.stopPendingCommands();
com.newgrounds.Logger.logMessage('Pending commands stopped.');
};
v1.trimWhitespace = function (string) {
if (!string) {
return null;
}
var v3 = 0;
while (string.charAt(v3) == ' ') {
++v3;
}
var v1 = string.length - 1;
for (;;) {
if (!(string.charAt(v1) == ' ' && v1 >= 0)) break;
--v1;
}
return string.slice(v3, v1 + 1);
};
v1.VERSION = '3.1.12 AS2';
v1.RELEASE_MODE = 'releaseMode';
v1.DEBUG_MODE_LOGGED_IN = 'debugModeLoggedIn';
v1.DEBUG_MODE_LOGGED_OUT = 'debugModeLoggedOut';
v1.DEBUG_MODE_NEW_VERSION = 'debugModeNewVersion';
v1.DEBUG_MODE_HOST_BLOCKED = 'debugModeHostBlocked';
v1.TEST_AD_FEED_URL = 'http://www.ngads.com/adtest.php';
v1._dispatcher = new com.newgrounds.APIEventDispatcher();
v1._connection = new com.newgrounds.APIConnection();
v1._debugMode = com.newgrounds.API.DEBUG_MODE_LOGGED_IN;
v1._adsApproved = false;
v1._medals = new Object();
v1._medalsArray = [];
v1._scoreBoards = new Object();
v1._scoreBoardsArray = [];
v1._saveGroups = new Object();
v1._saveGroupsArray = [];
v1._sharedObjects = new Object();
v1.addProperty('adFeedURL', v1.__get__adFeedURL, function () {});
v1.addProperty('adsApproved', v1.__get__adsApproved, function () {});
v1.addProperty('apiId', v1.__get__apiId, function () {});
v1.addProperty('connected', v1.__get__connected, function () {});
v1.addProperty('debugMode', v1.__get__debugMode, v1.__set__debugMode);
v1.addProperty('hasUserSession', v1.__get__hasUserSession, function () {});
v1.addProperty('hostDomain', v1.__get__hostDomain, function () {});
v1.addProperty('hostURL', v1.__get__hostURL, function () {});
v1.addProperty('isNetworkHost', v1.__get__isNetworkHost, function () {});
v1.addProperty('isNewgrounds', v1.__get__isNewgrounds, function () {});
v1.addProperty('medals', v1.__get__medals, function () {});
v1.addProperty('publisherId', v1.__get__publisherId, function () {});
v1.addProperty('saveGroups', v1.__get__saveGroups, function () {});
v1.addProperty('scoreBoards', v1.__get__scoreBoards, function () {});
v1.addProperty('serverTime', v1.__get__serverTime, function () {});
v1.addProperty('sessionId', v1.__get__sessionId, function () {});
v1.addProperty('userId', v1.__get__userId, function () {});
v1.addProperty('username', v1.__get__username, function () {});
ASSetPropFlags(com.newgrounds.API.prototype, null, 1);
}
#endinitclip
}
movieClip 530 __Packages.com.newgrounds.encoders.ImageScanner {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.encoders) {
_global.com.newgrounds.encoders = new Object();
}
if (!_global.com.newgrounds.encoders.ImageScanner) {
var v1 = function (hashLength, charsPerPixel) {
if (hashLength) {
this._hash = com.newgrounds.encoders.ImageScanner.DEFAULT_HASH.substr(0, hashLength);
}
this._baseN = new com.newgrounds.encoders.BaseN(this._hash);
if (charsPerPixel) {
this._charsPerPixel = charsPerPixel;
}
this.__set__encodeAlpha(false);
};
com.newgrounds.encoders.ImageScanner = v1;
var v2 = v1.prototype;
v2.__get__encodeAlpha = function () {
return this._encodeAlpha;
};
v2.__set__encodeAlpha = function (v) {
this._encodeAlpha = v;
this._maxPerChannel = int(Math.pow(this._hash.length, this._charsPerPixel / (this._encodeAlpha ? 4 : 3)));
if (this._maxPerChannel > 256) {
this._maxPerChannel = 256;
}
return this.__get__encodeAlpha();
};
v2.encode = function (source, callbackFunction, callbackObject) {
var v4 = {'callbackFunction': callbackFunction, 'callbackObject': callbackObject, 'source': source, 'x': 0, 'y': 0, 'output': null};
var v2 = source.width.toString();
var v3 = source.height.toString();
while (v2.length < 3) {
v2 = '0' + v2;
}
while (v3.length < 3) {
v3 = '0' + v3;
}
v4.output = v2 + v3;
var v6 = setInterval(this, 'doEncode', com.newgrounds.encoders.ImageScanner.WORK_INTERVAL, v4);
v4.interval = v6;
};
v2.decode = function (source, callbackFunction, callbackObject) {
var v4 = {'callbackFunction': callbackFunction, 'callbackObject': callbackObject, 'source': source, 'i': 6, 'x': 0, 'y': 0, 'output': null};
var v3 = source.substr(0, 3);
var v2 = source.substr(3, 3);
while (v3.charAt(0) == '0') {
v3 = v3.substr(1);
}
while (v2.charAt(0) == '0') {
v2 = v2.substr(1);
}
var v7 = int(v3);
var v8 = int(v2);
v4.output = new flash.display.BitmapData(v7, v8, this._encodeAlpha);
var v6 = setInterval(this, 'doDecode', com.newgrounds.encoders.ImageScanner.WORK_INTERVAL, v4);
v4.interval = v6;
};
v2.doEncode = function (state) {
var v3 = getTimer();
for (;;) {
if (!(state.y < state.source.height && getTimer() - v3 < com.newgrounds.encoders.ImageScanner.WORK_INTERVAL)) break;
state.output += this.encodePixel(state.source.getPixel32(state.x, state.y));
++state.x;
if (state.x == state.source.width) {
state.x = 0;
++state.y;
}
}
if (state.y == state.source.height) {
clearInterval(state.interval);
state.callbackFunction.call(state.callbackObject, state.output);
}
};
v2.doDecode = function (state) {
var v4 = getTimer();
for (;;) {
if (!(state.y < state.output.height && getTimer() - v4 < com.newgrounds.encoders.ImageScanner.WORK_INTERVAL)) break;
var v3 = this.decodePixel(state.source.substr(state.i, this._charsPerPixel));
state.output.setPixel32(state.x, state.y, v3);
state.i += this._charsPerPixel;
++state.x;
if (state.x == state.output.width) {
state.x = 0;
++state.y;
}
}
if (state.y == state.output.height) {
clearInterval(state.interval);
state.callbackFunction.call(state.callbackObject, state.output);
}
};
v2.encodePixel = function (pixel) {
var v3 = pixel >> 24 & 255;
var v4 = pixel >> 16 & 255;
var v5 = pixel >> 8 & 255;
var v2 = pixel & 255;
v3 = int((v3 / 256) * this._maxPerChannel);
v4 = int((v4 / 256) * this._maxPerChannel);
v5 = int((v5 / 256) * this._maxPerChannel);
v2 = int((v2 / 256) * this._maxPerChannel);
var v7 = v4 * this._maxPerChannel * this._maxPerChannel + v5 * this._maxPerChannel + v2;
if (this._encodeAlpha) {
v7 += v3 * this._maxPerChannel * this._maxPerChannel * this._maxPerChannel;
}
return this._baseN.encodeUint(v7, this._charsPerPixel);
};
v2.decodePixel = function (encodedPixel) {
var v3 = 255;
var v5;
var v6;
var v4;
var v7 = 0;
var v2 = this._baseN.decodeUint(encodedPixel);
v4 = v2 % this._maxPerChannel;
v2 /= int(this._maxPerChannel);
v6 = v2 % this._maxPerChannel;
v2 /= int(this._maxPerChannel);
v5 = v2 % this._maxPerChannel;
v2 /= int(this._maxPerChannel);
if (this._encodeAlpha) {
v3 = v2 % this._maxPerChannel;
v2 /= int(this._maxPerChannel);
}
return v3 << 24 | v5 << 16 | v6 << 8 | v4;
};
v1.DEFAULT_HASH = '0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ<>?:;-_=+()!&';
v2._hash = com.newgrounds.encoders.ImageScanner.DEFAULT_HASH;
v2._charsPerPixel = 2;
v1.WORK_INTERVAL = 33.33333333333334;
v2.addProperty('encodeAlpha', v2.__get__encodeAlpha, v2.__set__encodeAlpha);
ASSetPropFlags(com.newgrounds.encoders.ImageScanner.prototype, null, 1);
}
#endinitclip
}
movieClip 531 __Packages.com.newgrounds.SaveFile {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.SaveFile) {
var v1 = function (group) {
super();
this._iconLoader = new com.newgrounds.BitmapLoader(com.newgrounds.SaveFile.DEFAULT_ICON, null);
this._group = group;
this._keys = {};
this._ratings = {};
this._numVotes = {};
};
com.newgrounds.SaveFile = v1;
com.newgrounds.SaveFile extends com.newgrounds.APIEventDispatcher;
var v2 = v1.prototype;
v1.__get__currentFile = function () {
return com.newgrounds.SaveFile._currentFile;
};
v1.fromObject = function (group, fileData) {
var v3 = new com.newgrounds.SaveFile(group);
v3._name = fileData.filename;
v3._description = fileData.description;
v3._id = fileData.save_id;
v3._authorId = fileData.user_id;
v3._authorName = fileData.user_name;
v3._createdDate = fileData.created;
v3._modifiedDate = fileData.last_update;
v3._views = fileData.views;
if (fileData.thumb && fileData.thumb != '') {
v3._iconLoader.__set__url(com.newgrounds.SaveFile._imageFilePath + fileData.thumb);
}
v3._dataURL = com.newgrounds.SaveFile._saveFilePath + fileData.file;
v3._fileSize = fileData.file_size;
v3._approved = fileData.status != com.newgrounds.SaveFile.STATUS_UNAPPROVED;
v3._readOnly = false;
v3._public = fileData.status != com.newgrounds.SaveFile.STATUS_PRIVATE && fileData.status != com.newgrounds.SaveFile.STATUS_UNAPPROVED;
for (var v8 in fileData.keys) {
var v6 = fileData.keys[v8];
var v4 = group.getKeyById(v6.id);
if (v4) {
v3._keys[v4.__get__name()] = v4.validateValue(v6.value);
}
}
for (var v9 in fileData.ratings) {
var v5 = fileData.ratings[v9];
var v2 = group.getRatingById(v5.id);
if (v2) {
v3._ratings[v2.__get__name()] = v2.validateValue(v5.score);
v3._numVotes[v2.__get__name()] = int(v5.votes);
}
}
return v3;
};
v2.__get__group = function () {
return this._group;
};
v2.__get__name = function () {
return this._name;
};
v2.__set__name = function (val) {
this._name = val;
return this.__get__name();
};
v2.__get__description = function () {
return this._description;
};
v2.__set__description = function (val) {
this._description = val;
return this.__get__description();
};
v2.__get__id = function () {
return this._id;
};
v2.__get__data = function () {
return this._data;
};
v2.__set__data = function (val) {
this._data = val;
return this.__get__data();
};
v2.__get__bytesLoaded = function () {
if (this._data) {
return this.__get__bytesTotal();
} else {
if (!this._dataLoader) {
return 0;
} else {
return this._dataLoader.getBytesLoaded();
}
}
};
v2.__get__bytesTotal = function () {
return this._fileSize;
};
v2.__get__readOnly = function () {
return this._readOnly;
};
v2.__get__draft = function () {
return this._draft;
};
v2.__set__draft = function (v) {
this._draft = v;
return this.__get__draft();
};
v2.__get__authorId = function () {
return this._authorId;
};
v2.__get__authorName = function () {
return this._authorName;
};
v2.__get__keys = function () {
return this._keys;
};
v2.__get__ratings = function () {
return this._ratings;
};
v2.__get__numVotes = function () {
return this._numVotes;
};
v2.__get__views = function () {
return this._views;
};
v2.__get__createdDate = function () {
return this._createdDate;
};
v2.__get__updatedDate = function () {
return this._modifiedDate;
};
v2.toString = function () {
return 'Save File: ' + this._name;
};
v2.__get__icon = function () {
return this._iconLoader.__get__bitmapData();
};
v2.__set__icon = function (v) {
this.createIcon(v);
return this.__get__icon();
};
v2.__get__iconLoaded = function () {
return this._iconLoader.__get__loaded();
};
v2.createIcon = function (source) {
var v9 = new flash.display.BitmapData(com.newgrounds.SaveFile.ICON_WIDTH, com.newgrounds.SaveFile.ICON_HEIGHT, false, 0);
var v7;
var v6;
var v10 = 0;
var v8 = 0;
if (source instanceof flash.display.BitmapData) {
v7 = source.width;
v6 = source.height;
} else {
if (source instanceof MovieClip) {
var v2 = (MovieClip(source)).getBounds(source);
v7 = v2.xMax - v2.xMin;
v6 = v2.yMax - v2.yMin;
v10 = v2.xMin;
v8 = v2.yMin;
}
}
var v4 = new flash.geom.Matrix();
var v5;
v5 = Math.min(com.newgrounds.SaveFile.ICON_WIDTH / v7, com.newgrounds.SaveFile.ICON_HEIGHT / v6);
v4.translate(-v10, -v8);
v4.scale(v5, v5);
v4.translate((com.newgrounds.SaveFile.ICON_WIDTH - v7 * v5) / 2, (com.newgrounds.SaveFile.ICON_HEIGHT - v6 * v5) / 2);
v9.draw(source, v4);
this._iconLoader.__set__bitmapData(v9);
};
v2.attachIcon = function (parent) {
if (this._iconLoader) {
return this._iconLoader.attachBitmap(parent);
}
com.newgrounds.Logger.logError('No icon available for this sumbission.');
return null;
};
v2.deleteFile = function () {
if (!(this._group.__get__connection()).__get__hasUserSession()) {
com.newgrounds.Logger.logError('The user must be logged-in to delete a file.');
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_DELETED, null, com.newgrounds.APIEvent.ERROR_NOT_LOGGED_IN));
return undefined;
}
if (!this._id) {
com.newgrounds.Logger.logError('The file does not exist.');
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_DELETED, null, com.newgrounds.APIEvent.ERROR_NOT_LOGGED_IN));
return undefined;
}
var v2 = new com.newgrounds.APICommand('deleteSaveFile');
(v2.__get__secureParameters()).save_id = this._id;
v2.addEventListener(com.newgrounds.APIEvent.COMMAND_COMPLETE, {'target': this, 'func': this.onFileDeleted});
(this._group.__get__connection()).sendCommand(v2);
};
v2.save = function () {
if (!(this._group.__get__connection()).__get__hasUserSession()) {
com.newgrounds.Logger.logError('The user must be logged-in to save a file.');
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_SAVED, null, com.newgrounds.APIEvent.ERROR_NOT_LOGGED_IN));
return undefined;
}
++com.newgrounds.BitmapLoader._cacheSeed;
com.newgrounds.SaveFile._currentFile = this;
if (this.__get__iconLoaded()) {
com.newgrounds.SaveFile.ICON_IMAGE_SCANNER.encode(this.__get__icon(), this.onIconEncoded, this);
} else {
this.encodeData(true);
}
};
v2.onIconEncoded = function (encodedIcon) {
this._encodedIcon = encodedIcon;
this.encodeData(true);
};
v2.doSave = function () {
var v4 = new com.newgrounds.APICommand('saveFile');
(v4.__get__secureParameters()).group = this._group.id;
(v4.__get__secureParameters()).user_name = (this._group.__get__connection()).username;
(v4.__get__secureParameters()).filename = this._name;
(v4.__get__secureParameters()).description = this._description;
if (this._draft) {
(v4.__get__secureParameters()).draft = true;
}
if (this._id && !this._readOnly) {
(v4.__get__secureParameters()).overwrite = 1;
(v4.__get__secureParameters()).save_id = this._id;
}
var v8 = [];
for (var v9 in this._keys) {
var v2 = this._group.getKey(v9);
if (v2) {
v8.push({'id': v2.__get__id(), 'value': v2.validateValue(this._keys[v9])});
} else {
com.newgrounds.Logger.logError('No key named "' + v9 + '" in save group "' + this._group.__get__name() + '".');
}
}
(v4.__get__secureParameters()).keys = v8;
var v7 = [];
for (var v10 in this._ratings) {
var v3 = this._group.getRating(v10);
if (v3) {
v7.push({'id': v3.__get__id(), 'value': v3.validateValue(this._ratings[v10])});
} else {
com.newgrounds.Logger.logError('No rating named "' + v10 + '" in save group "' + this._group.__get__name() + '".');
}
}
(v4.__get__secureParameters()).ratings = v7;
if (typeof this._encodedData == 'string') {
v4.addFile('file', this._encodedData, 'file');
} else {
v4.addFile('file', com.newgrounds.encoders.json.JSON.encode(this._encodedData), 'file');
}
if (this.__get__iconLoaded()) {
v4.addFile('thumbnail', this._encodedIcon, 'thumbnail');
}
v4.addEventListener(com.newgrounds.APIEvent.COMMAND_COMPLETE, {'target': this, 'func': this.onSaveComplete});
(this._group.__get__connection()).sendCommand(v4);
};
v2.encodeData = function (encode) {
this._encoderQueue = [];
this._encoding = encode;
if (encode) {
this._encodedData = this._data;
this.preEncodeObject(this, '_encodedData');
} else {
this.preEncodeObject(this, '_data');
}
this.encodeObject();
};
v2.preEncodeObject = function (parent, property) {
var v3 = parent[property];
var v5;
try {
if (this._encoding) {
v5 = v3 instanceof flash.display.BitmapData;
} else {
v5 = v3.type == '__bitmap';
}
}
var v2 = v3;
var v8;
if (v5) {
this._encoderQueue.push({'parent': parent, 'property': property});
} else {
if (typeof v3 == 'object' && !v8) {
if (this._encoding) {
if (v3 instanceof Array) {
v2 = [];
} else {
v2 = {};
}
for (var v4 in v3) {
v2[v4] = v3[v4];
}
parent[property] = v2;
}
for (v4 in v2) {
this.preEncodeObject(v2, v4);
}
}
}
};
v2.encodeObject = function () {
if (!this._encoderQueue.length) {
if (this._encoding) {
this.doSave();
} else {
this._dataLoaded = true;
this.checkLoadComplete();
}
return undefined;
}
var v6 = this._encoderQueue.pop();
var v4 = v6.parent;
var v3 = v6.property;
var v2 = v4[v3];
var v5;
if (this._encoding) {
v5 = {'type': '__bitmap', 'width': v2.width, 'height': v2.height, 'transparent': v2.transparent};
v4[v3] = v5;
this._encodingParent = v5;
this._encodingProperty = 'data';
com.newgrounds.SaveFile.DATA_IMAGE_SCANNER.__set__encodeAlpha(v2.transparent);
com.newgrounds.SaveFile.DATA_IMAGE_SCANNER.encode(flash.display.BitmapData(v2), this.encodeBitmapComplete, this);
} else {
this._encodingParent = v4;
this._encodingProperty = v3;
com.newgrounds.SaveFile.DATA_IMAGE_SCANNER.__set__encodeAlpha(v2.transparent);
com.newgrounds.SaveFile.DATA_IMAGE_SCANNER.decode(String(v2.data), this.encodeBitmapComplete, this);
}
};
v2.encodeBitmapComplete = function (data) {
this._encodingParent[this._encodingProperty] = data;
this.encodeObject();
};
v2.load = function () {
com.newgrounds.SaveFile._currentFile = this;
this._dataLoaded = false;
this._data = null;
if (!this.__get__iconLoaded()) {
this._iconLoader.addEventListener(com.newgrounds.APIEvent.ICON_LOADED, {'target': this, 'func': this.onIconLoaded});
this._iconLoader.load();
}
this._dataLoader = new LoadVars();
var file = this;
this._dataLoader.onData = function (data) {
file.onDataLoaded(data);
};
this._dataLoader.load(this._dataURL + '&random=' + Math.random());
};
v2.onIconLoaded = function (event) {
if (!event.__get__success() && this._iconLoader.__get__url()) {
com.newgrounds.Logger.logWarning('Unable to load the icon for this save file.');
}
this._iconLoader.removeEventListener(com.newgrounds.APIEvent.ICON_LOADED, this.onIconLoaded);
this.checkLoadComplete();
};
v2.checkLoadComplete = function () {
if (this._dataLoaded && this.__get__iconLoaded()) {
com.newgrounds.Logger.logMessage('Data loaded.');
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_LOADED, this));
}
};
v2.onDataLoaded = function (data) {
try {
if (data) {
if (data.charAt(0) == '{') {
this._data = com.newgrounds.encoders.json.JSON.decode(String(data));
} else {
this._data = String(data);
}
this.encodeData(false);
}
}
catch (v0) {
if (Error(v0) != null) {
var error = Error(v0);
com.newgrounds.Logger.logError('Error while loading data:', error);
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_LOADED, this, com.newgrounds.APIEvent.ERROR_BAD_FILE));
} else {
throw v0;
}
}
};
v2.onDataError = function (error) {
com.newgrounds.Logger.logError('Unable to load data:', error);
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_LOADED, this, com.newgrounds.APIEvent.ERROR_BAD_FILE));
};
v2.onSaveComplete = function (event) {
if (event.__get__success()) {
com.newgrounds.Logger.logMessage('File "' + this._name + '" saved!');
if (event.__get__data()) {
this._id = (event.__get__data()).save_id;
this._dataURL = unescape((event.__get__data()).file_url);
}
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_SAVED, this));
} else {
com.newgrounds.Logger.logError('Error saving file "' + this._name + '":', event.__get__error());
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_SAVED, this, event.__get__error()));
}
};
v2.sendVote = function (ratingName, vote) {
var v2 = this._group.getRating(ratingName);
if (!v2) {
com.newgrounds.Logger.logError('No save rating named "' + ratingName + '" exists for this save group.');
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.VOTE_COMPLETE, {}, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT));
return undefined;
}
vote = v2.validateValue(vote);
if (isNaN(vote)) {
com.newgrounds.Logger.logError('Invalid vote (' + vote + '). ' + ratingName + ' allows a range of ' + v2.__get__minimum() + '-' + v2.__get__maximum() + '.');
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.VOTE_COMPLETE, {}, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT));
return undefined;
}
com.newgrounds.Logger.logMessage('Voting ' + vote + ' for ' + ratingName + ' on ' + this._name + '...');
(this._group.__get__connection()).sendSimpleCommand('rateSaveFile', {'target': this, 'func': this.onVoteComplete}, null, {'group': this._group.__get__id(), 'save_id': this._id, 'rating_id': v2.__get__id(), 'vote': vote});
};
v2.onVoteComplete = function (event) {
var v2 = event.__get__error();
if ((event.__get__data()).already_voted) {
com.newgrounds.Logger.logError('Vote failed. You\'ve already voted on this rating today.');
v2 = com.newgrounds.APIEvent.ERROR_ALREADY_VOTED;
}
if (v2 == com.newgrounds.APIEvent.ERROR_NONE) {
var v3 = this._group.getRatingById((event.__get__data()).rating_id);
if (v3) {
this._ratings[v3.__get__name()] = v3.validateValue((event.__get__data()).score);
}
com.newgrounds.Logger.logMessage('Vote complete!');
}
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.VOTE_COMPLETE, this, v2));
};
v2.onFileDeleted = function (event) {
if (event.__get__success()) {
this._id = 0;
}
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_DELETED, this, event.__get__error()));
};
v2.clone = function () {
var v3 = new com.newgrounds.SaveFile(this._group);
v3._data = this._data;
v3._description = this._description;
v3._draft = this._draft;
v3._fileSize = this._fileSize;
v3._iconLoader.__set__bitmapData(this._iconLoader.bitmapData);
var v2;
for (v2 in this._keys) {
v3._keys[v2] = this._keys[v2];
}
for (v2 in this._ratings) {
v3._ratings[v2] = this._ratings[v2];
}
for (v2 in this._numVotes) {
v3._numVotes[v2] = this._numVotes[v2];
}
v3._name = this._name;
return v3;
};
v1.ICON_WIDTH = 90;
v1.ICON_HEIGHT = 90;
v1.DEFAULT_ICON = new flash.display.BitmapData(com.newgrounds.SaveFile.ICON_WIDTH, com.newgrounds.SaveFile.ICON_HEIGHT, false, 0);
v1.STATUS_PRIVATE = 0;
v1.STATUS_SHARED = 1;
v1.STATUS_UNAPPROVED = 2;
v1.STATUS_APPROVED = 3;
v1._imageFilePath = '';
v1._saveFilePath = '';
v1.ICON_IMAGE_SCANNER = new com.newgrounds.encoders.ImageScanner();
v1.DATA_IMAGE_SCANNER = new com.newgrounds.encoders.ImageScanner(64, 6);
v2.addProperty('authorId', v2.__get__authorId, function () {});
v2.addProperty('authorName', v2.__get__authorName, function () {});
v2.addProperty('bytesLoaded', v2.__get__bytesLoaded, function () {});
v2.addProperty('bytesTotal', v2.__get__bytesTotal, function () {});
v2.addProperty('createdDate', v2.__get__createdDate, function () {});
v1.addProperty('currentFile', v1.__get__currentFile, function () {});
v2.addProperty('data', v2.__get__data, v2.__set__data);
v2.addProperty('description', v2.__get__description, v2.__set__description);
v2.addProperty('draft', v2.__get__draft, v2.__set__draft);
v2.addProperty('group', v2.__get__group, function () {});
v2.addProperty('icon', v2.__get__icon, v2.__set__icon);
v2.addProperty('iconLoaded', v2.__get__iconLoaded, function () {});
v2.addProperty('id', v2.__get__id, function () {});
v2.addProperty('keys', v2.__get__keys, function () {});
v2.addProperty('name', v2.__get__name, v2.__set__name);
v2.addProperty('numVotes', v2.__get__numVotes, function () {});
v2.addProperty('ratings', v2.__get__ratings, function () {});
v2.addProperty('readOnly', v2.__get__readOnly, function () {});
v2.addProperty('updatedDate', v2.__get__updatedDate, function () {});
v2.addProperty('views', v2.__get__views, function () {});
ASSetPropFlags(com.newgrounds.SaveFile.prototype, null, 1);
}
#endinitclip
}
movieClip 529 __Packages.com.newgrounds.SaveGroup {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.SaveGroup) {
var v1 = function (connection, name, id, type, keys, ratings) {
this._connection = connection;
this._id = id;
this._name = name;
this._type = type;
this._keysArray = keys;
this._ratingsArray = ratings;
this._keys = new Object();
this._ratings = new Object();
var v11;
for (var v7 in keys) {
var v2 = keys[v7];
this._keys[v2.__get__name()] = v2;
}
for (var v6 in ratings) {
var v3 = ratings[v6];
this._ratings[v3.__get__name()] = v3;
}
};
com.newgrounds.SaveGroup = v1;
var v2 = v1.prototype;
v2.__get__connection = function () {
return this._connection;
};
v2.__get__name = function () {
return this._name;
};
v2.__get__type = function () {
return this._type;
};
v2.__get__id = function () {
return this._id;
};
v2.__get__keys = function () {
return this._keysArray;
};
v2.__get__ratings = function () {
return this._ratingsArray;
};
v2.getKey = function (name) {
return this._keys[name];
};
v2.getRating = function (name) {
return this._ratings[name];
};
v2.getKeyById = function (id) {
for (var v4 in this._keys) {
var v2 = this._keys[v4];
if (v2.__get__id() == id) {
return v2;
}
}
return null;
};
v2.getRatingById = function (id) {
for (var v4 in this._ratings) {
var v2 = this._ratings[v4];
if (v2.__get__id() == id) {
return v2;
}
}
return null;
};
v2.toString = function () {
return 'SaveGroup: ' + this.__get__name() + ' Keys: ' + this._keysArray + ' Ratings: ' + this._ratingsArray;
};
v1.TYPE_SYSTEM = 0;
v1.TYPE_PRIVATE = 1;
v1.TYPE_PUBLIC = 2;
v1.TYPE_MODERATED = 3;
v2.addProperty('connection', v2.__get__connection, function () {});
v2.addProperty('id', v2.__get__id, function () {});
v2.addProperty('keys', v2.__get__keys, function () {});
v2.addProperty('name', v2.__get__name, function () {});
v2.addProperty('ratings', v2.__get__ratings, function () {});
v2.addProperty('type', v2.__get__type, function () {});
ASSetPropFlags(com.newgrounds.SaveGroup.prototype, null, 1);
}
#endinitclip
}
movieClip 527 __Packages.com.newgrounds.SaveKey {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.SaveKey) {
var v1 = function (name, id, type) {
this._name = name;
this._id = id;
this._type = type;
};
com.newgrounds.SaveKey = v1;
var v2 = v1.prototype;
v2.__get__name = function () {
return this._name;
};
v2.__get__id = function () {
return this._id;
};
v2.__get__type = function () {
return this._type;
};
v2.validateValue = function (value) {
switch (this._type) {
return null;
case com.newgrounds.SaveKey.TYPE_INTEGER:
value = Number(value);
if (!isNaN(value)) {
var v3 = int(value);
if (v3 != value) {
com.newgrounds.Logger.logWarning('Float value ' + value + ' given for integer key "' + this._name + '". Clamping to ' + v3 + '.');
}
return v3;
}
return null;
case com.newgrounds.SaveKey.TYPE_FLOAT:
value = Number(value);
if (!isNaN(value)) {
return isNaN(Number(value));
}
return null;
case com.newgrounds.SaveKey.TYPE_BOOLEAN:
return Boolean(value) && int(value) != 0;
return null;
case com.newgrounds.SaveKey.TYPE_STRING:
return value ? value.toString() : '';
return null;
}
return null;
};
v2.toString = function () {
return this._name;
};
v1.TYPE_FLOAT = 1;
v1.TYPE_INTEGER = 2;
v1.TYPE_STRING = 3;
v1.TYPE_BOOLEAN = 4;
v2.addProperty('id', v2.__get__id, function () {});
v2.addProperty('name', v2.__get__name, function () {});
v2.addProperty('type', v2.__get__type, function () {});
ASSetPropFlags(com.newgrounds.SaveKey.prototype, null, 1);
}
#endinitclip
}
movieClip 528 __Packages.com.newgrounds.SaveRating {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.SaveRating) {
var v1 = function (name, id, isFloat, minimum, maximum) {
this._name = name;
this._id = id;
this._isFloat = isFloat;
this._minimum = minimum;
this._maximum = maximum;
};
com.newgrounds.SaveRating = v1;
var v2 = v1.prototype;
v2.__get__name = function () {
return this._name;
};
v2.__get__id = function () {
return this._id;
};
v2.__get__isFloat = function () {
return this._isFloat;
};
v2.__get__minimum = function () {
return this._minimum;
};
v2.__get__maximum = function () {
return this._maximum;
};
v2.validateValue = function (value) {
var v2 = Number(value);
if (isNaN(v2)) {
com.newgrounds.Logger.logError('Invalid value for rating "' + this._name + '".');
return NaN;
}
if (v2 < this._minimum) {
com.newgrounds.Logger.logWarning(v2 + ' is out of acceptable range for rating "' + this._name + '". Clamping to ' + this._minimum + '.');
return this._minimum;
}
if (v2 > this._maximum) {
com.newgrounds.Logger.logWarning(v2 + ' is out of acceptable range for rating "' + this._name + '". Clamping to ' + this._maximum + '.');
return this._maximum;
}
if (!this.__get__isFloat()) {
var v3 = int(v2);
if (v3 != v2) {
com.newgrounds.Logger.logWarning('Float value ' + v2 + ' given for integer rating "' + this._name + '". Clamping to ' + v3 + '.');
}
return v3;
}
return v2;
};
v2.toString = function () {
return this._name;
};
v2.addProperty('id', v2.__get__id, function () {});
v2.addProperty('isFloat', v2.__get__isFloat, function () {});
v2.addProperty('maximum', v2.__get__maximum, function () {});
v2.addProperty('minimum', v2.__get__minimum, function () {});
v2.addProperty('name', v2.__get__name, function () {});
ASSetPropFlags(com.newgrounds.SaveRating.prototype, null, 1);
}
#endinitclip
}
movieClip 523 __Packages.com.newgrounds.BitmapLoader {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.BitmapLoader) {
var v1 = function (defaultBitmap, url) {
super();
this._bitmapData = defaultBitmap;
this._url = url;
};
com.newgrounds.BitmapLoader = v1;
com.newgrounds.BitmapLoader extends com.newgrounds.APIEventDispatcher;
var v2 = v1.prototype;
v2.__get__url = function () {
return this._url;
};
v2.__set__url = function (v) {
this._loaded = false;
this._url = v;
return this.__get__url();
};
v2.__get__bitmapData = function () {
return this._bitmapData;
};
v2.__set__bitmapData = function (v) {
this._bitmapData = v;
this._loaded = true;
return this.__get__bitmapData();
};
v2.__get__loaded = function () {
return this._loaded;
};
v2.disposeLoader = function () {
if (this._loader) {
if (this._loaderClip._parent == _root) {
this._loader.unloadClip(this._loaderClip.bitmap);
this._loaderClip.removeMovieClip();
}
this._loader = null;
this._loaderClip = null;
}
};
v2.load = function () {
if (!this._url || this._url == '') {
this.onLoadComplete();
return undefined;
}
this._loaded = false;
if (this._bitmapData) {
this._bitmapData.dispose();
this._bitmapData = null;
}
this.disposeLoader();
this.attachBitmap(null);
};
v2.attachBitmap = function (parent) {
if (!parent) {
parent = _root;
}
var v5 = parent.getNextHighestDepth();
var v3 = parent.createEmptyMovieClip('__bitmap' + v5, v5);
if (!this._loaded && this._url && this._url != '') {
v3.createEmptyMovieClip('bitmap', 0);
this._loader = new MovieClipLoader();
this._loaderClip = v3;
if (parent == _root) {
this._loaderClip._visible = false;
}
var thisObj = this;
this._loaderClip.onEnterFrame = function () {
thisObj.pollLoad();
};
this._loader.addListener({'onLoadError': function () {
thisObj.onLoadComplete();
}});
this._loader.loadClip(this._url, v3.bitmap);
return v3;
}
v3.attachBitmap(this._bitmapData, 0);
return v3;
};
v2.pollLoad = function () {
if (this._loaderClip._width) {
this.onLoadComplete();
}
};
v2.onLoadComplete = function () {
var v2;
if (this._loader && this._loaderClip && this._loaderClip._width) {
try {
this._loaderClip.onEnterFrame = null;
v2 = new flash.display.BitmapData(this._loaderClip._width, this._loaderClip._height, true, 0);
v2.draw(this._loaderClip);
this._bitmapData = v2;
this._loaded = true;
}
catch (error) {
if (v2) {
v2.dispose();
}
}
}
this.disposeLoader();
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.ICON_LOADED, this, this._loaded ? null : com.newgrounds.APIEvent.ERROR_BAD_FILE));
};
v1._cacheSeed = 0;
v2._loaded = true;
v2.addProperty('bitmapData', v2.__get__bitmapData, v2.__set__bitmapData);
v2.addProperty('loaded', v2.__get__loaded, function () {});
v2.addProperty('url', v2.__get__url, v2.__set__url);
ASSetPropFlags(com.newgrounds.BitmapLoader.prototype, null, 1);
}
#endinitclip
}
movieClip 532 __Packages.com.newgrounds.SaveQuery {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.SaveQuery) {
var v1 = function (group) {
super();
this._group = group;
this._connection = group.connection;
this.reset();
};
com.newgrounds.SaveQuery = v1;
com.newgrounds.SaveQuery extends com.newgrounds.APIEventDispatcher;
var v2 = v1.prototype;
v2.__get__group = function () {
return this._group;
};
v2.__get__resultsPerPage = function () {
return this._resultsPerPage;
};
v2.__set__resultsPerPage = function (val) {
this._resultsPerPage = Math.min(Math.max(val, 1), 100);
return this.__get__resultsPerPage();
};
v2.__get__page = function () {
return this._page;
};
v2.__set__page = function (val) {
this._page = Math.max(val, 1);
return this.__get__page();
};
v2.prevPage = function () {
this.__set__page(this.__get__page() - 1);
};
v2.nextPage = function () {
this.__set__page(this.__get__page() + 1);
};
v2.__get__isRandomized = function () {
return this._isRandomized;
};
v2.__set__isRandomized = function (val) {
this._isRandomized = val;
return this.__get__isRandomized();
};
v2.__get__files = function () {
return this._files;
};
v2.reset = function () {
this._page = 1;
this._resultsPerPage = 10;
this._isRandomized = false;
this._lookupKeys = [];
this._lookupRatings = [];
this._fileConditions = [];
this._keyConditions = [];
this._ratingConditions = [];
this._sortFields = [];
this._files = [];
this.includeAllFields();
};
v2.clone = function () {
var v2 = new com.newgrounds.SaveQuery(this._group);
v2._page = this._page;
v2._resultsPerPage = this._resultsPerPage;
v2._isRandomized = this._isRandomized;
v2._lookupKeys = this._lookupKeys.concat();
v2._lookupRatings = this._lookupRatings.concat();
v2._fileConditions = this._fileConditions.concat();
v2._keyConditions = this._keyConditions.concat();
v2._ratingConditions = this._ratingConditions.concat();
return v2;
};
v2.includeAllFields = function () {
for (var v5 in this._group.__get__keys()) {
var v2 = (this._group.__get__keys())[v5];
this._lookupKeys.push(v2.__get__id());
}
for (var v4 in this._group.__get__ratings()) {
var v3 = (this._group.__get__ratings())[v4];
this._lookupRatings.push(v3.__get__id());
}
};
v2.addCondition = function (field, operator, value) {
var v2;
v2 = 0;
while (v2 < com.newgrounds.SaveQuery.FILE_FIELDS.length) {
if (com.newgrounds.SaveQuery.FILE_FIELDS[v2] == field) {
break;
}
++v2;
}
if (v2 == com.newgrounds.SaveQuery.FILE_FIELDS.length) {
v2 = -1;
}
if (v2 >= 0) {
this._fileConditions.push({'field': v2, 'operator': operator, 'value': value});
} else {
var v4 = this._group.getKey(field);
if (v4) {
value = v4.validateValue(value);
this._keyConditions.push({'key_id': v4.__get__id(), 'operator': operator, 'value': value});
return undefined;
}
var v3 = field.split('.');
var v6 = this._group.getRating(v3[0]);
if (v6) {
if (v3[1] != 'votes') {
value = v6.validateValue(value);
}
this._ratingConditions.push({'rating_id': v6.__get__id(), 'operator': operator, 'value': value, 'column': v3[1] ? v3[1] : 'score'});
return undefined;
}
com.newgrounds.Logger.logError('The save group "' + this._group.__get__name() + '" does not have a field named "' + field + '".');
}
};
v2.sortOn = function (field, sortDescending) {
if (sortDescending == undefined) {
sortDescending = false;
}
var v2;
v2 = 0;
while (v2 < com.newgrounds.SaveQuery.FILE_FIELDS.length) {
if (com.newgrounds.SaveQuery.FILE_FIELDS[v2] == field) {
break;
}
++v2;
}
if (v2 == com.newgrounds.SaveQuery.FILE_FIELDS.length) {
v2 = -1;
}
if (v2 >= 0) {
this._sortFields.push({'table': com.newgrounds.SaveQuery.TABLE_FILES, 'field': v2, 'desc': sortDescending});
} else {
var v5 = this._group.getKey(field);
if (v5) {
this._sortFields.push({'table': com.newgrounds.SaveQuery.TABLE_KEYS, 'field': v5.__get__id(), 'desc': sortDescending});
return undefined;
}
var v3 = field.split('.');
var v6 = this._group.getRating(v3[0]);
if (v6) {
this._sortFields.push({'table': com.newgrounds.SaveQuery.TABLE_RATINGS, 'field': v6.__get__id(), 'desc': sortDescending, 'extra': v3[1] ? v3[1] : 'score'});
return undefined;
}
com.newgrounds.Logger.logError('The save group "' + this._group.__get__name() + '" does not have a field named "' + field + '".');
}
};
v2.execute = function () {
var v5 = {};
v5.page = this._page;
v5.num_results = this._resultsPerPage;
if (this._isRandomized) {
v5.randomize = 1;
}
if (this._lookupKeys && this._lookupKeys.length) {
v5.lookup_keys = this._lookupKeys;
}
if (this._lookupRatings && this._lookupRatings.length) {
v5.lookup_ratings = this._lookupRatings;
}
if (this._fileConditions && this._fileConditions.length) {
v5.file_conditions = this._fileConditions;
}
if (this._keyConditions && this._keyConditions.length) {
v5.key_conditions = this._keyConditions;
}
if (this._ratingConditions && this._ratingConditions.length) {
v5.rating_conditions = this._ratingConditions;
}
if (this._sortFields && this._sortFields.length) {
v5.sort_conditions = this._sortFields;
}
this._connection.sendSimpleCommand('lookupSaveFiles', {'target': this, 'func': this.onQueryComplete}, {'publisher_id': this._connection.publisherId, 'group_id': this._group.__get__id(), 'query': v5});
};
v2.onQueryComplete = function (event) {
if (event.__get__success()) {
var v4 = event.__get__data();
this._files = [];
if (v4.files) {
var v2 = 0;
while (v2 < v4.files.length) {
var v3 = com.newgrounds.SaveFile.fromObject(this._group, v4.files[v2]);
if (v3) {
this._files.push(v3);
}
++v2;
}
}
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.QUERY_COMPLETE, this));
} else {
com.newgrounds.Logger.logError('Query failed: ' + event.__get__error());
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.QUERY_COMPLETE, this, event.__get__error()));
}
};
v1.FILE_ID = 'fileId';
v1.AUTHOR_ID = 'authorId';
v1.AUTHOR_NAME = 'authorName';
v1.FILE_NAME = 'fileName';
v1.CREATED_ON = 'createdOn';
v1.UPDATED_ON = 'updatedOn';
v1.FILE_VIEWS = 'fileViews';
v1.FILE_STATUS = 'fileStatus';
v1.FILE_FIELDS = [com.newgrounds.SaveQuery.FILE_ID, com.newgrounds.SaveQuery.AUTHOR_ID, com.newgrounds.SaveQuery.AUTHOR_NAME, com.newgrounds.SaveQuery.FILE_NAME, com.newgrounds.SaveQuery.CREATED_ON, com.newgrounds.SaveQuery.UPDATED_ON, com.newgrounds.SaveQuery.FILE_VIEWS, com.newgrounds.SaveQuery.FILE_STATUS];
v1.OPERATOR_EQUAL = '=';
v1.OPERATOR_LESS_THAN = '<';
v1.OPERATOR_GREATER_THAN = '>';
v1.OPERATOR_NOT_EQUAL = '!=';
v1.OPERATOR_LESS_OR_EQUAL = '<=';
v1.OPERATOR_GREATER_OR_EQUAL = '>=';
v1.OPERATOR_CONTAINS = '*';
v1.OPERATOR_NOT_CONTAINS = '!*';
v1.OPERATOR_NOT_BEGINS_WITH = '!*=';
v1.OPERATOR_NOT_ENDS_WITH = '!=*';
v1.OPERATOR_BEGINS_WITH = '*=';
v1.OPERATOR_ENDS_WITH = '=*';
v1.TABLE_FILES = 1;
v1.TABLE_KEYS = 2;
v1.TABLE_RATINGS = 3;
v2._page = 1;
v2._resultsPerPage = 10;
v2._isRandomized = false;
v2.addProperty('files', v2.__get__files, function () {});
v2.addProperty('group', v2.__get__group, function () {});
v2.addProperty('isRandomized', v2.__get__isRandomized, v2.__set__isRandomized);
v2.addProperty('page', v2.__get__page, v2.__set__page);
v2.addProperty('resultsPerPage', v2.__get__resultsPerPage, v2.__set__resultsPerPage);
ASSetPropFlags(com.newgrounds.SaveQuery.prototype, null, 1);
}
#endinitclip
}
movieClip 524 __Packages.com.newgrounds.Medal {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.Medal) {
var v1 = function (connection, id, name, description, secret, unlocked, value, difficultyId, iconURL) {
super();
this._connection = connection;
this._id = id;
this._name = name;
this._description = description;
this._secret = secret;
this._unlocked = unlocked;
this._value = value;
this._difficulty = com.newgrounds.Medal.DIFFICULTIES[difficultyId];
this._iconLoader = new com.newgrounds.BitmapLoader(com.newgrounds.Medal.DEFAULT_ICON, iconURL);
this._iconLoader.load();
};
com.newgrounds.Medal = v1;
com.newgrounds.Medal extends com.newgrounds.APIEventDispatcher;
var v2 = v1.prototype;
v2.__get__difficulty = function () {
return this._difficulty;
};
v2.__get__icon = function () {
return this._iconLoader.__get__bitmapData();
};
v2.__get__id = function () {
return this._id;
};
v2.__get__name = function () {
return this._name;
};
v2.__get__description = function () {
return this._description;
};
v2.__get__secret = function () {
return this._secret;
};
v2.__get__unlocked = function () {
return this._unlocked;
};
v2.__get__value = function () {
return this._value;
};
v2.toString = function () {
if (!this._unlocked) {
return 'Medal: ' + this._name + '\t\t(' + 'locked, ' + this._value + 'pts, ' + this._difficulty + ')';
}
return 'Medal: ' + this._name + '\t\t(' + 'unlocked, ' + this._value + 'pts, ' + this._difficulty + ')';
};
v2.attachIcon = function (parent) {
return this._iconLoader.attachBitmap(parent);
};
v2.unlock = function () {
if (this._unlocked) {
com.newgrounds.Logger.logWarning('Medal "' + this._name + '" is already unlocked.');
return undefined;
}
com.newgrounds.Logger.logMessage('Unlocking medal "' + this.__get__name() + '"...');
this._unlocked = true;
if (this._connection.__get__hasUserSession()) {
this._connection.sendSimpleCommand('unlockMedal', {'target': this, 'func': this.onUnlockConfirmed}, null, {'medal_id': this.__get__id()});
}
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.MEDAL_UNLOCKED, this));
};
v2.setUnlocked = function (unlocked) {
this._unlocked = unlocked;
};
v2.onUnlockConfirmed = function (event) {
if (event.__get__success()) {
com.newgrounds.Logger.logMessage('Medal "' + this.__get__name() + '" unlocked.');
} else {
com.newgrounds.Logger.logError('Failed to unlock "' + this.__get__name() + '"!');
}
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.MEDAL_UNLOCK_CONFIRMED, this, event.__get__error()));
};
v1.ICON_WIDTH = 50;
v1.ICON_HEIGHT = 50;
v1.DEFAULT_ICON = flash.display.BitmapData.loadBitmap('DefaultMedalIcon');
v1.DIFFICULTY_EASY = 'Easy';
v1.DIFFICULTY_MODERATE = 'Moderate';
v1.DIFFICULTY_CHALLENGING = 'Challenging';
v1.DIFFICULTY_DIFFICULT = 'Difficult';
v1.DIFFICULTY_BRUTAL = 'Brutal';
v1.DIFFICULTIES = ['Unknown', com.newgrounds.Medal.DIFFICULTY_EASY, com.newgrounds.Medal.DIFFICULTY_MODERATE, com.newgrounds.Medal.DIFFICULTY_CHALLENGING, com.newgrounds.Medal.DIFFICULTY_DIFFICULT, com.newgrounds.Medal.DIFFICULTY_BRUTAL];
v2.addProperty('description', v2.__get__description, function () {});
v2.addProperty('difficulty', v2.__get__difficulty, function () {});
v2.addProperty('icon', v2.__get__icon, function () {});
v2.addProperty('id', v2.__get__id, function () {});
v2.addProperty('name', v2.__get__name, function () {});
v2.addProperty('secret', v2.__get__secret, function () {});
v2.addProperty('unlocked', v2.__get__unlocked, function () {});
v2.addProperty('value', v2.__get__value, function () {});
ASSetPropFlags(com.newgrounds.Medal.prototype, null, 1);
}
#endinitclip
}
movieClip 526 __Packages.com.newgrounds.ScoreBoard {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.ScoreBoard) {
var v1 = function (connection, name, id) {
super();
this._connection = connection;
this._name = name;
this._id = id;
};
com.newgrounds.ScoreBoard = v1;
com.newgrounds.ScoreBoard extends com.newgrounds.APIEventDispatcher;
var v2 = v1.prototype;
v2.__get__name = function () {
return this._name;
};
v2.__get__scores = function () {
return this._scores;
};
v2.__get__period = function () {
return this._period;
};
v2.__set__period = function (val) {
this._period = val;
return this.__get__period();
};
v2.__get__firstResult = function () {
return this._firstResult;
};
v2.__set__firstResult = function (val) {
this._firstResult = Math.max(1, val);
return this.__get__firstResult();
};
v2.__get__numResults = function () {
return this._numResults;
};
v2.__set__numResults = function (val) {
this._numResults = val;
return this.__get__numResults();
};
v2.__get__tag = function () {
return this._tag;
};
v2.__set__tag = function (val) {
this._tag = val;
return this.__get__tag();
};
v2.__get__page = function () {
return Math.ceil((this._firstResult - 1) / this._numResults) + 1;
};
v2.prevPage = function () {
if (this.__get__firstResult() > this._numResults) {
this.firstResult -= this._numResults;
}
};
v2.nextPage = function () {
this.firstResult += this._numResults;
};
v2.loadScores = function () {
this._connection.sendSimpleCommand('loadScores', {'target': this, 'func': this.onScoresLoaded}, {'publisher_id': this._connection.publisherId, 'board': this._id, 'page': (this._firstResult - 1) / this._numResults + 1, 'num_results': this._numResults, 'period': this._period, 'tag': this._tag});
};
v2.postScore = function (numericScore, tag) {
if (tag == undefined) {
tag = null;
}
if (isNaN(numericScore)) {
com.newgrounds.Logger.logError('Cannot post invalid score: ' + numericScore);
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.SCORE_POSTED, null, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT));
return undefined;
}
com.newgrounds.Logger.logMessage('Posting a score of ' + numericScore + ' by ' + this._connection.username + ' to scoreboard "' + this._name + '"...');
this._connection.sendSimpleCommand('postScore', {'target': this, 'func': this.onScorePosted}, null, {'user_name': this._connection.username, 'board': this._id, 'value': numericScore, 'tag': tag});
};
v2.onScoresLoaded = function (event) {
var v4 = event.__get__data();
this._scores = [];
var v5;
if (v4.first_result) {
v5 = v4.first_result;
} else {
v5 = this._firstResult;
}
if (v4.scores) {
var v3 = 0;
while (v3 < v4.scores.length) {
var v2 = v4.scores[v3];
if (v2) {
this._scores[v3] = new com.newgrounds.Score(v5, v2.username, v2.value, v2.numeric_value, v2.tag);
}
v3++;
v5++;
}
}
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.SCORES_LOADED, this));
};
v2.onScorePosted = function (event) {
if (event.__get__success()) {
com.newgrounds.Logger.logMessage('Score posted!');
var v4 = event.__get__data();
var v2 = {};
v2.score = v4.value;
v2.scoreBoard = this;
} else {
com.newgrounds.Logger.logError('Error posting score: ' + event.__get__error());
}
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.SCORE_POSTED, storedv2, event.__get__error()));
};
v2.toString = function () {
return 'Scoreboard: ' + this._name;
};
v1.TODAY = 'Today';
v1.THIS_WEEK = 'This Week';
v1.THIS_MONTH = 'This Month';
v1.THIS_YEAR = 'This Year';
v1.ALL_TIME = 'All-Time';
v2._period = com.newgrounds.ScoreBoard.ALL_TIME;
v2._firstResult = 1;
v2._numResults = 10;
v2.addProperty('firstResult', v2.__get__firstResult, v2.__set__firstResult);
v2.addProperty('name', v2.__get__name, function () {});
v2.addProperty('numResults', v2.__get__numResults, v2.__set__numResults);
v2.addProperty('page', v2.__get__page, function () {});
v2.addProperty('period', v2.__get__period, v2.__set__period);
v2.addProperty('scores', v2.__get__scores, function () {});
v2.addProperty('tag', v2.__get__tag, v2.__set__tag);
ASSetPropFlags(com.newgrounds.ScoreBoard.prototype, null, 1);
}
#endinitclip
}
movieClip 515 __Packages.com.newgrounds.Logger {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.Logger) {
var v1 = function () {};
com.newgrounds.Logger = v1;
var v2 = v1.prototype;
v1.logInternal = function () {
var v2 = arguments;
com.newgrounds.Logger.log(com.newgrounds.Logger.PRIORITY_INTERNAL, v2);
};
v1.logMessage = function () {
var v2 = arguments;
com.newgrounds.Logger.log(com.newgrounds.Logger.PRIORITY_MESSAGE, v2);
};
v1.logWarning = function () {
var v2 = arguments;
com.newgrounds.Logger.log(com.newgrounds.Logger.PRIORITY_WARNING, v2);
};
v1.logError = function () {
var v2 = arguments;
com.newgrounds.Logger.log(com.newgrounds.Logger.PRIORITY_ERROR, v2);
};
v1.log = function (priority, messages) {
if (priority == undefined) {
priority = com.newgrounds.Logger.PRIORITY_MESSAGE;
}
if (messages == undefined) {
messages = null;
}
if (priority >= com.newgrounds.Logger._messageLevel) {
var v1 = 0;
while (v1 < messages.length) {
trace(com.newgrounds.Logger.HEADER + messages[v1]);
com.newgrounds.Logger._eventDispatcher.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.LOG, messages[v1]));
++v1;
}
}
if (priority >= com.newgrounds.Logger._throwLevel) {
throw new Error(messages.join('\n'));
}
};
v1.addEventListener = function (event, listener) {
com.newgrounds.Logger._eventDispatcher.addEventListener(event, listener, false, 0, false);
};
v1.PRIORITY_INTERNAL = 0;
v1.PRIORITY_MESSAGE = 1;
v1.PRIORITY_WARNING = 2;
v1.PRIORITY_ERROR = 3;
v1.PRIORITY_MAX = 4;
v1.HEADER = '[Newgrounds API] :: ';
v1._eventDispatcher = new com.newgrounds.EventDispatcher();
v1._messageLevel = com.newgrounds.Logger.PRIORITY_MESSAGE;
v1._throwLevel = com.newgrounds.Logger.PRIORITY_MAX;
ASSetPropFlags(com.newgrounds.Logger.prototype, null, 1);
}
#endinitclip
}
movieClip 534 __Packages.com.newgrounds.components.FlashAdBase {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.components) {
_global.com.newgrounds.components = new Object();
}
if (!_global.com.newgrounds.components.FlashAdBase) {
var v1 = function () {
super();
try {
System.security.allowDomain('server.cpmstar.com');
System.security.allowInsecureDomain('server.cpmstar.com');
}
this.gotoAndStop('idle');
this._x = int(this._x);
this._y = int(this._y);
this.stop();
if (this.__get___newgroundsButton()) {
(this.__get___newgroundsButton()).onRelease = this.onNGClick;
}
this.onUnload = this.removeAd;
var v4 = this;
this._adListener = {'onLoadError': function (target, error, httpStatus) {
target._parent.onAdError(target, error, httpStatus);
}};
if (this.__get__fullScreen()) {
this.drawFullScreenRect();
}
if (com.newgrounds.API.__get__adFeedURL()) {
this.loadAdFeed();
} else {
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.API_CONNECTED, {'target': this, 'func': this.loadAdFeed});
}
};
com.newgrounds.components.FlashAdBase = v1;
com.newgrounds.components.FlashAdBase extends MovieClip;
var v2 = v1.prototype;
v2.__get___adContainer = function () {
return this.adContainer;
};
v2.__get___newgroundsButton = function () {
return this.newgroundsButton;
};
v2.__get__fullScreen = function () {
return this._fullScreen;
};
v2.__set__fullScreen = function (v) {
this._fullScreen = v;
if (v) {
this.drawFullScreenRect();
} else {
this.clear();
}
return this.__get__fullScreen();
};
v2.__get__showBorder = function () {
return this._showBorder;
};
v2.__set__showBorder = function (value) {
this._showBorder = value;
if (this._showBorder) {
if (this._ad) {
var v2 = this._ad.getProgress(this.__get___adContainer());
if (v2.bytesLoaded >= v2.bytesTotal) {
this.gotoAndStop('loaded');
} else {
this.gotoAndStop('loading');
}
} else {
this.gotoAndStop('idle');
}
} else {
this.gotoAndStop('noBorder');
}
return this.__get__showBorder();
};
v2.loadAdFeed = function (event) {
if (event == undefined) {
event = null;
}
this._adFeedLoader = new LoadVars();
var target = this;
this._adFeedLoader.onData = function (data) {
target.onAdFeedLoaded(data);
};
this._adFeedLoader.load(com.newgrounds.API.__get__adFeedURL(), this._adFeedLoader);
};
v2.onAdFeedLoaded = function (data) {
if (data && data != '') {
this.loadAd(data);
} else {
this.onAdError();
}
};
v2.loadAd = function (adURL) {
if (this.adType != this.VIDEO_ADS) {
if (adURL.indexOf('?') >= 0) {
adURL += '&';
} else {
adURL += '?';
}
adURL += 'blockoverlays=1';
}
this._ad = new MovieClipLoader();
this._ad.addListener(this._adListener);
(this.__get___adContainer())._lockroot = true;
this._ad.loadClip(adURL, this.__get___adContainer());
};
v2.removeAd = function () {
this._adFeedLoader.onData = null;
this._adFeedLoader = null;
this._ad.removeListener(this._adListener);
if (this.__get___adContainer()) {
this._ad.unloadClip(this.__get___adContainer());
}
this._ad = null;
};
v2.onAdError = function (target, error, httpStatus) {
com.newgrounds.Logger.logError('Unable to load ad.');
this.removeAd();
};
v2.onNGClick = function () {
com.newgrounds.API.loadNewgrounds();
};
v2.drawFullScreenRect = function () {
this._x = (Stage.width - this._width) / 2;
this._y = (Stage.height - this._height) / 2;
this.beginFill(0);
this.moveTo(-Stage.width, -Stage.height);
this.lineTo(Stage.width, -Stage.height);
this.lineTo(Stage.width, Stage.height);
this.lineTo(-Stage.width, Stage.height);
this.lineTo(-Stage.width, -Stage.height);
this.endFill();
};
v2._showBorder = true;
v2.adType = com.newgrounds.components.FlashAdBase.prototype.VIDEO_ADS;
v2.VIDEO_ADS = 'Video';
v2.SIMPLE_ADS = 'Simple';
v2.addProperty('_adContainer', v2.__get___adContainer, function () {});
v2.addProperty('_newgroundsButton', v2.__get___newgroundsButton, function () {});
v2.addProperty('fullScreen', v2.__get__fullScreen, v2.__set__fullScreen);
v2.addProperty('showBorder', v2.__get__showBorder, v2.__set__showBorder);
ASSetPropFlags(com.newgrounds.components.FlashAdBase.prototype, null, 1);
}
#endinitclip
}
movieClip 509 __Packages.com.newgrounds.shims.APIShim {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.shims) {
_global.com.newgrounds.shims = new Object();
}
if (!_global.com.newgrounds.shims.APIShim) {
var v1 = function () {
super();
};
com.newgrounds.shims.APIShim = v1;
com.newgrounds.shims.APIShim extends MovieClip;
var v2 = v1.prototype;
ASSetPropFlags(com.newgrounds.shims.APIShim.prototype, null, 1);
}
#endinitclip
}
movieClip 519 __Packages.com.newgrounds.crypto.MD5 {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.crypto) {
_global.com.newgrounds.crypto = new Object();
}
if (!_global.com.newgrounds.crypto.MD5) {
var v1 = function () {};
com.newgrounds.crypto.MD5 = v1;
var v2 = v1.prototype;
v1.hash = function (src) {
return com.newgrounds.crypto.MD5.hex_md5(src);
};
v1.hex_md5 = function (src) {
return com.newgrounds.crypto.MD5.binl2hex(com.newgrounds.crypto.MD5.core_md5(com.newgrounds.crypto.MD5.str2binl(src), src.length * 8));
};
v1.core_md5 = function (x, len) {
x[len >> 5] |= 128 << len % 32;
x[(len + 64 >>> 9 << 4) + 14] = len;
var v4 = 1732584193;
var v3 = -271733879;
var v2 = -1732584194;
var v1 = 271733878;
var v5 = 0;
while (v5 < x.length) {
var v10 = v4;
var v9 = v3;
var v8 = v2;
var v7 = v1;
v4 = com.newgrounds.crypto.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 0], 7, -680876936);
v1 = com.newgrounds.crypto.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 1], 12, -389564586);
v2 = com.newgrounds.crypto.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 2], 17, 606105819);
v3 = com.newgrounds.crypto.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 3], 22, -1044525330);
v4 = com.newgrounds.crypto.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 4], 7, -176418897);
v1 = com.newgrounds.crypto.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 5], 12, 1200080426);
v2 = com.newgrounds.crypto.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 6], 17, -1473231341);
v3 = com.newgrounds.crypto.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 7], 22, -45705983);
v4 = com.newgrounds.crypto.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 8], 7, 1770035416);
v1 = com.newgrounds.crypto.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 9], 12, -1958414417);
v2 = com.newgrounds.crypto.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 10], 17, -42063);
v3 = com.newgrounds.crypto.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 11], 22, -1990404162);
v4 = com.newgrounds.crypto.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 12], 7, 1804603682);
v1 = com.newgrounds.crypto.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 13], 12, -40341101);
v2 = com.newgrounds.crypto.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 14], 17, -1502002290);
v3 = com.newgrounds.crypto.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 15], 22, 1236535329);
v4 = com.newgrounds.crypto.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 1], 5, -165796510);
v1 = com.newgrounds.crypto.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 6], 9, -1069501632);
v2 = com.newgrounds.crypto.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 11], 14, 643717713);
v3 = com.newgrounds.crypto.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 0], 20, -373897302);
v4 = com.newgrounds.crypto.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 5], 5, -701558691);
v1 = com.newgrounds.crypto.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 10], 9, 38016083);
v2 = com.newgrounds.crypto.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 15], 14, -660478335);
v3 = com.newgrounds.crypto.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 4], 20, -405537848);
v4 = com.newgrounds.crypto.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 9], 5, 568446438);
v1 = com.newgrounds.crypto.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 14], 9, -1019803690);
v2 = com.newgrounds.crypto.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 3], 14, -187363961);
v3 = com.newgrounds.crypto.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 8], 20, 1163531501);
v4 = com.newgrounds.crypto.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 13], 5, -1444681467);
v1 = com.newgrounds.crypto.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 2], 9, -51403784);
v2 = com.newgrounds.crypto.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 7], 14, 1735328473);
v3 = com.newgrounds.crypto.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 12], 20, -1926607734);
v4 = com.newgrounds.crypto.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 5], 4, -378558);
v1 = com.newgrounds.crypto.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 8], 11, -2022574463);
v2 = com.newgrounds.crypto.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 11], 16, 1839030562);
v3 = com.newgrounds.crypto.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 14], 23, -35309556);
v4 = com.newgrounds.crypto.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 1], 4, -1530992060);
v1 = com.newgrounds.crypto.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 4], 11, 1272893353);
v2 = com.newgrounds.crypto.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 7], 16, -155497632);
v3 = com.newgrounds.crypto.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 10], 23, -1094730640);
v4 = com.newgrounds.crypto.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 13], 4, 681279174);
v1 = com.newgrounds.crypto.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 0], 11, -358537222);
v2 = com.newgrounds.crypto.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 3], 16, -722521979);
v3 = com.newgrounds.crypto.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 6], 23, 76029189);
v4 = com.newgrounds.crypto.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 9], 4, -640364487);
v1 = com.newgrounds.crypto.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 12], 11, -421815835);
v2 = com.newgrounds.crypto.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 15], 16, 530742520);
v3 = com.newgrounds.crypto.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 2], 23, -995338651);
v4 = com.newgrounds.crypto.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 0], 6, -198630844);
v1 = com.newgrounds.crypto.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 7], 10, 1126891415);
v2 = com.newgrounds.crypto.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 14], 15, -1416354905);
v3 = com.newgrounds.crypto.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 5], 21, -57434055);
v4 = com.newgrounds.crypto.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 12], 6, 1700485571);
v1 = com.newgrounds.crypto.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 3], 10, -1894986606);
v2 = com.newgrounds.crypto.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 10], 15, -1051523);
v3 = com.newgrounds.crypto.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 1], 21, -2054922799);
v4 = com.newgrounds.crypto.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 8], 6, 1873313359);
v1 = com.newgrounds.crypto.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 15], 10, -30611744);
v2 = com.newgrounds.crypto.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 6], 15, -1560198380);
v3 = com.newgrounds.crypto.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 13], 21, 1309151649);
v4 = com.newgrounds.crypto.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 4], 6, -145523070);
v1 = com.newgrounds.crypto.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 11], 10, -1120210379);
v2 = com.newgrounds.crypto.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 2], 15, 718787259);
v3 = com.newgrounds.crypto.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 9], 21, -343485551);
v4 = com.newgrounds.crypto.MD5.safe_add(v4, v10);
v3 = com.newgrounds.crypto.MD5.safe_add(v3, v9);
v2 = com.newgrounds.crypto.MD5.safe_add(v2, v8);
v1 = com.newgrounds.crypto.MD5.safe_add(v1, v7);
v5 += 16;
}
return new Array(v4, v3, v2, v1);
};
v1.md5_cmn = function (q, a, b, x, s, t) {
return com.newgrounds.crypto.MD5.safe_add(com.newgrounds.crypto.MD5.bit_rol(com.newgrounds.crypto.MD5.safe_add(com.newgrounds.crypto.MD5.safe_add(a, q), com.newgrounds.crypto.MD5.safe_add(x, t)), s), b);
};
v1.md5_ff = function (a, b, c, d, x, s, t) {
return com.newgrounds.crypto.MD5.md5_cmn(b & c | ~b & d, a, b, x, s, t);
};
v1.md5_gg = function (a, b, c, d, x, s, t) {
return com.newgrounds.crypto.MD5.md5_cmn(b & d | c & ~d, a, b, x, s, t);
};
v1.md5_hh = function (a, b, c, d, x, s, t) {
return com.newgrounds.crypto.MD5.md5_cmn(b ^ c ^ d, a, b, x, s, t);
};
v1.md5_ii = function (a, b, c, d, x, s, t) {
return com.newgrounds.crypto.MD5.md5_cmn(c ^ (b | ~d), a, b, x, s, t);
};
v1.bit_rol = function (num, cnt) {
return num << cnt | num >>> 32 - cnt;
};
v1.safe_add = function (x, y) {
var v1 = (x & 65535) + (y & 65535);
var v2 = (x >> 16) + (y >> 16) + (v1 >> 16);
return v2 << 16 | v1 & 65535;
};
v1.str2binl = function (str) {
var v3 = new Array();
var v4 = 255;
var v1 = 0;
while (v1 < str.length * 8) {
v3[v1 >> 5] |= (str.charCodeAt(v1 / 8) & v4) << v1 % 32;
v1 += 8;
}
return v3;
};
v1.binl2hex = function (binarray) {
var v4 = new String('');
var v3 = new String('0123456789abcdef');
var v1 = 0;
while (v1 < binarray.length * 4) {
v4 += v3.charAt(binarray[v1 >> 2] >> (v1 % 4) * 8 + 4 & 15) + v3.charAt(binarray[v1 >> 2] >> (v1 % 4) * 8 & 15);
++v1;
}
return v4;
};
ASSetPropFlags(com.newgrounds.crypto.MD5.prototype, null, 1);
}
#endinitclip
}
movieClip 520 __Packages.com.newgrounds.crypto.RC4 {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.crypto) {
_global.com.newgrounds.crypto = new Object();
}
if (!_global.com.newgrounds.crypto.RC4) {
var v1 = function () {};
com.newgrounds.crypto.RC4 = v1;
var v2 = v1.prototype;
v1.encrypt = function (src, key) {
var v3 = com.newgrounds.crypto.RC4.strToChars(src);
var v1 = com.newgrounds.crypto.RC4.strToChars(key);
var v2 = com.newgrounds.crypto.RC4.calculate(v3, v1);
return com.newgrounds.crypto.RC4.charsToHex(v2);
};
v1.encryptbin = function (src, key) {
var v3 = com.newgrounds.crypto.RC4.strToChars(src);
var v1 = com.newgrounds.crypto.RC4.strToChars(key);
var v2 = com.newgrounds.crypto.RC4.calculate(v3, v1);
return v2;
};
v1.decrypt = function (src, key) {
var v3 = com.newgrounds.crypto.RC4.hexToChars(src);
var v1 = com.newgrounds.crypto.RC4.strToChars(key);
var v2 = com.newgrounds.crypto.RC4.calculate(v3, v1);
return com.newgrounds.crypto.RC4.charsToStr(v2);
};
v1.initialize = function (pwd) {
var v2 = 0;
var v3;
var v4 = pwd.length;
var v1 = 0;
while (v1 <= 255) {
com.newgrounds.crypto.RC4.mykey[v1] = pwd[v1 % v4];
com.newgrounds.crypto.RC4.sbox[v1] = v1;
++v1;
}
v1 = 0;
while (v1 <= 255) {
v2 = (v2 + com.newgrounds.crypto.RC4.sbox[v1] + com.newgrounds.crypto.RC4.mykey[v1]) % 256;
v3 = com.newgrounds.crypto.RC4.sbox[v1];
com.newgrounds.crypto.RC4.sbox[v1] = com.newgrounds.crypto.RC4.sbox[v2];
com.newgrounds.crypto.RC4.sbox[v2] = v3;
++v1;
}
};
v1.calculate = function (plaintxt, psw) {
com.newgrounds.crypto.RC4.initialize(psw);
var v1 = 0;
var v2 = 0;
var v9 = new Array();
var v7;
var v5;
var v6;
var v3 = 0;
while (v3 < plaintxt.length) {
v1 = (v1 + 1) % 256;
v2 = (v2 + com.newgrounds.crypto.RC4.sbox[v1]) % 256;
v5 = com.newgrounds.crypto.RC4.sbox[v1];
com.newgrounds.crypto.RC4.sbox[v1] = com.newgrounds.crypto.RC4.sbox[v2];
com.newgrounds.crypto.RC4.sbox[v2] = v5;
var v4 = (com.newgrounds.crypto.RC4.sbox[v1] + com.newgrounds.crypto.RC4.sbox[v2]) % 256;
v7 = com.newgrounds.crypto.RC4.sbox[v4];
v6 = plaintxt[v3] ^ v7;
v9.push(v6);
++v3;
}
return v9;
};
v1.charsToHex = function (chars) {
var v4 = new String('');
var v3 = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f');
var v1 = 0;
while (v1 < chars.length) {
v4 += v3[chars[v1] >> 4] + v3[chars[v1] & 15];
++v1;
}
return v4;
};
v1.hexToChars = function (hex) {
var v3 = new Array();
var v1 = (hex.substr(0, 2) == '0x') ? 2 : 0;
while (v1 < hex.length) {
v3.push(parseInt(hex.substr(v1, 2), 16));
v1 += 2;
}
return v3;
};
v1.charsToStr = function (chars) {
var v3 = new String('');
var v1 = 0;
while (v1 < chars.length) {
v3 += String.fromCharCode(chars[v1]);
++v1;
}
return v3;
};
v1.strToChars = function (str) {
var v3 = new Array();
var v1 = 0;
while (v1 < str.length) {
v3.push(str.charCodeAt(v1));
++v1;
}
return v3;
};
v1.sbox = new Array(255);
v1.mykey = new Array(255);
ASSetPropFlags(com.newgrounds.crypto.RC4.prototype, null, 1);
}
#endinitclip
}
movieClip 521 __Packages.com.newgrounds.encoders.json.JSON {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.encoders) {
_global.com.newgrounds.encoders = new Object();
}
if (!_global.com.newgrounds.encoders.json) {
_global.com.newgrounds.encoders.json = new Object();
}
if (!_global.com.newgrounds.encoders.json.JSON) {
var v1 = function () {};
com.newgrounds.encoders.json.JSON = v1;
var v2 = v1.prototype;
v1.encode = function (arg, noquotes) {
var v3;
var v2;
var v6;
var v1 = '';
var v4;
if (arg.isSServerVar()) {
var v8 = 'sservervariable';
} else {
var v8 = typeof arg;
}
switch (v8) {
return 'null';
case 'sservervariable':
return '?' + arg.getEncodedValue();
break;
case 'object':
if (arg) {
if (arg instanceof Array) {
v2 = 0;
while (v2 < arg.length) {
v4 = com.newgrounds.encoders.json.JSON.encode(arg[v2]);
if (v1) {
v1 += ',';
}
v1 += v4;
++v2;
}
return '[' + v1 + ']';
} else {
if (typeof arg.toString != 'undefined') {
for (v2 in arg) {
v4 = arg[v2];
if (typeof v4 != 'undefined' && typeof v4 != 'function') {
v4 = com.newgrounds.encoders.json.JSON.encode(v4);
if (v1) {
v1 += ',';
}
v1 += com.newgrounds.encoders.json.JSON.encode(v2) + ':' + v4;
}
}
return '{' + v1 + '}';
}
}
}
return 'null';
case 'number':
return isFinite(arg) ? String(arg) : 'null';
case 'string':
v6 = arg.length;
if (noquotes) {
var v7 = '';
} else {
var v7 = '"';
}
v1 = v7;
v2 = 0;
while (v2 < v6) {
v3 = arg.charAt(v2);
if (v3 >= ' ') {
if (v3 == '\\' || v3 == '"') {
v1 += '\\';
}
v1 += v3;
} else {
switch (v3) {
case '\b':
v1 += '\\b';
break;
case '\f':
v1 += '\\f';
break;
case '\n':
v1 += '\\n';
break;
case '\r':
v1 += '\\r';
break;
case '\t':
v1 += '\\t';
break;
default:
v3 = v3.charCodeAt();
v1 += '\\u00' + (Math.floor(v3 / 16)).toString(16) + (v3 % 16).toString(16);
}
}
v2 += 1;
}
return v1 + v7;
case 'boolean':
return String(arg);
default:
return 'null';
}
};
v1.background_encode = function (arg, callback) {
if (com.newgrounds.encoders.json.JSON.busy) {
trace('[Newgrounds Encoder] :: Cannot encode a new file until the previous file is completed');
return false;
} else {
if (!callback) {
trace('[Newgrounds Encoder] :: Missing a callback function, skipping encode');
return false;
}
}
com.newgrounds.encoders.json.JSON.busy = true;
var v2 = new Date();
com.newgrounds.encoders.json.JSON.start = v2.getTime();
com.newgrounds.encoders.json.JSON.cache = {'busy': false, 'complete': false, 'arg': arg, 'target': arg, 'parents': [], 'encoded': '', 'callback': callback, 'encode_chunk': function () {
com.newgrounds.encoders.json.JSON.encode_chunk();
}};
if (com.newgrounds.encoders.json.JSON.getType(arg) == 'object') {
com.newgrounds.encoders.json.JSON.cache.encoded = '{';
com.newgrounds.encoders.json.JSON.interval = setInterval(com.newgrounds.encoders.json.JSON.cache, 'encode_chunk', 25);
return true;
}
if (com.newgrounds.encoders.json.JSON.getType(arg) == 'array') {
com.newgrounds.encoders.json.JSON.cache.encoded = '[';
}
com.newgrounds.encoders.json.JSON.interval = setInterval(com.newgrounds.encoders.json.JSON.cache, 'encode_chunk', 25);
return true;
};
v1.background_decode = function (arg, callback) {
if (com.newgrounds.encoders.json.JSON.busy) {
trace('[Newgrounds Encoder] :: Cannot decode a new file until the previous file is completed');
return false;
} else {
if (!callback) {
trace('[Newgrounds Encoder] :: Missing a callback function, skipping decode');
return false;
}
}
com.newgrounds.encoders.json.JSON.busy = true;
var v1 = new Date();
com.newgrounds.encoders.json.JSON.start = v1.getTime();
com.newgrounds.encoders.json.JSON.cache = {'busy': false, 'callback': callback, 'complete': false, 'arg': arg, 'pos': 0, 'parents': ['root'], 'target': null, 'scratch': '', 'decode_chunk': function () {
com.newgrounds.encoders.json.JSON.decode_chunk();
}};
com.newgrounds.encoders.json.JSON.interval = setInterval(com.newgrounds.encoders.json.JSON.cache, 'decode_chunk', 25);
return true;
};
v1.decode = function (text) {
var at = 0;
var ch = ' ';
var _value;
var _error = function (m) {
throw {'name': 'JSONError', 'message': m, 'at': at - 1, 'text': text};
};
var _next = function () {
ch = text.charAt(at);
at += 1;
return ch;
};
var _white = function () {
while (ch) {
if (ch <= ' ') {
_next();
} else {
if (ch == '/') {
switch (_next()) {
case '/':
for (;;) {
if (!(_next() && ch != '\n' && ch != '\r')) break;
}
break;
case '*':
_next();
for (;;) {
if (ch) {
if (ch == '*') {
if (_next() == '/') {
_next();
break;
}
} else {
_next();
}
continue;
}
_error('Unterminated comment');
}
break;
default:
_error('Syntax error');
}
} else {
break;
}
}
}
};
var _string = function () {
var v4;
var v1 = '';
var v3;
var v2;
var v5 = false;
if (ch == '"') {
while (_next()) {
if (ch == '"') {
_next();
return v1;
} else {
if (ch == '\\') {
switch (_next()) {
case 'b':
v1 += '\b';
break;
case 'f':
v1 += '\f';
break;
case 'n':
v1 += '\n';
break;
case 'r':
v1 += '\r';
break;
case 't':
v1 += '\t';
break;
case 'u':
v2 = 0;
v4 = 0;
while (v4 < 4) {
v3 = parseInt(_next(), 16);
if (!isFinite(v3)) {
v5 = true;
break;
}
v2 = v2 * 16 + v3;
v4 += 1;
}
if (v5) {
v5 = false;
} else {
v1 += String.fromCharCode(v2);
break;
default:
v1 += ch;
}
}
} else {
v1 += ch;
}
}
}
}
_error('Bad string');
};
var _array = function () {
var v1 = [];
if (ch == '[') {
_next();
_white();
if (ch == ']') {
_next();
return v1;
}
while (ch) {
v1.push(_value());
_white();
if (ch == ']') {
_next();
return v1;
} else {
if (ch != ',') {
break;
}
}
_next();
_white();
}
}
_error('Bad array');
};
var _object = function () {
var v2;
var v1 = {};
if (ch == '{') {
_next();
_white();
if (ch == '}') {
_next();
return v1;
}
while (ch) {
v2 = _string();
_white();
if (ch != ':') {
break;
}
_next();
v1[v2] = _value();
_white();
if (ch == '}') {
_next();
return v1;
} else {
if (ch != ',') {
break;
}
}
_next();
_white();
}
}
_error('Bad object');
};
var _number = function () {
var v1 = '';
var v2;
if (ch == '-') {
v1 = '-';
_next();
}
for (;;) {
if (!(ch >= '0' && ch <= '9')) break;
v1 += ch;
_next();
}
if (ch == '.') {
v1 += '.';
for (;;) {
if (!(_next() && ch >= '0' && ch <= '9')) break;
v1 += ch;
}
}
v2 = 1 * v1;
if (!isFinite(v2)) {
_error('Bad number');
} else {
return v2;
}
};
var _word = function () {
switch (ch) {
case 't':
if (_next() == 'r' && _next() == 'u' && _next() == 'e') {
_next();
return true;
}
break;
case 'f':
if (_next() == 'a' && _next() == 'l' && _next() == 's' && _next() == 'e') {
_next();
return false;
}
break;
case 'n':
if (_next() == 'u' && _next() == 'l' && _next() == 'l') {
_next();
return null;
}
}
_error('Syntax error');
};
_value = function () {
_white();
switch (ch) {
case '{':
return _object();
case '[':
return _array();
case '"':
return _string();
case '-':
return _number();
}
return (ch >= '0' && ch <= '9') ? _number() : _word();
};
return _value();
};
v1.getType = function (v) {
if (v instanceof Array) {
return 'array';
} else {
return typeof v;
}
};
v1.decode_chunk = function () {
if (!com.newgrounds.encoders.json.JSON.cache.busy && !com.newgrounds.encoders.json.JSON.cache.complete) {
com.newgrounds.encoders.json.JSON.cache.busy = true;
var v1 = 0;
while (v1 < com.newgrounds.encoders.json.JSON.decode_chunks) {
com.newgrounds.encoders.json.JSON.chunk_decoder();
if (com.newgrounds.encoders.json.JSON.cache.complete) {
break;
}
++v1;
}
trace(Math.round((com.newgrounds.encoders.json.JSON.cache.pos / com.newgrounds.encoders.json.JSON.cache.arg.length) * 100) + '% decoded');
com.newgrounds.encoders.json.JSON.cache.busy = false;
}
if (com.newgrounds.encoders.json.JSON.cache.complete) {
var v2 = new Date();
com.newgrounds.encoders.json.JSON.busy = false;
clearInterval(com.newgrounds.encoders.json.JSON.interval);
com.newgrounds.encoders.json.JSON.cache.callback(com.newgrounds.encoders.json.JSON.cache.root, v2.getTime() - com.newgrounds.encoders.json.JSON.start);
com.newgrounds.encoders.json.JSON.cache.arg = '';
}
};
v1.encode_chunk = function () {
if (!com.newgrounds.encoders.json.JSON.cache.busy && !com.newgrounds.encoders.json.JSON.cache.complete) {
com.newgrounds.encoders.json.JSON.cache.busy = true;
var v1 = 0;
while (v1 < com.newgrounds.encoders.json.JSON.encode_chunks) {
com.newgrounds.encoders.json.JSON.chunk_encoder();
if (com.newgrounds.encoders.json.JSON.cache.complete) {
break;
}
++v1;
}
com.newgrounds.encoders.json.JSON.cache.busy = false;
}
if (com.newgrounds.encoders.json.JSON.cache.complete) {
var v3 = new Date();
var v2 = v3.getTime();
com.newgrounds.encoders.json.JSON.busy = false;
clearInterval(com.newgrounds.encoders.json.JSON.interval);
com.newgrounds.encoders.json.JSON.cache.callback(com.newgrounds.encoders.json.JSON.cache.encoded, v2 - com.newgrounds.encoders.json.JSON.start);
com.newgrounds.encoders.json.JSON.cache.encoded = '';
}
};
v1.chunk_decoder = function () {
function _object() {
var v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (!com.newgrounds.encoders.json.JSON.cache.mode) {
com.newgrounds.encoders.json.JSON.cache.mode = 'object';
++com.newgrounds.encoders.json.JSON.cache.pos;
v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (v1 != '"') {
throw 'Malformed object key in encoded string. Keys must be wrapped in quotes ("")';
}
com.newgrounds.encoders.json.JSON.cache.scratch = '';
_setTargetValue({});
} else {
if (v1 == ',') {
++com.newgrounds.encoders.json.JSON.cache.pos;
v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (v1 != '"') {
throw 'Malformed object key in encoded string. Keys must be wrapped in quotes ("")';
}
com.newgrounds.encoders.json.JSON.cache.scratch = '';
} else {
if (v1 == '}') {
_useParent();
} else {
if (v1 == '"') {
++com.newgrounds.encoders.json.JSON.cache.pos;
v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (v1 != ':') {
throw 'Malformed object notation. Object keys and values must be separated by colons(:)';
}
_addParent(com.newgrounds.encoders.json.JSON.cache.scratch);
com.newgrounds.encoders.json.JSON.cache.mode = null;
} else {
if (v1 == '\\') {
++com.newgrounds.encoders.json.JSON.cache.pos;
v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
}
com.newgrounds.encoders.json.JSON.cache.scratch += v1;
}
}
}
}
++com.newgrounds.encoders.json.JSON.cache.pos;
}
function _array() {
var v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (!com.newgrounds.encoders.json.JSON.cache.mode) {
com.newgrounds.encoders.json.JSON.cache.mode = 'array';
++com.newgrounds.encoders.json.JSON.cache.pos;
v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
_setTargetValue([]);
if (v1 != ']') {
_addArrayKey();
} else {
_useParent();
}
return undefined;
} else {
if (v1 == ',') {
_addArrayKey();
} else {
if (v1 == ']') {
_useParent();
}
}
}
++com.newgrounds.encoders.json.JSON.cache.pos;
}
function _boolean() {
var v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (v1 == 't') {
_setTargetValue(true);
com.newgrounds.encoders.json.JSON.cache.pos += 3;
} else {
if (v1 == 'f') {
_setTargetValue(false);
com.newgrounds.encoders.json.JSON.cache.pos += 4;
} else {
throw 'Bool values must be true or false';
}
}
_useParent();
}
function _null() {
var v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (v1 == 'n') {
_setTargetValue(null);
com.newgrounds.encoders.json.JSON.cache.pos += 2;
} else {
throw 'Null values must be null';
}
_useParent();
}
function _string() {
var v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (!com.newgrounds.encoders.json.JSON.cache.mode) {
if (v1 != '"') {
throw 'Strings must be wrapped in quotes ("")';
}
com.newgrounds.encoders.json.JSON.cache.scratch = '';
com.newgrounds.encoders.json.JSON.cache.mode = 'string';
} else {
if (v1 == '"') {
_setTargetValue(com.newgrounds.encoders.json.JSON.cache.scratch);
_useParent();
} else {
if (v1 == '\\') {
++com.newgrounds.encoders.json.JSON.cache.pos;
v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
switch (v1) {
case 'n':
v1 = '\n';
break;
case 'r':
v1 = '\n';
break;
case 't':
v1 = '\t';
break;
case 'u':
v1 = '\\' + v1;
}
}
com.newgrounds.encoders.json.JSON.cache.scratch += v1;
}
}
++com.newgrounds.encoders.json.JSON.cache.pos;
}
function _number() {
var v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
var v2 = '01234567890.-';
if (!com.newgrounds.encoders.json.JSON.cache.mode) {
com.newgrounds.encoders.json.JSON.cache.mode = 'number';
com.newgrounds.encoders.json.JSON.cache.scratch = '';
}
if (v2.indexOf(v1) < 0) {
_setTargetValue(Number(com.newgrounds.encoders.json.JSON.cache.scratch));
_useParent();
} else {
com.newgrounds.encoders.json.JSON.cache.scratch += v1;
++com.newgrounds.encoders.json.JSON.cache.pos;
}
}
function _setTargetValue(newval) {
var v2 = (_getParent()).obj;
var v1 = com.newgrounds.encoders.json.JSON.cache.parents[com.newgrounds.encoders.json.JSON.cache.parents.length - 1];
v2[v1] = newval;
}
function _useParent() {
com.newgrounds.encoders.json.JSON.cache.mode = com.newgrounds.encoders.json.JSON.getType((_getParent()).obj);
com.newgrounds.encoders.json.JSON.cache.parents.pop();
}
function _getParent() {
var v2 = com.newgrounds.encoders.json.JSON.cache;
var v1 = 0;
while (v1 < com.newgrounds.encoders.json.JSON.cache.parents.length - 1) {
v2 = v2[com.newgrounds.encoders.json.JSON.cache.parents[v1]];
++v1;
}
return {'obj': v2, 'name': com.newgrounds.encoders.json.JSON.cache.parents[v1]};
}
function _getCurrent() {
var v2 = com.newgrounds.encoders.json.JSON.cache;
var v1 = 0;
while (v1 < com.newgrounds.encoders.json.JSON.cache.parents.length) {
v2 = v2[com.newgrounds.encoders.json.JSON.cache.parents[v1]];
++v1;
}
return {'obj': v2, 'name': com.newgrounds.encoders.json.JSON.cache.parents[v1]};
}
function _addParent(child) {
com.newgrounds.encoders.json.JSON.cache.parents.push(child);
}
function _addArrayKey() {
var v1 = (_getCurrent()).obj.length;
com.newgrounds.encoders.json.JSON.cache.parents.push(v1);
com.newgrounds.encoders.json.JSON.cache.mode = null;
}
if (com.newgrounds.encoders.json.JSON.cache.pos >= com.newgrounds.encoders.json.JSON.cache.arg.length) {
com.newgrounds.encoders.json.JSON.cache.complete = true;
return undefined;
} else {
if (com.newgrounds.encoders.json.JSON.cache.mode) {
('_' + com.newgrounds.encoders.json.JSON.cache.mode)();
} else {
var char = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
switch (char) {
case '{':
_object();
break;
case '[':
_array();
break;
case '"':
_string();
break;
case 'n':
_null();
break;
case 't':
_boolean();
break;
case 'f':
_boolean();
break;
default:
_number();
}
}
}
};
v1.chunk_encoder = function () {
if (com.newgrounds.encoders.json.JSON.cache.complete) {
return undefined;
}
var v2 = com.newgrounds.encoders.json.JSON.getType(com.newgrounds.encoders.json.JSON.cache.target);
switch (v2) {
case 'number':
com.newgrounds.encoders.json.JSON.cache.encoded += com.newgrounds.encoders.json.JSON.cache.target;
com.newgrounds.encoders.json.JSON.getParent();
break;
case 'string':
com.newgrounds.encoders.json.JSON.cache.encoded += '"' + (com.newgrounds.encoders.json.JSON.cache.target.split('"')).join('\\"') + '"';
com.newgrounds.encoders.json.JSON.getParent();
break;
case 'boolean':
com.newgrounds.encoders.json.JSON.cache.encoded += (com.newgrounds.encoders.json.JSON.cache.target == true) ? 'true' : 'false';
com.newgrounds.encoders.json.JSON.getParent();
break;
case 'null':
com.newgrounds.encoders.json.JSON.cache.encoded += 'null';
com.newgrounds.encoders.json.JSON.getParent();
break;
case 'array':
if (com.newgrounds.encoders.json.JSON.cache.target.length < 1) {
com.newgrounds.encoders.json.JSON.cache.encoded += ']';
com.newgrounds.encoders.json.JSON.getParent();
} else {
com.newgrounds.encoders.json.JSON.cache.parents.push(com.newgrounds.encoders.json.JSON.cache.target);
com.newgrounds.encoders.json.JSON.cache.target = com.newgrounds.encoders.json.JSON.cache.target[0];
if (com.newgrounds.encoders.json.JSON.getType(com.newgrounds.encoders.json.JSON.cache.target) == 'array') {
com.newgrounds.encoders.json.JSON.cache.encoded += '[';
} else {
if (com.newgrounds.encoders.json.JSON.getType(com.newgrounds.encoders.json.JSON.cache.target) == 'object') {
com.newgrounds.encoders.json.JSON.cache.encoded += '{';
}
}
}
break;
case 'object':
for (var v1 in com.newgrounds.encoders.json.JSON.cache.target) {
break;
}
if (v1 === undefined) {
com.newgrounds.encoders.json.JSON.cache.encoded += '}';
com.newgrounds.encoders.json.JSON.getParent();
} else {
com.newgrounds.encoders.json.JSON.cache.parents.push(com.newgrounds.encoders.json.JSON.cache.target);
com.newgrounds.encoders.json.JSON.cache.target = com.newgrounds.encoders.json.JSON.cache.target[v1];
com.newgrounds.encoders.json.JSON.cache.encoded += '"' + (v1.split('"')).join('\\"') + '":';
if (com.newgrounds.encoders.json.JSON.getType(com.newgrounds.encoders.json.JSON.cache.target) == 'array') {
com.newgrounds.encoders.json.JSON.cache.encoded += '[';
} else {
if (com.newgrounds.encoders.json.JSON.getType(com.newgrounds.encoders.json.JSON.cache.target) == 'object') {
com.newgrounds.encoders.json.JSON.cache.encoded += '{';
}
}
}
break;
default:
com.newgrounds.encoders.json.JSON.cache.encoded += 'null';
com.newgrounds.encoders.json.JSON.getParent();
}
};
v1.getParent = function () {
if (com.newgrounds.encoders.json.JSON.cache.parents.length > 0) {
var v1 = com.newgrounds.encoders.json.JSON.cache.parents.pop();
if (com.newgrounds.encoders.json.JSON.getType(v1) == 'array') {
v1.shift();
} else {
for (var v3 in v1) {
delete v1[v3];
break;
}
}
if (com.newgrounds.encoders.json.JSON.getType(v1) == 'object' or com.newgrounds.encoders.json.JSON.getType(v1) == 'array') {
for (var v2 in v1) {
break;
}
if (v2 !== undefined) {
com.newgrounds.encoders.json.JSON.cache.encoded += ',';
}
}
com.newgrounds.encoders.json.JSON.cache.target = v1;
} else {
com.newgrounds.encoders.json.JSON.cache.complete = true;
}
};
v1.encode_chunks = 20000;
v1.decode_chunks = 20000;
v1.busy = false;
ASSetPropFlags(com.newgrounds.encoders.json.JSON.prototype, null, 1);
}
#endinitclip
}
movieClip 525 __Packages.com.newgrounds.Score {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.Score) {
var v1 = function (rank, username, score, numericValue, tag) {
this._rank = rank;
this._username = username;
this._score = score;
this._numericValue = numericValue;
this._tag = tag;
};
com.newgrounds.Score = v1;
var v2 = v1.prototype;
v2.__get__numericValue = function () {
return this._numericValue;
};
v2.__get__rank = function () {
return this._rank;
};
v2.__get__score = function () {
return this._score;
};
v2.__get__tag = function () {
return this._tag;
};
v2.__get__username = function () {
return this._username;
};
v2.toString = function () {
return this._rank + '.\t' + this._username + '\t' + this._score;
};
v2.addProperty('numericValue', v2.__get__numericValue, function () {});
v2.addProperty('rank', v2.__get__rank, function () {});
v2.addProperty('score', v2.__get__score, function () {});
v2.addProperty('tag', v2.__get__tag, function () {});
v2.addProperty('username', v2.__get__username, function () {});
ASSetPropFlags(com.newgrounds.Score.prototype, null, 1);
}
#endinitclip
}
movieClip 573 {
}
button 575 {
on (release) {
getURL('http://kongregate.com/', '_blank');
}
}
movieClip 578 {
}
movieClip 580 {
}
movieClip 582 {
}
movieClip 584 {
}
movieClip 586 {
}
movieClip 588 {
}
movieClip 589 {
}
movieClip 592 {
}
movieClip 594 {
}
movieClip 595 {
}
movieClip 597 {
}
// unknown tag 88 length 138
movieClip 600 {
}
movieClip 601 {
frame 89 {
this.unloadMovie();
}
}
frame 302 {
stop();
}
frame 302 {
stop();
mobility = true;
airhit = false;
setdistance = 10;
freezetime = 60;
setdamage = 1;
area2 = false;
area3 = false;
attacking = false;
combono = 1;
combostart = false;
combomax = 5;
juice = 100;
maxjuice = 100;
_root.int1 = 0;
flamespeed = 20;
classi = 'fire1';
_root.player.magic.flame1.stop();
tportactive = true;
timtim = 0;
magic = false;
iceclass = 'ice1';
fireclass = 'fire1';
tportclass = 'tport';
lightningclass = 'lightning1';
firetrue = true;
icetrue = true;
lightningtrue = true;
tporttrue = true;
itport = 1;
health = 100;
magicpower = 100;
healthmax = 100;
magicmax = 100;
magiclim = 10;
magici = 0;
otheraction = false;
lostfound = false;
fadefunks = 'whoknows';
crowdgather = false;
setmage = 25;
loaditems = 0;
momentumcheak = false;
momentum = 0;
talkal = false;
talktime = 0;
baddelete = false;
expt = 0;
puzzle3solved = false;
bluedoor = false;
greendoor = false;
reddoor = false;
dragodead = false;
area2boss = false;
comboupgrade = 0;
mpregupgrade = 0;
mpupgrade = 0;
hpupgrade = 0;
story = 1;
sethdirec = 'left';
movie2 = false;
movie3 = false;
movie4 = false;
spoken = false;
spoken2 = false;
movie5 = false;
movie6 = false;
aftermovie7 = false;
howtobe = false;
shouldntbetherebk = false;
movie8 = false;
expplus = function (ex, ey, amounter) {
kerching.start();
_root.expt += amounter;
_root.attachMovie('expgain', 'expgain' + _root.loaditems, _root.nextHighestDepth());
_root['expgain' + _root.loaditems]._x = ex;
_root['expgain' + _root.loaditems]._y = ey - 150;
_root['expgain' + _root.loaditems].amount = amounter;
};
totalitem = 0;
found1 = 'k';
found2 = 'k';
found3 = 'k';
found4 = 'k';
found5 = 'k';
found6 = 'k';
found7 = 'k';
found8 = 'k';
found9 = 'k';
found10 = 'k';
found11 = 'k';
found12 = 'k';
introjam = new Sound(soundie);
introjam.attachSound('introjam');
finalbuild = new Sound(soundie);
finalbuild.attachSound('finalbuild');
finalmain = new Sound(soundie);
finalmain.attachSound('finalmain');
scary = new Sound(soundie);
scary.attachSound('scary');
lvl2music = new Sound(soundie);
lvl2music.attachSound('level2instead');
citymusic = new Sound(soundie);
citymusic.attachSound('citymusic');
lvl1music = new Sound(soundie);
lvl1music.attachSound('lvl1music');
poshmusic = new Sound(soundie);
poshmusic.attachSound('poshmusic');
sethbuild = new Sound(soundie);
sethbuild.attachSound('sethbuild');
boss1main = new Sound(soundie);
boss1main.attachSound('boss1main');
boss2build = new Sound(soundie);
boss2build.attachSound('boss2build');
boss2main = new Sound(soundie);
boss2main.attachSound('boss2main');
lvl3music = new Sound(soundie);
lvl3music.attachSound('lvl3music');
boss3build = new Sound(soundie);
boss3build.attachSound('boss3build');
boss3main = new Sound(soundie);
boss3main.attachSound('boss3main');
skills = new Sound(soundie);
skills.attachSound('skills');
punch_swing = new Sound();
punch_swing.attachSound('punch_swing');
metal_hit = new Sound();
metal_hit.attachSound('metal_hit');
crackle = new Sound();
crackle.attachSound('crackle');
frying = new Sound();
frying.attachSound('frying');
rockgrind = new Sound();
rockgrind.attachSound('rockgrind');
floodlight = new Sound();
floodlight.attachSound('floodlight');
wings = new Sound();
wings.attachSound('wings');
wind = new Sound();
wind.attachSound('wind');
powerdown = new Sound();
powerdown.attachSound('powerdown');
howl = new Sound();
howl.attachSound('howl');
thump = new Sound();
thump.attachSound('thump');
boing = new Sound();
boing.attachSound('boing');
ping1 = new Sound();
ping1.attachSound('ping1');
ping2 = new Sound();
ping2.attachSound('ping2');
ping3 = new Sound();
ping3.attachSound('ping3');
kerching = new Sound();
kerching.attachSound('kerching');
mypunch_hit = new Sound();
mypunch_hit.attachSound('punch_hit');
muffledHit = new Sound();
muffledHit.attachSound('muffledHit');
magicnoises = new Sound();
magicnoises.attachSound('magicnoises');
glass_break = new Sound();
glass_break.attachSound('glass_break');
freeze = new Sound();
freeze.attachSound('freeze');
flame = new Sound();
flame.attachSound('flame');
fuse1 = new Sound();
fuse1.attachSound('fuse');
fuse2 = new Sound();
fuse2.attachSound('fuse');
fuse3 = new Sound();
fuse3.attachSound('fuse');
boom = new Sound();
boom.attachSound('boom');
angrywind = new Sound();
angrywind.attachSound('angrywind');
stab = new Sound();
stab.attachSound('stab');
snowshot = new Sound();
snowshot.attachSound('snowshot');
deathcall = function () {
_root.player.unloadMovie();
_root.aziel.unloadMovie();
_root.bardelete = false;
i = 0;
while (i < 100) {
_root['ebar' + i].unloadMovie();
++i;
}
};
_root.fireclasses = true;
musictype = 0;
teleportding = false;
_root.introjam.start(0, 3);
}
// unknown tag 88 length 78
button 608 {
on (press, keyPress 's') {
nextFrame();
}
}
button 611 {
on (press) {
_root.gotoAndStop('introleva');
}
}
movieClip 613 {
frame 35 {
this.unloadMovie();
}
}
button 645 {
on (press, keyPress 's') {
_root.gotoAndStop('introleva');
}
}
movieClip 646 {
frame 1 {
stop();
}
}
movieClip 648 {
}
button 652 {
on (press) {
_root.otheraction = false;
_root.mobility = true;
_root.gotoAndStop('city');
}
}
movieClip 654 {
frame 15 {
this.unloadMovie();
}
}
button 676 {
on (press, keyPress 's') {
_root.otheraction = false;
_root.mobility = true;
_root.gotoAndStop('city');
}
}
movieClip 677 {
frame 1 {
stop();
_root.otheraction = false;
_root.attacking = false;
_root.magic = false;
_root.story = 1;
}
}
button 681 {
on (press) {
_root.talktime = 0;
_root.talkal = false;
_root.gotoAndStop('tournament');
_root.mobility = true;
}
}
button 723 {
on (press, keyPress 's') {
_root.talktime = 0;
_root.talkal = false;
_root.gotoAndStop('tournament');
_root.mobility = true;
}
}
movieClip 724 {
frame 1 {
stop();
}
}
movieClip 726 {
}
movieClip 729 {
}
movieClip 733 {
}
movieClip 737 {
}
movieClip 743 {
}
movieClip 745 {
}
movieClip 747 {
}
movieClip 749 {
}
movieClip 751 {
}
movieClip 753 MedalPopup {
frame 1 {
function onMedalUnlocked(event) {
if (event.__get__success()) {
_medalQueue.push(event.__get__data());
showNextUnlock();
}
}
function showNextUnlock() {
if (_unlockedMedal) {
return undefined;
}
if (!_medalQueue.length) {
gotoAndStop('hidden');
onEnterFrame = null;
return undefined;
}
_unlockedMedal = com.newgrounds.Medal(_medalQueue.shift());
gotoAndPlay('medalUnlocked');
}
gotoAndStop('hidden');
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCKED, onMedalUnlocked);
var alwaysOnTop;
_x = int(_x);
_y = int(_y);
var _unlockedMedal;
var _medalQueue = [];
var _alwaysOnTop = true;
if (alwaysOnTop) {
_alwaysOnTop = alwaysOnTop == 'true';
}
}
frame 15 {
function medalPopupEnterFrame() {
if (_alwaysOnTop) {
var v1 = getNextHighestDepth();
swapDepths(v1);
}
if (_medalScrollRect) {
_medalScrollRect.offset(2, 0);
medalNameClip.scrollRect = _medalScrollRect;
if (_medalScrollRect.left >= medalNameClip.textField.textWidth + 10) {
_medalScrollRect = null;
play();
}
}
}
var _medalScrollRect;
if (_unlockedMedal) {
if (medalNameClip && medalNameClip.textField) {
medalNameClip.textField.text = _unlockedMedal.name;
}
if (medalPointsText) {
medalPointsText.text = _unlockedMedal.value.toString();
}
if (medalNameClip.textField.textWidth > medalNameClip._width) {
_medalScrollRect = new flash.geom.Rectangle(-medalNameClip._width, 0, medalNameClip._width, medalNameClip._height);
medalNameClip.textField._width = 1000;
medalNameClip.scrollRect = _medalScrollRect;
}
onEnterFrame = medalPopupEnterFrame;
}
}
frame 23 {
if (_unlockedMedal && medalIcon) {
_unlockedMedal.attachIcon(medalIcon);
}
}
frame 84 {
if (_medalScrollRect) {
stop();
}
}
frame 105 {
stop();
_unlockedMedal = null;
showNextUnlock();
}
}
instance of movieClip 753 MedalPopup {
onClipEvent (construct) {
alwaysOnTop = 'true';
}
}
button 757 {
on (press) {
_root.movie2 = true;
_root.sethbuild.stop();
_root.player._x = 1822;
_root.player._y = 515;
_root.mobility = true;
_root.gotoAndStop('area1,3');
}
}
button 791 {
on (press, keyPress 's') {
_root.movie2 = true;
_root.sethbuild.stop();
_root.player._x = 1822;
_root.player._y = 515;
_root.mobility = true;
_root.gotoAndStop('area1,3');
}
}
movieClip 792 {
frame 1 {
_root.scary.start();
}
frame 1 {
stop();
}
frame 17 {
}
}
movieClip 832 {
frame 14 {
gotoAndPlay(4);
}
}
movieClip 856 {
frame 1 {
_root.sethsong.stop();
com.newgrounds.API.unlockMedal('Random Attacker');
kongregate.stats.submit('Boss1Medal', 1);
}
frame 188 {
mobility = true;
_root.stopAllSounds();
_root.story = 2;
_root.movie3 = true;
_root.otheraction = false;
_root.attacking = false;
_root.magic = false;
_root.lvl1music.start(0, 99);
_root.gotoAndStop('area1,3');
}
}
button 860 {
on (press) {
_root.mobility = true;
_root.story = 3;
_root.otheraction = false;
_root.area2 = true;
_root.gotoAndStop('city');
}
}
button 918 {
on (press, keyPress 's') {
_root.mobility = true;
_root.otheraction = false;
_root.story = 3;
_root.area2 = true;
_root.gotoAndStop('city');
}
}
movieClip 919 {
frame 1 {
_root.poshmusic.start(9, 99);
}
frame 1 {
stop();
_root.citymusic.stop('citymusic');
}
}
movieClip 955 {
frame 10 {
_root.wings.start(0, 1);
}
}
movieClip 957 {
frame 1 {
stop();
}
}
movieClip 977 {
}
movieClip 996 {
}
movieClip 1005 {
}
movieClip 1022 {
frame 13 {
stop();
}
}
movieClip 1034 {
}
movieClip 1039 {
}
movieClip 1042 {
}
movieClip 1054 {
instance of movieClip 1042 {
onClipEvent (enterFrame) {
gotoAndStop(1);
}
}
frame 282 {
mobility = true;
_root.dragodeaad = true;
_root.otheraction = false;
_root.attacking = false;
_root.magic = false;
_root.gotoAndStop('area2,11');
}
}
instance of movieClip 1054 {
onClipEvent (enterFrame) {
_root.dragodead = true;
}
}
button 1058 {
on (press, keyPress 's') {
_root.mobility = true;
_root.howtobe = true;
_root.gotoAndStop('area2,boss');
}
}
button 1097 {
on (press, keyPress 's') {
_root.mobility = true;
_root.howtobe = true;
_root.gotoAndStop('area2,boss');
}
}
movieClip 1098 {
frame 1 {
stopAllSounds();
_root.scary.start();
stop();
}
frame 2 {
_root.movie6 = true;
}
}
movieClip 1106 {
}
movieClip 1120 {
}
movieClip 1124 {
}
movieClip 1131 {
}
movieClip 1163 {
}
movieClip 1249 {
frame 1 {
_root.preboom.unloadMovie();
com.newgrounds.API.unlockMedal('Madman');
kongregate.stats.submit('Boss2Medal', 1);
_root.magic = false;
_root.attacking = false;
_root.otheraction = false;
}
frame 814 {
_root.aftermovie7 = true;
_root.story = 4;
_root.shouldntbetherebk = true;
_root.gotoAndStop('area2,boss');
}
}
button 1253 {
on (press, keyPress 's') {
_root.mobility = true;
_root.otheraction = false;
_root.story = 5;
_root.gotoAndStop('area3,1');
}
}
button 1313 {
on (press, keyPress 's') {
_root.mobility = true;
_root.otheraction = false;
_root.story = 5;
_root.gotoAndStop('area3,1');
}
}
movieClip 1314 {
frame 1 {
_root.poshmusic.start(9, 99);
}
frame 1 {
stop();
_root.citymusic.stop('citymusic');
}
frame 14 {
stopAllSounds();
}
}
button 1323 {
on (press, keyPress 's') {
_root.movie8 = true;
_root.mobility = true;
_root.otheractoin = false;
_root.attacking = false;
_root.magic = false;
_root.gotoAndStop('area3,boss');
}
}
movieClip 1324 {
frame 1 {
stop();
}
}
button 1328 {
on (press, keyPress 's') {
_root.mobility = true;
_root.otheraction = false;
_root.story = 6;
_root.area3 = true;
_root.fadefunks = 'area3,boss';
_root.fade.play();
}
}
button 1338 {
on (press, keyPress 's') {
_root.mobility = true;
_root.otheraction = false;
_root.story = 6;
_root.area3 = true;
_root.fadefunks = 'area3,boss';
_root.fade.play();
}
}
movieClip 1339 {
frame 1 {
com.newgrounds.API.unlockMedal('The Great and Powerful...');
kongregate.stats.submit('Boss3medal', 1);
}
frame 1 {
stop();
_root.citymusic.stop('citymusic');
}
}
movieClip 1341 {
frame 1 {
stop();
}
frame 18 {
_root.bardelete = true;
}
frame 20 {
_root.bardelete = false;
_root.otheraction = false;
fadecheak1();
}
}
instance fade of movieClip 1341 {
onClipEvent (enterFrame) {
_y = _y + (_root.player._y - _y) / 4;
_x = _x + (_root.player._x - _x) / 4;
}
onClipEvent (load) {
fadefunks = _root.fadefunks;
}
onClipEvent (load) {
function fadecheak1() {
if (_root.fadefunks == 'firstfilm') {
_root.gotoAndStop('movie1g');
}
if (_root.fadefunks == 'movie2') {
_root.gotoAndStop('movie2');
}
if (_root.fadefunks == 'movie4') {
_root.gotoAndStop('movie4');
}
if (_root.fadefunks == 'tournament') {
_root.gotoAndStop('tournament');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 148.1;
_root.player._y = 327.5;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'city') {
_root.gotoAndStop('city');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 1634.8;
_root.player._y = 263.2;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1') {
_root.gotoAndStop('area1');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 146.1;
_root.player._y = 350;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'tournament1') {
_root.gotoAndStop('tournament');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 569.5;
_root.player._y = 334.9;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,2') {
_root.gotoAndStop('area1,2');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -333.1;
_root.player._y = 346.5;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,2b') {
_root.gotoAndStop('area1');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 2463.2;
_root.player._y = 359;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,2c') {
_root.gotoAndStop('area1,2');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 507;
_root.player._y = 435;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,3') {
_root.gotoAndStop('area1,3');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -1222.7;
_root.player._y = 239;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,4') {
_root.gotoAndStop('area1,4');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -210;
_root.player._y = 341;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,4.2') {
_root.gotoAndStop('area1,4');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 515.3;
_root.player._y = 1091.6;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,5') {
_root.gotoAndStop('area1,5');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -473;
_root.player._y = 470.5;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,5b') {
_root.gotoAndStop('area1,5');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 1279;
_root.player._y = 488;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,6') {
_root.gotoAndStop('area1,6');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -11;
_root.player._y = 226;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,4b') {
_root.gotoAndStop('area1,4b');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 249;
_root.player._y = 397;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,4.3') {
_root.gotoAndStop('area1,4');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 979;
_root.player._y = 455;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,6b') {
_root.gotoAndStop('area1,6');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 1967;
_root.player._y = 457;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,7') {
_root.gotoAndStop('area1,7');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 25;
_root.player._y = 228.6;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,7b') {
_root.gotoAndStop('area1,7');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 276;
_root.player._y = -212.5;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,8') {
_root.gotoAndStop('area1,8');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -164;
_root.player._y = 265;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,8b') {
_root.gotoAndStop('area1,8');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 1236;
_root.player._y = 265.3;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'celebration') {
_root.gotoAndStop('celebration');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -1222.7;
_root.player._y = 239;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'tournament2') {
_root.gotoAndStop('tournament');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 807.3;
_root.player._y = 339.2;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,1') {
_root.gotoAndStop('area2,1');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -231.4;
_root.player._y = 336;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,1b') {
_root.gotoAndStop('area2,1');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 1638;
_root.player._y = 487;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,2') {
_root.gotoAndStop('area2,2');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -90;
_root.player._y = 324;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,2b') {
_root.gotoAndStop('area2,2');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 933;
_root.player._y = 324;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,3') {
_root.gotoAndStop('area2,3');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -124;
_root.player._y = 370;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,3b') {
_root.gotoAndStop('area2,3');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 1381;
_root.player._y = 740;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,3c') {
_root.gotoAndStop('area2,3');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -129;
_root.player._y = 866;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,4') {
_root.gotoAndStop('area2,4');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -91;
_root.player._y = 351;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,4b') {
_root.gotoAndStop('area2,4');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 710;
_root.player._y = 304;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,5') {
_root.gotoAndStop('area2,5');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 90;
_root.player._y = 380;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,5b') {
_root.gotoAndStop('area2,5');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 421;
_root.player._y = 380;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,6') {
_root.gotoAndStop('area2,6');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 90;
_root.player._y = 380;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,6b') {
_root.gotoAndStop('area2,6');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 421;
_root.player._y = 380;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,7') {
_root.gotoAndStop('area2,7');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -103;
_root.player._y = 254;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,7b') {
_root.gotoAndStop('area2,7');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 317;
_root.player._y = 202;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,7c') {
_root.gotoAndStop('area2,7');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 234;
_root.player._y = 426;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,7d') {
_root.gotoAndStop('area2,7');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 462;
_root.player._y = 425;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,8') {
_root.gotoAndStop('area2,8');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -48;
_root.player._y = 431;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,8b') {
_root.gotoAndStop('area2,8');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 2008;
_root.player._y = 75;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,9') {
_root.gotoAndStop('area2,9');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -40;
_root.player._y = 374;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,10') {
_root.gotoAndStop('area2,10');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 197;
_root.player._y = 371;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,10b') {
_root.gotoAndStop('area2,10');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 833;
_root.player._y = 371;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,11') {
_root.gotoAndStop('area2,11');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -32;
_root.player._y = 373;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,12') {
_root.gotoAndStop('area2,12');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -138;
_root.player._y = 280;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,12b') {
_root.gotoAndStop('area2,12');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 830;
_root.player._y = 50;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,13') {
_root.gotoAndStop('area2,13');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -116;
_root.player._y = 392;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,13b') {
_root.gotoAndStop('area2,13');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 670;
_root.player._y = 392;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,14') {
_root.gotoAndStop('area2,14');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -192;
_root.player._y = 283;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,14b') {
_root.gotoAndStop('area2,14');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 624;
_root.player._y = 793;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,15') {
_root.gotoAndStop('area2,15');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -46;
_root.player._y = 380;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'sofar') {
_root.gotoAndStop('sofar');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -46;
_root.player._y = 380;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,boss') {
_root.gotoAndStop('area2,boss');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -527;
_root.player._y = -93;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'movie6') {
_root.gotoAndStop('movie6');
}
if (_root.fadefunks == 'tournamentbb') {
_root.gotoAndStop('tournament');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 809;
_root.player._y = 335;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'celebration2') {
_root.gotoAndStop('celebration2');
_root.fadeback.play();
}
if (_root.fadefunks == 'tournament3') {
_root.gotoAndStop('tournament');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 1065;
_root.player._y = 339;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,1') {
_root.gotoAndStop('area3,1');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -120;
_root.player._y = 225;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,1b') {
_root.gotoAndStop('area3,1');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 704;
_root.player._y = 586;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,2') {
_root.gotoAndStop('area3,2');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -219;
_root.player._y = 272;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,2b') {
_root.gotoAndStop('area3,2');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 771;
_root.player._y = 290;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,3') {
_root.gotoAndStop('area3,3');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -138;
_root.player._y = 332;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,3b') {
_root.gotoAndStop('area3,3');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 1258;
_root.player._y = -80;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,4') {
_root.gotoAndStop('area3,4');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -61;
_root.player._y = 284;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,4b') {
_root.gotoAndStop('area3,4');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 525;
_root.player._y = 300;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,5') {
_root.gotoAndStop('area3,5');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -55;
_root.player._y = 281;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,5b') {
_root.gotoAndStop('area3,5');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 311;
_root.player._y = 279;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,5c') {
_root.gotoAndStop('area3,5');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 161;
_root.player._y = 640;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,6') {
_root.gotoAndStop('area3,6');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -18;
_root.player._y = 328;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,7') {
_root.gotoAndStop('area3,7');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 27;
_root.player._y = 118;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,7b') {
_root.gotoAndStop('area3,7');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 27;
_root.player._y = 401;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,8') {
_root.gotoAndStop('area3,8');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -11;
_root.player._y = 337;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,8b') {
_root.gotoAndStop('area3,8');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 230;
_root.player._y = 20;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,9') {
_root.gotoAndStop('area3,9');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -17;
_root.player._y = 369;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,9b') {
_root.gotoAndStop('area3,9');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 426;
_root.player._y = -39;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,10') {
_root.gotoAndStop('area3,10');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 0;
_root.player._y = 365;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,11') {
_root.gotoAndStop('area3,11');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 51;
_root.player._y = 256;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,11b') {
_root.gotoAndStop('area3,11');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 111;
_root.player._y = 656;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,boss') {
_root.gotoAndStop('area3,boss');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 132;
_root.player._y = 394;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'movie8') {
_root.gotoAndStop('movie8');
}
if (_root.fadefunks == 'celebration3') {
_root.gotoAndStop('celebration3');
}
if (_root.fadefunks == 'movie9') {
_root.gotoAndStop('movie9');
}
if (_root.fadefunks == 'movie10') {
_root.gotoAndStop('movie10');
}
if (_root.fadefunks == 'movie11') {
_root.gotoAndStop('movie11');
}
}
}
}
button 1345 {
on (press, keyPress 's') {
_root.mobility = true;
_root.otheraction = false;
_root.gotoAndStop('tunnel');
}
}
button 1362 {
on (press, keyPress 's') {
_root.mobility = true;
_root.otheraction = false;
_root.gotoAndStop('tunnel');
}
}
movieClip 1363 {
frame 1 {
stop();
_root.citymusic.stop('citymusic');
}
}
button 1366 {
on (press, keyPress 's') {
_root.mobility = true;
_root.otheraction = false;
stopAllSounds();
_root.gotoAndStop('finalboss');
}
}
movieClip 1368 {
frame 26 {
this.unloadMovie();
}
}
button 1457 {
on (press, keyPress 's') {
_root.mobility = true;
_root.otheraction = false;
stopAllSounds();
_root.gotoAndStop('finalboss');
}
}
movieClip 1458 {
frame 1 {
_root.scary.start(0, 99);
}
frame 1 {
stop();
_root.citymusic.stop('citymusic');
}
}
frame 317 {
stopAllSounds();
_root.deathcall();
_root.fade._x = 260;
_root.fade._y = 207;
}
button 1462 {
on (press) {
stopAllSounds();
if (_root.story == 5) {
_root.story = 4;
}
_root.painallowed = true;
_root.fade.play();
_root.hider.play();
_root.fadefunks = 'city';
_root.mobility = true;
_root.health = _root.healthmax;
_root.otheraction = false;
_root.magicpower = magicmax;
_root.talktime = 0;
_;
_root.talkal = false;
}
}
button 1463 {
on (press, keyPress 's') {
stopAllSounds();
_root.painallowed = true;
_root.fade.play();
_root.mobility = true;
_root.health = _root.healthmax;
_root.otheraction = false;
_root.magicpower = magicmax;
_root.talktime = 0;
_root.hider.play();
_root.talkal = false;
if (_root.musictype == 1) {
_root.lvl1music.start(0, 99);
}
if (_root.musictype == 2) {
_root.lvl2music.start(0, 99);
}
if (_root.musictype == 3) {
_root.lvl3music.start(0, 99);
}
}
}
movieClip 1468 {
frame 1 {
stop();
stop();
}
frame 23 {
this.unloadMovie();
}
}
movieClip 1470 {
frame 31 {
this.unloadMovie();
}
}
button 1474 {
on (press) {
gotoAndStop(1);
_root.mobility = true;
}
}
// unknown tag 88 length 148
button 1479 {
on (press) {
_root.found1 = 'sold';
_root.expt += 50;
_root.kerching.start();
_root.totalitem += 1;
}
}
movieClip 1481 {
}
button 1484 {
on (press) {
_root.found2 = 'sold';
_root.expt += 100;
_root.kerching.start();
_root.totalitem += 1;
}
}
movieClip 1486 {
}
button 1489 {
on (press) {
_root.found3 = 'sold';
_root.expt += 100;
_root.kerching.start();
_root.totalitem += 1;
}
}
movieClip 1491 {
}
button 1493 {
on (press) {
_root.found4 = 'sold';
_root.expt += 150;
_root.kerching.start();
_root.totalitem += 1;
}
}
movieClip 1496 {
}
button 1497 {
on (press) {
_root.found8 = 'sold';
_root.expt += 400;
_root.kerching.start();
_root.totalitem += 1;
}
}
movieClip 1500 {
}
button 1501 {
on (press) {
_root.found12 = 'sold';
_root.expt += 600;
_root.kerching.start();
_root.totalitem += 1;
}
}
movieClip 1504 {
}
button 1505 {
on (press) {
_root.found5 = 'sold';
_root.expt += 250;
_root.kerching.start();
_root.totalitem += 1;
}
}
movieClip 1508 {
}
button 1509 {
on (press) {
_root.found6 = 'sold';
_root.expt += 300;
_root.kerching.start();
_root.totalitem += 1;
}
}
movieClip 1512 {
}
button 1513 {
on (press) {
_root.found7 = 'sold';
_root.expt += 350;
_root.kerching.start();
_root.totalitem += 1;
}
}
movieClip 1516 {
}
button 1517 {
on (press) {
_root.found9 = 'sold';
_root.expt += 450;
_root.kerching.start();
_root.totalitem += 1;
}
}
movieClip 1520 {
}
button 1521 {
on (press) {
_root.found10 = 'sold';
_root.expt += 500;
_root.kerching.start();
_root.totalitem += 1;
}
}
movieClip 1524 {
}
button 1525 {
on (press) {
_root.found11 = 'sold';
_root.expt += 550;
_root.kerching.start();
_root.totalitem += 1;
}
}
movieClip 1528 {
}
button 1535 {
on (press) {
if (_root.comboupgrade == 0) {
if (_root.expt >= 50) {
_root.kerching.start();
_root.comboupgrade = 1;
_root.combomax = 6;
_root.expt -= 50;
}
} else {
if (_root.comboupgrade == 1) {
if (_root.expt >= 100) {
_root.kerching.start();
_root.comboupgrade = 2;
_root.combomax = 7;
_root.expt -= 100;
}
} else {
if (_root.comboupgrade == 2) {
if (_root.expt >= 150) {
_root.kerching.start();
_root.comboupgrade = 3;
_root.combomax = 8;
_root.expt -= 150;
}
} else {
if (_root.comboupgrade == 3) {
if (_root.expt >= 200) {
_root.kerching.start();
_root.comboupgrade = 4;
_root.combomax = 9;
_root.expt -= 200;
}
} else {
if (_root.comboupgrade == 4) {
if (_root.expt >= 250) {
_root.kerching.start();
_root.comboupgrade = 5;
_root.combomax = 10;
_root.expt -= 250;
}
}
}
}
}
}
}
}
movieClip 1538 {
frame 1 {
stop();
}
}
button 1560 {
on (press) {
if (_root.mpupgrade == 0) {
if (_root.expt >= 100) {
_root.kerching.start();
_root.mpupgrade = 1;
_root.magicmax = 125;
_root.expt -= 100;
}
} else {
if (_root.mpupgrade == 1) {
if (_root.expt >= 150) {
_root.kerching.start();
_root.mpupgrade = 2;
_root.magicmax = 150;
_root.expt -= 150;
}
} else {
if (_root.mpupgrade == 2) {
if (_root.expt >= 200) {
_root.kerching.start();
_root.mpupgrade = 3;
_root.magicmax = 175;
_root.expt -= 200;
}
} else {
if (_root.mpupgrade == 3) {
if (_root.expt >= 250) {
_root.kerching.start();
_root.mpupgrade = 4;
_root.magicmax = 200;
_root.expt -= 250;
}
}
}
}
}
}
}
movieClip 1564 {
frame 1 {
stop();
}
}
button 1566 {
on (press) {
if (_root.mpregupgrade == 0) {
if (_root.expt >= 100) {
_root.kerching.start();
_root.mpregupgrade = 1;
_root.magiclim = 8;
_root.magici = 0;
_root.expt -= 100;
}
} else {
if (_root.mpregupgrade == 1) {
if (_root.expt >= 200) {
_root.kerching.start();
_root.mpregupgrade = 2;
_root.magiclim = 6;
_root.magici = 0;
_root.expt -= 200;
}
} else {
if (_root.mpregupgrade == 2) {
if (_root.expt >= 300) {
_root.kerching.start();
_root.mpregupgrade = 3;
_root.magiclim = 4;
_root.magici = 0;
_root.expt -= 300;
}
}
}
}
}
}
movieClip 1568 {
frame 1 {
stop();
}
}
button 1570 {
on (press) {
if (_root.hpupgrade == 0) {
if (_root.expt >= 100) {
_root.kerching.start();
_root.hpupgrade = 1;
_root.healthmax = 125;
_root.kerching.start();
_root.expt -= 100;
}
} else {
if (_root.hpupgrade == 1) {
if (_root.expt >= 150) {
_root.kerching.start();
_root.hpupgrade = 2;
_root.healthmax = 150;
_root.expt -= 150;
}
} else {
if (_root.hpupgrade == 2) {
if (_root.expt >= 200) {
_root.kerching.start();
_root.hpupgrade = 3;
_root.healthmax = 175;
_root.expt -= 200;
}
} else {
if (_root.hpupgrade == 3) {
if (_root.expt >= 250) {
_root.kerching.start();
_root.hpupgrade = 4;
_root.healthmax = 200;
_root.expt -= 250;
}
}
}
}
}
}
}
movieClip 1572 {
frame 1 {
stop();
}
}
button 1576 {
on (press) {
gotoAndStop('shopskill');
}
}
button 1579 {
on (press) {
gotoAndStop(1);
_root.mobility = true;
_root.classi = _root.iceclass;
_root.classi = _root.lightningclass;
_root.classi = _root.fireclass;
_root.magicpower = _root.magicmax;
_root.health = _root.healthmax;
}
}
movieClip 1586 {
}
button 1588 {
on (press) {
if (_root.expt >= 200) {
nextFrame();
_root.fireclass = 'fire2';
_root.expt -= 200;
_root.classi = 'fire2';
attachMovie('upgradeflash', 'flashd', 30);
flashd._x = 3.5;
flashd._x = 3.5;
_root.kerching.start(0, 0);
}
}
}
button 1592 {
on (press) {
if (_root.expt >= 300) {
nextFrame();
_root.fireclass = 'fire3';
_root.expt -= 300;
_root.classi = 'fire3';
attachMovie('upgradeflash', flashie, this.getNextHighestDepth());
flashie._x = 3.5;
flashie._y = 86.3;
_root.kerching.start();
}
}
}
movieClip 1593 {
frame 1 {
stop();
}
}
button 1595 {
on (press) {
if (_root.expt >= 100) {
_root.icetrue = true;
attachMovie('upgradeflash', 'dfdflashflash', this.getNextHighestDepth());
flashflash._x = 21.5;
flashflash._y = -86;
_root.kerching.start();
_root.expt -= 100;
nextFrame();
}
}
}
button 1598 {
on (press) {
if (_root.expt >= 200) {
_root.iceclass = 'ice2';
_root.classi = iceclass;
attachMovie('upgradeflash', 'flashflash', this.getNextHighestDepth());
flashflash._x = 21.5;
flashflash._y = 2.5;
_root.kerching.start();
_root.expt -= 200;
nextFrame();
}
}
}
button 1600 {
on (press) {
if (_root.expt >= 300) {
_root.iceclass = 'ice3';
_root.classi = iceclass;
attachMovie('upgradeflash', 'fladfashflash', this.getNextHighestDepth());
flashflash._x = 21.5;
flashflash._y = 85.8;
_root.kerching.start();
_root.expt -= 300;
nextFrame();
}
}
}
movieClip 1602 {
frame 1 {
stop();
}
}
button 1604 {
on (press) {
if (_root.expt >= 100) {
nextFrame();
_root.lightningtrue = true;
attachMovie('upgradeflash', 'flashflash', this.getNextHighestDepth());
flashflash._x = 16.3;
flashflash._y = -85.5;
_root.kerching.start();
_root.expt -= 100;
}
}
}
button 1606 {
on (press) {
if (_root.expt >= 200) {
nextFrame();
_root.lightningclass = 'lightning2';
_root.classi = lightningclass;
attachMovie('upgradeflash', 'flashddfsflash', this.getNextHighestDepth());
flashflash._x = 16.3;
flashflash._y = 3;
_root.kerching.start();
_root.expt -= 200;
}
}
}
button 1608 {
on (press) {
if (_root.expt >= 300) {
nextFrame();
_root.lightningclass = 'lightning3';
_root.classi = lightningclass;
attachMovie('upgradeflash', 'flashdfadflash', this.getNextHighestDepth());
flashflash._x = 16.3;
flashflash._y = 86.8;
_root.kerching.start();
_root.expt -= 300;
}
}
}
movieClip 1610 {
frame 1 {
stop();
}
}
button 1612 {
on (press) {
if (_root.expt >= 100) {
nextFrame();
_root.tporttrue = true;
attachMovie('upgradeflash', 'flashflashie', this.getNextHighestDepth());
flashflash._x = 15.3;
flashflash._y = -85.5;
_root.kerching.start();
_root.expt -= 100;
}
}
}
button 1614 {
on (press) {
if (_root.expt >= 200) {
nextFrame();
_root.itport = 2;
attachMovie('upgradeflash', 'flashflashdleid', this.getNextHighestDepth());
flashflash._x = 15.3;
flashflash._y = 3;
_root.kerching.start();
_root.expt -= 100;
}
}
}
button 1616 {
on (press) {
if (_root.expt >= 300) {
nextFrame();
_root.itport = 3;
attachMovie('upgradeflash', 'flashflashdledumph', this.getNextHighestDepth());
flashflash._x = 15.3;
flashflash._y = 86.59999999999999;
_root.kerching.start();
_root.expt -= 300;
}
}
}
movieClip 1618 {
frame 1 {
stop();
}
}
button 1620 {
on (press) {
gotoAndStop('shopstat');
}
}
movieClip 1622 {
frame 1 {
stop();
}
instance of movieClip 1481 {
onClipEvent (enterFrame) {
if (_root.found1 == 'found') {
this.gotoAndStop(2);
}
if (_root.found1 == 'sold') {
this.gotoAndStop(3);
}
if (_root.found1 == 'k') {
this.gotoAndStop(1);
}
}
}
instance of movieClip 1486 {
onClipEvent (enterFrame) {
if (_root.found2 == 'found') {
this.gotoAndStop(2);
}
if (_root.found2 == 'sold') {
this.gotoAndStop(3);
}
if (_root.found2 == 'k') {
this.gotoAndStop(1);
}
}
}
instance of movieClip 1491 {
onClipEvent (enterFrame) {
if (_root.found3 == 'found') {
this.gotoAndStop(2);
}
if (_root.found3 == 'sold') {
this.gotoAndStop(3);
}
if (_root.found3 == 'k') {
this.gotoAndStop(1);
}
}
}
instance of movieClip 1496 {
onClipEvent (enterFrame) {
if (_root.found4 == 'found') {
this.gotoAndStop(2);
}
if (_root.found4 == 'sold') {
this.gotoAndStop(3);
}
if (_root.found4 == 'k') {
this.gotoAndStop(1);
}
}
}
instance of movieClip 1500 {
onClipEvent (enterFrame) {
if (_root.found8 == 'found') {
this.gotoAndStop(2);
}
if (_root.found8 == 'sold') {
this.gotoAndStop(3);
}
if (_root.found8 == 'k') {
this.gotoAndStop(1);
}
}
}
instance of movieClip 1504 {
onClipEvent (enterFrame) {
if (_root.found12 == 'found') {
this.gotoAndStop(2);
}
if (_root.found12 == 'sold') {
this.gotoAndStop(3);
}
if (_root.found12 == 'k') {
this.gotoAndStop(1);
}
}
}
instance of movieClip 1508 {
onClipEvent (enterFrame) {
if (_root.found5 == 'found') {
this.gotoAndStop(2);
}
if (_root.found5 == 'sold') {
this.gotoAndStop(3);
}
if (_root.found5 == 'k') {
this.gotoAndStop(1);
}
}
}
instance of movieClip 1512 {
onClipEvent (enterFrame) {
if (_root.found6 == 'found') {
this.gotoAndStop(2);
}
if (_root.found6 == 'sold') {
this.gotoAndStop(3);
}
if (_root.found6 == 'k') {
this.gotoAndStop(1);
}
}
}
instance of movieClip 1516 {
onClipEvent (enterFrame) {
if (_root.found7 == 'found') {
this.gotoAndStop(2);
}
if (_root.found7 == 'sold') {
this.gotoAndStop(3);
}
if (_root.found7 == 'k') {
this.gotoAndStop(1);
}
}
}
instance of movieClip 1520 {
onClipEvent (enterFrame) {
if (_root.found9 == 'found') {
this.gotoAndStop(2);
}
if (_root.found9 == 'sold') {
this.gotoAndStop(3);
}
if (_root.found9 == 'k') {
this.gotoAndStop(1);
}
}
}
instance of movieClip 1524 {
onClipEvent (enterFrame) {
if (_root.found10 == 'found') {
this.gotoAndStop(2);
}
if (_root.found10 == 'sold') {
this.gotoAndStop(3);
}
if (_root.found10 == 'k') {
this.gotoAndStop(1);
}
}
}
instance of movieClip 1528 {
onClipEvent (enterFrame) {
if (_root.found11 == 'found') {
this.gotoAndStop(2);
}
if (_root.found11 == 'sold') {
this.gotoAndStop(3);
}
if (_root.found11 == 'k') {
this.gotoAndStop(1);
}
}
}
instance physicalicon of movieClip 1538 {
onClipEvent (enterFrame) {
if (_root.comboupgrade == 0) {
if (_root.expt < 50) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
}
onClipEvent (enterFrame) {
if (_root.comboupgrade == 1) {
if (_root.expt < 100) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
}
onClipEvent (enterFrame) {
if (_root.comboupgrade == 2) {
if (_root.expt < 150) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
}
onClipEvent (enterFrame) {
if (_root.comboupgrade == 3) {
if (_root.expt < 200) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
}
onClipEvent (enterFrame) {
if (_root.comboupgrade == 4) {
this.gotoAndStop(3);
}
}
}
instance of movieClip 1564 {
onClipEvent (enterFrame) {
if (_root.mpupgrade == 0) {
if (_root.expt < 100) {
gotoAndStop(2);
} else {
gotoAndStop(1);
}
}
if (_root.mpupgrade == 1) {
if (_root.expt < 150) {
gotoAndStop(2);
} else {
gotoAndStop(1);
}
}
if (_root.mpupgrade == 2) {
if (_root.expt < 200) {
gotoAndStop(2);
} else {
gotoAndStop(1);
}
}
if (_root.mpupgrade == 3) {
if (_root.expt < 250) {
gotoAndStop(2);
} else {
gotoAndStop(1);
}
}
if (_root.mpupgrade == 4) {
gotoAndStop(3);
}
}
}
instance of movieClip 1568 {
onClipEvent (enterFrame) {
if (_root.mpregupgrade == 0) {
if (_root.expt < 100) {
gotoAndStop(2);
} else {
gotoAndStop(1);
}
}
if (_root.mpregupgrade == 1) {
if (_root.expt < 200) {
gotoAndStop(2);
} else {
gotoAndStop(1);
}
}
if (_root.mpregupgrade == 2) {
if (_root.expt < 300) {
gotoAndStop(2);
} else {
gotoAndStop(1);
}
}
if (_root.mpregupgrade == 3) {
gotoAndStop(3);
}
}
}
instance of movieClip 1572 {
onClipEvent (enterFrame) {
if (_root.hpupgrade == 0) {
if (_root.expt < 100) {
gotoAndStop(2);
} else {
gotoAndStop(1);
}
}
if (_root.hpupgrade == 1) {
if (_root.expt < 150) {
gotoAndStop(2);
} else {
gotoAndStop(1);
}
}
if (_root.hpupgrade == 2) {
if (_root.expt < 200) {
gotoAndStop(2);
} else {
gotoAndStop(1);
}
}
if (_root.hpupgrade == 3) {
if (_root.expt < 250) {
gotoAndStop(2);
} else {
gotoAndStop(1);
}
}
if (_root.hpupgrade == 4) {
gotoAndStop(3);
}
}
}
instance of movieClip 1593 {
onClipEvent (load) {
if (_root.fireclass == 'fire2') {
this.gotoAndStop(2);
}
if (_root.fireclass == 'fire3') {
this.gotoAndStop(3);
}
}
}
instance of movieClip 1602 {
onClipEvent (load) {
if (_root.icetrue != true) {
this.gotoAndStop(1);
}
if (_root.iceclass == 'ice1' && _root.icetrue == true) {
this.gotoAndStop(2);
}
if (_root.iceclass == 'ice2') {
this.gotoAndStop(3);
}
if (_root.iceclass == 'ice3') {
this.gotoAndStop(4);
}
}
}
instance of movieClip 1610 {
onClipEvent (load) {
if (_root.lightningtrue != true) {
this.gotoAndStop(1);
}
if (_root.lightningclass == 'lightning1' && _root.lightningtrue == true) {
this.gotoAndStop(2);
}
if (_root.lightningclass == 'lightning2') {
this.gotoAndStop(3);
}
if (_root.lightningclass == 'lightning3') {
this.gotoAndStop(4);
}
}
}
instance of movieClip 1618 {
onClipEvent (load) {
if (_root.tporttrue != true) {
this.gotoAndStop(1);
}
if (_root.itport == 1 && _root.tporttrue == true) {
this.gotoAndStop(2);
}
if (_root.itport == 2) {
this.gotoAndStop(3);
}
if (_root.itport == 3) {
this.gotoAndStop(4);
}
}
}
}
instance shops of movieClip 1622 {
onClipEvent (enterFrame) {
_y = _y + (_root.player._y - _y) / 4;
_x = _x + (_root.player._x - _x) / 4;
}
onClipEvent (enterFrame) {
this.expt = _root.expt;
this.comboupgrade = _root.comboupgrade;
mpupgrade = _root.mpupgrade;
mpregupgrade = _root.mpregupgrade;
this.hpupgrade = _root.hpupgrade;
if (comboupgrade == 0) {
comboupgradenum = 50;
}
if (comboupgrade == 1) {
comboupgradenum = 100;
}
if (comboupgrade == 2) {
comboupgradenum = 150;
}
if (comboupgrade == 3) {
comboupgradenum = 200;
}
if (comboupgrade == 4) {
comboupgradenum = '...';
}
if (mpupgrade == 0) {
maxmpnum = 100;
}
if (mpupgrade == 1) {
maxmpnum = 150;
}
if (mpupgrade == 3) {
maxmpnum = 200;
}
if (mpupgrade == 4) {
maxmpnum = '...';
}
if (mpregupgrade == 0) {
mpregnum = 100;
}
if (mpregupgrade == 1) {
mpregnum = 200;
}
if (mpregupgrade == 2) {
mpregnum = 300;
}
if (mpregupgrade == 3) {
mpregnum = '...';
}
if (hpupgrade == 0) {
hpmaxnum = 100;
}
if (hpupgrade == 1) {
hpmaxnum = 150;
}
if (hpupgrade == 2) {
hpmaxnum = 200;
}
if (hpupgrade == 3) {
hpmaxnum = 150;
}
if (hpupgrade == 4) {
hpmaxnum = '...';
}
}
onClipEvent (mouseDown) {
if (hpupgrade == 4 && mpregupgrade == 3 && mpupgrade == 4 && comboupgrade == 4 && _root.fireclass == 'fire3' && _root.iceclass == 'ice3' && _root.lightningclass == 'lightning3' && _root.itport == 3) {
com.newgrounds.API.unlockMedal('War-Mage');
kongregate.stats.submit('BoughtEverythingMedal', 1);
}
}
onClipEvent (mouseDown) {
if (_root.totalitem >= 12) {
com.newgrounds.API.unlockMedal('Scavenger');
kongregate.stats.submit('FoundEverythingMedal', 1);
}
}
onClipEvent (load) {
comboupgradenum = 0;
mpmaxnum = 0;
mpregnum = 0;
hpmaxnum = 0;
}
}
movieClip 1640 {
}
button 1643 {
on (press) {
_root.itemobtain.gotoAndStop(1);
_root.mobility = true;
}
}
button 1646 {
on (press, keyPress 's') {
_root.mobility = true;
_root.itemobtain.gotoAndStop(1);
}
}
movieClip 1669 {
frame 1 {
stop();
}
frame 2 {
_root.mobility = false;
}
frame 3 {
itemimage.gotoAndStop('randomitem');
}
frame 4 {
itemimage.gotoAndStop('antientskull');
}
frame 5 {
itemimage.gotoAndStop('petcactus');
}
frame 6 {
itemimage.gotoAndStop('camera');
}
frame 7 {
itemimage.gotoAndStop('roll');
}
frame 8 {
itemimage.gotoAndStop('brolly');
}
frame 9 {
itemimage.gotoAndStop('knife');
}
frame 10 {
itemimage.gotoAndStop('key');
}
frame 11 {
itemimage.gotoAndStop('book');
}
frame 12 {
itemimage.gotoAndStop('rubbers');
}
frame 13 {
itemimage.gotoAndStop('face');
}
frame 14 {
itemimage.gotoAndStop('sauce');
}
}
instance itemobtain of movieClip 1669 {
onClipEvent (enterFrame) {
_y = _y + (_root.player._y - _y) / 4;
_x = _x + (_root.player._x - _x) / 4;
}
}
instance fade of movieClip 1341 {
onClipEvent (enterFrame) {
_y = _y + (_root.player._y - _y) / 4;
_x = _x + (_root.player._x - _x) / 4;
}
onClipEvent (load) {
fadefunks = _root.fadefunks;
}
onClipEvent (load) {
function fadecheak1() {
_root.otheraction = false;
if (_root.fadefunks == 'firstfilm') {
_root.gotoAndStop('movie1g');
}
if (_root.fadefunks == 'movie2') {
_root.gotoAndStop('movie2');
}
if (_root.fadefunks == 'movie4') {
_root.gotoAndStop('movie4');
}
if (_root.fadefunks == 'tournament') {
_root.gotoAndStop('tournament');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 148.1;
_root.player._y = 327.5;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'city') {
_root.gotoAndStop('city');
_root.otheraction = false;
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 1634.8;
_root.player._y = 263.2;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1') {
_root.gotoAndStop('area1');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 146.1;
_root.player._y = 350;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'tournament1') {
_root.gotoAndStop('tournament');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 569.5;
_root.player._y = 334.9;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,2') {
_root.gotoAndStop('area1,2');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -333.1;
_root.player._y = 346.5;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,2b') {
_root.gotoAndStop('area1');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 2463.2;
_root.player._y = 359;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,2c') {
_root.gotoAndStop('area1,2');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 507;
_root.player._y = 435;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,3') {
_root.gotoAndStop('area1,3');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -1222.7;
_root.player._y = 239;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,4') {
_root.gotoAndStop('area1,4');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -210;
_root.player._y = 341;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,4.2') {
_root.gotoAndStop('area1,4');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 515.3;
_root.player._y = 1091.6;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,5') {
_root.gotoAndStop('area1,5');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -473;
_root.player._y = 470.5;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,5b') {
_root.gotoAndStop('area1,5');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 1279;
_root.player._y = 488;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,6') {
_root.gotoAndStop('area1,6');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -11;
_root.player._y = 226;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,4b') {
_root.gotoAndStop('area1,4b');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 249;
_root.player._y = 397;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,4.3') {
_root.gotoAndStop('area1,4');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 979;
_root.player._y = 455;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,6b') {
_root.gotoAndStop('area1,6');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 1967;
_root.player._y = 457;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,7') {
_root.gotoAndStop('area1,7');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 25;
_root.player._y = 228.6;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,7b') {
_root.gotoAndStop('area1,7');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 276;
_root.player._y = -212.5;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,8') {
_root.gotoAndStop('area1,8');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -164;
_root.player._y = 265;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area1,8b') {
_root.gotoAndStop('area1,8');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 1236;
_root.player._y = 265.3;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'celebration') {
_root.gotoAndStop('celebration');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -1222.7;
_root.player._y = 239;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'tournament2') {
_root.gotoAndStop('tournament');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 807.3;
_root.player._y = 339.2;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,1') {
_root.gotoAndStop('area2,1');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -231.4;
_root.player._y = 336;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,1b') {
_root.gotoAndStop('area2,1');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 1638;
_root.player._y = 487;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,2') {
_root.gotoAndStop('area2,2');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -90;
_root.player._y = 324;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,2b') {
_root.gotoAndStop('area2,2');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 933;
_root.player._y = 324;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,3') {
_root.gotoAndStop('area2,3');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -124;
_root.player._y = 370;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,3b') {
_root.gotoAndStop('area2,3');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 1381;
_root.player._y = 740;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,3c') {
_root.gotoAndStop('area2,3');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -129;
_root.player._y = 866;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,4') {
_root.gotoAndStop('area2,4');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -91;
_root.player._y = 351;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,4b') {
_root.gotoAndStop('area2,4');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 710;
_root.player._y = 304;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,5') {
_root.gotoAndStop('area2,5');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 90;
_root.player._y = 380;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,5b') {
_root.gotoAndStop('area2,5');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 421;
_root.player._y = 380;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,6') {
_root.gotoAndStop('area2,6');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 90;
_root.player._y = 380;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,6b') {
_root.gotoAndStop('area2,6');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 421;
_root.player._y = 380;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,7') {
_root.gotoAndStop('area2,7');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -103;
_root.player._y = 254;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,7b') {
_root.gotoAndStop('area2,7');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 317;
_root.player._y = 202;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,7c') {
_root.gotoAndStop('area2,7');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 234;
_root.player._y = 426;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,7d') {
_root.gotoAndStop('area2,7');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 462;
_root.player._y = 425;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,8') {
_root.gotoAndStop('area2,8');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -48;
_root.player._y = 431;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,8b') {
_root.gotoAndStop('area2,8');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 2008;
_root.player._y = 75;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,9') {
_root.gotoAndStop('area2,9');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -40;
_root.player._y = 374;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,10') {
_root.gotoAndStop('area2,10');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 197;
_root.player._y = 371;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,10b') {
_root.gotoAndStop('area2,10');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 833;
_root.player._y = 371;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,11') {
_root.gotoAndStop('area2,11');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -32;
_root.player._y = 373;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,12') {
_root.gotoAndStop('area2,12');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -138;
_root.player._y = 280;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,12b') {
_root.gotoAndStop('area2,12');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 830;
_root.player._y = 50;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,13') {
_root.gotoAndStop('area2,13');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -116;
_root.player._y = 392;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,13b') {
_root.gotoAndStop('area2,13');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 670;
_root.player._y = 392;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,14') {
_root.gotoAndStop('area2,14');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -192;
_root.player._y = 283;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,14b') {
_root.gotoAndStop('area2,14');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 624;
_root.player._y = 793;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,15') {
_root.gotoAndStop('area2,15');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -46;
_root.player._y = 380;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'sofar') {
_root.gotoAndStop('sofar');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -46;
_root.player._y = 380;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area2,boss') {
_root.gotoAndStop('area2,boss');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -527;
_root.player._y = -93;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'movie6') {
_root.gotoAndStop('movie6');
}
if (_root.fadefunks == 'tournamentbb') {
_root.gotoAndStop('tournament');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 809;
_root.player._y = 335;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'celebration2') {
_root.gotoAndStop('celebration2');
_root.fadeback.play();
}
if (_root.fadefunks == 'tournament3') {
_root.gotoAndStop('tournament');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 1065;
_root.player._y = 339;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,1') {
_root.gotoAndStop('area3,1');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -120;
_root.player._y = 225;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,1b') {
_root.gotoAndStop('area3,1');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 704;
_root.player._y = 586;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,2') {
_root.gotoAndStop('area3,2');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -219;
_root.player._y = 272;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,2b') {
_root.gotoAndStop('area3,2');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 771;
_root.player._y = 290;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,3') {
_root.gotoAndStop('area3,3');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -138;
_root.player._y = 332;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,3b') {
_root.gotoAndStop('area3,3');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 1258;
_root.player._y = -80;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,4') {
_root.gotoAndStop('area3,4');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -61;
_root.player._y = 284;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,4b') {
_root.gotoAndStop('area3,4');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 525;
_root.player._y = 300;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,5') {
_root.gotoAndStop('area3,5');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -55;
_root.player._y = 281;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,5b') {
_root.gotoAndStop('area3,5');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 311;
_root.player._y = 279;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,5c') {
_root.gotoAndStop('area3,5');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 161;
_root.player._y = 640;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,6') {
_root.gotoAndStop('area3,6');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -18;
_root.player._y = 328;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,7') {
_root.gotoAndStop('area3,7');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 27;
_root.player._y = 118;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,7b') {
_root.gotoAndStop('area3,7');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 27;
_root.player._y = 401;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,8') {
_root.gotoAndStop('area3,8');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -11;
_root.player._y = 337;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,8b') {
_root.gotoAndStop('area3,8');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 230;
_root.player._y = 20;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,9') {
_root.gotoAndStop('area3,9');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = -17;
_root.player._y = 369;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,9b') {
_root.gotoAndStop('area3,9');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 426;
_root.player._y = -39;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,10') {
_root.gotoAndStop('area3,10');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 0;
_root.player._y = 365;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,11') {
_root.gotoAndStop('area3,11');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 51;
_root.player._y = 256;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,11b') {
_root.gotoAndStop('area3,11');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 111;
_root.player._y = 656;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'area3,boss') {
_root.gotoAndStop('area3,boss');
if (_root.direc == 'left') {
_root.player._xscale = scale;
}
if (_root.direc == 'right') {
_root.player._xscale = -scale;
}
_root.player._x = 132;
_root.player._y = 394;
_root.mobility = true;
_root.fadeback.play();
}
if (_root.fadefunks == 'movie8') {
_root.gotoAndStop('movie8');
}
if (_root.fadefunks == 'celebration3') {
_root.gotoAndStop('celebration3');
}
if (_root.fadefunks == 'movie9') {
_root.gotoAndStop('movie9');
}
if (_root.fadefunks == 'movie10') {
_root.gotoAndStop('movie10');
}
if (_root.fadefunks == 'movie11') {
_root.gotoAndStop('movie11');
}
if (_root.fadefunks == 'finalboss') {
_root.gotoAndStop('finalboss');
}
if (_root.fadefunks == 'secondmovie') {
_root.gotoAndStop('secondmovie');
}
}
}
}
frame 318 {
stop();
stopAllSounds();
_root.otheraction = false;
_root.health = _root.maxhealth;
_root.magicpower = _root.magicmax;
_root.citymusic.start(0, 99);
_root.citymusic.setVolume(20);
if (_root.story == 6) {
stopAllSounds();
}
_root.otheraction = false;
_root.mobility = true;
_root.otheraction = false;
_root.painallowed = true;
puzzle1solved = false;
puzzle2solved = false;
_root.otheraction = false;
}
frame 318 {
_root.otheraction = false;
}
frame 318 {
background.gotoAndStop('city');
}
movieClip 1686 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 1690 {
frame 1 {
stop();
}
instance darkness5 of movieClip 1686 {
onClipEvent (enterFrame) {
if (_root.area3 == true) {
this.gotoAndStop(2);
}
}
}
}
instance background of movieClip 1690 {
onClipEvent (enterFrame) {
this._x = _root.cam._x;
this._y = _root.cam._y;
}
}
movieClip 1694 {
}
instance of movieClip 1694 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
if (_root.lostfound == false) {
_root.hud.gotoAndStop('lost&found1');
} else {
_root.shops.gotoAndStop('lost&found');
_root.mobility = false;
}
}
}
}
}
movieClip 1698 {
}
instance of movieClip 1698 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.shops.gotoAndStop('shopskill');
}
}
}
}
movieClip 1703 {
}
movieClip 1706 {
}
instance of movieClip 1706 {
onClipEvent (load) {
if (_root.story != 1) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('eman0');
}
}
}
}
}
movieClip 1708 {
}
instance of movieClip 1708 {
onClipEvent (enterFrame) {
if (_root.found1 != 'k') {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.found1 = 'found';
_root.mobility = false;
_root.itemobtain.gotoAndStop('randomitem');
this.unloadMovie();
}
}
}
movieClip 1710 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'tournament';
}
}
}
}
instance of movieClip 1706 {
onClipEvent (load) {
if (_root.story != 2) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
if (_root.talkal == true) {
_root.mobility = false;
_root.hud.gotoAndStop('eman1');
}
}
}
}
}
movieClip 1712 {
}
instance of movieClip 1712 {
onClipEvent (enterFrame) {
if (_root.story != 3) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('glasses1');
}
}
}
}
}
movieClip 1714 {
}
instance of movieClip 1714 {
onClipEvent (enterFrame) {
if (_root.story != 1) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('sheephat1');
}
}
}
}
}
movieClip 1716 {
}
instance of movieClip 1716 {
onClipEvent (load) {
if (_root.story != 1) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('ghg1');
}
}
}
}
}
movieClip 1718 {
}
instance of movieClip 1718 {
onClipEvent (load) {
if (_root.story != 1) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('fg1');
}
}
}
}
}
movieClip 1720 {
}
instance of movieClip 1720 {
onClipEvent (load) {
if (_root.story != 3) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('cyclops1');
}
}
}
}
}
instance of movieClip 1714 {
onClipEvent (enterFrame) {
if (_root.story != 3) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('sheephat2');
}
}
}
}
}
instance of movieClip 1716 {
onClipEvent (load) {
if (_root.story != 4) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('ghg2');
}
}
}
}
}
instance of movieClip 1706 {
onClipEvent (load) {
if (_root.story != 4) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('eman2');
}
}
}
}
}
instance of movieClip 1706 {
onClipEvent (load) {
if (_root.story != 6) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('eman5');
}
}
}
}
}
movieClip 1742 {
frame 11 {
_root.painallowed = true;
}
}
movieClip 1749 {
frame 1 {
_root.attacking = false;
}
frame 5 {
stop();
}
}
movieClip 1758 {
frame 8 {
_root.attacking = false;
_root.combono += 1;
}
}
movieClip 1767 {
frame 8 {
_root.combono += 1;
_root.attacking = false;
}
}
movieClip 1778 {
frame 10 {
_root.combono += 1;
_root.attacking = false;
}
}
movieClip 1787 {
frame 8 {
_root.combono += 1;
_root.attacking = false;
}
}
movieClip 1798 {
frame 10 {
_root.combono += 1;
_root.attacking = false;
}
}
movieClip 1809 {
frame 10 {
_root.combono += 1;
_root.attacking = false;
}
}
movieClip 1812 {
}
movieClip 1825 {
}
movieClip 1845 {
frame 20 {
_root.magic = false;
_root.otheraction = false;
_root.painallowed = true;
}
}
movieClip 1866 {
frame 21 {
_root.magic = false;
_root.otheraction = false;
_root.painallowed = true;
}
}
movieClip 1894 {
frame 28 {
_root.magic = false;
_root.otheraction = false;
_root.painallowed = true;
}
}
movieClip 1908 {
frame 14 {
_root.magic = false;
_root.otheraction = false;
_root.painallowed = true;
}
}
movieClip 1921 {
frame 14 {
_root.magic = false;
_root.otheraction = false;
_root.painallowed = true;
}
}
movieClip 1934 {
frame 13 {
_root.magic = false;
_root.otheraction = false;
_root.painallowed = true;
}
}
movieClip 1938 {
frame 17 {
_root.magic = false;
_root.otheraction = false;
_root.painallowed = true;
}
}
movieClip 1940 {
frame 1 {
stop();
}
}
movieClip 1955 {
frame 10 {
if (_root.classi == 'fire1') {
_root.player.magicl.gotoAndStop('flame1');
}
if (_root.classi == 'fire2') {
_root.player.magicl.gotoAndStop('flame2');
}
if (_root.classi == 'fire3') {
_root.player.magicl.gotoAndStop('flame3');
}
if (_root.classi == 'lightning1') {
_root.player.magicl.gotoAndStop('lightning1');
}
if (_root.classi == 'lightning2') {
_root.player.magicl.gotoAndStop('lightning2');
}
if (_root.classi == 'lightning3') {
_root.player.magicl.gotoAndStop('lightning3');
}
if (_root.classi == 'ice1') {
_root.player.magicl.gotoAndStop('ice1');
}
if (_root.classi == 'ice2') {
_root.player.magicl.gotoAndStop('ice2');
}
if (_root.classi == 'ice3') {
_root.player.magicl.gotoAndStop('ice3');
}
if (_root.classi == 'tport1') {
_root.player.tport1();
}
if (_root.classi == 'tport2') {
_root.player.tport2();
}
if (_root.classi == 'tport3') {
_root.player.tport3();
}
}
}
movieClip 1959 {
}
movieClip 1972 {
frame 1 {
_root.teleportding = true;
onEnterFrame = function () {
if (_root.teleportding == true) {
_root.otheraction = true;
}
};
}
frame 84 {
_root.fadefunks = 'secondmovie';
_root.teleportding = false;
_root.fade.play();
stopAllSounds();
_root.player.unloadMovie();
}
}
movieClip 1978 {
frame 7 {
_root.otheraction = false;
_root.mobility = false;
}
}
movieClip 1988 {
frame 1 {
otheraction = true;
}
frame 2 {
_root.painallowed = false;
}
frame 10 {
_root.paintimer = true;
_root.otheraction = false;
_root.magic = false;
_root.attacking = false;
}
}
movieClip 2000 {
frame 11 {
_root.combono += 1;
_root.attacking = false;
}
}
movieClip 2011 {
frame 10 {
_root.combono += 1;
_root.attacking = false;
}
}
movieClip 2022 {
frame 10 {
_root.combono += 1;
_root.attacking = false;
}
}
movieClip 2034 {
frame 17 {
_root.combono += 1;
_root.attacking = false;
}
}
movieClip 2036 {
}
movieClip 2042 {
}
movieClip 2054 {
frame 25 {
_root.airhit = false;
_root.otheraction = false;
_root.magic = false;
_root.attacking = false;
_root.painallowed = true;
}
}
movieClip 2063 {
frame 122 {
_root.airhit = false;
_root.otheraction = false;
_root.magic = false;
_root.attacking = false;
}
}
movieClip 2065 {
}
movieClip 2069 {
}
movieClip 2078 {
frame 1 {
onEnterFrame = function () {
_root.player.grav = 0;
};
}
frame 36 {
_root.player.grav = -20;
_root.attachMovie('explosion', 'explosion' + _root.loaditems, _root.getNextHighestDepth());
_root['explosion' + _root.loaditems]._x = _root.player._x;
_root['explosion' + _root.loaditems]._y = _root.player._y - 80;
_root.airhit = true;
_root.azielstunfunc();
}
}
movieClip 2081 {
}
movieClip 2082 {
frame 1 {
stop();
}
instance run of movieClip 1742 {
onClipEvent (load) {
_root.attacking = false;
}
}
frame 3 {
_root.attacking = false;
_root.magic = false;
}
frame 13 {
_root.wind.start();
}
instance of movieClip 1955 {
onClipEvent (enterFrame) {
if (_root.classi == tport) {
_root.player.gotoAndStop('tport');
}
}
}
frame 17 {
_root.fade.play();
}
}
instance player of movieClip 2082 {
onClipEvent (mouseMove) {
if (this.hitTest(_root.donttouch)) {
_root._x = telex;
}
}
onClipEvent (enterFrame) {
if (_root.mobility == false) {
_root.attacking = false;
_root.magic = false;
}
}
onClipEvent (load) {
gumpht = 0;
}
onClipEvent (enterFrame) {
if (_root.paintimer == true) {
++gumpht;
}
if (gumpht == 15) {
gumpht = 0;
_root.paintimer = false;
_root.painallowed = true;
}
}
onClipEvent (load) {
telex = 0;
tporting = false;
teletimer = 0;
tportnumie = 10;
tmove;
}
onClipEvent (enterFrame) {
teleportuse = this._x;
}
onClipEvent (enterFrame) {
if (tporting == true) {
_root.magic = false;
_root.otheraction = true;
_root.painallowed = false;
++teletimer;
if (teletimer == tportnumie) {
teletimer = 0;
tporting = false;
tmove = 0;
tporting = false;
_root.otheraction = false;
_root.attacking = false;
_root.magic = false;
_root.painallowed = true;
}
}
}
onClipEvent (load) {
function tport11() {
if (_root.direc == 'right') {
_root.telex = this._x;
tmove = 20;
tporting = true;
_root.tportactive = false;
gotoAndStop('tport');
_root.magic = true;
}
if (_root.direc == 'left') {
_root.telex = this._x;
tporting = true;
tmove = -20;
_root.tportactive = false;
gotoAndStop('tport');
_root.magic = true;
}
}
}
onClipEvent (enterFrame) {
if (tporting == true) {
if (tmove > 0) {
this._x += tmove;
--tmove;
}
if (tmove < 0) {
this._x += tmove;
++tmove;
}
if (tmove == 0) {
tporting = false;
_root.otheraction = false;
tporting = false;
_root.magic = false;
}
}
}
onClipEvent (load) {
function tport2() {
if (_root.direc == 'right') {
tmove = 35;
tporting = true;
_root.tportactive = false;
gotoAndStop('tport');
_root.magic = true;
}
if (_root.direc == 'left') {
tmove = -35;
_root.tportactive = false;
tporting = true;
gotoAndStop('tport');
_root.magic = true;
}
}
}
onClipEvent (load) {
function tport3() {
if (_root.direc == 'right') {
tmove = 40;
_root.tportactive = false;
tporting = true;
gotoAndStop('tport');
_root.magic = true;
}
if (_root.direc == 'left') {
tmove = -40;
tporting = true;
_root.tportactive = false;
gotoAndStop('tport');
_root.magic = true;
}
}
}
onClipEvent (load) {
function tport1() {
if (_root.itport == 1) {
tport11();
}
if (_root.itport == 2) {
tport2();
}
if (_root.itport == 3) {
tport3();
}
}
}
onClipEvent (load) {
timtim = 0;
dc = 0;
coolfinish = true;
var grav = 0;
timer = 0;
_root.hud.infobar = '';
action = false;
runspeed = 13;
mobility = true;
_root.hud.infobar = 'explore';
var attacking = false;
var jumpHeight = 20;
jumpdone = false;
var slow = 0.7;
var slowspd = speed / 1.5;
setspeed = 13;
speed = setspeed;
scale = _xscale;
kspeed = 30;
var ex = 8;
this.jump.gotoAndStop('fall');
}
onClipEvent (enterFrame) {
if (_xscale == scale) {
_root.direc = 'left';
}
if (_xscale == -scale) {
_root.direc = 'right';
}
}
onClipEvent (enterFrame) {
if (_root.airhit == true) {
_root.painallowed = false;
if (grav < 0) {
this.gotoAndStop('airhit1');
}
if (grav > 0) {
this.gotoAndStop('airhit2');
}
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop('groundhit');
_root.airhit = false;
}
}
}
onClipEvent (enterFrame) {
if (_root.momentum < 0) {
this._x += _root.momentum;
_xscale = -scale;
++_root.momentum;
}
if (_root.momentum > 0) {
this._x += _root.momentum;
_xscale = scale;
--_root.momentum;
}
}
onClipEvent (load) {
dc = 0;
}
onClipEvent (enterFrame) {
if (_root.mobility == true) {
++grav;
_y = _y + grav;
while (_root.ground.hitTest(_x, _y, true)) {
_y = _y - 1;
grav = 0;
}
if (_root.water.hitTest(_x, _y, true)) {
if (grav > 0) {
grav *= slow;
}
speed = slowspd;
} else {
speed = setspeed;
}
}
}
onClipEvent (enterFrame) {
if (_root.otheraction == false) {
if (_root.mobility == true) {
if (Key.isDown(68)) {
if (_root.attacking == false) {
if (_root.magic == false) {
_x = _x + speed;
_xscale = -scale;
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop('run');
} else {
this.gotoAndStop('jump');
if (grav <= -1) {
this.jump.gotoAndStop(3);
}
if (grav == 0) {
this.jump.gotoAndStop(2);
}
if (grav > 0) {
this.jump.gotoAndStop(5);
}
}
}
}
} else {
if (Key.isDown(65)) {
if (_root.attacking == false) {
if (_root.magic == false) {
_x = _x - speed;
_xscale = scale;
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop('run');
} else {
this.gotoAndStop('jump');
this.jump.gotoAndStop('fall');
if (grav <= -1) {
this.jump.gotoAndStop(3);
}
if (grav == 0) {
this.jump.gotoAndStop(2);
}
if (grav > 0) {
this.jump.gotoAndStop(5);
}
}
}
}
} else {
if (_root.ground.hitTest(_x, _y + 3, true) && !Key.isDown(79) && action == false && !Key.isDown(73)) {
if (_root.attacking == false) {
if (_root.magic == false) {
this.gotoAndStop('idle');
}
}
}
if (!_root.ground.hitTest(_x, _y + 3, true) && !Key.isDown(79) && action == false && !Key.isDown(73)) {
if (_root.attacking == false) {
if (_root.magic == false) {
this.gotoAndStop('jump');
if (grav <= -3) {
this.jump.gotoAndStop(3);
}
if (grav <= -3) {
this.jump.gotoAndStop(3);
}
if (grav > -3 && grav <= 0) {
this.jump.gotoAndStop(2);
}
if (grav > 1) {
this.jump.gotoAndStop(5);
}
}
}
}
}
}
if (Key.isDown(87) && _root.ground.hitTest(_x, _y + 3, true)) {
grav = -jumpHeight;
++_root.loaditems;
_root.attachMovie('dust', 'dust' + _root.loaditems, _root.getNextHighestDepth());
_root.wings.start();
_root['dust' + _root.loaditems]._x = this._x;
_root['dust' + _root.loaditems]._y = this._y;
_y = _y - 4;
this.gotoAndStop('jump');
}
}
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
_x = _x - speed;
_x = _x - tmove;
_root.momentum = -1;
tmove = 0;
tporting = false;
_root.otheraction = false;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
_root.momentum = 0;
_x = _x + speed;
_x = _x - tmove;
_root.momentum = 1;
tmove = 0;
tporting = false;
_root.otheraction = false;
}
if (_root.ground.hitTest(_x, _y - _height - 15, true)) {
grav = 1;
}
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(74)) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.attacking == false) {
if (_root.otheraction == false) {
if (_root.mobility == true) {
if (_root.magic == false) {
if (_root.combono == 1) {
_root.player.gotoAndStop('attack1');
_root.combostart = true;
_root.attacking = true;
_root.setdamage = 1;
_root.setdistance = 10;
if (_xscale == scale) {
this._x -= 5;
}
if (_xscale == -scale) {
this._x += 5;
}
}
if (_root.combono == 2) {
_root.player.gotoAndStop('attack2');
_root.attacking = true;
_root.combotimer -= 10;
_root.setdistance = 10;
if (_xscale == scale) {
this._x -= 10;
}
if (_xscale == -scale) {
this._x += 10;
}
}
if (_root.combono == 3) {
_root.player.gotoAndStop('attack3');
_root.attacking = true;
_root.combotimer -= 10;
_root.setdistance = 10;
if (_xscale == scale) {
this._x -= 15;
}
if (_xscale == -scale) {
this._x += 15;
}
}
if (_root.combono == 4) {
_root.player.gotoAndStop('attack4');
_root.attacking = true;
_root.combotimer -= 15;
_root.setdistance = 10;
if (_xscale == scale) {
this._x -= 5;
}
if (_xscale == -scale) {
this._x += 5;
}
}
if (_root.combono == 5) {
_root.player.gotoAndStop('attack5');
_root.attacking = true;
_root.combotimer -= 10;
_root.setdamage = 2;
_root.setdistance = 10;
if (_xscale == scale) {
this._x -= 5;
}
if (_xscale == -scale) {
this._x += 5;
}
}
if (_root.combono == 6) {
_root.player.gotoAndStop('attack6');
_root.attacking = true;
_root.combotimer -= 10;
_root.setdamage = 3;
_root.setdistance = 10;
if (_xscale == scale) {
this._x -= 5;
}
if (_xscale == -scale) {
this._x += 5;
}
}
if (_root.combono == 7) {
_root.player.gotoAndStop('attack7');
_root.attacking = true;
_root.combotimer -= 10;
_root.setdamage = 4;
_root.setdistance = 10;
if (_xscale == scale) {
this._x -= 5;
}
if (_xscale == -scale) {
this._x += 5;
}
}
if (_root.combono == 8) {
_root.player.gotoAndStop('attack8');
_root.attacking = true;
_root.setdamage = 5;
_root.combotimer -= 10;
_root.setdistance = 20;
if (_xscale == scale) {
this._x -= 15;
}
if (_xscale == -scale) {
this._x += 25;
}
}
if (_root.combono == 9) {
_root.player.gotoAndStop('attack9');
_root.attacking = true;
_root.combotimer -= 10;
if (_xscale == scale) {
this._x -= 5;
}
if (_xscale == -scale) {
this._x += 5;
}
}
if (_root.combono == 10) {
_root.player.gotoAndStop('attack10');
_root.attacking = true;
_root.combotimer -= 10;
if (_xscale == scale) {
this._x -= 5;
}
if (_xscale == -scale) {
this._x += 5;
}
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(74)) {
if (_root.otheraction == false) {
if (_root.mobility == true) {
if (_root.ground.hitTest(_x, _y + 3, false)) {
if (_root.attacking == false) {
if (_root.magic == false) {
if (_root.combono == 1) {
_root.player.gotoAndStop('airattack1');
_root.combostart = true;
_root.attacking = true;
grav = 0;
}
if (_root.combono == 2) {
_root.player.gotoAndStop('airattack2');
_root.attacking = true;
grav = 0;
}
if (_root.combono == 3) {
_root.player.gotoAndStop('airattack3');
_root.attacking = true;
this._y += 20;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (_root.combono >= _root.combomax) {
_root.combono = 0;
_root.attacking = false;
}
}
onClipEvent (enterFrame) {
if (_root.combostart == false) {
_root.combono = 1;
_root.combotimer = 0;
}
}
onClipEvent (enterFrame) {
if (_root.combostart == true) {
++_root.combotimer;
}
if (_root.combotimer == 15) {
_root.combotimer = 0;
_root.combostart = false;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(73)) {
if (_root.magic == false) {
_root.selector.play();
_root.mobility = false;
_root.attacking = false;
}
}
}
onClipEvent (enterFrame) {
_root.juice += 0.05;
if (_root.juice > _root.maxjuice) {
_root.juice = _root.maxjuice;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(75)) {
if (_root.magicpower >= _root.setmage) {
if (_root.mobility == true && _root.otheraction == false) {
if (_root.attacking == false) {
if (_root.magic == false) {
if (_root.classi == 'tport') {
if (_root.tportactive == true) {
_root.magicpower -= _root.setmage - 15;
tport1();
}
} else {
_root.magic = true;
_root.magicpower -= _root.setmage;
gotoAndStop('magic');
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
++_root.magici;
if (_root.magici == _root.magiclim) {
_root.magici = 0;
_root.magicpower += 1;
}
}
onClipEvent (enterFrame) {
if (_root.attacking == false) {
_root.player.magic.gotoAndStop(1);
}
}
onClipEvent (enterFrame) {
if (_root.tportactive == false) {
++_root.timtim;
}
if (_root.timtim == 30) {
_root.timtim = 0;
_root.tportactive = true;
}
}
onClipEvent (enterFrame) {
if (_root.otheraction == false) {
if (_root.mobility == false) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop('idle');
} else {
if (_root.ground.hitTest(_x, _y + 3, false)) {
this.gotoAndStop('jump');
_root.player.jump.gotoAndStop('fall');
}
}
}
}
}
onClipEvent (enterFrame) {
if (_root.health <= 0) {
_root.mobility = false;
stopAllSounds();
this.gotoAndStop('death');
++dc;
if (dc == 40) {
_root.bardelete = true;
_root.deathcall();
dc = 0;
_root.gotoAndStop('death');
}
}
}
onClipEvent (enterFrame) {
if (_root.talktime <= 5) {
++_root.talktime;
_root.talkal = false;
} else {
_root.talkal = true;
}
}
onClipEvent (enterFrame) {
if (_root.classi == 'fire1' || _root.classi == 'fire2' || _root.classi == 'fire3') {
_root.fireclasses = true;
} else {
_root.firelcasses = false;
}
}
onClipEvent (enterFrame) {
if (_root.iceclass == 'ice1') {
_root.freezetime = 60;
}
if (_root.iceclass == 'ice2') {
_root.freezetime = 120;
}
if (_root.iceclass == 'ice3') {
_root.freezetime = 280;
}
}
}
instance of movieClip 1714 {
onClipEvent (enterFrame) {
if (_root.story != 1) {
this.unloadMovie();
}
}
}
instance of movieClip 1714 {
onClipEvent (enterFrame) {
if (_root.story != 3) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('sheephat2');
}
}
}
}
}
instance of movieClip 1714 {
onClipEvent (enterFrame) {
if (_root.story != 4) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('sheephat3');
}
}
}
}
}
movieClip 2085 {
}
movieClip 2090 {
}
movieClip 2092 {
}
movieClip 2128 {
frame 1 {
stop();
}
}
button 2131 {
on (press, keyPress 's') {
_root.talktime = 0;
_root.talkal = false;
_root.mobility = true;
_root.hud.gotoAndStop(1);
}
}
button 2133 {
on (press, keyPress 's') {
nextFrame();
}
}
movieClip 2144 {
frame 1 {
stop();
}
frame 1 {
faces.gotoAndStop('shop1');
stop();
}
frame 2 {
faces.gotoAndStop('lil_magick');
stop();
}
frame 3 {
faces.gotoAndStop('shop1');
}
frame 4 {
faces.gotoAndStop('lil_magic');
}
frame 5 {
faces.gotoAndStop('shop1');
}
frame 8 {
faces.gotoAndStop('lil_magic');
}
frame 9 {
faces.gotoAndStop('lil_magicwat');
}
frame 10 {
faces.gotoAndStop('shop1');
}
frame 11 {
faces.gotoAndStop('lil_magic');
}
}
button 2153 {
on (press, keyPress 's') {
_root.talktime = 0;
_root.talkal = false;
_root.mobility = true;
_root.story = 3;
_root.hud.gotoAndStop(1);
}
}
movieClip 2155 {
frame 1 {
faces.gotoAndStop('masterkai');
stop();
}
frame 2 {
faces.gotoAndStop('lil_magic');
}
frame 3 {
faces.gotoAndStop('masterkai');
}
frame 9 {
faces.gotoAndStop('lil_magic');
}
}
button 2156 {
on (press, keyPress 's') {
nextFrame();
}
}
button 2161 {
on (press, keyPress 's') {
_root.lostfound = true;
_root.mobility = true;
_root.hud.gotoAndStop(1);
}
}
movieClip 2163 {
frame 1 {
faces.gotoAndStop('lost&found');
stop();
}
}
button 2164 {
on (press, keyPress 's') {
_root.talktime = 0;
_root.mobility = true;
_root.hud.gotoAndStop(1);
}
}
movieClip 2166 {
frame 1 {
faces.gotoAndStop('eman0');
}
}
button 2170 {
on (press, keyPress 's') {
_root.mobility = true;
_root.hud.gotoAndStop(1);
}
}
movieClip 2172 {
frame 1 {
faces.gotoAndStop('postie');
stop();
}
frame 2 {
faces.gotoAndStop('lil_magic');
}
frame 3 {
faces.gotoAndStop('postie');
}
}
button 2179 {
on (press, keyPress 's') {
_root.talktime = 0;
_root.talkal = false;
_root.fadefunks = 'movie4';
_root.fade.play();
_root.hud.gotoAndStop(1);
}
}
movieClip 2181 {
frame 1 {
faces.gotoAndStop('eman');
stop();
}
frame 2 {
faces.gotoAndStop('lil_magicbuzz');
}
frame 3 {
faces.gotoAndStop('eman');
}
frame 4 {
faces.gotoAndStop('eman');
}
frame 5 {
faces.gotoAndStop('eman');
}
frame 6 {
faces.gotoAndStop('lil_magicwat');
}
frame 7 {
faces.gotoAndStop('eman');
}
}
button 2182 {
on (press, keyPress 's') {
_root.talktime = 0;
_root.talkal = false;
_root.mobility = true;
_root.hud.gotoAndStop(1);
}
}
button 2186 {
on (press, keyPress 's') {
_root.talktime = 0;
_root.mobility = true;
_root.hud.gotoAndStop(1);
}
}
movieClip 2197 {
frame 1 {
stop();
}
}
movieClip 2206 {
frame 1 {
stop();
}
frame 1 {
faces.gotoAndStop('eman');
}
frame 2 {
faces.gotoAndStop('lil_magicwat');
}
frame 3 {
faces.gotoAndStop('eman');
}
frame 5 {
faces.gotoAndStop('lil_magicbuzz');
}
frame 6 {
faces.gotoAndStop('eman');
}
frame 7 {
faces.gotoAndStop('lil_magick');
}
frame 8 {
faces.gotoAndStop('eman');
}
}
button 2207 {
on (press, keyPress 's') {
_root.talktime = 0;
_root.talkal = false;
_root.mobility = true;
_root.boss2.stun = false;
_root.hud.gotoAndStop(1);
}
}
movieClip 2212 {
frame 1 {
stop();
faces.gotoAndStop('postie');
}
frame 2 {
faces.gotoAndStop('lil_magick');
}
}
button 2218 {
on (press, keyPress 's') {
_root.talktime = 0;
_root.talkal = false;
_root.fadefunks = 'celebration2';
_root.fade.play();
_root.hud.gotoAndStop(1);
}
}
movieClip 2219 {
frame 1 {
stop();
faces.gotoAndStop('eman');
}
frame 2 {
faces.gotoAndStop('lil_magicbuzz');
}
frame 3 {
faces.gotoAndStop('eman');
}
}
button 2223 {
on (press, keyPress 's') {
_root.talktime = 0;
_root.talkal = false;
_root.fadefunks = 'movie9';
_root.fade.play();
_root.hud.gotoAndStop(1);
}
}
movieClip 2224 {
frame 1 {
stop();
faces.gotoAndStop('lil_magick');
}
frame 2 {
faces.gotoAndStop('eman');
}
frame 3 {
stop();
faces.gotoAndStop('lil_magick');
}
}
movieClip 2231 {
frame 1 {
stop();
}
}
movieClip 2232 {
frame 1 {
stop();
}
instance of movieClip 2085 {
onClipEvent (enterFrame) {
this._width = _root.magicmax + 3;
}
}
instance of movieClip 2085 {
onClipEvent (enterFrame) {
this._width = _root.healthmax + 3;
}
}
instance of movieClip 2090 {
onClipEvent (enterFrame) {
if (_root.magicpower >= _root.magicmax) {
_root.magicpower = _root.magicmax;
}
this._width = _root.magicpower;
}
}
instance of movieClip 2092 {
onClipEvent (enterFrame) {
if (_root.health >= _root.healthmax) {
_root.health = _root.healthmax;
}
this._width = _root.health;
}
}
instance of movieClip 753 MedalPopup {
onClipEvent (construct) {
alwaysOnTop = 'true';
}
}
frame 10 {
faces.gotoAndStop('glasses');
}
frame 11 {
faces.gotoAndStop('sheephat');
}
frame 12 {
faces.gotoAndStop('ghg');
}
frame 13 {
faces.gotoAndStop('fg');
}
frame 14 {
faces.gotoAndStop('cyclops');
}
frame 15 {
faces.gotoAndStop('sheephat');
}
frame 18 {
faces.gotoAndStop('eman');
}
frame 21 {
faces.gotoAndStop('boss2');
}
frame 22 {
faces.gotoAndStop('boss2b');
}
frame 24 {
faces.gotoAndStop('sheephat');
}
frame 25 {
faces.gotoAndStop('ghg');
}
frame 28 {
faces.gotoAndStop('aziel');
}
frame 29 {
faces.gotoAndStop('aziel');
}
}
instance hud of movieClip 2232 {
onClipEvent (enterFrame) {
_y = _root.cam._y;
_x = _root.cam._x;
story = _root.story;
}
onClipEvent (enterFrame) {
this.amount = _root.expt;
}
}
// unknown tag 88 length 140
movieClip 2242 {
}
movieClip 2244 {
frame 1 {
stop();
}
}
movieClip 2246 {
frame 1 {
stop();
}
}
movieClip 2248 {
frame 1 {
stop();
}
}
movieClip 2250 {
frame 1 {
stop();
}
}
movieClip 2251 {
frame 1 {
stop();
}
frame 8 {
_root.sl = true;
stop();
}
instance of movieClip 2242 {
onClipEvent (enterFrame) {
if (Key.isDown(73)) {
if (_root.firetrue == true) {
_root.classi = _root.fireclass;
_root.selector.play();
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(74)) {
if (_root.icetrue == true) {
_root.classi = _root.iceclass;
_root.selector.play();
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(75)) {
if (_root.tporttrue == true) {
_root.classi = _root.tportclass;
_root.selector.play();
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(76)) {
if (_root.lightningtrue == true) {
_root.classi = _root.lightningclass;
_root.selector.play();
}
}
}
}
instance of movieClip 2244 {
onClipEvent (enterFrame) {
if (_root.icetrue == true) {
this.gotoAndStop(2);
}
}
}
instance of movieClip 2246 {
onClipEvent (enterFrame) {
if (_root.firetrue == true) {
this.gotoAndStop(2);
}
}
}
instance of movieClip 2248 {
onClipEvent (enterFrame) {
if (_root.lightningtrue == true) {
this.gotoAndStop(2);
}
}
}
instance of movieClip 2250 {
onClipEvent (enterFrame) {
if (_root.tporttrue == true) {
this.gotoAndStop(2);
}
}
}
frame 15 {
_root.mobility = true;
_root.sl = false;
}
}
instance selector of movieClip 2251 {
onClipEvent (enterFrame) {
_x = _root.cam._x;
_y = _root.cam._y;
}
}
movieClip 2254 {
frame 1 {
function camControl() {
parentColor.setTransform(camColor.getTransform());
var v4 = sX / this._width;
var v3 = sY / this._height;
_parent._x = cX - this._x * v4;
_parent._y = cY - this._y * v3;
_parent._xscale = 100 * v4;
_parent._yscale = 100 * v3;
}
function resetStage() {
var v2 = {'ra': 100, 'rb': 0, 'ga': 100, 'gb': 0, 'ba': 100, 'bb': 0, 'aa': 100, 'ab': 0};
parentColor.setTransform(v2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
parentColor.setTransform(camColor.getTransform());
this._visible = false;
var oldMode = Stage.scaleMode;
Stage.scaleMode = 'exactFit';
var cX = Stage.width / 2;
var cY = Stage.height / 2;
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = resetStage;
stop();
}
frame 2 {
function camControl() {
parentColor.setTransform(camColor.getTransform());
var v4 = sX / this._width;
var v3 = sY / this._height;
_parent._x = cX - this._x * v4;
_parent._y = cY - this._y * v3;
_parent._xscale = 100 * v4;
_parent._yscale = 100 * v3;
}
function resetStage() {
var v2 = {'ra': 100, 'rb': 0, 'ga': 100, 'gb': 0, 'ba': 100, 'bb': 0, 'aa': 100, 'ab': 0};
parentColor.setTransform(v2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
parentColor.setTransform(camColor.getTransform());
this._visible = false;
var oldMode = Stage.scaleMode;
Stage.scaleMode = 'exactFit';
var cX = Stage.width / 2;
var cY = Stage.height / 2;
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = resetStage;
}
}
instance cam of movieClip 2254 {
onClipEvent (enterFrame) {
if (_root.azielcharge == true && _root.mobility == true) {
_x = _x + (_root.player._x - _x) / 4;
_y = _y + (_root.player._y - 600 - _y) / 4;
}
_x = _x + (_root.player._x - _x) / 4;
_y = _y + (_root.player._y - _y) / 4;
}
}
frame 319 {
_root.mobility = true;
_root.otheraction = true;
}
frame 319 {
_root.mobility = true;
_root.otheraction = false;
_root.barrelsdestroyed = false;
}
frame 319 {
background.gotoAndStop('tournie');
}
movieClip 2258 {
frame 1 {
stop();
}
}
instance of movieClip 2258 {
onClipEvent (load) {
if (_root.area2 == true) {
this.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.area2 == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,1';
}
}
}
}
}
instance of movieClip 2258 {
onClipEvent (load) {
if (_root.area3 == true) {
this.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.area3 == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3';
}
}
}
}
}
movieClip 2260 {
}
instance of movieClip 2260 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1';
}
}
}
}
movieClip 2265 {
frame 7 {
stop();
}
}
movieClip 2266 {
frame 8 {
stop();
}
}
movieClip 2267 {
frame 9 {
stop();
_root.electrobox.finishedthis1uh = true;
}
}
movieClip 2268 {
frame 1 {
stop();
}
}
movieClip 2281 {
}
movieClip 2284 {
}
movieClip 2287 {
}
movieClip 2290 {
frame 1 {
stop();
}
frame 10 {
stop();
}
}
instance electrobox of movieClip 2290 {
onClipEvent (load) {
sounder = false;
finishedthis1uh = false;
}
onClipEvent (enterFrame) {
if (finishedthis1uh == true) {
this.gotoAndStop('fineto');
}
}
onClipEvent (enterFrame) {
if (finishedthis1uh == false) {
if (_root.classi == 'lightning1') {
if (_root.magic == true) {
if (this.hitTest(_root.player)) {
gotoAndPlay(305);
this.powerthing.gotoAndStop(2);
}
}
}
if (_root.classi == 'lightning2') {
if (_root.magic == true) {
if (this.hitTest(_root.player)) {
gotoAndPlay(305);
this.powerthing.gotoAndStop(3);
}
}
}
if (_root.classi == 'lightning3') {
if (_root.magic == true) {
if (this.hitTest(_root.player)) {
gotoAndPlay(305);
_root.door1.play();
_root.door2.play();
if (sounder == false) {
_root.rockgrind.start();
sounder = true;
}
this.powerthing.gotoAndStop(4);
}
}
}
}
}
}
movieClip 2292 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
if (_root.talkal == true) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'city';
}
}
}
}
}
movieClip 2295 {
}
instance of movieClip 2295 {
onClipEvent (load) {
if (_root.crowdgather == true) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.crowdgather == false) {
_root.fade.play();
_root.fadefunks = 'firstfilm';
_root.mobility = false;
_root.crowdgather = true;
}
}
}
}
movieClip 2297 {
}
instance of movieClip 2297 {
onClipEvent (load) {
if (_root.story != 2) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.spoken == false) {
_root.mobility = false;
_root.hud.gotoAndStop('postman1');
_root.spoken = true;
}
}
}
}
instance of movieClip 2297 {
onClipEvent (load) {
if (_root.story != 4) {
this.unloadMovie();
}
if (_root.spoken2 == true) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.spoken2 == false) {
_root.mobility = false;
_root.hud.gotoAndStop('postman2');
_root.spoken2 = true;
}
}
}
}
movieClip 2299 {
}
instance of movieClip 2299 {
onClipEvent (enterFrame) {
if (_root.found12 != 'k') {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.found12 = 'found';
_root.mobility = false;
_root.itemobtain.gotoAndStop('face');
this.unloadMovie();
}
}
}
movieClip 2308 {
frame 1 {
stop();
}
frame 87 {
stop();
}
}
movieClip 2310 {
frame 1 {
stop();
}
frame 88 {
stop();
_root.rockgrind.stop('rockgrind');
}
}
instance door1 of movieClip 2310 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x -= _root.player.speed;
_root.player._x -= _root.player.tmove;
_root.player.tmove = 0;
_root.player.tporting = false;
_root.otheraction = false;
}
}
}
frame 320 {
_root.mobility = true;
stopAllSounds();
_root.lvl1music.start(0, 99);
_root.musictype = 1;
}
frame 320 {
background.gotoAndStop('outside1');
com.newgrounds.API.unlockMedal('Enter the tournament');
}
movieClip 2318 {
frame 1 {
stop();
}
frame 20 {
stop();
}
}
movieClip 2322 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'tournament1';
}
}
}
}
movieClip 2324 {
}
instance of movieClip 2324 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.blcoker.unloadMovie();
this.unloadMovie();
}
}
}
movieClip 2330 {
frame 1 {
stop();
}
frame 16 {
gotoAndPlay(5);
}
}
instance of movieClip 2330 {
onClipEvent (load) {
alreadydone = false;
}
onClipEvent (enterFrame) {
if (alreadydone == false) {
if (_root.magic == true) {
if (_root.classi == 'fire1') {
if (this.hitTest(_root.player)) {
play();
_root.ground1.play();
alreadydone = true;
_root.fadling.play();
}
}
}
}
}
onClipEvent (enterFrame) {
if (alreadydone == false) {
if (_root.magic == true) {
if (_root.classi == 'fire2') {
if (this.hitTest(_root.player)) {
play();
_root.ground1.play();
alreadydone = true;
_root.fadling.play();
}
}
}
}
}
onClipEvent (enterFrame) {
if (alreadydone == false) {
if (_root.magic == true) {
if (_root.classi == 'fire3') {
if (this.hitTest(_root.player)) {
play();
_root.fadling.play();
_root.ground1.play();
alreadydone = true;
}
}
}
}
}
}
movieClip 2333 {
frame 1 {
stop();
}
frame 20 {
stop();
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1,4';
}
}
}
}
movieClip 2343 {
frame 1 {
stop();
}
}
instance of movieClip 2343 {
onClipEvent (load) {
jumpstart = false;
jumpnum = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player.jumpHeight = 30;
if (Key.isDown(87)) {
this.play();
if (jumpstart == false) {
_root.boing.start();
jumpstart = true;
}
}
} else {
_root.player.jumpHeight = 20;
}
}
onClipEvent (enterFrame) {
if (jumpstart == true) {
++jumpnum;
if (jumpnum == 10) {
jumpnum = 0;
jumpstart = false;
}
}
}
}
movieClip 2360 {
}
movieClip 2368 {
}
movieClip 2377 {
}
movieClip 2382 {
}
movieClip 2393 {
frame 10 {
stop();
}
}
movieClip 2403 {
}
movieClip 2416 {
}
movieClip 2417 {
frame 1 {
stop();
}
frame 3 {
etack = true;
}
}
instance of movieClip 2417 {
onClipEvent (load) {
num = Math.round(Math.random() * 100);
}
onClipEvent (load) {
_root.attachMovie('ebar', 'ebar' + num, 30 + Math.floor(Math.random() * 10));
}
onClipEvent (enterFrame) {
_root['ebar' + num]._width = ehp * 6;
_root['ebar' + num]._x = this._x;
_root['ebar' + num]._y = this._y - 200;
if (death == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.bardelete == true) {
_root['ebar' + num].unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.mobility == false) {
if (frozen == false) {
if (death == false) {
this.gotoAndStop(1);
}
}
}
}
onClipEvent (load) {
var egrav = 0;
ex = 5;
frozen = false;
frozentimer = 0;
var scale = this._xscale;
var distance = 200;
edamage = 5;
radius = 5;
espeed = 4;
etack = false;
ehit = false;
takstart = false;
taktimer = 0;
cooldown = 0;
cooldownp = false;
currenthit = false;
ehittimer = false;
heebeijeeb = 0;
ehp = 15;
death = false;
deathcount = 0;
freezeover = false;
}
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (frozen == true) {
if (freezeover == false) {
gotoAndStop('frozen');
++frozentimer;
if (frozentimer > _root.freezetime) {
frozentimer = 0;
freezeover = true;
}
}
}
}
}
onClipEvent (enterFrame) {
if (freezeover == true) {
++frozentimer;
gotoAndStop('freezebreak');
if (frozentimer == 8) {
_root.glass_break.start(0.22, 1);
frozen = false;
freezeover = false;
frozentimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (ehp <= 0) {
death = true;
this.gotoAndStop('die');
}
}
onClipEvent (enterFrame) {
if (death == true) {
++deathcount;
}
if (deathcount == 1) {
_root.expplus(this._x, this._y, 50);
}
if (deathcount == 65) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (ehittimer == true) {
++heebeijeeb;
}
if (heebeijeeb == 10) {
heebeijeeb = 0;
ehittimer = false;
ehit = false;
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (etack == true) {
takstart = true;
}
}
onClipEvent (enterFrame) {
if (takstart == true) {
++taktimer;
}
if (taktimer == 20) {
taktimer = 0;
takstart = false;
etack = false;
cooldownp = true;
}
}
onClipEvent (enterFrame) {
if (cooldownp == true) {
++cooldown;
}
if (cooldown == 20) {
cooldown = 0;
cooldownp = false;
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (frozen == false) {
if (this.hitTest(_root.player)) {
if (_root.magic == true) {
if (_root.classi == 'fire1' || 'lightning1') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.01;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire2' || 'lightning2') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.03;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire3' || 'lightning3') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
ehp -= 0.5;
heebiejeeb = 0;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
this.gotoAndStop('frozen');
_root.freeze.start(0, 1);
frozen = true;
if (_root.direc == 'left') {
this._x -= 50;
}
if (_root.direc == 'right') {
this._x += 50;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (this.hitTest(_root.player)) {
if (_root.attacking == true) {
if (ehit == false) {
ehp -= _root.setdamage;
_root.mypunch_hit.start(0, 1);
ehit = true;
ehittimer = true;
heebiejeeb = 0;
if (frozen == false) {
this.gotoAndStop('hit');
if (_root.direc == 'left') {
this._x -= _root.setdistance;
}
if (_root.direc == 'right') {
this._x += _root.setdistance;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false) {
if (cooldownp == false) {
if (_root.mobility == true) {
if (ehit == false) {
if (this.hitTest(_root.player)) {
etack = true;
_root.magic = false;
_root.attacking = false;
this.gotoAndStop('attack');
if (_root.painallowed == true) {
_root.mypunch_hit.start();
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 5;
if (this._x > _root.player._x) {
_root.player._x -= 10;
}
if (this._x < _root.player._x) {
_root.player._x += 10;
}
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance) {
this.gotoAndStop(2);
this._x -= espeed;
this._xscale = -scale;
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance) {
this.gotoAndStop(2);
this._x += espeed;
this._xscale = scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
movieClip 2420 {
}
instance of movieClip 2420 {
onClipEvent (enterFrame) {
if (_root.found3 != 'k') {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.found3 = 'found';
_root.mobility = false;
_root.itemobtain.gotoAndStop('petcactus');
this.unloadMovie();
}
}
}
movieClip 2422 {
}
instance of movieClip 2422 {
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('sign1');
}
}
}
}
}
instance of movieClip 2417 {
onClipEvent (load) {
num = Math.round(Math.random() * 100);
}
onClipEvent (load) {
_root.attachMovie('ebar', 'ebar' + num, 30 + Math.floor(Math.random() * 10));
}
onClipEvent (enterFrame) {
_root['ebar' + num]._width = ehp * 6;
_root['ebar' + num]._x = this._x;
_root['ebar' + num]._y = this._y - 200;
if (death == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.bardelete == true) {
_root['ebar' + num].unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.mobility == false) {
if (frozen == false) {
if (death == false) {
this.gotoAndStop(1);
}
}
}
}
onClipEvent (load) {
var egrav = 0;
ex = 5;
frozen = false;
frozentimer = 0;
var scale = this._xscale;
var distance = 200;
edamage = 5;
radius = 5;
espeed = 4;
etack = false;
ehit = false;
takstart = false;
taktimer = 0;
cooldown = 0;
cooldownp = false;
currenthit = false;
ehittimer = false;
heebeijeeb = 0;
ehp = 15;
death = false;
deathcount = 0;
freezeover = false;
}
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (frozen == true) {
if (freezeover == false) {
gotoAndStop('frozen');
++frozentimer;
if (frozentimer > _root.freezetime) {
frozentimer = 0;
freezeover = true;
}
}
}
}
}
onClipEvent (enterFrame) {
if (freezeover == true) {
++frozentimer;
gotoAndStop('freezebreak');
if (frozentimer == 8) {
_root.glass_break.start(0.22, 1);
frozen = false;
freezeover = false;
frozentimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (ehp <= 0) {
death = true;
this.gotoAndStop('die');
}
}
onClipEvent (enterFrame) {
if (death == true) {
++deathcount;
}
if (deathcount == 1) {
_root.expplus(this._x, this._y, 50);
}
if (deathcount == 65) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (ehittimer == true) {
++heebeijeeb;
}
if (heebeijeeb == 10) {
heebeijeeb = 0;
ehittimer = false;
ehit = false;
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (etack == true) {
takstart = true;
}
}
onClipEvent (enterFrame) {
if (takstart == true) {
++taktimer;
}
if (taktimer == 20) {
taktimer = 0;
takstart = false;
etack = false;
cooldownp = true;
}
}
onClipEvent (enterFrame) {
if (cooldownp == true) {
++cooldown;
}
if (cooldown == 20) {
cooldown = 0;
cooldownp = false;
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (frozen == false) {
if (this.hitTest(_root.player)) {
if (_root.magic == true) {
if (_root.classi == 'fire1' || 'lightning1') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.01;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire2' || 'lightning2') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.03;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire3' || 'lightning3') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
ehp -= 0.5;
heebiejeeb = 0;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
this.gotoAndStop('frozen');
_root.freeze.start(0, 1);
frozen = true;
if (_root.direc == 'left') {
this._x -= 50;
}
if (_root.direc == 'right') {
this._x += 50;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (this.hitTest(_root.player)) {
if (_root.attacking == true) {
if (ehit == false) {
ehp -= _root.setdamage;
_root.mypunch_hit.start(0, 1);
ehit = true;
ehittimer = true;
heebiejeeb = 0;
if (frozen == false) {
this.gotoAndStop('hit');
if (_root.direc == 'left') {
this._x -= _root.setdistance;
}
if (_root.direc == 'right') {
this._x += _root.setdistance;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false) {
if (cooldownp == false) {
if (_root.mobility == true) {
if (ehit == false) {
if (this.hitTest(_root.player)) {
etack = true;
_root.magic = false;
_root.attacking = false;
this.gotoAndStop('attack');
if (_root.painallowed == true) {
_root.mypunch_hit.start();
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 5;
if (this._x > _root.player._x) {
_root.player._x -= 10;
}
if (this._x < _root.player._x) {
_root.player._x += 10;
}
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance) {
this.gotoAndStop(2);
this._x -= espeed;
this._xscale = -scale;
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance) {
this.gotoAndStop(2);
this._x += espeed;
this._xscale = scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
instance of movieClip 2417 {
onClipEvent (load) {
num = Math.round(Math.random() * 100);
}
onClipEvent (load) {
_root.attachMovie('ebar', 'ebar' + num, 30 + Math.floor(Math.random() * 10));
}
onClipEvent (enterFrame) {
_root['ebar' + num]._width = ehp * 6;
_root['ebar' + num]._x = this._x;
_root['ebar' + num]._y = this._y - 200;
if (death == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.bardelete == true) {
_root['ebar' + num].unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.mobility == false) {
if (frozen == false) {
if (death == false) {
this.gotoAndStop(1);
}
}
}
}
onClipEvent (load) {
var egrav = 0;
ex = 5;
frozen = false;
frozentimer = 0;
var scale = this._xscale;
var distance = 200;
edamage = 5;
radius = 5;
espeed = 4;
etack = false;
ehit = false;
takstart = false;
taktimer = 0;
cooldown = 0;
cooldownp = false;
currenthit = false;
ehittimer = false;
heebeijeeb = 0;
ehp = 15;
death = false;
deathcount = 0;
freezeover = false;
}
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (frozen == true) {
if (freezeover == false) {
gotoAndStop('frozen');
++frozentimer;
if (frozentimer > _root.freezetime) {
frozentimer = 0;
freezeover = true;
}
}
}
}
}
onClipEvent (enterFrame) {
if (freezeover == true) {
++frozentimer;
gotoAndStop('freezebreak');
if (frozentimer == 8) {
_root.glass_break.start(0.22, 1);
frozen = false;
freezeover = false;
frozentimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (ehp <= 0) {
death = true;
this.gotoAndStop('die');
}
}
onClipEvent (enterFrame) {
if (death == true) {
++deathcount;
}
if (deathcount == 1) {
_root.expplus(this._x, this._y, 50);
}
if (deathcount == 65) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (ehittimer == true) {
++heebeijeeb;
}
if (heebeijeeb == 10) {
heebeijeeb = 0;
ehittimer = false;
ehit = false;
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (etack == true) {
takstart = true;
}
}
onClipEvent (enterFrame) {
if (takstart == true) {
++taktimer;
}
if (taktimer == 20) {
taktimer = 0;
takstart = false;
etack = false;
cooldownp = true;
}
}
onClipEvent (enterFrame) {
if (cooldownp == true) {
++cooldown;
}
if (cooldown == 20) {
cooldown = 0;
cooldownp = false;
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (frozen == false) {
if (this.hitTest(_root.player)) {
if (_root.magic == true) {
if (_root.classi == 'fire1' || 'lightning1') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.01;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire2' || 'lightning2') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.03;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire3' || 'lightning3') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
ehp -= 0.5;
heebiejeeb = 0;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
this.gotoAndStop('frozen');
_root.freeze.start(0, 1);
frozen = true;
if (_root.direc == 'left') {
this._x -= 50;
}
if (_root.direc == 'right') {
this._x += 50;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (this.hitTest(_root.player)) {
if (_root.attacking == true) {
if (ehit == false) {
ehp -= _root.setdamage;
_root.mypunch_hit.start(0, 1);
ehit = true;
ehittimer = true;
heebiejeeb = 0;
if (frozen == false) {
this.gotoAndStop('hit');
if (_root.direc == 'left') {
this._x -= _root.setdistance;
}
if (_root.direc == 'right') {
this._x += _root.setdistance;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false) {
if (cooldownp == false) {
if (_root.mobility == true) {
if (ehit == false) {
if (this.hitTest(_root.player)) {
etack = true;
_root.magic = false;
_root.attacking = false;
this.gotoAndStop('attack');
if (_root.painallowed == true) {
_root.mypunch_hit.start();
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 5;
if (this._x > _root.player._x) {
_root.player._x -= 10;
}
if (this._x < _root.player._x) {
_root.player._x += 10;
}
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance) {
this.gotoAndStop(2);
this._x -= espeed;
this._xscale = -scale;
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance) {
this.gotoAndStop(2);
this._x += espeed;
this._xscale = scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
movieClip 2425 {
}
instance of movieClip 2425 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.magic == true) {
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
_root.liquid.play();
this.unloadMovie();
}
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x -= _root.player.speed;
_root.momentum = 0;
_root.player.tmove = 0;
}
}
}
frame 321 {
if (_root.firstboss == false) {
_root.magicbarrier.unloadMovie();
}
}
frame 321 {
thisfactor = _root.player.grav;
_root.musictype = 2;
}
frame 321 {
background.gotoAndStop('outside1');
_root.sethie.unloadMovie();
}
movieClip 2428 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1,8b';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1,3';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'tournament1';
}
}
}
}
movieClip 2430 {
}
instance of movieClip 2430 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player.grav = -10;
_root.player._x = -306.1;
_root.player._y = 150;
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 20;
}
}
}
movieClip 2437 {
}
instance magicbarrier of movieClip 2437 {
onClipEvent (load) {
if (_root.movie3 == true) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x -= _root.player.speed;
_root.momentum = 0;
_root.player.tmove = 0;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.talkal == true) {
_root.mobility = false;
_root.hud.gotoAndStop('mbarrier1');
}
}
}
}
movieClip 2451 {
frame 12 {
stop();
}
}
movieClip 2464 {
}
movieClip 2465 {
frame 1 {
stop();
}
}
instance of movieClip 2465 {
onClipEvent (load) {
ilr = 280;
ill = -376;
frozen = false;
frozentimer = 0;
var scale = this._xscale;
var distance = 300;
espeed = 3;
etack = false;
ehit = false;
death = false;
freezeover = false;
touchingit = true;
didmunch = false;
timer = 0;
timer2 = 0;
touched = false;
justwait = false;
timer3 = 0;
readytospit = false;
finalwait = false;
timer4 = 0;
variable1 = false;
}
onClipEvent (enterFrame) {
if (variable1 == false) {
if (_root.player.hitTest(_x, _y, true)) {
touched = true;
timer = 0;
}
}
}
onClipEvent (enterFrame) {
if (touched == true) {
++timer;
if (timer == 10) {
timer = 0;
this.gotoAndStop('munch');
justwait = true;
variable1 = true;
touched = false;
}
}
}
onClipEvent (enterFrame) {
if (justwait == true) {
didmunch = true;
_root.player._x = tx;
_root.player._y = this._y;
_root.munch = true;
_root.otheraction = true;
_root.player.gotoAndStop('munched');
justwait = true;
}
}
onClipEvent (enterFrame) {
if (didmunch == true) {
++timer2;
if (timer2 == 30) {
this.gotoAndStop('spit');
justwait = false;
readytospit = true;
didmunch = false;
}
}
}
onClipEvent (enterFrame) {
if (readytospit == true) {
++timer3;
_root.player.grav -= 2.5;
_root.airhit = true;
if (timer3 == 14) {
this.gotoAndStop(1);
_root.health -= 20;
finalwait = true;
readytospit = false;
}
}
}
onClipEvent (enterFrame) {
if (finalwait == true) {
++timer4;
timer = 0;
timer2 = 0;
timer3 = 0;
if (timer4 == 120) {
timer4 = 0;
finalwait = false;
variable1 = false;
}
}
}
onClipEvent (enterFrame) {
if (finalwait == false) {
if (readytospit == false) {
if (justwait == false) {
if (touched == false) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx && tx > ill) {
if (tx - sx < distance) {
this.gotoAndStop(1);
this._x -= espeed;
this._xscale = -scale;
}
} else {
if (sx > tx && tx < ilr) {
if (sx - tx < distance) {
this.gotoAndStop(1);
this._x += espeed;
this._xscale = scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
}
frame 322 {
function pushdust() {
++_root.loaditems;
attachMovie('dust', 'dust' + _root.loaditems, _root.getNextHighestDepth());
_root['dust' + _root.loaditems]._x = _root.plant1._x;
_root['dust' + _root.loaditems]._y = _root.plant1._y;
}
_root.mobility = true;
if (movie3 == true) {
_root.player._x = 1822;
_root.player._y = 515;
}
}
frame 322 {
otheraction = false;
_root.musictype = 0;
if (_root.movie2 == true && _root.movie3 == false) {
_root.sethbuild.start();
_root.sethbuild.onSoundComplete = function () {
_root.boss1main.start(0, 99);
};
}
}
frame 322 {
background.gotoAndStop('outside1');
_root.otheraction = false;
}
instance of movieClip 2258 {
onClipEvent (load) {
if (_root.movie3 == true) {
this.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.movie3 == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1,2c';
}
}
}
}
}
movieClip 2469 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1,2c';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.lvl1music.stop();
}
}
}
instance of movieClip 2430 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player.grav = -10;
_root.player._x = -1195.7;
_root.player._y = -46.9;
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 20;
}
}
}
instance of movieClip 2343 {
onClipEvent (load) {
jumpstart = false;
jumpnum = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player.jumpHeight = 30;
if (Key.isDown(87)) {
this.play();
if (jumpstart == false) {
_root.boing.start();
jumpstart = true;
}
}
} else {
_root.player.jumpHeight = 20;
}
}
onClipEvent (enterFrame) {
if (jumpstart == true) {
++jumpnum;
if (jumpnum == 10) {
jumpnum = 0;
jumpstart = false;
}
}
}
}
movieClip 2472 {
}
instance of movieClip 2472 {
onClipEvent (load) {
if (_root.movie2 == true) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.movie2 == false) {
_root.fade.play();
_root.fadefunks = 'movie2';
_root.mobility = false;
_root.movie2 = true;
_root.sethie.unloadMovie();
}
}
}
}
instance seth of movieClip 487 seth {
onClipEvent (load) {
if (_root.movie3 == true) {
this.unloadMovie();
_root.sethhealth.unloadMovie();
}
if (_root.movie2 == true) {
_root.player._x = 1822;
_root.player._y = 515;
_root.sethie.unloadMovie();
}
if (_root.movie2 == false) {
_root.attachMovie('seth', 'sethie', 7);
_root.sethie._x = this._x;
_root.sethie._y = this._y;
_root.sethie.gotoAndStop(1);
this.unloadMovie();
_root.sethhealth.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.mobility == false) {
this.gotoAndStop(1);
}
}
onClipEvent (enterFrame) {
_root.sethhealth._x = _root.cam._x;
_root.sethhealth._y = _root.cam._y;
if (sethhp > 100) {
_root.sethhealth.head.gotoAndStop(1);
}
if (sethhp < 99 && sethhp > 11) {
_root.sethhealth.head.gotoAndStop(2);
}
if (sethhp < 10) {
_root.sethhealth.head.gotoAndStop(3);
}
_root.sethhealth.bar._width = this.sethhp * 2;
}
onClipEvent (load) {
_xscale = scale;
sethhp = 150;
espeed = 7;
distance = 200;
sethattack = false;
sethhit = false;
var scale = this._xscale;
distance = 1000;
egrav = 0;
emp = 75;
empmax = 75;
recharge = false;
rechargetimer = 250;
alternatinghit = 1;
ehit = false;
etak = false;
etaktimer = 0;
direc = left;
rechargetimer = 0;
rechargecount = 0;
pushing = false;
pushtimer = 0;
pushcharge = false;
pushpush = 0;
hitnumber = 1;
althit = 1;
ehitcount = 0;
damage = true;
dtimer = 0;
frozen = false;
ftimer = 0;
guage1 = false;
guage2 = false;
guage3 = false;
retimer = 0;
suprecharge = false;
death = false;
}
onClipEvent (enterFrame) {
if (emp < empmax) {
emp += 0.3;
} else {
if (emp > empmax) {
emp = empmax;
}
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (etak == false && ehit == false && pushing == false && frozen == false && suprecharge == false) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance) {
this.gotoAndStop(2);
this._x -= espeed;
this._xscale = scale;
_root.sethdirec = 'left';
_root.cam.gotoAndStop(1);
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance) {
this.gotoAndStop(2);
this._x += espeed;
this._xscale = -scale;
_root.sethdirec = 'right';
_root.cam.gotoAndStop(1);
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
onClipEvent (enterFrame) {
_root.emp = this.emp;
_root.pushing = pushing;
_root.etak = etak;
_root.hit = this.alternatinghit;
_root.charge = this.recharge;
}
onClipEvent (enterFrame) {
if (recharge == true) {
++rechargetimer;
if (rechargetimer == 100) {
rechargetimer = 0;
recharge = false;
}
}
}
onClipEvent (enterFrame) {
_root.pushing = this.pushing;
if (pushing == true) {
++pushtimer;
if (pushtimer == 19) {
pushtimer = 0;
pushing = false;
}
}
}
onClipEvent (enterFrame) {
if (pushcharge == true) {
++pushpush;
if (pushpush == 12) {
_root.attachMovie('push1', 'plant1', 12());
_root.plant1._x = _root.seth._x;
_root.plant1._y = _root.seth._y;
pushcharge = false;
pushpush = 0;
if (_root.sethdirec == 'left') {
_root.plant1._xscale = scale;
}
if (_root.sethdirec == 'right') {
_root.plant1._xscale = -scale;
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (tx - sx > 250 || sx - tx > 250) {
if (ehit == false && etak == false && pushing == false && recharge == false && frozen == false && suprecharge == false) {
if (this.emp >= 25) {
if (alternatinghit == 1) {
pushing = true;
pushcharge = true;
this.gotoAndStop('push1');
etak = false;
emp -= 25;
recharge = true;
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (_root.plant1.touched == false) {
if (_root.plant1.hitTest(_root.player)) {
if (_root.magic == false) {
_root.momentum = 0;
_root.otheraction = true;
_root.airhit = true;
_root.health -= 20;
_root.player.grav -= 1;
_root.plant1.touched = true;
_root.plant1.gotoAndPlay('unload');
if (_root.sethdirec == 'left') {
_root.momentum = -20;
}
if (_root.sethdirec == 'right') {
_root.momentum = 20;
}
}
if (_root.magic == true) {
_root.plant1.touched = true;
_root.plant1.gotoAndPlay('unload');
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (this.hitTest(_root.player)) {
if (suprecharge == true && ehit == false && _root.attacking == true) {
sethhp -= 1;
}
if (_root.attacking == true && ehit == false && frozen == false && suprecharge == false) {
if (this._x < _root.player._x) {
this._x -= 12;
}
if (this._x > _root.player._x) {
this._x += 12;
}
etak = false;
if (althit == 1) {
_root.mypunch_hit.start(0, 1);
ehit = true;
this.gotoAndStop('hitz1');
sethhp -= 3;
althit = 2;
} else {
if (althit == 2) {
_root.mypunch_hit.start(0, 1);
ehit = true;
this.gotoAndStop('hitz2');
sethhp -= 3;
althit = 3;
} else {
if (althit == 3) {
_root.mypunch_hit.start(0, 1);
ehit = true;
this.gotoAndStop('hitz3');
sethhp -= 3;
althit = 1;
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (ehit == true) {
++ehitcount;
if (ehitcount == 14) {
ehit = false;
ehitcount = 0;
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (this.hitTest(_root.player) && _root.painallowed == true && ehit == false && etak == true && _root.otheraction == false && damage == true && frozen == false && _root.magic == false) {
_root.otheraction = true;
_root.player.gotoAndStop('hited');
damage = false;
_root.health -= 6;
cooldownp = true;
if (this._x > _root.player._x) {
_root.player._x -= 4;
}
if (this._x < _root.player._x) {
_root.player._x += 4;
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (this.hitTest(_root.player)) {
if (ehit == false && etak == false && recharge == false && pushing == false && frozen == false && damage == true && suprecharge == false) {
if (hitnumber == 1) {
gotoAndStop('hit1');
hitnumber = 2;
etak = true;
} else {
if (hitnumber == 2) {
gotoAndStop('hit2');
hitnumber = 1;
etak = true;
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (etak == true) {
++etaktimer;
if (etaktimer == 10) {
etaktimer = 0;
etak = false;
}
}
}
onClipEvent (enterFrame) {
if (damage == false) {
++dtimer;
if (dtimer == 15) {
damage = true;
dtimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (this.hitTest(_root.player) && _root.magic == true && recharge == false && suprecharge == false) {
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
frozen = true;
_root.freeze.start(0, 1);
this.gotoAndStop('icebreak');
etak = false;
ehit = false;
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == true) {
++ftimer;
if (ftimer == 22) {
_root.glass_break.start();
}
if (ftimer == 28) {
ftimer = 0;
frozen = false;
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (this.hitTest(_root.player)) {
if (suprecharge == true && _root.magic == true) {
sethhp -= 0.3;
}
if (_root.magic == true && recharge == false && suprecharge == false) {
if (_root.classi == 'fire1' || _root.classi == 'fire2' || _root.classi == 'fire3') {
sethhp -= 0.2;
ehit = true;
gotoAndStop('hitz1');
if (this._x < _root.player._x) {
this._x -= 2;
}
if (this._x > _root.player._x) {
this._x += 2;
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (this.hitTest(_root.player)) {
if (_root.magic == true && recharge == false && suprecharge == false) {
if (_root.classi == 'lightning1' || _root.classi == 'lightning2' || _root.classi == 'lightning3') {
sethhp -= 1;
ehit = true;
gotoAndStop('hitz2');
if (this._x < _root.player._x) {
this._x -= 2;
}
if (this._x > _root.player._x) {
this._x += 2;
}
}
} else {
if (_root.magic == true && suprecharge == true) {
sethhp -= 2;
}
}
}
}
}
onClipEvent (enterFrame) {
if (guage1 == false && sethhp <= 100) {
suprecharge = true;
etak = false;
ehit = false;
gotoAndStop('charge');
guage1 = true;
}
}
onClipEvent (enterFrame) {
if (guage2 == false && sethhp <= 50) {
suprecharge = true;
etak = false;
ehit = false;
gotoAndStop('charge');
guage2 = true;
}
}
onClipEvent (enterFrame) {
if (guage3 == false && sethhp <= 10) {
suprecharge = true;
etak = false;
ehit = false;
gotoAndStop('charge');
guage3 = true;
}
}
onClipEvent (enterFrame) {
if (suprecharge == true && _root.mobility == true) {
++retimer;
if (retimer == 45) {
_root.attachMovie('energyblast', 'energyblast', 23);
_root.energyblast._x = this._x;
_root.energyblast._y = this._y - 10;
emp -= 75;
}
if (retimer == 55) {
retimer = 0;
suprecharge = false;
}
}
}
onClipEvent (enterFrame) {
if (_root.energyblast.hitTest(_root.player)) {
if (_root.energyblast.hitted == false && _root.painallowed == true) {
_root.health -= 50;
_root.otheraction = true;
_root.airhit = true;
_root.energyblast.hitted = true;
if (_root.energyblast._x > _root.player._x) {
_root.momentum = -20;
}
if (_root.energyblast._x < _root.player._x) {
_root.momentum = 20;
}
}
}
}
onClipEvent (enterFrame) {
if (sethhp < 0) {
death = true;
gotoAndStop('death');
_root.gotoAndStop('movie3');
}
}
}
instance sethhealth of movieClip 367 sethbar {
onClipEvent (load) {
if (_root.movie2 == false) {
this.unloadMovie();
}
if (_root.movie3 == true) {
this.unloadMovie();
}
}
}
frame 323 {
background.gotoAndStop('inside1');
}
movieClip 2476 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1,2b';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1,5';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1,4b';
}
}
}
}
frame 324 {
background.gotoAndStop('outside1');
}
movieClip 2482 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1,4.2';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1,6';
}
}
}
}
movieClip 2505 {
frame 1 {
stop();
}
frame 2 {
_root.wall.play();
}
frame 20 {
this.unloadMovie();
}
}
movieClip 2516 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 11 {
_root.barrelsdestroyed = true;
this.unloadMovie();
}
}
instance wall of movieClip 2516 {
onClipEvent (enterFrame) {
if (_root.barrelsdestroyed == true) {
_root.no1.unloadMovie();
_root.no2.unloadMovie();
_root.no3.unloadMovie();
_root.rope1.gotoAndStop('end');
_root.rope2.gotoAndStop('end');
_root.rope3.gotoAndStop('end');
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x -= _root.player.speed;
}
}
}
movieClip 2530 {
}
movieClip 2536 {
frame 1 {
stop();
}
frame 2 {
_root.fuse2.start(0, 100);
}
frame 259 {
_root.no3.play();
_root.fuse2.stop('fuse');
this.unloadMovie();
}
}
movieClip 2538 {
}
instance of movieClip 2538 {
onClipEvent (load) {
alreadydoneg = false;
}
onClipEvent (enterFrame) {
if (alreadydoneg == false) {
if (_root.magic == true) {
if (_root.classi == 'fire1') {
if (this.hitTest(_root.player)) {
play();
_root.rope3.play();
alreadydoneg = true;
_root.fadling.play();
}
}
}
}
}
onClipEvent (enterFrame) {
if (alreadydoneg == false) {
if (_root.magic == true) {
if (_root.classi == 'fire2') {
if (this.hitTest(_root.player)) {
play();
_root.rope3.play();
alreadydoneg = true;
_root.fadling.play();
}
}
}
}
}
onClipEvent (enterFrame) {
if (alreadydoneg == false) {
if (_root.magic == true) {
if (_root.classi == 'fire3') {
if (this.hitTest(_root.player)) {
play();
_root.fadling.play();
_root.rope3.play();
alreadydoneg = true;
}
}
}
}
}
}
movieClip 2541 {
frame 1 {
stop();
}
frame 2 {
_root.fuse1.start(0, 5);
}
frame 270 {
_root.no2.play();
_root.fuse1.stop('fuse');
this.unloadMovie();
}
}
instance of movieClip 2538 {
onClipEvent (load) {
alreadydonegd = false;
}
onClipEvent (enterFrame) {
if (alreadydonegd == false) {
if (_root.magic == true) {
if (_root.classi == 'fire1') {
if (this.hitTest(_root.player)) {
play();
_root.rope2.play();
alreadydonegd = true;
_root.fadling.play();
}
}
}
}
}
onClipEvent (enterFrame) {
if (alreadydonegd == false) {
if (_root.magic == true) {
if (_root.classi == 'fire2') {
if (this.hitTest(_root.player)) {
play();
_root.rope2.play();
alreadydonegd = true;
_root.fadling.play();
}
}
}
}
}
onClipEvent (enterFrame) {
if (alreadydonegd == false) {
if (_root.magic == true) {
if (_root.classi == 'fire3') {
if (this.hitTest(_root.player)) {
play();
_root.fadling.play();
_root.rope2.play();
alreadydonegd = true;
}
}
}
}
}
}
movieClip 2550 {
frame 1 {
stop();
}
frame 2 {
_root.fuse3.start(0, 1);
}
frame 110 {
_root.no1.play();
_root.fuse3.stop('fuse');
this.unloadMovie();
}
}
instance of movieClip 2538 {
onClipEvent (load) {
rope1df = false;
}
onClipEvent (enterFrame) {
if (_root.magic == true) {
if (_root.classi == 'fire1') {
if (this.hitTest(_root.player)) {
_root.rope1.play();
this.unloadMovie();
}
}
}
}
onClipEvent (enterFrame) {
if (_root.magic == true) {
if (_root.classi == 'fire2') {
if (this.hitTest(_root.player)) {
_root.rope1.play();
this.unloadMovie();
}
}
}
}
onClipEvent (enterFrame) {
if (_root.magic == true) {
if (_root.classi == 'fire3') {
if (this.hitTest(_root.player)) {
_root.rope1.play();
this.unloadMovie();
}
}
}
}
}
movieClip 2553 {
frame 1 {
stop();
}
}
instance of movieClip 2553 {
onClipEvent (load) {
timer = 0;
touched = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
play();
touched = true;
_root.magicpower += 100;
}
}
onClipEvent (enterFrame) {
if (touched == true) {
++timer;
if (timer == 8) {
this.unloadMovie();
}
}
}
}
movieClip 2561 {
}
movieClip 2572 {
}
movieClip 2579 {
}
movieClip 2604 {
}
movieClip 2637 {
}
movieClip 2651 {
frame 12 {
stop();
}
}
movieClip 2661 {
}
movieClip 2662 {
}
instance of movieClip 2662 {
onClipEvent (load) {
num = Math.round(Math.random() * 100);
}
onClipEvent (load) {
_root.attachMovie('ebar', 'ebar' + num, 30 + Math.floor(Math.random() * 10));
}
onClipEvent (enterFrame) {
_root['ebar' + num]._width = ehp * 3;
_root['ebar' + num]._x = this._x;
_root['ebar' + num]._y = this._y - 200;
if (death == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.bardelete == true) {
_root['ebar' + num].unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.mobility == false) {
if (frozen == false) {
this.gotoAndStop(1);
}
}
}
onClipEvent (load) {
var egrav = 0;
ex = 5;
frozen = false;
frozentimer = 0;
var scale = this._xscale;
var distance = 300;
edamage = 7;
radius = 5;
espeed = 2;
etack = false;
ehit = false;
takstart = false;
taktimer = 0;
cooldown = 0;
cooldownp = false;
currenthit = false;
ehittimer = false;
heebeijeeb = 0;
ehp = 30;
death = false;
deathcount = 0;
freezeover = false;
electrodeath = false;
}
onClipEvent (enterFrame) {
if (frozen == true) {
if (freezeover == false) {
gotoAndStop('frozen');
++frozentimer;
if (frozentimer > _root.freezetime) {
frozentimer = 0;
freezeover = true;
}
}
}
}
onClipEvent (enterFrame) {
if (freezeover == true) {
++frozentimer;
gotoAndStop('freezebreak');
if (frozentimer == 8) {
_root.glass_break.start(0.22, 1);
frozen = false;
freezeover = false;
frozentimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (ehp <= 0) {
death = true;
if (electrodeath == false) {
this.gotoAndStop('die');
} else {
if (electrodeath == true) {
this.gotoAndStop('electrodeath');
}
}
}
}
onClipEvent (enterFrame) {
if (death == true) {
++deathcount;
}
if (deathcount == 1) {
_root.powerdown.start();
}
if (deathcount == 65) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (ehittimer == true) {
++heebeijeeb;
}
if (heebeijeeb == 8) {
heebeijeeb = 0;
ehittimer = false;
ehit = false;
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 10, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (etack == true) {
takstart = true;
}
}
onClipEvent (enterFrame) {
if (takstart == true) {
++taktimer;
}
if (taktimer == 20) {
taktimer = 0;
takstart = false;
etack = false;
cooldownp = true;
}
}
onClipEvent (enterFrame) {
if (cooldownp == true) {
++cooldown;
}
if (cooldown == 20) {
cooldown = 0;
cooldownp = false;
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (frozen == false) {
if (this.hitTest(_root.player)) {
if (_root.magic == true) {
if (_root.classi == 'lightning1' || _root.classi == 'lightning2' || _root.classi == 'lightning3') {
electrodeath = true;
ehp -= 40;
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (frozen == false) {
if (this.hitTest(_root.player)) {
if (_root.magic == true) {
if (_root.classi == 'fire1') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.1;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire2') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.2;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire3') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.3;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
this.gotoAndStop('frozen');
_root.freeze.start(0, 1);
frozen = true;
if (_root.direc == 'left') {
this._x -= 50;
}
if (_root.direc == 'right') {
this._x += 50;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (this.hitTest(_root.player)) {
if (_root.attacking == true) {
if (ehit == false) {
ehp -= _root.setdamage;
_root.metal_hit.start();
ehit = true;
ehittimer = true;
heebiejeeb = 0;
if (frozen == false) {
this.gotoAndStop('hit');
if (_root.direc == 'left') {
this._x -= _root.setdistance;
}
if (_root.direc == 'right') {
this._x += _root.setdistance;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false) {
if (cooldownp == false) {
if (_root.mobility == true) {
if (_root.magic == false) {
if (ehit == false) {
if (this.hitTest(_root.player)) {
etack = true;
_root.magic = false;
_root.attacking = false;
this.gotoAndStop('attack');
if (_root.painallowed == true) {
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.stab.start();
_root.health -= 5;
if (this._x > _root.player._x) {
_root.player._x -= 10;
}
if (this._x < _root.player._x) {
_root.player._x += 10;
}
}
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance) {
this.gotoAndStop(2);
this._x -= espeed;
this._xscale = -scale;
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance) {
this.gotoAndStop(2);
this._x += espeed;
this._xscale = scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
instance of movieClip 2417 {
onClipEvent (load) {
num = Math.round(Math.random() * 100);
}
onClipEvent (load) {
_root.attachMovie('ebar', 'ebar' + num, 30 + Math.floor(Math.random() * 10));
}
onClipEvent (enterFrame) {
_root['ebar' + num]._width = ehp * 6;
_root['ebar' + num]._x = this._x;
_root['ebar' + num]._y = this._y - 200;
if (death == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.bardelete == true) {
_root['ebar' + num].unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.mobility == false) {
if (frozen == false) {
if (death == false) {
this.gotoAndStop(1);
}
}
}
}
onClipEvent (load) {
var egrav = 0;
ex = 5;
frozen = false;
frozentimer = 0;
var scale = this._xscale;
var distance = 200;
edamage = 5;
radius = 5;
espeed = 4;
etack = false;
ehit = false;
takstart = false;
taktimer = 0;
cooldown = 0;
cooldownp = false;
currenthit = false;
ehittimer = false;
heebeijeeb = 0;
ehp = 15;
death = false;
deathcount = 0;
freezeover = false;
}
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (frozen == true) {
if (freezeover == false) {
gotoAndStop('frozen');
++frozentimer;
if (frozentimer > _root.freezetime) {
frozentimer = 0;
freezeover = true;
}
}
}
}
}
onClipEvent (enterFrame) {
if (freezeover == true) {
++frozentimer;
gotoAndStop('freezebreak');
if (frozentimer == 8) {
_root.glass_break.start(0.22, 1);
frozen = false;
freezeover = false;
frozentimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (ehp <= 0) {
death = true;
this.gotoAndStop('die');
}
}
onClipEvent (enterFrame) {
if (death == true) {
++deathcount;
}
if (deathcount == 1) {
_root.expplus(this._x, this._y, 50);
}
if (deathcount == 65) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (ehittimer == true) {
++heebeijeeb;
}
if (heebeijeeb == 10) {
heebeijeeb = 0;
ehittimer = false;
ehit = false;
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (etack == true) {
takstart = true;
}
}
onClipEvent (enterFrame) {
if (takstart == true) {
++taktimer;
}
if (taktimer == 20) {
taktimer = 0;
takstart = false;
etack = false;
cooldownp = true;
}
}
onClipEvent (enterFrame) {
if (cooldownp == true) {
++cooldown;
}
if (cooldown == 20) {
cooldown = 0;
cooldownp = false;
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (frozen == false) {
if (this.hitTest(_root.player)) {
if (_root.magic == true) {
if (_root.classi == 'fire1' || 'lightning1') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.01;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire2' || 'lightning2') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.03;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire3' || 'lightning3') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
ehp -= 0.5;
heebiejeeb = 0;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
this.gotoAndStop('frozen');
_root.freeze.start(0, 1);
frozen = true;
if (_root.direc == 'left') {
this._x -= 50;
}
if (_root.direc == 'right') {
this._x += 50;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (this.hitTest(_root.player)) {
if (_root.attacking == true) {
if (ehit == false) {
ehp -= _root.setdamage;
_root.mypunch_hit.start(0, 1);
ehit = true;
ehittimer = true;
heebiejeeb = 0;
if (frozen == false) {
this.gotoAndStop('hit');
if (_root.direc == 'left') {
this._x -= _root.setdistance;
}
if (_root.direc == 'right') {
this._x += _root.setdistance;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false) {
if (cooldownp == false) {
if (_root.mobility == true) {
if (ehit == false) {
if (this.hitTest(_root.player)) {
etack = true;
_root.magic = false;
_root.attacking = false;
this.gotoAndStop('attack');
if (_root.painallowed == true) {
_root.mypunch_hit.start();
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 5;
if (this._x > _root.player._x) {
_root.player._x -= 10;
}
if (this._x < _root.player._x) {
_root.player._x += 10;
}
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance) {
this.gotoAndStop(2);
this._x -= espeed;
this._xscale = -scale;
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance) {
this.gotoAndStop(2);
this._x += espeed;
this._xscale = scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
instance of movieClip 2662 {
onClipEvent (load) {
num = Math.round(Math.random() * 100);
}
onClipEvent (load) {
_root.attachMovie('ebar', 'ebar' + num, 30 + Math.floor(Math.random() * 10));
}
onClipEvent (enterFrame) {
_root['ebar' + num]._width = ehp * 3;
_root['ebar' + num]._x = this._x;
_root['ebar' + num]._y = this._y - 200;
if (death == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.bardelete == true) {
_root['ebar' + num].unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.mobility == false) {
if (frozen == false) {
this.gotoAndStop(1);
}
}
}
onClipEvent (load) {
var egrav = 0;
ex = 5;
frozen = false;
frozentimer = 0;
var scale = this._xscale;
var distance = 300;
edamage = 7;
radius = 5;
espeed = 2;
etack = false;
ehit = false;
takstart = false;
taktimer = 0;
cooldown = 0;
cooldownp = false;
currenthit = false;
ehittimer = false;
heebeijeeb = 0;
ehp = 30;
death = false;
deathcount = 0;
freezeover = false;
electrodeath = false;
}
onClipEvent (enterFrame) {
if (frozen == true) {
if (freezeover == false) {
gotoAndStop('frozen');
++frozentimer;
if (frozentimer > _root.freezetime) {
frozentimer = 0;
freezeover = true;
}
}
}
}
onClipEvent (enterFrame) {
if (freezeover == true) {
++frozentimer;
gotoAndStop('freezebreak');
if (frozentimer == 8) {
_root.glass_break.start(0.22, 1);
frozen = false;
freezeover = false;
frozentimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (ehp <= 0) {
death = true;
if (electrodeath == false) {
this.gotoAndStop('die');
} else {
if (electrodeath == true) {
this.gotoAndStop('electrodeath');
}
}
}
}
onClipEvent (enterFrame) {
if (death == true) {
++deathcount;
}
if (deathcount == 1) {
_root.powerdown.start();
}
if (deathcount == 65) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (ehittimer == true) {
++heebeijeeb;
}
if (heebeijeeb == 8) {
heebeijeeb = 0;
ehittimer = false;
ehit = false;
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 10, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (etack == true) {
takstart = true;
}
}
onClipEvent (enterFrame) {
if (takstart == true) {
++taktimer;
}
if (taktimer == 20) {
taktimer = 0;
takstart = false;
etack = false;
cooldownp = true;
}
}
onClipEvent (enterFrame) {
if (cooldownp == true) {
++cooldown;
}
if (cooldown == 20) {
cooldown = 0;
cooldownp = false;
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (frozen == false) {
if (this.hitTest(_root.player)) {
if (_root.magic == true) {
if (_root.classi == 'lightning1' || _root.classi == 'lightning2' || _root.classi == 'lightning3') {
electrodeath = true;
ehp -= 40;
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (frozen == false) {
if (this.hitTest(_root.player)) {
if (_root.magic == true) {
if (_root.classi == 'fire1') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.1;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire2') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.2;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire3') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.3;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
this.gotoAndStop('frozen');
_root.freeze.start(0, 1);
frozen = true;
if (_root.direc == 'left') {
this._x -= 50;
}
if (_root.direc == 'right') {
this._x += 50;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (this.hitTest(_root.player)) {
if (_root.attacking == true) {
if (ehit == false) {
ehp -= _root.setdamage;
_root.metal_hit.start();
ehit = true;
ehittimer = true;
heebiejeeb = 0;
if (frozen == false) {
this.gotoAndStop('hit');
if (_root.direc == 'left') {
this._x -= _root.setdistance;
}
if (_root.direc == 'right') {
this._x += _root.setdistance;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false) {
if (cooldownp == false) {
if (_root.mobility == true) {
if (_root.magic == false) {
if (ehit == false) {
if (this.hitTest(_root.player)) {
etack = true;
_root.magic = false;
_root.attacking = false;
this.gotoAndStop('attack');
if (_root.painallowed == true) {
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.stab.start();
_root.health -= 5;
if (this._x > _root.player._x) {
_root.player._x -= 10;
}
if (this._x < _root.player._x) {
_root.player._x += 10;
}
}
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance) {
this.gotoAndStop(2);
this._x -= espeed;
this._xscale = -scale;
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance) {
this.gotoAndStop(2);
this._x += espeed;
this._xscale = scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
frame 325 {
background.gotoAndStop('outside1');
}
movieClip 2665 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1,5b';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1,7';
}
}
}
}
movieClip 2669 {
}
instance of movieClip 2669 {
onClipEvent (enterFrame) {
if (_root.found4 != 'k') {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.found4 = 'found';
_root.mobility = false;
_root.itemobtain.gotoAndStop('camera');
this.unloadMovie();
}
}
}
frame 326 {
function potcheak() {
if (_root.pot1 && _root.pot2 == true) {
_root.ground1.play();
_root.falldoor1.play();
_root.falldoor2.play();
}
}
_root.pot1 = false;
_root.pot2 = false;
}
frame 326 {
background.gotoAndStop('inside1');
}
movieClip 2674 {
}
movieClip 2677 {
frame 1 {
stop();
}
frame 24 {
stop();
}
}
movieClip 2679 {
}
instance of movieClip 2679 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = -51;
_root.player._y = -577;
_root.gotoAndStop('area1,4c');
}
}
}
movieClip 2685 {
frame 1 {
stop();
}
frame 26 {
stop();
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1,4.3';
}
}
}
}
movieClip 2690 {
}
movieClip 2692 {
frame 1 {
stop();
}
frame 11 {
stop();
_root.pot1 = true;
}
}
instance of movieClip 2692 {
onClipEvent (load) {
pot1done = false;
}
onClipEvent (enterFrame) {
if (pot1done == false) {
if (_root.magic == true) {
if (_root.classi == 'fire1') {
if (this.hitTest(_root.player)) {
play();
_root.pot1 = true;
_root.potcheak();
pot1done = true;
}
}
}
}
}
onClipEvent (enterFrame) {
if (pot1done == false) {
if (_root.magic == true) {
if (_root.classi == 'fire2') {
if (this.hitTest(_root.player)) {
play();
_root.pot1 = true;
_root.potcheak();
pot1done = true;
}
}
}
}
}
onClipEvent (enterFrame) {
if (pot1done == false) {
if (_root.magic == true) {
if (_root.classi == 'fire3') {
if (this.hitTest(_root.player)) {
play();
_root.pot1 = true;
_root.potcheak();
pot1done = true;
}
}
}
}
}
}
instance of movieClip 2692 {
onClipEvent (load) {
pot2done = false;
}
onClipEvent (enterFrame) {
if (pot2done == false) {
if (_root.magic == true) {
if (_root.classi == 'fire1') {
if (this.hitTest(_root.player)) {
play();
_root.pot2 = true;
_root.potcheak();
pot2done = true;
}
}
}
}
}
onClipEvent (enterFrame) {
if (pot2done == false) {
if (_root.magic == true) {
if (_root.classi == 'fire2') {
if (this.hitTest(_root.player)) {
play();
_root.pot2 = true;
_root.potcheak();
pot2done = true;
}
}
}
}
}
onClipEvent (enterFrame) {
if (pot2done == false) {
if (_root.magic == true) {
if (_root.classi == 'fire3') {
if (this.hitTest(_root.player)) {
play();
_root.pot2 = true;
_root.potcheak();
pot2done = true;
}
}
}
}
}
}
frame 327 {
background.gotoAndStop('inside1');
}
movieClip 2697 {
}
movieClip 2700 {
}
instance of movieClip 2700 {
onClipEvent (enterFrame) {
if (_root.found2 != 'k') {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.found2 = 'found';
_root.mobility = false;
_root.itemobtain.gotoAndStop('ancientskull');
this.unloadMovie();
}
}
}
frame 328 {
background.gotoAndStop('inside1');
}
movieClip 2704 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1,6b';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1,6b';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1,8';
}
}
}
}
movieClip 2708 {
}
instance of movieClip 2708 {
onClipEvent (enterFrame) {
if (_root.found5 != 'k') {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.found5 = 'found';
_root.mobility = false;
_root.itemobtain.gotoAndStop('roll');
this.unloadMovie();
}
}
}
frame 329 {
function puzzle1() {
attachMovie('ball1', 'puzzball', _root.getNextHighestDepth());
puzzball._x = 474.1;
puzzball._y = -131.2;
}
if (puzzle1solved == false) {
object1._rotation = 179;
object2._rotation = 95;
object3._rotation = -90;
}
if (puzzle1solved == true) {
object1.unloadMovie();
object2.unloadMovie();
object3.unloadMovie();
puzzle1();
puzzball.gotoAndStop('end');
door.gotoAndStop('end');
door2.gotoAndStop('end');
}
}
frame 329 {
background.gotoAndStop('inside1');
}
movieClip 2711 {
}
movieClip 2713 {
}
instance of movieClip 2713 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.cam._y -= 40;
}
}
}
movieClip 2719 {
frame 1 {
stop();
}
}
instance of movieClip 2719 {
onClipEvent (load) {
objectrotation1 = false;
rotatespeed = 1;
}
onClipEvent (enterFrame) {
if (objectrotation1 == false) {
if (_root.mobility == true) {
if (_root.puzzle1solved == false) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
this.play();
_root.ping3.start();
area1function1();
}
}
}
}
}
}
onClipEvent (enterFrame) {
function area1function1() {
objectrotation1 = true;
}
}
onClipEvent (enterFrame) {
if (objectrotation1 == true) {
_root.object1._rotation += rotatespeed;
if (_root.object1._rotation == 90 || _root.object1._rotation == 0 || _root.object1._rotation == 179 || _root.object1._rotation == -90) {
objectrotation1 = false;
}
}
}
}
instance of movieClip 2719 {
onClipEvent (load) {
objectrotation2 = false;
rotatespeed = 1;
}
onClipEvent (enterFrame) {
if (objectrotation2 == false) {
if (_root.mobility == true) {
if (_root.puzzle1solved == false) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.ping3.start();
this.play();
area1function2();
}
}
}
}
}
}
onClipEvent (enterFrame) {
function area1function2() {
objectrotation2 = true;
}
}
onClipEvent (enterFrame) {
if (objectrotation2 == true) {
_root.object2._rotation += rotatespeed;
if (_root.object2._rotation == 90 || _root.object2._rotation == 0 || _root.object2._rotation == 179 || _root.object2._rotation == -90) {
objectrotation2 = false;
}
}
}
}
instance of movieClip 2719 {
onClipEvent (load) {
objectrotation3 = false;
playfunction = false;
rotatespeed = 1;
timeractive = false;
actoins = false;
timer = 0;
}
onClipEvent (enterFrame) {
if (objectrotation3 == false) {
if (_root.mobility == true) {
if (_root.puzzle1solved == false) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
this.play();
_root.ping3.start();
area1function3();
}
}
}
}
}
}
onClipEvent (enterFrame) {
function area1function3() {
objectrotation3 = true;
}
}
onClipEvent (enterFrame) {
if (objectrotation3 == true) {
_root.object3._rotation += rotatespeed;
if (_root.object3._rotation == 90 || _root.object3._rotation == 0 || _root.object3._rotation == 179 || _root.object3._rotation == -90) {
objectrotation3 = false;
}
}
}
onClipEvent (enterFrame) {
if (_root.puzzle1solved == false) {
if (_root.object1._rotation == 0 && _root.object2._rotation == 0 && _root.object3._rotation == 0) {
_root.puzzle1solved = true;
_root.magicnoises.start();
actions = true;
if (actions == true) {
_root.object1.unloadMovie();
_root.object2.unloadMovie();
_root.object3.unloadMovie();
_root.puzzle1();
actions = false;
}
timeractive = true;
}
}
}
onClipEvent (enterFrame) {
if (timeractive == true) {
++timer;
if (timer == 24) {
timer = 0;
_root.door.play();
_root.door2.play();
timeractive = false;
_root.rockgrind.start();
_root.rockgrind.setVolume = 10000;
}
}
}
}
movieClip 2723 {
}
movieClip 2726 {
frame 23 {
stop();
}
}
instance object3 of movieClip 2726 {
onClipEvent (load) {
this.stop();
}
}
movieClip 2730 {
}
movieClip 2733 {
frame 1 {
}
frame 23 {
stop();
}
}
instance object1 of movieClip 2733 {
onClipEvent (load) {
this.stop();
}
}
movieClip 2737 {
}
movieClip 2740 {
frame 23 {
stop();
}
}
instance object2 of movieClip 2740 {
onClipEvent (load) {
this.stop();
}
}
instance door of movieClip 2310 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x -= _root.player.speed;
_root.player._x -= _root.player.tmove;
_root.player.tmove = 0;
_root.player.tporting = false;
_root.player.otheraction = false;
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1,7b';
_root.puzzball.unloadMovie();
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area1,2';
_root.puzzball.unloadMovie();
}
}
}
}
movieClip 2762 {
}
movieClip 2774 {
}
movieClip 2778 {
}
movieClip 2782 {
frame 268 {
_root.boss3func();
}
}
movieClip 2783 {
instance of movieClip 2782 {
onClipEvent (enterFrame) {
_root.cam._x -= (_root.cam._x - _parent._x) / 5;
_root.cam._y -= (_root.cam._y - _parent._y) / 5;
}
}
}
instance of movieClip 2783 {
onClipEvent (load) {
ehp = 100;
stun = false;
etack = false;
ehit = false;
frozen = false;
espeed = 5;
egrav = 0;
ex = 5;
death = false;
distance = 500;
scale = this._xscale;
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (etack == false && ehit == false && frozen == false) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance) {
this.gotoAndStop(2);
this._x -= espeed;
this._xscale = scale;
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance) {
this.gotoAndStop(2);
this._x += espeed;
this._xscale = -scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
}
frame 331 {
stopAllSounds();
_root.lvl2music.start(0, 99);
_root.musictype = 2;
}
frame 331 {
background.gotoAndStop('ice1');
}
instance background of movieClip 1690 {
onClipEvent (enterFrame) {
this._x = _root.cam._x;
this._y = _root.cam._y;
}
}
movieClip 2788 {
frame 1 {
stop();
}
}
instance of movieClip 2425 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.magic == true) {
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
_root.liquid.play();
this.unloadMovie();
}
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x -= _root.player.speed;
_root.momentum = 0;
_root.player.tmove = 0;
}
}
}
instance of movieClip 2422 {
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('sign2');
}
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'tournament2';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,2';
}
}
}
}
frame 332 {
background.gotoAndStop('ice1');
}
movieClip 2796 {
frame 1 {
stop();
}
frame 51 {
this.unloadMovie();
}
}
instance ground2 of movieClip 2796 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
this.play();
}
}
}
instance ground3 of movieClip 2796 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
this.play();
}
}
}
movieClip 2799 {
}
movieClip 2800 {
}
instance of movieClip 2800 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.health = 0;
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
if (_root.talkal == true) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,1b';
}
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,3';
}
}
}
}
frame 333 {
background.gotoAndStop('ice1');
}
movieClip 2805 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,2b';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,7';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,4';
}
}
}
}
movieClip 2824 {
}
movieClip 2840 {
}
movieClip 2854 {
}
movieClip 2865 {
}
movieClip 2871 {
}
movieClip 2886 {
frame 29 {
stop();
}
}
movieClip 2887 {
}
instance of movieClip 2887 {
onClipEvent (load) {
num = Math.round(Math.random() * 100);
}
onClipEvent (load) {
_root.attachMovie('ebar', 'ebar' + num, _root.getNextHighestDepth());
}
onClipEvent (enterFrame) {
_root['ebar' + num]._width = ehp * 6;
_root['ebar' + num]._x = this._x - 100;
_root['ebar' + num]._y = this._y - 200;
if (death == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.bardelete == true) {
_root['ebar' + num].unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.mobility == false) {
if (frozen == false) {
if (death == false) {
this.gotoAndStop(1);
}
}
}
}
onClipEvent (load) {
var egrav = 0;
ex = 5;
frozen = false;
taknum = 1;
frozentimer = 0;
var scale = this._xscale;
var distance = 300;
edamage = 10;
radius = 5;
espeed = 6;
etack = false;
ehit = false;
takstart = false;
taktimer = 0;
cooldown = 0;
cooldownp = false;
currenthit = false;
ehittimer = false;
heebeijeeb = 0;
ehp = 30;
death = false;
deathcount = 0;
freezeover = false;
taki = false;
combono = 0;
commie = 0;
dcsound = false;
}
onClipEvent (enterFrame) {
if (etack == false) {
++combono;
if (combono >= 30) {
taknum = 1;
combono = 0;
}
} else {
if (etack == true) {
combono = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (frozen == true) {
if (freezeover == false) {
gotoAndStop('frozen');
++frozentimer;
if (frozentimer > _root.freezetime) {
frozentimer = 0;
freezeover = true;
}
}
}
}
}
onClipEvent (enterFrame) {
if (freezeover == true) {
++frozentimer;
gotoAndStop('freezebreak');
if (frozentimer == 8) {
_root.glass_break.start(0.22, 1);
frozen = false;
freezeover = false;
frozentimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (ehp <= 0) {
death = true;
this.gotoAndStop('die');
}
}
onClipEvent (enterFrame) {
if (death == true) {
++deathcount;
if (dcsound == false) {
_root.wind.start();
_root.howl.start();
dcsound = true;
}
if (deathcount == 1) {
_root.expplus(this._x, this._y, 150);
}
if (deathcount == 40) {
this.unloadMovie();
}
}
}
onClipEvent (enterFrame) {
if (ehittimer == true) {
++heebeijeeb;
}
if (heebeijeeb >= 8) {
heebeijeeb = 0;
ehittimer = false;
ehit = false;
}
}
onClipEvent (enterFrame) {
if (taknum >= 4) {
++combono;
if (combono == 10) {
combono = 0;
taknum = 1;
}
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (etack == true) {
takstart = true;
}
}
onClipEvent (enterFrame) {
if (takstart == true) {
++taktimer;
}
if (taktimer == 1) {
_root.wind.start();
}
if (taktimer == 17) {
taktimer = 0;
takstart = false;
++taknum;
etack = false;
if (taknum == 4) {
cooldownp = -10;
}
cooldownp = true;
}
}
onClipEvent (enterFrame) {
if (cooldownp == true) {
++cooldown;
}
if (cooldown == 1) {
cooldown = 0;
cooldownp = false;
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (frozen == false) {
if (this.hitTest(_root.player) && _root.magic == true) {
if (_root.classi == 'fire1' || 'lightning1') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.01;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire2' || 'lightning2') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.03;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire3' || 'lightning3') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
ehp -= 0.5;
heebiejeeb = 0;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
this.gotoAndStop('hit');
ehit = true;
_root.freeze.start(0, 1);
ehp += 2;
if (_root.direc == 'left') {
this._x -= 10;
}
if (_root.direc == 'right') {
this._x += 10;
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (this.hitTest(_root.player)) {
if (_root.attacking == true) {
if (ehit == false) {
ehp -= _root.setdamage;
_root.mypunch_hit.start(0, 1);
ehit = true;
ehittimer = true;
heebiejeeb = 0;
if (frozen == false) {
this.gotoAndStop('hit');
if (_root.direc == 'left') {
this._x -= _root.setdistance - 4;
}
if (_root.direc == 'right') {
this._x += _root.setdistance + 4;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false) {
if (cooldownp == false) {
if (_root.mobility == true) {
if (ehit == false) {
if (this.hitTest(_root.player)) {
etack = true;
if (taknum == 1) {
gotoAndStop('etak1');
}
if (taknum == 2) {
gotoAndStop('etak2');
}
if (taknum == 3) {
gotoAndStop('etak3');
}
_root.magic = false;
_root.attacking = false;
if (_root.painallowed == true) {
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 5;
_root.mypunch_hit.start();
if (this._x > _root.player._x) {
_root.player._x -= 10;
}
if (this._x < _root.player._x) {
_root.player._x += 10;
}
if (taknum == 3) {
_root.thump.start();
if (this._x > _root.player._x) {
_root.momentum = -20;
}
if (this._x < _root.player._x) {
_root.momentum = 20;
}
}
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance) {
this.gotoAndStop(2);
this._x -= espeed;
this._xscale = -scale;
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance) {
this.gotoAndStop(2);
this._x += espeed;
this._xscale = scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
movieClip 2895 {
}
movieClip 2902 {
}
movieClip 2905 {
}
movieClip 2918 {
}
movieClip 2926 {
}
movieClip 2931 {
frame 8 {
stop();
}
}
movieClip 2939 {
}
movieClip 2950 {
}
movieClip 2967 {
}
movieClip 2968 {
}
instance of movieClip 2968 {
onClipEvent (load) {
num = Math.round(Math.random() * 100);
}
onClipEvent (load) {
_root.attachMovie('ebar', 'ebar' + num, _root.getNextHighestDepth());
}
onClipEvent (enterFrame) {
_root['ebar' + num]._width = ehp * 6;
_root['ebar' + num]._x = this._x;
_root['ebar' + num]._y = this._y - 200;
if (death == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.bardelete == true) {
_root['ebar' + num].unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.mobility == false) {
if (frozen == false) {
if (death == false) {
this.gotoAndStop(1);
}
}
}
}
onClipEvent (enterFrame) {
if (ehp <= 0) {
gotoAndStop('die');
death = true;
}
}
onClipEvent (enterFrame) {
if (death == true) {
if (electrodeath == true) {
gotoAndStop('electrodeath');
++dc;
if (dc == 1) {
_root.expplus(this._x, this._y, 75);
}
if (dc == 15) {
dc = 0;
electrodeath = false;
}
} else {
gotoAndStop('die');
}
++dc;
if (dc == 1) {
_root.expplus(this._x, this._y, 75);
}
if (dc == 74) {
this.unloadMovie();
}
}
}
onClipEvent (load) {
var egrav = 0;
ex = 5;
frozen = false;
frozentimer = 0;
var scale = this._xscale;
var distance = 600;
edamage = 10;
radius = 5;
espeed = 8;
etack = false;
ehit = false;
etacktimer = 0;
cooldown = 0;
cooldownp = false;
ehittimer = false;
heebeijeeb = 0;
ehp = 10;
death = false;
dc = 0;
freezeover = false;
snowcount = 0;
ball = false;
bc = 0;
ballchange = false;
fireclass = 0;
electrodeath = false;
}
onClipEvent (enterFrame) {
if (_root.classi == 'fire1') {
fireclass = 0.2;
}
if (_root.classi == 'fire2') {
fireclass = 0.5;
}
if (_root.classi == 'fire3') {
fireclass = 0.9;
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true && frozen == false) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 200) {
if (tx - sx < distance) {
if (ball == false) {
ballchange = true;
} else {
this.gotoAndStop('roll');
}
this._x -= espeed;
this._xscale = -scale;
}
} else {
if (sx > tx + 200) {
if (sx - tx < distance) {
if (ball == false) {
ballchange = true;
} else {
this.gotoAndStop('roll');
}
this._x += espeed;
this._xscale = scale;
}
}
}
} else {
if (ball == true) {
ballchange = true;
}
this.gotoAndStop(1);
}
}
}
}
onClipEvent (enterFrame) {
if (this._x - _root.player._x < 200 && this._x - _root.player._x > 0) {
if (etack == false && ehit == false && death == false && frozen == false) {
etack = true;
}
}
}
onClipEvent (enterFrame) {
if (sx - tx < 200 && sx - tx > 0) {
if (etack == false && ehit == false && death == false && frozen == false) {
etack = true;
}
}
}
onClipEvent (enterFrame) {
if (etack == true && _root.mobility == true) {
++snowcount;
if (tx > sx) {
_xscale = -scale;
}
if (tx < sx) {
_xscale = scale;
}
++etacktimer;
if (etacktimer == 1) {
if (ball == true) {
ballchange = true;
} else {
gotoAndStop('etack');
}
}
if (etacktimer == 3) {
_root.snowshot.start();
_root.attachMovie('snowball', 'snowball' + snowcount, 30 + snowcount);
if (_xscale == scale) {
_root['snowball' + snowcount].direc = 'left';
_root['snowball' + snowcount]._x = this._x + 25;
}
if (_xscale == -scale) {
_root['snowball' + snowcount]._x = this._x + -25;
_root['snowball' + snowcount].direc = 'right';
}
_root['snowball' + snowcount]._y = this._y - 55;
}
if (etacktimer == 10) {
gotoAndStop('idle');
}
if (etacktimer == 40) {
etack = false;
etacktimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.attacking == true && ehit == false && death == false) {
etack = false;
ehit = true;
_root.metal_hit.start();
ehp -= _root.setdamage;
if (_root.direc == 'left') {
this._x -= _root.setdistance;
}
if (_root.direc == 'right') {
this._x += _root.setdistance;
}
}
}
}
onClipEvent (enterFrame) {
if (ehit == true) {
++ehittimer;
if (frozen == false) {
gotoAndStop('ehit');
}
if (ehittimer == 10) {
ehit = false;
ehittimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.magic == true && ehit == false && death == false && frozen == false) {
if (_root.classi == 'fire1' || _root.classi == 'fire2' || _root.classi == 'fire3') {
etack = false;
ehit = true;
ehp -= fireclass;
if (_root.direc == 'left') {
this._x -= _root.setdistance;
}
if (_root.direc == 'right') {
this._x += _root.setdistance;
}
}
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.magic == true && ehit == false && death == false && frozen == false) {
if (_root.classi == 'lightning1' || _root.classi == 'lightning2' || _root.classi == 'lightning3') {
etack = false;
death = true;
ehp = 0;
electrodeath = true;
if (_root.direc == 'left') {
this._x -= _root.setdistance;
}
if (_root.direc == 'right') {
this._x += _root.setdistance;
}
}
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.magic == true && ehit == false && death == false) {
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
etack = false;
frozen = true;
if (_root.direc == 'left') {
this._x -= _root.setdistance;
}
if (_root.direc == 'right') {
this._x += _root.setdistance;
}
}
}
}
}
onClipEvent (enterFrame) {
if (ballchange == true) {
if (ball == true) {
gotoAndStop('ballout');
++bc;
if (bc == 5) {
ball = false;
ballchange = false;
bc = 0;
}
}
if (ball == false) {
gotoAndStop('ballin');
++bc;
if (bc == 5) {
ball = true;
ballchange = false;
bc = 0;
}
}
}
}
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (frozen == true) {
if (freezeover == false) {
gotoAndStop('frozen');
++frozentimer;
if (frozentimer > _root.freezetime) {
frozentimer = 0;
freezeover = true;
}
}
}
}
}
onClipEvent (enterFrame) {
if (freezeover == true) {
++frozentimer;
gotoAndStop('freezebreak');
if (frozentimer == 8) {
_root.glass_break.start(0.22, 1);
frozen = false;
freezeover = false;
frozentimer = 0;
}
}
}
}
movieClip 2979 {
frame 1 {
stop();
nolonger = true;
}
frame 2 {
_root.freeze.start();
}
frame 13 {
_root.glass_break.start(0.22, 1);
}
frame 13 {
nolonger = false;
}
frame 20 {
this.unloadMovie();
}
}
instance iceicle1 of movieClip 2979 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && _root.painallowed == true) {
if (nolonger == true) {
_root.health -= 10;
_root.otheraction = true;
_root.player.gotoAndStop('hited');
nolonger = false;
}
}
}
}
movieClip 2981 {
}
instance of movieClip 2981 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.iceicle1.play();
this.unloadMovie();
}
}
}
instance iceicle2 of movieClip 2979 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (nolonger == true) {
_root.health -= 10;
_root.otheraction = true;
_root.player.gotoAndStop('hited');
nolonger = false;
}
}
}
}
instance of movieClip 2981 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.iceicle2.play();
this.unloadMovie();
}
}
}
instance iceicle3 of movieClip 2979 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (nolonger == true) {
_root.health -= 10;
_root.otheraction = true;
_root.player.gotoAndStop('hited');
nolonger = false;
}
}
}
}
instance of movieClip 2981 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.iceicle3.play();
this.unloadMovie();
}
}
}
frame 334 {
background.gotoAndStop('iceinside2');
}
movieClip 2984 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,3b';
}
}
}
}
instance of movieClip 2258 {
onClipEvent (load) {
if (_root.bluedoor == true) {
this.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.bluedoor == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,5';
}
}
}
}
}
frame 335 {
background.gotoAndStop('iceinside2');
}
movieClip 2989 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,4b';
}
}
}
}
instance of movieClip 2258 {
onClipEvent (load) {
if (_root.greendoor == true) {
this.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.greendoor == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,6';
}
}
}
}
}
frame 336 {
background.gotoAndStop('iceinside');
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,5b';
}
}
}
}
instance of movieClip 2258 {
onClipEvent (load) {
if (_root.reddoor == true) {
this.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.reddoor == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,boss';
}
}
}
}
}
frame 337 {
background.gotoAndStop('iceinside2');
}
movieClip 2996 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,3c';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,8';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,10';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,12';
}
}
}
}
frame 338 {
background.gotoAndStop('iceinside');
}
movieClip 3007 {
frame 1 {
stop();
}
frame 5 {
stop();
_root.ground1.gotoAndStop(2);
_root.waterie.gotoAndPlay(9);
}
}
instance of movieClip 3007 {
onClipEvent (load) {
tide = false;
}
onClipEvent (enterFrame) {
if (tide == false) {
if (this.hitTest(_root.player)) {
if (_root.magic == true) {
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
this.play();
_root.freeze.start();
tide = true;
}
}
}
}
}
}
movieClip 3010 {
frame 1 {
stop();
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,7b';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,9';
}
}
}
}
instance of movieClip 2425 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.magic == true) {
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
_root.liquid.play();
this.unloadMovie();
}
}
}
}
onClipEvent (load) {
if (_root.fadefunks == 'area2,8b') {
_root.liquid.gotoAndPlay(4);
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x -= _root.player.speed;
_root.momentum = 0;
_root.player.tmove = 0;
}
}
}
instance of movieClip 2887 {
onClipEvent (load) {
num = Math.round(Math.random() * 100);
}
onClipEvent (load) {
_root.attachMovie('ebar', 'ebar' + num, _root.getNextHighestDepth());
}
onClipEvent (enterFrame) {
_root['ebar' + num]._width = ehp * 6;
_root['ebar' + num]._x = this._x - 100;
_root['ebar' + num]._y = this._y - 200;
if (death == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.bardelete == true) {
_root['ebar' + num].unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.mobility == false) {
if (frozen == false) {
if (death == false) {
this.gotoAndStop(1);
}
}
}
}
onClipEvent (load) {
var egrav = 0;
ex = 5;
frozen = false;
taknum = 1;
frozentimer = 0;
var scale = this._xscale;
var distance = 300;
edamage = 10;
radius = 5;
espeed = 6;
etack = false;
ehit = false;
takstart = false;
taktimer = 0;
cooldown = 0;
cooldownp = false;
currenthit = false;
ehittimer = false;
heebeijeeb = 0;
ehp = 30;
death = false;
deathcount = 0;
freezeover = false;
taki = false;
combono = 0;
commie = 0;
dcsound = false;
}
onClipEvent (enterFrame) {
if (etack == false) {
++combono;
if (combono >= 30) {
taknum = 1;
combono = 0;
}
} else {
if (etack == true) {
combono = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (frozen == true) {
if (freezeover == false) {
gotoAndStop('frozen');
++frozentimer;
if (frozentimer > _root.freezetime) {
frozentimer = 0;
freezeover = true;
}
}
}
}
}
onClipEvent (enterFrame) {
if (freezeover == true) {
++frozentimer;
gotoAndStop('freezebreak');
if (frozentimer == 8) {
_root.glass_break.start(0.22, 1);
frozen = false;
freezeover = false;
frozentimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (ehp <= 0) {
death = true;
this.gotoAndStop('die');
}
}
onClipEvent (enterFrame) {
if (death == true) {
++deathcount;
if (dcsound == false) {
_root.wind.start();
_root.howl.start();
dcsound = true;
}
if (deathcount == 1) {
_root.expplus(this._x, this._y, 150);
}
if (deathcount == 40) {
this.unloadMovie();
}
}
}
onClipEvent (enterFrame) {
if (ehittimer == true) {
++heebeijeeb;
}
if (heebeijeeb >= 8) {
heebeijeeb = 0;
ehittimer = false;
ehit = false;
}
}
onClipEvent (enterFrame) {
if (taknum >= 4) {
++combono;
if (combono == 10) {
combono = 0;
taknum = 1;
}
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (etack == true) {
takstart = true;
}
}
onClipEvent (enterFrame) {
if (takstart == true) {
++taktimer;
}
if (taktimer == 1) {
_root.wind.start();
}
if (taktimer == 17) {
taktimer = 0;
takstart = false;
++taknum;
etack = false;
if (taknum == 4) {
cooldownp = -10;
}
cooldownp = true;
}
}
onClipEvent (enterFrame) {
if (cooldownp == true) {
++cooldown;
}
if (cooldown == 1) {
cooldown = 0;
cooldownp = false;
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (frozen == false) {
if (this.hitTest(_root.player) && _root.magic == true) {
if (_root.classi == 'fire1' || 'lightning1') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.01;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire2' || 'lightning2') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.03;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire3' || 'lightning3') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
ehp -= 0.5;
heebiejeeb = 0;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
this.gotoAndStop('hit');
ehit = true;
_root.freeze.start(0, 1);
ehp += 2;
if (_root.direc == 'left') {
this._x -= 10;
}
if (_root.direc == 'right') {
this._x += 10;
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (this.hitTest(_root.player)) {
if (_root.attacking == true) {
if (ehit == false) {
ehp -= _root.setdamage;
_root.mypunch_hit.start(0, 1);
ehit = true;
ehittimer = true;
heebiejeeb = 0;
if (frozen == false) {
this.gotoAndStop('hit');
if (_root.direc == 'left') {
this._x -= _root.setdistance - 4;
}
if (_root.direc == 'right') {
this._x += _root.setdistance + 4;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false) {
if (cooldownp == false) {
if (_root.mobility == true) {
if (ehit == false) {
if (this.hitTest(_root.player)) {
etack = true;
if (taknum == 1) {
gotoAndStop('etak1');
}
if (taknum == 2) {
gotoAndStop('etak2');
}
if (taknum == 3) {
gotoAndStop('etak3');
}
_root.magic = false;
_root.attacking = false;
if (_root.painallowed == true) {
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 5;
_root.mypunch_hit.start();
if (this._x > _root.player._x) {
_root.player._x -= 10;
}
if (this._x < _root.player._x) {
_root.player._x += 10;
}
if (taknum == 3) {
_root.thump.start();
if (this._x > _root.player._x) {
_root.momentum = -20;
}
if (this._x < _root.player._x) {
_root.momentum = 20;
}
}
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance) {
this.gotoAndStop(2);
this._x -= espeed;
this._xscale = -scale;
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance) {
this.gotoAndStop(2);
this._x += espeed;
this._xscale = scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
movieClip 3031 {
frame 8 {
gotoAndPlay(1);
}
frame 14 {
gotoAndPlay(9);
}
}
frame 339 {
background.gotoAndStop('iceinside');
}
movieClip 3036 {
frame 1 {
stop();
}
}
instance lock of movieClip 3036 {
onClipEvent (load) {
if (_root.bluedoor == true) {
this.gotoAndStop(2);
}
}
}
movieClip 3040 {
frame 1 {
stop();
}
frame 3 {
_root.floodlight.start();
}
frame 10 {
stop();
_root.lock.gotoAndStop(2);
_root.bluedoor = true;
}
}
instance of movieClip 3040 {
onClipEvent (enterFrame) {
if (_root.bluedoor == false) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
this.play();
}
}
}
}
onClipEvent (load) {
if (_root.bluedoor == true) {
gotoAndStop(314);
}
}
}
movieClip 3042 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,8b';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,7b';
}
}
}
}
frame 340 {
background.gotoAndStop('iceinside2');
}
instance of movieClip 1706 {
onClipEvent (load) {
if (_root.dragodead == true) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('emandragon');
}
}
}
}
}
instance of movieClip 1706 {
onClipEvent (load) {
if (_root.dragodead == true) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('emandragon');
}
}
}
}
}
instance of movieClip 1706 {
onClipEvent (load) {
if (_root.dragodead == false) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('emandragon2');
}
}
}
}
}
movieClip 3048 {
frame 1 {
stop();
}
}
instance of movieClip 3048 {
onClipEvent (load) {
this.stop();
if (_root.dragodead == true) {
gotoAndStop(306);
_root.ground1.gotoAndStop(2);
}
}
}
movieClip 3051 {
frame 1 {
stop();
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,7c';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,11';
}
}
}
}
instance of movieClip 2968 {
onClipEvent (load) {
num = Math.round(Math.random() * 100);
}
onClipEvent (load) {
_root.attachMovie('ebar', 'ebar' + num, _root.getNextHighestDepth());
}
onClipEvent (enterFrame) {
_root['ebar' + num]._width = ehp * 6;
_root['ebar' + num]._x = this._x;
_root['ebar' + num]._y = this._y - 200;
if (death == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.bardelete == true) {
_root['ebar' + num].unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.mobility == false) {
if (frozen == false) {
if (death == false) {
this.gotoAndStop(1);
}
}
}
}
onClipEvent (enterFrame) {
if (ehp <= 0) {
gotoAndStop('die');
death = true;
}
}
onClipEvent (enterFrame) {
if (death == true) {
if (electrodeath == true) {
gotoAndStop('electrodeath');
++dc;
if (dc == 1) {
_root.expplus(this._x, this._y, 75);
}
if (dc == 15) {
dc = 0;
electrodeath = false;
}
} else {
gotoAndStop('die');
}
++dc;
if (dc == 1) {
_root.expplus(this._x, this._y, 75);
}
if (dc == 74) {
this.unloadMovie();
}
}
}
onClipEvent (load) {
var egrav = 0;
ex = 5;
frozen = false;
frozentimer = 0;
var scale = this._xscale;
var distance = 600;
edamage = 10;
radius = 5;
espeed = 8;
etack = false;
ehit = false;
etacktimer = 0;
cooldown = 0;
cooldownp = false;
ehittimer = false;
heebeijeeb = 0;
ehp = 10;
death = false;
dc = 0;
freezeover = false;
snowcount = 0;
ball = false;
bc = 0;
ballchange = false;
fireclass = 0;
electrodeath = false;
}
onClipEvent (enterFrame) {
if (_root.classi == 'fire1') {
fireclass = 0.2;
}
if (_root.classi == 'fire2') {
fireclass = 0.5;
}
if (_root.classi == 'fire3') {
fireclass = 0.9;
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true && frozen == false) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 200) {
if (tx - sx < distance) {
if (ball == false) {
ballchange = true;
} else {
this.gotoAndStop('roll');
}
this._x -= espeed;
this._xscale = -scale;
}
} else {
if (sx > tx + 200) {
if (sx - tx < distance) {
if (ball == false) {
ballchange = true;
} else {
this.gotoAndStop('roll');
}
this._x += espeed;
this._xscale = scale;
}
}
}
} else {
if (ball == true) {
ballchange = true;
}
this.gotoAndStop(1);
}
}
}
}
onClipEvent (enterFrame) {
if (this._x - _root.player._x < 200 && this._x - _root.player._x > 0) {
if (etack == false && ehit == false && death == false && frozen == false) {
etack = true;
}
}
}
onClipEvent (enterFrame) {
if (sx - tx < 200 && sx - tx > 0) {
if (etack == false && ehit == false && death == false && frozen == false) {
etack = true;
}
}
}
onClipEvent (enterFrame) {
if (etack == true && _root.mobility == true) {
++snowcount;
if (tx > sx) {
_xscale = -scale;
}
if (tx < sx) {
_xscale = scale;
}
++etacktimer;
if (etacktimer == 1) {
if (ball == true) {
ballchange = true;
} else {
gotoAndStop('etack');
}
}
if (etacktimer == 3) {
_root.snowshot.start();
_root.attachMovie('snowball', 'snowball' + snowcount, 30 + snowcount);
if (_xscale == scale) {
_root['snowball' + snowcount].direc = 'left';
_root['snowball' + snowcount]._x = this._x + 25;
}
if (_xscale == -scale) {
_root['snowball' + snowcount]._x = this._x + -25;
_root['snowball' + snowcount].direc = 'right';
}
_root['snowball' + snowcount]._y = this._y - 55;
}
if (etacktimer == 10) {
gotoAndStop('idle');
}
if (etacktimer == 40) {
etack = false;
etacktimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.attacking == true && ehit == false && death == false) {
etack = false;
ehit = true;
_root.metal_hit.start();
ehp -= _root.setdamage;
if (_root.direc == 'left') {
this._x -= _root.setdistance;
}
if (_root.direc == 'right') {
this._x += _root.setdistance;
}
}
}
}
onClipEvent (enterFrame) {
if (ehit == true) {
++ehittimer;
if (frozen == false) {
gotoAndStop('ehit');
}
if (ehittimer == 10) {
ehit = false;
ehittimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.magic == true && ehit == false && death == false && frozen == false) {
if (_root.classi == 'fire1' || _root.classi == 'fire2' || _root.classi == 'fire3') {
etack = false;
ehit = true;
ehp -= fireclass;
if (_root.direc == 'left') {
this._x -= _root.setdistance;
}
if (_root.direc == 'right') {
this._x += _root.setdistance;
}
}
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.magic == true && ehit == false && death == false && frozen == false) {
if (_root.classi == 'lightning1' || _root.classi == 'lightning2' || _root.classi == 'lightning3') {
etack = false;
death = true;
ehp = 0;
electrodeath = true;
if (_root.direc == 'left') {
this._x -= _root.setdistance;
}
if (_root.direc == 'right') {
this._x += _root.setdistance;
}
}
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.magic == true && ehit == false && death == false) {
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
etack = false;
frozen = true;
if (_root.direc == 'left') {
this._x -= _root.setdistance;
}
if (_root.direc == 'right') {
this._x += _root.setdistance;
}
}
}
}
}
onClipEvent (enterFrame) {
if (ballchange == true) {
if (ball == true) {
gotoAndStop('ballout');
++bc;
if (bc == 5) {
ball = false;
ballchange = false;
bc = 0;
}
}
if (ball == false) {
gotoAndStop('ballin');
++bc;
if (bc == 5) {
ball = true;
ballchange = false;
bc = 0;
}
}
}
}
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (frozen == true) {
if (freezeover == false) {
gotoAndStop('frozen');
++frozentimer;
if (frozentimer > _root.freezetime) {
frozentimer = 0;
freezeover = true;
}
}
}
}
}
onClipEvent (enterFrame) {
if (freezeover == true) {
++frozentimer;
gotoAndStop('freezebreak');
if (frozentimer == 8) {
_root.glass_break.start(0.22, 1);
frozen = false;
freezeover = false;
frozentimer = 0;
}
}
}
}
movieClip 3055 {
}
instance of movieClip 3055 {
onClipEvent (enterFrame) {
if (_root.found6 != 'k') {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.found6 = 'found';
_root.mobility = false;
_root.itemobtain.gotoAndStop('brolly');
this.unloadMovie();
}
}
}
frame 341 {
_root.player._x = -40;
_root.player._y = 373.5;
}
frame 341 {
background.gotoAndStop('iceinside2');
}
movieClip 3061 {
frame 1 {
stop();
}
}
instance of movieClip 3061 {
onClipEvent (enterFrame) {
if (_root.dragodead == false) {
if (_root.player.hitTest(this._x, _y)) {
play();
}
}
}
}
movieClip 3064 {
frame 1 {
stop();
}
}
movieClip 3065 {
frame 1 {
stop();
}
frame 3 {
_root.floodlight.start();
}
frame 10 {
stop();
_root.lock.gotoAndStop(2);
_root.greendoor = true;
}
}
instance of movieClip 3065 {
onClipEvent (enterFrame) {
if (_root.greendoor == false) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
this.play();
}
}
}
}
onClipEvent (load) {
if (_root.greendoor == true) {
gotoAndStop(314);
}
}
}
movieClip 3068 {
frame 1 {
stop();
}
}
instance ground1 of movieClip 3068 {
onClipEvent (load) {
if (_root.dragodead == true) {
this.gotoAndStop(2);
}
}
}
movieClip 3070 {
}
instance of movieClip 3070 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.gotoAndStop('dragon');
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,10b';
}
}
}
}
movieClip 3072 {
frame 92 {
this.unloadMovie();
}
}
frame 342 {
_root.otheraction = true;
_root.player._x = -52;
_root.player._y = 380;
_root.player.grav = 0;
_root.player.gotoAndStop('floor');
_root.musictype = 2;
}
frame 342 {
background.gotoAndStop('iceinside');
}
movieClip 3076 {
}
instance dragon of movieClip 1042 {
onClipEvent (load) {
espeed = 4;
egrav = 0;
etak = false;
ehit = false;
death = false;
frozen = false;
tx = 0;
sx = 0;
distance = 1000;
ex = 5;
var scale = this._xscale;
etaknumber = 0;
realhit = false;
flying = false;
ehitcount = 0;
touchtime = 0;
dragonhealth = 100;
deathtimer = 0;
dh = false;
dhtimer = 0;
attackover = true;
taktest = true;
taknum = 0;
icenum = 10;
freezenum = 0;
firsttimer = 0;
atfirst = false;
vfirst = false;
firster = false;
firstercount = false;
}
onClipEvent (enterFrame) {
if (atfirst == false) {
firster = true;
gotoAndStop('vfirst');
vfirst = true;
if (this.hitTest(_root.player)) {
firstercount = true;
atfirst = true;
gotoAndStop('atfirst');
}
}
}
onClipEvent (enterFrame) {
if (firstercount == true) {
++firsttimer;
if (firsttimer == 152) {
frozen = false;
vfirst = false;
firster = false;
firstercount = false;
}
}
}
onClipEvent (enterFrame) {
if (etak == true) {
++etaknumber;
}
if (etaknumber >= 20) {
realhit = true;
}
if (etaknumber >= 25) {
realhit = false;
}
if (etaknumber >= 29) {
etak = false;
taktest = true;
realhit = false;
etaknumber = 0;
}
}
onClipEvent (enterFrame) {
taktest = true;
if (taktest) {
++taknum;
if (taknum == 10) {
attackover = true;
taktest = false;
taknum = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.iceclass == 'ice1') {
icenum = 100;
}
if (_root.iceclass == 'ice2') {
icenum = 150;
}
if (_root.iceclass == 'ice3') {
icenum = 200;
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (death == false && firster == false) {
if (_root.mobility == true) {
if (etak == false && dh == false && ehit == false && frozen == false) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance) {
this._x -= espeed;
this._xscale = scale;
_root.dragodirec = 'left';
if (flying == false) {
this.gotoAndStop(2);
wings.gotoAndStop('idle');
}
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance) {
this._x += espeed;
this._xscale = -scale;
_root.dragodirec = 'right';
if (flying == false) {
this.gotoAndStop(2);
wings.gotoAndStop('idle');
}
}
}
}
} else {
this.gotoAndStop(1);
wings.gotoAndStop('idle');
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == false && firster == false && dh == false && ehit == false && etak == false && frozen == false && _root.attacking == false && attackover == true && _root.magic == false) {
if (this.hitTest(_root.player)) {
etak = true;
gotoAndStop('etak');
}
}
if (this.hitTest(_root.player)) {
if (etak == true && realhit == true && _root.painallowed == true) {
if (_root.player._x < this._x && this._xscale == scale || _root.player._x > this._x && this._xscale == -scale) {
_root.health -= 20;
_root.thump.start();
_root.otheraction = true;
_root.player.gotoAndStop('hited');
if (_root.player._x < this._x) {
_root.momentum = -20;
}
if (_root.player._x > this._x) {
_root.momentum = 20;
}
}
}
}
}
onClipEvent (enterFrame) {
if (_root.player._y <= 119 && dh == false && firster == false && frozen == false) {
flying = true;
if (etak == false) {
this.gotoAndStop('fly');
}
} else {
flying = false;
}
}
onClipEvent (enterFrame) {
if (flying == true) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
flying = false;
wingspan = 0;
}
if (_root.player._y < this._y) {
wings.gotoAndStop('fly');
egrav = 0;
_y = _y - 5;
}
if (_root.player._y > this.y) {
wings.gotoAndStop('fall');
}
}
}
onClipEvent (enterFrame) {
if (etak == false && firster == false && ehit == false && dh == false) {
if (_root.attacking == true) {
if (this.hitTest(_root.player)) {
_root.mypunch_hit.start();
if (frozen == true) {
dragonhealth -= 0.8;
}
if (frozen == false) {
dragonhealth -= 8;
ehit = true;
this.gotoAndStop('ehit');
if (this._x > _root.player._x) {
this._x += 5;
}
if (this._x < _root.player._x) {
this._x -= 5;
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (ehit == true) {
++ehitcount;
if (ehitcount == 10) {
ehitcount = 0;
ehit = false;
}
}
}
onClipEvent (enterFrame) {
if (dh == false && firster == false && etak == false && ehit == false) {
if (_root.magic == true) {
if (this.hitTest(_root.player)) {
if (_root.classi == 'fire1') {
if (frozen == true) {
dragonhealth -= 1;
}
if (frozen == false) {
dragonhealth -= 1;
ehit = true;
this.gotoAndStop('ehit');
if (this._x > _root.player._x) {
this._x += 5;
}
if (this._x < _root.player._x) {
this._x -= 5;
}
}
}
if (_root.classi == 'fire2') {
if (frozen == true) {
dragonhealth -= 1.5;
}
if (frozen == false) {
dragonhealth -= 1.5;
ehit = true;
this.gotoAndStop('ehit');
if (this._x > _root.player._x) {
this._x += 5;
}
if (this._x < _root.player._x) {
this._x -= 5;
}
}
}
if (_root.classi == 'fire3') {
if (frozen == true) {
dragonhealth -= 2;
}
if (frozen == false) {
ehit = true;
dragonhealth -= 2;
this.gotoAndStop('ehit');
if (this._x > _root.player._x) {
this._x += 5;
}
if (this._x < _root.player._x) {
this._x -= 5;
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
dh = false;
if (dh && firster == false && etak == false && ehit == false) {
if (_root.magic == true) {
if (this.hitTest(_root.player)) {
if (_root.classi == 'lightning1') {
if (frozen == true) {
dragonhealth -= 0.5;
}
if (frozen == false) {
dragonhealth -= 0.5;
ehit = true;
this.gotoAndStop('ehit');
if (this._x > _root.player._x) {
this._x += 5;
}
if (this._x < _root.player._x) {
this._x -= 5;
}
}
}
if (_root.classi == 'lightning2') {
if (frozen == true) {
dragonhealth -= 1;
}
if (frozen == false) {
dragonhealth -= 1;
ehit = true;
this.gotoAndStop('ehit');
if (this._x > _root.player._x) {
this._x += 5;
}
if (this._x < _root.player._x) {
this._x -= 5;
}
}
}
if (_root.classi == 'lightning3') {
if (frozen == true) {
dragonhealth -= 1.5;
}
if (frozen == false) {
dragonhealth -= 1.5;
ehit = true;
this.gotoAndStop('ehit');
if (this._x > _root.player._x) {
this._x += 5;
}
if (this._x < _root.player._x) {
this._x -= 5;
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false && firster == false && dh == false && etak == false && ehit == false) {
if (_root.magic == true) {
if (this.hitTest(_root.player)) {
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
frozen = true;
gotoAndStop('freeze');
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == true) {
++freezenum;
if (freezenum == icenum - 6) {
gotoAndStop('freezebreak');
_root.glass_break.start(0.22, 1);
}
if (freezenum == icenum) {
frozen = false;
freezenum = 0;
}
}
}
onClipEvent (enterFrame) {
if (dragonhealth <= 0) {
dh = true;
gotoAndStop('dh');
++dhtimer;
if (dhtimer == 200) {
dhtimer = 0;
dh = false;
dragonhealth = 100;
}
}
}
onClipEvent (enterFrame) {
if (this._y - _root.player._y > 400 && _root.mobility == true) {
_root.cam.gotoAndStop(2);
} else {
_root.cam.gotoAndStop(1);
}
}
}
movieClip 3082 {
frame 1 {
stop();
}
frame 2 {
_root.glass_break.start(0.22, 1);
}
frame 3 {
_root.glass_break.start(0.22, 1);
}
frame 4 {
_root.glass_break.start(0.22, 1);
}
frame 5 {
_root.glass_break.start(0.22, 1);
}
}
movieClip 3084 {
}
instance of movieClip 3084 {
onClipEvent (load) {
icehealth = 100;
coolcount = 0;
cooldownhit = false;
}
onClipEvent (enterFrame) {
if (_root.dragon.firster == true) {
icehealth = 100;
}
}
onClipEvent (enterFrame) {
if (icehealth <= 80 && icehealth > 60) {
_root.blocker.gotoAndStop(2);
}
if (icehealth <= 60 && icehealth > 40) {
_root.blocker.gotoAndStop(3);
}
if (icehealth <= 40 && icehealth > 20) {
_root.blocker.gotoAndStop(4);
}
if (icehealth <= 20 && icehealth > 10) {
_root.blocker.gotoAndStop(5);
}
}
onClipEvent (enterFrame) {
if (cooldownhit == true) {
++coolcount;
_root.mypunch_hit.stop('mypunch_hit');
if (coolcount == 15) {
coolcount = 0;
cooldownhit = false;
}
}
}
onClipEvent (enterFrame) {
if (this.cooldownhit == false) {
if (_root.attacking == true && cooldownhit == false) {
if (this.hitTest(_root.player)) {
icehealth -= 8;
cooldownhit = true;
_root.mypunch_hit.stop('mypunch_hit');
_root.thump.start();
if (icehealth <= 8) {
_root.dragodead = true;
_root.gotoAndStop('dragondeath');
}
}
}
}
}
onClipEvent (enterFrame) {
if (this.cooldownhit == false) {
if (_root.magic == true) {
if (_root.classi == 'fire1' || _root.classi == 'fire2' || _root.classi == 'fire3') {
if (cooldownhit == false) {
if (this.hitTest(_root.player)) {
icehealth -= 10;
cooldownhit = true;
if (icehealth <= 15) {
_root.dragodead = true;
_root.gotoAndStop('dragondeath');
}
}
}
}
}
}
}
}
frame 343 {
background.gotoAndStop('ice1');
}
movieClip 3087 {
}
movieClip 3089 {
}
instance of movieClip 3089 {
onClipEvent (enterFrame) {
if (_root.found7 != 'k') {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.found7 = 'found';
_root.mobility = false;
_root.itemobtain.gotoAndStop('sauce');
this.unloadMovie();
}
}
}
instance of movieClip 2343 {
onClipEvent (load) {
jumpstart = false;
jumpnum = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player.jumpHeight = 30;
if (Key.isDown(87)) {
this.play();
if (jumpstart == false) {
_root.boing.start();
jumpstart = true;
}
}
} else {
_root.player.jumpHeight = 20;
}
}
onClipEvent (enterFrame) {
if (jumpstart == true) {
++jumpnum;
if (jumpnum == 10) {
jumpnum = 0;
jumpstart = false;
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,7d';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,13';
}
}
}
}
instance of movieClip 2887 {
onClipEvent (load) {
num = Math.round(Math.random() * 100);
}
onClipEvent (load) {
_root.attachMovie('ebar', 'ebar' + num, _root.getNextHighestDepth());
}
onClipEvent (enterFrame) {
_root['ebar' + num]._width = ehp * 6;
_root['ebar' + num]._x = this._x - 100;
_root['ebar' + num]._y = this._y - 200;
if (death == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.bardelete == true) {
_root['ebar' + num].unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.mobility == false) {
if (frozen == false) {
if (death == false) {
this.gotoAndStop(1);
}
}
}
}
onClipEvent (load) {
var egrav = 0;
ex = 5;
frozen = false;
taknum = 1;
frozentimer = 0;
var scale = this._xscale;
var distance = 300;
edamage = 10;
radius = 5;
espeed = 6;
etack = false;
ehit = false;
takstart = false;
taktimer = 0;
cooldown = 0;
cooldownp = false;
currenthit = false;
ehittimer = false;
heebeijeeb = 0;
ehp = 30;
death = false;
deathcount = 0;
freezeover = false;
taki = false;
combono = 0;
commie = 0;
dcsound = false;
}
onClipEvent (enterFrame) {
if (etack == false) {
++combono;
if (combono >= 30) {
taknum = 1;
combono = 0;
}
} else {
if (etack == true) {
combono = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (frozen == true) {
if (freezeover == false) {
gotoAndStop('frozen');
++frozentimer;
if (frozentimer > _root.freezetime) {
frozentimer = 0;
freezeover = true;
}
}
}
}
}
onClipEvent (enterFrame) {
if (freezeover == true) {
++frozentimer;
gotoAndStop('freezebreak');
if (frozentimer == 8) {
_root.glass_break.start(0.22, 1);
frozen = false;
freezeover = false;
frozentimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (ehp <= 0) {
death = true;
this.gotoAndStop('die');
}
}
onClipEvent (enterFrame) {
if (death == true) {
++deathcount;
if (dcsound == false) {
_root.wind.start();
_root.howl.start();
dcsound = true;
}
if (deathcount == 1) {
_root.expplus(this._x, this._y, 150);
}
if (deathcount == 40) {
this.unloadMovie();
}
}
}
onClipEvent (enterFrame) {
if (ehittimer == true) {
++heebeijeeb;
}
if (heebeijeeb >= 8) {
heebeijeeb = 0;
ehittimer = false;
ehit = false;
}
}
onClipEvent (enterFrame) {
if (taknum >= 4) {
++combono;
if (combono == 10) {
combono = 0;
taknum = 1;
}
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (etack == true) {
takstart = true;
}
}
onClipEvent (enterFrame) {
if (takstart == true) {
++taktimer;
}
if (taktimer == 1) {
_root.wind.start();
}
if (taktimer == 17) {
taktimer = 0;
takstart = false;
++taknum;
etack = false;
if (taknum == 4) {
cooldownp = -10;
}
cooldownp = true;
}
}
onClipEvent (enterFrame) {
if (cooldownp == true) {
++cooldown;
}
if (cooldown == 1) {
cooldown = 0;
cooldownp = false;
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (frozen == false) {
if (this.hitTest(_root.player) && _root.magic == true) {
if (_root.classi == 'fire1' || 'lightning1') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.01;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire2' || 'lightning2') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.03;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire3' || 'lightning3') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
ehp -= 0.5;
heebiejeeb = 0;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
this.gotoAndStop('hit');
ehit = true;
_root.freeze.start(0, 1);
ehp += 2;
if (_root.direc == 'left') {
this._x -= 10;
}
if (_root.direc == 'right') {
this._x += 10;
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (this.hitTest(_root.player)) {
if (_root.attacking == true) {
if (ehit == false) {
ehp -= _root.setdamage;
_root.mypunch_hit.start(0, 1);
ehit = true;
ehittimer = true;
heebiejeeb = 0;
if (frozen == false) {
this.gotoAndStop('hit');
if (_root.direc == 'left') {
this._x -= _root.setdistance - 4;
}
if (_root.direc == 'right') {
this._x += _root.setdistance + 4;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false) {
if (cooldownp == false) {
if (_root.mobility == true) {
if (ehit == false) {
if (this.hitTest(_root.player)) {
etack = true;
if (taknum == 1) {
gotoAndStop('etak1');
}
if (taknum == 2) {
gotoAndStop('etak2');
}
if (taknum == 3) {
gotoAndStop('etak3');
}
_root.magic = false;
_root.attacking = false;
if (_root.painallowed == true) {
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 5;
_root.mypunch_hit.start();
if (this._x > _root.player._x) {
_root.player._x -= 10;
}
if (this._x < _root.player._x) {
_root.player._x += 10;
}
if (taknum == 3) {
_root.thump.start();
if (this._x > _root.player._x) {
_root.momentum = -20;
}
if (this._x < _root.player._x) {
_root.momentum = 20;
}
}
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance) {
this.gotoAndStop(2);
this._x -= espeed;
this._xscale = -scale;
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance) {
this.gotoAndStop(2);
this._x += espeed;
this._xscale = scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
frame 344 {
background.gotoAndStop('ice1');
}
movieClip 3095 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,12b';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,14';
}
}
}
}
frame 345 {
if (puzzle2solved == true) {
ground1.gotoAndStop('end');
slider.gotoAndStop('end');
}
}
frame 345 {
background.gotoAndStop('ice1');
}
movieClip 3102 {
frame 1 {
stop();
}
frame 93 {
stop();
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,13b';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,15';
}
}
}
}
movieClip 3108 {
frame 1 {
stop();
movement = false;
according = 1;
}
frame 29 {
stop();
movement = false;
according = 2;
}
frame 60 {
stop();
movement = false;
according = 3;
}
}
instance mover1 of movieClip 3108 {
onClipEvent (load) {
movement = false;
according = 1;
}
onClipEvent (enterFrame) {
if (_root.mobility == true && movement == false) {
if (_root.puzzle2solved == false) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.ping1.start();
movement = true;
play();
}
}
}
}
}
onClipEvent (enterFrame) {
_root.mover1stage = this.according;
}
}
instance mover2 of movieClip 3108 {
onClipEvent (load) {
movement = false;
according = 1;
}
onClipEvent (enterFrame) {
if (_root.mobility == true && movement == false) {
if (_root.puzzle2solved == false) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
movement = true;
_root.ping2.start();
play();
}
}
}
}
}
onClipEvent (enterFrame) {
_root.mover2stage = according;
}
}
instance mover3 of movieClip 3108 {
onClipEvent (load) {
movement = false;
according = 1;
}
onClipEvent (enterFrame) {
if (_root.mobility == true && movement == false) {
if (_root.puzzle2solved == false) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
movement = true;
_root.ping3.start();
play();
}
}
}
}
}
onClipEvent (enterFrame) {
_root.mover3stage = according;
}
}
movieClip 3114 {
}
movieClip 3115 {
frame 1 {
stop();
cog1.stop();
cog2.stop();
}
frame 94 {
stop();
cog1.stop();
cog2.stop();
_root.rockgrind.stop('rockgrind');
}
}
instance slider of movieClip 3115 {
onClipEvent (enterFrame) {
if (_root.mover1stage == 3 && _root.mover2stage == 2 && _root.mover3stage == 1) {
if (_root.puzzle2solved == false) {
_root.ground1.play();
_root.slider.play();
_root.rockgrind.start(1, 2);
_root.puzzle2solved = true;
}
}
}
}
frame 346 {
background.gotoAndStop('iceinside2');
}
movieClip 3117 {
frame 1 {
stop();
}
frame 4 {
_root.floodlight.start();
}
frame 10 {
stop();
_root.lock.gotoAndStop(2);
_root.reddoor = true;
}
}
instance of movieClip 3117 {
onClipEvent (enterFrame) {
if (_root.reddoor == false) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
this.play();
}
}
}
}
onClipEvent (load) {
if (_root.reddoor == true) {
gotoAndStop(314);
}
}
}
movieClip 3120 {
frame 1 {
stop();
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,8b';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area2,7b';
}
}
}
}
frame 347 {
stopAllSounds();
_root.musictype = 0;
if (_root.howtobe == true) {
_root.player._x = 54;
_root.player._y = 520;
_root.boss2build.start();
_root.howtobe = false;
}
if (_root.aftermovie7 == true) {
_root.player._x = 54;
_root.player._y = 520;
_root.aftermovie7 = false;
}
_root.boss2build.onSoundComplete = function () {
_root.boss2main.start(0, 99);
};
}
frame 347 {
background.gotoAndStop('boss2fight');
}
instance of movieClip 2472 {
onClipEvent (load) {
if (_root.movie6 == true) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.movie6 == false) {
if (this.hitTest(_root.player)) {
_root.fade.play();
_root.fadefunks = 'movie6';
_root.mobility = false;
_root.movie6 = true;
}
}
}
}
movieClip 3124 {
}
instance of movieClip 2258 {
onClipEvent (load) {
if (_root.shouldntbetherebk == true) {
this.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.shouldntbetherebk == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'tournamentbb';
}
}
}
}
}
movieClip 3147 {
}
movieClip 3163 {
}
movieClip 3179 {
}
movieClip 3182 {
}
movieClip 3189 {
}
movieClip 3202 {
frame 12 {
stop();
}
}
movieClip 3208 {
}
movieClip 3213 {
}
movieClip 3222 {
}
movieClip 3236 {
}
movieClip 3248 {
}
movieClip 3252 {
frame 4 {
stop();
}
}
movieClip 3256 {
frame 6 {
stop();
}
}
movieClip 3262 {
frame 5 {
stop();
}
}
movieClip 3266 {
frame 3 {
stop();
}
}
movieClip 3272 {
frame 5 {
stop();
}
}
movieClip 3283 {
frame 19 {
stop();
}
frame 20 {
stop();
}
}
movieClip 3292 {
}
movieClip 3293 {
}
instance boss2 of movieClip 3293 {
onClipEvent (load) {
if (_root.movie6 == false) {
this.unloadMovie();
}
if (_root.aftermovie7 == true) {
this.unloadMovie();
}
if (_root.shouldntbetherebk == true) {
this.unloadMovie();
}
}
onClipEvent (load) {
ehp = 75;
gameplay = 1;
var egrav = 0;
ex = 5;
camplus = 0;
frozen = false;
taknum = 1;
frozentimer = 0;
var scale = this._xscale;
var distance = 1000;
edamage = 10;
radius = 5;
espeed = 2.5;
etack = false;
ehit = false;
takstart = false;
taktimer = 0;
cooldown = 0;
cooldownp = false;
currenthit = false;
ehitimmer = false;
ehitCounter = 0;
heebeijeeb = 0;
death = false;
deathcount = 0;
freezeover = false;
taki = false;
combono = 0;
commie = 0;
dcsound = false;
emp = 0;
var guardHP = 8;
etacktactic = 'un';
emprate = 0.3;
etacktactic = 0;
boss2damage = 5;
hitted = false;
difficulty = 0;
guardRecharge = 0;
stun = false;
charge = false;
chargenum = 0;
heights = 4;
speaking1 = false;
speaking2 = false;
gameplay2a = false;
gameplay2b = false;
gameplay2c = false;
based = false;
gameplay2num = 0;
touchgrab = false;
etackcool = false;
takcooltime = 0;
basetime = 0;
spring = false;
springnum = 0;
rightside = false;
leftside = false;
gameplay2bcount = 0;
takcool = 0;
hastouched = false;
gameplay2count = 0;
comboAttack = 0;
burnnumber = 0;
burncount = 0;
setdeteriorate = 0.05;
gameplay3a = false;
gameplay3b = false;
gameplay3c = false;
gameplay3num = 0;
gameplay3count = 0;
gameplay3timer = 0;
preboomx;
dusttime = 0;
gameplay2numx = 0;
boss2blasthit = false;
}
onClipEvent (enterFrame) {
if (gameplay > 1) {
guardHP = 0;
}
_root.bossbar.boss2health._width = ehp * 4;
}
onClipEvent (enterFrame) {
if (frozen == false && stun == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance && this._x > 48) {
if (gameplay == 3) {
gotoAndStop('angry');
} else {
this.gotoAndStop('walk');
}
this._x -= espeed;
this._xscale = scale;
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance && this._x < 514) {
if (gameplay == 3) {
gotoAndStop('angry');
} else {
this.gotoAndStop('walk');
}
this._x += espeed;
this._xscale = -scale;
}
}
}
} else {
if (gameplay == 3) {
gotoAndStop('angry');
} else {
this.gotoAndStop('idle');
}
}
}
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + heights, true) || gameplay2b == true || gameplay3a == true) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (etackcool == true && _root.mobility == true) {
++takcooltime;
if (takcooltime == 1) {
comboAttack += 1;
}
if (comboAttack == 2) {
stun = true;
etackcool = false;
takcooltime = 0;
comboAttack = 0;
etack = false;
}
if (takcooltime == 50) {
etackcool = false;
takcooltime = 0;
etack = false;
}
}
}
onClipEvent (enterFrame) {
emp += emprate;
if (emp >= 50) {
emp = 50;
}
}
onClipEvent (enterFrame) {
if (cooldownp == true) {
++cooldown;
if (cooldown == 30) {
cooldownp = false;
cooldown = 0;
}
}
}
onClipEvent (enterFrame) {
boss2damage -= 3;
}
onClipEvent (enterFrame) {
if (gameplay == 1) {
if (this._x - _root.player._x < 200 && this._x - _root.player._x > 0) {
if (etack == false && _root.mobility == true && ehit == false && death == false && frozen == false && cooldownp == false && emp > 10 && stun == false) {
etack = true;
}
}
}
}
onClipEvent (enterFrame) {
if (gameplay == 1) {
if (sx - tx < 200 && sx - tx > 0) {
if (etack == false && _root.mobility == true && ehit == false && death == false && frozen == false && cooldownp == false && emp > 10 && stun == false) {
etack = true;
}
}
}
}
onClipEvent (enterFrame) {
if (gameplay == 1) {
if (etack == true) {
++taktimer;
if (taktimer == 1) {
_root.wind.start();
hitted = true;
etacktactic = Math.round(Math.random() * 1) + 1;
if (etacktactic == 1) {
gotoAndStop('etack1');
boss2damage = 5;
emp -= 9;
}
if (etacktactic == 2) {
hitted = true;
gotoAndStop('etack2');
boss2damage = 8;
emp -= 9;
}
if (etacktactic == 3) {
if (emp >= 20) {
hitted = true;
gotoAndStop('etack3');
boss2damage = 15;
emp -= 19;
} else {
gotoAndStop('etack1');
}
hitted = true;
boss2damage = 8;
emp -= 9;
}
}
if (taktimer == 15) {
etack = false;
taktimer = 0;
gotoAndStop('idle');
cooldownp = true;
}
}
}
}
onClipEvent (enterFrame) {
if (hitted == true && etack == true && gameplay == 1 && this.hitTest(_root.player) && _root.painallowed == true) {
if (etacktactic == 1) {
hitted = false;
_root.mypunch_hit.start();
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= boss2damage;
if (this._x > _root.player._x) {
_root.momentum = -8;
}
if (this._x < _root.player._x) {
_root.momentum = 8;
}
}
if (etacktactic == 2) {
_root.mypunch_hit.start();
hitted = false;
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= boss2damage;
if (this._x > _root.player._x) {
_root.momentum = -8;
}
if (this._x < _root.player._x) {
_root.momentum = 8;
}
}
}
}
onClipEvent (load) {
shuffle = function () {
etacktactic = Math.round(Math.random() * 1) + 1;
};
}
onClipEvent (enterFrame) {
if (gameplay == 2 && _root.mobility == true) {
if (stun == false && etack == false && etackcool == false) {
shuffle();
if (_root.player._y > this._y + 30) {
gameplay2at();
} else {
if (etacktactic == 1) {
gameplay2bt();
}
if (etacktactic == 2) {
gameplay2ct();
}
}
}
}
}
onClipEvent (load) {
gameplay2at = function () {
etack = true;
gameplay2c = false;
gameplay2b = false;
gameplay2a = true;
based = false;
gameplay2num = 0;
};
}
onClipEvent (enterFrame) {
if (gameplay2a == true && _root.mobility == true) {
if (based == false) {
if (this._x >= 275 && this._x <= 280) {
based = true;
}
if (this._x > 279) {
this._xscale = scale;
this._x -= espeed;
this.gotoAndStop('walk');
}
if (this._x < 277) {
this._xscale = -scale;
this._x += espeed;
this.gotoAndStop('walk');
}
}
if (touchgrab == true) {
++gameplay2num;
if (gameplay2num == 10) {
_root.otheraction = true;
_root.player.gotoAndStop('airhit1');
_root.player._x = 274;
_root.player._y = 400;
_root.player.grav = 0;
_root.player.grav = -15;
gotoAndStop('hitCharge');
}
if (gameplay2num == 36) {
gotoAndStop('hitExplode');
}
if (gameplay2num == 46) {
gameplay2a = false;
_root.boom.start();
_root.attachMovie('upthrust', 'upthrust', 47);
_root.upthrust._x = this._x;
_root.upthrust._y = this._y;
_root.player.grav = -30;
_root.airhit = true;
_root.health -= 20;
etack = false;
etackcool = true;
gotoAndStop('idle');
}
}
if (based == true && touchgrab == false) {
++basetime;
this.gotoAndStop('longreach');
_root.wind.start();
if (basetime == 24) {
etack = false;
stun = false;
gameplay2a = false;
etackcool = true;
gotoAndStop(305);
}
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (gameplay2a == true && touchgrab == false && _root.mobility == true) {
if (this.hitTest(_root.player)) {
this.reacher.gotoAndPlay('retract');
_root.otheraction = true;
touchgrab = true;
_root.player._x = 271.4;
_root.player._y = 979.1;
_root.player.gotoAndStop('boss2grab');
}
}
}
}
onClipEvent (load) {
gameplay2bt = function () {
etack = true;
gameplay2bcount = 0;
gameplay2num = 0;
gameplay2b = true;
based = false;
};
}
onClipEvent (enterFrame) {
if (gameplay2b == true && _root.mobility == true) {
etack = true;
if (gameplay2bcount == 5) {
gameplay2b = false;
etackcool = true;
gameplay2bcount = 0;
etack = false;
}
if (based == false) {
++gameplay2num;
gotoAndStop('cling');
if (this._x >= 277) {
_xscale = scale;
}
if (this._x < 277) {
_xscale = -scale;
}
if (gameplay2num == 15) {
_root.wind.start();
gameplay2num = 0;
based = true;
spring = true;
}
}
if (based == true) {
if (spring == true) {
gotoAndStop('spring');
if (_xscale == scale) {
this._x -= 40;
if (gameplay2bcount == 4) {
if (this._x <= 277) {
springhalt();
spring = false;
}
}
if (this._x <= -220) {
springhalt();
spring = false;
}
}
if (_xscale == -scale) {
this._x += 40;
if (gameplay2bcount == 4) {
if (this._x >= 277) {
springhalt();
spring = false;
}
}
if (this._x >= 750) {
springhalt();
spring = false;
}
}
}
if (spring == false) {
++gameplay2num;
if (gameplay2num == 20) {
gameplay2num = 0;
based = false;
}
}
}
}
}
onClipEvent (load) {
springhalt = function () {
hastouched = false;
if (gameplay2bcount <= 3) {
this._y = 544;
} else {
if (gameplay2bcount >= 4) {
this._y = 520;
}
}
gameplay2bcount += 1;
rightside = false;
leftside = false;
springnum = 18;
if (_xscale == -scale) {
rightside = true;
}
if (_xscale == scale) {
leftside = true;
}
};
}
onClipEvent (enterFrame) {
if (rightside == true) {
--springnum;
_xscale = scale;
gotoAndStop('springstop');
this._x += springnum;
}
if (leftside == true) {
--springnum;
_xscale = -scale;
gotoAndStop('springstop');
this._x -= springnum;
}
if (springnum <= 0) {
rightside = false;
leftside = false;
}
}
onClipEvent (enterFrame) {
if (_root.painallowed == true && gameplay2b == true && spring == true && this.hitTest(_root.player) && hastouched == false) {
_root.health -= 10;
hastouched = true;
_root.thump.start();
_root.otheraction = true;
_root.player.grav -= 5;
_root.airhit = true;
if (_xscale == scale) {
_root.momentum = -20;
}
if (_xscale == -scale) {
_root.momentum = 20;
}
}
}
onClipEvent (load) {
gameplay2ct = function () {
etack = true;
gameplay2b = false;
gameplay2a = false;
gameplay2c = true;
based = false;
gameplay2num = 0;
gameplay2count = 0;
gameplay2numx = 0;
};
}
onClipEvent (enterFrame) {
if (gameplay2c == true && _root.mobility == true) {
if (based == false) {
this.gotoAndStop('game2c1');
++gameplay2numx;
if (gameplay2numx >= 10) {
gameplay2numx = 0;
based = true;
}
}
if (based == true) {
if (gameplay2count <= 6) {
gotoAndStop('game2c2');
++gameplay2num;
if (gameplay2num >= 30) {
_root.wing.start();
_root.attachMovie('scarfhand', 'scarfhand', 89);
_root.scarfhand._x = _root.player._x;
_root.scarfhand._y = _root.ground1._y + 30;
gameplay2num = 0;
gameplay2count += 1;
}
} else {
if (gameplay2count > 6) {
gameplay2c = false;
etack = false;
etackcool = true;
gameplay2c = false;
}
}
}
}
}
onClipEvent (enterFrame) {
if (_root.scarfhand.hitTest(_root.player)) {
if (_root.painallowed == true) {
_root.mypunch_hit.start();
_root.health -= 8;
_root.painallowed = false;
_root.otheraction = true;
_root.player.gotoAndStop('hited');
if (_root.scarfhand._x > _root.player._x) {
_root.momentum = 5;
}
if (_root.scarfhand._x < _root.player._x) {
_root.momentum = -5;
}
}
}
}
onClipEvent (enterFrame) {
if (gameplay == 2 && _root.mobility == true) {
if (stun == false) {
++burncount;
if (burncount >= 3) {
++_root.loaditems;
_root.attachMovie('slowburn', 'slowburn' + _root.loaditems, _root.getNextHighestDepth());
_root['slowburn' + _root.loaditems]._x = this._x;
_root['slowburn' + _root.loaditems]._y = this._y - 100;
++burnnumber;
burncount = 0;
}
}
if (stun == true) {
guardHP = 0;
++gameplay2num;
if (gameplay2num == 200) {
stun = false;
etack = false;
etackcool = false;
gameplay2num = 0;
comboAttack = 0;
gameplay2b = false;
gameplay2a = false;
gameplay2c = false;
}
if (ehit == false) {
gotoAndStop('recharge');
}
} else {
guardHP = 15;
}
}
}
onClipEvent (enterFrame) {
if (gameplay == 3) {
ehp -= setdeteriorate;
}
}
onClipEvent (enterFrame) {
if (gameplay == 3) {
++dusttime;
if (dusttime == 15) {
++_root.loaditems;
_root.attachMovie('hover', 'hover' + _root.loaditems, _root.getNextHighestDepth());
_root['hover' + _root.loaditems]._x = this._x;
_root['hover' + _root.loaditems]._y = _root.ground1._y + 20;
dusttime = 0;
}
}
}
onClipEvent (enterFrame) {
if (gameplay == 3 && _root.mobility == true) {
if (etack == false && etackcool == false) {
etacktactic = Math.round(Math.random() * 1) + 1;
if (etacktactic == 1) {
gameplay3at();
}
if (etacktactic == 2) {
gameplay3bt();
}
}
}
}
onClipEvent (load) {
gameplay3at = function () {
etack = true;
gameplay3a = true;
based = false;
gameplay3num = 0;
gameplay3timer = 0;
};
}
onClipEvent (enterFrame) {
if (gameplay3a == true && _root.mobility == true) {
if (based == false) {
gotoAndStop('angry');
this._y -= 5;
if (this._y <= 400) {
based = true;
}
}
if (based == true) {
gotoAndStop('angry2');
energypose.play();
++gameplay3num;
++gameplay3timer;
if (gameplay3timer == 1) {
_root.angrywind.start(0, 99);
_root.magicnoises.start();
_root.attachMovie('boss2energyball', 'boss2energyball', 77());
_root.boss2energyball._x = this._x;
_root.boss2energyball._y = this._y - 100;
}
if (gameplay3timer == 4) {
_root.burning.start(0, 99);
}
if (gameplay3num == 4) {
++_root.loaditems;
_root.attachMovie('boss2ball', 'boss2ball' + _root.loaditems, _root.getNextHighestDepth());
_root['boss2ball' + _root.loaditems]._x = Math.random() * 700;
_root['boss2ball' + _root.loaditems]._y = -20;
gameplay3num = 0;
}
if (gameplay3timer == 120) {
_root.burning.stop('burning');
_root.angrywind.stop('angrywind');
_root.boss2energyball.unloadMovie();
etack = false;
etackcool = true;
gameplay3a = false;
}
}
}
}
onClipEvent (load) {
gameplay3bt = function () {
gameplay3b = true;
etack = true;
based = false;
gameplay3num = 0;
gameplay3timer = 0;
boss2blasthit = false;
};
}
onClipEvent (enterFrame) {
if (gameplay3b == true && _root.mobility == true) {
if (based == false) {
++gameplay3num;
gotoAndStop('angry2');
if (gameplay3num >= 2) {
_root.preboom._x = _root.player._x;
_root.preboom._y = _root.player._y;
}
if (gameplay3num == 1) {
++_root.loaditems;
_root.attachMovie('preboom', 'preboom', 75());
}
if (gameplay3num == 50) {
preboomx = _root.preboom._x;
_root.preboom.unloadMovie();
}
if (gameplay3num == 60) {
++_root.loaditems;
_root.boom.start();
_root.attachMovie('boss2blast', 'boss2blast' + _root.loaditems, _root.getNextHighestDepth());
_root['boss2blast' + _root.loaditems]._x = preboomx;
_root['boss2blast' + _root.loaditems]._y = _root.player._y + 10;
based = true;
}
}
if (based == true) {
++gameplay3num;
gotoAndStop('angry3');
if (gameplay2num == 68) {
gotoAndStop('angry2');
energypose.gotoAndPlay(21);
}
if (gameplay3num == 72) {
etack = false;
gameplay3b = false;
}
}
}
}
onClipEvent (enterFrame) {
if (_root.mobility == true && _root.painallowed == true && boss2blasthit == false) {
if (_root['boss2blast' + _root.loaditems].hitTest(_root.player)) {
_root.otheraction = true;
_root.player._y -= 10;
_root.player.grav = -25;
_root.airhit = true;
_root.health -= 20;
boss2blasthit = true;
}
}
}
onClipEvent (enterFrame) {
if (ehp < 0) {
_root.boss2energyball.unloadMovie();
_root.gotoAndStop('movie7');
}
}
onClipEvent (enterFrame) {
if (_root.attacking == true && this.hitTest(_root.player) && death == false && ehit == false && charge == false && gameplay < 3) {
eHit();
}
if (_root.magic == true && this.hitTest(_root.player) && death == false && ehit == false && charge == false && gameplay < 3) {
magiceHit();
}
}
onClipEvent (load) {
eHit = function () {
if (guardHP > 0) {
ehit = true;
gotoAndStop('ehitBlock');
_root.muffledHit.start();
guardHP -= 1;
if (_root.player._x > this._x && this._x > 48) {
this._x -= _root.setdistance;
}
if (_root.player._x < this._x && this._x < 514) {
this._x += _root.setdistance;
}
}
if (guardHP <= 0) {
ehit = true;
gotoAndStop('ehitStun');
_root.mypunch_hit.start();
ehp -= 1;
if (_root.player._x > this._x && this._x > 48) {
this._x -= _root.setdistance;
}
if (_root.player._x < this._x && this._x < 514) {
this._x += _root.setdistance;
}
}
};
magiceHit = function () {
++_root.loaditems;
ehit = true;
_root.attachMovie('immunity', 'got' + _root.loaditems, _root.getNextHighestDepth());
_root['got' + _root.loaditems]._x = this._x;
_root['got' + _root.loaditems]._y = this._y - 50;
_root.muffledHit.start();
};
}
onClipEvent (enterFrame) {
if (ehit == true) {
++ehitCounter;
if (stun == true) {
if (ehitCounter == 8) {
ehitCounter = 0;
ehit = false;
}
}
if (ehitCounter == 10) {
ehit = false;
ehitCounter = 0;
}
}
}
onClipEvent (enterFrame) {
if (gameplay == 1) {
if (guardHP <= 0) {
stun = true;
guardBreak();
}
}
}
onClipEvent (load) {
guardBreak = function () {
++guardRecharge;
if (guardRecharge == 1) {
_root.glass_break.start();
_root.attachMovie('boss2flash', 'boss2flash', 40);
_root.boss2flash._x = this._x;
_root.boss2flash._y = this._y - 95;
gotoAndStop('guardBreak');
}
if (guardRecharge >= 12 && ehit == false) {
gotoAndStop('recharge');
}
if (guardRecharge == 100) {
charge = true;
guardRecharge = 0;
guardHP = 8;
}
};
}
onClipEvent (enterFrame) {
if (charge == true) {
++chargenum;
if (chargenum == 1) {
gotoAndStop('hitCharge');
}
if (chargenum == 40) {
gotoAndStop('hitExplode');
_root.attachMovie('boss2boom', 'boss2boom', 40);
_root.boss2boom._x = this._x;
_root.boss2boom._y = this._y - 40;
}
if (chargenum == 50) {
stun = false;
charge = false;
chargenum = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.painallowed == true && _root.boss2boom.hitTest(_root.player)) {
_root.otheraction = true;
_root.airhit = true;
_root.health -= 20;
if (_root.boss2boom._x > _root.player._x) {
_root.momentum = -25;
} else {
_root.momentum = 25;
}
}
}
onClipEvent (enterFrame) {
if (ehp <= 50) {
if (speaking1 == false) {
dialogue1();
etack = false;
ehit = false;
_root.attacking = false;
_root.magic = false;
gotoAndStop('idle');
etackcool = false;
speaking1 = true;
}
}
}
onClipEvent (load) {
dialogue1 = function () {
_root.mobility = false;
_root.hud.gotoAndStop('boss2a');
gameplay = 2;
};
}
onClipEvent (enterFrame) {
if (ehp <= 25) {
if (speaking2 == false) {
dialogue2();
etack = false;
ehit = false;
etackcool = false;
speaking2 = true;
_root.mobility = false;
_root.attacking = false;
_root.magic = false;
gotoAndStop('angry');
}
}
}
onClipEvent (load) {
dialogue2 = function () {
_root.mobility = false;
gotoAndStop('angry');
_root.hud.gotoAndStop('boss2b');
_root.attachMovie('transformd', 'transformd', 56);
_root.transformd._x = this._x;
_root.transformd._y = this._y;
gameplay = 3;
};
}
}
movieClip 3296 {
}
movieClip 3300 {
}
movieClip 3301 {
instance of movieClip 3300 {
onClipEvent (enterFrame) {
if (_root.boss2.gameplay == 1) {
gotoAndStop(1);
}
if (_root.boss2.gameplay == 2) {
gotoAndStop(2);
}
if (_root.boss2.gameplay == 3) {
gotoAndStop(3);
}
}
}
}
instance bossbar of movieClip 3301 {
onClipEvent (enterFrame) {
if (_root.movie6 == false) {
this.unloadMovie();
}
if (_root.shouldntbetherebk == true) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
_y = _root.cam._y;
_x = _root.cam._x;
}
}
instance of movieClip 3293 {
onClipEvent (enterFrame) {
gotoAndStop('idle');
}
onClipEvent (load) {
if (_root.movie6 == true) {
this.unloadMovie();
}
}
}
frame 348 {
stopAllSounds();
_root.lvl3music.start(0, 99);
_root.musictype = 3;
}
frame 348 {
_root.background.gotoAndStop('darkness1');
}
instance of movieClip 2258 {
onClipEvent (enterFrame) {
if (_root.area3 == true) {
this.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.area3 == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'tournament3';
}
}
}
}
}
movieClip 3304 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,2';
}
}
}
}
instance of movieClip 2295 {
onClipEvent (load) {
if (_root.area3 == true) {
this.unloadMovie();
}
}
}
frame 349 {
_root.background.gotoAndStop('darkness1');
}
instance of movieClip 2343 {
onClipEvent (load) {
jumpstart = false;
jumpnum = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player.jumpHeight = 30;
if (Key.isDown(87)) {
this.play();
if (jumpstart == false) {
_root.boing.start();
jumpstart = true;
}
}
} else {
_root.player.jumpHeight = 20;
}
}
onClipEvent (enterFrame) {
if (jumpstart == true) {
++jumpnum;
if (jumpnum == 10) {
jumpnum = 0;
jumpstart = false;
}
}
}
}
movieClip 3308 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,1b';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,3';
}
}
}
}
instance of movieClip 2430 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player.grav = -10;
_root.player._x = -1195.7;
_root.player._y = -46.9;
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 20;
}
}
}
instance of movieClip 2472 {
onClipEvent (load) {
if (_root.movie2 == true) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.movie2 == false) {
_root.fade.play();
_root.fadefunks = 'movie2';
_root.mobility = false;
_root.movie2 = true;
_root.sethie.unloadMovie();
}
}
}
}
movieClip 3313 {
}
movieClip 3324 {
}
movieClip 3338 {
}
movieClip 3340 {
}
movieClip 3347 {
}
movieClip 3353 {
}
movieClip 3361 {
frame 25 {
stop();
}
}
movieClip 3368 {
}
movieClip 3378 {
frame 28 {
_parent.hadfirst = true;
_parent.death = false;
_parent.deathtimer = 0;
_parent.loadbar();
}
}
movieClip 3379 {
}
instance of movieClip 3379 {
onClipEvent (load) {
num = Math.round(Math.random() * 100);
hadfirst = false;
}
onClipEvent (enterFrame) {
if (hadfirst == false) {
death = true;
deathtimer = 0;
gotoAndStop('birth');
}
}
onClipEvent (load) {
loadbar = function () {
_root.attachMovie('ebar', 'ebar' + num, _root.getNextHighestDepth());
};
}
onClipEvent (enterFrame) {
_root['ebar' + num]._width = ehp * 6;
_root['ebar' + num]._x = this._x - 50;
_root['ebar' + num]._y = this._y - 200;
if (death == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.bardelete == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.boss3.lightson == true) {
_root['ebar' + num].unloadMovie();
this.unloadMovie();
}
}
onClipEvent (load) {
var egrav = 0;
ex = 5;
frozen = false;
var scale = this._xscale;
var distance = 300;
edamage = 10;
frozentimer = 0;
radius = 5;
espeed = 10;
dustguy = 0;
etack = false;
ehit = false;
takstart = false;
taktimer = 0;
cooldown = 0;
cooldownp = false;
currenthit = false;
ehittimer = false;
heebeijeeb = 0;
ehp = 10;
death = false;
deathcount = 0;
freezeover = false;
taki = false;
combono = 0;
commie = 0;
dcsound = false;
deathtimer = 0;
}
onClipEvent (enterFrame) {
if (etack == false) {
++combono;
if (combono >= 30) {
taknum = 1;
combono = 0;
}
} else {
if (etack == true) {
combono = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (frozen == true) {
if (freezeover == false) {
gotoAndStop('frozen');
++frozentimer;
if (frozentimer > _root.freezetime) {
frozentimer = 0;
freezeover = true;
}
}
}
}
}
onClipEvent (enterFrame) {
if (freezeover == true) {
++frozentimer;
gotoAndStop('freezebreak');
if (frozentimer == 8) {
_root.glass_break.start(0.22, 1);
frozen = false;
freezeover = false;
frozentimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (ehp <= 0) {
death = true;
this.gotoAndStop('die');
}
}
onClipEvent (enterFrame) {
if (ehittimer == true) {
++heebeijeeb;
}
if (heebeijeeb >= 8) {
heebeijeeb = 0;
ehittimer = false;
ehit = false;
}
}
onClipEvent (enterFrame) {
if (taknum >= 3) {
++combono;
if (combono == 10) {
combono = 0;
taknum = 1;
}
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 5, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (etack == true) {
takstart = true;
}
}
onClipEvent (enterFrame) {
if (takstart == true) {
++taktimer;
}
if (taktimer == 1) {
_root.wind.start();
}
if (taktimer == 17) {
taktimer = 0;
takstart = false;
++taknum;
etack = false;
if (taknum == 4) {
cooldownp = -10;
}
cooldownp = true;
}
}
onClipEvent (enterFrame) {
if (cooldownp == true) {
++cooldown;
}
if (cooldown == 1) {
cooldown = 0;
cooldownp = false;
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (frozen == false) {
if (this.hitTest(_root.player) && _root.magic == true) {
if (_root.classi == 'fire1' || 'lightning1') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.01;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire2' || 'lightning2') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.03;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire3' || 'lightning3') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
ehp -= 0.5;
heebiejeeb = 0;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
this.gotoAndStop('freeze');
frozen = true;
_root.freeze.start();
if (_root.direc == 'left') {
this._x -= 10;
}
if (_root.direc == 'right') {
this._x += 10;
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (this.hitTest(_root.player)) {
if (_root.attacking == true) {
if (ehit == false) {
ehp -= _root.setdamage;
_root.mypunch_hit.start(0, 1);
ehit = true;
ehittimer = true;
heebiejeeb = 0;
if (frozen == false) {
this.gotoAndStop('hit');
if (_root.direc == 'left') {
this._x -= _root.setdistance - 4;
}
if (_root.direc == 'right') {
this._x += _root.setdistance + 4;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == true) {
++deathtimer;
if (deathtimer == 2) {
_root.expplus(this._x, this._y, 100);
_root.wind.start();
}
if (deathtimer == 10) {
this.unloadMovie();
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false) {
if (cooldownp == false) {
if (_root.mobility == true) {
if (ehit == false) {
if (this.hitTest(_root.player)) {
etack = true;
if (taknum == 1) {
gotoAndStop('etak1');
}
if (taknum == 2) {
gotoAndStop('etak2');
}
_root.magic = false;
_root.attacking = false;
if (_root.painallowed == true) {
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 5;
_root.mypunch_hit.start();
if (this._x > _root.player._x) {
_root.player._x -= 10;
}
if (this._x < _root.player._x) {
_root.player._x += 10;
}
if (taknum == 2) {
_root.thump.start();
if (this._x > _root.player._x) {
_root.momentum = -20;
}
if (this._x < _root.player._x) {
_root.momentum = 20;
}
}
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance) {
++dustguy;
if (dustguy == 3) {
++_root.loaditems;
_root.attachMovie('dust', 'dust' + _root.loaditems, _root.getNextHighestDepth());
_root['dust' + _root.loaditems]._x = this._x;
_root['dust' + _root.loaditems]._y = this._y;
dustguy = 0;
}
this.gotoAndStop(2);
this._x -= espeed;
this._xscale = scale;
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance) {
++dustguy;
if (dustguy == 3) {
++_root.loaditems;
_root.attachMovie('dust', 'dust' + _root.loaditems, _root.getNextHighestDepth());
_root['dust' + _root.loaditems]._x = this._x;
_root['dust' + _root.loaditems]._y = this._y;
dustguy = 0;
}
this.gotoAndStop(2);
this._x += espeed;
this._xscale = -scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
frame 350 {
_root.background.gotoAndStop('darkness2');
}
movieClip 3382 {
}
movieClip 3384 {
}
instance of movieClip 3384 {
onClipEvent (enterFrame) {
if (_root.found8 != 'k') {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.found8 = 'found';
_root.mobility = false;
_root.itemobtain.gotoAndStop('knife');
this.unloadMovie();
}
}
}
instance of movieClip 2343 {
onClipEvent (load) {
jumpstart = false;
jumpnum = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player.jumpHeight = 30;
if (Key.isDown(87)) {
this.play();
if (jumpstart == false) {
_root.boing.start();
jumpstart = true;
}
}
} else {
_root.player.jumpHeight = 20;
}
}
onClipEvent (enterFrame) {
if (jumpstart == true) {
++jumpnum;
if (jumpnum == 10) {
jumpnum = 0;
jumpstart = false;
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,2b';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,4';
}
}
}
}
instance of movieClip 3379 {
onClipEvent (load) {
num = Math.round(Math.random() * 100);
hadfirst = false;
}
onClipEvent (enterFrame) {
if (hadfirst == false) {
death = true;
deathtimer = 0;
gotoAndStop('birth');
}
}
onClipEvent (load) {
loadbar = function () {
_root.attachMovie('ebar', 'ebar' + num, _root.getNextHighestDepth());
};
}
onClipEvent (enterFrame) {
_root['ebar' + num]._width = ehp * 6;
_root['ebar' + num]._x = this._x - 50;
_root['ebar' + num]._y = this._y - 200;
if (death == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.bardelete == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.boss3.lightson == true) {
_root['ebar' + num].unloadMovie();
this.unloadMovie();
}
}
onClipEvent (load) {
var egrav = 0;
ex = 5;
frozen = false;
var scale = this._xscale;
var distance = 300;
edamage = 10;
frozentimer = 0;
radius = 5;
espeed = 10;
dustguy = 0;
etack = false;
ehit = false;
takstart = false;
taktimer = 0;
cooldown = 0;
cooldownp = false;
currenthit = false;
ehittimer = false;
heebeijeeb = 0;
ehp = 10;
death = false;
deathcount = 0;
freezeover = false;
taki = false;
combono = 0;
commie = 0;
dcsound = false;
deathtimer = 0;
}
onClipEvent (enterFrame) {
if (etack == false) {
++combono;
if (combono >= 30) {
taknum = 1;
combono = 0;
}
} else {
if (etack == true) {
combono = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (frozen == true) {
if (freezeover == false) {
gotoAndStop('frozen');
++frozentimer;
if (frozentimer > _root.freezetime) {
frozentimer = 0;
freezeover = true;
}
}
}
}
}
onClipEvent (enterFrame) {
if (freezeover == true) {
++frozentimer;
gotoAndStop('freezebreak');
if (frozentimer == 8) {
_root.glass_break.start(0.22, 1);
frozen = false;
freezeover = false;
frozentimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (ehp <= 0) {
death = true;
this.gotoAndStop('die');
}
}
onClipEvent (enterFrame) {
if (ehittimer == true) {
++heebeijeeb;
}
if (heebeijeeb >= 8) {
heebeijeeb = 0;
ehittimer = false;
ehit = false;
}
}
onClipEvent (enterFrame) {
if (taknum >= 3) {
++combono;
if (combono == 10) {
combono = 0;
taknum = 1;
}
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 5, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (etack == true) {
takstart = true;
}
}
onClipEvent (enterFrame) {
if (takstart == true) {
++taktimer;
}
if (taktimer == 1) {
_root.wind.start();
}
if (taktimer == 17) {
taktimer = 0;
takstart = false;
++taknum;
etack = false;
if (taknum == 4) {
cooldownp = -10;
}
cooldownp = true;
}
}
onClipEvent (enterFrame) {
if (cooldownp == true) {
++cooldown;
}
if (cooldown == 1) {
cooldown = 0;
cooldownp = false;
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (frozen == false) {
if (this.hitTest(_root.player) && _root.magic == true) {
if (_root.classi == 'fire1' || 'lightning1') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.01;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire2' || 'lightning2') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.03;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire3' || 'lightning3') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
ehp -= 0.5;
heebiejeeb = 0;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
this.gotoAndStop('freeze');
frozen = true;
_root.freeze.start();
if (_root.direc == 'left') {
this._x -= 10;
}
if (_root.direc == 'right') {
this._x += 10;
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (this.hitTest(_root.player)) {
if (_root.attacking == true) {
if (ehit == false) {
ehp -= _root.setdamage;
_root.mypunch_hit.start(0, 1);
ehit = true;
ehittimer = true;
heebiejeeb = 0;
if (frozen == false) {
this.gotoAndStop('hit');
if (_root.direc == 'left') {
this._x -= _root.setdistance - 4;
}
if (_root.direc == 'right') {
this._x += _root.setdistance + 4;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == true) {
++deathtimer;
if (deathtimer == 2) {
_root.expplus(this._x, this._y, 100);
_root.wind.start();
}
if (deathtimer == 10) {
this.unloadMovie();
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false) {
if (cooldownp == false) {
if (_root.mobility == true) {
if (ehit == false) {
if (this.hitTest(_root.player)) {
etack = true;
if (taknum == 1) {
gotoAndStop('etak1');
}
if (taknum == 2) {
gotoAndStop('etak2');
}
_root.magic = false;
_root.attacking = false;
if (_root.painallowed == true) {
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 5;
_root.mypunch_hit.start();
if (this._x > _root.player._x) {
_root.player._x -= 10;
}
if (this._x < _root.player._x) {
_root.player._x += 10;
}
if (taknum == 2) {
_root.thump.start();
if (this._x > _root.player._x) {
_root.momentum = -20;
}
if (this._x < _root.player._x) {
_root.momentum = 20;
}
}
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance) {
++dustguy;
if (dustguy == 3) {
++_root.loaditems;
_root.attachMovie('dust', 'dust' + _root.loaditems, _root.getNextHighestDepth());
_root['dust' + _root.loaditems]._x = this._x;
_root['dust' + _root.loaditems]._y = this._y;
dustguy = 0;
}
this.gotoAndStop(2);
this._x -= espeed;
this._xscale = scale;
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance) {
++dustguy;
if (dustguy == 3) {
++_root.loaditems;
_root.attachMovie('dust', 'dust' + _root.loaditems, _root.getNextHighestDepth());
_root['dust' + _root.loaditems]._x = this._x;
_root['dust' + _root.loaditems]._y = this._y;
dustguy = 0;
}
this.gotoAndStop(2);
this._x += espeed;
this._xscale = -scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
frame 351 {
_root.background.gotoAndStop('darkness1');
}
movieClip 3390 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,3b';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,5';
}
}
}
}
instance of movieClip 2465 {
onClipEvent (load) {
ilr = 547;
ill = 46;
frozen = false;
frozentimer = 0;
var scale = this._xscale;
var distance = 300;
espeed = 3;
etack = false;
ehit = false;
death = false;
freezeover = false;
touchingit = true;
didmunch = false;
timer = 0;
timer2 = 0;
touched = false;
justwait = false;
timer3 = 0;
readytospit = false;
finalwait = false;
timer4 = 0;
variable1 = false;
}
onClipEvent (enterFrame) {
if (variable1 == false) {
if (_root.player.hitTest(_x, _y, true)) {
touched = true;
timer = 0;
}
}
}
onClipEvent (enterFrame) {
if (touched == true) {
++timer;
if (timer == 10) {
timer = 0;
this.gotoAndStop('munch');
justwait = true;
variable1 = true;
touched = false;
}
}
}
onClipEvent (enterFrame) {
if (justwait == true) {
didmunch = true;
_root.player._x = tx;
_root.player._y = this._y;
_root.munch = true;
_root.otheraction = true;
_root.player.gotoAndStop('munched');
justwait = true;
}
}
onClipEvent (enterFrame) {
if (didmunch == true) {
++timer2;
if (timer2 == 30) {
this.gotoAndStop('spit');
justwait = false;
readytospit = true;
didmunch = false;
}
}
}
onClipEvent (enterFrame) {
if (readytospit == true) {
++timer3;
_root.player.grav -= 3;
_root.airhit = true;
if (timer3 == 14) {
this.gotoAndStop(1);
_root.health -= 20;
finalwait = true;
readytospit = false;
}
}
}
onClipEvent (enterFrame) {
if (finalwait == true) {
++timer4;
timer = 0;
timer2 = 0;
timer3 = 0;
if (timer4 == 120) {
timer4 = 0;
finalwait = false;
variable1 = false;
}
}
}
onClipEvent (enterFrame) {
if (finalwait == false) {
if (readytospit == false) {
if (justwait == false) {
if (touched == false) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx && tx > ill) {
if (tx - sx < distance) {
this.gotoAndStop(1);
this._x -= espeed;
this._xscale = -scale;
}
} else {
if (sx > tx && tx < ilr) {
if (sx - tx < distance) {
this.gotoAndStop(1);
this._x += espeed;
this._xscale = scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
}
frame 352 {
_root.background.gotoAndStop('darkness2');
}
movieClip 3395 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,4b';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,7';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,6';
}
}
}
}
frame 353 {
_root.background.gotoAndStop('darkness2');
}
movieClip 3401 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,5c';
}
}
}
}
movieClip 3404 {
}
instance of movieClip 3404 {
onClipEvent (enterFrame) {
if (_root.found9 != 'k') {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.found9 = 'found';
_root.mobility = false;
_root.itemobtain.gotoAndStop('key');
this.unloadMovie();
}
}
}
instance of movieClip 2465 {
onClipEvent (load) {
ilr = 498;
ill = 242;
frozen = false;
frozentimer = 0;
var scale = this._xscale;
var distance = 300;
espeed = 3;
etack = false;
ehit = false;
death = false;
freezeover = false;
touchingit = true;
didmunch = false;
timer = 0;
timer2 = 0;
touched = false;
justwait = false;
timer3 = 0;
readytospit = false;
finalwait = false;
timer4 = 0;
variable1 = false;
}
onClipEvent (enterFrame) {
if (variable1 == false) {
if (_root.player.hitTest(_x, _y, true)) {
touched = true;
timer = 0;
}
}
}
onClipEvent (enterFrame) {
if (touched == true) {
++timer;
if (timer == 10) {
timer = 0;
this.gotoAndStop('munch');
justwait = true;
variable1 = true;
touched = false;
}
}
}
onClipEvent (enterFrame) {
if (justwait == true) {
didmunch = true;
_root.player._x = tx;
_root.player._y = this._y;
_root.munch = true;
_root.otheraction = true;
_root.player.gotoAndStop('munched');
justwait = true;
}
}
onClipEvent (enterFrame) {
if (didmunch == true) {
++timer2;
if (timer2 == 30) {
this.gotoAndStop('spit');
justwait = false;
readytospit = true;
didmunch = false;
}
}
}
onClipEvent (enterFrame) {
if (readytospit == true) {
++timer3;
_root.player.grav -= 2.5;
_root.airhit = true;
if (timer3 == 14) {
this.gotoAndStop(1);
_root.health -= 20;
finalwait = true;
readytospit = false;
}
}
}
onClipEvent (enterFrame) {
if (finalwait == true) {
++timer4;
timer = 0;
timer2 = 0;
timer3 = 0;
if (timer4 == 120) {
timer4 = 0;
finalwait = false;
variable1 = false;
}
}
}
onClipEvent (enterFrame) {
if (finalwait == false) {
if (readytospit == false) {
if (justwait == false) {
if (touched == false) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx && tx > ill) {
if (tx - sx < distance) {
this.gotoAndStop(1);
this._x -= espeed;
this._xscale = -scale;
}
} else {
if (sx > tx && tx < ilr) {
if (sx - tx < distance) {
this.gotoAndStop(1);
this._x += espeed;
this._xscale = scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
}
}
}
}
frame 354 {
_root.background.gotoAndStop('darkness2');
}
movieClip 3407 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,5b';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,8';
}
}
}
}
frame 355 {
_root.background.gotoAndStop('darkness1');
}
movieClip 3412 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,9';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,7b';
}
}
}
}
instance of movieClip 2343 {
onClipEvent (load) {
jumpstart = false;
jumpnum = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player.jumpHeight = 30;
if (Key.isDown(87)) {
this.play();
if (jumpstart == false) {
_root.boing.start();
jumpstart = true;
}
}
} else {
_root.player.jumpHeight = 20;
}
}
onClipEvent (enterFrame) {
if (jumpstart == true) {
++jumpnum;
if (jumpnum == 10) {
jumpnum = 0;
jumpstart = false;
}
}
}
}
frame 356 {
buttondown = false;
gem = 0;
onEnterFrame = function () {
if (_root.buttondown == true) {
++gem;
if (gem == 10) {
_root.buttondown = false;
gem = 0;
}
}
};
if (_root.puzzle3solved == false) {
_root.item1.gotoAndStop(3);
_root.item2.gotoAndStop(1);
_root.item3.gotoAndStop(2);
_root.ground1.gotoAndStop(1);
_root.cog1.stop();
_root.cog2.stop();
}
if (_root.puzzle3solved == true) {
_root.item1.gotoAndStop(1);
_root.item2.gotoAndStop(2);
_root.item3.gotoAndStop(3);
_root.ground1.gotoAndStop(2);
_root.cog1.stop();
_root.slidingdoors.gotoAndStop(34);
_root.cog2.stop();
}
}
frame 356 {
_root.background.gotoAndStop('darkness1');
}
instance spring of movieClip 2343 {
onClipEvent (load) {
jumpstart = false;
jumpnum = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (_root.puzzle3solved == true) {
_root.player.jumpHeight = 30;
if (Key.isDown(87)) {
this.play();
if (jumpstart == false) {
_root.boing.start();
jumpstart = true;
}
}
}
} else {
_root.player.jumpHeight = 20;
}
}
onClipEvent (enterFrame) {
if (jumpstart == true) {
++jumpnum;
if (jumpnum == 10) {
jumpnum = 0;
jumpstart = false;
}
}
}
}
movieClip 3419 {
frame 1 {
stop();
}
frame 2 {
_root.rockgrind.start();
}
frame 34 {
stop();
_root.cog1.stop();
_root.cog2.stop();
_root.rockgrind.stop('rockgrind');
}
}
movieClip 3423 {
frame 1 {
stop();
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,10';
}
}
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,8b';
}
}
}
}
instance of movieClip 2719 {
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (_root.puzzle3solved == false) {
if (_root.buttondown == false) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.ping3.start();
this.play();
_root.item1.play();
_root.buttondown = true;
}
}
}
}
}
}
}
instance of movieClip 2719 {
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (_root.puzzle3solved == false) {
if (_root.buttondown == false) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.ping3.start();
this.play();
_root.item2.play();
_root.buttondown = true;
}
}
}
}
}
}
}
instance of movieClip 2719 {
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (_root.puzzle3solved == false) {
if (_root.buttondown == false) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.ping3.start();
this.play();
_root.item3.play();
_root.buttondown = true;
}
}
}
}
}
}
}
movieClip 3430 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
}
instance item1 of movieClip 3430 {
onClipEvent (enterFrame) {
if (_root.puzzle3solved == false) {
if (this._currentFrame == 1 && _root.item2._currentFrame == 2 && _root.item3._currentFrame == 3) {
_root.cog1.play();
_root.cog2.play();
_root.slidingdoors.play();
_root.ground1.gotoAndStop(2);
_root.puzzle3solved = true;
}
}
}
}
movieClip 3433 {
}
instance of movieClip 3433 {
onClipEvent (enterFrame) {
if (_root.found10 != 'k') {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.found10 = 'found';
_root.mobility = false;
_root.itemobtain.gotoAndStop('book');
this.unloadMovie();
}
}
}
instance of movieClip 3379 {
onClipEvent (load) {
num = Math.round(Math.random() * 100);
hadfirst = false;
}
onClipEvent (enterFrame) {
if (hadfirst == false) {
death = true;
deathtimer = 0;
gotoAndStop('birth');
}
}
onClipEvent (load) {
loadbar = function () {
_root.attachMovie('ebar', 'ebar' + num, _root.getNextHighestDepth());
};
}
onClipEvent (enterFrame) {
_root['ebar' + num]._width = ehp * 6;
_root['ebar' + num]._x = this._x - 50;
_root['ebar' + num]._y = this._y - 200;
if (death == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.bardelete == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.boss3.lightson == true) {
_root['ebar' + num].unloadMovie();
this.unloadMovie();
}
}
onClipEvent (load) {
var egrav = 0;
ex = 5;
frozen = false;
var scale = this._xscale;
var distance = 300;
edamage = 10;
frozentimer = 0;
radius = 5;
espeed = 10;
dustguy = 0;
etack = false;
ehit = false;
takstart = false;
taktimer = 0;
cooldown = 0;
cooldownp = false;
currenthit = false;
ehittimer = false;
heebeijeeb = 0;
ehp = 10;
death = false;
deathcount = 0;
freezeover = false;
taki = false;
combono = 0;
commie = 0;
dcsound = false;
deathtimer = 0;
}
onClipEvent (enterFrame) {
if (etack == false) {
++combono;
if (combono >= 30) {
taknum = 1;
combono = 0;
}
} else {
if (etack == true) {
combono = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (frozen == true) {
if (freezeover == false) {
gotoAndStop('frozen');
++frozentimer;
if (frozentimer > _root.freezetime) {
frozentimer = 0;
freezeover = true;
}
}
}
}
}
onClipEvent (enterFrame) {
if (freezeover == true) {
++frozentimer;
gotoAndStop('freezebreak');
if (frozentimer == 8) {
_root.glass_break.start(0.22, 1);
frozen = false;
freezeover = false;
frozentimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (ehp <= 0) {
death = true;
this.gotoAndStop('die');
}
}
onClipEvent (enterFrame) {
if (ehittimer == true) {
++heebeijeeb;
}
if (heebeijeeb >= 8) {
heebeijeeb = 0;
ehittimer = false;
ehit = false;
}
}
onClipEvent (enterFrame) {
if (taknum >= 3) {
++combono;
if (combono == 10) {
combono = 0;
taknum = 1;
}
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 5, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (etack == true) {
takstart = true;
}
}
onClipEvent (enterFrame) {
if (takstart == true) {
++taktimer;
}
if (taktimer == 1) {
_root.wind.start();
}
if (taktimer == 17) {
taktimer = 0;
takstart = false;
++taknum;
etack = false;
if (taknum == 4) {
cooldownp = -10;
}
cooldownp = true;
}
}
onClipEvent (enterFrame) {
if (cooldownp == true) {
++cooldown;
}
if (cooldown == 1) {
cooldown = 0;
cooldownp = false;
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (frozen == false) {
if (this.hitTest(_root.player) && _root.magic == true) {
if (_root.classi == 'fire1' || 'lightning1') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.01;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire2' || 'lightning2') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.03;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire3' || 'lightning3') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
ehp -= 0.5;
heebiejeeb = 0;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
this.gotoAndStop('freeze');
frozen = true;
_root.freeze.start();
if (_root.direc == 'left') {
this._x -= 10;
}
if (_root.direc == 'right') {
this._x += 10;
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (this.hitTest(_root.player)) {
if (_root.attacking == true) {
if (ehit == false) {
ehp -= _root.setdamage;
_root.mypunch_hit.start(0, 1);
ehit = true;
ehittimer = true;
heebiejeeb = 0;
if (frozen == false) {
this.gotoAndStop('hit');
if (_root.direc == 'left') {
this._x -= _root.setdistance - 4;
}
if (_root.direc == 'right') {
this._x += _root.setdistance + 4;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == true) {
++deathtimer;
if (deathtimer == 2) {
_root.expplus(this._x, this._y, 100);
_root.wind.start();
}
if (deathtimer == 10) {
this.unloadMovie();
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false) {
if (cooldownp == false) {
if (_root.mobility == true) {
if (ehit == false) {
if (this.hitTest(_root.player)) {
etack = true;
if (taknum == 1) {
gotoAndStop('etak1');
}
if (taknum == 2) {
gotoAndStop('etak2');
}
_root.magic = false;
_root.attacking = false;
if (_root.painallowed == true) {
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 5;
_root.mypunch_hit.start();
if (this._x > _root.player._x) {
_root.player._x -= 10;
}
if (this._x < _root.player._x) {
_root.player._x += 10;
}
if (taknum == 2) {
_root.thump.start();
if (this._x > _root.player._x) {
_root.momentum = -20;
}
if (this._x < _root.player._x) {
_root.momentum = 20;
}
}
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance) {
++dustguy;
if (dustguy == 3) {
++_root.loaditems;
_root.attachMovie('dust', 'dust' + _root.loaditems, _root.getNextHighestDepth());
_root['dust' + _root.loaditems]._x = this._x;
_root['dust' + _root.loaditems]._y = this._y;
dustguy = 0;
}
this.gotoAndStop(2);
this._x -= espeed;
this._xscale = scale;
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance) {
++dustguy;
if (dustguy == 3) {
++_root.loaditems;
_root.attachMovie('dust', 'dust' + _root.loaditems, _root.getNextHighestDepth());
_root['dust' + _root.loaditems]._x = this._x;
_root['dust' + _root.loaditems]._y = this._y;
dustguy = 0;
}
this.gotoAndStop(2);
this._x += espeed;
this._xscale = -scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
instance of movieClip 3379 {
onClipEvent (load) {
num = Math.round(Math.random() * 100);
hadfirst = false;
}
onClipEvent (enterFrame) {
if (hadfirst == false) {
death = true;
deathtimer = 0;
gotoAndStop('birth');
}
}
onClipEvent (load) {
loadbar = function () {
_root.attachMovie('ebar', 'ebar' + num, _root.getNextHighestDepth());
};
}
onClipEvent (enterFrame) {
_root['ebar' + num]._width = ehp * 6;
_root['ebar' + num]._x = this._x - 50;
_root['ebar' + num]._y = this._y - 200;
if (death == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.bardelete == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.boss3.lightson == true) {
_root['ebar' + num].unloadMovie();
this.unloadMovie();
}
}
onClipEvent (load) {
var egrav = 0;
ex = 5;
frozen = false;
var scale = this._xscale;
var distance = 300;
edamage = 10;
frozentimer = 0;
radius = 5;
espeed = 10;
dustguy = 0;
etack = false;
ehit = false;
takstart = false;
taktimer = 0;
cooldown = 0;
cooldownp = false;
currenthit = false;
ehittimer = false;
heebeijeeb = 0;
ehp = 10;
death = false;
deathcount = 0;
freezeover = false;
taki = false;
combono = 0;
commie = 0;
dcsound = false;
deathtimer = 0;
}
onClipEvent (enterFrame) {
if (etack == false) {
++combono;
if (combono >= 30) {
taknum = 1;
combono = 0;
}
} else {
if (etack == true) {
combono = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (frozen == true) {
if (freezeover == false) {
gotoAndStop('frozen');
++frozentimer;
if (frozentimer > _root.freezetime) {
frozentimer = 0;
freezeover = true;
}
}
}
}
}
onClipEvent (enterFrame) {
if (freezeover == true) {
++frozentimer;
gotoAndStop('freezebreak');
if (frozentimer == 8) {
_root.glass_break.start(0.22, 1);
frozen = false;
freezeover = false;
frozentimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (ehp <= 0) {
death = true;
this.gotoAndStop('die');
}
}
onClipEvent (enterFrame) {
if (ehittimer == true) {
++heebeijeeb;
}
if (heebeijeeb >= 8) {
heebeijeeb = 0;
ehittimer = false;
ehit = false;
}
}
onClipEvent (enterFrame) {
if (taknum >= 3) {
++combono;
if (combono == 10) {
combono = 0;
taknum = 1;
}
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 5, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (etack == true) {
takstart = true;
}
}
onClipEvent (enterFrame) {
if (takstart == true) {
++taktimer;
}
if (taktimer == 1) {
_root.wind.start();
}
if (taktimer == 17) {
taktimer = 0;
takstart = false;
++taknum;
etack = false;
if (taknum == 4) {
cooldownp = -10;
}
cooldownp = true;
}
}
onClipEvent (enterFrame) {
if (cooldownp == true) {
++cooldown;
}
if (cooldown == 1) {
cooldown = 0;
cooldownp = false;
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (frozen == false) {
if (this.hitTest(_root.player) && _root.magic == true) {
if (_root.classi == 'fire1' || 'lightning1') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.01;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire2' || 'lightning2') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.03;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire3' || 'lightning3') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
ehp -= 0.5;
heebiejeeb = 0;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
this.gotoAndStop('freeze');
frozen = true;
_root.freeze.start();
if (_root.direc == 'left') {
this._x -= 10;
}
if (_root.direc == 'right') {
this._x += 10;
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (this.hitTest(_root.player)) {
if (_root.attacking == true) {
if (ehit == false) {
ehp -= _root.setdamage;
_root.mypunch_hit.start(0, 1);
ehit = true;
ehittimer = true;
heebiejeeb = 0;
if (frozen == false) {
this.gotoAndStop('hit');
if (_root.direc == 'left') {
this._x -= _root.setdistance - 4;
}
if (_root.direc == 'right') {
this._x += _root.setdistance + 4;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == true) {
++deathtimer;
if (deathtimer == 2) {
_root.expplus(this._x, this._y, 100);
_root.wind.start();
}
if (deathtimer == 10) {
this.unloadMovie();
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false) {
if (cooldownp == false) {
if (_root.mobility == true) {
if (ehit == false) {
if (this.hitTest(_root.player)) {
etack = true;
if (taknum == 1) {
gotoAndStop('etak1');
}
if (taknum == 2) {
gotoAndStop('etak2');
}
_root.magic = false;
_root.attacking = false;
if (_root.painallowed == true) {
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 5;
_root.mypunch_hit.start();
if (this._x > _root.player._x) {
_root.player._x -= 10;
}
if (this._x < _root.player._x) {
_root.player._x += 10;
}
if (taknum == 2) {
_root.thump.start();
if (this._x > _root.player._x) {
_root.momentum = -20;
}
if (this._x < _root.player._x) {
_root.momentum = 20;
}
}
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance) {
++dustguy;
if (dustguy == 3) {
++_root.loaditems;
_root.attachMovie('dust', 'dust' + _root.loaditems, _root.getNextHighestDepth());
_root['dust' + _root.loaditems]._x = this._x;
_root['dust' + _root.loaditems]._y = this._y;
dustguy = 0;
}
this.gotoAndStop(2);
this._x -= espeed;
this._xscale = scale;
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance) {
++dustguy;
if (dustguy == 3) {
++_root.loaditems;
_root.attachMovie('dust', 'dust' + _root.loaditems, _root.getNextHighestDepth());
_root['dust' + _root.loaditems]._x = this._x;
_root['dust' + _root.loaditems]._y = this._y;
dustguy = 0;
}
this.gotoAndStop(2);
this._x += espeed;
this._xscale = -scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
frame 357 {
_root.background.gotoAndStop('darkness3');
}
movieClip 3437 {
frame 1 {
stop();
}
frame 86 {
stop();
}
}
instance electrobox of movieClip 2290 {
onClipEvent (load) {
finishedthis1uh = false;
}
onClipEvent (enterFrame) {
if (finishedthis1uh == true) {
this.gotoAndStop('fineto');
}
}
onClipEvent (enterFrame) {
if (finishedthis1uh == false) {
if (_root.classi == 'lightning3' || _root.classi == 'lightning2' || _root.classi == 'lightning1') {
if (_root.magic == true) {
if (this.hitTest(_root.player)) {
_root.slider.play();
_root.ground1.play();
gotoAndPlay(305);
this.powerthing.gotoAndStop(4);
}
}
}
}
}
}
movieClip 3440 {
frame 1 {
stop();
cog1.stop();
cog2.stop();
}
frame 2 {
cog1.play();
cog2.play();
_root.rockgrind.start();
}
frame 86 {
stop();
}
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,9b';
}
}
}
}
instance of movieClip 3048 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.rockgrind.stop('rockgrind');
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,11';
}
}
}
frame 358 {
cog1.stop();
cog2.stop();
}
frame 358 {
_root.background.gotoAndStop('darkness4');
}
movieClip 3445 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'area3,boss';
}
}
}
}
movieClip 3449 {
}
instance of movieClip 3449 {
onClipEvent (enterFrame) {
if (_root.found11 != 'k') {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.found11 = 'found';
_root.mobility = false;
_root.itemobtain.gotoAndStop('rubbers');
this.unloadMovie();
}
}
}
frame 359 {
stopAllSounds();
_root.musictype = 0;
_root.mobility = true;
if (_root.movie8 == true && _root.area3 == false) {
_root.boss3build.start();
_root.boss3build.onSoundComplete = function () {
_root.boss3main.start(0, 99);
};
}
if (_root.area3 == true) {
_root.mobility = true;
floodie1.gotoAndStop(2);
floodie2.gotoAndStop(2);
_root.background.darkness5.gotoAndStop(2);
}
boss3func = function () {
stopAllSounds();
_root.boss3.unloadMovie();
_root.area3 = true;
_root.mobility = true;
_root.magic = false;
_root.attacking = false;
_root.otheraction = false;
_root.fadefunks = 'celebration3';
_root.fade.play();
};
}
frame 359 {
_root.background.gotoAndStop('darkness5');
}
instance of movieClip 2472 {
onClipEvent (load) {
if (_root.movie8 == true) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.movie8 == false) {
if (this.hitTest(_root.player)) {
_root.fade.play();
_root.fadefunks = 'movie8';
_root.mobility = false;
_root.movie8 = true;
trace(_root.mobility);
}
}
}
}
movieClip 3453 {
}
movieClip 3456 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
instance of movieClip 2258 {
onClipEvent (enterFrame) {
if (_root.area3 == true) {
this.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.area3 == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'tournament3';
}
}
}
}
}
instance power1 of movieClip 2290 {
onClipEvent (load) {
finishedthis1uh = false;
}
onClipEvent (enterFrame) {
if (finishedthis1uh == true) {
this.gotoAndStop('fineto');
} else {
this.gotoAndStop(1);
this.powerthing.gotoAndStop(1);
}
}
onClipEvent (enterFrame) {
if (finishedthis1uh == false) {
if (_root.classi == 'lightning3' || _root.classi == 'lightning2' || _root.classi == 'lightning1') {
if (_root.magic == true) {
if (this.hitTest(_root.player)) {
finishedthis1uh = true;
_root.boss3.lightpower += 1;
gotoAndPlay(305);
this.powerthing.gotoAndStop(4);
}
}
}
}
}
}
instance power2 of movieClip 2290 {
onClipEvent (load) {
finishedthis1uh = false;
}
onClipEvent (enterFrame) {
if (finishedthis1uh == true) {
this.gotoAndStop('fineto');
} else {
this.gotoAndStop(1);
this.powerthing.gotoAndStop(1);
}
}
onClipEvent (enterFrame) {
if (finishedthis1uh == false) {
if (_root.classi == 'lightning3' || _root.classi == 'lightning2' || _root.classi == 'lightning1') {
if (_root.magic == true) {
if (this.hitTest(_root.player)) {
finishedthis1uh = true;
_root.boss3.lightpower += 1;
gotoAndPlay(305);
this.powerthing.gotoAndStop(4);
}
}
}
}
}
}
instance faker of movieClip 2762 {
onClipEvent (load) {
if (_root.movie8 == true) {
this.unloadMovie();
}
if (_root.area3 == true) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (_root.movie8 == false) {
_root.mobility = true;
}
stop();
}
}
movieClip 3463 {
frame 2 {
_root.floodlight.start();
}
}
movieClip 3465 {
instance bhead of movieClip 3463 {
onClipEvent (enterFrame) {
if (_root.movie8 == true && _root.area3 == false) {
if (_root.boss3.lightson == false) {
this.gotoAndStop(1);
} else {
gotoAndStop(2);
}
}
}
}
}
instance boss3bar of movieClip 3465 {
onClipEvent (enterFrame) {
if (_root.movie8 == false) {
this.unloadMovie();
}
if (_root.area3 == true) {
this.unloadMovie();
}
this.gotoAndStop(Math.round(_root.boss3.ehp));
this._x = _root.cam._x;
this._y = _root.cam._y - 200;
}
}
instance boss3 of movieClip 2783 {
onClipEvent (load) {
if (_root.movie8 == false) {
this.unloadMovie();
_root.mobility = true;
}
if (_root.area3 == true) {
this.unloadMovie();
_root.mobility = true;
}
}
onClipEvent (load) {
ehp = 100;
stun = false;
etack = false;
ehit = false;
ehitcount = 0;
frozen = false;
espeed = 5;
egrav = 0;
ex = 5;
death = false;
distance = 2000;
scale = this._xscale;
busy = false;
difficulty = 0;
etacktype = 5;
randomer = false;
etacktimer = 0;
etackcool = false;
etackcooltimer = 0;
enemySpawn = 0;
enemyQuantity = 2;
enemyRandom = 0;
burncount = 0;
lightpower = 0;
lighttimer = 0;
lighttime = 100;
lightson = false;
painRate = 0.2;
}
onClipEvent (load) {
deathfunc = function () {
lightpower = 0;
lightson = false;
stun = true;
busy = true;
death = true;
_root.mobility = false;
_root.otheraction = false;
_root.attacking = false;
_root.magic = false;
this.gotoAndStop('fadeaway');
_root.boss3bar.unloadMovie();
};
}
onClipEvent (enterFrame) {
if (ehp <= 0) {
deathfunc();
}
if (ehp > 80) {
difficulty = 10;
}
if (ehp < 80 && ehp > 40) {
difficutly = 25;
}
if (ehp < 40) {
diffictuly = 40;
}
}
onClipEvent (enterFrame) {
if (lightpower == 2) {
lightson = true;
}
if (lightson == true) {
++burncount;
if (burncount == 4) {
_root.frying.start();
++_root.loaditems;
_root.attachMovie('smokey', 'slowburn' + _root.loaditems, _root.getNextHighestDepth());
_root['slowburn' + _root.loaditems]._x = this._x;
_root['slowburn' + _root.loaditems]._y = this._y - 110;
burncount = 0;
}
_root.boss3bar.bhead.gotoAndStop(2);
_root.background.darkness5.gotoAndStop(2);
_root.floodie1.gotoAndStop(2);
_root.floodie2.gotoAndStop(2);
++lighttimer;
if (lighttimer == lighttime) {
_root.powerdown.start();
_root.background.darkness5.gotoAndStop(1);
_root.floodie1.gotoAndStop(1);
_root.floodie2.gotoAndStop(1);
randomer = false;
etacktype = 5;
lightson = false;
stun = false;
busy = false;
lighttimer = 0;
lightpower = 0;
etack = false;
etackcool = false;
ehit = false;
_root.power1.gotoAndStop(1);
_root.power2.gotoAndStop(1);
_root.power1.finishedthis1uh = false;
_root.power2.finishedthis1uh = false;
}
} else {
_root.boss3bar.bhead.gotoAndStop(1);
}
}
onClipEvent (enterFrame) {
if (lightson == true) {
stun = true;
this.gotoAndStop('lightson');
ehp -= painRate;
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (etack == false && stun == false && ehit == false && frozen == false && busy == false) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance) {
this.gotoAndStop(2);
this._x -= espeed;
this._xscale = scale;
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance) {
this.gotoAndStop(2);
this._x += espeed;
this._xscale = -scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
onClipEvent (load) {
etackFunction = function () {
_root.crackle.start();
if (etacktype == 1) {
++_root.loaditems;
etack = true;
_root.attachMovie('boss3thornafter', 'thornafter' + _root.loaditems, _root.getNextHighestDepth());
if (this._xscale == -scale) {
_root['thornafter' + _root.loaditems]._x = this._x + 50;
_root['thornafter' + _root.loaditems].direc = 'right';
}
if (this._xscale == scale) {
_root['thornafter' + _root.loaditems]._x = this._x - 50;
_root['thornafter' + _root.loaditems].direc = 'left';
}
_root['thornafter' + _root.loaditems]._y = this._y - 50;
++_root.loaditems;
gotoAndStop('etack');
_root.attachMovie('boss3thorns', 'thorns' + _root.loaditems, _root.getNextHighestDepth());
if (this._xscale == scale) {
_root['thorns' + _root.loaditems]._x = this._x - 50;
_root['thorns' + _root.loaditems].direc = 'left';
}
if (this._xscale == -scale) {
_root['thorns' + _root.loaditems]._x = this._x + 50;
_root['thorns' + _root.loaditems].direc = 'right';
}
_root['thorns' + _root.loaditems]._y = this._y - 50;
}
if (etacktype == 2) {
etack = true;
gotoAndStop('action');
enemySpawn = 0;
while (enemySpawn < enemyQuantity) {
enemyRandom = Math.round(Math.random() * 400) - 200;
++_root.loaditems;
_root.thornenemy.duplicateMovieClip('thornman' + _root.loaditems, _root.getNextHighestDepth());
_root['thornman' + _root.loaditems]._x = this._x + enemyRandom;
_root['thornman' + _root.loaditems]._y = this._y;
_root.attachMovie('thornentrance', 'thornentrance' + _root.loaditems, _root.getNextHighestDepth());
_root['thornentrance' + _root.loaditems]._x = this._x + enemyRandom;
_root['thornentrance' + _root.loaditems]._y = this._y;
++enemySpawn;
}
}
if (etacktype == 3) {
etack = true;
gotoAndStop('etack');
_root.attachMovie('boss3groundcheaker', 'grounder' + _root.loaditems, _root.getNextHighestDepth());
_root['grounder' + _root.loaditems]._y = this._y - 5;
_root['grounder' + _root.loaditems]._x = this._x;
if (this._xscale == scale) {
_root['grounder' + _root.loaditems].direc = 'left';
}
if (this._xscale == -scale) {
_root['grounder' + _root.loaditems].direc = 'right';
}
}
if (etacktype == 4) {
etack = true;
gotoAndStop('etack');
++_root.loaditems;
_root.attachMovie('boss3ball', 'bossball' + _root.loaditems, _root.getNextHighestDepth());
_root['bossball' + _root.loaditems]._x = this._x;
_root['bossball' + _root.loaditems]._y = this._y;
}
if (etacktype == 5) {
++_root.loaditems;
etack = true;
gotoAndStop('action');
_root.attachMovie('boss3vine', 'bossviner' + _root.loaditems, _root.getNextHighestDepth());
_root['bossviner' + _root.loaditems]._x = -56;
_root['bossviner' + _root.loaditems]._y = 400;
++_root.loaditems;
_root.attachMovie('boss3vine', 'bossviner' + _root.loaditems, _root.getNextHighestDepth());
_root['bossviner' + _root.loaditems]._x = 1064;
_root['bossviner' + _root.loaditems]._y = 400;
randomer = true;
}
};
}
onClipEvent (enterFrame) {
if (etack == true) {
++etacktimer;
if (etacktype == 1 && etacktimer == 12) {
etacktimer = 0;
etack = false;
etackcool = true;
}
if (etacktype == 2 && etacktimer == 19) {
etacktimer = 0;
etack = false;
etackcool = true;
}
if (etacktype == 3 && etacktimer == 12) {
etacktimer = 0;
etack = false;
etackcool = true;
}
if (etacktype == 4 && etacktimer == 12) {
etacktimer = 0;
etack = false;
etackcool = true;
}
if (etacktype == 5 && etacktimer == 19) {
etacktimer = 0;
etack = false;
etackcool = true;
}
}
}
onClipEvent (enterFrame) {
if (stun == false && etackcool == false && etack == false && busy == false) {
if (randomer == true) {
etacktype = Math.round(Math.random() * 4) + 1;
if (etacktype == 2) {
etacktype = Math.round(Math.random() * 4) + 1;
}
}
etackFunction();
}
}
onClipEvent (enterFrame) {
if (etackcool == true) {
++etackcooltimer;
if (etacktype == 1) {
if (etackcooltimer == 80 - difficulty) {
etackcooltimer = 0;
etackcool = false;
}
}
if (etacktype == 2) {
if (etackcooltimer == 200 - difficulty) {
etackcooltimer = 0;
etackcool = false;
}
}
if (etacktype == 3) {
if (etackcooltimer == 100 - difficulty) {
etackcooltimer = 0;
etackcool = false;
}
}
if (etacktype == 4) {
if (etackcooltimer == 100 - difficulty) {
etackcooltimer = 0;
etackcool = 0;
}
}
if (etacktype == 5) {
if (etackcooltimer == 20 - difficulty) {
etackcooltimer = 0;
etackcool = 0;
}
}
}
}
onClipEvent (enterFrame) {
if (ehit == false) {
if (this.hitTest(_root.player)) {
if (_root.attacking == true || _root.magic == true) {
_root.muffledHit.start();
++_root.loaditems;
_root.attachMovie('immunity', 'immunity' + _root.loaditems, _root.getNextHighestDepth());
if (this._x > _root.player._x) {
_root['immunity' + _root.loaditems]._x = this._x - 20;
}
if (this._x < _root.player._x) {
_root['immunity' + _root.loaditems]._x = this._x + 20;
}
_root['immunity' + _root.loaditems]._y = this._y - 100;
ehit = true;
}
}
}
}
onClipEvent (enterFrame) {
if (ehit == true) {
++ehitcount;
if (ehitcount == 20) {
ehit = false;
ehitcount = 0;
}
}
}
}
instance thornenemy of movieClip 3379 {
onClipEvent (load) {
num = Math.round(Math.random() * 100);
hadfirst = false;
}
onClipEvent (enterFrame) {
if (hadfirst == false) {
death = true;
deathtimer = 0;
gotoAndStop('birth');
}
}
onClipEvent (load) {
loadbar = function () {
_root.attachMovie('ebar', 'ebar' + num, _root.getNextHighestDepth());
};
}
onClipEvent (enterFrame) {
_root['ebar' + num]._width = ehp * 6;
_root['ebar' + num]._x = this._x - 50;
_root['ebar' + num]._y = this._y - 200;
if (death == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.bardelete == true) {
_root['ebar' + num].unloadMovie();
}
if (_root.boss3.lightson == true) {
_root['ebar' + num].unloadMovie();
this.unloadMovie();
}
}
onClipEvent (load) {
var egrav = 0;
ex = 5;
frozen = false;
var scale = this._xscale;
var distance = 300;
edamage = 10;
frozentimer = 0;
radius = 5;
espeed = 10;
dustguy = 0;
etack = false;
ehit = false;
takstart = false;
taktimer = 0;
cooldown = 0;
cooldownp = false;
currenthit = false;
ehittimer = false;
heebeijeeb = 0;
ehp = 10;
death = false;
deathcount = 0;
freezeover = false;
taki = false;
combono = 0;
commie = 0;
dcsound = false;
deathtimer = 0;
}
onClipEvent (enterFrame) {
if (etack == false) {
++combono;
if (combono >= 30) {
taknum = 1;
combono = 0;
}
} else {
if (etack == true) {
combono = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (frozen == true) {
if (freezeover == false) {
gotoAndStop('frozen');
++frozentimer;
if (frozentimer > _root.freezetime) {
frozentimer = 0;
freezeover = true;
}
}
}
}
}
onClipEvent (enterFrame) {
if (freezeover == true) {
++frozentimer;
gotoAndStop('freezebreak');
if (frozentimer == 8) {
_root.glass_break.start(0.22, 1);
frozen = false;
freezeover = false;
frozentimer = 0;
}
}
}
onClipEvent (enterFrame) {
if (ehp <= 0) {
death = true;
this.gotoAndStop('die');
}
}
onClipEvent (enterFrame) {
if (ehittimer == true) {
++heebeijeeb;
}
if (heebeijeeb >= 8) {
heebeijeeb = 0;
ehittimer = false;
ehit = false;
}
}
onClipEvent (enterFrame) {
if (taknum >= 3) {
++combono;
if (combono == 10) {
combono = 0;
taknum = 1;
}
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 5, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (etack == true) {
takstart = true;
}
}
onClipEvent (enterFrame) {
if (takstart == true) {
++taktimer;
}
if (taktimer == 1) {
_root.wind.start();
}
if (taktimer == 17) {
taktimer = 0;
takstart = false;
++taknum;
etack = false;
if (taknum == 4) {
cooldownp = -10;
}
cooldownp = true;
}
}
onClipEvent (enterFrame) {
if (cooldownp == true) {
++cooldown;
}
if (cooldown == 1) {
cooldown = 0;
cooldownp = false;
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (frozen == false) {
if (this.hitTest(_root.player) && _root.magic == true) {
if (_root.classi == 'fire1' || 'lightning1') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.01;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire2' || 'lightning2') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
heebiejeeb = 0;
ehp -= 0.03;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'fire3' || 'lightning3') {
this.gotoAndStop('hit');
ehit = true;
ehittimer = true;
ehp -= 0.5;
heebiejeeb = 0;
if (_root.direc == 'left') {
this._x -= 3;
}
if (_root.direc == 'right') {
this._x += 3;
}
}
if (_root.classi == 'ice1' || _root.classi == 'ice2' || _root.classi == 'ice3') {
this.gotoAndStop('freeze');
frozen = true;
_root.freeze.start();
if (_root.direc == 'left') {
this._x -= 10;
}
if (_root.direc == 'right') {
this._x += 10;
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == false) {
if (_root.mobility == true) {
if (this.hitTest(_root.player)) {
if (_root.attacking == true) {
if (ehit == false) {
ehp -= _root.setdamage;
_root.mypunch_hit.start(0, 1);
ehit = true;
ehittimer = true;
heebiejeeb = 0;
if (frozen == false) {
this.gotoAndStop('hit');
if (_root.direc == 'left') {
this._x -= _root.setdistance - 4;
}
if (_root.direc == 'right') {
this._x += _root.setdistance + 4;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (death == true) {
++deathtimer;
if (deathtimer == 2) {
_root.expplus(this._x, this._y, 100);
_root.wind.start();
}
if (deathtimer == 10) {
this.unloadMovie();
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false) {
if (cooldownp == false) {
if (_root.mobility == true) {
if (ehit == false) {
if (this.hitTest(_root.player)) {
etack = true;
if (taknum == 1) {
gotoAndStop('etak1');
}
if (taknum == 2) {
gotoAndStop('etak2');
}
_root.magic = false;
_root.attacking = false;
if (_root.painallowed == true) {
_root.otheraction = true;
_root.player.gotoAndStop('hited');
_root.health -= 5;
_root.mypunch_hit.start();
if (this._x > _root.player._x) {
_root.player._x -= 10;
}
if (this._x < _root.player._x) {
_root.player._x += 10;
}
if (taknum == 2) {
_root.thump.start();
if (this._x > _root.player._x) {
_root.momentum = -20;
}
if (this._x < _root.player._x) {
_root.momentum = 20;
}
}
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (frozen == false) {
if (death == false && etack == false && ehit == false && _root.mobility == true) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 50) {
if (tx - sx < distance) {
++dustguy;
if (dustguy == 3) {
++_root.loaditems;
_root.attachMovie('dust', 'dust' + _root.loaditems, _root.getNextHighestDepth());
_root['dust' + _root.loaditems]._x = this._x;
_root['dust' + _root.loaditems]._y = this._y;
dustguy = 0;
}
this.gotoAndStop(2);
this._x -= espeed;
this._xscale = scale;
}
} else {
if (sx > tx + 50) {
if (sx - tx < distance) {
++dustguy;
if (dustguy == 3) {
++_root.loaditems;
_root.attachMovie('dust', 'dust' + _root.loaditems, _root.getNextHighestDepth());
_root['dust' + _root.loaditems]._x = this._x;
_root['dust' + _root.loaditems]._y = this._y;
dustguy = 0;
}
this.gotoAndStop(2);
this._x += espeed;
this._xscale = -scale;
}
}
}
} else {
this.gotoAndStop(1);
}
}
}
}
}
frame 360 {
_root.background.gotoAndStop('tunnel');
}
movieClip 3469 {
}
instance of movieClip 1710 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.player.gotoAndStop('door');
_root.fadefunks = 'movie10';
}
}
}
}
frame 361 {
finalbuild.start();
finalbuild.onSoundComplete = function () {
finalmain.start(0, 99);
};
azielstunfunc = function () {
_root.charger1.swapDepths(_root.getNextHighestDepth());
_root.charger2.swapDepths(_root.getNextHighestDepth());
_root.aziel.stuntack = false;
_root.aziel.stuntimer = 0;
energyorb1.ehp = 30;
energyorb2.ehp = 30;
_root.aziel.stun = false;
_root.aziel.fighting = false;
_root.aziel.chargefunc = false;
_root.aziel.fighttimer = _root.aziel.fightfinish;
_root.energyorb1.gotoAndStop(3);
_root.energyorb2.gotoAndStop(3);
_root.orb1 = true;
_root.orb2 = true;
if (_root.aziel.gameplay == 1) {
azielcharge = true;
_root.aziel.energy = 60;
orb1 = true;
orb2 = true;
}
};
orb1 = true;
orb2 = true;
azielcharge = false;
}
frame 361 {
kbackground.gotoAndStop('aziel');
}
movieClip 3474 {
}
movieClip 3476 {
}
instance door2 of movieClip 3476 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.aziel)) {
_root.aziel._x -= 18;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player.tmove = 0;
_root.player._x -= 18;
}
}
}
instance cog2 of movieClip 3114 {
onClipEvent (load) {
scale = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.azielcharge == false) {
this.stop();
if (_root.door2._y < 331) {
_root.door2._y += 2;
this._xscale = scale;
play();
}
}
if (_root.azielcharge == true) {
if (_root.door2._y >= 169) {
this.play();
this._xscale = -scale;
_root.door2._y -= 2;
} else {
this.stop();
}
}
}
}
instance door1 of movieClip 3476 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player.tmove = 0;
_root.player._x += 18;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.aziel)) {
_root.aziel._x += 18;
}
}
}
instance cog1 of movieClip 3114 {
onClipEvent (load) {
scale = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.azielcharge == false) {
this.stop();
if (_root.door1._y < 331) {
_root.door1._y += 2;
this._xscale = scale;
play();
}
}
if (_root.azielcharge == true) {
if (_root.door1._y >= 169) {
this.play();
this._xscale = -scale;
_root.door1._y -= 2;
} else {
this.stop();
}
}
}
}
movieClip 3481 {
}
movieClip 3491 {
}
movieClip 3500 {
frame 17 {
_root.orb1.ehp = 30;
_root.orb2.ehp = 30;
}
}
movieClip 3501 {
frame 1 {
stop();
}
}
instance energyorb1 of movieClip 3501 {
onClipEvent (load) {
ehp = 30;
ehit = false;
timer = 0;
}
onClipEvent (enterFrame) {
if (_root.orb1 == true && _root.mobility == true && _root.azielcharge == true) {
if (this.hitTest(_root.player) && _root.attacking == true && ehit == false) {
this.ehp -= 3;
ehit = true;
if (ehp < 3) {
_root.glass_break.start();
_root.powerdown.start();
}
}
}
if (_root.orb1 == true) {
this.gotoAndStop(1);
}
}
onClipEvent (enterFrame) {
if (ehit == true) {
if (timer == 1) {
_root.metal_hit.start();
}
++timer;
if (timer == 10) {
ehit = false;
timer = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.mobility == true && ehp <= 0) {
if (_root.orb1 == true) {
this.gotoAndStop(2);
_root.orb1 = false;
ehit = false;
_root.charger1.gotoAndStop(2);
timer = 0;
_root.aziel.chargecheak();
}
}
}
}
instance energyorb2 of movieClip 3501 {
onClipEvent (load) {
ehp = 30;
ehit = false;
timer = 0;
}
onClipEvent (enterFrame) {
if (_root.orb2 == true && _root.mobility == true && _root.azielcharge == true) {
if (this.hitTest(_root.player) && _root.attacking == true && ehit == false) {
this.ehp -= 3;
ehit = true;
if (ehp < 3) {
_root.glass_break.start();
_root.powerdown.start();
}
}
}
if (_root.orb2 == true) {
this.gotoAndStop(1);
}
}
onClipEvent (enterFrame) {
if (ehit == true) {
++timer;
if (timer == 1) {
_root.metal_hit.start();
}
if (timer == 10) {
ehit = false;
timer = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.mobility == true && ehp <= 0) {
if (_root.orb2 == true) {
this.gotoAndStop(2);
_root.orb2 = false;
ehit = false;
_root.charger2.gotoAndStop(2);
timer = 0;
_root.aziel.chargecheak();
}
}
}
}
movieClip 3517 {
}
movieClip 3530 {
}
movieClip 3543 {
}
movieClip 3558 {
frame 17 {
stop();
onEnterFrame = function () {
if (_root.aziel.timer == _root.aziel.timermax - 6) {
play();
}
};
}
}
movieClip 3567 {
}
movieClip 3574 {
}
movieClip 3579 {
}
movieClip 3584 {
}
movieClip 3589 {
}
movieClip 3598 {
frame 6 {
_root.aziel.tportmove();
}
frame 10 {
_root.aziel.emagic = false;
_root.timer = 0;
}
}
movieClip 3610 {
}
movieClip 3611 {
frame 6 {
_root.aziel._x = _root.charger1._x;
_root.aziel._y = _root.charger1._y + 20;
}
frame 12 {
stop();
}
}
movieClip 3616 {
frame 6 {
_root.aziel._x = _root.charger2._x;
_root.aziel._y = _root.charger2._y + 20;
}
frame 12 {
stop();
}
}
movieClip 3621 {
frame 5 {
stop();
}
}
movieClip 3627 {
}
movieClip 3651 {
}
movieClip 3652 {
}
movieClip 3659 {
frame 1 {
onEnterFrame = function () {
if (_root.mobility == true) {
_root.aziel._y -= 2;
_root.aziel.egrav = 0;
if (_root.aziel._y <= 300) {
_root.aziel.fighting = true;
_root.aziel.tport();
}
}
};
}
}
movieClip 3668 {
}
movieClip 3683 {
}
movieClip 3684 {
frame 99 {
stop();
_root.aziel.energyshooter();
}
}
movieClip 3686 {
frame 43 {
stop();
}
}
movieClip 3687 {
frame 49 {
stop();
}
}
movieClip 3688 {
}
movieClip 3689 {
}
instance aziel of movieClip 3689 {
onClipEvent (load) {
ehp = 100;
stun = false;
etack = false;
emagic = false;
ehit = false;
frozen = false;
espeed = 3;
egrav = 0;
ex = 5;
death = false;
distance = 2000;
scale = this._xscale;
energy = 100;
fighttime = 300;
orbplacement = 0;
seg11 = false;
gameplay3seg1 = false;
tportcounter = 0;
tporttimer = 0;
energydecrease = 0.1;
stunburst = false;
talk = false;
talk2 = false;
gameplay = 1;
showcharge = false;
stuntimer = 0;
stuntime = 200;
stuntack = 0;
chargeamount = 0.05;
chargefunc = false;
fighting = true;
fighttimer = 0;
fightfinish = 1000;
dodgenumber = 1;
ehittimer = 0;
emagicwaiter = 100;
emaagicpotential = false;
emagicwait = true;
emagicwaittimer = 0;
emagictact = 0;
timermax = 21;
mtimer = 0;
hitdistance = 0;
etacknumber = 0;
hitdamage = 0;
etacktime = 0;
etackcool = false;
gunners = false;
timer = 0;
}
onClipEvent (enterFrame) {
_root.azielhud.azielep._width = energy * 2;
_root.azielhud.azielhp._width = ehp * 2;
if (energy >= 100) {
energy = 100;
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
egrav = 0;
} else {
++egrav;
_y = _y + egrav;
}
if (_root.ground.hitTest(_x, _y, true)) {
_y = _y - 3;
}
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
this._x -= espeed;
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
this._x += espeed;
}
}
onClipEvent (enterFrame) {
if (death == false && fighting == true && stun == false) {
if (_root.mobility == true) {
if (emagic == false && etack == false && ehit == false && frozen == false) {
tx = this._x;
sx = _root.player._x;
if (tx - sx < distance && sx - tx < distance) {
if (tx > sx + 40) {
if (tx - sx < distance) {
if (gameplay == 2) {
gotoAndStop('angrywalk1');
}
if (gameplay == 1) {
this.gotoAndStop(2);
}
if (gameplay == 3) {
gotoAndStop('angrymofo');
}
this._x -= espeed;
this._xscale = scale;
} else {
gotoAndStop(305);
}
} else {
if (sx > tx + 40) {
if (sx - tx < distance) {
if (gameplay == 2) {
gotoAndStop('angrywalk2');
}
if (gameplay == 1) {
this.gotoAndStop(3);
}
if (gameplay == 3) {
gotoAndStop('angrymofo');
}
this._x += espeed;
this._xscale = -scale;
} else {
gotoAndStop(305);
if (gameplay == 3) {
gotoAndStop('angrymofo');
}
}
}
}
} else {
if (gameplay == 3) {
gotoAndStop('angrymofo');
}
this.gotoAndStop(1);
}
}
}
}
}
onClipEvent (enterFrame) {
if (tx - sx > 150 || sx - tx > 150) {
emagicpotential = true;
} else {
emagicpotential = false;
}
}
onClipEvent (enterFrame) {
if (emagicwait == true && _root.mobility == true) {
++emagicwaittimer;
if (emagicwaittimer == emagicwaiter) {
emagicwaittimer = 0;
emagicwait = false;
}
}
}
onClipEvent (enterFrame) {
if (fighting == true && gameplay < 3 && emagicpotential == true && etack == false && ehit == false && emagic == false && emagicwait == false && _root.mobility == true && stun == false) {
emagictact = Math.round(Math.random() * 3) + 2;
if (emagictact == 1) {
emagicwait = true;
}
if (emagictact == 2) {
flame();
}
if (emagictact == 3) {
thunder();
}
if (emagictact == 4) {
tport();
}
}
}
onClipEvent (enterFrame) {
if (emagic == true) {
++mtimer;
if (mtimer == timermax) {
mtimer = 0;
emagicwait = true;
emagic = false;
}
}
}
onClipEvent (load) {
flame = function () {
var v3 = new GlowFilter(16711680);
++_root.loaditems;
energy -= 5;
emagic = true;
gotoAndStop('magic');
_root.attachMovie('azielfire', 'azielfire' + _root.loaditems, _root.getNextHighestDepth());
_root['azielfire' + _root.loaditems].filters = [v3];
_root['azielfire' + _root.loaditems]._y = this._y - 100;
if (this._xscale == -scale) {
_root['azielfire' + _root.loaditems]._x = this._x + 75;
}
if (this._xscale == scale) {
_root['azielfire' + _root.loaditems]._x = this._x - 75;
_root['azielfire' + _root.loaditems].direc = 'right';
}
};
thunder = function () {
emagic = true;
energy -= 5;
++_root.loaditems;
gotoAndStop('magic');
_root.attachMovie('azielthunder', 'azielthunder' + _root.loaditems, _root.getNextHighestDepth());
_root['azielthunder' + _root.loaditems]._y = this._y - 300;
_root['azielthunder' + _root.loaditems]._x = _root.player._x;
_root['azielthunder' + _root.loaditems]._rotation = 90;
++_root.loaditems;
_root.attachMovie('thunderflash', 'thunderflash' + _root.loaditems, _root.getNextHighestDepth());
_root['thunderflash' + _root.loaditems]._y = this._y - 300;
_root['thunderflash' + _root.loaditems]._x = _root.player._x;
_root['thunderflash' + _root.loaditems]._rotation = 90;
};
tport = function () {
energy -= 10;
emagic = true;
gotoAndStop('tport');
_root.wind.start();
emagicwait = true;
};
tportmove = function () {
_root.wind.start();
if (_xscale == scale) {
_xscale = -scale;
_x = _root.player._x - 50;
} else {
_xscale = scale;
_x = _root.player._x + 50;
}
};
}
onClipEvent (enterFrame) {
if (energy <= 0) {
stun = true;
}
}
onClipEvent (enterFrame) {
if (stun == true) {
if (stuntack == false) {
++stuntimer;
gotoAndStop('stun');
}
if (stuntimer == stuntime) {
if (stuntack == false && gameplay == 1) {
stuntack = true;
stuntimer = 0;
vortexfunc();
}
if (gameplay == 2) {
_root.azielcharge = false;
energy = 100;
etack = false;
emagic = false;
stun = false;
fighting = false;
showcharge = false;
gotoAndStop('showcharge');
}
}
}
}
onClipEvent (enterFrame) {
if (_root.mobility == true && gameplay == 1) {
if (fighting == true && stun == false) {
++fighttimer;
if (fighttimer == fightfinish) {
fighting = false;
_root.energyorb1.gotoAndStop(3);
_root.energyorb2.gotoAndStop(3);
_root.orb1 = true;
_root.orb2 = true;
fighttimer = 0;
}
}
}
}
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (fighting == false && gameplay == 1) {
_root.azielcharge = true;
if (chargefunc == false) {
this.chargefunc = true;
_root.energyorb1.ehp = 30;
_root.energyorb2.ehp = 30;
root.charger1.swapDepths(_root.getNextHighestDepth());
root.charger2.swapDepths(_root.getNextHighestDepth());
if (this._x > _root.player._x) {
orb2();
this.chargefunc = true;
} else {
if (this._x < _root.player._x) {
orb1();
this.chargefunc = true;
} else {
orb1();
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.charger1) && _root.mobility == true && _root.orb1 == true) {
energy += chargeamount;
}
if (this.hitTest(_root.charger2) && _root.mobility == true && _root.orb2 == true) {
energy += chargeamount;
}
}
onClipEvent (load) {
chargecheak = function () {
if (_root.orb1 == false && _root.orb2 == false) {
_root.azielcharge = false;
fighting = true;
tport();
chargefunc = false;
}
if (this.hitTest(_root.charger1) && _root.orb1 == false) {
orb2();
}
if (this.hitTest(_root.charger2) && _root.orb2 == false) {
orb1();
}
};
orb1 = function () {
gotoAndStop('charging1');
};
orb2 = function () {
gotoAndStop('charging2');
};
}
onClipEvent (load) {
vortexfunc = function () {
emagic = true;
this.gotoAndStop('action');
++_root.loaditems;
_root.attachMovie('bvortex', 'vortex' + _root.loaditems, _root.getNextHighestDepth());
_root['vortex' + _root.loaditems]._x = this._x;
_root['vortex' + _root.loaditems]._y = this._y - 200;
_root.player.swapDepths(_root.getNextHighestDepth());
this.swapDepths(_root.getNextHighestDepth());
};
}
onClipEvent (enterFrame) {
if (gameplay < 3 && stun == false && etack == false && _root.magic == false && emagic == false && ehit == false && etackcool == false && fighting == true) {
if (this.hitTest(_root.player)) {
etacknumber = Math.round(Math.random() * 1) + 1;
if (etacknumber == 1) {
etack1();
}
if (etacknumber == 2) {
etack2();
}
}
}
}
onClipEvent (load) {
etack1 = function () {
etack = true;
gotoAndStop('etack1');
etacktime = 10;
hitdistance = 15;
hitdamage = 5;
};
etack2 = function () {
etack = true;
gotoAndStop('etack2');
etacktime = 10;
hitdamage = 5;
hitdistance = 20;
};
}
onClipEvent (enterFrame) {
if (etack == true) {
++timer;
if (timer == etacktime) {
etack = false;
timer = 0;
etackcool = true;
}
if (gameplay < 3 && _root.painallowed == true && this.hitTest(_root.player) && _root.attacking == false && _root.player.tporting == false) {
_root.otheraction = true;
_root.thump.start();
_root.player.gotoAndStop('hited');
_root.health -= hitdamage;
if (this._x > _root.player._x) {
_root.momentum = -hitdistance;
}
if (this._x < _root.player._x) {
_root.momentum = hitdistance;
}
}
if (gameplay == 3 && _root.painallowed == true && this.hitTest(_root.player)) {
}
}
}
onClipEvent (enterFrame) {
if (etackcool == true) {
++timer;
if (timer == 10) {
etackcool = false;
timer = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.attacking == true && ehit == false && this.hitTest(_root.player) && _root.azielcharge == false && fighting == true) {
if (stun == false) {
_root.wings.start();
ehitmoveback();
if (dodgenumber == 1) {
dodge1func();
}
if (dodgenumber == 2) {
dodge2func();
}
if (dodgenumber == 3) {
dodge3func();
}
}
if (stun == true) {
ehitmoveback();
stunhit();
}
}
if (_root.magic == true && _root.player.tporting == false && ehit == false && this.hitTest(_root.player) && _root.azielcharge == false && fighting == true) {
absorb();
}
}
onClipEvent (enterFrame) {
if (ehit == true) {
etack = false;
emagic = false;
timer = 0;
++ehittimer;
if (ehittimer == 10) {
ehit = false;
ehittimer = 0;
if (stun == true && stuntack == false) {
stuns.gotoAndStop(5);
}
}
}
}
onClipEvent (load) {
ehitmoveback = function () {
if (this._x > _root.player._x) {
this._x += 15;
}
if (this._x < _root.player._x) {
this._x -= 15;
}
};
dodge1func = function () {
if (ehit == false) {
ehit = true;
this.gotoAndStop('dodge1');
energy -= 1;
dodgenumber = 2;
}
};
dodge2func = function () {
if (ehit == false) {
ehit = true;
gotoAndStop('dodge2');
energy -= 1;
dodgenumber = 3;
}
};
dodge3func = function () {
if (ehit == false) {
ehit = true;
gotoAndStop('dodge3');
energy -= 1;
dodgenumber = 1;
}
};
stunhit = function () {
ehit = true;
gotoAndStop('stunhit');
_root.metal_hit.start();
ehp -= _root.setdamage;
};
absorb = function () {
ehit = true;
gotoAndStop('absorb');
_root.wings.start();
energy += 10;
};
}
onClipEvent (enterFrame) {
if (ehp <= 40) {
if (talk == false) {
_root.mobility = false;
energy = 100;
_root.attacking = false;
etack = false;
emagic = false;
stun = false;
_root.magic = false;
_root.hud.gotoAndStop('aziel1');
talk = true;
gameplay = 2;
}
}
}
onClipEvent (enterFrame) {
if (_root.mobility == true) {
if (gameplay == 2 && stun == false) {
energy += 0.2;
if (showcharge == false) {
espeed = 2.5;
emagicwaiter = 30;
stun = false;
tportcounter = 0;
fighting = false;
gotoAndStop('showcharge');
showcharge = true;
}
if (fighting == true) {
++tporttimer;
if (tporttimer == 30) {
tport();
tporttimer = 0;
}
}
}
}
}
onClipEvent (enterFrame) {
if (gameplay == 3) {
if (gameplay3seg1 == false) {
if (seg11 == false) {
seg11 = true;
_root.otheraction = true;
fighting = false;
_root.wind.start();
_root.aziel._x = 562;
gotoAndStop('energyblast');
}
}
}
}
onClipEvent (load) {
energyshooter = function () {
++_root.loaditems;
_root.attachMovie('azielenergybeam', 'azielenergybeam' + _root.loaditems, _root.getNextHighestDepth());
_root['azielenergybeam' + _root.loaditems]._y = this._y - 80;
if (this._x < _root.player._x) {
_root['azielenergybeam' + _root.loaditems]._x = this._x + 90;
_root['azielenergybeam' + _root.loaditems].direc = 'right';
}
if (this._x > _root.player._x) {
_root['azielenergybeam' + _root.loaditems]._x = this._x - 90;
}
_root.player.swapDepths(_root.getNextHighestDepth());
this.swapDepths(_root.getNextHighestDepth());
};
beamtouch = function () {
++_root.loaditems;
_root.attachMovie('azielenergyball', 'azielenergyball' + _root.loaditems, _root.getNextHighestDepth());
orbplacement = (_root.player._x - this._x) / 2;
_root['azielenergyball' + _root.loaditems]._y = this._y - 80;
_root['azielenergyball' + _root.loaditems]._x = this._x + orbplacement;
};
lostenergy = function () {
trace('woft');
};
}
onClipEvent (enterFrame) {
if (ehp <= 0) {
_root.gotoAndStop('azieldownfall');
}
}
}
instance charger1 of movieClip 3688 {
onClipEvent (enterFrame) {
if (_root.azielcharge == true && _root.orb1 == true) {
this.gotoAndStop(1);
}
if (_root.orb1 == false) {
this.gotoAndStop(2);
}
}
}
instance charger2 of movieClip 3688 {
onClipEvent (enterFrame) {
if (_root.orb2 == true && _root.azielcharge == true) {
this.gotoAndStop(1);
}
if (_root.orb2 == false) {
this.gotoAndStop(2);
}
}
}
movieClip 3693 {
}
movieClip 3695 {
}
movieClip 3699 {
}
movieClip 3700 {
}
movieClip 3701 {
instance of movieClip 3700 {
onClipEvent (enterFrame) {
if (_root.azielcharge == true) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
}
}
instance azielhud of movieClip 3701 {
onClipEvent (enterFrame) {
this._x = _root.cam._x + 80;
this._y = _root.cam._y - 210;
}
}
frame 362 {
_root.background.gotoAndStop('firster');
}
movieClip 3704 {
}
movieClip 3707 {
}
instance of movieClip 3707 {
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('sec2');
}
}
}
}
}
instance of movieClip 2330 {
onClipEvent (enterFrame) {
if (_root.magic == true) {
if (this.hitTest(_root.player)) {
play();
_root.otheraction = true;
_root.player.gotoAndStop('teleport');
}
}
}
}
instance of movieClip 2422 {
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('firstsign');
}
}
}
}
}
instance of movieClip 2422 {
onClipEvent (enterFrame) {
if (_root.talkal == true) {
if (this.hitTest(_root.player)) {
if (Key.isDown(83)) {
_root.mobility = false;
_root.hud.gotoAndStop('secondsign');
}
}
}
}
}
button 3709 {
on (press) {
_root.magicselect.gotoAndStop(2);
_root.magicselect.select = 1;
}
}
button 3717 {
on (press) {
_root.magicselect.gotoAndStop(2);
_root.magicselect.select = 1;
}
}
movieClip 3720 {
frame 1 {
stop();
}
frame 50 {
this.unloadMovie();
_root.story = 11;
}
}
instance of movieClip 3720 {
onClipEvent (enterFrame) {
if (_root.attacking == true) {
if (this.hitTest(_root.player)) {
if (_root.direc == 'left') {
this._x -= 4;
}
if (_root.direc == 'right') {
this._x += 4;
}
}
}
}
onClipEvent (enterFrame) {
if (_root.magic == true) {
if (this.hitTest(_root.player)) {
if (_root.direc == 'left') {
if (_root.classi == ice1) {
play();
}
this._x -= 4;
}
if (_root.direc == 'right') {
this._x += 4;
}
}
}
}
}
instance player of movieClip 2082 {
onClipEvent (mouseMove) {
if (this.hitTest(_root.donttouch)) {
_root._x = telex;
}
}
onClipEvent (enterFrame) {
if (_root.mobility == false) {
_root.attacking = false;
_root.magic = false;
}
}
onClipEvent (load) {
gumpht = 0;
}
onClipEvent (enterFrame) {
if (_root.paintimer == true) {
++gumpht;
}
if (gumpht == 15) {
gumpht = 0;
_root.paintimer = false;
_root.painallowed = true;
}
}
onClipEvent (load) {
telex = 0;
tporting = false;
teletimer = 0;
tportnumie = 10;
tmove;
}
onClipEvent (enterFrame) {
teleportuse = this._x;
}
onClipEvent (enterFrame) {
if (tporting == true) {
_root.magic = false;
_root.otheraction = true;
_root.painallowed = false;
++teletimer;
if (teletimer == tportnumie) {
teletimer = 0;
tporting = false;
tmove = 0;
tporting = false;
_root.otheraction = false;
_root.attacking = false;
_root.magic = false;
_root.painallowed = true;
}
}
}
onClipEvent (load) {
function tport11() {
if (_root.direc == 'right') {
_root.telex = this._x;
tmove = 20;
tporting = true;
_root.tportactive = false;
gotoAndStop('tport');
_root.magic = true;
}
if (_root.direc == 'left') {
_root.telex = this._x;
tporting = true;
tmove = -20;
_root.tportactive = false;
gotoAndStop('tport');
_root.magic = true;
}
}
}
onClipEvent (enterFrame) {
if (tporting == true) {
if (tmove > 0) {
this._x += tmove;
--tmove;
}
if (tmove < 0) {
this._x += tmove;
++tmove;
}
if (tmove == 0) {
tporting = false;
_root.otheraction = false;
tporting = false;
_root.magic = false;
}
}
}
onClipEvent (load) {
function tport2() {
if (_root.direc == 'right') {
tmove = 35;
tporting = true;
_root.tportactive = false;
gotoAndStop('tport');
_root.magic = true;
}
if (_root.direc == 'left') {
tmove = -35;
_root.tportactive = false;
tporting = true;
gotoAndStop('tport');
_root.magic = true;
}
}
}
onClipEvent (load) {
function tport3() {
if (_root.direc == 'right') {
tmove = 40;
_root.tportactive = false;
tporting = true;
gotoAndStop('tport');
_root.magic = true;
}
if (_root.direc == 'left') {
tmove = -40;
tporting = true;
_root.tportactive = false;
gotoAndStop('tport');
_root.magic = true;
}
}
}
onClipEvent (load) {
function tport1() {
if (_root.itport == 1) {
tport11();
}
if (_root.itport == 2) {
tport2();
}
if (_root.itport == 3) {
tport3();
}
}
}
onClipEvent (load) {
timtim = 0;
dc = 0;
coolfinish = true;
var grav = 0;
timer = 0;
_root.hud.infobar = '';
action = false;
runspeed = 13;
mobility = true;
_root.hud.infobar = 'explore';
var attacking = false;
var jumpHeight = 20;
jumpdone = false;
var slow = 0.7;
var slowspd = speed / 1.5;
setspeed = 13;
speed = setspeed;
scale = _xscale;
kspeed = 30;
var ex = 8;
this.jump.gotoAndStop('fall');
}
onClipEvent (enterFrame) {
if (_xscale == scale) {
_root.direc = 'left';
}
if (_xscale == -scale) {
_root.direc = 'right';
}
}
onClipEvent (enterFrame) {
if (_root.airhit == true) {
_root.painallowed = false;
if (grav < 0) {
this.gotoAndStop('airhit1');
}
if (grav > 0) {
this.gotoAndStop('airhit2');
}
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop('groundhit');
_root.airhit = false;
}
}
}
onClipEvent (enterFrame) {
if (_root.momentum < 0) {
this._x += _root.momentum;
_xscale = -scale;
++_root.momentum;
}
if (_root.momentum > 0) {
this._x += _root.momentum;
_xscale = scale;
--_root.momentum;
}
}
onClipEvent (load) {
dc = 0;
}
onClipEvent (enterFrame) {
if (_root.mobility == true) {
++grav;
_y = _y + grav;
while (_root.ground.hitTest(_x, _y, true)) {
_y = _y - 1;
grav = 0;
}
if (_root.water.hitTest(_x, _y, true)) {
if (grav > 0) {
grav *= slow;
}
speed = slowspd;
} else {
speed = setspeed;
}
}
}
onClipEvent (enterFrame) {
if (_root.otheraction == false) {
if (_root.mobility == true) {
if (Key.isDown(68)) {
if (_root.attacking == false) {
if (_root.magic == false) {
_x = _x + speed;
_xscale = -scale;
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop('run');
} else {
this.gotoAndStop('jump');
if (grav <= -1) {
this.jump.gotoAndStop(3);
}
if (grav == 0) {
this.jump.gotoAndStop(2);
}
if (grav > 0) {
this.jump.gotoAndStop(5);
}
}
}
}
} else {
if (Key.isDown(65)) {
if (_root.attacking == false) {
if (_root.magic == false) {
_x = _x - speed;
_xscale = scale;
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop('run');
} else {
this.gotoAndStop('jump');
this.jump.gotoAndStop('fall');
if (grav <= -1) {
this.jump.gotoAndStop(3);
}
if (grav == 0) {
this.jump.gotoAndStop(2);
}
if (grav > 0) {
this.jump.gotoAndStop(5);
}
}
}
}
} else {
if (_root.ground.hitTest(_x, _y + 3, true) && !Key.isDown(79) && action == false && !Key.isDown(73)) {
if (_root.attacking == false) {
if (_root.magic == false) {
this.gotoAndStop('idle');
}
}
}
if (!_root.ground.hitTest(_x, _y + 3, true) && !Key.isDown(79) && action == false && !Key.isDown(73)) {
if (_root.attacking == false) {
if (_root.magic == false) {
this.gotoAndStop('jump');
if (grav <= -3) {
this.jump.gotoAndStop(3);
}
if (grav <= -3) {
this.jump.gotoAndStop(3);
}
if (grav > -3 && grav <= 0) {
this.jump.gotoAndStop(2);
}
if (grav > 1) {
this.jump.gotoAndStop(5);
}
}
}
}
}
}
if (Key.isDown(87) && _root.ground.hitTest(_x, _y + 3, true)) {
grav = -jumpHeight;
++_root.loaditems;
_root.attachMovie('dust', 'dust' + _root.loaditems, _root.getNextHighestDepth());
_root.wings.start();
_root['dust' + _root.loaditems]._x = this._x;
_root['dust' + _root.loaditems]._y = this._y;
_y = _y - 4;
this.gotoAndStop('jump');
}
}
}
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 2, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height / 6, true) || _root.ground.hitTest(_x + _width / 2 + ex, _y - _height, true)) {
_x = _x - speed;
_x = _x - tmove;
_root.momentum = -1;
tmove = 0;
tporting = false;
if (teleportding == false) {
_root.otheraction = false;
}
}
if (_root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 2, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height / 6, true) || _root.ground.hitTest(_x - _width / 2 - ex, _y - _height, true)) {
_root.momentum = 0;
_x = _x + speed;
_x = _x - tmove;
_root.momentum = 1;
tmove = 0;
tporting = false;
teleportding = false;
if (teleportding) {
_root.otheraction = false;
}
}
if (_root.ground.hitTest(_x, _y - _height - 15, true)) {
grav = 1;
}
i = 0;
while (i < 99) {
if (this.hitTest('_root.ground' + i)) {
_root.ground = eval('_root.ground' + i);
}
++i;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(74)) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.attacking == false) {
if (_root.otheraction == false) {
if (_root.mobility == true) {
if (_root.magic == false) {
if (_root.combono == 1) {
_root.player.gotoAndStop('attack1');
_root.combostart = true;
_root.attacking = true;
_root.setdamage = 1;
_root.setdistance = 10;
if (_xscale == scale) {
this._x -= 5;
}
if (_xscale == -scale) {
this._x += 5;
}
}
if (_root.combono == 2) {
_root.player.gotoAndStop('attack2');
_root.attacking = true;
_root.combotimer -= 10;
_root.setdistance = 10;
if (_xscale == scale) {
this._x -= 10;
}
if (_xscale == -scale) {
this._x += 10;
}
}
if (_root.combono == 3) {
_root.player.gotoAndStop('attack3');
_root.attacking = true;
_root.combotimer -= 10;
_root.setdistance = 10;
if (_xscale == scale) {
this._x -= 15;
}
if (_xscale == -scale) {
this._x += 15;
}
}
if (_root.combono == 4) {
_root.player.gotoAndStop('attack4');
_root.attacking = true;
_root.combotimer -= 15;
_root.setdistance = 10;
if (_xscale == scale) {
this._x -= 5;
}
if (_xscale == -scale) {
this._x += 5;
}
}
if (_root.combono == 5) {
_root.player.gotoAndStop('attack5');
_root.attacking = true;
_root.combotimer -= 10;
_root.setdamage = 2;
_root.setdistance = 10;
if (_xscale == scale) {
this._x -= 5;
}
if (_xscale == -scale) {
this._x += 5;
}
}
if (_root.combono == 6) {
_root.player.gotoAndStop('attack6');
_root.attacking = true;
_root.combotimer -= 10;
_root.setdamage = 3;
_root.setdistance = 10;
if (_xscale == scale) {
this._x -= 5;
}
if (_xscale == -scale) {
this._x += 5;
}
}
if (_root.combono == 7) {
_root.player.gotoAndStop('attack7');
_root.attacking = true;
_root.combotimer -= 10;
_root.setdamage = 4;
_root.setdistance = 10;
if (_xscale == scale) {
this._x -= 5;
}
if (_xscale == -scale) {
this._x += 5;
}
}
if (_root.combono == 8) {
_root.player.gotoAndStop('attack8');
_root.attacking = true;
_root.setdamage = 5;
_root.combotimer -= 10;
_root.setdistance = 20;
if (_xscale == scale) {
this._x -= 15;
}
if (_xscale == -scale) {
this._x += 25;
}
}
if (_root.combono == 9) {
_root.player.gotoAndStop('attack9');
_root.attacking = true;
_root.combotimer -= 10;
if (_xscale == scale) {
this._x -= 5;
}
if (_xscale == -scale) {
this._x += 5;
}
}
if (_root.combono == 10) {
_root.player.gotoAndStop('attack10');
_root.attacking = true;
_root.combotimer -= 10;
if (_xscale == scale) {
this._x -= 5;
}
if (_xscale == -scale) {
this._x += 5;
}
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(74)) {
if (_root.otheraction == false) {
if (_root.mobility == true) {
if (_root.ground.hitTest(_x, _y + 3, false)) {
if (_root.attacking == false) {
if (_root.magic == false) {
if (_root.combono == 1) {
_root.player.gotoAndStop('airattack1');
_root.combostart = true;
_root.attacking = true;
grav = 0;
}
if (_root.combono == 2) {
_root.player.gotoAndStop('airattack2');
_root.attacking = true;
grav = 0;
}
if (_root.combono == 3) {
_root.player.gotoAndStop('airattack3');
_root.attacking = true;
this._y += 20;
}
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
if (_root.combono >= _root.combomax) {
_root.combono = 0;
_root.attacking = false;
}
}
onClipEvent (enterFrame) {
if (_root.combostart == false) {
_root.combono = 1;
_root.combotimer = 0;
}
}
onClipEvent (enterFrame) {
if (_root.combostart == true) {
++_root.combotimer;
}
if (_root.combotimer == 15) {
_root.combotimer = 0;
_root.combostart = false;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(73)) {
if (_root.magic == false) {
_root.selector.play();
_root.mobility = false;
_root.attacking = false;
}
}
}
onClipEvent (enterFrame) {
_root.juice += 0.05;
if (_root.juice > _root.maxjuice) {
_root.juice = _root.maxjuice;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(75)) {
if (_root.magicpower >= _root.setmage) {
if (_root.mobility == true && _root.otheraction == false) {
if (_root.attacking == false) {
if (_root.magic == false) {
if (_root.classi == 'tport') {
if (_root.tportactive == true) {
_root.magicpower -= _root.setmage - 15;
tport1();
}
} else {
_root.magic = true;
_root.magicpower -= _root.setmage;
gotoAndStop('magic');
}
}
}
}
}
}
}
onClipEvent (enterFrame) {
++_root.magici;
if (_root.magici == _root.magiclim) {
_root.magici = 0;
_root.magicpower += 1;
}
}
onClipEvent (enterFrame) {
if (_root.attacking == false) {
_root.player.magic.gotoAndStop(1);
}
}
onClipEvent (enterFrame) {
if (_root.tportactive == false) {
++_root.timtim;
}
if (_root.timtim == 30) {
_root.timtim = 0;
_root.tportactive = true;
}
}
onClipEvent (enterFrame) {
if (_root.otheraction == false) {
if (_root.mobility == false) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop('idle');
} else {
if (_root.ground.hitTest(_x, _y + 3, false)) {
this.gotoAndStop('jump');
_root.player.jump.gotoAndStop('fall');
}
}
}
}
}
onClipEvent (enterFrame) {
if (_root.health <= 0) {
_root.mobility = false;
stopAllSounds();
this.gotoAndStop('death');
++dc;
if (dc == 40) {
_root.bardelete = true;
_root.deathcall();
dc = 0;
_root.gotoAndStop('death');
}
}
}
onClipEvent (enterFrame) {
if (_root.talktime <= 5) {
++_root.talktime;
_root.talkal = false;
} else {
_root.talkal = true;
}
}
onClipEvent (enterFrame) {
if (_root.classi == 'fire1' || _root.classi == 'fire2' || _root.classi == 'fire3') {
_root.fireclasses = true;
} else {
_root.firelcasses = false;
}
}
onClipEvent (enterFrame) {
if (_root.iceclass == 'ice1') {
_root.freezetime = 60;
}
if (_root.iceclass == 'ice2') {
_root.freezetime = 120;
}
if (_root.iceclass == 'ice3') {
_root.freezetime = 280;
}
}
onClipEvent (enterFrame) {
if (_root.teleportding == true) {
gotoAndStop('teleport');
}
}
}
frame 363 {
_root.player.unloadMovie();
_root.aziel.unloadMovie();
}
movieClip 3764 {
}
movieClip 3772 {
}
movieClip 3779 {
}
movieClip 3825 {
frame 1 {
com.newgrounds.API.unlockMedal('Savior');
kongregate.stats.submit('FinalBossMedal', 1);
}
frame 50 {
stopAllSounds();
}
frame 416 {
stopAllSounds();
_root.gotoAndStop('azieldownfalltalk');
_root.nextFrame();
_root.play();
}
}
instance of movieClip 753 MedalPopup {
onClipEvent (construct) {
alwaysOnTop = 'true';
}
}
frame 364 {
stop();
}
button 3829 {
on (press) {
_root.gotoAndStop('credits');
}
}
button 3884 {
on (press, keyPress 's') {
_root.gotoAndStop('credits');
}
}
movieClip 3885 {
frame 1 {
stop();
stopAllSounds();
}
frame 14 {
}
}
frame 365 {
_root.skills.start();
}
button 3887 {
on (press) {
gotoAndStop(1);
}
}
movieClip 3890 {
frame 495 {
stopAllSounds();
_root.gotoAndStop('menu', 1);
}
}