STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229595
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/68711372?noj=FRM68711372-22DC" width="1" height="1"></div>

593275_FPAWorld35188.swf

This is the info page for
Flash #209497

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS1/AS2]
Combined Code
// unknown tag 88 length 66 movieClip 13 bottlePopup { } movieClip 15 wallBlock { } movieClip 17 { } movieClip 20 { } movieClip 23 Bottle { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID); } ++_root.BaddieCount; bounceThresh = 10; bounceDefault = 0.5; ItIs = 'Bottle'; Status = 'Stupid'; health = 500; isWide = 35; worth = 0; hasBeenGrabbed = false; canZoom = true; recenterPoints(); getAttacked = _root.standardGetAttacked; _root.baddieSetupFunc(this); canRead = function (ex, ey, eRL, eUD, eBadOn, fromChar) { _root.messagePopup('SDFSDFS'); if (!fromChar.isAttacking && moveRL == 0) { _root.playSound('message', _x, 50); _root.popupBottle(this); delete hitCharFunc; gotoAndStop('view'); } }; } frame 2 { delete onEnterFrame; stop(); hitPwnFunc = _root.standardHitCharStunnedPwnFunc; hitCharFunc = canRead; } frame 3 { moveUD = 0; InShellrotation = 0; InShell._rotation = 0; hitPwnFunc = _root.standardHitCharStunnedPwnFunc; hitCharFunc = canRead; facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (!_root.Paused) { if (!sliding) { if (Math.abs(moveRL) > 1) { moveRL -= (moveRL / Math.abs(moveRL)) * 1; } else { moveRL = 0; } moveRL *= 0.95; } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } if (Math.abs(moveRL) > 5) { var v3 = 0; while (v3 < _root.BaddieArray.length) { i = _root.BaddieArray[v3]; if (_root.BLayer['Baddie' + i].hitTest(this._x + this.moveRL, this._y - this.spread + this.moveUD, true) && i != this.ID && _root.BLayer['Baddie' + i].downTime == 0) { this.temp = _root.BLayer['Baddie' + i].hitShellFunc(this._x + this.moveRL, this._y + this.moveUD, 65, this); } ++v3; } } temp = RLFunc(); this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.5; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (temp == 'Wall' || _xscale * _rotation < -6000) { _xscale = -_xscale; moveRL = Math.round(_xscale / 25); } if (moveRL == 0 && Math.abs(100 - _yscale) < 1) { _xscale = facing * 100; _yscale = 100; gotoAndStop('Listen'); } } }; stop(); } frame 4 { onEnterFrame = function () { if (_root.Paused) { } else { temp = RLFunc(); if (temp == 'rEdge' || temp == 'rBackEdge') { _xscale = 100; moveRL = 3.333333333333334; } else { if (temp == 'lEdge' || temp == 'lBackEdge') { _xscale = -100; moveRL = -3.333333333333334; } else { if (temp == 'Wall' || _xscale * _rotation < -6000) { _xscale = -_xscale; moveRL = Math.round(_xscale / 30); } } } } }; stop(); } frame 5 { hitPwnFunc = _root.standardHitCharStunJumpFunc; hitCharFunc = hitPwnFunc; facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (!_root.Paused) { if (Math.abs(this.moveRL) > 4) { this.moveRL *= 0.97; } if (Math.abs(this.moveUD) > 20) { this.moveUD *= 0.95; } ++moveUD; if (downTime > 0) { --downTime; } if (Math.abs(rotter) > 60) { rotter *= 0.9; } var v3 = 0; while (v3 < _root.BaddieArray.length) { i = _root.BaddieArray[v3]; if (_root.BLayer['Baddie' + i].hitTest(this._x + this.moveRL, this._y - this.spread + this.moveUD, true) && i != this.ID && _root.BLayer['Baddie' + i].downTime == 0) { this.temp = _root.BLayer['Baddie' + i].hitShellFunc(this._x + this.moveRL, this._y + this.moveUD, 65, this); } ++v3; } InShellrotation += rotter; JumpGuide('Idle'); jumpAnchor._rotation = -_rotation * (_xscale / 100); this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.5; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (this.returnStat == 'Wall') { rotter *= -1.5; this.spring = 20; this._xscale = 75 * this.facing; this._yscale = 125; } else { if (this.returnStat == 'Bounce') { this.spring = -10; this._xscale = 125 * this.facing; this._yscale = 75; } } } }; if (_root.ELayer.bottlePopup != undefined) { _root.ELayer.bottlePopup.onEnterFrame = function () { if (this._alpha > 0) { this._alpha -= 20; } else { this.removeMovieClip(); } }; _root.ELayer.bottlePopup.onEnterFrame(); } } frame 6 { onEnterFrame = function () { if (_root.ELayer.bottlePopup != undefined) { if (Math.abs(_x - _root.Char._x) > 200 || Math.abs(_y - _root.Char._y) > 500) { _root.ELayer.bottlePopup.onEnterFrame = function () { if (this._alpha > 0) { this._alpha -= 10; } else { this.removeMovieClip(); } }; hitCharFunc = canRead; gotoAndStop('Listen'); } else { if (_root.Char.UpIsDown()) { _root.playSound('TrophyGetSound', _x, 50); _root.bottlesArray[_root.MainLevelID] = true; _root.shouldFlush = true; _root.saveNetworkData(); _root.ELayer.bottlePopup.onEnterFrame = function () { if (this._alpha > 0) { this._alpha -= 10; } else { this.removeMovieClip(); } }; gotoAndPlay('Collected'); } } } }; } frame 11 { onEnterFrame = function () { this._x += this.shakeRL / 2; this.shakeRL = -this.shakeRL; if (this.b > 0) { --this.b; } else { gotoAndStop('Jump'); } }; } frame 12 { gotoAndStop('Jump'); } frame 13 { gotoAndStop('Idle'); } frame 14 { gotoAndStop('Jump'); } frame 15 { onEnterFrame = function () { nextFrame(); }; } frame 49 { _root.removeBaddie(ID, true); } } movieClip 25 { } movieClip 26 { } movieClip 34 { } movieClip 35 { } movieClip 36 Key { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID); } ++_root.BaddieCount; bounceThresh = 2; bounceDefault = 0.5; ItIs = 'Key'; Status = 'Stupid'; health = 500; isWide = 35; worth = 1; hasBeenGrabbed = false; canZoom = true; recenterPoints(); getAttacked = _root.standardGetAttacked; _root.baddieSetupFunc(this); } frame 2 { gotoAndStop('Idle'); } frame 3 { moveUD = 0; InShell._rotation = 0; hitPwnFunc = _root.standardHitCharStunnedPwnFunc; hitCharFunc = function () { _root.playSound('TrophyGetSound', _x, 50); _root['challengeScore' + _root.LevelLoaded] = 1; _root.InteractLayer.Door0.checkBox.gotoAndStop(2); _root.saveNetworkData(); gotoAndPlay('Collected'); }; facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (!_root.Paused) { if (!sliding) { if (Math.abs(moveRL) > 1) { moveRL -= (moveRL / Math.abs(moveRL)) * 1; } else { moveRL = 0; } moveRL *= 0.95; } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } temp = RLFunc(); this.spring += (100 - this._yscale) / 3; this.spring *= 0.8; this._yscale += this.spring; this._xscale = (100 - this._yscale + 100) * this.facing; if (temp == 'Wall' || _xscale * _rotation < -6000) { _xscale = -_xscale; moveRL = Math.round(_xscale / 25); } } }; stop(); } frame 4 { onEnterFrame = function () { if (_root.Paused) { } else { temp = RLFunc(); if (temp == 'rEdge' || temp == 'rBackEdge') { _xscale = 100; moveRL = 3.333333333333334; } else { if (temp == 'lEdge' || temp == 'lBackEdge') { _xscale = -100; moveRL = -3.333333333333334; } else { if (temp == 'Wall' || _xscale * _rotation < -6000) { _xscale = -_xscale; moveRL = Math.round(_xscale / 30); } } } } }; stop(); } frame 5 { hitPwnFunc = _root.standardHitCharStunJumpFunc; hitCharFunc = hitPwnFunc; facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (!_root.Paused) { if (Math.abs(this.moveRL) > 4) { this.moveRL *= 0.97; } if (Math.abs(this.moveUD) > 20) { this.moveUD *= 0.95; } ++moveUD; if (downTime > 0) { --downTime; } if (Math.abs(rotter) > 60) { rotter *= 0.9; } InShellrotation += rotter; JumpGuide('Idle'); jumpAnchor._rotation = -_rotation * (_xscale / 100); this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.5; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (this.returnStat == 'Wall') { rotter *= -1.5; this.spring = 6; this._xscale = 75 * this.facing; this._yscale = 125; } else { if (this.returnStat == 'Bounce') { rotter *= -2.5; this.spring = -6; this._xscale = 125 * this.facing; this._yscale = 75; } } } }; } frame 11 { onEnterFrame = function () { this._x += this.shakeRL / 2; this.shakeRL = -this.shakeRL; if (this.b > 0) { --this.b; } else { gotoAndStop('Jump'); } }; } frame 12 { gotoAndStop('Jump'); } frame 13 { gotoAndStop('Jump'); } frame 14 { gotoAndStop('Jump'); } frame 15 { onEnterFrame = function () { nextFrame(); }; } frame 49 { _root.OutPut.gotoAndStop('Keys'); _root.removeBaddie(ID, true); } } movieClip 38 { } movieClip 40 DiscoShard { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID); } ++_root.BaddieCount; bounceThresh = 2; bounceDefault = 0.5; ItIs = 'Key'; Status = 'Stupid'; health = 500; isWide = 35; worth = 1; hasBeenGrabbed = false; canZoom = true; recenterPoints(); getAttacked = _root.standardGetAttacked; _root.baddieSetupFunc(this); } frame 2 { gotoAndStop('Idle'); } frame 3 { moveUD = 0; InShell._rotation = 0; hitPwnFunc = _root.standardHitCharStunnedPwnFunc; hitCharFunc = function () { _root.playSound('TrophyGetSound', _x, 50); _root['challengeScore' + _root.LevelLoaded] = 1; _root.InteractLayer.Door0.checkBox.gotoAndStop(2); if (_root.challengeScoreBonus7 == 1 && _root.challengeScoreBonus11 == 1 && _root.challengeScoreBonus12 == 1) { _root.challengeScoreBonus10 = 1; } _root.saveNetworkData(); gotoAndPlay('Collected'); }; spring = 2; facing = _xscale / Math.abs(_xscale); _xscale = facing * 100; _yscale = 100; onEnterFrame = function () { if (!_root.Paused) { if (!sliding) { if (Math.abs(moveRL) > 1) { moveRL -= (moveRL / Math.abs(moveRL)) * 1; } else { moveRL = 0; } moveRL *= 0.95; } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } this.spring += -this._rotation / 50; this.spring *= 0.99; this._rotation += this.spring; if (temp == 'rEdge' || temp == 'rBackEdge') { _xscale = 100; moveRL = -moveRL; } else { if (temp == 'lEdge' || temp == 'lBackEdge') { _xscale = -100; moveRL = -moveRL; } else { if (temp == 'Wall' || _xscale * _rotation < -6000) { _xscale = -_xscale; moveRL = Math.round(_xscale / 25); } } } } }; stop(); } frame 4 { onEnterFrame = function () { if (_root.Paused) { } else { temp = RLFunc(); if (temp == 'rEdge' || temp == 'rBackEdge') { _xscale = 100; moveRL = 3.333333333333334; } else { if (temp == 'lEdge' || temp == 'lBackEdge') { _xscale = -100; moveRL = -3.333333333333334; } else { if (temp == 'Wall' || _xscale * _rotation < -6000) { _xscale = -_xscale; moveRL = Math.round(_xscale / 30); } } } } }; stop(); } frame 5 { hitPwnFunc = _root.standardHitCharStunJumpFunc; hitCharFunc = hitPwnFunc; facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (!_root.Paused) { if (Math.abs(this.moveRL) > 4) { this.moveRL *= 0.97; } if (Math.abs(this.moveUD) > 20) { this.moveUD *= 0.95; } ++moveUD; if (downTime > 0) { --downTime; } if (Math.abs(rotter) > 60) { rotter *= 0.9; } InShellrotation += rotter; JumpGuide('Idle'); jumpAnchor._rotation = -_rotation * (_xscale / 100); this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.5; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (this.returnStat == 'Wall') { rotter *= -1.5; this.spring = 6; this._xscale = 75 * this.facing; this._yscale = 125; } else { if (this.returnStat == 'Bounce') { rotter *= -2.5; this.spring = -6; this._xscale = 125 * this.facing; this._yscale = 75; } } } }; } frame 11 { onEnterFrame = function () { this._x += this.shakeRL / 2; this.shakeRL = -this.shakeRL; if (this.b > 0) { --this.b; } else { gotoAndStop('Jump'); } }; } frame 12 { gotoAndStop('Jump'); } frame 13 { gotoAndStop('Jump'); } frame 14 { gotoAndStop('Jump'); } frame 15 { onEnterFrame = function () { nextFrame(); }; } frame 49 { _root.OutPut.gotoAndStop('Keys'); _root.removeBaddie(ID, true); } } movieClip 56 { } movieClip 57 BeardShock { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID); } ++_root.BaddieCount; ItIs = 'BeardShock'; Status = 'Stupid'; health = 500; isWide = 35; spread = 30; worth = 1; attackStrength = 10; bounceThresh = 100; bounceDefault = 1; jabSound = 'BadSlash'; slashSound = 'baseballHit'; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; getAttacked = function (ex, ey, hitPower, eRot, eType, fromChar) { _xscale = ((_x - ex) / Math.abs(_x - ex)) * 100; return this.standardGetAttacked(ex, ey, hitPower, eRot, eType, fromChar); }; standardGetAttacked = _root.standardGetAttacked; _root.baddieSetupFunc(this); } frame 2 { nextFrame(); } frame 3 { InShell._rotation = 0; InShellrotation = 0; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; onEnterFrame = function () { if (_root.Paused) { InShell.stop(); } else { if (_currentframe == 3) { InShell.play(); if (_x < -200 || _x > 1400) { _root.removeBaddie(ID, true); } else { moveRL = _xscale / 8; centerX += moveRL; _x = centerX; } } } }; hitCharFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { if (fromChar._alpha == 100) { if (ex < _x) { fromChar.moveRL = -8; fromChar._xscale = 100; } else { fromChar.moveRL = 8; fromChar._xscale = -100; } fromChar.JumpFunc(22); delete fromChar.onEnterFrame; fromChar.gotoAndStop('FrontSlam'); fromChar.hurting = true; gotoAndStop('engage'); _root.HurtPants(10, fromChar); return true; } else { return false; } }; hitPwnFunc = hitCharFunc; } frame 4 { this.onEnterFrame = function () { this._x += this.shakeRL / 2; this.shakeRL = -this.shakeRL; if (this.b > 0) { --this.b; } else { gotoAndStop('Return'); } }; } frame 5 { InShell._rotation = 0; InShellrotation = 0; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; onEnterFrame = function () { if (_root.Paused) { InShell.stop(); } else { if (_currentframe == 5) { InShell.play(); if (_root.BLayer.Baddie0.hitTest(_x, _y, true)) { baddie = _root.BLayer.Baddie0; if (Math.abs(this._x - baddie._x) < baddie.isWide + Math.abs(moveRL) + spread) { baddie._xscale = _xscale; baddie.facing = _xscale / Math.abs(_xscale); _root.playSound('beardWimp', baddie._x, 100, 0.7); baddie.moveRL = _xscale / 50; baddie.moveUD = -20; if (baddie.baddieLevel < 3) { baddie.gotoAndStop('poked'); } else { baddie.gotoAndStop('deadjump'); } gotoAndStop('Idle'); } } if (_x < -200 || _x > 1400) { _root.removeBaddie(ID, true); } else { centerX += _xscale / 8; _x = centerX; } } } }; hitCharFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { if (fromChar._alpha == 100) { if (ex < _x) { fromChar.moveRL = -8; fromChar._xscale = 100; } else { fromChar.moveRL = 8; fromChar._xscale = -100; } fromChar.JumpFunc(22); delete fromChar.onEnterFrame; fromChar.gotoAndStop('FrontSlam'); fromChar.hurting = true; gotoAndStop('engage'); _root.HurtPants(10, fromChar); return true; } else { return false; } }; hitPwnFunc = hitCharFunc; } } movieClip 60 { } movieClip 62 { } movieClip 64 { } movieClip 67 { } movieClip 68 JumpPad { frame 1 { _name = 'JumpPad' + _root.JumpPadCount; ++_root.JumpPadCount; if (looseRot == unedfined) { looseRot = false; } else { canRot = true; } if (TimeSpring == undefined) { TimeSpring = false; } if (launchAngle == undefined) { launchAngle = _rotation; } else { canRot = true; } if (canRot == undefined) { canRot = false; } if (still == undefined) { still = false; } if (FloatUp == undefined) { FloatUp = 0; } } frame 2 { springHeight = Thrust * 2; springing._yscale = springHeight * 1.666666666666667; surface._y = -springHeight; green._rotation = -_rotation; originRot = _rotation; if (!TimeSpring) { stop(); } } frame 3 { springDisplay._rotation = -_rotation; springDisplay.timer.text = _root['highScoreTT' + _root.LevelLoaded]; stop(); } } movieClip 79 { frame 1 { gotoAndStop(_parent.color + 1); } } movieClip 80 toothpickDetached { frame 1 { stop(); } frame 9 { gotoAndPlay('loop'); } frame 10 { _rotation = 10 - random(20); } frame 22 { var tempX = Math.floor((_root.MaxX + _x) / 2880); var tempY = Math.floor((_root.MaxY + _y) / 1920); var temp = tempY + tempX * _root.FGtilesY; _x = _x + (_root.MaxX - tempX * 2880); _y = _y + (_root.MaxY + (random(4) - 2) - tempY * 1920); _root['levelBitmap' + temp].draw(this, this.transform.matrix); removeMovieClip(this); } } movieClip 113 bubble { frame 17 { if (_currentframe == 17) { gotoAndPlay('loop'); } } frame 33 { bubbleRemove(_name); } } frame 1 { _root.kongregate.services.connect(); MovieClip.prototype.oldbrokenHitTest = MovieClip.prototype.hitTest; MovieClip.prototype.hitTest = function (ex, ey, shapeflag) { return this.oldbrokenHitTest(ex * (eScale / 100), ey * (eScale / 100), shapeflag); }; APITrackEvent = function (doWhat, howMuch) { if (howMuch == undefined) { howMuch = 1; } if (howMuch > 0) { kongregate.stats.submit(doWhat, howMuch); } }; Load = 'Menus3'; Door = 'Door0'; LevelLoaded = 'Menus0'; debug = false; isExternal = false; ShowSmoke = false; ShowSmokeArray = ['Bonus3', 'Bonus13', 'Bonus19', 'Level12']; var isLevelExternal = {}; var hasForeground = {'Trans1': true, 'Level11': true, 'Level8': true, 'Level16': true, 'Level4': true, 'Bonus15': true, 'Level1': true, 'Trans6': true, 'Level9': true, 'Level11': true, 'Trans4': true, 'Trans5': true, 'Bonus18': true, 'Bonus14': true, 'Trans3': true, 'Level14': true, 'Level7': true, 'Trans7': true, 'Level10': true, 'Bonus9': true, 'Bonus24': true, 'Trans13': true, 'Trans14': true, 'Trans15': true, 'Bonus25': true, 'Bonus10': true}; preloadshell.bar._xscale = 0; onEnterFrame = function () { loaded = (getBytesLoaded() / getBytesTotal()) * 100; if (preloadshell.bar._xscale < loaded) { ++preloadshell.bar._xscale; } if (preloadshell.bar._xscale == 100) { preloadshell.nextFrame(); onEnterFrame = function () {}; } }; APIStartGame = function () { MochiEvents.startPlay(); messagePopup('API Start'); trace('API Start'); }; APIEndGame = function () { MochiEvents.endPlay(); messagePopup('API End'); trace('API End'); }; APIReward = function (doWhat) { API.unlockMedal(doWhat); messagePopup('API Reward: ' + doWhat); trace('API Reward: ' + doWhat); }; syncHold = getTimer() + 33; preloadshell.bar._xscale = 0; stop(); } button 118 { on (press) { getURL('http://www.bornegames.com/games/fpa-world-4/', '_blank'); } } button 121 { on (press) { getURL('http://www.bornegames.com/games/fpa-world-1/remix/', '_blank'); } } button 124 { on (press) { getURL('https://itunes.apple.com/us/app/fancy-pants-adventures/id477966895', '_blank'); } } button 127 { on (press) { getURL('https://itunes.apple.com/us/app/fancy-pants-adventures/id477966895', '_blank'); } } button 130 { on (press) { getURL('http://marketplace.xbox.com/en-US/Product/The-Fancy-Pants-Adventures/66acd000-77fe-1000-9115-d80258410a9f', '_blank'); } } button 133 { on (press) { getURL('http://us.playstation.com/games/the-fancy-pants-adventures-ps3.html', '_blank'); } } movieClip 135 { } button 136 { on (rollOver) { talkBox.gotoAndStop(2); face.gotoAndStop(2); face._yscale = 110; face._xscale = 110; } on (rollOut) { talkBox.gotoAndStop(1); face.gotoAndStop(1); face._yscale = 100; face._xscale = 100; } on (press) { _root.APITrackEvent('launchFacebook'); getURL('http://www.facebook.com/thefancypantsadventures', '_blank'); } } button 137 { on (rollOver) { talkBox.gotoAndStop(3); twit.gotoAndStop(2); twit._yscale = 110; twit._xscale = 110; } on (rollOut) { talkBox.gotoAndStop(1); twit.gotoAndStop(1); twit._yscale = 100; twit._xscale = 100; } on (press) { _root.APITrackEvent('launchTwitter'); getURL('http://twitter.com/RunFastRunFancy', '_blank'); } } button 138 { on (rollOver) { talkBox.gotoAndStop(4); head.gotoAndStop(2); head._yscale = 110; head._xscale = 110; } on (rollOut) { talkBox.gotoAndStop(1); head.gotoAndStop(1); head._yscale = 100; head._xscale = 100; } on (press) { _root.APITrackEvent('launchBlog'); getURL('http://www.bornegames.com/the-fancy-box/', '_blank'); } } button 139 { on (rollOver) { FPM._yscale = 104; FPM._xscale = 104; } on (rollOut) { FPM._yscale = 100; FPM._xscale = 100; } on (press) { getURL('http://www.bornegames.com', '_blank'); } } movieClip 147 { } movieClip 148 { frame 1 { stop(); } } movieClip 151 { frame 2 { stop(); } } movieClip 152 { frame 1 { stop(); } } movieClip 154 { } movieClip 155 { frame 1 { stop(); } } movieClip 157 { } // unknown tag 88 length 127 movieClip 163 { frame 1 { stop(); } frame 25 { gotoAndPlay(1); } } button 167 { on (press) { _root.APITrackEvent('clickPlay'); _root.gotoAndStop('GameFrame'); } } movieClip 168 { frame 1 { _root.APITrackEvent('gameLoadedW3'); stop(); } } frame 2 { } movieClip 200 { } movieClip 213 { } movieClip 249 { } movieClip 328 { frame 67 { gotoAndPlay(1); } } movieClip 359 { } movieClip 378 { } movieClip 379 { frame 1 { onEnterFrame = function () { if (Math.abs(_root.Char.hairRL) > Math.abs(_root.Char.hairUD) || Math.abs(_root.Char.hairUD) < 2) { if (Math.abs(_root.Char.hairRL) < 4) { hairGoTo = 24; } else { if (_root.Char._xscale * _root.Char.hairRL > 0) { if (Math.abs(_root.Char.hairRL) < 15) { hairGoTo = 13; } else { hairGoTo = 2; } } else { if (Math.abs(_root.Char.hairRL) < 15) { hairGoTo = 35; } else { hairGoTo = 46; } } } } else { if (_root.Char.hairUD > 0) { hairGoTo = 13; } else { hairGoTo = 35; } } if (Math.abs(_root.Char.hairGel - hairGoTo) > 10) { if (_root.Char.hairGel > hairGoTo) { _root.Char.hairGel -= 2; } if (_root.Char.hairGel < hairGoTo) { _root.Char.hairGel += 2; } } else { if (_root.Char.hairGel > hairGoTo) { --_root.Char.hairGel; } if (_root.Char.hairGel < hairGoTo) { ++_root.Char.hairGel; } } gotoAndStop(_root.Char.hairGel); }; onEnterFrame(); } } movieClip 381 { } movieClip 382 { frame 1 { if (_root.Char.isCarrying == 'pencil') { gotoAndStop(1); } else { gotoAndStop(2); } } } movieClip 794 { } movieClip 1034 { frame 7 { _parent.rockOutCounter = 0; } frame 73 { if (b == 0) { b = -6; gotoAndPlay('combHair'); } else { if (b == -1) { } else { if (b < 0) { ++b; } else { --b; gotoAndPlay(1); } } } } frame 154 { } frame 290 { gotoAndPlay(244); } frame 411 { _root.playSound('BadStomp', _parent._x, 100); } } movieClip 1088 { } movieClip 1125 { frame 9 { _parent._parent._parent._parent.hairRL = 0; _parent._parent._parent._parent.gelHair(); } frame 19 { if (_parent._parent._parent._parent.isCarrying == 'pencil') { _parent._parent._parent._parent.impact = false; _parent._parent._parent._parent.justLanded = _parent._parent._parent._parent.impact; _parent._parent.gotoAndStop(3); } } frame 22 { _parent._parent._parent._parent.impact = false; _parent._parent._parent._parent.justLanded = _parent._parent._parent._parent.impact; _parent._parent.gotoAndStop(1); stop(); } frame 34 { _parent._parent._parent._parent.isCarrying = 'nothing'; } frame 38 { _parent._parent._parent._parent.maxRL = 20; _parent._parent._parent._parent.sheathFrame = 0; _parent._parent._parent._parent.sheathing = false; _parent._parent.gotoAndStop(1); stop(); } frame 72 { _parent._parent._parent._parent.maxRL = 20; _parent._parent._parent._parent.changeHands = false; _parent._parent.gotoAndStop(3); stop(); } } movieClip 1126 { } movieClip 1180 { } movieClip 1181 { frame 1 { stop(); torsoWalk.gotoAndStop(_parent._currentframe); } frame 2 { torsoLand.gotoAndStop(_parent._currentframe); } frame 3 { torsoPencil.gotoAndStop(_parent._currentframe); } } movieClip 1251 { frame 11 { if (Math.abs(_parent.moveRL) < 4 && !_parent.RightIsDown() && !_parent.LeftIsDown() || _parent.RLStatus == 'Wall') { _parent.gotoBuffer = 'Slow'; } else { if (_parent.RightIsDown() && _parent._xscale < 0 || _parent.LeftIsDown() && _parent._xscale > 0) { if (Math.abs(_parent.moveRL) > 6) { _parent.runtoslide = true; _parent.gotoBuffer = 'Slide'; } else { _parent.gotoBuffer = 'backpeddle'; } } else { if (_parent.friction && !_parent.RightIsDown() && !_parent.LeftIsDown()) { _parent.runtoslide = true; _parent.gotoBuffer = 'Slide'; } else { if (Math.abs(_parent.moveRL) > 18 && Math.abs(_parent.maxRL) > 18 && !_parent.impact) { gotoAndPlay('toRun'); } else { if (Math.abs(_parent.moveRL) > 10) { gotoAndPlay('jogLoopR'); } else { _root.footStep(_parent._x + _parent.RLx(_parent.moveRL), _parent._y + _parent.RLy(_parent.moveRL), _parent._xscale, _parent._rotation, _parent.moveRL, _parent.friction, _parent.aPlatzOn); } } } } } } frame 23 { if (Math.abs(_parent.moveRL) < 4 && !_parent.RightIsDown() && !_parent.LeftIsDown() || _parent.RLStatus == 'Wall') { _parent.gotoBuffer = 'Slow'; } else { if (_parent.RightIsDown() && _parent._xscale < 0 || _parent.LeftIsDown() && _parent._xscale > 0) { if (Math.abs(_parent.moveRL) > 6) { _parent.runtoslide = true; _parent.gotoBuffer = 'Slide'; } else { _parent.gotoBuffer = 'backpeddle'; } } else { if (_parent.friction && !_parent.RightIsDown() && !_parent.LeftIsDown()) { _parent.runtoslide = true; _parent.gotoBuffer = 'Slide'; } else { if (Math.abs(_parent.moveRL) > 18 && Math.abs(_parent.maxRL) > 18 && !_parent.impact) { gotoAndPlay('toRun'); } else { if (Math.abs(_parent.moveRL) > 10) { gotoAndPlay('jogLoopL'); } else { _root.footStep(_parent._x + _parent.RLx(_parent.moveRL), _parent._y + _parent.RLy(_parent.moveRL), _parent._xscale, _parent._rotation, _parent.moveRL, _parent.friction, _parent.aPlatzOn); } } } } } } frame 35 { if (Math.abs(_parent.moveRL) < 4 && !_parent.RightIsDown() && !_parent.LeftIsDown() || _parent.RLStatus == 'Wall') { _parent.gotoBuffer = 'Slow'; } else { if (_parent.RightIsDown() && _parent._xscale < 0 || _parent.LeftIsDown() && _parent._xscale > 0) { if (Math.abs(_parent.moveRL) > 6) { _parent.runtoslide = true; _parent.gotoBuffer = 'Slide'; } else { _parent.gotoBuffer = 'backpeddle'; } } else { if (_parent.friction && !_parent.RightIsDown() && !_parent.LeftIsDown()) { _parent.runtoslide = true; _parent.gotoBuffer = 'Slide'; } else { if (Math.abs(_parent.moveRL) > 18 && Math.abs(_parent.maxRL) > 18 && !_parent.impact) { gotoAndPlay('toRun'); } else { if (Math.abs(_parent.moveRL) <= 10) { gotoAndPlay('walkLoopR'); } else { _root.footStep(_parent._x + _parent.RLx(_parent.moveRL), _parent._y + _parent.RLy(_parent.moveRL), _parent._xscale, _parent._rotation, _parent.moveRL, _parent.friction, _parent.aPlatzOn); } } } } } } frame 43 { if (Math.abs(_parent.moveRL) < 4 && !_parent.RightIsDown() && !_parent.LeftIsDown() || _parent.RLStatus == 'Wall') { _parent.gotoBuffer = 'Slow'; } else { if (_parent.RightIsDown() && _parent._xscale < 0 || _parent.LeftIsDown() && _parent._xscale > 0) { if (Math.abs(_parent.moveRL) > 6) { _parent.runtoslide = true; _parent.gotoBuffer = 'Slide'; } else { _parent.gotoBuffer = 'backpeddle'; } } else { if (_parent.friction && !_parent.RightIsDown() && !_parent.LeftIsDown()) { _parent.runtoslide = true; _parent.gotoBuffer = 'Slide'; } else { if (Math.abs(_parent.moveRL) > 18 && Math.abs(_parent.maxRL) > 18 && !_parent.impact) { gotoAndPlay('toRun'); } else { if (Math.abs(_parent.moveRL) <= 10) { gotoAndPlay('walkLoopL'); } else { _root.footStep(_parent._x + _parent.RLx(_parent.moveRL), _parent._y + _parent.RLy(_parent.moveRL), _parent._xscale, _parent._rotation, _parent.moveRL, _parent.friction, _parent.aPlatzOn); } } } } } } frame 51 { if (Math.abs(_parent.moveRL) < 4 && !_parent.RightIsDown() && !_parent.LeftIsDown() || _parent.RLStatus == 'Wall') { _parent.gotoBuffer = 'Slow'; } else { if (_parent.RightIsDown() && _parent._xscale < 0 || _parent.LeftIsDown() && _parent._xscale > 0) { if (Math.abs(_parent.moveRL) > 6) { _parent.runtoslide = true; _parent.gotoBuffer = 'Slide'; } else { _parent.gotoBuffer = 'backpeddle'; } } else { if (_parent.friction && !_parent.RightIsDown() && !_parent.LeftIsDown()) { _parent.runtoslide = true; _parent.gotoBuffer = 'Slide'; } else { if (Math.abs(_parent.moveRL) > 18 && !_parent.impact) { gotoAndPlay('toRun'); } else { if (Math.abs(_parent.moveRL) <= 10) { gotoAndPlay('walkLoopR'); } else { gotoAndPlay('jogLoopR'); } } } } } } frame 52 { _root.footStep(_parent._x + _parent.RLx(_parent.moveRL), _parent._y + _parent.RLy(_parent.moveRL), _parent._xscale, _parent._rotation, _parent.moveRL, _parent.friction, _parent.aPlatzOn); } frame 55 { _parent.gotoBuffer = 'Run'; } frame 59 { if (Math.abs(_parent.moveRL) < 4 && !_parent.RightIsDown() && !_parent.LeftIsDown() || _parent.RLStatus == 'Wall') { _parent.gotoBuffer = 'Slow'; } else { if (_parent.friction && !_parent.RightIsDown() && !_parent.LeftIsDown()) { _parent.runtoslide = true; _parent.gotoBuffer = 'Slide'; } else { if (Math.abs(_parent.moveRL) > 18 && !_parent.impact) { gotoAndPlay('toRun'); } else { gotoAndPlay('walkLoopR'); } } } } frame 72 { if (Math.abs(_parent.moveRL) < 4 && !_parent.RightIsDown() && !_parent.LeftIsDown() || _parent.RLStatus == 'Wall') { _parent.gotoBuffer = 'Slow'; } else { if (_parent.friction && !_parent.RightIsDown() && !_parent.LeftIsDown()) { _parent.runtoslide = true; _parent.gotoBuffer = 'Slide'; } else { if (Math.abs(_parent.moveRL) > 18 && !_parent.impact) { gotoAndPlay('toRun'); } else { gotoAndPlay('walkLoopR'); } } } } } movieClip 1276 { frame 1 { } frame 5 { _parent.hairGel = 17; _root.footStep(_parent._x + _parent.RLx(_parent.moveRL), _parent._y + _parent.RLy(_parent.moveRL), -_parent._xscale, _parent._rotation, _parent.moveRL, _parent.friction, _parent.aPlatzOn); } frame 9 { } frame 11 { if (!(_parent.RightIsDown() && _parent.faceTurn > 0) && !(_parent.LeftIsDown() && _parent.faceTurn < 0) || _parent.RLStatus == 'Wall') { gotoAndPlay(16); } _parent._xscale = -_parent._xscale; _xscale = -_xscale; } frame 13 { } frame 15 { _parent.hairGel = 13; _parent.stepUp = true; _parent.gotoBuffer = 'Walk'; } frame 20 { _root.footStep(_parent._x + _parent.RLx(_parent.moveRL), _parent._y + _parent.RLy(_parent.moveRL), -_parent._xscale, _parent._rotation, _parent.moveRL, _parent.friction, _parent.aPlatzOn); _parent.gotoBuffer = 'Idle'; } } movieClip 1313 { frame 5 { _root.footStep(_parent._x + _parent.RLx(_parent.moveRL), _parent._y + _parent.RLy(_parent.moveRL), _parent._xscale, _parent._rotation, _parent.moveRL, _parent.friction, _parent.aPlatzOn); } frame 11 { _root.footStep(_parent._x + _parent.RLx(_parent.moveRL), _parent._y + _parent.RLy(_parent.moveRL), _parent._xscale, _parent._rotation, _parent.moveRL, _parent.friction, _parent.aPlatzOn); } frame 13 { gotoAndPlay([1, 14, 27][random(3)]); } frame 18 { _root.footStep(_parent._x + _parent.RLx(_parent.moveRL), _parent._y + _parent.RLy(_parent.moveRL), _parent._xscale, _parent._rotation, _parent.moveRL, _parent.friction, _parent.aPlatzOn); } frame 24 { _root.footStep(_parent._x + _parent.RLx(_parent.moveRL), _parent._y + _parent.RLy(_parent.moveRL), _parent._xscale, _parent._rotation, _parent.moveRL, _parent.friction, _parent.aPlatzOn); } frame 26 { gotoAndPlay([1, 14, 27][random(3)]); } frame 31 { _root.footStep(_parent._x + _parent.RLx(_parent.moveRL), _parent._y + _parent.RLy(_parent.moveRL), _parent._xscale, _parent._rotation, _parent.moveRL, _parent.friction, _parent.aPlatzOn); } frame 37 { _root.footStep(_parent._x + _parent.RLx(_parent.moveRL), _parent._y + _parent.RLy(_parent.moveRL), _parent._xscale, _parent._rotation, _parent.moveRL, _parent.friction, _parent.aPlatzOn); } frame 39 { gotoAndPlay([1, 14, 27][random(3)]); } } movieClip 1326 { frame 1 { _root.footStep(_parent._x + _parent.RLx(_parent.moveRL), _parent._y + _parent.RLy(_parent.moveRL), _parent._xscale, _parent._rotation, _parent.moveRL, _parent.friction, _parent.aPlatzOn); } frame 9 { _root.footStep(_parent._x + _parent.RLx(_parent.moveRL), _parent._y + _parent.RLy(_parent.moveRL), _parent._xscale, _parent._rotation, _parent.moveRL, _parent.friction, _parent.aPlatzOn); } frame 12 { } } movieClip 1360 { } movieClip 1362 { frame 1 { if (_parent.crouchy == true) { _parent.crouchy = false; skipslide = true; gotoAndStop(10); } else { if (_parent.runtoslide) { _parent.runtoslide = false; skipslide = true; } else { skipslide = false; gotoAndStop(10); } } } frame 10 { stop(); if (skipslide == true) { skipslide = false; CharBoarding.gotoAndStop(15); } else { CharBoarding.gotoAndStop(3); } onEnterFrame = function () { temp = Math.round(Math.abs(_parent.moveRL) * 2); if (temp > CharBoarding._currentframe) { CharBoarding.nextFrame(); } if (temp < CharBoarding._currentframe) { if (CharBoarding._currentframe == 1) { _parent.gotoBuffer = 'Idle'; } else { if (CharBoarding._currentframe > 15 || !_parent.sliding || temp < -5) { CharBoarding.prevFrame(); } } } }; } } movieClip 1376 { } movieClip 1436 { } movieClip 1437 { frame 33 { delete _parent.onEnterFrame; _parent.gotoAndStop(7); } } movieClip 1483 { } movieClip 1497 { } movieClip 1542 { } movieClip 1543 { frame 1 { if (_root.Char.hairGel > 47) { onEnterFrame = function () { if (_root.Char.hairGel < 55) { ++_root.Char.hairGel; } gotoAndStop(_root.Char.hairGel); }; } else { onEnterFrame = function () { if (Math.abs(_root.Char.hairGel - 24) > 15) { if (_root.Char.hairGel > 24) { _root.Char.hairGel -= 5; } if (_root.Char.hairGel < 24) { _root.Char.hairGel += 5; } } else { if (_root.Char.hairGel > 24) { --_root.Char.hairGel; } if (_root.Char.hairGel < 24) { ++_root.Char.hairGel; } } gotoAndStop(_root.Char.hairGel); }; } onEnterFrame(); } frame 24 { _root.Char.hairGel = 48; onEnterFrame = function () { if (_root.Char.hairGel < 55) { ++_root.Char.hairGel; } gotoAndStop(_root.Char.hairGel); }; } } movieClip 1608 { frame 51 { stop(); } } movieClip 1609 { frame 1 { if (_parent._parent.moveUD >= 0) { gotoAndPlay('falling'); } else { if (_parent._parent.moveUD > -10) { gotoAndPlay('Fall'); } } if (_parent._parent.canSpin) { _parent._parent.canSpin = false; stop(); onEnterFrame = function () { _root.movePerformed('superjump', 1); }; } } frame 2 { } frame 7 { stop(); } frame 15 { if (_parent._parent.waterLanding) { _parent.gotoAndStop(7); } else { if (Math.abs(_parent._parent._rotation) > 45 && _parent._parent.fliprot != 0) { } else { if (Math.abs(_parent._parent.moveRL) > 6 && _parent._parent.moveRL * _parent._parent._xscale > 0) { gotoAndPlay('longJump'); } } } } frame 16 { if (_parent._parent.waterLanding) { _parent.gotoAndStop(7); } } frame 28 { _parent.gotoAndStop(3); } frame 40 { _parent.gotoAndStop(5); } } movieClip 1724 { } movieClip 1869 { frame 30 { gotoAndPlay(16); } frame 99 { stop(); } } movieClip 1893 { frame 1 { } frame 2 { } frame 10 { if (_parent._parent.waterLanding) { _parent.gotoAndStop(7); } } frame 16 { if (_parent._parent.waterLanding) { _parent.gotoAndStop(7); } } frame 27 { _parent.gotoAndStop(5); } } movieClip 1970 { frame 9 { _parent.gotoBuffer = 'Idle'; } frame 13 { _parent.hairRL = 0; _parent.gelHair(); } frame 16 { _parent.crouchy = true; _parent.gotoBuffer = 'Slide'; } } movieClip 1971 { frame 50 { stop(); } frame 66 { stop(); } } movieClip 2014 { frame 1 { _parent._parent.performN = 10; if (_parent._parent.waterLanding) { _parent.onEnterFrame = function () { if (_parent._parent.waterLanding) { if (_parent._parent.RightIsDown()) { _parent._parent.dirRL = 1; } else { if (_parent._parent.LeftIsDown()) { _parent._parent.dirRL = -1; } else { _parent._parent.dirRL = 0; } } if (_parent._parent.UpIsDown()) { _parent._parent.dirUD = -1; } else { if (_parent._parent.DownIsDown()) { _parent._parent.dirUD = 1; } else { _parent._parent.dirUD = 0; } } _parent._parent.shouldRot = -Math.atan2(-_parent._parent.dirRL, -_parent._parent.dirUD) / 0.0174532925199433; _parent._parent.eRot = -Math.atan2(-_parent._parent.landRL, -_parent._parent.landUD) / 0.0174532925199433; if (Math.abs(_parent._parent.shouldRot - _parent._parent.eRot) > 180) { if (_parent._parent.shouldRot > _parent._parent.eRot) { _parent._parent.shouldRot -= 360; } else { _parent._parent.shouldRot += 360; } } if (Math.abs(_parent._parent.shouldRot - _parent._parent.eRot) < 45 && _parent._parent.dirUD == 1) { _parent._parent.RLStatus = 'diving'; gotoAndPlay('dive'); } else { if (_parent._parent.performN > 0) { --_parent._parent.performN; } else { _root.movePerformed('canonball', 1); } nextFrame(); } } else { prevFrame(); } }; } else { _parent.gotoAndStop(1); } } frame 19 { } frame 25 { delete _parent.onEnterFrame; stop(); } frame 26 { backFlipRot = _parent._parent.smokeRot; startRot = backFlipRot; isDoubling = false; eFirst = true; tempRot = 11; frames = 0; shouldRot = (-Math.atan2(-_parent._parent.landRL, -_parent._parent.landUD) / 0.0174532925199433) * (_parent._parent._xscale / 100); _parent._parent.performN = 10; delete onEnterFrame; _parent.onEnterFrame = function () { if (_parent._parent.performN > 0) { --_parent._parent.performN; } else { _root.movePerformed('dive', 1); } if (Math.abs(backFlipRot) < Math.abs(shouldRot)) { shouldRot = (-Math.atan2(-_parent._parent.landRL, -_parent._parent.landUD) / 0.0174532925199433) * (_parent._parent._xscale / 100); if (Math.abs(shouldRot - backFlipRot) > 180) { if (backFlipRot > shouldRot) { shouldRot += 360; } else { shouldRot -= 360; } } if (_parent._parent.hitGround > 50) { var v3 = (shouldRot - backFlipRot) / 40; } else { if (_parent._parent.hitGround < 20) { var v3 = (shouldRot - backFlipRot) / 10; } else { var v3 = (shouldRot - backFlipRot) / (_parent._parent.hitGround - 10); } } if (Math.abs(v3) > Math.abs(shouldRot) / 14) { tempRot += (shouldRot / 14 - tempRot) / 2; } else { tempRot += (v3 - tempRot) / 2; } backFlipRot += tempRot; ++frames; v3 = Math.round(Math.abs((backFlipRot - startRot) / shouldRot) * 23) + 2; gotoAndStop(v3 + 25); _parent._parent.smokeRot = backFlipRot * (_parent._parent._xscale / 100); _parent._parent.tilt = _parent._parent.smokeRot; } }; } frame 48 { stop(); } } movieClip 2093 { frame 1 { if (Math.abs(_parent._parent._rotation) > 45 && _parent._parent.fliprot != 0 && _parent._parent._xscale * _parent._parent.moveRL < 0) { gotoAndStop(15); } else { if (_parent._parent.moveUD >= 0) { gotoAndPlay('falling'); } else { if (_parent._parent.moveUD > -10) { gotoAndPlay('Fall'); } } } if (_parent._parent.canSpin) { _parent._parent.canSpin = false; stop(); } } frame 2 { if (!_parent._parent.Still && !_parent._parent.TempStill) { if (Math.abs(_parent._parent._rotation) < 45 && (_parent._parent._xscale > 0 && _parent._parent.LeftIsDown() || _parent._parent._xscale < 0 && _parent._parent.RightIsDown())) { _parent.gotoAndStop(2); } } } frame 7 { stop(); } frame 15 { _parent._parent.isCarrying = 'nothing'; if (_parent._parent.waterLanding) { _parent.gotoAndStop(7); } else { if (Math.abs(_parent._parent.moveRL) > 6 && _parent._parent.moveRL * _parent._parent._xscale > 0) { gotoAndPlay('longJump'); } } } frame 28 { _parent.gotoAndStop(3); } frame 36 { _parent._parent.isCarrying = 'nothing'; } frame 40 { _parent.gotoAndStop(5); } } movieClip 2127 { frame 1 { if (_parent._parent.moveUD > -4) { gotoAndPlay(17); } } frame 2 { if (!_parent._parent.Still && !_parent._parent.TempStill) { if (Math.abs(_parent._parent._rotation) < 45 && (_parent._parent._xscale > 0 && _parent._parent.LeftIsDown() || _parent._parent._xscale < 0 && _parent._parent.RightIsDown())) { _parent.gotoAndStop(2); } } } frame 14 { if (_parent._parent.waterLanding) { _parent.gotoAndStop(7); } } frame 26 { _parent.gotoAndStop(5); } } movieClip 2184 { } movieClip 2186 { frame 34 { stop(); } } movieClip 2203 { frame 24 { stop(); } } movieClip 2226 { frame 1 { } frame 11 { if (_parent._parent.waterLanding) { _parent.gotoAndStop(7); } } frame 23 { _parent.gotoAndStop(5); } } movieClip 2232 { frame 14 { _parent.gotoAndStop(1); } } movieClip 2233 { frame 1 { onEnterFrame = function () { _parent.smokeRot *= 0.9; }; stop(); } frame 2 { backFlipRot = _parent.smokeRot * (_parent._xscale / 100); trueRot = 0; isDoubling = false; eFirst = true; tempRot = -11; frames = 0; onEnterFrame = function () { shouldRot = (-Math.atan2(-_parent.landRL, -_parent.landUD) / 0.0174532925199433) * (_parent._xscale / 100); if (shouldRot > 0) { shouldRot -= 360; } if (_parent.waterLanding && _parent.hitGround + frames > 35) { targetRot = shouldRot - 360; } else { targetRot = -360; } if (_parent.hitGround < 5) { var v3 = (targetRot - backFlipRot) / 5; } else { var v3 = (targetRot - backFlipRot) / _parent.hitGround; } if (v3 < -20) { tempRot += (-20 - tempRot) / 5; } else { tempRot += (v3 - tempRot) / 5; } backFlipRot += tempRot; trueRot += tempRot; ++frames; if (_parent.waterLanding) { if (isDoubling) { isDoubling = false; backFlipRot -= 360; } } else { if (isDoubling) { if (_parent.hitGround + frames < 48) { isDoubling = false; backFlipRot -= 360; } } else { if (_parent.hitGround + frames >= 48) { isDoubling = true; backFlipRot += 360; } } } v3 = Math.floor(-trueRot / 11) + 1; if (v3 > 23 && !isDoubling) { if (v3 + 33 < 66 || _parent.waterLanding) { goFrame = v3 + 33; } else { goFrame = 66; } } else { if (v3 > 23) { performing = 'dbackflip'; } else { performing = 'backflip'; } if (v3 < 66 || _parent.waterLanding) { goFrame = v3; } else { goFrame = 66; } } if (goFrame > 56 && _parent.waterLanding) { _root.movePerformed('dive', 1); CharBackflip.gotoAndStop(goFrame + 11); } else { _root.movePerformed(performing, 1); CharBackflip.gotoAndStop(goFrame); } _parent.smokeRot = backFlipRot * (_parent._xscale / 100); }; } frame 3 { onEnterFrame = function () { if (_parent.waterLanding) { _parent.smokeRot *= 0.9; gotoAndStop(7); delete onEnterFrame; } }; } frame 4 { onEnterFrame = function () { _parent.smokeRot *= 0.9; }; } frame 5 { onEnterFrame = function () { if (_parent.waterLanding) { _parent.smokeRot *= 0.9; gotoAndStop(7); delete onEnterFrame; } }; } frame 6 { CharDive._rotation = 0; onEnterFrame = function () { temp = _root.predictJump(_parent._x, _parent._y, _parent.moveRL, _parent.moveUD, _parent.FloatUp, _parent.isTall, _parent._alpha); if (temp[0] < 16 && !_root.water.hitTest(temp[1], temp[2] + 50, true)) { CharDive.gotoAndPlay('diveRecover'); delete onEnterFrame; } }; } frame 7 { } frame 8 { onEnterFrame = function () { _parent.smokeRot *= 0.9; }; } frame 9 { backFlipRot = _parent.tilt; startRot = backFlipRot; frames = 0; _parent.performN = 50; flipDir = -_parent.fliprot / Math.abs(_parent.fliprot); tempRot = -11 * flipDir; onEnterFrame = function () { if (_parent.fliprot == 0) { gotoAndStop(1); } else { shouldRot = -Math.atan2(-_parent.moveRL, -_parent.landUD) / 0.0174532925199433; if (flipDir > 0) { if (shouldRot > 0) { shouldRot -= 360; } targetRot = shouldRot - 180; } else { if (shouldRot < 0) { shouldRot += 360; } targetRot = shouldRot + 180; } if (_parent.hitGround < 5) { var v3 = (targetRot - backFlipRot) / 5; } else { var v3 = (targetRot - backFlipRot) / _parent.hitGround; } if (Math.abs(v3) > 10) { tempRot += ((v3 / Math.abs(v3)) * 10 - tempRot) / 10; } else { tempRot += (v3 - tempRot) / 10; } backFlipRot += tempRot; ++frames; v3 = Math.floor(((backFlipRot - startRot) / (targetRot - startRot)) * 40) + 8; matrixBackflip.gotoAndStop(v3); _root.movePerformed('matrixflip'); Math.sqrt(_parent.moveRL * _parent.moveRL + _parent.moveUD * _parent.moveUD); _parent.tilt = backFlipRot; _parent.smokeRot = _parent.tilt; _parent.RLStatus = 'diving'; } }; } frame 11 { backFlipRot = _parent.smokeRot * (_parent._xscale / 100); trueRot = 0; isDoubling = false; eFirst = true; tempRot = -11; frames = 0; onEnterFrame = function () { shouldRot = (-Math.atan2(-_parent.landRL, -_parent.landUD) / 0.0174532925199433) * (_parent._xscale / 100); if (shouldRot > 0) { shouldRot -= 360; } if (_parent.waterLanding && _parent.hitGround + frames > 35) { targetRot = shouldRot - 360; } else { targetRot = -360; } var v3 = (targetRot - backFlipRot) / _parent.hitGround; if (v3 < -15) { tempRot += (-15 - tempRot) / 2; } else { tempRot += (v3 - tempRot) / 2; } backFlipRot += tempRot; trueRot += tempRot; ++frames; v3 = Math.floor(-trueRot / 11) + 1; goFrame = v3; _root.movePerformed('wallflip', 1); CharBackflip.gotoAndStop(goFrame); _parent.smokeRot = backFlipRot * (_parent._xscale / 100); _parent.tilt = _parent.smokeRot; }; _parent.smokeRot = backFlipRot * (_parent._xscale / 100); _parent.tilt = _parent.smokeRot; } frame 12 { onEnterFrame = function () { if (_parent.DownIsDown()) { FSRoller.prevFrame(); _parent.RLStatus = 'rolling'; _parent.rotter += (_parent.moveRL * 0.5 - _parent.rotter) / 50; _parent.InShellRot += _parent.rotter; FSRoller._rotation = _parent.InShellRot * (_parent._xscale / 100); } else { if (Math.abs(_parent.rotter) < 40) { FSRoller.nextFrame(); _parent.RLStatus = 'jumping'; _parent.isTall = 50; if (Math.abs(FSRoller._rotation) < 65 && FSRoller._rotation * _parent.rotter < 0 && Math.abs(_parent.rotter) < 15) { _parent.InShellRot *= 0.8; FSRoller._rotation = _parent.InShellRot * _parent._xscale / 100; if (FSRoller._currentframe > 23) { _parent.tilt = _parent.InShellRot; _parent.smokeRot = _parent.tilt; gotoAndStop(4); CharJumpRun.gotoAndPlay(7); } } else { if (Math.abs(_parent.rotter) > 15) { _parent.rotter *= 0.9; } _parent.InShellRot += _parent.rotter; FSRoller._rotation = _parent.InShellRot * _parent._xscale / 100; } } else { FSRoller.gotoAndStop(1); _parent.rotter *= 0.95; _parent.InShellRot += _parent.rotter; FSRoller._rotation = _parent.InShellRot * _parent._xscale / 100; } } if (Math.abs(_parent.InShellRot) > 180) { if (_parent.InShellRot > 0) { _parent.InShellRot -= 360; } else { _parent.InShellRot += 360; } } }; FSRoller._rotation = _parent.InShellRot * _parent._xscale / 100; _parent.isTall = 25; } frame 13 { onEnterFrame = function () { _parent.smokeRot *= 0.9; }; } frame 14 { onEnterFrame = function () { _parent.smokeRot *= 0.9; }; } } movieClip 2257 { } movieClip 2258 { frame 10 { stop(); } } movieClip 2277 { frame 1 { gotoAndPlay(4); } frame 19 { _parent.tilt = _parent._rotation; _parent.holding = false; _parent.gotoAndStop('Idle'); } } movieClip 2288 { frame 11 { _parent._parent.rockOutCounter = 0; } frame 13 { stop(); } } movieClip 2299 { } movieClip 2310 { } movieClip 2311 { frame 1 { stop(); } } movieClip 2312 { frame 4 { _parent.CharDucking = false; } } movieClip 2317 { } movieClip 2330 { frame 6 { if (_root.Health == 0) { _parent.gotoAndStop('Die'); } } frame 17 { _parent.JumpFunc(10); } } movieClip 2359 { frame 8 { } frame 18 { } } movieClip 2386 { frame 1 { stop(); } frame 2 { if (_root.water.hitTest(_parent._x, _parent._y - 30, true)) { _parent.waterY = _parent._y - _parent.isTall / 2; while (_root.water.hitTest(_parent._x + _parent.moveRL, _parent.waterY - 100, true)) { _parent.waterY -= 100; } while (_root.water.hitTest(_parent._x + _parent.moveRL, _parent.waterY, true)) { --_parent.waterY; } gotoAndPlay('waterExit'); } } frame 12 { if (_parent.JumpIsDown()) { _parent.SisDown = true; } else { _parent.SisDown = false; } stop(); _parent.friction = _root.getFriction(_parent._x, _parent._y); if (_root.LevelLoaded == 'Level1' && _root.DoorLoaded == 'Door0' && false) { gotoAndPlay('exitPause'); } else { if (_root.InteractLayer.FancyGolfTee.hitTest(_parent._x, _parent._y, true) && _root.UberForeground.FancyGolfTeeSmoke._currentframe == 1 && _parent._y < _root.InteractLayer.FancyGolfTee._y - 20) { _root.UberForeground.FancyGolfTeeSmoke.gotoAndStop(2); _parent._xscale = UberForeground.FancyGolfTeeSmoke._xscale; _parent.moveRL = 0; if (_parent.BonusPlatFind()) { _parent.BonusPlatJumpLand(); } _parent.gotoAndStop('TeeOff'); } else { if (_parent.BonusPlatFind()) { _parent.BonusPlatJumpLand(); _parent.gotoAndStop('Slow'); } else { if (_root.testAll(_parent._x, _parent._y + 10)) { _parent._y += 5; _parent.RLFunc(); _parent.gotoAndStop('Slow'); } else { _parent.moveUD = 0; _parent.Still = true; _parent.gotoAndStop('Jump'); } } } } } frame 64 { _parent._y -= 60; _parent.eRot = 0; _parent.swimRL = 0; _parent.resetJumpStuff(); _parent.rotOffset = 0; _parent.tilt = 0; _parent.smokeRot = 0; _parent.swimStatus = 'idle'; _parent.smokeAccel = 0; _parent.rotAccel = 0; _parent.isWading = true; _parent.gotoAndStop('Swim'); } frame 85 { stop(); b = 60; onEnterFrame = function () { if (b > 0) { --b; } else { _parent.gotoAndStop('Idle'); } }; } frame 88 { _parent.gotoAndStop('Idle'); } } movieClip 2438 { frame 4 { _parent.hairRL = 0; } frame 18 { _root.InteractLayer['Door' + _parent.doorInto].play(); } frame 33 { _parent.hairGel = 15; } frame 52 { stop(); } } movieClip 2451 { } movieClip 2453 { frame 5 { stop(); } frame 7 { stop(); } } movieClip 2507 { } movieClip 2548 { frame 41 { stop(); } } movieClip 2652 { frame 3 { onEnterFrame = function () { if (Math.abs(_parent.moveUD) > 2) { _root.movePerformed('wallslide', Math.abs(_parent.moveUD)); } }; } frame 20 { if (_parent.moveUD < 0 || _parent.LeftIsDown() && _parent.onWall > 0 || _parent.RightIsDown() && _parent.onWall < 0) { onEnterFrame = function () { if (!(_parent.moveUD < 0 || _parent.LeftIsDown() && _parent.onWall > 0 || _parent.RightIsDown() && _parent.onWall < 0)) { delete onEnterFrame; play(); } else { if (Math.abs(_parent.moveUD) > 2) { _root.movePerformed('wallslide', Math.abs(_parent.moveUD)); } } }; stop(); } } frame 38 { _parent.TempStill = true; _parent.wallJumpFell = true; _parent._xscale = _parent.eXscale; _parent.JumpFunc(-_parent.moveUD); } frame 39 { onEnterFrame = function () { _root.movePerformed('wallrun', Math.abs(_parent.moveUD)); if (_parent.moveUD > -6) { gotoAndPlay('wallRunToFront'); } }; } frame 47 { stop(); } frame 57 { smokeN = 9; _parent.performN = 0; fallCountR = 0; fallCountL = 0; play(); onEnterFrame = function () { if (_parent.onWall > 0 && !_parent.LeftIsDown() && _parent.moveUD > 0) { if (fallCountR < 20) { ++fallCountR; } else { _parent.wallFall = true; } } else { if (fallCountR > 0) { --fallCountR; } } if (_parent.onWall < 0 && !_parent.RightIsDown() && _parent.moveUD > 0) { if (fallCountL < 20) { ++fallCountL; } else { _parent.wallFall = true; } } else { if (fallCountL > 0) { --fallCountL; } } if (_parent.moveUD > 0) { if (_parent.moveUD > 2) { _root.movePerformed('wallslidefront'); } if (smokeN > 0) { --smokeN; } else { smokeN = 9; tempScale = Math.abs(_parent.moveUD) * 10; if (tempScale < 50 && _parent.moveUD != 0) { tempScale = 30; } eDepth = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('smokeFX', 'smokeFX' + eDepth, eDepth, {'_x': _parent._x - _parent.onWall * 10, '_y': _parent._y - 20, '_rotation': _parent.onWall * 90, '_xscale': tempScale, '_yscale': tempScale}); } } else { if (_parent.moveUD < -2) { _root.movePerformed('wallrun'); } } }; } frame 114 { gotoAndPlay('wallFront'); } frame 129 { if (Math.abs(_parent.moveUD) > 2) { _root.movePerformed('wallslidefront'); } } frame 135 { if (_parent.moveUD < 0 || _parent.LeftIsDown() && _parent.onWall > 0 || _parent.RightIsDown() && _parent.onWall < 0) { onEnterFrame = function () { if (!(_parent.moveUD < 0 || _parent.LeftIsDown() && _parent.onWall > 0 || _parent.RightIsDown() && _parent.onWall < 0)) { delete onEnterFrame; play(); } else { if (Math.abs(_parent.moveUD) > 2) { _root.movePerformed('wallslidefront', Math.abs(_parent.moveUD)); } } if (smokeN > 0) { --smokeN; } else { smokeN = 9; tempScale = Math.abs(_parent.moveUD) * 10; if (tempScale < 50 && _parent.moveUD != 0) { tempScale = 30; } eDepth = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('smokeFX', 'smokeFX' + eDepth, eDepth, {'_x': _parent._x - _parent.onWall * 10, '_y': _parent._y - 20, '_rotation': _parent.onWall * 90, '_xscale': tempScale, '_yscale': tempScale}); } }; stop(); } } frame 153 { _parent.TempStill = true; _parent.wallJumpFell = true; _parent._xscale = -_parent.eXscale; _parent.JumpFunc(-_parent.moveUD); } frame 163 { _parent.moveUD = -10; _parent.FloatUp = 0; } frame 170 { if (_parent.moveUD > -6) { delete onEnterFrame; gotoAndPlay('wallRunToFront'); head.gotoAndStop(41); } else { onEnterFrame = function () { _root.movePerformed('wallrun', Math.abs(_parent.moveUD)); if (_parent.moveUD > -6) { delete onEnterFrame; gotoAndPlay('wallRunToFront'); head.gotoAndStop(41); } }; } stop(); } frame 177 { _parent.TempStill = true; _parent.wallJumpFell = true; _parent._xscale = -_parent.eXscale; _parent.JumpFunc(-_parent.moveUD); } frame 187 { _parent.moveUD = -10; _parent.FloatUp = 0; } } movieClip 2714 { } movieClip 2715 { frame 11 { stop(); } } movieClip 2725 { frame 4 { _parent.hairRL = _parent._xscale / 10; } frame 10 { if (_parent.JumpIsDown() || _parent.UpIsDown()) { _parent.moveRL = _parent._xscale / 25; if (_parent.moveUD > -12) { _parent.moveUD = -12; } _parent.FloatUp = 6; } else { _parent.moveRL *= 0.8; if (_parent.moveUD > -8) { _parent.moveUD = -8; } if (_parent._xscale > 0 && _parent.RightIsDown()) { _parent.moveRL = 11; _parent.FloatUp = 4; } else { if (_parent._xscale < 0 && _parent.LeftIsDown()) { _parent.moveRL = -11; _parent.FloatUp = 4; } else { _parent.moveRL = _parent._xscale * 0.02; _parent.FloatUp = 4; } } } _parent.JumpFunc(-_parent.moveUD, false, false, false, true); } } movieClip 2765 { } movieClip 2766 { frame 7 { _root.playSound('DeathKnell'); } frame 28 { stop(); i = 90; onEnterFrame = function () { --CharAngel._y; --i; if (i == 0) { _root.BackgroundMusic.stop(); if (_root.Lives == 0) { _root.APITrackEvent('gameOver'); _root.QuittoMenu(); } else { _root.APITrackEvent('loseLife'); _root.Health = 100; _root.Setup = function () { --_root.Lives; _root.LivesUnderground -= 23; _root.OutPut.counterLives.updateCounter(_root.Lives); }; _root.soundIs = 'dead'; _root.ChangeLevel(_root.LevelLoaded, 'Door0'); } i = -100; } }; } } movieClip 2881 { frame 1 { _parent.moveRL = 0; _parent.moveUD = 0; } frame 24 { } frame 111 { stop(); } frame 124 { gotoAndPlay(74); } } movieClip 2902 { frame 20 { _parent._x = Math.round(_parent._x); _parent._y = Math.round(_parent._y); _parent.gotoAndStop('Idle'); } } movieClip 2950 { frame 24 { _parent._parent.tempX = 0; _parent._parent.tempY = 0; _parent._parent.hairRL = 0; _parent._parent.moveRL = 0; _parent._parent.moveUD = 0; _parent._parent.LedgeIt(_parent._parent.ledgingGrab, 'cont2'); } } movieClip 2979 { frame 13 { _parent.hairGel = 2; _parent.hairRL = _parent._xscale; } frame 15 { _parent.hairRL = 0; } frame 27 { _parent._parent.tempX = 0; _parent._parent.tempY = 0; _parent._parent.hairRL = 0; _parent._parent.moveRL = 0; _parent._parent.moveUD = 0; _parent._parent.LedgeIt(_parent._parent.ledgingGrab, 'cont'); } } movieClip 2993 { frame 13 { _parent._parent.tempX = 0; _parent._parent.tempY = 0; _parent._parent.hairRL = 0; _parent._parent.moveRL = 0; _parent._parent.moveUD = 0; _parent._parent.LedgeIt(_parent._parent.ledgingGrab, 'cont'); } } movieClip 2994 { } movieClip 3101 { frame 109 { gotoAndPlay(101); } } movieClip 3220 { frame 19 { if (Math.abs(_parent._rotation) > 20) { gotoAndPlay(42); } } frame 41 { if (Math.abs(_parent._rotation) < 20) { _parent.JumpFunc(-_parent.moveUD); } } frame 52 { gotoAndPlay(66); } frame 94 { stop(); } } movieClip 3348 CharPlatHang { frame 1 { gotoAndPlay(35); } frame 105 { gotoAndPlay(43); } frame 128 { gotoAndPlay(108); } } movieClip 3366 { } movieClip 3373 { frame 7 { _parent.CharDucking = false; } frame 14 { _parent.yerdown = true; if (Math.abs(_parent.moveRL) > 5 || _parent.CheckHead()) { _parent.gotoAndStop('FSRoll'); } else { _parent.gotoAndStop('Duck'); } } } movieClip 3377 { } movieClip 3523 { frame 1 { _root.SpawnPencilSwing(_parent._x, _parent._y); _parent.onEnterFrame = function () { if (JumpIsDown()) { this.CharTeeOff.gotoAndPlay('startSwing'); _root.UberForeground.PencilShell.gotoAndPlay(50); delete this.onEnterFrame; } }; _parent.hairRL = 0; _parent.hairUD = 0; } frame 2 { _root.frameCounter = 0; _root.frameCounterAndBeyond = 19; _root.stringCounter = '0.00'; if (_root.timerDisplayed) { _root.OutPut.tickerShell._alpha = 100; } } frame 3 { _root.isTimed = true; _root.frameTimer = function () { null; }; } frame 45 { gotoAndPlay(6); } frame 72 { _root.UberForeground.FancyGolfTeeSmoke.nextFrame(); _root.getNextHighestDepth(); _root.SpawnBaddies(_parent._x, _parent.y + 50, 'SnailShell'); _root.SnailShell.moveRL = 9; _root.SnailShell.moveUD = 0; _root.SnailShell.mRL = _root.mRL; _root.SnailShell.mUD = _root.mUD; _root.SnailShell.RLFunc = _root.SimpleRLFunc; _root.SnailShell.RLx = _root.RLx; _root.SnailShell.RLy = _root.RLy; _root.SnailShell.UDx = _root.UDx; _root.SnailShell.UDy = _root.UDy; _root.SnailShell.WasSix = _root.WasSix; _root.SnailShell.PwnBaddies = _root.PwnBaddies; _root.SnailShell.JumpFunc = _root.SimpleJumpFunc; _root.SnailShell.JumpGuide = _root.BallJumpGuide; _root.SnailShell.WraptoGround = _root.WraptoGround; _root.SnailShell.JumpLand = _root.BallJumpLand; _root.SnailShell.spread = 10; _root.SnailShell.RAnchx = _root.RAnchx; _root.SnailShell.RAnchy = _root.RAnchy; _root.SnailShell.LAnchx = _root.LAnchx; _root.SnailShell.LAnchy = _root.LAnchy; _root.SnailShell.rotateInAir = _root.rotateInAir; _root.SnailShell.recenterPoints = _root.recenterPoints; _root.SnailShell.InShellrotation = 0; _root.SnailShell.rotter = 80; _root.SnailShell.bouncy = false; _root.SnailShell.bounceThreshDefault = 8; _root.SnailShell.bounceDefault = 0.8; _root.SnailShell.testPlatz = _root.testPlatz; _root.SnailShell.platToGround = _root.platToGround; _root.SnailShell.wallToGround = _root.wallToGround; _root.SnailShell.recenterPoints(); _root.SnailShell.JumpFunc(50); _root.SnailShell.moveRL = 9; _root.SnailShell.downTime = 20; _root.SnailShell.JumpGuide(); } frame 76 { _root.frameTimer = _root.activeFrameTimer; if (_parent.RightIsDown() || !_parent.LeftIsDown() || _parent.JumpIsDown()) { _root.UberForeground.PencilShell.pencil.stop(); _root.UberForeground.PencilShell.moveUD = -10; _root.UberForeground.PencilShell.onEnterFrame = function () { ++this.moveUD; this._x -= 20; this._y += moveUD; this.pencil.pencil._rotation -= 60; if (-this._x > _root.MaxX - 50) { _root.playSound('Thud', _parent._x, 200); this.pencil.pencil._rotation = -100; delete this.onEnterFrame; } }; _parent.gotoAndStop('Idle'); } else { _parent.onEnterFrame = function () { if (_parent.JumpIsDown()) { _parent.SisDown = true; } else { _parent.SisDown = false; } if (_parent.RightIsDown() || _parent.LeftIsDown() || _parent.JumpIsDown() && !_parent.SisDown) { _root.UberForeground.PencilShell.play(); this.gotoAndStop('Idle'); } }; } } frame 167 { if (Key.isDown(this.Jump)) { _parent.SisDown = true; } else { this.SisDown = false; } _parent.gotoAndStop('Idle'); } } movieClip 3626 { } movieClip 3843 { frame 52 { _root.InteractLayer.object0.gotoAndPlay('giveCone'); } frame 88 { _root.playSound('oldTrophyGet'); } frame 95 { stop(); } frame 96 { b = 10; } frame 106 { } frame 234 { stop(); } frame 244 { gotoAndPlay('charkneelloop'); } frame 295 { _parent._x -= 85; _parent._xscale = -100; _root.InteractLayer.nextFrame(); _root.tehwallz.gotoAndStop(3); } frame 298 { _parent.onEnterFrame = function () { if (RightIsDown()) { if (this._xscale > 0) { _root.InteractLayer.object0.play(); _root.frameTimer = _root.activeFrameTimer; this.gotoAndStop('Walk'); } else { _root.InteractLayer.object0.play(); _root.frameTimer = _root.activeFrameTimer; this.gotoAndStop('Backpeddle'); } if (this.moveRL < this.RLing) { this.moveRL = this.RLing; } } else { if (LeftIsDown()) { if (this._xscale < 0) { _root.InteractLayer.object0.play(); _root.frameTimer = _root.activeFrameTimer; this.gotoAndStop('Walk'); } else { _root.InteractLayer.object0.play(); _root.frameTimer = _root.activeFrameTimer; this.gotoAndStop('Backpeddle'); } if (this.moveRL > -this.RLing) { this.moveRL = -this.RLing; } } else { if (DownIsDown()) { _root.InteractLayer.object0.play(); _root.frameTimer = _root.activeFrameTimer; this.gotoAndStop('Duck'); } else { if (JumpIsDown()) { _root.InteractLayer.object0.play(); _root.frameTimer = _root.activeFrameTimer; this.fliprot = 0; this.SisDown = true; this.FloatUp = 6; _root.playSound('CharJump', this._x, 100); this.JumpFunc(12); return true; } } } } }; } frame 315 { gotoAndPlay('charprideloop'); } } movieClip 3866 { frame 1 { gotoAndPlay(3); } frame 20 { _parent.gotoAndStop('Jump'); } } movieClip 3872 { frame 1 { if (_parent._parent.isCarrying != 'pencil') { gotoAndStop(2); } } frame 6 { stop(); } } movieClip 3892 { frame 3 { _root.footStep(_parent._x + _parent.RLx(_parent._xscale / 3), _parent._y + _parent.RLy(_parent._xscale / 3), -_parent._xscale, _parent._rotation, _parent.moveRL, _parent.friction, _parent.aPlatzOn); } frame 5 { _parent.hairGel = 17; } frame 9 { _root.footStep(_parent._x + _parent.RLx(_parent.moveRL), _parent._y + _parent.RLy(_parent.moveRL), _parent._xscale, _parent._rotation, _parent.moveRL, _parent.friction, _parent.aPlatzOn); } frame 11 { if (!(_parent.RightIsDown() && _parent.faceTurn > 0) && !(_parent.LeftIsDown() && _parent.faceTurn < 0)) { if (Math.abs(_parent.moveRL) < 2) { _parent.moveRL = -(_parent._xscale / 50); } gotoAndPlay(16); } _parent._xscale = -_parent._xscale; _xscale = -_xscale; } frame 12 { _root.footStep(_parent._x + _parent.RLx(_parent.moveRL), _parent._y + _parent.RLy(_parent.moveRL), _parent._xscale, _parent._rotation, _parent.moveRL, _parent.friction, _parent.aPlatzOn); } frame 15 { _parent.stepUp = true; _parent.gotoBuffer = 'Walk'; } frame 20 { _parent.gotoBuffer = 'Idle'; } } movieClip 3901 { } movieClip 3923 { frame 1 { onEnterFrame = function () { if (_parent._parent.swimStatus == 'paddling' && false || !(_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0)) { nextFrame(); nextFrame(); } else { prevFrame(); } }; } frame 35 { _parent.gotoAndStop('swim'); } } movieClip 3932 { } movieClip 3974 { frame 1 { } frame 41 { gotoAndPlay(1); } } movieClip 4179 { } movieClip 4314 { } movieClip 4403 { frame 2 { onEnterFrame = function () { if (!(_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0)) { if (Math.abs(_parent._parent.smokeRot - _parent._parent.eRot) < 90) { gotoAndPlay(3); delete onEnterFrame; } } else { if (_parent._parent.isWading) { gotoAndPlay('idleToSurface'); delete onEnterFrame; } } }; _parent._parent.swimStatus = 'idle'; stop(); } frame 6 { } frame 12 { if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0 || _parent._parent.wideAngle()) { gotoAndPlay('floatL'); } else { gotoAndPlay('startL'); } } frame 13 { _parent._parent.swimStatus = 'paddling'; } frame 26 { if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0 || _parent._parent.wideAngle()) { gotoAndPlay('floatR'); } else { gotoAndPlay('startR2'); } } frame 27 { _parent._parent.swimStatus = 'paddling'; } frame 34 { if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0 || _parent._parent.wideAngle()) { gotoAndPlay('slowL2'); } else { _parent._parent.swimStatus = 'paddling'; if (_parent._parent.isWading) { gotoAndPlay('startL2'); } else { gotoAndPlay(['L1', 'L2'][random(2)]); } } } frame 35 { _parent._parent.swimStatus = 'paddling'; } frame 48 { if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0 || _parent._parent.wideAngle()) { gotoAndPlay('floatL'); } else { gotoAndPlay('startL2'); } } frame 49 { _parent._parent.swimStatus = 'paddling'; } frame 55 { if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0 || _parent._parent.wideAngle()) { gotoAndPlay('slowR'); } else { _parent._parent.swimStatus = 'paddling'; if (_parent._parent.isWading) { gotoAndPlay('startR2'); } else { gotoAndPlay(['R1', 'R2', 'R3'][random(3)]); } } } frame 61 { if (_parent._parent.SwimFlip) { gotoAndPlay('flip'); } else { if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0 || _parent._parent.wideAngle() || _parent._parent.isWading) { gotoAndPlay('slowL'); } else { if (_parent._parent.swimRL < 5) { _parent._parent.swimRL = 5; } gotoAndPlay(['L1', 'L2'][random(2)]); } } } frame 67 { if (_parent._parent.SwimFlip) { gotoAndPlay('flip'); } else { if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0 || _parent._parent.wideAngle() || _parent._parent.isWading) { gotoAndPlay('slowR'); } else { if (_parent._parent.swimRL < 5) { _parent._parent.swimRL = 5; } gotoAndPlay(['R1', 'R2', 'R3'][random(3)]); } } } frame 73 { if (_parent._parent.SwimFlip) { gotoAndPlay('flip'); } else { if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0 || _parent._parent.wideAngle() || _parent._parent.isWading) { gotoAndPlay('slowL'); } else { if (_parent._parent.swimRL < 5) { _parent._parent.swimRL = 5; } gotoAndPlay(['L1', 'L2'][random(2)]); } } } frame 79 { if (_parent._parent.SwimFlip) { gotoAndPlay('flip'); } else { if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0 || _parent._parent.wideAngle() || _parent._parent.isWading) { gotoAndPlay('slowR'); } else { if (_parent._parent.swimRL < 5) { _parent._parent.swimRL = 5; } gotoAndPlay(['R1', 'R2', 'R3'][random(3)]); } } } frame 85 { if (_parent._parent.SwimFlip) { gotoAndPlay('flip'); } else { if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0 || _parent._parent.wideAngle() || _parent._parent.isWading) { gotoAndPlay('slowL'); } else { if (_parent._parent.swimRL < 5) { _parent._parent.swimRL = 5; } gotoAndPlay(['L1', 'L2'][random(2)]); } } } frame 86 { _parent._parent.swimStatus = 'drifting'; } frame 95 { if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0) { if (_parent._parent.isWading) { gotoAndPlay('surfaceFloatL'); } else { gotoAndPlay('slowL2'); } } else { if (_parent._parent.swimRL < 3) { _parent._parent.swimRL = 3; } if (_parent._parent.wideAngle()) { gotoAndPlay('slowL'); } else { gotoAndPlay('startL2'); } } } frame 96 { _parent._parent.swimStatus = 'drifting'; } frame 113 { if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0) { if (_parent._parent.isWading) { gotoAndPlay('surfaceFloatR'); } else { gotoAndPlay('floatR'); } } else { gotoAndPlay('startR2'); } } frame 114 { _parent._parent.swimStatus = 'drifting'; } frame 124 { if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0) { if (_parent._parent.isWading) { gotoAndPlay('surfaceFloatR'); } else { gotoAndPlay('slowR2'); } } else { if (_parent._parent.swimRL < 3) { _parent._parent.swimRL = 3; } if (_parent._parent.wideAngle()) { gotoAndPlay('slowR'); } else { gotoAndPlay('startR2'); } } } frame 125 { _parent._parent.swimStatus = 'drifting'; } frame 143 { if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0) { if (_parent._parent.isWading) { gotoAndPlay('surfaceFloatL'); } else { gotoAndPlay('floatL'); } } else { if (_parent._parent.wideAngle()) { gotoAndPlay('slowL2'); } else { gotoAndPlay('startL2'); } } } frame 144 { _parent._parent.swimStatus = 'drifting'; } frame 154 { _parent._parent.swimStatus = 'idle'; } frame 162 { _parent._parent.swimStatus = 'idle'; gotoAndStop('idle'); } frame 163 { _parent._parent.swimStatus = 'drifting'; } frame 176 { _parent._parent.swimStatus = 'idle'; } frame 181 { _parent._parent.swimStatus = 'idle'; gotoAndStop('idle'); } frame 188 { gotoAndPlay('dart'); } frame 201 { if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0 || _parent._parent.wideAngle()) { gotoAndPlay('slowR2'); } else { gotoAndPlay('startR'); } } frame 202 { } frame 212 { if (!(_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0) && Math.abs(_parent._parent.smokeRot - _parent._parent.eRot) < 90) { _parent._parent.swimStatus = 'paddling'; gotoAndPlay(4); } } frame 220 { _parent._parent.swimStatus = 'idle'; gotoAndStop('idle'); } frame 221 { stop(); onEnterFrame = function () { if (_parent._parent.dirRL * _parent._parent._xscale > 0) { gotoAndPlay('surfaceStart'); delete onEnterFrame; } else { if (_parent._parent.dirRL * _parent._parent._xscale < 0) { gotoAndPlay('surfaceStartBack'); delete onEnterFrame; } else { if (_parent._parent.dirUD == 1) { _parent._parent.eRot = _parent._parent.shouldRot; if (Math.abs(_parent._parent.smokeRot) < 20) { _parent._parent.rotAccel = _parent._parent._xscale / 25; _parent._parent.smokeRot = _parent._parent.rotAccel; } _parent._parent.moveUD = 4; _parent._parent.swimRL = 4; gotoAndPlay('surfaceDown'); delete onEnterFrame; } } } }; _parent._parent.swimStatus = 'idle'; } frame 230 { _parent._parent.swimStatus = 'paddling'; } frame 242 { if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0 || _parent._parent.wideAngle()) { gotoAndPlay('surfaceFloatL'); } else { gotoAndPlay('startL2'); } } frame 243 { _parent._parent.swimStatus = 'paddling'; } frame 254 { if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0 || _parent._parent.wideAngle()) { gotoAndPlay('surfaceFloatR'); } else { gotoAndPlay('startR2'); } } frame 255 { _parent._parent.swimStatus = 'drifting'; } frame 270 { _parent._parent.swimStatus = 'idle'; } frame 272 { gotoAndStop('surfaceIdle'); } frame 275 { _parent._parent.swimStatus = 'drifting'; } frame 287 { _parent._parent.swimStatus = 'idle'; } frame 291 { gotoAndStop('surfaceIdle'); } frame 292 { } frame 302 { } frame 304 { gotoAndStop('idle'); } frame 317 { gotoAndStop('surfaceIdle'); } frame 318 { delete _parent.swimHead.onEnterFrame; } frame 323 { _parent._parent._xscale = (_parent._parent.eRot / Math.abs(_parent._parent.eRot)) * 100; _parent.swimHead._xscale *= -1; _parent._parent.SwimFlip = false; onEnterFrame = function () { if (_xscale < 100) { _xscale = _xscale + 3; } else { _xscale = 100; delete onEnterFrame; } }; if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0 || _parent._parent.wideAngle() || _parent._parent.isWading) { gotoAndPlay('slowL'); } else { _parent._parent.swimStatus = 'paddling'; if (_parent._parent.swimRL < 5) { _parent._parent.swimRL = 5; } gotoAndPlay(['L1', 'L2'][random(2)]); } } } movieClip 4415 { } movieClip 4473 { } movieClip 4540 { frame 1 { var b = 10; onEnterFrame = function () { if (_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0 && _parent._parent.swimRL < 6) { _parent.gotoAndStop('toIdle'); } else { if (Math.abs(_parent._parent.smokeAccel) < 2 && Math.abs(_parent._rotation) > 135 && _parent._parent.swimRL > 8) { gotoAndPlay('setReach'); } else { if (_parent.dirRL == 0 && _parent.dirUD == 0) { gotoAndPlay('setSlow'); } else { if (_parent._parent._y - _parent._parent.isTall * 0.8 < _parent._parent.waterY && _parent._parent.smokeRot * _parent._parent._xscale < -4000 && _parent._parent.dirRL != 0 && Math.abs(_parent._rotation) < 90) { if (b > 0) { --b; } else { gotoAndPlay('backStroke'); } } else { b = 10; } } } } }; if (_parent._parent._y - _parent._parent.isTall * 0.8 < _parent._parent.waterY && _parent._parent.smokeRot * _parent._parent._xscale < -4000 && _parent._parent.dirRL != 0 && Math.abs(_parent._rotation) < 90) { gotoAndPlay('backStroke'); } } frame 12 { if (Math.abs(_parent._parent.smokeAccel) < 2 && Math.abs(_parent._rotation) > 135) { gotoAndPlay('setReach'); } else { gotoAndPlay('loop'); } } frame 14 { if (Math.abs(_parent._rotation) < 135 || Math.abs(_parent._parent.smokeAccel) > 2 || _parent._parent.swimRL < 8) { gotoAndPlay('setLoop'); } else { onEnterFrame = function () { if (Math.abs(_parent._rotation) < 135 || Math.abs(_parent._parent.smokeAccel) > 2 || _parent._parent.swimRL < 8) { onEnterFrame = function () { prevFrame(); prevFrame(); prevFrame(); }; } }; } } frame 54 { stop(); } frame 55 { onEnterFrame = function () { if (Math.abs(_parent._rotation) < 135 || Math.abs(_parent._parent.smokeAccel) > 2 || _parent._parent.swimRL < 8) { onEnterFrame = function () { prevFrame(); prevFrame(); prevFrame(); }; } }; } frame 58 { delete onEnterFrame; } frame 65 { stop(); } frame 85 { gotoAndPlay('slowLoop'); } frame 86 { onEnterFrame = function () { if (!(_parent._parent._y - _parent._parent.isTall * 0.8 < _parent._parent.waterY && _parent._parent.smokeRot * _parent._parent._xscale < -4000 && _parent._parent.dirRL != 0)) { gotoAndPlay('setLoop'); } }; } frame 125 { gotoAndPlay('backstrokeLoop'); } frame 126 { onEnterFrame = function () { if (_parent._parent.swimRL > 18) { if (Math.abs(_parent._parent.smokeAccel) > 7) { onEnterFrame = function () { nextFrame(); nextFrame(); }; } } else { if (_parent._parent.swimRL > 13) { if (Math.abs(_parent._rotation) < 120) { onEnterFrame = function () { nextFrame(); }; } else { if (Math.abs(_parent._parent.smokeAccel) > 7) { onEnterFrame = function () { nextFrame(); nextFrame(); }; } } } else { if (Math.abs(_parent._parent.smokeAccel) < 2 && Math.abs(_parent._rotation) > 135 && _parent._parent.swimRL > 8) { gotoAndPlay('diveToReach'); } else { onEnterFrame = function () { nextFrame(); }; } } } }; stop(); } frame 154 { gotoAndPlay('setLoop'); } frame 155 { gotoAndStop(_currentframe - 2); } frame 156 { onEnterFrame = function () { if (Math.abs(_parent._rotation) < 135 || Math.abs(_parent._parent.smokeAccel) > 2 || _parent._parent.swimRL < 8) { onEnterFrame = function () { nextFrame(); nextFrame(); }; } }; } frame 178 { gotoAndStop('setReached'); } } movieClip 4555 { frame 1 { onEnterFrame = function () { if (_parent._parent.swimStatus == 'paddling' && false || !(_parent._parent.dirRL == 0 && _parent._parent.dirUD == 0)) { prevFrame(); if (_currentframe == 1) { _parent.gotoAndStop('swim'); } } else { nextFrame(); } }; } frame 24 { _parent.gotoAndStop('idle'); } } movieClip 4594 { frame 24 { _parent.gotoAndStop('idle'); } } movieClip 4615 { frame 1 { onEnterFrame = function () { _parent.swimTrunks._xscale -= 3; }; } frame 10 { _parent._parent.SwimFlip = true; _parent.swimTrunks.gotoAndPlay('flip'); } frame 31 { _parent.gotoAndStop('swim'); } } movieClip 4616 { frame 1 { setPartsRot(); stop(); } frame 2 { setPartsRot(); } frame 3 { setPartsRot(); } frame 4 { setPartsRot(); } } movieClip 4632 { } movieClip 4663 { frame 40 { _parent.rotOffset = 0; _parent.smokeAccel = 0; _parent.smokeRot = _parent.fliprot; _parent.isWading = true; _parent.swimRL = Math.sqrt(_parent.moveRL * _parent.moveRL + _parent.moveUD * _parent.moveUD); if (_parent.swimStatus == 'fromPull') { _parent.gotoAndStop('Flushed'); } else { _parent.gotoAndStop('Swim'); } } } movieClip 4765 { frame 14 { if (_parent._parent.dirUD == 0) { gotoAndPlay('slowR2'); } else { gotoAndPlay('startR2'); } } frame 15 { _parent._parent.swimStatus = 'paddling'; } frame 22 { if (_parent._parent.dirUD == 0) { gotoAndPlay('slowL'); } else { _parent.swimStatus = 'paddling'; gotoAndPlay(['L1', 'L2'][random(2)]); } } frame 23 { _parent._parent.swimStatus = 'paddling'; } frame 36 { if (_parent._parent.dirUD == 0) { gotoAndPlay('slowL2'); } else { gotoAndPlay('startL2'); } } frame 37 { _parent._parent.swimStatus = 'paddling'; } frame 43 { if (_parent._parent.dirUD == 0) { gotoAndPlay('slowR'); } else { _parent.swimStatus = 'paddling'; gotoAndPlay(['R1', 'R2', 'R3'][random(3)]); } } frame 49 { if (_parent._parent.dirUD == 0) { gotoAndPlay('slowL'); } else { gotoAndPlay(['L1', 'L2'][random(2)]); } } frame 55 { if (_parent._parent.dirUD == 0) { gotoAndPlay('slowR'); } else { gotoAndPlay(['R1', 'R2', 'R3'][random(3)]); } } frame 61 { if (_parent._parent.dirUD == 0) { gotoAndPlay('slowL'); } else { gotoAndPlay(['L1', 'L2'][random(2)]); } } frame 67 { if (_parent._parent.dirUD == 0) { gotoAndPlay('slowR'); } else { gotoAndPlay(['R1', 'R2', 'R3'][random(3)]); } } frame 73 { if (_parent._parent.dirUD == 0) { gotoAndPlay('slowL'); } else { gotoAndPlay(['L1', 'L2'][random(2)]); } } frame 74 { _parent._parent.swimStatus = 'drifting'; } frame 83 { if (_parent._parent.dirUD == 0) { gotoAndPlay('slowL2'); } else { gotoAndPlay('startL2'); } } frame 84 { onEnterFrame = function () { trace('enterframe?'); if (_parent._parent.dirUD == 0) { nextFrame(); } else { nextFrame(); nextFrame(); } }; _parent._parent.swimStatus = 'drifting'; } frame 116 { delete onEnterFrame; play(); } frame 118 { if (_parent._parent.dirUD == 0) { gotoAndPlay('slowR2'); } else { gotoAndPlay('startR2'); } } frame 119 { _parent._parent.swimStatus = 'drifting'; } frame 129 { if (_parent._parent.dirUD == 0) { gotoAndPlay('slowR2'); } else { gotoAndPlay('startR2'); } } frame 130 { trace('enterframe'); onEnterFrame = function () { trace('enterframe?'); if (_parent._parent.dirUD == 0) { nextFrame(); } else { nextFrame(); nextFrame(); } }; _parent._parent.swimStatus = 'drifting'; } frame 164 { delete onEnterFrame; play(); } frame 166 { if (_parent._parent.dirUD == 0) { gotoAndPlay('slowL2'); } else { gotoAndPlay('startL2'); } } } movieClip 4804 { } movieClip 4842 { frame 1 { gotoAndPlay(2); } frame 16 { stop(); } frame 27 { _parent.moveRL = 20 * Math.sin(_parent.eRot * 0.0174532925199433); _parent.moveUD = 20 * -Math.cos(_parent.eRot * 0.0174532925199433); _parent.swimRL = 20; _parent.swimStatus = 'darting'; _parent.smokeRot = _parent.eRot; _parent.shouldRot = _parent.smokeRot; _parent._x += _parent.moveRL; _parent._y += _parent.moveUD; _root.movePerformed('pushOff'); _parent.gotoAndStop('Swim'); } frame 39 { _parent.isWading = true; _parent.gotoAndStop('Swim'); } } movieClip 4849 { } movieClip 4850 { frame 1 { stop(); } } movieClip 4863 { frame 13 { _parent.gotoAndStop('Idle'); } } movieClip 4973 { frame 93 { } frame 123 { _root.BLayer.Baddie0.moveRL = -5; _root.BLayer.Baddie0.moveUD = -5; _root.BLayer.Baddie0._xscale = -100; _root.BLayer.Baddie0.gotoAndStop('entrance'); } frame 156 { if (!_root.isMute) { _root.BackgroundMusic.stop(); _root.BackgroundMusic.attachSound('angryBaddie'); _root.BackgroundMusic.setVolume(100); _root.BackgroundVolume = 100; _root.BackgroundMusic.start(0, 1000); } } frame 169 { _parent.gotoAndStop('Land'); } } movieClip 4974 { } movieClip 4992 { frame 2 { stop(); delete _root.BLayer.Baddie0.onEnterFrame; _root.ELayer.attachMovie('IceCreamyPrize', 'IceCreamyPrize', _root.ELayer.getNextHighestDepth(), {'_x': _parent._x, '_y': _parent._y}); _root.playSound('Fanfare'); } frame 3 { _root.InteractLayer.object0.gotoAndPlay('giveCone'); } } movieClip 5010 { frame 1 { stop(); } frame 9 { } frame 14 { _parent.sheathing = false; _parent.sheathFrame = 0; _parent.gotoAndStop('Idle'); } } movieClip 5550 { frame 1 { _parent.holding = true; } frame 2 { if (_parent.AttackIsDown()) { _parent.drawEnterFrame = function () { _parent.hitPower += _parent.hitAccel; if (!_parent.AttackIsDown()) { gotoAndPlay('firstJab'); delete _parent.drawEnterFrame; } }; } else { gotoAndPlay('firstJab'); } _parent.hitPower = _parent.hitStart; } frame 6 { _parent.oMoveRL = _parent.moveRL; _parent.drawEnterFrame = function () { _parent.hitPower += _parent.hitAccel; if (!_parent.AttackIsDown()) { _parent.isAttacking = true; _parent.hairRL = 0; temp = _parent.hitPower * (_parent._xscale / 150); if (_parent._xscale * _parent.moveRL > 0 && (_parent._xscale > 0 && _parent.RightIsDown() || _parent._xscale < 0 && _parent.LeftIsDown() && Math.abs(_parent.moveRL) > Math.abs(temp))) { if (Math.abs(temp) > Math.abs(_parent.moveRL)) { _parent.moveRL = temp; } _parent.hitPower += 15; _parent.gotoAndStop('pencilDrawLockon'); } else { gotoAndPlay('continue'); } delete _parent.drawEnterFrame; } }; } frame 12 { _parent.hairRL = _parent._xscale / 5; } frame 18 { _parent.oMoveRL = _parent.moveRL; } frame 35 { _parent.drawEnterFrame = function () { if (!_parent.AttackIsDown()) { _parent.isAttacking = true; _parent.hairRL = 0; gotoAndPlay('continue'); delete _parent.drawEnterFrame; } }; } frame 60 { if (_currentframe == 60) { gotoAndPlay('holdLoop'); } } frame 62 { ticktock = false; _parent.nextSwipe = 2; _parent.hitPower += 15; _parent.drawEnterFrame = function () { _parent.lockOn = _root.lockOnBaddieCheck(_parent._x, _parent._y - _parent.isTall / 2, 80, _parent._xscale); }; } frame 63 { _parent.moveRL = _parent.hitPower * (_parent._xscale / 150); _parent.oMoveRL = _parent.moveRL; if (Math.abs(_parent.moveRL) > 15) { if (_parent.viewLock > -1 && Math.abs(_parent._x - (_root.BLayer['Baddie' + _parent.viewLock]._x + _root.BLayer['Baddie' + _parent.viewLock].moveRL * 10)) > 200) { _parent.gotoAndStop('pencilDrawLockon'); } else { _root.playSound('CharSlash', _parent._x, _parent.hitPower * 3); gotoAndPlay('longSwing'); } } else { _root.playSound('CharSlash', _parent._x, _parent.hitPower * 3); gotoAndPlay('swing'); } } frame 67 { if (_parent.lockOn > -1) { _parent.moveRL = _parent.oMoveRL; } if (_parent.JumpIsDown() || _parent.UpIsDown()) { _parent.SisDown = true; _parent.Still = false; _parent.FloatUp = 10; _parent.moveUD = -_parent.hitPower / 4; _parent._y += _parent.moveUD; _parent.slashSkip = 1; _parent.gotoAndStop('BuzzSaw'); } else { if (_parent.CheckAttack('slashLow', _parent.hitPower, _parent._xscale * 0.4, true)) { _parent.oMoveRL = _parent.moveRL * 0.5; _parent.moveRL *= 0.2; } else { gotoAndPlay('clash'); } } } frame 69 { _parent.moveRL = _parent.oMoveRL; } frame 71 { if (_parent.JumpIsDown() || _parent.UpIsDown()) { _parent.SisDown = true; _parent.Still = false; _parent.FloatUp = 10; _parent.moveUD = -_parent.hitPower / 4; _parent._y += _parent.moveUD; _parent.slashSkip = 0; _parent.gotoAndStop('BuzzSaw'); } else { if (_parent.CheckAttack('slashLow', _parent.hitPower, _parent._xscale * 0.8, false)) { _parent.oMoveRL = _parent.moveRL * 0.5; _parent.moveRL *= 0.2; } else { gotoAndPlay('cont2'); } } _parent.drawEnterFrame = function () { if (!_parent.AttackIsDown()) { _parent.drawEnterFrame = function () { if (_parent.AttackIsDown()) { delete _parent.drawEnterFrame; ticktock = true; } }; } }; } frame 73 { _parent.moveRL = _parent.oMoveRL; } frame 75 { if (_parent.JumpIsDown() || _parent.UpIsDown()) { _parent.SisDown = true; _parent.Still = false; _parent.FloatUp = 10; _parent.moveUD = -_parent.hitPower / 4; _parent._y += _parent.moveUD; _parent.slashSkip = 2; _parent.gotoAndStop('BuzzSaw'); } else { if (_parent.CheckAttack('slashLow', _parent.hitPower, _parent._xscale * 0.8, false)) { _parent.oMoveRL = _parent.moveRL * 0.5; _parent.moveRL *= 0.2; } else { gotoAndPlay('cont3'); _parent.lockOn = -1; } } } frame 77 { _parent.moveRL = _parent.oMoveRL; } frame 85 { if (_parent.AttackIsDown()) { _parent.isAttacking = false; gotoAndPlay('holdL'); } else { _parent.holding = false; _parent.drawEnterFrame = function () { if (_parent.AttackIsDown()) { _parent.isAttacking = false; _parent.holding = true; delete _parent.drawEnterFrame; gotoAndPlay('holdL'); } }; } _parent.hitPower = 0; } frame 89 { _parent.isAttacking = false; if (ticktock) { gotoAndPlay('jabL'); } } frame 99 { gotoAndPlay('backToIdle'); } frame 108 { if (_parent.AttackIsDown()) { _parent.drawEnterFrame = function () { if (!_parent.AttackIsDown()) { gotoAndPlay('jabL'); delete _parent.drawEnterFrame; } }; } else { gotoAndPlay('jabL'); } _parent.nextSwipe = 1; _parent.hitPower = _parent.hitStart; } frame 111 { _parent.hairRL = _parent._xscale / 5; } frame 112 { _parent.oMoveRL = _parent.moveRL; _parent.drawEnterFrame = function () { _parent.hitPower += _parent.hitAccel; if (!_parent.AttackIsDown()) { _parent.isAttacking = true; _parent.hairRL = 0; temp = _parent.hitPower * (_parent._xscale / 150); if (_parent._xscale * _parent.moveRL > 0 && (_parent._xscale > 0 && _parent.RightIsDown() || _parent._xscale < 0 && _parent.LeftIsDown() && Math.abs(_parent.moveRL) > Math.abs(temp))) { if (Math.abs(temp) > Math.abs(_parent.moveRL)) { _parent.moveRL = temp; } _parent.hitPower += 15; _parent.gotoAndStop('pencilDrawLockon'); } else { gotoAndPlay('continueL'); } delete _parent.drawEnterFrame; } }; } frame 119 { _parent.nextSwipe = 1; } frame 124 { _parent.oMoveRL = _parent.moveRL; } frame 141 { _parent.drawEnterFrame = function () { if (!_parent.AttackIsDown()) { _parent.isAttacking = true; _parent.hairRL = 0; gotoAndPlay('continueL'); delete _parent.drawEnterFrame; } }; } frame 159 { if (_currentframe == 159) { gotoAndPlay('holdLoopL'); } } frame 170 { ticktock = false; _parent.hitPower += 15; _parent.drawEnterFrame = function () { _parent.lockOn = _root.lockOnBaddieCheck(_parent._x, _parent._y - _parent.isTall / 2, 80, _parent._xscale); }; } frame 171 { _parent.moveRL = _parent.hitPower * (_parent._xscale / 150); _parent.oMoveRL = _parent.moveRL; if (Math.abs(_parent.moveRL) > 15) { if (_parent.viewLock > -1 && Math.abs(_parent._x - (_root.BLayer['Baddie' + _parent.viewLock]._x + _root.BLayer['Baddie' + _parent.viewLock].moveRL * 10)) > 200) { _parent.gotoAndStop('pencilDrawLockon'); } else { _root.playSound('CharSlash', _parent._x, _parent.hitPower * 3); gotoAndPlay('longSwingL'); } } else { _root.playSound('CharSlash', _parent._x, _parent.hitPower * 3); gotoAndPlay('swingL'); } } frame 172 { } frame 174 { if (_parent.JumpIsDown() || _parent.UpIsDown()) { _parent.SisDown = true; _parent.Still = false; _parent.FloatUp = 10; _parent.moveUD = -_parent.hitPower / 4; _parent._y += _parent.moveUD; _parent.slashSkip = 0; _parent.gotoAndStop('BuzzSaw'); } } frame 177 { if (_parent.lockOn > -1) { _parent.moveRL = _parent.oMoveRL; } if (_parent.JumpIsDown() || _parent.UpIsDown()) { _parent.SisDown = true; _parent.Still = false; _parent.FloatUp = 10; _parent.moveUD = -_parent.hitPower / 3; _parent._y += _parent.moveUD; _parent.slashSkip = 1; _parent.gotoAndStop('BuzzSaw'); } else { if (_parent.CheckAttack('slashHigh', _parent.hitPower, _parent._xscale * 0.8, false)) { _parent.oMoveRL = _parent.moveRL * 0.5; _parent.moveRL *= 0.2; } else { gotoAndPlay('contL2'); } } _parent.drawEnterFrame = function () { if (!_parent.AttackIsDown()) { _parent.drawEnterFrame = function () { if (_parent.AttackIsDown()) { delete _parent.drawEnterFrame; ticktock = true; } }; } }; } frame 179 { _parent.moveRL = _parent.oMoveRL; } frame 181 { if (_parent.JumpIsDown() || _parent.UpIsDown()) { _parent.SisDown = true; _parent.Still = false; _parent.FloatUp = 10; _parent.moveUD = -_parent.hitPower / 4; _parent._y += _parent.moveUD; _parent.slashSkip = 2; _parent.gotoAndStop('BuzzSaw'); } else { if (_parent.CheckAttack('slashHigh', _parent.hitPower, _parent._xscale * 0.8, false)) { _parent.oMoveRL = _parent.moveRL * 0.5; _parent.moveRL *= 0.2; } else { gotoAndPlay('contL3'); } } } frame 183 { _parent.moveRL = _parent.oMoveRL; } frame 185 { if (_parent.JumpIsDown() || _parent.UpIsDown()) { _parent.SisDown = true; _parent.Still = false; _parent.FloatUp = 10; _parent.moveUD = -_parent.hitPower / 4; _parent._y += _parent.moveUD; _parent.slashSkip = 3; _parent.gotoAndStop('BuzzSaw'); } else { if (_parent.CheckAttack('slashHigh', _parent.hitPower, _parent._xscale * 0.8, false)) { _parent.oMoveRL = _parent.moveRL * 0.5; _parent.moveRL *= 0.2; } else { gotoAndPlay('contL4'); _parent.lockOn = -1; } } } frame 187 { _parent.moveRL = _parent.oMoveRL; } frame 188 { _parent.lockOn = -1; } frame 194 { if (_parent.AttackIsDown()) { _parent.isAttacking = false; gotoAndPlay('swingLtoHold'); } else { _parent.holding = false; _parent.drawEnterFrame = function () { if (_parent.AttackIsDown()) { _parent.isAttacking = false; _parent.holding = true; delete _parent.drawEnterFrame; gotoAndPlay('swingLtoHold'); } }; } _parent.hitPower = 0; } frame 198 { _parent.isAttacking = false; if (ticktock) { gotoAndPlay('firstJab'); } } frame 215 { _parent.gotoAndStop('pencilIdle'); } frame 226 { _parent.drawEnterFrame = function () { if (!_parent.AttackIsDown()) { delete _parent.drawEnterFrame; gotoAndPlay('hold'); } }; _parent.hitPower = _parent.hitStart; } frame 234 { gotoAndPlay('holdCont'); } frame 239 { ticktock = false; _parent.drawEnterFrame = function () { if (!_parent.AttackIsDown()) { _parent.drawEnterFrame = function () { if (_parent.AttackIsDown()) { delete _parent.drawEnterFrame; ticktock = true; } }; } }; _parent.lockOn = _root.lockOnBaddieCheck(_parent._x, _parent._y - _parent.isTall / 2, 150, _parent._xscale); _parent.isAttacking = true; } frame 242 { lastJab = random(3) + 1; _parentJab = lastJab; gotoAndPlay('jabDelay' + lastJab); } frame 249 { _parent.lockOn = _root.lockOnBaddieCheck(_parent._x, _parent._y - _parent.isTall / 2, 150, _parent._xscale); } frame 250 { _root.playSound('CharJab', _parent._x, 100); ticktock = false; _parent.drawEnterFrame = function () { if (!_parent.AttackIsDown()) { _parent.drawEnterFrame = function () { if (_parent.AttackIsDown()) { delete _parent.drawEnterFrame; ticktock = true; } }; } }; if (_parent.CheckAttack('jab1', _parent.hitPower, _parent._xscale * 0.8, true)) { ++ticktockN; _parent.oMoveRL = _parent.moveRL * 0.5; nextFrame(); nextFrame(); play(); } else { gotoAndPlay('jabCont'); } } frame 258 { if (ticktock) { ticktock = false; if (ticktockN > 2) { gotoAndPlay('jabAccel1'); } else { if (_parent._xscale > 0 && _parent.LeftIsDown() || _parent._xscale < 0 && _parent.RightIsDown()) { _parent._xscale *= -1; gotoAndPlay('firstJab'); } else { _parentJab = random(3) + 1; while (lastJab == _parentJab) { _parentJab = random(3) + 1; } lastJab = _parentJab; _parent.hitPower = _parent.hitStart; gotoAndPlay('jab' + _parentJab); } } } else { if (_parent.AttackIsDown()) { ticktockN = 0; gotoAndPlay('jabhold1'); } else { _parent.drawEnterFrame = function () { if (_parent.AttackIsDown()) { if (_parent._xscale > 0 && _parent.LeftIsDown() || _parent._xscale < 0 && _parent.RightIsDown()) { _parent._xscale *= -1; _parent.lockOn = -1; } _parent.holding = true; delete _parent.drawEnterFrame; gotoAndPlay('jabhold1'); } }; _parent.hitPower = 0; } } } frame 260 { _parent.holding = false; _parent.lockOn = -1; ticktockN = 0; } frame 262 { _parent.isAttacking = false; } frame 302 { _parent.gotoAndStop('pencilIdle'); } frame 303 { _parent.hitPower = _parent.hitStart; if (!_parent.AttackIsDown()) { _parent.isAttacking = true; if (ticktockN > 2) { gotoAndPlay('jabAccel1'); } else { _parentJab = random(3) + 1; while (lastJab == _parentJab) { _parentJab = random(3) + 1; } lastJab = _parentJab; gotoAndPlay('jab' + _parentJab); } } else { _parent.drawEnterFrame = function () { _parent.hitPower += _parent.hitAccel; if (!_parent.AttackIsDown()) { _parent.isAttacking = true; if (ticktockN > 2) { gotoAndPlay('jabAccel1'); } else { _parentJab = random(3) + 1; while (lastJab == _parentJab) { _parentJab = random(3) + 1; } lastJab = _parentJab; gotoAndPlay('jab' + _parentJab); delete _parent.drawEnterFrame; } } }; } } frame 311 { gotoAndPlay('jabToHold'); } frame 316 { _parent.lockOn = _root.lockOnBaddieCheck(_parent._x, _parent._y - _parent.isTall / 2, 150, _parent._xscale); } frame 317 { _root.playSound('CharJab', _parent._x, 100); ticktock = false; _parent.drawEnterFrame = function () { if (!_parent.AttackIsDown()) { _parent.drawEnterFrame = function () { if (_parent.AttackIsDown()) { delete _parent.drawEnterFrame; ticktock = true; } }; } }; if (_parent.CheckAttack('jab2', _parent.hitPower, _parent._xscale * 0.8, true)) { ++ticktockN; _parent.oMoveRL = _parent.moveRL * 0.5; nextFrame(); nextFrame(); play(); } else { gotoAndPlay('jab2Cont'); } } frame 325 { if (ticktock) { if (ticktockN > 2) { gotoAndPlay('jabAccel1'); } else { if (_parent._xscale > 0 && _parent.LeftIsDown() || _parent._xscale < 0 && _parent.RightIsDown()) { _parent._xscale *= -1; gotoAndPlay('firstJab'); } else { _parentJab = random(3) + 1; while (lastJab == _parentJab) { _parentJab = random(3) + 1; } lastJab = _parentJab; _parent.hitPower = _parent.hitStart; gotoAndPlay('jab' + _parentJab); } } } else { if (_parent.AttackIsDown()) { ticktockN = 0; gotoAndPlay('jabhold2'); } else { _parent.drawEnterFrame = function () { if (_parent.AttackIsDown()) { if (_parent._xscale > 0 && _parent.LeftIsDown() || _parent._xscale < 0 && _parent.RightIsDown()) { _parent._xscale *= -1; _parent.lockOn = -1; } _parent.holding = true; delete _parent.drawEnterFrame; gotoAndPlay('jabhold2'); } }; _parent.hitPower = 0; } } } frame 327 { _parent.lockOn = -1; _parent.holding = false; ticktockN = 0; } frame 329 { _parent.isAttacking = false; } frame 369 { _parent.gotoAndStop('pencilIdle'); } frame 370 { _parent.hitPower = _parent.hitStart; if (!_parent.AttackIsDown()) { _parent.isAttacking = true; if (ticktockN > 2) { gotoAndPlay('jabAccel1'); } else { _parentJab = random(3) + 1; while (lastJab == _parentJab) { _parentJab = random(3) + 1; } lastJab = _parentJab; gotoAndPlay('jab' + _parentJab); } } else { _parent.drawEnterFrame = function () { _parent.hitPower += _parent.hitAccel; if (!_parent.AttackIsDown()) { _parent.isAttacking = true; if (ticktockN > 2) { gotoAndPlay('jabAccel1'); } else { _parentJab = random(3) + 1; while (lastJab == _parentJab) { _parentJab = random(3) + 1; } lastJab = _parentJab; gotoAndPlay('jab' + _parentJab); delete _parent.drawEnterFrame; } } }; } } frame 378 { gotoAndPlay('jabToHold'); } frame 382 { _parent.lockOn = _root.lockOnBaddieCheck(_parent._x, _parent._y - _parent.isTall / 2, 150, _parent._xscale); } frame 383 { _root.playSound('CharJab', _parent._x, 100); ticktock = false; _parent.drawEnterFrame = function () { if (!_parent.AttackIsDown()) { _parent.drawEnterFrame = function () { if (_parent.AttackIsDown()) { delete _parent.drawEnterFrame; ticktock = true; } }; } }; if (_parent.CheckAttack('jab3', _parent.hitPower, _parent._xscale * 0.8, true)) { ++ticktockN; _parent.oMoveRL = _parent.moveRL * 0.5; nextFrame(); nextFrame(); play(); } else { gotoAndPlay('jab3Cont'); } } frame 391 { if (ticktock) { if (ticktockN > 2) { gotoAndPlay('jabAccel1'); } else { if (_parent._xscale > 0 && _parent.LeftIsDown() || _parent._xscale < 0 && _parent.RightIsDown()) { _parent._xscale *= -1; gotoAndPlay('firstJab'); } else { _parentJab = random(3) + 1; while (lastJab == _parentJab) { _parentJab = random(3) + 1; } lastJab = _parentJab; _parent.hitPower = _parent.hitStart; gotoAndPlay('jab' + _parentJab); } } } else { if (_parent.AttackIsDown()) { ticktockN = 0; gotoAndPlay('jabhold3'); } else { _parent.drawEnterFrame = function () { if (_parent.AttackIsDown()) { if (_parent._xscale > 0 && _parent.LeftIsDown() || _parent._xscale < 0 && _parent.RightIsDown()) { _parent._xscale *= -1; _parent.lockOn = -1; } _parent.holding = true; delete _parent.drawEnterFrame; gotoAndPlay('jabhold3'); } }; _parent.hitPower = _parent.hitStart; } } } frame 393 { _parent.lockOn = -1; _parent.holding = false; ticktockN = 0; } frame 395 { _parent.isAttacking = false; } frame 436 { _parent.gotoAndStop('pencilIdle'); } frame 438 { _parent.hitPower = _parent.hitStart; if (!_parent.AttackIsDown()) { _parent.isAttacking = true; if (ticktockN > 2) { gotoAndPlay('jabAccel1'); } else { _parentJab = random(3) + 1; while (lastJab == _parentJab) { _parentJab = random(3) + 1; } lastJab = _parentJab; gotoAndPlay('jab' + _parentJab); } } else { _parent.drawEnterFrame = function () { _parent.hitPower += _parent.hitAccel; if (!_parent.AttackIsDown()) { _parent.isAttacking = true; if (ticktockN > 2) { gotoAndPlay('jabAccel1'); } else { _parentJab = random(3) + 1; while (lastJab == _parentJab) { _parentJab = random(3) + 1; } lastJab = _parentJab; gotoAndPlay('jab' + _parentJab); delete _parent.drawEnterFrame; } } }; } } frame 446 { gotoAndPlay('jabToHold'); } frame 452 { _parent.drawEnterFrame = function () { _parent.hitPower += _parent.hitAccel; if (!_parent.AttackIsDown()) { delete _parent.drawEnterFrame; gotoAndPlay('holdCont'); } }; } frame 460 { gotoAndPlay('holdCont'); } frame 464 { _parent.isAttacking = true; } frame 467 { lastJab = random(3) + 1; gotoAndPlay('jabDelay' + lastJab); } frame 477 { _parent.holding = false; } frame 487 { _parent.gotoAndStop('pencilIdle'); } frame 502 { _parent.moveUD = -15; _parent.gotoAndStop('BuzzSaw'); } frame 505 { _parent.lockOn = -1; _parent.moveRL = _parent.oMoveRL; _parent.hitPower = 0; _parent.isAttacking = false; delete _parent.drawEnterFrame; } frame 518 { if (_parent.AttackIsDown()) { if (_parent.nextSwipe == 1) { gotoAndPlay('hold'); } else { gotoAndPlay('holdL'); } } else { _parent.holding = false; _parent.drawEnterFrame = function () { if (_parent.AttackIsDown()) { _parent.holding = true; delete _parent.drawEnterFrame; if (_parent.nextSwipe == 1) { gotoAndPlay('hold'); } else { gotoAndPlay('holdL'); } } }; } _parent.hitPower = 0; } frame 522 { _parent.gotoAndStop('pencilIdle'); } frame 524 { _parent.gotoAndStop('pencilDrawLockon'); } } movieClip 5769 { frame 1 { _parent.lockOn = _root.lockOnBaddieCheck(_parent._x, _parent._y - _parent.isTall / 2, 200, _parent._xscale); _parent.oLockOn = _parent.lockOn; if (_parent.lockOn > -1) { if (_parent._x - _root.BLayer['Baddie' + _parent.lockOn]._x < 0) { _parent._xscale = 100; } else { _parent._xscale = -100; } } } frame 3 { _root.playSound('CharJab', _parent._x, 100); } frame 5 { _parent.lockOn = -1; _parent.hitPower = 7; ticktock = false; onEnterFrame = function () { if (!_parent.AttackIsDown()) { onEnterFrame = function () { if (_parent.AttackIsDown()) { _parent.AisDown = true; delete onEnterFrame; ticktock = true; } }; } }; temp = _parent.CheckAttack('jab4', _parent.hitPower, _parent._xscale * 0.8, true); if (temp == 'slice') { _parent.moveRL = 0; } else { if (temp == 'clash') { _parent.oMoveRL = 0; _parent.moveRL = 0; gotoAndPlay('jabAccel1Cont'); } else { _parent.moveRL = _parent.hitPower * (_parent._xscale / 150) * 1.5; gotoAndPlay('jabAccel1Cont'); } } } frame 7 { } frame 11 { ticktockN = 0; if (ticktock || _parent.AttackIsDown() && !_parent.AisDown) { ticktock = false; _parent.AisDown = true; ++ticktockN; if (_parent._xscale > 0 && _parent.LeftIsDown() || _parent._xscale < 0 && _parent.RightIsDown()) { _parent._xscale *= -1; _parent.oLockOn = -1; _parent.lockOn = -1; } _parent.moveRL = _parent.hitPower * (_parent._xscale / 200); gotoAndPlay('jabAccel2'); } else { ticktockN = 0; onEnterFrame = function () { if (_parent.AttackIsDown() && !_parent.AisDown) { if (_parent._xscale > 0 && _parent.LeftIsDown() || _parent._xscale < 0 && _parent.RightIsDown()) { _parent._xscale *= -1; _parent.oLockOn = -1; _parent.lockOn = -1; } _parent.moveRL = _parent.hitPower * (_parent._xscale / 200); _parent.AisDown = true; _parent.holding = true; gotoAndPlay('jabAccel2'); delete onEnterFrame; } }; _parent.hitPower = _parent.hitStart; } } frame 17 { _parent.holding = false; _parent.isAttacking = false; } frame 31 { _parent.gotoAndStop('pencilIdle'); } frame 34 { _parent.isAttacking = true; _parent.lockOn = _root.lockOnBaddieCheck(_parent._x, _parent._y - _parent.isTall / 2, 275, _parent._xscale); if (_parent.lockOn == -1) { _parent.lockOn = _parent.oLockOn; } else { _parent.oLockOn = _parent.lockOn; } } frame 36 { _root.playSound('CharJab', _parent._x, 100); } frame 38 { _parent.hitPower = 14; ticktock = false; onEnterFrame = function () { if (!_parent.AttackIsDown()) { onEnterFrame = function () { if (_parent.AttackIsDown()) { _parent.AisDown = true; delete onEnterFrame; ticktock = true; } }; } }; temp = _parent.CheckAttack('jab5', _parent.hitPower, _parent._xscale * 0.8, true); if (temp == 'slice') { _parent.moveRL = 0; } else { if (temp == 'clash') { _parent.oMoveRL = 0; _parent.moveRL = 0; gotoAndPlay('jabAccel2Cont1'); } else { _parent.moveRL = _parent.hitPower * (_parent._xscale / 150) * 1.5; gotoAndPlay('jabAccel2Cont1'); } } _parent.lockOn = -1; } frame 43 { _parent.hitPower = 20; ticktock = false; onEnterFrame = function () { if (!_parent.AttackIsDown()) { onEnterFrame = function () { if (_parent.AttackIsDown()) { delete onEnterFrame; _parent.AisDown = true; ticktock = true; } }; } }; temp = _parent.CheckAttack('jab5', _parent.hitPower, _parent._xscale * 0.8, true); if (temp == 'slice') { _parent.moveRL = 0; } else { if (temp == 'clash') { _parent.oMoveRL = 0; _parent.moveRL = 0; gotoAndPlay('jabAccel2Cont2'); } else { gotoAndPlay('jabAccel2Cont2'); } } } frame 46 { } frame 55 { ticktockN = 0; ticktockN = 0; if (ticktock) { if (_parent._xscale > 0 && _parent.LeftIsDown() || _parent._xscale < 0 && _parent.RightIsDown()) { _parent._xscale *= -1; _parent.oLockOn = -1; _parent.lockOn = -1; } _parent.moveRL = _parent.hitPower * (_parent._xscale / 200); _parent.AisDown = true; _parent.holding = true; delete onEnterFrame; gotoAndPlay('jabAccel3'); } else { onEnterFrame = function () { if (_parent.AttackIsDown()) { if (!_parent.AisDown) { if (_parent._xscale > 0 && _parent.LeftIsDown() || _parent._xscale < 0 && _parent.RightIsDown()) { _parent._xscale *= -1; _parent.oLockOn = -1; _parent.lockOn = -1; } _parent.moveRL = _parent.hitPower * (_parent._xscale / 200); _parent.AisDown = true; _parent.holding = true; delete onEnterFrame; gotoAndPlay('jabAccel3'); } } }; } _parent.hitPower = _parent.hitStart; } frame 61 { _parent.holding = false; _parent.isAttacking = false; } frame 63 { if (_parent.AttackIsDown()) { delete onEnterFrame; _parent.airHold = 115; _parent.hitPower += 15; _parent.gotoAndStop('pencilDraw'); } } frame 72 { _parent.airHold = 469; _parent.gotoAndStop('pencilDraw'); } frame 79 { if (_parent.hitPower < 35) { _parent.hitPower = 35; } } frame 82 { onEnterFrame = function () { _parent.lockOn = _root.lockOnBaddieCheck(_parent._x, _parent._y - _parent.isTall / 2, 250, _parent._xscale); if (_parent.lockOn == -1) { _parent.lockOn = _parent.oLockOn; } else { _parent.oLockOn = _parent.lockOn; } }; } frame 86 { _root.playSound('CharSlash', _parent._x, _parent.hitPower * 3); } frame 87 { ticktock = false; onEnterFrame = function () { if (!_parent.AttackIsDown()) { onEnterFrame = function () { if (_parent.AttackIsDown()) { _parent.AisDown = true; delete onEnterFrame; ticktock = true; } }; } }; } frame 93 { if (_parent.CheckAttack('slashHigh', _parent.hitPower, _parent._xscale * 0.8, false)) { _parent.oMoveRL = _parent.moveRL * 0.5; _parent.lockOn = -1; } else { gotoAndPlay('cont32'); } } frame 95 { } frame 97 { if (_parent.CheckAttack('slashHigh', _parent.hitPower, _parent._xscale * 0.8, true)) { _parent.oMoveRL = _parent.moveRL * 0.5; _parent.lockOn = -1; } else { gotoAndPlay('cont33'); } } frame 99 { } frame 101 { _parent.lockOn = -1; if (_parent.CheckAttack('slashHigh', _parent.hitPower, _parent._xscale * 0.5, true)) { } else { gotoAndPlay('cont34'); } } frame 103 { } frame 114 { if (_parent.AttackIsDown()) { _parent.airHold = 226; _parent.gotoAndStop('pencilDraw'); } else { _parent.holding = false; _parent.isAttacking = false; onEnterFrame = function () { if (_parent.AttackIsDown()) { _parent.holding = true; delete onEnterFrame; _parent.airHold = 226; _parent.gotoAndStop('pencilDraw'); } }; } _parent.hitPower = 0; } frame 131 { _parent.gotoAndStop('pencilIdle'); } frame 133 { _parent.lockOn = -1; _parent.moveRL = _parent.oMoveRL; _parent.hitPower = 0; _parent.isAttacking = false; delete onEnterFrame; } frame 146 { if (_parent.AttackIsDown()) { if (_parent.nextSwipe == 1) { gotoAndPlay('hold'); } else { gotoAndPlay('holdL'); } } else { _parent.holding = false; onEnterFrame = function () { if (_parent.AttackIsDown()) { _parent.holding = true; delete onEnterFrame; if (_parent.nextSwipe == 1) { gotoAndPlay('hold'); } else { gotoAndPlay('holdL'); } } }; } _parent.hitPower = 0; } frame 150 { _parent.gotoAndStop('pencilIdle'); } } movieClip 5995 { frame 107 { _parent.isAttacking = true; } frame 108 { if (_parent.AttackIsDown()) { _parent.drawEnterFrame = function () { if (!_parent.AttackIsDown()) { gotoAndPlay('jabL'); delete _parent.drawEnterFrame; } }; } else { gotoAndPlay('jabL'); } _parent.nextSwipe = 1; _parent.hitPower = _parent.hitStart; } frame 111 { _parent.hairRL = _parent._xscale / 5; } frame 112 { _parent.oMoveRL = _parent.moveRL; _parent.drawEnterFrame = function () { _parent.hitPower += _parent.hitAccel; if (!_parent.AttackIsDown()) { _parent.isAttacking = true; _parent.hairRL = 0; temp = _parent.hitPower * (_parent._xscale / 150); gotoAndPlay('continueL'); delete _parent.drawEnterFrame; } }; _parent.isAttacking = false; } frame 141 { _parent.drawEnterFrame = function () { if (!_parent.AttackIsDown()) { _parent.isAttacking = true; _parent.hairRL = 0; gotoAndPlay('continueL'); delete _parent.drawEnterFrame; } }; } frame 159 { if (_currentframe == 159) { gotoAndPlay('holdLoopL'); } } frame 170 { ticktock = false; _parent.hitPower += 15; _parent.moveRL = _parent.hitPower * (_parent._xscale / 150); _parent.drawEnterFrame = function () { _parent.lockOn = _root.lockOnBaddieCheck(_parent._x, _parent._y - _parent.isTall / 2, 80, _parent._xscale); }; } frame 171 { gotoAndPlay('swingL'); } frame 175 { if (_parent.JumpIsDown() || _parent.UpIsDown()) { _parent.SisDown = true; _parent.moveUD = -_parent.hitPower / 3; } else { if (_parent.DownIsDown()) { _parent.moveUD = _parent.hitPower / 6; } } _parent.FloatUp = 5; _parent.slashSkip = 0; _parent.gotoAndStop('BuzzSaw'); } frame 226 { _parent.drawEnterFrame = function () { if (!_parent.AttackIsDown()) { delete _parent.drawEnterFrame; gotoAndPlay('hold'); } }; _parent.hitPower = _parent.hitStart; } frame 234 { gotoAndPlay('holdCont'); } frame 239 { ticktock = false; _parent.lockOn = _root.lockOnBaddieCheck(_parent._x, _parent._y - _parent.isTall / 2, 150, _parent._xscale); } frame 245 { gotoAndPlay('jab1'); } frame 248 { _parent.lockOn = _root.lockOnBaddieCheck(_parent._x, _parent._y - _parent.isTall / 2, 150, _parent._xscale); } frame 250 { _root.playSound('CharJab', _parent._x, 100); if (_parent.CheckAttack('jab1', _parent.hitPower, _parent._xscale * 0.8, true)) { _parent.moveUD = 0; _parent.oMoveRL = 0; _parent.moveRL = 0; _parent.b = 20; } else { gotoAndPlay('jabCont'); } } frame 256 { if (_parent.CheckAttack('jab1', _parent.hitPower, _parent._xscale * 0.8, true)) { _parent.moveUD = 0; _parent.oMoveRL = 0; _parent.moveRL = 0; _parent.b = 20; gotoAndPlay(251); } } frame 258 { _parent.b = -10; _parent.drawEnterFrame = function () { if (_parent.AttackIsDown() && _parent._currentframe != 72) { if (_parent._xscale > 0 && _parent.LeftIsDown() || _parent._xscale < 0 && _parent.RightIsDown()) { _parent._xscale *= -1; _parent.lockOn = -1; } _parent.holding = true; delete _parent.drawEnterFrame; gotoAndPlay('jabhold1'); } else { _parent.holding = false; } }; _parent.hitPower = 0; _parent.lockOn = -1; } frame 260 { _parent.isAttacking = false; _parent.b = -15; _parent.holding = false; ticktockN = 0; } frame 302 { _parent.gotoAndStop('pencilIdle'); } frame 303 { _parent.hitPower = _parent.hitStart; if (!_parent.AttackIsDown()) { _parent.isAttacking = true; if (ticktockN > 2) { gotoAndPlay('jabAccel1'); } else { _parentJab = random(3) + 1; while (lastJab == _parentJab) { _parentJab = random(3) + 1; } lastJab = _parentJab; gotoAndPlay('jab' + _parentJab); } } else { _parent.drawEnterFrame = function () { _parent.hitPower += _parent.hitAccel; if (!_parent.AttackIsDown()) { _parent.isAttacking = true; if (ticktockN > 2) { gotoAndPlay('jabAccel1'); } else { _parentJab = random(3) + 1; while (lastJab == _parentJab) { _parentJab = random(3) + 1; } lastJab = _parentJab; gotoAndPlay('jab' + _parentJab); delete _parent.drawEnterFrame; } } }; } } frame 311 { gotoAndPlay('jabToHold'); } frame 316 { _parent.lockOn = _root.lockOnBaddieCheck(_parent._x, _parent._y - _parent.isTall / 2, 150, _parent._xscale); } frame 317 { _root.playSound('CharJab', _parent._x, 100); ticktock = false; _parent.drawEnterFrame = function () { if (!_parent.AttackIsDown()) { _parent.drawEnterFrame = function () { if (_parent.AttackIsDown()) { delete _parent.drawEnterFrame; ticktock = true; } }; } }; if (_parent.CheckAttack('jab2', _parent.hitPower, _parent._xscale * 0.8, true)) { ++ticktockN; _parent.oMoveRL = _parent.moveRL * 0.5; nextFrame(); nextFrame(); play(); } else { gotoAndPlay('jab2Cont'); } } frame 325 { if (ticktock) { ticktock = false; if (_parent._xscale > 0 && _parent.LeftIsDown() || _parent._xscale < 0 && _parent.RightIsDown()) { _parent._xscale *= -1; gotoAndPlay('firstJab'); } else { _parentJab = random(3) + 1; while (lastJab == _parentJab) { _parentJab = random(3) + 1; } lastJab = _parentJab; _parent.hitPower = _parent.hitStart; gotoAndPlay('jab' + _parentJab); } } else { if (_parent.AttackIsDown()) { ticktockN = 0; _parent.isAttacking = false; gotoAndPlay('jabhold2'); } else { _parent.isAttacking = false; _parent.drawEnterFrame = function () { if (_parent.AttackIsDown()) { if (_parent._xscale > 0 && _parent.LeftIsDown() || _parent._xscale < 0 && _parent.RightIsDown()) { _parent._xscale *= -1; _parent.lockOn = -1; } _parent.holding = true; delete _parent.drawEnterFrame; gotoAndPlay('jabhold2'); } }; _parent.hitPower = 0; } } _parent.lockOn = -1; } frame 327 { _parent.holding = false; ticktockN = 0; } frame 369 { _parent.gotoAndStop('pencilIdle'); } frame 370 { _parent.hitPower = _parent.hitStart; if (!_parent.AttackIsDown()) { _parent.isAttacking = true; if (ticktockN > 2) { gotoAndPlay('jabAccel1'); } else { _parentJab = random(3) + 1; while (lastJab == _parentJab) { _parentJab = random(3) + 1; } lastJab = _parentJab; gotoAndPlay('jab' + _parentJab); } } else { _parent.drawEnterFrame = function () { _parent.hitPower += _parent.hitAccel; if (!_parent.AttackIsDown()) { _parent.isAttacking = true; if (ticktockN > 2) { gotoAndPlay('jabAccel1'); } else { _parentJab = random(3) + 1; while (lastJab == _parentJab) { _parentJab = random(3) + 1; } lastJab = _parentJab; gotoAndPlay('jab' + _parentJab); delete _parent.drawEnterFrame; } } }; } } frame 378 { gotoAndPlay('jabToHold'); } frame 382 { _parent.lockOn = _root.lockOnBaddieCheck(_parent._x, _parent._y - _parent.isTall / 2, 150, _parent._xscale); } frame 383 { _root.playSound('CharJab', _parent._x, 100); ticktock = false; _parent.drawEnterFrame = function () { if (!_parent.AttackIsDown()) { _parent.drawEnterFrame = function () { if (_parent.AttackIsDown()) { delete _parent.drawEnterFrame; ticktock = true; } }; } }; if (_parent.CheckAttack('jab3', _parent.hitPower, _parent._xscale * 0.8, true)) { ++ticktockN; _parent.oMoveRL = _parent.moveRL * 0.5; nextFrame(); nextFrame(); play(); } else { gotoAndPlay('jab3Cont'); } } frame 391 { if (ticktock) { if (_parent._xscale > 0 && _parent.LeftIsDown() || _parent._xscale < 0 && _parent.RightIsDown()) { _parent._xscale *= -1; gotoAndPlay('firstJab'); } else { _parentJab = random(3) + 1; while (lastJab == _parentJab) { _parentJab = random(3) + 1; } lastJab = _parentJab; _parent.hitPower = _parent.hitStart; gotoAndPlay('jab' + _parentJab); } } else { if (_parent.AttackIsDown()) { ticktockN = 0; _parent.isAttacking = false; gotoAndPlay('jabhold3'); } else { _parent.isAttacking = false; _parent.drawEnterFrame = function () { if (_parent.AttackIsDown()) { if (_parent._xscale > 0 && _parent.LeftIsDown() || _parent._xscale < 0 && _parent.RightIsDown()) { _parent._xscale *= -1; _parent.lockOn = -1; } _parent.holding = true; delete _parent.drawEnterFrame; gotoAndPlay('jabhold3'); } }; _parent.hitPower = _parent.hitStart; } } _parent.lockOn = -1; } frame 393 { _parent.holding = false; ticktockN = 0; } frame 436 { _parent.gotoAndStop('pencilIdle'); } frame 438 { _parent.hitPower = _parent.hitStart; if (!_parent.AttackIsDown()) { _parent.isAttacking = true; if (ticktockN > 2) { gotoAndPlay('jabAccel1'); } else { _parentJab = random(3) + 1; while (lastJab == _parentJab) { _parentJab = random(3) + 1; } lastJab = _parentJab; gotoAndPlay('jab' + _parentJab); } } else { _parent.drawEnterFrame = function () { _parent.hitPower += _parent.hitAccel; if (!_parent.AttackIsDown()) { _parent.isAttacking = true; if (ticktockN > 2) { gotoAndPlay('jabAccel1'); } else { _parentJab = random(3) + 1; while (lastJab == _parentJab) { _parentJab = random(3) + 1; } lastJab = _parentJab; gotoAndPlay('jab' + _parentJab); delete _parent.drawEnterFrame; } } }; } } frame 446 { gotoAndPlay('jabToHold'); } frame 452 { _parent.drawEnterFrame = function () { _parent.hitPower += _parent.hitAccel; if (!_parent.AttackIsDown()) { delete _parent.drawEnterFrame; gotoAndPlay('holdCont'); } }; } frame 460 { gotoAndPlay('holdCont'); } frame 464 { _parent.isAttacking = true; _parent.hitPower = 45; } frame 467 { _parent.b = 10; gotoAndPlay('jab1'); } frame 477 { _parent.holding = false; } frame 487 { _parent.gotoAndStop('pencilIdle'); } frame 502 { _parent.moveUD = -15; _parent.gotoAndStop('BuzzSaw'); } frame 505 { _parent.lockOn = -1; _parent.moveRL = _parent.oMoveRL; _parent.hitPower = 0; _parent.isAttacking = false; delete _parent.drawEnterFrame; } frame 518 { if (_parent.AttackIsDown()) { if (_parent.nextSwipe == 1) { gotoAndPlay('hold'); } else { gotoAndPlay('holdL'); } } else { _parent.holding = false; _parent.drawEnterFrame = function () { if (_parent.AttackIsDown()) { _parent.holding = true; delete _parent.drawEnterFrame; if (_parent.nextSwipe == 1) { gotoAndPlay('hold'); } else { gotoAndPlay('holdL'); } } }; } _parent.hitPower = 0; } frame 522 { _parent.gotoAndStop('pencilIdle'); } frame 524 { _parent.gotoAndStop('pencilDrawLockon'); } } movieClip 6001 { frame 6 { _parent.stepUp = true; _parent.gotoAndStop('Walk'); } } movieClip 6011 { frame 6 { _parent.stepUp = true; _parent.gotoAndStop('Walk'); } } movieClip 6060 { frame 2 { _parent.moveRL = _parent.hitPower * (_parent._xscale / 150); _parent.oMoveRL = _parent.moveRL; lockOn = _root.lockOnBaddieCheck(_parent._x + _parent._xscale * 0.1, _parent._y, 100, _parent._xscale); if (lockOn > -1) { _parent.oMoveRL = _parent.moveRL; _parent.moveRL = 0; } if (Math.abs(_parent.moveRL) > 15) { gotoAndPlay('longSwing'); } else { gotoAndPlay('swing'); } ticktock = false; onEnterFrame = function () { if (!_parent.AttackIsDown()) { onEnterFrame = function () { if (_parent.AttackIsDown()) { delete onEnterFrame; ticktock = true; } }; } lockOn = _root.lockOnBaddieCheck(_parent._x + _parent._xscale * 0.1, _parent._y, 100, _parent._xscale); if (lockOn > -1) { _parent.oMoveRL = _parent.moveRL; _parent.moveRL = 0; } }; } frame 6 { if (lockOn > -1) { _parent.moveRL = _parent.oMoveRL; } if (_parent.CheckAttack('slash', _parent.hitPower, _parent._xscale * 0.6, false)) { stop(); b = 5; _parent.oMoveRL = _parent.moveRL * 0.5; _parent.moveRL = 0; onEnterFrame = function () { if (b > 0) { --b; } else { delete onEnterFrame; _parent.moveRL = _parent.oMoveRL; nextFrame(); play(); } }; } lockOn = -1; } frame 7 { _parent.moveRL = _parent.oMoveRL; if (_parent.CheckAttack('slash', _parent.hitPower, _parent._xscale * 0.8, false)) { stop(); b = 5; _parent.oMoveRL = _parent.moveRL * 0.5; _parent.moveRL = 0; onEnterFrame = function () { if (b > 0) { --b; } else { delete onEnterFrame; _parent.moveRL = _parent.oMoveRL; nextFrame(); play(); } }; } } frame 8 { if (_parent.CheckAttack('slash', _parent.hitPower, _parent._xscale * 0.8, true)) { stop(); b = 5; _parent.oMoveRL = _parent.moveRL * 0.5; _parent.moveRL = 0; onEnterFrame = function () { if (b > 0) { --b; } else { delete onEnterFrame; _parent.moveRL = _parent.oMoveRL; nextFrame(); play(); } }; } } frame 15 { _parent.nextSwipe = 2; if (_parent.AttackIsDown()) { gotoAndPlay('holdL'); } else { _parent.holding = false; onEnterFrame = function () { if (_parent.AttackIsDown()) { _parent.holding = true; delete onEnterFrame; gotoAndPlay('holdL'); } }; } } frame 19 { if (ticktock) { gotoAndPlay('jabL'); } } frame 29 { gotoAndPlay('backToIdle'); } frame 37 { _parent.moveRL = _parent.hitPower * (_parent._xscale / 150); _parent.oMoveRL = _parent.moveRL; lockOn = _root.lockOnBaddieCheck(_parent._x + _parent._xscale * 0.1, _parent._y, 100, _parent._xscale); if (lockOn > -1) { _parent.oMoveRL = _parent.moveRL; _parent.moveRL = 0; } if (Math.abs(_parent.moveRL) > 15) { gotoAndPlay('longSwingL'); } else { gotoAndPlay('swingL'); } ticktock = false; onEnterFrame = function () { if (!_parent.AttackIsDown()) { onEnterFrame = function () { if (_parent.AttackIsDown()) { delete onEnterFrame; ticktock = true; } }; } lockOn = _root.lockOnBaddieCheck(_parent._x + _parent._xscale * 0.1, _parent._y, 100, _parent._xscale); if (lockOn > -1) { _parent.oMoveRL = _parent.moveRL; _parent.moveRL = 0; } }; } frame 42 { _root.playSound('CharSaw', _parent._x, 100); } frame 46 { stop(); } frame 50 { _root.playSound('CharSpin', _parent._x, 100); } frame 60 { gotoAndPlay('tornadoLoop'); } } movieClip 6073 { frame 8 { stop(); } frame 19 { stop(); } } movieClip 6266 { frame 113 { _root.UberForeground.gotoAndStop(2); } frame 115 { } frame 152 { _root['levelBeaten' + LevelLoaded] = true; _root.InteractLayer.Door0.checkBox.gotoAndStop(2); _root.InteractLayer.object0.gotoAndStop(2); _root.InteractLayer.object0.ID = 2; _root.InteractLayer.object0.thisMessageSuccess = 'closetGot'; _root.InteractLayer.object0.thisMessageIdle = 'closetGot'; _root.CharHasWeapon = 'Pencil'; _root.charLoadWeapon(); _parent._x -= 20; _root.UberForeground.gotoAndStop(3); _parent.gotoAndStop('pencilIdle'); } } movieClip 6358 { frame 47 { if (_currentframe == 47) { gotoAndPlay('sleepLoop'); } } frame 49 { _root.InteractLayer.bed.gotoAndPlay(2); } frame 67 { _parent.hairRL = 10; _parent.gelHair(); } frame 80 { _parent.hairRL = 0; } frame 119 { gotoAndPlay('loop'); } } movieClip 6360 { } movieClip 6583 { frame 398 { stop(); } } movieClip 6584 Char { frame 1 { Idle.b = 6; gotoBuffer = 'nothing'; if (isCarrying == 'pencil') { _root.messagePopup('|| ' + airHold); gotoAndStop('pencilIdle'); } else { onEnterFrame = function () { if (!_root.Paused && !_root.PauseListener()) { Idle.play(); slopeStuff(); if (friction) { RLing = 0.2; } else { RLing = 1; } if (Math.abs(moveRL + rotAccel) < 40) { moveRL += rotAccel / 2; } else { moveRL *= 40 / Math.abs(moveRL); } if (RightIsDown()) { if (moveRL < -5) { gotoBuffer = 'Slide'; } else { if (friction && moveRL > 10) { gotoBuffer = 'Slide'; } else { if (_xscale > 0) { moveRL += RLing * RightIsDown(); gotoBuffer = 'Walk'; } else { gotoBuffer = 'Backpeddle'; } } if (moveRL < RLing * RightIsDown()) { moveRL += RLing * RightIsDown(); } } } else { if (LeftIsDown()) { if (moveRL > 5) { gotoBuffer = 'Slide'; } else { if (friction && moveRL < -10) { gotoBuffer = 'Slide'; } else { if (_xscale < 0) { moveRL -= RLing * LeftIsDown(); gotoBuffer = 'Walk'; } else { gotoBuffer = 'Backpeddle'; } } if (moveRL > -RLing * LeftIsDown()) { moveRL -= RLing * LeftIsDown(); } } } else { if (sliding && _rotation * moveRL > 0) { if (Math.abs(_rotation) < 90) { gotoBuffer = 'Slide'; } } if (moveRL == 0) { } else { if (Math.abs(moveRL) > 5) { if (!RightIsDown() || !LeftIsDown()) { gotoBuffer = 'Slide'; } } else { if (Math.abs(moveRL) > RLing / 2) { moveRL -= (moveRL / Math.abs(moveRL)) * (RLing / 2); } else { moveRL = 0; } } } } } if (UpIsDown()) { fallView += (-200 - fallView) / 10; } if (!AttackIsDown()) { AisDown = false; } if (RLStatus == 'door') { } else { if (DownIsDown()) { if (Math.abs(moveRL) > 5) { gotoBuffer = 'Slide'; } else { gotoBuffer = 'Duck'; } } else { if (AttackIsDown() && !AisDown) { AisDown = true; gotoBuffer = drawWeapon('pencilDraw'); } } if (_currentframe != 1) { } else { if (CheckBaddieHit(_x, _y, RLx(moveRL), RLy(moveRL))) { } else { if (JumpListener()) { } else { RLStatus = RLFunc(); if (RLStatus == 'Edge' && moveRL == 0) { gotoBuffer = 'Edge'; } else { if (RLStatus == 'Wall') { gotoBuffer = 'nothing'; tilt += (_rotation / 2 - tilt) / 5; } else { tilt += (_rotation - tilt) / 5; } } if (gotoBuffer != 'nothing') { gotoAndStop(gotoBuffer); } } } } } } else { Idle.stop(); } }; Idle._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } stop(); } frame 2 { if (fromLedge) { fromLedge = false; CharStartup.gotoAndPlay('fromLedge'); } else { if (fromSlide && isCarrying == 'nothing') { fromSlide = false; CharStartup.gotoAndPlay('fromSlide'); } else { if (stepUp) { stepUp = false; CharStartup.gotoAndPlay(6); } else { if (Math.abs(moveRL) < 4) { } else { if (Math.abs(moveRL) > 18 && !justLanded) { gotoAndStop('Run'); } else { if (Math.abs(moveRL) <= 8) { CharStartup.gotoAndPlay('WalkLoopR'); } else { CharStartup.gotoAndPlay('JogLoopR'); } } } } } } if (!sheathing || sheathFrame < 1) { sheathing = false; sheathFrame = 0; if (pencilOut < 5) { pencilOut = 5; } } frameSkip = 0; changeHands = false; impact = justLanded; if (justLanded) { CharStartup.torsoShell.gotoAndStop(2); if (alreadyLanded) { alreadyLanded = false; CharStartup.torsoShell.torsoLand.landingTorso.gotoAndPlay(landFrame); } } else { if (sheathing) { sheathing = false; justLanded = false; impact = justLanded; CharStartup.torsoShell.gotoAndStop(2); CharStartup.torsoShell.torsoLand.gotoAndStop(CharStartup._currentframe); CharStartup.torsoShell.torsoLand.landingTorso.gotoAndPlay(sheathFrame + 23); } else { if (holdFront) { } else { if (isCarrying == 'pencil') { CharStartup.torsoShell.gotoAndStop(3); CharStartup.torsoShell.torsoPencil.gotoAndStop(CharStartup._currentframe); } else { CharStartup.torsoShell.gotoAndStop(1); CharStartup.torsoShell.torsoWalk.gotoAndStop(CharStartup._currentframe); } } } } if (walkLock) { maxRL = 15; } else { if (isCarrying == 'pencil' || sheathing) { maxRL = 15; } else { maxRL = 20; } } this.justLanded = false; gotoBuffer = 'nothing'; onEnterFrame = function () { if (!_root.Paused && !_root.PauseListener()) { if (changeHands || impact) { CharStartup.torsoShell.torsoLand.gotoAndStop(CharStartup._currentframe); } else { if (sheathFrame > 0) { CharStartup.torsoShell.torsoLand.gotoAndStop(CharStartup._currentframe); } else { if (isCarrying == 'pencil') { if (pencilOut < 0) { CharStartup.torsoShell.torsoLand.gotoAndStop(CharStartup._currentframe); } else { if (pencilOut > 0) { --pencilOut; CharStartup.torsoShell.torsoPencil.gotoAndStop(CharStartup._currentframe); } else { sheathFrame = 1; pencilOut = -1; CharStartup.torsoShell.gotoAndStop(2); CharStartup.torsoShell.torsoLand.gotoAndStop(CharStartup._currentframe); CharStartup.torsoShell.torsoLand.landingTorso.gotoAndPlay('sheath'); } } } else { CharStartup.torsoShell.torsoWalk.gotoAndStop(CharStartup._currentframe); } } } CharStartup.play(); slopeStuff(); if (moveRL * rotAccel > 0 && isCarrying == 'nothing') { moveRL += rotAccel / 2; } else { moveRL += rotAccel / 3; } if (friction) { RLing = 0.2; } else { if (Math.abs(_parent.moveRL) > 18) { RLing = 2; } else { RLing = (maxRL + 5 - Math.abs(moveRL)) / 20; } } if (RightIsDown()) { if (sliding && _xscale > 0 && rotAccel > RLing) { if (friction) { runtoslide = true; gotoBuffer = 'Slide'; } } else { if (moveRL < maxRL * RightIsDown()) { moveRL += RLing * RightIsDown(); if (moveRL < (90 + _rotation) / 8 && rotAccel < RLing * RightIsDown()) { moveRL -= rotAccel * RightIsDown(); } } } } else { if (LeftIsDown()) { if (sliding && _xscale < 0 && rotAccel < -RLing) { if (friction) { runtoslide = true; gotoBuffer = 'Slide'; } } else { if (moveRL > -maxRL * LeftIsDown()) { moveRL -= RLing * LeftIsDown(); if (moveRL > -(90 - _rotation) / 8 && rotAccel > RLing) { moveRL -= rotAccel * LeftIsDown(); } } } } else { if (sliding) { runtoslide = true; gotoBuffer = 'Slide'; } } } if (!(RightIsDown() && moveRL > 0) && !(LeftIsDown() && moveRL < 0) && moveRL != 0) { if (Math.abs(moveRL) < 10 && Math.abs(_rotation) < 2) { ledgeGrab = true; } else { ledgeGrab = false; } if (friction) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.1; } else { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } } else { ledgeGrab = false; } if (Math.abs(moveRL) > maxRL) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.25; } if (!AttackIsDown()) { AisDown = false; } if (AttackIsDown() && !AisDown) { AisDown = true; gotoBuffer = drawWeapon('pencilDraw'); } else { if (RightIsDown() && _xscale < 0 || LeftIsDown() && _xscale > 0) { if (Math.abs(moveRL) > 6) { runtoslide = true; gotoBuffer = 'Slide'; } else { gotoBuffer = 'Backpeddle'; } } else { if (DownIsDown()) { if (Math.abs(moveRL) < 6) { gotoBuffer = 'Duck'; } else { smokeN = 0; gotoBuffer = 'DownSlide'; } } } } if (_currentframe != 2) { } else { if (CheckBaddieHit(_x, _y, RLx(moveRL), RLy(moveRL))) { } else { if (!this.JumpListener()) { RLStatus = this.RLFunc(false, false, ledgeGrab); if (RLStatus == 'Fall') { } else { if (gotoBuffer != 'nothing') { gotoAndStop(gotoBuffer); } else { tilt += (this._rotation - tilt) / 3; CharStartup._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } } } } } } else { CharStartup.stop(); } }; CharStartup._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 3 { faceTurn = -_xscale; holdFront = false; if (walkLock) { maxRL = 15; } else { if (isCarrying == 'pencil' || sheathing) { maxRL = 15; } else { maxRL = 20; } } if (LeftIsDown() && _xscale > 0 && moveRL > 5 || RightIsDown() && _xscale < 0 && moveRL < -5) { gotoAndStop('Slide'); return false; } gotoBuffer = 'nothing'; onEnterFrame = function () { slopeStuff(); if (moveRL * rotAccel > 0 && isCarrying == 'nothing') { moveRL += rotAccel / 2; } else { moveRL += rotAccel / 3; } if (friction) { RLing = 0.2; } else { RLing = (maxRL + 5 - Math.abs(moveRL)) / 20; } ledgeGrab = false; if (RightIsDown() && moveRL < maxRL * RightIsDown() && faceTurn > 0) { moveRL += RLing * RightIsDown(); } else { if (LeftIsDown() && moveRL > -maxRL * LeftIsDown() && faceTurn < 0) { moveRL -= RLing * LeftIsDown(); } else { if ((Math.abs(moveRL) > 3 || Backpeddle._currentframe > 18) && moveRL != 0) { moveRL -= moveRL / Math.abs(moveRL); } else { moveRL += faceTurn / 400; } if (moveRL != 0 && Math.abs(moveRL) < 10 && Math.abs(_rotation) < 2) { ledgeGrab = true; } } } if (Math.abs(moveRL) > maxRL) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.25; } if (!AttackIsDown()) { AisDown = false; } if (AttackIsDown() && !AisDown) { AisDown = true; gotoBuffer = drawWeapon('pencilDraw'); if (gotoBuffer == 'pencilDraw') { _xscale = faceTurn; duckView = 0; } } else { if (DownIsDown()) { _xscale = (moveRL / Math.abs(moveRL)) * 100; if (Math.abs(moveRL) < 6) { gotoBuffer = 'Duck'; } else { smokeN = 0; gotoBuffer = 'DownSlide'; } } } if (_currentframe != 3) { } else { if (CheckBaddieHit(_x, _y, RLx(moveRL), RLy(moveRL))) { } else { if (EveryFrame(ledgeGrab)) { } else { if (RLStatus == 'Fall') { } else { if (gotoBuffer != 'nothing') { gotoAndStop(gotoBuffer); } else { if (Backpeddle._currentframe < 11) { hairRL = -hairRL; } if (RLStatus == 'Wall') { tilt += (this._rotation / 2 - tilt) / 3; } else { tilt += (this._rotation - tilt) / 3; } } } } } } }; } frame 4 { Run.gotoAndPlay([1, 14, 27][random(3)]); gotoBuffer = 'nothing'; onEnterFrame = function () { if (!_root.Paused && !_root.PauseListener()) { Run.play(); slopeStuff(); if (moveRL * rotAccel > 0) { moveRL += rotAccel; } else { moveRL += rotAccel / 3; } if (friction) { RLing = 0.2; } else { RLing = 2; } if (RightIsDown()) { if (moveRL < 20) { moveRL += RLing; if (moveRL > 20 && moveRL < 20 + RLing) { moveRL = 20; } if (moveRL < (90 + _rotation) / 10 && rotAccel < RLing) { moveRL -= rotAccel; messagePopup('slideSpeedThingR'); } } else { if (friction && _xscale > 0) { runtoslide = true; gotoBuffer = 'Slide'; } } if (moveRL < 0 || _xscale < 0) { runtoslide = true; gotoBuffer = 'Slide'; } } if (LeftIsDown()) { if (moveRL > -20) { moveRL -= RLing; if (moveRL < -20 && moveRL > 20 - RLing) { moveRL = -20; } if (moveRL > -(90 - _rotation) / 10 && rotAccel > RLing) { moveRL -= rotAccel; messagePopup('slideSpeedThingL'); } } else { if (friction && _xscale < 0) { runtoslide = true; gotoBuffer = 'Slide'; } } if (moveRL > 0 || _xscale > 0) { runtoslide = true; gotoBuffer = 'Slide'; } } if (!AttackIsDown()) { AisDown = false; } if (AttackIsDown() && !AisDown) { AisDown = true; gotoBuffer = drawWeapon('pencilDraw'); } else { if (DownIsDown()) { smokeN = 0; gotoBuffer = 'DownSlide'; } else { if (moveRL == 0) { gotoBuffer = 'Idle'; } else { if (!RightIsDown() && !LeftIsDown()) { moveRL -= moveRL / Math.abs(moveRL); runtoslide = true; gotoBuffer = 'Slide'; } else { slideCount = 30; } } } } if (_currentframe != 4) { } else { if (CheckBaddieHit(_x, _y, RLx(moveRL), RLy(moveRL))) { } else { if (EveryFrame()) { } else { if (RLStatus == 'Wall') { runtoslide = true; gotoAndStop('Slide'); } else { if (RLStatus == 'Fall') { } else { if (gotoBuffer != 'nothing') { gotoAndStop(gotoBuffer); } else { if (Math.abs(moveRL) > 25) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.25; } if (Math.abs(moveRL) > 40) { moveRL *= 40 / Math.abs(moveRL); } if (Math.abs(_rotation) > 15) { hairRL = moveRL; hairUD = 0; } tilt += (this._rotation - tilt) / 3; Run._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } } } } } } } else { Run.stop(); } }; Run._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 5 { gotoBuffer = 'nothing'; onEnterFrame = function () { slopeStuff(); if (moveRL * rotAccel > 0 && isCarrying == 'nothing') { moveRL += rotAccel / 2; } else { moveRL += rotAccel / 3; } if (friction) { RLing = 0.2; } else { if (Math.abs(_parent.moveRL) > 18) { RLing = 2; } else { RLing = (maxRL + 5 - Math.abs(moveRL)) / 20; } } if (RightIsDown()) { if (_xscale > 0) { moveRL += RLing * RightIsDown(); gotoBuffer = 'Walk'; } else { gotoBuffer = 'Backpeddle'; } } else { if (LeftIsDown()) { if (_xscale < 0) { moveRL -= RLing * LeftIsDown(); gotoBuffer = 'Walk'; } else { gotoBuffer = 'Backpeddle'; } } else { if (moveRL == 0) { } else { if (Math.abs(moveRL) > RLing) { moveRL -= (moveRL / Math.abs(moveRL)) * RLing; } else { moveRL = 0; } } } } if (!AttackIsDown()) { AisDown = false; } if (_currentframe != 5) { } else { if (EveryFrame(true)) { } else { if (char._currentframe == 12) { if (isCarrying == 'pencil') { gotoAndStop('pencilIdle'); } else { gotoAndStop('Idle'); } } else { if (DownIsDown()) { gotoAndStop('Duck'); } else { if (AttackIsDown() && !AisDown) { AisDown = true; gotoAndStop(drawWeapon('pencilDraw')); tilt += (this._rotation - tilt) / 5; } else { if (RLStatus == 'Wall') { gotoBuffer = 'nothing'; tilt += (this._rotation / 2 - tilt) / 5; } else { if (RLStatus == 'Fall') { } else { if (gotoBuffer != 'nothing') { gotoAndStop(gotoBuffer); } else { tilt += (this._rotation - tilt) / 5; } } } } } } } } char._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); }; char._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 6 { CanSlide = false; loose = false; smokeN = 0; performN = 10; if (TempStill) { b = 3; } gotoBuffer = 'nothing'; onEnterFrame = function () { if (!_root.Paused) { oMoveRL = moveRL; slopeStuff(); if (Math.abs(moveRL + rotAccel * 1) < 40) { moveRL += rotAccel * 1; } else { moveRL *= 40 / Math.abs(moveRL); } if (friction) { RLing = 0.2; } else { RLing = (25 - Math.abs(moveRL)) / 20; } _root.footSlide(_x + RLx(moveRL), _y + RLy(moveRL), moveRL * 4, _rotation, moveRL, friction, this); if (friction) { if (!sliding) { if (Math.abs(moveRL) > 0.2) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.2; } else { moveRL = 0; } } } else { if (sliding) { if (Math.abs(moveRL) > 0.4) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.4; } else { moveRL = 0; } } else { if (Math.abs(moveRL) > 0.75) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.75; } else { moveRL = 0; } } } if (TempStill) { if (b > 0) { --b; } else { TempStill = false; } ledgeGrab = false; } else { if (RightIsDown()) { if (moveRL > -6) { ledgeGrab = false; if (sliding) { moveRL += RLing; if (_xscale > 0) { if ((RLing > rotAccel && moveRL < 15 || !friction) && CharSlide._currentframe == 10) { if (CharSlide.CharBoarding._currentframe > 4) { fromSlide = true; } gotoBuffer = 'Walk'; } } else { if (CharSlide.CharBoarding._currentframe < 6 || _currentframe == 1) { gotoBuffer = 'Backpeddle'; } else { gotoBuffer = 'slideBackpeddle'; } } } else { moveRL += RLing; if (_xscale > 0) { if ((RLing > rotAccel && moveRL < 15 || !friction) && CharSlide._currentframe == 10) { if (CharSlide.CharBoarding._currentframe > 4) { fromSlide = true; } gotoBuffer = 'Walk'; } } else { if (CharSlide.CharBoarding._currentframe < 6 || _currentframe == 1) { gotoBuffer = 'Backpeddle'; } else { gotoBuffer = 'slideBackpeddle'; } } } } else { ledgeGrab = true; moveRL += RLing; moveRL *= 0.95; if (Math.abs(moveRL) < 0.2) { moveRL = 0; } if (CharSlide._currentframe > 5) { CharSlide.gotoAndStop(10); } } } else { if (LeftIsDown()) { if (moveRL < 6) { ledgeGrab = false; if (sliding) { moveRL -= RLing; if (_xscale < 0) { if ((RLing > -rotAccel && moveRL > -15 || !friction) && CharSlide._currentframe == 10) { if (CharSlide.CharBoarding._currentframe > 4) { fromSlide = true; } gotoBuffer = 'Walk'; } } else { if (CharSlide.CharBoarding._currentframe < 6 || _currentframe == 1) { gotoBuffer = 'Backpeddle'; } else { gotoBuffer = 'slideBackpeddle'; } } } else { moveRL -= RLing; if (_xscale < 0) { if ((RLing > -rotAccel && moveRL > -15 || !friction) && CharSlide._currentframe == 10) { if (CharSlide.CharBoarding._currentframe > 4) { fromSlide = true; } gotoBuffer = 'Walk'; } } else { if (CharSlide.CharBoarding._currentframe < 6 || _currentframe == 1) { gotoBuffer = 'Backpeddle'; } else { gotoBuffer = 'slideBackpeddle'; } } } } else { ledgeGrab = true; moveRL -= RLing; moveRL *= 0.95; if (Math.abs(moveRL) < 0.2) { moveRL = 0; } if (CharSlide._currentframe > 5) { CharSlide.gotoAndStop(10); } } } else { if (Math.abs(moveRL) < 15 && Math.abs(_rotation) < 5) { ledgeGrab = true; } else { ledgeGrab = false; } } } } if (performN > 0) { --performN; } else { _root.movePerformed('slide', Math.abs(moveRL)); } if (!AttackIsDown()) { AisDown = false; } if (DownIsDown()) { if (Math.abs(moveRL) > 5) { smokeN = 0; gotoBuffer = 'DownSlide'; } else { gotoBuffer = 'Duck'; } } else { if (AttackIsDown() && !AisDown) { AisDown = true; gotoBuffer = drawWeapon('pencilDraw'); } } if (_currentframe != 6) { } else { if (CheckBaddieHit(_x, _y, RLx(moveRL), RLy(moveRL))) { } else { if (JumpListener()) { } else { RLStatus = this.RLFunc(true, false, ledgeGrab); if (RLStatus == 'Fall') { } else { if (gotoBuffer != 'nothing') { gotoAndStop(gotoBuffer); } else { if (Math.abs(_rotation) > 15) { hairRL = moveRL; hairUD = 0; } tilt += (this._rotation - tilt) / 3; CharSlide._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } } } } } } else { CharSlide.stop(); } }; CharSlide._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 7 { springView = 0; gonnaWallJump = false; hitGround = 100; RLStatus == 'jumping'; AisDown = true; if (walkLock) { maxRL = 10; } else { maxRL = 20; } onEnterFrame = function () { if (moveUD > -10 && CharJump.CharRegJump._currentframe < 8 && CharJump.CharRegJump._currentframe > 1) { CharJump.CharRegJump.play(); } if (Still || TempStill || FloatStill) { if (TempStill && moveUD > 0) { Still = false; TempStill = false; } if (FloatStill && (_y > fromFloatY || RightIsDown() && moveRL < 0 || LeftIsDown() && moveRL > 0)) { FloatStill = false; } if (this.moveUD < 30) { if (FloatUp <= 0 || moveUD > 0) { FloatUp = 0; if (_root.water.hitTest(_x + moveRL, _y + moveUD, true) && this.moveUD > 3) { waterY = _y + moveUD; while (_root.water.hitTest(_x + moveRL, waterY, true)) { waterY -= 5; } moveRL *= 0.925; moveUD *= 0.925; if (waterY < _y && waterY > _y - isTall * 0.75) { moveUD += 1 + (waterY - _y) / 37; } } else { ++moveUD; } } else { --FloatUp; } } else { if (moveUD > 32) { moveUD -= 2; } } } else { if (RightIsDown()) { if (moveRL < -maxRL) { moveRL *= 0.95; } else { if (moveRL < maxRL * 0.6) { if (moveRL <= 0 && RLStatus != 'diving') { ++moveRL; } else { moveRL += 0.5; } } } } if (LeftIsDown()) { if (moveRL > maxRL) { moveRL *= 0.95; } else { if (moveRL > -maxRL * 0.6) { if (moveRL >= 0 && RLStatus != 'diving') { --moveRL; } else { moveRL -= 0.5; } } } } if (moveUD < 30) { if ((!JumpIsDown() || FloatUp <= 0 || moveUD > 0) && FloatUp <= 6) { FloatUp = 0; if (_root.water.hitTest(_x + moveRL, _y + moveUD, true) && this.moveUD > 3) { waterY = _y + moveUD; while (_root.water.hitTest(_x + moveRL, waterY, true)) { waterY -= 5; } moveRL *= 0.925; moveUD *= 0.925; if (waterY < _y && waterY > _y - isTall * 0.75) { moveUD += 1 + (waterY - _y) / 37; } } else { ++moveUD; } } else { --FloatUp; } } } if (Math.abs(moveRL) > maxRL * 0.6) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.1; } if (CharJump._currentframe == 12) { if (CheckBaddieAirPwning(_x, _y, moveRL, moveUD)) { return true; } } else { if (CheckBaddieJumpHit(_x, _y, moveRL, moveUD)) { return true; } } RLStatus = JumpGuide(false, RLStatus, CharJump._currentframe == 12, false, CharJump._currentframe == 12); if (RLStatus == 'wall') { InShellRot = 0; } predictGround(); if (!AttackIsDown()) { AisDown = false; } if (_root.water.hitTest(_x + moveRL, _y - isTall * 0.75, true) && moveUD > 0) { if (CharJump._currentframe == 7 && CharJump.CharCanonBall._currentframe < 24) { CharJump.CharCanonBall.nextFrame(); CharJump.CharCanonBall.nextFrame(); } else { var v3 = 0; while (v3 < 10) { _root.spawnBubble(_x - 30 + random(60), _y - 50 + random(80), 20 + random(40), 0); ++v3; } eRot = -Math.atan2(-moveRL, -moveUD) / 0.0174532925199433; swimRL = Math.sqrt(moveRL * moveRL + moveUD * moveUD); resetJumpStuff(); rotOffset = 0; tilt = 0; swimStatus = 'diving'; smokeAccel = 0; rotAccel = 0; if (CharJump._currentframe == 12) { gotoAndStop('waterRoll'); } else { gotoAndStop('Swim'); } } } else { if (RLStatus) { } else { if (AttackIsDown() && !AisDown && CharJump._currentframe != 9 && !Still) { gotoBuffer = drawWeapon('pencilDrawJump'); if (gotoBuffer != 'nothing') { tilt = 0; smokeRot = 0; gotoAndStop(gotoBuffer); } } else { if (hitGround < 8 && CharJump._currentframe == 7 && CharJump.CharCanonBall._currentframe < 24) { CharJump.CharCanonBall.nextFrame(); CharJump.CharCanonBall.nextFrame(); } } } } tilt += (smokeRot - tilt) / 3; CharJump._rotation = tilt * (_xscale / Math.abs(_xscale)); }; CharJump._rotation = tilt * (_xscale / Math.abs(_xscale)); } frame 8 { Idle.b = 1; smokeN = 5; gotoBuffer = 'nothing'; onEnterFrame = function () { if (!_root.Paused && !_root.PauseListener()) { CharJump.play(); slopeStuff(); if (friction) { RLing = 0.2; } else { RLing = 2; } if (Math.abs(moveRL + rotAccel) < 40) { moveRL += rotAccel; } else { moveRL *= 40 / Math.abs(moveRL); } if (friction || sliding) { if (CharJump._currentframe > 5 && CharJump._currentframe < 11) { CharJump.gotoAndPlay('landToSlide'); } } else { if (RightIsDown() && !sliding) { if (moveRL < -5) { if (CharJump._currentframe > 5 && CharJump._currentframe < 11) { CharJump.gotoAndPlay('landToSlide'); } } else { if (friction && moveRL > 10) { if (CharJump._currentframe > 5 && CharJump._currentframe < 11) { CharJump.gotoAndPlay('landToSlide'); } } else { if (_xscale > 0) { if (CharJump._currentframe < 7) { justLanded = true; alreadyLanded = true; landFrame = CharJump._currentframe; gotoBuffer = 'Walk'; } } else { gotoBuffer = 'Backpeddle'; } } } if (moveRL > 0 || Math.abs(_rotation) >= 2) { ledgeGrab = false; } else { ledgeGrab = true; } } else { if (LeftIsDown() && !sliding) { if (moveRL > 5) { if (CharJump._currentframe > 5 && CharJump._currentframe < 11) { CharJump.gotoAndPlay('landToSlide'); } } else { if (friction && moveRL < -10) { if (CharJump._currentframe > 5 && CharJump._currentframe < 11) { CharJump.gotoAndPlay('landToSlide'); } } else { if (_xscale < 0) { if (CharJump._currentframe < 7) { justLanded = true; alreadyLanded = true; landFrame = CharJump._currentframe; gotoBuffer = 'Walk'; } } else { gotoBuffer = 'Backpeddle'; } } } if (moveRL < 0 || Math.abs(_rotation) >= 2) { ledgeGrab = false; } else { ledgeGrab = true; } } else { if (CharJump._currentframe > 5 && CharJump._currentframe < 11 && Math.abs(moveRL) > 5) { CharJump.gotoAndPlay('landToSlide'); } if (Math.abs(_rotation) < 2 && Math.abs(moveRL) < 10) { ledgeGrab = true; } else { ledgeGrab = false; } } } } if (moveRL == 0) { } else { if (friction) { if (Math.abs(moveRL) > 0.2) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.2; } else { moveRL = 0; } } else { if (sliding) { if (Math.abs(moveRL) > 0.4) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.4; } else { moveRL = 0; } } else { if (Math.abs(moveRL) > 0.75) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.75; } else { moveRL = 0; } } } } if (_currentframe != 8) { } else { if (EveryFrame(true)) { } else { if (RLStatus == 'Fall') { } else { if (gotoBuffer != 'nothing') { gotoAndStop(gotoBuffer); } else { tilt += (this._rotation - tilt) / 3; CharJump._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } } } } } else { CharJump.stop(); } }; tilt += (this._rotation - tilt) / 3; CharJump._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 9 { _root.playSound(CharHurt, _x, 100); isCarrying = 'nothing'; onEnterFrame = function () { _rotation = _rotation * 0.8; if (moveUD < 25) { ++moveUD; if (!(Still || TempStill || FloatStill)) { if (RightIsDown() && moveRL < maxRL * 0.4) { moveRL += 0.5; } if (LeftIsDown() && moveRL > -maxRL * 0.4) { moveRL -= 0.5; } } } fliprot -= 15 * (_xscale / 100); JumpGuide(true); predictGround(); tilt += (smokeRot - tilt) / 3; CharFrontSlam._rotation = (tilt + fliprot) * (_xscale / Math.abs(_xscale)); }; CharFrontSlam._rotation = (tilt + fliprot) * (_xscale / Math.abs(_xscale)); } frame 10 { smokeN = 5; moveRL *= 0.5; onEnterFrame = function () { slopeStuff(); if (Math.abs(moveRL + rotAccel * 1) < 40) { moveRL += rotAccel / 3; } else { moveRL *= 40 / Math.abs(moveRL); } if (sliding) { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } else { if (Math.abs(moveRL) > 1) { moveRL -= moveRL / Math.abs(moveRL); } else { moveRL = 0; } } if (moveRL != 0) { _root.footSlide(_x + RLx(moveRL), _y + RLy(moveRL), moveRL * 4, _rotation, moveRL, friction, this); } RLFunc(); }; } frame 11 { if (yerdown) { CharDuck.gotoAndStop(6); yerdown = false; CharDucking = false; CharUnducking = false; } else { CharDucking = true; CharUnducking = false; } isCarrying = 'nothing'; ++rockOutCounter; if (rockOutCounter > 5) { CharDuck.rockOut.gotoAndPlay(1); } else { CharDuck.rockOut.gotoAndStop('unRock'); } this.ledgeTil = 0; rotter = 0; InShellRot = 0; onEnterFrame = function () { if (CharDuck._currentframe < 4) { if (rockOutCounter > 5) { CharDuck.rockOut.gotoAndPlay(1); } else { CharDuck.rockOut.gotoAndStop('unRock'); } } friction = _root.getFriction(_x, _y); slopeStuff(); if (Math.abs(moveRL + rotAccel) < 40) { moveRL += rotAccel; } else { moveRL *= 40 / Math.abs(moveRL); } if (friction) { RLing = 0.2; } else { RLing = 1; } if (moveRL == 0) { } else { if (Math.abs(moveRL) > RLing / 2) { moveRL -= (moveRL / Math.abs(moveRL)) * (RLing / 1); } else { moveRL = 0; } } if ((DownIsDown() || CharDucking || CheckHead()) && !CharUnducking) { fallView += (300 - fallView) / 10; if (Math.abs(_rotation) < 5) { ledgeGrab = true; } else { ledgeGrab = false; } CharDuck.nextFrame(); if ((Math.abs(moveRL) > 5 || Math.abs(_rotation) > 5) && CharDuck._currentframe == 4) { rockOutCounter = 0; gotoAndStop('FSRoll'); } } else { CharUnducking = true; CharDuck.prevFrame(); if (CharDuck._currentframe == 1) { _alpha = 100; isTall = 50; gotoAndStop('Idle'); } ledgeGrab = false; } RLFunc(false, true, ledgeGrab); if (!AttackIsDown()) { AisDown = false; } if (CheckBaddieHit(_x, _y, RLx(moveRL), RLy(moveRL))) { } else { if (CheckHead()) { rockOutCounter = 0; gotoAndStop('FSRoll'); } else { if (CharDuck._currentframe > 2 && LedgeDownIt()) { } else { if (AttackIsDown() && !AisDown) { AisDown = true; gotoBuffer = drawWeapon('pencilDraw'); if (gotoBuffer != 'nothing') { nextSwipe = 1; isTall = 50; gotoAndStop(gotoBuffer); } } else { JumpListener(); } } } } tilt += (this._rotation - tilt) / 3; CharDuck._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); }; CharDuck._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 12 { rotter = 0; TempStill = 3; smokeN = 5; performN = 50; InShellRot = _rotation; FSRoller._rotation = (InShellRot - _rotation) * (_xscale / 100); isTall = 25; _root.rollLoop.start(0, 1000); _root.updateSound('rollLoop', _x, 0); onEnterFrame = function () { friction = _root.getFriction(_x, _y); slopeStuff(); moveRL += rotAccel; if (moveRL != 0) { moveRL -= moveRL / Math.abs(moveRL) / 10; } if (friction) { var v3 = moveRL * 2; rotter += (v3 - rotter) / 20; } else { rotter = moveRL * 2; } _root.footSlide(this._x, this._y, this._xscale, this._rotation, this.moveRL, this.friction, this); _root.updateSound('rollLoop', _x, Math.abs(moveRL * 4)); _root.movePerformed('roll', Math.abs(moveRL)); if (DownIsDown() && (Math.abs(_rotation) > 5 || Math.abs(moveRL) > 1)) { if (Math.abs(_rotation) < 5) { ledgeGrab = true; } else { ledgeGrab = false; } FSRoller.nextFrame(); InShellRot += rotter; FSRoller._rotation = (InShellRot - _rotation) * (_xscale / 100); } else { ledgeGrab = false; if (TempStill > 0) { FSRoller.nextFrame(); InShellRot += rotter; FSRoller._rotation = (InShellRot - _rotation) * (_xscale / 100); } else { FSRoller._rotation -= FSRoller._rotation / 3; if (FSRoller._currentframe > 1) { FSRoller.prevFrame(); FSRoller.prevFrame(); } else { yerdown = true; gotoAndStop('Duck'); } } } if (CheckHead()) { if (moveRL == 0) { moveRL = _xscale / 200; } if (Math.abs(moveRL) < 10) { moveRL += (moveRL / Math.abs(moveRL)) * 0.25; } TempStill = 10; if (!CheckBaddiePwning(_x, _y, RLx(moveRL), RLy(moveRL))) { RLFunc(false, true, false); } } else { if (TempStill > 0) { --TempStill; } if (!JumpListener()) { if (!CheckBaddiePwning(_x, _y, RLx(moveRL), RLy(moveRL))) { if (TempStill > 0) { --TempStill; } if (!JumpListener()) { RLFunc(false, true, ledgeGrab); } } } } if (_currentframe != 12) { _root.rollLoop.stop(); } tilt += (this._rotation - tilt) / 3; }; } frame 13 { if (moveRL == 0) { RL = _xscale / 100; } else { RL = moveRL / Math.abs(moveRL); } hairRL = 0; gelHair(); onEnterFrame = function () { if (this.moveRL > 0) { if (this.tempLrL > this.spread) { this.tempLrL = this.spread; } } else { if (this.moveRL < 0) { if (this.tempRrL < -this.spread) { this.tempRrL = -this.spread; } } } if (RL > 0) { if (!(RightIsDown() && (_root.tehwallz.hitTest(this._x + this.spread + 5, this._y - 10, true) || this.Standing() && _root.tehwallz.hitTest(this._x + this.spread + 5, this._y - 50, true)))) { gotoAndStop('Idle'); } else { tilt += (-(_rotation / 3) * RL - lean._rotation) / 3; } } else { if (!(LeftIsDown() && (_root.tehwallz.hitTest(this._x - (this.spread + 5), this._y - 10, true) || this.Standing() && _root.tehwallz.hitTest(this._x - (this.spread + 5), this._y - 50, true)))) { lean._rotation += -lean._rotation / 5; gotoAndStop('Idle'); } else { tilt += (-(_rotation / 3) * RL - lean._rotation) / 3; } } if (JumpListener()) { wallJumpFell = true; } else { RLFunc(); } CheckBaddieHit(_x, _y, RLx(moveRL), RLy(moveRL)); lean._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); }; lean._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 14 { launch = 0; step = 0; jumpAgainN = 0; downward = true; fliprot = 0; CheckBaddieHit(_x, _y, RLx(moveRL), RLy(moveRL)); if (quickStomp) { quickStomp = false; baddie = _root.BLayer['Baddie' + aBadOn]; smokeRot = 0; if (JumpIsDown() || DownIsDown()) { quickStomp = false; if (Math.abs(moveRL) < 6) { canSpin = true; } _rotation = 0; _root.movePerformed('heavystomp', baddie.worth, baddie.ItIs); JumpFunc(baddie.Thrust * 1.5, false, false, false, true); } else { _root.movePerformed('quickstomp', baddie.worth, baddie.ItIs); _rotation = 0; moveRL += baddie.moveRL / 2; JumpFunc(baddie.Thrust, false, false, false, true); TempStill = false; Still = false; } } else { if (JumpPadLanded) { _root.movePerformed('springpad'); moveRL = 0; onSpring = _root.BLayer['JumpPad' + aBadOn]; var yspringy = 4; thrustOn = onSpring.Thrust / 2; onSpring.spring = -onSpring.Thrust / 2; offsetX = _x - (onSpring._x + onSpring.springHeight * Math.cos((_rotation - 90) * 0.0174532925199433)); offsetY = offsetX * Math.sin(_rotation * 0.0174532925199433); if (onSpring.canRot) { if (Math.abs(onSpring._rotation - onSpring.launchAngle) > 180) { if (onSpring.launchAngle > onSpring._rotation) { onSpring.launchAngle -= 360; } else { onSpring.launchAngle += 360; } } } var springy = 10 - Math.abs(onSpring.launchAngle) / 10; if (onSpring.launchAngle > 5) { _xscale = 100; } if (onSpring.launchAngle < -5) { _xscale = -100; } onEnterFrame = function () { CheckBaddieHit(_x, _y, RLx(moveRL), RLy(moveRL)); if (Math.abs(offsetX) > 5) { offsetX -= offsetX / 5; offsetY = offsetX * Math.sin(_rotation * 0.0174532925199433); } onSpring.spring += (thrustOn * yspringy - onSpring.springHeight) / springy; onSpring.springHeight += onSpring.spring; if (onSpring.springHeight < thrustOn * yspringy) { downward = false; } onSpring.springing._yscale = onSpring.springHeight * 1.666666666666667; onSpring.surface._y = -onSpring.springHeight; if (onSpring.canRot) { onSpring._rotation += (onSpring.launchAngle - onSpring._rotation) / 10; _rotation = onSpring._rotation; } if (onSpring.spring < thrustOn && onSpring.springHeight > thrustOn * yspringy) { _root.CheckTimeSpring(onSpring); _root.playSound('Spring', _x, 100); onSpring.onEnterFrame = _root.JumpPadReleasedEnterFrame; onSpring.springy = springy; onSpring.yspringy = yspringy; canSpin = true; FloatUp = onSpring.FloatUp; TempStill = onSpring.tempstill; JumpFunc(onSpring.Thrust); Still = onSpring.still; } else { _x = onSpring._x + offsetX + onSpring.springHeight * Math.cos((_rotation - 90) * 0.0174532925199433); _y = onSpring._y + offsetY + onSpring.springHeight * Math.sin((_rotation - 90) * 0.0174532925199433); this.centerX = this._x + this.centerReach * Math.sin(this._rotation * 0.0174532925199433); this.centerY = this._y - this.centerReach * Math.cos(this._rotation * 0.0174532925199433); } tilt += (_rotation - tilt) / 3; CharBaddieLand._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); }; onEnterFrame(); } else { smokeRot = 0; baddie = _root.BLayer['Baddie' + aBadOn]; var springy = 4; var yspringy = 5.5; if (baddie.isWearing != 'nothing') { _rotation = 0; baddie.spring += (baddie.spread * 2 - baddie.ycharup) / springy; baddie.ycharup += baddie.spring; baddie._yscale = (baddie.ycharup / baddie.spread * 2) * 100; baddie._xscale = (100 - baddie._yscale + 100) * (baddie._xscale / Math.abs(baddie._xscale)) * 1.3; angle = baddie._rotation * Math.PI / 180; ex = baddie._x - (_x - moveRL); ey = baddie._y - (_y - moveUD); ex1 = Math.cos(angle) * ex + Math.sin(angle) * ey; ey1 = Math.cos(angle) * ey - Math.sin(angle) * ex; if (ex1 > 0) { baddie.moveRL = 25; } else { baddie.moveRL = -25; } ++this.combo; this.comboSome += 39; if (this.combo > 1) { this.gNHD = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('messagePopup', 'combo!' + this.gNHD, this.gNHD, {'_x': baddie._x + 40, '_y': baddie._y - 30, 'smoke': this.combo + '!'}); } _y = baddie._y - baddie.ycharup; this.nowSpeed = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); if (JumpIsDown() || DownIsDown()) { moveRL -= (baddie.centerX - _x) / 5; JumpFunc(baddie.Thrust * 1.5, false, false, false, true); } else { moveRL -= (baddie.centerX - (_x - moveRL)) / 3; JumpFunc(baddie.Thrust - baddie.moveUD / 2, false, false, false, true); } baddie.coma = 15; fromChar._alpha = 80; baddie.gotoAndStop('stunland'); } else { if (JumpIsDown() || DownIsDown()) { _root.movePerformed('heavystomp', baddie.worth, baddie.ItIs); onEnterFrame = function () { CheckBaddieHit(_x, _y, RLx(moveRL), RLy(moveRL)); _rotation = _rotation * 0.8; baddie.spring += (baddie.spread * 2 - baddie.ycharup) / springy; baddie.ycharup += baddie.spring; baddie._yscale = (baddie.ycharup / baddie.spread * 2) * 100; baddie._xscale = (100 - baddie._yscale + 100) * (baddie._xscale / Math.abs(baddie._xscale)) * 1.3; if (-baddie.spring < baddie.Thrust && baddie._yscale > 100 || quickStomp) { baddie.springy = springy; baddie.yspringy = yspringy; baddie.hurtPower = 50; if (baddie.health > 0) { if (baddie.health - baddie.hurtPower > 0) { baddie.health -= baddie.hurtPower; } else { baddie.health = 0; _root.StompBaddie(baddie.ItIs, baddie._x); } } baddie.onEnterFrame = _root.stompedEnterFrame; _rotation = 0; if (RightIsDown()) { moveRL = 5; } else { if (LeftIsDown()) { moveRL = -5; } else { moveRL = 0; } } moveRL = (baddie.moveRL + moveRL) / 2; if (Math.abs(moveRL) < 6) { canSpin = true; } JumpFunc(baddie.Thrust * 1.5); ++this.combo; this.comboSome += 39; if (this.combo > 1) { this.gNHD = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('messagePopup', 'combo!' + this.gNHD, this.gNHD, {'_x': baddie._x + 40, '_y': baddie._y - 30, 'smoke': this.combo + '!'}); } baddie.moveUD = -10; baddie.FloatUp = 4; delete baddie; } else { _y = baddie._y - baddie.ycharup; this.centerY = this._y - this.isTall / 2; } tilt += (smokeRot - tilt) / 3; CharBaddieLand._rotation = tilt * (_xscale / Math.abs(_xscale)); }; } else { _root.movePerformed('quickstomp', baddie.worth, baddie.ItIs); ++this.combo; this.comboSome += 39; if (this.combo > 1) { this.gNHD = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('messagePopup', 'combo!' + this.gNHD, this.gNHD, {'_x': baddie._x + 40, '_y': baddie._y - 30, 'smoke': this.combo + '!'}); } moveRL += baddie.moveRL / 2; JumpFunc(baddie.Thrust - baddie.moveUD / 2); if (_x > baddie.centerX) { baddie.moveRL = -5; } else { baddie.moveRL = 5; } baddie.moveUD = -10; baddie.FloatUp = 4; baddie._yscale += baddie.spring; _y = baddie._y - baddie.ycharup; baddie.springy = springy; baddie.yspringy = yspringy; baddie.dead = false; baddie.hurtPower = 20; if (baddie.health > 0) { if (baddie.health - baddie.hurtPower > 0) { baddie.health -= baddie.hurtPower; } else { baddie.health = 0; _root.StompBaddie(baddie.ItIs, baddie._x); } } baddie.onEnterFrame = _root.stompedEnterFrame; TempStill = false; Still = false; } } } } tilt += (smokeRot - tilt) / 3; CharBaddieLand._rotation = tilt * (_xscale / Math.abs(_xscale)); } frame 15 { hairRL = 0; delete onEnterFrame; stop(); } frame 16 { if (hairRL > 0) { hairGel = 13; } else { if (hairRL < 0) { hairGel = 35; } } hairRL = 0; onEnterFrame = function () { if (_x < _root.InteractLayer['Door' + doorInto]._x) { _x = _x + 4; WraptoGround(true, false); } if (_x > _root.InteractLayer['Door' + doorInto]._x) { _x = _x - 4; WraptoGround(true, false); } if (Math.abs(_x - _root.InteractLayer['Door' + doorInto]._x) < 4) { _x = _root.InteractLayer['Door' + doorInto]._x; } }; } frame 17 { onEnterFrame = function () { moveRL *= 0.8; if (moveUD < 35) { ++moveUD; } if (_root.tehwallz.hitTest(_x, _y + moveUD, true)) { JumpLand(true); } else { _x = _x + moveRL; _y = _y + moveUD; } }; } frame 18 { RisDown = true; LisDown = true; wallFall = false; fallCountR = 0; fallCountL = 0; fallView = _root.CharYPoint - _y; eXscale = onWall * 100; performN = 0; isCarrying = 'nothing'; if (_root.surface.hitTest(_x, _y, true)) { _xscale = onWall * 100; } else { if (UpIsDown() && moveUD > -10 && canWallRun) { canWallRun = false; _xscale = -onWall * 100; moveUD = 0; CharWallJump.gotoAndPlay('wallLandToHop'); } else { if (onWall * _xscale < 0) { if (moveUD < -4) { CharWallJump.gotoAndPlay('wallRun'); } else { CharWallJump.gotoAndPlay('wallFrontLand'); } } } } hairRL = _xscale / 10; gelHair(); hairRL = 0; onEnterFrame = function () { slippery = _root.getFriction(_x, _y); if (onWall > 0 && RightIsDown()) { if (fallCountR < 6) { fallCountR += 2; smokeRot = fallCountR * 6; } else { wallFall = true; } } else { if (fallCountR > 0) { fallCountR -= 0.5; smokeRot = fallCountR * 6; } else { smokeRot *= 0.8; } } if (onWall < 0 && LeftIsDown()) { if (fallCountL < 6) { fallCountL += 2; smokeRot = -fallCountL * 6; } else { wallFall = true; } } else { if (fallCountL > 0) { fallCountL -= 0.5; smokeRot = -fallCountL * 6; } else { smokeRot *= 0.8; } } _x = wallJumpX + onWall * 13 + smokeRot / 5; centerX = wallJumpX + onWall * 13 + smokeRot / 5; _root.CharYPoint = _y; if (!_root.tehwallz.hitTest(_x + 25, _y + moveUD - 10, true) && !_root.tehwallz.hitTest(_x - 25, _y + moveUD - 10, true)) { if (!slippery) { wallJumpFell = true; wallFellY = _y; TempStill = true; } JumpFunc(-moveUD); } else { if (wallFall) { if (fallCountR >= 6) { moveRL = 4; } else { if (fallCountL >= 6) { moveRL = -4; } } wallJumpFell = true; canWallRun = true; wallFellY = _y; gotoAndStop(7); if (moveUD > -2) { this.CharJump.gotoAndStop(1); } else { if (_xscale * onWall < 0) { moveRL = onWall * 3; TempStill = true; if (moveUD > -5) { moveUD = -5; } FloatUp = 5; this.CharJump.gotoAndStop(11); } else { this.CharJump.gotoAndStop(1); CharJump.CharRegJump.gotoAndPlay('felled'); _xscale = eXscale; } } } else { if (!JumpIsDown()) { this.SisDown = false; } if (JumpIsDown() && !this.SisDown) { SisDown = true; canWallRun = true; Still = false; TempStill = true; _root.playSound('CharJump', _x, 100); _root.movePerformed('walljump'); this.gotoAndStop('Jump'); if (DownIsDown()) { _xscale = eXscale; moveRL = eXscale / 10; FloatUp = 0; } else { if (UpIsDown()) { moveRL = onWall * 6; moveUD = -15; if (FloatUp < 6) { FloatUp = 6; } if (_xscale * onWall < 0) { this.CharJump.gotoAndStop(11); } else { this.CharJump.gotoAndStop(1); _xscale = eXscale; } } else { if (_xscale * onWall < 0) { if (RightIsDown() && onWall > 0 || LeftIsDown() && onWall < 0) { moveRL = onWall * 16; if (FloatUp < 0) { FloatUp = 0; } this.CharJump.gotoAndStop(10); _xscale = eXscale; } else { if (moveUD < -6) { moveRL = onWall * 10; if (FloatUp < 6) { FloatUp = 6; } this.CharJump.gotoAndStop(11); } else { moveRL = onWall * 10; if (FloatUp < 4) { FloatUp = 4; } this.CharJump.gotoAndStop(10); _xscale = eXscale; } } } else { if (RightIsDown() && onWall > 0 || LeftIsDown() && onWall < 0) { moveRL = onWall * 16; if (FloatUp < 0) { FloatUp = 0; } this.CharJump.gotoAndStop(4); } else { moveRL = onWall * 10; if (FloatUp < 4) { FloatUp = 4; } this.CharJump.gotoAndStop(4); } } if (moveUD > -13) { moveUD = -13; } } } } else { if (moveUD < 0) { if (FloatUp <= 0) { FloatUp = 0; if (slippery) { moveUD += 0.25; } else { moveUD += 0.5; } } else { if (slippery) { FloatUp -= 0.25; } else { FloatUp -= 0.5; } } } else { if (wallJumpTimer > 0) { --wallJumpTimer; moveUD = 0; } else { if (slippery) { if (moveUD < 14) { moveUD += 0.4; } else { if (moveUD > 8.5) { moveUD -= 0.5; } else { moveUD = 14; } } } else { if (moveUD < 8) { moveUD += 0.2; } else { if (moveUD > 9) { moveUD -= 1; } else { moveUD = 8; } } } } } if (!slippery && onWall * _xscale > 0) { if (smokeN > 0) { --smokeN; } else { smokeN = 9; tempScale = Math.abs(moveUD) * 10; if (tempScale < 50 && moveUD != 0) { tempScale = 30; } eDepth = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('smokeFX', 'smokeFX' + eDepth, eDepth, {'_x': wallJumpX - onWall * 10, '_y': _y - 20, '_rotation': onWall * 90, '_xscale': tempScale, '_yscale': tempScale}); } } } if (CheckBaddieJumpHit(centerX, centerY + isTall / 2, moveRL, moveUD)) { } else { if (JumpGuide() == 'Bounce') { wallJumpFell = true; wallFellY = _y; gotoAndStop('Jump'); } } } } if (Math.abs(this.tilt - this.smokeRot) > 180) { if (this.tilt > 0) { this.tilt -= 360; } else { this.tilt += 360; } } this.tilt += (this.smokeRot - this.tilt) / 2; this.CharWallJump._rotation = tilt * (_xscale / Math.abs(_xscale)); }; this.CharWallJump._rotation = tilt * (_xscale / Math.abs(_xscale)); } frame 20 { onEnterFrame = function () { _x = _x + _xscale * 0.02; _y = _y - 3; centerX = _x; centerY = _y - isTall / 2; char._x *= 0.5; char._y *= 0.5; }; if (moveUD < -6) { _x = _x + _xscale * 0.12; _y = _y - 18; char.gotoAndPlay('quickHop'); } else { hairRL = 0; } } frame 21 { moveRL = 0; moveUD = 0; _alpha = 100; _root.PlaceCharBump(_x, _y, _rotation); onEnterFrame = function () { if (!_root.Paused && !_root.PauseListener()) { } if (_root.BackgroundVolume > 0) { _root.BackgroundVolume -= 5; _root.BackgroundMusic.setVolume(_root.BackgroundVolume); } }; } frame 22 { delete onEnterFrame; } frame 24 { hairRL = 0; DisDown = true; onEnterFrame = function () { if (!_root.Paused) { if (!JumpIsDown()) { SisDown = false; } if (!DownIsDown()) { DisDown = false; } this.fallView += (100 - this.fallView) / 10; _root.CharYPoint = _y; if (JumpIsDown()) { if (!SisDown) { SisDown = true; Still = false; TempStill = false; FloatUp = 6; JumpFunc(12); _root.playSound('CharJump', _x, 100); } } else { if (DownIsDown()) { if (!DisDown) { Still = false; TempStill = false; var v3 = 0; while (v3 < 6) { if (!_root.testAll(_x - (_xscale / 100) * 40, _y + 1, true)) { _y = _y + 1; ++centerY; } ++v3; } JumpFunc(0); } } else { if (UpIsDown() && !_root.tehwallz.hitTest(_x + _xscale / 2, _y - 100, true) && !_root.tehground.hitTest(_x + _xscale / 2, _y - 100, true)) { gotoAndStop('LedgeUp'); } } } } }; } frame 25 { moveRL = 0; moveUD = 0; steps = CharLedge._totalframes - 2; b = 0; onEnterFrame = function () { if (!this.JumpIsDown()) { this.SisDown = false; } if (CharLedge._currentframe == 11 && (RightIsDown() && _xscale > 0 || LeftIsDown() && _xscale < 0)) { for (;;) { if (!(_root.testWallzAndPlatz(_x + spread * 2, _y) || _root.testWallzAndPlatz(_x - spread * 2, _y))) break; _y = _y - 1; ++fallView; } fromLedge = true; gotoAndStop('Walk'); } else { if (this.JumpIsDown() && !this.SisDown) { this.SisDown = true; while (this.tehwallzSuperTest(this.spread + 2, 0)) { this._x -= _xscale / 100; } this.FloatUp = 6; _root.playSound('CharJump', this._x, 100); this.JumpFunc(12, false, false, false); } else { ++b; if (b < steps + 1) { _x = _x + (25 / steps) * (_xscale / 100); _y = _y - 60 / steps; centerX = _x; centerY = _y - isTall / 2; CharLedge._x -= 25 / steps; CharLedge._y += 60 / steps; _root.CharYPoint = _y; } } } }; } frame 26 { if (moveRL == 0) { LedgeDownHow.gotoAndStop(1); i = 25; } else { if (!DownIsDown() || Math.abs(moveRL) < 5) { LedgeDownHow.gotoAndStop(3); LedgeDownHow._x += 25; i = 0; _root.movePerformed('slidingledgegrab'); } else { LedgeDownHow.gotoAndStop(2); LedgeDownHow._x += 25; i = 0; } } steps = LedgeDownHow.CharLedge._totalframes - 2; exs = _xscale / 100; b = 0; DownIsDownIsDown = true; onEnterFrame = function () { ++b; if (!DownIsDown()) { DownIsDownIsDown = false; } if (DownIsDown() && !DownIsDownIsDown && moveRL != 0) { while (this.tehwallzSuperTest(this.spread + 20, 0)) { this._x -= _xscale / 100; } moveRL *= 0.5; JumpFunc(0); } else { if (b < steps + 1) { if (moveRL != 0) { if (JumpListener()) { while (this.tehwallzSuperTest(this.spread + 20, 0)) { this._x -= _xscale / 100; } moveRL *= 0.25; return true; } } if (b < 4) { LedgeDownHow._x += (ledgeTil * exs + i) / 3; } if (_root.testAll(_x + ledgeTil - exs * 20, _y, true)) { moveRL = 0; moveUD = 0; gotoAndStop('Idle'); RLFunc(); } moveRL *= 0.95; _x = _x + ledgeTil / steps; _y = _y + 60 / steps; centerX = _x; centerY = _y - isTall / 2; LedgeDownHow._x -= (ledgeTil / steps) * exs; LedgeDownHow._y -= 60 / steps; _root.CharYPoint = _y; this.fallView += (100 - this.fallView) / 10; } else {} } }; } frame 27 { if (_root.InteractLayer.Cannon.masterAim == undefined) { tempAim = 0; } else { tempAim = _root.InteractLayer.Cannon.masterAim; } masterAim = tempAim; onEnterFrame = function () { if (RightIsDown() && tempAim < masterAim + 30) { tempAim += 2; } if (LeftIsDown() && tempAim > masterAim - 30) { tempAim -= 2; } if (tempAim > 20) { _xscale = 100; } else { if (tempAim < -20) { _xscale = -100; } } _rotation = _rotation + (tempAim - _rotation) / 10; _root.InteractLayer.Cannon.Barrel._rotation = _rotation; if (JumpIsDown()) { if (tempAim < 0) { _xscale = -100; } else { _xscale = 100; } _root.InteractLayer.Cannon.Barrel.gotoAndPlay('fire!'); InCannon.gotoAndPlay('fire!'); onEnterFrame = function () { _rotation = _rotation + (tempAim - _rotation) / 10; _root.InteractLayer.Cannon.Barrel._rotation = _rotation; }; } }; } frame 28 { onEnterFrame = function () { if (RightIsDown() && moveRL < 6) { if (movevRL < 0) { moveRL *= 0.95; } moveRL += 0.5; } if (LeftIsDown() && moveRL > -6) { if (moveRL > 0) { moveRL *= 0.95; } moveRL -= 0.5; } if (this.moveUD < 35) { ++moveUD; } CheckBaddieHit(_x, _y, RLx(moveRL), RLy(moveRL)); JumpGuide(); if (Math.abs(_rotation) > 20) { Fly._rotation = (-Math.atan2(this.moveRL, this.moveUD) / 0.0174532925199433 - _rotation - 180) * (_xscale / 100); } else { if (moveUD < 5) { this._rotation *= 0.8; } else {} } }; } frame 29 { hairUD = 0; isCarrying = 'nothing'; onEnterFrame = function () { if (!_root.Paused && !_root.PauseListener()) { if (RightIsDown()) { if (moveRL < 7) { ++moveRL; } if (moveRL > 3) { _xscale = 100; } } if (LeftIsDown()) { if (moveRL > -7) { --moveRL; } if (moveRL < -3) { _xscale = -100; } } if (!_root.tehhangz.hitTest(_x + moveRL, _y - 50, true) || _root.tehwallz.hitTest(_x + moveRL + spread, _y - 50, true) || _root.tehwallz.hitTest(_x + moveRL - spread, _y - 50, true)) { var v2 = 0; while (v2 < Math.abs(moveRL) * 2) { if (_root.tehhangz.hitTest(_x + mRL(), _y - 50, true) && !_root.tehwallz.hitTest(_x + mRL() + spread, _y - 50, true) && !_root.tehwallz.hitTest(_x + mRL() - spread, _y - 50, true)) { _x = _x + mRL(); } moveRL = 0; ++v2; } } if (moveRL == 0) { if (CharHang._currentframe > 105) { CharHang.gotoAndPlay(36); } } else { if (!RightIsDown() && !LeftIsDown()) { if (Math.abs(moveRL) < 1) { moveRL = 0; } else { moveRL -= moveRL / Math.abs(moveRL); } } if (Math.abs(moveRL) > 7) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.25; } if (CharHang._currentframe < 106 && Math.abs(moveRL) > 1) { CharHang.gotoAndPlay(106); } } hairRL = moveRL; _x = _x + moveRL; centerX = _x; v2 = 0; while (v2 < 20) { if (!_root.tehhangz.hitTest(_x, _y - 62, true) && _root.tehhangz.hitTest(_x, _y - 42, true)) { _y = _y + 1; } if (_root.tehhangz.hitTest(_x, _y - 60, true)) { _y = _y - 1; } ++v2; } centerY = _y - isTall / 2; _root.CharYPoint = _y + 75; if (!JumpIsDown()) { SisDown = false; } if (JumpIsDown() && !SisDown) { SisDown = true; Still = false; TempStill = false; FloatUp = 6; _root.playSound('CharJump', _x, 100); JumpFunc(12); } if (DownIsDown()) { Still = false; TempStill = false; _y = _y + 6; centerY = _y - isTall / 2; JumpFunc(0); } CheckBaddieHit(_x, _y, RLx(moveRL), RLy(moveRL)); CharHang.play(); } else { CharHang.stop(); } }; } frame 30 { FSRoller.stop(); onEnterFrame = function () {}; } frame 31 { hairRL = moveRL; gelHair(); CharDucking = true; CharUnducking = false; performN = 10; if (yerdown) { CharDuck.gotoAndStop(6); yerdown = false; } isCarrying = 'nothing'; _root.slideLoop.start(0, 1000); _root.updateSound('slideLoop', _x, 0); onEnterFrame = function () { slopeStuff(); if (Math.abs(moveRL + rotAccel) < 40) { moveRL += rotAccel; } else { moveRL *= 40 / Math.abs(moveRL); } _root.footSlide(_x + RLx(moveRL), _y + RLy(moveRL), moveRL * 4, _rotation, moveRL, friction, this); i = 0; if (friction) { if (Math.abs(moveRL) > 0.1) { moveRL -= moveRL / Math.abs(moveRL) / 10; } else { moveRL = 0; } } else { if (Math.abs(moveRL) > 0.5) { moveRL -= moveRL / Math.abs(moveRL) / 2; } else { moveRL = 0; } } _root.updateSound('slideLoop', _x, Math.abs(moveRL * 4)); if (CheckHead()) { if (!CheckBaddiePwning(_x, _y, RLx(moveRL), RLy(moveRL))) { RLStatus = RLFunc(true, false, DownIsDown() && !CharUnducking && Math.abs(_rotation) < 5); if (RLStatus == 'ledgeGrab' || RLStatus == 'Fall') { } else { if (Math.abs(moveRL) < 20) { CharDuck.play(); } else { if (moveRL * _xscale < 0) { isTall = 25; gotoAndStop('FSRoll'); } } if (CharDuck._currentframe < 7) { CharDuck.nextFrame(); } } } } else { if (JumpListener()) { } else { if (!CheckBaddiePwning(_x, _y, RLx(moveRL), RLy(moveRL))) { RLStatus = RLFunc(true, false, DownIsDown() && !CharUnducking && Math.abs(_rotation) < 5); if (RLStatus == 'ledgeGrab' || RLStatus == 'Fall') { } else { if (Math.abs(moveRL) < 5) { CharDuck.play(); } else { if (moveRL * _xscale < 100) { isTall = 25; gotoAndStop('FSRoll'); } } if (CharDuck._currentframe < 8) { _root.movePerformed('frontslide', Math.abs(moveRL)); if (RLStatus == 'Wall') { CharDuck.gotoAndPlay(9); } if ((DownIsDown() || CharDucking) && !CharUnducking) { if (CharDuck._currentframe < 7) { CharDuck.nextFrame(); } } else { CharUnducking = true; CharDuck.prevFrame(); if (CharDuck._currentframe == 1) { runtoslide = true; gotoAndStop('Slide'); CharSlide.gotoAndStop(10); } } } } } } } if (_currentframe != 31) { _root.slideLoop.stop(); } if (Math.abs(this.tilt - this._rotation) > 180) { if (this.tilt > 0) { this.tilt -= 360; } else { this.tilt += 360; } } tilt += (_rotation - tilt) / 3; CharDuck._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); }; tilt += (_rotation - tilt) / 3; CharDuck._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 32 { onEnterFrame = function () { false; }; } frame 33 { hairRL = 0; moveRL = 0; onEnterFrame = function () { if (Math.abs(_x - targetX) > 5) { if (_x < targetX) { _x = _x + 5; } if (_x > targetX) { _x = _x - 5; } } else { _x = targetX; _xscale = 100; delete onEnterFrame; } }; } frame 34 { moveRL *= 0.8; FloatUp = 5; _x = _x + 15 * Math.cos((_rotation - 90) * 0.0174532925199433); _y = _y + 15 * Math.sin((_rotation - 90) * 0.0174532925199433); isCarrying = 'nothing'; onEnterFrame = function () { if (RightIsDown() && moveRL < 8) { if (moveRL < 0) { ++moveRL; } else { moveRL += 0.5; } } if (LeftIsDown() && moveRL > -8) { if (moveRL > 0) { --moveRL; } else { moveRL -= 0.5; } } if (this.moveUD < 25) { if (FloatUp <= 0 || moveUD > 0) { FloatUp = 0; moveUD += 1; } else { --FloatUp; } } _rotation = _rotation * 0.9; JumpGuide(false, false, true, false); predictGround(); if (Math.abs(_rotation) > 15) { hairRL = moveRL; hairUD = 0; } this.tilt += (this._rotation - this.tilt) / 3; this.CharKick._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); }; this.CharKick._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 35 { faceTurn = -_xscale; holdFront = false; if (walkLock) { maxRL = 15; } else { if (isCarrying == 'pencil' || sheathing) { maxRL = 15; } else { maxRL = 20; } } if (LeftIsDown() && _xscale > 0 && moveRL > 5 || RightIsDown() && _xscale < 0 && moveRL < -5) { gotoAndStop('Slide'); return false; } gotoBuffer = 'nothing'; onEnterFrame = function () { slopeStuff(); if (moveRL * rotAccel > 0 && isCarrying == 'nothing') { moveRL += rotAccel / 2; } else { moveRL += rotAccel / 3; } if (friction) { RLing = 0.2; } else { RLing = (maxRL + 5 - Math.abs(moveRL)) / 20; } ledgeGrab = false; if (RightIsDown() && moveRL < maxRL * RightIsDown() && faceTurn > 0) { moveRL += RLing * RightIsDown(); } else { if (LeftIsDown() && moveRL > -maxRL * LeftIsDown() && faceTurn < 0) { moveRL -= RLing * LeftIsDown(); } else { if ((Math.abs(moveRL) > 3 || Backpeddle._currentframe > 18) && moveRL != 0) { moveRL -= moveRL / Math.abs(moveRL); } else { moveRL += faceTurn / 400; } if (moveRL != 0 && Math.abs(moveRL) < 10 && Math.abs(_rotation) < 2) { ledgeGrab = true; } } } if (Math.abs(moveRL) > maxRL) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.25; } if (!AttackIsDown()) { AisDown = false; } if (AttackIsDown() && !AisDown) { AisDown = true; _xscale = faceTurn; duckView = 0; gotoBuffer = drawWeapon('pencilDraw'); } else { if (DownIsDown()) { _xscale = (moveRL / Math.abs(moveRL)) * 100; if (Math.abs(moveRL) < 6) { gotoBuffer = 'Duck'; } else { gotoBuffer = 'DownSlide'; } } } if (_currentframe != 35) { } else { if (CheckBaddieHit(_x, _y, RLx(moveRL), RLy(moveRL))) { } else { if (EveryFrame(ledgeGrab)) { } else { if (gotoBuffer != 'nothing') { gotoAndStop(gotoBuffer); } } } } if (Backpeddle._currentframe < 11) { hairRL = -hairRL; } if (RLStatus == 'Wall') { tilt += (this._rotation / 2 - tilt) / 3; } else { tilt += (this._rotation - tilt) / 3; } Backpeddle._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); }; Backpeddle._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 36 { shouldRot = eRot; headTilt = 1; isWading = true; dirUD = 0; dirRL = 0; CharSwim._rotation = smokeRot * (_xscale / 100); if (swimStatus == 'rolling') { CharSwim.swimTrunks.gotoAndStop('surfaceIdle'); } if (smokeRot > 180) { smokeRot -= 360; } else { if (smokeRot < -180) { smokeRot += 360; } } b = 0; onEnterFrame = function () { if (!_root.Paused) { nowSpeed = Math.sqrt(moveRL * moveRL + moveUD * moveUD); RLing = (20 - Math.abs(nowSpeed)) / 20; if (RightIsDown()) { dirRL = 1; } else { if (LeftIsDown()) { dirRL = -1; } else { dirRL = 0; } } if (DownIsDown() && !_root.testAll(_x, _y + 10)) { dirUD = 1; } else { dirUD = 0; } if (dirRL == 0 || moveRL * dirRL < 0) { moveRL *= 0.95; } if (dirRL == 0 && dirUD == 0) { if (CharSwim.swimTrunks._currentframe == 221) { _root.PauseListener(); } } else { shouldRot = -Math.atan2(-dirRL, -dirUD) / 0.0174532925199433; if (Math.abs(shouldRot) == 180) { shouldRot = _xscale * 1.8; } moveRL += Math.sin(shouldRot * 0.0174532925199433) * RLing; moveUD -= Math.cos(shouldRot * 0.0174532925199433) * 0.5; } if (Math.abs(moveRL) > 10) { moveRL *= 0.95; } nowSpeed = Math.sqrt(moveRL * moveRL + moveUD * moveUD); if (!_root.water.hitTest(_x + moveRL, _y - isTall + moveUD, true)) { if (smokeN > 0) { --smokeN; } else { if (nowSpeed > 2) { smokeN = 5; waterDist = _y - isTall / 2 - waterY; dist = waterDist * (1 / Math.cos(smokeRot * 0.0174532925199433)); distX = dist * Math.sin(smokeRot * 0.0174532925199433); distY = dist * Math.cos(smokeRot * 0.0174532925199433); if (distX > isTall / 2) { distX = isTall / 2; } else { if (distX < -isTall / 2) { distX = -isTall / 2; } } if (Math.abs(moveRL) > 2) { _root.waterSplash(_x - distX * 2 + moveRL, waterY, (moveRL / Math.abs(moveRL)) * (nowSpeed * 10), 0); } else { _root.waterSplash(_x + distX * 2, waterY, nowSpeed * 10, 0); edepth = _root.waterSplash(_x - distX * 2, waterY, -nowSpeed * 10, 0); } if (swimStatus == 'paddling') { var v4 = random(3) + 1; while (_root.oStep == v4) { v4 = random(3) + 1; } _root.oStep = v4; _root.soundContainer.quickSound('swimDive', _root.oStep * Math.abs(moveRL * 3), _x, _root['waterSplat' + edepth]); if (b > 0) { --b; } else { _root.soundContainer.quickSound('waterBackSplash', 50 + _root.oStep * Math.abs(moveRL), _root['waterSplat' + edepth]); b = 5; } } var v3 = 0; while (v3 < nowSpeed / 5) { _root.spawnBubble(_x - moveRL - 20 + random(40), _y - 20 + random(nowSpeed * 1.5), 20 + random(40), 0); ++v3; } bubbleN = -20; } } if (JumpIsDown() && moveUD < 1) { _root.waterSplash(_x + moveRL, waterY, 100 + moveUD * 5, 0); _root.waterSplash(_x + moveRL, waterY, -(100 + moveUD * 5), 0); _root.playSound('swimCannonball', this._x, 50 + this.moveUD * 10); _root.playSound('waterBackSplash', this._x, 50 + this.moveUD * 10); v3 = 0; while (v3 < 10) { _root.spawnBubble(_x - 30 + random(60), waterY + random(40), 20 + random(40), 0); ++v3; } isWading = false; if (moveUD > -10) { moveUD = -10; } moveUD *= 1.2; fallView = _root.vOffset; tilt = smokeRot; smokeRot *= 0.5; FloatUp = 10; gotoAndStop('Jump'); if (Math.abs(_rotation) < 45 && (_xscale > 0 && LeftIsDown() || _xscale < 0 && RightIsDown())) { CharJump.gotoAndStop(2); } SisDown = true; return false; } } else { if (bubbleN < 0) { if (bubbleN + 1 < 0) { ++bubbleN; } else { bubbleN = 0; } var v3 = 0; while (v3 < -bubbleN / 20) { _root.spawnBubble(_x - moveRL - 10 + random(20), _y - 35 + random(20), 20 + random(40), 0); ++v3; } } else { if (bubbleN > 0) { if (bubbleN - (nowSpeed + 1) > 0) { bubbleN -= nowSpeed + 1; } else { bubbleN = 0; } bubbleScale += 2; } else { bubbleN = random(30) + 30; _root.spawnBubble(_x - 10 + random(20), _y - isTall / 2, bubbleScale + random(50), 0); bubbleScale = 20; } } } SwimGuide(false); bobPoint = isTall * 0.8 - Math.abs(moveRL); if (RLStatus == 'walling' && _y < waterY + 25 && Math.abs(wallRot) < 80) { centerY = _y - isTall / 2; isWading = false; oldWallRot = wallRot; tilt = oldWallRot; _rotation = tilt; _x = centerX + (isTall / 2) * Math.sin((_rotation + 180) * 0.0174532925199433); _y = centerY - (isTall / 2) * Math.cos((_rotation + 180) * 0.0174532925199433); fallView = -(swimRL * 15) * Math.cos(eRot * 0.0174532925199433) - (RLy(_root.SmoothScroll / 2) + _root.yRot(_root.vOffset, _rotation)); slopeStuff(); resetJumpStuff(); moveRL = Math.cos(_rotation * Math.PI / 180) * moveRL + Math.sin(_rotation * Math.PI / 180) * moveUD; moveUD = 0; if (moveRL * _xscale > 0) { justLanded = true; alreadyLanded = true; landFrame = 6; gotoAndStop('Walk'); } else { gotoAndStop('Backpeddle'); } return true; } if (!_root.water.hitTest(_x + moveRL, _y + moveUD, true)) { _root.waterSplash(_x + moveRL, waterY, 100 + -moveUD * 5, 0); _root.waterSplash(_x + moveRL, waterY, -(100 + -moveUD * 5), 0); _root.playSound('swimDive', this._x, 50 + this.moveUD * 10); _root.playSound('waterBackSplash', this._x, 50 + this.moveUD * 10); var v3 = 0; while (v3 < 10) { _root.spawnBubble(_x - 30 + random(60), waterY + random(40), 20 + random(40), 0); ++v3; } fallView = _root.vOffset; tilt = smokeRot; smokeRot *= 0.5; moveUD *= 1.2; FloatUp = 10; gotoAndStop('Jump'); } else { if (_y - bobPoint < waterY) { moveUD *= 0.9; if (moveUD < 10) { moveUD += (waterY - (_y - bobPoint)) / bobPoint; } } else { if (RLStatus == 'swimWallJump' && swimRL > 5) { RLStatus = 'swimWallJumping'; _xscale = (-eRot / Math.abs(eRot)) * 100; eRot += 180; eRot = groundrot; shouldRot = eRot; gotoAndStop('SwimWallJump'); } else { if (_y - isTall * 1.5 < waterY) { if (moveUD > -2 && dirUD != 1) { moveUD -= 0.2; } } else { gotoAndStop('Swim'); } } } } if (Math.abs(moveUD) > 0.2) { moveUD *= 0.95; } eRot = -Math.atan2(-moveRL, -moveUD) / 0.0174532925199433; swimRL = Math.sqrt(moveRL * moveRL + moveUD * moveUD); if (dirRL == 0) { if (dirUD == 1) { smokeAccel = (eRot - smokeRot) / 16; } else { smokeAccel = -smokeRot / 30; } } else { if (swimRL < 5) { smokeAccel = (moveRL * 9 - smokeRot) / 8; if (Math.abs(smokeAccel) > 4) { smokeAccel /= Math.abs(smokeAccel) / 4; } if (Math.abs(smokeAccel) < 1 && smokeAccel != 0) { smokeAccel /= Math.abs(smokeAccel); } } else { if (_y - bobPoint > waterY + 10 || dirUD == 1) { var v4 = eRot; } else { if (eRot * _xscale < 0) { var v4 = eRot * 0.7; } else { var v4 = eRot * 0.88; } } if (Math.abs(v4 - smokeRot) > 180) { if (v4 > smokeRot) { v4 -= 360; } else { v4 += 360; } } smokeAccel = (v4 - smokeRot) / 8; if (Math.abs(smokeAccel) > 8) { smokeAccel /= Math.abs(smokeAccel) / 8; } } } smokeRot += smokeAccel; CharSwim._rotation = smokeRot * (_xscale / 100); if (Math.abs(smokeAccel * 3) > 24) { rotOffset += ((smokeAccel / Math.abs(smokeAccel)) * 24 - rotOffset) / 10; } else { if (Math.abs(rotOffset) > Math.abs(smokeAccel * 3)) { rotOffset += (smokeAccel * 3 - rotOffset) / 5; } else { rotOffset += (smokeAccel * 3 - rotOffset) / 10; } } CharSwim.setPartsRot(); _root.CharYPoint = _y; } }; wideAngle = function () { return dirRL * moveRL < 0; }; CharSwim.setPartsRot = function () { this.swimHead._rotation = rotOffset * (_xscale / 100); this.swimHead.armOffset._rotation = -this.swimHead._rotation * 0.9; if (Math.abs(rotOffset) > 14) { this.swimTrunks._rotation = -((rotOffset / Math.abs(rotOffset)) * 42) * (_xscale / 100); } else { this.swimTrunks._rotation = -(rotOffset * 2) * (_xscale / 100); } if (swimStatus == 'idle' && Math.abs(rotOffset) < 5) { this.swimTorso.gotoAndStop(9); } else { this.swimTorso.gotoAndStop(Math.round(-this.swimTrunks._rotation / 14) + 5); } }; CharSwim.setPartsRot(); } frame 37 { if (Math.abs(smokeRot - eRot) > 180) { if (smokeRot > eRot) { smokeRot -= 360; } else { smokeRot += 360; } } if (swimStatus == 'smokeRot' && false) { moveRL *= 0.7; moveUD *= 0.7; swimRL = Math.sqrt(moveRL * moveRL + moveUD * moveUD); eRot = smokeRot; swimStatus = 'idle'; CharSwim.gotoAndStop('idle'); CharSwim.swimTrunks.gotoAndStop('idle'); } else { if (isWading) { isWading = false; bubbleN = -20; } else { if (Math.abs(smokeRot - eRot) < 45) { swimRL = Math.sqrt(moveRL * moveRL + moveUD * moveUD); CharSwim.gotoAndStop('swim'); if (swimStatus != 'darting') { CharSwim.swimHead.gotoAndStop('dive'); swimStatus = 'darting'; } CharSwim.swimTrunks.gotoAndPlay('dart'); bubbleN = -40; } else { moveRL *= 0.7; swimRL = Math.sqrt(moveRL * moveRL + moveUD * moveUD); swimStatus = 'idle'; CharSwim.gotoAndStop('fromJump'); CharSwim.swimTrunks.gotoAndPlay('fromJump'); bubbleN = -20; } } } performN = 10; shouldRot = eRot; CharSwim._rotation = smokeRot * (_xscale / 100); CharSwim.setPartsRot(); b = 0; dirUD = 0; dirRL = 0; SwimFlip = false; bubbleScale = 20; onEnterFrame = function () { if (!_root.Paused) { nowSpeed = Math.sqrt(moveRL * moveRL + moveUD * moveUD); if (RightIsDown()) { dirRL = 1; } else { if (LeftIsDown()) { dirRL = -1; } else { dirRL = 0; } } if (UpIsDown()) { dirUD = -1; } else { if (DownIsDown()) { dirUD = 1; } else { dirUD = 0; } } if (dirRL == 0 && dirUD == 0) { if (swimStatus == 'darting') { if (swimRL > 2) { swimRL -= 0.05; if (performN > 0) { --performN; } else { _root.movePerformed('torpedo', swimRL); } } else { swimStatus = 'normal'; CharSwim.swimTrunks.gotoAndPlay('dartToSwim'); } } else { if (swimRL > 0) { if (swimRL > 0.05) { swimRL *= 0.925; } else { swimRL = 0; } } } if (swimRL < 3) { var v3 = 0; while (v3 < 2) { if (smokeRot > 180) { smokeRot -= 360; } else { if (smokeRot < -180) { smokeRot += 360; } } ++v3; } smokeAccel = (smokeRot - _xscale * 0.05) * 0.95 - (smokeRot - _xscale * 0.05); smokeRot += smokeAccel; if (CharSwim.swimTrunks._currentframe == 2) { _root.PauseListener(); } } else { rotAccel *= 0.9; eRot += rotAccel; smokeAccel *= 0.9; smokeRot += smokeAccel; } moveRL += Math.sin(eRot * 0.0174532925199433) * 2; moveUD -= Math.cos(eRot * 0.0174532925199433) * 2; } else { if (swimStatus == 'idle') { shouldRot = -Math.atan2(-dirRL, -dirUD) / 0.0174532925199433; } else { var v4 = -Math.atan2(-dirRL, -dirUD) / 0.0174532925199433; if (Math.abs(shouldRot - v4) > 180) { if (shouldRot > v4) { shouldRot -= 360; } else { shouldRot += 360; } } if (Math.abs(shouldRot - v4) < 12) { shouldRot = v4; } else { shouldRot += ((v4 - shouldRot) / Math.abs(v4 - shouldRot)) * 12; } } if (Math.abs(shouldRot) == 180) { shouldRot = _xscale * 1.8; } if (Math.abs(shouldRot - smokeRot) > 180) { if (smokeRot > shouldRot) { smokeRot -= 360; } else { smokeRot += 360; } } if (Math.abs(shouldRot - eRot) > 180) { if (eRot > shouldRot) { eRot -= 360; } else { eRot += 360; } } smokeAccel = (shouldRot - smokeRot) / 8; if (Math.abs(smokeAccel) > 8) { smokeAccel /= Math.abs(smokeAccel) / 8; } smokeRot += smokeAccel; if (swimRL < 2 && false) { eRot = shouldRot; rotAccel = 0; } else { rotAccel = (shouldRot - eRot) / 8; if (Math.abs(rotAccel) > 8) { rotAccel /= Math.abs(rotAccel) / 8; } eRot += rotAccel; if (b < 10) { ++b; } else { if (eRot * _xscale < 0 && dirRL != 0 && Math.abs(eRot) < 170) { CharSwim.gotoAndStop('flip'); b = 0; } else { b = 0; } } } if (Math.abs(eRot - smokeRot) > 180) { if (smokeRot > eRot) { smokeRot -= 360; } else { smokeRot += 360; } } if (Math.abs(smokeRot - eRot) > 135 && _y - waterY > 400) { swimRL *= 0.8; } if (swimStatus == 'darting') { if (swimRL > 10 && Math.abs(this.smokeRot - this.shouldRot) < 135) { swimRL -= Math.abs(rotAccel) / 20; swimRL -= 0.05; } else { swimStatus = 'normal'; CharSwim.swimTrunks.gotoAndPlay('dartToSwim'); } b = 0; } else { if (Math.abs(smokeAccel) > 2 || Math.abs(eRot) < 10) { b = 0; } if (Math.abs(this.eRot - this.shouldRot) > 135) { if (swimRL > 4) { swimRL *= 0.92; } else { swimRL += 0.25; } } else { if (swimStatus == 'drifting') { swimRL *= 0.98; } else { if (swimStatus == 'paddling') { if (swimRL < 10) { swimRL += 0.5; } else { swimRL *= 0.98; } } } } } if (swimStatus == 'idle') { moveRL += Math.sin(shouldRot * 0.0174532925199433) * 0.5; moveUD -= Math.cos(shouldRot * 0.0174532925199433) * 0.5; swimRL = Math.sqrt(moveRL * moveRL + moveUD * moveUD); if (swimRL > 10) { swimRL = 10; } eRot = -Math.atan2(-moveRL, -moveUD) / 0.0174532925199433; if (Math.abs(eRot - smokeRot) > 180) { if (smokeRot > eRot) { smokeRot -= 360; } else { smokeRot += 360; } } } else { if (swimRL < 4) { moveRL += Math.sin(eRot * 0.0174532925199433) * 2; moveUD -= Math.cos(eRot * 0.0174532925199433) * 2; } else { moveRL += Math.sin(eRot * 0.0174532925199433) * 3; moveUD -= Math.cos(eRot * 0.0174532925199433) * 3; } } } currentSpeed = Math.sqrt(moveRL * moveRL + moveUD * moveUD); if (currentSpeed > swimRL) { moveRL *= swimRL / currentSpeed; moveUD *= swimRL / currentSpeed; } CharSwim._rotation = smokeRot * (_xscale / 100); if (Math.abs(smokeAccel * 3) > 24) { rotOffset += ((smokeAccel / Math.abs(smokeAccel)) * 24 - rotOffset) / 10; } else { if (Math.abs(rotOffset) > Math.abs(smokeAccel * 3)) { rotOffset += (smokeAccel * 3 - rotOffset) / 10; } else { rotOffset += (smokeAccel * 3 - rotOffset) / 3; } } CharSwim.setPartsRot(); if (bubbleN < 0) { if (bubbleN + 1 < 0) { ++bubbleN; } else { bubbleN = 0; } var v3 = 0; while (v3 < -bubbleN / 20) { _root.spawnBubble(_x - moveRL - 15 + random(30), _y - 40 + random(30), 20 + random(40), 0); ++v3; } } else { if (bubbleN > 0) { if (bubbleN - (nowSpeed + 1) > 0) { bubbleN -= nowSpeed + 1; } else { bubbleN = 0; } bubbleScale += 2; } else { bubbleN = random(30) + 30; _root.spawnBubble(_x - 15 + random(30), _y - 40 + random(30), bubbleScale + random(50), 0); bubbleScale = 20; } } if (!_root.water.hitTest(_x + moveRL, _y - isTall + moveUD, true)) { if (smokeN > 0) { --smokeN; } else { if (Math.abs(moveRL) > 2) { smokeN = 2; waterDist = _y - isTall / 2 - waterY; dist = waterDist * (1 / Math.cos(smokeRot * 0.0174532925199433)); distX = dist * Math.sin(smokeRot * 0.0174532925199433); distY = dist * Math.cos(smokeRot * 0.0174532925199433); if (distX > isTall / 2) { distX = isTall / 2; } else { if (distX < -isTall / 2) { distX = -isTall / 2; } } _root.waterSplash(_x + distX + moveRL, waterY, (moveRL / Math.abs(moveRL)) * (30 - waterDist) * 0.1 * (moveRL * 3), 0); var v3 = 0; while (v3 < nowSpeed / 3) { _root.spawnBubble(_x - moveRL - 15 + random(30), waterY + random(nowSpeed * 1.5) + 10, 20 + random(40), 0); ++v3; } } } if (JumpIsDown() && moveUD < 1) { _root.waterSplash(_x + moveRL, waterY, 100 + moveUD * 5, 0); _root.waterSplash(_x + moveRL, waterY, -(100 + moveUD * 5), 0); v3 = 0; while (v3 < 10) { _root.spawnBubble(_x - 30 + random(60), waterY + random(40), 20 + random(40), 0); ++v3; } if (moveUD > -10) { moveUD = -10; } moveUD *= 1.2; if (moveUD < -20) { moveUD = -20; } FloatUp = 10; tilt = smokeRot; SisDown = true; gotoAndStop('Jump'); if (Math.abs(_rotation) < 45 && (_xscale > 0 && LeftIsDown() || _xscale < 0 && RightIsDown())) { CharJump.gotoAndStop(2); } return false; } } SwimGuide(false); if (!_root.water.hitTest(_x + moveRL, _y + moveUD, true)) { _root.waterSplash(_x + moveRL, waterY, 100 + -moveUD * 5, 0); _root.waterSplash(_x + moveRL, waterY, -(100 + -moveUD * 5), 0); v3 = 0; while (v3 < 10) { _root.spawnBubble(_x - 15 + random(30), waterY + random(40), 20 + random(40), 0); ++v3; } moveUD *= 1.2; if (moveUD < -20) { moveUD = -20; } centerX = _x; centerY = _y - isTall / 2; tilt = smokeRot; this._x = this.centerX + (isTall / 2) * Math.sin((this._rotation + 180) * 0.0174532925199433); this._y = this.centerY - (isTall / 2) * Math.cos((this._rotation + 180) * 0.0174532925199433); FloatUp = 10; gotoAndStop('Jump'); if (Math.abs(_rotation) < 45 && (_xscale > 0 && LeftIsDown() || _xscale < 0 && RightIsDown())) { CharJump.gotoAndStop(2); } } else { if (_y - isTall * 1.5 < waterY && moveUD < 0) { if (moveUD < 5) { moveUD += (waterY - (_y - isTall * 0.7 + moveUD)) / isTall * 0.7; } if (Math.abs(moveUD) < 5 && dirUD < 1 && swimStatus != 'darting') { gotoAndStop('Float'); } } else { if (RLStatus == 'swimWallJump') { RLStatus = 'swimWallJumping'; _xscale = (-eRot / Math.abs(eRot)) * 100; eRot += 180; eRot = groundRot; shouldRot = eRot; gotoAndStop('SwimWallJump'); } else { if (_y - isTall * 2 < waterY) { if (moveUD > -2) { moveUD -= 0.2; } } } } } _root.CharYPoint = _y; } }; wideAngle = function () { return Math.abs(this.shouldRot - this.eRot) > 135 && swimRL > 7.5; }; CharSwim.setPartsRot = function () { this.swimHead._rotation = rotOffset * (_xscale / 100); this.swimHead.armOffset._rotation = -this.swimHead._rotation * 0.9; this.swimTrunks._rotation = -(rotOffset * 2) * (_xscale / 100); if (swimStatus == 'idle' && Math.abs(rotOffset) < 5) { this.swimTorso.gotoAndStop(9); } else { this.swimTorso.gotoAndStop(Math.round(-this.swimTrunks._rotation / 14) + 5); } }; } frame 38 { if (Math.abs(smokeRot - eRot) > 180) { if (smokeRot > eRot) { smokeRot -= 360; } else { smokeRot += 360; } } tempRL = moveRL; tempRL *= 0.7; moveUD *= 0.7; swimRL = 0; eRot = smokeRot; swimStatus = 'idle'; CharSwim.gotoAndStop('idle'); CharSwim.swimTrunks.gotoAndStop('idle'); performN = 10; shouldRot = eRot; swimUD = moveUD; rotOffset = smokeAccel; bobRL = moveRL; bobUD = moveUD; CharSwim._rotation = smokeRot * (_xscale / 100); b = 0; dirUD = 0; dirRL = 0; anchorX = _root.InteractLayer.chainplug._x; anchorY = _root.InteractLayer.chainplug._y; bobRot = -45; bobX = _x; if (Math.abs(_x - anchorX) < 200) { bobX = anchorX + 200 * Math.sin(bobRot * 0.0174532925199433); while (bobX < _x) { ++bobRot; bobX = anchorX + 200 * Math.sin(bobRot * 0.0174532925199433); } while (bobX > _x) { --bobRot; bobX = anchorX + 200 * Math.sin(bobRot * 0.0174532925199433); } } onEnterFrame = function () { if (!_root.Paused) { flushDist = (anchorY - _y) * 2 - 100; if (flushDist < -220) { _x = anchorX; delete onEnterFrame; return false; } if (flushDist > 200) { flushDist = 200; } if (flushDist < 50) { flushDist = 50; } flushRot = -((200 - flushDist) * (200 - flushDist) / 1100 + 6); bobRL += (anchorX + flushDist * Math.sin((bobRot - flushRot) * 0.0174532925199433) - bobX - bobRL) / 2; bobRot -= flushRot; bobX = anchorX + flushDist * Math.sin(bobRot * 0.0174532925199433); nowSpeed = Math.sqrt(tempRL * tempRL + swimUD * swimUD); if (RightIsDown()) { dirRL = 1; } else { if (LeftIsDown()) { dirRL = -1; } else { dirRL = 0; } } if (UpIsDown()) { dirUD = -1; } else { if (DownIsDown()) { dirUD = 1; } else { dirUD = 0; } } if (dirRL == 0 && dirUD == 0) { if (swimStatus == 'darting') { if (swimRL > 2) { swimRL -= 0.05; if (performN > 0) { --performN; } else { _root.movePerformed('torpedo', swimRL); } } else { swimStatus = 'normal'; CharSwim.swimTrunks.gotoAndPlay('dartToSwim'); } } else { if (swimRL > 0) { if (swimRL > 0.05) { swimRL *= 0.95; } else { swimRL = 0; } } } if (swimRL < 3) { var v3 = 0; while (v3 < 2) { if (smokeRot > 180) { smokeRot -= 360; } else { if (smokeRot < -180) { smokeRot += 360; } } ++v3; } smokeAccel = smokeRot * 0.95 - smokeRot; smokeRot += smokeAccel; if (CharSwim.swimTrunks._currentframe == 2) { _root.PauseListener(); } } else { rotAccel *= 0.9; eRot += rotAccel; smokeAccel *= 0.9; smokeRot += smokeAccel; } tempRL += Math.sin(eRot * 0.0174532925199433) * 2; swimUD -= Math.cos(eRot * 0.0174532925199433) * 2; } else { shouldRot = -Math.atan2(-dirRL, -dirUD) / 0.0174532925199433; if (Math.abs(shouldRot) == 180) { shouldRot = _xscale * 1.8; } if (Math.abs(smokeRot - shouldRot) > 180) { if (smokeRot > shouldRot) { smokeRot -= 360; } else { smokeRot += 360; } } smokeAccel = (shouldRot - smokeRot) / 8; if (swimStatus == 'idle') { } else { if (Math.abs(smokeAccel) > 8) { smokeAccel /= Math.abs(smokeAccel) / 8; } } if (Math.abs(smokeAccel) < 1 && smokeAccel != 0) { smokeAccel /= Math.abs(smokeAccel); } smokeRot += smokeAccel; if (swimStatus == 'darting') { if (swimRL > 10 && Math.abs(this.smokeRot - this.shouldRot) < 135) { swimRL -= Math.abs(rotAccel) / 20; swimRL -= 0.05; } else { swimStatus = 'normal'; CharSwim.swimTrunks.gotoAndPlay('dartToSwim'); } b = 0; } else { if (Math.abs(smokeAccel) > 2 || Math.abs(eRot) < 10) { b = 0; } if (Math.abs(this.smokeRot - this.shouldRot) > 135) { if (swimRL > 4) { swimRL *= 0.92; } else { swimRL += 0.25; } } else { if (swimStatus == 'drifting') { swimRL *= 0.98; } else { if (swimRL < 10 && swimStatus == 'paddling') { swimRL += 0.25; } } } } if (swimRL < 2) { eRot = shouldRot; rotAccel = 0; if (CharSwim.swimTrunks._currentframe < 49) { _xscale = (eRot / Math.abs(eRot)) * 100; } } else { if (Math.abs(eRot - shouldRot) > 180) { if (eRot > shouldRot) { eRot -= 360; } else { eRot += 360; } } rotAccel = (shouldRot - eRot) / 8; if (Math.abs(rotAccel) > 8) { rotAccel /= Math.abs(rotAccel) / 8; } if (Math.abs(rotAccel) < 1 && rotAccel != 0) { rotAccel /= Math.abs(rotAccel); } eRot += rotAccel; if (b < 30) { ++b; } else { if (eRot * _xscale < 0) { _xscale = (eRot / Math.abs(eRot)) * 100; b = 0; } } } if (Math.abs(eRot - smokeRot) > 180) { if (smokeRot > eRot) { smokeRot -= 360; } else { smokeRot += 360; } } if (Math.abs(smokeRot - eRot) > 135 && _y - waterY > 400) { swimRL *= 0.8; eRot = smokeRot; } if (swimRL < 6) { tempRL += Math.sin(eRot * 0.0174532925199433) * 2; swimUD -= Math.cos(eRot * 0.0174532925199433) * 2; } else { tempRL += Math.sin(eRot * 0.0174532925199433) * 3; swimUD -= Math.cos(eRot * 0.0174532925199433) * 3; } } currentSpeed = Math.sqrt(tempRL * tempRL + swimUD * swimUD); if (currentSpeed > swimRL) { tempRL *= swimRL / currentSpeed; swimUD *= swimRL / currentSpeed; } CharSwim._rotation = smokeRot * (_xscale / 100); if (Math.abs(smokeAccel * 3) > 24) { rotOffset += ((smokeAccel / Math.abs(smokeAccel)) * 24 - rotOffset) / 10; } else { if (Math.abs(rotOffset) > Math.abs(smokeAccel * 3)) { rotOffset += (smokeAccel * 3 - rotOffset) / 5; } else { rotOffset += (smokeAccel * 3 - rotOffset) / 10; } } CharSwim.setPartsRot(); if (Math.abs(tempRL) > 12) { tempRL -= (tempRL / Math.abs(tempRL)) * 0.25; } if (!_root.water.hitTest(_x + moveRL, _y - isTall * 2 + moveUD, true)) { bobUD += 1; for (;;) { if (!_root.water.hitTest(this.centerX + this.spread + this.moveRL * 2, waterY, true || this.centerX - this.spread + this.moveRL * 2, this.waterY, true)) break; --this.waterY; } for (;;) { if (_root.water.hitTest(this.centerX + this.spread + this.moveRL * 2, waterY + 1, true || this.centerX - this.spread + this.moveRL * 2, this.waterY + 1, true)) break; ++this.waterY; } } nowSpeed = Math.sqrt(bobRL * bobRL + swimUD * swimUD); if (bubbleN > 0) { bubbleN -= nowSpeed + 1; bubbleScale += 2; } else { bubbleN = random(30) + 30; _root.spawnFlushBubble(_x + 30, _y - random(50), 40 + random(20), flushDist, bobRot + random(100), flushRot, anchorX, anchorY); bubbleScale = 0; } if (bobUD < 4) { bobUD += 0.4; } _x = _x + bobRL; _y = _y + (swimUD * 0.3 + bobUD); _root.CharYPoint = _y; if (Math.abs(tilt - _rotation) > 180) { if (tilt > 0) { tilt -= 360; } else { tilt += 360; } } tilt += (_rotation - tilt) / 3; CharJump._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } }; CharJump._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); wideAngle = function () { return Math.abs(this.smokeRot - this.shouldRot) > 135 && swimRL > 7.5; }; CharSwim.setPartsRot = function () { this.swimHead._rotation = rotOffset * (_xscale / 100); this.swimHead.armOffset._rotation = -this.swimHead._rotation * 0.9; if (Math.abs(rotOffset) > 14) { this.swimTrunks._rotation = -((rotOffset / Math.abs(rotOffset)) * 42) * (_xscale / 100); } else { this.swimTrunks._rotation = -(rotOffset * 2) * (_xscale / 100); } if (swimStatus == 'idle' && Math.abs(rotOffset) < 5) { this.swimTorso.gotoAndStop(9); } else { this.swimTorso.gotoAndStop(Math.round(-this.swimTrunks._rotation / 14) + 5); } }; } frame 39 { shouldRot = eRot; headTilt = 1; isWading = true; smokeN = 4; bubbleN = -moveUD * 2; dirUD = 0; dirRL = 0; FSRoller._rotation = (InShellRot - _rotation) * (_xscale / 100); hairRL = _xscale / 25; gelHair(); onEnterFrame = function () { if (!_root.Paused) { nowSpeed = Math.sqrt(moveRL * moveRL + moveUD * moveUD); RLing = (20 - Math.abs(nowSpeed)) / 20; _rotation = _rotation * 0.95; if (DownIsDown() && FSRoller._currentframe < 3 || Math.abs(rotter) > 40) { FSRoller.gotoAndPlay(1); rotter += (moveRL * 0.5 - rotter) / 50; InShellRot += rotter; FSRoller._rotation = (InShellRot - _rotation) * (_xscale / 100); } else { if (Math.abs(rotter) < 15) { isTall = 50; FSRoller._rotation *= 0.8; InShellRot = FSRoller._rotation; if (FSRoller._currentframe > 15) { swimStatus = 'rolling'; this.smokeRot = this.InShellRot * (_xscale / 100); gotoAndStop('Float'); } } else { if (Math.abs(rotter) > 15) { rotter *= 0.8; } InShellRot += rotter; FSRoller._rotation = InShellRot * _xscale / 100 - _rotation; } } moveRL *= 0.95; moveUD *= 0.95; if (Math.abs(moveRL) > 12) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.25; } nowSpeed = Math.sqrt(moveRL * moveRL + moveUD * moveUD); if (!_root.water.hitTest(_x + moveRL, _y - isTall + moveUD, true)) { if (smokeN > 0) { --smokeN; } else { if (nowSpeed > 2) { smokeN = 4; waterDist = _y - isTall / 2 - waterY; dist = waterDist * (1 / Math.cos(smokeRot * 0.0174532925199433)); distX = dist * Math.sin(smokeRot * 0.0174532925199433); distY = dist * Math.cos(smokeRot * 0.0174532925199433); if (distX > isTall / 2) { distX = isTall / 2; } else { if (distX < -isTall / 2) { distX = -isTall / 2; } } if (Math.abs(moveRL) > 2) { _root.waterSplash(_x - distX * 2 + moveRL, waterY, (moveRL / Math.abs(moveRL)) * (nowSpeed * 10), 0); } else { _root.waterSplash(_x + distX * 2, waterY, nowSpeed * 10, 0); _root.waterSplash(_x - distX * 2, waterY, -nowSpeed * 10, 0); } var v3 = 0; while (v3 < nowSpeed / 5) { _root.spawnBubble(_x - moveRL - 20 + random(40), _y - 20 + random(nowSpeed * 1.5), 20 + random(40), 0); ++v3; } bubbleN = -20; } } if (JumpIsDown()) { isTall = 50; v3 = 0; while (v3 < 10) { _root.spawnBubble(_x - 30 + random(60), waterY + random(40), 20 + random(40), 0); ++v3; } isWading = false; if (moveUD > -10) { moveUD = -10; } moveUD *= 1.2; FloatUp = 10; gotoAndStop('Jump'); SisDown = true; return false; } } else { if (bubbleN < 0) { if (bubbleN + 1 < 0) { ++bubbleN; } else { bubbleN = 0; } var v3 = 0; while (v3 < -bubbleN / 20) { _root.spawnBubble(_x - moveRL - 10 + random(20), _y - 35 + random(20), 20 + random(40), 0); ++v3; } } else { if (bubbleN > 0) { if (bubbleN - (nowSpeed + 1) > 0) { bubbleN -= nowSpeed + 1; } else { bubbleN = 0; } bubbleScale += 2; } else { bubbleN = random(30) + 30; _root.spawnBubble(_x - 10 + random(20), _y - isTall / 2, bubbleScale + random(50), 0); bubbleScale = 20; } } } RLStatus = SwimGuide(false); if (_root.testAll(_x, _y) && _y - isTall < waterY) { while (_root.testAll(_x, _y)) { _y = _y - 1; } if (_y - isTall < waterY - 25) { gotoAndStop('Idle'); return true; } } var v4 = (waterY - (_y - isTall)) / isTall; if (_y - isTall < waterY) { if (v4 < 1) { moveUD += v4; } else { ++moveUD; } } else { moveUD *= 0.97; if (v4 > -0.4) { moveUD += v4; } else { moveUD -= 0.4; } } eRot = -Math.atan2(-moveRL, -moveUD) / 0.0174532925199433; swimRL = Math.sqrt(moveRL * moveRL + moveUD * moveUD); _root.CharYPoint = _y; } }; } frame 40 { flipAccel = -_xscale / 3; fliprot = smokeRot; _root.playSound('CharHurt', _x, 100); isCarrying = 'nothing'; swimStatus = 'fromHurt'; bubbleN = -20; var i = 0; while (i < 20) { _root.spawnBubble(_x - 50 + random(100), _y - isTall - 50 + random(100), 20 + random(40), 0); ++i; } onEnterFrame = function () { _rotation = _rotation * 0.8; moveRL *= 0.95; moveUD *= 0.95; eRot = -Math.atan2(-moveRL, -moveUD) / 0.0174532925199433; nowSpeed = Math.sqrt(moveRL * moveRL + moveUD * moveUD); fliprot += flipAccel; flipAccel *= 0.9300000000000001; hairRL = _xscale / 6 + flipAccel; SwimGuide(true); if (bubbleN < 0) { if (bubbleN + 1 < 0) { ++bubbleN; } else { bubbleN = 0; } var v3 = 0; while (v3 < -bubbleN / 20) { _root.spawnBubble(_x - moveRL - 15 + random(30), _y - 40 + random(30), 20 + random(40), 0); ++v3; } } if (!_root.water.hitTest(_x + moveRL, _y + moveUD, true)) { _root.waterSplash(_x + moveRL, waterY + 10, 100 + -moveUD * 5, 0); _root.waterSplash(_x + moveRL, waterY + 10, -(100 + -moveUD * 5), 0); moveUD *= 1.2; if (moveUD < -20) { moveUD = -20; } FloatUp = 10; gotoAndStop('Jump'); } else { if (_y - isTall * 2 < waterY) { if (bobUD > -2) { bobUD -= 0.2; } } else { if (nowSpeed < 5) { CharFrontSlam.play(); } } } if (Math.abs(bobUD) > 0.2) { bobUD *= 0.95; } else { if (bobUD != 0) { bobUD = 0; } } _root.CharYPoint = _y; tilt += (this._rotation - tilt) / 3; CharFrontSlam._rotation = (-_rotation + tilt + fliprot) * (_xscale / Math.abs(_xscale)); }; CharFrontSlam._rotation = (-_rotation + tilt + fliprot) * (_xscale / Math.abs(_xscale)); } frame 41 { flipAccel = -_xscale / 4; smokeRot = 0; fliprot = 0; _root.playSound('CharHurt', _x, 100); isCarrying = 'nothing'; swimStatus = 'fromPull'; bubbleN = -20; var b = 0; while (b < _root.bubbleArray.length) { eBubble = _root.UberForeground.waterClip[_root.bubbleArray[b]]; eBubble.anchorX = _root.InteractLayer.chainplug._x; eBubble.anchorY = _root.InteractLayer.chainplug._y; eBubble.b = 90 + random(30); eBubble.bobRot = -Math.atan2(eBubble.anchorX - eBubble._x, 250 - Math.abs(eBubble.anchorX - eBubble._x)) / 0.0174532925199433; eBubble.bobX = eBubble._x; if (Math.abs(eBubble._x - eBubble.anchorX) < 250) { eBubble.bobX = eBubble.anchorX + 250 * Math.sin(eBubble.bobRot * 0.0174532925199433); while (eBubble.bobX < eBubble._x) { ++eBubble.bobRot; eBubble.bobX = eBubble.anchorX + 250 * Math.sin(eBubble.bobRot * 0.0174532925199433); } while (eBubble.bobX > eBubble._x) { --eBubble.bobRot; eBubble.bobX = eBubble.anchorX + 250 * Math.sin(eBubble.bobRot * 0.0174532925199433); } } eBubble.onEnterFrame = _root.flushBubbleEnterFrame; ++b; } bobRot = -45; bobX = _x; if (Math.abs(_x - anchorX) < 200) { bobX = anchorX + 200 * Math.sin(bobRot * 0.0174532925199433); while (bobX < _x) { ++bobRot; bobX = anchorX + 200 * Math.sin(bobRot * 0.0174532925199433); } while (bobX > _x) { --bobRot; bobX = anchorX + 200 * Math.sin(bobRot * 0.0174532925199433); } } var i = 0; while (i < 20) { ++i; } onEnterFrame = function () { _rotation = _rotation * 0.8; fliprot += flipAccel; flipAccel *= 0.9300000000000001; hairRL = _xscale / 6 + flipAccel; if (CharFrontSlam._currentframe > 15) { ++moveRL; } else { moveRL *= 0.95; moveUD *= 0.95; } eRot = -Math.atan2(-moveRL, -moveUD) / 0.0174532925199433; nowSpeed = Math.sqrt(moveRL * moveRL + moveUD * moveUD); bobRot = -45; bobX = _x; if (Math.abs(_x - anchorX) < 200) { bobX = anchorX + 200 * Math.sin(bobRot * 0.0174532925199433); while (bobX < _x) { ++bobRot; bobX = anchorX + 200 * Math.sin(bobRot * 0.0174532925199433); } while (bobX > _x) { --bobRot; bobX = anchorX + 200 * Math.sin(bobRot * 0.0174532925199433); } } if (bubbleN < 0) { if (bubbleN + 1 < 0) { ++bubbleN; } else { bubbleN = 0; } var v3 = 0; while (v3 < -bubbleN / 20) { _root.spawnFlushBubble(_x - moveRL - 15 + random(30), _y - 40 + random(30), 40 + random(20), flushDist, bobRot, 0, _root.InteractLayer.chainplug._x, _root.InteractLayer.chainplug._y); ++v3; } } _x = _x + moveRL; _y = _y + moveUD; _root.CharYPoint = _y; tilt += (this._rotation - tilt) / 3; CharFrontSlam._rotation = (-_rotation + tilt + fliprot) * (_xscale / Math.abs(_xscale)); }; CharFrontSlam._rotation = (-_rotation + tilt + fliprot) * (_xscale / Math.abs(_xscale)); } frame 42 { hairRL = 0; swimRL = 0; temp = 0; offset = 0; dirRL = 0; moveUD = 0; moveRL = 0; swimStatus = 'drifting'; CharTug._rotation = smokeRot; _root.plugCreaking.start(0, 1000); _root.plugCreaking.setVolume(0); _root.playSound('starGrab', _x, 100); bubbleScale = 0; onEnterFrame = function () { if (UpIsDown()) { dirUD = -1; if (swimRL < 10) { swimRL += 0.25; } } else { if (swimRL > 0) { if (swimRL > 0.05) { swimRL *= 0.95; } else { swimRL = 0; } } dirUD = 0; } hairRL = swimRL; offset += swimRL / 9; _root.plugCreaking.setVolume(Math.abs(Math.abs(swimRL / 9) - Math.abs(offset / 20)) * 600); offset -= offset / 20; temp += (offset - temp) / 3; _root.BackgroundVolume = 100 - temp * 5.55; _root.BackgroundMusic.setVolume(_root.BackgroundVolume); if (offset > 18.8) { _root.BackgroundMusic.stop(); _root.plugCreaking.stop(); _root.playSound('RatShoot', _x, 500); _root.tubDraining.start(); _root.InteractLayer.chainplug.gotoAndPlay('drain'); eRot = -25; moveRL = -15; moveUD = -5; var v2 = 0; while (v2 < _root.BaddieArray.length) { i = _root.BaddieArray[v2]; if (_root.BLayer['Baddie' + i].ItIs == 'underwaterPirate') { _root.BLayer['Baddie' + i].gotoAndStop('Flush'); } ++v2; } _root.UberForeground.pipe.gotoAndPlay('loop'); gotoAndStop('PullFrontSlam'); CharFrontSlam.gotoAndPlay(6); } else { if (bubbleN > 0) { bubbleN -= swimRL + 1; bubbleScale += 2; } else { bubbleN = random(30) + 30; _root.spawnBubble(_x, _y - isTall, bubbleScale + random(50), 0); if (swimRL > 2) { _root.spawnBubble(_root.InteractLayer.chainplug._x + 55 + random(10), _root.InteractLayer.chainplug._y - 10, bubbleScale + random(50), 0); _root.spawnBubble(_root.InteractLayer.chainplug._x - 55 + random(10), _root.InteractLayer.chainplug._y - 10, bubbleScale + random(50), 0); } bubbleScale = 0; } eRot *= 0.9; CharTug._rotation += (-offset - CharTug._rotation) / 3; _x = _x + (anchX - offset * 3.5 - _x) / 3; _y = _y + (anchY - offset * 3.5 - _y) / 3; _root.InteractLayer.chainplug.gotoAndStop(Math.floor(temp * 2) + 1); CharTug.gotoAndStop(Math.floor(temp * 2) + 1); } }; } frame 43 { smokeRot = eRot - _xscale * 0.9; CharSwimWallJump._rotation = smokeRot * (_xscale / 100); rotAccel = 0; smokeAccel = 0; rotOffset = 0; nowSpeed = 5; onEnterFrame = function () { if (!JumpIsDown()) { SisDown = false; } if (JumpIsDown() && !SisDown) { SisDown = true; CharSwimWallJump.gotoAndPlay('pushOff'); delete onEnterFrame; } else { if (RightIsDown()) { dirRL = 1; } else { if (LeftIsDown()) { dirRL = -1; } else { dirRL = 0; } } if (UpIsDown()) { dirUD = -1; } else { if (DownIsDown()) { dirUD = 1; } else { dirUD = 0; } } if (dirRL == 0 && dirUD == 0) { if (swimRL > 0) { swimRL -= 0.1; } } else { shouldRot = -Math.atan2(-dirRL, -dirUD) / 0.0174532925199433; if (Math.abs(shouldRot - eRot) > 180) { if (shouldRot > 0) { shouldRot -= 360; } else { shouldRot += 360; } } if (Math.abs(shouldRot - eRot) < 90) { isWading = true; CharSwimWallJump.gotoAndPlay('leave'); moveRL = Math.sin(eRot * 0.0174532925199433) * 1; moveUD = -Math.cos(eRot * 0.0174532925199433) * 1; swimRL = Math.sqrt(moveRL * moveRL + moveUD * moveUD); nowSpeed = swimRL; onEnterFrame = function () { if (RightIsDown()) { dirRL = 1; } else { if (LeftIsDown()) { dirRL = -1; } else { dirRL = 0; } } if (UpIsDown()) { dirUD = -1; } else { if (DownIsDown()) { dirUD = 1; } else { dirUD = 0; } } smokeRot *= 0.9; CharSwimWallJump._rotation = smokeRot * (_xscale / 100); swimRL = Math.sqrt(moveRL * moveRL + moveUD * moveUD); nowSpeed = swimRL; moveRL *= 0.98; moveUD *= 0.98; moveRL += dirRL * 0.3; moveUD += dirUD * 0.3; eRot = -Math.atan2(-moveRL, -moveUD) / 0.0174532925199433; SwimGuide(); _root.CharYPoint = _y; }; } } } }; } frame 44 { CharSwim._rotation = eRot * (_xscale / 100); smokeRot = eRot; shouldRot = smokeRot; CharSwim.swimHead._rotation = rotOffset * (_xscale / 100); CharSwim.swimTrunks._rotation = -rotOffset * (_xscale / 100); CharSwim.swimTorso.gotoAndStop(Math.round(-CharSwim.swimTrunks._rotation / 12) + 4); onEnterFrame = function () { nowSpeed = Math.sqrt(moveRL * moveRL + moveUD * moveUD); RLing = (25 - Math.abs(nowSpeed)) / 20; if (RightIsDown()) { dirRL = 1; } else { if (LeftIsDown()) { dirRL = -1; } else { dirRL = 0; } } if (UpIsDown()) { dirUD = -1; } else { if (DownIsDown()) { dirUD = 1; } else { dirUD = 0; } } if (dirRL == 0 && dirUD == 0) { if (swimRL > 0) { swimRL -= 0.1; } } else { shouldRot = -Math.atan2(-dirRL, -dirUD) / 0.0174532925199433; if (swimRL > 10) { swimRL -= 0.05; } else { if (swimRL < 1) { swimRL = 1; } else { if (swimRL < 10) { swimRL += 0.25; } } } } if (swimRL > 0) { if (Math.abs(shouldRot - eRot) > 180) { if (shouldRot > 0) { shouldRot -= 360; } else { shouldRot += 360; } } rotAcel = (shouldRot - eRot) / 10; if (rotAcel > 8) { rotAcel = 8; } if (rotAcel < -8) { rotAcel = -8; } swimRL -= Math.abs(rotAcel) / 20; eRot += rotAcel; if (eRot > 180) { eRot -= 360; } else { if (eRot < -180) { eRot += 360; } } moveRL += Math.sin(eRot * 0.0174532925199433) * 10; moveUD -= Math.cos(eRot * 0.0174532925199433) * 10; currentSpeed = Math.sqrt(moveRL * moveRL + moveUD * moveUD); if (currentSpeed > swimRL) { moveRL *= swimRL / currentSpeed; moveUD *= swimRL / currentSpeed; } } smokeRot = eRot; CharSwim._rotation = eRot * (_xscale / 100); rotOffset += (rotAcel * 4 - rotOffset) / 5; CharSwim.swimHead._rotation = rotOffset * (_xscale / 100); CharSwim.swimTrunks._rotation = -rotOffset * (_xscale / 100); CharSwim.swimTorso.gotoAndStop(Math.round(-CharSwim.swimTrunks._rotation / 12) + 4); if (Math.abs(moveRL) > 12) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.25; } RLStatus = SwimGuide(); if (!_root.water.hitTest(_x, _y - isTall / 2, true)) { moveUD *= 1.2; FloatUp = 10; gotoAndStop('Jump'); } else { if (RLStatus == 'swimWallJump' && swimRL > 5) { RLStatus = 'swimWallJumping'; _xscale = (-eRot / Math.abs(eRot)) * 100; eRot += 180; eRot = groundrot; shouldRot = eRot; gotoAndStop('SwimWallJump'); } else { if (swimRL < 3) { gotoAndStop('Float'); } else { if (swimRL < 10 && (dirRL != 0 || dirUD != 0) || RLStatus != false || swimRL < 5) { gotoAndStop('Float'); } } } } _root.CharYPoint = _y; if (Math.abs(tilt - _rotation) > 180) { if (tilt > 0) { tilt -= 360; } else { tilt += 360; } } tilt += (_rotation - tilt) / 3; CharJump._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); }; CharJump._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 45 { CanSlide = false; loose = false; smokeN = 2; runtoslide = true; if (TempStill) { b = 7; } _root.waterLoop.start(0, 1000); _root.updateSound('waterLoop', _x, 0); onEnterFrame = function () { if (!_root.Paused) { if (smokeN > 0) { --smokeN; } else { smokeN = 2; _root.waterSplash(_x, waterY + 7, moveRL * 4 + (moveRL / Math.abs(moveRL)) * 20); } _root.updateSound('waterLoop', _x, Math.abs(moveRL * 4)); if (Math.abs(moveRL) > 0.4) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.4; } else { moveRL = 0; } _rotation = _rotation + (-moveRL / 3 - _rotation) / 3; if (TempStill) { if (b > 0) { --b; } else { TempStill = false; } } else { if (RightIsDown() && !friction) { if (moveRL + rotAccel * 0 > -10) { } else { moveRL *= 0.98; moveRL += RLing; if (Math.abs(moveRL) < 0.2) { moveRL = 0; } if (CharSlide._currentframe > 5) { CharSlide.gotoAndStop(10); } } } else { if (LeftIsDown() && !friction) { if (moveRL + rotAccel * 0 < 10) { } else { moveRL *= 0.98; moveRL -= RLing; if (Math.abs(moveRL) < 0.2) { moveRL = 0; } if (CharSlide._currentframe > 5) { CharSlide.gotoAndStop(10); } } } } } if (!JumpIsDown()) { SisDown = false; } if (JumpIsDown() && !SisDown) { SisDown = true; _root.waterLoop.stop(); _root.playSound('waterBackSplash', this._x, Math.abs(moveRL * 4), 0.6); FloatUp = 6; moveUD = -10; _root.waterSplash(_x + moveRL, waterY + 10, 150, 0); _root.waterSplash(_x + moveRL, waterY + 10, -150, 0); gotoAndStop('Jump'); } else { if (Math.abs(moveRL) < 5) { moveUD += 0.5; } else { if (Math.abs(waterY + (20 - Math.abs(moveRL)) - _y) < 5 && Math.abs(moveUD) < 2 && Math.abs(moveRL) > 15) { moveUD = 0; } else { if (_y > waterY + (20 - Math.abs(moveRL))) { moveUD -= Math.abs(moveRL) / 15; } else { moveUD += 0.5; } } } if (!_root.water.hitTest(_x + moveRL, _y + moveUD, true) && moveUD < 0) { _root.waterLoop.stop(); _root.playSound('waterBackSplash', this._x, Math.abs(moveRL * 4), 0.6); gotoAndStop('Jump'); if (RightIsDown() && moveRL < 0 || LeftIsDown() && moveRL > 0 && _xscale * moveRL > 0) { moveRL *= 0.7; moveUD *= 2; _root.waterSplash(_x + moveRL, waterY + 10, 100 + -moveUD * 5, 0); _root.waterSplash(_x + moveRL, waterY + 10, -(100 + -moveUD * 5), 0); this.CharJump.gotoAndStop(2); } else { this.CharJump.gotoAndStop(4); } } else { if (Math.abs(moveRL) < 10) { _root.waterLoop.stop(); _root.playSound('waterBackSplash', this._x, Math.abs(moveRL * 4), 0.6); gotoAndStop('Jump'); waterLanding = true; CharJump.gotoAndStop(7); CharJump.CharCanonBall.gotoAndStop(6); } else { if (false && moveUD > 0 && (_root.water.hitTest(_x + moveRL, _y - isTall / 2 + moveUD, true) && Math.abs(moveRL) < 5 || _root.water.hitTest(_x + moveRL, _y - isTall + moveUD, true))) { _root.waterLoop.stop(); _root.playSound('waterBackSplash', this._x, Math.abs(moveRL * 4), 0.6); waterY = _y - isTall / 2; while (_root.water.hitTest(_x + moveRL, waterY, true)) { --waterY; } while (!_root.water.hitTest(_x + moveRL, waterY + 1, true)) { ++waterY; } moveRL *= 0.8; moveUD *= 0.8; eRot = -Math.atan2(-moveRL, -moveUD) / 0.0174532925199433; smokeRot = 0; smokeAccel = 0; swimRL = Math.sqrt(moveRL * moveRL + moveUD * moveUD); resetJumpStuff(); rotOffset = 0; _rotation = 0; tilt = 0; gotoAndStop('Swim'); } else { if (!_root.water.hitTest(_x + spread + moveRL, _y + 25, true) && !_root.water.hitTest(_x - spread + moveRL, _y + 25, true)) { _root.waterLoop.stop(); _root.playSound('waterBackSplash', this._x, Math.abs(moveRL * 4), 0.6); crouchy = true; gotoAndStop('Slide'); } } } } } JumpGuide(); CheckBaddieHit(_x, _y, RLx(moveRL), RLy(moveRL)); tilt += (this._rotation - tilt) / 3; CharSlide._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } else { CharSlide.stop(); } }; CharSlide._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 47 { halt.gotoAndPlay(4); onEnterFrame = function () { friction = _root.getFriction(_x, _y); i = _root.RotToAccel(_rotation); if (Math.abs(moveRL + i) < 40) { moveRL += i; } else { moveRL *= 40 / Math.abs(moveRL); } if (!RightIsDown() && !LeftIsDown()) { gotoAndStop('Idle'); } if (moveRL == 0) { } else { if (Math.abs(moveRL) > RLing) { moveRL -= (moveRL / Math.abs(moveRL)) * RLing; } else { moveRL = 0; } } EveryFrame(); }; } frame 49 { delete onEnterFrame; } frame 69 { if (sheathing && sheathFrame > 0) { sheathing = false; CharPencilIdle.gotoAndPlay(sheathFrame) + 1; } else { sheathing = false; sheathFrame = 0; } onEnterFrame = function () { if (RightIsDown()) { if (_xscale > 0) { if (pencilOut < 0) { sheathFrame = CharPencilIdle._currentframe; gotoAndStop('Walk'); } else { gotoAndStop('pencilWalk'); } } else { gotoAndStop('Backpeddle'); } } else { if (LeftIsDown()) { if (_xscale < 0) { if (pencilOut < 0) { sheathFrame = CharPencilIdle._currentframe; gotoAndStop('Walk'); } else { gotoAndStop('pencilWalk'); } } else { gotoAndStop('Backpeddle'); } } } slopeStuff(); moveRL *= 0.95; if (Math.abs(moveRL) > 1) { moveRL -= moveRL / Math.abs(moveRL); } else { moveRL = 0; } EveryFrame(); if (RLStatus == 'rEdge' || RLStatus == 'rBackEdge') { this._x -= this.RLx(this.moveRL); this._y -= this.RLy(this.moveRL); moveRL = 0; } else { if (RLStatus == 'lEdge' || RLStatus == 'lBackEdge') { this._x -= this.RLx(this.moveRL); this._y -= this.RLy(this.moveRL); moveRL = 0; } } if (pencilOut < 0) { } else { if (pencilOut > 0) { --pencilOut; } else { isCarrying = 'nothing'; sheathing = true; pencilOut = -1; CharPencilIdle.gotoAndPlay(2); } } if (!AttackIsDown()) { AisDown = false; } if (AttackIsDown() && !AisDown) { AisDown = true; sheathFrame = 0; sheathing = false; gotoAndStop('pencilDraw'); } else { if (DownIsDown()) { gotoAndStop('Duck'); } } tilt += (this._rotation - tilt) / 3; CharPencilIdle._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); }; CharPencilIdle._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); stop(); } frame 70 { isCarrying = 'pencil'; pencilOut = 10; CharPencilDraw.ticktockN = 0; lockOn = -1; if (airHold > 0) { CharPencilDraw.gotoAndPlay(airHold); } else { delete drawEnterFrame; } if ((nextSwipe == 2 || UpIsDown()) && CharPencilDraw._currentframe == 1) { CharPencilDraw.gotoAndPlay('holdL'); } groundHold = 0; airHold = 0; smokeN = 0; onEnterFrame = function () { slopeStuff(); if (Math.abs(moveRL + rotAccel * 1) < 40) { moveRL += rotAccel * 1; } else { moveRL *= 40 / Math.abs(moveRL); } if (CheckBaddieHit(_x, _y, RLx(moveRL), RLy(moveRL))) { _root.messagePopup('Baddie'); lockOn = -1; } else { if (!holding) { if (JumpListener()) { groundHold = 0; return true; } else { if (RightIsDown()) { isAttacking = false; if (_xscale > 0) { if (CharPencilDraw._currentframe < 230 || CharPencilDraw._currentframe > 450) { gotoAndStop('pencilWalk'); } else { gotoAndStop('pencilWalkFront'); } } else { gotoAndStop('Backpeddle'); } } else { if (LeftIsDown()) { isAttacking = false; if (_xscale < 0) { if (CharPencilDraw._currentframe < 230 || CharPencilDraw._currentframe > 45) { gotoAndStop('pencilWalk'); } else { gotoAndStop('pencilWalkFront'); } } else { gotoAndStop('Backpeddle'); } } else { if (DownIsDown()) { isAttacking = false; gotoAndStop('Duck'); } } } } } if (_currentframe == 70) { drawEnterFrame(); if (lockOn > -1 && CharPencilDraw._currentframe < 505) { tempDistX = _root.BLayer['Baddie' + lockOn]._x + _root.BLayer['Baddie' + lockOn].moveRL * 5 - (_root.BLayer['Baddie' + lockOn].isWide + 20) * (_xscale / 100) - _x; if (Math.abs(tempDistX) < 50 + hitPower * 2) { moveRL += (tempDistX / 6 - moveRL) / 2; } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } moveRL *= 0.95; } } else { moveRL *= 0.95; if (sliding || holding) { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } else { if (Math.abs(moveRL) > 1) { moveRL -= moveRL / Math.abs(moveRL); } else { moveRL = 0; } } } if (moveRL != 0) { _root.footSlide(_x + RLx(moveRL), _y + RLy(moveRL), moveRL * 4, _rotation, moveRL, friction, this); } if (moveRL != 0 || aPlatzOn > -1) { RLStatus = RLFunc(false, false, false, true); if (RLStatus == 'rEdge' || RLStatus == 'rBackEdge') { this._x -= this.RLx(this.moveRL); this._y -= this.RLy(this.moveRL); moveRL = 0; } else { if (RLStatus == 'lEdge' || RLStatus == 'lBackEdge') { this._x -= this.RLx(this.moveRL); this._y -= this.RLy(this.moveRL); moveRL = 0; } } } } } if (Math.abs(this.tilt - this._rotation) > 180) { if (this.tilt > 0) { this.tilt -= 360; } else { this.tilt += 360; } } if (!AttackIsDown()) { AisDown = false; } tilt += (this._rotation - tilt) / 3; CharPencilDraw._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); }; CharPencilDraw._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 71 { isCarrying = 'pencil'; pencilOut = 10; CharPencilDraw.ticktockN = 0; AisDown = true; if (Math.abs(moveRL) > 1) { hitPower += 10; if (Math.abs(moveRL) < 15) { moveRL = (moveRL / Math.abs(moveRL)) * 15; } holding = true; CharPencilDraw.gotoAndPlay(82); } isAttacking = true; onEnterFrame = function () { if (!CheckBaddieHit(_x, _y, RLx(moveRL), RLy(moveRL)) && _currentframe == 71) { if (!holding) { if (RightIsDown()) { isAttacking = false; if (_xscale > 0) { if (CharPencilDraw._currentframe < 230) { gotoAndStop('pencilWalk'); } else { gotoAndStop('pencilWalkFront'); } } else { gotoAndStop('Backpeddle'); } } else { if (LeftIsDown()) { isAttacking = false; if (_xscale < 0) { if (CharPencilDraw._currentframe < 230) { gotoAndStop('pencilWalk'); } else { gotoAndStop('pencilWalkFront'); } } else { gotoAndStop('Backpeddle'); } } else { if (DownIsDown()) { gotoAndStop('Duck'); } else { JumpListener(); } } } } slopeStuff(); if (lockOn > -1) { tempDistX = _root.BLayer['Baddie' + lockOn]._x + _root.BLayer['Baddie' + lockOn].moveRL * 2 - (_root.BLayer['Baddie' + lockOn].isWide + 20) * (_xscale / 100) - _x; if (Math.abs(tempDistX) < 50 + hitPower * 2) { moveRL += (tempDistX / 10 - moveRL) / ((95 - CharPencilDraw._currentframe) / 2); } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } moveRL *= 0.95; } } else { if (CharPencilDraw._currentframe > 74 && CharPencilDraw._currentframe < 109) { if (Math.abs(moveRL + rotAccel * 1) < 40) { moveRL += rotAccel / 2; } else { moveRL *= 40 / Math.abs(moveRL); } } else { if (Math.abs(moveRL + rotAccel * 1) < 40) { moveRL += rotAccel; } else { moveRL *= 40 / Math.abs(moveRL); } if (sliding || holding) { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } else { if (Math.abs(moveRL) > 1) { moveRL -= moveRL / Math.abs(moveRL); } else { moveRL = 0; } } moveRL *= 0.95; } } if (moveRL != 0) { RLFunc(); } } if (Math.abs(this.tilt - this._rotation) > 180) { if (this.tilt > 0) { this.tilt -= 360; } else { this.tilt += 360; } } if (!AttackIsDown()) { AisDown = false; } tilt += (this._rotation - tilt) / 3; CharPencilDraw._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); }; CharPencilDraw._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 72 { isCarrying = 'pencil'; pencilOut = 10; CharPencilDraw.gotoAndPlay('holdL'); toSmoothScroll = -(_root.SmoothScroll / Math.abs(_root.SmoothScroll)) * 75; FloatUp = 0; groundHold = 0; airHold = 0; b = 0; holding = true; delete drawEnterFrame; onEnterFrame = function () { airHold = CharPencilDraw._currentframe; if (b > 0) { moveRL *= 0.9; moveUD *= 0.9; --b; if (moveUD < 0) { moveUD += 1; } else { moveUD += 0.5; } } else { if (moveUD < 0) { moveUD += 1; } else { moveUD += 1; } } _rotation = _rotation * 0.9; drawEnterFrame(); if (!CheckBaddieJumpHit(centerX, centerY + isTall / 2, moveRL, moveUD)) { JumpGuide(false, 'draw', false, false); } if (holding) { } else { if (b < 0) { ++b; } else { if (_currentframe == 72) { airHold = 0; gotoAndStop('Jump'); } } } predictGround(); tilt += (_rotation - tilt) / 5; CharPencilDraw._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); }; CharPencilDraw._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 73 { onEnterFrame = function () { slopeStuff(); if (moveRL * rotAccel > 0) { moveRL += rotAccel; } else { moveRL += rotAccel / 3; } if (friction) { RLing = 0.2; } else { RLing = (25 - Math.abs(moveRL)) / 20; } if (RightIsDown() && moveRL < 20 * RightIsDown()) { if (moveRL < 0) { moveRL += RLing * RightIsDown() * 2; } else { moveRL += RLing * RightIsDown(); } } else { if (LeftIsDown() && moveRL > -20 * LeftIsDown()) { if (moveRL > 0) { moveRL -= RLing * LeftIsDown() * 2; } else { moveRL -= RLing * LeftIsDown(); } } else { if (moveRL != 0 && Math.abs(moveRL) < 10 && Math.abs(_rotation) < 2) { if (_root.tehwallz.hitTest(this._x + this.RAnchx(), this._y + this.RAnchy() + 20, true) && !_root.testAll(this._x + this.LAnchx(), this._y + this.LAnchy() + 20) || _root.tehplatformz.hitTest(this._x + this.RAnchx(), this._y + this.RAnchy() + 20, true) && !_root.testAll(this._x + this.LAnchx(), this._y + this.LAnchy() + 20)) { _xscale = 100; gotoAndStop('LedgeDown'); return true; } if (_root.tehwallz.hitTest(this._x + this.LAnchx(), this._y + this.LAnchy() + 20, true) && !_root.testAll(this._x + this.RAnchx(), this._y + this.RAnchy() + 20) || _root.tehplatformz.hitTest(this._x + this.LAnchx(), this._y + this.LAnchy() + 20, true) && !_root.testAll(this._x + this.RAnchx(), this._y + this.RAnchy() + 20)) { _xscale = -100; gotoAndStop('LedgeDown'); return true; } } } } if (DownIsDown()) { if (Math.abs(moveRL) > 6) { if (Math.abs(moveRL) < 12) { moveRL = 12 * (moveRL / Math.abs(moveRL)); } _xscale = (moveRL / Math.abs(moveRL)) * 100; gotoAndStop('DownSlide'); } } EveryFrame(); tilt += (this._rotation - tilt) / 3; CharPencilWalk._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); }; CharPencilWalk._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 74 { onEnterFrame = function () { slopeStuff(); if (moveRL * rotAccel > 0) { moveRL += rotAccel; } else { moveRL += rotAccel / 3; } if (friction) { RLing = 0.2; } else { RLing = (25 - Math.abs(moveRL)) / 20; } if (RightIsDown() && moveRL < 20 * RightIsDown()) { if (moveRL < 0) { moveRL += RLing * RightIsDown() * 2; } else { moveRL += RLing * RightIsDown(); } } else { if (LeftIsDown() && moveRL > -20 * LeftIsDown()) { if (moveRL > 0) { moveRL -= RLing * LeftIsDown() * 2; } else { moveRL -= RLing * LeftIsDown(); } } else { if (moveRL != 0 && Math.abs(moveRL) < 10 && Math.abs(_rotation) < 2) { if (_root.tehwallz.hitTest(this._x + this.RAnchx(), this._y + this.RAnchy() + 20, true) && !_root.testAll(this._x + this.LAnchx(), this._y + this.LAnchy() + 20) || _root.tehplatformz.hitTest(this._x + this.RAnchx(), this._y + this.RAnchy() + 20, true) && !_root.testAll(this._x + this.LAnchx(), this._y + this.LAnchy() + 20)) { _xscale = 100; gotoAndStop('LedgeDown'); return true; } if (_root.tehwallz.hitTest(this._x + this.LAnchx(), this._y + this.LAnchy() + 20, true) && !_root.testAll(this._x + this.RAnchx(), this._y + this.RAnchy() + 20) || _root.tehplatformz.hitTest(this._x + this.LAnchx(), this._y + this.LAnchy() + 20, true) && !_root.testAll(this._x + this.RAnchx(), this._y + this.RAnchy() + 20)) { _xscale = -100; gotoAndStop('LedgeDown'); return true; } } } } if (DownIsDown()) { if (Math.abs(moveRL) > 6) { if (Math.abs(moveRL) < 12) { moveRL = 12 * (moveRL / Math.abs(moveRL)); } _xscale = (moveRL / Math.abs(moveRL)) * 100; gotoAndStop('DownSlide'); } } EveryFrame(); tilt += (this._rotation - tilt) / 3; CharPencilWalk._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); }; CharPencilWalk._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 75 { isCarrying = 'pencil'; pencilOut = 10; if (nextSwipe == 1) { CharBuzzSaw.gotoAndPlay('buzzSaw'); accelUD = 0.75; maxUD = 20; } else { CharBuzzSaw.gotoAndPlay('tornadoSpin'); accelUD = 0.5; maxUD = 15; moveUD *= 0.8; } if (slashSkip > 0) { CharBuzzSaw.gotoAndPlay(CharBuzzSaw._currentframe + slashSkip); slashSkip = 0; } CharBuzzSaw._rotation = 0; airPause = -1; toSmoothScroll = -(_root.SmoothScroll / Math.abs(_root.SmoothScroll)) * 75; aPlatzOn = -1; onEnterFrame = function () { if (airPause == 0) { moveRL = oRL; moveUD = oUD; airPause = -1; } else { if (airPause > 0) { --airPause; } } if (airPause < 0) { if (this.moveUD < maxUD) { if (FloatUp <= 0 || moveUD > 0) { FloatUp = 0; moveUD += accelUD; } else { --FloatUp; } } else { if (moveUD > maxUD) { moveUD -= 2; } } if (TempStill && moveUD > 0) { Still = false; TempStill = false; } if (FloatStill && _y > fromFloatY) { FloatStill = false; } if (!(Still || TempStill || FloatStill)) { if (RightIsDown() && moveRL < 10) { moveRL += 0.5; } if (LeftIsDown() && moveRL > -10) { moveRL -= 0.5; } } if (Math.abs(moveRL) > 10) { moveRL *= 0.99; } _rotation = _rotation * 0.9; if (nextSwipe == 1) { CharBuzzSaw._rotation += 50; } } if (_root.tehwallz.hitTest(_x + 30 + moveRL, _y - 15, true)) { var v3 = 0; while (v3 < Math.abs(moveRL)) { if (!_root.tehwallz.hitTest(_x + 30, _y - 15, true)) { _x = _x + 1; } else { break; } ++v3; } if (moveRL < 5) { moveRL = -10; } else { moveRL *= -1; } _root.powEffect(_x + 30, _y - 15, 0, 0, _xscale, -90); _root.playSound('swordClang', _x, 80 + Math.abs(moveRL * 5)); } else { if (_root.tehwallz.hitTest(_x - 30 + moveRL, _y - 15, true)) { var v3 = 0; while (v3 < Math.abs(moveRL)) { if (!_root.tehwallz.hitTest(_x - 30, _y - 15, true)) { _x = _x - 1; } else { break; } ++v3; } if (moveRL > -5) { moveRL = 10; } else { moveRL *= -1; } _root.powEffect(_x - 30, _y - 15, 0, 0, _xscale, 90); _root.playSound('swordClang', _x, 80 + Math.abs(moveRL * 5)); } } if (!CheckAirAttack(_x, _y, moveRL, moveUD)) { temp = JumpGuide(false, 'drawIdle', true, true); } predictGround(); tilt += (_rotation - tilt) / 5; CharPencilDraw._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); }; CharPencilDraw._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 76 { moveRL = 0; smokeRot = 0; onEnterFrame = function () { RLFunc(); if (platUD < -3) { CharBaddieLand.play(); } tilt += (smokeRot - tilt) / 3; CharBaddieLand._rotation = tilt * (_xscale / Math.abs(_xscale)); }; CharBaddieLand._rotation = tilt * (_xscale / Math.abs(_xscale)); } frame 84 { hairRL = 0; moveRL = 0; onEnterFrame = function () { if (_x - (SnapTo._x - 10) > 2) { _x = _x + (SnapTo._x - 10 - _x) / 3; centerX = _x; } else { _xscale = 100; delete onEnterFrame; } char._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); }; char._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 85 { if (_root.progressStatus == -1) { delete onEnterFrame; } else { onEnterFrame = function () { if (this.JumpListener()) { moveRL = -5; } }; } } frame 86 { moveRL = 0; moveUD = 40; _y = _y - 20; _x = _x + 60; _rotation = 0; centerX = _x; centerY = _y - 25; onEnterFrame = function () { if (RightIsDown()) { _x = _x + 20; } if (LeftIsDown()) { _x = _x - 20; } if (UpIsDown()) { _y = _y - 20; CharYPoint -= 20; } if (DownIsDown()) { _y = _y + 20; CharYPoint += 20; } if (JumpIsDown()) { JumpFunc(0); } }; } frame 97 { loose = false; performN = 50; if (TempStill) { b = 7; } onEnterFrame = function () { if (!_root.Paused) { oMoveRL = moveRL; slopeStuff(); if (Math.abs(moveRL + rotAccel * 1) < 80) { moveRL += rotAccel * 1; } else { moveRL *= 80 / Math.abs(moveRL); } if (performN > 0) { performN -= Math.abs(moveRL); } else { _root.movePerformed('riding'); performN = 50; } if (!this.JumpListener()) { this.RLFunc(false); } CheckBaddieHit(_x, _y, RLx(moveRL), RLy(moveRL)); if (Math.abs(_rotation) > 15) { hairRL = moveRL; hairUD = 0; } if (Key.isDown(73)) { isRiding = 'nothing'; gotoAndStop('Idle'); } tilt += (this._rotation - tilt) / 3; CharRide._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } else { CharRide.stop(); } }; CharRide._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } frame 98 { fallView = _root.CharYPoint - _y; springView = 0; gonnaWallJump = false; toSmoothScroll = -(_root.SmoothScroll / Math.abs(_root.SmoothScroll)) * 75; waterLanding = false; hitGround = 100; smokeRot = 0; targetRot = 0; if (Math.abs(_rotation) > 45) { awesomeSpin = fliprot * (_xscale / 33); } else { awesomeSpin = 0; } if (wallJumped) { } onEnterFrame = function () { if (Still || TempStill || FloatStill) { if (TempStill && moveUD > 0) { Still = false; TempStill = false; } if (FloatStill && _y > fromFloatY) { FloatStill = false; } if (this.moveUD < 25) { if (FloatUp <= 0 || moveUD > 0) { FloatUp = 0; if (_root.water.hitTest(_x + moveRL, _y + moveUD, true)) { moveUD += 0.7; } else { ++moveUD; } } else { --FloatUp; } } else { if (moveUD > 26) { moveUD -= 2; } } } else { if (RightIsDown() && moveRL < 12) { if (moveRL <= 0) { moveRL += 0.5; } else { moveRL += 0.25; } } if (LeftIsDown() && moveRL > -12) { if (moveRL >= 0) { moveRL -= 0.5; } else { moveRL -= 0.25; } } if (moveUD < 25) { if ((!JumpIsDown() || FloatUp <= 0 || moveUD > 0) && FloatUp <= 6) { FloatUp = 0; if (_root.water.hitTest(_x + moveRL, _y + moveUD, true)) { moveUD += 0.7; } else { ++moveUD; } } else { --FloatUp; } } } if (Math.abs(moveRL) > 12) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.25; } var v4 = this._x; var v3 = this._y; tempRL = moveRL; tempUD = moveUD; checkFloat = FloatUp; hitGround = 100; var v6 = 100; var v5 = 1; while (v5 < 100) { if (!(Still || TempStill || FloatStill)) { if (this.RightIsDown() && tempRL < 8) { if (tempRL <= 0) { ++tempRL; } else { tempRL += 0.5; } } if (this.LeftIsDown() && tempRL > -8) { if (tempRL >= 0) { --tempRL; } else { tempRL -= 0.5; } } } if (_root.tehwallz.hitTest(v4 + spread + tempRL, v3 - 40 + tempUD, true) && !_root.tehwallz.hitTest(v4 + spread, v3 - 40 + tempUD, true) || _root.tehwallz.hitTest(v4 - spread + tempRL, v3 - 40 + tempUD, true) && !_root.tehwallz.hitTest(v4 - spread, v3 - 40 + tempUD, true)) { if (v5 < v6) { wallX = v4; wallY = v3; v6 = v5; } tempRL = 0; } if (checkFloat > 0) { --checkFloat; } else { if (tempUD < 25) { ++tempUD; } } tempLand1 = _root.quickLandTest(v4 + spread, v3, tempRL, tempUD, isTall, _alpha); tempLand2 = _root.quickLandTest(v4 - spread, v3, tempRL, tempUD, isTall, _alpha); if (tempLand1 != 'nothing' || tempLand2 != 'nothing') { waterLanding = tempLand1 == 'water' || tempLand2 == 'water'; if (tempLand1 == 'ground' || tempLand2 == 'ground') { temprot = -Math.atan2(-tempRL, -tempUD) / 0.0174532925199433; tempSpeed = Math.sqrt(tempRL * tempRL + tempUD * tempUD); targetRot = _root.FindRot(temprot, v4, v3, tempSpeed, spread); } else { targetRot = 0; } hitGround = v5; v5 = 0; while (v5 < 10) { if (_root.quickLandTest(v4 + spread, v3, tempRL / 10, tempUD / 10, isTall, _alpha) == 'nothing' && _root.quickLandTest(v4 - spread, v3, tempRL / 10, tempUD / 10, isTall, _alpha) == 'nothing') { v4 += tempRL / 10; v3 += tempUD / 10; } else { break; } ++v5; } break; } v4 += tempRL; v3 += tempUD; ++v5; } if (tempLand1 == 'hangz' || tempLand2 == 'hangz') { v3 += 75; } if (moveUD < -20) { _root.CharXPoint = _x; fallView += (moveUD * 10 - fallView) / 5; _root.CharYPoint = _y + fallView; } else { if (v6 < hitGround && (v3 > _y + 200 || wallJumped)) { gonnaWallJump = true; if (v6 > 1) { _root.SmoothScroll += (toSmoothScroll - _root.SmoothScroll) / v6; var v7 = (wallY - _root.CharYPoint) / v6; if (Math.abs(wallY - _root.CharYPoint) > 2) { _root.CharYPoint += (wallY - _root.CharYPoint) / v6; } } fallView = _root.CharYPoint - _y; } else { if (moveUD > 5 && v3 > _y + 300 && _root.CharYPoint < v3) { _root.CharXPoint = _x; fallView += (moveUD * 18 - fallView) / 5; _root.CharYPoint = _y + fallView; } else { if (v3 > _y + 400 && moveUD < 0) { _root.CharXPoint = _x; if (_y + moveUD * 10 > _root.CharYPoint) { if (springView < 1600) { springView += 100; } _root.CharYPoint = _y + moveUD * 10; fallView = _root.CharYPoint - _y; } } else { _root.CharXPoint = _x; if (hitGround > 1) { _root.CharYPoint += (v3 - _root.CharYPoint) / hitGround; } fallView = _root.CharYPoint - _y; } } } } _root.debug = _root.CharYPoint; awesomeSpin *= 0.99; if (awesomeSpin != 0) { CharRide._rotation += awesomeSpin; } if (Math.abs(fliprot) > 5 || Math.abs(_rotation) > 45) { _rotation = _rotation + fliprot; } else { _rotation = _rotation * 0.9; } if (Math.abs(tilt - targetRot) > 90 && this.fliprot != 0) { _rotation = _rotation + fliprot; } else { _rotation = _rotation + (targetRot - _rotation) / 3; } JumpGuide(); if (_root.water.hitTest(_x + moveRL, _y - isTall / 2, true) && moveUD > 0) { waterY = _y - isTall / 2; while (_root.water.hitTest(_x + moveRL, waterY, true)) { --waterY; } while (!_root.water.hitTest(_x + moveRL, waterY + 1, true)) { ++waterY; } _root.waterSplash(_x + moveRL, waterY + 10, 100 + moveUD * 5, 0); _root.waterSplash(_x + moveRL, waterY + 10, -(100 + moveUD * 5), 0); eRot = -Math.atan2(-moveRL, -moveUD) / 0.0174532925199433; swimRL = Math.sqrt(moveRL * moveRL + moveUD * moveUD); resetJumpStuff(); rotOffset = 0; _rotation = 0; tilt = 0; swimStatus = 'diving'; smokeAccel = 0; rotAccel = 0; gotoAndStop('Swim'); } if (Math.abs(this.tilt - this._rotation) > 180) { if (this.tilt > 0) { this.tilt -= 360; } else { this.tilt += 360; } } this.tilt += (this._rotation - this.tilt) / 3; this.CharJump._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); }; this.CharJump._rotation = (-_rotation + tilt) * (_xscale / Math.abs(_xscale)); } } movieClip 6586 { } movieClip 6600 { } movieClip 6611 { } movieClip 6612 Snail { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID); } ++_root.BaddieCount; ItIs = 'Snail'; Status = 'Stupid'; if (isWearing == undefined) { isWearing = 'nothing'; } health = 1; isWide = 50; worth = 2; attackStrength = 20; jabSound = 'BadSlash'; slashSound = 'baseballHit'; originalX = _x; originalY = _y; recenterPoints(); hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; getAttacked = _root.standardGetAttacked; _root.baddieSetupFunc(this); } frame 2 { if (InstaKill) { gotoAndStop(19); } else { if (_root.LevelLoaded == 'Level10') { nextFrame(); } else { onEnterFrame = function () { if (Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600 || Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600) { if (_root.tehhangz.hitTest(_x + moveRL, _y + moveUD + 6, true)) { while (!_root.tehhangz.hitTest(_x, _y + 2, true)) { _y = _y + 1; } while (_root.tehhangz.hitTest(_x, _y, true)) { _y = _y - 1; } nextFrame(); } else { if (WraptoGround(true, false) == 'Fall') { JumpFunc(0); } else { nextFrame(); } } } }; stop(); } } } frame 3 { moveRL = Math.round(_xscale / 50); moveUD = 0; InShell._rotation = 0; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; onEnterFrame = function () { if (_root.Paused) { InShell.stop(); } else { InShell.play(); if (!(Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600) && !(Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600)) { prevFrame(); } temp = RLFunc(); if (temp == 'rEdge' || temp == 'rBackEdge') { _xscale = 100; moveRL = 2; } else { if (temp == 'lEdge' || temp == 'lBackEdge') { _xscale = -100; moveRL = -2; } else { if (temp == 'Wall' || _xscale * _rotation < -6000) { _xscale = -_xscale; moveRL = Math.round(_xscale / 50); } } } } }; stop(); } frame 4 { onEnterFrame = function () { if (!Paused) { if (moveUD < 20) { ++moveUD; } JumpGuide('Idle'); } }; stop(); } frame 8 { onEnterFrame = function () { this._x += this.shakeRL / 2; this.shakeRL = -this.shakeRL; if (this.b > 0) { --this.b; } else { if (this.health > 0) { this.coma = this.comaMax; if (this.moveUD == 0) { this.gotoAndStop('stunLand'); } else { this.gotoAndStop('stunjump'); } } else { this.gotoAndStop('deadjump'); } } }; } frame 10 { play(); } frame 14 { stop(); } frame 15 { delete onEnterFrame; if (Math.abs(moveRL) > 5) { gotoAndPlay('laterdeadjump'); } else { play(); } } frame 17 { recenterPoints(); _rotation = 0; InShell._rotation = 0; _root.Char.lockOn = -1; hitCharFunc = _root.standardHitCharDeadJumpFunc; onEnterFrame = function () { if (!_root.Paused) { if (downTime > 0) { --downTime; } _x = _x + moveRL; ++moveUD; _y = _y + moveUD; spiderRotate += ((moveRL * _xscale / 100) * 1.5 - spiderRotate) / 10; InShell._rotation += spiderRotate; if (_root.stageY * (100 / _root._yscale) - _y < _root.MinY - 700) { messagePopup('spiderGone'); if (combo > 1) { if (this.combo != (this.comboSome - 18) / 39) { while (!false) { } } _root.APISnailShellCombo(this.combo); } if (_root.spidersOut > 0) { --_root.spidersOut; } _root.removeBaddie(ID, true); } } }; play(); } frame 19 { _root.SnailShell = _root.ELayer.attachMovie('SnailShell', 'SnailShell', 999, {'_x': _x + moveRL, '_y': _y + moveUD, 'moveRL': moveRL, 'moveUD': moveUD, 'downTime': 10, 'InShellrotation': 120, 'rotter': moveRL * (_xscale / 25), 'insomnia': InstaKill}); _root.BLayer.Baddie100 = _root.SnailShell; _root.removeBaddie(ID, true); trace(this); } frame 35 { onEnterFrame = function () { play(); }; } frame 52 { gotoAndStop('Idle'); } } movieClip 6613 SnailShell { frame 1 { ID = i; mass = 1; combo = 0; comboSome = 18; bouncy = false; bounceThresh = 5; bounceDefault = 0.8; aBadOn = -1; CheckBaddieHit = _root.shellCheckBaddieHit; Standing = function () { return false; }; ItIs = 'SnailShell'; isWide = 20; health = 1000; jabSound = 'Thud'; slashSound = 'baseballHit'; if (_root.LevelLoaded == 'Bonus13' || _root.LevelLoaded == 'Level12') { unleashed = true; } getAttacked = _root.standardGetAttacked; _root.baddieSetupFunc(this); } frame 2 { this.moveUD = 0; facing = _xscale / Math.abs(_xscale); if (_root.InteractLayer.golfHole.hitTest(centerX, centerY, true)) { if (_root.ELayer.ShellPointer != undefined) { _root.ELayer.ShellPointer.removeMovieClip(_root.ELayer.ShellPointer); } _root.playSound('success'); _root.GolfChallengeFinish(); } onEnterFrame = function () { xDist = _root.theX + centerX; yDist = _root.theY + centerY; offDist = Math.sqrt(xDist * xDist + yDist * yDist); if (!_root.Paused && (Math.abs(offDist) < 3000 || insomnia)) { slopeStuff(); if (Math.abs(rotAccel) > 1) { rotAccel /= Math.abs(rotAccel); } if (Math.abs(moveRL + rotAccel) < 40) { moveRL += rotAccel; } else { moveRL *= 40 / Math.abs(moveRL); } if (downTime > 0) { --downTime; } else { if (_root.Char.isAttacking) { } else { if (_root.Char.hitTest(centerX - _root.Char.moveRL, centerY - _root.Char.moveUD, true)) { combo = 1; comboSome = 57; downTime = 5; if (_root.Char._currentframe == 7) { JumpFunc(0); moveRL = (_x - _root.Char._x) / 10 + _root.Char.moveRL; moveUD = -Math.abs(_root.Char.moveUD * 2); JumpGuide(); this.spring = -6; _root.movePerformed('landstompshell'); } else { if (_root.Char.moveRL == 0) { if (Math.abs(moveRL) > 4) { moveRL = -moveRL / 2; } else { moveRL = 0; downTime = 0; } this.spring = Math.abs(this.moveRL) * 0.3; _root.movePerformed('tapshell'); } else { if (_root.Char.moveRL * (centerX - _root.Char._x) < 0) { moveRL = -moveRL / 2; this.spring = Math.abs(this.moveRL) * 0.3; _root.movePerformed('tapshell'); } else { if (_root.Char._currentframe == 6 || Math.abs(_root.Char.moveRL) < 10 && _root.Char._currentframe != 31) { moveRL = _root.Char.moveRL * 1.5; if (_x > _root.Char._x) { moveRL += 5; } else { moveRL -= 5; } this.spring = Math.abs(this.moveRL) * 0.3; _root.movePerformed('groundshell'); } else { JumpFunc(0); if (_root.Char._x > _x) { if (_root.Char._currentframe == 31) { moveRL = (20 + Math.abs(_root.Char.moveRL)) * Math.cos((_root.Char._rotation - 100) * 0.0174532925199433); moveUD = (20 + Math.abs(_root.Char.moveRL)) * Math.sin((_root.Char._rotation - 100) * 0.0174532925199433); this.spring = -6; } else { moveRL = (20 + Math.abs(_root.Char.moveRL) * 1.5) * Math.cos((_root.Char._rotation - 135) * 0.0174532925199433); moveUD = (20 + Math.abs(_root.Char.moveRL) * 1.5) * Math.sin((_root.Char._rotation - 135) * 0.0174532925199433); if (_root.Char._currentframe != 12 && _root.Char._xscale * (centerX - _root.Char._x) > 0) { _root.Char.JumpFunc(4); _root.movePerformed('kickshell'); _root.Char.gotoAndStop('Kick'); } this.spring = Math.abs(this.moveRL) * 0.3; rotter = moveRL * 2; JumpGuide(); } } else { if (_root.Char._currentframe == 31) { moveRL = (20 + Math.abs(_root.Char.moveRL)) * Math.cos((_root.Char._rotation - 80) * 0.0174532925199433); moveUD = (20 + Math.abs(_root.Char.moveRL)) * Math.sin((_root.Char._rotation - 80) * 0.0174532925199433); this.spring = -6; } else { moveRL = (20 + Math.abs(_root.Char.moveRL) * 1.5) * Math.cos((_root.Char._rotation - 45) * 0.0174532925199433); moveUD = (20 + Math.abs(_root.Char.moveRL) * 1.5) * Math.sin((_root.Char._rotation - 45) * 0.0174532925199433); if (_root.Char._currentframe != 12 && _root.Char._xscale * (centerX - _root.Char._x) > 0) { _root.Char.JumpFunc(4); _root.movePerformed('kickshell'); _root.Char.gotoAndStop('Kick'); } this.spring = Math.abs(this.moveRL) * 0.3; rotter = moveRL * 2; JumpGuide(); } } } } } } this.nowSpeed = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); ex = _root.Char.moveRL - moveRL; ey = _root.Char.moveUD - moveUD; if (Math.abs(moveRL) > 2 || Math.abs(moveUD) > 2) { _root.makeThud(_x, Math.sqrt(ex * ex + ey * ey) * 10); _root.powEffect(centerX, centerY, this.moveRL / 5, this.moveUD / 5, 100, -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433); } return false; } } } if (Math.abs(moveRL) > 1) { moveRL -= moveRL / Math.abs(moveRL) / 8; } else { if (Math.abs(rotAccel) < 0.05) { moveRL = 0; } } if (friction) { if (smokeN > 0) { --smokeN; } else { smokeN = 2; _root.inkSplat(_x + RLx(moveRL), _y + RLy(moveRL), moveRL * 4, _rotation); } rotter += (moveRL * 2 - rotter) / 20; } else { rotter = moveRL * 2; } if (CheckBaddieHit()) { } else { oRL = moveRL; temp = RLFunc(false); this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.7; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; this.jumpAnchor._rotation = -this._rotation * (this._xscale / Math.abs(this._xscale)); if (aPlatzOn == -1) { if (temp == 'rEdge' || temp == 'rBackEdge') { platPointX = _x + RAnchx(_rotation * 0.0174532925199433); platPointY = _y + RAnchy(_rotation * 0.0174532925199433) + 1; for (;;) { if (!(_root.testWallzAndPlatz(platPointX - 1, platPointY + 2, true) || _root.testWallzAndPlatz(platPointX - 1, platPointY - 3, true))) break; while (!_root.testWallzAndPlatz(platPointX - 1, platPointY, true)) { ++platPointY; } while (_root.testWallzAndPlatz(platPointX - 1, platPointY - 1, true)) { --platPointY; } --platPointX; } if (centerX < platPointX) { whichEdge = 'right'; gotoAndStop('Edge'); } } else { if (temp == 'lEdge' || temp == 'lBackEdge') { platPointX = _x + LAnchx(_rotation * 0.0174532925199433); platPointY = _y + LAnchy(_rotation * 0.0174532925199433) + 1; for (;;) { if (!(_root.testWallzAndPlatz(platPointX + 1, platPointY + 2, true) || _root.testWallzAndPlatz(platPointX + 1, platPointY - 3, true))) break; while (!_root.testWallzAndPlatz(platPointX + 1, platPointY, true)) { ++platPointY; } while (_root.testWallzAndPlatz(platPointX + 1, platPointY - 1, true)) { --platPointY; } ++platPointX; } if (centerX > platPointX) { whichEdge = 'left'; gotoAndStop('Edge'); } } } } if (temp == 'Wall') { if (Math.abs(moveRL) > 4) { _root.makeThud(_x, Math.abs(moveRL * 10)); moveRL = -oRL / 2; this.spring = 6; } else { moveRL = 0; } } } InShellrotation += rotter; InShell._rotation = (InShellrotation - _rotation) * facing; if (_root.InteractLayer.hitTest(centerX, centerY, true)) { var v3 = 0; while (_root.InteractLayer['Coin' + v3]._x != undefined) { if (_root.InteractLayer['Coin' + v3].hitTest(centerX, centerY, true) && _root.InteractLayer['Coin' + v3]._currentframe == 1) { _root.InteractLayer['Coin' + v3].rot = (moveRL + moveUD + random(10)) * 2; _root.InteractLayer['Coin' + v3].gotoAndPlay('Hit'); _root.CoinVoice.start(); break; } ++v3; } } } }; stop(); } frame 3 { gotoAndStop('Jump'); } frame 4 { facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (groundLandProtect > 0) { --groundLandProtect; } xDist = _root.theX + centerX; yDist = _root.theY + centerY; offDist = Math.sqrt(xDist * xDist + yDist * yDist); if (!_root.Paused && (Math.abs(offDist) < 3000 || insomnia)) { if (_root.stageY * (100 / _root._yscale) - _y < _root.MinY - 700) { _root.messagePopup('falloff'); moveRL = 0; moveUD = 0; _rotation = 0; _x = originalX; _y = originalY; recenterPoints(); gotoAndStop('Idle'); } else { if (FloatUp <= 0 || moveUD > 0) { FloatUp = 0; if (_root.water.hitTest(_x + moveRL, _y + moveUD, true)) { moveUD += 0.7; } else { if (moveUD < 20) { ++moveUD; } } if (TempStill) { if (moveUD > 0) { TempStill = false; } } else { if (Math.abs(this.moveRL) > 4) { this.moveRL *= 0.975; } if (Math.abs(this.moveUD) > 20) { this.moveUD *= 0.975; } } } else { --FloatUp; } if (downTime > 0) { --downTime; } else { if (_root.Char.isAttacking) { } else { if (_root.Char.hitTest(centerX + moveRL, centerY + moveUD, true)) { downTime = 5; ++combo; comboSome += 39; if (combo > 1) { gNHD = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('messagePopup', 'combo!' + gNHD, gNHD, {'_x': _x + 40, '_y': _y - 30, 'smoke': combo + '!'}); } if (_root.Char._currentframe == 7) { moveRL = (_x - _root.Char._x) / 10 + _root.Char.moveRL; if (Char.moveUD > 0 && (_root.testAll(this.centerX + 15 + this.moveRL, this.centerY + 30 + this.moveUD, true) || _root.testAll(this.centerX - 15 + this.moveRL, this.centerY + 30 + this.moveUD, true))) { moveUD = Math.abs(_root.Char.moveUD) * -2; } else { moveUD = _root.Char.moveUD * 2; } this.spring = -6; _root.movePerformed('headbuttshell'); } else { if (_root.Char.moveRL == 0) { maxSpeed = Math.sqrt(moveRL * moveRL + moveUD * moveUD) / 2; moveRL = _x - _root.Char._x; moveUD = _y - _root.Char._y; nowSpeed = Math.sqrt(moveRL * moveRL + moveUD * moveUD); moveRL *= maxSpeed / nowSpeed; moveUD *= maxSpeed / nowSpeed; if (Math.abs(moveRL) > Math.abs(moveUD)) { this.spring = Math.abs(this.moveRL) * 0.3; } else { this.spring = -Math.abs(this.moveUD) * 0.3; } this._xscale = (100 - this._yscale + 100) * this.facing; _root.movePerformed('tapshell'); } else { if (_root.Char.moveRL < 0 || (_root.Char.moveRL == 0 || Char.moveUD > -4) && _x < _root.Char._x) { if (_root.Char._currentframe == 31) { moveRL = (10 + Math.abs(_root.Char.moveRL)) * Math.cos((_root.Char._rotation - 100) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.Char.moveRL)) * Math.sin((_root.Char._rotation - 100) * 0.0174532925199433); this.spring = -6; _root.movePerformed('popshell'); } else { moveRL = (10 + Math.abs(_root.Char.moveRL) * 1.5) * Math.cos((_root.Char._rotation - 135) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.Char.moveRL) * 1.5) * Math.sin((_root.Char._rotation - 135) * 0.0174532925199433); this.spring = 6; _root.movePerformed('tapshell'); } } else { if (_root.Char._currentframe == 31) { moveRL = (10 + Math.abs(_root.Char.moveRL)) * Math.cos((_root.Char._rotation - 80) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.Char.moveRL)) * Math.sin((_root.Char._rotation - 80) * 0.0174532925199433); this.spring = -6; _root.movePerformed('popshell'); } else { moveRL = (10 + Math.abs(_root.Char.moveRL) * 1.5) * Math.cos((_root.Char._rotation - 45) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.Char.moveRL) * 1.5) * Math.sin((_root.Char._rotation - 45) * 0.0174532925199433); this.spring = 6; _root.movePerformed('tapshell'); } } } } ex = _root.Char.moveRL - moveRL; ey = _root.Char.moveUD - moveUD; _root.makeThud(_x, Math.sqrt(ex * ex + ey * ey) * 10); if (_root.Char.RightIsDown()) { moveRL += 7; } else { if (_root.Char.LeftIsDown()) { moveRL -= 7; } } _root.powEffect(centerX, centerY, this.moveRL / 5, this.moveUD / 5, 100, -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433); } } } oRL = moveRL; if (JumpGuide('Idle') == 'Wall') { } rotter += (this.moveRL * 1.5 - rotter) / 30; this.InShellrotation += rotter; if (this.InShellrotation > 180) { this.InShellrotation -= 360; } else { if (this.InShellrotation < -180) { this.InShellrotation += 360; } } this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.7; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (_root.InteractLayer.hitTest(centerX, centerY, true)) { var v3 = 0; while (_root.InteractLayer['Coin' + v3]._x != undefined) { if (_root.InteractLayer['Coin' + v3].hitTest(centerX, centerY, true) && _root.InteractLayer['Coin' + v3]._currentframe == 1) { _root.InteractLayer['Coin' + v3].rot = (moveRL + moveUD + random(10)) * 2; _root.InteractLayer['Coin' + v3].gotoAndPlay('Hit'); _root.CoinVoice.start(); break; } ++v3; } } } } }; stop(); } frame 5 { onEnterFrame = function () { if (Math.abs(_x - _root.Char._x) < 2000 && Math.abs(_y - _root.Char._y) < 1500 || Math.abs(_x - _root.CharQTP._x) < 2000 && Math.abs(_y - _root.CharQTP._y) < 1500) { ++moveUD; _x = _x + moveRL; _y = _y + moveUD; } else { _root.snailIsOut = false; _alpha = 0; delete onEnterFrame; } }; } frame 6 { moveUD = 0; edgeRot = -Math.atan2(centerX - platPointX, centerY - platPointY) / 0.0174532925199433 + 90; oCX = centerX; oCY = centerY; centerX = platPointX + spread * Math.cos(edgeRot * 0.0174532925199433) * 1.5; centerY = platPointY + spread * Math.sin(edgeRot * 0.0174532925199433); tempRL = centerX - oCX; tempUD = centerY - oCY; if (tempRL != 0) { rotter = Math.sqrt(tempRL * tempRL + tempUD * tempUD) * 4 * (tempRL / Math.abs(tempRL)); } InShellrotation += rotter; InShell._rotation = InShellrotation + -_rotation; _x = centerX + 15 * Math.cos((_rotation + 90) * 0.0174532925199433); _y = centerY + 15 * Math.sin((_rotation + 90) * 0.0174532925199433); onEnterFrame = function () { if (_root.Char.hitTest(centerX, centerY, true)) { combo = 1; comboSome = 57; downTime = 5; if (_root.Char._currentframe == 7) { JumpFunc(0); moveRL = (_x - _root.Char._x) / 10 + _root.Char.moveRL; moveUD = -Math.abs(_root.Char.moveUD * 2); } else { if (_root.Char.moveRL == 0) { if (Math.abs(moveRL) > 4) { moveRL = -moveRL / 2; } else { moveRL = 0; downTime = 0; } } else { if (_root.Char.moveRL * (centerX - _root.Char._x) < 0) { moveRL = -moveRL / 2; } else { if (_root.Char._currentframe == 6 || Math.abs(_root.Char.moveRL) < 10 && _root.Char._currentframe != 31) { moveRL = _root.Char.moveRL * 1.5; if (_x > _root.Char._x) { moveRL += 5; } else { moveRL -= 5; } } else { JumpFunc(0); if (_root.Char._x > _x) { if (_root.Char._currentframe == 31) { moveRL = (20 + Math.abs(_root.Char.moveRL)) * Math.cos((_root.Char._rotation - 100) * 0.0174532925199433); moveUD = (20 + Math.abs(_root.Char.moveRL)) * Math.sin((_root.Char._rotation - 100) * 0.0174532925199433); } else { moveRL = (20 + Math.abs(_root.Char.moveRL) * 1.5) * Math.cos((_root.Char._rotation - 135) * 0.0174532925199433); moveUD = (20 + Math.abs(_root.Char.moveRL) * 1.5) * Math.sin((_root.Char._rotation - 135) * 0.0174532925199433); if (_root.Char._currentframe != 12 && _root.Char._xscale * (centerX - _root.Char._x) > 0) { _root.Char.JumpFunc(4); _root.movePerformed('kickshell'); _root.Char.gotoAndStop('Kick'); } rotter = moveRL * 4; JumpGuide(); } } else { if (_root.Char._currentframe == 31) { moveRL = (20 + Math.abs(_root.Char.moveRL)) * Math.cos((_root.Char._rotation - 80) * 0.0174532925199433); moveUD = (20 + Math.abs(_root.Char.moveRL)) * Math.sin((_root.Char._rotation - 80) * 0.0174532925199433); } else { moveRL = (20 + Math.abs(_root.Char.moveRL) * 1.5) * Math.cos((_root.Char._rotation - 45) * 0.0174532925199433); moveUD = (20 + Math.abs(_root.Char.moveRL) * 1.5) * Math.sin((_root.Char._rotation - 45) * 0.0174532925199433); if (_root.Char._currentframe != 12 && _root.Char._xscale * (centerX - _root.Char._x) > 0) { _root.Char.JumpFunc(4); _root.movePerformed('kickshell'); _root.Char.gotoAndStop('Kick'); } rotter = moveRL * 4; JumpGuide(); } } } } } } ex = _root.Char.moveRL - moveRL; ey = _root.Char.moveUD - moveUD; _root.makeThud(_x, Math.sqrt(ex * ex + ey * ey) * 10); _root.powEffect(centerX, centerY, this.moveRL / 5, this.moveUD / 5, 100, -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433); return false; } else { if (_root.CharQTP.hitTest(centerX, centerY, true)) { combo = 1; comboSome = 57; downTime = 5; if (_root.CharQTP._currentframe == 7) { JumpFunc(0); moveRL = (_x - _root.CharQTP._x) / 10 + _root.CharQTP.moveRL; moveUD = -Math.abs(_root.CharQTP.moveUD * 2); } else { if (_root.CharQTP.moveRL == 0) { if (Math.abs(moveRL) > 4) { moveRL = -moveRL / 2; } else { moveRL = 0; downTime = 0; } } else { if (_root.CharQTP.moveRL * (centerX - _root.CharQTP._x) < 0) { moveRL = -moveRL / 2; } else { if (_root.CharQTP._currentframe == 6 || Math.abs(_root.CharQTP.moveRL) < 10 && _root.CharQTP._currentframe != 31) { moveRL = _root.CharQTP.moveRL * 1.5; if (_x > _root.CharQTP._x) { moveRL += 5; } else { moveRL -= 5; } } else { JumpFunc(0); if (_root.CharQTP._x > _x) { if (_root.CharQTP._currentframe == 31) { moveRL = (20 + Math.abs(_root.CharQTP.moveRL)) * Math.cos((_root.CharQTP._rotation - 100) * 0.0174532925199433); moveUD = (20 + Math.abs(_root.CharQTP.moveRL)) * Math.sin((_root.CharQTP._rotation - 100) * 0.0174532925199433); } else { moveRL = (20 + Math.abs(_root.CharQTP.moveRL) * 1.5) * Math.cos((_root.CharQTP._rotation - 135) * 0.0174532925199433); moveUD = (20 + Math.abs(_root.CharQTP.moveRL) * 1.5) * Math.sin((_root.CharQTP._rotation - 135) * 0.0174532925199433); if (_root.CharQTP._currentframe != 12 && _root.CharQTP._xscale * (centerX - _root.CharQTP._x) > 0) { _root.CharQTP.JumpFunc(4); _root.CharQTP.gotoAndStop('Kick'); } rotter = moveRL * 4; JumpGuide(); } } else { if (_root.CharQTP._currentframe == 31) { moveRL = (20 + Math.abs(_root.CharQTP.moveRL)) * Math.cos((_root.CharQTP._rotation - 80) * 0.0174532925199433); moveUD = (20 + Math.abs(_root.CharQTP.moveRL)) * Math.sin((_root.CharQTP._rotation - 80) * 0.0174532925199433); } else { moveRL = (20 + Math.abs(_root.CharQTP.moveRL) * 1.5) * Math.cos((_root.CharQTP._rotation - 45) * 0.0174532925199433); moveUD = (20 + Math.abs(_root.CharQTP.moveRL) * 1.5) * Math.sin((_root.CharQTP._rotation - 45) * 0.0174532925199433); if (_root.CharQTP._currentframe != 12 && _root.CharQTP._xscale * (centerX - _root.CharQTP._x) > 0) { _root.CharQTP.JumpFunc(4); _root.CharQTP.gotoAndStop('Kick'); } rotter = moveRL * 4; JumpGuide(); } } } } } } ex = _root.CharQTP.moveRL - moveRL; ey = _root.CharQTP.moveUD - moveUD; _root.makeThud(_x, Math.sqrt(ex * ex + ey * ey) * 10); return false; } else { distX = centerX + moveRL - platPointX; distY = centerY + moveUD + 1 - platPointY; if (Math.sqrt(distX * distX + distY * distY) > spread) { if (_root.tehwallz.hitTest(this.centerX + 17 - moveRL, this.centerY + 17, true) || _root.tehwallz.hitTest(this.centerX - 17 - moveRL, this.centerY + 17, true)) { if (whichEdge == 'right' && _root.testAll(centerX - 15 + moveRL, centerY + 15 + moveUD) || whichEdge == 'left' && _root.testAll(centerX + 15 + moveRL, centerY + 15 + moveUD)) { while (_root.tehwallz.hitTest(this.centerX + 17, this.centerY, true)) { --this.centerX; _root.messagePopup('shellX--B'); } while (_root.tehwallz.hitTest(this.centerX - 17, this.centerY, true)) { ++this.centerX; _root.messagePopup('shellX++B'); } _x = centerX + 15 * Math.cos((_rotation + 90) * 0.0174532925199433); _y = centerY + 15 * Math.sin((_rotation + 90) * 0.0174532925199433); JumpFunc(-moveUD); } else { ++moveUD; if (moveRL != 0) { rotter = Math.sqrt(moveRL * moveRL + moveUD * moveUD) * 4 * (moveRL / Math.abs(moveRL)); } InShellrotation += rotter; InShell._rotation = InShellrotation; centerX += moveRL; centerY += moveUD; _x = centerX; _y = centerY + 15; } } else { _root.messagePopup('release'); while (_root.tehwallz.hitTest(this.centerX + 17, this.centerY, true)) { --this.centerX; _root.messagePopup('shellX--C'); } while (_root.tehwallz.hitTest(this.centerX - 17, this.centerY, true)) { ++this.centerX; _root.messagePopup('shellX++C'); } _rotation = 0; _x = centerX; _y = centerY + 15; InShellrotation += rotter; JumpFunc(-moveUD); JumpGuide(); } } else { moveUD += 0.5; oCX = centerX; oCY = centerY; edgeRot = -Math.atan2(centerX + moveRL - platPointX, centerY + moveUD - platPointY) / 0.0174532925199433 + 90; centerX = platPointX + spread * Math.cos(edgeRot * 0.0174532925199433); centerY = platPointY + spread * Math.sin(edgeRot * 0.0174532925199433); moveRL = centerX - oCX; moveUD = centerY - oCY; if (moveRL != 0) { rotter = Math.sqrt(moveRL * moveRL + moveUD * moveUD) * 4 * (moveRL / Math.abs(moveRL)); } InShellrotation += rotter; InShell._rotation = InShellrotation; _x = centerX; _y = centerY + 15; } } } }; } frame 7 { launch = 0; step = 0; _root.Farsight = 0; downward = true; fliprot = 0; CheckBaddieHit(); this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.8; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (JumpPadLanded) { moveRL = 0; onSpring = _root.BLayer['JumpPad' + aBadOn]; thrustOn = onSpring.Thrust / 2; onSpring.spring = -onSpring.Thrust / 2; offsetX = _x - (onSpring._x + onSpring.springHeight * Math.cos((_rotation - 90) * 0.0174532925199433)); offsetY = offsetX * Math.sin(_rotation * 0.0174532925199433); if (onSpring.canRot) { if (Math.abs(onSpring._rotation - onSpring.launchAngle) > 180) { if (onSpring.launchAngle > onSpring._rotation) { onSpring.launchAngle -= 360; } else { onSpring.launchAngle += 360; } } } onEnterFrame = function () { CheckBaddieHit(); if (Math.abs(offsetX) > 5) { offsetX -= offsetX / 5; offsetY = offsetX * Math.sin(_rotation * 0.0174532925199433); } onSpring.spring += (thrustOn * 4 - onSpring.springHeight) / 6; if (downward) { onSpring.spring += (-thrustOn - onSpring.spring) / 6; } onSpring.springHeight += onSpring.spring; if (onSpring.springHeight < thrustOn * 2) { downward = false; } onSpring.springing._yscale = onSpring.springHeight * 1.666666666666667; onSpring.surface._y = -onSpring.springHeight; if (onSpring.canRot) { onSpring._rotation += (onSpring.launchAngle - onSpring._rotation) / 10; _rotation = onSpring._rotation; } _x = onSpring._x + offsetX + onSpring.springHeight * Math.cos((_rotation - 90) * 0.0174532925199433); _y = onSpring._y + offsetY + onSpring.springHeight * Math.sin((_rotation - 90) * 0.0174532925199433); if (onSpring.spring < thrustOn && onSpring.springHeight > thrustOn * 4) { _root.Spring.start(); onSpring.onEnterFrame = _root.JumpPadReleasedEnterFrame; onSpring.springy = 6; onSpring.yspringy = 4; canSpin = true; FloatUp = onSpring.FloatUp; recenterPoints(); JumpFunc(onSpring.Thrust); TempStill = true; } }; onEnterFrame(); } else { _y = _root.BLayer['Baddie' + aBadOn]._y - _root.BLayer['Baddie' + aBadOn].ycharup; _root.BLayer['Baddie' + aBadOn].springy = 2; _root.BLayer['Baddie' + aBadOn].yspringy = 5; _root.BLayer['Baddie' + aBadOn].dead = false; _root.BLayer['Baddie' + aBadOn].onEnterFrame = _root.stompedEnterFrame; _rotation = 0; recenterPoints(); JumpFunc(_root.BLayer['Baddie' + aBadOn].Thrust); TempStill = false; Still = false; } } frame 8 { onEnterFrame = baddieHitEnterFrame; } frame 9 { gotoAndStop('Jump'); } } movieClip 6642 Inky { } movieClip 6661 inkSplat0 { frame 18 { removeMovieClip(this); } } movieClip 6676 inkSplat1 { frame 16 { removeMovieClip(this); } } movieClip 6690 inkSplat2 { frame 13 { removeMovieClip(this); } } movieClip 6698 { } movieClip 6699 scratchBullet { frame 1 { hitCharFunc = function (ex, ey, hitPower, eRot, eType, fromChar) { if (fromChar._alpha == 100 && !fromChar.isAttacking && Math.abs(ex - this._x) < fromChar.spread + this.spread && Math.abs(fromChar.centerY - (this._y - this.spread)) < this.spread / 2 + fromChar.isTall / 2) { delete fromChar.onEnterFrame; _root.HurtPants(20, fromChar); fromChar.gotoAndStop('FrontSlam'); messagePopup(fromChar._currentframe); fromChar.moveRL = this._xscale / 10; fromChar.moveUD = -12; fromChar.FloatUp = 4; this.spring = 12; this.moveRL = -fromChar.moveRL / 2; this.moveUD = -10; this.gotoAndStop('Attack'); return true; } else { return false; } }; getAttacked = function (ex, ey, hitPower, eRot, eType, fromChar) { delete this.hitCharFunc; this.lifespan = 100; this.b = 6; this.moveRL = hitPower * 0.8 * Math.sin(eRot * 0.0174532925199433); this.shakeRL = this.moveRL; this.moveUD = -Math.abs(hitPower * 0.8) * Math.cos(eRot * 0.0174532925199433); this.spring = 6; if (eType == 'airPwn') { fromChar.airPwning = true; fromChar.accelUD += 0.25; fromChar.moveRL = (ex - this._x) / 3; fromChar.moveUD = -10; fromChar.FloatUp = 10; this.health = 0; this.gotoAndStop('Hit'); return 'slice'; } if (substring(eType, 1, 3) == 'jab') { this.downTime = 10; _root.playSound('Thud', ex, 100); this.health = 0; this.gotoAndStop('Hit'); return 'slice'; } _root.playSound('baseballHit', ex, 100); this.downTime = 10; this.health = 0; this.gotoAndStop('Hit'); return 'slice'; }; gotoAndStop('stunjump'); } frame 3 { _root.removeBaddie(this.ID); } frame 11 { onEnterFrame = function () { this._x += this.shakeRL / 2; this.shakeRL = -this.shakeRL; if (this.b > 0) { --this.b; } else { this.gotoAndStop('deadjump'); } }; } frame 12 { onEnterFrame = function () { if (_root.Paused) { this.InShell.stop(); } else { if (this._currentframe == 12) { this.InShell.play(); this._x += this.moveRL; this.centerX = this._x; this._y += this.moveUD; this.centerY = this._y - 15; --this.lifespan; if (this.lifespan < 0 || _root.tehground.hitTest(this.centerX, this.centerY, true) || _root.tehwallz.hitTest(this.centerX, this.centerY, true)) { _root.removeBaddie(this.ID); } } } }; } frame 13 { InShell.stop(); InShell._rotation = 0; InShellrotation = _rotation; smokeN = 0; InShell; if (isWearing == 'nothing') { hitCharFunc = _root.standardHitCharStunnedFunc; hitPwnFunc = _root.standardHitCharStunnedPwnFunc; } else { hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.protectedHitCharPwnFunc; comaStars._alpha = 0; } facing = _xscale / Math.abs(_xscale); onEnterFrame = baddieStunLandEnterFrame; } frame 14 { this.facing = this._xscale / Math.abs(this._xscale); onEnterFrame = function () { ++this.moveUD; this.temp = false; var v3 = 0; while (v3 < _root.BaddieArray.length) { i = _root.BaddieArray[v3]; if (_root.BLayer['Baddie' + i].hitTest(this._x + this.moveRL, this._y - this.spread + this.moveUD, true) && _root.BLayer['Baddie' + i].ItIs != 'Scratch' && _root.BLayer['Baddie' + i].downTime == 0) { this.temp = _root.BLayer['Baddie' + i].hitShellFunc(this._x + this.moveRL, this._y + this.moveUD, 65, this); } ++v3; } if (!this.temp) { this._x += this.moveRL; this._y += this.moveUD; this.centerX = this._x; this.centerY = this._y - this.spread; this.spring += (100 - this._yscale) / 3; this.spring *= 0.9; this._yscale += this.spring; this._xscale = 100 - this._yscale + 100; } --this.lifespan; if (this.lifespan < 0) { _root.removeBaddie(this.ID); } }; stop(); } frame 15 { spring = 12; b = 20; hatEffect(); _yscale = 100; _xscale = 100; onEnterFrame = function () { if (InShell._yscale + this.spring > 100) { this.spring += (100 - InShell._yscale) / 5; InShell._yscale += this.spring; InShell._xscale = InShell._yscale; } else { if (InShell._yscale + this.spring > 0) { this.spring += (-100 - InShell._yscale) / 5; InShell._yscale += this.spring; InShell._xscale = InShell._yscale; } else { InShell._yscale = 0; InShell._xscale = 0; _root.removeBaddie(this.ID); } } moveRL *= 0.95; moveUD *= 0.95; ++moveUD; _x = _x + moveRL; _y = _y + moveUD; }; stop(); } } movieClip 6729 slashEffect { frame 29 { removeMovieClip(this); } } movieClip 6746 deflectEffect { frame 23 { removeMovieClip(this); } } movieClip 6751 { frame 1 { stop(); } frame 3 { _parent.mainBubble.play(); } frame 7 { stop(); } frame 10 { _parent.weeBubble2.play(); } frame 13 { stop(); } } movieClip 6759 { frame 3 { _parent.weeBubble1.play(); } frame 6 { stop(); } frame 11 { delete _root.InteractLayer['object' + _parent.signParent].onEnterFrame; _root.InteractLayer['object' + _parent.signParent].objectFunc = _root.InteractLayer['object' + _parent.signParent].startFunc; _parent.removeMovieClip(this); } } movieClip 6763 { } movieClip 6782 { frame 1 { stop(); } instance of movieClip 6763 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6763 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6763 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6763 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6763 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6763 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6763 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } frame 9 { stop(); } instance of movieClip 6763 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6763 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6763 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6763 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6763 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } frame 14 { _parent.weeBubble1.play(); } instance of movieClip 6763 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6763 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6763 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } frame 17 { stop(); } } movieClip 6783 mapBubbleShell { } movieClip 6798 { } movieClip 6802 { frame 1 { stop(); } instance of movieClip 6798 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6798 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6798 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6798 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6798 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6798 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6798 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } frame 9 { stop(); } instance of movieClip 6798 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6798 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6798 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6798 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6798 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } frame 14 { _parent.weeBubble1.play(); } instance of movieClip 6798 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6798 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } instance of movieClip 6798 { onClipEvent (load) { gotoAndStop(_parent._parent.ID); } } frame 17 { stop(); } } movieClip 6803 signBubbleShell { } movieClip 6818 POW { frame 15 { removeMovieClip(this); } } movieClip 6839 pokeEffect { frame 25 { removeMovieClip(this); } } movieClip 6842 crossDebug { } movieClip 6845 { } movieClip 6889 { frame 1 { stop(); } } movieClip 6924 { frame 16 { _root.FireScratch(_parent._parent._x, _parent._parent._y - 30, _parent._parent._xscale, 5 * Math.sin(_parent._parent.aimRot * 0.0174532925199433), 5 * -Math.cos(_parent._parent.aimRot * 0.0174532925199433), _parent._parent.aimRot); _root.playSound('RatShoot', _parent._parent._x, 100); } } movieClip 6928 { } movieClip 6929 { frame 22 { gotoAndPlay('loop'); } frame 38 { gotoAndPlay(1); } frame 141 { if (Math.abs(_parent._x - _root.Char._x) < 400 && Math.abs(_parent._y - _root.Char._y) < 100) { gotoAndPlay('shootLoop'); } } frame 145 { _parent.gotoAndStop('Listen'); } } movieClip 6931 { } movieClip 6932 { } movieClip 6933 { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID); } ++_root.BaddieCount; ItIs = 'Rat'; Status = 'Stupid'; if (isWearing == undefined) { isWearing = 'nothing'; } health = 80; isWide = 50; comaMax = 120; worth = 1.2; attackStrength = 20; hasBeenGrabbed = false; canZoom = true; spread = 20; bounceThresh = 5; bounceDefault = 0.3; jabSound = 'BadSlash'; slashSound = 'baseballHit'; _root.baddieSetupFunc(this); } frame 2 { onEnterFrame = baddieListenEnterFrame; stop(); } frame 3 { gotoAndStop('aim'); } frame 4 { InShell._rotation = (InShellrotation - _rotation) * (_xscale / Math.abs(_xscale)); if (_x < _root.Char._x) { _xscale = 100; } else { _xscale = -100; } aimRot = -Math.atan2(_x - _root.Char._x, _y - _root.Char._y) / 0.0174532925199433; InShell.arm._rotation = Math.round((aimRot - _rotation) * (_xscale / Math.abs(_xscale)) / 5) * 5; InShell.body.gotoAndStop(35 - Math.abs(InShell.arm._rotation / 5)); hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (_root.Paused) { InShell.stop(); InShell.arm.stop(); } else { if (!(Math.abs(_x - _root.Char._x) < 1200 && Math.abs(_y - _root.Char._y) < 800)) { gotoAndStop('Listen'); } else { InShell.play(); InShell.arm.play(); if (downTime > 0) { --downTime; } slopeStuff(); InShell._rotation *= 0.5; jumpAnchor._rotation = -_rotation * (_xscale / Math.abs(_xscale)); if (moveRL == 0) { } else { if (Math.abs(moveRL) > 0.5) { if (moveRL > 0) { moveRL -= 0.5; } else { moveRL += 0.5; } } else { moveRL = 0; } } if (_x < _root.Char._x) { _xscale = 100; } else { _xscale = -100; } aimRot = -Math.atan2(_x - _root.Char._x, _y - _root.Char._y) / 0.0174532925199433; InShell.arm._rotation = Math.round((aimRot - _rotation) * (_xscale / Math.abs(_xscale)) / 5) * 5; InShell.body.gotoAndStop(35 - Math.abs(InShell.arm._rotation / 5)); temp = RLFunc(); if (temp == 'rEdge' || temp == 'rBackEdge') { _xscale = 100; moveRL = 0; } else { if (temp == 'lEdge' || temp == 'lBackEdge') { _xscale = -100; moveRL = 0; } else { if (temp == 'Wall' || _xscale * _rotation < -6000) { _xscale = -_xscale; } } } } } }; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; getAttacked = _root.standardGetAttacked; lockedOn = _root.standardLockedOn; stop(); } frame 6 { onEnterFrame = function () { if (!_root.Paused) { if (moveUD < 20) { ++moveUD; } if (Satus == 'Rolling') { JumpGuide('land'); } else { JumpGuide('RIdle'); } } }; play(); } frame 8 { stop(); } frame 10 { onEnterFrame = baddieHitEnterFrame; } frame 12 { this.recenterPoints(); this.rotateInAir(); this.jumpAnchor._rotation = -this._rotation * (this._xscale / Math.abs(this._xscale)); this.hitPwnFunc = _root.standardHitCharStunJumpFunc; this.hitCharFunc = this.hitPwnFunc; this.facing = this._xscale / Math.abs(this._xscale); onEnterFrame = baddieStunJumpEnterFrame; stop(); } frame 13 { InShell.stop(); Status = 'Rolling'; InShellrotation += rotter; InShell._rotation = (InShellrotation - _rotation) * (_xscale / Math.abs(_xscale)); facing = _xscale / Math.abs(_xscale); hitCharFunc = _root.standardHitCharStunnedFunc; hitPwnFunc = _root.standardHitCharStunnedPwnFunc; onEnterFrame = function () { if (!_root.Paused) { if (coma > 0) { --coma; comaStars._yscale = coma / 2 + 20; comaStars._xscale = comaStars._yscale; spring += (100 - _yscale) / 5; spring *= 0.8; _yscale = _yscale + spring; _xscale = (100 - _yscale + 100) * facing; if (downTime > 0) { --downTime; } slopeStuff(); if (Math.abs(moveRL + rotAccel / 3) < 40) { moveRL += rotAccel / 3; } else { moveRL *= 40 / Math.abs(moveRL); } if (Math.abs(moveRL) > 0.2) { moveRL -= moveRL / Math.abs(moveRL) / 40; } else { if (Math.abs(rotAccel / 5) < 0.01) { moveRL = 0; } } if (friction) { if (smokeN > 0) { --smokeN; } else { smokeN = 2; _root.inkSplat(_x + RLx(moveRL), _y + RLy(moveRL), moveRL * 4, _rotation); } rotter += (moveRL * 2 - rotter) / 20; } else { rotter = moveRL * 2; } if (Math.abs(_rotation) > 100 && Math.abs(moveRL) < 12) { JumpFunc(0); fliprot = -0.08 * _xscale; } else { oRL = moveRL; temp = RLFunc(); if (temp == 'rEdge' || temp == 'rBackEdge') { if (moveRL > -2) { moveRL -= 0.2; } } else { if (temp == 'lEdge' || temp == 'lBackEdge') { if (moveRL < 2) { moveRL += 0.2; } } } if (temp == 'Wall') { _root.playSound('Thud', _x, Math.abs(moveRL) * 10); moveRL = -oRL / 2; } } InShellrotation += rotter; InShell._rotation = (InShellrotation - _rotation) * facing; } else { InShellrotation = 0; gotoAndStop('aim'); } } }; } frame 14 { recenterPoints(); _rotation = 0; InShell._rotation = 0; hitPwnFunc = _root.standardHitCharDeadJumpFunc; hitCharFunc = hitPwnFunc; facing = _xscale / Math.abs(_xscale); onEnterFrame = baddieDeadJumpEnterFrame; } frame 15 { hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; onEnterFrame = function () { rotter += (moveRL * 5 - rotter) / 10; InShellrotation += rotter; baddieJumpEnterFrame(); }; } frame 16 { spring = 12; b = 20; facing = _xscale / Math.abs(_xscale); onEnterFrame = baddieAttackEnterFrame; stop(); } } movieClip 6935 ScratchBlast { frame 8 { removeMovieClip(this); } } movieClip 6941 { } movieClip 6942 HatFly { instance hat of movieClip 6941 { onClipEvent (load) { _root.setHat(this, _parent.isWearing); } } } movieClip 6945 { } movieClip 7002 { frame 10 { if (_root.notSoRandom(5) > 2) { gotoAndPlay(4); } } frame 20 { moveRL = (_root.Char._x - _parent._x) / 25; if (Math.abs(moveRL) > 9 || Math.abs(_root.Char._y - _parent._y) > 100) { moveRL = (moveRL / Math.abs(moveRL)) * 9; } _parent._xscale = (moveRL / Math.abs(moveRL)) * 100; } frame 28 { if (_parent._currentframe == 3) { _parent.FloatUp = 2; _parent.moveRL = moveRL + (_root.notSoRandom(4) - 2); _parent.JumpFunc(12 + _root.notSoRandom(4)); } } } movieClip 7092 { frame 40 { gotoAndPlay('jumpLoop'); } } movieClip 7133 { instance of movieClip 6945 { } frame 20 { _parent.RLFunc(); if (_parent._currentframe == 6) { _parent.gotoAndStop('Idle'); } } } movieClip 7166 { instance of movieClip 6945 { } frame 20 { _parent.RLFunc(); if (_parent._currentframe == 7) { _parent.gotoAndStop('Idle'); } } } movieClip 7171 { frame 11 { _parent.b = 0; _parent.onEnterFrame = _parent.baddieHitEnterFrame; stop(); } } movieClip 7174 { frame 10 { _parent.b = 0; _parent.onEnterFrame = _parent.baddieHitEnterFrame; stop(); } } movieClip 7181 { frame 11 { _parent.gotoAndPlay(2); } } movieClip 7245 { frame 38 { gotoAndPlay('loop'); } } movieClip 7270 { frame 32 { _parent.InShellrotation += 180 * _parent._xscale / 100; gotoAndPlay('loop'); } } movieClip 7289 { frame 13 { _parent.gotoAndStop('JumpBack'); } } movieClip 7338 { frame 24 { stop(); } } movieClip 7412 { frame 4 { _parent.onEnterFrame = function () { if (!_root.Paused) { if (downTime > 0) { --downTime; } if (this.FloatUp > 0) { --this.FloatUp; } else { if (this.moveUD < 20) { ++this.moveUD; } } if (this.JumpGuide('Land') == 'Wall') { if (_root.tehwallz.hitTest(this._x + 30, this._y, true)) { this._xscale = 100; } else { if (_root.tehwallz.hitTest(this._x - 30, this._y, true)) { this._xscale = -100; } } this.InShell._xscale = 100; this.moveRL = -(this._xscale / 20) + (_root.notSoRandom(4) - 2); this.moveUD = -(14 + _root.notSoRandom(4)); this.FloatUp = 4; this.rotateInAir(); this.InShell.gotoAndPlay(1); delete this.onEnterFrame; } else { this.jumpAnchor._rotation = -this._rotation * (this._xscale / 100); } } }; } frame 14 { _parent._xscale = -_parent._xscale; _xscale = -_xscale; } frame 38 { gotoAndPlay('loop'); } } movieClip 7413 Ninja { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID); } ++_root.BaddieCount; ItIs = 'Ninja'; Status = 'Stupid'; health = 500; isWide = 35; worth = 1; attackStrength = 10; bounceThresh = 100; bounceDefault = 1; hasBeenGrabbed = true; canZoom = true; originalColor = random(9); _root.ColorEmPants(originalColor, this, true); jabSound = 'BadSlash'; slashSound = 'baseballHit'; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; getAttacked = _root.standardGetAttacked; _root.baddieSetupFunc(this); } frame 2 { onEnterFrame = function () { if (Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600 || Math.abs(_x - _root.CharQTP._x) < 1600 && Math.abs(_y - _root.CharQTP._y) < 600) { if (_root.tehhangz.hitTest(_x + moveRL, _y + moveUD + 6, true)) { while (!_root.tehhangz.hitTest(_x, _y + 2, true)) { _y = _y + 1; } while (_root.tehhangz.hitTest(_x, _y, true)) { _y = _y - 1; } nextFrame(); } else { RLFunc(); nextFrame(); Spider.gotoAndPlay(_root.notSoRandom(20)); } } }; stop(); } frame 3 { InShell._rotation = 0; InShellrotation = 0; jumpAnchor._rotation = -_rotation * (_xscale / 100); hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; onEnterFrame = function () { if (_root.Paused) { InShell.stop(); } else { if (_currentframe == 3) { InShell.play(); if (!(Math.abs(_x - _root.Char._x) < 3000 && Math.abs(_y - _root.Char._y) < 1200) && !(Math.abs(_x - _root.CharQTP._x) < 3000 && Math.abs(_y - _root.CharQTP._y) < 1200) && _currentframe == 3 && !insomniac && aPlatzOn == -1) { prevFrame(); } RLFunc(); if (Math.abs(_root.Char._x - _x) > 120 && Math.abs(_root.Char._x - _x) < 250 && (_root.Char._x - _x) * _xscale > 0 && _root.Char.isAttacking && _currentframe == 3) { gotoAndStop('JumpBack'); } } } }; stop(); } frame 4 { onEnterFrame = function () { if (_root.Paused) { InShell.stop(); } else { InShell.play(); if (!(Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600) && !(Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600)) { prevFrame(); } if (Math.abs(_x - _root.Char._x) < 80 && (_x - _root.Char._x) * _root.Char._xscale > 0 && _root.Char.lockOn == ID) { xDist = (-(_x - (_root.Char._x + _root.Char._xscale * 1.25)) / Math.sin((_root.Char._rotation + 90) * 0.0174532925199433) - moveRL) / 4; moveRL += xDist; if (Math.abs(moveRL) > 10) { moveRL = (moveRL / Math.abs(moveRL)) * 10; } } else { if (_root.Char.lockOn == ID) { } else { gotoAndStop('Idle'); } } temp = RLFunc(true); if (temp == 'rEdge' || temp == 'rBackEdge') { _xscale = 100; moveRL = 3.333333333333334; } else { if (temp == 'lEdge' || temp == 'lBackEdge') { _xscale = -100; moveRL = -3.333333333333334; } else { if (temp == 'Wall' || _xscale * _rotation < -6000) { _xscale = -_xscale; moveRL = Math.round(_xscale / 30); } } } } }; stop(); } frame 5 { _yscale = 100; recenterPoints(); rotateInAir(); jumpAnchor._rotation = -_rotation * (_xscale / 100); onEnterFrame = function () { if (_root.Paused) { InShell.stop(); } else { if (_currentframe == 5) { InShell.play(); if (downTime > 0) { --downTime; } if (FloatUp > 0) { --FloatUp; } else { if (moveUD < 20) { ++moveUD; } } if (moveUD > -8) { InShell.play(); } if (JumpGuide('Land') == 'Wall') { if (_root.tehwallz.hitTest(_x + 20 + moveRL, _y, true)) { _xscale = 100; } else { if (_root.tehwallz.hitTest(_x - 20 + moveRL, _y, true)) { _xscale = -100; } } gotoAndStop('WallJump'); } jumpAnchor._rotation = -_rotation * (_xscale / 100); } } }; } frame 6 { coma = 0; spring = 0; InShellrotation = 0; InShell._rotation = 0; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; onEnterFrame = function () { if (_root.Paused) { InShell.stop(); } else { if (_currentframe == 6) { InShell.play(); if (!(Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600) && !(Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600) && _currentframe == 3 && !insomniac && aPlatzOn == -1) { prevFrame(); } if (moveRL == 0) { } else { if (Math.abs(moveRL) > 2) { moveRL -= (moveRL / Math.abs(moveRL)) * 2; } else { moveRL = 0; } } temp = RLFunc(true); if (temp == 'rEdge' || temp == 'rBackEdge') { _xscale = 100; moveRL = 4; } else { if (temp == 'lEdge' || temp == 'lBackEdge') { _xscale = -100; moveRL = -4; } else { if (temp == 'Wall' || _xscale * _rotation < -6000) { _xscale = -_xscale; moveRL = Math.round(_xscale / 25); } } } } } }; stop(); } frame 7 { InShell._rotation = 0; InShellrotation = 0; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; spring = 0; onEnterFrame = function () { if (_root.Paused) { InShell.stop(); } else { if (_currentframe == 7) { InShell.play(); if (!(Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600) && !(Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600) && _currentframe == 3 && !insomniac) { prevFrame(); } if (moveRL == 0) { } else { if (Math.abs(moveRL) > 2) { moveRL -= (moveRL / Math.abs(moveRL)) * 2; } else { moveRL = 0; } } temp = RLFunc(true); if (temp == 'rEdge' || temp == 'rBackEdge') { _xscale = 100; moveRL = 4; } else { if (temp == 'lEdge' || temp == 'lBackEdge') { _xscale = -100; moveRL = -4; } else { if (temp == 'Wall' || _xscale * _rotation < -6000) { _xscale = -_xscale; moveRL = Math.round(_xscale / 25); } } } } } }; stop(); } frame 11 { _root.ColorEmPants(2, this, true); if (Math.abs(moveRL) > 10 && health > 0) { health = 0; _root.StompBaddie(); } facing = moveRL / Math.abs(moveRL); this.onEnterFrame = function () { this._x += this.shakeRL / 2; this.shakeRL = -this.shakeRL; if (this.b > 0) { --this.b; } else { if (this.health > 0) { if (this.moveUD == 0) { this.gotoAndStop('Land'); } else { this.gotoAndStop('stunjump'); } } else { _root.throwToothpick(_x + _xscale / 4, _y - 50, -facing * 100, Math.abs(moveRL * 0.6) + 15, originalColor); this.gotoAndStop('deadjump'); } } }; } frame 12 { InShellrotation = _xscale * 0.9; recenterPoints(); rotateInAir(); jumpAnchor._rotation = -_rotation * (_xscale / 100); coma = 0; _root.ColorEmPants(originalColor, this, true); facing = -moveRL / Math.abs(moveRL); onEnterFrame = function () { if (!_root.Paused) { if (downTime > 0) { --downTime; } if (FloatUp > 0) { --FloatUp; } else { if (moveUD < 20) { ++moveUD; } } spring += (100 - _yscale) / 5; spring *= 0.8; _yscale = _yscale + spring; _xscale = (100 - _yscale + 100) * facing; if (JumpGuide('BackLand') == 'Wall') { if (_root.tehwallz.hitTest(_x + 40, _y, true)) { _xscale = 100; } else { if (_root.tehwallz.hitTest(_x - 40, _y, true)) { _xscale = -100; } else { _root.messagePopup('neither'); } } gotoAndStop('WallJump'); } else { moveRL *= 0.98; if (Math.abs(moveRL) > 5) { InShellrotation += (-Math.atan2(moveRL, moveUD) / 0.0174532925199433 - InShellrotation) / 5; } jumpAnchor._rotation = -_rotation * (_xscale / 100); if (_root.stageY * (100 / _root._yscale) - _y < _root.MinY - 700) { messagePopup('spiderGone'); if (combo > 1) { if (this.combo != (this.comboSome - 18) / 39) { while (!false) { } } _root.APISnailShellCombo(this.combo); } if (_root.spidersOut > 0) { --_root.spidersOut; } _root.removeBaddie(ID, true); } } InShell.play(); } else { InShell.stop(); } }; stop(); } frame 13 { gotoAndStop('Land'); } frame 14 { recenterPoints(); InShellrotation = _xscale * 0.9; _root.spiderDie.setPan((smoothTheX + _x) / 3.6 - 100); _root.spiderDie.start(); _root.ColorEmPants(originalColor, this, true); hitCharFunc = _root.standardHitCharDeadJumpFunc; facing = -moveRL / Math.abs(moveRL); onEnterFrame = function () { if (!_root.Paused) { if (downTime > 0) { --downTime; } spring += (100 - _yscale) / 5; spring *= 0.8; _yscale = _yscale + spring; _xscale = (100 - _yscale + 100) * facing; _x = _x + moveRL; ++moveUD; _y = _y + moveUD; rotter += (moveRL * 0.2 - rotter) / 5; InShellrotation += rotter; InShell._rotation = InShellrotation * facing; if (_root.stageY * (100 / _root._yscale) - _y < _root.MinY - 700) { messagePopup('spiderGone'); if (combo > 1) { if (this.combo != (this.comboSome - 18) / 39) { while (!false) { } } _root.APISnailShellCombo(this.combo); } if (_root.spidersOut > 0) { --_root.spidersOut; } _root.removeBaddie(ID, true); } } }; } frame 15 { delete onEnterFrame; } frame 21 { moveRL = -_xscale / 10; moveUD = -10; FloatUp = 0; onEnterFrame = function () { if (!_root.Paused) { if (downTime > 0) { --downTime; } if (FloatUp > 0) { --FloatUp; } else { if (moveUD < 20) { ++moveUD; } } if (JumpGuide('BackLand') == 'Wall') { if (_root.tehwallz.hitTest(_x + 30, _y, true)) { _xscale = 100; } else { if (_root.tehwallz.hitTest(_x - 30, _y, true)) { _xscale = -100; } } gotoAndStop('WallJump'); } } }; } frame 24 { moveRL = -(_xscale / 10) + (_root.notSoRandom(4) - 2); moveUD = -(14 + _root.notSoRandom(4)); FloatUp = 4; InShellrotation = 0; recenterPoints(); rotateInAir(); jumpAnchor._rotation = -_rotation * (_xscale / 100); onEnterFrame = function () { if (downTime > 0) { --downTime; } }; } frame 28 { hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; gotoAndStop('Idle'); } frame 29 { delete onEnterFrame; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; } } movieClip 7415 { } movieClip 7450 { instance of movieClip 6941 { onClipEvent (load) { _root.setHat(this, _parent._parent.isWearing); } } frame 10 { if (_parent.moveUD < -4) { stop(); } } frame 33 { gotoAndPlay('loop'); } } movieClip 7455 { } movieClip 7465 { instance of movieClip 6941 { onClipEvent (load) { _root.setHat(this, _parent._parent.isWearing); } } } movieClip 7477 { frame 10 { gotoAndPlay(1); } } movieClip 7488 { frame 11 { gotoAndStop(1); } } movieClip 7505 { frame 16 { stop(); } } movieClip 7510 { frame 4 { stop(); } } movieClip 7529 { frame 18 { _parent.gotoAndStop(1); } } movieClip 7530 { frame 1 { stop(); } } movieClip 7533 { frame 1 { stop(); } } movieClip 7537 { frame 1 { play(); } frame 10 { _parent.b = 0; _parent.onEnterFrame = _parent.baddieHitEnterFrame; stop(); } } movieClip 7539 { frame 10 { _parent.b = 0; _parent.onEnterFrame = _parent.baddieHitEnterFrame; stop(); } } movieClip 7541 { frame 10 { _parent.gotoAndStop('Idle'); } } movieClip 7543 { frame 10 { stop(); } } movieClip 7544 Parrot { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID + 500); } ++_root.BaddieCount; Thrust = 13; bounceThreshDefault = 14; bounceDefault = 0.5; ItIs = 'Parrot'; Status = 'Stupid'; health = 1; isWide = 60; spread = 20; comaMax = 80; worth = 1; attackStrength = 15; hasBeenGrabbed = true; canZoom = true; anchX = _x; anchY = _y; dropXscale = -_xscale; spidersToDrop = 5; getAttacked = _root.standardGetAttacked; _root.baddieSetupFunc(this); } frame 2 { onEnterFrame = function () { if (Math.abs(_x - _root.Char._x) < 400 && Math.abs(_y - _root.Char._y) < 200 || Math.abs(_x - _root.CharQTP._x) < 400 && Math.abs(_y - _root.CharQTP._y) < 200 || insomniac) { gotoAndStop('Idle'); } }; stop(); } frame 12 { recenterPoints(); rotateInAir(); InShellrotation = 0; onEnterFrame = function () { if (!_root.Paused) { if (downTime > 0) { --downTime; } rotateInAir(); ++moveUD; rotter += ((moveRL * _xscale / 100) * 1.5 - rotter) / 10; InShellrotation += rotter; JumpGuide('land'); if (_root.stageY * (100 / _root._yscale) - _y < _root.MinY - 700) { messagePopup('spiderGone'); removeMovieClip(this); } } }; stop(); } frame 13 { InShell.stop(); coma = 160; InShell._rotation = 0; cooldown = 0; smokeN = 0; onEnterFrame = function () { if (!_root.Paused) { if (coma > 0) { --coma; comaStars._yscale = coma / 2 + 20; comaStars._xscale = comaStars._yscale; slopeStuff(); if (Math.abs(moveRL + rotAccel) < 40) { moveRL += rotAccel; } else { moveRL *= 40 / Math.abs(moveRL); } if (friction) { if (!sliding) { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } if (smokeN > 0) { --smokeN; } else { smokeN = 2; _root.inkSplat(_x + RLx(moveRL), _y + RLy(moveRL), moveRL * 4, _rotation); } } else { if (!sliding) { if (Math.abs(moveRL) > 1) { moveRL -= (moveRL / Math.abs(moveRL)) * 1; } else { moveRL = 0; } } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } if (smokeN > 0) { --smokeN; } else { smokeN = 5; i = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('smokeFX', 'smokeFX' + i, i, {'_x': this._x, '_y': this._y, '_rotation': this._rotation, '_xscale': Math.abs(moveRL) * 6, '_yscale': Math.abs(moveRL) * 6}); } } if (RLFunc() == 'Wall') { _xscale = -_xscale; moveRL = -moveRL; } if (downTime > 0) { --downTime; } else { if (_root.Char.hitTest(centerX - _root.Char.moveRL, centerY - _root.Char.moveUD, true)) { combo = 1; comboSome = 57; ex = _root.Char.moveRL - moveRL; ey = _root.Char.moveUD - moveUD; _root.Thud.setVolume(Math.sqrt(ex * ex + ey * ey) * 10); _root.Thud.setPan((_root.smoothTheX + _x) / 3.6 - 100); _root.Thud.start(); downTime = 7; if (_root.Char._currentframe == 7) { moveRL = (_x - _root.Char._x) / 10 + _root.Char.moveRL; moveUD = -Math.abs(_root.Char.moveUD) * 2; _root.movePerformed('landstompspider'); } else { if (_root.Char._x > _x) { if (_root.Char._currentframe == 31) { moveRL = (10 + Math.abs(_root.Char.moveRL)) * Math.cos((_root.Char._rotation - 100) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.Char.moveRL)) * Math.sin((_root.Char._rotation - 100) * 0.0174532925199433); _root.movePerformed('slidespider'); } else { moveRL = (10 + Math.abs(_root.Char.moveRL)) * Math.cos((_root.Char._rotation - 120) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.Char.moveRL)) * Math.sin((_root.Char._rotation - 120) * 0.0174532925199433); if (_root.Char._currentframe < 7 && _root.Char._xscale * (centerX - _root.Char._x) > 0) { _root.Char.JumpFunc(4); _root.movePerformed('kickspider'); _root.Char.gotoAndStop('Kick'); rotter = moveRL * _xscale / 10; } else { _root.movePerformed('tapspider'); } } } else { if (_root.Char._currentframe == 31) { moveRL = (10 + Math.abs(_root.Char.moveRL)) * Math.cos((_root.Char._rotation - 80) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.Char.moveRL)) * Math.sin((_root.Char._rotation - 80) * 0.0174532925199433); _root.movePerformed('slidespider'); } else { moveRL = (10 + Math.abs(_root.Char.moveRL)) * Math.cos((_root.Char._rotation - 60) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.Char.moveRL)) * Math.sin((_root.Char._rotation - 60) * 0.0174532925199433); if (_root.Char._currentframe < 7 && _root.Char._xscale * (centerX - _root.Char._x) > 0) { _root.Char.JumpFunc(4); _root.movePerformed('kickspider'); _root.Char.gotoAndStop('Kick'); rotter = moveRL * _xscale / 10; } else { _root.movePerformed('tapspider'); } } } } InShell.stop(); gotoAndStop('deadjump'); } else { if (_root.CharQTP.hitTest(centerX - _root.CharQTP.moveRL, centerY - _root.CharQTP.moveUD, true)) { combo = 1; comboSome = 57; ex = _root.CharQTP.moveRL - moveRL; ey = _root.CharQTP.moveUD - moveUD; _root.Thud.setVolume(Math.sqrt(ex * ex + ey * ey) * 10); _root.Thud.setPan((_root.smoothTheX + _x) / 3.6 - 100); _root.Thud.start(); downTime = 7; if (_root.CharQTP._currentframe == 7) { moveRL = (_x - _root.CharQTP._x) / 10 + _root.CharQTP.moveRL; moveUD = -Math.abs(_root.CharQTP.moveUD) * 2; } else { if (_root.CharQTP._x > _x) { if (_root.CharQTP._currentframe == 31) { moveRL = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.cos((_root.CharQTP._rotation - 100) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.sin((_root.CharQTP._rotation - 100) * 0.0174532925199433); } else { moveRL = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.cos((_root.CharQTP._rotation - 120) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.sin((_root.CharQTP._rotation - 120) * 0.0174532925199433); if (_root.CharQTP._currentframe < 7 && _root.CharQTP._xscale * (centerX - _root.CharQTP._x) > 0) { _root.CharQTP.JumpFunc(4); _root.CharQTP.gotoAndStop('Kick'); rotter = moveRL * _xscale / 10; } } } else { if (_root.CharQTP._currentframe == 31) { moveRL = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.cos((_root.CharQTP._rotation - 80) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.sin((_root.CharQTP._rotation - 80) * 0.0174532925199433); } else { moveRL = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.cos((_root.CharQTP._rotation - 60) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.sin((_root.CharQTP._rotation - 60) * 0.0174532925199433); if (_root.CharQTP._currentframe < 7 && _root.CharQTP._xscale * (centerX - _root.CharQTP._x) > 0) { _root.CharQTP.JumpFunc(4); _root.CharQTP.gotoAndStop('Kick'); rotter = moveRL * _xscale / 10; } } } } InShell.stop(); gotoAndStop('deadjump'); } else { if (this.WraptoGround(true, false, true, 'baddie') == 'Fall') { messagePopup('floatin!'); _rotation = 0; _y = _y - 10; gotoAndStop('die'); } } } } } else { gotoAndStop('Idle'); } } }; } frame 21 { hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; gotoAndStop('Idle'); } frame 25 { hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; onEnterFrame = function () { if (!_root.Paused) { InShell.nextFrame(); feet.feet.nextFrame(); moveRL += (anchX + _xscale * 2 - _x) / 100; moveUD += (anchY - 150 - _y) / 100; moveRL *= 0.95; moveUD *= 0.95; if (Math.abs(moveRL) > 5) { moveRL /= Math.abs(moveRL) * 0.2; } if (Math.abs(moveUD) > 5) { moveUD /= Math.abs(moveUD) * 0.2; } _x = _x + moveRL; _y = _y + moveUD; if (Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD) < 2) { if (spidersToDrop > 0) { gotoAndStop('getSpider'); } else { gotoAndStop('windUp'); } } } }; } frame 30 { badDist = 2000; badCharDist = 200; nowBad = -1; var b = 0; while (b < _root.BaddieArray.length) { i = _root.BaddieArray[b]; if (_root.BLayer['Baddie' + i].health > 0 && i != ID && _root.BLayer['Baddie' + i].ItIs != 'Parrot' && !_root.BLayer['Baddie' + i].hasBeenGrabbed) { var badXDist = _root.BLayer['Baddie' + i]._x - _x; var badYDist = _root.BLayer['Baddie' + i]._y - _y; var badCharXDist = _root.BLayer['Baddie' + i]._x - _root.Char._x; var badCharYDist = _root.BLayer['Baddie' + i]._y - _root.Char._y; var badNowDist = Math.sqrt(badXDist * badXDist + badYDist * badYDist); var badCharNowDist = Math.sqrt(badCharXDist * badCharXDist + badCharYDist * badCharYDist); if (badNowDist < badDist && badCharNowDist > 300 && badNowDist < 1200) { nowBad = i; badDist = badNowDist; } } ++b; } b = 10.25; if (nowBad > -1) { _root.BLayer['Baddie' + nowBad].hasBeenGrabbed = true; onEnterFrame = function () { if (!_root.Paused) { InShell.nextFrame(); feet.feet.nextFrame(); distX = _root.BLayer['Baddie' + nowBad]._x - _x; distY = _root.BLayer['Baddie' + nowBad]._y - _root.BLayer['Baddie' + nowBad].spread * 2 - _y; tempDist = Math.sqrt(distX * distX + distY * distY); if (tempDist > 200) { distX *= 0.5 / tempDist; distY *= 0.5 / tempDist; moveRL += distX; moveUD += distY; nowSpeed = Math.sqrt(moveRL * moveRL + moveUD * moveUD); if (nowSpeed > 10) { moveRL *= 10 / nowSpeed; moveUD *= 10 / nowSpeed; } } else { b -= 0.25; moveRL += (distX / b - moveRL) / b; moveUD += (distY / b - moveUD) / b; feet.gotoAndStop(2); } moveRL *= 0.95; moveUD *= 0.95; _x = _x + moveRL; _y = _y + moveUD; centerX = _x; centerY = _y - spread; if (b < 2) { isCarrying = _root.BLayer['Baddie' + nowBad]; isCarrying.gotoAndStop('beingCarried'); isCarrying._xscale = (isCarrying._xscale / Math.abs(isCarrying._xscale)) * 100; isCarrying._yscale = 100; isCarrying._rotation = 0; moveRL += isCarrying.moveRL / 2; moveUD += isCarrying.moveUD / 2; isCarrying.carriedBy = this; feet.gotoAndStop(3); gotoAndStop('bringSpider'); } } }; } else { gotoAndStop('windUp'); } } frame 39 { _xscale = dropXscale; isCarrying._xscale = dropXscale; dropXscale *= -1; b = 90; n = 30; onEnterFrame = function () { if (!_root.Paused) { InShell.nextFrame(); feet.feet.nextFrame(); distX = _root.Char._x - _xscale * 1.5 - _x; distY = _root.Char._y - 200 - _y; tempDist = Math.sqrt(distX * distX + distY * distY); if (tempDist > 100) { distX *= 0.5 / tempDist; distY *= 0.5 / tempDist; moveRL += distX; moveUD += distY; nowSpeed = Math.sqrt(moveRL * moveRL + moveUD * moveUD); if (nowSpeed > 15) { moveRL *= 15 / nowSpeed; moveUD *= 15 / nowSpeed; } } else { moveRL += (distX / 10 - moveRL) / 5; moveUD += (distY / 10 - moveUD) / 5; } moveRL *= 0.95; moveUD *= 0.95; if (nowSpeed > 15) { moveRL *= 15 / nowSpeed; moveUD *= 15 / nowSpeed; } _x = _x + moveRL; _y = _y + moveUD; centerX = _x; centerY = _y - spread; isCarrying._x = _x; isCarrying.centerX = isCarrying._x; isCarrying._y = _y + isCarrying.spread * 2; isCarrying.centerY = isCarrying._y - isCarrying.spread; --b; if (_root.testAll(_x + 20, _y) || _root.testAll(_x - 20, _y) || _x < -_root.MaxX || _root.stageX * (100 / _root._xscale) - _x < _root.MinX || _root.stageY * (100 / _root._yscale) - _y < _root.MinY) { if (n > 0) { --n; } else { isCarrying._xscale = -_xscale; _xscale = isCarrying._xscale; n = 100; b = 60; } } else { if (isCarrying._currentframe != 34) { delete isCarrying; gotoAndStop('Idle'); } else { if (b <= 0 || tempDist < 50) { isCarrying.moveRL = 0; isCarrying.moveUD = 0; isCarrying.recenterPoints(); isCarrying.JumpFunc(0); delete isCarrying; --spidersToDrop; b = 60; feet.gotoAndStop(4); if (spidersToDrop > 0) { gotoAndStop('getSpider'); } else { gotoAndStop('windUp'); } } } } if (_currentframe != 39) { isCarrying.recenterPoints(); isCarrying.JumpFunc(0); delete isCarrying; } } }; } frame 49 { tempRL = _root.Char._x - _x; tempUD = _root.Char._y - 25 - _y; _xscale = -((tempRL / Math.abs(tempRL)) * 100); moveRL = _xscale / 10; onEnterFrame = function () { if (!_root.Paused) { InShell.nextFrame(); feet.feet.nextFrame(); if (Math.abs(moveRL) > 0.1) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.025; } moveUD -= 0.25; _x = _x + moveRL; _y = _y + moveUD; if (moveUD < -5) { gotoAndStop('followChar'); } } }; } frame 57 { hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; canZoom = true; b = 90; onEnterFrame = function () { if (!_root.Paused) { InShell.nextFrame(); feet.feet.nextFrame(); if (b > 0) { --b; } else { b = 90; var b = 0; while (b < _root.BaddieArray.length) { i = _root.BaddieArray[b]; if (_root.BLayer['Baddie' + i].health > 0 && i != ID && _root.BLayer['Baddie' + i].ItIs != 'Parrot' && !_root.BLayer['Baddie' + i].hasBeenGrabbed) { var v7 = _root.BLayer['Baddie' + i]._x - _x; var v6 = _root.BLayer['Baddie' + i]._y - _y; var v5 = _root.BLayer['Baddie' + i]._x - _root.Char._x; var v4 = _root.BLayer['Baddie' + i]._y - _root.Char._y; var v3 = Math.sqrt(v7 * v7 + v6 * v6); var v8 = Math.sqrt(v5 * v5 + v4 * v4); if (v3 < badDist && v8 > 300 && v3 < 1200) { nowBad = i; badDist = v3; } } ++b; } } if (nowBad > -1) { gotoAndStop('getSpider'); } else { distRL = _x - anchX; distUD = _y - anchY; tempDist = Math.sqrt(distRL * distRL + distUD * distUD); if (tempDist > 1000) { gotoAndStop('return'); } else { tempRL = _root.Char._x - _x; tempUD = _root.Char._y - 25 - _y; tempSpeed = Math.sqrt(tempRL * tempRL + tempUD * tempUD); if (tempSpeed > 1) { tempRL *= 1 / tempSpeed; tempUD *= 1 / tempSpeed; } moveRL += tempRL / 2; moveUD += tempUD / 2; moveUD *= 0.98; if (Math.abs(moveRL) > 5) { moveRL = (moveRL / Math.abs(moveRL)) * 5; } _xscale = (moveRL / Math.abs(moveRL)) * 100; _x = _x + moveRL; _y = _y + moveUD; centerX = _x; centerY = _y - this.spread; } } } }; } frame 67 { hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; onEnterFrame = function () { if (!_root.Paused) { InShell.nextFrame(); feet.feet.nextFrame(); distX = anchX - _x; distY = anchY - _y; tempDist = Math.sqrt(distX * distX + distY * distY); distX *= 0.5 / tempDist; distY *= 0.5 / tempDist; moveRL += distX; moveUD += distY; nowSpeed = Math.sqrt(moveRL * moveRL + moveUD * moveUD); if (nowSpeed > 10) { moveRL *= 10 / nowSpeed; moveUD *= 10 / nowSpeed; } moveRL *= 0.95; moveUD *= 0.95; _xscale = (moveRL / Math.abs(moveRL)) * 100; _x = _x + moveRL; _y = _y + moveUD; if (tempDist < 1) { _x = anchX; _y = anchY; gotoAndStop('Listen'); } } }; } frame 74 { onEnterFrame = baddieHitEnterFrame; } frame 86 { if (isCarrying != undefined) { isCarrying.recenterPoints(); isCarrying.JumpFunc(0); gotoAndStop('Jump'); delete isCarrying; } delete onEnterFrame; } frame 92 { _root.StompBaddie(this.ItIs, this._x); gotoAndStop('deadjump'); } frame 101 { recenterPoints(); _rotation = 0; InShell._rotation = 0; hitPwnFunc = _root.standardHitCharDeadJumpFunc; hitCharFunc = hitPwnFunc; facing = _xscale / Math.abs(_xscale); onEnterFrame = baddieDeadJumpEnterFrame; } } movieClip 7548 { instance of movieClip 6941 { onClipEvent (load) { _root.setHat(this, _parent._parent._parent.isWearing); } } } movieClip 7607 { frame 60 { gotoAndPlay('loop'); } } movieClip 7650 { } movieClip 7663 { instance of movieClip 6941 { onClipEvent (load) { _root.setHat(this, _parent._parent.isWearing); } } frame 12 { _parent.gotoAndStop('Idle'); } } movieClip 7665 { } movieClip 7670 { frame 10 { _parent.b = 0; _parent.onEnterFrame = _parent.baddieHitEnterFrame; stop(); } } movieClip 7683 { frame 13 { gotoAndStop(9); } } movieClip 7684 { } movieClip 7711 { frame 26 { gotoAndPlay('loop'); } } movieClip 7712 Spider { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID); } ++_root.BaddieCount; ItIs = 'Spider'; Status = 'Stupid'; if (isWearing == undefined) { isWearing = 'nothing'; } health = 40; isWide = 35; comaMax = 80; worth = 1; attackStrength = 20; hasBeenGrabbed = false; canZoom = true; bounceThresh = 5; bounceDefault = 0.3; jabSound = 'BadSlash'; slashSound = 'baseballHit'; if (isWearing == 'nothing') { getAttacked = _root.standardGetAttacked; hatEffect = null; } else { getAttacked = _root.protectedGetAttacked; } lockedOn = _root.standardLockedOn; removeMovieClip(_root.ELayer['hatEffect' + this.ID]); removeMovieClip(_root.UberForeground['hatEffect' + this.ID]); _root.baddieSetupFunc(this); } frame 2 { onEnterFrame = function () { if (Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600 || Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600) { if (_root.tehhangz.hitTest(_x + moveRL, _y + moveUD + 6, true)) { while (!_root.tehhangz.hitTest(_x, _y + 2, true)) { _y = _y + 1; } while (_root.tehhangz.hitTest(_x, _y, true)) { _y = _y - 1; } nextFrame(); } else { if (isWearing == 'pumpkin') { _root.ELayer.attachMovie('hatEffect', 'hatEffect' + ID, _root.ELayer.getNextHighestDepth(), {'_x': _x, '_y': _y}); thisHat = _root.ELayer['hatEffect' + ID]; } else { if (isWearing == 'lamp') { _root.UberForeground.attachMovie('hatEffect', 'hatEffect' + ID, _root.UberForeground.getNextHighestDepth(), {'_x': _x, '_y': _y}); thisHat = _root.UberForeground['hatEffect' + ID]; } } thisHat.gotoAndStop(isWearing); hatEffect = _root[isWearing + 'HatEffect']; hatEffect(); if (WraptoGround(true, false) == 'Fall') { JumpFunc(0); } else { nextFrame(); } } } }; stop(); } frame 3 { InShell._rotation = 0; InShellrotation = _rotation; hitCharFunc = _root.standardHitCharStompFunc; if (isWearing == 'nothing') { hitPwnFunc = _root.standardHitCharPwnFunc; } else { hitPwnFunc = _root.protectedHitCharPwnFunc; } facing = _xscale / Math.abs(_xscale); onEnterFrame = baddieIdleEnterFrame; stop(); } frame 4 { onEnterFrame = function () { if (_root.Paused) { InShell.stop(); } else { InShell.play(); if (downTime > 0) { --downTime; } if (!(Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600) && !(Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600)) { prevFrame(); } if (Math.abs(_x - _root.Char._x) < 80 && (_x - _root.Char._x) * _root.Char._xscale > 0 && _root.Char.lockOn == ID) { xDist = (-(_x - (_root.Char._x + _root.Char._xscale * 1.25)) / Math.sin((_root.Char._rotation + 90) * 0.0174532925199433) - moveRL) / 4; moveRL += xDist; if (Math.abs(moveRL) > 10) { moveRL = (moveRL / Math.abs(moveRL)) * 10; } } else { if (_root.Char.lockOn == ID) { } else { gotoAndStop('Idle'); } } temp = RLFunc(); if (temp == 'rEdge' || temp == 'rBackEdge') { _xscale = 100; moveRL = 3.333333333333334; } else { if (temp == 'lEdge' || temp == 'lBackEdge') { _xscale = -100; moveRL = -3.333333333333334; } else { if (temp == 'Wall' || _xscale * _rotation < -6000) { _xscale = -_xscale; moveRL = Math.round(_xscale / 30); } } } } }; stop(); } frame 5 { hitCharFunc = _root.standardHitCharStompFunc; if (isWearing == 'nothing') { hitPwnFunc = _root.standardHitCharPwnFunc; } else { hitPwnFunc = _root.protectedHitCharPwnFunc; } if (moveUD > -2) { InShell.gotoAndPlay(12); } facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { InShellrotation *= 0.9; baddieJumpEnterFrame(); }; } frame 6 { this.InShellrotation = 0; this.InShell._rotation = 0; onEnterFrame = baddieLandEnterFrame; } frame 11 { onEnterFrame = baddieHitEnterFrame; } frame 12 { this.recenterPoints(); this.rotateInAir(); this.jumpAnchor._rotation = -this._rotation * (this._xscale / Math.abs(this._xscale)); this.hitPwnFunc = _root.standardHitCharStunJumpFunc; this.hitCharFunc = this.hitPwnFunc; this.facing = this._xscale / Math.abs(this._xscale); onEnterFrame = baddieStunJumpEnterFrame; stop(); } frame 13 { InShell.stop(); InShell._rotation = 0; InShellrotation = _rotation; smokeN = 0; if (isWearing == 'nothing') { hitCharFunc = _root.standardHitCharStunnedFunc; hitPwnFunc = _root.standardHitCharStunnedPwnFunc; } else { hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.protectedHitCharPwnFunc; comaStars._alpha = 0; } facing = _xscale / Math.abs(_xscale); onEnterFrame = baddieStunLandEnterFrame; } frame 14 { recenterPoints(); _rotation = 0; InShell._rotation = 0; hitPwnFunc = _root.standardHitCharDeadJumpFunc; hitCharFunc = hitPwnFunc; facing = _xscale / Math.abs(_xscale); onEnterFrame = baddieDeadJumpEnterFrame; } frame 15 { spring = 16; b = 20; hatEffect(); facing = _xscale / Math.abs(_xscale); onEnterFrame = baddieAttackEnterFrame; stop(); } frame 33 { gotoAndStop('Idle'); } frame 34 { onEnterFrame = function () { if (carriedBy._currentframe != 39) { moveRL = 0; JumpFunc(0); } }; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; } frame 45 { waterY = centerY; while (_root.water.hitTest(centerX, waterY - 1, true)) { --waterY; } while (!_root.water.hitTest(centerX, waterY, true)) { ++waterY; } hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; rotateInAir(); jumpAnchor._rotation = -_rotation * (_xscale / Math.abs(_xscale)); b = 120; onEnterFrame = function () { moveRL += (_xscale / 33 - moveRL) / 20; bob = (centerY + Math.abs(moveRL * 1) - waterY) / 20; if (Math.abs(bob) > 1) { moveUD -= bob / Math.abs(bob); } else { moveUD -= bob; } if (Math.abs(moveUD) > 0.5) { moveUD *= 0.9; } SwimGuide(); jumpAnchor._rotation = -_rotation * (_xscale / Math.abs(_xscale)); if (_root.testAll(centerX + 15, centerY + 25) && _root.testAll(centerX - 15, centerY + 25)) { while (_root.testAll(centerX, centerY + 15, false)) { --centerY; } while (!_root.testAll(centerX, centerY + 16, false)) { ++centerY; } _rotation = 0; InShellrotation = 0; _x = centerX; _y = centerY + spread; gotoAndStop('Idle'); } if (smokeN > 0) { --smokeN; } else { if (Math.abs(moveRL) > 2) { smokeN = 4; _root.waterSplash(centerX + -_xscale / 10 + moveRL, waterY + 10, _xscale + -moveRL * 5, 0); } } }; } frame 51 { waterY = centerY; while (_root.water.hitTest(centerX, waterY - 1, true)) { --waterY; } while (!_root.water.hitTest(centerX, waterY, true)) { ++waterY; } hitCharFunc = _root.standardHitCharStunJumpFunc; hitPwnFunc = _root.standardHitCharPwnFunc; rotateInAir(); jumpAnchor._rotation = -_rotation * (_xscale / Math.abs(_xscale)); b = 60; InShell.stop(); onEnterFrame = function () { moveRL *= 0.95; bob = (centerY - waterY) / 20; if (Math.abs(bob) > 1) { moveUD -= bob / Math.abs(bob); } else { moveUD -= bob; } if (Math.abs(moveUD) > 0.5) { moveUD *= 0.9; } if (_root.testAll(centerX, centerY + 15, false) && centerY < waterY) { while (_root.testAll(centerX, centerY + 15, false)) { --centerY; } _rotation = 0; rotateInAir(); gotoAndStop('stunLand'); } else { if (Math.abs(rotter) > 10) { rotter -= (rotter / Math.abs(rotter)) * 0.5; } else { if (b > 0 || Math.abs(InShellrotation) > 1) { --b; if (InShellrotation > 180) { InShellrotation -= 360; } else { if (InShellrotation < -180) { InShellrotation += 360; } } rotter += (-InShellrotation / 20 - rotter) / 40; } else { gotoAndStop('Float'); } } } InShellrotation += rotter; JumpGuide(); jumpAnchor._rotation = -_rotation * (_xscale / Math.abs(_xscale)); if (smokeN > 0) { --smokeN; } else { if (Math.abs(moveRL) > 2) { smokeN = 4; _root.waterSplash(centerX + -_xscale / 10 + moveRL, waterY + 10, _xscale + -moveRL * 5, 0); } } }; } } movieClip 7776 waterSplat0 { frame 50 { removeMovieClip(this); } } movieClip 7871 waterSplat1 { frame 49 { removeMovieClip(this); } } movieClip 7942 waterSplat2 { frame 63 { removeMovieClip(this); } } movieClip 7977 { } movieClip 7979 { } movieClip 7981 { frame 10 { _parent.b = 0; _parent.onEnterFrame = _parent.baddieHitEnterFrame; stop(); } } movieClip 7983 { } movieClip 7985 { } movieClip 7986 { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID); } ++_root.BaddieCount; Thrust = 13; bounceThreshDefault = 14; bounceDefault = 0.5; ItIs = 'Bat'; Status = 'Stupid'; if (isCarrying == undefined) { isCarrying = 'nothing'; } if (stayAway == undefined) { stayAway = false; } health = 1; isWide = 60; spread = 20; comaMax = 80; worth = 1; attackStrength = 20; hasBeenGrabbed = true; canZoom = true; originX = _x; originY = _y; getAttacked = _root.standardGetAttacked; _root.baddieSetupFunc(this); if (isCarrying == 'balloon') { var gNHD = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('balloon', 'balloon' + ID, gNHD, {'_x': _x, '_y': _y - 100, 'ID': ID}); originalColor = random(9); _root.ColorEmPants(originalColor, _root.ELayer['balloon' + ID]); _root.ELayer['balloon' + ID].onEnterFrame = function () { if (!_root.Paused) { this.nextFrame(); } }; } } frame 2 { onEnterFrame = function () { if (insomnia || Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600 || Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600) { nextFrame(); } }; stop(); } frame 3 { hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; if (isCarrying == 'balloon') { gotoAndStop('lazy'); } else { if (Status == 'Attacking') { Status = 'Stupid'; Bat.gotoAndPlay(10); } else { if (Status == 'Return') { Status = 'Stupid'; } else { Bat.gotoAndPlay(random(33) + 1); } } onEnterFrame = function () { if (_root.Paused) { Bat.stop(); } else { Bat.play(); _xscale = ((_root.Char._x - _x) / Math.abs(_root.Char._x - _x)) * 100; if (!insomnia && !(Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600) && !(Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600)) { prevFrame(); } } }; } stop(); } frame 4 { b = 60; Bat._xscale = 0; Bat._yscale = 0; spring = 0.1; _yscale = 100; health = 1; getAttacked = _root.standardGetAttacked; delete hitCharFunc; delete hitPwnFunc; onEnterFrame = function () { if (this.downTime > 0) { --this.downTime; } _xscale = ((_root.Char._x - _x) / Math.abs(_root.Char._x - _x)) * 100; if (Bat._xscale < 50) { spring *= 1.1; } else { spring = (100 - Bat._xscale) / 10; } Bat._xscale += spring; Bat._yscale = Bat._xscale; if (Bat._xscale > 95) { Bat._yscale = 100; Bat._xscale = 100; Status = 'Return'; gotoAndStop('Idle'); } }; } frame 5 { hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; delete onEnterFrame; } frame 11 { onEnterFrame = baddieHitEnterFrame; } frame 12 { _root.StompBaddie(this.ItIs, this._x); gotoAndStop('deadjump'); } frame 14 { hitPwnFunc = _root.standardHitCharDeadJumpFunc; hitCharFunc = hitPwnFunc; facing = moveRL / Math.abs(moveRL); _xscale = facing * 100; if (isCarrying == 'balloon') { _root.ELayer['balloon' + ID].moveUD = 0; _root.ELayer['balloon' + ID].gotoAndPlay('floating'); _root.ELayer['balloon' + ID].onEnterFrame = function () { if (!_root.Paused) { this.nextFrame(); if (this.moveUD > -5) { this.moveUD -= 0.5; } this._y += this.moveUD; } }; } onEnterFrame = function () { if (!_root.Paused) { if (this.downTime > 0) { --this.downTime; } this.spring += (100 - this._yscale) / 3; this.spring *= 0.8; this._yscale += this.spring; this._xscale = (100 - this._yscale + 100) * this.facing; if (Math.abs(this.moveRL) > 4) { this.moveRL *= 0.97; } if (Math.abs(this.moveUD) > 20) { this.moveUD *= 0.95; } ++this.moveUD; this._x += this.moveRL; this._y += this.moveUD; rotter += (20 * facing - rotter) / 20; this.centerX = this._x; this.centerY = this._y - this.spread; this.InShellrotation += this.rotter; this.InShell._rotation = this.InShellrotation * this._xscale / Math.abs(this._xscale); if (this._y > -_root.theY + 700) { if (stayAway) { if (this.combo > 1) { if (this.combo != (this.comboSome - 18) / 39) { while (!false) { } } _root.APISnailShellCombo(this.combo); } _root.removeBaddie(this.ID, true); } else { moveUD = 0; moveRL = 0; _x = originX; _y = originY; this.centerX = this._x; this.centerY = this._y - this.spread; gotoAndStop('Return'); } } } }; } frame 15 { spring = 12; b = 20; hatEffect(); facing = _xscale / Math.abs(_xscale); Status = 'Attacking'; onEnterFrame = baddieAttackEnterFrame; stop(); } } movieClip 8004 { frame 1 { if (_parent._name == 'backgroundShell') { ID = _root.BackgroundCoinCount; _name = 'Coin' + ID; if (_root.Bonus2CoinGot[ID] == true) { gotoAndStop('DontCheat'); } ++_root.BackgroundCoinCount; } else { ID = _root.CoinCount; _name = 'Coin' + ID; if (_root[_root.LoadIt + 'CoinGot'][ID] == true) { gotoAndStop('DontCheat'); } else { _root[_root.LoadIt + 'CoinGot'][ID] = false; } ++_root.CoinCount; } } frame 2 { stop(); } frame 3 { _root[_root.LevelLoaded + 'CoinGot'][ID] = true; _root.PayPants(); _root.HurtPants(-5); tehEase = 5; _rotation = random(360); } frame 19 { delete onEnterFrame; _visible = false; stop(); } } movieClip 8008 { frame 1 { stop(); } } movieClip 8012 { frame 1 { if (_parent._parent.piratePal == 'parrot') { gotoAndStop(3); } else { gotoAndStop(2); } } } movieClip 8021 { frame 1 { stop(); } frame 9 { gotoAndStop(1); } } movieClip 8374 { frame 6 { onEnterFrame = function () { if (Math.abs(_parent._x - _root.Char._x) < 300 && _root.Char._y < _parent._y - 20) { delete onEnterFrame; gotoAndPlay('quickToIdle'); } else { if ((_root.Char.isAttacking || _root.Char.holding) && _currentframe < 32) { gotoAndPlay('defend'); } } }; } frame 17 { gotoAndPlay('putAway'); } frame 32 { _parent.gotoAndStop('idle'); } frame 45 { if (_currentframe == 45) { gotoAndPlay('hold'); } } frame 72 { if (_currentframe == 72) { gotoAndPlay('hold'); } } frame 83 { _parent.gotoAndStop('idle'); } frame 96 { if (_currentframe == 96) { gotoAndPlay('hold'); } } frame 107 { _parent.gotoAndStop('idle'); } frame 120 { if (_currentframe == 45) { gotoAndPlay('hold'); } } frame 134 { _parent.gotoAndStop('idle'); } frame 169 { if (_currentframe == 169) { gotoAndPlay('hold'); } } frame 182 { _parent.gotoAndStop('idle'); } frame 183 { gotoAndPlay('slashHigh'); } frame 208 { onEnterFrame = function () { if (_root.Char.isAttacking) { gotoAndPlay(1); delete onEnterFrame; } }; } frame 225 { delete onEnterFrame; } frame 226 { _parent.gotoAndStop('idle'); } frame 252 { onEnterFrame = function () { if (_root.Char.isAttacking) { gotoAndPlay(1); delete onEnterFrame; } }; } frame 262 { delete onEnterFrame; } frame 263 { _parent.gotoAndStop('idle'); } frame 269 { onEnterFrame = function () { if (Math.abs(_parent._x - _root.Char._x) < 200 && _root.Char._y < _parent._y - 50) { delete onEnterFrame; gotoAndPlay('quickToIdle'); } }; } frame 291 { delete onEnterFrame; } frame 308 { _parent.gotoAndStop('idle'); } frame 315 { _parent.gotoAndStop('idle'); } } movieClip 8402 { } movieClip 8449 { frame 24 { _parent.moveRL = _parent._xscale / 8; } frame 28 { stop(); } frame 51 { _parent.gotoAndStop('Idle'); } } movieClip 8453 pirateSword { frame 1 { stop(); } } movieClip 8454 { frame 8 { stop(); } } movieClip 8456 { } movieClip 8521 { frame 67 { _root.removeBaddie(_parent.ID, false); stop(); } } movieClip 8565 { frame 12 { if (_parent.health <= 0) { _parent.gotoAndStop('defeated'); } } frame 81 { _parent.gotoAndStop('Idle'); } } movieClip 8566 elitePirate { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID); } ++_root.BaddieCount; Thrust = 15; bounceThreshDefault = 14; bounceDefault = 0.5; groundLandProtect = -1; ItIs = 'Pirate'; Status = 'Angry'; health = 120; isWide = 40; spread = 30; worth = 3; canZoom = true; if (piratePal == undefined) { piratePal = 'nothing'; } shake = 0; jabTolerance = 3; recenterPoints(); anchorX = _x; anchorY = _y; pwnedByShell = function () { return null; }; hitPwnFunc = function (ex, ey, eRL, superPwn, fromChar) { var v2 = this._x - ex; fromChar.moveRL = -(v2 / Math.abs(v2)) * 10; fromChar.rollRL *= 0.5; this.moveRL = eRL * 0.5; this.gotoAndStop('Idle'); return false; }; _root.baddieSetupFunc(this); } frame 7 { if (_root.LevelLoaded == 'Level10') { gotoAndStop('Jump'); } else { onEnterFrame = function () { if (Math.abs(_x - _root.Char._x) < 1000 && Math.abs(_y - _root.Char._y) < 600 || Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600) { if (_root.tehhangz.hitTest(_x + moveRL, _y + moveUD + 6, true)) { while (!_root.tehhangz.hitTest(_x, _y + 2, true)) { _y = _y + 1; } while (_root.tehhangz.hitTest(_x, _y, true)) { _y = _y - 1; } nextFrame(); } else { if (WraptoGround(true, false) == 'Fall') { JumpFunc(0); } else { nextFrame(); } } } }; stop(); } } frame 13 { moveRL = 0; moveUD = 0; InShell._rotation = 0; moveN = random(10) + 30; holdN = 0; stepN = 8; jabTolerance = 3; Status = 'Angry'; onEnterFrame = function () { if (_root.Paused) { } else { if (downTime > 0) { --downTime; } if ((_root.Char.isAttacking || _root.Char.holding) && Math.abs(_root.Char._x - _x) < 300 && _root.Char._y > _y - 20) { gotoAndStop('spar'); } else { if (moveN > 0) { --moveN; } else { if (moveN == 0) { if (Math.abs(_root.Char._x - _x) > 125 && Math.abs(_root.Char._x - _x) < 600 && Math.abs(_root.Char._y - _y) < 50 && random(2) == 0) { goalX = _root.Char._x; gotoAndStop('attack'); } else { moveRL = random(5) + 5; if (Math.abs(_root.Char._x - anchorX) < 600 && Math.abs(_root.Char._y - anchorY) < 50) { if (_root.Char._x < _x && Math.abs(_root.Char._x - _x) > 300) { moveRL = -moveRL; } } else { if (anchorX < _x) { moveRL = -moveRL; } } holdN = random(3) + 5; moveN = -1; if (_root.Char._x > _x) { _xscale = 100; } else { _xscale = -100; } } } } } if (holdN > 0) { --holdN; } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; if (moveN == -1) { moveN = random(20) + 20; } } } stepN -= Math.abs(moveRL); if (stepN <= -4) { idle.nextFrame(); } if (stepN <= 0) { idle.nextFrame(); stepN += 8; } temp = RLFunc(); if (temp == 'rEdge' || temp == 'rBackEdge') { moveRL = 0; } else { if (temp == 'lEdge' || temp == 'lBackEdge') { moveRL = 0; } else { if (temp == 'Wall' || _xscale * _rotation < -6000) { _xscale = -_xscale; moveRL = -moveRL; } } } if (!(Math.abs(_x - _root.Char._x) < 1000 && Math.abs(_y - _root.Char._y) < 600) && !(Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600)) { prevFrame(); } else { if (Math.abs(_x - _root.Char._x) < 100 && Math.abs(_y - _root.Char._y) < 50) { } } } }; anchX = pirate.sword._x; anchY = pirate.sword._y; anchRot = pirate.sword._rotation; hitCharFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { if (Math.abs(ex - this._x) < this.isWide + eRL - fromChar.spread && fromChar._alpha == 100 && !fromChar.isAttacking) { fromChar.JumpFunc(12); delete fromChar.onEnterFrame; if (ex < _x) { fromChar.moveRL = -8; fromChar._x += fromChar.moveRL; fromChar._y += fromChar.moveUD; fromChar.gotoAndStop('FrontSlam'); fromChar.hurting = true; _root.HurtPants(20, fromChar); return true; } fromChar.moveRL = 8; fromChar._x += fromChar.moveRL; fromChar._y += fromChar.moveUD; fromChar.gotoAndStop('FrontSlam'); fromChar.hurting = true; _root.HurtPants(20, fromChar); return true; } }; getAttacked = function (ex, ey, hitPower, eRot, eType, fromChar) { this.moveUD = -Math.abs(hitPower) * Math.cos(eRot * 0.0174532925199433); downTime = 3; if (_root.Char._x < _x) { _xscale = -100; } else { _xscale = 100; } if (piratePal != 'nothing') { _root.SpawnBaddies(_x - _xscale / 3, _y - 60, piratePal); piratePal = 'nothing'; myPet = _root.BLayer['Baddie' + _root.baddieCount]; myPet.myPerch = this; myPet._xscale = _xscale; myPet.gotoAndStop('Idle'); } if ((ex - _x) * _xscale > 0 || true) { _root.playSound('swordClang', _x, 100); health -= hitPower; if (health > 0) { shakeRL = hitPower; shake = 0; anchX = 30; anchY = -31; anchRot = 45; gotoAndStop('spar'); pirate.gotoAndPlay(eType); if (substring(eType, 1, 3) == 'jab') { moveRL += hitPower * (fromChar._xscale / 200); pirate.onEnterFrame = function () { shake += shakeRL; this.sword._x = anchX - shake * 2; this.sword._y = anchY - shake * 0; this.sword._rotation = anchRot - shake * 4; this.sword._xscale = 100 - shake * 8; shakeRL *= 0.75; shake *= 0.5; }; return 'clash'; } else { if (eType == 'slashHigh') { moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 0.5; fromChar.moveRL = -moveRL; pirate.onEnterFrame = function () { shake += shakeRL; this.sword._x = anchX - shake * 2; this.sword._y = anchY - shake * 0; this.sword._rotation = anchRot - shake * 4; this.sword._yscale = 100 - shake * 4; shakeRL *= 0.75; shake *= 0.5; }; return 'deflect'; } else { if (eType === 'slashLow') { moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 0.5; fromChar.moveRL = -moveRL; pirate.onEnterFrame = function () { shake += shakeRL; this.sword._x = anchX - shake * 1.5; this.sword._y = anchY - shake * 2.5; this.sword._rotation = anchRot - shake * 4; this.sword._xscale = 100 - shake * 4; shakeRL *= 0.75; shake *= 0.5; }; return 'deflect'; } else { pirate.onEnterFrame = function () { shake += shakeRL; this.sword._x = anchX - shake * 2; this.sword._y = anchY - shake * 0; this.sword._rotation = anchRot - shake * 4; this.sword._yscale = 100 - shake * 4; shakeRL *= 0.75; shake *= 0.5; }; if (ex > _x) { fromChar.moveRL = 20; } else { fromChar.moveRL = -20; } moveRL = -fromChar.moveRL * 0.5; fromChar.moveUD = -6; fromChar.FloatUp = 0; return 'deflect'; } } } } else { canZoom = false; if (eType == 'airPwn') { if (ex > _x) { fromChar.moveRL = 20; } else { fromChar.moveRL = -20; } fromChar.moveUD = -6; fromChar.FloatUp = 0; moveRL = -fromChar.moveRL; } else { fromChar.moveRL = -hitPower * Math.sin(eRot * 0.0174532925199433) * 0.5; moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 0.25; } _root.throwSword(_x + _xscale / 4, _y - 50, _xscale, 30); gotoAndStop('defeated'); delete getAttacked; return 'deflect'; } } else { _root.BadSlash.setPan((_root.smoothTheX + this._x) / 3.6 - 100); _root.BadSlash.start(); moveRL = hitPower * Math.sin(eRot * 0.0174532925199433); health -= hitPower; b = 5; this.gotoAndStop('poked'); } }; stop(); } frame 18 { if (piratePal != 'nothing') { _root.SpawnBaddies(_x - _xscale / 3, _y - 60, piratePal); piratePal = 'nothing'; myPet = _root.BLayer['Baddie' + _root.baddieCount]; myPet.myPerch = this; myPet._xscale = _xscale; myPet.gotoAndStop('Idle'); } onEnterFrame = function () { if (!_root.Paused) { if (downTime > 0) { --downTime; } if (Math.abs(_x - _root.Char._x) < 100 && (_x - _root.Char._x) * _root.Char._xscale > 0 && _root.Char.holding) { xDist = (-(_x - (_root.Char._x + _root.Char._xscale * 1.5)) / Math.sin((_root.Char._rotation + 90) * 0.0174532925199433) - moveRL) / 6; if (Math.abs(xDist) > 1) { xDist = 1 * xDist / Math.abs(xDist); } if (Math.abs(moveRL) < 5) { moveRL += xDist; } } else { if (moveRL == 0) { } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; moveRL *= 0.95; } else { moveRL = 0; } } } temp = RLFunc(); if (temp == 'Wall' || temp == 'rEdge' || temp == 'rBackEdge' || temp == 'lEdge' || temp == 'lBackEdge') { _x = _x - moveRL; moveRL *= -0.5; } } }; getAttacked = function (ex, ey, hitPower, eRot, eType, fromChar) { this.moveUD = -Math.abs(hitPower) * Math.cos(eRot * 0.0174532925199433); downTime = 3; if (_root.Char._x < _x) { _xscale = -100; } else { _xscale = 100; } if ((ex - _x) * _xscale > 0 || true) { health -= hitPower; if (health > 0) { shakeRL = hitPower; shake = 0; anchX = 30; anchY = -31; anchRot = 45; gotoAndStop('spar'); pirate.gotoAndPlay(eType); if (substring(eType, 1, 3) == 'jab') { moveRL += hitPower * (fromChar._xscale / 200); pirate.onEnterFrame = function () { shake += shakeRL; this.sword._x = anchX - shake * 2; this.sword._y = anchY - shake * 0; this.sword._rotation = anchRot - shake * 4; this.sword._xscale = 100 - shake * 8; shakeRL *= 0.75; shake *= 0.5; }; _root.playSound('swordPoke', _x, 100); return 'clash'; } else { if (eType == 'slashHigh') { moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 0.5; fromChar.moveRL = -moveRL; pirate.onEnterFrame = function () { shake += shakeRL; this.sword._x = anchX - shake * 2; this.sword._y = anchY - shake * 0; this.sword._rotation = anchRot - shake * 4; this.sword._yscale = 100 - shake * 4; shakeRL *= 0.75; shake *= 0.5; }; _root.playSound('swordClang', _x, 100); return 'deflect'; } else { if (eType === 'slashLow') { moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 0.5; fromChar.moveRL = -moveRL; pirate.onEnterFrame = function () { shake += shakeRL; this.sword._x = anchX - shake * 1.5; this.sword._y = anchY - shake * 2.5; this.sword._rotation = anchRot - shake * 4; this.sword._xscale = 100 - shake * 4; shakeRL *= 0.75; shake *= 0.5; }; _root.playSound('swordClang', _x, 100); return 'deflect'; } else { pirate.onEnterFrame = function () { shake += shakeRL; this.sword._x = anchX - shake * 2; this.sword._y = anchY - shake * 0; this.sword._rotation = anchRot - shake * 4; this.sword._yscale = 100 - shake * 4; shakeRL *= 0.75; shake *= 0.5; }; if (ex > _x) { fromChar.moveRL = 20; } else { fromChar.moveRL = -20; } moveRL = -fromChar.moveRL * 0.5; fromChar.moveUD = -6; fromChar.FloatUp = 0; _root.playSound('swordClang', _x, 100); return 'deflect'; } } } } else { canZoom = false; if (eType == 'airPwn') { if (ex > _x) { fromChar.moveRL = 20; } else { fromChar.moveRL = -20; } fromChar.moveUD = -6; fromChar.FloatUp = 0; moveRL = -fromChar.moveRL; } else { fromChar.moveRL = -hitPower * Math.sin(eRot * 0.0174532925199433) * 0.5; moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 0.25; } _root.playSound('swordClang', _x, 100); _root.throwSword(_x + _xscale / 4, _y - 50, _xscale, 30); gotoAndStop('defeated'); delete getAttacked; return 'deflect'; } } else { _root.BadSlash.setPan((_root.smoothTheX + this._x) / 3.6 - 100); _root.BadSlash.start(); moveRL = hitPower * Math.sin(eRot * 0.0174532925199433); health -= hitPower; b = 5; this.gotoAndStop('poked'); } }; } frame 23 { moveRL = 0; if (goalX < _x) { _xscale = -100; } else { _xscale = 100; } Status = 'pirateCharge'; if (piratePal != 'nothing') { _root.SpawnBaddies(_x - _xscale / 3, _y - 60, piratePal); piratePal = 'nothing'; myPet = _root.BLayer['Baddie' + _root.baddieCount]; myPet.myPerch = this; myPet._xscale = _xscale; myPet.gotoAndStop('Idle'); } onEnterFrame = function () { if (!_root.Paused) { if (downTime > 0) { --downTime; } temp = RLFunc(); if ((temp == 'rEdge' || temp == 'rBackEdge') && moveRL < 0) { moveRL = Math.abs(moveRL) * 0.5; if (_root.Char._x > _x) { _xscale = 100; } else { _xscale = -100; } goalX = _x; if (pirate._currentframe < 29) { pirate.gotoAndPlay('impact'); } } else { if ((temp == 'lEdge' || temp == 'lBackEdge') && moveRL > 0) { moveRL = -Math.abs(moveRL) * 0.5; if (_root.Char._x > _x) { _xscale = 100; } else { _xscale = -100; } goalX = _x; if (pirate._currentframe < 29) { pirate.gotoAndPlay('impact'); } } else { if (temp == 'Wall' || _xscale * _rotation < -6000) { moveRL = -moveRL * 0.5; if (_root.Char._x > _x) { _xscale = 100; } else { _xscale = -100; } } } } if (pirate._currentframe > 23) { if (Math.abs(goalX - _x) < 50) { b = 1; onEnterFrame = function () { if (pirate._currentframe < 33) { if (b > 0) { --b; } else { b = 1; pirate.nextFrame(); } } else { pirate.play(); } if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; moveRL *= 0.95; } else { moveRL = 0; } if (downTime > 0) { --downTime; } temp = RLFunc(); if ((temp == 'rEdge' || temp == 'rBackEdge') && moveRL < 0) { moveRL = Math.abs(moveRL) * 0.5; if (_root.Char._x > _x) { _xscale = 100; } else { _xscale = -100; } goalX = _x; if (pirate._currentframe < 29) { pirate.gotoAndPlay('impact'); } } else { if ((temp == 'lEdge' || temp == 'lBackEdge') && moveRL > 0) { moveRL = -Math.abs(moveRL) * 0.5; if (_root.Char._x > _x) { _xscale = 100; } else { _xscale = -100; } goalX = _x; if (pirate._currentframe < 29) { pirate.gotoAndPlay('impact'); } } else { if (temp == 'Wall' || _xscale * _rotation < -6000) { moveRL = -moveRL * 0.5; if (_root.Char._x > _x) { _xscale = 100; } else { _xscale = -100; } } } } }; } } } }; hitCharFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { if (!this.hitTest(ex + eRL, ey - eUD, true) && eUD > 0) { if (pirate._currentframe > 47) { fromChar.JumpFunc(12); delete fromChar.onEnterFrame; if (ex < _x) { fromChar.moveRL = -4; } else { fromChar.moveRL = 4; } fromChar.gotoAndStop('FrontSlam'); fromChar.hurting = true; _root.HurtPants(20, fromChar); } else { _root.playSound('ploink', _x, 100); fromChar.JumpPadLanded = false; fromChar.aBadOn = this.ID; fromChar._y = this._y - 65; fromChar.quickStomp = true; fromChar.gotoAndStop('BaddieLand'); gotoAndStop('stompStun'); delete hitCharFunc; } return true; } if (fromChar._alpha == 100) { if (ex < _x) { fromChar.moveRL = -8 + moveRL; } else { fromChar.moveRL = 8 + moveRL; } fromChar.JumpFunc(12); delete fromChar.onEnterFrame; fromChar.gotoAndStop('FrontSlam'); fromChar.hurting = true; _root.HurtPants(20, fromChar); } return true; }; getAttacked = function (ex, ey, hitPower, eRot, eType, fromChar) { this.moveUD = -Math.abs(hitPower) * Math.cos(eRot * 0.0174532925199433); downTime = 3; if (_root.Char._x < _x) { _xscale = -100; } else { _xscale = 100; } if ((ex - _x) * _xscale > 0) { _root.playSound('swordClang', _x, 100); health -= hitPower; if (health > 0) { shakeRL = hitPower; shake = 0; anchX = 30; anchY = -31; anchRot = 45; gotoAndStop('spar'); pirate.gotoAndPlay(eType); if (eType == 'airPwn') { pirate.onEnterFrame = function () { shake += shakeRL; this.sword._x = anchX - shake * 2; this.sword._y = anchY - shake * 0; this.sword._rotation = anchRot - shake * 4; this.sword._yscale = 100 - shake * 4; shakeRL *= 0.75; shake *= 0.5; }; if (ex > _x) { fromChar.moveRL = 20; } else { fromChar.moveRL = -20; } moveRL = -fromChar.moveRL; fromChar.moveUD = -6; fromChar.FloatUp = 0; } else { fromChar.moveRL = _xscale / 5; moveRL = -_xscale / 5; pirate.onEnterFrame = function () { shake += shakeRL; this.sword._x = anchX - shake * 1.5; this.sword._y = anchY - shake * 2.5; this.sword._rotation = anchRot - shake * 4; this.sword._xscale = 100 - shake * 4; shakeRL *= 0.75; shake *= 0.5; }; } return 'deflect'; } else { canZoom = false; if (eType == 'airPwn') { if (ex > _x) { fromChar.moveRL = 20; } else { fromChar.moveRL = -20; } fromChar.moveUD = -6; fromChar.FloatUp = 0; moveRL = -fromChar.moveRL; _root.playSound('swordClang', _x, 100); _root.throwSword(_x + _xscale / 4, _y - 50, _xscale, 30); gotoAndStop('defeated'); delete getAttacked; return 'deflect'; } fromChar.moveRL = -hitPower * Math.sin(eRot * 0.0174532925199433) * 0.5; moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 0.25; _root.playSound('swordClang', _x, 100); _root.throwSword(_x + _xscale / 4, _y - 50, _xscale, 30); gotoAndStop('defeated'); delete getAttacked; return 'deflect'; } } }; } frame 29 { onEnterFrame = function () { if (!_root.Paused) { if (FloatUp > 0) { --FloatUp; } else { if (moveUD < 20) { ++moveUD; } } JumpGuide('Idle'); } }; } frame 36 { onEnterFrame = function () { if (downTime > 0) { --downTime; } if (Math.abs(_x - _root.Char._x) < 400 && Math.abs(_y - _root.Char._y) < 100 && _root.Char.hitPower > 20) { gotoAndStop('block'); } }; getAttacked = function (ex, ey, hitPower, eRot, eThis) { this.moveUD = -Math.abs(hitPower) * Math.cos(eRot * 0.0174532925199433); downTime = 10; if ((ex - _x) * _xscale > 0) { _root.swordClang.setPan((_root.smoothTheX + this._x) / 3.6 - 100); _root.swordClang.start(); eThis.moveRL = -eThis.moveRL * 1.25; if (hitPower > 25) { moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 0.5; } shake = hitPower * 0.5; block.sword.anchX = block.sword._x; block.sword.anchRot = block.sword._rotation; block.sword.onEnterFrame = function () { this._x = this.anchX + shake; this._rotation = this.anchRot + shake; shake = -shake * 0.8; }; return 'deflect'; } else { _root.BadSlash.setPan((_root.smoothTheX + this._x) / 3.6 - 100); _root.BadSlash.start(); health -= hitPower; poked.gotoAndPlay(1); b = 5; } }; } frame 37 { gotoAndStop('Idle'); } frame 42 { recenterPoints(); rotateInAir(); InShellrotation = 0; onEnterFrame = function () { if (!_root.Paused) { if (downTime > 0) { --downTime; } spiderRotate += (moveRL - spiderRotate) / 10; InShellrotation += spiderRotate; ++moveUD; JumpGuide('land'); if (_root.stageY * (100 / _root._yscale) - _y < _root.MinY - 700) { messagePopup('spiderGone'); removeMovieClip(this); } } }; stop(); } frame 43 { InShell.stop(); coma = 90; InShell._rotation = 0; cooldown = 0; smokeN = 0; onEnterFrame = function () { if (!_root.Paused) { if (coma > 0) { --coma; comaStars._yscale = coma / 2 + 20; comaStars._xscale = comaStars._yscale; slopeStuff(); if (Math.abs(moveRL + rotAccel) < 40) { moveRL += rotAccel; } else { moveRL *= 40 / Math.abs(moveRL); } if (friction) { if (!sliding) { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } if (smokeN > 0) { --smokeN; } else { smokeN = 2; _root.inkSplat(_x + RLx(moveRL), _y + RLy(moveRL), moveRL * 4, _rotation); } } else { if (!sliding) { if (Math.abs(moveRL) > 1) { moveRL -= (moveRL / Math.abs(moveRL)) * 1; } else { moveRL = 0; } } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } if (smokeN > 0) { --smokeN; } else { smokeN = 5; i = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('smokeFX', 'smokeFX' + i, i, {'_x': this._x, '_y': this._y, '_rotation': this._rotation, '_xscale': Math.abs(moveRL) * 6, '_yscale': Math.abs(moveRL) * 6}); } } if (RLFunc() == 'Wall') { _xscale = -_xscale; moveRL = -moveRL; } } else { gotoAndStop('Idle'); } } }; } frame 44 { recenterPoints(); _rotation = 0; InShell._rotation = 0; _root.spiderDie.setPan((_root.smoothTheX + _x) / 3.6 - 100); _root.spiderDie.start(); onEnterFrame = function () { if (!_root.Paused) { if (downTime > 0) { --downTime; } else { if (_root.Char.hitTest(_x - 15, _y - 15, true)) { ++combo; comboSome += 39; if (combo > 1) { gNHD = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('messagePopup', 'combo!' + gNHD, gNHD, {'_x': _x + 40, '_y': _y - 30, 'smoke': combo + '!'}); } ex = _root.Char.moveRL - moveRL; ey = _root.Char.moveUD - moveUD; _root.Thud.setVolume(Math.sqrt(ex * ex + ey * ey) * 10); _root.Thud.setPan((_root.smoothTheX + _x) / 3.6 - 100); _root.Thud.start(); downTime = 5; if (_root.Char._currentframe == 7) { moveRL = (_x - _root.Char._x) / 10 + _root.Char.moveRL; moveUD = _root.Char.moveUD * 2; _root.movePerformed('headbuttspider'); } else { if (_root.Char.moveRL < 0 || _root.Char.moveRL == 0 && _x < _root.Char._x) { if (_root.Char._currentframe == 31) { moveRL = (10 + Math.abs(_root.Char.moveRL)) * Math.cos((_root.Char._rotation - 100) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.Char.moveRL)) * Math.sin((_root.Char._rotation - 100) * 0.0174532925199433); _root.movePerformed('slidespider'); } else { moveRL = (10 + Math.abs(_root.Char.moveRL)) * Math.cos((_root.Char._rotation - 120) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.Char.moveRL)) * Math.sin((_root.Char._rotation - 120) * 0.0174532925199433); _root.movePerformed('tapspider'); } } else { if (_root.Char._currentframe == 31) { moveRL = (10 + Math.abs(_root.Char.moveRL)) * Math.cos((_root.Char._rotation - 80) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.Char.moveRL)) * Math.sin((_root.Char._rotation - 80) * 0.0174532925199433); _root.movePerformed('slidespider'); } else { moveRL = (10 + Math.abs(_root.Char.moveRL)) * Math.cos((_root.Char._rotation - 60) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.Char.moveRL)) * Math.sin((_root.Char._rotation - 60) * 0.0174532925199433); _root.movePerformed('tapspider'); } } } if (_root.Char.RightIsDown()) { moveRL += 7; } else { if (_root.Char.LeftIsDown()) { moveRL -= 7; } } } else { if (_root.CharQTP.hitTest(_x - 15, _y - 15, true)) { ++combo; comboSome += 39; if (combo > 1) { gNHD = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('messagePopup', 'combo!' + gNHD, gNHD, {'_x': _x + 40, '_y': _y - 30, 'smoke': combo + '!'}); } ex = _root.CharQTP.moveRL - moveRL; ey = _root.CharQTP.moveUD - moveUD; _root.Thud.setVolume(Math.sqrt(ex * ex + ey * ey) * 10); _root.Thud.setPan((_root.smoothTheX + _x) / 3.6 - 100); _root.Thud.start(); downTime = 5; if (_root.CharQTP._currentframe == 7) { moveRL = (_x - _root.CharQTP._x) / 10 + _root.CharQTP.moveRL; moveUD = _root.CharQTP.moveUD * 2; } else { if (_root.CharQTP.moveRL < 0 || _root.CharQTP.moveRL == 0 && _x < _root.CharQTP._x) { if (_root.CharQTP._currentframe == 31) { moveRL = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.cos((_root.CharQTP._rotation - 100) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.sin((_root.CharQTP._rotation - 100) * 0.0174532925199433); } else { moveRL = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.cos((_root.CharQTP._rotation - 120) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.sin((_root.CharQTP._rotation - 120) * 0.0174532925199433); } } else { if (_root.CharQTP._currentframe == 31) { moveRL = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.cos((_root.CharQTP._rotation - 80) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.sin((_root.CharQTP._rotation - 80) * 0.0174532925199433); } else { moveRL = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.cos((_root.CharQTP._rotation - 60) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.sin((_root.CharQTP._rotation - 60) * 0.0174532925199433); } } } if (_root.CharQTP.RightIsDown()) { moveRL += 7; } else { if (_root.CharQTP.LeftIsDown()) { moveRL -= 7; } } } } } _x = _x + moveRL; ++moveUD; _y = _y + moveUD; spiderRotate += ((moveRL * _xscale / 100) * 1.5 - spiderRotate) / 10; InShell._rotation += spiderRotate; if (_root.stageY * (100 / _root._yscale) - _y < _root.MinY - 700) { messagePopup('spiderGone'); if (combo > 1) { if (this.combo != (this.comboSome - 18) / 39) { while (!false) { } } _root.APISnailShellCombo(this.combo); removeMovieClip(this); } if (_root.spidersOut > 0) { --_root.spidersOut; } removeMovieClip(this); } } }; } frame 45 { onEnterFrame = function () { play(); }; } frame 51 { onEnterFrame = function () { if (moveRL == 0) { } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; moveRL *= 0.99; } else { moveRL = 0; } } temp = RLFunc(); if (temp == 'Wall') { moveRL = -moveRL; } }; _root.StompBaddie(); getAttacked = function () { return false; }; hitCharFunc = function () { return false; }; hitPwnFunc = function () { return false; }; } frame 59 { facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { _xscale = facing * 100; if (downTime > 0) { --downTime; } if (moveRL == 0) { } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; moveRL *= 0.99; } else { moveRL = 0; } } temp = RLFunc(); if ((temp == 'rEdge' || temp == 'rBackEdge') && moveRL < 0) { moveRL = Math.abs(moveRL) * 0.5; if (_root.Char._x > _x) { _xscale = 100; } else { _xscale = -100; } goalX = _x; } else { if ((temp == 'lEdge' || temp == 'lBackEdge') && moveRL > 0) { moveRL = -Math.abs(moveRL) * 0.5; if (_root.Char._x > _x) { _xscale = 100; } else { _xscale = -100; } goalX = _x; } else { if (temp == 'Wall' || _xscale * _rotation < -6000) { moveRL = -moveRL * 0.5; if (_root.Char._x > _x) { _xscale = 100; } else { _xscale = -100; } } } } }; } frame 68 { gotoAndStop('Idle'); } } movieClip 8597 pirateSwordDetached { frame 1 { stop(); } frame 30 { stop(); } } movieClip 8745 { frame 1 { b = random(2); } frame 55 { } frame 66 { b = random(3); _parent.duckLook = -_parent._xscale; } frame 123 { } frame 141 { _parent.duckLook = _parent._xscale; } } movieClip 8754 { } movieClip 8773 { frame 13 { gotoAndPlay('loop'); } } movieClip 8781 { frame 1 { stop(); } frame 23 { _parent.gotoAndStop('Idle'); } } movieClip 8805 { frame 35 { if (_parent._currentframe == 6) { if ((_parent._x - _parent.following._x) * _parent._xscale < 0) { _parent._xscale = -_parent._xscale; gotoAndPlay(1); } else { _parent._xscale = -_parent._xscale; _parent.gotoAndStop('takeOff'); } } } } movieClip 8821 { frame 21 { _parent.gotoAndStop('Run'); } } movieClip 8827 { frame 5 { _parent.gotoAndStop('slide'); } } movieClip 8829 { frame 10 { _parent.b = 0; _parent.shakeRL = 0; _parent.onEnterFrame = _parent.baddieHitEnterFrame; stop(); } } movieClip 8831 { } movieClip 8866 { frame 31 { _parent.hitCharFunc = _root.standardHitCharStompFunc; _parent.hitPwnFunc = _root.standardHitCharPwnFunc; _parent.gotoAndStop('Idle'); } } movieClip 9014 { frame 1 { b = random(2); } frame 55 { gotoAndPlay(2); } frame 70 { b = random(3); _parent.duckLook = -_parent._xscale; } frame 123 { if (b > 0) { --b; gotoAndPlay(71); } } frame 145 { _parent.duckLook = _parent._xscale; } } movieClip 9038 { frame 5 { _root.waterSplash(_parent.centerX - 10 + _parent.moveRL, _parent.waterY + 10, 100, 0); _root.waterSplash(_parent.centerX + 10 + _parent.moveRL, _parent.waterY + 10, -100, 0); } frame 29 { gotoAndPlay('loop'); } } movieClip 9059 { frame 73 { _parent.gotoAndStop('Float'); } } movieClip 9069 { frame 19 { _parent.swimRL = 6; } frame 22 { if (_currentframe == 22) { gotoAndPlay('loop'); } } frame 31 { _parent.gotoAndStop('floatStun'); } } movieClip 9070 Duck { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID); } ++_root.BaddieCount; bounceThreshDefault = 14; bounceDefault = 0.8; comaMax = 30; groundLandProtect = -1; attackStrength = 20; canZoom = true; ItIs = 'Duck'; Status = 'Stupid'; health = 60; isWide = 40; worth = 1.4; following = _root.Char; getAttacked = _root.standardGetAttacked; recenterPoints(); _root.baddieSetupFunc(this); moveUD *= 0.5; } frame 2 { onEnterFrame = function () { if (Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600 || Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600) { if (_root.tehhangz.hitTest(_x + moveRL, _y + moveUD + 6, true)) { while (!_root.tehhangz.hitTest(_x, _y + 2, true)) { _y = _y + 1; } while (_root.tehhangz.hitTest(_x, _y, true)) { _y = _y - 1; } moveRL = Math.round(_xscale / 30); moveUD = 0; nextFrame(); } else { if (_root.water.hitTest(_x, _y, true)) { gotoAndStop('Float'); } else { if (WraptoGround(true, false) == 'Fall') { messagePopup('fall'); JumpFunc(0); } else { gotoAndStop('Idle'); } } } } }; stop(); } frame 3 { InShellrotation = 0; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; facing = _xscale / Math.abs(_xscale); duckLook = facing * 100; onEnterFrame = function () { if (_currentframe == 3) { if (!_root.Paused) { InShell.play(); slopeStuff(); if (Math.abs(moveRL + rotAccel) < 40) { moveRL += rotAccel; } else { moveRL *= 40 / Math.abs(moveRL); } if (!sliding) { if (Math.abs(moveRL) > 1) { moveRL -= (moveRL / Math.abs(moveRL)) * 1; } else { moveRL = 0; } } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } if (RLFunc() == 'Wall') { } this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.7; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (Math.abs(_x - _root.Char._x) < 500 && Math.abs(_y - _root.Char._y) < 100 && ((_x - _root.Char._x) * duckLook < 0 || (_x - _root.Char._x) * _xscale < 0) || Math.abs(_x - _root.CharQTP._x) < 500 && Math.abs(_y - _root.CharQTP._y) < 300 && moveRL == 0) { if ((_x - following._x) * _xscale > 0) { _xscale = duckLook; } gotoAndStop('takeOff'); } } else { InShell.stop(); } } }; } frame 4 { InShell._rotation = 0; b = 10; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (_root.Paused) { InShell.stop(); } else { InShell.play(); if (_x > following._x) { if (_xscale > 0) { if (_currentframe == 4) { if (b > 0) { --b; } else { gotoAndStop('slide'); } } } else { if (moveRL > -15) { moveRL -= 0.5; } } } else { if (_x < following._x) { if (_xscale < 0) { if (_currentframe == 4) { if (b > 0) { --b; } else { gotoAndStop('slide'); } } } else { if (moveRL < 15) { moveRL += 0.5; } } } } temp = RLFunc(); this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.7; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (temp == 'Wall' || _xscale * _rotation < -6000) { if (moveRL * _xscale < 0) { gotoAndStop('slide'); } else { if (moveRL == 0) { _xscale = -_xscale; } else { _xscale = (moveRL / Math.abs(moveRL)) * 100; } } } } }; stop(); } frame 5 { InShellrotation = _rotation; recenterPoints(); rotateInAir(); jumpAnchor._rotation = -_rotation * (_xscale / 100); facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (!_root.Paused) { if (Math.abs(moveRL) < 15) { moveRL += _xscale / 1000; } if (moveUD < 8) { moveUD += 0.2; } InShellrotation *= 0.9; if (JumpGuide('Land') == 'Wall') { this.facing = moveRL / Math.abs(moveRL); } jumpAnchor._rotation = -_rotation * facing; this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.7; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (_root.water.hitTest(_x, _y, true)) { _root.waterSplash(centerX - 10 + moveRL, centerY + 15, 100, 0); _root.waterSplash(centerX + 10 + moveRL, centerY + 15, -100, 0); moveRL *= 0.75; moveUD *= 0.75; gotoAndStop('Float'); } InShell.play(); } else { InShell.stop(); } }; } frame 6 { facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (_root.Paused) { InShell.stop(); } else { InShell.play(); if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } if (_currentframe == 6 && duck._currentframe == 1 && Math.abs(moveRL) < 2) { duck.gotoAndPlay(2); } temp = RLFunc(); this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.7; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (temp == 'Wall') { } } }; stop(); } frame 7 { facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.7; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; }; } frame 8 { moveRL = -_xscale / 50; InShell._rotation = 0; b = 10; facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (_root.Paused) { } else { temp = RLFunc(); this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.7; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (temp == 'Wall' || _xscale * _rotation < -6000) { } } }; stop(); } frame 9 { InShellrotation = 0; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; duckLook = _xscale; facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (_currentframe == 9) { slopeStuff(); if (Math.abs(moveRL + rotAccel) < 40) { moveRL += rotAccel; } else { moveRL *= 40 / Math.abs(moveRL); } if (!sliding) { if (Math.abs(moveRL) > 1) { moveRL -= (moveRL / Math.abs(moveRL)) * 1; } else { moveRL = 0; } } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } if (RLFunc() == 'Wall') { } this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.7; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; } }; } frame 11 { onEnterFrame = baddieHitEnterFrame; } frame 12 { this.recenterPoints(); this.rotateInAir(); this.jumpAnchor._rotation = -this._rotation * (this._xscale / Math.abs(this._xscale)); this.hitPwnFunc = _root.standardHitCharStunJumpFunc; this.hitCharFunc = this.hitPwnFunc; this.facing = this._xscale / Math.abs(this._xscale); onEnterFrame = baddieStunJumpEnterFrame; stop(); } frame 13 { InShell.stop(); InShell._rotation = 0; InShellrotation = _rotation; smokeN = 0; InShell; if (isWearing == 'nothing') { hitCharFunc = _root.standardHitCharStunnedFunc; hitPwnFunc = _root.standardHitCharStunnedPwnFunc; } else { hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.protectedHitCharPwnFunc; comaStars._alpha = 0; } facing = _xscale / Math.abs(_xscale); onEnterFrame = baddieStunLandEnterFrame; } frame 14 { recenterPoints(); _rotation = 0; InShell._rotation = 0; hitPwnFunc = _root.standardHitCharDeadJumpFunc; hitCharFunc = hitPwnFunc; facing = _xscale / Math.abs(_xscale); onEnterFrame = baddieDeadJumpEnterFrame; } frame 15 { onEnterFrame = function () {}; stop(); } frame 35 { waterY = centerY; while (_root.water.hitTest(centerX, waterY - 1, true)) { --waterY; } while (!_root.water.hitTest(centerX, waterY, true)) { ++waterY; } hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; rotateInAir(); b = 60; onEnterFrame = function () { moveRL *= 0.95; bob = (centerY + Math.abs(moveRL * 3) - waterY) / 20; if (Math.abs(bob) > 1) { moveUD -= bob / Math.abs(bob); } else { moveUD -= bob; } if (Math.abs(moveUD) > 0.5) { moveUD *= 0.9; } SwimGuide(); if (Math.abs(spiderRotate) > 10) { spiderRotate -= (spiderRotate / Math.abs(spiderRotate)) * 0.5; } else { if (b > 0 || Math.abs(InShellrotation) > 1) { --b; if (InShellrotation > 180) { InShellrotation -= 360; } else { if (InShellrotation < -180) { InShellrotation += 360; } } spiderRotate += (-InShellrotation / 20 - spiderRotate) / 40; } else { if (centerY > waterY) { } else { if (Math.abs(centerX - _root.Char._x) < 500 && Math.abs(centerY - _root.Char._y) < 100 && ((centerX - _root.Char._x) * duckLook < 0 || (centerX - _root.Char._x) * _xscale < 0) || Math.abs(centerX - _root.CharQTP._x) < 500 && Math.abs(centerY - _root.CharQTP._y) < 300 && moveRL == 0) { if ((centerX - following._x) * _xscale > 0) { _xscale = duckLook; } gotoAndStop('waterRun'); } else { if (b > 0) { --b; } else { gotoAndStop('checkDive'); } } } } } InShellrotation += spiderRotate; if (smokeN > 0) { --smokeN; } else { if (Math.abs(moveRL) > 2) { smokeN = 4; _root.waterSplash(centerX + -_xscale / 10 + moveRL, waterY + 10, _xscale + -moveRL * 5, 0); } } }; } frame 41 { waterY = centerY; while (_root.water.hitTest(centerX, waterY - 1, true)) { --waterY; } while (!_root.water.hitTest(centerX, waterY, true)) { ++waterY; } hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; rotateInAir(); b = 60; onEnterFrame = function () { moveRL *= 0.95; bob = (centerY + Math.abs(moveRL * 3) - waterY) / 20; if (Math.abs(bob) > 1) { moveUD -= bob / Math.abs(bob); } else { moveUD -= bob; } if (Math.abs(moveUD) > 0.5) { moveUD *= 0.9; } if (_root.testAll(centerX, centerY + 15, false) && centerY < waterY) { while (_root.testAll(centerX, centerY + 15, false)) { --centerY; } _rotation = 0; rotateInAir(); gotoAndStop('stunLand'); } else { if (Math.abs(spiderRotate) > 10) { spiderRotate -= (spiderRotate / Math.abs(spiderRotate)) * 0.5; } else { if (b > 0 || Math.abs(InShellrotation) > 1) { --b; if (InShellrotation > 180) { InShellrotation -= 360; } else { if (InShellrotation < -180) { InShellrotation += 360; } } spiderRotate += (-InShellrotation / 20 - spiderRotate) / 40; } else { gotoAndStop('Float'); } } } InShellrotation += spiderRotate; JumpGuide(); if (smokeN > 0) { --smokeN; } else { if (Math.abs(moveRL) > 2) { smokeN = 4; _root.waterSplash(centerX + -_xscale / 10 + moveRL, waterY + 10, _xscale + -moveRL * 5, 0); } } }; } frame 49 { rotateInAir(); smokeN = 0; b = 60; onEnterFrame = function () { if (Math.abs(moveRL) < 7) { moveRL += _xscale / 1000; } bob = (centerY - (waterY - 10)) / 20; if (Math.abs(bob) > 1) { moveUD -= bob / Math.abs(bob); } else { moveUD -= bob; } if (Math.abs(moveUD) > 0.5) { moveUD *= 0.9; } if (smokeN > 0) { --smokeN; } else { if (Math.abs(moveRL) > 2) { smokeN = 4; _root.waterSplash(centerX + -_xscale / 10 + moveRL, waterY + 10, _xscale, 0); } } JumpGuide(); _xscale = (moveRL / Math.abs(moveRL)) * 100; rotateInAir(); if (_root.testAll(centerX + 15, centerY + 25) && _root.testAll(centerX - 15, centerY + 25)) { while (_root.testAll(centerX, centerY + 15, false)) { --centerY; } while (!_root.testAll(centerX, centerY + 16, false)) { ++centerY; } _rotation = 0; InShellrotation = 0; _x = centerX; _y = centerY + spread; gotoAndStop('Run'); } else { if (Math.abs(centerX - _root.Char._x) < 500 && Math.abs(centerY - _root.Char._y) < 100 && ((centerX - _root.Char._x) * duckLook < 0 || (centerX - _root.Char._x) * _xscale < 0) || Math.abs(_x - _root.CharQTP._x) < 500 && Math.abs(centerY - _root.CharQTP._y) < 300 && moveRL == 0) { b = 60; } else { if (b > 0) { --b; } else { gotoAndStop('Float'); } } } }; } frame 58 { recenterPoints(); rotateInAir(); onEnterFrame = function () { moveRL *= 0.9; bob = (centerY + Math.abs(moveRL * 5) - waterY) / 20; if (Math.abs(bob) > 1) { moveUD -= bob / Math.abs(bob); } else { moveUD -= bob; } if (Math.abs(moveUD) > 0.5) { moveUD *= 0.9; } SwimGuide(); if (Math.abs(Math.abs(-Math.atan2(centerX - _root.Char._x, centerY - _root.Char._y) / 0.0174532925199433) - 180) < 45 && InShell._currentframe > 24) { gotoAndStop('Dive'); } }; } frame 67 { waterY = centerY; while (_root.water.hitTest(centerX, waterY - 1, true)) { --waterY; } while (!_root.water.hitTest(centerX, waterY, true)) { ++waterY; } hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; InShellrotation = 0; rotateInAir(); b = 120; swimRL = 0; onEnterFrame = function () { moveRL *= 0.95; bob = (centerY + Math.abs(moveRL * 3) - waterY) / 20; if (Math.abs(bob) > 1) { moveUD -= bob / Math.abs(bob); } else { moveUD -= bob; } var v2 = -Math.atan2(centerX - _root.Char._x, centerY - _root.Char._y) / 0.0174532925199433 - 180; if (v2 > 180) { v2 -= 360; } else { if (v2 < -180) { v2 += 360; } } v2 *= 0.75; if (Math.abs(v2) > 20) { v2 = (v2 / Math.abs(v2)) * 20; } _root.messagePopup('at = ' + v2); if (Math.abs(v2 - InShellrotation) > 180) { if (InShellrotation < v2) { v2 -= 360; } else { v2 += 360; } } InShellrotation += (v2 - InShellrotation) / 20; moveRL = swimRL * Math.sin((InShellrotation + 180) * 0.0174532925199433); moveUD = -swimRL * Math.cos((InShellrotation + 180) * 0.0174532925199433); if (SwimGuide() == 'Wall') { InShell.gotoAndPlay('bump'); InShellrotation += 180; delete onEnterFrame; } }; } } movieClip 9262 { frame 1 { _parent.Status = 'attackUp'; } frame 21 { _root.playSound('crabClaw', _parent._x, 100); } frame 43 { _root.playSound('crabClaw', _parent._x, 100); } frame 52 { if (_parent.b > 0) { --_parent.b; gotoAndPlay('clawsUpLoop'); } else { _parent.b = 1; _parent.Status = 'Stupid'; } } frame 60 { _parent.Status = 'attackSide'; } frame 75 { _root.playSound('crabClaw', _parent._x, 100); } frame 97 { _root.playSound('crabClaw', _parent._x, 100); } frame 111 { if (_parent.b > 0) { --_parent.b; gotoAndPlay('clawsDownLoop'); } else { _parent.b = 1; _parent.Status = 'Stupid'; } } } movieClip 9265 { frame 10 { _parent.b = 0; _parent.onEnterFrame = _parent.baddieHitEnterFrame; stop(); } } movieClip 9270 { } movieClip 9292 { frame 40 { stop(); } } movieClip 9297 { } movieClip 9299 { frame 1 { stop(); } } movieClip 9302 { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID); } ++_root.BaddieCount; ItIs = 'Crab'; Status = 'Stupid'; if (isWearing == undefined) { isWearing = 'nothing'; } health = 40; isWide = 35; comaMax = 80; worth = 1; attackStrength = 20; hasBeenGrabbed = false; canZoom = true; bounceThresh = 5; bounceDefault = 0.3; jabSound = 'BadSlash'; slashSound = 'baseballHit'; if (isWearing == 'nothing') { getAttacked = _root.standardGetAttacked; hatEffect = null; } else { getAttacked = _root.protectedGetAttacked; } lockedOn = _root.standardLockedOn; removeMovieClip(_root.ELayer['hatEffect' + this.ID]); removeMovieClip(_root.UberForeground['hatEffect' + this.ID]); _root.baddieSetupFunc(this); } frame 2 { onEnterFrame = function () { if (Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600 || Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600) { if (_root.tehhangz.hitTest(_x + moveRL, _y + moveUD + 6, true)) { while (!_root.tehhangz.hitTest(_x, _y + 2, true)) { _y = _y + 1; } while (_root.tehhangz.hitTest(_x, _y, true)) { _y = _y - 1; } nextFrame(); } else { if (isWearing == 'pumpkin') { _root.ELayer.attachMovie('hatEffect', 'hatEffect' + ID, _root.ELayer.getNextHighestDepth(), {'_x': _x, '_y': _y}); thisHat = _root.ELayer['hatEffect' + ID]; } else { if (isWearing == 'lamp') { _root.UberForeground.attachMovie('hatEffect', 'hatEffect' + ID, _root.UberForeground.getNextHighestDepth(), {'_x': _x, '_y': _y}); thisHat = _root.UberForeground['hatEffect' + ID]; } } thisHat.gotoAndStop(isWearing); hatEffect = _root[isWearing + 'HatEffect']; hatEffect(); if (WraptoGround(true, false) == 'Fall') { JumpFunc(0); } else { nextFrame(); } } } }; stop(); } frame 3 { InShell._rotation = 0; InShellrotation = _rotation; makeScurryPrintN = 10; b = 1; hitCharFunc = _root.crabHitCharStompFunc; hitPwnFunc = _root.crabHitCharPwnFunc; facing = _xscale / Math.abs(_xscale); onEnterFrame = baddieIdleEnterFrame; stop(); } frame 4 { onEnterFrame = function () { if (_root.Paused) { InShell.stop(); } else { InShell.play(); if (downTime > 0) { --downTime; } if (!(Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600) && !(Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600)) { prevFrame(); } if (Math.abs(_x - _root.Char._x) < 80 && (_x - _root.Char._x) * _root.Char._xscale > 0 && _root.Char.lockOn == ID) { xDist = (-(_x - (_root.Char._x + _root.Char._xscale * 1.25)) / Math.sin((_root.Char._rotation + 90) * 0.0174532925199433) - moveRL) / 4; moveRL += xDist; if (Math.abs(moveRL) > 10) { moveRL = (moveRL / Math.abs(moveRL)) * 10; } } else { if (_root.Char.lockOn == ID) { } else { gotoAndStop('Idle'); } } temp = RLFunc(); if (temp == 'rEdge' || temp == 'rBackEdge') { _xscale = 100; moveRL = 3.333333333333334; } else { if (temp == 'lEdge' || temp == 'lBackEdge') { _xscale = -100; moveRL = -3.333333333333334; } else { if (temp == 'Wall' || _xscale * _rotation < -6000) { _xscale = -_xscale; moveRL = Math.round(_xscale / 30); } } } } }; stop(); } frame 5 { hitCharFunc = _root.standardHitCharStompFunc; if (isWearing == 'nothing') { hitPwnFunc = _root.standardHitCharPwnFunc; } else { hitPwnFunc = _root.protectedHitCharPwnFunc; } if (moveUD > -2) { InShell.gotoAndPlay(12); } facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { InShellrotation *= 0.9; baddieJumpEnterFrame(); }; } frame 6 { this.InShellrotation = 0; this.InShell._rotation = 0; gotoAndStop('Idle'); } frame 11 { onEnterFrame = baddieHitEnterFrame; } frame 12 { this.recenterPoints(); this.rotateInAir(); this.jumpAnchor._rotation = -this._rotation * (this._xscale / Math.abs(this._xscale)); this.hitPwnFunc = _root.standardHitCharStunJumpFunc; this.hitCharFunc = this.hitPwnFunc; this.facing = this._xscale / Math.abs(this._xscale); onEnterFrame = baddieStunJumpEnterFrame; stop(); } frame 13 { InShell.stop(); InShell._rotation = 0; InShellrotation = _rotation; smokeN = 0; if (isWearing == 'nothing') { hitCharFunc = _root.standardHitCharStunnedFunc; hitPwnFunc = _root.standardHitCharStunnedPwnFunc; } else { hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.protectedHitCharPwnFunc; comaStars._alpha = 0; } facing = _xscale / Math.abs(_xscale); onEnterFrame = baddieStunLandEnterFrame; } frame 14 { recenterPoints(); _rotation = 0; InShell._rotation = 0; hitPwnFunc = _root.standardHitCharDeadJumpFunc; hitCharFunc = hitPwnFunc; facing = _xscale / Math.abs(_xscale); onEnterFrame = baddieDeadJumpEnterFrame; } frame 15 { spring = 12; b = 20; hatEffect(); facing = _xscale / Math.abs(_xscale); onEnterFrame = baddieAttackEnterFrame; stop(); } frame 33 { hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; gotoAndStop('Idle'); } frame 34 { delete onEnterFrame; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; } frame 45 { waterY = centerY; while (_root.water.hitTest(centerX, waterY - 1, true)) { --waterY; } while (!_root.water.hitTest(centerX, waterY, true)) { ++waterY; } hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; rotateInAir(); jumpAnchor._rotation = -_rotation * (_xscale / 100); b = 120; onEnterFrame = function () { moveRL += (_xscale / 33 - moveRL) / 20; bob = (centerY + Math.abs(moveRL * 1) - waterY) / 20; if (Math.abs(bob) > 1) { moveUD -= bob / Math.abs(bob); } else { moveUD -= bob; } if (Math.abs(moveUD) > 0.5) { moveUD *= 0.9; } SwimGuide(); jumpAnchor._rotation = -_rotation * (_xscale / 100); if (_root.testAll(centerX + 15, centerY + 25) && _root.testAll(centerX - 15, centerY + 25)) { while (_root.testAll(centerX, centerY + 15, false)) { --centerY; } while (!_root.testAll(centerX, centerY + 16, false)) { ++centerY; } _rotation = 0; InShellrotation = 0; _x = centerX; _y = centerY + spread; gotoAndStop('Idle'); } if (smokeN > 0) { --smokeN; } else { if (Math.abs(moveRL) > 2) { smokeN = 4; _root.waterSplash(centerX + -_xscale / 10 + moveRL, waterY + 10, _xscale + -moveRL * 5, 0); } } }; } frame 51 { waterY = centerY; while (_root.water.hitTest(centerX, waterY - 1, true)) { --waterY; } while (!_root.water.hitTest(centerX, waterY, true)) { ++waterY; } hitCharFunc = _root.standardHitCharStunJumpFunc; hitPwnFunc = _root.standardHitCharPwnFunc; rotateInAir(); jumpAnchor._rotation = -_rotation * (_xscale / 100); b = 60; InShell.stop(); onEnterFrame = function () { moveRL *= 0.95; bob = (centerY - waterY) / 20; if (Math.abs(bob) > 1) { moveUD -= bob / Math.abs(bob); } else { moveUD -= bob; } if (Math.abs(moveUD) > 0.5) { moveUD *= 0.9; } if (_root.testAll(centerX, centerY + 15, false) && centerY < waterY) { while (_root.testAll(centerX, centerY + 15, false)) { --centerY; } _rotation = 0; rotateInAir(); gotoAndStop('stunLand'); } else { if (Math.abs(rotter) > 10) { rotter -= (rotter / Math.abs(rotter)) * 0.5; } else { if (b > 0 || Math.abs(InShellrotation) > 1) { --b; if (InShellrotation > 180) { InShellrotation -= 360; } else { if (InShellrotation < -180) { InShellrotation += 360; } } rotter += (-InShellrotation / 20 - rotter) / 40; } else { gotoAndStop('Float'); } } } InShellrotation += rotter; JumpGuide(); jumpAnchor._rotation = -_rotation * (_xscale / 100); if (smokeN > 0) { --smokeN; } else { if (Math.abs(moveRL) > 2) { smokeN = 4; _root.waterSplash(centerX + -_xscale / 10 + moveRL, waterY + 10, _xscale + -moveRL * 5, 0); } } }; } } movieClip 9304 { frame 1 { stop(); } } movieClip 9334 { frame 5 { stop(); } frame 29 { gotoAndPlay(27); } } movieClip 9338 { frame 4 { _parent.gotoAndStop('Bobble'); } } movieClip 9355 { frame 16 { _parent.gotoAndStop('Idle'); } } movieClip 9358 { frame 10 { _parent.b = 0; _parent.onEnterFrame = _parent.baddieHitEnterFrame; stop(); } } movieClip 9399 { frame 54 { stop(); } } movieClip 9466 { frame 38 { stop(); } frame 60 { _parent.gotoAndStop('Bobble'); } } movieClip 9483 { frame 35 { gotoAndPlay('loop'); } } movieClip 9485 { } movieClip 9487 { } movieClip 9488 Frog { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID); } ++_root.BaddieCount; ItIs = 'Frog'; Status = 'Stupid'; if (isWearing == undefined) { isWearing = 'nothing'; } health = 60; isWide = 35; comaMax = 80; worth = 1; attackStrength = 20; hasBeenGrabbed = false; canZoom = true; bounceThresh = 20; bounceDefault = 0.6; _root.ColorEmPants(random(9), this, true); jabSound = 'BadSlash'; slashSound = 'baseballHit'; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; getAttacked = _root.standardGetAttacked; lockedOn = _root.standardLockedOn; _root.baddieSetupFunc(this); } frame 2 { onEnterFrame = function () { if (Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600 || Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600) { if (_root.tehhangz.hitTest(_x + moveRL, _y + moveUD + 6, true)) { while (!_root.tehhangz.hitTest(_x, _y + 2, true)) { _y = _y + 1; } while (_root.tehhangz.hitTest(_x, _y, true)) { _y = _y - 1; } nextFrame(); } else { if (WraptoGround(true, false) == 'Fall') { JumpFunc(0); } else { nextFrame(); } } } }; stop(); } frame 3 { InShell._rotation = 0; InShellrotation = 0; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; b = 10; facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (_root.Paused) { InShell.stop(); } else { InShell.play(); if (!(Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600) && !(Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600) && _currentframe == 3 && !insomniac) { prevFrame(); } this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.3; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (moveRL == 0) { } else { if (Math.abs(moveRL) > 2) { moveRL -= (moveRL / Math.abs(moveRL)) * 2; } else { moveRL = 0; } } if (b > 0) { --b; temp = RLFunc(); } else { FloatUp = 4; _root.playSound('ribbit', _x, 100); JumpFunc(10); if (Math.abs(_rotation) < 10) { moveRL = (_xscale / 100) * 5; } else { moveRL = (_rotation / Math.abs(_rotation)) * 5; _xscale = (moveRL / Math.abs(moveRL)) * 100; } JumpGuide(); } } }; stop(); } frame 4 { onEnterFrame = function () { if (_root.Paused) { Spider.stop(); } else { Spider.play(); if (!(Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600) && !(Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600)) { prevFrame(); } if (Math.abs(_x - _root.Char._x) < 80 && (_x - _root.Char._x) * _root.Char._xscale > 0 && _root.Char.lockOn == ID) { xDist = (-(_x - (_root.Char._x + _root.Char._xscale * 1.25)) / Math.sin((_root.Char._rotation + 90) * 0.0174532925199433) - moveRL) / 4; moveRL += xDist; if (Math.abs(moveRL) > 10) { moveRL = (moveRL / Math.abs(moveRL)) * 10; } } else { if (_root.Char.lockOn == ID) { } else { gotoAndStop('Idle'); } } temp = RLFunc(); if (temp == 'rEdge' || temp == 'rBackEdge') { _xscale = 100; moveRL = 3.333333333333334; } else { if (temp == 'lEdge' || temp == 'lBackEdge') { _xscale = -100; moveRL = -3.333333333333334; } else { if (temp == 'Wall' || _xscale * _rotation < -6000) { _xscale = -_xscale; moveRL = Math.round(_xscale / 30); } } } } }; stop(); } frame 5 { jumpAnchor._rotation = -_rotation * (_xscale / 100); if (moveUD > -2) { InShell.gotoAndPlay('fall'); } facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (!_root.Paused) { if (FloatUp > 0) { --FloatUp; } else { if (moveUD < 20) { ++moveUD; } } if (moveUD > -8) { InShell.play(); } if (coma > 0) { if (JumpGuide('stunLand') == 'Wall') { _xscale = -_xscale; facing = -facing; } } else { if (JumpGuide('Land') == 'Wall') { if (_root.tehwallz.hitTest(centerX + 30, _y, true)) { _xscale = -100; } else { if (_root.tehwallz.hitTest(centerX - 30, _y, true)) { _xscale = 100; } } facing = _xscale / Math.abs(_xscale); gotoAndStop('WallJump'); } } jumpAnchor._rotation = -_rotation * (_xscale / 100); this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.5; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; } }; } frame 6 { InShell._rotation = 0; InShellrotation = 0; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (_root.Paused) { InShell.stop(); } else { InShell.play(); if (moveRL == 0) { } else { if (Math.abs(moveRL) > 2) { moveRL -= (moveRL / Math.abs(moveRL)) * 2; } else { moveRL = 0; } } RLFunc(); this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.5; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; } }; stop(); } frame 7 { InShell._rotation = 0; InShellrotation = 0; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; b = 60; onEnterFrame = function () { if (_root.Paused) { InShell.stop(); } else { InShell.play(); if (moveRL == 0) { } else { if (Math.abs(moveRL) > 2) { moveRL -= (moveRL / Math.abs(moveRL)) * 2; } else { moveRL = 0; } } RLFunc(); } }; stop(); } frame 11 { onEnterFrame = baddieHitEnterFrame; } frame 12 { _xscale = (-moveRL / Math.abs(moveRL)) * 100; InShellrotation = _xscale * 0.9; recenterPoints(); rotateInAir(); jumpAnchor._rotation = -_rotation * (_xscale / 100); _yscale = 100; if (coma > 0) { lander = 'stunLand'; } else { lander = 'Land'; } hitCharFunc = _root.standardHitCharStunJumpFunc; facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (!_root.Paused) { if (downTime > 0) { --downTime; } if (FloatUp > 0) { --FloatUp; } else { if (moveUD < 20) { ++moveUD; } } if (JumpGuide(lander) == 'Wall') { _xscale = -_xscale; InShellrotation *= -1; recenterPoints(); rotateInAir(); } if (Math.abs(this.moveRL) > 4) { this.moveRL *= 0.97; } if (Math.abs(this.moveUD) > 20) { this.moveUD *= 0.95; } facing = -moveRL / Math.abs(moveRL); _xscale = facing * 100; this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.9; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (Math.abs(moveRL) > 2 || true) { InShellrotation += (-Math.atan2(moveRL, moveUD) / 0.0174532925199433 - InShellrotation) / 3; } jumpAnchor._rotation = -_rotation * (_xscale / 100); if (_root.stageY * (100 / _root._yscale) - _y < _root.MinY - 700) { if (combo > 1) { if (this.combo != (this.comboSome - 18) / 39) { while (!false) { } } _root.APISnailShellCombo(this.combo); } if (_root.spidersOut > 0) { --_root.spidersOut; } _root.removeBaddie(ID, true); } } }; stop(); } frame 13 { smokeN = 0; hitCharFunc = _root.standardHitCharStunnedFunc; hitPwnFunc = _root.standardHitCharStunnedPwnFunc; facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (!_root.Paused) { if (downTime > 0) { --downTime; } if (coma > 0) { --coma; if (coma == 0) { comaStars._yscale = 0; comaStars._xscale = 0; } else { comaStars._yscale = (coma / comaMax) * 120; comaStars._xscale = comaStars._yscale; } } else { InShell.nextFrame(); } slopeStuff(); if (Math.abs(moveRL + rotAccel) < 40) { moveRL += rotAccel; } else { moveRL *= 40 / Math.abs(moveRL); } if (Math.abs(_x - _root.Char._x) < 80 && (_x - _root.Char._x) * _root.Char._xscale > 0 && _root.Char.lockOn == ID && false) { xDist = (-(_x - (_root.Char._x + _root.Char._xscale * 1.1)) / Math.sin((_root.Char._rotation + 90) * 0.0174532925199433) - moveRL) / 4; moveRL += xDist; if (Math.abs(moveRL) > 10) { moveRL = (moveRL / Math.abs(moveRL)) * 10; } } else { if (friction) { if (!sliding) { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } if (smokeN > 0) { --smokeN; } else { smokeN = 2; _root.inkSplat(_x + RLx(moveRL), _y + RLy(moveRL), moveRL * 4, _rotation); } } else { if (!sliding) { if (Math.abs(moveRL) > 1) { moveRL -= (moveRL / Math.abs(moveRL)) * 1; } else { moveRL = 0; } } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } if (smokeN > 0) { --smokeN; } else { smokeN = 5; i = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('smokeFX', 'smokeFX' + i, i, {'_x': this._x, '_y': this._y, '_rotation': this._rotation, '_xscale': Math.abs(moveRL) * 6, '_yscale': Math.abs(moveRL) * 6}); } } } if (RLFunc() == 'Wall') { moveRL = -moveRL; } this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.7; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; } }; } frame 14 { _xscale = (-moveRL / Math.abs(moveRL)) * 100; recenterPoints(); _rotation = 0; InShell._rotation = 0; hitPwnFunc = _root.standardHitCharDeadJumpFunc; hitCharFunc = hitPwnFunc; facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (!_root.Paused) { if (downTime > 0) { --downTime; } _x = _x + moveRL; ++moveUD; _y = _y + moveUD; centerX = _x; centerY = _y - this.spread; facing = -moveRL / Math.abs(moveRL); _xscale = facing * 100; if (Math.abs(this.moveRL) > 4) { this.moveRL *= 0.97; } if (Math.abs(this.moveUD) > 20) { this.moveUD *= 0.95; } this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.7; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; InShell._rotation += (_xscale / 3) * (moveRL / Math.abs(moveRL)); if (_root.stageY * (100 / _root._yscale) - _y < _root.MinY - 700) { if (combo > 1) { if (this.combo != (this.comboSome - 18) / 39) { while (!false) { } } _root.APISnailShellCombo(this.combo); } _root.removeBaddie(ID, true); } } }; } frame 15 { spring = 16; b = 20; facing = _xscale / Math.abs(_xscale); onEnterFrame = baddieAttackEnterFrame; stop(); } frame 22 { moveRL = _xscale / 20; moveUD = -12; FloatUp = 4; InShellrotation = 0; recenterPoints(); rotateInAir(); jumpAnchor._rotation = -_rotation * (_xscale / 100); b = 60; onEnterFrame = function () { if (b > 0) { --b; } else { FloatUp = 4; gotoAndStop('Jump'); } }; } frame 34 { delete onEnterFrame; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; } } movieClip 9506 { frame 1 { ID = _root.CoinCount; _name = 'Coin' + ID; if (_root[_root.LoadIt + 'CoinGot'][ID] == true) { gotoAndStop('DontCheat'); } else { _root[_root.LoadIt + 'CoinGot'][ID] = false; } ++_root.CoinCount; CoinCache.cacheAsBitmap = true; } frame 2 { stop(); } frame 3 { _root[_root.LevelLoaded + 'CoinGot'][ID] = true; _rotation = random(360); onEnterFrame = function () { _root.PayPants(); _root.HurtPants(-5); }; } frame 8 { delete onEnterFrame; } frame 19 { _visible = false; removeMovieClip(this); stop(); } } movieClip 9546 balloon { frame 39 { gotoAndStop(1); } frame 59 { gotoAndPlay('floating'); } } movieClip 9548 swingChain { } movieClip 9550 slamShadow { } movieClip 9552 footprint { } movieClip 9554 scurryprint { } movieClip 9556 { } movieClip 9593 sandSplat0 { frame 46 { var tempX = _x + -65 * (_xscale / 100) * Math.sin((_rotation + 90) * 0.0174532925199433) + 5 * Math.sin((_rotation + 180) * 0.0174532925199433); var tempY = _y - -65 * (_xscale / 100) * Math.cos((_rotation + 90) * 0.0174532925199433) - 5 * Math.cos((_rotation + 180) * 0.0174532925199433); if (aplatz == -1 && _root.testAll(tempX, tempY)) { var tempX = Math.floor((_root.MaxX + _x) / 2880); var tempY = Math.floor((_root.MaxY + _y) / 1920); var temp = tempY + tempX * _root.FGtilesY; _x = _x + (_root.MaxX - tempX * 2880); _y = _y + (_root.MaxY + (random(4) - 2) - tempY * 1920); _root['levelBitmap' + temp].draw(this, this.transform.matrix); } removeMovieClip(this); } } movieClip 9632 sandSplat1 { frame 33 { var tempX = _x + -65 * (_xscale / 100) * Math.sin((_rotation + 90) * 0.0174532925199433) + 5 * Math.sin((_rotation + 180) * 0.0174532925199433); var tempY = _y - -65 * (_xscale / 100) * Math.cos((_rotation + 90) * 0.0174532925199433) - 5 * Math.cos((_rotation + 180) * 0.0174532925199433); if (aplatz == -1 && _root.testAll(tempX, tempY)) { var tempX = Math.floor((_root.MaxX + _x) / 2880); var tempY = Math.floor((_root.MaxY + _y) / 1920); var temp = tempY + tempX * _root.FGtilesY; _x = _x + (_root.MaxX - tempX * 2880); _y = _y + (_root.MaxY + (random(4) - 2) - tempY * 1920); _root['levelBitmap' + temp].draw(this, this.transform.matrix); } removeMovieClip(this); } } movieClip 9669 sandSplat2 { frame 31 { var tempX = _x + -65 * (_xscale / 100) * Math.sin((_rotation + 90) * 0.0174532925199433) + 5 * Math.sin((_rotation + 180) * 0.0174532925199433); var tempY = _y - -65 * (_xscale / 100) * Math.cos((_rotation + 90) * 0.0174532925199433) - 5 * Math.cos((_rotation + 180) * 0.0174532925199433); if (aplatz == -1 && _root.testAll(tempX, tempY)) { var tempX = Math.floor((_root.MaxX + _x) / 2880); var tempY = Math.floor((_root.MaxY + _y) / 1920); var temp = tempY + tempX * _root.FGtilesY; _x = _x + (_root.MaxX - tempX * 2880); _y = _y + (_root.MaxY + (random(4) - 2) - tempY * 1920); _root['levelBitmap' + temp].draw(this, this.transform.matrix); } removeMovieClip(this); } } movieClip 9700 smokeFX { frame 31 { removeMovieClip(this); } } movieClip 9706 { } movieClip 9714 { } movieClip 9715 hatEffect { } movieClip 9757 { frame 1 { _xscale = (100 / _parent._parent._xscale) * 100; _x = random(80) - 40; } frame 46 { stop(); } } movieClip 9798 { frame 1 { stop(); } frame 55 { stop(); } } movieClip 9801 { } movieClip 9806 { } movieClip 9819 aPlatzSmoke { instance geyser of movieClip 9806 { onClipEvent (load) { _yscale = 200; } } } movieClip 10104 { frame 1 { b = 80; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown) || b > 50) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 2 { b = 80; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown) || b > 50) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 3 { b = 200; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown) || b > 170) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 4 { _root.Char.SisDown = true; onShow = function () { if (_root.Char.JumpListener()) { _root.Char._x -= 20; _root.Char._y += 10; _root.Char.moveRL = -5; _parent.gotoAndStop(4); } }; } frame 11 { b = 120; onShow = function () { if (b > 0) { --b; } else { _root.switchCameraBack(); _root.InteractLayer.mayor.gotoAndStop(3); _parent._parent.etrigger.gotoAndStop(4); _parent.gotoAndStop(4); } }; } frame 13 { b = 300; onShow = function () { if (b > 0) { --b; } else { _parent.gotoAndStop(4); } }; } frame 14 { b = 120; onShow = function () { if (b > 0) { --b; } else { _root.switchCameraBack(); _root.InteractLayer.mayor.gotoAndStop(3); _parent._parent.etrigger.gotoAndStop(4); _parent.gotoAndStop(4); } }; } frame 24 { b = 180; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown && b < 160)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 25 { b = 180; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown && b < 160)) { --b; } else { _root.BLayer.Baddie100.gotoAndStop('Angry'); UisDown = true; _parent.nextFrame(); } }; } frame 26 { b = 180; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown && b < 160)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 27 { b = 180; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown && b < 160)) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 60; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 28 { b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 60; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 29 { b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 60; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 30 { b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 120; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 31 { b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 60; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 32 { b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 60; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 33 { b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 60; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 34 { b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 120; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 35 { b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 60; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 36 { b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 60; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 37 { b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 60; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 38 { b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 60; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 39 { b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 120; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 40 { b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 60; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 41 { b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 60; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 42 { b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 0; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 43 { _root.BLayer.Baddie100.gotoAndStop('Angry'); b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 0; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 44 { b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 180; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 45 { b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent._parent.etrigger.b = 240; _parent._parent.etrigger.canWait = true; _parent.gotoAndStop(4); } }; } frame 46 { b = 120; onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent.gotoAndStop(4); } }; } frame 48 { b = 240; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown && b < 180)) { --b; } else { UisDown = true; _root.BLayer.Baddie100.InShell.play(); _parent.nextFrame(); } }; } frame 49 { b = 240; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown && b < 180)) { --b; } else { UisDown = true; _root.BLayer.Baddie100.InShell.play(); _parent.gotoAndStop(4); } }; } frame 50 { b = 30; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0) { --b; } else { UisDown = true; _parent.gotoAndStop(4); } }; } frame 60 { b = 100; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0) { if (b < 80 && (_root.Char.JumpIsDown() || _root.Char.UpIsDown() && !UisDown)) { _parent.nextFrame(); } else { --b; } } else { _parent.nextFrame(); } }; } frame 61 { b = 120; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0) { if (b < 100 && (_root.Char.JumpIsDown() || _root.Char.UpIsDown() && !UisDown)) { _parent.nextFrame(); } else { --b; } } else { _parent.nextFrame(); } }; } frame 62 { b = 60; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0) { if (b < 40 && (_root.Char.JumpIsDown() || _root.Char.UpIsDown() && !UisDown)) { _parent._parent.onDone(); delete onEnterFrame; } else { --b; } } else { _parent._parent.onDone(); delete onEnterFrame; } }; } frame 72 { b = 120; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 73 { b = 210; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 74 { b = 210; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 75 { b = 210; _parent._parent._x += 40; _parent._parent._y -= 70; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 76 { b = 210; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 77 { b = 210; _parent._parent._x -= 40; _parent._parent._y += 70; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 78 { b = 210; _parent._parent._x += 40; _parent._parent._y -= 70; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 79 { b = 210; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 80 { b = 210; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent._parent.etrigger.thisMessageIdle = _currentframe + 2; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 82 { b = 210; _parent._parent._x += 40; _parent._parent._y -= 70; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 83 { b = 210; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent._parent.etrigger.thisMessageIdle = _currentframe + 2; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 85 { b = 120; _parent._parent._x += 40; _parent._parent._y -= 70; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 86 { b = 210; _parent._parent._x -= 40; _parent._parent._y += 70; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 87 { b = 210; _parent._parent._x += 40; _parent._parent._y -= 70; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 88 { b = 210; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent._parent.etrigger.thisMessage = _currentframe - 6; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 90 { b = 210; _parent._parent._x += 40; _parent._parent._y -= 70; onShow = function () {}; } frame 91 { b = 40; _parent._parent._x += 200; _parent._parent._y += 70; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 105 { b = 300; onShow = function () { if (b > 0 && _root.Char._currentframe != 84) { --b; } else { UisDown = true; _parent.gotoAndStop(4); } }; } frame 106 { b = 300; onShow = function () { if (b > 0 && _root.Char._currentframe != 16) { --b; } else { UisDown = true; _parent.gotoAndStop(4); } }; } frame 110 { b = 120; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 129 { b = 120; _root.InteractLayer.textBubble2.textBubble.gotoAndStop(4); _root.InteractLayer.gotoAndStop(2); _root.tehwallz.gotoAndStop(2); onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown && b < 90)) { --b; } else { if (_root.InteractLayer.textBubble2.textBubble._currentframe < 5) { _root.InteractLayer.textBubble2.textBubble.gotoAndStop(4); } b = 120; UisDown = true; _parent.nextFrame(); } }; } frame 131 { onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown && b < 90)) { --b; } else { b = 30; UisDown = true; _parent.nextFrame(); } }; } frame 134 { b = 90; _root.InteractLayer.QTP.play(); onShow = function () { if (b > 0) { --b; } else { UisDown = true; _parent.gotoAndStop(4); } }; } frame 140 { b = 120; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown && b < 90)) { --b; } else { b = 120; UisDown = true; _parent.nextFrame(); } }; } frame 151 { onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown && b < 90)) { --b; } else { UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 157 { b = 120; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown && b < 90)) { --b; } else { b = 120; UisDown = true; _parent.nextFrame(); } }; } frame 160 { b = 120; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown && b < 90)) { --b; } else { UisDown = true; _root.InteractLayer.gotoAndStop(4); _parent.gotoAndStop(4); } }; } frame 168 { b = 120; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown && b < 90)) { --b; } else { b = 120; UisDown = true; _parent.nextFrame(); } }; } frame 172 { b = 90; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown && b < 90)) { --b; } else { UisDown = true; _parent._parent.fromChar.play(); _parent.gotoAndStop(4); } }; } frame 183 { b = 60; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 184 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 185 { b = 120; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 186 { b = 210; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 187 { b = 180; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 188 { b = 210; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { _root.wonPants(); UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 201 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 203 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 205 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 207 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { _root.wonPants(); UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 220 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 221 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 222 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 223 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 224 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 225 { b = 80; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 226 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 227 { b = 80; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { _root.wonPants(); UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 239 { b = 80; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 240 { b = 150; direct = 1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 241 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 242 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 243 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 244 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 245 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 246 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 247 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 248 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 249 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 250 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 251 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 252 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 253 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 254 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 255 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 256 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 257 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 258 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 259 { b = 150; _parent._parent._x += 120 * direct; direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 261 { b = 150; direct = 1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 262 { b = 150; _parent._parent._x += 120 * direct; _root.messagePopup(_parent._parent); direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 263 { b = 150; _parent._parent._x += 120 * direct; _root.messagePopup(_parent._parent); direct *= -1; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent.nextFrame(); } }; } frame 264 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { _root.wonPants(); UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 266 { b = 80; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 277 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 283 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 285 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 288 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { _root.wonPants(); UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 296 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 297 { b = 150; _parent._parent._x += 200; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 298 { b = 150; _parent._parent._x -= 200; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 299 { b = 150; _parent._parent._x += 200; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 300 { b = 150; _parent._parent._x -= 200; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 301 { b = 150; _parent._parent._x += 200; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 302 { b = 150; _parent._parent._x -= 200; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 303 { b = 150; _parent._parent._x += 200; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 304 { b = 150; _parent._parent._x -= 200; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 305 { b = 150; _parent._parent._x += 200; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 306 { b = 150; _parent._parent._x -= 200; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 310 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 311 { b = 150; _parent._parent._x += 200; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 312 { b = 150; _parent._parent._x -= 200; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 313 { b = 150; _parent._parent._x += 200; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 314 { b = 150; _parent._parent._x -= 200; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 315 { b = 150; _parent._parent._x += 200; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { _root.wonPants(); if (_root['challengeScore' + _root.LevelLoaded] == 0) { _root.playSound('success'); _root['challengeScore' + _root.LevelLoaded] = 1; _root.saveNetworkData(); } UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 324 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 328 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 335 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { _root.wonPants(); UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 349 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 353 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } frame 362 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { b = 150; UisDown = true; _parent.nextFrame(); } }; } frame 364 { b = 150; onShow = function () { if (!_root.Char.UpIsDown()) { UisDown = false; } if (b > 0 && !(_root.Char.UpIsDown() && !UisDown)) { --b; } else { _root.wonPants(); UisDown = true; _parent._parent.etrigger.gotoAndStop(3); _parent.gotoAndStop(4); } }; } } movieClip 10106 { frame 1 { _alpha = 0; stop(); } frame 2 { textTween._xscale = 10; textTween._yscale = 10; scale = 10; spring = 0; _alpha = 100; textTween._x = (-_root.smoothTheX - _parent._x) * (_root.levelScale / 100) / 10; textTween._y = (-_root.smoothTheY - _parent._y) * (_root.levelScale / 100) / 10; onEnterFrame = function () { if (!_root.Paused) { textTween._x = (-_root.smoothTheX - _parent._x) * (_root.levelScale / 100) / 10; textTween._y = (-_root.smoothTheY - _parent._y) * (_root.levelScale / 100) / 10; spring -= (scale - 100) / 3; spring *= 0.75; scale += spring; textTween._yscale = scale; textTween._xscale = textTween._yscale; textTween.onShow(); } }; } frame 3 { onEnterFrame = function () { if (scale > 25) { scale -= 25; textTween._yscale = scale; textTween._xscale = textTween._yscale; } else { if (Math.abs(_parent._x - _parent.fromChar._x) < 400 && Math.abs(_parent._y - _parent.fromChar._y) < 300) { textTween.nextFrame(); gotoAndStop(2); } else { _parent.etrigger.gotoAndStop(3); gotoAndStop(5); } } }; _root.playSound('PageContinue', _parent._x, 100); } frame 4 { onEnterFrame = function () { if (scale > 25) { scale -= 25; textTween._yscale = scale; textTween._xscale = textTween._yscale; } else { gotoAndStop(5); } }; } frame 5 { _parent._x = _parent.anchorX; _parent._y = _parent.anchorY; delete onEnterFrame; _root.messagePopup('END'); } } movieClip 10107 { frame 1 { anchorX = _x; anchorY = _y; textBubble.textTween.stop(); } } movieClip 10109 { frame 1 { ID = _root.aPlatzCount; _name = 'aPlatz' + ID; if (invisible == undefined) { invisible = false; } if (!invisible) { _root.ELayer.attachMovie('aPlatzSmoke', 'aPlatzSmoke' + ID, _root.ELayer.getNextHighestDepth(), {'_x': _x, '_y': _y, '_xscale': _xscale, '_rotation': _rotation}); } if (_root.LoadIt == 'Bonus25') { _root.ELayer['aPlatzSmoke' + ID].gotoAndStop(15); } else { if (_root.LoadIt == 'Trans14') { _root.ELayer['aPlatzSmoke' + ID].gotoAndStop(14); } else { if (Status == 'Springy') { _root.ELayer['aPlatzSmoke' + ID]._xscale = 100; _root.ELayer['aPlatzSmoke' + ID].gotoAndStop(13); } else { if (doubleSided) { _root.ELayer['aPlatzSmoke' + ID].gotoAndStop(11); } else { if (Status == 'Mushy') { _root.ELayer['aPlatzSmoke' + ID].gotoAndStop(9); } else { if (_root.LoadIt == 'Bonus5') { _root.ELayer['aPlatzSmoke' + ID].gotoAndStop(6); } else { if (_root.LoadIt == 'Level1') { _root.ELayer['aPlatzSmoke' + ID].gotoAndStop(5); } else { if (_root.LoadIt == 'Level11' || _root.LoadIt == 'Trans5') { _root.ELayer['aPlatzSmoke' + ID].gotoAndStop(2); } else { if (Status == 'Seesaw') { _root.ELayer['aPlatzSmoke' + ID].gotoAndStop(4); } else { if (_root.LoadIt == 'Level14') { _root.ELayer['aPlatzSmoke' + ID].gotoAndStop(3); } else { if (_root.LoadIt == 'Bonus8') { _root.ELayer['aPlatzSmoke' + ID].gotoAndStop(3); } else { _root.ELayer['aPlatzSmoke' + ID].gotoAndStop(1); } } } } } } } } } } } ++_root.aPlatzCount; _x = Math.round(_x); _y = Math.round(_y); accelUD = 0; fakeUD = 0; fakeRL = 0; fakeY = 0; fakeX = 0; anchorX = _x; anchorY = _y; anchorRot = _rotation; if (moveRL == undefined) { moveRL = 0; } if (moveUD == undefined) { moveUD = 0; } if (moveRot == undefined) { moveRot = 0; } if (canBuck == undefined) { canBuck = false; } if (spring == undefined) { spring == 0; } canThud = true; canSmoke = true; downTime = 0; b = 1; if (Status == 'Loop') { if (moveUD > 0) { onEnterFrame = _root.BonusPlatLoopDown; } else { onEnterFrame = _root.BonusPlatLoopUp; } onCharLand = function (ex, ey, eRL, eUD, fromChar) { return false; }; if (getPlatSpeed == undefined) { getPlatSpeed = function (eThis) { eThis.platRL = this.moveRL / 2; eThis.platUD = this.moveUD / 2; }; } } if (Status == 'Geyser') { canSmoke = false; fakeRL = maxRL; angle = trackRot * Math.PI / 180; onEnterFrame = _root.BonusPlatGeyser; onCharLand = function (ex, ey, eRL, eUD, fromChar) { return false; }; getPlatSpeed = function (eThis) { eThis.platRL = Math.cos(this.angle) * this.fakeRL - Math.sin(this.angle) * this.fakeUD; eThis.platUD = Math.cos(this.angle) * this.fakeUD + Math.sin(this.angle) * this.fakeRL; }; } else { if (Status == 'Crumble') { anchorXscale = _xscale; BonusPlatMove = _root.BonusPlatCrumble; b = 0; onCharLand = function (ex, ey, eRL, eUD) { onEnterFrame = _root.BonusPlatCrumble; _root.playSound('SandCrumble', ex, 100); return false; }; } else { if (Status == 'Springy') { canSmoke = false; onCharLand = function (ex, ey, eRL, eUD, fromChar) { onEnterFrame = _root.BonusPlatSpringy; if (-eUD > 10) { fakeUD = -eUD; return false; } fakeUD = 10; return false; }; onCharLeave = function (jumper, fromChar) { fromChar.FloatUp = 6; if (fromChar.JumpIsDown()) { _root.playSound('CharJump', fromChar._x, 100); fakeUD -= 5; } fakeUD += (-spring * 1.5 - fakeUD) / 2; return jumper; }; if (getPlatSpeed == undefined) { getPlatSpeed = function (eThis) { eThis.platRL = this.fakeRL; eThis.platUD = this.fakeUD; }; } whileOn = function (onPlatOffset, eRL, heavy, eThis) { eThis.onPlatOffset *= 0.9; _root.ELayer['aPlatzSmoke' + this.ID].clear(); _root.ELayer['aPlatzSmoke' + this.ID].lineStyle(3, this.color, 100); _root.ELayer['aPlatzSmoke' + this.ID].moveTo(-this._xscale / 2, 1.5); _root.ELayer['aPlatzSmoke' + this.ID].lineTo(eThis.onPlatOffset - 5, this._y - this.anchorY + 1.5); _root.ELayer['aPlatzSmoke' + this.ID].lineTo(eThis.onPlatOffset + 5, this._y - this.anchorY + 1.5); _root.ELayer['aPlatzSmoke' + this.ID].lineTo(this._xscale / 2, 1.5); }; otherStayOn = function () { return (anchorY - (_y + fakeUD)) / spring < 1; }; if (color == undefined) { color = 0; } _root.ELayer['aPlatzSmoke' + ID].lineStyle(3, color, 100); _root.ELayer['aPlatzSmoke' + ID].moveTo(-_xscale / 2, 1.5); _root.ELayer['aPlatzSmoke' + ID].lineTo(_xscale / 2, 1.5); } else { if (Status == 'Seesaw') { canSmoke = false; if (steady == undefined) { steady = true; } if (dampen == undefined) { dampen = 0.98; } onCharLand = function (ex, ey, eRL, eUD, fromChar) { this.moveRot += fromChar.onPlatOffset / 400 / (this._xscale / 100); onEnterFrame = _root.BonusPlatSeesaw; return false; }; getPlatSpeed = function (eThis) { x1 = eThis._x - this._x; y1 = 0; angle = (this._rotation - this.moveRot) * Math.PI / 180; angle2 = this._rotation * Math.PI / 180; this.moveRL = Math.cos(angle2) * x1 - Math.sin(angle2) * y1 - (Math.cos(angle) * x1 - Math.sin(angle) * y1); this.moveUD = Math.cos(angle2) * y1 + Math.sin(angle2) * x1 - (Math.cos(angle) * y1 + Math.sin(angle) * x1); eThis.platRL = Math.cos(angle2) * this.moveRL + Math.sin(angle2) * this.moveUD; eThis.platUD = Math.cos(angle2) * this.moveUD - Math.sin(angle2) * this.moveRL; }; whileOn = function (onPlatOffset, eRL, heavy, eThis) { if ((onPlatOffset / 400 / (this._xscale / 100)) * this.moveRot > 0) { this.moveRot += onPlatOffset / 400 / (this._xscale / 100); } else { this.moveRot += onPlatOffset / 1200 / (this._xscale / 100); } }; } else { if (Status == 'Mushy') { canSmoke = false; onCharLand = function (ex, ey, eRL, eUD, fromChar) { if (eUD < 0) { this.moveRot += -eUD * (fromChar.onPlatOffset / 70) / (this._xscale / 20); fakeUD = (-eUD + fakeUD) / 2; onEnterFrame = _root.BonusPlatMushy; } return false; }; getPlatSpeed = function (eThis) { eThis.platRL = this.fakeRL; eThis.platUD = this.fakeUD * this.decay; eThis.platUD += -this.fakeY / this.spring; }; whileOn = function (onPlatOffset, eRL, heavy) { this.moveRot += (onPlatOffset / 30 / (this._xscale / 40)) * heavy; }; } else { if (Status == 'Moving') { canSmoke = false; fakeRL = 0; originalAccelRL = accelRL; angle = trackRot * Math.PI / 180; onCharLand = function (ex, ey, eRL, eUD, fromChar) { if (eUD < 0) { this.moveRot += -eUD * (fromChar.onPlatOffset / 70) / (this._xscale / 20); moveUD = (-eUD + moveUD) / 2; } accelRL = originalAccelRL; if (startOnLand) { onEnterFrame = _root.BonusPlatMove; } return false; }; if (!startOnLand) { onEnterFrame = _root.BonusPlatMove; } getPlatSpeed = function (eThis) { eThis.platRL = Math.cos(this.angle) * this.fakeRL - Math.sin(this.angle) * this.fakeUD; eThis.platUD = Math.cos(this.angle) * this.fakeUD + Math.sin(this.angle) * this.fakeRL; }; whileOn = function (onPlatOffset, eRL, heavy) { this.moveRot += (onPlatOffset / 30 / (this._xscale / 40)) * heavy; }; } else { if (Status == 'Swinging') { canSmoke = false; anchorX = _x + centerOffset * Math.sin(rotOffset * 0.0174532925199433); anchorY = _y + -centerOffset * Math.cos(rotOffset * 0.0174532925199433); _root.ELayer['aPlatzSmoke' + ID].gotoAndStop(8); _root.ELayer.attachMovie('swingChain', 'swingChain' + ID, _root.ELayer.getNextHighestDepth(), {'_x': _x, '_y': _y, '_rotation': rotOffset, '_yscale': centerOffset / 4}); _root.ELayer['aPlatzSmoke' + ID]._yscale = _xscale; onCharLand = function (ex, ey, eRL, eUD, fromChar) { fakeRL += eRL; fakeUD += -eUD * 0.75; fromChar.moveRL *= 0.5; onEnterFrame = _root.BonusPlatSwinging; return false; }; onCharLeave = function (jumper, fromChar) { b = 300; if (fakeUD < 0) { jumper -= fakeUD; } return jumper; }; } else { if (Status == 'Bumper') { canThud = false; canSmoke = false; onCharLand = function (ex, ey, eRL, eUD, fromChar) { downTime = 3; fakeRL = 0; fakeUD = -thrust; angle = this._rotation * Math.PI / 180; moveRL = Math.cos(angle) * fakeRL - Math.sin(angle) * fakeUD; fromChar.rotter = 80 * (moveRL / Math.abs(moveRL)); fromChar.CharJump.gotoAndStop(12); onEnterFrame = _root.BonusPlatBumper; _root.playSound('pinball', _x, 300); return true; }; _root.ELayer['aPlatzSmoke' + ID].gotoAndStop(10); } else { if (Status == 'Spin') { onEnterFrame = _root.BonusPlatSpin; onCharLand = function (ex, ey, eRL, eUD, fromChar) { return false; }; getPlatSpeed = function (eThis) { ex = eThis._x - _x; ey = eThis._y - _y; x1 = Math.cos(angle) * ex + Math.sin(angle) * ey; y1 = Math.cos(angle) * ey - Math.sin(angle) * ex; angle = (this._rotation - this.moveRot) * Math.PI / 180; angle2 = this._rotation * Math.PI / 180; moveRL = Math.cos(angle2) * x1 - Math.sin(angle2) * y1 - (Math.cos(angle) * x1 - Math.sin(angle) * y1); moveUD = Math.cos(angle2) * y1 + Math.sin(angle2) * x1 - (Math.cos(angle) * y1 + Math.sin(angle) * x1); eThis.platRL = Math.cos(angle2) * this.moveRL + Math.sin(angle2) * this.moveUD; eThis.platUD = Math.cos(angle2) * this.moveUD - Math.sin(angle2) * this.moveRL; }; _root.ELayer['aPlatzSmoke' + ID].gotoAndStop(9); } else { if (Status == 'Rocker') { canBuck = true; onEnterFrame = _root.BonusPlatRocker; onCharLand = function (ex, ey, eRL, eUD, fromChar) { return false; }; getPlatSpeed = function (eThis) { x1 = eThis._x - this._x; y1 = 0; angle = (this._rotation - this.moveRot) * Math.PI / 180; angle2 = this._rotation * Math.PI / 180; moveRL = Math.cos(angle2) * x1 - Math.sin(angle2) * y1 - (Math.cos(angle) * x1 - Math.sin(angle) * y1); moveUD = Math.cos(angle2) * y1 + Math.sin(angle2) * x1 - (Math.cos(angle) * y1 + Math.sin(angle) * x1); eThis.platRL = Math.cos(angle2) * this.moveRL + Math.sin(angle2) * this.moveUD; eThis.platUD = Math.cos(angle2) * this.moveUD - Math.sin(angle2) * this.moveRL; }; _root.ELayer['aPlatzSmoke' + ID].gotoAndStop(9); } else { if (rising) { BonusPlatMove = _root.BonusPlatLadder; onEnterFrame = BonusPlatMove; smokeUD = maxSpeed; } else { if (falling) { moveUD = 0; BonusPlatMove = _root.BonusPlatFall; } else { if (anchorDist != undefined) { circling = true; moving = true; anchorX = _x + anchorDist * Math.sin(rotOffset * 0.0174532925199433); anchorY = _y + -anchorDist * Math.cos(rotOffset * 0.0174532925199433); BonusPlatMove = _root.BonusPlatMove; onEnterFrame = BonusPlatMove; } else { if (this.centerOffset == undefined) { circling = false; moving = false; } else { circling = false; moving = true; absoluteRL = 0; if (rotOffset == undefined) { rotOffset = 0; } BonusPlatMove = _root.BonusPlatMove; onEnterFrame = BonusPlatMove; } } } } } } } } } } } } } } if (getPlatSpeed == undefined) { getPlatSpeed = function (eThis) { eThis.platRL = this.fakeRL; eThis.platUD = this.fakeUD; }; } if (otherStayOn == undefined) { otherStayOn = function () { return true; }; } if (whileOn == undefined) { whileOn = function () { return null; }; } if (doubleSided == undefined) { doubleSided = false; } originX = _x; originY = _y; if (onlyOnStand == undefined) { onlyOnStand = false; } if (onlyOnStand) { moving = false; _root.ELayer['aPlatzSmoke' + ID].platMove.stop(); } smokeRL = 0; if (smokeUD == undefined) { smokeUD = 0; } stop(); } } movieClip 10135 { frame 1 { b = 63; _root.badPos = 0; speed = 15; moveRot = 0; _rotation = -30; if (spawnerType == undefined) { if (_root['spawnBaddiesArray' + _root.LevelLoaded] == undefined) { spawnerType = 'random'; } else { spawnerType = 'set'; } } onEnterFrame = function () { if (!_root.Paused) { moveRot -= _rotation / 400; _rotation = _rotation + moveRot; if (_root.BaddieArray.length >= Math.floor(spawnLevelStart)) { } else { if (b > 0) { --b; } else { _root.messagePopup(_root.BaddieArray.length); b = 63 / ((spawnLevelStart - 1) / 10 + 1); if (spawnerType == 'random') { _root.playSound('kothCannon', _x, 100); gotoAndPlay('fire'); thisBad = _root.SpawnBaddies(_x, _y, thisSpawnerArray[_root.notSoRandom(thisSpawnerArray.length)]); thisBad.gotoAndStop('Jump'); thisBad.moveRL = speed * Math.sin(_rotation * 0.0174532925199433); thisBad.moveUD = -speed * Math.cos(_rotation * 0.0174532925199433) * 0.7; thisBad.FloatUp = 10; thisBad._xscale = (_rotation / Math.abs(_rotation)) * 100; thisBad.insomniac = true; ++_root.badPos; spawnLevelStart += spawnLevelAdvance; } else { if (spawnerType == 'set' || spawnerType == 'combo') { if (thisSpawnerArray[_root.badPos] != undefined) { _root.playSound('kothCannon', _x, 100); gotoAndPlay('fire'); thisBad = _root.SpawnBaddies(_x, _y, thisSpawnerArray[_root.badPos]); thisBad.gotoAndStop('Jump'); thisBad.moveRL = speed * Math.sin(_rotation * 0.0174532925199433); thisBad.moveUD = -speed * Math.cos(_rotation * 0.0174532925199433) * 0.7; thisBad.FloatUp = 10; thisBad._xscale = (_rotation / Math.abs(_rotation)) * 100; thisBad.insomniac = true; ++_root.badPos; } else { if (spawnerType == 'combo') { spawnerType = 'random'; } else { if (_root.LevelLoaded == 'Bonus5' || _root.LevelLoaded == 'Bonus6' || _root.LevelLoaded == 'Bonus8') { gonnaLaunch = 'Key'; } else { gonnaLaunch = 'DiscoShard'; } onEnterFrame = function () { moveRot -= _rotation / 400; moveRot *= 0.95; _rotation = _rotation + moveRot; if (_root['allBaddiesGone' + _root.LevelLoaded]) { _root.playSound('starGrab', _x, 100); gotoAndPlay('fire'); thisBad = _root.SpawnBaddies(_x, _y, gonnaLaunch); thisBad.gotoAndStop('Jump'); thisBad.moveRL = speed * Math.sin(_rotation * 0.0174532925199433); thisBad.moveUD = -speed * Math.cos(_rotation * 0.0174532925199433) * 0.7; thisBad.FloatUp = 10; thisBad.rotter = 30; delete onEnterFrame; } }; } } } } } } } }; } frame 2 { stop(); } frame 31 { gotoAndStop('rest'); } } movieClip 10155 { } movieClip 10308 { frame 1 { if (vanish == undefined) { vanish = false; } if (quickDrop == undefined) { quickDrop = false; } if (runningStart == undefined) { runningStart = false; } if (doorPowerLevel > _root.LevelSelect || _root.CameoSelect[doorPowerSlot] == false) { gotoAndStop('ghostDoor'); } if (worm != undefined) { var n = 0; while (n < _root.LevelsArray[_root.MainLevelID].length) { if (_root.LevelsArray[_root.MainLevelID][n] == worm) { wormPower = n; } ++n; } } } frame 2 { if (vanish) { gotoAndStop('gone'); } stop(); } instance checkBox of movieClip 10155 { onClipEvent (load) { _xscale = _parent._xscale; stop(); if (_root.LevelPower > 0 && !_parent.vanish) { if (_root.getLevelType(_root.LoadIt) == 'nothing') { gotoAndStop(3); } else { if (_root['challengeScore' + _root.LoadIt] > _root['challengeGoal' + _root.LoadIt]) { gotoAndStop(2); } else { gotoAndStop(1); } } } else { if (_parent.wormPower > 0 && !_parent.vanish) { if (_root.getLevelType(_parent.worm) == 'nothing') { gotoAndStop(3); } else { if (_root.getLevelType(_parent.worm) == 'Arena') { if (_root['challengeScore' + _parent.worm] > _root['challengeGoal' + _parent.worm]) { gotoAndStop(_parent.wormPower + 10); } else { gotoAndStop(_parent.wormPower + 4); } } else { if (_root['challengeScore' + _parent.worm] >= _root['challengeGoal' + _parent.worm] && _root['challengeScore' + _parent.worm] != 0) { gotoAndStop(5); } else { gotoAndStop(4); } } } } else { gotoAndStop(3); } } } } frame 11 { _root.playSound('DoorCreak', _x, 100); } frame 13 { if (finishScore) { delete _root.onEnterFrame; _root.comboTimer = 0; _root.updateComboTimer(); if (_root.Score > _root['challengeScore' + nestedBonusLevel]) { _root['challengeScore' + nestedBonusLevel] = _root.Score; _root.saveNetworkData(); } } if (typeof worm != 'number') { customExit(); _root.ChangeLevel(worm, wormDoor, false, false); } } frame 43 { _root.playSound('DoorClose', _x, 100); if (launchSite != undefined) { getURL(launchSite, '_blank'); } else { if (typeof worm == 'number') { _root.Char.gotoAndStop('DoorOut'); _root.Char._x = Math.round(_parent['Door' + worm]._x) + _parent['Door' + worm]._xscale / 2; _root.Char._y = Math.round(_parent['Door' + worm]._y); _root.Char.Still = true; _root.Char._xscale = _parent['Door' + worm]._xscale; _parent['Door' + worm].gotoAndPlay('doorOut'); } } delete onEnterFrame; gotoAndStop(2); } frame 52 { if (quickDrop) { _root.Char._x = _x; _root.Char.gotoAndStop('Idle'); gotoAndStop(2); if (runningStart) { if (_xscale > 0) { _root.Char.RightIsDown = function () { return true; }; } else { _root.Char.LeftIsDown = function () { return true; }; } } else { _root.Char.Still = true; } } if (custom != undefined) { custom(); } } frame 74 { _root.Char.char.play(); } frame 79 { _root.DoorCreak.start(); } frame 104 { _root.DoorClose.start(); delete onEnterFrame; if (!vanish) { gotoAndStop(2); } } frame 105 { onEnterFrame = function () { if (_root.Paused) { stop(); } else { play(); } }; } frame 182 { delete onEnterFrame; stop(); } } movieClip 10310 { } movieClip 10312 { } movieClip 10313 { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID); } ++_root.BaddieCount; ++_root.maxBaddies; downTime = 0; centerX = _x; centerY = _y; health = 1; isWide = _xscale; spread = _xscale / 2; hitCharFunc = function (ex, ey, hitPower, eRot, eType, fromChar) { bounceRot = -Math.atan2((_x - fromChar.centerX + fromChar.moveRL) * (100 / _xscale), (_y - fromChar.centerY + fromChar.moveUD) * (100 / _yscale)) / 0.0174532925199433; angle = bounceRot * Math.PI / 180; wallX = _x + 50 * (_xscale / 100) * Math.sin(bounceRot * 0.0174532925199433); wallY = _y - 50 * (_yscale / 100) * Math.cos(bounceRot * 0.0174532925199433); ex = fromChar.centerX + fromChar.moveRL - wallX; ey = fromChar.centerY + fromChar.moveUD - wallY; x1 = Math.cos(angle) * ex + Math.sin(angle) * ey; y1 = Math.cos(angle) * ey - Math.sin(angle) * ex; if (y1 > -25) { fromChar.CharJump.gotoAndStop(12); fromChar.isTall = 25; fromChar.fakeRL = Math.cos(angle) * fromChar.moveRL + Math.sin(angle) * fromChar.moveUD; fromChar.fakeUD = -20; y1 = -fromChar.isTall; fromChar.moveRL = Math.cos(angle) * fromChar.fakeRL - Math.sin(angle) * fromChar.fakeUD; fromChar.moveUD = Math.cos(angle) * fromChar.fakeUD + Math.sin(angle) * fromChar.fakeRL; fromChar.centerX = wallX + (Math.cos(angle) * x1 - Math.sin(angle) * y1); fromChar.centerY = wallY + (Math.cos(angle) * y1 + Math.sin(angle) * x1); fromChar._x = fromChar.centerX; fromChar._y = fromChar.centerY + fromChar.isTall / 2; fromChar.InShellRot = 0; fromChar.rotter = 80 * (fromChar.moveRL / Math.abs(fromChar.moveRL)); fromChar.accelUD = 1; fromChar.airPwning = true; gotoAndPlay(3); _root.playSound('pinball', _x, 300); return true; } else { return false; } }; hitPwnFunc = hitCharFunc; getAttacked = function (ex, ey, hitPower, eRot, eType, fromChar) { bounceRot = -Math.atan2((_x - fromChar.centerX + fromChar.moveRL) * (100 / _xscale), (_y - fromChar.centerY + fromChar.moveUD) * (100 / _yscale)) / 0.0174532925199433; angle = bounceRot * Math.PI / 180; wallX = _x + 50 * (_xscale / 100) * Math.sin(bounceRot * 0.0174532925199433); wallY = _y - 50 * (_yscale / 100) * Math.cos(bounceRot * 0.0174532925199433); ex = fromChar.centerX + fromChar.moveRL - wallX; ey = fromChar.centerY + fromChar.moveUD - wallY; x1 = Math.cos(angle) * ex + Math.sin(angle) * ey; y1 = Math.cos(angle) * ey - Math.sin(angle) * ex; if (y1 > -fromChar.isTall * 0.7) { fromChar.CharJump.gotoAndStop(12); fromChar.isTall = 25; fromChar.fakeRL = Math.cos(angle) * fromChar.moveRL + Math.sin(angle) * fromChar.moveUD; fromChar.fakeUD = -20; y1 = -fromChar.isTall * 0.7; fromChar.moveRL = Math.cos(angle) * fromChar.fakeRL - Math.sin(angle) * fromChar.fakeUD; fromChar.moveUD = Math.cos(angle) * fromChar.fakeUD + Math.sin(angle) * fromChar.fakeRL; fromChar.centerX = wallX + (Math.cos(angle) * x1 - Math.sin(angle) * y1); fromChar.centerY = wallY + (Math.cos(angle) * y1 + Math.sin(angle) * x1); fromChar._x = fromChar.centerX; fromChar._y = fromChar.centerY + fromChar.isTall / 2; fromChar.InShellRot = 0; fromChar.rotter = 80 * (fromChar.moveR / Math.abs(fromChar.moveR)); fromChar.accelUD = 1; fromChar.airPwning = true; gotoAndPlay(3); _root.playSound('pinball', _x, 300); return true; } else { return false; } }; hitShellFunc = function (ex, ey, hitPower, fromChar) { bounceRot = -Math.atan2((_x - fromChar.centerX + fromChar.moveRL) * (100 / _xscale), (_y - fromChar.centerY + fromChar.moveUD) * (100 / _yscale)) / 0.0174532925199433; angle = bounceRot * Math.PI / 180; wallX = _x + 50 * (_xscale / 100) * Math.sin(bounceRot * 0.0174532925199433); wallY = _y - 50 * (_yscale / 100) * Math.cos(bounceRot * 0.0174532925199433); ex = fromChar.centerX + fromChar.moveRL - wallX; ey = fromChar.centerY + fromChar.moveUD - wallY; x1 = Math.cos(angle) * ex + Math.sin(angle) * ey; y1 = Math.cos(angle) * ey - Math.sin(angle) * ex; if (y1 > -15) { fromChar.fakeRL = Math.cos(angle) * fromChar.moveRL + Math.sin(angle) * fromChar.moveUD; fromChar.fakeUD = -30; y1 = -15; fromChar.moveRL = Math.cos(angle) * fromChar.fakeRL - Math.sin(angle) * fromChar.fakeUD; fromChar.moveUD = Math.cos(angle) * fromChar.fakeUD + Math.sin(angle) * fromChar.fakeRL; fromChar.centerX = wallX + (Math.cos(angle) * x1 - Math.sin(angle) * y1) + fromChar.moveRL; fromChar.centerY = wallY + (Math.cos(angle) * y1 + Math.sin(angle) * x1) + fromChar.moveUD; fromChar._x = fromChar.centerX; fromChar._y = fromChar.centerY + fromChar.spread; fromChar.rotateInAir(); fromChar.rotter = 80 * (fromChar.moveRL / Math.abs(fromChar.moveRL)); fromChar.accelUD = 1; gotoAndPlay(3); _root.playSound('pinball', _x, 300); return true; } else { return false; } }; nextFrame(); } frame 2 { collision._yscale = (100 / _xscale) * 100 + 100; collision._xscale = collision._yscale; } frame 10 { gotoAndStop(2); } } movieClip 10314 { frame 1 { _name = 'object' + _root.objectCount; thisID = _root.objectCount; ++_root.objectCount; if (maxZoomedIn == undefined) { maxZoomedIn = 0.65; } if (maxZoomedOut == undefined) { maxZoomedOut = 1; } if (cameraDist == undefined) { cameraDist = 300; } cameraOnX = cameraOn._x; cameraOnY = cameraOn._y; if (custom == undefined) { custom = function () { return null; }; } } frame 2 { objectFunc = function () { if (_root['challengeScore' + _root.nestedBonusLevel] >= _root['challengeGoal' + _root.nestedBonusLevel] && _root['challengeScore' + _root.nestedBonusLevel] > 0 && _root.LevelPower == 0) { _root.InteractLayer.NPC.gotoAndStop('success'); _root.popUpInGame(ID, thisMessageSuccess, this); } else { _root.popUpInGame(ID, thisMessageIdle, this); } if (switchIt) { _root.switchToCin(cameraOnX, cameraOnY, maxZoomedIn, maxZoomedOut, cameraDist, 400, camFacing); } custom(); gotoAndStop(4); }; stop(); } frame 3 { onEnterFrame = function () { if (!hitTest(_root.Char._x + 30 * Math.cos((_root.Char._rotation - 90) * 0.0174532925199433), _root.Char._y + 30 * Math.sin((_root.Char._rotation - 90) * 0.0174532925199433), true)) { gotoAndStop(2); delete onEnterFrame; } }; } frame 4 { delete objectFunc; } } movieClip 10321 { frame 1 { gotoAndStop(ID); } } movieClip 10438 { frame 1 { if (vanish == undefined) { vanish = false; } if (quickDrop == undefined) { quickDrop = false; } if (runningStart == undefined) { runningStart = false; } if (doorPowerLevel > _root.LevelSelect || _root.CameoSelect[doorPowerSlot] == false) { gotoAndStop('ghostDoor'); } if (worm != undefined) { var n = 0; while (n < _root.LevelsArray[_root.MainLevelID].length) { if (_root.LevelsArray[_root.MainLevelID][n] == worm) { wormPower = n; } ++n; } } } frame 2 { if (vanish) { gotoAndStop('gone'); } stop(); } instance checkBox of movieClip 10155 { onClipEvent (load) { _xscale = _parent._xscale; stop(); if (_root.LevelPower > 0 && !_parent.vanish) { if (_root.getLevelType(_root.LoadIt) == 'nothing') { gotoAndStop(3); } else { if (_root['challengeScore' + _root.LoadIt] > _root['challengeGoal' + _root.LoadIt]) { gotoAndStop(2); } else { gotoAndStop(1); } } } else { if (_parent.wormPower > 0 && !_parent.vanish) { if (_root.getLevelType(_parent.worm) == 'nothing') { gotoAndStop(3); } else { if (_root.getLevelType(_parent.worm) == 'Arena') { if (_root['challengeScore' + _parent.worm] > _root['challengeGoal' + _parent.worm]) { gotoAndStop(2); } else { gotoAndStop(1); } } else { if (_root['challengeScore' + _parent.worm] > _root['challengeGoal' + _parent.worm]) { gotoAndStop(5); } else { gotoAndStop(4); } } } } else { gotoAndStop(3); } } } } frame 11 { _root.playSound('DoorCreak', _x, 100); } frame 13 { if (finishScore) { delete _root.onEnterFrame; _root.comboTimer = 0; _root.updateComboTimer(); if (_root.Score > _root['challengeScore' + nestedBonusLevel]) { _root['challengeScore' + nestedBonusLevel] = _root.Score; _root.saveNetworkData(); } } if (typeof worm != 'number') { customExit(); _root.ChangeLevel(worm, wormDoor, false, false); } } frame 43 { _root.playSound('DoorClose', _x, 100); delete onEnterFrame; gotoAndStop(2); } frame 52 { if (quickDrop) { _root.Char._x = _x; _root.Char.gotoAndStop('Idle'); gotoAndStop(2); if (runningStart) { if (_xscale > 0) { _root.Char.RightIsDown = function () { return true; }; } else { _root.Char.LeftIsDown = function () { return true; }; } } else { _root.Char.Still = true; } } if (custom != undefined) { custom(); } } frame 74 { _root.Char.char.play(); } frame 79 { _root.DoorCreak.start(); } frame 104 { _root.DoorClose.start(); delete onEnterFrame; if (!vanish) { gotoAndStop(2); } } frame 105 { onEnterFrame = function () { if (_root.Paused) { stop(); } else { play(); } }; } frame 182 { delete onEnterFrame; stop(); } } movieClip 10440 { frame 1 { _name = 'object' + _root.objectCount; thisID = _root.objectCount; ++_root.objectCount; } } movieClip 10442 { } movieClip 10443 { frame 1 { _name = 'object' + _root.objectCount; thisID = _root.objectCount; ++_root.objectCount; if (_root['starsArray' + _root.LevelsArray[_root.MainLevelID][0]][ID]) { gotoAndStop('collected'); } else { objectFunc = function () { _root.playSound('TrophyGetSound', _x, 100); gotoAndPlay('done'); onEnterFrame = function () { _rotation = _rotation + 25; }; _root['starsArray' + _root.LevelsArray[_root.MainLevelID][0]][ID] = true; _root.saveNetworkData(); delete objectFunc; }; stop(); } } frame 16 { delete onEnterFrame; stop(); } } movieClip 10444 { } movieClip 10445 FadeIn { frame 2 { _root.OutPut.counterSquiggles.updateCounter(_root.Squiggles); _root.OutPut.counterLives.updateCounter(_root.Lives); } frame 5 { _root.killFadeOut(); } frame 11 { _root.startControls(); } frame 36 { this.removeMovieClip(); } } movieClip 10446 FadeOut { frame 1 { if (quickFade) { onEnterFrame = function () { if (_root.BackgroundVolume > 0) { _root.BackgroundVolume -= 20; _root.BackgroundMusic.setVolume(_root.BackgroundVolume); } nextFrame(); nextFrame(); nextFrame(); }; } else { onEnterFrame = function () { if (_root.BackgroundVolume > 0) { _root.BackgroundVolume -= 5; _root.BackgroundMusic.setVolume(_root.BackgroundVolume); } }; } } frame 35 { delete onEnterFrame; _root.EndLevel(softReset); _root.LoadLevel(worm, wormDoor, startTimer, softReset); stop(); } } movieClip 10449 { } movieClip 10453 { frame 1 { updateCounter = function (squiggles) { smoke.text = squiggles; spring = 10; onEnterFrame = function () { _yscale = _yscale + spring; _xscale = this._yscale; spring += (100 - _yscale) / 3; spring *= 0.5; }; }; } } movieClip 10456 { frame 1 { updateCounter = function (lives) { smoke.text = lives; spring = 10; onEnterFrame = function () { _yscale = _yscale + spring; _xscale = this._yscale; spring += (100 - _yscale) / 3; spring *= 0.5; }; }; } } movieClip 10470 { } movieClip 10485 { frame 1 { gotoAndStop(_root.MainLevelID + 1); } } movieClip 10490 { frame 95 { _parent.gotoAndStop(_root.LevelType); } frame 134 { stop(); } } movieClip 10492 { } movieClip 10496 { } movieClip 10498 { } movieClip 10512 { frame 1 { stop(); score.text = _root.ScoreString; goal.text = _root.GoalString; } } movieClip 10514 { frame 1 { baddiepop = function () { spring = 20; onEnterFrame = function () { _yscale = _yscale + spring; _xscale = this._yscale; spring += (100 - _yscale) / 2; spring *= 0.6; }; }; } } movieClip 10518 { frame 1 { baddiepop = function () { spring = 20; onEnterFrame = function () { _yscale = _yscale + spring; _xscale = this._yscale; spring += (100 - _yscale) / 2; spring *= 0.6; }; }; } } movieClip 10519 OutPut { frame 1 { stop(); } frame 19 { if (_root.challengeScoreBonus5 > _root.challengeGoalBonus5) { key1.gotoAndStop(2); } else { key1.gotoAndStop(1); } if (_root.challengeScoreBonus6 > _root.challengeGoalBonus6) { key2.gotoAndStop(2); } else { key2.gotoAndStop(1); } if (_root.challengeScoreBonus8 > _root.challengeGoalBonus8) { key3.gotoAndStop(2); } else { key3.gotoAndStop(1); } if (_root.challengeScoreBonus7 > _root.challengeGoalBonus7) { disco1.gotoAndStop(4); } else { disco1.gotoAndStop(3); } if (_root.challengeScoreBonus11 > _root.challengeGoalBonus11) { disco2.gotoAndStop(4); } else { disco2.gotoAndStop(3); } if (_root.challengeScoreBonus12 > _root.challengeGoalBonus12) { disco3.gotoAndStop(4); } else { disco3.gotoAndStop(3); } } frame 32 { trace('challengeStart'); } frame 69 { fade.gotoAndStop('TimeTrialLost'); } instance fade of movieClip 10512 { onClipEvent (load) { _alpha = 0; } onClipEvent (enterFrame) { if (_alpha < 100) { _alpha = _alpha + 5; } } } } movieClip 10520 { } movieClip 10522 loadHUD { } movieClip 10524 { } movieClip 10525 messagePopupStatic { frame 2 { stop(); } frame 76 { _root.reorderFloor(ID); } } movieClip 10527 { } movieClip 10528 messagePopup { frame 37 { removeMovieClip(this); } } // unknown tag 88 length 66 movieClip 10531 justaPopup { } movieClip 10533 { } movieClip 10534 notifyPopup { frame 105 { removeMovieClip(this); } } button 10537 { on (release) { gotoAndStop('controls'); } } button 10541 { on (press) { _root.QuittoMenu(); _root.onEnterFrame = _root.Lock30; } } movieClip 10548 { frame 1 { if (_root['highScoreTT' + _root.LevelsArray[_parent.viewLevel][0]] > 0) { spring = 1; onEnterFrame = function () { spring += (100 - _xscale) / 50; _xscale = _xscale + spring; _yscale = _xscale; }; gotoAndStop('collected'); } else { stop(); } } } movieClip 10551 { frame 1 { if (_root['challengeScore' + _root.LevelsArray[ID - 4][1]] >= _root['challengeGoal' + _root.LevelsArray[ID - 4][1]] && _root['challengeScore' + _root.LevelsArray[ID - 4][1]] > 0 || ID < 4) { spring = 1; onEnterFrame = function () { spring += (100 - _xscale) / 50; _xscale = _xscale + spring; _yscale = _xscale; }; gotoAndStop('collected'); } else { stop(); } _root.ColorEmPants(ID, this); } } movieClip 10553 { frame 1 { if (_root['starsArray' + _root.LevelsArray[_parent.viewLevel][0]][ID]) { spring = 1; onEnterFrame = function () { spring += -_rotation / 50; _rotation = _rotation + spring; }; gotoAndStop('collected'); } else { stop(); } } } button 10556 { on (press) { _root.playSound('message'); gotoAndStop('pants'); } } movieClip 10562 { frame 1 { if (_root.bottlesArray[_parent.viewLevel]) { spring = 1; onEnterFrame = function () { spring += (100 - _xscale) / 50; _xscale = _xscale + spring; _yscale = _xscale; }; gotoAndStop('collected'); } else { stop(); } } } button 10572 { on (press) { _root.playSound('message'); gotoAndStop(1); } } movieClip 10576 { } button 10578 { on (press) { _parent['icon' + _root.isColor].gotoAndStop(2); _root.PageContinue.setVolume(50); _root.PageContinue.start(); _root.isColor = ID; _root.ColorEmPants(ID, 'Char'); _root.ColorEmPants(ID, 'OutPut.counterLives'); gotoAndStop('selected'); } } movieClip 10580 { frame 1 { if (_root['challengeScore' + _root.LevelsArray[ID - 4][1]] >= _root['challengeGoal' + _root.LevelsArray[ID - 4][1]] && _root['challengeScore' + _root.LevelsArray[ID - 4][1]] > 0 || ID < 4) { spring = 1; onEnterFrame = function () { spring += (225 - _xscale) / 50; _xscale = _xscale + spring; _yscale = _xscale; }; if (ID == _root.isColor) { gotoAndStop('selected'); } else { gotoAndStop('collected'); } } else { stop(); } _name = 'icon' + ID; _root.ColorEmPants(ID, this); } } movieClip 10581 { frame 1 { viewLevel = _root.MainLevelID; gotoAndStop(viewLevel + 2); risdown = true; lisdown = true; onEnterFrame = function () { if (!_root.Char.RightIsDown()) { risdown = false; } if (!_root.Char.LeftIsDown()) { lisdown = false; } if (_root.Char.RightIsDown() && !risdown && viewLevel < 9 && viewLevel < _root.LevelSelect) { _root.PageContinue.setVolume(50); _root.PageContinue.start(); risdown = true; ++viewLevel; gotoAndStop('blank'); } if (_root.Char.LeftIsDown() && !lisdown && viewLevel > 0) { _root.PageContinue.setVolume(50); _root.PageContinue.start(); lisdown = true; --viewLevel; gotoAndStop('blank'); } if (_root.Char.UpIsDown() && viewLevel != _root.MainLevelID) { _root.PageContinue.setVolume(50); _root.PageContinue.start(); viewLevel = _root.MainLevelID; gotoAndStop('blank'); } }; } instance pantsCurrent of movieClip 10551 { onClipEvent (load) { ID = _parent.viewLevel + 4; } } instance of movieClip 10553 { onClipEvent (load) { ID = 0; } } instance of movieClip 10553 { onClipEvent (load) { ID = 1; } } instance of movieClip 10553 { onClipEvent (load) { ID = 2; } } instance pants of movieClip 10551 { onClipEvent (load) { ID = _parent.viewLevel + 4; } } instance of movieClip 10553 { onClipEvent (load) { ID = 0; } } instance of movieClip 10553 { onClipEvent (load) { ID = 1; } } instance of movieClip 10553 { onClipEvent (load) { ID = 2; } } frame 12 { gotoAndStop(viewLevel + 2); } instance of movieClip 10580 { onClipEvent (load) { ID = 0; } } instance of movieClip 10580 { onClipEvent (load) { ID = 1; } } instance of movieClip 10580 { onClipEvent (load) { ID = 2; } } instance of movieClip 10580 { onClipEvent (load) { ID = 7; } } instance of movieClip 10580 { onClipEvent (load) { ID = 3; } } instance of movieClip 10580 { onClipEvent (load) { ID = 4; } } instance of movieClip 10580 { onClipEvent (load) { ID = 6; } } instance of movieClip 10580 { onClipEvent (load) { ID = 8; } } instance of movieClip 10580 { onClipEvent (load) { ID = 9; } } instance of movieClip 10580 { onClipEvent (load) { ID = 10; } } instance of movieClip 10580 { onClipEvent (load) { ID = 11; } } instance of movieClip 10580 { onClipEvent (load) { ID = 12; } } } button 10582 { on (press) { gotoAndStop('confirm'); } } movieClip 10585 { } movieClip 10588 { frame 1 { stop(); } } button 10597 { on (press) { _parent.gotoAndStop(1); } } button 10598 { on (press) { gotoAndStop(1); } } movieClip 10600 { frame 1 { lastPressed = 32; KeyIsPressed = true; changeKey = function (eRoot, changeTo) { if (!KeyIsPressed) { lastPressed = changeTo; KeyIsPressed = true; setButton(eRoot, changeTo); _root[eRoot] = changeTo; trace(_root[eRoot]); nextFrame(); } }; setButton = function (eRoot, changeTo) { if (changeTo == 39) { this[eRoot + 'Button'].gotoAndStop(1); this[eRoot + 'Button'].arrowKey._rotation = 0; } else { if (changeTo == 40) { this[eRoot + 'Button'].gotoAndStop(1); this[eRoot + 'Button'].arrowKey._rotation = 90; } else { if (changeTo == 37) { this[eRoot + 'Button'].gotoAndStop(1); this[eRoot + 'Button'].arrowKey._rotation = 180; } else { if (changeTo == 38) { this[eRoot + 'Button'].gotoAndStop(1); this[eRoot + 'Button'].arrowKey._rotation = -90; } else { this[eRoot + 'Button'].gotoAndStop(2); this[eRoot + 'Button'].smoke.text = chr(changeTo); } } } } }; onEnterFrame = function () { if (!Key.isDown(lastPressed)) { KeyIsPressed = false; } }; setButton('rootRight', _root.rootRight); var keyListener = new Object(); keyListener.onKeyDown = function () { changeKey('rootRight', Key.getCode()); }; Key.addListener(keyListener); stop(); } frame 2 { keyListener.onKeyDown = function () { changeKey('rootLeft', Key.getCode()); }; Key.addListener(keyListener); setButton('rootLeft', _root.rootLeft); } frame 3 { keyListener.onKeyDown = function () { changeKey('rootUp', Key.getCode()); }; Key.addListener(keyListener); setButton('rootUp', _root.rootUp); } frame 4 { keyListener.onKeyDown = function () { changeKey('rootDown', Key.getCode()); }; Key.addListener(keyListener); setButton('rootDown', _root.rootDown); } frame 5 { keyListener.onKeyDown = function () { changeKey('rootJump', Key.getCode()); }; Key.addListener(keyListener); setButton('rootJump', _root.rootJump); } frame 6 { keyListener.onKeyDown = function () { changeKey('rootAttack', Key.getCode()); _root.saveNetworkData(); delete keyListener.onKeyDown; }; Key.addListener(keyListener); setButton('rootAttack', _root.rootAttack); } } button 10601 { on (press) { gotoAndStop(2); } } button 10602 { on (press) { gotoAndStop('replays'); } } button 10604 { on (press) { _root.resetAllData(); _root.ChangeLevel('Menus3', 'Door0'); gotoAndStop(1); } } button 10605 { on (press) { gotoAndStop(1); } } movieClip 10607 { frame 1 { if (_parent.toReplay) { _parent.toReplay = false; gotoAndStop('replays'); } else { stop(); } } } movieClip 10609 PauseMenu { frame 6 { stop(); } frame 12 { _root.onEnterFrame = _root.unpausedEnterFrame; _root.Paused = false; removeMovieClip(this); } } movieClip 10611 RotFind { } movieClip 10714 TMP83SVM23MB1 { frame 1 { stop(); } } button 10716 { on (press) { if (_root.isMuteSFX) { soundCheckSFX.gotoAndStop(2); _root.playSound('PageContinue'); _root.isMuteSFX = false; _root.playSound = _root.playSoundUnMute; } else { soundCheckSFX.gotoAndStop(1); _root.isMuteSFX = true; _root.playSound = _root.playSoundMute; } } } button 10717 { on (press) { _root.playSound('PageContinue'); if (_root.isMute) { _root.messagePopup(soundCheckMusic); soundCheckMusic.gotoAndStop(2); _root.isMute = false; _root.saveNetworkData(); _root.soundContainer.loadMusic(_root.LevelLoaded, _root.DoorLoaded); _root.BackgroundMusic.setVolume(100); _root.BackgroundVolume = 100; } else { soundCheckMusic.gotoAndStop(1); _root.isMute = true; _root.saveNetworkData(); _root.soundIs = 'mute'; _root.BackgroundMusic.stop(); } } } button 10718 { on (press) { _root.playSound('PageContinue'); _root.controlDefaults(); } } button 10719 { on (press) { _root.playSound('PageContinue'); _root.KeyIsDownType = false; _root.startControls(); gotoAndStop(3); } } movieClip 10723 { } button 10726 { on (press) { _root.playSound('PageContinue'); _root.KeyIsDownType = true; _root.startControls(); gotoAndStop(2); } } movieClip 10728 MouseMenu { frame 1 { onEnterFrame = function () { if (_root.HideThatMouse > 0) { if (_alpha < 100) { _alpha = _alpha + 20; } } else { if (_alpha > 0) { _alpha = _alpha - 5; } else { this.removeMovieClip(); } } }; if (_root.KeyIsDownType) { gotoAndStop(2); } else { gotoAndStop(3); } } instance soundCheckMusic of movieClip 10723 { onClipEvent (load) { if (_root.isMute) { gotoAndStop(1); } else { gotoAndStop(2); } } } instance soundCheckSFX of movieClip 10723 { onClipEvent (load) { if (_root.isMuteSFX) { gotoAndStop(1); } else { gotoAndStop(2); } } } } movieClip 10730 tehwallzMenus1 { } movieClip 10732 ForegroundMenus1 { } movieClip 10734 tehplatformzMenus1 { } movieClip 10736 { frame 2 { stop(); } } movieClip 10741 { frame 1 { if (_root.progressStatus == -1) { stop(); } else { gotoAndStop(2); } } } movieClip 10742 InteractLayerMenus1 { frame 1 { stop(); } instance Door0 of movieClip 10308 { onClipEvent (load) { worm = 'Menus3'; wormDoor = 'Door1'; _xscale = -100; } } instance Door1 of movieClip 10308 { onClipEvent (load) { worm = 'Menus2'; wormDoor = 'Door0'; } } instance Door2 of movieClip 10308 { onClipEvent (load) { worm = 'Menus4'; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { _root.Char.gotoAndStop('Null'); _root.Squiggles = _root.contSquiggles; _root.Lives = _root.contLives; _root.LivesUnderground = _root.Lives * 23; if (_root.progressStatus == -1) { _root.ChangeLevel('Level4', 'Door0', false, false); } else { _root.ChangeLevel(_root.LevelsArray[_root.progressStatus][0], 'Door0', false, false); } delete objectFunc; }; } } } movieClip 10743 { } movieClip 10745 UberbackgroundMenus2 { } movieClip 10747 tehwallzMenus2 { frame 1 { stop(); } } movieClip 10749 ForegroundMenus2 { } movieClip 10751 tehplatformzMenus2 { } movieClip 10761 InteractLayerMenus2 { frame 1 { gotoAndStop(_root.LevelSelect + 1); } instance Door0 of movieClip 10308 { onClipEvent (load) { worm = 'Menus1'; wormDoor = 'Door1'; } } instance Door1 of movieClip 10308 { onClipEvent (load) { worm = 'Level4'; } } instance Door2 of movieClip 10308 { onClipEvent (load) { worm = 'Level8'; } } instance Door3 of movieClip 10308 { onClipEvent (load) { worm = 'Level1'; } } instance Door4 of movieClip 10308 { onClipEvent (load) { worm = 'Level9'; } } instance Door5 of movieClip 10308 { onClipEvent (load) { worm = 'Level11'; } } instance Door6 of movieClip 10308 { onClipEvent (load) { worm = 'Level10'; } } instance Door7 of movieClip 10308 { onClipEvent (load) { worm = 'Level6'; } } instance Door8 of movieClip 10308 { onClipEvent (load) { worm = 'Level7'; } } instance Door9 of movieClip 10308 { onClipEvent (load) { worm = 'Trans13'; } } } movieClip 10762 { } movieClip 10764 tehwallzMenus3 { frame 1 { stop(); } } movieClip 10766 ForegroundMenus3 { } movieClip 10850 { frame 1 { stop(); } frame 82 { stop(); } } movieClip 10855 { } movieClip 10884 { frame 1 { stop(); } frame 72 { _root.soundContainer.loadMusic('Trans1', 'Door0'); onEnterFrame = function () { if (_root.BackgroundVolume < 20) { _root.BackgroundVolume += 0.2; _root.BackgroundMusic.setVolume(_root.BackgroundVolume); } else { delete onEnterFrame; } }; } frame 163 { _root.playSound('KnockKnock'); _root.BackgroundVolume = 100; _root.BackgroundMusic.setVolume(_root.BackgroundVolume); } frame 165 { _root.Char.char.gotoAndPlay('wakeup'); _root.InteractLayer.bed.gotoAndPlay('wakeup'); _root.playSound('ploink', _parent.bed_x, 100); } frame 209 { stop(); _root.popUpInGame(1, 'mayorIntro', this, this); } } movieClip 10885 InteractLayerMenus3 { instance Door0 of movieClip 10308 { onClipEvent (load) { vanish = true; quickDrop = true; _xscale = -100; custom = function () { _root.Char.gotoAndStop('sleepCin'); if (_root.progressStatus == -1) { _parent.mayor.play(); } gotoAndStop(2); }; } } instance Door1 of movieClip 10308 { onClipEvent (load) { if (_root.progressStatus == -1) { worm = 'Menus4'; } else { worm = 'Menus1'; } custom = function () { if (_root.progressStatus == -1) { _parent.mayor.gotoAndStop(210); } }; } } } movieClip 10886 { } movieClip 10887 UberbackgroundMenus4 { } movieClip 10889 tehwallzMenus4 { } movieClip 10891 tehgroundMenus4 { } movieClip 10893 tehplatformzMenus4 { } movieClip 10895 ForegroundMenus4 { } movieClip 10898 { } movieClip 10899 SpiderDummy { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID); } ++_root.BaddieCount; ItIs = 'Dummy'; Status = 'Stupid'; if (isWearing == undefined) { isWearing = 'nothing'; } health = 0; isWide = 35; comaMax = 80; worth = 1; attackStrength = 20; hasBeenGrabbed = false; canZoom = true; bounceThresh = 5; bounceDefault = 0.3; jabSound = 'BadSlash'; slashSound = 'baseballHit'; getAttacked = _root.standardGetAttacked; hatEffect = null; lockedOn = _root.standardLockedOn; _root.baddieSetupFunc(this); } frame 2 { onEnterFrame = function () { if (Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600 || Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600) { nextFrame(); } }; stop(); } frame 3 { moveUD = 0; InShell._rotation = 0; hitPwnFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { delete this.onEnterFrame; ++this.combo; this.comboSome += 39; this.moveRL = 5; this.moveUD = -10 - Math.abs(eRL); this.rotter = this.moveRL * 2; if (this.moveUD > -20) { this.moveUD = -20; } powEffect(this._x, this._y - this.spread, this.moveRL / 5, this.moveUD / 5, 100, -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433); this.downTime = 10; this.spring = 6; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; _root.playSound('ploink', this._x, 100); this.gotoAndStop('deadjump'); delete this.hitPwnFunc; delete this.hitCharFunc; return true; }; onEnterFrame = function () {}; stop(); } frame 12 { InShellrotation = 0; recenterPoints(); rotateInAir(); jumpAnchor._rotation = -_rotation * (_xscale / 100); hitCharFunc = _root.standardHitCharStunJumpFunc; coma = 160; onEnterFrame = function () { if (!_root.Paused) { if (downTime > 0) { --downTime; } rotateInAir(); ++moveUD; spiderRotate += ((moveRL * _xscale / 100) * 1.5 - spiderRotate) / 10; InShellrotation += spiderRotate; JumpGuide('stunLand'); jumpAnchor._rotation = -_rotation * (_xscale / 100); if (_root.water.hitTest(_x, _y, true)) { moveRL *= 0.75; moveUD *= 0.75; gotoAndStop('floatStun'); } if (_root.stageY * (100 / _root._yscale) - _y < _root.MinY - 700) { messagePopup('spiderGone'); if (combo > 1) { if (this.combo != (this.comboSome - 18) / 39) { while (!false) { } } _root.APISnailShellCombo(this.combo); } if (_root.spidersOut > 0) { --_root.spidersOut; } _root.removeBaddie(ID, true); } } }; stop(); } frame 13 { InShell.stop(); coma = 160; InShell._rotation = 0; smokeN = 0; hitCharFunc = _root.standardHitCharStunnedFunc; onEnterFrame = function () { if (!_root.Paused) { if (coma > 0) { --coma; comaStars._yscale = coma / 2 + 20; comaStars._xscale = comaStars._yscale; if (downTime > 0) { --downTime; } slopeStuff(); if (Math.abs(moveRL + rotAccel) < 40) { moveRL += rotAccel; } else { moveRL *= 40 / Math.abs(moveRL); } if (Math.abs(_x - _root.Char._x) < 80 && (_x - _root.Char._x) * _root.Char._xscale > 0 && _root.Char.lockOn == ID && false) { xDist = (-(_x - (_root.Char._x + _root.Char._xscale * 1.1)) / Math.sin((_root.Char._rotation + 90) * 0.0174532925199433) - moveRL) / 4; moveRL += xDist; if (Math.abs(moveRL) > 10) { moveRL = (moveRL / Math.abs(moveRL)) * 10; } } else { if (friction) { if (!sliding) { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } if (smokeN > 0) { --smokeN; } else { smokeN = 2; _root.inkSplat(_x + RLx(moveRL), _y + RLy(moveRL), moveRL * 4, _rotation); } } else { if (!sliding) { if (Math.abs(moveRL) > 1) { moveRL -= (moveRL / Math.abs(moveRL)) * 1; } else { moveRL = 0; } moveRL *= 0.95; } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } if (smokeN > 0) { --smokeN; } else { smokeN = 5; i = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('smokeFX', 'smokeFX' + i, i, {'_x': this._x, '_y': this._y, '_rotation': this._rotation, '_xscale': Math.abs(moveRL) * 6, '_yscale': Math.abs(moveRL) * 6}); } } } RLStatus = RLFunc(); if (RLStatus == 'Wall') { moveRL = -moveRL; } } else { gotoAndStop('Idle'); } } }; } frame 14 { recenterPoints(); _rotation = 0; InShell._rotation = 0; hitPwnFunc = _root.standardHitCharDeadJumpFunc; hitCharFunc = hitPwnFunc; facing = _xscale / Math.abs(_xscale); onEnterFrame = baddieDeadJumpEnterFrame; } } movieClip 10900 BLayerMenus4 { instance of movieClip 10899 SpiderDummy { onClipEvent (load) { _xscale = -100; } } } movieClip 10910 { } movieClip 10911 InteractLayerMenus4 { instance Door0 of movieClip 10308 { onClipEvent (load) { worm = 'Menus1'; wormDoor = 'Door2'; } } instance Door1 of movieClip 10308 { onClipEvent (load) { worm = 'Menus1'; wormDoor = 'Door2'; } } } movieClip 10912 { } movieClip 10914 UberbackgroundLevel4 { } movieClip 10916 BackgroundLevel4BG1 { } movieClip 10918 BLayerBonus2 { instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 35; looseRot = true; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 35; looseRot = true; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 35; looseRot = true; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 35; looseRot = true; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 35; looseRot = true; } } } movieClip 10920 ForegroundBonus2 { } movieClip 10938 { frame 1 { if (_parent._name == 'backgroundShell') { ID = _root.BackgroundCoinCount; _name = 'Coin' + ID; if (_root.Bonus2CoinGot[ID] == true) { gotoAndStop('DontCheat'); } ++_root.BackgroundCoinCount; } else { ID = _root.CoinCount; _name = 'Coin' + ID; if (_root[_root.LevelLoaded + 'CoinGot'][ID] == true && _root.LevelLoaded != 'Level10') { gotoAndStop('DontCheat'); } else { _root[_root.LevelLoaded + 'CoinGot'][ID] = false; } ++_root.CoinCount; } stop(); } frame 2 { _root[_root.LevelLoaded + 'CoinGot'][ID] = true; _root.PayPants(); _root.HurtPants(-5); tehEase = 5; _rotation = random(360); } frame 18 { delete onEnterFrame; stop(); } } movieClip 10940 { frame 2 { stop(); } } // unknown tag 88 length 66 movieClip 10954 { } movieClip 11107 { frame 1 { if (vanish == undefined) { vanish = false; } if (quickDrop == undefined) { quickDrop = false; } if (runningStart == undefined) { runningStart = false; } if (doorPowerLevel > _root.LevelSelect || _root.CameoSelect[doorPowerSlot] == false) { gotoAndStop('ghostDoor'); } if (worm != undefined) { var n = 0; while (n < _root.LevelsArray[_root.MainLevelID].length) { if (_root.LevelsArray[_root.MainLevelID][n] == worm) { wormPower = n; } ++n; } } } frame 2 { if (vanish) { gotoAndStop(150); } stop(); } instance checkBox of movieClip 10954 { onClipEvent (load) { stop(); if (_root.LevelPower > 0 && !_parent.vanish) { if (_root.getLevelType(_root.LevelLoaded) == 'nothing') { gotoAndStop(3); } else { if (_root['challengeScore' + _root.LevelLoaded] > _root['challengeGoal' + _root.LevelLoaded]) { gotoAndStop(2); } else { gotoAndStop(1); } } } else { if (_parent.wormPower > 0 && !_parent.vanish) { if (_root.getLevelType(_parent.worm) == 'nothing') { gotoAndStop(3); } else { if (_root.getLevelType(_parent.worm) == 'Arena') { if (_root['challengeScore' + _parent.worm] > _root['challengeGoal' + _parent.worm]) { gotoAndStop(2); } else { gotoAndStop(1); } } else { gotoAndStop(4); } } } else { gotoAndStop(3); } } } } frame 11 { _root.playSound('DoorCreak', _x, 100); } frame 13 { if (worm == undefined) { worm = _root.SnapLevel; } if (finishScore) { delete _root.onEnterFrame; _root.comboTimer = 0; _root.updateComboTimer(); if (_root.Score > _root.challengeScoreBonus4) { _root.challengeScoreBonus4 = _root.Score; _root.saveNetworkData(); } } if (typeof worm != 'number') { if (wormDoor == undefined) { if (substring(_root.LevelLoaded, 1, 5) == 'Bonus') { wormDoor = _root[worm + _root.LevelLoaded + 'Door0']; _root[_root.LevelLoaded + worm + wormDoor] = 'Door0'; } else { if (_root[worm + _root.LevelLoaded + _name] == undefined) { wormDoor = 'Door0'; _root[_root.LevelLoaded + worm + wormDoor] = _name; } else { wormDoor = _root[worm + _root.LevelLoaded + _name]; _root[_root.LevelLoaded + worm + wormDoor] = _name; } } } customExit(); _root.SnapLevel = _root.LevelLoaded; _root.ChangeLevel(worm, wormDoor, false, false); } } frame 43 { _root.playSound('DoorClose', _x, 100); if (launchSite != undefined) { getURL(launchSite, '_blank'); } else { if (typeof worm == 'number') { _root.Char.gotoAndStop('DoorOut'); _root.Char._x = Math.round(_parent['Door' + worm]._x) + _parent['Door' + worm]._xscale / 2; _root.Char._y = Math.round(_parent['Door' + worm]._y); _root.Char.Still = true; _root.Char._xscale = _parent['Door' + worm]._xscale; _parent['Door' + worm].gotoAndPlay('doorOut'); } } delete onEnterFrame; gotoAndStop(2); } frame 52 { if (quickDrop) { _root.Char._x = _x; _root.Char.gotoAndStop('Idle'); _root.Char.Still = true; gotoAndStop(2); if (runningStart) { if (_xscale > 0) { _root.Char.RightIsDown = function () { return true; }; } else { _root.Char.LeftIsDown = function () { return true; }; } } } else { if (custom != undefined) { custom(); } } } frame 74 { _root.Char.char.play(); } frame 79 { _root.DoorCreak.start(); } frame 104 { _root.DoorClose.start(); delete onEnterFrame; if (!vanish) { gotoAndStop(2); } } frame 105 { onEnterFrame = function () { if (_root.Paused) { stop(); } else { play(); } }; } frame 182 { delete onEnterFrame; stop(); } } movieClip 11109 { frame 1 { _name = 'object' + _root.objectCount; thisID = _root.objectCount; ++_root.objectCount; } } movieClip 11111 { } movieClip 11112 { frame 1 { _name = 'object' + _root.objectCount; thisID = _root.objectCount; ++_root.objectCount; if (_root['starsArray' + _root.LevelsArray[_root.MainLevelID][0]][ID]) { gotoAndStop('collected'); } else { objectFunc = function () { _root.playSound('TrophyGetSound', _x, 100); _root.OutPut['hudStar' + ID].gotoAndStop('done'); gotoAndPlay('done'); onEnterFrame = function () { _rotation = _rotation + 25; }; _root['starsArray' + _root.LevelsArray[_root.MainLevelID][0]][ID] = true; _root.saveNetworkData(); delete objectFunc; }; stop(); } } frame 16 { delete onEnterFrame; stop(); } } movieClip 11113 { instance WormBox of movieClip 11109 { onClipEvent (load) { AtIt = 'Down'; thrust = -10; } } instance of movieClip 11112 { onClipEvent (load) { ID = 2; } } } movieClip 11115 BackgroundLevel4BG2 { } movieClip 11117 BackgroundLevel4BG3 { } movieClip 11119 BackgroundLevel4BG4 { } movieClip 11122 { } movieClip 11124 BackgroundLevel4BG5 { } movieClip 11126 tehwallzLevel4 { } movieClip 11128 tehhangzLevel4 { } movieClip 11130 surfaceLevel4 { } movieClip 11132 tehgroundLevel4 { } movieClip 11134 tehplatformzLevel4 { } movieClip 11136 ForegroundLevel4 { } movieClip 11137 BLayerLevel4 { instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 25; launchAngle = 20; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 35; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 30; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 25; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 32; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 25; TimeSpring = 'A'; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 25; looseRot = true; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 30; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; } } instance of movieClip 6612 Snail { onClipEvent (load) { } } } movieClip 11138 { } movieClip 11155 { frame 1 { ID = _root.CoinTTCount; ++_root.CoinTTCount; _rotation = 0; gotoAndStop(21); } frame 3 { spring = 30; eScale = coinTween._xscale; onEnterFrame = function () { spring += (100 - eScale) / 10; eScale += spring; coinTween._yscale = eScale; coinTween._xscale = coinTween._yscale; spring *= 0.8; }; onEnterFrame(); } frame 4 { _rotation = random(360); } frame 21 { delete onEnterFrame; stop(); } } movieClip 11168 { } movieClip 11181 { } movieClip 11189 { frame 20 { _parent.onEnterFrame = function () { if (this._y > -1000) { this._y -= 15; } else { this.gotoAndStop(4); } if (_root.levelScale > _root.oldLevelScale + 1) { _root.levelScale -= 1; } else { _root.levelScale = _root.oldLevelScale; _root.switchCameraBack(); } }; stop(); } } movieClip 11190 { frame 1 { stop(); } frame 4 { delete onEnterFrame; } } movieClip 11193 { frame 1 { _name = 'object' + _root.objectCount; ID = _root.objectCount; ++_root.objectCount; gotoAndStop(2); } frame 2 { onEnterFrame = function () { if (_root.UberForeground['house' + house]._alpha < 100) { _root.UberForeground['house' + house]._alpha += 5; } else { delete onEnterFrame; } }; objectFunc = function () { gotoAndStop(3); }; } frame 3 { onEnterFrame = function () { if (_root.UberForeground['house' + house]._alpha > 25) { _root.UberForeground['house' + house]._alpha -= 5; } else { delete onEnterFrame; } }; objectFunc = function () { gotoAndStop(2); }; } } movieClip 11196 { frame 1 { _name = 'object' + _root.objectCount; thisID = _root.objectCount; ++_root.objectCount; gotoAndStop(2); } frame 2 { onEnterFrame = function () { if (_root.UberForeground['house' + house]._alpha < 100) { _root.UberForeground['house' + house]._alpha += 5; } else { delete this.onEnterFrame; } }; objectFunc = function () { gotoAndStop(3); }; } frame 3 { onEnterFrame = function () { if (_root.UberForeground['house' + house]._alpha > 25) { _root.UberForeground['house' + house]._alpha -= 5; } else { delete this.onEnterFrame; } }; objectFunc = function () { gotoAndStop(2); }; } } movieClip 11207 { } movieClip 11209 { } movieClip 11210 { } movieClip 11222 { } movieClip 11226 { frame 60 { stop(); } } movieClip 11227 { frame 1 { stop(); } } movieClip 11230 { } movieClip 11234 { frame 1 { stop(); } } movieClip 11235 InteractLayerLevel4 { instance Door0 of movieClip 10308 { onClipEvent (load) { vanish = true; } } instance Door2 of movieClip 10308 { onClipEvent (load) { worm = 'Bonus2'; } } instance Door1 of movieClip 10438 { onClipEvent (load) { worm = 'Bonus4'; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { _root.Char.gotoAndStop('Null'); _root.ChangeLevel('Trans1', 'Door0', false, true); delete objectFunc; }; } } instance Door3 of movieClip 10308 { onClipEvent (load) { quickDrop = true; vanish = true; _xscale = -100; runningStart = true; } } instance of movieClip 11193 { onClipEvent (load) { house = 1; } } instance of movieClip 11196 { onClipEvent (load) { house = 2; } } instance of movieClip 10314 { onClipEvent (load) { ID = 1; thisMessageIdle = 'scienceNPC'; thisMessageSuccess = 'scienceNPCWin'; switchIt = true; cameraOn = this; camFacing = 1; } } instance of movieClip 10314 { onClipEvent (load) { ID = 2; thisMessageSuccess = 'mayorAway'; thisMessageIdle = 'mayorAway'; switchIt = false; custom = function () { _root.InteractLayer.mayor.gotoAndStop(2); }; } } instance of movieClip 10314 { onClipEvent (load) { ID = 2; thisMessageSuccess = 'mayorWaiting'; thisMessageIdle = 'mayorWaiting'; switchIt = true; cameraOn = _root.InteractLayer.mayor; camFacing = -1; } } instance of movieClip 10443 { onClipEvent (load) { ID = 0; } } instance of movieClip 10443 { onClipEvent (load) { ID = 1; } } } movieClip 11238 { frame 1 { } } movieClip 11241 { } movieClip 11242 UberForegroundLevel4 { } movieClip 11243 { } movieClip 11245 BackgroundBonus4BG1 { } movieClip 11247 BackgroundBonus4BG2 { } movieClip 11249 tehwallzBonus4 { } movieClip 11251 tehgroundBonus4 { } movieClip 11253 tehplatformzBonus4 { } movieClip 11255 ForegroundBonus4 { } movieClip 11257 UberForegroundBonus4 { } movieClip 11258 BLayerBonus4 { instance JumpPad0 of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 28; looseRot = true; } } instance JumpPad0 of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 35; looseRot = true; } } instance JumpPad0 of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 40; } } } movieClip 11277 { } movieClip 11278 { frame 1 { ID = _root.objectCount; _name = 'object' + _root.objectCount; ++_root.objectCount; } frame 2 { objectFunc = function (ex, ey, mRL, mUD) { if (_root.comboTimer > 0) { _root.CoinVoice.setPan((_root.smoothTheX + _x) / 3.6 - 100); _root.CoinVoice.start(); rot = Math.sqrt(mRL * mRL + mUD * mUD) * 5 * (mRL / Math.abs(mRL)); _root.comboMultiplier += 1; if (_root.comboTimer < _root.comboTimerMax - 5) { _root.comboTimer = _root.comboTimerMax - 5; _root.updateComboTimer(); } _root.moveComboScoreSmoke = Math.round(_root.moveComboScore) + ' x ' + _root.comboMultiplier; gotoAndPlay('Hit'); } else { shakeRL = mRL; shakeUD = mUD; gotoAndStop('deny'); } delete objectFunc; }; stop(); } frame 20 { delete onEnterFrame; stop(); } frame 21 { b = 10; onEnterFrame = function () { coinTween._x = shakeRL; coinTween._y = shakeUD; shakeRL *= -0.9; shakeUD *= -0.9; if (b > 0) { --b; } else { gotoAndStop('ready'); delete onEnterFrame; } }; } } movieClip 11279 InteractLayerBonus4 { instance Door0 of movieClip 10308 { onClipEvent (load) { storyScoreBadge = true; showCheck = true; finishScore = true; } } instance Door1 of movieClip 10308 { onClipEvent (load) { storyScoreBadge = true; showCheck = true; finishScore = true; } } } movieClip 11280 { } movieClip 11282 UberbackgroundBonus2 { } movieClip 11284 tehwallzBonus2 { } movieClip 11286 BackgroundBonus2BG1 { } movieClip 11288 BackgroundBonus2BG2 { frame 1 { bv; } } movieClip 11289 BackgroundBonus2BG4 { } movieClip 11291 { frame 1 { _name = 'SpringBoard' + _root.SpringBoardCount; ++_root.SpringBoardCount; anchorX = _x; anchorY = _y; moveRL = 0; moveUD = 0; _root.Foreground.attachMovie('SpringBoardSmoke', _name + 'Smoke', _root.Foreground.getNextHighestDepth(), {'_x': _x, '_y': _y}); } } movieClip 11292 SBLayerBonus2 { } movieClip 11293 tehplatformzBonus2 { } movieClip 11295 tehgroundBonus2 { } movieClip 11296 InteractLayerBonus2 { instance WormBox of movieClip 10440 { onClipEvent (load) { AtIt = 'Down'; thrust = -10; } } instance of movieClip 10443 { onClipEvent (load) { ID = 2; } } } movieClip 11297 { } movieClip 11299 UberbackgroundLevel8 { } movieClip 11301 BackgroundLevel8BG1 { } movieClip 11303 BackgroundLevel8BG2 { } movieClip 11305 BackgroundLevel8BG3 { } movieClip 11307 { } movieClip 11309 BackgroundLevel8BG5 { } movieClip 11311 surfaceLevel8 { } movieClip 11314 waterLevel8 { frame 1 { stop(); } frame 241 { stop(); } } movieClip 11320 tehwallzLevel8 { frame 1 { stop(); } } movieClip 11323 tehgroundLevel8 { frame 1 { stop(); } } movieClip 11324 aPlatzLevel8 { frame 1 { stop(); } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 10; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 10; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 10; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 10; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 10; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 10; decay = 0.8; } } } movieClip 11326 tehplatformzLevel8 { } movieClip 11327 tehhangzLevel8 { } movieClip 11329 ForegroundLevel8 { } movieClip 11330 { } movieClip 11332 { frame 1 { _name = 'object' + _root.objectCount; thisID = _root.objectCount; ++_root.objectCount; startFunc = function () { if (_root.Char.moveRL == 0 && _root.signBubbleShell == undefined) { _root.attachMovie('signBubbleShell', 'signBubbleShell', 805, {'_x': _x, '_y': _y, 'ID': ID, 'signParent': thisID}); _root.signBubbleShell.mainBubble._x = _root.SmoothScrollx * 0.6; _root.signBubbleShell.weeBubble1._x = _root.signBubbleShell.mainBubble._x * 0.35; _root.signBubbleShell.weeBubble2._x = _root.signBubbleShell.mainBubble._x * 0.2; _root.signBubbleShell.mainBubble._y = -_y + (-_root.theY + 320); _root.signBubbleShell.weeBubble1._y = -45 + (_root.signBubbleShell.mainBubble._y - 130 + 45) * 0.75 + 8; _root.signBubbleShell.weeBubble2._y = -45 + (_root.signBubbleShell.mainBubble._y - 130 + 45) * 0.3 + 5; onEnterFrame = thisEnterFrame; objectFunc = function () { return false; }; } }; thisEnterFrame = function () { _root.signBubbleShell.mainBubble._x += (_root.SmoothScrollx * 0.6 - _root.signBubbleShell.mainBubble._x) / 10; _root.signBubbleShell.weeBubble1._x = _root.signBubbleShell.mainBubble._x * 0.35; _root.signBubbleShell.weeBubble2._x = _root.signBubbleShell.mainBubble._x * 0.2; _root.signBubbleShell.mainBubble._y = -_y + (-_root.theY + 380); _root.signBubbleShell.weeBubble1._y = -45 + (_root.signBubbleShell.mainBubble._y - 130 + 45) * 0.75 + 8; _root.signBubbleShell.weeBubble2._y = -45 + (_root.signBubbleShell.mainBubble._y - 130 + 45) * 0.3 + 5; if (Math.abs(_x - _root.Char._x) > 50 || Math.abs(_y - _root.Char._y) > 100) { if (_root.signBubbleShell.mainBubble._currentframe < 17) { _root.signBubbleShell.mainBubble.play(); } } }; objectFunc = startFunc; } } movieClip 11334 { frame 1 { _name = 'object' + _root.objectCount; thisID = _root.objectCount; ++_root.objectCount; _root.messagePopup('setup'); } frame 2 { stop(); } } movieClip 11401 { frame 1 { stop(); } frame 85 { _root.UberForeground.waterClip.play(); _root.water.play(); _root.tehwallz.gotoAndStop(2); } frame 304 { stop(); } } movieClip 11403 { } movieClip 11406 InteractLayerLevel8 { frame 1 { stop(); } instance golfHole of movieClip 11330 { onClipEvent (load) { ID = 7; } } instance of movieClip 10443 { onClipEvent (load) { ID = 1; } } instance of movieClip 11332 { onClipEvent (load) { ID = 1; } } instance of movieClip 11334 { onClipEvent (load) { objectFunc = function () { _root.Char._xscale = 100; _root.Char.gotoAndStop('TugSwim'); _root.Char.anchX = _x + 20; _root.Char.anchY = _y + 80; delete objectFunc; }; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Trans1', 'Door1', false, true); delete objectFunc; }; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Trans1', 'Door1'); delete objectFunc; }; } } instance Door0 of movieClip 10308 { onClipEvent (load) { b = 30; custom = function () { onEnterFrame = function () { if (b > 0) { --b; } else { _root.Char.centerX = _x; _root.Char.JumpFunc(15); _root.Char.FloatUp = 12; _root.Char.moveRL = 5; _root.Char.Still = true; delete onEnterFrame; } gotoAndStop(2); }; }; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Bonus15', 'Door0', false, true); delete objectFunc; }; } } instance Door1 of movieClip 10308 { onClipEvent (load) { vanish = true; customEntrance = true; custom = function () { _root.Char.centerX = _x; _root.Char.JumpFunc(20); _root.Char.FloatUp = 12; _root.Char.moveRL = 0; _root.Char.Still = true; _root.BLayer.gotoAndStop(2); _root.UberForeground.waterClip.gotoAndPlay(250); _root.water.gotoAndStop(241); gotoAndStop(2); }; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Trans2', 'Door0', false, true); delete objectFunc; }; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Trans2', 'Door0', false, true); delete objectFunc; }; } } instance of movieClip 10440 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.UberForeground.waterClip.waves.play(); }; } } instance of movieClip 10440 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.UberForeground.waterClip.waves.stop(); }; } } instance of movieClip 10314 { onClipEvent (load) { ID = 1; thisMessageSuccess = 'CaptainIntro'; thisMessageIdle = 'CaptainIntro'; custom = function () { _root.InteractLayer.gotoAndStop(4); _root.tehwallz.gotoAndStop(3); _root.BLayer.gotoAndStop(3); _root.BLayer.Baddie100.InShell.play(); }; } } instance of movieClip 10314 { onClipEvent (load) { ID = 2; switchIt = true; cameraDist = 600; camFacing = -1; cameraOn = this; } } frame 2 { _root.setBounds(); } frame 3 { _root.setBounds(); } instance of movieClip 10440 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.soundContainer.loadMusic('BossFight'); _root.BackgroundVolume = 0; _root.BackgroundMusic.setVolume(0); this.spring = 0; onEnterFrame = function () { this.spring += 0.1; if (_root.BackgroundVolume + this.spring < 100) { _root.BackgroundVolume += this.spring; } else { _root.BackgroundVolume = 100; } _root.BackgroundMusic.setVolume(_root.BackgroundVolume); }; delete objectFunc; }; } } frame 4 { _root.setBounds(); } frame 5 { _root.setBounds(); } } button 11560 { on (press) { nextFrame(); play(); } } movieClip 11758 { frame 1 { stop(); } frame 10 { } frame 52 { stop(); } frame 67 { stop(); } frame 137 { _root.popUpInGame(1, 'CaptainCont', _parent); } frame 166 { stop(); b = 5; onEnterFrame = function () { if (b > 0) { --b; } else { gotoAndPlay('jumpDown'); delete onEnterFrame; } }; } frame 188 { _parent.moveRL = 4; _parent.moveUD = -15; _parent.gotoAndStop('deadjump'); } } movieClip 11837 { frame 29 { stop(); } } movieClip 11848 { frame 17 { _parent.gotoAndStop('Idle'); } } movieClip 11854 { } movieClip 11855 { frame 1 { ID = 100; _name = 'Baddie100'; _root.BaddieArray.push(100); swapDepths(ID + 805); _xscale = -100; ItIs = 'CinBad'; Status = 'Stupid'; if (isWearing == undefined) { isWearing = 'nothing'; } health = 1; isWide = 5; comaMax = 80; worth = 1; attackStrength = 20; hasBeenGrabbed = false; canZoom = true; bounceThresh = 20; bounceDefault = 0.6; spread = 40; jabSound = 'BadSlash'; slashSound = 'baseballHit'; hitCharFunc = _root.cinHitCharStunJumpFunc; hitPwnFunc = _root.standardHitCharPwnFunc; getAttacked = _root.standardGetAttacked; lockedOn = _root.standardLockedOn; _root.baddieSetupFunc(this); } frame 2 { nextFrame(); } frame 4 { onEnterFrame = function () { if (_root.Paused) { Spider.stop(); } else { Spider.play(); if (!(Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600) && !(Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600)) { prevFrame(); } if (Math.abs(_x - _root.Char._x) < 80 && (_x - _root.Char._x) * _root.Char._xscale > 0 && _root.Char.lockOn == ID) { xDist = (-(_x - (_root.Char._x + _root.Char._xscale * 1.25)) / Math.sin((_root.Char._rotation + 90) * 0.0174532925199433) - moveRL) / 4; moveRL += xDist; if (Math.abs(moveRL) > 10) { moveRL = (moveRL / Math.abs(moveRL)) * 10; } } else { if (_root.Char.lockOn == ID) { } else { gotoAndStop('Idle'); } } temp = RLFunc(); if (temp == 'rEdge' || temp == 'rBackEdge') { _xscale = 100; moveRL = 3.333333333333334; } else { if (temp == 'lEdge' || temp == 'lBackEdge') { _xscale = -100; moveRL = -3.333333333333334; } else { if (temp == 'Wall' || _xscale * _rotation < -6000) { _xscale = -_xscale; moveRL = Math.round(_xscale / 30); } } } } }; stop(); } frame 5 { InShellrotation = 0; if (moveUD > -2) { InShell.gotoAndPlay(12); } onEnterFrame = function () { if (!_root.Paused) { if (FloatUp > 0) { --FloatUp; } else { if (moveUD < 20) { ++moveUD; } } if (moveUD > -4) { InShell.play(); } if (coma > 0) { if (JumpGuide('stunLand') == 'Bounce') { InShell.gotoAndStop(1); } } else { if (JumpGuide('land') == 'Bounce') { if (moveUD > -15) { InShell.gotoAndStop('short'); } else { InShell.gotoAndStop(1); } } } jumpAnchor._rotation = -_rotation * (_xscale / 100); if (_root.water.hitTest(_x, _y, true)) { moveRL *= 0.5; moveUD *= 0.5; gotoAndStop('floatStun'); } } }; } frame 6 { delete onEnterFrame; } frame 11 { if (Math.abs(moveRL) > 5) { moveRL *= 5 / Math.abs(moveRL); } this.onEnterFrame = function () { this._x += this.shakeRL / 2; this.shakeRL = -this.shakeRL; if (this.b > 0) { --this.b; } else { if (this.health > 0) { this.coma = this.comaMax; if (this.moveUD == 0) { this.gotoAndStop('stunLand'); } else { this.gotoAndStop('stunjump'); } } else { this.gotoAndStop('deadjump'); } } }; } frame 12 { InShellrotation = 0; recenterPoints(); rotateInAir(); jumpAnchor._rotation = -_rotation * (_xscale / 100); hitCharFunc = _root.standardHitCharStunJumpFunc; coma = 160; onEnterFrame = function () { if (!_root.Paused) { if (downTime > 0) { --downTime; } rotateInAir(); ++moveUD; spiderRotate += (moveRL * 1.5 - spiderRotate) / 10; InShellrotation += spiderRotate; JumpGuide('stunLand'); jumpAnchor._rotation = -_rotation * (_xscale / 100); if (_root.water.hitTest(_x, _y, true)) { moveRL *= 0.75; moveUD *= 0.75; gotoAndStop('floatStun'); } if (_root.stageY * (100 / _root._yscale) - _y < _root.MinY - 700) { messagePopup('spiderGone'); if (combo > 1) { if (this.combo != (this.comboSome - 18) / 39) { while (!false) { } } _root.APISnailShellCombo(this.combo); } if (_root.spidersOut > 0) { --_root.spidersOut; } _root.removeBaddie(ID, true); } } }; stop(); } frame 13 { InShell.stop(); InShell._rotation = 0; smokeN = 0; if (isWearing == 'nothing') { hitCharFunc = _root.standardHitCharStunnedFunc; } else { delete hitCharFunc; } spring = fakeUD * 3; fakeUD = 0; facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (!_root.Paused) { spring += (100 - _yscale) / 5; spring *= 0.7; _yscale = _yscale + spring; _xscale = (100 - _yscale + 100) * facing; if (coma > 0 || Math.abs(moveRL) > 0.5) { --coma; comaStars._yscale = coma / 2 + 20; comaStars._xscale = comaStars._yscale; if (downTime > 0) { --downTime; } slopeStuff(); if (Math.abs(moveRL + rotAccel) < 40) { moveRL += rotAccel; } else { moveRL *= 40 / Math.abs(moveRL); } if (Math.abs(_x - _root.Char._x) < 80 && (_x - _root.Char._x) * _root.Char._xscale > 0 && _root.Char.lockOn == ID && false) { xDist = (-(_x - (_root.Char._x + _root.Char._xscale * 1.1)) / Math.sin((_root.Char._rotation + 90) * 0.0174532925199433) - moveRL) / 4; moveRL += xDist; if (Math.abs(moveRL) > 10) { moveRL = (moveRL / Math.abs(moveRL)) * 10; } } else { if (friction) { if (!sliding) { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } if (smokeN > 0) { --smokeN; } else { smokeN = 2; _root.inkSplat(_x + RLx(moveRL), _y + RLy(moveRL), moveRL * 4, _rotation); } } else { if (!sliding) { if (Math.abs(moveRL) > 1) { moveRL -= (moveRL / Math.abs(moveRL)) * 1; } else { moveRL = 0; } moveRL *= 0.98; } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } if (smokeN > 0) { --smokeN; } else { smokeN = 5; i = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('smokeFX', 'smokeFX' + i, i, {'_x': this._x, '_y': this._y, '_rotation': this._rotation, '_xscale': Math.abs(moveRL) * 6, '_yscale': Math.abs(moveRL) * 6}); } } } RLStatus = RLFunc(); if (RLStatus == 'Wall') { moveRL = -moveRL; } } else { gotoAndStop('Idle'); } } }; } frame 14 { _root.tehwallz.gotoAndStop(4); _root.popUpInGame(1, 'CaptainCont', this); facing = _xscale / Math.abs(_xscale); onEnterFrame = function () { if (!_root.Paused) { this.spring += (100 - this._yscale) / 5; this.spring *= 0.7; this._yscale += this.spring; this._xscale = (100 - this._yscale + 100) * this.facing; ++moveUD; _x = _x + moveRL; _y = _y + moveUD; _root.CameraX = _x; _root.CameraY = _y; _root.MinX -= 4; if (_root.stageY * (100 / _root._yscale) - _y < _root.MinY - 700) { _root.removeBaddie(ID, true); } } }; } frame 15 { } frame 33 { gotoAndStop('Idle'); } frame 34 { onEnterFrame = function () { if (carriedBy._currentframe != 39) { moveRL = 0; JumpFunc(0); } }; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; } frame 45 { waterY = centerY; while (_root.water.hitTest(centerX, waterY - 1, true)) { --waterY; } while (!_root.water.hitTest(centerX, waterY, true)) { ++waterY; } hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; rotateInAir(); jumpAnchor._rotation = -_rotation * (_xscale / 100); b = 120; onEnterFrame = function () { moveRL += (_xscale / 33 - moveRL) / 20; bob = (centerY + Math.abs(moveRL * 1) - waterY) / 20; if (Math.abs(bob) > 1) { moveUD -= bob / Math.abs(bob); } else { moveUD -= bob; } if (Math.abs(moveUD) > 0.5) { moveUD *= 0.9; } SwimGuide(); jumpAnchor._rotation = -_rotation * (_xscale / 100); if (_root.testAll(centerX + 15, centerY + 25) && _root.testAll(centerX - 15, centerY + 25)) { while (_root.testAll(centerX, centerY + 15, false)) { --centerY; } while (!_root.testAll(centerX, centerY + 16, false)) { ++centerY; } _rotation = 0; InShellrotation = 0; _x = centerX; _y = centerY + spread; gotoAndStop('Idle'); } if (smokeN > 0) { --smokeN; } else { if (Math.abs(moveRL) > 2) { smokeN = 4; _root.waterSplash(centerX + -_xscale / 10 + moveRL, waterY + 10, _xscale + -moveRL * 5, 0); } } }; } frame 51 { waterY = centerY; while (_root.water.hitTest(centerX, waterY - 1, true)) { --waterY; } while (!_root.water.hitTest(centerX, waterY, true)) { ++waterY; } hitCharFunc = _root.standardHitCharStunJumpFunc; hitPwnFunc = _root.standardHitCharPwnFunc; rotateInAir(); jumpAnchor._rotation = -_rotation * (_xscale / 100); b = 60; InShell.stop(); onEnterFrame = function () { moveRL *= 0.95; bob = (centerY - waterY) / 20; if (Math.abs(bob) > 1) { moveUD -= bob / Math.abs(bob); } else { moveUD -= bob; } if (Math.abs(moveUD) > 0.5) { moveUD *= 0.9; } if (_root.testAll(centerX, centerY + 15, false) && centerY < waterY) { while (_root.testAll(centerX, centerY + 15, false)) { --centerY; } _rotation = 0; rotateInAir(); gotoAndStop('stunLand'); } else { if (Math.abs(spiderRotate) > 10) { spiderRotate -= (spiderRotate / Math.abs(spiderRotate)) * 0.5; } else { if (b > 0 || Math.abs(InShellrotation) > 1) { --b; if (InShellrotation > 180) { InShellrotation -= 360; } else { if (InShellrotation < -180) { InShellrotation += 360; } } spiderRotate += (-InShellrotation / 20 - spiderRotate) / 40; } else { gotoAndStop('Float'); } } } InShellrotation += spiderRotate; JumpGuide(); jumpAnchor._rotation = -_rotation * (_xscale / 100); if (smokeN > 0) { --smokeN; } else { if (Math.abs(moveRL) > 2) { smokeN = 4; _root.waterSplash(centerX + -_xscale / 10 + moveRL, waterY + 10, _xscale + -moveRL * 5, 0); } } }; } } movieClip 11905 { } movieClip 11913 { } movieClip 11989 { frame 24 { _root.playSound('BadStomp', _parent._x, 100); } frame 77 { _root.removeBaddie(_parent.ID, true); } } movieClip 11990 { frame 2 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID); } ++_root.BaddieCount; ItIs = 'underwaterPirate'; spread = 50; isWide = 40; attackStrength = 20; centerX = _x; centerY = _y - spread; hitCharFunc = _root.standardHitCharSwimFunc; } frame 3 { onEnterFrame = function () { if (Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600 || Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600) { if (_root.tehhangz.hitTest(_x + moveRL, _y + moveUD + 6, true)) { while (!_root.tehhangz.hitTest(_x, _y + 2, true)) { _y = _y + 1; } while (_root.tehhangz.hitTest(_x, _y, true)) { _y = _y - 1; } nextFrame(); } else { if (WraptoGround(true, false) == 'Fall') { JumpFunc(0); } else { nextFrame(); } } } }; stop(); } frame 4 { bubbleScale = 0; bubbleN = 0; InShell._rotation = 0; onEnterFrame = function () { if (_root.Paused) { Spider.stop(); } else { Spider.play(); if (downTime > 0) { --downTime; } if (!(Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600) && !(Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600) && _currentframe == 3 && !insomniac) { prevFrame(); } if (bubbleN > 0) { --bubbleN; } else { bubbleN = random(20) + 20; _root.spawnBubble(_x + 30, _y - spread - 40, 50 + random(50), 0); bubbleScale = 0; } } }; stop(); } frame 16 { spring = 20; onEnterFrame = function () { InShell._xscale += spring; InShell._yscale = InShell._xscale; spring *= 0.7; spring += (100 - InShell._yscale) / 8; if (InShell._xscale < 100) { InShell._yscale = 100; InShell._xscale = 100; gotoAndStop('Idle'); } _root.messagePopup(InShell._xscale); }; } frame 33 { gotoAndStop('Idle'); } frame 35 { onEnterFrame = function () { if (carriedBy._currentframe != 39) { moveRL = 0; JumpFunc(0); } }; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; } frame 46 { waterY = centerY; while (_root.water.hitTest(centerX, waterY - 1, true)) { --waterY; } while (!_root.water.hitTest(centerX, waterY, true)) { ++waterY; } hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; rotateInAir(); jumpAnchor._rotation = -_rotation * (_xscale / 100); b = 120; onEnterFrame = function () { moveRL += (_xscale / 33 - moveRL) / 20; bob = (centerY + Math.abs(moveRL * 1) - waterY) / 20; if (Math.abs(bob) > 1) { moveUD -= bob / Math.abs(bob); } else { moveUD -= bob; } if (Math.abs(moveUD) > 0.5) { moveUD *= 0.9; } SwimGuide(); jumpAnchor._rotation = -_rotation * (_xscale / 100); if (_root.testAll(centerX + 15, centerY + 25) && _root.testAll(centerX - 15, centerY + 25)) { while (_root.testAll(centerX, centerY + 15, false)) { --centerY; } while (!_root.testAll(centerX, centerY + 16, false)) { ++centerY; } _rotation = 0; InShellrotation = 0; _x = centerX; _y = centerY + spread; gotoAndStop('Idle'); } if (smokeN > 0) { --smokeN; } else { if (Math.abs(moveRL) > 2) { smokeN = 4; _root.waterSplash(centerX + -_xscale / 10 + moveRL, waterY + 10, _xscale + -moveRL * 5, 0); } } }; } frame 52 { waterY = centerY; while (_root.water.hitTest(centerX, waterY - 1, true)) { --waterY; } while (!_root.water.hitTest(centerX, waterY, true)) { ++waterY; } hitCharFunc = _root.standardHitCharStunJumpFunc; hitPwnFunc = _root.standardHitCharPwnFunc; rotateInAir(); jumpAnchor._rotation = -_rotation * (_xscale / 100); b = 60; InShell.stop(); onEnterFrame = function () { moveRL *= 0.95; bob = (centerY - waterY) / 20; if (Math.abs(bob) > 1) { moveUD -= bob / Math.abs(bob); } else { moveUD -= bob; } if (Math.abs(moveUD) > 0.5) { moveUD *= 0.9; } if (_root.testAll(centerX, centerY + 15, false) && centerY < waterY) { while (_root.testAll(centerX, centerY + 15, false)) { --centerY; } _rotation = 0; rotateInAir(); gotoAndStop('stunLand'); } else { if (Math.abs(spiderRotate) > 10) { spiderRotate -= (spiderRotate / Math.abs(spiderRotate)) * 0.5; } else { if (b > 0 || Math.abs(InShellrotation) > 1) { --b; if (InShellrotation > 180) { InShellrotation -= 360; } else { if (InShellrotation < -180) { InShellrotation += 360; } } spiderRotate += (-InShellrotation / 20 - spiderRotate) / 40; } else { gotoAndStop('Float'); } } } InShellrotation += spiderRotate; JumpGuide(); jumpAnchor._rotation = -_rotation * (_xscale / 100); if (smokeN > 0) { --smokeN; } else { if (Math.abs(moveRL) > 2) { smokeN = 4; _root.waterSplash(centerX + -_xscale / 10 + moveRL, waterY + 10, _xscale + -moveRL * 5, 0); } } }; } frame 60 { anchorX = _root.InteractLayer.chainplug._x; anchorY = _root.InteractLayer.chainplug._y; bobRot = -Math.atan2(anchorX - _x, 250 - Math.abs(anchorX - _x)) / 0.0174532925199433; bobX = _x; if (Math.abs(_x - anchorX) < 250) { bobX = anchorX + 250 * Math.sin(bobRot * 0.0174532925199433); while (bobX < _x) { ++bobRot; bobX = anchorX + 250 * Math.sin(bobRot * 0.0174532925199433); } while (bobX > _x) { --bobRot; bobX = anchorX + 250 * Math.sin(bobRot * 0.0174532925199433); } } delete hitCharFunc; moveUD = 0; moveRL = 0; bubbleScale = 0; bubbleN = 0; onEnterFrame = function () { flushDist = (anchorY - _y) * 2 - 100; if (flushDist < -120) { gotoAndStop('Stuck'); return false; } if (flushDist > 250) { flushDist = 250; } if (flushDist < 50) { flushDist = 50; } flushRot = (250 - flushDist) * (250 - flushDist) / 1500 + 6; if (moveUD < 6) { moveUD += 0.6; } moveRL = flushDist * Math.sin((bobRot - flushRot) * 0.0174532925199433) - flushDist * Math.sin(bobRot * 0.0174532925199433); bobRot -= flushRot; if (bubbleN > 0) { bubbleN -= Math.abs(moveRL / 2) + 1; bubbleScale += 2; } else { bubbleN = random(30) + 30; _root.spawnFlushBubble(_x + 30, _y - random(50), 40 + random(20), flushDist, bobRot + random(300), flushRot, anchorX, anchorY); bubbleScale = 0; } _x = anchorX + flushDist * Math.sin(bobRot * 0.0174532925199433); _y = _y + moveUD; }; } frame 66 { bobRot = random(20) - 10; _root.UberForeground.pipe.gotoAndPlay('flush'); onEnterFrame = function () { _x = _x + (anchorX - _x) / 1.5; InShell._rotation += (bobRot - InShell._rotation) / 5; if (!_root.water.hitTest(_x, _y - 30, true)) { InShell.nextFrame(); InShell.nextFrame(); } }; } } movieClip 11991 BLayerLevel8 { frame 1 { stop(); } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 30; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 53; FloatUp = 12; still = true; } } } movieClip 12046 { frame 1 { stop(); } frame 13 { gotoAndPlay('loop'); } frame 51 { gotoAndPlay('loop'); } } movieClip 12063 { frame 1 { stop(); } frame 27 { gotoAndPlay(2); } } movieClip 12066 { frame 1 { stop(); } frame 220 { _root.BLayer.gotoAndStop(2); _root.BLayer.JumpPad1.spring = 5; _root.BLayer.JumpPad1.springy = 4; _root.BLayer.JumpPad1.yspringy = 5.5; _root.BLayer.JumpPad1.onEnterFrame = _root.JumpPadReleasedEnterFrame; } frame 240 { _root.UberForeground.pipe.gotoAndStop(1); } frame 249 { _root.Char._y = _root.Char.anchorY + 30; _root.Char.LedgeIt(_root.tehwallz); } frame 251 { _root.tehground.gotoAndStop(2); _root.tehwallz.gotoAndStop(2); _root.SmoothScroll = -110; _root.UberForeground.flap.onEnterFrame = function () { if (this.hitTest(_root.Char._x, _root.Char._y - 20, true)) { if (this._alpha > 50) { this._alpha -= 2; } } else { if (this._alpha < 100) { this._alpha += 2; } } }; _root.InteractLayer.gotoAndStop(3); stop(); } } movieClip 12069 { } movieClip 12070 UberForegroundLevel8 { frame 1 { stop(); } } movieClip 12071 { } movieClip 12073 BackgroundBonus15BG1 { } movieClip 12075 BackgroundBonus15BG2 { } movieClip 12077 BackgroundBonus15BG3 { } movieClip 12079 tehwallzBonus15 { } movieClip 12081 tehgroundBonus15 { } movieClip 12083 tehplatformzBonus15 { } movieClip 12084 aPlatzBonus7 { instance of movieClip 10109 { onClipEvent (load) { accel = 1; maxSpeed = 25; centerOffset = 100; rotOffset = -90; falling = true; } } instance of movieClip 10109 { onClipEvent (load) { accel = 1; maxSpeed = 25; centerOffset = 100; rotOffset = -90; falling = true; } } instance of movieClip 10109 { onClipEvent (load) { accel = 1; maxSpeed = 25; centerOffset = 100; rotOffset = -90; falling = true; } } instance of movieClip 10109 { onClipEvent (load) { accel = 1; maxSpeed = 25; centerOffset = 100; rotOffset = -90; falling = true; } } } movieClip 12086 tehhangzBonus15 { } movieClip 12087 BLayerBonus15 { instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 30; FloatUp = 20; still = true; } } } movieClip 12089 ForegroundBonus15 { } movieClip 12090 InteractLayerBonus15 { instance Door0 of movieClip 10308 { onClipEvent (load) { quickDrop = true; vanish = true; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Level8', 'Door1', false, true); delete objectFunc; }; } } instance of movieClip 10443 { onClipEvent (load) { ID = 2; } } } movieClip 12092 UberForegroundBonus15 { } movieClip 12093 { } movieClip 12095 UberbackgroundTrans1 { } movieClip 12097 BackgroundTrans1BG1 { } movieClip 12099 BackgroundTrans1BG2 { } movieClip 12101 BackgroundTrans1BG3 { } movieClip 12103 BackgroundTrans1BG4 { } movieClip 12105 BackgroundTrans1BG5 { } movieClip 12107 tehwallzTrans1 { } movieClip 12109 tehgroundTrans1 { } movieClip 12111 ForegroundTrans1 { } movieClip 12112 InteractLayerTrans1 { frame 1 { stop(); } instance of movieClip 10440 { onClipEvent (load) { _alpha = 0; objectFunc = function (ex, ey, eRL, eUD, fromChar) { _root.popUpInGame(1, 'kingIntro', this, this); b = 120; popupNum = _root.InteractLayer.textBubble1.textBubble.textTween._currentframe + 4; _root.BLayer.Baddie100.gotoAndStop('Angry'); canWait = false; onEnterFrame = function () { if (canWait) { if (b > 0) { --b; } else { ++popupNum; canWait = false; _root.popUpInGame(1, popupNum, this, this); } } }; delete objectFunc; }; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Level8', 'Door0', false, false); delete objectFunc; }; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { _root.Char.gotoAndStop('Null'); _root.ChangeLevel('Level4', 'Door3', false, true); delete objectFunc; }; } } instance Door0 of movieClip 10308 { onClipEvent (load) { quickDrop = true; vanish = true; runningStart = true; } } instance Door1 of movieClip 10308 { onClipEvent (load) { quickDrop = true; } } instance of movieClip 10443 { onClipEvent (load) { ID = 0; } } } movieClip 12159 { } movieClip 12297 { frame 95 { _parent.gotoAndStop('Idle'); } } movieClip 12299 { instance of movieClip 6941 { onClipEvent (load) { _root.setHat(this, _parent._parent._parent.isWearing); } } } movieClip 12300 { } movieClip 12301 { frame 1 { if (ID == undefined) { ID = 100; _name = 'Baddie' + ID; swapDepths(ID); } ++_root.BaddieCount; health = 40; isWide = 35; _root.camX = _x; _root.CameraX = _root.camX; _root.camY = _y; _root.CameraY = _root.camY; _root.camFacing = -1; } frame 2 { stop(); } frame 3 { moveRL = 0; moveUD = 0; InShell._rotation = 0; stop(); } frame 4 { onEnterFrame = function () { if (!_root.Paused) { if (moveUD < 20) { ++moveUD; } if (coma > 0) { JumpGuide('land'); } else { JumpGuide('Idle'); } } }; play(); } frame 7 { stop(); } frame 12 { InShellrotation = 0; recenterPoints(); rotateInAir(); jumpAnchor._rotation = -_rotation * (_xscale / 100); coma = 160; onEnterFrame = function () { if (!_root.Paused) { if (downTime > 0) { --downTime; } rotateInAir(); ++moveUD; spiderRotate += ((moveRL * _xscale / 100) * 1.5 - spiderRotate) / 10; InShellrotation += spiderRotate; JumpGuide('land'); jumpAnchor._rotation = -_rotation * (_xscale / 100); if (_root.stageY * (100 / _root._yscale) - _y < _root.MinY - 700) { messagePopup('spiderGone'); removeMovieClip(this); } } }; stop(); } frame 13 { InShell.stop(); coma = 160; InShell._rotation = 0; smokeN = 0; hitCharFunc = _root.standardHitCharStunnedFunc; onEnterFrame = function () { if (!_root.Paused) { if (coma > 0) { --coma; comaStars._yscale = coma / 2 + 20; comaStars._xscale = comaStars._yscale; if (downTime > 0) { --downTime; } slopeStuff(); if (Math.abs(moveRL + rotAccel) < 40) { moveRL += rotAccel; } else { moveRL *= 40 / Math.abs(moveRL); } if (friction) { if (!sliding) { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } if (smokeN > 0) { --smokeN; } else { smokeN = 2; _root.inkSplat(_x + RLx(moveRL), _y + RLy(moveRL), moveRL * 4, _rotation); } } else { if (!sliding) { if (Math.abs(moveRL) > 1) { moveRL -= (moveRL / Math.abs(moveRL)) * 1; } else { moveRL = 0; } } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } if (smokeN > 0) { --smokeN; } else { smokeN = 5; i = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('smokeFX', 'smokeFX' + i, i, {'_x': this._x, '_y': this._y, '_rotation': this._rotation, '_xscale': Math.abs(moveRL) * 6, '_yscale': Math.abs(moveRL) * 6}); } } if (RLFunc() == 'Wall') { moveRL = -moveRL; } } else { gotoAndStop('Idle'); } } }; } frame 14 { recenterPoints(); _rotation = 0; InShell._rotation = 0; _root.spiderDie.setPan((_root.smoothTheX + _x) / 3.6 - 100); _root.spiderDie.start(); hitCharFunc = _root.standardHitCharDeadJumpFunc; ++_root.BaddiesStomped; ++_root.BaddiesStompedSession; _root.BaddiesStompedInFace += 4; onEnterFrame = function () { if (!_root.Paused) { if (downTime > 0) { --downTime; } _x = _x + moveRL; ++moveUD; _y = _y + moveUD; spiderRotate += ((moveRL * _xscale / 100) * 1.5 - spiderRotate) / 10; InShell._rotation += spiderRotate; if (_root.stageY * (100 / _root._yscale) - _y < _root.MinY - 700) { messagePopup('spiderGone'); if (combo > 1) { if (this.combo != (this.comboSome - 18) / 39) { while (!false) { } } _root.APISnailShellCombo(this.combo); removeMovieClip(this); } if (_root.spidersOut > 0) { --_root.spidersOut; } removeMovieClip(this); } } }; } frame 15 { onEnterFrame = function () { play(); }; } frame 33 { hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; gotoAndStop('Idle'); } } movieClip 12302 BLayerTrans1 { instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 40; FloatUp = 12; } } } movieClip 12304 UberForegroundTrans1 { } movieClip 12305 { } movieClip 12307 UberbackgroundTrans2 { } movieClip 12309 BackgroundTrans2BG1 { } movieClip 12311 BackgroundTrans2BG2 { } movieClip 12313 BackgroundTrans2BG3 { } movieClip 12315 BackgroundTrans2BG4 { } movieClip 12317 BackgroundTrans2BG5 { } movieClip 12319 tehwallzTrans2 { } movieClip 12321 tehgroundTrans2 { frame 1 { stop(); } } movieClip 12323 ForegroundTrans2 { } movieClip 12356 { frame 58 { gotoAndPlay(1); } } movieClip 12607 { } movieClip 12830 { } movieClip 12846 { } movieClip 12847 { frame 1 { onEnterFrame = function () { if (Math.abs(_root.CharQTP.hairRL) > Math.abs(_root.CharQTP.hairUD) || Math.abs(_root.CharQTP.hairUD) < 2) { if (Math.abs(_root.CharQTP.hairRL) < 4) { hairGoTo = 24; } else { if (_root.CharQPT._xscale * _root.CharQTP.hairRL > 0) { if (Math.abs(_root.CharQTP.hairRL) < 15) { hairGoTo = 13; } else { hairGoTo = 2; } } else { if (Math.abs(_root.CharQTP.hairRL) < 15) { hairGoTo = 35; } else { hairGoTo = 46; } } } } else { if (_root.CharQTP.hairUD > 0) { hairGoTo = 13; } else { hairGoTo = 35; } } if (_root.CharQTP.hairGel > hairGoTo) { --_root.CharQTP.hairGel; } if (_root.CharQTP.hairGel < hairGoTo) { ++_root.CharQTP.hairGel; } gotoAndStop(_root.CharQTP.hairGel); }; onEnterFrame(); } } movieClip 12859 { } movieClip 13103 { frame 1 { } } movieClip 13136 { } movieClip 13191 { } movieClip 13233 { frame 25 { gotoAndPlay(1); } } movieClip 13304 { frame 1 { } frame 12 { _root.BackgroundMusic.stop(); _root.playSound('QTPKick', _parent._x, 200); } } movieClip 13307 { } movieClip 13358 { } movieClip 13359 { } movieClip 13370 { } movieClip 13390 { } movieClip 13466 { frame 83 { gotoAndPlay('loop'); } } movieClip 13476 { } movieClip 13481 { } movieClip 13486 { } movieClip 13491 { } movieClip 13496 { } movieClip 13501 { } movieClip 13630 { } movieClip 13737 { } movieClip 13738 { frame 1 { _root.playSound('QTPIntroMob', _x, 100); onEnterFrame = function () { _x = _x - 5; _root.Camera2X = _x; _root.updateSound('QTPIntroMob', _x, 100); if (_x < 220) { _parent.nextFrame(); delete onEnterFrame; } }; stop(); } frame 2 { } frame 37 { onEnterFrame = function () { _x = _x + 5; if (_x < 400) { _root.Camera2X = _x; } _root.updateSound('QTPIntroMob', _x, 100); if (_x > 600) { _parent.nextFrame(); } }; stop(); } } movieClip 13743 { frame 1 { } frame 42 { _root.playSound('beardWimp', _x, 100); } frame 60 { } frame 170 { } frame 195 { _root.playSound('thwock', _x, 100); } frame 211 { _root.playSound('thwock', _x, 100); } frame 225 { _root.playSound('thwock', _x, 100); } frame 238 { _root.playSound('thwock', _x, 100); } frame 252 { _root.playSound('thwock', _x, 100); } frame 258 { _root.createEmptyMovieClip('CharQTP', _root.getNextHighestDepth()); _root.CharQTP.hairRL = 0; _root.CharQTP.hairUD = 0; _root.CharQTP.hairGel = 24; _root.CharQTP.hairGoTo = 24; _root.Camera2X = 300; _root.Camera2Y = -60; _root.playSound('QTPAlert', _x, 100); } frame 265 { onEnterFrame = function () { if (_root.Char.JumpIsDown()) { gotoAndPlay('diagSkip1'); delete onEnterFrame; } }; } frame 308 { onEnterFrame = function () { if (_root.Char.JumpIsDown()) { gotoAndPlay('diagSkip2'); delete onEnterFrame; } }; } frame 377 { _root.CharQTP.hairRL = -10; spring = 0; onEnterFrame = function () { spring += 0.05; if (_root.BackgroundVolume > 10) { _root.BackgroundVolume -= spring; } else { _root.BackgroundVolume = 10; } _root.BackgroundMusic.setVolume(_root.BackgroundVolume); }; } instance CharStartup of movieClip 13233 { onClipEvent (load) { _root.Camera2X = _x; onEnterFrame = function () { _x = _x - 5; _root.Camera2X = _x; if (_x < 50) { _parent.nextFrame(); } }; } } frame 439 { delete onEnterFrame; stop(); } frame 440 { _root.playSound('smashWind', CharStartup._x, 100); play(); } frame 446 { stop(); b = 39; onEnterFrame = function () { if (b > 0) { --b; } else { nextFrame(); b = 30; } }; _root.Camera2X = 100; } frame 447 { delete onEnterFrame; _root.CharQTP.hairRL = 0; _root.CharQTP.hairGel = 24; textBubble1._alpha = 100; textBubble1.textBubble.textTween.gotoAndStop('CaptainPwned'); textBubble1.textBubble.gotoAndStop(4); textBubble1.textBubble.gotoAndStop(2); textBubble1.textBubble.talky._alpha = 0; textBubble1.fromChar = CharStartup; _root.playSound('PageContinue', textBubble1._x, 100); textBubble1.onDone = function () { nextFrame(); }; _root.soundContainer.loadMusic('Trans1'); _root.BackgroundVolume = 0; _root.BackgroundMusic.setVolume(0); spring = 0; onEnterFrame = function () { spring += 0.025; if (_root.BackgroundVolume < 100) { _root.BackgroundVolume += spring; } else { _root.BackgroundVolume = 100; } _root.BackgroundMusic.setVolume(_root.BackgroundVolume); }; } frame 448 { delete onEnterFrame; stop(); } frame 449 { stop(); mob.gotoAndPlay(2); nextFrame(); delete onEnterFrame; } frame 451 { _root.CharQTP.removeMovieClip(); _root.scrollEngine = _root.CinScroll; _root.gameCamera = 'Cin'; _root.rightDist = 1000; _root.originalRightDist = 1000; _root.camFacing = -1; _root.Char.JumpFunc(0); _root.Char.Still = true; delete onEnterFrame; } frame 459 { _root.skipNext.gotoAndStop('next'); delete onEnterFrame; } } movieClip 13744 InteractLayerTrans2 { instance Door0 of movieClip 10308 { onClipEvent (load) { customEntrance = true; custom = function () { _root.startControls(); _root.Char._x = _x; gotoAndStop(2); }; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Level1', 'Door0'); delete objectFunc; }; } } instance of movieClip 10321 { onClipEvent (load) { ID = 1; } } } movieClip 13745 { } movieClip 13747 UberbackgroundLevel1 { } movieClip 13749 BackgroundLevel1BG1 { } movieClip 13751 BackgroundLevel1BG2 { } movieClip 13753 BackgroundLevel1BG3 { } movieClip 13755 BackgroundLevel1BG4 { } movieClip 13757 BackgroundLevel1BG5 { } movieClip 13759 surfaceLevel1 { } movieClip 13761 tehhangzLevel1 { } movieClip 13763 tehwallzLevel1 { } movieClip 13765 tehgroundLevel1 { } movieClip 13767 tehplatformzLevel1 { } movieClip 13769 ForegroundLevel1 { } movieClip 13771 UberForegroundLevel1 { } movieClip 13772 BLayerLevel1 { instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 35; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 40; tempstill = true; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 40; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 35; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 25; TimeSpring = 'A'; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 25; } } instance of movieClip 6933 { onClipEvent (load) { _xscale = -100; } } instance of movieClip 6933 { onClipEvent (load) { _xscale = -100; } } } movieClip 13777 { } movieClip 13786 { frame 17 { gotoAndPlay('loop'); } } movieClip 13787 { frame 1 { stop(); } } movieClip 13952 { frame 1 { _root.playSound('QTPIntroMob', _x, 100); onEnterFrame = function () { _x = _x + 5; _root.updateSound('QTPIntroMob', _x, 100); _root.Camera2X = _x + 50; }; } frame 76 { onEnterFrame = function () { _x = _x + 5; }; } frame 94 { bottle = _root.SpawnBaddies(_x - 40, _y - 135, 'Bottle', 100, -7, -7); bottle._rotation = 10; onEnterFrame = function () { _x = _x + 5; if (_root.CameraX > -150) { _root.CameraX -= 20; } _root.Camera2X = bottle._x; }; } frame 130 { _root.scrollEngine = _root.CharScroll; _root.gameCamera = 'CharScroll'; onEnterFrame = function () { if (_root.levelScale > 100) { _root.levelScale += (99 - _root.levelScale) / 30; } else { _root.levelScale = 100; delete onEnterFrame; } }; stop(); } } movieClip 13953 InteractLayerLevel1 { frame 1 { stop(); } instance of movieClip 10314 { onClipEvent (load) { ID = 1; thisMessageIdle = 'bookwormNPC'; thisMessageSuccess = 'bookwormNPCWin'; switchIt = true; cameraOn = this; camFacing = 1; } } instance Door0 of movieClip 10308 { onClipEvent (load) { vanish = true; custom = function () { this.b = 105; stop(); onEnterFrame = function () { if (this.b > 0) { --this.b; } else { play(); delete onEnterFrame; } }; _root.InteractLayer.onEnterFrame = function () { if (!_root.Paused) { this.gotoAndStop(2); delete this.onEnterFrame; } }; }; } } instance Door3 of movieClip 10308 { onClipEvent (load) { _xscale = -100; worm = 'Trans3'; quickDrop = true; vanish = true; runningStart = true; } } instance Door1 of movieClip 10438 { onClipEvent (load) { worm = 'Bonus18'; } } instance Door2 of movieClip 10308 { onClipEvent (load) { worm = 'Bonus14'; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Trans3', 'Door0', false, true); delete objectFunc; }; } } instance of movieClip 10443 { onClipEvent (load) { ID = 0; } } } movieClip 13954 { } movieClip 13956 UberbackgroundBonus18 { } movieClip 13958 BackgroundBonus18BG1 { } movieClip 13960 BackgroundBonus18BG2 { } movieClip 13962 BackgroundBonus18BG3 { } movieClip 13964 BackgroundBonus18BG4 { } movieClip 13966 BackgroundBonus18BG5 { } movieClip 13968 tehwallzBonus18 { } movieClip 13970 tehhangzBonus18 { } movieClip 13972 tehgroundBonus18 { } movieClip 13974 tehplatformzBonus18 { } movieClip 13976 ForegroundBonus18 { } movieClip 13977 BLayerBonus18 { frame 1 { stop(); } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 35; FloatUp = 10; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 30; FloatUp = 6; launchAngle = 60; } } } movieClip 14083 { frame 1 { _name = 'object' + _root.objectCount; thisID = _root.objectCount; ++_root.objectCount; stop(); } frame 106 { stop(); } } movieClip 14144 { frame 1 { _name = 'object' + _root.objectCount; thisID = _root.objectCount; ++_root.objectCount; stop(); } frame 106 { stop(); } } movieClip 14145 { frame 1 { _name = 'object' + _root.objectCount; thisID = _root.objectCount; ++_root.objectCount; } } movieClip 14146 InteractLayerBonus18 { instance of movieClip 14083 { onClipEvent (load) { objectFunc = function () { temp = Math.floor((_root.Char._x - (_x - 20)) / 4) + 1; if (temp > 22) { gotoAndPlay(23); _root.frameTimer = _root.TimeTrialFrameTimer; delete objectFunc; } else { if (temp > 1) { gotoAndStop(temp); } else { gotoAndStop(2); } } }; } } instance of movieClip 14144 { onClipEvent (load) { objectFunc = function () { temp = Math.floor((_root.Char._x - (_x - 20)) / 4) + 1; if (temp > 22) { gotoAndPlay(23); _root.TimeTrialWin(); delete objectFunc; } else { if (temp > 1) { gotoAndStop(temp); } else { gotoAndStop(2); } } }; } } instance Door0 of movieClip 10308 { onClipEvent (load) { } } instance of movieClip 14145 { onClipEvent (load) { objectFunc = function (ex, ey, eRL, eUD, fromChar) { _root.HurtPants(0, fromChar); _root.Char.gotoAndStop('FrontSlam'); _root.Char._x = _root.currentCheckPoint._x; _root.Char._y = _root.currentCheckPoint._y - 200; _root.CharYPoint = _root.Char._y; _root.Char._xscale = 100; _root.Char._rotation = 0; _root.Char.moveRL = 0; _root.Char.moveUD = -5; _root.Char.Still = true; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.currentCheckPoint = this; delete objectFunc; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.currentCheckPoint = this; delete objectFunc; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.currentCheckPoint = this; delete objectFunc; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.currentCheckPoint = this; delete objectFunc; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.currentCheckPoint = this; delete objectFunc; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.currentCheckPoint = this; delete objectFunc; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.currentCheckPoint = this; delete objectFunc; }; } } } movieClip 14148 UberForegroundBonus18 { } movieClip 14149 { } movieClip 14151 UberbackgroundBonus14 { } movieClip 14153 BackgroundBonus14BG1 { } movieClip 14155 BackgroundBonus14BG2 { } movieClip 14157 BackgroundBonus14BG4 { } movieClip 14159 { } movieClip 14161 tehwallzBonus14 { } movieClip 14163 tehgroundBonus14 { } movieClip 14164 tehplatformzBonus14 { } movieClip 14165 aPlatzBonus14 { frame 1 { stop(); } instance of movieClip 10109 { onClipEvent (load) { Status = 'Loop'; moveRL = 0; moveUD = 5; startX = 765; startY = -150; loopX = 765; loopY = 850; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Loop'; moveRL = 0; moveUD = 5; startX = 765; startY = -150; loopX = 765; loopY = 850; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Loop'; moveRL = 0; moveUD = 5; startX = 765; startY = -150; loopX = 765; loopY = 850; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Loop'; moveRL = 0; moveUD = 5; startX = 765; startY = -150; loopX = 765; loopY = 850; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Loop'; moveRL = 0; moveUD = -7; startX = 765; startY = 1000; loopX = 765; loopY = 200; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Loop'; moveRL = 0; moveUD = -7; startX = 765; startY = 1000; loopX = 765; loopY = 200; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Loop'; moveRL = 0; moveUD = -7; startX = 765; startY = 1000; loopX = 765; loopY = 200; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Loop'; moveRL = 0; moveUD = -7; startX = 765; startY = 1000; loopX = 765; loopY = 200; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Loop'; moveRL = 0; moveUD = 5; startX = 765; startY = -150; loopX = 765; loopY = 850; } } } movieClip 14167 ForegroundBonus14 { } movieClip 14168 InteractLayerBonus14 { instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.currentCheckPoint = this; delete objectFunc; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.currentCheckPoint = this; delete objectFunc; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.currentCheckPoint = this; delete objectFunc; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; _xscale = -100; objectFunc = function () { _root.currentCheckPoint = this; delete objectFunc; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function (ex, ey, eRL, eUD, fromChar) { _root.HurtPants(10, fromChar); _root.Char.gotoAndStop('FrontSlam'); _root.Char._x = _root.currentCheckPoint._x; _root.Char._y = _root.currentCheckPoint._y - 20; _root.CharYPoint = _root.Char._y; _root.Char._xscale = (_root.currentCheckPoint._xscale / Math.abs(_root.currentCheckPoint._xscale)) * 100; _root.Char._rotation = 0; _root.Char.FloatUp = 10; _root.Char.moveRL = 0; _root.Char.moveUD = -15; _root.Char.Still = true; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function (ex, ey, eRL, eUD, fromChar) { _root.HurtPants(10, fromChar); _root.Char.gotoAndStop('FrontSlam'); _root.Char._x = _root.currentCheckPoint._x; _root.Char._y = _root.currentCheckPoint._y - 20; _root.CharYPoint = _root.Char._y; _root.Char._xscale = (_root.currentCheckPoint._xscale / Math.abs(_root.currentCheckPoint._xscale)) * 100; _root.Char._rotation = 0; _root.Char.FloatUp = 10; _root.Char.moveRL = 0; _root.Char.moveUD = -15; _root.Char.Still = true; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function (ex, ey, eRL, eUD, fromChar) { _root.HurtPants(10, fromChar); _root.Char.gotoAndStop('FrontSlam'); _root.Char._x = _root.currentCheckPoint._x; _root.Char._y = _root.currentCheckPoint._y - 20; _root.CharYPoint = _root.Char._y; _root.Char._xscale = (_root.currentCheckPoint._xscale / Math.abs(_root.currentCheckPoint._xscale)) * 100; _root.Char._rotation = 0; _root.Char.FloatUp = 10; _root.Char.moveRL = 0; _root.Char.moveUD = -15; _root.Char.Still = true; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.currentCheckPoint = this; delete objectFunc; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function (ex, ey, eRL, eUD, fromChar) { _root.HurtPants(10, fromChar); _root.Char.gotoAndStop('FrontSlam'); _root.Char._x = _root.currentCheckPoint._x; _root.Char._y = _root.currentCheckPoint._y - 20; _root.CharYPoint = _root.Char._y; _root.Char._xscale = (_root.currentCheckPoint._xscale / Math.abs(_root.currentCheckPoint._xscale)) * 100; _root.Char._rotation = 0; _root.Char.FloatUp = 10; _root.Char.moveRL = 0; _root.Char.moveUD = -15; _root.Char.Still = true; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function (ex, ey, eRL, eUD, fromChar) { _root.HurtPants(10, fromChar); _root.Char.gotoAndStop('FrontSlam'); _root.Char._x = _root.currentCheckPoint._x; _root.Char._y = _root.currentCheckPoint._y - 20; _root.CharYPoint = _root.Char._y; _root.Char._xscale = (_root.currentCheckPoint._xscale / Math.abs(_root.currentCheckPoint._xscale)) * 100; _root.Char._rotation = 0; _root.Char.FloatUp = 10; _root.Char.moveRL = 0; _root.Char.moveUD = -15; _root.Char.Still = true; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function (ex, ey, eRL, eUD, fromChar) { _root.HurtPants(10, fromChar); _root.Char.gotoAndStop('FrontSlam'); _root.Char._x = _root.currentCheckPoint._x; _root.Char._y = _root.currentCheckPoint._y - 20; _root.CharYPoint = _root.Char._y; _root.Char._xscale = (_root.currentCheckPoint._xscale / Math.abs(_root.currentCheckPoint._xscale)) * 100; _root.Char._rotation = 0; _root.Char.FloatUp = 10; _root.Char.moveRL = 0; _root.Char.moveUD = -15; _root.Char.Still = true; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function (ex, ey, eRL, eUD, fromChar) { _root.HurtPants(10, fromChar); _root.Char.gotoAndStop('FrontSlam'); _root.Char._x = _root.currentCheckPoint._x; _root.Char._y = _root.currentCheckPoint._y - 20; _root.CharYPoint = _root.Char._y; _root.Char._xscale = (_root.currentCheckPoint._xscale / Math.abs(_root.currentCheckPoint._xscale)) * 100; _root.Char._rotation = 0; _root.Char.FloatUp = 10; _root.Char.moveRL = 0; _root.Char.moveUD = -15; _root.Char.Still = true; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function (ex, ey, eRL, eUD, fromChar) { _root.HurtPants(10, fromChar); _root.Char.gotoAndStop('FrontSlam'); _root.Char._x = _root.currentCheckPoint._x; _root.Char._y = _root.currentCheckPoint._y - 20; _root.CharYPoint = _root.Char._y; _root.Char._xscale = (_root.currentCheckPoint._xscale / Math.abs(_root.currentCheckPoint._xscale)) * 100; _root.Char._rotation = 0; _root.Char.FloatUp = 10; _root.Char.moveRL = 0; _root.Char.moveUD = -15; _root.Char.Still = true; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.currentCheckPoint = this; delete objectFunc; }; } } instance Door0 of movieClip 10308 { onClipEvent (load) { } } instance Door1 of movieClip 10308 { onClipEvent (load) { _xscale = -100; } } instance of movieClip 10443 { onClipEvent (load) { ID = 1; } } } movieClip 14169 BLayerBonus14 { frame 1 { stop(); } instance JumpPad2 of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 20; FloatUp = 6; tempstill = true; } } instance JumpPad2 of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 50; FloatUp = 9; } } } movieClip 14171 UberForegroundBonus14 { } movieClip 14172 { } movieClip 14174 UberbackgroundTrans3 { } movieClip 14176 BackgroundTrans3BG1 { } movieClip 14178 BackgroundTrans3BG2 { } movieClip 14180 BackgroundTrans3BG3 { } movieClip 14182 BackgroundTrans3BG4 { } movieClip 14184 BackgroundTrans3BG5 { } movieClip 14186 tehwallzTrans3 { } movieClip 14188 tehhangzTrans3 { } movieClip 14190 tehgroundTrans3 { } movieClip 14192 tehplatformzTrans3 { } movieClip 14194 ForegroundTrans3 { } movieClip 14195 InteractLayerTrans3 { frame 1 { stop(); } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { _root.Char.gotoAndStop('Null'); _root.ChangeLevel('Level1', 'Door3', false, true); delete objectFunc; }; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { _root.Char.gotoAndStop('Null'); _root.ChangeLevel('Level9', 'Door0', false, true); delete objectFunc; }; } } instance Door0 of movieClip 10308 { onClipEvent (load) { quickDrop = true; vanish = true; runningStart = true; } } instance Door1 of movieClip 10308 { onClipEvent (load) { quickDrop = true; _xscale = 100; } } instance of movieClip 10443 { onClipEvent (load) { ID = 2; } } instance of movieClip 10321 { onClipEvent (load) { ID = 2; } } } movieClip 14196 BLayerTrans3 { } movieClip 14198 UberForegroundTrans3 { } movieClip 14199 { } movieClip 14202 UberbackgroundLevel9 { } movieClip 14204 BackgroundLevel9BG1 { } movieClip 14208 BackgroundLevel9BG2 { } movieClip 14213 BackgroundLevel9BG3 { } movieClip 14215 BackgroundLevel9BG4 { } movieClip 14217 BackgroundLevel9BG5 { } movieClip 14218 waterLevel9 { } movieClip 14220 tehwallzLevel9 { frame 1 { stop(); } } movieClip 14222 tehgroundLevel9 { } movieClip 14224 tehplatformzLevel9 { } movieClip 14227 { } movieClip 14229 ForegroundLevel9 { } movieClip 14232 { } movieClip 14234 UberForegroundLevel9 { } movieClip 14235 BLayerLevel9 { instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 40; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 30; } } instance of movieClip 9488 Frog { onClipEvent (load) { _xscale = -100; } } instance of movieClip 9488 Frog { onClipEvent (load) { _xscale = -100; } } instance of movieClip 9488 Frog { onClipEvent (load) { _xscale = -100; } } instance of movieClip 9488 Frog { onClipEvent (load) { _xscale = -100; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 25; TimeSpring = 'A'; } } } movieClip 14236 { frame 1 { _root.UberForeground.attachMovie('FancyGolfTeeSmoke', 'FancyGolfTeeSmoke', _root.UberForeground.getNextHighestDepth(), {'_x': _x, '_y': _y}); } } movieClip 14240 { } movieClip 14241 { frame 1 { stop(); } } movieClip 14242 { } movieClip 14243 InteractLayerLevel9 { instance of movieClip 10314 { onClipEvent (load) { ID = 1; thisMessageIdle = 'squirrelNPC'; thisMessageSuccess = 'squirrelNPCWin'; switchIt = true; cameraOn = this; camFacing = 1; } } instance of movieClip 10314 { onClipEvent (load) { ID = 1; thisMessageIdle = 1; thisMessageSuccess = 6; switchIt = true; cameraOn = _root.InteractLayer.NPC; camFacing = 1; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { _root.Char.gotoAndStop('Null'); _root.ChangeLevel('Trans4', 'Door0', false, true); delete objectFunc; }; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { _root.Char.gotoAndStop('Null'); _root.ChangeLevel('Trans4', 'Door1', false, true); delete objectFunc; }; } } instance Door0 of movieClip 10308 { onClipEvent (load) { vanish = true; } } instance Door2 of movieClip 10308 { onClipEvent (load) { vanish = true; quickDrop = true; _xscale = -100; runningStart = true; } } instance Door3 of movieClip 10308 { onClipEvent (load) { vanish = true; quickDrop = true; _xscale = -100; runningStart = true; } } instance Door1 of movieClip 10438 { onClipEvent (load) { worm = 'Bonus17'; wormDoor = 'Door0'; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Bonus19', 'Door0', false, false); delete objectFunc; }; } } instance Door4 of movieClip 10308 { onClipEvent (load) { vanish = true; quickDrop = true; } } instance of movieClip 10443 { onClipEvent (load) { ID = 0; } } instance of movieClip 10443 { onClipEvent (load) { ID = 1; } } } movieClip 14244 { } movieClip 14246 UberbackgroundBonus17 { } movieClip 14248 BackgroundBonus17BG1 { } movieClip 14250 BackgroundBonus17BG2 { } movieClip 14252 BackgroundBonus17BG3 { } movieClip 14254 BackgroundBonus17BG4 { } movieClip 14256 tehwallzBonus17 { } movieClip 14258 tehgroundBonus17 { } movieClip 14260 tehplatformzBonus17 { } movieClip 14261 aPlatzBonus17 { frame 1 { stop(); } instance of movieClip 10109 { onClipEvent (load) { Status = 'Bumper'; thrust = 30; spring = 10; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Wall'; doubleSided = true; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Bumper'; thrust = 30; spring = 10; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Wall'; doubleSided = true; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Wall'; doubleSided = true; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Wall'; doubleSided = true; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Wall'; doubleSided = true; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Wall'; doubleSided = true; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Wall'; doubleSided = true; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Wall'; doubleSided = true; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Wall'; doubleSided = true; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Wall'; doubleSided = true; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Wall'; doubleSided = true; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Wall'; doubleSided = true; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Bumper'; thrust = 35; spring = 10; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Wall'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Wall'; doubleSided = true; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 10; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Wall'; } } } movieClip 14263 ForegroundBonus17 { } movieClip 14264 BLayerBonus17 { frame 1 { stop(); } instance of movieClip 7986 { onClipEvent (load) { isCarrying = 'balloon'; stayAway = true; insomnia = true; } } instance of movieClip 7986 { onClipEvent (load) { isCarrying = 'balloon'; stayAway = true; insomnia = true; } } instance of movieClip 7986 { onClipEvent (load) { isCarrying = 'balloon'; stayAway = true; insomnia = true; } } instance of movieClip 7986 { onClipEvent (load) { isCarrying = 'balloon'; stayAway = true; insomnia = true; } } instance of movieClip 7986 { onClipEvent (load) { isCarrying = 'balloon'; stayAway = true; insomnia = true; } } instance of movieClip 7986 { onClipEvent (load) { isCarrying = 'balloon'; stayAway = true; insomnia = true; } } instance of movieClip 7986 { onClipEvent (load) { isCarrying = 'balloon'; stayAway = true; insomnia = true; } } instance of movieClip 7986 { onClipEvent (load) { isCarrying = 'balloon'; stayAway = true; insomnia = true; } } instance of movieClip 7986 { onClipEvent (load) { isCarrying = 'balloon'; stayAway = true; insomnia = true; } } instance of movieClip 7986 { onClipEvent (load) { isCarrying = 'balloon'; stayAway = true; insomnia = true; } } instance of movieClip 7986 { onClipEvent (load) { isCarrying = 'balloon'; stayAway = true; insomnia = true; } } instance JumpPad2 of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 40; FloatUp = 12; tempstill = true; } } instance of movieClip 6612 Snail { onClipEvent (load) { InstaKill = true; } } instance JumpPad2 of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 50; FloatUp = 9; } } } movieClip 14265 InteractLayerBonus17 { instance Door0 of movieClip 10308 { onClipEvent (load) { } } } movieClip 14266 { } movieClip 14268 UberbackgroundTrans4 { } movieClip 14270 BackgroundTrans4BG1 { } movieClip 14274 BackgroundTrans4BG2 { } movieClip 14279 BackgroundTrans4BG3 { } movieClip 14281 BackgroundTrans4BG4 { } movieClip 14283 BackgroundTrans4BG5 { } movieClip 14285 tehwallzTrans4 { } movieClip 14287 tehplatformzTrans4 { } movieClip 14288 aPlatzTrans4 { instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } } movieClip 14290 tehgroundTrans4 { } movieClip 14291 waterTrans4 { } movieClip 14293 ForegroundTrans4 { } movieClip 14294 InteractLayerTrans4 { frame 1 { stop(); } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { _root.Char.gotoAndStop('Null'); _root.ChangeLevel('Level9', 'Door3', false, true); delete objectFunc; }; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { _root.Char.gotoAndStop('Null'); _root.ChangeLevel('Level11', 'Door0', false, true); delete objectFunc; }; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { _root.Char.gotoAndStop('Null'); _root.ChangeLevel('Level9', 'Door2', false, true); delete objectFunc; }; } } instance Door0 of movieClip 10308 { onClipEvent (load) { quickDrop = true; vanish = true; runningStart = true; } } instance Door1 of movieClip 10308 { onClipEvent (load) { quickDrop = true; vanish = true; runningStart = true; } } instance of movieClip 10443 { onClipEvent (load) { ID = 2; } } instance of movieClip 10321 { onClipEvent (load) { ID = 3; } } } movieClip 14296 { } movieClip 14298 UberForegroundTrans4 { } movieClip 14299 { } movieClip 14301 UberbackgroundLevel11 { } movieClip 14303 BackgroundLevel11BG1 { } movieClip 14305 BackgroundLevel11BG2 { } movieClip 14307 BackgroundLevel11BG3 { } movieClip 14309 BackgroundLevel11BG4 { } movieClip 14311 BackgroundLevel11BG5 { } movieClip 14313 waterLevel11 { } movieClip 14315 tehwallzLevel11 { frame 1 { stop(); } } movieClip 14317 tehgroundLevel11 { } movieClip 14319 tehplatformzLevel11 { } movieClip 14320 aPlatzLevel11 { instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } } movieClip 14322 ForegroundLevel11 { } movieClip 14325 { } movieClip 14326 UberForegroundLevel11 { } movieClip 14328 { } movieClip 14403 { frame 2 { _root.castlesArray[_parent.castleN] = true; ++_root['challengeScore' + _root.nestedBonusLevel]; _root.APITrackEvent('ChallengeLevel11', _root.challengeScoreLevel11); } frame 29 { if (_root['challengeScore' + _root.nestedBonusLevel] >= _root['challengeGoal' + _root.nestedBonusLevel]) { _root.playSound('success'); } var gNHD = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('notifyPopup', 'notifyPopup' + gNHD, gNHD, {'_x': _parent._x + 40, '_y': _parent._y - 30, 'smoke': _root['challengeScore' + _root.nestedBonusLevel] + ' / 10!', 'b': 0}); } frame 56 { var tempX = Math.floor((_root.MaxX + _parent._x) / 2880); var tempY = Math.floor((_root.MaxY + _parent._y) / 1920); var temp = tempY + tempX * _root.FGtilesY; _parent._x += _root.MaxX - tempX * 2880; _parent._y += _root.MaxY + (random(4) - 2) - tempY * 1920; _root['levelBitmap' + temp].draw(_parent, _parent.transform.matrix); _root.removeBaddie(_parent.ID, true); } } movieClip 14450 { frame 52 { var tempX = Math.floor((_root.MaxX + _x) / 2880); var tempY = Math.floor((_root.MaxY + _y) / 1920); var temp = tempY + tempX * _root.FGtilesY; _parent._x += _root.MaxX - tempX * 2880; _parent._y += _root.MaxY + (random(4) - 2) - tempY * 1920; _root['levelBitmap' + temp].draw(_parent, _parent.transform.matrix); _root.removeBaddie(_parent.ID, true); } } movieClip 14451 { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID + 805); } ++_root.BaddieCount; castleN = _root.CastleCount; ++_root.CastleCount; if (_root.castlesArray[castleN]) { gotoAndStop('spent'); } else { _root.baddieSetupFunc(this); bouncy = false; Thrust = 13; bounceThreshDefault = 14; bounceDefault = 0.5; groundLandProtect = -1; spread = 15; ItIs = 'Castle'; Status = 'Stupid'; if (isWearing == undefined) { isWearing = 'nothing'; } health = 40; isWide = 35; comaMax = 80; worth = 1; attackStrength = 20; canZoom = true; recenterPoints(); jabSound = 'Thud'; slashSound = 'Thud'; hitCharFunc = _root.castleHitCharFunc; hitPwnFunc = _root.castleHitPwnFunc; getAttacked = _root.standardGetAttacked; gotoAndStop('Idle'); } } frame 3 { stop(); } frame 8 { } frame 12 { } frame 19 { InShell.gotoAndPlay('finished'); } frame 25 { onEnterFrame = function () { if (Math.abs(moveRL) > 1) { moveRL -= (moveRL / Math.abs(moveRL)) * 1; } else { moveRL = 0; } moveRL *= 0.98; RLFunc(); }; } } movieClip 14452 BLayerLevel11 { instance of movieClip 9302 { onClipEvent (load) { _xscale = -100; } } instance of movieClip 9302 { onClipEvent (load) { _xscale = -100; } } instance of movieClip 9302 { onClipEvent (load) { _xscale = -100; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 35; still = true; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 25; launchAngle = -20; FloatUp = 10; TimeSpring = 'A'; } } } movieClip 14465 { } movieClip 14478 { } movieClip 14479 InteractLayerLevel11 { instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Trans5', 'Door0', false, true); delete objectFunc; }; } } instance of movieClip 10314 { onClipEvent (load) { ID = 1; thisMessageIdle = 'bum1NPC'; thisMessageSuccess = 'bum1NPCWin'; switchIt = true; cameraOn = this; camFacing = 1; } } instance of movieClip 10314 { onClipEvent (load) { ID = 2; thisMessageIdle = 'bum2NPC'; thisMessageSuccess = 'bum2NPCWin'; switchIt = true; cameraOn = this; camFacing = -1; } } instance Door2 of movieClip 10308 { onClipEvent (load) { vanish = true; quickDrop = true; _xscale = -100; runningStart = true; } } instance Door1 of movieClip 10308 { onClipEvent (load) { vanish = true; quickDrop = true; _xscale = -100; } } instance Door0 of movieClip 10308 { onClipEvent (load) { vanish = true; } } instance of movieClip 10443 { onClipEvent (load) { ID = 0; } } instance of movieClip 10443 { onClipEvent (load) { ID = 1; } } } movieClip 14480 { instance of movieClip 14317 tehgroundLevel11 { } } movieClip 14481 UberBackgroundTrans5 { } movieClip 14483 BackgroundTrans5BG1 { } movieClip 14485 BackgroundTrans5BG2 { } movieClip 14487 BackgroundTrans5BG3 { } movieClip 14489 BackgroundTrans5BG4 { } movieClip 14491 BackgroundTrans5BG5 { } movieClip 14493 tehwallzTrans5 { } movieClip 14495 tehgroundTrans5 { } movieClip 14496 aPlatzTrans5 { instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Crumble'; } } } movieClip 14497 tehplatformzTrans5 { } movieClip 14499 ForegroundTrans5 { } movieClip 14501 UberForegroundTrans5 { } movieClip 14502 InteractLayerTrans5 { instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { _root.Char.gotoAndStop('Null'); _root.ChangeLevel('Level11', 'Door2', false, true); delete objectFunc; }; } } instance Door1 of movieClip 10308 { onClipEvent (load) { vanish = true; quickDrop = true; _xscale = -100; runningStart = true; } } instance Door0 of movieClip 10308 { onClipEvent (load) { vanish = true; quickDrop = true; runningStart = true; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { _root.Char.gotoAndStop('Null'); _root.ChangeLevel('Trans6', 'Door0'); delete objectFunc; }; } } instance of movieClip 10321 { onClipEvent (load) { ID = 4; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { _root.Char.gotoAndStop('Null'); _root.ChangeLevel('Level14', 'Door0'); delete objectFunc; }; } } instance of movieClip 10443 { onClipEvent (load) { ID = 2; } } } movieClip 14503 { instance of movieClip 14495 tehgroundTrans5 { } } movieClip 14505 UberbackgroundLevel14 { } movieClip 14507 BackgroundLevel14BG1 { } movieClip 14509 BackgroundLevel14BG2 { } movieClip 14511 BackgroundLevel14BG3 { } movieClip 14513 tehwallzLevel14 { } movieClip 14515 tehgroundLevel14 { } movieClip 14516 aPlatzLevel14 { instance of movieClip 10109 { onClipEvent (load) { Status = 'Geyser'; accelRL = 0.25; maxRL = 5; anchorDist = 50; spring = 15; moveRot = 1; trackRot = -90; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Geyser'; accelRL = 0.25; maxRL = 5; anchorDist = 50; spring = 20; moveRot = 0.5; trackRot = -90; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Geyser'; accelRL = 0.25; maxRL = 5; anchorDist = 50; spring = 12; moveRot = 1.5; trackRot = 90; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Seesaw'; spring = 500; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Seesaw'; spring = 100; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Seesaw'; spring = 100; } } } movieClip 14517 tehplatformzLevel14 { } movieClip 14519 ForegroundLevel14 { } movieClip 14521 UberForegroundLevel14 { } movieClip 14525 { } movieClip 14536 { } movieClip 14537 { frame 17 { stop(); } } movieClip 14547 { } movieClip 14548 { frame 45 { stop(); } } movieClip 14549 { frame 1 { stop(); } } movieClip 14550 InteractLayerLevel14 { instance of movieClip 10314 { onClipEvent (load) { ID = 1; thisMessageIdle = 'goatNPC'; thisMessageSuccess = 'goatNPCWin'; switchIt = true; cameraDist = 600; camFacing = -1; cameraOn = _parent.NPC; } } instance Door1 of movieClip 10438 { onClipEvent (load) { worm = 'Bonus24'; } } instance Door0 of movieClip 10308 { onClipEvent (load) { quickDrop = true; vanish = true; runningStart = true; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { _root.Char.gotoAndStop('Null'); _root.ChangeLevel('Trans5', 'Door1', false, true); delete objectFunc; }; } } } movieClip 14551 { instance of movieClip 14515 tehgroundLevel14 { } } movieClip 14553 UberbackgroundBonus24 { } movieClip 14555 BackgroundBonus24BG1 { } movieClip 14557 BackgroundBonus24BG2 { } movieClip 14559 BackgroundBonus24BG3 { } movieClip 14561 tehwallzBonus24 { } movieClip 14563 tehgroundBonus24 { } movieClip 14564 aPlatzBonus24 { instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 20; decay = 0.9; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 20; decay = 0.9; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 20; decay = 0.9; } } } movieClip 14566 tehplatformzBonus24 { } movieClip 14568 ForegroundBonus24 { } movieClip 14570 UberForegroundBonus24 { } movieClip 14571 InteractLayerBonus24 { frame 1 { stop(); } instance Door0 of movieClip 10438 { onClipEvent (load) { } } instance of movieClip 10440 { onClipEvent (load) { _alpha = 0; objectFunc = function (ex, ey, eRL, eUD, fromChar) { _parent.gotoAndStop(2); }; } } instance of movieClip 10440 { onClipEvent (load) { _alpha = 0; objectFunc = function (ex, ey, eRL, eUD, fromChar) { _parent.gotoAndStop(1); }; } } instance of movieClip 14144 { onClipEvent (load) { objectFunc = function () { temp = Math.floor((_root.Char._x - (_x - 20)) / 4) + 1; if (temp > 22) { gotoAndPlay(23); _root.TimeTrialWin(); delete objectFunc; } else { if (temp > 1) { gotoAndStop(temp); } else { gotoAndStop(2); } } }; } } instance of movieClip 14083 { onClipEvent (load) { objectFunc = function () { temp = Math.floor((_root.Char._x - (_x - 20)) / 4) + 1; if (temp > 22) { gotoAndPlay(23); _root.frameTimer = _root.TimeTrialFrameTimer; delete objectFunc; } else { if (temp > 1) { gotoAndStop(temp); } else { gotoAndStop(2); } } }; } } } movieClip 14572 { instance of movieClip 14563 tehgroundBonus24 { } } movieClip 14574 UberbackgroundLevel10 { } movieClip 14576 waterLevel10 { } movieClip 14578 BackgroundLevel10BG1 { } movieClip 14580 BackgroundLevel10BG2 { } movieClip 14582 BackgroundLevel10BG3 { } movieClip 14584 BackgroundLevel10BG4 { } movieClip 14586 BackgroundLevel10BG5 { } movieClip 14588 surfaceLevel10 { } movieClip 14591 tehwallzLevel10 { frame 1 { stop(); } } movieClip 14593 tehgroundLevel10 { } movieClip 14595 tehplatformzLevel10 { } movieClip 14597 ForegroundLevel10 { } movieClip 14600 { } movieClip 14601 UberForegroundLevel10 { } movieClip 14639 { frame 1 { } frame 46 { stop(); } } movieClip 14675 { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID + 805); } ++_root.BaddieCount; ItIs = 'wall'; health = 1000; isWide = 80; spread = 100; worth = 0; downTime = 0; centerX = _x; centerY = _y - 15; damage = 0; moveRL = 0; moveUD = 0; getAttacked = function (ex, ey, hitPower, eRot, eType, fromChar) { if (substring(eType, 1, 3) == 'jab') { downTime = 5; gotoAndPlay(damage * 11 + 2); ++damage; onEnterFrame = function () { if (downTime > 0) { --downTime; } else { delete onEnterFrame; } }; return 'slice'; } else { return false; } }; stop(); } frame 12 { stop(); } frame 23 { stop(); } frame 34 { stop(); } frame 45 { stop(); } frame 56 { getAttacked = function (ex, ey, hitPower, eRot, eType, fromChar) { if (substring(eType, 1, 3) == 'jab') { downTime = 5; isWide = 0; health = 0; onEnterFrame = function () { if (downTime > 0) { --downTime; } else { delete onEnterFrame; } }; gotoAndPlay('collapse'); return 'slice'; } else { return false; } }; stop(); } frame 57 { getAttacked = function () { return false; }; health = 0; _root.tehwallz.gotoAndStop(2); } frame 91 { stop(); } } movieClip 14721 { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID + 805); } ++_root.BaddieCount; _root.tehwallz.attachMovie('wallBlock', 'wallBlock' + ID, _root.tehwallz.getNextHighestDepth(), {'_x': _x, '_y': _y, '_xscale': 80}); ItIs = 'wall'; health = 100; isWide = 40; worth = 0; downTime = 0; centerX = _x; centerY = _y - 20; damage = 0; tempFrame = 0; getAttacked = function (ex, ey, hitPower, eRot, eType, fromChar) { if (health - hitPower > 0) { onEnterFrame = function () { if (b > 0) { --b; _x = centerX + moveRL; moveRL *= -1; } else { _x = centerX; tempFrame += (100 - health - tempFrame) / 2; _root.messagePopup(tempFrame); if (_currentframe < Math.floor(tempFrame / 2.22) + 1) { nextFrame(); } } if (downTime > 0) { --downTime; } }; escale = eRot * 2; health -= hitPower; moveRL = 5; _x = _x + moveRL; moveRL *= -1; } else { gotoAndPlay('collapse'); delete onEnterFrame; delete getAttacked; } if (eType == 'airPwn') { fromChar.airPwning = true; fromChar.accelUD = 1; fromChar.moveRL = (ex - this._x) / 6; fromChar.moveUD = -10; fromChar.FloatUp = 0; return 'slice'; } else { if (substring(eType, 1, 3) == 'jab') { downTime = 3; b = 3; return 'slice'; } else { downTime = 10; b = 5; _root.playSound('baseballHit', ex, 20 + hitPower * 2); return 'deflect'; } } }; stop(); } frame 46 { getAttacked = function () { return false; }; _xscale = escale; onEnterFrame = function () { nextFrame(); }; removeMovieClip(_root.tehwallz['wallBlock' + ID]); } frame 77 { delete onEnterFrame; stop(); } } movieClip 14722 BLayerLevel10 { instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 35; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 40; } } instance of movieClip 7712 Spider { onClipEvent (load) { isWearing = 'goblet'; } } instance of movieClip 7712 Spider { onClipEvent (load) { isWearing = 'goblet'; } } instance of movieClip 7712 Spider { onClipEvent (load) { isWearing = 'goblet'; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 42; FloatUp = 6; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 18; TimeSpring = 'A'; } } instance of movieClip 7712 Spider { onClipEvent (load) { isWearing = 'goblet'; } } } movieClip 14728 { } movieClip 14737 { } movieClip 14738 { frame 1 { stop(); } } movieClip 14739 InteractLayerLevel10 { instance of movieClip 10314 { onClipEvent (load) { ID = 1; thisMessageIdle = 'hermitcrabNPC'; thisMessageSuccess = 'hermitcrabNPCWin'; switchIt = true; cameraOn = this; camFacing = 0; } } instance Door0 of movieClip 10308 { onClipEvent (load) { worm = 'Trans7'; wormDoor = 'Door3'; } } instance Door2 of movieClip 10308 { onClipEvent (load) { worm = 'Bonus9'; } } instance Door3 of movieClip 10308 { onClipEvent (load) { worm = 'Trans7'; wormDoor = 'Door3'; } } instance Door1 of movieClip 10438 { onClipEvent (load) { worm = 'Bonus22'; } } instance of movieClip 10443 { onClipEvent (load) { ID = 2; } } } movieClip 14740 { } movieClip 14742 BackgroundBonus22BG2 { } movieClip 14744 tehwallzBonus22 { } movieClip 14746 tehgroundBonus22 { } movieClip 14748 tehplatformzBonus22 { } movieClip 14750 ForegroundBonus22 { } movieClip 14754 { } movieClip 14756 { } movieClip 14757 { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID + 805); } ++_root.BaddieCount; ItIs = 'Bat'; Status = 'Stupid'; if (isWearing == undefined) { isWearing = 'nothing'; } health = 0; isWide = 35; comaMax = 80; worth = 1; attackStrength = 20; hasBeenGrabbed = false; canZoom = true; originX = _x; originY = _y; bounceThresh = 10; bounceDefault = 0.6; jabSound = 'BadSlash'; slashSound = 'BadSlash'; originalColor = random(9); _root.ColorEmPants(originalColor, this); getAttacked = _root.standardGetAttacked; _root.baddieSetupFunc(this); } frame 2 { onEnterFrame = function () { if (Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600 || Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600) { if (_root.tehhangz.hitTest(_x + moveRL, _y + moveUD + 6, true)) { while (!_root.tehhangz.hitTest(_x, _y + 2, true)) { _y = _y + 1; } while (_root.tehhangz.hitTest(_x, _y, true)) { _y = _y - 1; } nextFrame(); } else { nextFrame(); } } }; stop(); } frame 3 { InShell._rotation = 0; hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = _root.standardHitCharPwnFunc; onEnterFrame = function () { if (_root.Paused) { Spider.stop(); } else { Spider.play(); if (!(Math.abs(_x - _root.Char._x) < 800 && Math.abs(_y - _root.Char._y) < 600) && !(Math.abs(_x - _root.CharQTP._x) < 800 && Math.abs(_y - _root.CharQTP._y) < 600)) { prevFrame(); } if (this.circling) { this.rotOffset += this.accel; this._x = this.anchorX + this.anchorDist * Math.sin(this.rotOffset * 0.0174532925199433); this._y = this.anchorY + -this.anchorDist * Math.cos(this.rotOffset * 0.0174532925199433); ELayer['aPlatzSmoke' + this.ID]._x = this._x; ELayer['aPlatzSmoke' + this.ID]._y = this._y; } else { if (this.moving) { if (this.absoluteRL < this.centerOffset) { this.moveRL += this.accel; } if (this.absoluteRL > this.centerOffset) { this.moveRL -= this.accel; } if (Math.abs(this.moveRL) > this.maxSpeed) { this.smokeRLUD = this.maxSpeed * (this.moveRL / Math.abs(this.moveRL)); } else { this.smokeRLUD = this.moveRL; } this.absoluteRL += this.smokeRLUD; this._x = this.originX + this.absoluteRL * Math.sin(this.rotOffset * 0.0174532925199433); this._y = this.originY - this.absoluteRL * Math.cos(this.rotOffset * 0.0174532925199433); } } } }; stop(); } frame 4 { onEnterFrame = function () { if (!_root.Paused) { if (moveUD < 20) { ++moveUD; } JumpGuide('Idle'); } }; play(); } frame 7 { stop(); } frame 11 { this.onEnterFrame = function () { this._x += this.shakeRL / 2; this.shakeRL = -this.shakeRL; if (this.b > 0) { --this.b; } else { if (this.health > 0) { this.coma = this.comaMax; if (this.moveUD == 0) { this.gotoAndStop('stunLand'); } else { this.gotoAndStop('stunjump'); } } else { this.gotoAndStop('deadjump'); } } }; } frame 12 { recenterPoints(); rotateInAir(); InShellrotation = 0; onEnterFrame = function () { if (!_root.Paused) { if (downTime > 0) { --downTime; } rotateInAir(); ++moveUD; spiderRotate += ((moveRL * _xscale / 100) * 1.5 - spiderRotate) / 10; InShellrotation += spiderRotate; JumpGuide('land'); if (_root.stageY * (100 / _root._yscale) - _y < _root.MinY - 700) { messagePopup('spiderGone'); removeMovieClip(this); } } }; stop(); } frame 13 { InShell.stop(); coma = 160; InShell._rotation = 0; cooldown = 0; smokeN = 0; onEnterFrame = function () { if (!_root.Paused) { if (coma > 0) { --coma; comaStars._yscale = coma / 2 + 20; comaStars._xscale = comaStars._yscale; slopeStuff(); if (Math.abs(moveRL + rotAccel) < 40) { moveRL += rotAccel; } else { moveRL *= 40 / Math.abs(moveRL); } if (friction) { if (!sliding) { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } if (smokeN > 0) { --smokeN; } else { smokeN = 2; _root.inkSplat(_x + RLx(moveRL), _y + RLy(moveRL), moveRL * 4, _rotation); } } else { if (!sliding) { if (Math.abs(moveRL) > 1) { moveRL -= (moveRL / Math.abs(moveRL)) * 1; } else { moveRL = 0; } } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; } else { moveRL = 0; } } if (smokeN > 0) { --smokeN; } else { smokeN = 5; i = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('smokeFX', 'smokeFX' + i, i, {'_x': this._x, '_y': this._y, '_rotation': this._rotation, '_xscale': Math.abs(moveRL) * 6, '_yscale': Math.abs(moveRL) * 6}); } } if (RLFunc() == 'Wall') { _xscale = -_xscale; moveRL = -moveRL; } if (downTime > 0) { --downTime; } else { if (_root.Char.hitTest(centerX - _root.Char.moveRL, centerY - _root.Char.moveUD, true)) { combo = 1; comboSome = 57; ex = _root.Char.moveRL - moveRL; ey = _root.Char.moveUD - moveUD; _root.playSound('Thud', _x, Math.sqrt(ex * ex + ey * ey) * 10); downTime = 7; if (_root.Char._currentframe == 7) { moveRL = (_x - _root.Char._x) / 10 + _root.Char.moveRL; moveUD = -Math.abs(_root.Char.moveUD) * 2; _root.movePerformed('landstompspider'); } else { if (_root.Char._x > _x) { if (_root.Char._currentframe == 31) { moveRL = (10 + Math.abs(_root.Char.moveRL)) * Math.cos((_root.Char._rotation - 100) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.Char.moveRL)) * Math.sin((_root.Char._rotation - 100) * 0.0174532925199433); _root.movePerformed('slidespider'); } else { moveRL = (10 + Math.abs(_root.Char.moveRL)) * Math.cos((_root.Char._rotation - 120) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.Char.moveRL)) * Math.sin((_root.Char._rotation - 120) * 0.0174532925199433); if (_root.Char._currentframe < 7 && _root.Char._xscale * (centerX - _root.Char._x) > 0) { _root.Char.JumpFunc(4); _root.movePerformed('kickspider'); _root.Char.gotoAndStop('Kick'); spiderRotate = moveRL * _xscale / 10; } else { _root.movePerformed('tapspider'); } } } else { if (_root.Char._currentframe == 31) { moveRL = (10 + Math.abs(_root.Char.moveRL)) * Math.cos((_root.Char._rotation - 80) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.Char.moveRL)) * Math.sin((_root.Char._rotation - 80) * 0.0174532925199433); _root.movePerformed('slidespider'); } else { moveRL = (10 + Math.abs(_root.Char.moveRL)) * Math.cos((_root.Char._rotation - 60) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.Char.moveRL)) * Math.sin((_root.Char._rotation - 60) * 0.0174532925199433); if (_root.Char._currentframe < 7 && _root.Char._xscale * (centerX - _root.Char._x) > 0) { _root.Char.JumpFunc(4); _root.movePerformed('kickspider'); _root.Char.gotoAndStop('Kick'); spiderRotate = moveRL * _xscale / 10; } else { _root.movePerformed('tapspider'); } } } } InShell.stop(); gotoAndStop('deadjump'); } else { if (_root.CharQTP.hitTest(centerX - _root.CharQTP.moveRL, centerY - _root.CharQTP.moveUD, true)) { combo = 1; comboSome = 57; ex = _root.CharQTP.moveRL - moveRL; ey = _root.CharQTP.moveUD - moveUD; _root.playSound('Thud', _x, Math.sqrt(ex * ex + ey * ey) * 10); downTime = 7; if (_root.CharQTP._currentframe == 7) { moveRL = (_x - _root.CharQTP._x) / 10 + _root.CharQTP.moveRL; moveUD = -Math.abs(_root.CharQTP.moveUD) * 2; } else { if (_root.CharQTP._x > _x) { if (_root.CharQTP._currentframe == 31) { moveRL = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.cos((_root.CharQTP._rotation - 100) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.sin((_root.CharQTP._rotation - 100) * 0.0174532925199433); } else { moveRL = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.cos((_root.CharQTP._rotation - 120) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.sin((_root.CharQTP._rotation - 120) * 0.0174532925199433); if (_root.CharQTP._currentframe < 7 && _root.CharQTP._xscale * (centerX - _root.CharQTP._x) > 0) { _root.CharQTP.JumpFunc(4); _root.CharQTP.gotoAndStop('Kick'); spiderRotate = moveRL * _xscale / 10; } } } else { if (_root.CharQTP._currentframe == 31) { moveRL = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.cos((_root.CharQTP._rotation - 80) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.sin((_root.CharQTP._rotation - 80) * 0.0174532925199433); } else { moveRL = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.cos((_root.CharQTP._rotation - 60) * 0.0174532925199433); moveUD = (10 + Math.abs(_root.CharQTP.moveRL)) * Math.sin((_root.CharQTP._rotation - 60) * 0.0174532925199433); if (_root.CharQTP._currentframe < 7 && _root.CharQTP._xscale * (centerX - _root.CharQTP._x) > 0) { _root.CharQTP.JumpFunc(4); _root.CharQTP.gotoAndStop('Kick'); spiderRotate = moveRL * _xscale / 10; } } } } InShell.stop(); gotoAndStop('deadjump'); } else { if (this.WraptoGround(true, false, true, 'baddie') == 'Fall') { messagePopup('floatin!'); _rotation = 0; _y = _y - 10; gotoAndStop('die'); } } } } } else { gotoAndStop('Idle'); } } }; } frame 14 { recenterPoints(); _rotation = 0; InShell._rotation = 0; _root.playSound('BatDie', _x, 100); hitCharFunc = _root.standardHitCharDeadJumpFunc; ++_root.BaddiesStomped; ++_root.BaddiesStompedSession; _root.BaddiesStompedInFace += 4; facing = _xscale / 100; spring = 20; onEnterFrame = function () { if (!_root.Paused) { _x = _x + moveRL; moveUD -= 0.5; moveRL *= 0.95; moveUD *= 0.9; _y = _y + moveUD; spring += (100 - _yscale) / 5; spring *= 0.95; _yscale = _yscale + spring; _xscale = (100 - _yscale + 100) * facing; spiderRotate += ((moveRL * _xscale / 100) * 1.5 - spiderRotate) / 10; InShell._rotation += spiderRotate; if (_root.stageY * (100 / _root._yscale) - _y < _root.MinY - 700) { messagePopup('spiderGone'); if (combo > 1) { if (this.combo != (this.comboSome - 18) / 39) { while (!false) { } } _root.APISnailShellCombo(this.combo); removeMovieClip(this); } if (_root.spidersOut > 0) { --_root.spidersOut; } removeMovieClip(this); } } }; } frame 15 { onEnterFrame = function () { play(); }; } frame 33 { gotoAndStop('Idle'); } } movieClip 14758 BLayerBonus22 { frame 1 { stop(); } instance JumpPad2 of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 40; FloatUp = 12; tempstill = true; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 40; FloatUp = 12; tempstill = true; } } instance of movieClip 6612 Snail { onClipEvent (load) { InstaKill = true; } } instance of movieClip 7986 { onClipEvent (load) { insomnia = true; stayAway = true; } } instance of movieClip 7986 { onClipEvent (load) { insomnia = true; stayAway = true; } } instance of movieClip 7986 { onClipEvent (load) { insomnia = true; stayAway = true; } } instance of movieClip 7986 { onClipEvent (load) { insomnia = true; stayAway = true; } } instance of movieClip 7986 { onClipEvent (load) { insomnia = true; stayAway = true; } } } movieClip 14759 InteractLayerBonus22 { instance Door0 of movieClip 10308 { onClipEvent (load) { } } instance Door1 of movieClip 10308 { onClipEvent (load) { _xscale = -100; } } } movieClip 14760 { } movieClip 14762 BackgroundBonus9BG1 { } movieClip 14764 tehwallzBonus9 { } movieClip 14766 ForegroundBonus9 { } movieClip 14771 UberForegroundBonus9 { frame 1 { stop(); } } movieClip 14772 { frame 1 { _name = 'object' + _root.objectCount; thisID = _root.objectCount; ++_root.objectCount; _root.CameraX = _x; _root.CameraY = _y + 150; } frame 2 { if (_root.CharHasWeapon == 'nothing') { objectFunc = function (ex, ey, eRL, eUD, fromChar) { _root.slideLoop.stop(); _root.rollLoop.stop(); gotoAndStop(3); fromChar.SnapTo = this; fromChar.gotoAndStop('playCin'); delete objectFunc; }; stop(); } else { _root.InteractLayer.Door0.checkBox.gotoAndStop(2); _root.UberForeground.gotoAndStop(3); gotoAndStop(3); } } } movieClip 14773 InteractLayerBonus9 { instance of movieClip 10314 { onClipEvent (load) { if (_root.CharHasWeapon == 'nothing') { ID = 1; thisMessageSuccess = 'closetIntro'; thisMessageIdle = 'closetIntro'; } else { ID = 2; thisMessageSuccess = 'closetGot'; thisMessageIdle = 'closetGot'; } switchIt = true; cameraOn = _parent.trophy; camFacing = -1; maxZoomedIn = 0.5; } } } movieClip 14774 { } movieClip 14776 waterTrans7 { } movieClip 14778 UberbackgroundTrans7 { } movieClip 14780 BackgroundTrans7BG1 { } movieClip 14783 { } movieClip 14785 { } movieClip 14786 BackgroundTrans7BG2 { } movieClip 14788 BackgroundTrans7BG3 { } movieClip 14790 surfaceTrans7 { } movieClip 14792 tehwallzTrans7 { } movieClip 14794 tehplatformzTrans7 { } movieClip 14796 tehgroundTrans7 { } movieClip 14798 ForegroundTrans7 { } movieClip 14799 BLayerBonus6 { instance of movieClip 8566 elitePirate { onClipEvent (load) { _xscale = -100; } } instance Cannon of movieClip 10135 { onClipEvent (load) { spawnerType = 'set'; spawnLevelStart = 3; spawnLevelAdvance = 0.5; thisSpawnerArray = ['Spider', 'Spider', 'Duck', 'Spider', 'Spider', 'elitePirate']; } } } movieClip 14800 InteractLayerTrans7 { instance Door0 of movieClip 10308 { onClipEvent (load) { vanish = true; } } instance Door1 of movieClip 10308 { onClipEvent (load) { worm = 'Level10'; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Trans8', 'Door0'); delete objectFunc; }; } } instance Door2 of movieClip 10308 { onClipEvent (load) { customEntrance = true; custom = function () { _root.Char._x = _x; _root.Char._xscale = -100; _root.Char.moveRL = -6; _root.Char.JumpFunc(14); _root.Char.FloatUp = 12; _root.Char.Still = true; gotoAndStop(2); }; } } instance Door3 of movieClip 10308 { onClipEvent (load) { vanish = true; } } instance of movieClip 10443 { onClipEvent (load) { ID = 1; } } } movieClip 14803 { } movieClip 14805 UberForegroundTrans7 { } movieClip 14806 { } movieClip 14808 UberbackgroundTrans6 { } movieClip 14810 BackgroundTrans6BG1 { } movieClip 14813 BackgroundTrans6BG2 { } movieClip 14816 { } movieClip 14817 BackgroundTrans6BG3 { } movieClip 14820 BackgroundTrans6BG4 { } movieClip 14823 BackgroundTrans6BG5 { } movieClip 14825 waterTrans6 { } movieClip 14828 ForegroundTrans6 { } movieClip 14830 { } movieClip 14831 UberForegroundTrans6 { } movieClip 14833 tehwallzTrans6 { } movieClip 14835 tehplatformzTrans6 { } movieClip 14837 surfaceTrans6 { } movieClip 14839 tehgroundTrans6 { } movieClip 14840 InteractLayerTrans6 { instance Door0 of movieClip 10308 { onClipEvent (load) { vanish = true; } } instance Door1 of movieClip 10308 { onClipEvent (load) { worm = 'Trans7'; } } instance of movieClip 10443 { onClipEvent (load) { ID = 0; } } } movieClip 14842 { } movieClip 14844 BackgroundTrans8BG1 { } movieClip 14846 tehwallzTrans8 { frame 1 { stop(); } } movieClip 14848 ForegroundTrans8 { } movieClip 14853 { } movieClip 14868 { frame 31 { _root.removeBaddie(_parent.ID, true); } } movieClip 14873 { } movieClip 14874 { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID); } ++_root.BaddieCount; centerX = _x; centerY = _y - 100; moveRL = 0; moveUD = 0; downTime = 0; ItIs = 'Pile'; Status = 'Stupid'; health = 1; spread = 100; isWide = 100; worth = 1; hasBeenGrabbed = false; _xscale = -100; attackStrength = 5; isWearing = 'nothing'; jabSound = 'Thud'; slashSound = 'baseballHit'; } frame 3 { onEnterFrame = function () { if (downTime > 0) { --downTime; } }; moveUD = 0; moveRL = 0; stop(); hitCharFunc = _root.standardHitCharStompFunc; hitPwnFunc = function (ex, ey, eRL, superPwn, fromChar) { var v2 = this._x - ex; fromChar.moveRL = -(v2 / Math.abs(v2)) * 10; fromChar.rollRL *= 0.5; this.moveRL = eRL * 0.5; this.gotoAndStop('Idle'); return false; }; getAttacked = function (ex, ey, hitPower, eRot, eType, fromChar) { this.recenterPoints(); this._rotation = 0; this._x = this.centerX; this._y = this.centerY + this.spread; delete this.onEnterFrame; if (eType == 'airPwn') { health = 0; fromChar.airPwning = true; fromChar.accelUD += 0.25; fromChar.moveRL = (ex - this._x) / 3; fromChar.moveUD = -10; fromChar.FloatUp = 10; this.moveRL = -fromChar.moveRL; this.moveUD = -15; this.shakeRL = hitPower; this.downTime = 20; this.b = 1; this.rotter = ((this._x - ex) / Math.abs(this._x - ex)) * 40; this.spring = -20; _root.playSound(this.slashSound, this._x, 100); } else { if (substring(eType, 1, 3) == 'jab') { if (hitPower > 16) { health = 0; shakeRL = 2; this.downTime = 5; this.moveRL = hitPower * fromChar._xscale / 200; this.moveUD = -hitPower * 0.25; this.shakeRL = fromChar._xscale / 5; this.b = 2; } else { this.downTime = 1; this.moveRL = hitPower * fromChar._xscale / 200; this.moveUD = -hitPower * 0.8; this.shakeRL = fromChar._xscale / 5; this.b = 4; } this.rotter = 0; this.spring = 20; _root.playSound(this.jabSound, this._x, 100); } else { health = 0; _root.playSound(this.slashSound, this._x, 100); this.moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 0.9; this.moveUD = -Math.abs(hitPower) * Math.cos(eRot * 0.0174532925199433) - 6; this.rotter = this.moveRL * 4; this.shakeRL = 40; this.downTime = 10; this.b = 2; this.spring = 20; } } this._x += this.shakeRL / 2; this.shakeRL = -this.shakeRL; this.gotoAndStop('Hit'); delete this.hitCharFunc; delete this.hitPwnFunc; if (hitPower > 16) { return 'deflect'; } else { return 'slice'; } }; } frame 4 { onEnterFrame = function () { if (!_root.Paused) { if (moveUD < 20) { ++moveUD; } if (coma > 0) { JumpGuide('land'); } else { JumpGuide('Idle'); } } }; play(); } frame 7 { stop(); } frame 11 { onEnterFrame = _root.baddieHitEnterFrame; } frame 12 { gotoAndStop('Idle'); delete onEnterFrame; } frame 13 { delete onEnterFrame; gotoAndStop('Idle'); } frame 14 { _root.tehwallz.gotoAndStop(2); _root.InteractLayer.gotoAndStop(2); delete onEnterFrame; _root.InteractLayer.textBubble1.textBubble.nextFrame(); } frame 15 { onEnterFrame = function () { play(); }; } frame 33 { delete onEnterFrame; gotoAndStop('Idle'); } } movieClip 14875 BLayerTrans8 { instance JumpPad0 of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 45; FloatUp = 20; } } } movieClip 14876 InteractLayerTrans8 { frame 1 { stop(); } instance Door1 of movieClip 10308 { onClipEvent (load) { worm = 'Level6'; } } instance Door0 of movieClip 10308 { onClipEvent (load) { quickDrop = true; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Trans7', 'Door2', false, true); delete objectFunc; }; } } instance of movieClip 10314 { onClipEvent (load) { ID = 1; if (_root.CharHasWeapon == 'nothing') { thisMessageSuccess = 'baddiePile'; thisMessageIdle = 'baddiePile'; } else { thisMessageSuccess = 'baddiePileEnd'; thisMessageIdle = 'baddiePileEnd'; } switchIt = true; cameraOn = this; camFacing = 0; maxZoomedIn = 1; maxZoomedOut = 1; } } } movieClip 14877 { } movieClip 14879 UberbackgroundLevel6 { } movieClip 14881 BackgroundLevel6BG1 { } movieClip 14883 BackgroundLevel6BG2 { } movieClip 14885 BackgroundLevel6BG3 { } movieClip 14887 tehwallzLevel6 { frame 1 { stop(); } } movieClip 14888 tehhangzLevel6 { } movieClip 14890 tehgroundLevel6 { } movieClip 14892 tehplatformzLevel6 { } movieClip 14893 aPlatzLevel6 { instance of movieClip 10109 { onClipEvent (load) { centerOffset = 400; rotOffset = 45; Status = 'Swinging'; } } instance of movieClip 10109 { onClipEvent (load) { debug = true; centerOffset = 400; rotOffset = 60; Status = 'Swinging'; } } instance of movieClip 10109 { onClipEvent (load) { centerOffset = 300; rotOffset = 60; Status = 'Swinging'; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 15; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 15; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Springy'; spring = 10; decay = 0.95; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Springy'; spring = 10; decay = 0.95; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 15; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Springy'; spring = 10; decay = 0.95; color = 14177792; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Springy'; spring = 10; decay = 0.95; color = 14177792; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Springy'; spring = 15; decay = 0.95; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Springy'; spring = 25; decay = 0.95; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Springy'; spring = 10; decay = 0.95; color = 14177792; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Springy'; spring = 20; decay = 0.95; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Springy'; spring = 10; decay = 0.95; color = 9730260; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Springy'; spring = 10; decay = 0.95; color = 9730260; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Springy'; spring = 10; decay = 0.95; color = 9730260; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Springy'; spring = 15; decay = 0.95; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Springy'; spring = 10; decay = 0.95; } } } movieClip 14895 ForegroundLevel6 { } movieClip 14896 BLayerLevel6 { frame 1 { stop(); } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 30; FloatUp = 6; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 18; launchAngle = 20; FloatUp = 0; TimeSpring = 'A'; } } instance of movieClip 7413 Ninja { onClipEvent (load) { debug = true; } } } movieClip 14899 { } movieClip 14902 { } movieClip 14905 { } movieClip 14906 { frame 1 { if (_root.challengeScoreBonus7 > _root.challengeGoalBonus7) { disco1.gotoAndStop(1); } else { disco1.gotoAndStop(2); } if (_root.challengeScoreBonus11 > _root.challengeGoalBonus11) { disco2.gotoAndStop(1); } else { disco2.gotoAndStop(2); } if (_root.challengeScoreBonus12 > _root.challengeGoalBonus12) { disco3.gotoAndStop(1); } else { disco3.gotoAndStop(2); } } } movieClip 14913 { } movieClip 14915 InteractLayerLevel6 { frame 1 { if (_root.challengeScoreBonus5 && _root.challengeScoreBonus6 && _root.challengeScoreBonus8) { gotoAndStop(2); } else { gotoAndStop(1); } } instance Door1 of movieClip 10308 { onClipEvent (load) { if (_root.DoorIt == 'Door8') { gotoAndStop('ghostDoor'); } worm = 'Bonus5'; } } instance Door4 of movieClip 10308 { onClipEvent (load) { if (_root.DoorIt == 'Door8') { gotoAndStop('ghostDoor'); } worm = 'Bonus7'; } } instance Door7 of movieClip 10438 { onClipEvent (load) { if (_root.DoorIt == 'Door8') { gotoAndStop('ghostDoor'); } worm = 'Bonus10'; hideSign = true; } } instance Door0 of movieClip 10308 { onClipEvent (load) { vanish = true; } } instance Door2 of movieClip 10308 { onClipEvent (load) { if (_root.DoorIt == 'Door8') { gotoAndStop('ghostDoor'); } worm = 'Bonus6'; } } instance Door3 of movieClip 10308 { onClipEvent (load) { worm = 'Bonus8'; debug = true; } } instance Door5 of movieClip 10308 { onClipEvent (load) { worm = 'Bonus11'; } } instance Door6 of movieClip 10308 { onClipEvent (load) { if (_root.DoorIt == 'Door8') { gotoAndStop('ghostDoor'); } worm = 'Bonus12'; } } instance Door8 of movieClip 10308 { onClipEvent (load) { quickDrop = true; _xscale = -100; custom = function () { _parent.gotoAndStop(3); _root.BLayer.gotoAndStop(2); _root.tehwallz.gotoAndStop(2); }; } } instance of movieClip 10443 { onClipEvent (load) { ID = 1; } } instance of movieClip 10443 { onClipEvent (load) { ID = 0; } } instance baddieBadge of movieClip 14913 { onClipEvent (load) { if (_root.challengeScoreBonus5) { gotoAndStop(4); } else { gotoAndStop(1); } } } instance of movieClip 14913 { onClipEvent (load) { if (_root.challengeScoreBonus6) { gotoAndStop(5); } else { gotoAndStop(2); } } } instance of movieClip 14913 { onClipEvent (load) { if (_root.challengeScoreBonus8) { gotoAndStop(6); } else { gotoAndStop(3); } } } instance Door9 of movieClip 10308 { onClipEvent (load) { worm = 'Trans9'; } } instance Door9 of movieClip 10308 { onClipEvent (load) { worm = 'Level18'; wormDoor = 'Door1'; } } } movieClip 14916 { } movieClip 14918 BackgroundBonus10BG1 { } movieClip 14922 { } movieClip 14925 { } movieClip 14928 { } movieClip 14929 { frame 1 { if (_root.challengeScoreBonus7 > _root.challengeGoalBonus7) { disco1.gotoAndStop(1); } else { disco1.gotoAndStop(2); } if (_root.challengeScoreBonus11 > _root.challengeGoalBonus11) { disco2.gotoAndStop(1); } else { disco2.gotoAndStop(2); } if (_root.challengeScoreBonus12 > _root.challengeGoalBonus12) { disco3.gotoAndStop(1); } else { disco3.gotoAndStop(2); } } } movieClip 14930 BackgroundBonus10BG2 { } movieClip 14932 tehwallzBonus10 { } movieClip 14933 tehhangzBonus7 { } movieClip 14935 ForegroundBonus10 { } movieClip 14943 { } movieClip 14947 { } movieClip 14951 { } movieClip 14955 { } movieClip 14960 { } movieClip 14966 { } movieClip 14980 { } movieClip 14985 { } movieClip 14992 { } movieClip 14999 { } movieClip 15039 { } movieClip 15047 { } movieClip 15064 { } movieClip 15071 { } movieClip 15101 { } movieClip 15108 { } movieClip 15133 { } movieClip 15146 { } movieClip 15169 { } movieClip 15190 { } movieClip 15191 InteractLayerBonus10 { frame 1 { if (_root.challengeScoreBonus7 > _root.challengeGoalBonus7 && _root.challengeScoreBonus11 > _root.challengeGoalBonus11 && _root.challengeScoreBonus12 > _root.challengeGoalBonus12) { _root.challengeScoreBonus10 = 1; _root.APITrackEvent('ChallengeBonus10', 1); gotoAndStop(2); } else { stop(); } } instance Door0 of movieClip 10308 { onClipEvent (load) { allBaddiesBadge = true; } } instance of movieClip 10314 { onClipEvent (load) { ID = 1; if (_root.challengeScoreBonus7 > _root.challengeGoalBonus7 && _root.challengeScoreBonus11 > _root.challengeGoalBonus11 && _root.challengeScoreBonus12 > _root.challengeGoalBonus12) { thisMessageSuccess = 'discoNPCsDisco'; thisMessageIdle = 'discoNPCsDisco'; } else { thisMessageSuccess = 'discoNPCsSad'; thisMessageIdle = 'discoNPCsSad'; } switchIt = true; cameraDist = 600; camFacing = 0; cameraOn = this; } } } movieClip 15195 { } movieClip 15196 UberForegroundBonus10 { frame 1 { if (_root.challengeScoreBonus7 > _root.challengeGoalBonus7 && _root.challengeScoreBonus11 > _root.challengeGoalBonus11 && _root.challengeScoreBonus12 > _root.challengeGoalBonus12) { gotoAndPlay('disco'); } else { stop(); } } frame 101 { gotoAndPlay('disco'); } } movieClip 15197 BLayerBonus10 { } movieClip 15198 { } movieClip 15200 BackgroundBonus5BG1 { } movieClip 15202 BackgroundBonus5BG2 { } movieClip 15204 BackgroundBonus5BG3 { } movieClip 15206 tehwallzBonus5 { } movieClip 15208 surfaceBonus4 { } movieClip 15210 tehplatformzBonus5 { } movieClip 15212 ForegroundBonus5 { } movieClip 15213 BLayerBonus5 { instance of movieClip 7544 Parrot { onClipEvent (load) { _xscale = -100; } } } movieClip 15214 InteractLayerBonus5 { } movieClip 15215 { } movieClip 15217 BackgroundBonus6BG1 { } movieClip 15219 BackgroundBonus6BG2 { } movieClip 15221 BackgroundBonus6BG3 { } movieClip 15223 tehgroundBonus6 { } movieClip 15225 tehwallzBonus6 { } movieClip 15227 tehplatformzBonus6 { } movieClip 15229 ForegroundBonus6 { } movieClip 15230 InteractLayerBonus6 { instance Door0 of movieClip 10308 { onClipEvent (load) { allBaddiesBadge = true; } } } movieClip 15231 { } movieClip 15233 BackgroundBonus8BG1 { } movieClip 15235 BackgroundBonus8BG2 { } movieClip 15237 BackgroundBonus8BG3 { } movieClip 15239 ForegroundBonus8 { } movieClip 15241 tehwallzBonus8 { } movieClip 15243 tehgroundBonus8 { } movieClip 15244 tehplatformzBonus8 { } movieClip 15245 BLayerBonus8 { instance of movieClip 7413 Ninja { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7413 Ninja { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7413 Ninja { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7413 Ninja { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7712 Spider { onClipEvent (load) { isWearing = 'pirate'; _xscale = -100; } } instance of movieClip 7712 Spider { onClipEvent (load) { isWearing = 'pirate'; _xscale = -100; } } instance of movieClip 7712 Spider { onClipEvent (load) { isWearing = 'pirate'; _xscale = -100; } } instance of movieClip 7712 Spider { onClipEvent (load) { isWearing = 'pirate'; _xscale = -100; } } instance of movieClip 7413 Ninja { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7413 Ninja { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7413 Ninja { onClipEvent (load) { _xscale = -100; } } } movieClip 15246 InteractLayerBonus8 { instance Door0 of movieClip 10308 { onClipEvent (load) { allBaddiesBadge = true; } } } movieClip 15247 { } movieClip 15249 BackgroundBonus7BG1 { } movieClip 15251 BackgroundBonus7BG2 { } movieClip 15253 BackgroundBonus7BG3 { } movieClip 15255 tehwallzBonus7 { } movieClip 15257 tehgroundBonus7 { frame 1 { v; } } movieClip 15258 tehplatformzBonus7 { } movieClip 15260 ForegroundBonus7 { } movieClip 15261 BLayerBonus7 { instance Cannon of movieClip 10135 { onClipEvent (load) { spawnerType = 'set'; spawnLevelStart = 3; spawnLevelAdvance = 0.5; thisSpawnerArray = ['Spider', 'Ninja', 'Spider', 'Ninja', 'Spider', 'Ninja']; } } instance of movieClip 8566 elitePirate { onClipEvent (load) { _xscale = -100; } } } movieClip 15262 InteractLayerBonus7 { instance Door0 of movieClip 10308 { onClipEvent (load) { allBaddiesBadge = true; } } } movieClip 15263 { } movieClip 15265 BackgroundBonus11BG1 { } movieClip 15267 BackgroundBonus11BG2 { } movieClip 15269 BackgroundBonus11BG3 { } movieClip 15271 tehwallzBonus11 { } movieClip 15273 ForegroundBonus11 { } movieClip 15274 BLayerBonus11 { instance Cannon of movieClip 10135 { onClipEvent (load) { spawnerType = 'set'; spawnLevelStart = 3; spawnLevelAdvance = 0.5; thisSpawnerArray = ['Spider', 'Spider', 'Duck', 'Spider', 'Duck', 'Spider', 'Spider', 'Spider', 'Spider', 'elitePirate', 'Spider', 'Duck']; } } } movieClip 15275 InteractLayerBonus11 { instance Door0 of movieClip 10308 { onClipEvent (load) { allBaddiesBadge = true; } } } movieClip 15276 UberForegroundBonus7 { } movieClip 15277 { } movieClip 15279 UberbackgroundBonus12 { } movieClip 15281 BackgroundBonus12BG1 { } movieClip 15283 BackgroundBonus12BG2 { frame 1 { v; } } movieClip 15285 BackgroundBonus12BG3 { } movieClip 15287 BackgroundBonus12BG4 { frame 1 { } } movieClip 15289 tehgroundBonus12 { } movieClip 15291 tehwallzBonus12 { } movieClip 15293 tehplatformzBonus12 { } movieClip 15295 ForegroundBonus12 { } movieClip 15296 BLayerBonus12 { frame 1 { stop(); } instance of movieClip 7413 Ninja { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7413 Ninja { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7413 Ninja { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7413 Ninja { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7413 Ninja { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7413 Ninja { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7413 Ninja { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7413 Ninja { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7413 Ninja { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7413 Ninja { } } movieClip 15297 InteractLayerBonus12 { instance Door0 of movieClip 10308 { onClipEvent (load) { allBaddiesBadge = true; } } } movieClip 15298 { } movieClip 15299 UberbackgroundTrans9 { } movieClip 15301 BackgroundTrans9BG1 { } movieClip 15303 BackgroundTrans9BG2 { } movieClip 15305 BackgroundTrans9BG3 { } movieClip 15307 tehwallzTrans9 { } movieClip 15308 tehhangzTrans9 { } movieClip 15310 tehgroundTrans9 { } movieClip 15312 tehplatformzTrans9 { } movieClip 15313 aPlatzTrans9 { instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 15; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Springy'; spring = 20; decay = 0.95; } } } movieClip 15315 ForegroundTrans9 { } movieClip 15316 BLayerTrans9 { instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; isWearing = 'pirate'; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; isWearing = 'pirate'; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; isWearing = 'pirate'; } } instance of movieClip 7712 Spider { onClipEvent (load) { isWearing = 'pirate'; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; isWearing = 'pirate'; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; isWearing = 'pirate'; } } instance of movieClip 7712 Spider { onClipEvent (load) { isWearing = 'pirate'; } } instance of movieClip 7712 Spider { onClipEvent (load) { isWearing = 'pirate'; } } } movieClip 15317 InteractLayerTrans9 { instance Door1 of movieClip 10308 { onClipEvent (load) { worm = 'Level18'; } } instance Door0 of movieClip 10308 { onClipEvent (load) { vanish = true; } } } movieClip 15320 { frame 1 { } } movieClip 15323 { } movieClip 15324 { } movieClip 15325 { } movieClip 15327 BackgroundLevel18BG2 { } movieClip 15330 tehwallzLevel18 { frame 1 { stop(); } } movieClip 15332 ForegroundLevel18 { } movieClip 15333 BLayerLevel18 { frame 1 { stop(); } instance Cannon of movieClip 10135 { onClipEvent (load) { spawnerType = 'random'; spawnLevelStart = 3; spawnLevelAdvance = 0.5; spawnNoise = false; thisSpawnerArray = ['Ninja']; } } } movieClip 15347 { frame 1 { stop(); } frame 6 { _root.tehwallz.gotoAndStop(3); } frame 31 { stop(); } } movieClip 15352 { } movieClip 15396 { frame 1 { stop(); } frame 64 { _root.InteractLayer.trapdoor.play(); _root.playSound('trapdoor', _x, 100); } } movieClip 15666 { frame 123 { gotoAndPlay(1); } } movieClip 15674 { } movieClip 15844 { } movieClip 15859 { frame 1 { } } movieClip 15927 { frame 14 { gotoAndPlay('loop'); } } movieClip 15928 { frame 1 { _root.playSound('beardSmashWoosh', _x, 100); } frame 14 { delete _root.BLayer.Cannon.onEnterFrame; } frame 18 { _root.playSound('beardSmash', _x, 100); _root.BackgroundMusic.stop(); _root.shakeRL = 40; _root.Char.gotoAndStop('FrontSlam'); _root.Char.moveUD = -20; var b = 0; while (b < _root.BaddieArray.length) { i = _root.BaddieArray[b]; baddie = _root.BLayer['Baddie' + i]; baddie.moveRL = (baddie._x - _x) / 10; baddie.moveUD = (baddie._y - _y) / 10; if (baddie.moveUD > -20) { baddie.moveUD = -20; } baddie.health = 0; baddie.rotter = baddie.moveRL * 4; baddie.shakeRL = baddie.moveRL; baddie.downTime = 10; baddie.b = 5; baddie.spring = 20; baddie._x += baddie.shakeRL / 2; baddie.shakeRL = -baddie.shakeRL; baddie.gotoAndStop('Hit'); ++b; } } frame 70 { _root.popUpInGame(1, 'manlyBeardCrash', this); } frame 105 { stop(); capt.beard.gotoAndPlay(7); } frame 131 { _root.playSound('beardSmashWoosh', _x, 100); } frame 153 { _root.ChangeLevel('Level17', 'Door0', false, false); stop(); } } movieClip 16432 { frame 1 { } frame 370 { _root.progressStatus = -1; _root.QuittoMenu(); } } movieClip 16433 InteractLayerLevel18 { frame 1 { stop(); } instance Door0 of movieClip 10308 { onClipEvent (load) { vanish = true; _xscale = -100; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Trans11', 'Door0', false, true); delete objectFunc; }; } } instance Door1 of movieClip 10308 { onClipEvent (load) { quickDrop = true; vanish = true; runningStart = true; _xscale = -100; custom = function () { _root.BLayer.gotoAndStop(2); _root.InteractLayer.gotoAndStop(3); _root.tehwallz.gotoAndStop(2); }; } } instance Door2 of movieClip 10308 { onClipEvent (load) { _xscale = -100; _alpha = 0; vanish = true; custom = function () { _root.startControls(); _root.Char._x = _x; gotoAndStop(2); _root.Char.gotoAndStop('goHome'); _root.LevelSelect = 20; _root.APITrackEvent('GoHome', 1); _parent.gotoAndStop(5); }; } } instance of movieClip 10314 { onClipEvent (load) { ID = 2; thisMessageIdle = 'QTPRambling'; switchIt = false; cameraDist = 600; camFacing = 1; } } instance of movieClip 10314 { onClipEvent (load) { ID = 1; b = 5; onEnterFrame = function () { if (!_root.Paused) { if (_root.DoorLoaded == 'Door0') { thisMessageSuccess = 'QTPReject'; thisMessageIdle = 'QTPReject'; } else { thisMessageSuccess = 'QTPEek'; thisMessageIdle = 'QTPEek'; } delete onEnterFrame; } }; switchIt = true; cameraDist = 750; camFacing = 1; cameraOn = _parent.QTP; } } frame 2 { _root.setBounds(); } frame 3 { _root.setBounds(); } } movieClip 16434 { } movieClip 16435 UberbackgroundTrans11 { } movieClip 16437 BackgroundTrans11BG1 { } movieClip 16439 BackgroundTrans11BG2 { } movieClip 16441 BackgroundTrans11BG3 { } movieClip 16443 tehwallzTrans11 { } movieClip 16444 tehhangzTrans11 { } movieClip 16446 tehgroundTrans11 { } movieClip 16448 tehplatformzTrans11 { } movieClip 16449 aPlatzTrans11 { instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 15; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Springy'; spring = 20; decay = 0.95; } } } movieClip 16451 ForegroundTrans11 { } movieClip 16483 { } movieClip 16524 { frame 72 { gotoAndPlay(2); } } movieClip 16525 InteractLayerTrans11 { frame 1 { stop(); } instance Door1 of movieClip 10308 { onClipEvent (load) { worm = 'Level18'; } } instance of movieClip 10440 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.Char.gotoAndStop('FrontSlam'); _root.Char._xscale = -100; delete objectFunc; }; } } instance of movieClip 10314 { onClipEvent (load) { ID = 1; thisMessageIdle = 'PoorBeard'; switchIt = true; cameraDist = 550; maxZoomedIn = 0.6; camFacing = 1; cameraOn = _parent.PoorBeard; custom = function () { _root.cinematicScroll = false; }; } } instance of movieClip 10440 { onClipEvent (load) { _alpha = 0; objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Level7', 'Door0', false, false); delete objectFunc; }; } } instance of movieClip 10443 { onClipEvent (load) { ID = 2; } } instance Door0 of movieClip 10308 { onClipEvent (load) { vanish = true; quickDrop = true; } } } movieClip 16526 { } movieClip 16527 UberbackgroundLevel17 { } movieClip 16529 BackgroundLevel17BG1 { } movieClip 16531 BackgroundLevel17BG2 { } movieClip 16533 waterLevel16 { } movieClip 16535 surfaceLevel15 { } movieClip 16537 tehwallzLevel17 { } movieClip 16539 tehhangzLevel16 { } movieClip 16541 tehplatformzLevel17 { } movieClip 16543 ForegroundLevel17 { frame 1 { b; } } movieClip 16587 { frame 22 { gotoAndStop(1); } } movieClip 16594 { } movieClip 16610 { frame 2 { _root.Char.moveRL = -_root.Char._xscale / 5; } frame 4 { _root.playSound('beardHit', _parent._x, 100); } frame 23 { _parent.gotoAndStop('idle'); } } movieClip 16721 { frame 24 { _root.playSound('beardWhip', _parent._x, 100); stop(); } frame 31 { gotoAndPlay('cont'); } frame 41 { _parent.gotoAndStop('slump'); } frame 74 { _parent.gotoAndStop('slump'); } } movieClip 16794 { frame 83 { _parent.gotoAndStop('scratch'); } } movieClip 16796 { } movieClip 16797 { } movieClip 16884 { frame 43 { _parent.gotoAndStop('preJump'); } } movieClip 16927 { } movieClip 17154 { instance of movieClip 16927 { onClipEvent (load) { _xscale = _parent._parent._xscale; } } frame 6 { _root.playSound('QTPAlert', _parent._x, 50); } frame 45 { _parent.b = 0; } frame 84 { _parent.b = -1; } frame 143 { _parent.gotoAndStop('preJump'); } } movieClip 17166 { frame 26 { _parent.gotoAndStop('jump'); } } movieClip 17168 { } movieClip 17177 { } movieClip 17178 { } movieClip 17285 { frame 7 { _parent.thisBad = _root.SpawnBaddies(_parent._x, _parent._y, 'BeardShock'); _parent.thisBad._xscale = -100; } frame 8 { _parent.thisBad = _root.SpawnBaddies(_parent._x, _parent._y, 'BeardShock'); } frame 87 { _parent.gotoAndStop('idle'); } } movieClip 17286 Captain { frame 1 { if (ID == undefined) { ID = _root.BaddieCount; _name = 'Baddie' + ID; _root.BaddieArray.push(ID); swapDepths(ID); } ++_root.BaddieCount; ItIs = 'Pirate'; Status = 'Angry'; health = 120; isWide = 40; spread = 40; worth = 3; canZoom = true; baddieLevel = 0; bounceThresh = 20; bounceDefault = 0.1; shake = 0; jabTolerance = 3; anchorX = _x; anchorY = _y; _root.baddieSetupFunc(this); gotoAndStop('idle'); JumpGuide = function () { return false; }; } frame 13 { moveRL = 0; moveUD = 0; moveN = random(10) + 30; holdN = 0; stepN = 8; jabTolerance = 3; Status = 'Angry'; jumps = 0; onEnterFrame = function () { if (!_root.Paused) { pirate.nextFrame(); if (downTime > 0) { --downTime; } if (Math.abs(_root.Char._x - _x) < 200 && Math.abs(_root.Char._y - _y) < 1000) { gotoAndStop('attack'); } else { if (_root.Char._x > _x) { _xscale = 100; } else { _xscale = -100; } moveRL = _xscale / 25; } RLFunc(); } }; hitPwnFunc = function (ex, ey, eRL, eUD, eBad, fromChar) { if (Math.abs(ex - this._x) < this.isWide + eRL - fromChar.spread) { var v2 = this._x - ex; fromChar.moveRL = -(v2 / Math.abs(v2)) * 20; fromChar.rollRL *= 0.5; this.moveRL = eRL * 0.5; gotoAndStop('engage'); return false; } }; hitCharFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { if (fromChar._alpha == 100 && !_root.Char.isAttacking) { if (ex < _x) { fromChar.moveRL = -8; fromChar._xscale = 100; } else { fromChar.moveRL = 8; fromChar._xscale = -100; } fromChar.JumpFunc(12); delete fromChar.onEnterFrame; fromChar.gotoAndStop('FrontSlam'); fromChar.hurting = true; gotoAndStop('engage'); _root.HurtPants(20, fromChar); return true; } else { return false; } }; getAttacked = function (ex, ey, hitPower, eRot, eType, fromChar) { this.moveUD = -Math.abs(hitPower) * Math.cos(eRot * 0.0174532925199433); downTime = 3; if (_root.Char._x < _x) { _xscale = -100; } else { _xscale = 100; } _root.beardWhip.stop(); _root.playSound('baseballHit', _x, 100); _root.playSound('beardHit', _x, 100); shakeRL = hitPower; shake = 0; anchX = 30; anchY = -31; anchRot = 45; gotoAndStop('engage'); if (substring(eType, 1, 3) == 'jab') { moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 1; fromChar.moveRL = fromChar._xscale / 5; return 'deflect'; } else { if (eType == 'slashHigh') { moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 0.5; fromChar.moveRL = -moveRL; return 'deflect'; } else { if (eType === 'slashLow') { moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 0.5; fromChar.moveRL = -moveRL; return 'deflect'; } else { if (ex > _x) { fromChar.moveRL = 20; moveRL = -fromChar.moveRL * 0.5; fromChar.moveUD = -6; fromChar.FloatUp = 0; return 'deflect'; } fromChar.moveRL = -20; moveRL = -fromChar.moveRL * 0.5; fromChar.moveUD = -6; fromChar.FloatUp = 0; return 'deflect'; } } } }; stop(); } frame 18 { onEnterFrame = function () { if (!_root.Paused) { pirate.nextFrame(); if (downTime > 0) { --downTime; } if (moveRL == 0) { } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; moveRL *= 0.95; } else { moveRL = 0; } } RLFunc(); } }; } frame 25 { moveRL = 0; if (_root.Char._x < _x) { _xscale = -100; } else { _xscale = 100; } onEnterFrame = function () { if (!_root.Paused) { pirate.nextFrame(); if (downTime > 0) { --downTime; } RLFunc(); } }; hitCharFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { if (fromChar._alpha == 100 && !fromChar.isAttacking) { if (fromChar.Standing() && pirate._currentframe > 30 && pirate._currentframe < 41) { if (ex < _x) { fromChar.moveRL = -8; } else { fromChar.moveRL = 8; } pirate.gotoAndPlay('hit'); fromChar.FloatUp = 4; fromChar.JumpFunc(26); delete fromChar.onEnterFrame; fromChar.gotoAndStop('FrontSlam'); _root.HurtPants(20, fromChar); _root.shakeRL = 20; return true; } else { if (Math.abs(fromChar._x - _x) < fromChar.spread + isWide) { if (ex < _x) { fromChar.moveRL = -12; fromChar.JumpFunc(10); delete fromChar.onEnterFrame; fromChar.gotoAndStop('FrontSlam'); _root.HurtPants(10, fromChar); _root.shakeRL = 5; return true; } fromChar.moveRL = 12; fromChar.JumpFunc(10); delete fromChar.onEnterFrame; fromChar.gotoAndStop('FrontSlam'); _root.HurtPants(10, fromChar); _root.shakeRL = 5; return true; } } } }; } frame 31 { stars._yscale = 0; stars._xscale = 0; onEnterFrame = function () { if (!_root.Paused) { pirate.nextFrame(); if (stars._xscale < 100) { stars._xscale += 5; stars._yscale = stars._xscale; } if (downTime > 0) { --downTime; } if (moveRL == 0) { } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; moveRL *= 0.95; } else { moveRL = 0; } } RLFunc(); } }; hitCharFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { if (Math.abs(fromChar._x - _x) < fromChar.spread + isWide) { if (!this.jumpAnchor.hitTest(ex + eRL, ey - 10 - eUD * 2, true) && eUD > 0) { this.onEnterFrame = function () { if (fromChar._currentframe != 14) { this.onEnterFrame = _root.stompedEnterFrame; } }; if (baddieLevel >= 3) { health = 0; moveUD = -8; } this.gotoAndStop('Stomped'); if (this.pirate._currentframe < 20) { this.pirate.gotoAndPlay(20); } _root.tempBounced = true; fromChar.aBadOn = this.ID; this.spring = -12; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * (this._xscale / Math.abs(this._xscale)) * 1.3; fromChar._y = this._y - this.ycharup; _root.playSound('BadStomp', this._x, 100); fromChar.gotoAndStop('BaddieLand'); fromChar.JumpPadLanded = false; fromChar.downTime = 30; delete this.hitPwnFunc; delete this.hitCharFunc; return true; } else { if (fromChar._alpha == 100 && !_root.Char.isAttacking) { if (ex < _x) { fromChar.moveRL = -8; fromChar._xscale = 100; } else { fromChar.moveRL = 8; fromChar._xscale = -100; } fromChar.JumpFunc(12); delete fromChar.onEnterFrame; fromChar.gotoAndStop('FrontSlam'); fromChar.hurting = true; _root.HurtPants(20, fromChar); return true; } else { return false; } } } else { return false; } }; hitPwnFunc = function (ex, ey, eRL, eUD, eBad, fromChar) { if (Math.abs(ex - this._x) < this.isWide + eRL - fromChar.spread) { if (_root.Char._x < _x) { _xscale = 100; } else { _xscale = -100; } _root.playSound('beardWimp', _x, 100, 0.7); if (baddieLevel < 3) { moveRL = eRL; var v4 = this._x - ex; fromChar.moveRL = -(v4 / Math.abs(v4)) * 15; fromChar.rollRL *= 0.5; gotoAndStop('poked'); return true; } moveRL = eRL * 0.2; moveUD = -Math.abs(eRL * 2); gotoAndStop('deadjump'); return true; } }; getAttacked = function (ex, ey, hitPower, eRot, eType, fromChar) { this.moveUD = -Math.abs(hitPower) * Math.cos(eRot * 0.0174532925199433); downTime = 3; if (_root.Char._x < _x) { _xscale = 100; } else { _xscale = -100; } _root.playSound('baseballHit', _x, 100); _root.playSound('beardWimp', _x, 100, 0.7); if (baddieLevel < 3) { gotoAndStop('poked'); } else { gotoAndStop('deadjump'); } if (substring(eType, 1, 3) == 'jab') { moveRL = fromChar._xscale / 7; fromChar.moveRL = fromChar._xscale / 7; return 'deflect'; } else { if (eType == 'slashHigh') { moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 0.5; fromChar.moveRL = -moveRL; return 'deflect'; } else { if (eType === 'slashLow') { moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 0.5; fromChar.moveRL = -moveRL; return 'deflect'; } else { if (ex > _x) { fromChar.moveRL = 20; moveRL = -fromChar.moveRL * 0.5; fromChar.moveUD = -6; fromChar.FloatUp = 0; return 'deflect'; } fromChar.moveRL = -20; moveRL = -fromChar.moveRL * 0.5; fromChar.moveUD = -6; fromChar.FloatUp = 0; return 'deflect'; } } } }; } frame 37 { hitPwnFunc = function (ex, ey, eRL, eUD, eBad, fromChar) { if (Math.abs(ex - this._x) < this.isWide + eRL - fromChar.spread) { var v2 = this._x - ex; fromChar.moveRL = -(v2 / Math.abs(v2)) * 20; fromChar.rollRL *= 0.5; this.moveRL = eRL * 0.5; gotoAndStop('engage'); return false; } }; } frame 45 { facing = _xscale / Math.abs(_xscale); ++baddieLevel; onEnterFrame = function () { if (!_root.Paused) { pirate.nextFrame(); if (downTime > 0) { --downTime; } spring += (100 - _yscale) / 5; spring *= 0.8; _yscale = _yscale + spring; _xscale = (100 - _yscale + 100) * facing; if (moveRL == 0) { } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; moveRL *= 0.95; } else { moveRL = 0; } } RLFunc(); } }; hitPwnFunc = function (ex, ey, eRL, eUD, eBad, fromChar) { if (Math.abs(ex - this._x) < this.isWide + eRL - fromChar.spread) { var v2 = this._x - ex; fromChar.moveRL = -(v2 / Math.abs(v2)) * 20; fromChar.rollRL *= 0.5; this.moveRL = eRL * 0.5; gotoAndStop('engage'); return false; } }; } frame 51 { facing = _xscale / Math.abs(_xscale); ++baddieLevel; onEnterFrame = function () { if (!_root.Paused) { pirate.nextFrame(); if (downTime > 0) { --downTime; } spring += (100 - _yscale) / 5; spring *= 0.8; _yscale = _yscale + spring; _xscale = (100 - _yscale + 100) * facing; if (moveRL == 0) { } else { if (Math.abs(moveRL) > 0.5) { moveRL -= (moveRL / Math.abs(moveRL)) * 0.5; moveRL *= 0.95; } else { moveRL = 0; } } RLFunc(); } }; } frame 60 { facing = _xscale / Math.abs(_xscale); moveRL = _xscale / 20; rotAccel = -moveUD; delete getAttacked; delete hitCharFunc; delete hitPwnFunc; onEnterFrame = function () { if (_y < 500) { if (pirate._currentframe < 6) { pirate.nextFrame(); } pirate._rotation += rotAccel; _x = _x + this.moveRL; _y = _y + this.moveUD; ++this.moveUD; } else { _root.ChangeLevel('Level18', 'Door2', false, false); delete onEnterFrame; } }; } frame 69 { speed = 20; b = -1; onEnterFrame = function () { if (!_root.Paused) { pirate.nextFrame(); if (downTime > 0) { --downTime; } if (b < 0) { } else { if (b > 0) { --b; } else { b = 20 - baddieLevel * 5; eRot = random(60) - 30; _root.playSound('beardWimp', _x, 50, 0.7); thisBad = _root.SpawnBaddies(_x, _y - 50, 'Ninja', (eRot / Math.abs(eRot)) * 100, speed * Math.sin(eRot * 0.0174532925199433), -speed * Math.cos(eRot * 0.0174532925199433) * 0.7); thisBad.FloatUp = 10; thisBad.insomniac = true; } } } }; hitPwnFunc = function (ex, ey, eRL, eUD, eBad, fromChar) { if (Math.abs(ex - this._x) < this.isWide + eRL - fromChar.spread) { var v2 = this._x - ex; fromChar.moveRL = -(v2 / Math.abs(v2)) * 20; fromChar.rollRL *= 0.5; this.moveRL = eRL * 0.5; return false; } }; hitCharFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { if (fromChar._alpha == 100 && !_root.Char.isAttacking) { if (ex < _x) { fromChar.moveRL = -8; fromChar._xscale = 100; } else { fromChar.moveRL = 8; fromChar._xscale = -100; } fromChar.JumpFunc(12); delete fromChar.onEnterFrame; fromChar.gotoAndStop('FrontSlam'); fromChar.hurting = true; _root.HurtPants(20, fromChar); return true; } else { return false; } }; getAttacked = function (ex, ey, hitPower, eRot, eType, fromChar) { this.moveUD = -Math.abs(hitPower) * Math.cos(eRot * 0.0174532925199433); downTime = 3; if (_root.Char._x < _x) { _xscale = -100; } else { _xscale = 100; } _root.beardWhip.stop(); _root.playSound('baseballHit', _x, 100); _root.playSound('beardHit', _x, 100); shakeRL = hitPower; shake = 0; anchX = 30; anchY = -31; anchRot = 45; if (substring(eType, 1, 3) == 'jab') { moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 1; fromChar.moveRL = fromChar._xscale / 5; return 'deflect'; } else { if (eType == 'slashHigh') { moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 0.5; fromChar.moveRL = -moveRL; return 'deflect'; } else { if (eType === 'slashLow') { moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 0.5; fromChar.moveRL = -moveRL; return 'deflect'; } else { if (ex > _x) { fromChar.moveRL = 20; moveRL = -fromChar.moveRL * 0.5; fromChar.moveUD = -6; fromChar.FloatUp = 0; return 'deflect'; } fromChar.moveRL = -20; moveRL = -fromChar.moveRL * 0.5; fromChar.moveUD = -6; fromChar.FloatUp = 0; return 'deflect'; } } } }; } frame 76 { onEnterFrame = function () { if (!_root.Paused) { pirate.nextFrame(); if (downTime > 0) { --downTime; } } }; hitCharFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { if (fromChar._alpha == 100 && !_root.Char.isAttacking) { if (ex < _x) { fromChar.moveRL = -8; fromChar._xscale = 100; } else { fromChar.moveRL = 8; fromChar._xscale = -100; } fromChar.JumpFunc(12); delete fromChar.onEnterFrame; fromChar.gotoAndStop('FrontSlam'); fromChar.hurting = true; _root.HurtPants(20, fromChar); return true; } else { return false; } }; hitPwnFunc = function (ex, ey, eRL, eUD, eBad, fromChar) { if (Math.abs(ex - this._x) < this.isWide + eRL - fromChar.spread) { var v2 = this._x - ex; fromChar.moveRL = -(v2 / Math.abs(v2)) * 20; fromChar.rollRL *= 0.5; this.moveRL = eRL * 0.5; return false; } }; getAttacked = function (ex, ey, hitPower, eRot, eType, fromChar) { this.moveUD = -Math.abs(hitPower) * Math.cos(eRot * 0.0174532925199433); downTime = 3; if (_root.Char._x < _x) { _xscale = -100; } else { _xscale = 100; } _root.beardWhip.stop(); _root.playSound('baseballHit', _x, 100); _root.playSound('beardHit', _x, 100); shakeRL = hitPower; shake = 0; anchX = 30; anchY = -31; anchRot = 45; if (substring(eType, 1, 3) == 'jab') { moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 1; fromChar.moveRL = fromChar._xscale / 5; return 'deflect'; } else { if (eType == 'slashHigh') { moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 0.5; fromChar.moveRL = -moveRL; return 'deflect'; } else { if (eType === 'slashLow') { moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 0.5; fromChar.moveRL = -moveRL; return 'deflect'; } else { if (ex > _x) { fromChar.moveRL = 20; moveRL = -fromChar.moveRL * 0.5; fromChar.moveUD = -6; fromChar.FloatUp = 0; return 'deflect'; } fromChar.moveRL = -20; moveRL = -fromChar.moveRL * 0.5; fromChar.moveUD = -6; fromChar.FloatUp = 0; return 'deflect'; } } } }; } frame 84 { _root.playSound('beardSmashWoosh', _x, 200); b = 3; onEnterFrame = function () { if (!_root.Paused) { pirate.nextFrame(); if (_y > -800) { if (b > 0) { --b; } else { --ninjasOut; b = 20 - baddieLevel * 5; eRot = random(60) - 30; thisBad = _root.SpawnBaddies(_x, _y - 50, 'Ninja'); thisBad.gotoAndStop('Jump'); thisBad.moveRL = random(20) - 10; thisBad.moveUD = -2; thisBad.FloatUp = 2; if (thisBad.moveRL > 0) { thisBad._xscale = 100; } else { thisBad._xscale = -100; } thisBad.insomniac = true; } } _y = _y - 20; centerY = _y - spread; if (_y < -1200) { centerX = _root.Char._x; _x = centerX; gotoAndStop('slam'); } } }; } frame 90 { b = 0; _root.playSound('beardSmashWoosh'); _root.ELayer.attachMovie('slamShadow', 'slamShadow', _root.ELayer.getNextHighestDepth(), {'_x': _x, '_xscale': 0, '_yscale': 0}); onEnterFrame = function () { if (!_root.Paused) { _y = _y + 20; centerY = _y - spread; _root.ELayer.slamShadow._xscale = (1200 + _y) / 12; _root.ELayer.slamShadow._yscale = _root.ELayer.slamShadow._xscale; _root.ELayer.slamShadow._alpha = _root.ELayer.slamShadow._yscale; if (_y > -20) { gotoAndStop('impact'); removeMovieClip(_root.ELayer.slamShadow); } } }; } frame 96 { _root.shakeRL = 20; _root.playSound('beardSmash'); if (_root.Char._y > -10) { _root.Char.gotoAndStop('FrontSlam'); _root.Char.moveUD = -20; } var b = 0; while (b < _root.BaddieArray.length) { i = _root.BaddieArray[b]; if (i != ID) { baddie = _root.BLayer['Baddie' + i]; baddie.moveRL = (baddie._x - _x) / 10; baddie.moveUD = (baddie._y - _y) / 10; if (baddie.moveUD > -20) { baddie.moveUD = -20; } baddie.health = 0; baddie.rotter = baddie.moveRL * 4; baddie.shakeRL = baddie.moveRL; baddie.downTime = 10; baddie.b = 5; baddie.spring = 20; baddie._x += baddie.shakeRL / 2; baddie.shakeRL = -baddie.shakeRL; baddie.gotoAndStop('Hit'); } ++b; } b = 15; onEnterFrame = function () { if (!_root.Paused) { pirate.nextFrame(); if (b > 0) { --b; if (Math.round(b / 2) == b / 2) { _root.shakeRL = 20; } } else {} } }; } } movieClip 17287 BLayerLevel17 { instance of movieClip 17286 Captain { onClipEvent (load) { _xscale = -100; } } } movieClip 17289 InteractLayerLevel17 { instance MaxX of movieClip 10736 { onClipEvent (load) { _root.MaxX = -_x; } } instance MaxY of movieClip 10736 { onClipEvent (load) { _root.MaxY = -_y; } } instance Door1 of movieClip 10308 { onClipEvent (load) { worm = 'Level4'; SnapBack = false; } } instance Door0 of movieClip 10308 { onClipEvent (load) { vanish = true; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Level16', 'Door0'); delete objectFunc; }; } } } movieClip 17290 { } movieClip 17292 UberbackgroundBonus21 { } movieClip 17294 BackgroundBonus21BG1 { } movieClip 17296 tehwallzBonus21 { } movieClip 17298 tehgroundBonus21 { } movieClip 17300 tehplatformzBonus21 { } movieClip 17303 { } movieClip 17304 ForegroundBonus21 { instance of movieClip 17303 { onClipEvent (load) { gotoAndStop(1); } } } movieClip 17305 BLayerBonus21 { frame 1 { stop(); } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 40; FloatUp = 2; tempstill = true; } } instance of movieClip 6612 Snail { onClipEvent (load) { InstaKill = true; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 23; FloatUp = 0; tempstill = true; } } } movieClip 17306 InteractLayerBonus21 { instance Door1 of movieClip 10308 { onClipEvent (load) { _xscale = -100; } } instance golfHole of movieClip 11330 { onClipEvent (load) { ID = 2; } } } movieClip 17307 { } movieClip 17309 UberbackgroundLevel7 { } movieClip 17311 BackgroundLevel7BG1 { } movieClip 17313 BackgroundLevel7BG2 { } movieClip 17315 BackgroundLevel7BG3 { } movieClip 17317 BackgroundLevel7BG4 { } movieClip 17318 surfaceLevel7 { } movieClip 17320 tehwallzLevel7 { } movieClip 17322 tehgroundLevel7 { } movieClip 17324 tehplatformzLevel7 { } movieClip 17325 tehhangzLevel7 { } movieClip 17327 ForegroundLevel7 { } movieClip 17329 UberForegroundLevel7 { } movieClip 17330 BLayerLevel7 { instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 30; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 25; looseRot = true; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 30; } } instance of movieClip 6933 { onClipEvent (load) { _xscale = -100; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 30; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 30; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; isWearing = 'lamp'; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7712 Spider { onClipEvent (load) { isWearing = 'lamp'; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; isWearing = 'lamp'; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; } } instance of movieClip 7712 Spider { onClipEvent (load) { isWearing = 'lamp'; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; isWearing = 'lamp'; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; isWearing = 'lamp'; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; isWearing = 'lamp'; } } instance of movieClip 7712 Spider { onClipEvent (load) { isWearing = 'lamp'; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; isWearing = 'lamp'; } } instance of movieClip 7712 Spider { onClipEvent (load) { isWearing = 'lamp'; } } instance of movieClip 7712 Spider { onClipEvent (load) { isWearing = 'lamp'; } } instance of movieClip 7712 Spider { onClipEvent (load) { _xscale = -100; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 28; FloatUp = 6; TimeSpring = 'A'; } } } movieClip 17335 { } movieClip 17343 { frame 13 { gotoAndPlay(7); } } movieClip 17344 { frame 1 { stop(); } } movieClip 17345 InteractLayerLevel7 { instance MaxX of movieClip 10736 { } instance MinX of movieClip 10736 { } instance MinY of movieClip 10736 { } instance Door3 of movieClip 10308 { onClipEvent (load) { worm = 'Trans12'; } } instance golfHole of movieClip 11330 { onClipEvent (load) { ID = 8; } } instance Door0 of movieClip 10308 { onClipEvent (load) { vanish = true; } } instance of movieClip 10443 { onClipEvent (load) { ID = 1; } } instance of movieClip 10443 { onClipEvent (load) { ID = 2; } } instance of movieClip 10443 { onClipEvent (load) { ID = 2; } } instance of movieClip 10443 { onClipEvent (load) { ID = 0; } } instance of movieClip 10443 { onClipEvent (load) { ID = 1; } } instance Door1 of movieClip 10438 { onClipEvent (load) { worm = 'Bonus21'; _xscale = -100; } } instance of movieClip 10314 { onClipEvent (load) { ID = 1; thisMessageIdle = 'batspiderNPC'; thisMessageSuccess = 'batspiderNPCWin'; switchIt = true; cameraOn = this; camFacing = -1; } } instance Door2 of movieClip 10308 { onClipEvent (load) { worm = 'Bonus20'; } } } movieClip 17346 { } movieClip 17348 UberbackgroundBonus20 { } movieClip 17350 BackgroundBonus20BG1 { } movieClip 17352 BackgroundBonus20BG2 { } movieClip 17354 tehwallzBonus20 { } movieClip 17356 tehgroundBonus20 { } movieClip 17358 tehplatformzBonus20 { } movieClip 17359 aPlatzBonus20 { frame 1 { stop(); } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 20; decay = 0.9; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Seesaw'; spring = 500; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Loop'; moveRL = 0; moveUD = -15; startX = 765; startY = -300; loopX = 765; loopY = -700; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Loop'; moveRL = 0; moveUD = -15; startX = 765; startY = -300; loopX = 765; loopY = -700; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 10; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 20; decay = 0.9; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 20; decay = 0.9; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 10; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Seesaw'; spring = 500; } } } movieClip 17361 ForegroundBonus20 { } movieClip 17362 InteractLayerBonus20 { instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.currentCheckPoint = this; delete objectFunc; }; } } instance Door0 of movieClip 10308 { onClipEvent (load) { } } instance Door1 of movieClip 10308 { onClipEvent (load) { _xscale = -100; } } instance of movieClip 10443 { onClipEvent (load) { ID = 2; } } instance of movieClip 14145 { onClipEvent (load) { objectFunc = function (ex, ey, eRL, eUD, fromChar) { _root.HurtPants(0, fromChar); _root.Char.gotoAndStop('FrontSlam'); _root.Char._x = _root.currentCheckPoint._x; _root.Char._y = _root.currentCheckPoint._y - 200; _root.CharYPoint = _root.Char._y; _root.Char._xscale = 100; _root.Char._rotation = 0; _root.Char.moveRL = 0; _root.Char.moveUD = -5; _root.Char.Still = true; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.currentCheckPoint = this; delete objectFunc; }; } } instance of movieClip 14145 { onClipEvent (load) { _alpha = 0; objectFunc = function (ex, ey, eRL, eUD, fromChar) { _root.HurtPants(0, fromChar); _root.Char.gotoAndStop('FrontSlam'); _root.Char._x = _root.currentCheckPoint._x; _root.Char._y = _root.currentCheckPoint._y - 200; _root.CharYPoint = _root.Char._y; _root.Char._xscale = 100; _root.Char._rotation = 0; _root.Char.moveRL = 0; _root.Char.moveUD = -5; _root.Char.Still = true; }; } } } movieClip 17363 { } movieClip 17364 UberbackgroundTrans12 { } movieClip 17366 BackgroundTrans12BG1 { } movieClip 17368 BackgroundTrans12BG2 { } movieClip 17370 BackgroundTrans12BG3 { } movieClip 17372 tehwallzTrans12 { frame 1 { stop(); } } movieClip 17374 tehplatformzTrans12 { } movieClip 17376 tehgroundTrans12 { } movieClip 17378 ForegroundTrans12 { } movieClip 17422 { frame 1 { stop(); } frame 7 { stop(); } frame 29 { _root.Char.hurting = false; _root.Char.JumpFunc(50, true, false, false, true); _root.Char.gotoAndStop('Flying'); } frame 33 { _root.attachMovie('boom!shell', 'boom!shell', _root.getNextHighestDepth(), {'_x': _parent._x, '_y': _parent._y, '_rotation': _rotation}); } frame 45 { _parent.onEnterFrame = function () { this.Barrel._rotation -= this.Barrel._rotation / 6; if (Math.abs(this.Barrel._rotation) < 1) { this.Barrel._rotation = 0; delete this.onEnterFrame; } }; } } movieClip 17424 { } movieClip 17425 InteractLayerTrans12 { instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Trans13', 'Door0', false, false); delete objectFunc; }; } } } movieClip 17426 { } movieClip 17427 UberbackgroundTrans13 { } movieClip 17429 BackgroundTrans13BG1 { } movieClip 17431 BackgroundTrans13BG2 { } movieClip 17433 BackgroundTrans13BG3 { } movieClip 17434 waterTrans13 { } movieClip 17435 tehwallzTrans13 { } movieClip 17437 tehgroundTrans13 { } movieClip 17439 ForegroundTrans13 { } movieClip 17441 { frame 1 { cacheAsBitmap = true; } } movieClip 17443 { frame 1 { cacheAsBitmap = true; } } movieClip 17445 { } movieClip 17446 UberForegroundTrans13 { } movieClip 17447 BLayerTrans13 { instance JumpPad0 of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 35; FloatUp = 20; still = true; } } } movieClip 17448 InteractLayerTrans13 { instance MaxX of movieClip 10736 { onClipEvent (load) { _root.MaxX = -_x; } } instance MaxY of movieClip 10736 { onClipEvent (load) { _root.MaxY = -_y; } } instance Door0 of movieClip 10308 { onClipEvent (load) { quickDrop = true; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Trans14', 'Door0', false, true); delete objectFunc; }; } } instance Door1 of movieClip 10308 { onClipEvent (load) { quickDrop = true; } } instance of movieClip 10443 { onClipEvent (load) { ID = 0; } } } movieClip 17449 { } movieClip 17450 UberbackgroundTrans14 { } movieClip 17452 BackgroundTrans14BG1 { } movieClip 17454 BackgroundTrans14BG2 { } movieClip 17456 BackgroundTrans14BG3 { } movieClip 17457 tehplatformzTrans14 { } movieClip 17458 aPlatzTrans14 { frame 1 { stop(); } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 20; decay = 0.9; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Moving'; accelRL = 0.25; maxRL = 5; anchorDist = 200; trackRot = 90; spring = 40; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Moving'; accelRL = 0.25; maxRL = 5; anchorDist = 200; trackRot = 0; spring = 40; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Moving'; accelRL = 0.5; maxRL = 10; anchorDist = 400; trackRot = -90; spring = 40; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Moving'; accelRL = 0.5; maxRL = 10; anchorDist = 400; trackRot = 0; spring = 40; decay = 0.8; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Seesaw'; spring = 500; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Seesaw'; spring = 500; } } } movieClip 17460 ForegroundTrans14 { } movieClip 17462 { frame 1 { cacheAsBitmap = true; } } movieClip 17464 { frame 1 { cacheAsBitmap = true; } } movieClip 17466 UberForegroundTrans14 { } movieClip 17467 BLayerTrans14 { instance JumpPad0 of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 25; FloatUp = 12; launchAngle = 60; still = true; } } } movieClip 17468 InteractLayerTrans14 { instance MaxX of movieClip 10736 { onClipEvent (load) { _root.MaxX = -_x; } } instance MaxY of movieClip 10736 { onClipEvent (load) { _root.MaxY = -_y; } } instance Door0 of movieClip 10308 { onClipEvent (load) { custom = function () { onEnterFrame = function () { _root.Char.centerX = _x; _root.Char.JumpFunc(24); _root.Char.FloatUp = 12; _root.Char.moveRL = 5; _root.Char.Still = true; delete onEnterFrame; gotoAndStop(2); }; }; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Trans13', 'Door1', false, true); delete objectFunc; }; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Trans15', 'Door0', false, true); delete objectFunc; }; } } } movieClip 17469 { } movieClip 17471 BackgroundTrans15BG1 { } movieClip 17473 BackgroundTrans15BG2 { } movieClip 17475 BackgroundTrans15BG3 { } movieClip 17477 tehwallzTrans15 { } movieClip 17479 tehgroundTrans15 { } movieClip 17481 ForegroundTrans15 { } movieClip 17483 UberForegroundTrans15 { } movieClip 17484 InteractLayerTrans15 { instance MaxX of movieClip 10736 { onClipEvent (load) { _root.MaxX = -_x; } } instance MaxY of movieClip 10736 { onClipEvent (load) { _root.MaxY = -_y; } } instance Door0 of movieClip 10308 { onClipEvent (load) { quickDrop = true; } } instance of movieClip 10440 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.scrollEngine = _root.CharScroll; delete objectFunc; }; } } instance of movieClip 10440 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.Char.gotoAndStop('null'); _root.ChangeLevel('Bonus25', 'Door0', false, false); delete objectFunc; }; } } instance Door1 of movieClip 10308 { onClipEvent (load) { quickDrop = true; vanish = true; runningStart = true; _xscale = -100; } } instance of movieClip 10443 { onClipEvent (load) { ID = 1; } } } movieClip 17485 { } movieClip 17487 BackgroundBonus25BG2 { } movieClip 17489 tehwallzBonus25 { } movieClip 17491 tehgroundBonus25 { } movieClip 17492 tehplatformzBonus25 { } movieClip 17493 aPlatzBonus25 { frame 1 { stop(); } instance of movieClip 10109 { onClipEvent (load) { Status = 'Moving'; accelRL = 0.5; maxRL = 10; anchorDist = 400; trackRot = 0; spring = 40; decay = 0.8; startOnLand = true; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Moving'; accelRL = 0.5; maxRL = 10; anchorDist = 300; trackRot = -90; spring = 40; decay = 0.8; startOnLand = true; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Seesaw'; spring = 5000; dampen = 0.999; steady = false; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Seesaw'; spring = 5000; dampen = 0.999; steady = false; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Mushy'; spring = 20; decay = 0.9; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Moving'; accelRL = 1; maxRL = 20; anchorDist = 300; trackRot = -90; spring = 40; decay = 0.8; startOnLand = true; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Moving'; accelRL = 1; maxRL = 20; anchorDist = 300; trackRot = -90; spring = 40; decay = 0.8; startOnLand = true; } } } movieClip 17495 ForegroundBonus25 { } movieClip 17497 { } movieClip 17498 { frame 1 { stop(); } frame 120 { _root.ChangeLevel('Level6', 'Door8', false, false); } frame 124 { stop(); } } movieClip 17499 UberForegroundBonus25 { } movieClip 17500 BLayerBonus25 { instance JumpPad0 of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 25; FloatUp = 12; launchAngle = 60; still = true; } } } movieClip 17502 { frame 1 { _name = 'object' + _root.objectCount; thisID = _root.objectCount; ++_root.objectCount; objectFunc = function (ex, ey, eRL, eUD, fromChar) { _root.slideLoop.stop(); _root.rollLoop.stop(); fromChar.SnapTo = this; _root.UberForeground.dye.play(); _root.Char.targetX = _x - 40; _root.Char.gotoAndStop('acceptCone'); delete objectFunc; }; stop(); } frame 93 { stop(); } } movieClip 17503 InteractLayerBonus25 { instance MaxX of movieClip 10736 { onClipEvent (load) { _root.MaxX = -_x; } } instance MaxY of movieClip 10736 { onClipEvent (load) { _root.MaxY = -_y; } } instance Door0 of movieClip 10308 { onClipEvent (load) { quickDrop = true; vanish = true; runningStart = true; } } instance of movieClip 10440 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.currentCheckPoint = this; delete objectFunc; }; } } instance of movieClip 10440 { onClipEvent (load) { objectFunc = function (ex, ey, eRL, eUD, fromChar) { _root.HurtPants(0, fromChar); _root.Char.gotoAndStop('FrontSlam'); _root.Char._x = _root.currentCheckPoint._x; _root.Char._y = _root.currentCheckPoint._y - 200; _root.CharYPoint = _root.Char._y; _root.Char._xscale = 100; _root.Char._rotation = 0; _root.Char.moveRL = 0; _root.Char.moveUD = -5; _root.Char.Still = true; }; } } instance Door1 of movieClip 10308 { onClipEvent (load) { quickDrop = true; vanish = true; runningStart = true; } } instance of movieClip 10440 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.currentCheckPoint = this; delete objectFunc; }; } } instance Door2 of movieClip 10308 { onClipEvent (load) { quickDrop = true; vanish = true; runningStart = true; } } instance of movieClip 10440 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.currentCheckPoint = this; delete objectFunc; }; } } instance of movieClip 10440 { onClipEvent (load) { _alpha = 0; objectFunc = function () { _root.Char.gotoAndStop('null'); _root.ChangeLevel('Trans15', 'Door1', false, false); delete objectFunc; }; } } instance of movieClip 10443 { onClipEvent (load) { ID = 2; } } } movieClip 17504 { } movieClip 17505 { frame 1 { stop(); } instance of movieClip 8566 elitePirate { onClipEvent (load) { _xscale = -100; piratePal = 'Parrot'; } } instance of movieClip 9302 { onClipEvent (load) { _xscale = -100; } } instance of movieClip 9488 Frog { onClipEvent (load) { _xscale = -100; } } instance of movieClip 68 JumpPad { onClipEvent (load) { Thrust = 30; } } instance of movieClip 10109 { onClipEvent (load) { Status = 'Seesaw'; spring = 100; } } instance Cannon of movieClip 10135 { onClipEvent (load) { spawnerType = 'combo'; spawnLevelStart = 3; spawnLevelAdvance = 0.5; thisSpawnerArray = _root.SpawnerArray; } } instance of movieClip 10314 { onClipEvent (load) { ID = 2; switchIt = true; cameraDist = 600; camFacing = -1; cameraOn = this; } } instance of movieClip 10321 { onClipEvent (load) { ID = 1; } } instance Door1 of movieClip 10438 { onClipEvent (load) { worm = 'Bonus4'; } } instance of movieClip 10440 { onClipEvent (load) { _alpha = 0; objectFunc = function () { delete _root.Char.onEnterFrame; _root.Char._alpha = 0; _root.ChangeLevel('Level7', 'Door0', false, false); delete objectFunc; }; } } instance of movieClip 10443 { onClipEvent (load) { ID = 0; } } } frame 4 { function downloadForeground(levelName) { trace('downloadForeground'); loadMovie(basePath + 'Levels/' + levelName + '.swf', foregroundContainer); timerClip.onEnterFrame = function () { if (foregroundContainer.getBytesLoaded() > 1 && foregroundContainer.getBytesLoaded() >= foregroundContainer.getBytesTotal()) { delete timerClip.onEnterFrame; onForegroundComplete(); } }; } function onForegroundComplete() { trace('foreground downloaded'); downloadNextLevel(); } charContainer = createEmptyMovieClip('charContainer', 502); soundContainer = createEmptyMovieClip('soundContainer', 1001); EveryFrame = function (ledgeGrab) { if (this.CheckBaddieHit(this.centerX, this.centerY + this.isTall / 2, this.mRL(this.moveRL), this.mUD(this.moveRL))) { return true; } else { if (this.JumpListener(false)) { return true; } else { this.RLStatus = this.RLFunc(false, false, ledgeGrab); return false; } } }; JumpListener = function (jumpAgain) { if (!this.JumpIsDown()) { this.SisDown = false; } if (this.JumpIsDown() && !this.SisDown) { this.SisDown = true; if (this.isTall < 30) { this.isTall = 50; this.centerX = this._x + (this.isTall / 2) * Math.sin(this._rotation * 0.0174532925199433); this.centerY = this._y - (this.isTall / 2) * Math.cos(this._rotation * 0.0174532925199433); } this.fliprot = this._rotation / 8; this.FloatUp = 6; playSound('CharJump', this._x, 100); this.JumpFunc(12, false, false, jumpAgain, false); return true; } else { return false; } }; CharJumpFunc = function (jumper, still, rolling, jumpAgain, skipStart) { if (still == undefined) { still = false; } if (skipStart == undefined) { skipStart = false; } _root.slideLoop.stop(); _root.rollLoop.stop(); this.terminalVelocity = 0; this.fakeUD = 0; this._x = this.centerX; this._y = this.centerY + this.isTall / 2; if (this.aBadOn > -1) { this.aBadOn = -1; } while (testAll(this.centerX, this.centerY + this.isTall / 2, true)) { messagePopup('jumpFunc --'); this.centerX += Math.sin(this.smokeRot * 0.0174532925199433); this.centerY -= Math.cos(this.smokeRot * 0.0174532925199433); } this.fakeRL = this.moveRL; if (this.aPlatzOn > -1) { if (aPlatz['aPlatz' + this.aPlatzOn].onCharLeave != undefined) { aPlatz['aPlatz' + this.aPlatzOn].onCharLeave(jumper, this); } aPlatz['aPlatz' + this.aPlatzOn].getPlatSpeed(this); this.fakeRL += this.platRL; if (this.platUD < 0) { this.fakeUD += this.platUD; } if (_root['BonusPlat' + aPlatz['aPlatz' + this.aPlatzOn].Status + 'Rest'] != undefined) { aPlatz['aPlatz' + this.aPlatzOn].onEnterFrame = _root['BonusPlat' + aPlatz['aPlatz' + this.aPlatzOn].Status + 'Rest']; } this.platUD = 0; this.platRL = 0; this.aPlatzOn = -1; } if (jumpAgain) { this.fakeRL = this.jumpAgainRL; } else { this.jumpAgainRL = this.fakeRL; this.smokeRot = this._rotation; this._rotation = 0; } messagePopup(Math.abs(this.smokeRot)); if (Math.abs(this.smokeRot) < 90 && jumper > 5 && this.moveRL * this.smokeRot > 0) { this.jumprot = this.smokeRot * 0.5; this.moveRL *= 0.5; } this.jumprot = this.smokeRot; this.fakeUD -= jumper; angle = -this.jumprot * Math.PI / 180; if (jumper > 5) { this.moveRL = Math.cos(angle) * this.fakeRL + Math.sin(angle) * this.fakeUD; this.moveUD = Math.cos(angle) * this.fakeUD - Math.sin(angle) * this.fakeRL * 0.8; } else { this.moveRL = Math.cos(angle) * this.fakeRL + Math.sin(angle) * this.fakeUD; this.moveUD = Math.cos(angle) * this.fakeUD - Math.sin(angle) * this.fakeRL; } if (tehwallz.movingWallz.gears.smokeRL != undefined) { this.moveRL += tehwallz.movingWallz.gears.smokeRL / 2; tehwallz.movingWallz.gears.smokeRL = 0; delete tehwallz.movingWallz.gears.onEnterFrame; } if (this.fliprot == undefined) { this.fliprot = 0; } if (Math.abs(this.smokeRot) < 70 && this.smokeRot * this.moveRL < 0) { this.fliprot = 0; } messagePopup(this.fliprot); this.predictGround(); if (water.hitTest(this._x + this.moveRL, this._y + this.moveUD, true) && !water.hitTest(this._x + this.moveRL, this._y + this.moveUD - 5, true) && Math.abs(this.moveRL) > 10) { this.centerX += this.moveRL; this.centerY += this.moveUD; this.gotoAndStop('waterSlide'); } else { if (water.hitTest(this._x, this._y - this.isTall * 0.75, true)) { this.isTall = 50; this.smokeRot = -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433; this.eRot = this.smokeRot; this.swimRL = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); this.resetJumpStuff(); this.gotoAndStop('Swim'); } else { if (this.isRiding != 'nothing') { this.gotoAndStop('charJumpRide'); } else { if (this.isTall < 30) { this.tilt = 0; this.smokeRot = 0; this.gotoAndStop('Jump'); this.CharJump.gotoAndStop(12); this.CharJump._y = -12.5; } else { if (this.groundHold > 0) { this.gotoAndStop('pencilDrawJump'); } else { if (jumper <= 2) { this.isTall = 50; if (Math.abs(this.moveRL) > 5) { this.jumpAgainN = 5; } this.gotoAndStop('Jump'); if (this.moveUD < -2 && !this.TempStill && (this._xscale > 0 && this.LeftIsDown() || this._xscale < 0 && this.RightIsDown())) { this.hairRL = 0; this.fliprot = 0; this.canSpin = false; this.CharJump.gotoAndStop(2); if (Math.abs(this.moveRL) < 2) { this.moveRL = -this._xscale / 50; } } else { if (Math.abs(this.moveRL) < 5 && this.fliprot == 0 && Math.abs(this.moveUD + 5) < 5) { this.CharJump.gotoAndStop(14); } else { if (Math.abs(this.moveRL) > 10 && this.moveRL * this._xscale > 0) { this.CharJump.gotoAndStop(13); } else { if (Math.abs(this.fakeRL) > Math.abs(jumper) * 0.8 && this.moveRL * this._xscale > 0 && !(Math.abs(this.smokeRot) > 45 && this.fliprot != 0)) { this.CharJump.gotoAndStop(4); } else { if (Math.abs(this.smokeRot) > 45 && Math.abs(this.fakeRL) > 15 && this.fliprot != 0) { this.CharJump.gotoAndStop(9); this.jumpAgainN = 0; } else { if (Math.abs(this.smokeRot) > 100) { this.CharJump.gotoAndStop(9); this.jumpAgainN = 0; this.CharJump.matrixBackflip.gotoAndPlay(6); } else { this.fliprot = 0; this.CharJump.gotoAndStop(1); } } } } } } if (Math.abs(this.jumprot) > 45) { this.TempStill = true; } else {} } else { this.isTall = 50; this.gotoAndStop('Jump'); this.tempRL = 0; if (this.RightIsDown()) { this.tempRL = 5; } else { if (this.LeftIsDown()) { this.tempRL = -5; } } if (Math.abs(this.moveRL) < 5 && this.tempRL != 0 && this._xscale * this.tempRL > 0 && (predictJump(this._x, this._y, this.tempRL, this.moveUD, this.FloatUp, this.isTall, this._alpha))[0] > 15 && jumper > 5 && false) { this.moveRL = this.tempRL; this.Still = true; this.CharJump.gotoAndStop(6); } else { if (still) { this.Still = true; this.CharJump.gotoAndStop(1); } else { this.Still = false; this.FloatStill = false; if (!this.TempStill && (this._xscale > 0 && this.LeftIsDown() || this._xscale < 0 && this.RightIsDown())) { this.hairRL = 0; this.fliprot = 0; this.canSpin = false; this.CharJump.gotoAndStop(2); if (Math.abs(this.moveRL) < 2) { this.moveRL = -this._xscale / 50; } } else { if (this.isCarrying != 'nothing') { this.fliprot = 0; this.CharJump.gotoAndStop(8); } else { if (Math.abs(this.smokeRot) > 45 && this.fliprot != 0) { if (Math.abs(this.moveRL) < 6 && Math.abs(this.smokeRot) > 100) { this.fliprot = 0; this.CharJump.gotoAndStop(1); } else { this.CharJump.gotoAndStop(9); } } else { if (Math.abs(this.moveRL) > Math.abs(this.moveUD * 0.9) && this.moveRL * this._xscale > 0) { this.fliprot = 0; this.CharJump.gotoAndStop(4); } else { if (this.canSpin) { this.fliprot = 0; this.CharJump.gotoAndStop(1); if (jumper < 30) { this.CharJump.CharRegJump.CharJumpTwirl.gotoAndPlay(11); } } else { if (this._xscale < 0 && this.LeftIsDown() || this._xscale > 0 && this.RightIsDown()) { this.fliprot = 0; this.CharJump.gotoAndStop(1); if (Math.abs(this.moveRL) < 4) { this.moveRL = this._xscale / 50; } } else { this.fliprot = 0; this.CharJump.gotoAndStop(1); } } } } } } } } } } } } } } if (!skipStart) { this.JumpGuide(); } }; predictJump = function (eX, eY, eRL, eUD, eFloat, eTall, eAlpha) { var v7 = 0; var v6 = 1; while (v6 < 100) { if (RightIsDown() && eRL < 8) { if (eRL <= 0) { ++eRL; } else { eRL += 0.5; } } if (LeftIsDown() && eRL > -8) { if (eRL >= 0) { --eRL; } else { eRL -= 0.5; } } if (_root.tehwallz.hitTest(eX + eRL, eY + eUD, true) && !_root.tehwallz.hitTest(eX, eY + eUD, true)) { return v7; } if (eFloat > 0) { --eFloat; } else { if (eUD < 25) { ++eUD; } else { ++v7; } } if (eUD > 0) { if (_root.quickLandTest(eX, eY, eRL, eUD, eTall, eAlpha) != 'nothing') { return [v7, eX, eY]; } } eX += eRL; eY += eUD; ++v6; } return v7; }; JumpGuide = function (hurt, lander) { oY = this._y; this.temp = false; if (this.downTime > 0) { --this.downTime; } if (this.jumpAgainN > 0) { --this.jumpAgainN; if (this.JumpListener(true)) { return 'jumpBreak'; } } if (this.smokeRot > 180) { this.smokeRot -= 360; } else { if (this.smokeRot < -180) { this.smokeRot += 360; } } if (Math.abs(this.tilt - this.smokeRot) > 180) { if (this.tilt > this.smokeRot) { this.tilt -= 360; } else { this.tilt += 360; } } this.WallHitLeft = false; this.WallHitRight = false; temp = this.tehwallzSuperTest(this.spread + 2, this.moveRL); if (temp) { this.smokeRot *= 0.8; var v3 = 0; while (v3 < Math.abs(this.moveRL) + 10) { if (!this.tehwallzSuperTest(this.spread + 3, 0)) { this._x += temp; this.centerX += temp; } else { if (this.tehwallzSuperTest(this.spread + 2, 0)) { this._x -= temp; this.centerX -= temp; } else { break; } } ++v3; } this.fakeRL = this.moveRL; this.moveRL = 0; this.temp = 'Wall'; if (this.wallJumpFell) { if (this._y > this.wallFellY + 100) { this.resetJumpStuff(); } } if (!hurt && !this.wallJumpFell) { if (tehwallz.hitTest(this.centerX + 20 + this.fakeRL, this.centerY + 5 + this.moveUD, true) && tehwallz.hitTest(this.centerX + 20 + this.fakeRL, this.centerY - 40 + this.moveUD, true) && !this.LeftIsDown() && (this.RightIsDown() || this.wallJumped || this.Still || this.fakeRL > 5 || this.UpIsDown() || this.DownIsDown())) { if (this.fakeRL > 0) { this.WallHitRight = true; } } else { if (tehwallz.hitTest(this.centerX - 20 + this.fakeRL, this.centerY + 5 + this.moveUD, true) && tehwallz.hitTest(this.centerX - 20 + this.fakeRL, this.centerY - 40 + this.moveUD, true) && !this.RightIsDown() && (this.LeftIsDown() || this.wallJumped || this.Still || this.fakeRL < -5 || this.UpIsDown() || this.DownIsDown())) { if (this.fakeRL < 0) { this.WallHitLeft = true; } } } } } else { temp = this.tehwallzSuperTest(this.spread + 2, 0); var v3 = 0; while (v3 < 20) { if (this.tehwallzSuperTest(this.spread + 2, 0)) { this._x -= temp; this.centerX -= temp; } else { break; } ++v3; } for (;;) { if (!(tehwallz.hitTest(this._x + this.spread / 2, this._y, true) && tehwallz.hitTest(this._x - this.spread / 2, this._y, true))) break; --this.centerY; --this._y; messagePopup('charY--'); } } if (!testAll(this._x + this.moveRL, this._y + 10 + this.moveUD, false, false)) { if (water.hitTest(this._x + this.moveRL, this._y + this.moveUD / 2, true) && !water.hitTest(this._x + this.moveRL, this._y - this.moveUD / 2, true)) { this.waterY = this._y; while (_root.water.hitTest(this._x + this.moveRL, this.waterY, true)) { --this.waterY; } while (!_root.water.hitTest(this._x + this.moveRL, this.waterY + 1, true)) { ++this.waterY; } _root.waterSplash(this._x + this.moveRL, this.waterY, 100 + this.moveUD * 5, 0); edepth = _root.waterSplash(this._x + this.moveRL, this.waterY, -(100 + this.moveUD * 5), 0); _root.playSound('swimCannonball', this._x, 50 + this.moveUD * 10); _root.soundContainer.quickSound('waterBackSplash', 50 + this.moveUD * 10, _root['waterSplat' + edepth]); this.moveUD *= 0.9; } else { if (!water.hitTest(this._x + this.moveRL, this._y + this.moveUD / 2, true) && water.hitTest(this._x + this.moveRL, this._y - this.moveUD / 2, true)) { this.waterY = this._y; while (_root.water.hitTest(this._x + this.moveRL, this.waterY, true)) { --this.waterY; } while (!_root.water.hitTest(this._x + this.moveRL, this.waterY + 1, true)) { ++this.waterY; } _root.waterSplash(this._x + this.moveRL, this.waterY, 50 + -this.moveUD * 5, 0); edepth = _root.waterSplash(this._x + this.moveRL, this.waterY, -(50 + -this.moveUD * 5), 0); _root.playSound('swimDive', this._x, 50 + this.moveUD * 10); _root.soundContainer.quickSound('waterBackSplash', 50 + this.moveUD * 10, _root['waterSplat' + edepth]); } } } if (this.BonusPlatFind()) { this.BonusPlatJumpLand(hurt, anchor, breakIt, 'aPlatz', lander); return this.temp; } if (tehhangz.hitTest(this._x + this.moveRL, this._y - this.isTall + this.moveUD, true) && !tehhangz.hitTest(this._x - this.moveRL, this._y - (this.isTall + 2) - this.moveUD, true) && this.moveUD > 0 && this._alpha > 60) { this.HangIt(); return 'hang'; return this.temp; } if (Math.abs(this.moveRL) > Math.abs(this.moveUD) && Math.abs(this.moveRL) > 5 && !water.hitTest(this._x + this.moveRL, this._y - 5 - this.moveUD, true) && water.hitTest(this._x + this.moveRL, this._y + this.moveUD, true) && this.CharJump._currentframe != 7) { this.waterY = this._y; for (;;) { if (!(_root.water.hitTest(this.centerX + this.spread + this.moveRL * 2, this.waterY, true) || _root.water.hitTest(this.centerX - this.spread + this.moveRL * 2, this.waterY, true))) break; --this.waterY; } for (;;) { if (!(!_root.water.hitTest(this.centerX + this.spread + this.moveRL * 2, this.waterY + 1, true) && !_root.water.hitTest(this.centerX - this.spread + this.moveRL * 2, this.waterY + 1, true))) break; ++this.waterY; } this.centerX += this.moveRL; this.centerY += this.moveUD; this._x = this.centerX + this.centerReach * Math.sin((this._rotation + 180) * 0.0174532925199433); this._y = this.centerY - this.centerReach * Math.cos((this._rotation + 180) * 0.0174532925199433); if (lander == 'rolling') { this.isTall = 25; this.shouldRot = -Math.atan2(-this.moveRL, 0) / 0.0174532925199433; this.eRot = this.shouldRot; this.swimRL = this.moveRL; this.gotoAndStop('waterRoll'); } else { if (Math.abs(this.moveRL) > 10) { this.gotoAndStop('waterSlide'); } } return this.temp; } if (this.CharBallTest(hurt, lander)) { if (this.temp) { this.moveRL = this.fakeRL; this.moveUD = this.fakeUD; this.JumpLandFrame(hurt, true, false, 'ball', lander); } else { this.temp = 'Bounce'; } return this.temp; } if (tehwallz.hitTest(this._x + this.spread + this.moveRL, this._y + this.moveUD, true) || tehwallz.hitTest(this._x - this.spread + this.moveRL, this._y + this.moveUD, true)) { if (tehwallz.hitTest(this._x + this.spread + this.moveRL, this._y + this.moveUD, true) && tehwallz.hitTest(this._x - this.spread + this.moveRL, this._y + this.moveUD, true)) { this.wallX = this._x + this.moveRL; this.wallY = this._y + this.moveUD; tempLand = 'wallBoth'; } else { if (tehwallz.hitTest(this._x + this.spread + this.moveRL, this._y + this.moveUD, true)) { this.wallX = this._x + this.spread + this.moveRL; this.wallY = this._y + this.moveUD; tempLand = 'wallRight'; } else { if (tehwallz.hitTest(this._x - this.spread + this.moveRL, this._y + this.moveUD, true)) { this.wallX = this._x - this.spread + this.moveRL; this.wallY = this._y + this.moveUD; tempLand = 'wallLeft'; } else { tempLand = 'wallGay'; } } } while (tehwallz.hitTest(this.wallX, this.wallY, true)) { --this.wallY; } messagePopup('wallland'); this.JumpLand(hurt, true, false, tempLand, lander); return this.temp; } if (tehplatformz.hitTest(this._x + this.RAnchx(this.smokeRot * 0.0174532925199433) + this.moveRL, this._y + this.RAnchy(this.smokeRot * 0.0174532925199433) + this.moveUD, true) || tehplatformz.hitTest(this._x + this.LAnchx(this.smokeRot * 0.0174532925199433) + this.moveRL, this._y + this.LAnchy(this._rotation * 0.0174532925199433) + this.moveUD, true)) { this.nowSpeed = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); this.incRL = this.moveRL; this.incUD = this.moveUD; if (this.nowSpeed < 1) { this.nowSpeed = 1; } this.incRL *= 1 / this.nowSpeed; this.incUD *= 1 / this.nowSpeed; this.extRL = 0; this.extUD = 0; tempX = this._x; tempY = this._y; v3 = 0; while (v3 < this.nowSpeed) { this.extRL += this.incRL; this.extUD += this.incUD; if (tehplatformz.hitTest(tempX + this.RAnchx(this._rotation * 0.0174532925199433) + this.extRL, tempY + this.RAnchy(this._rotation * 0.0174532925199433) + this.extUD + 2, true) || tehplatformz.hitTest(tempX + this.LAnchx(this._rotation * 0.0174532925199433) + this.extRL, tempY + this.LAnchy(this._rotation * 0.0174532925199433) + this.extUD + 2, true)) { if (tehplatformz.hitTest(tempX + this.RAnchx(this._rotation * 0.0174532925199433) + this.extRL + this.incRL * 10, tempY + this.RAnchy(this._rotation * 0.0174532925199433) + this.extUD + this.incUD * 10, true) && tehplatformz.hitTest(tempX + this.RAnchx(this._rotation * 0.0174532925199433) + this.extRL, tempY + this.RAnchy(this._rotation * 0.0174532925199433) + this.extUD + 2, true) && !tehplatformz.hitTest(tempX + this.RAnchx(this._rotation * 0.0174532925199433) + this.extRL - this.incRL * 10, tempY + this.RAnchy(this._rotation * 0.0174532925199433) + this.extUD - this.incUD * 10, true) && !tehplatformz.hitTest(tempX + this.RAnchx(this._rotation * 0.0174532925199433) + this.extRL, tempY + this.RAnchy(this._rotation * 0.0174532925199433) + this.extUD - 2, true) || tehplatformz.hitTest(tempX + this.LAnchx(this._rotation * 0.0174532925199433) + this.extRL + this.incRL * 10, tempY + this.LAnchy(this._rotation * 0.0174532925199433) + this.extUD + this.incUD * 10, true) && tehplatformz.hitTest(tempX + this.LAnchx(this._rotation * 0.0174532925199433) + this.extRL, tempY + this.LAnchy(this._rotation * 0.0174532925199433) + this.extUD + 2, true) && !tehplatformz.hitTest(tempX + this.LAnchx(this._rotation * 0.0174532925199433) + this.extRL - this.incRL * 10, tempY + this.LAnchy(this._rotation * 0.0174532925199433) + this.extUD - this.incUD * 10, true) && !tehplatformz.hitTest(tempX + this.LAnchx(this._rotation * 0.0174532925199433) + this.extRL, tempY + this.LAnchy(this._rotation * 0.0174532925199433) + this.extUD - 2, true)) { tempX += this.extRL; tempY += this.extUD; for (;;) { if (!(tehplatformz.hitTest(tempX + this.RAnchx(this._rotation * 0.0174532925199433), tempY + this.RAnchy(this._rotation * 0.0174532925199433), true) || tehplatformz.hitTest(tempX + this.LAnchx(this._rotation * 0.0174532925199433), tempY + this.LAnchy(this._rotation * 0.0174532925199433), true))) break; messagePopup('platY --'); --tempY; } tempRight = tehplatformz.hitTest(tempX + this.RAnchx(this._rotation * 0.0174532925199433), tempY + this.RAnchy(this._rotation * 0.0174532925199433) + 5, true) || tehplatformz.hitTest(tempX + this.RAnchx(this._rotation * 0.0174532925199433), tempY + this.RAnchy(this._rotation * 0.0174532925199433) + 40, true); tempLeft = tehplatformz.hitTest(tempX + this.LAnchx(this._rotation * 0.0174532925199433), tempY + this.LAnchy(this._rotation * 0.0174532925199433) + 5, true) || tehplatformz.hitTest(tempX + this.LAnchx(this._rotation * 0.0174532925199433), tempY + this.LAnchy(this._rotation * 0.0174532925199433) + 40, true); if (tempRight && tempLeft) { tempLand = 'platBoth'; } else { if (tempRight) { tempLand = 'platRight'; } else { if (tempLeft) { tempLand = 'platLeft'; } else { tempLand = 'platGay'; } } } this.wallX = tempX; this.wallY = tempY; this.centerX = this._x + this.centerReach * Math.sin(this._rotation * 0.0174532925199433); this.centerY = this._y - this.centerReach * Math.cos(this._rotation * 0.0174532925199433); this.JumpLand(hurt, true, true, tempLand, lander, extRL, extUD); return false; } } ++v3; } this.temp = this.crazyWallsTests(hurt, lander, badPwn); if (this.temp != false) { return this.temp; } else { this._x += this.moveRL; this.centerX += this.moveRL; this._y += this.moveUD; this.centerY += this.moveUD; } return false; return this.temp; } if (tehwallz.hitTest(this.centerX + 10 + this.moveRL, this.centerY - this.isTall / 2 + this.moveUD, true) || tehwallz.hitTest(this.centerX - 10 + this.moveRL, this.centerY - this.isTall / 2 + this.moveUD, true)) { movePerformed('headlanding'); playSound('hitHead', this._x, Math.abs(this.moveUD * 8)); this.wallY = this.centerY - this.isTall / 2 + this.moveUD; for (;;) { if (!(tehwallz.hitTest(this.centerX + 10 + this.moveRL, this.wallY, true) && tehwallz.hitTest(this.centerX - 10 + this.moveRL, this.wallY, true))) break; messagePopup('head--'); this.wallY += this.UDy(1); } y1 = this._y + this.UDy(-this.isTall) + this.moveUD - this.wallY; if (Math.abs(this.smokeRot) > 80 && this.CharJump._currentframe == 9 && this.moveUD > 0) { this.moveUD *= -0.5; y1 *= -0.5; if (this.moveUD > -10) { this.moveUD = -10; } if (y1 > -10) { y1 = -10; } this.fliprot = this.smokeRot; this.smokeRot = 0; this.tilt = 0; this.gotoAndStop('FrontSlam'); } else { this.moveUD *= -0.1; y1 *= -1; } this.centerY = y1 + this.isTall / 2 + this.wallY; this.centerX += this.moveRL; this._x = this.centerX + (this.isTall / 2) * Math.sin((this._rotation + 180) * 0.0174532925199433); this._y = this.centerY - (this.isTall / 2) * Math.cos((this._rotation + 180) * 0.0174532925199433); return this.temp; } if (this.WallHitRight) { this.WallIt(-1); return this.temp; } if (this.WallHitLeft) { this.WallIt(1); return this.temp; } this.temp = this.crazyWallsTests(hurt, lander, badPwn); if (this.temp != false) { return this.temp; return this.temp; } this.centerX += this.moveRL; this.centerY += this.moveUD; this._x = this.centerX + this.centerReach * Math.sin((this._rotation + 180) * 0.0174532925199433); this._y = this.centerY - this.centerReach * Math.cos((this._rotation + 180) * 0.0174532925199433); return this.temp; }; charBallRes = 10; CharBallTest = function (hurt, lander) { this.centerReach = this.isTall / 2; this.centerX = this._x; this.centerY = this._y - this.centerReach; rotItems = 0; tempYTotal = 0; tempXTotal = 0; var v4 = 0; while (v4 < charBallRes) { var v3 = Math.PI * (v4 + 0.5) * (2 / charBallRes); var v6 = -Math.sin(v3); var v5 = Math.cos(v3); if (tehground.hitTest(this.centerX + this.moveRL + v6 * this.centerReach + v6, this.centerY + this.moveUD + v5 * this.centerReach + v5, true)) { ++rotItems; tempXTotal += v6; tempYTotal += v5; if (rotItems > 8) { break; } _root.ELayer['dot' + v4].gotoAndStop(2); } else { _root.ELayer['dot' + v4].gotoAndStop(1); } if (showDebug) { _root.ELayer['dot' + v4]._x = this.centerX + this.moveRL + v6 * this.centerReach; _root.ELayer['dot' + v4]._y = this.centerY + this.moveUD + v5 * this.centerReach; } ++v4; } this.temp = false; if (rotItems > 8) { tempXTotal = this.moveRL; tempYTotal = this.moveUD; rotItems = 1; } if (rotItems > 0) { this.wallRot = -Math.atan2(tempXTotal / rotItems, tempYTotal / rotItems) / 0.0174532925199433; if (Math.abs(this.wallRot) > 180) { if (this.wallRot > 0) { this.wallRot -= 360; } else { this.wallRot += 360; } } this.oldWallRot = this.wallRot; FindRot(this.wallRot + 180, this.centerX + this.moveRL + this.centerReach * Math.sin((this.wallRot + 180) * 0.0174532925199433), this.centerY + this.moveUD - this.centerReach * Math.cos((this.wallRot + 180) * 0.0174532925199433), 0, this.spread, true, this); if (this.wallX > -9999) { if (Math.abs(this.wallRot - this.oldWallRot) > 180) { if (this.oldWallRot > this.wallRot) { this.oldWallRot -= 360; } else { this.oldWallRot += 360; } } if (Math.abs(this.wallRot - this.oldWallRot) > 50) { messagePopup('> 50'); if (tehwallz.hitTest(this.wallX, this.wallY + 2, true) || tehplatformz.hitTest(this.wallX, this.wallY + 2, true)) { v3 = this.wallRot * Math.PI / 180; } else { this.wallRot = this.oldWallRot; v3 = this.wallRot * Math.PI / 180; this.wallX = this.centerX + this.moveRL + -Math.sin(v3) * this.centerReach; this.wallY = this.centerY + this.moveUD + Math.cos(v3) * this.centerReach; for (;;) { if (!(tehground.hitTest(this.wallX, this.wallY, true) || tehplatformz.hitTest(this.wallX, this.wallY, true) && !tehplatformz.hitTest(this.wallX, this.wallY - 1, true) || tehwallz.hitTest(this.wallX, this.wallY, true) && !tehwallz.hitTest(this.wallX, this.wallY - 1, true))) break; this.wallX += Math.sin(v3); this.wallY -= Math.cos(v3); } } } else { v3 = this.wallRot * Math.PI / 180; } } else { this.wallRot = this.oldWallRot; v3 = this.wallRot * Math.PI / 180; this.wallX = this.centerX + this.moveRL + -Math.sin(v3) * this.centerReach; this.wallY = this.centerY + this.moveUD + Math.cos(v3) * this.centerReach; for (;;) { if (!(tehground.hitTest(this.wallX, this.wallY, true) || tehplatformz.hitTest(this.wallX, this.wallY, true) && !tehplatformz.hitTest(this.wallX, this.wallY - 1, true) || tehwallz.hitTest(this.wallX, this.wallY, true) && !tehwallz.hitTest(this.wallX, this.wallY - 1, true))) break; this.wallX += Math.sin(v3); this.wallY -= Math.cos(v3); } } ex = this.centerX + this.moveRL - this.wallX; ey = this.centerY + this.moveUD - this.wallY; x1 = Math.cos(v3) * ex + Math.sin(v3) * ey; y1 = Math.cos(v3) * ey - Math.sin(v3) * ex; this.fakeRL = Math.cos(v3) * this.moveRL + Math.sin(v3) * this.moveUD; this.fakeUD = Math.cos(v3) * this.moveUD - Math.sin(v3) * this.moveRL; if (this.fakeUD > 0) { this.jumprot = -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433; if (Math.abs(this.wallRot - this.smokeRot) > 180) { if (this.smokeRot > this.wallRot) { this.smokeRot -= 360; } else { this.smokeRot += 360; } } if (Math.abs(this.wallRot - (this.jumprot - 180)) > 180) { if (this.jumprot - 180 > this.wallRot) { this.jumprot -= 360; } else { this.jumprot += 360; } } if (Math.abs(this.wallRot - this.tilt) > 180) { if (this.tilt > this.wallRot) { this.tilt -= 360; } else { this.tilt += 360; } } this.temp = false; y1 += this.centerReach; if (Math.abs(this.wallRot) > 80) { if (this.fakeUD > 10 && Math.abs(this.fakeRL) > this.fakeUD) { y1 = 0; this.fakeUD = 0; if (Math.abs(this.wallRot - this.smokeRot) < 60) { this.temp = true; } } else { if (Math.abs(this.wallRot - this.smokeRot) > 120) { y1 *= -0.5; this.fakeUD *= -0.1; movePerformed('headlanding'); playSound('hitHead', this.centerX, this.fakeUD * 16); } else { y1 = 0; this.fakeUD = 0; } } } else { this.fliprot = 0; if (this.CharJump._currentframe == 9 && Math.abs(this.smokeRot) > 80 && Math.abs(this.wallRot - this.smokeRot) > 80) { y1 *= -0.5; this.fakeUD *= -0.5; if (this.fakeUD > -16) { this.fakeUD = -16; } this.fakeRL *= 0.5; this.fliprot = this.smokeRot; this.smokeRot = 0; this.tilt = 0; movePerformed('headlanding'); playSound('hitHead', this.centerX, this.fakeUD * 16); this.gotoAndStop('FrontSlam'); } else { if (Math.abs(this.wallRot) > 80) { y1 *= -0.5; this.fakeUD *= -0.5; if (this.fakeUD > -16) { this.fakeUD = -16; } } else { if (Math.abs(this.wallRot - this.smokeRot) < 45 || Math.abs(this.fakeRL) < 5 || this.fakeRL * this.wallRot < 0 || hurt || this.DownIsDown() || this.CharJump._currentframe != 3) { y1 = 0; this.temp = true; } else { y1 = 0; this.fakeUD = 0; } } } } y1 -= this.centerReach; this.moveRL = Math.cos(v3) * this.fakeRL - Math.sin(v3) * this.fakeUD; this.moveUD = Math.cos(v3) * this.fakeUD + Math.sin(v3) * this.fakeRL; this.centerX = this.wallX + (Math.cos(v3) * x1 - Math.sin(v3) * y1); this.centerY = this.wallY + (Math.cos(v3) * y1 + Math.sin(v3) * x1); if (this.temp) { this._rotation = this.wallRot; this._x = this.centerX + this.centerReach * Math.sin((this._rotation + 180) * 0.0174532925199433); this._y = this.centerY - this.centerReach * Math.cos((this._rotation + 180) * 0.0174532925199433); if (this.isTall < 30) { this.fallView = -(this.fakeRL * 7.5 * Math.cos((this.wallRot + 90) * 0.0174532925199433)); this.temp = true; return true; } else { if (testAll(this._x + this.RLx(this.fakeRL + 2) + this.RAnchx(this._rotation * 0.0174532925199433) + this.UDx(this.WasSix()), this._y + this.RLy(this.fakeRL + 2) + this.RAnchy(this._rotation * 0.0174532925199433) + this.UDy(this.WasSix())) && testAll(this._x + this.RLx(this.fakeRL - 2) + this.LAnchx(this._rotation * 0.0174532925199433) + this.UDx(this.WasSix()), this._y + this.RLy(this.fakeRL - 2) + this.LAnchy(this._rotation * 0.0174532925199433) + this.UDy(this.WasSix()))) { this.fallView = -(this.fakeRL * 7.5 * Math.cos((this.wallRot + 90) * 0.0174532925199433)); this.temp = true; return true; } else { this.fakeUD = 0; this._rotation = 0; this.moveRL = Math.cos(v3) * this.fakeRL - Math.sin(v3) * this.fakeUD; this.moveUD = Math.cos(v3) * this.fakeUD + Math.sin(v3) * this.fakeRL; this._x = this.centerX; this._y = this.centerY + this.centerReach; this.temp = false; this.CharJump.gotoAndStop(14); return true; } } } else { if (Math.abs(this.wallRot) < 80) { this.smokeRot += (this.wallRot - this.smokeRot) / 10; } this._x = this.centerX; this._y = this.centerY + this.centerReach; this.fallView = -(this.fakeRL * 7.5 * Math.cos((this.wallRot + 90) * 0.0174532925199433)); this.temp = false; return true; } } else { return false; } } }; SwimGuide = function (hurt) { this.CheckBaddieHit(this.centerX, this.centerY, this.moveRL, this.moveUD); this.fallView *= 0.9; this.centerReach = this.isTall / 2; this.centerX = this._x; this.centerY = this._y - this.centerReach; rotItems = 0; tempYTotal = 0; tempXTotal = 0; var v4 = 0; while (v4 < charBallRes) { var v3 = Math.PI * (v4 + 0.5) * (2 / charBallRes); var v6 = -Math.sin(v3); var v5 = Math.cos(v3); if (tehground.hitTest(this.centerX + this.moveRL + v6 * this.centerReach + v6, this.centerY + this.moveUD + v5 * this.centerReach + v5, true) || tehwallz.hitTest(this.centerX + this.moveRL + v6 * this.centerReach + v6, this.centerY + this.moveUD + v5 * this.centerReach + v5, true)) { ++rotItems; tempXTotal += v6; tempYTotal += v5; _root.ELayer['dot' + v4].gotoAndStop(2); } else { _root.ELayer['dot' + v4].gotoAndStop(1); } if (showDebug) { _root.ELayer['dot' + v4]._x = this.centerX + this.moveRL + v6 * this.centerReach; _root.ELayer['dot' + v4]._y = this.centerY + this.moveUD + v5 * this.centerReach; } ++v4; } this.RLStatus = false; if (rotItems > 8) { rotTotal = -Math.atan2(this.moveRL, this.moveUD); rotItems = 1; } if (rotItems > 0) { this.wallRot = -Math.atan2(tempXTotal / rotItems, tempYTotal / rotItems) / 0.0174532925199433; if (Math.abs(this.wallRot) > 180) { if (this.wallRot > 0) { this.wallRot -= 360; } else { this.wallRot += 360; } } this.oldWallRot = this.wallRot; FindRot(this.wallRot + 180, this.centerX + this.moveRL + this.centerReach * Math.sin((this.wallRot + 180) * 0.0174532925199433), this.centerY + this.moveUD - this.centerReach * Math.cos((this.wallRot + 180) * 0.0174532925199433), 0, this.spread, true, this); if (this.wallX > -9999) { if (Math.abs(this.wallRot - this.oldWallRot) > 180) { if (this.oldWallRot > this.wallRot) { this.oldWallRot -= 360; } else { this.oldWallRot += 360; } } if (Math.abs(this.wallRot - this.oldWallRot) > 50) { this.wallRot = this.oldWallRot; } } else { this.wallRot = this.oldWallRot; } v3 = this.wallRot * Math.PI / 180; this.wallX = this.centerX + this.moveRL + -Math.sin(v3) * this.centerReach; this.wallY = this.centerY + this.moveUD + Math.cos(v3) * this.centerReach; for (;;) { if (!(tehground.hitTest(this.wallX + Math.sin(v3), this.wallY - Math.cos(v3), true) || tehwallz.hitTest(this.wallX + Math.sin(v3), this.wallY - Math.cos(v3), true))) break; this.wallX += Math.sin(v3); this.wallY -= Math.cos(v3); } ex = this.centerX + this.moveRL - this.wallX; ey = this.centerY + this.moveUD - this.wallY; x1 = Math.cos(v3) * ex + Math.sin(v3) * ey; y1 = Math.cos(v3) * ey - Math.sin(v3) * ex; this.fakeRL = (Math.cos(v3) * this.moveRL + Math.sin(v3) * this.moveUD) * 0.95; this.fakeUD = 0; y1 = -this.centerReach; this.oMoveUD = this.moveUD; this.moveRL = Math.cos(v3) * this.fakeRL - Math.sin(v3) * this.fakeUD; this.moveUD = Math.cos(v3) * this.fakeUD + Math.sin(v3) * this.fakeRL; this.jumprot = -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433; if (Math.abs(this.jumprot - this.smokeRot) > 180) { if (this.jumprot > 0) { this.jumprot -= 360; } else { this.jumprot += 360; } } if (this.swimRL > 6) { temp = (this.jumprot - this.smokeRot) / 5; if (Math.abs(temp) > 5) { temp = (temp / Math.abs(temp)) * 5; } this.smokeRot += temp; } this.centerX = this.wallX + (Math.cos(v3) * x1 - Math.sin(v3) * y1); this.centerY = this.wallY + (Math.cos(v3) * y1 + Math.sin(v3) * x1); this.swimRL = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); this._x = this.centerX; this._y = this.centerY + this.centerReach; this.groundRot = this.wallRot; temp = this.groundRot + 180; if (Math.abs(temp - this.smokeRot) > 180) { if (temp > 0) { temp -= 360; } else { temp += 360; } } if (Math.abs(temp - this.shouldRot) > 180) { if (temp > 0) { temp -= 360; } else { temp += 360; } } if (Math.abs(temp - this.smokeRot) < 30 && Math.abs(temp - this.shouldRot) < 45) { this.RLStatus = 'swimWallJump'; } else { this.RLStatus = 'walling'; } } else { this._x += this.moveRL; this._y += this.moveUD; this.RLStatus = false; } if (InteractLayer.hitTest(this._x, this._y, true)) { if (this.UpIsDown()) { v4 = 0; while (InteractLayer['Door' + v4] != undefined) { if (InteractLayer['Door' + v4].hitTest(this._x, this._y, true) && Math.abs(InteractLayer['Door' + v4]._y - this._y) < 30 && InteractLayer['Door' + v4]._currentframe == 2) { this.moveRL = 0; this.doorInto = v4; this.gotoAndStop('DoorIn'); this._x = InteractLayer['Door' + v4]._x; this._y = InteractLayer['Door' + v4]._y; this._xscale = InteractLayer['Door' + v4]._xscale; return true; } ++v4; } } } }; SwimLand = function (ex, ey) { this.nowSpeed = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); if (this.nowSpeed != 0) { this.jumprot = -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433; this.groundRot = looseFindRot(this.jumprot, ex, ey, this.nowSpeed, this.spread, this); this.gorot = 2 * (this.groundRot + 90) - this.jumprot; this.fakeRL = this.nowSpeed * Math.sin((this.gorot - this.groundRot) * 0.0174532925199433) * 0.98; this.fakeUD = -this.nowSpeed * Math.cos((this.gorot - this.groundRot) * 0.0174532925199433) * 0.98; var v4 = 0; while (v4 < this.nowSpeed) { if (!testAll(ex, ey)) { ex += Math.sin((this.groundRot + 180) * 0.0174532925199433); ey -= Math.cos((this.groundRot + 180) * 0.0174532925199433); this._x += Math.sin((this.groundRot + 180) * 0.0174532925199433); this._y -= Math.cos((this.groundRot + 180) * 0.0174532925199433); } else { break; } ++v4; } v4 = 0; while (v4 < 5) { if (testAll(ex, ey)) { ex += Math.sin(this.groundRot * 0.0174532925199433); ey -= Math.cos(this.groundRot * 0.0174532925199433); this._x += Math.sin(this.groundRot * 0.0174532925199433); this._y -= Math.cos(this.groundRot * 0.0174532925199433); } else { break; } ++v4; } this.oMoveUD = this.moveUD; this.moveRL = this.fakeRL * Math.sin((this.groundRot + 90) * 0.0174532925199433); this.moveUD = -this.fakeRL * Math.cos((this.groundRot + 90) * 0.0174532925199433); this.swimRL = Math.abs(this.fakeRL); if (this.oMoveUD == 0) { this.bobUD = 0; this.swimUD = 0; } else { this.bobUD = (this.bobUD / this.oMoveUD) * this.moveUD; this.swimUD = (this.swimUD / this.oMoveUD) * this.moveUD; } this._x += this.moveRL; this._y += this.swimUD; temp = this.groundRot + 180; if (Math.abs(temp - this.smokeRot) > 180) { if (temp > 0) { temp -= 360; } else { temp += 360; } } if (Math.abs(temp - this.shouldRot) > 180) { if (temp > 0) { temp -= 360; } else { temp += 360; } } if (Math.abs(temp - this.smokeRot) < 30 && Math.abs(temp - this.shouldRot) < 45) { return 'swimWallJump'; } else { return 'walling'; } } }; crazyWallsTests = function (hurt, lander, badPwn) { if (this.terminalVelocity > terminalDeath || hurt || tehground.hitTest(this._x + 20 + this.moveRL, this._y + this.moveUD, true) || tehground.hitTest(this._x - 20 + this.moveRL, this._y + this.moveUD, true) || testAll(this._x - 5 + this.moveRL, this._y - this.isTall + this.moveUD) || testAll(this._x + 5 + this.moveRL, this._y - this.isTall + this.moveUD) || testAll(this._x - 5 + this.moveRL, this._y + this.moveUD) || testAll(this._x + 5 + this.moveRL, this._y + this.moveUD)) { return false; } else { if (tehwallz.hitTest(this._x + 20 + this.moveRL, this._y - this.isTall + this.moveUD, true) && !testAll(this._x + 20 + this.moveRL, this._y - (this.isTall + 10)) && this.moveUD > -2 && this.isTall > 30 && !this.DownIsDown()) { this._xscale = 100; this.canWallRun = true; this.LedgeIt(tehwallz); return 'ledge'; } else { if (this.RightIsDown() && tehwallz.hitTest(this._x + 20 + this.moveRL, this._y + this.moveUD, true) && !testAll(this._x + 20 + this.moveRL, this._y - (this.isTall + 1)) && this.moveUD < -2 && this.moveUD > -13) { if (tehwallz.hitTest(this._x + this._xscale / 2, this._y - 100, true) || tehground.hitTest(this._x + this._xscale / 2, this._y - 100, true)) { return false; } else { this._xscale = 100; this.canWallRun = true; this.LedgeLandIt(); return 'ledgeHop'; } } else { if (tehwallz.hitTest(this._x - 20 + this.moveRL, this._y - this.isTall + this.moveUD, true) && !testAll(this._x - 20 + this.moveRL, this._y - (this.isTall + 10)) && this.moveUD > -2 && this.isTall > 30 && !this.DownIsDown()) { this._xscale = -100; this.canWallRun = true; this.LedgeIt(tehwallz); return 'ledge'; } else { if (this.LeftIsDown() && tehwallz.hitTest(this._x - 20 + this.moveRL, this._y + this.moveUD, true) && !testAll(this._x - 20 + this.moveRL, this._y - (this.isTall + 1)) && this.moveUD < -2 && this.moveUD > -13) { this._xscale = -100; this.canWallRun = true; this.LedgeLandIt(); return 'ledgeHop'; } else { return false; } } } } } }; JumpLand = function (hurt, anchor, breakIt, landOn, lander) { if (hurt == undefined) { hurt = false; } if (landOn == undefined) { landOn = 'rest'; } if (breakIt == undefined) { breakIt = false; } this.canPlatLedge = false; this.effingSlide = 0; this.centerReach = this.isTall / 2; this.jumprot = -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433; this.nowSpeed = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); this.crazyLander(landOn); this.centerX = this._x; this.centerY = this._y - this.centerReach; this._rotation = this.wallRot; this.tilt = (this.tilt + this.wallRot) / 2; this.fakeRL = this.moveRL; this.fakeUD = this.moveUD; angle = this._rotation * Math.PI / 180; ex = this.centerX + this.moveRL - this.wallX; ey = this.centerY + this.moveUD - this.wallY; this.bounceBack = -(Math.cos(angle) * this.moveUD - Math.sin(angle) * this.moveRL); this.moveRL = Math.cos(angle) * this.moveRL + Math.sin(angle) * this.moveUD; ex1 = Math.cos(angle) * ex + Math.sin(angle) * ey; ey1 = Math.cos(angle) * ey - Math.sin(angle) * ex; ey1 = -this.centerReach; this.centerX = this.wallX + Math.cos(angle) * ex1 - Math.sin(angle) * ey1; this.centerY = this.wallY + Math.cos(angle) * ey1 + Math.sin(angle) * ex1; this._x = this.centerX + this.centerReach * Math.sin((this._rotation + 180) * 0.0174532925199433); this._y = this.centerY - this.centerReach * Math.cos((this._rotation + 180) * 0.0174532925199433); temp = this.tehwallzSuperTest(this.spread + 2, 0); if (temp) { var v2 = 0; while (v2 < 20) { if (this.tehwallzSuperTest(this.spread + 2, 0)) { messagePopup('pullBack3'); this.centerX += temp; this._x -= temp; } else { break; } ++v2; } } if (Math.abs(this._rotation) < 100 || this.isRiding != 'nothing' || true) { if (Math.abs(this._rotation) < 1) { this._rotation = 0; } shakeY = this.bounceBack * 0.8; if (this.isRiding != 'nothing') { messagePopup('boardlanding'); this.WraptoGround(true, false, true); this.slopeStuff(); this.moveRL += this.rotAccel; this.RLFunc(); this.gotoAndStop('Ride'); } else { makeLandStep(100); if (Math.abs(this._rotation) < 100 && !this.sliding && Math.abs(this.fakeRL) > Math.abs(this.moveRL) && this.fakeRL * this.moveRL > 0 && (this.RightIsDown() && this.fakeRL > 0 || this.LeftIsDown() && this.fakeRL < 0)) { this.moveRL = this.fakeRL; } this.JumpLandFrame(hurt, anchor, breakIt, landOn, lander); } this.moveUD = 0; } else { this._x += this.moveRL; this._y += this.moveUD; this.WraptoGround(false, false, true, 'jumplandupsidedown'); if (hurt) { this.moveUD = Math.abs(this.moveUD); } } }; JumpLandFrame = function (hurt, anchor, breakIt, landOn, lander) { this.slopeStuff(); this.resetJumpStuff(); this.isTall = 50; this.delayRot = this._rotation; this.oldWallRot = this.wallRot; this.smokeN = 0; this.friction = getFriction(this._x, this._y); footSlide(this._x, this._y, -100, this._rotation, -this.fakeUD, getFriction(this._x, this._y), this); footStep(this._x, this._y, 100, this._rotation, -this.fakeUD, getFriction(this._x, this._y), this); if (hurt) { if (Health == 0) { this.gotoAndStop('Die'); } else { this.gotoAndStop('FSGetUp'); } } else { if (lander == 'rolling') { this.isTall = 25; this.gotoAndStop('FSRoll'); this.FSRoller.gotoAndStop(4); } else { if (this.DownIsDown() && this.moveRL * this._xscale > -200) { this.nowSpeed = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); this.moveRL = this.nowSpeed * (this._xscale / 100); _root.movePerformed('slideboost'); this.gotoAndStop('DownSlide'); } else { this.hairRL = this.moveRL; this.gelHair(); if (lander == 'draw') { this.gotoAndStop('pencilDraw'); } else { if (lander == 'drawIdle') { this.gotoAndStop('pencilIdle'); } else { if (lander == 'slide') { this.runtoslide = true; this.gotoAndStop('Slide'); } else { if (Math.abs(this.moveRL) > 5 && !this.friction) { if (this.DownIsDown()) { if (this.moveRL * this._xscale > 0) { this.gotoAndStop('DownSlide'); } else { this.gotoAndStop('Duck'); } } else { if (this.sliding && false) { this.TempStill = true; this.runtoslide = true; this.gotoAndStop('Slide'); } else { if (this.RightIsDown() && this.moveRL > 0 || this.LeftIsDown() && this.moveRL < 0) { if (this.moveRL * this._xscale > 0) { if (this.moveUD > 5) { this.justLanded = true; } this.gotoAndStop('Walk'); this.CharStartup.gotoAndPlay(9); } else { this.gotoAndStop('Backpeddle'); this.Backpeddle.gotoAndPlay(5); } } else { this.gotoAndStop('Land'); } } } } else { this.gotoAndStop('Land'); } } } } } } } this.moveUD = 0; }; predictGround = function () { var v3 = this._x; var v5 = this._y; var v6 = this.moveRL; var v4 = this.moveUD; var v11 = this.FloatUp; var v12 = 100; var v13 = 100; var v7 = 1; while (v7 < 100) { if (!(this.Still || this.TempStill || this.FloatStill)) { if (this.RightIsDown() && v6 < this.maxRL * 0.6) { if (v6 <= 0) { ++v6; } else { v6 += 0.5; } } if (this.LeftIsDown() && v6 > -this.maxRL * 0.6) { if (v6 >= 0) { --v6; } else { v6 -= 0.5; } } } if (Math.abs(v6) > this.maxRL * 0.6) { v6 -= (v6 / Math.abs(v6)) * 0.1; } if (_root.tehwallz.hitTest(v3 + this.spread + v6, v5 - 25 + v4, true) && !_root.tehwallz.hitTest(v3 + this.spread, v5 - 25 + v4, true) || _root.tehwallz.hitTest(v3 - this.spread + v6, v5 - 25 + v4, true) && !_root.tehwallz.hitTest(v3 - this.spread, v5 - 25 + v4, true)) { if (v7 < v13) { var v10 = v5; v13 = v7; } v6 = 0; } if (v11 > 0) { --v11; } else { if (v4 < 30) { ++v4; } } if (v4 > 0) { var v9 = _root.quickLandTest(v3 + this.spread, v5, v6, v4, this.isTall, this._alpha, v3 + this.spread * 2); var v8 = _root.quickLandTest(v3 - this.spread, v5, v6, v4, this.isTall, this._alpha, v3 - this.spread * 2); if (v9 != 'nothing' || v8 != 'nothing') { this.waterLanding = (v9 == 'water' || v8 == 'water') && (Math.abs(this.moveRL) < 10 || this.DownIsDown()); v12 = v7; v7 = 0; while (v7 < 10) { if (_root.quickLandTest(v3 + this.spread, v5, v6 / 10, v4 / 10, this.isTall, this._alpha, v3 + this.spread * 2) == 'nothing' && _root.quickLandTest(v3 - this.spread, v5, v6 / 10, v4 / 10, this.isTall, this._alpha, v3 - this.spread * 2) == 'nothing') { v3 += v6 / 10; v5 += v4 / 10; } else { break; } ++v7; } break; } } v3 += v6; v5 += v4; ++v7; } this.hitGround = v12; this.hitWall = v13; this.landRL = v6; this.landUD = v4; if (v9 == 'hangz' || v8 == 'hangz') { v5 += 75; } if (this.moveUD < -20) { this.fallView += (this.moveUD * 10 - this.fallView) / 5; _root.CharYPoint += (this._y - _root.CharYPoint) / 10; } else { if (this.hitWall < this.hitGround) { this.gonnaWallJump = true; if (this.hitWall > 1) { if (SmoothScroll == 0) { this.toSmoothScroll = 0; } else { _root.SmoothScroll += (-(SmoothScroll / Math.abs(SmoothScroll)) * 75 - _root.SmoothScroll) / this.hitWall; } var v14 = (v10 - _root.CharYPoint) / this.hitWall; if (Math.abs(v10 - _root.CharYPoint) > 2) { _root.CharYPoint += (v10 - _root.CharYPoint) / this.hitWall; } } this.hitGround = this.hitWall; this.fallView *= 0.8; } else { if (this.moveUD > 0 && v5 > this._y + 300 && _root.CharYPoint < v5) { _root.CharYPoint += (v5 + this.moveUD * 10 - _root.CharYPoint) / this.hitGround; } else { if (v5 > this._y + 400 && this.moveUD < 0) { if (this._y + this.moveUD * 10 > _root.CharYPoint) { if (this.springView < 1600) { this.springView += 100; } this.fallView = this.moveUD * 10; _root.CharYPoint += (this._y - _root.CharYPoint) / 10; } } else { if (v9 == 'ledge' || v8 == 'ledge') { this.fallView += (100 - this.fallView) / 10; if (this.hitGround > 5) { _root.CharYPoint += (v5 - _root.CharYPoint) / this.hitGround; } else { _root.CharYPoint += (v5 - _root.CharYPoint) / 5; } } else { if ((v9 == 'nothing' || v8 == 'nothing') && v9 != 'ground' && v8 != 'ground') { this.fallView += (100 - this.fallView) / 10; if (this.hitGround > 5) { _root.CharYPoint += (v5 - _root.CharYPoint) / this.hitGround; } else { _root.CharYPoint += (v5 - _root.CharYPoint) / 5; } } else { if (this.hitGround > 5) { this.fallView *= 0.8; _root.CharYPoint += (v5 - _root.CharYPoint) / this.hitGround; } else { _root.CharYPoint += (v5 - _root.CharYPoint) / 5; } } } } } } } if (CharYPoint - this._y > 260) { CharYPoint = this._y + 260; } else { if (CharYPoint < this._y) { CharYPoint = this._y; } } }; inkSplat = function (ex, ey, escale, erot) { edepth = ELayer.getNextHighestDepth(); ELayer.attachMovie('inkSplat' + random(3), 'inkSplat' + edepth, edepth, {'_x': ex, '_y': ey, '_xscale': escale, '_yscale': Math.abs(escale), '_rotation': erot}); }; sandSplat = function (ex, ey, escale, erot, aplatz) { edepth = ELayer.getNextHighestDepth(); ELayer.attachMovie('sandSplat' + random(3), 'sandSplat' + edepth, edepth, {'_x': ex, '_y': ey, '_xscale': escale, '_yscale': Math.abs(escale), '_rotation': erot, 'aplatz': aplatz}); if (aplatz == -1) { makeFootprint(ex, ey, erot); } return edepth; }; bubbleArray = new Array(); waterSplat = function (ex, ey, escale, erot) { edepth = UberForeground.waterClip.getNextHighestDepth(); UberForeground.waterClip.attachMovie('waterSplat' + random(3), 'waterSplat' + edepth, edepth, {'_x': ex, '_y': ey, '_xscale': escale, '_yscale': Math.abs(escale) * 2, '_rotation': erot}); }; waterSplash = function (ex, ey, escale, erot) { edepth = _root.UberForeground.waterClip.getNextHighestDepth(); waterN = random(3); _root.UberForeground.waterClip.attachMovie('waterSplat' + waterN, 'waterSplat' + edepth, edepth, {'_x': ex, '_y': ey, '_xscale': escale, '_yscale': Math.abs(escale * 2), '_rotation': erot}); return edepth; }; spawnBubble = function (ex, ey, escale, erot) { edepth = _root.UberForeground.waterClip.getNextHighestDepth(); UberForeground.waterClip.attachMovie('bubble', 'bubble' + edepth, edepth, {'_x': ex, '_y': ey, 'moveUD': -(random(5) + 5) / 5, '_xscale': 20, '_yscale': 20, 'escale': escale, '_yscale': Math.abs(escale), 'b': 30 + random(30), '_rotation': erot}); bubbleArray.push('bubble' + edepth); UberForeground.waterClip['bubble' + edepth].onEnterFrame = function () { if (this._xscale < this.escale) { this._xscale += 2; this._yscale += 2; } if (!water.hitTest(this._x, this._y - this._yscale / 10, true) || testAll(this._x, this._y - this._yscale / 10, true)) { this.gotoAndPlay('pop'); delete this.onEnterFrame; } else { if (this.b > 0) { --this.b; } else { this.gotoAndPlay('pop'); this.onEnterFrame = function () { this._y += this.moveUD; }; } } this._y += this.moveUD; }; UberForeground.waterClip['bubble' + edepth].bubbleRemove = function (remove) { var v2 = 0; while (v2 < bubbleArray.length) { if (bubbleArray[v2] == remove) { bubbleArray.splice(v2, 1); removeMovieClip(this); } ++v2; } }; }; spawnFlushBubble = function (ex, ey, escale, flushDist, bobRot, flushRot, anchorX, anchorY) { edepth = _root.UberForeground.waterClip.getNextHighestDepth(); UberForeground.waterClip.attachMovie('bubble', 'bubble' + edepth, edepth, {'_x': ex, '_y': ey, 'moveUD': -(random(5) + 5) / 5, '_xscale': 20, '_yscale': 20, 'escale': escale, '_yscale': Math.abs(escale), 'b': 90 + random(30), '_rotation': erot, 'bobRot': bobRot, 'anchorX': anchorX, 'anchorY': anchorY}); UberForeground.waterClip['bubble' + edepth].onEnterFrame = flushBubbleEnterFrame; UberForeground.waterClip['bubble' + edepth].bubbleRemove = function () { removeMovieClip(this); }; }; flushBubbleEnterFrame = function () { if (this._xscale < this.escale) { this._xscale += 2; this._yscale += 2; } this.flushDist = (this.anchorY - this._y) * 2 - 100; if (this.flushDist < -120) { this.gotoAndPlay('pop'); delete this.onEnterFrame; return false; } if (this.b > 0) { --this.b; } else { this.gotoAndPlay('pop'); this.onEnterFrame = function () { this.flushDist = (this.anchorY - this._y) * 2 - 100; if (this.flushDist > 250) { this.flushDist = 250; } if (this.flushDist < 50) { this.flushDist = 50; } this.flushRot = (250 - this.flushDist) * (250 - this.flushDist) / 1500 + 6; this.bobRot -= this.flushRot; this._x = this.anchorX + this.flushDist * Math.sin(this.bobRot * 0.0174532925199433); this._y += 5; }; } if (this.flushDist > 250) { this.flushDist = 250; } if (this.flushDist < 50) { this.flushDist = 50; } this.flushRot = (250 - this.flushDist) * (250 - this.flushDist) / 1500 + 6; this.bobRot -= this.flushRot; this._x = this.anchorX + this.flushDist * Math.sin(this.bobRot * 0.0174532925199433); this._y += 5; }; smokeSplash = function (ex, ey, escale, erot) { edepth = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('smokeFX', 'smokeFX' + edepth, edepth, {'_x': ex, '_y': ey, '_rotation': erot, '_xscale': escale, '_yscale': Math.abs(escale)}); }; resetJumpStuff = function () { if (this.combo > 1) { APITrackEvent('combo', this.combo); } this.downTime = 0; this.combo = 0; this.waterLanding = false; this.Still = false; this.TempStill = false; this.FloatStill = false; this.gonnaWallJump = false; this.canWallRun = true; this.longJumping = false; this.wasLongJumping = false; this.wallJumpFell = false; this.wallJumped = false; this.canSpin = false; this.isAttacking = false; this.holding = false; this.RLStatus = 'landed'; if (GrapplingHook != undefined) { if (GrapplingHook.fromChar == this) { if (GrapplingHook._currentframe == 2) { GrapplingHook.gotoAndStop(3); } } } if (this.freeFallLooping) { freeFallLoop.stop(); this.freeFallLooping = false; } if (this.zipJumpAgainN > 0) { this.slopeStuff(); if (!this.sliding && !this.zipping) { messagePopup('zipreset'); this.zipJumpAgainN = 0; } } }; BonusPlatJumpLand = function (hurt, anchor, breakIt, landOn, lander) { this.wallRot = aPlatz['aPlatz' + this.aPlatzOn]._rotation + aPlatz['aPlatz' + this.aPlatzOn].moveRot; angle = this.wallRot * Math.PI / 180; this.fakeRL = Math.cos(angle) * this.moveRL + Math.sin(angle) * this.moveUD; this.fakeUD = Math.cos(angle) * this.moveUD - Math.sin(angle) * this.moveRL; ex = this.centerX + this.moveRL - aPlatz['aPlatz' + this.aPlatzOn]._x; ey = this.centerY + this.moveUD - aPlatz['aPlatz' + this.aPlatzOn]._y; this.onPlatOffset = Math.cos(angle) * ex + Math.sin(angle) * ey; y1 = Math.cos(angle) * ey - Math.sin(angle) * ex; temp = aPlatz['aPlatz' + this.aPlatzOn].onCharLand(this._x, this._y, this.fakeRL, -this.fakeUD, this); aPlatz['aPlatz' + this.aPlatzOn].getPlatSpeed(this); this.nowSpeed = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); this.centerReach = this.isTall / 2; if (y1 > 0 && aPlatz['aPlatz' + this.aPlatzOn].doubleSided) { if (this.wallRot < 0) { this.wallRot += 180; } else { this.wallRot -= 180; } angle = this.wallRot * Math.PI / 180; this.onPlatOffset = Math.cos(angle) * ex + Math.sin(angle) * ey; y1 = Math.cos(angle) * ey - Math.sin(angle) * ex; this.fakeRL = Math.cos(angle) * this.moveRL + Math.sin(angle) * this.moveUD; this.fakeUD = Math.cos(angle) * this.moveUD - Math.sin(angle) * this.moveRL; } this.platMoveRL = Math.cos(angle) * this.platRL - Math.sin(angle) * this.platUD; this.platMoveUD = Math.cos(angle) * this.platUD + Math.sin(angle) * this.platRL; y1 = -this.centerReach; if (temp || Math.abs(this.wallRot) > 60) { if (this.fakeUD > 0) { this.fakeUD = this.platUD; } this.fakeRL = this.platRL + this.fakeRL; this.moveRL = Math.cos(angle) * this.fakeRL - Math.sin(angle) * this.fakeUD; this.moveUD = Math.cos(angle) * this.fakeUD + Math.sin(angle) * this.fakeRL; this.centerX = aPlatz['aPlatz' + this.aPlatzOn]._x + (Math.cos(angle) * this.onPlatOffset - Math.sin(angle) * y1); this.centerY = aPlatz['aPlatz' + this.aPlatzOn]._y + (Math.cos(angle) * y1 + Math.sin(angle) * this.onPlatOffset); this._x = this.centerX + this.centerReach * Math.sin((this._rotation + 180) * 0.0174532925199433); this._y = this.centerY - this.centerReach * Math.cos((this._rotation + 180) * 0.0174532925199433); this.platUD = 0; this.platRL = 0; if (_root['BonusPlat' + aPlatz['aPlatz' + this.aPlatzOn].Status + 'Rest'] != undefined) { aPlatz['aPlatz' + this.aPlatzOn].onEnterFrame = _root['BonusPlat' + aPlatz['aPlatz' + this.aPlatzOn].Status + 'Rest']; } this.aPlatzOn = -1; return false; } else { this.moveRL = this.fakeRL - this.platRL / 2; this.moveUD = this.fakeUD; this.centerX = aPlatz['aPlatz' + this.aPlatzOn]._x + (Math.cos(angle) * this.onPlatOffset - Math.sin(angle) * y1); this.centerY = aPlatz['aPlatz' + this.aPlatzOn]._y + (Math.cos(angle) * y1 + Math.sin(angle) * this.onPlatOffset); this._x = this.centerX + this.centerReach * Math.sin((this._rotation + 180) * 0.0174532925199433); this._y = this.centerY - this.centerReach * Math.cos((this._rotation + 180) * 0.0174532925199433); if (_root.aPlatz['aPlatz' + this.aPlatzOn].Status == 'Springy') { this.gotoAndStop('springCrouch'); return true; } this.JumpLandFrame(hurt, anchor, breakIt, landOn, lander); return true; } }; BonusPlatFind = function () { var v2 = 0; while (aPlatz['aPlatz' + v2]._x != undefined) { if (Math.abs(this.centerX - aPlatz['aPlatz' + v2]._x) < 1000 && Math.abs(this.centerY - aPlatz['aPlatz' + v2]._y) < 500) { var v9 = aPlatz['aPlatz' + v2]._x; var v8 = aPlatz['aPlatz' + v2]._y; var v3 = (aPlatz['aPlatz' + v2]._rotation + aPlatz['aPlatz' + v2].moveRot) * Math.PI / 180; this.centerReach = this.isTall / 2; this.centerX = this._x + this.centerReach * Math.sin(this._rotation * 0.0174532925199433); this.centerY = this._y - this.centerReach * Math.cos(this._rotation * 0.0174532925199433); var v5 = this.centerX + this.moveRL - v9; var v4 = this.centerY + this.moveUD - v8; aPlatz['aPlatz' + v2].getPlatSpeed(this); var v7 = this.centerX - this.moveRL - v9; var v6 = this.centerY - this.moveUD - v8; var v10 = Math.cos(v3) * v5 + Math.sin(v3) * v4; var v13 = Math.cos(v3) * v7 + Math.sin(v3) * v6; if (aPlatz['aPlatz' + v2].doubleSided) { var v12 = -Math.abs(Math.cos(v3) * v4 - Math.sin(v3) * v5 - this.platUD); var v11 = -Math.abs(Math.cos(v3) * v6 - Math.sin(v3) * v7 + this.platUD); } else { var v12 = Math.cos(v3) * v4 - Math.sin(v3) * v5 - this.platUD; var v11 = Math.cos(v3) * v6 - Math.sin(v3) * v7 + this.platUD; } if (v10 - this.spread < aPlatz['aPlatz' + v2]._xscale / 2 && v10 + this.spread > -aPlatz['aPlatz' + v2]._xscale / 2) { if (v12 >= -this.centerReach && v11 < 2 - this.centerReach) { if (aPlatz['aPlatz' + v2].downTime == 0) { this.aPlatzOn = v2; return true; } else { return false; } } } } ++v2; } }; BonusPlatSeesaw = function () { if (!Paused) { this.moveRot *= this.dampen; if (this.steady) { this._rotation *= 0.97; } this.moveRot += -this._rotation / this.spring; this._rotation += this.moveRot; ELayer['aPlatzSmoke' + this.ID]._rotation = this._rotation; } }; BonusPlatSeesawRest = function () { if (!Paused) { this.moveRot *= this.dampen; if (this.steady) { this._rotation *= 0.97; } else { this._rotation *= 0.99; } this.moveRot += -this._rotation / this.spring; this._rotation += this.moveRot; ELayer['aPlatzSmoke' + this.ID]._rotation = this._rotation; } }; BonusPlatGeyser = function () { if (!Paused) { if (Math.abs(this.fakeX + this.fakeRL) > this.anchorDist && this.fakeX * this.accelRL > 0) { this.accelRL *= -1; } if (Math.abs(this.fakeRL + this.accelRL) < this.maxRL) { this.fakeRL += this.accelRL; } this.fakeX += this.fakeRL; ELayer['aPlatzSmoke' + this.ID].geyser._x = Math.cos(this.angle) * this.fakeX - Math.sin(this.angle) * this.fakeY; ELayer['aPlatzSmoke' + this.ID].geyser._y = Math.cos(this.angle) * this.fakeY + Math.sin(this.angle) * this.fakeX; this._x = this.anchorX + ELayer['aPlatzSmoke' + this.ID].geyser._x; this._y = this.anchorY + ELayer['aPlatzSmoke' + this.ID].geyser._y; this.moveRot += -this._rotation / this.spring; this._rotation += this.moveRot; ELayer['aPlatzSmoke' + this.ID].geyser.rock._rotation = this._rotation; } }; BonusPlatMove = function () { if (!Paused) { if ((this.fakeX - this.anchorDist) * this.accelRL > 0) { this.accelRL *= -1; } this.fakeRL += this.accelRL; if (Math.abs(this.fakeRL + this.accelRL) < this.maxRL) { this.fakeX += this.fakeRL; } else { this.fakeX += (this.fakeRL / Math.abs(this.fakeRL)) * this.maxRL; } this.moveRot *= this.decay; this.moveRot += (this.anchorRot - this._rotation) / this.spring; this._rotation += this.moveRot; this._x = this.anchorX + Math.cos(this.angle) * this.fakeX - Math.sin(this.angle) * this.fakeY; this._y = this.anchorY + Math.cos(this.angle) * this.fakeY + Math.sin(this.angle) * this.fakeX; if (this.startOnLand) { if (this.originX == this._x && this.originY == this._y) { this.accelRL = 0; this.fakeRL = 0; } } this.moveRot += -this._rotation / this.spring; this._rotation += this.moveRot; ELayer['aPlatzSmoke' + this.ID]._x = this._x; ELayer['aPlatzSmoke' + this.ID]._y = this._y; ELayer['aPlatzSmoke' + this.ID]._rotation = this._rotation; } }; oldBonusPlatMove = function () { if (!Paused) { if (this.circling) { this.rotOffset += this.accel; this._x = this.anchorX + this.anchorDist * Math.sin(this.rotOffset * 0.0174532925199433); this._y = this.anchorY + -this.anchorDist * Math.cos(this.rotOffset * 0.0174532925199433); ELayer['aPlatzSmoke' + this.ID]._x = this._x; ELayer['aPlatzSmoke' + this.ID]._y = this._y; } else { if (this.moving) { if (this.absoluteRL < this.centerOffset) { this.moveRL += this.accel; } if (this.absoluteRL > this.centerOffset) { this.moveRL -= this.accel; if (this.wrapBack) { if (Char.aPlatzOn == this.ID) { Char.JumpFunc(0); } this._x = this.anchorX; this._y = this.anchorY; this.absoluteRL = 0; } } if (Math.abs(this.moveRL) > this.maxSpeed) { this.smokeRLUD = this.maxSpeed * (this.moveRL / Math.abs(this.moveRL)); } else { this.smokeRLUD = this.moveRL; } if (Char.aPlatzOn != this.ID && this.onlyOnStand && Math.abs(this.absoluteRL) < Math.abs(this.smokeRLUD)) { ELayer['aPlatzSmoke' + this.ID].platMove.gotoAndStop(1); delete this.onEnterFrame; } this.absoluteRL += this.smokeRLUD; this._x = this.originX + this.absoluteRL * Math.cos(this.rotOffset * 0.0174532925199433); this._y = this.originY + this.absoluteRL * Math.sin(this.rotOffset * 0.0174532925199433); ELayer['aPlatzSmoke' + this.ID]._x = this._x; ELayer['aPlatzSmoke' + this.ID]._y = this._y; } } this.smokeUD = this._y - this.oldy; this.oldy = this._y; } return true; }; BonusPlatFall = function () { if (!Paused) { if (this.moveUD > 0) { this.tempUD = this.moveUD; } else { this.tempUD = 0; } if (testAll(this._x, this._y + 45 + this.tempUD) || testAll(this._x + this._width, this._y + 45 + this.tempUD)) { for (;;) { if (!(!testAll(this._x, this._y + 46) && !testAll(this._x + this._width, this._y + 46))) break; ++this._y; } this.moveUD = 0; this.onEnterFrame = BonusPlatRise; return true; } if (this.moveUD < 25) { this.moveUD += 0.5; } this.smokeUD = this.moveUD; this._y += this.moveUD; ELayer['aPlatzSmoke' + this.ID]._x = this._x; ELayer['aPlatzSmoke' + this.ID]._y = this._y; } return true; }; BonusPlatRise = function () { if (!Paused) { if (Math.abs(this._y + this.moveUD - this.originY) < 1) { this.moveUD = 0; this._y = this.originY; delete this.onEnterFrame; this.falling = true; this.moving = true; return true; } if (Math.abs(this.originY - (this._y + this.moveUD)) / 10 < 10) { this.moveUD = (this.originY - (this._y + this.moveUD)) / 10; } else { if (this.moveUD > -10) { this.moveUD -= 0.25; } } this.smokeUD = this.moveUD; this._y += this.moveUD; ELayer['aPlatzSmoke' + this.ID]._x = this._x; ELayer['aPlatzSmoke' + this.ID]._y = this._y; } return true; }; BonusPlatLadder = function () { if (!Paused) { if (this._y + this.maxSpeed > this.goalY) { this._y += this.maxSpeed; } else { if (Char.aPlatzOn == this.ID) { Char.JumpFunc(0); } this._y = this.originY; } ELayer['aPlatzSmoke' + this.ID]._x = this._x; ELayer['aPlatzSmoke' + this.ID]._y = this._y; } return true; }; BonusPlatLoopDown = function () { if (!Paused) { if (this._y + this.moveUD > this.loopY) { this._y += this.startY - this.loopY; this._xscale = -this._xscale; } else { if (this._y + this.moveUD * 2 > this.loopY) { this._xscale = -this._xscale; } } this._x += this.moveRL; this._y += this.moveUD; ELayer['aPlatzSmoke' + this.ID]._x = this._x; ELayer['aPlatzSmoke' + this.ID]._y = this._y; } }; BonusPlatLoopUp = function () { if (!Paused) { if (this._y + this.moveUD < this.loopY) { this._y += this.startY - this.loopY; this._xscale = -this._xscale; } else { if (this._y + this.moveUD * 2 < this.loopY) { this._xscale = -this._xscale; } } this._x += this.moveRL; this._y += this.moveUD; ELayer['aPlatzSmoke' + this.ID]._x = this._x; ELayer['aPlatzSmoke' + this.ID]._y = this._y; } }; BonusPlatSpringy = function () { if (!Paused) { this.accelUD = (this.anchorY - this._y) / this.spring; this.fakeUD += this.accelUD; this._y += this.fakeUD; } }; BonusPlatSpringyRest = function () { if (!Paused) { this.fakeUD += (this.anchorY - this._y) / 1.2; this.fakeUD *= 0.8; this._y += this.fakeUD; ELayer['aPlatzSmoke' + this.ID].clear(); ELayer['aPlatzSmoke' + this.ID].lineStyle(3, this.color, 100); ELayer['aPlatzSmoke' + this.ID].moveTo(-this._xscale / 2, 1.5); ELayer['aPlatzSmoke' + this.ID].curveTo(Char.onPlatOffset, (this._y - this.anchorY) * 1.5 + 1.5, this._xscale / 2, 1.5); } }; BonusPlatMushy = function () { if (!Paused) { this.fakeUD *= this.decay; this.fakeUD += -this.fakeY / this.spring; this.moveRot *= this.decay; this.moveRot += (this.anchorRot - this._rotation) / this.spring; this._rotation += this.moveRot; angle = this._rotation * 0.0174532925199433; this.fakeY += this.fakeUD; ELayer['aPlatzSmoke' + this.ID]._rotation = this._rotation; this._x = this.anchorX + (Math.cos(angle) * this.fakeX - Math.sin(angle) * this.fakeY); ELayer['aPlatzSmoke' + this.ID]._x = this._x; this._y = this.anchorY + (Math.cos(angle) * this.fakeY + Math.sin(angle) * this.fakeX); ELayer['aPlatzSmoke' + this.ID]._y = this._y; } }; BonusPlatMushyRest = function () { if (!Paused) { this.fakeUD *= this.decay; this.fakeUD += -this.fakeY / this.spring; this.moveRot *= this.decay; this.moveRot += (this.anchorRot - this._rotation) / this.spring; this._rotation += this.moveRot; angle = this._rotation * 0.0174532925199433; this.fakeY += this.fakeUD; ELayer['aPlatzSmoke' + this.ID]._rotation = this._rotation; this._x = this.anchorX + (Math.cos(angle) * this.fakeX - Math.sin(angle) * this.fakeY); ELayer['aPlatzSmoke' + this.ID]._x = this._x; this._y = this.anchorY + (Math.cos(angle) * this.fakeY + Math.sin(angle) * this.fakeX); ELayer['aPlatzSmoke' + this.ID]._y = this._y; } }; BonusPlatBumper = function () { if (!Paused) { if (this.downTime > 0) { --this.downTime; } this.fakeUD += -this.fakeY / this.spring; this.fakeUD *= this.decay; angle = this._rotation * 0.0174532925199433; this.fakeY += this.fakeUD; this._x = this.anchorX + (Math.cos(angle) * this.fakeX - Math.sin(angle) * this.fakeY); ELayer['aPlatzSmoke' + this.ID]._x = this._x; this._y = this.anchorY + (Math.cos(angle) * this.fakeY + Math.sin(angle) * this.fakeX); ELayer['aPlatzSmoke' + this.ID]._y = this._y; } }; BonusPlatRocker = function () { if (!Paused) { this.moveRot += -this._rotation / this.spring; this._rotation += this.moveRot; ELayer['aPlatzSmoke' + this.ID]._rotation = this._rotation; } }; BonusPlatSpin = function () { if (!Paused) { this._rotation += this.moveRot; ELayer['aPlatzSmoke' + this.ID]._rotation = this._rotation; } }; BonusPlatCrumble = function () { if (!Paused) { if (this.b < 40) { ++this.b; this._y = this.anchorY + this.b / 5; ELayer['aPlatzSmoke' + this.ID].crumble.gotoAndStop(this.b); } else { this.b = 150; this.onEnterFrame = BonusPlatCrumbleReset; this._xscale = -100; ELayer['aPlatzSmoke' + this.ID].crumble.play(); } } }; BonusPlatCrumbleReset = function () { if (!Paused) { if (this.b > 0) { if (this.b == 40) { this._xscale = this.anchorXscale; } --this.b; if (this.b < 54) { ELayer['aPlatzSmoke' + this.ID].crumble.gotoAndStop(this.b); } } else { this._xscale = this.anchorXscale; this._y = this.anchorY; delete this.onEnterFrame; } } }; BonusPlatContCrumb = function () { if (this.b < 40) { ++this.b; this._y = this.anchorY + this.b / 5; ELayer['aPlatzSmoke' + this.ID].crumble.gotoAndStop(this.b); } else { this.b = 150; this._xscale = -100; ELayer['aPlatzSmoke' + this.ID].crumble.play(); this.onEnterFrame = BonusPlatCrumbleReset; } }; BonusPlatSwinging = function () { if (!Paused) { this.fakeUD += 0.5; this.toRotto = _root.RotFixer(-Math.atan2(this.anchorX - (this._x + this.fakeRL), this.anchorY - (this._y + this.fakeUD)) / 0.0174532925199433); this.fakeRL = this.centerOffset * Math.sin(this.toRotto * 0.0174532925199433) + this.anchorX - this._x; this.fakeUD = -(this.centerOffset * Math.cos(this.toRotto * 0.0174532925199433)) + this.anchorY - this._y; this.nowSpeed = Math.sqrt(this.fakeRL * this.fakeRL + this.fakeUD * this.fakeUD); if (this.nowSpeed > 25) { this.fakeRL *= 25 / this.nowSpeed; this.fakeUD *= 25 / this.nowSpeed; } if (this.fakeUD < -10) { this.fakeUD *= 0.97; messagePopup(this.fakeUD); } this._x += this.fakeRL; this._y += this.fakeUD; this.fakeRL = this.fakeRL; this.fakeUD = this.fakeUD; ELayer['aPlatzSmoke' + this.ID]._x = this._x; ELayer['aPlatzSmoke' + this.ID]._y = this._y; ELayer['swingChain' + this.ID]._x = this._x; ELayer['swingChain' + this.ID]._y = this._y; ELayer['swingChain' + this.ID]._rotation = this.toRotto + 180; } }; BonusPlatSwingingRest = function () { if (!Paused) { this.fakeUD += 0.5; this.toRotto = _root.RotFixer(-Math.atan2(this.anchorX - (this._x + this.fakeRL), this.anchorY - (this._y + this.fakeUD)) / 0.0174532925199433); this.fakeRL = this.centerOffset * Math.sin(this.toRotto * 0.0174532925199433) + this.anchorX - this._x; this.fakeUD = -(this.centerOffset * Math.cos(this.toRotto * 0.0174532925199433)) + this.anchorY - this._y; this.nowSpeed = Math.sqrt(this.fakeRL * this.fakeRL + this.fakeUD * this.fakeUD); if (this.nowSpeed > 25) { this.fakeRL *= 25 / this.nowSpeed; this.fakeUD *= 25 / this.nowSpeed; } if (this.fakeUD < -10) { this.fakeUD *= 0.97; } this._x += this.fakeRL; this._y += this.fakeUD; ELayer['aPlatzSmoke' + this.ID]._x = this._x; ELayer['aPlatzSmoke' + this.ID]._y = this._y; ELayer['swingChain' + this.ID]._x = this._x; ELayer['swingChain' + this.ID]._y = this._y; ELayer['swingChain' + this.ID]._rotation = this.toRotto + 180; if (this.b < 0) { this.onEnterFrame = BonusPlatSwingingRecenter; } else { --this.b; } } }; BonusPlatSwingingRecenter = function () { if (!Paused) { if (Math.abs(this.toRotto - (this.rotOffset - 180)) > 180) { if (this.rotOffset - 180 > this.toRotto) { this.toRotto += 360; } else { this.toRotto -= 360; } } this.rotAccel = (this.rotOffset - 180 - this.toRotto) / 20; if (Math.abs(rotAccel) > 10) { this.toRotto += (rotAccel / Math.abs(rotAccel)) * 10; } else { this.toRotto += this.rotAccel; } this.fakeRL = this.centerOffset * Math.sin(this.toRotto * 0.0174532925199433) + this.anchorX - this._x; this.fakeUD = -(this.centerOffset * Math.cos(this.toRotto * 0.0174532925199433)) + this.anchorY - this._y; this._x += this.fakeRL; this._y += this.fakeUD; ELayer['aPlatzSmoke' + this.ID]._x = this._x; ELayer['aPlatzSmoke' + this.ID]._y = this._y; ELayer['swingChain' + this.ID]._x = this._x; ELayer['swingChain' + this.ID]._y = this._y; ELayer['swingChain' + this.ID]._rotation = this.toRotto + 180; } }; testSpringBoard = function () { if (SBLayer.hitTest(this._x + this.RAnchx(this._rotation * 0.0174532925199433) + this.moveRL, this._y + this.RAnchy(this._rotation * 0.0174532925199433) + this.moveUD, true) || SBLayer.hitTest(this._x + this.LAnchx(this._rotation * 0.0174532925199433) + this.moveRL, this._y + this.LAnchy(this._rotation * 0.0174532925199433) + this.moveUD, true)) { this.Clung = 0; var v3 = 0; while (SBLayer['SpringBoard' + v3]._x != undefined) { if (SBLayer['SpringBoard' + v3].hitTest(this._x + this.RAnchx(this._rotation * 0.0174532925199433) + this.moveRL, this._y + this.RAnchy(this._rotation * 0.0174532925199433) + this.moveUD, true) || SBLayer['SpringBoard' + v3].hitTest(this._x + this.LAnchx(this._rotation * 0.0174532925199433) + this.moveRL, this._y + this.LAnchy(this._rotation * 0.0174532925199433) + this.moveUD, true)) { this.gotoAndStop('ClingBoard'); SBLayer['SpringBoard' + v3]._y = this._y + this.moveUD; SBLayer['SpringBoard' + v3].moveRL += this.moveRL / 2; SBLayer['SpringBoard' + v3].moveUD += this.moveUD; SBLayer['SpringBoard' + v3].flingIt = this.moveUD; this._rotation = SBLayer['SpringBoard' + v3]._rotation; _root.Foreground['SpringBoard' + v3 + 'Smoke']._y = this._y + this.moveUD; SBLayer['SpringBoard' + v3].onEnterFrame = function () { ++this.moveUD; this.moveRL += (this.anchorX - this._x) / 60 - this.moveRL / Math.abs(this.moveRL) / 5; this.amoveUD = (this.anchorY - this._y) / 20 - this.moveUD / Math.abs(this.moveUD) / 5; this.moveUD += this.amoveUD; this._x += this.moveRL; this._y += this.moveUD; Char._x += this.moveRL; Char._y += this.moveUD; _root.Foreground[this._name + 'Smoke']._x = this._x; _root.Foreground[this._name + 'Smoke']._y = this._y; if (this.amoveUD > -1 && this.moveUD < 0) { Char.moveRL = this.moveRL / 2; Char.JumpFunc(-this.moveUD); this.onEnterFrame = SpringBoardLeft; } if (!Char.JumpIsDown()) { Char.SisDown = false; } if (Char.JumpIsDown()) { if (!Char.SisDown && -this.moveUD / 2 > -5) { Char.moveRL = this.moveRL / 2; Char.JumpFunc(-this.moveUD / 2 + 15); this.moveUD += 15; this.onEnterFrame = SpringBoardLeft; } Char.SisDown = true; } }; SBLayer['SpringBoard' + v3].onEnterFrame; } ++v3; } return true; } else { return false; } }; slopeStuff = function () { this.friction = getFriction(this._x, this._y); this.rotAccel = RotToAccel(this._rotation); if (Math.abs(this.rotAccel) > 1) { this.rotAccel /= Math.abs(this.rotAccel); } if (this.friction) { if (Math.abs(this.rotAccel) > 0.2) { this.sliding = true; } else { this.sliding = false; } } else { if (Math.abs(this.rotAccel) > 0.7) { this.sliding = true; } else { this.sliding = false; } } if (water.hitTest(this._x, this._y - this.isTall / 2, true)) { this.moveRL *= 0.85; } }; RLFunc = function (sliding, rolling, ledgeGrab, dontFall) { if (Math.abs(this.delayRot - this._rotation) > 180) { if (this.delayRot > this._rotation) { this.delayRot -= 360; } else { this.delayRot += 360; } } this.delayRot += (this._rotation - this.delayRot) / 3; this.centerX = this._x + (this.isTall / 2) * Math.sin(this._rotation * 0.0174532925199433); this.centerY = this._y - (this.isTall / 2) * Math.cos(this._rotation * 0.0174532925199433); if (InteractLayer.hitTest(this.centerX, this.centerY, true)) { if (this.UpIsDown()) { var v3 = 0; while (InteractLayer['Door' + v3] != undefined) { if (InteractLayer['Door' + v3].hitTest(this.centerX, this.centerY, true) && InteractLayer['Door' + v3]._currentframe == 2) { this.moveRL = 0; this._xscale = InteractLayer['Door' + v3]._xscale; this.doorInto = v3; this.gotoAndStop('DoorIn'); return true; } ++v3; } } } this.WallHitLeft = false; this.WallHitRight = false; if (this.moveRL > 35) { this.fakeRL = this.RLx(35); this.fakeUD = this.RLy(35); } else { if (this.moveRL < -35) { this.fakeRL = this.RLx(-35); this.fakeUD = this.RLy(-35); } else { this.fakeRL = this.RLx(this.moveRL); this.fakeUD = this.RLy(this.moveRL); } } if (this.moveRL > 0) { this.tempRrL = this.fakeRL + 3; this.tempRuD = this.fakeUD; this.tempLrL = this.spread; this.tempLuD = 0; } else { if (this.moveRL < 0) { this.tempRrL = -this.spread; this.tempRuD = 0; this.tempLrL = this.fakeRL - 3; this.tempLuD = this.fakeUD; } else { this.tempRrL = 0; this.tempRuD = 0; this.tempLrL = 0; this.tempLuD = 0; } } if (tehwallz.hitTest(this.centerX - this.spread + this.tempLrL, this._y - 10, true) || this.Standing() && tehwallz.hitTest(this.centerX - this.spread + this.tempLrL, this.centerY - this.isTall / 2, true)) { this.WallHitLeft = true; } if (tehwallz.hitTest(this.centerX + this.spread + this.tempRrL, this._y - 10, true) || this.Standing() && tehwallz.hitTest(this.centerX + this.spread + this.tempRrL, this.centerY - this.isTall / 2, true)) { this.WallHitRight = true; } this.temp = false; if (this.WallHitLeft && !this.WallHitRight) { if (InteractLayer.isDeadLolz.hitTest(this.centerX, this.centerY, true) || InteractLayer.isDeadLolz.hitTest(this.centerX, this.centerY - 45, true)) { this.Died(); return false; } v3 = 0; while (v3 < Math.abs(this.moveRL)) { if (!tehwallz.hitTest(this.centerX - (this.spread + 3), this._y - 10, true) && (!tehwallz.hitTest(this.centerX - (this.spread + 3), this.centerY - this.isTall / 2, true) || !this.Standing())) { this._x += this.RLx(-1); this.centerX += this.RLx(-1); this._y += this.RLy(-1); this.centerY += this.RLy(-1); } else { break; } ++v3; } for (;;) { if (!(tehwallz.hitTest(this.centerX - (this.spread + 2), this._y - 10, true) || tehwallz.hitTest(this.centerX - (this.spread + 2), this.centerY - this.isTall / 2, true) && this.Standing())) break; this._x += this.RLx(1); this.centerX += this.RLx(1); this._y += this.RLy(1); this.centerY += this.RLy(1); } if (this.fakeUD < -8 || this.sliding) { if (this.LeftIsDown()) { this.JumpFunc(0, true, false, false, true); this.WallIt(1); return 'walljump'; } else { this.JumpFunc(0, true, false, false, true); this.moveRL = 0; return 'walljump'; } } if (this._currentframe == 12) { if (Math.abs(this.moveRL) < 1) { this.moveRL = 0; } else { this.moveRL = -this.moveRL / 2; this.fakeRL = -this.fakeRL / 2; } this.rollRL = this.moveRL; } else { this.moveRL = 0; this.fakeRL = 0; } if (this.aPlatzOn > -1) { this.onPlatOffset = this._x - aPlatz['aPlatz' + this.aPlatzOn]._x; } this.temp = 'Wall'; } else { if (this.WallHitRight && !this.WallHitLeft) { if (InteractLayer.isDeadLolz.hitTest(this.centerX, this.centerY, true) || InteractLayer.isDeadLolz.hitTest(this.centerX, this.centerY - 45, true)) { this.Died(); return false; } v3 = 0; while (v3 < Math.abs(this.moveRL)) { if (!tehwallz.hitTest(this.centerX + (this.spread + 3), this._y - 10, true) && (!tehwallz.hitTest(this.centerX + (this.spread + 3), this.centerY - this.isTall / 2, true) || !this.Standing())) { this._x += this.RLx(1); this.centerX += this.RLx(1); this._y += this.RLy(1); this.centerY += this.RLy(1); } ++v3; } for (;;) { if (!(tehwallz.hitTest(this.centerX + (this.spread + 2), this._y - 10, true) || tehwallz.hitTest(this.centerX + (this.spread + 2), this.centerY - this.isTall / 2, true) && this.Standing())) break; this._x += this.RLx(-1); this.centerX += this.RLx(-1); this._y += this.RLy(-1); this.centerY += this.RLy(-1); } if (this.fakeUD < -8 || this.sliding) { if (this.RightIsDown()) { this.JumpFunc(0, true, false, false, true); this.WallIt(-1); return 'walljump'; } else { this.JumpFunc(0, true, false, false, true); this.moveRL = 0; return 'walljump'; } } if (this._currentframe == 12) { if (Math.abs(this.moveRL) < 1) { this.moveRL = 0; } else { this.moveRL = -this.moveRL / 2; } this.rollRL = this.moveRL; } else { this.moveRL = 0; this.fakeUD = 0; this.fakeRL = 0; } if (this.aPlatzOn > -1) { this.onPlatOffset = this._x - aPlatz['aPlatz' + this.aPlatzOn]._x; } this.temp = 'Wall'; } } if (this.aPlatzOn > -1) { aPlatz['aPlatz' + this.aPlatzOn].getPlatSpeed(this); this.centerReach = this.isTall / 2; this.onPlatOffset += this.moveRL; this.tempX = aPlatz['aPlatz' + this.aPlatzOn]._x; aPlatz['aPlatz' + this.aPlatzOn].whileOn(this.onPlatOffset, this.moveRL, 1, this); if (Math.abs(aPlatz['aPlatz' + this.aPlatzOn]._rotation) > 80 && aPlatz['aPlatz' + this.aPlatzOn].doubleSided) { this._rotation = aPlatz['aPlatz' + this.aPlatzOn]._rotation + 180; } else { this._rotation = aPlatz['aPlatz' + this.aPlatzOn]._rotation; } if (Math.abs(this.tilt - this._rotation) > 180) { if (this.tilt > this._rotation) { this.tilt -= 360; } else { this.tilt += 360; } } angle = this._rotation * Math.PI / 180; this._x = aPlatz['aPlatz' + this.aPlatzOn]._x + Math.cos(angle) * this.onPlatOffset; this._y = aPlatz['aPlatz' + this.aPlatzOn]._y + Math.sin(angle) * this.onPlatOffset; this.centerX = this._x + (this.isTall / 2) * Math.sin(this._rotation * 0.0174532925199433); this.centerY = this._y - (this.isTall / 2) * Math.cos(this._rotation * 0.0174532925199433); if (Math.abs(this._rotation) > 80) { this.JumpFunc(0, false, rolling); } else { if (aPlatz['aPlatz' + this.aPlatzOn].canBuck) { var v5 = aPlatz['aPlatz' + this.aPlatzOn].moveUD; aPlatz['aPlatz' + this.aPlatzOn].getPlatSpeed(this); var v6 = v5 - aPlatz['aPlatz' + this.aPlatzOn].moveUD; if (v6 < -1) { this.JumpFunc(2, false, rolling, false, false); return false; } } } if (this.platUD > -1 && aPlatz['aPlatz' + this.aPlatzOn].Status == 'Loop') { this.fallView += (this.platUD * 40 - this.fallView) / 20; } else { this.fallView += (this.platUD * 10 - this.fallView) / 20; } if (!(this.onPlatOffset + this.moveRL + this.spread > -aPlatz['aPlatz' + this.aPlatzOn]._xscale / 2 && this.onPlatOffset + this.moveRL - this.spread < aPlatz['aPlatz' + this.aPlatzOn]._xscale / 2 && aPlatz['aPlatz' + this.aPlatzOn].otherStayOn())) { this.JumpFunc(0, false, rolling, false, true); return false; } } else { if (testAll(this._x + this.RLx(this.moveRL * 1.5 + 0) + this.RAnchx(this._rotation * 0.0174532925199433) + this.UDx(this.WasSix()), this._y + this.RLy(this.moveRL * 1.5 + 0) + this.RAnchy(this._rotation * 0.0174532925199433) + this.UDy(this.WasSix())) && testAll(this._x + this.RLx(this.moveRL * 1.5 - 0) + this.LAnchx(this._rotation * 0.0174532925199433) + this.UDx(this.WasSix()), this._y + this.RLy(this.moveRL * 1.5 - 0) + this.LAnchy(this._rotation * 0.0174532925199433) + this.UDy(this.WasSix()))) { this.fallView *= 0.9; this.centerReach = this.isTall / 2; angle = this._rotation * Math.PI / 180; FindRot(this._rotation + 180, this._x + this.fakeRL, this._y + this.fakeUD, Math.abs(this.moveRL), this.spread, false, this, sliding); if (Math.abs(this.wallRot - this.oldWallRot) > 180) { if (this.wallRot > this.oldWallRot) { this.wallRot -= 360; } else { this.wallRot += 360; } } if (this.moveRL != 0) { if (Math.abs(this.oldWallRot - this.wallRot) / Math.abs(this.moveRL * 1.5) > 1) { this.oldWallRot += (this.wallRot - this.oldWallRot) / 5; omessagePopup('RotEase'); } else { this.oldWallRot = this.wallRot; } } else { if (Math.abs(this.oldWallRot - this.wallRot) > 1) { this.oldWallRot += (this.wallRot - this.oldWallRot) / 5; omessagePopup('IdleRotEase'); } else { this.oldWallRot = this.wallRot; } } if (this.wallX > -9999) { ex = this.centerX + this.fakeRL - this.wallX; ey = this.centerY + this.fakeUD - this.wallY; vx = this.moveRL * Math.sin((this.delayRot + 90) * 0.0174532925199433); vy = -this.moveRL * Math.cos((this.delayRot + 90) * 0.0174532925199433) + this.isTall * 0.08; angle = this.oldWallRot * Math.PI / 180; ex1 = Math.cos(angle) * ex + Math.sin(angle) * ey; vx1 = Math.cos(angle) * vx + Math.sin(angle) * vy; vy1 = Math.cos(angle) * vy - Math.sin(angle) * vx; ey1 = -this.centerReach; this.centerX = this.wallX + Math.cos(angle) * ex1 - Math.sin(angle) * ey1; this.centerY = this.wallY + Math.cos(angle) * ey1 + Math.sin(angle) * ex1; if (vy1 > -(this.isTall * 0.08 - 2) || this.CheckHead()) { this._rotation = this.oldWallRot; } else { this.moveUD = 0; this.temp = 'Fall'; } this._x = this.centerX + this.centerReach * Math.sin((this._rotation + 180) * 0.0174532925199433); this._y = this.centerY - this.centerReach * Math.cos((this._rotation + 180) * 0.0174532925199433); } else { this.centerX += this.fakeRL; this.centerY += this.fakeUD; this._x = this.centerX + this.centerReach * Math.sin((this._rotation + 180) * 0.0174532925199433); this._y = this.centerY - this.centerReach * Math.cos((this._rotation + 180) * 0.0174532925199433); } } else { if (testPlatz(this._x + this.spread + this.fakeRL, this._y + this.RAnchy(this._rotation * Math.PI / 180) + this.fakeUD + this.WasSix())) { this.fallView += (100 - this.fallView) / 10; this._x += this.fakeRL; this._y += this.fakeUD; this.centerX += this.fakeRL; this.centerY += this.fakeUD; if (this._xscale < 0) { this.temp = 'rEdge'; } else { this.temp = 'rBackEdge'; } } else { if (testPlatz(this._x - this.spread + this.fakeRL, this._y + this.LAnchy(this._rotation * Math.PI / 180) + this.fakeUD + this.WasSix())) { this.fallView += (100 - this.fallView) / 10; this._x += this.fakeRL; this._y += this.fakeUD; this.centerX += this.fakeRL; this.centerY += this.fakeUD; if (this._xscale > 0) { this.temp = 'lEdge'; } else { this.temp = 'lBackEdge'; } } else { if (testWallz(this.centerX + this.RAnchx(this._rotation * Math.PI / 180) + this.fakeRL + this.UDx(this.WasSix()), this.centerY + this.isTall / 2 + this.RAnchy(this._rotation * Math.PI / 180) + this.fakeUD + this.UDy(this.WasSix()))) { this.fallView += (100 - this.fallView) / 10; this._rotation = 0; if (this.moveRL > 35) { this._x += 35; } else { if (this.moveRL < -35) { this._x += -35; } else { this._x += this.moveRL; } } this.centerX = this._x; if (this._xscale < 0) { this.temp = 'rEdge'; } else { this.temp = 'rBackEdge'; } } else { if (testWallz(this.centerX + this.LAnchx(this._rotation * Math.PI / 180) + this.fakeRL + this.UDx(this.WasSix()), this.centerY + this.isTall / 2 + this.LAnchy(this._rotation * Math.PI / 180) + this.fakeUD + this.UDy(this.WasSix()))) { this.fallView += (100 - this.fallView) / 10; this._rotation = 0; if (this.moveRL > 35) { this._x += 35; } else { if (this.moveRL < -35) { this._x += -35; } else { this._x += this.moveRL; } } this.centerX = this._x; if (this._xscale > 0) { this.temp = 'lEdge'; } else { this.temp = 'lBackEdge'; } } else { if (tehground.hitTest(this._x + this.RAnchx(this._rotation * 0.0174532925199433) + this.fakeRL + this.UDx(this.WasSix()), this._y + this.RAnchy(this._rotation * 0.0174532925199433) + this.fakeUD + this.UDy(this.WasSix()), true) || tehground.hitTest(this._x + this.fakeRL + this.LAnchx(this._rotation * 0.0174532925199433) + this.UDx(this.WasSix()), this._y + this.fakeUD + this.LAnchy(this._rotation * 0.0174532925199433) + this.UDy(this.WasSix()), true)) { this.fakeRL = this.RLx(this.moveRL); this.fakeUD = this.RLy(this.moveRL); vx = this.moveRL * Math.sin((this.delayRot + 90) * 0.0174532925199433); vy = -this.moveRL * Math.cos((this.delayRot + 90) * 0.0174532925199433) + this.isTall * 0.08; vx = this.moveRL * Math.sin((this.delayRot + 90) * 0.0174532925199433); vy = -this.moveRL * Math.cos((this.delayRot + 90) * 0.0174532925199433) + this.isTall * 0.08; angle = this.oldWallRot * Math.PI / 180; ex1 = Math.cos(angle) * ex + Math.sin(angle) * ey; vx1 = Math.cos(angle) * vx + Math.sin(angle) * vy; vy1 = Math.cos(angle) * vy - Math.sin(angle) * vx; if (vy1 > -(this.isTall * 0.08 - 2) || this.CheckHead()) { } else { this.moveUD = 0; this.temp = 'Fall'; } this.centerX += this.fakeRL; this.centerY += this.fakeUD; } else { if (dontFall && Math.abs(this._rotation) < 90) { this.hairRL = 0; this.moveRL = 0; } else { this.centerX += this.fakeRL; this.centerY += this.fakeUD; this.temp = 'Fall'; } } } } } } } } this._x = this.centerX + (this.isTall / 2) * Math.sin((this._rotation + 180) * 0.0174532925199433); this._y = this.centerY - (this.isTall / 2) * Math.cos((this._rotation + 180) * 0.0174532925199433); this.hairRL = this.moveRL; this.hairUD = this.moveUD; if (this.thisIs == 'Char') { CharYPoint = this._y; } if (water.hitTest(this._x, this._y - this.isTall * 0.75, true) || water.hitTest(this._x, this._y, true) && water.hitTest(this._x, this._y + 50, true) && Math.abs(this.moveRL) > 10 && !testAll(this._x + this.mRL() * this.spread * 2, this._y)) { this.waterY = this._y; while (_root.water.hitTest(this.centerX, this.waterY, true)) { --this.waterY; } this.fallView = this.RLy(SmoothScroll / 2) + yRot(vOffset, this._rotation); this.smokeRot = this._rotation; this._rotation *= 0.5; this.moveUD = this.RLy(this.moveRL); this.moveRL = this.RLx(this.moveRL); if (rolling) { this.isTall = 25; this.shouldRot = -Math.atan2(-this.moveRL, 0) / 0.0174532925199433; this.eRot = this.shouldRot; this.swimRL = this.moveRL; this.fallView -= -(this.swimRL * 15) * Math.cos(this.eRot * 0.0174532925199433); this.gotoAndStop('waterRoll'); } else { if (Math.abs(this.moveRL) > 10) { this.gotoAndStop('waterSlide'); if (sliding) { this.CharSlide.gotoAndStop(10); } this.fallView = 0; } else { this.eRot = -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433; this.swimRL = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); this.resetJumpStuff(); this.tilt = 0; this._rotation = 0; this.rotOffset = 0; this.fallView -= -(this.swimRL * 15) * Math.cos(this.eRot * 0.0174532925199433); this.gotoAndStop('Float'); this._x = this.centerX + (this.isTall / 2) * Math.sin((this._rotation + 180) * 0.0174532925199433); this._y = this.centerY - (this.isTall / 2) * Math.cos((this._rotation + 180) * 0.0174532925199433); } } } else { if (this.temp == 'Fall') { if (ledgeGrab) { if (this.LedgeDownIt()) { return 'ledgeGrab'; } } if (Math.abs(this._rotation) > 70 && Math.abs(this.moveRL) > 5) { if (Math.abs(this._rotation) > 120) { this.fliprot = -10; } else { this.fliprot = -5; } this.fliprot *= this._xscale / Math.abs(this._xscale); } else { this.fliprot = 0; } this.tempRot = RotToAccel(this._rotation) * 45; if (this.tempRot * this.moveRL < 0 && Math.abs(this.tempRot) > 5) { messagePopup('thisfloat'); this.tempFloat = Math.round(this.moveRL * this.moveRL / 60 - (Math.abs(this.tempRot) - 30) / 10); } else { this.tempFloat = 0; } if (Math.abs(this.moveRL) / 5 > this.tempFloat) { this.tempFloat = Math.abs(this.moveRL) / 5; } SmoothScroll = Char.RLx(SmoothScroll); this.JumpFunc(0, false, rolling, false, true); if (this.tempFloat < 4 && Math.abs(this.moveRL) > 2) { this.FloatUp = 4; this.FloatStill = true; this.fromFloatY = this._y; } else { if (this.tempFloat > 0) { if (this.tempFloat > 12) { this.FloatUp = 12; } else { this.FloatUp = this.tempFloat; } this.FloatStill = true; this.fromFloatY = this._y; } } } } if (Math.abs(this.tilt - this._rotation) > 180) { if (this.tilt > this._rotation) { this.tilt -= 360; } else { this.tilt += 360; } } if (this.temp == false) { return 'Gravy'; } else { return this.temp; } }; LedgeDownIt = function () { if (!this.CheckHead() && Math.abs(this._rotation) < 2) { if (testWallzAndPlatz(this._x + (this.spread * 4 - this.moveRL) + 10, this._y + 10) && !testAll(this._x + (-this.spread * 4 - this.moveRL) - 10, this._y + 10)) { this.isTall = 50; this._xscale = 100; this.ledgeTil = 0; while (_root.testAll(this._x + 14 + this.ledgeTil, this._y + 15, true)) { --this.ledgeTil; } while (!_root.testAll(this._x + 15 + this.ledgeTil, this._y + 15, true)) { ++this.ledgeTil; } if (tehplatformz.hitTest(this._x + 15 + this.ledgeTil + 10, this._y + 10, true)) { this.ledgingGrab = tehplatformz; } else { if (tehwallz.hitTest(this._x + 15 + this.ledgeTil + 10, this._y + 10, true)) { this.ledgingGrab = tehwallz; } } this.gotoAndStop('LedgeDown'); return true; } else { if (testWallzAndPlatz(this._x + (-this.spread * 4 - this.moveRL) - 10, this._y + 10) && !testAll(this._x + (this.spread * 4 - this.moveRL) + 10, this._y + 10)) { this.isTall = 50; this._xscale = -100; this.ledgeTil = 0; while (_root.testAll(this._x - 14 + this.ledgeTil, this._y + 15, true)) { ++this.ledgeTil; } while (!_root.testAll(this._x - 15 + this.ledgeTil, this._y + 15, true)) { --this.ledgeTil; } if (tehplatformz.hitTest(this._x - 15 + this.ledgeTil, this._y + 10, true)) { this.ledgingGrab = tehplatformz; } else { if (tehwallz.hitTest(this._x - 15 + this.ledgeTil, this._y + 10, true)) { this.ledgingGrab = tehwallz; } } this.gotoAndStop('LedgeDown'); return true; } else { return false; } } } else { return false; } }; CheckLedgeDown = function () { if (Math.abs(this._rotation) < 2 && !this.CheckHead()) { if (_root.testWallzAndPlatz(this._x + this.RLx(this.spread) + this.UDx(5), this._y + this.RLy(this.spread) + this.UDy(5)) && !testAll(this._x + this.RLx(-this.spread * 4) + this.UDx(5), this._y + this.RLy(-this.spread * 3) + this.UDy(5))) { return true; } else { if (_root.testWallzAndPlatz(this._x + this.RLx(-this.spread) + this.UDx(5), this._y + this.RLy(-this.spread) + this.UDy(5)) && !testAll(this._x + this.RLx(this.spread * 4) + this.UDx(5), this._y + this.RLy(this.spread * 3) + this.UDy(5))) { return true; } } } else { return false; } }; crazyLander = function (landOn) { if (landOn == 'aPlatz') { this.wallX = aPlatz['aPlatz' + this.aPlatzOn]._x; this.wallY = aPlatz['aPlatz' + this.aPlatzOn]._y; this.wallRot = aPlatz['aPlatz' + this.aPlatzOn]._rotation; } else { if (landOn == 'platBoth') { platOffset = 0; if (!tehplatformz.hitTest(this.wallX + this.moveRL + this.spread * 2 - i, this.wallY + this.moveUD, true) && !tehplatformz.hitTest(this.wallX + this.spread * 2 - i, this.wallY + this.moveUD + 30, true)) { var i = 0; while (i < this.spread * 3) { if (!tehplatformz.hitTest(this.wallX + this.moveRL + this.spread * 2 - i, this.wallY + this.moveUD, true) && !tehplatformz.hitTest(this.wallX + this.spread * 2 - i, this.wallY + this.moveUD + 30, true)) { } else { platOffset = -i; break; } ++i; } } if (!tehplatformz.hitTest(this.wallX + this.moveRL - this.spread * 2 + i, this.wallY + this.moveUD, true) && !tehplatformz.hitTest(this.wallX - this.spread * 2 + i, this.wallY + this.moveUD + 30, true)) { var i = 0; while (i < this.spread * 3) { if (!tehplatformz.hitTest(this.wallX + this.moveRL - this.spread * 2 + i, this.wallY + this.moveUD, true) && !tehplatformz.hitTest(this.wallX - this.spread * 2 + i, this.wallY + this.moveUD + 30, true)) { } else { platOffset = i; break; } ++i; } } temp = FindRot(this.jumprot, this.wallX + platOffset, this.wallY, this.nowSpeed, this.spread, true, this); if (Math.abs(temp) < 3) { temp = 0; } else { if (Math.abs(temp) > 85) { messagePopup('fixthatplatrotB!'); temp = 0; } } this.wallRot = temp; } else { if (landOn == 'platRight') { var i = 0; while (i < 100) { if (!tehplatformz.hitTest(this.wallX + this.RAnchx(this._rotation * 0.0174532925199433) + this.moveRL - 5, this.wallY + this.RAnchy(this._rotation * 0.0174532925199433) + 10, true)) { ++this.wallX; messagePopup('platR++'); } else { break; } ++i; } var i = this.spread; while (i < this.spread * 3) { platOffset = i; if (tehplatformz.hitTest(this.wallX - (this.spread * 2 - i), this.wallY + this.moveUD, true)) { break; } ++i; } temp = FindRot(this.jumprot, this.wallX + platOffset, this.wallY, this.nowSpeed, this.spread, true, this); if (Math.abs(temp) < 3) { temp = 0; } else { if (Math.abs(temp) > 85) { messagePopup('fixthatplatrotR!'); temp = 0; } } this.wallRot = temp; } else { if (landOn == 'platLeft') { var i = 0; while (i < 100) { if (!tehplatformz.hitTest(this.wallX + this.LAnchx(this._rotation * 0.0174532925199433) + this.moveRL + 5, this.wallY + this.LAnchy(this._rotation * 0.0174532925199433) + 10, true)) { --this.wallX; messagePopup('platL--'); } else { break; } ++i; } var i = this.spread; while (i < this.spread * 3) { platOffset = -i; if (tehplatformz.hitTest(this.wallX + (this.spread * 2 - i), this.wallY + this.moveUD, true) && !tehplatformz.hitTest(this.wallX + (this.spread * 2 - i), this.wallY + this.moveUD + 30, true)) { break; } ++i; } temp = FindRot(this.jumprot, this.wallX + platOffset, this.wallY, this.nowSpeed, this.spread, true, this); if (Math.abs(temp) < 3) { temp = 0; } else { if (Math.abs(temp) > 85) { messagePopup('fixthatplatrotL!'); temp = 0; } } this.wallRot = temp; } else { if (landOn == 'wallBoth') { this.wallRot = 0; } else { if (landOn == 'wallRight') { this.wallRot = 0; var i = 0; while (i < 20) { if (!tehwallz.hitTest(this._x + this.RAnchx(this._rotation * 0.0174532925199433), this._y + this.RAnchy(this._rotation * 0.0174532925199433) + this.moveUD + 10, true)) { ++this._x; messagePopup('wallR++'); } else { break; } ++i; } } else { if (landOn == 'wallLeft') { this.wallRot = 0; var i = 0; while (i < 20) { if (!tehwallz.hitTest(this._x + this.LAnchx(this._rotation * 0.0174532925199433), this._y + this.LAnchy(this._rotation * 0.0174532925199433) + this.moveUD + 10, true)) { --this._x; messagePopup('wallL--'); } else { break; } ++i; } } else { if (landOn == 'ground') { temp = FindRot(this.jumprot, this._x, this._y, this.nowSpeed, this.spread, true, this); this.wallRot = temp; } else { messagePopup('land? ' + landOn); } } } } } } } } }; RotFixer = function (rot) { RotFix._rotation = rot; return RotFix._rotation; }; CheckBaddieHit = function (ex, ey, eRL, eUD) { this.temp = false; if (BLayer.hitTest(ex + eRL, ey + eUD, true)) { var v2 = 0; while (v2 < BaddieArray.length) { i = BaddieArray[v2]; if (BLayer['Baddie' + i].hitTest(ex + eRL, ey + eUD, true)) { if (Math.abs(this.centerY + this.moveUD - BLayer['Baddie' + i].centerY) < this.isTall / 2 + BLayer['Baddie' + i].spread) { this.temp = BLayer['Baddie' + i].hitCharFunc(ex, ey, eRL, eUD, this.aBadOn, this); if (this.temp == undefined) { this.temp = false; } } else { messagePopup('don\'t hit'); } } ++v2; } } return this.temp; }; CheckBaddieJumpHit = function (ex, ey, eRL, eUD) { this.temp = false; if (BLayer.hitTest(ex + eRL, ey + eUD, true)) { this.CheckJumpPad(ex, ey, eRL, eUD); var v2 = 0; while (v2 < BaddieArray.length) { i = BaddieArray[v2]; if (BLayer['Baddie' + i].hitTest(ex + eRL, ey + eUD, true)) { if (Math.abs(this.centerY + this.moveUD - BLayer['Baddie' + i].centerY) < this.isTall / 2 + BLayer['Baddie' + i].spread) { this.temp = BLayer['Baddie' + i].hitCharFunc(ex, ey, eRL, eUD, this.aBadOn, this); if (this.temp == undefined) { this.temp = false; } } else { mmessagePopup('don\'t hit'); } } ++v2; } } return this.temp; }; CheckBaddiePwning = function (ex, ey, eRL, eUD) { this.temp = false; if (BLayer.hitTest(ex + eRL, ey + eUD, true)) { var v2 = 0; while (v2 < BaddieArray.length) { i = BaddieArray[v2]; if (BLayer['Baddie' + i].hitTest(ex + eRL, ey + eUD, true) && BLayer['Baddie' + i].downTime == 0) { if (Math.abs(this.centerX - BLayer['Baddie' + i].centerX) < BLayer['Baddie' + i].isWide * 0.5 + Math.abs(eRL) && Math.abs(this.centerY - BLayer['Baddie' + i].centerY) < this.isTall / 2 + BLayer['Baddie' + i].spread) { this.temp = BLayer['Baddie' + i].hitPwnFunc(ex, ey, eRL, eUD, this.aBadOn, this); if (this.temp == undefined) { this.temp = false; } } else { this.temp = false; } } ++v2; } if (this.temp) { ++this.combo; this.comboSome += 39; if (this.combo > 1) { this.gNHD = ELayer.getNextHighestDepth(); ELayer.attachMovie('messagePopup', 'combo!' + this.gNHD, this.gNHD, {'_x': this._x + 40, '_y': this._y - 30, 'smoke': this.combo + '!'}); } } } return this.temp; }; CheckBaddieAirPwning = function (ex, ey, eRL, eUD) { this.temp = false; if (BLayer.hitTest(ex + eRL, ey + eUD, true)) { this.CheckJumpPad(ex, ey, eRL, eUD); var v2 = 0; while (v2 < BaddieArray.length) { i = BaddieArray[v2]; if (BLayer['Baddie' + i].hitTest(ex + eRL, ey + eUD, true) && BLayer['Baddie' + i].downTime == 0) { if (Math.abs(this.centerX - BLayer['Baddie' + i]._x) < BLayer['Baddie' + i].isWide * 0.5 + Math.abs(this.moveRL) && Math.abs(this.centerY - BLayer['Baddie' + i].centerY) < this.isTall / 2 + BLayer['Baddie' + i].spread) { this.temp = BLayer['Baddie' + i].hitPwnFunc(ex, ey, eRL, eUD, this.aBadOn, this); if (this.temp == undefined) { this.temp = false; } } else { this.temp = false; } } ++v2; } if (this.temp) { ++this.combo; this.comboSome += 39; if (this.combo > 1) { this.gNHD = ELayer.getNextHighestDepth(); ELayer.attachMovie('messagePopup', 'combo!' + this.gNHD, this.gNHD, {'_x': this._x + 40, '_y': this._y - 30, 'smoke': this.combo + '!'}); } } } return this.temp; }; CheckAttack = function (eType, hitPower, offsetX, finisher) { this.temp = false; eRot = this._rotation + this._xscale * 0.5; tempN = -1; var v9 = Math.abs(SnailShell.centerX - (this._x + (offsetX / 2) * Math.sin((this._rotation + 90) * 0.0174532925199433))); var v8 = Math.abs(SnailShell.centerY - (this.centerY + -(offsetX / 2) * Math.cos((this._rotation + 90) * 0.0174532925199433))); if (v9 < 70 && v8 < 70 && SnailShell.downTime == 0) { return AttackShell(this._x, this._y, this._xscale, eType, hitPower * 1.5, offsetX, finisher, eRot, SnailShell, this); } else { if (BLayer.hitTest(this._x, this._y, true) || BLayer.hitTest(this._x + offsetX * Math.sin((this._rotation + 90) * 0.0174532925199433), this._y + -offsetX * Math.cos((this._rotation + 90) * 0.0174532925199433), true)) { distX = 1000; tempN = -1; badArray = new Array(); if (finisher) { var v4 = 0; while (v4 < BaddieArray.length) { i = BaddieArray[v4]; if ((BLayer['Baddie' + i].hitTest(this._x, this._y, true) || BLayer['Baddie' + i].hitTest(this._x + offsetX * Math.sin((this._rotation + 90) * 0.0174532925199433), this._y + -offsetX * Math.cos((this._rotation + 90) * 0.0174532925199433), true)) && BLayer['Baddie' + i].downTime == 0) { badArray.push(i); if (Math.abs(this._x - BLayer['Baddie' + i].centerX) < distX) { this.temp = AttackIt(this._x, this._y, this._xscale, eType, hitPower, offsetX, finisher, eRot, BLayer['Baddie' + i], this); if (this.temp == undefined) { this.temp = false; } } } ++v4; } } else { var v4 = 0; while (v4 < BaddieArray.length) { i = BaddieArray[v4]; if ((BLayer['Baddie' + i].hitTest(this._x, this._y, true) || BLayer['Baddie' + i].hitTest(this._x + offsetX * Math.sin((this._rotation + 90) * 0.0174532925199433), this._y + -offsetX * Math.cos((this._rotation + 90) * 0.0174532925199433), true)) && BLayer['Baddie' + i].downTime == 0) { badArray.push(i); if (Math.abs(this._x - BLayer['Baddie' + i].centerX) < distX) { tempN = i; distX = Math.abs(this._x - BLayer['Baddie' + i].centerX); } } ++v4; } if (tempN > -1) { this.temp = AttackIt(this._x, this._y, this._xscale, eType, hitPower, offsetX, finisher, eRot, BLayer['Baddie' + tempN], this); if (this.temp == undefined) { this.temp = false; } } } if (this.temp != false) { return this.temp; } } } if (substring(eType, 1, 3) != 'jab') { if (tehwallz.hitTest(this.centerX + offsetX * Math.sin((this._rotation + 90) * 0.0174532925199433) + this.moveRL, this.centerY, true) || tehwallz.hitTest(this.centerX + offsetX * Math.sin((this._rotation + 90) * 0.0174532925199433) / 2 + this.moveRL, this.centerY, true)) { this.moveRL = -hitPower * (this._xscale / 100); _root.powEffect(this._x + offsetX * Math.sin((this._rotation + 90) * 0.0174532925199433), this._y + -offsetX * Math.cos((this._rotation + 90) * 0.0174532925199433), 0, 0, 100, (this._xscale / Math.abs(this._xscale)) * -90); _root.playSound('baseballHit', this._x + offsetX * Math.sin((this._rotation + 90) * 0.0174532925199433), 20 + hitPower * 2); shakeRL = 6; this.CharPencilDraw.gotoAndPlay('deflected'); return 'defect'; } } }; CheckAirAttack = function (ex, ey, eRL, eUD) { this.temp = false; if (BLayer.hitTest(ex + eRL, ey + eUD, true)) { this.CheckJumpPad(ex, ey, eRL, eUD); var v2 = 0; while (v2 < BaddieArray.length) { i = BaddieArray[v2]; if (BLayer['Baddie' + i].hitTest(ex + eRL, ey + eUD, true) && BLayer['Baddie' + i].downTime == 0) { this.dirRL = ex - BLayer['Baddie' + i]._x; this.dirUD = ey - BLayer['Baddie' + i]._y; if (BLayer['Baddie' + i].getAttacked(ex + eRL, ey + eUD, this.hitPower, this._xscale / 2, 'airPwn', this)) { this.temp = true; shakeRL = 2; slashEffect(BLayer['Baddie' + i]._x, BLayer['Baddie' + i]._y, this._xscale, 160 * this._xscale / 100); gNHD = ELayer.getNextHighestDepth(); ELayer.attachMovie('justaPopup', 'damage!' + gNHD, gNHD, {'_x': BLayer['Baddie' + i]._x + 15 - random(30), '_y': BLayer['Baddie' + i]._y - 10 - BLayer['Baddie' + i].spread - random(10), 'moveRL': this._xscale / 5, 'moveUD': random(5) / 2, '_xscale': 95 + this.hitPower * 3, '_yscale': 95 + this.hitPower * 3, 'smoke': '-' + Math.round(this.hitPower), 'onEnterFrame': damageEnterFrame}); } } ++v2; } } return this.temp; }; CheckJumpPad = function (ex, ey, eRL, eUD) { if (this.aBadOn == -1 && eUD > 0) { var v2 = 0; while (BLayer['JumpPad' + v2] != undefined) { if (BLayer['JumpPad' + v2].hitTest(ex + eRL, ey + eUD, true) && !BLayer['JumpPad' + v2].hitTest(ex + eRL, ey - 2 - Math.abs(eUD), true) && Math.abs(ex - (BLayer['JumpPad' + v2]._x + BLayer['JumpPad' + v2]._yscale * 0.6 * Math.cos((BLayer['JumpPad' + v2]._rotation - 90) * 0.0174532925199433))) < 40 * (BLayer['JumpPad' + v2]._xscale / 100)) { this.wallJumpFell = false; this._rotation = BLayer['JumpPad' + v2]._rotation; BLayer['JumpPad' + v2].springing._yscale = BLayer['JumpPad' + v2].springHeight * 1.666666666666667; BLayer['JumpPad' + v2].spring = -this.moveUD; if (BLayer['JumpPad' + v2].looseRot) { BLayer['JumpPad' + v2].launchAngle = -(-Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433 + 180); } this.moveUD = 0; delete BLayer['JumpPad' + v2].onEnterFrame; this._x += this.moveRL; this._y = BLayer['JumpPad' + v2]._y - BLayer['JumpPad' + v2].springHeight; this.aBadOn = v2; this.gotoAndStop('BaddieLand'); this.JumpPadLanded = true; return true; } ++v2; } } }; lockOnBaddieCheck = function (ex, ey, eDist, eScale) { tempN = -1; distX = eDist; if (Math.abs(SnailShell._x + SnailShell.moveRL * 10 - ex) < distX && Math.abs(SnailShell.centerY - ey) < 25 + SnailShell.spread && (ex - SnailShell._x) * eScale < 0) { distX = Math.abs(Snailshell._x - ex); tempN = 100; } var v1 = 0; while (v1 < BaddieArray.length) { i = BaddieArray[v1]; if (Math.abs(BLayer['Baddie' + i]._x + BLayer['Baddie' + i].moveRL * 2 - ex) < distX + BLayer['Baddie' + i].isWide && Math.abs(BLayer['Baddie' + i].centerY - ey) < 25 + BLayer['Baddie' + i].spread && BLayer['Baddie' + i].health > 0 && (ex - BLayer['Baddie' + i]._x) * eScale < 0) { distX = Math.abs(BLayer['Baddie' + i]._x - ex); tempN = i; } ++v1; } return tempN; }; AttackIt = function (ex, ey, exscale, eType, hitPower, offsetX, finisher, eRot, eAttack, eThis) { if (eAttack.isWearing == 'nothing' && eAttack.Status != 'Angry') { var v7 = ELayer.getNextHighestDepth(); ELayer.attachMovie('justaPopup', 'damage!' + v7, v7, {'_x': eAttack._x + 15 - random(30), '_y': eAttack._y - 10 - eAttack.spread - random(10), 'moveRL': eThis._xscale / 5, 'moveUD': random(5) / 2, '_xscale': 95 + hitPower * 3, '_yscale': 95 + hitPower * 3, 'smoke': '-' + Math.round(hitPower), 'onEnterFrame': damageEnterFrame}); } this.temp = eAttack.getAttacked(ex, ey, hitPower, eRot, eType, eThis); if (this.temp == undefined) { this.temp = false; } if (this.temp == false) { return false; eThis.lockOn = -1; movePerformed(eType, eAttack.worth, eAttack.ItIs); return this.temp; } if (this.temp == 'blank') { return true; eThis.lockOn = -1; movePerformed(eType, eAttack.worth, eAttack.ItIs); return this.temp; } if (this.temp == 'deflect') { shakeRL = 6; eThis.lockOn = -1; eThis.moveRL = -hitPower * (exscale / 100); eThis.CharPencilDraw.gotoAndPlay('deflected'); if (eType == 'slashLow') { deflectEffect(eAttack._x - exscale / 2, eAttack._y - 40, exscale, eThis._rotation + (random(40) - 20)); } else { deflectEffect(eAttack._x - exscale / 2, eAttack._y - 40, exscale, eThis._rotation - 180 * exscale / 100 + (random(40) - 20)); } eThis.lockOn = -1; movePerformed(eType, eAttack.worth, eAttack.ItIs); return this.temp; } if (substring(eType, 1, 3) == 'jab') { pokeEffect(eAttack._x + xRot(20, eAttack._rotation), eAttack._y + yRot(20, eAttack._rotation), 100, eThis._rotation + exscale * 0.9 + (random(40) - 20)); eThis.lockOn = -1; movePerformed(eType, eAttack.worth, eAttack.ItIs); return this.temp; } if (eType == 'slashLow') { shakeRL = 3; slashEffect(eAttack._x + xRot(20, eAttack._rotation), eAttack._y + yRot(20, eAttack._rotation), exscale, eThis._rotation + 45 * exscale / 100 + (random(20) - 10)); eThis.lockOn = -1; movePerformed(eType, eAttack.worth, eAttack.ItIs); return this.temp; } shakeRL = 3; slashEffect(eAttack._x + xRot(20, eAttack._rotation), eAttack._y + yRot(20, eAttack._rotation), exscale, eThis._rotation + 135 * exscale / 100 + (random(20) - 10)); eThis.lockOn = -1; movePerformed(eType, eAttack.worth, eAttack.ItIs); return this.temp; }; AttackShell = function (ex, ey, exscale, eType, hitPower, offsetX, finisher, eRot, eAttack, eThis) { this.temp = eAttack.getAttacked(ex, ey, hitPower, eRot, eType, eThis); if (this.temp == undefined) { this.temp = false; } if (this.temp == false) { return false; eThis.lockOn = -1; movePerformed(eType, eAttack.worth, eAttack.ItIs); return this.temp; } if (this.temp == 'deflect') { eThis.CharPencilDraw.gotoAndPlay('deflected'); if (eType == 'slashLow') { deflectEffect(eAttack._x - exscale / 2, eAttack._y - 40, exscale, eThis._rotation + (random(40) - 20)); } else { deflectEffect(eAttack._x - exscale / 2, eAttack._y - 40, exscale, eThis._rotation - 180 * exscale / 100 + (random(40) - 20)); } eThis.lockOn = -1; movePerformed(eType, eAttack.worth, eAttack.ItIs); return this.temp; } if (substring(eType, 1, 3) == 'jab') { pokeEffect(eAttack._x + xRot(20, eAttack._rotation), eAttack._y + yRot(20, eAttack._rotation), 100, eThis._rotation + exscale * 0.9 + (random(40) - 20)); eThis.lockOn = -1; movePerformed(eType, eAttack.worth, eAttack.ItIs); return this.temp; } if (eType == 'slashLow') { shakeRL = 3; slashEffect(eAttack._x + xRot(20, eAttack._rotation), eAttack._y + yRot(20, eAttack._rotation), exscale, eThis._rotation + 45 * exscale / 100 + (random(20) - 10)); eThis.lockOn = -1; movePerformed(eType, eAttack.worth, eAttack.ItIs); return this.temp; } shakeRL = 3; slashEffect(eAttack._x + xRot(20, eAttack._rotation), eAttack._y + yRot(20, eAttack._rotation), exscale, eThis._rotation + 135 * exscale / 100 + (random(20) - 10)); eThis.lockOn = -1; movePerformed(eType, eAttack.worth, eAttack.ItIs); return this.temp; }; slashEffect = function (ex, ey, eScale, eRot) { var v1 = ELayer.getNextHighestDepth(); ELayer.attachMovie('slashEffect', 'slashEffect' + v1, v1, {'_x': ex, '_y': ey, '_xscale': eScale, '_rotation': eRot}); }; deflectEffect = function (ex, ey, eScale, eRot) { var v1 = ELayer.getNextHighestDepth(); ELayer.attachMovie('deflectEffect', 'deflectEffect' + v1, v1, {'_x': ex, '_y': ey, '_xscale': eScale, '_yscale': eScale, '_rotation': eRot}); }; pokeEffect = function (ex, ey, eScale, eRot) { var v1 = ELayer.getNextHighestDepth(); ELayer.attachMovie('pokeEffect', 'pokeEffect' + v1, v1, {'_x': ex, '_y': ey, 'moveRL': eRL, 'moveUD': eUD, '_rotation': eRot}); }; powEffect = function (ex, ey, eRL, eUD, eScale, eRot) { var v2 = ELayer.getNextHighestDepth(); ELayer.attachMovie('POW', 'POW' + v2, v2, {'_x': ex, '_y': ey, 'moveRL': eRL, 'moveUD': eUD, '_rotation': eRot}); ELayer['POW' + v2].onEnterFrame = function () { this.moveRL *= 0.9; this.moveUD *= 0.9; this._x += this.moveRL; this._y += this.moveUD; }; }; damageEnterFrame = function () { this.moveRL *= 0.8; this.moveUD *= 0.8; this._x += this.moveRL; this._y += this.moveUD; if (Math.abs(this.moveRL) < 2) { this.moveUD = -1; this.onEnterFrame = function () { this.moveUD *= 1.2; this._alpha += this.moveUD; if (this._alpha < 5) { this.removeMovieClip(); } this._xscale -= this.moveUD; this._yscale -= this.moveUD; this._x += this.moveRL; this._y += this.moveUD / 2; }; } }; charLoadWeapon = function () { if (CharHasWeapon == 'nothing') { Char.drawWeapon = function () { return 'nothing'; }; } else { Char.drawWeapon = function (eFrame) { if (Math.abs(this._rotation) < 90) { return eFrame; } else { return 'nothing'; } }; } }; HurtPants = function (ow, fromChar) { if (ow == undefined) { messagePopup('||||||||||||'); ow = 5; } Health -= ow; if (Health < 0) { Health = 0; } if (Health > 100) { Health = 100; } OutPut.HealthBar._xscale = Health; if (ow >= 0) { shakeRL = 5; APITrackEvent('getHurt'); fromChar.aPlatzOn = -1; fromChar._alpha = 50; fromChar.hairRL = 0; fromChar.gelHair(); moveComboScoreSmoke = 0; comboTimer = -100; comboTimerMax = 120; moveComboScore = 0; comboMultiplier = 0.5; delete moveArray; moveArray = new Array(); delete moveArrayString; moveArrayString = new String(); OutPut.ComboTimerShell.ComboBar._xscale = 0; playSound('Ow', fromChar._x, 100); updateComboTimer(); } }; PayPants = function () { ++Squiggles; ++SquigglesGet; SquigglesGetYourMom += 5; if (Squiggles / 100 == Math.round(Squiggles / 100)) { APITrackEvent('extraLife'); ++Lives; LivesUnderground += 23; _root.playSound('OneUpSound'); OutPut.counterLives.updateCounter(Lives); } OutPut.counterSquiggles.updateCounter(Squiggles); }; PlaceCharBump = function (ex, ey, rot) { tehground.attachMovie('CharBump', 'CharBump', tehground.getNextDepth(), {'_x': ex, '_y': ey, '_rotation': rot}); }; Died = function () { this._x = InteractLayer.Door0._x + InteractLayer.Door0._xscale / 2; this._y = InteractLayer.Door0._y; this._xscale = InteractLayer.Door0._xscale; this._alpha = 50; this._rotation = 0; this.moveRL = 0; this.moveUD = -10; HurtPants(34, this); Setup = _root[LevelLoaded + 'Setup']; Setup(); delete Setup; this.fliprot = this.smokeRot; this.smokeRot = 0; this.tilt = 0; this.gotoAndStop('FrontSlam'); }; this.fakeRL = this.RLx(35); this.fakeUD = this.RLy(35); CheckHead = function () { return tehwallz.hitTest(this._x + this.spread, this._y - 50, true) || tehwallz.hitTest(this._x - this.spread, this._y - 50, true) || tehground.hitTest(this._x + 25 * Math.sin(this._rotation * 0.0174532925199433), this._y - 25 * Math.cos(this._rotation * 0.0174532925199433), true) || tehground.hitTest(this._x + 50 * Math.sin(this._rotation * 0.0174532925199433), this._y - 50 * Math.cos(this._rotation * 0.0174532925199433), true); }; Standing = function () { return this._currentframe != 12 && this._currentframe != 11 && this._currentframe != 31; }; mRL = function () { if (this.moveRL == 0) { return 0; } else { return this.moveRL / Math.abs(this.moveRL); } }; mUD = function () { if (this.moveUD == 0) { return 0; } else { return this.moveUD / Math.abs(this.moveUD); } }; CheckInteractHit = function (ex, ey, eRL, eUD, fromChar) { if (TimeTrialLine != 'Z') { temp2 = InteractLayer['CoinTT' + TimeTrialLine + 'Point' + (TimeTrialPoint + 1)].coinTween; if (temp2._xscale < 66) { temp2._xscale += (68 - temp2._xscale) / 3; temp2._yscale = temp2._xscale; } temp3 = InteractLayer['CoinTT' + TimeTrialLine + 'Point' + (TimeTrialPoint + 2)].coinTween; if (temp3._xscale < 33) { temp3._xscale += (35 - temp3._xscale) / 3; temp3._yscale = temp3._xscale; } ++frameTimeTT; if (frameTimeTT > lastFrameTimeTT + 60) { frameTimeTT = _root['highScoreTT' + LevelLoaded]; springTT.springDisplay.timer.text = frameTimeTT; var v4 = 0; while (InteractLayer['CoinTT' + TimeTrialLine + 'Point' + v4] != undefined) { InteractLayer['CoinTT' + _root.TimeTrialLine + 'Point' + v4].gotoAndStop(21); ++v4; } TimeTrialLine = 'Z'; OutPut.gotoAndStop('levels'); playSound('failure'); BackgroundMusic.stop(); loadMusic(LevelLoaded); BackgroundMusic.setVolume(100); BackgroundVolume = 100; shakeRL = 3; } springTT.springDisplay.timer.text = frameTimeTT; } if (InteractLayer.hitTest(ex, ey, true)) { v4 = 0; while (InteractLayer['Coin' + v4]._x != undefined) { if (InteractLayer['Coin' + v4].hitTest(ex, ey, true) && InteractLayer['Coin' + v4]._currentframe < 3) { InteractLayer['Coin' + v4].rot = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD) * 5 * (this.moveRL / Math.abs(this.moveRL)); InteractLayer['Coin' + v4].gotoAndPlay('Hit'); playSound('CoinVoice', InteractLayer['Coin' + v4]._x, 100); if (water.hitTest(ex, ey, true)) { var v3 = 0; while (v3 < 10) { _root.spawnBubble(InteractLayer['Coin' + v4]._x - 15 + random(30), InteractLayer['Coin' + v4]._y - 15 + random(30), 20 + random(20), 0); ++v3; } } break; } ++v4; } if (TimeTrialLine != 'Z') { if (InteractLayer['CoinTT' + TimeTrialLine + 'Point' + TimeTrialPoint].hitTest(ex, ey, true) && InteractLayer['CoinTT' + TimeTrialLine + 'Point' + TimeTrialPoint]._currentframe < 4) { InteractLayer['CoinTT' + TimeTrialLine + 'Point' + TimeTrialPoint].rot = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD) * 5 * (this.moveRL / Math.abs(this.moveRL)); InteractLayer['CoinTT' + TimeTrialLine + 'Point' + TimeTrialPoint].gotoAndPlay('Hit'); playSound('GoldenSquiggle', InteractLayer['CoinTT' + TimeTrialLine + 'Point' + TimeTrialPoint]._x, 100); ++TimeTrialPoint; timeLimitSmoke = TimeTrialTotal - TimeTrialPoint + 1; if (InteractLayer['CoinTT' + TimeTrialLine + 'Point' + TimeTrialPoint] == undefined) { TimeTrialLine = 'Z'; gNHD = ELayer.getNextHighestDepth(); ELayer.attachMovie('messagePopup', 'combo!' + gNHD, gNHD, {'_x': this._x + 40, '_y': this._y - 30, 'smoke': frameTimeTT}); APITrackEvent('highScoreTT' + LevelLoaded, frameTimeTT); BackgroundMusic.stop(); loadMusic(LevelLoaded); BackgroundMusic.setVolume(100); BackgroundVolume = 100; playSound('success'); if (!_root[LoadIt + 'TTGot']) { _root[LoadIt + 'TTGot'] = true; APITrackEvent('extraLife'); ++Lives; LivesUnderground += 23; playSound('OneUpSound'); OutPut.counterLives.updateCounter(Lives); } shakeRL = 5; OutPut.gotoAndStop('levels'); if (frameTimeTT < _root['highScoreTT' + LevelLoaded] || _root['highScoreTT' + LevelLoaded] == 0) { _root['highScoreTT' + LevelLoaded] = frameTimeTT; saveNetworkData(); } else { frameTimeTT = _root['highScoreTT' + LevelLoaded]; springTT.springDisplay.timer.text = frameTimeTT; } if (_root['highScoreTT' + LevelLoaded] < 400) { APIReward('A tiny trial'); } if (_root['highScoreTT' + LevelLoaded] < 280) { APIReward('An awesome trial'); } } else { lastFrameTimeTT = frameTimeTT; InteractLayer['CoinTT' + TimeTrialLine + 'Point' + TimeTrialPoint]._rotation = 0; InteractLayer['CoinTT' + TimeTrialLine + 'Point' + TimeTrialPoint].gotoAndStop('nextUp'); } } } v4 = 0; while (InteractLayer['object' + v4] != undefined) { if (InteractLayer['object' + v4].hitTest(ex, ey, true)) { InteractLayer['object' + v4].objectFunc(ex, ey, eRL, eUD, fromChar); break; } ++v4; } if (this.moveUD > 0 && this._currentframe == 7) { if (InteractLayer.Cannon.hitTest(ex, ey, true)) { InteractLayer.Cannon.Barrel.play(); this.gotoAndStop('Cannon'); this.moveRL = 0; this.moveUD = 0; this._x = InteractLayer.Cannon._x; this._y = InteractLayer.Cannon._y; this._rotation = 0; this._xscale = 100; } } return true; } }; CheckTimeSpring = function (onSpring) { if (onSpring.TimeSpring != false) { TimeTrialLine = onSpring.TimeSpring; TimeTrialPoint = 0; springTT = onSpring; springTT.gotoAndStop(3); frameTimeTT = 0; lastFrameTimeTT; var v1 = 0; while (InteractLayer['CoinTT' + TimeTrialLine + 'Point' + v1] != undefined) { InteractLayer['CoinTT' + TimeTrialLine + 'Point' + v1].gotoAndStop(2); InteractLayer['CoinTT' + TimeTrialLine + 'Point' + v1].coinTween._alpha = 100; InteractLayer['CoinTT' + TimeTrialLine + 'Point' + v1].coinTween._yscale = 25; InteractLayer['CoinTT' + TimeTrialLine + 'Point' + v1].coinTween._xscale = 25; TimeTrialTotal = v1; ++v1; } InteractLayer['CoinTT' + TimeTrialLine + 'Point0']._rotation = 0; InteractLayer['CoinTT' + TimeTrialLine + 'Point0'].gotoAndStop('nextUp'); if (soundIs != 'MiniTrial') { BackgroundMusic.stop(); } loadMusic('MiniTrial'); OutPut.gotoAndStop('MiniTrial'); timeLimitSmoke = TimeTrialTotal + 1; } }; LedgeIt = function (ledgingGrab, ledgeAnim) { if (ledgeAnim == undefined) { ledgeAnim = 2; } if (ledgingGrab == undefined) { if (tehwallz.hitTest(this._x + this._xscale / 4 - this.moveRL, this._y + 10 + this.moveUD, true) || tehwallz.hitTest(this._x + this._xscale / 4 - this.moveRL, this._y + 10 - this.isTall + this.moveUD, true)) { ledgingGrab = tehwallz; } else { if (tehplatformz.hitTest(this._x + this._xscale / 4 - this.moveRL, this._y + 10 + this.moveUD, true) || tehplatformz.hitTest(this._x + this._xscale / 4 - this.moveRL, this._y + 10 - this.isTall + this.moveUD, true)) { ledgingGrab = tehplatformz; } else { messagePopup('GRABALABA'); } } makeLandStep(100); makeItHurt(50); } movePerformed('ledgegrab'); this.resetJumpStuff(); var v3 = 0; while (v3 < Math.abs(this.moveRL) + 10) { if (!ledgingGrab.hitTest(this._x + 14 * (this._xscale / 100), this._y - this.isTall + this.moveUD, true)) { this._x += this._xscale / 100; } else { break; } ++v3; } while (ledgingGrab.hitTest(this._x + 15 * (this._xscale / 100), this._y - this.isTall + this.moveUD, true)) { this._x -= this._xscale / 100; } v3 = 0; while (v3 < Math.abs(this.moveUD) + 20) { if (!ledgingGrab.hitTest(this._x + 20 * (this._xscale / 100), this._y - (this.isTall + 9), true)) { ++this._y; } else { break; } ++v3; } while (ledgingGrab.hitTest(this._x + 20 * (this._xscale / 100), this._y - (this.isTall + 10), true)) { --this._y; } false; this.centerX = this._x; this.centerY = this._y - 25; this.tilt = 0; this.smokeRot = 0; this.wallRot = 0; this.oldWallRot = 0; this.gotoAndStop('LedgeHang'); this.CharHang.gotoAndPlay(ledgeAnim); }; findThatLedgeTil = function () { this.startLedgeOffset = 0; while (!testAll(this._x - 10 * (this._xscale / 100), this._y + 15, true)) { this._x += this._xscale / 100; ++this.startLedgeOffset; } this.ledgeTil = 0; while (testAll(this._x + 10 * this._xscale / 100 - this.ledgeTil * this._xscale / 100, this._y + 15, true)) { ++this.ledgeTil; if (this.ledgeTil > 50) { break; } } if (tehwallz.hitTest(this._x - 20 * (this._xscale / 100), this._y + 15, true)) { ledgingGrab = tehwallz; } else { if (tehplatformz.hitTest(this._x - 20 * (this._xscale / 100), this._y + 15, true)) { ledgingGrab = tehplatformz; } else { messagePopup('GRABALABA'); } } }; LedgeLandIt = function () { this.tilt = 0; this.smokeRot = 0; this.resetJumpStuff(); makeLandStep(100); makeItHurt(50); this.tempX = 0; this.tempY = 10; while (tehwallz.hitTest(this._x + 12 * (this._xscale / 100), this._y + this.moveUD, true)) { this._x -= this._xscale / 100; --this.tempX; } var v2 = 0; while (v2 < Math.abs(this.moveRL) + 10) { if (!tehwallz.hitTest(this._x + 13 * (this._xscale / 100), this._y + this.moveUD, true)) { this._x += this._xscale / 100; ++this.tempX; } else { break; } ++v2; } while (tehwallz.hitTest(this._x + this._xscale / 5 + this.moveRL, this._y - 25, true)) { messagePopup('ledgeLand --'); --this._y; --this.tempY; } v2 = 0; while (v2 < Math.abs(this.moveUD) + 20) { if (!tehwallz.hitTest(this._x + this._xscale / 5 + this.moveRL, this._y - 26, true)) { ++this._y; ++this.tempY; } else { break; } ++v2; } if (this.moveUD < -2) { movePerformed('ledgehop'); this.gotoAndStop('ledgeHop'); this.char._x = -this.tempX; this.char._y = -this.tempY; } else { this.gotoAndStop('ledgeLand'); } }; HangIt = function () { this.wallJumpFell = false; var v2 = 0; while (v2 < this.moveUD) { if (!tehhangz.hitTest(this._x + this.moveRL, this._y - 61, true)) { ++this._y; } ++v2; } while (tehhangz.hitTest(this._x + this.moveRL, this._y - 60, true)) { --this._y; } this._x += this.moveRL; this.centerX = this._x; this.centerY = this._y - this.isTall / 2; this.moveUD = 0; this.tilt = 0; this.smokeRot = 0; this.gotoAndStop('HangIt'); }; WallIt = function (onWall) { this.terminalVelocity = 0; this.moveRL = 0; this.moveUD *= 0.9; this.hairRL = 0; this.hairGel = 46; this.fliprot = 0; this.smokeRot = 0; this.tilt *= 0.5; this.wallJumped = true; this.smokeN = 9; this.onWall = onWall; if (surface.hitTest(this._x, this._y, true)) { this.wallJumpTimer = 0; } else { this.wallJumpTimer = 10; this.FloatUp = 0; if (this.moveUD > 0) { this.moveUD = 0; this.hairUD = 0; } else { if (onWall * this._xscale > 0) { this.moveUD *= 0.8; } } } this.wallJumpX = this.centerX - this.onWall * (this.spread + 3); this._y += this.moveUD; if (!getFriction(this._x, this._y)) { i = ELayer.getNextHighestDepth(); ELayer.attachMovie('smokeFX', 'smokeFX' + i, i, {'_x': this._x - onWall * 10, '_y': this._y - 20, '_rotation': onWall * 90, '_xscale': 100, '_yscale': 80}); } this.gotoAndStop('WallJump'); }; gelHair = function () { if (Math.abs(this.hairRL) > Math.abs(this.hairUD) || Math.abs(this.hairUD) < 2) { if (Math.abs(this.hairRL) < 4) { this.hairGel = 24; } else { if (this._xscale * this.hairRL > 0) { if (Math.abs(this.hairRL) < 15) { this.hairGel = 13; } else { this.hairGel = 2; } } else { if (Math.abs(this.hairRL) < 15) { this.hairGel = 35; } else { this.hairGel = 46; } } } } else { if (this.hairUD > 0) { this.hairGel = 13; } else { this.hairGel = 35; } } }; RotToAccel = function (rot) { if (rot > 90) { return (180 - rot) / 45; } else { if (rot < -90) { return (-180 - rot) / 45; } else { return rot / 45; } } }; StandingOnTheLedge = function () { if (_root.tehwallz.hitTest(this._x + this.RAnchx(this._rotation * 0.0174532925199433), this._y + this.RAnchy(this._rotation * 0.0174532925199433) + 20, true) && !_root.testAll(this._x + this.LAnchx(this._rotation * 0.0174532925199433) * 2, this._y + this.LAnchy(this._rotation * 0.0174532925199433) * 2 + 20) || _root.tehplatformz.hitTest(this._x + this.LAnchx(this._rotation * 0.0174532925199433), this._y + this.LAnchy(this._rotation * 0.0174532925199433) + 20, true) && !_root.testAll(this._x + this.LAnchx(this._rotation * 0.0174532925199433) * 4, this._y + this.LAnchy(this._rotation * 0.0174532925199433) * 4 + 20)) { return true; } this.LAnchx(this._rotation * 0.0174532925199433); this._y + this.LAnchy(this._rotation * 0.0174532925199433) * 2 + 20; if (_root.tehwallz.hitTest(this._x + true && !_root.testAll(this._x + this.RAnchx(this._rotation * 0.0174532925199433) * 2, this._y + this.RAnchy(this._rotation * 0.0174532925199433) * 2 + 20)) || _root.tehplatformz.hitTest(this._x + this.LAnchx(this._rotation * 0.0174532925199433) * 2, this._y + this.LAnchy(this._rotation * 0.0174532925199433) * 2 + 20, true) && !_root.testAll(this._x + this.RAnchx(this._rotation * 0.0174532925199433) * 4, this._y + this.RAnchy(this._rotation * 0.0174532925199433) * 4 + 20)) { return true; } }; RLx = function (ex) { return ex * Math.sin((this._rotation + 90) * 0.0174532925199433); }; RLy = function (ey) { return -(ey * Math.cos((this._rotation + 90) * 0.0174532925199433)); }; UDx = function (ex) { return ex * Math.sin((this._rotation + 180) * 0.0174532925199433); }; UDy = function (ey) { return -(ey * Math.cos((this._rotation + 180) * 0.0174532925199433)); }; centerLAnchx = function () { return this.spread * Math.sin((this.smokeRot - 90) * 0.0174532925199433); }; centerLAnchy = function () { return -this.spread * Math.cos((this.smokeRot - 90) * 0.0174532925199433); }; centerRAnchx = function () { return this.spread * Math.sin((this.smokeRot + 90) * 0.0174532925199433); }; centerRAnchy = function () { return -this.spread * Math.cos((this.smokeRot + 90) * 0.0174532925199433); }; WasSix = function () { return 10; }; getFriction = function (ex, ey) { return surface.hitTest(ex, ey, true); }; LAnchx = function (eRot) { return this.spread * Math.sin(eRot - 1.5707963267949); }; LAnchy = function (eRot) { return -this.spread * Math.cos(eRot - 1.5707963267949); }; RAnchx = function (eRot) { return this.spread * Math.sin(eRot + 1.5707963267949); }; RAnchy = function (eRot) { return -this.spread * Math.cos(eRot + 1.5707963267949); }; xRot = function (spread, eRot) { return spread * Math.sin(eRot * 0.0174532925199433); }; yRot = function (spread, eRot) { return -spread * Math.cos(eRot * 0.0174532925199433); }; SwimReachX = function (reach) { return reach * Math.sin(this.eRot * 0.0174532925199433); }; SwimReachY = function (reach) { return reach * -Math.cos(this.eRot * 0.0174532925199433); }; testAll = function (ex, ey, nothing, sliding) { if (tehground.hitTest(ex, ey, true)) { return true; } else { if (tehwallz.hitTest(ex, ey, true)) { return true; } else { if (tehplatformz.hitTest(ex, ey, true)) { return true; } else { return false; } } } }; testAllBut = function (ex, ey) { if (tehwallz.hitTest(ex, ey, true)) { return true; } else { if (tehground.hitTest(ex, ey, true)) { return true; } else { return false; } } }; testWallzAndPlatz = function (ex, ey) { if (tehwallz.hitTest(ex, ey, true) || tehplatformz.hitTest(ex, ey, true)) { return true; } else { return false; } }; testWallz = function (ex, ey) { if (tehwallz.hitTest(ex, ey, true)) { return true; } else { return false; } }; testPlatz = function (ex, ey) { if (tehplatformz.hitTest(ex, ey, true)) { return true; } else { return false; } }; quickLandTest = function (ex, ey, eRL, eUD, eTall, eAlpha, ex2) { if (tehwallz.hitTest(ex2, ey + eUD - eTall - 8, true) && !tehwallz.hitTest(ex2, ey - Math.abs(eUD) - eTall - 8, true)) { return 'ledge'; } else { if (tehground.hitTest(ex + eRL, ey + eUD, true)) { return 'ground'; } else { if (tehwallz.hitTest(ex + eRL, ey + eUD, true) && !tehwallz.hitTest(ex - eRL, ey - Math.abs(eUD), true)) { return 'wallz'; } else { if (tehplatformz.hitTest(ex, ey + eUD, true) && !tehplatformz.hitTest(ex, ey - 2, true) && eUD > 0) { return 'platz'; } else { if (aPlatz.hitTest(ex, ey + eUD, true) && !aPlatz.hitTest(ex, ey - 2, true) && eUD > 0) { return 'aPlatz'; } else { if (BLayer.hitTest(ex, ey + eUD, true) && !BLayer.hitTest(ex, ey - eUD, true)) { return 'baddie'; } else { if (tehhangz.hitTest(ex + eRL, ey - eTall + eUD, true) && !tehhangz.hitTest(ex + eRL, ey - (eTall + 2) - eUD, true) && eUD > 0 && eAlpha > 60) { return 'hangz'; } else { if (water.hitTest(ex, ey + eUD - eTall * 0.75, true)) { return 'water'; } else { return 'nothing'; } } } } } } } } }; notehwallzSuperTest = function (offset) { if (this.moveRL > 0) { if (tehwallz.hitTest(this.centerX + (this.spread + offset) + this.moveRL + this.mRL(), this._y - 2, true) || tehwallz.hitTest(this.centerX + (this.spread + offset) + this.moveRL + this.mRL(), this._y - this.isTall + 2, true) || tehwallz.hitTest(this.centerX + (this.spread + offset) + this.moveRL + this.mRL(), this._y - this.isTall / 2, true)) { return true; } else { return false; } } else { if (this.moveRL < 0) { if (tehwallz.hitTest(this.centerX - (this.spread + offset) + this.moveRL + this.mRL(), this._y - 2, true) || tehwallz.hitTest(this.centerX - (this.spread + offset) + this.moveRL + this.mRL(), this._y - this.isTall + 2, true) || tehwallz.hitTest(this.centerX - (this.spread + offset) + this.moveRL + this.mRL(), this._y - this.isTall / 2, true)) { return true; } else { return false; } } else { return false; } } }; tehwallzSuperTest = function (offset, eRL) { if (eRL >= 0 && (tehwallz.hitTest(this._x + offset + eRL, this._y - 2, true) || tehwallz.hitTest(this._x + offset + eRL, this._y + this.UDy(-this.isTall / 2), true) || tehwallz.hitTest(this._x + offset + eRL, this._y + this.UDy(-this.isTall) + 2, true))) { return 1; } else { if (eRL <= 0 && (tehwallz.hitTest(this._x - offset + eRL, this._y - 2, true) || tehwallz.hitTest(this._x - offset + eRL, this._y + this.UDy(-this.isTall / 2), true) || tehwallz.hitTest(this._x - offset + eRL, this._y + this.UDy(-this.isTall) + 2, true))) { return -1; } else { return false; } } }; baddieListenEnterFrame = function () { if (Math.abs(this._x - _root.Char._x) < 800 && Math.abs(this._y - _root.Char._y) < 600 || Math.abs(this._x - _root.CharQTP._x) < 800 && Math.abs(this._y - _root.CharQTP._y) < 600) { if (tehhangz.hitTest(this._x + this.moveRL, this._y + moveUD + 6, true)) { while (!tehhangz.hitTest(this._x, this._y + 2, true)) { ++this._y; } while (tehhangz.hitTest(this._x, this._y, true)) { --this._y; } nextFrame(); } else { if (this.WraptoGround(true, false) == 'Fall') { this.JumpFunc(0); } else { this.nextFrame(); } } } }; baddieIdleEnterFrame = function () { if (Paused) { this.InShell.stop(); } else { this.InShell.play(); if (this.downTime > 0) { --this.downTime; } if (!(Math.abs(this._x - _root.Char._x) < 800 && Math.abs(this._y - _root.Char._y) < 600) && !(Math.abs(this._x - _root.CharQTP._x) < 800 && Math.abs(this._y - _root.CharQTP._y) < 600) && this._currentframe == 3 && !this.insomniac && this.aPlatzOn == -1) { if (this.thisHat != undefined) { removeMovieClip(this.thisHat); } this.prevFrame(); } if (this.moveRL == this.facing * this.maxRL) { } else { if (Math.abs(this.moveRL - this.facing * this.maxRL) > this.maxRL / 4) { if (this.moveRL > this.facing * this.maxRL) { this.moveRL -= this.maxRL / 4; } else { this.moveRL += this.maxRL / 4; } } else { this.moveRL = this.facing * this.maxRL; } } this.temp = this.RLFunc(true); if ((this.temp == 'rEdge' || this.temp == 'rBackEdge') && this._xscale < 0) { this._xscale = Math.abs(this._xscale); this.moveRL = 4; this.facing = 1; this.spring = 3; } else { if ((this.temp == 'lEdge' || this.temp == 'lBackEdge') && this._xscale > 0) { this._xscale = -Math.abs(this._xscale); this.moveRL = -4; this.facing = -1; this.spring = 3; } else { if (this.temp == 'Wall' || this._xscale * this._rotation < -6000) { this._xscale = -this._xscale; this.moveRL = Math.round(this._xscale / 25); this.facing *= -1; this.spring = 3; } } } this.jumpAnchor._rotation = -this._rotation * (this._xscale / Math.abs(this._xscale)); this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.8; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; this.InShellrotation = this._rotation; this.hatEffect(); } }; baddieJumpEnterFrame = function () { if (!_root.Paused) { if (this.downTime > 0) { --this.downTime; } if (this.FloatUp > 0) { --this.FloatUp; } else { if (this.moveUD < 20) { ++this.moveUD; } } if (this.moveUD > -4) { this.InShell.play(); } else { if (this.moveUD < 0) { this.InShell.gotoAndStop('short'); } } this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.9; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (this.coma > 0) { this.JumpGuide('stunLand'); } else { this.JumpGuide('land'); } if (this.returnStat == 'Wall') { this.spring = 6; this.spring *= 0.5; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; } else { if (this.returnStat == 'Bounce') { this.spring = -6; this.spring *= 0.5; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (this.moveUD > -15) { this.InShell.gotoAndStop('short'); } else { this.InShell.gotoAndStop(1); } } } this.jumpAnchor._rotation = -this._rotation * (this._xscale / Math.abs(this._xscale)); if (_root.water.hitTest(this._x, this._y, true)) { this.moveRL *= 0.5; this.moveUD *= 0.5; this.gotoAndStop('floatStun'); } this.hatEffect(); } }; baddieLandEnterFrame = function () { if (this.moveRL == 0) { } else { if (Math.abs(this.moveRL - Math.round(this._xscale / 25)) > 1) { if (this.moveRL > Math.round(this._xscale / 25)) { --this.moveRL; } else { ++this.moveRL; } } else { this.moveRL = 0; } } this.RLFunc(); if (this.b > 0) { --this.b; this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.7; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; } else { this.gotoAndStop('Idle'); } }; baddieHitEnterFrame = function () { this._x += this.shakeRL / 2; this.shakeRL = -this.shakeRL; if (this.b > 0) { --this.b; } else { if (this.health > 0) { if (this.moveUD == 0) { this.gotoAndStop('stunLand'); } else { this.gotoAndStop('stunjump'); } } else { if (this.moveUD > -15) { this.moveUD = -15; } this.gotoAndStop('deadjump'); } } }; baddieStunJumpEnterFrame = function () { if (!_root.Paused) { if (this.downTime > 0) { --this.downTime; } this.rotateInAir(); this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.9; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (Math.abs(this.moveRL) > 4) { this.moveRL *= 0.97; } if (Math.abs(this.moveUD) > 20) { this.moveUD *= 0.95; } ++this.moveUD; this.rotter += (this.moveRL * 1.5 - this.rotter) / 10; this.InShellrotation += this.rotter; this.JumpGuide('stunLand'); if (this.returnStat == 'Wall') { this.spring = 3; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; } else { if (this.returnStat == 'Bounce') { this.spring = -3; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (this.moveUD > -15) { this.InShell.gotoAndStop('short'); } else { this.InShell.gotoAndStop(1); } } } this.jumpAnchor._rotation = -this._rotation * (this._xscale / Math.abs(this._xscale)); if (_root.water.hitTest(this._x, this._y, true)) { this.moveRL *= 0.75; this.moveUD *= 0.75; this.gotoAndStop('floatStun'); } if (_root.stageY * (100 / _root._yscale) - this._y < _root.MinY - 700) { if (this.combo > 1) { if (this.combo != (this.comboSome - 18) / 39) { while (!false) { } } APITrackEvent('combo', this.combo); } _root.removeBaddie(this.ID, true); } this.hatEffect(); this.InShell.play(); } else { this.InShell.stop(); } }; baddieStunLandEnterFrame = function () { if (!Paused) { if (this.coma > 0 || Math.abs(this.moveRL) > 0.5) { --this.coma; this.comaStars._yscale = this.coma / 2 + 20; this.comaStars._xscale = this.comaStars._yscale; if (this.downTime > 0) { --this.downTime; } this.slopeStuff(); if (Math.abs(this.moveRL + this.rotAccel) < 40) { this.moveRL += this.rotAccel; } else { this.moveRL *= 40 / Math.abs(this.moveRL); } if (this.friction) { if (!this.sliding) { if (Math.abs(this.moveRL) > 0.5) { this.moveRL -= (this.moveRL / Math.abs(this.moveRL)) * 0.5; } else { this.moveRL = 0; } } } else { if (!this.sliding) { if (Math.abs(this.moveRL) > 1) { this.moveRL -= (this.moveRL / Math.abs(this.moveRL)) * 1; } else { this.moveRL = 0; } this.moveRL *= 0.98; } else { if (Math.abs(this.moveRL) > 0.5) { this.moveRL -= (this.moveRL / Math.abs(this.moveRL)) * 0.5; } else { this.moveRL = 0; } } } this.RLStatus = this.RLFunc(false); if (this.RLStatus == 'Wall') { this.moveRL = -this.moveRL; this.spring = 6; } this.InShellrotation = this._rotation; this.jumpAnchor._rotation = -this._rotation * (this._xscale / Math.abs(this._xscale)); } else { this._xscale = ((_root.Char._x - this.centerX) / Math.abs(_root.Char._x - this.centerX)) * Math.abs(this._xscale); this.gotoAndStop('Idle'); } this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.8; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; this.hatEffect(); } }; baddieDeadJumpEnterFrame = function () { if (!_root.Paused) { if (this.downTime > 0) { --this.downTime; } this.temp = false; var v3 = 0; while (v3 < _root.BaddieArray.length) { i = _root.BaddieArray[v3]; if (_root.BLayer['Baddie' + i].hitTest(this._x + this.moveRL, this._y - this.spread + this.moveUD, true) && i != this.ID && _root.BLayer['Baddie' + i].downTime == 0) { this.temp = _root.BLayer['Baddie' + i].hitShellFunc(this._x + this.moveRL, this._y + this.moveUD, 65, this); } ++v3; } if (!this.temp) { this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.9; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (Math.abs(this.moveRL) > 4) { this.moveRL *= 0.97; } if (Math.abs(this.moveUD) > 20) { this.moveUD *= 0.95; } ++this.moveUD; this._x += this.moveRL; this._y += this.moveUD; this.centerX = this._x; this.centerY = this._y - this.spread; this.rotter += (this.moveRL * 1.5 - this.rotter) / 10; this.InShellrotation += this.rotter; this.InShell._rotation = this.InShellrotation * this._xscale / Math.abs(this._xscale); if (this._y > -_root.MinY + 700) { if (this.combo > 1) { if (this.combo != (this.comboSome - 18) / 39) { while (!false) { } } APITrackEvent('combo', this.combo); } _root.removeBaddie(this.ID, true); } this.InShell.play(); } } else { this.InShell.stop(); } }; baddieAttackEnterFrame = function () { this.moveRL = 0; if (this.onPlatzN > -1) { this.RLFunc(); } if (this._yscale + this.spring > 100) { this.spring += (this.spread * 2 - this.ycharup) / 15; this.spring *= 0.8; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = this._yscale * this.facing * 0.8; } else { this.downTime = 0; this.gotoAndStop('Idle'); } }; SimpleJumpFunc = function (jumper) { this.wallX = -1000; if (this.aBadOn > -1) { this.aBadOn = -1; } angle = this._rotation * Math.PI / 180; this.fakeRL = this.moveRL; this.fakeUD = -jumper; if (this.aPlatzOn > -1) { if (aPlatz['aPlatz' + this.aPlatzOn].onCharLeave != undefined) { aPlatz['aPlatz' + this.aPlatzOn].onCharLeave(jumper, this); } aPlatz['aPlatz' + this.aPlatzOn].getPlatSpeed(this); this.fakeRL += this.platRL; this.fakeUD += this.platUD; if (_root['BonusPlat' + aPlatz['aPlatz' + this.aPlatzOn].Status + 'Rest'] != undefined) { aPlatz['aPlatz' + this.aPlatzOn].onEnterFrame = _root['BonusPlat' + aPlatz['aPlatz' + this.aPlatzOn].Status + 'Rest']; } this.platUD = 0; this.platRL = 0; this.aPlatzOn = -1; } this.moveRL = Math.cos(angle) * this.fakeRL - Math.sin(angle) * this.fakeUD; this.moveUD = Math.cos(angle) * this.fakeUD + Math.sin(angle) * this.fakeRL; this.jumpAnchor._rotation = 0; this._rotation = 0; this.rotateInAir(); this._x = this.centerX + this.spread * Math.cos((this._rotation + 90) * 0.0174532925199433); this._y = this.centerY + this.spread * Math.sin((this._rotation + 90) * 0.0174532925199433); if (this.coma > 0) { this.gotoAndStop('stunJump'); } else { this.gotoAndStop('Jump'); } }; BallJumpGuide = function (lander) { this.returnStat = false; eSpread = this.mRL() * (this.spread + 5); if (tehwallz.hitTest(this.centerX + eSpread + this.moveRL, this.centerY + this.spread - 2, true) || tehwallz.hitTest(this.centerX + eSpread + this.moveRL, this.centerY - (this.spread - 2), true)) { this.centerX = Math.round(this.centerX); var v3 = 0; while (v3 < Math.abs(this.moveRL)) { if (!tehwallz.hitTest(this.centerX + (this.spread + 2), this.centerY + this.spread, true) && !tehwallz.hitTest(this.centerX - (this.spread + 2), this.centerY + this.spread, true) && !tehwallz.hitTest(this.centerX + (this.spread + 2), this.centerY - this.spread, true) && !tehwallz.hitTest(this.centerX - (this.spread + 2), this.centerY - this.spread, true)) { this.centerX += this.mRL(); messagePopup('shellmRL = ' + this.mRL()); } else { break; } ++v3; } if (getFriction(this.centerX, this.centerY)) { inkSplat(this.centerX + this.mRL() * this.spread, this.centerY, 100, -this.mRL() * 90); inkSplat(this.centerX + this.mRL() * this.spread, this.centerY, -100, -this.mRL() * 90); } else { v3 = ELayer.getNextHighestDepth(); ELayer.attachMovie('smokeFX', 'smokeFX' + v3, v3, {'_x': this.centerX + this.mRL() * this.spread, '_y': this.centerY, '_rotation': -this.mRL() * 90, '_xscale': Math.abs(this.moveRL) * 7, '_yscale': Math.abs(this.moveRL) * 7}); } _root.makeThud(this._x, Math.abs(this.moveRL) * 10); this.moveRL *= -this.bounceDefault; this.returnStat = 'Wall'; if (this.ItIs == 'SnailShell') { this.combo = 0; this.comboSome = 18; if (this.combo > 1) { if (this.combo != (this.comboSome - 18) / 39) { while (!false) { } } APITrackEvent('combo', this.combo); } } } while (tehwallz.hitTest(this.centerX + this.spread + 2, this.centerY, true)) { --this.centerX; messagePopup('shellX--'); } while (tehwallz.hitTest(this.centerX - this.spread - 2, this.centerY, true)) { ++this.centerX; messagePopup('shellX++'); } if (this.BonusPlatFind()) { this.JumpLand(hurt, true, true, 'aPlatz', lander); return this.returnStat; } if (this.CheckBaddieHit()) { return this.returnStat; } if (this.CheckInteractHit()) { return this.returnStat; } if (this.SuperCheckGround(lander)) { return this.returnStat; } if (tehplatformz.hitTest(this.centerX + this.spread + this.moveRL, this.centerY + this.spread + this.moveUD, true) || tehplatformz.hitTest(this.centerX - this.spread + this.moveRL, this.centerY + this.spread + this.moveUD, true) || tehplatformz.hitTest(this.centerX + this.spread + this.moveRL / 2, this.centerY + this.spread + this.moveUD / 2, true) || tehplatformz.hitTest(this.centerX - this.spread + this.moveRL / 2, this.centerY + this.spread + this.moveUD / 2, true)) { this.nowSpeed = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); this.incRL = this.moveRL; this.incUD = this.moveUD; if (this.nowSpeed < 1) { this.nowSpeed = 1; } this.incRL *= 1 / this.nowSpeed; this.incUD *= 1 / this.nowSpeed; this.extRL = this._x; this.extUD = this._y; v3 = 0; while (v3 < this.nowSpeed) { this.extRL += this.incRL; this.extUD += this.incUD; if (tehplatformz.hitTest(this.extRL + this.spread, this.extUD + 2, true) || tehplatformz.hitTest(this.extRL - this.spread, this.extUD + 2, true)) { if (tehplatformz.hitTest(this.extRL + this.spread + this.incRL * 10, this.extUD + this.incUD * 10, true) && tehplatformz.hitTest(this.extRL + this.spread, this.extUD + 2, true) && !tehplatformz.hitTest(this.extRL + this.spread - this.incRL * 10, this.extUD - this.incUD * 10, true) && !tehplatformz.hitTest(this.extRL + this.spread, this.extUD - 2, true) || tehplatformz.hitTest(this.extRL - this.spread + this.incRL * 10, this.extUD + this.incUD * 10, true) && tehplatformz.hitTest(this.extRL - this.spread, this.extUD + 2, true) && !tehplatformz.hitTest(this.extRL - this.spread - this.incRL * 10, this.extUD - this.incUD * 10, true) && !tehplatformz.hitTest(this.extRL - this.spread, this.extUD - 2, true)) { tempRight = tehplatformz.hitTest(this.extRL + this.spread, this.extUD + 5, true) || tehplatformz.hitTest(this.extRL + this.spread, this.extUD + 35, true); tempLeft = tehplatformz.hitTest(this.extRL - this.spread, this.extUD + 5, true) || tehplatformz.hitTest(this.extRL - this.spread, this.extUD + 35, true); if (tempRight && tempLeft) { tempLand = 'platBoth'; } else { if (tempRight) { tempLand = 'platRight'; } else { if (tempLeft) { tempLand = 'platLeft'; } else { tempLand = 'platGay'; } } } this.wallX = this.extRL; this.wallY = this.extUD; this.JumpLand(hurt, true, true, tempLand, lander); return false; } else {} } ++v3; } this.centerX += this.moveRL; this.centerY += this.moveUD; this.rotateInAir(); return false; return this.returnStat; } if (tehwallz.hitTest(this.centerX + this.spread + this.moveRL, this.centerY + this.moveUD - this.spread, true) || tehwallz.hitTest(this.centerX - this.spread + this.moveRL, this.centerY + this.moveUD - this.spread, true)) { this.nowSpeed = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); if (this.nowSpeed > 1) { this.eRL = (1 / this.nowSpeed) * this.moveRL; this.eUD = (1 / this.nowSpeed) * this.moveUD; } this.warpsteps = 0; for (;;) { if (!(!tehwallz.hitTest(this.centerX + this.spread, this.centerY - (this.spread + 3), true) && !tehwallz.hitTest(this.centerX - this.spread, this.centerY - (this.spread + 3), true) && this.moveUD < 0)) break; this.centerX += this.eRL; this.centerY += this.eUD; ++this.warpsteps; messagePopup('ballHead++'); } for (;;) { if (!(tehwallz.hitTest(this.centerX + this.spread, this.centerY - this.spread, true) && tehwallz.hitTest(this.centerX - this.spread, this.centerY - this.spread, true) && this.moveUD < 0)) break; this.centerX -= this.eRL; this.centerY -= this.eUD; messagePopup('ballHead--'); } if (getFriction(this.centerX, this.centerY)) { inkSplat(this.centerX, this.centerY - this.spread, 100, 180); inkSplat(this.centerX, this.centerY - this.spread, -100, 180); } else { v3 = ELayer.getNextHighestDepth(); ELayer.attachMovie('smokeFX', 'smokeFX' + v3, v3, {'_x': this.centerX, '_y': this.centerY - this.spread, '_rotation': 180, '_xscale': -this.moveUD * 7, '_yscale': -this.moveUD * 7}); } _root.makeThud(this._x, Math.abs(this.moveRL) * 10); this.moveUD = -this.moveUD / 2; this.nowSpeed = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); if (this.warpsteps > this.nowSpeed) { this.warpsteps = this.nowSpeed; } v3 = 0; while (v3 < this.nowSpeed - this.warpsteps) { this.centerX += this.eRL; this.centerY -= this.eUD; ++v3; } this.rotateInAir(); return this.returnStat; } if (tehwallz.hitTest(this.centerX + this.spread + this.moveRL, this.centerY + this.moveUD + this.spread, true) || tehwallz.hitTest(this.centerX - this.spread + this.moveRL, this.centerY + this.moveUD + this.spread, true)) { this.wallRot = 0; if (tehwallz.hitTest(this.centerX + this.spread + this.moveRL, this.centerY + this.spread + this.moveUD, true) && tehwallz.hitTest(this.centerX - this.spread + this.moveRL, this.centerY + this.moveUD + this.spread, true)) { tempLand = 'wallBoth'; this.wallX = this.centerX + this.moveRL; this.wallY = this.centerY + this.spread + this.moveUD; } else { if (tehwallz.hitTest(this.centerX + this.spread + this.moveRL, this.centerY + this.spread + this.moveUD, true)) { tempLand = 'wallRight'; this.wallX = this.centerX + this.spread + this.moveRL; this.wallY = this.centerY + this.spread + this.moveUD; } else { if (tehwallz.hitTest(this.centerX - this.spread + this.moveRL, this.centerY + this.spread + this.moveUD, true)) { tempLand = 'wallLeft'; this.wallX = this.centerX - this.spread + this.moveRL; this.wallY = this.centerY + this.spread + this.moveUD; } else { tempLand = 'wallGay'; } } } while (tehwallz.hitTest(this.wallX, this.wallY + 1, true)) { --this.wallY; } this.JumpLand(hurt, true, true, tempLand, lander); return this.returnStat; } this.nowSpeed = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); if (this.nowSpeed > 50) { this.centerX += (50 / this.nowSpeed) * this.moveRL; this.centerY += (50 / this.nowSpeed) * this.moveUD; } else { this.centerX += this.moveRL; this.centerY += this.moveUD; } this.rotateInAir(); return this.returnStat; }; BadSwimGuide = function (hurt, lander, badPwn) { oY = this._y; this.temp = false; if (testAll(this._x + this.moveRL, this._y + this.moveUD, true)) { return this.SwimLand(this._x, this._y); } this.centerX += this.moveRL; this.centerY += this.moveUD; this.rotateInAir(); return this.temp; }; BadSwimLand = function (ex, ey) { this.nowSpeed = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); if (this.nowSpeed != 0) { this.jumprot = -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433; this.groundRot = FindRot(this.jumprot, ex, ey, this.nowSpeed, this.spread, true, this); this.gorot = 2 * (this.groundRot + 90) - this.jumprot; this.moveRL = this.nowSpeed * Math.sin(this.gorot * 0.0174532925199433) * 0.98; this.moveUD = -this.nowSpeed * Math.cos(this.gorot * 0.0174532925199433) * 0.98; var v2 = 0; while (v2 < this.nowSpeed) { if (!testAll(this._x, this._y)) { this._x += Math.sin((this.groundRot + 180) * 0.0174532925199433); this._y -= Math.cos((this.groundRot + 180) * 0.0174532925199433); } else { break; } ++v2; } v2 = 0; while (v2 < 5) { if (testAll(ex, ey)) { this._x += Math.sin(this.groundRot * 0.0174532925199433); this._y -= Math.cos(this.groundRot * 0.0174532925199433); } else { break; } ++v2; } this.recenterPoints(); this.oMoveUD = this.moveUD; this.centerX += this.moveRL; this.centerY += this.moveUD; return 'Wall'; } }; xBadSwimGuide = function () { this.returnStat = false; if (tehwallz.hitTest(this.centerX + (this.spread + 2) + this.moveRL, this.centerY + this.spread, true) || tehwallz.hitTest(this.centerX - (this.spread + 2) + this.moveRL, this.centerY + this.spread, true) || tehwallz.hitTest(this.centerX + (this.spread + 2) + this.moveRL, this.centerY - this.spread, true) || tehwallz.hitTest(this.centerX - (this.spread + 2) + this.moveRL, this.centerY - this.spread, true)) { this.centerX = Math.round(this.centerX); var v2 = 0; while (v2 < Math.abs(this.moveRL)) { if (!tehwallz.hitTest(this.centerX + (this.spread + 2), this.centerY + this.spread, true) && !tehwallz.hitTest(this.centerX - (this.spread + 2), this.centerY + this.spread, true) && !tehwallz.hitTest(this.centerX + (this.spread + 2), this.centerY - this.spread, true) && !tehwallz.hitTest(this.centerX - (this.spread + 2), this.centerY - this.spread, true)) { this.centerX += this.mRL(); messagePopup('shellmRL = ' + this.mRL()); } else { break; } ++v2; } if (getFriction(this.centerX, this.centerY)) { inkSplat(this.centerX + this.mRL() * this.spread, this.centerY, 100, -this.mRL() * 90); inkSplat(this.centerX + this.mRL() * this.spread, this.centerY, -100, -this.mRL() * 90); } else { v2 = ELayer.getNextHighestDepth(); ELayer.attachMovie('smokeFX', 'smokeFX' + v2, v2, {'_x': this.centerX + this.mRL() * this.spread, '_y': this.centerY, '_rotation': -this.mRL() * 90, '_xscale': Math.abs(this.moveRL) * 7, '_yscale': Math.abs(this.moveRL) * 7}); } this.moveRL = -this.moveRL; this.returnStat = 'Wall'; } this.centerX += this.moveRL; this.centerY += this.moveUD; this._x = this.centerX; this._y = this.centerY + this.spread; return this.returnStat; }; rotateInAir = function () { this.InShell._rotation = this.InShellrotation * this._xscale / Math.abs(this._xscale); this._x = this.centerX; this._y = this.centerY + this.spread; }; rotateInAirLite = function (reach, spread) { this.jumprot = -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433; this.wallRot = this.jumprot - 180; if (tehground.hitTest(this.ReachXR(this.jumprot, reach, spread) + this.moveRL * 2, this.ReachYR(this.jumprot, reach, spread) + this.moveUD * 2, true) || tehground.hitTest(this.ReachXL(this.jumprot, reach, spread) + this.moveRL * 2, this.ReachYL(this.jumprot, reach, spread) + this.moveUD * 2, true)) { this.nowSpeed = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); temp = FindRot(this.jumprot, this.ReachX(this.jumprot, reach), this.ReachY(this.jumprot, reach), this.nowSpeed + this.spread, this.spread, true, this); return temp; } if (tehground.hitTest(this.ReachXR(this.jumprot, reach, spread * 2) + this.moveRL, this.ReachYR(this.jumprot, reach, spread * 2) + this.moveUD, true)) { this.nowSpeed = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); tempX = this.ReachXR(this.jumprot, reach, spread * 2); tempY = this.ReachYR(this.jumprot, reach, spread * 2); if (Math.abs(this.jumprot) > 90) { for (;;) { if (!(tehwallz.hitTest(tempX, tempY, true) || tehwallz.hitTest(tempX + (spread + 2), tempY, true))) break; tempX -= spread; messagePopup(1); } } else { for (;;) { if (!(tehwallz.hitTest(tempX, tempY, true) || tehwallz.hitTest(tempX - (spread + 2), tempY, true))) break; tempX += spread; messagePopup(2); } } temp = FindRot(this.jumprot, tempX, tempY, this.nowSpeed + this.spread, this.spread, true, this); return temp; } if (tehground.hitTest(this.ReachXL(this.jumprot, reach, spread * 2) + this.moveRL, this.ReachYL(this.jumprot, reach, spread * 2) + this.moveUD, true)) { this.nowSpeed = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); tempX = this.ReachXL(this.jumprot, reach, spread * 2); tempY = this.ReachYL(this.jumprot, reach, spread * 2); if (Math.abs(this.jumprot) > 90) { for (;;) { if (!(tehwallz.hitTest(tempX, tempY, true) || tehwallz.hitTest(tempX - (spread + 2), tempY, true))) break; tempX += spread; messagePopup(3); } } else { for (;;) { if (!(tehwallz.hitTest(tempX, tempY, true) || tehwallz.hitTest(tempX + (spread + 2), tempY, true))) break; tempX -= spread; messagePopup(4); } } temp = FindRot(this.jumprot, tempX, tempY, this.nowSpeed + this.spread, this.spread, true, this); return temp; } this.wallX = -10000; temp = false; return temp; }; recenterPoints = function () { this.centerX = this._x + this.spread * Math.sin(this._rotation * 0.0174532925199433); this.centerY = this._y - this.spread * Math.cos(this._rotation * 0.0174532925199433); }; ReachX = function (angle, reach) { return this.centerX + reach * Math.sin(angle * 0.0174532925199433); }; ReachY = function (angle, reach) { return this.centerY + -reach * Math.cos(angle * 0.0174532925199433); }; ReachXR = function (angle, reach, spread) { return this.centerX + reach * Math.sin(angle * 0.0174532925199433) + xRot(spread, angle - 90); }; ReachYR = function (angle, reach, spread) { return this.centerY + -reach * Math.cos(angle * 0.0174532925199433) + yRot(spread, angle - 90); }; ReachXL = function (angle, reach, spread) { return this.centerX + reach * Math.sin(angle * 0.0174532925199433) + xRot(spread, angle + 90); }; ReachYL = function (angle, reach, spread) { return this.centerY + -reach * Math.cos(angle * 0.0174532925199433) + yRot(spread, angle + 90); }; SuperCheckGround = function (lander) { if (extRL == undefined) { extRL = 0; } if (extUD == undefined) { extUD = 0; } this.platRL = 0; this.platUD = 0; rotItems = 0; tempYTotal = 0; tempXTotal = 0; var v3 = 0; while (v3 < charBallRes) { var v4 = Math.PI * (v3 + 0.5) * (2 / charBallRes); var v6 = -Math.sin(v4); var v5 = Math.cos(v4); if (tehground.hitTest(this.centerX + this.moveRL + v6 * this.spread, this.centerY + this.moveUD + v5 * this.spread, true)) { ++rotItems; tempXTotal += v6; tempYTotal += v5; if (rotItems > 8) { break; } _root.ELayer['dot' + (v3 + 10)].gotoAndStop(2); } else { _root.ELayer['dot' + (v3 + 10)].gotoAndStop(1); } if (showDebug) { _root.ELayer['dot' + (v3 + 10)]._x = this.centerX + this.moveRL + v6 * this.spread; _root.ELayer['dot' + (v3 + 10)]._y = this.centerY + this.moveUD + v5 * this.spread; } ++v3; } if (rotItems > 8) { tempXTotal = this.moveRL; tempYTotal = this.moveUD; rotItems = 1; } if (rotItems > 0) { this.wallRot = -Math.atan2(tempXTotal / rotItems, tempYTotal / rotItems) / 0.0174532925199433; if (Math.abs(this.wallRot) > 180) { if (this.wallRot > 0) { this.wallRot -= 360; } else { this.wallRot += 360; } } this.oldWallRot = this.wallRot; this.nowSpeed = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); FindRot(this.wallRot + 180, this.ReachX(this.wallRot, this.spread), this.ReachY(this.wallRot, this.spread), this.nowSpeed + this.spread, this.spread, true, this); if (this.wallX > -9999) { if (Math.abs(this.wallRot - this.oldWallRot) > 180) { if (this.oldWallRot > this.wallRot) { this.oldWallRot -= 360; } else { this.oldWallRot += 360; } } if (Math.abs(this.wallRot - this.oldWallRot) > 50) { if (!(tehwallz.hitTest(this.wallX, this.wallY + 2, true) || tehplatformz.hitTest(this.wallX, this.wallY + 2, true))) { this.wallRot = this.oldWallRot; } } } else { this.wallRot = this.oldWallRot; } v4 = this.wallRot * Math.PI / 180; this.wallX = this.centerX + this.moveRL + -Math.sin(v4) * this.spread; this.wallY = this.centerY + this.moveUD + Math.cos(v4) * this.spread; for (;;) { if (!(tehground.hitTest(this.wallX, this.wallY, true) || tehplatformz.hitTest(this.wallX, this.wallY, true) && !tehplatformz.hitTest(this.wallX, this.wallY - 1, true) || tehwallz.hitTest(this.wallX, this.wallY, true) && !tehwallz.hitTest(this.wallX, this.wallY - 1, true))) break; this.wallX += Math.sin(v4); this.wallY -= Math.cos(v4); } return this.CheckForWall(lander, 'ground'); } else { return false; } }; CheckForWall = function (lander, landOn) { if (landOn == 'aPlatz') { aPlatz['aPlatz' + this.aPlatzOn].getPlatSpeed(this); this.wallX += aPlatz['aPlatz' + this.aPlatzOn].moveRL; this.wallY += aPlatz['aPlatz' + this.aPlatzOn].moveUD; this.wallRot += aPlatz['aPlatz' + this.aPlatzOn].moveRot; } var v3 = this.wallRot * Math.PI / 180; ex = this.centerX + this.moveRL - this.wallX; ey = this.centerY + this.moveUD - this.wallY; x1 = Math.cos(v3) * ex + Math.sin(v3) * ey; y1 = Math.cos(v3) * ey - Math.sin(v3) * ex; if (landOn == 'platRight' || landOn == 'wallRight') { for (;;) { if (!(testWallzAndPlatz(this.wallX - 1, this.wallY + 2, true) || testWallzAndPlatz(this.wallX - 1, this.wallY - 3, true))) break; while (!testWallzAndPlatz(this.wallX - 1, this.wallY, true)) { ++this.wallY; } while (testWallzAndPlatz(this.wallX - 1, this.wallY - 1, true)) { --this.wallY; } --this.wallX; } ex = this.centerX + this.moveRL - this.wallX; ey = this.centerY + this.moveUD - this.wallY; x1 = Math.cos(v3) * ex + Math.sin(v3) * ey; y1 = Math.cos(v3) * ey - Math.sin(v3) * ex; if (x1 < 0) { this.wallRot = -Math.atan2(this.wallX - this.centerX, this.wallY - this.centerY) / 0.0174532925199433; v3 = this.wallRot * Math.PI / 180; ex = this.centerX + this.moveRL - this.wallX; ey = this.centerY + this.moveUD - this.wallY; x1 = Math.cos(v3) * ex + Math.sin(v3) * ey; y1 = Math.cos(v3) * ey - Math.sin(v3) * ex; var v6 = true; } else { landOn = 'platBoth'; } } else { if (landOn == 'platLeft' || landOn == 'wallLeft') { for (;;) { if (!(testWallzAndPlatz(this.wallX + 1, this.wallY + 2, true) || testWallzAndPlatz(this.wallX + 1, this.wallY - 3, true))) break; while (!testWallzAndPlatz(this.wallX + 1, this.wallY, true)) { ++this.wallY; } while (testWallzAndPlatz(this.wallX + 1, this.wallY - 1, true)) { --this.wallY; } ++this.wallX; } ex = this.centerX + this.moveRL - this.wallX; ey = this.centerY + this.moveUD - this.wallY; x1 = Math.cos(v3) * ex + Math.sin(v3) * ey; y1 = Math.cos(v3) * ey - Math.sin(v3) * ex; if (x1 > 0) { this.wallRot = -Math.atan2(this.wallX - this.centerX, this.wallY - this.centerY) / 0.0174532925199433; v3 = this.wallRot * Math.PI / 180; ex = this.centerX + this.moveRL - this.wallX; ey = this.centerY + this.moveUD - this.wallY; x1 = Math.cos(v3) * ex + Math.sin(v3) * ey; y1 = Math.cos(v3) * ey - Math.sin(v3) * ex; var v6 = true; } else { landOn = 'platBoth'; } } } ex2 = this.centerX - this.wallX; ey2 = this.centerY - this.wallY; x2 = Math.cos(v3) * ex2 + Math.sin(v3) * ey2; y2 = Math.cos(v3) * ey2 - Math.sin(v3) * ex2; this.platSide = y2; if (y2 > 0 && aPlatz['aPlatz' + this.aPlatzOn].doubleSided) { if (this.wallRot < 0) { this.wallRot += 180; } else { this.wallRot -= 180; } v3 = this.wallRot * Math.PI / 180; x1 = Math.cos(v3) * ex + Math.sin(v3) * ey; y1 = Math.cos(v3) * ey - Math.sin(v3) * ex; x2 = Math.cos(v3) * ex2 + Math.sin(v3) * ey2; y2 = Math.cos(v3) * ey2 - Math.sin(v3) * ex2; } if (this.wallX > -10000 || landOn == 'platLeft' || landOn == 'platRight') { if (y1 < -this.spread) { y1 = -this.spread; } this.fakeRL = Math.cos(v3) * this.moveRL + Math.sin(v3) * this.moveUD; this.fakeUD = Math.cos(v3) * this.moveUD - Math.sin(v3) * this.moveRL; this.rotter += (this.fakeRL * 4 - this.rotter) / 2; var v6 = false; if (landOn == 'aPlatz') { this.onPlatOffset = x1; v6 = aPlatz['aPlatz' + this.aPlatzOn].onCharLand(_x, _y, this.fakeRL, -this.fakeUD, this); aPlatz['aPlatz' + this.aPlatzOn].getPlatSpeed(this); if (v6) { this.fakeUD = 0; } this.fakeRL = this.platRL + this.fakeRL; this.fakeUD -= this.platUD; canThud = aPlatz['aPlatz' + this.aPlatzOn].canThud; canSmoke = aPlatz['aPlatz' + this.aPlatzOn].canSmoke; this.rotateInAir(); } else { canSmoke = true; } if (v6) { y1 = this.spread; y1 += this.platUD; this.fakeUD *= -1; } else { if (InteractLayer.golfHole.hitTest(this._x, this._y, true)) { canThud = true; y1 += this.spread; if (this.fakeUD > 10) { } if (this.fakeUD >= 10) { this.fakeUD = 10 * -this.bounceDefault; y1 *= -this.bounceDefault; } else { this.fakeUD *= -this.bounceDefault / (10 / this.fakeUD); y1 *= -this.bounceDefault / (10 / this.fakeUD); } if (y1 > 0) { y1 = 0; } y1 -= this.spread; if (this.bounceThresh > 3) { this.bounceThresh = 3; playSound('golfCup', this._x, 100); } canThud = false; } else { canThud = true; y1 += this.spread; if (this.fakeUD >= 10) { this.fakeUD *= -this.bounceDefault; y1 *= -this.bounceDefault; } else { this.fakeUD *= -this.bounceDefault / (10 / this.fakeUD); y1 *= -this.bounceDefault / (10 / this.fakeUD); } if (y1 > 0) { y1 = 0; } y1 -= this.spread; } } if (Math.abs(this.fakeUD) > this.bounceThresh || (landOn == 'platLeft' || landOn == 'platRight' || landOn == 'wallLeft' || landOn == 'wallRight') && ItIs != 'SnailShell' || ItIs != 'SnailShell' && Math.abs(this.wallRot) > 80) { if (this.ItIs == 'SnailShell') { if (this.combo > 1) { if (this.combo != (this.comboSome - 18) / 39) { while (!false) { } } APITrackEvent('combo', this.combo); } this.combo = 0; this.comboSome = 18; } v6 = false; this.centerX = this.wallX + Math.cos(v3) * x1 - Math.sin(v3) * y1; this.centerY = this.wallY + Math.cos(v3) * y1 + Math.sin(v3) * x1; this._x = this.centerX; this._y = this.centerY + this.spread; this.moveRL = Math.cos(v3) * this.fakeRL - Math.sin(v3) * this.fakeUD; this.moveUD = Math.cos(v3) * this.fakeUD + Math.sin(v3) * this.fakeRL; if (canThud) { makeThud(this.wallX, Math.abs(this.fakeUD) * 10); } if (canSmoke && this.fakeUD < -2) { this.smokeN = 0; footSlide(this.wallX + Math.cos(v3) * x1, this.wallY + Math.sin(v3) * x1, this._xscale / 6, this.wallRot, this._xscale / 6, getFriction(this._x, this._y), this); footStep(this.wallX + Math.cos(v3) * x1, this.wallY + Math.sin(v3) * x1, this._xscale / 6, this.wallRot, this._xscale / 6, getFriction(this._x, this._y), this); } if (Math.abs(this.moveRL) > Math.abs(this.moveUD)) { this.spring = Math.abs(this.moveRL) * 0.3; } else { this.spring = -Math.abs(this.moveUD) * 0.3; } this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; this.aPlatzOn = -1; this.rotateInAir(); this.returnStat = 'Bounce'; return true; } else { y1 = -this.spread; this._rotation = this.wallRot; this.centerX = this.wallX + (Math.cos(v3) * x1 - Math.sin(v3) * y1); this.centerY = this.wallY + (Math.cos(v3) * y1 + Math.sin(v3) * x1); this._x = this.centerX + this.spread * Math.sin((this.wallRot + 180) * 0.0174532925199433); this._y = this.centerY - this.spread * Math.cos((this.wallRot + 180) * 0.0174532925199433); if (landOn != 'ground' || testAll(this._x + this.RLx(this.fakeRL + 2) + this.RAnchx(this._rotation * 0.0174532925199433) + this.UDx(this.WasSix()), this._y + this.RLy(this.fakeRL + 2) + this.RAnchy(this._rotation * 0.0174532925199433) + this.UDy(this.WasSix())) && testAll(this._x + this.RLx(this.fakeRL - 2) + this.LAnchx(this._rotation * 0.0174532925199433) + this.UDx(this.WasSix()), this._y + this.RLy(this.fakeRL - 2) + this.LAnchy(this._rotation * 0.0174532925199433) + this.UDy(this.WasSix()))) { if (this.combo > 1) { if (this.combo != (this.comboSome - 18) / 39) { while (!false) { } } APITrackEvent('combo', this.combo); } this.combo = 0; this.comboSome = 18; if (landOn == 'aPlatz') { this.moveRL = this.fakeRL - this.platRL / 2; } else { this.moveRL = this.fakeRL; this.InShell._rotation = (this.InShellrotation - this._rotation) * (this._xscale / 100); } this.moveUD = 0; if (landOn == 'aPlatz') { this.onPlatOffset = x1; } if (lander == 'Idle') { if (canThud) { makeThud(this._x, Math.abs(this.fakeUD) * 10); } if (getFriction(this._x, this._y)) { inkSplat(this._x, this._y, this._xscale, this.wallRot); inkSplat(this._x, this._y, -this._xscale, this.wallRot); } else { if (this.ItIs == 'SnailShell') { i = ELayer.getNextHighestDepth(); ELayer.attachMovie('smokeFX', 'smokeFX' + i, i, {'_x': this._x, '_y': this._y, '_rotation': this.wallRot, '_xscale': Math.abs(this.fakeUD) * 7, '_yscale': Math.abs(this.fakeUD) * 7}); } else { this.smokeN = 0; _root.footSlide(this._x, this._y + 5, this._xscale / 6, this.wallRot, this._xscale / 6, getFriction(this._x, this._y), this); } } } this.spring = this.fakeUD * 0.9; if (this.spring > -10) { this.spring = -3; } this.gotoAndStop(lander); this.returnStat = lander; return true; } else { this._rotation = 0; this.centerX = this.wallX + (Math.cos(v3) * x1 - Math.sin(v3) * y1); this.centerY = this.wallY + (Math.cos(v3) * y1 + Math.sin(v3) * x1); this.moveRL = Math.cos(v3) * this.fakeRL - Math.sin(v3) * this.fakeUD; this.moveUD = Math.cos(v3) * this.fakeUD + Math.sin(v3) * this.fakeRL; this.rotateInAir(); this.returnStat = 'Bounce'; return true; } } } else { return false; } }; baddieSetupFunc = function (e) { if (e.moveRL == undefined) { e.moveRL = 0; } if (e.moveUD == undefined) { e.moveUD = 0; } if (e.FloatUp == undefined) { e.FloatUp = 0; } if (e.downTime == undefined) { e.downTime = 0; } if (e.insomniac == undefined) { e.insomniac = false; } if (e.spread == undefined) { e.spread = 15; } if (e.isWearing == undefined) { e.isWearing = 'nothing'; } if (e.maxRL == undefined) { e.maxRL = 4; } if (e.jabSound == undefined) { e.jabSound = 'BadSlash'; } if (e.slashSound == undefined) { e.slashSound = 'baseballHit'; } if (e.hitShellFunc == undefined) { e.hitShellFunc = pwnedByShell; } e.ycharup = e.spread * 2; e.baddieListenEnterFrame = baddieListenEnterFrame; e.baddieIdleEnterFrame = baddieIdleEnterFrame; e.baddieHitEnterFrame = baddieHitEnterFrame; e.baddieLandEnterFrame = baddieLandEnterFrame; e.baddieJumpEnterFrame = baddieJumpEnterFrame; e.baddieStunJumpEnterFrame = baddieStunJumpEnterFrame; e.baddieStunLandEnterFrame = baddieStunLandEnterFrame; e.baddieDeadJumpEnterFrame = baddieDeadJumpEnterFrame; e.baddieAttackEnterFrame = baddieAttackEnterFrame; e.hatEffect = null; if (e.health != undefined) { e.fullHealth = e.health; } e.platRL = 0; e.platUD = 0; e.centerX = e._x; e.centerY = e._y - e.spread; e.mRL = _root.mRL; e.mUD = _root.mUD; e.RLFunc = _root.SimpleRLFunc; e.SwimGuide = _root.BadSwimGuide; e.RLx = _root.RLx; e.RLy = _root.RLy; e.UDx = _root.UDx; e.UDy = _root.UDy; e.WasSix = _root.WasSix; e.PwnBaddies = _root.PwnBaddies; e.JumpFunc = _root.SimpleJumpFunc; e.JumpGuide = _root.BallJumpGuide; e.WraptoGround = _root.WraptoGround; e.JumpLand = _root.BallJumpLand; e.SuperCheckGround = _root.SuperCheckGround; e.CheckForWall = _root.CheckForWall; e.SwimLand = _root.BadSwimLand; e.slopeStuff = _root.slopeStuff; e.BonusPlatFind = BallBonusPlatFind; e.BonusPlatJumpLand = BonusPlatJumpLand; e.aPlatzOn = -1; e.RAnchx = _root.RAnchx; e.RAnchy = _root.RAnchy; e.LAnchx = _root.LAnchx; e.LAnchy = _root.LAnchy; e.ReachXR = _root.ReachXR; e.ReachYR = _root.ReachYR; e.ReachXL = _root.ReachXL; e.ReachYL = _root.ReachYL; e.ReachX = _root.ReachX; e.ReachY = _root.ReachY; e.rotateInAir = _root.rotateInAir; e.rotateInAirLite = _root.rotateInAirLite; e.recenterPoints = _root.recenterPoints; e.CheckHead = _root.CheckHead; e.InShellrotation = 0; if (e.rotter == undefined) { e.rotter = 0; } if (e.hasBeenGrabbed == undefined) { e.hasBeenGrabbed = false; } e.spring = 0; e.springy = 5; e.smokeN = 0; e.groundLandProtect = 0; e.combo = 0; e.comboSome = 18; e.testPlatz = _root.testPlatz; e.crazyLander = _root.crazyLander; e.wallX = -1000; e.wallY = -1000; e.wallRot = 0; if (e.mass == undefined) { e.mass = 5; } e.Thrust = 13; e.recenterPoints(); e.InShell._rotation = e.InShellrotation; if (e.moveUD < 0) { e.gotoAndStop('Jump'); } }; pwnedByShell = function (ex, ey, hitPower, fromChar) { var v6 = fromChar.centerX + fromChar.moveRL - (this.centerX + this.moveRL); var v5 = fromChar.centerY + fromChar.moveUD - (this.centerY + this.moveUD); var v9 = Math.sqrt(v6 * v6 + v5 * v5); var v10 = Math.sqrt(fromChar.moveRL * fromChar.moveRL + fromChar.moveUD * fromChar.moveUD); if (v9 < fromChar.spread + this.spread) { bounceRot = -Math.atan2(this.centerX - fromChar.centerX, this.centerY - fromChar.centerY) / 0.0174532925199433; angle = bounceRot * Math.PI / 180; fromChar.wallX = this.centerX + this.moveRL + this.spread * Math.sin(bounceRot * 0.0174532925199433); fromChar.wallY = this.centerY + this.moveUD - this.spread * Math.cos(bounceRot * 0.0174532925199433); ex = fromChar.centerX + fromChar.moveRL - fromChar.wallX; ey = fromChar.centerY + fromChar.moveUD - fromChar.wallY; x1 = Math.cos(angle) * ex + Math.sin(angle) * ey; y1 = Math.cos(angle) * ey - Math.sin(angle) * ex; if (y1 > -fromChar.spread) { fromChar.fakeRL = Math.cos(angle) * fromChar.moveRL + Math.sin(angle) * fromChar.moveUD; fromChar.fakeUD = -20; y1 = -fromChar.spread; fromChar.moveRL = Math.cos(angle) * fromChar.fakeRL - Math.sin(angle) * fromChar.fakeUD; fromChar.moveUD = Math.cos(angle) * fromChar.fakeUD + Math.sin(angle) * fromChar.fakeRL; if (Math.abs(fromChar.moveRL) > Math.abs(fromChar.moveUD)) { fromChar.spring = 6; } else { fromChar.spring = -6; } fromChar.ycharup += fromChar.spring; fromChar._yscale = (fromChar.ycharup / fromChar.spread * 2) * 100; fromChar._xscale = (100 - fromChar._yscale + 100) * fromChar.facing; fromChar.centerX = fromChar.wallX + (Math.cos(angle) * x1 - Math.sin(angle) * y1); fromChar.centerY = fromChar.wallY + (Math.cos(angle) * y1 + Math.sin(angle) * x1); fromChar._x = fromChar.centerX; fromChar._y = fromChar.centerY + fromChar.spread; fromChar.rotateInAir(); if (fromChar.moveRL != 0) { fromChar.rotter = 40 * (fromChar.moveRL / Math.abs(fromChar.moveRL)); } fromChar.accelUD = 1; this.shakeRL = 5; this.rotter = this.moveRL * 20; this.b = 0; this._x = this.centerX; this._y = this.centerY + this.spread; if (this.isWearing == 'nothing') { this.moveRL = -fromChar.moveRL; this.moveUD = -fromChar.moveUD; if (this.moveUD > -15 && this._currentframe != 12 && this._currentframe != 14) { this.moveUD = -15; } this.gotoAndStop('Hit'); } else { this.moveRL = -fromChar.moveRL * 1.5; this.gotoAndStop('stunLand'); } if (this.health > 0) { if (this.health - hitPower > 0) { this.health -= hitPower; } else { this.health = 0; StompBaddie(this.ItIs, this._x); } } if (hitPower > 0) { var v4 = ELayer.getNextHighestDepth(); ELayer.attachMovie('justaPopup', 'damage!' + v4, v4, {'_x': this._x + 15 - random(30), '_y': this._y - 10 - this.spread - random(10), 'moveRL': this.moveRL / 5, 'moveUD': random(5) / 2, '_xscale': 95 + hitPower * 3, '_yscale': 95 + hitPower * 3, 'smoke': '-' + Math.round(hitPower), 'onEnterFrame': damageEnterFrame}); } fromChar.shakeRL = 5; fromChar.b = 0; fromChar.gotoAndStop('Hit'); this.downTime = 3; playSound('BadStomp', this.centerX, 100); return true; } else { return false; } } }; BallJumpLand = function (hurt, anchor, breakIt, landOn, lander, extRL, extUD) { if (extRL == undefined) { extRL = 0; } if (extUD == undefined) { extUD = 0; } if (this.combo > 1) { if (this.combo != (this.comboSome - 18) / 39) { while (!false) { } } APITrackEvent('combo', this.combo); } this.combo = 0; this.comboSome = 18; this.jumprot = -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433; this.nowSpeed = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); this.crazyLander(landOn); if (this.CheckForWall(lander, landOn)) { return true; } else { this.nowSpeed = Math.sqrt(this.moveRL * this.moveRL + this.moveUD * this.moveUD); if (this.nowSpeed > 40) { this.centerX += (40 / this.nowSpeed) * this.moveRL; this.centerY += (40 / this.nowSpeed) * this.moveUD; this.rotateInAir(); return false; } this.centerX += this.moveRL; this.centerY += this.moveUD; this.rotateInAir(); return false; } }; shellCheckBaddieHit = function (badPwn) { if (_root.BLayer.hitTest(this.centerX + this.moveRL, this.centerY + this.moveUD, true)) { if (this.aBadOn == -1 && this.moveUD > 0) { var v3 = 0; while (BLayer['JumpPad' + v3] != undefined) { if (BLayer['JumpPad' + v3].hitTest(this._x + this.moveRL, this._y + this.moveUD, true) && !BLayer['JumpPad' + v3].hitTest(this._x + this.moveRL, this._y - 2 - Math.abs(this.moveUD)) && Math.abs(this._x - (BLayer['JumpPad' + v3]._x + BLayer['JumpPad' + v3]._yscale * 0.6 * Math.cos((BLayer['JumpPad' + v3]._rotation - 90) * 0.0174532925199433))) < 40 * (BLayer['JumpPad' + v3]._xscale / 100)) { this.wallJumpFell = false; this._rotation = BLayer['JumpPad' + v3]._rotation; this._x = this.centerX + this.spread * Math.cos((this._rotation + 90) * 0.0174532925199433); this._y = this.centerY + this.spread * Math.sin((this._rotation + 90) * 0.0174532925199433); BLayer['JumpPad' + v3].springing._yscale = BLayer['JumpPad' + v3].springHeight * 1.666666666666667; BLayer['JumpPad' + v3].spring = -this.moveUD * 0.3; if (BLayer['JumpPad' + v3].canRot) { BLayer['JumpPad' + v3].launchAngle = -(-Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433 + 180); } this.moveUD = 0; delete BLayer['JumpPad' + v3].onEnterFrame; BLayer['JumpPad' + v3].springing._yscale = BLayer['JumpPad' + v3].springHeight * 1.666666666666667; BLayer['JumpPad' + v3].surface._y = -BLayer['JumpPad' + v3].springHeight; this._x += this.moveRL; this._y = BLayer['JumpPad' + v3]._y - BLayer['JumpPad' + v3].springHeight; this.aBadOn = v3; this.gotoAndStop('BaddieLand'); this.JumpPadLanded = true; return true; } ++v3; } } } if (BLayer.hitTest(this.centerX + this.moveRL, this.centerY + this.moveUD, true)) { var v4 = 0; while (v4 < BaddieArray.length) { v3 = BaddieArray[v4]; if (BLayer['Baddie' + v3].hitTest(this._x + this.moveRL, this._y - this.spread + this.moveUD, true) && BLayer['Baddie' + v3].downTime == 0) { return BLayer['Baddie' + v3].hitShellFunc(this.centerX + this.moveRL, this.centerY + this.moveUD, 0, this); } ++v4; } } }; shellCheckInteractHit = function () {}; standardHitCharStompFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { if (eBadOn > -1 || fromChar.downTime > 0 && fromChar.moveUD < 0) { if (this.isWearing == 'nothing') { if (this._x > ex) { this.moveRL = 5; } else { this.moveRL = -5; } this.hurtPower = 20; this._rotation = 0; this._yscale = this.Thrust * 6; this.spring = -4; this.fromChar = fromChar; this.moveUD = -15; ++fromChar.combo; fromChar.comboSome += 39; if (fromChar.combo > 1) { fromChar.gNHD = ELayer.getNextHighestDepth(); ELayer.attachMovie('messagePopup', 'combo!' + fromChar.gNHD, fromChar.gNHD, {'_x': fromChar._x + 40, '_y': fromChar._y - 30, 'smoke': fromChar.combo + '!'}); } makeThud(this._x, 100); if (this.health > 0) { if (this.health - this.hurtPower > 0) { this.health -= this.hurtPower; this.coma = this.comaMax / 2; this.gotoAndStop('stunjump'); } else { this.health = 0; StompBaddie(this.ItIs, this._x); this.gotoAndStop('deadjump'); } } } else { this.spring = -6; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; angle = this._rotation * Math.PI / 180; ex = this._x - (fromChar._x - fromChar.moveRL); ey = this._y - (fromChar._y - fromChar.moveUD); ex1 = Math.cos(angle) * ex + Math.sin(angle) * ey; ey1 = Math.cos(angle) * ey - Math.sin(angle) * ex; if (ex1 > 0) { this.moveRL = 25; } else { this.moveRL = -25; } ++fromChar.combo; fromChar.comboSome += 39; if (fromChar.combo > 1) { fromChar.gNHD = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('messagePopup', 'combo!' + fromChar.gNHD, fromChar.gNHD, {'_x': baddie._x + 40, '_y': baddie._y - 30, 'smoke': fromChar.combo + '!'}); } this.coma = 15; this.gotoAndStop('stunLand'); playSound('BadStomp', this._x, 100); } delete this.hitPwnFunc; delete this.hitCharFunc; return false; } else { if (fromChar.isAttacking) { this.moveRL = fromChar.moveRL; return false; } else { if (!this.jumpAnchor.hitTest(ex + eRL, ey - 2 - eUD * 2, true) && eUD > 0) { this.onEnterFrame = function () { if (fromChar._currentframe != 14) { this.onEnterFrame = _root.stompedEnterFrame; } }; if (this._currentframe == 5 || this._currentframe == 12 || this._currentframe > 30) { this._rotation = 0; this.InShellrotation = 0; this.jumpAnchor._rotation = 0; this._x = this.centerX; this._y = this.centerY + this.spread; } this.gotoAndStop('Stomped'); _root.tempBounced = true; fromChar.aBadOn = this.ID; this.spring = -8; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * (this._xscale / Math.abs(this._xscale)) * 1.3; fromChar._y = this._y - this.ycharup; playSound('BadStomp', this._x, 100); fromChar.gotoAndStop('BaddieLand'); fromChar.JumpPadLanded = false; fromChar.downTime = 30; delete this.hitPwnFunc; delete this.hitCharFunc; return true; } else { if (fromChar._alpha == 100 && Math.abs(ex - this._x) < this.isWide + Math.abs(eRL)) { if (ex < this._x) { fromChar.moveRL = -8 + this.moveRL; this._xscale = -100; } else { fromChar.moveRL = 8 + this.moveRL; this._xscale = 100; } fromChar.JumpFunc(12); delete fromChar.onEnterFrame; fromChar.gotoAndStop('FrontSlam'); if (this._currentframe == 5 || this._currentframe == 12 || this._currentframe > 30) { this._rotation = 0; this.InShellrotation = 0; this.jumpAnchor._rotation = 0; this.gotoAndStop('Attack'); this._x = this.centerX; this._y = this.centerY + this.spread; } else { this.gotoAndStop('Attack'); } _root.HurtPants(this.attackStrength, fromChar); delete this.hitPwnFunc; delete this.hitCharFunc; return true; } else { return false; } } } } }; standardHitCharStompingFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) {}; crabHitCharStompFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { if (eBadOn > -1 || fromChar.downTime > 0 && fromChar.moveUD < 0) { this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; angle = this._rotation * Math.PI / 180; ex = this._x - (fromChar._x - fromChar.moveRL); ey = this._y - (fromChar._y - fromChar.moveUD); ex1 = Math.cos(angle) * ex + Math.sin(angle) * ey; ey1 = Math.cos(angle) * ey - Math.sin(angle) * ex; if (ex1 > 0) { this.moveRL = 25; } else { this.moveRL = -25; } ++fromChar.combo; fromChar.comboSome += 39; if (fromChar.combo > 1) { fromChar.gNHD = _root.ELayer.getNextHighestDepth(); _root.ELayer.attachMovie('messagePopup', 'combo!' + fromChar.gNHD, fromChar.gNHD, {'_x': baddie._x + 40, '_y': baddie._y - 30, 'smoke': fromChar.combo + '!'}); } this.coma = 15; this.gotoAndStop('stunLand'); playSound('BadStomp', this._x, 100); delete this.hitPwnFunc; delete this.hitCharFunc; return false; } else { if (fromChar.isAttacking) { this.moveRL = fromChar.moveRL; return false; } else { if (!this.jumpAnchor.hitTest(ex + eRL, ey - 2 - eUD * 2, true) && eUD > 0 && this.Status != 'attackUp') { this.onEnterFrame = function () { if (fromChar._currentframe != 14) { this.onEnterFrame = _root.stompedEnterFrame; } }; if (this._currentframe == 5 || this._currentframe == 12 || this._currentframe > 30) { this._rotation = 0; this.InShellrotation = 0; this.jumpAnchor._rotation = 0; this._x = this.centerX; this._y = this.centerY + this.spread; } this.gotoAndStop('Stomped'); _root.tempBounced = true; fromChar.aBadOn = this.ID; this.spring = -12; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * (this._xscale / Math.abs(this._xscale)) * 1.3; fromChar._y = this._y - this.ycharup; playSound('BadStomp', this._x, 100); fromChar.gotoAndStop('BaddieLand'); fromChar.JumpPadLanded = false; fromChar.downTime = 30; delete this.hitPwnFunc; delete this.hitCharFunc; return true; } else { if (fromChar._alpha == 100 && Math.abs(ex - this._x) < this.isWide + Math.abs(eRL)) { if (ex < this._x) { fromChar.moveRL = -8 + this.moveRL; this._xscale = -100; } else { fromChar.moveRL = 8 + this.moveRL; this._xscale = 100; } fromChar.JumpFunc(12); delete fromChar.onEnterFrame; fromChar.gotoAndStop('FrontSlam'); if (this._currentframe == 5 || this._currentframe == 12 || this._currentframe > 30) { this._rotation = 0; this.InShellrotation = 0; this.jumpAnchor._rotation = 0; this.gotoAndStop('Attack'); this._x = this.centerX; this._y = this.centerY + this.spread; } else { this.gotoAndStop('Attack'); } _root.HurtPants(this.attackStrength, fromChar); delete this.hitPwnFunc; delete this.hitCharFunc; return true; } else { return false; } } } } }; standardHitCharStunnedFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { if (this.downTime == 0) { if (fromChar.isAttacking) { this.moveRL = fromChar.moveRL; return false; } ++this.combo; this.comboSome += 39; tempRL = eRL - this.moveRL; tempUD = eUD - this.moveUD; var v6 = (this._x - ex) / Math.abs(this._x - ex); this.downTime = 10; this.coma = this.comaMax; shakeRL = 2; if (fromChar._currentframe == 7) { ++fromChar.combo; fromChar.comboSome += 39; if (fromChar.combo > 1) { fromChar.gNHD = ELayer.getNextHighestDepth(); ELayer.attachMovie('messagePopup', 'combo!' + fromChar.gNHD, fromChar.gNHD, {'_x': fromChar._x + 40, '_y': fromChar._y - 30, 'smoke': fromChar.combo + '!'}); } this.moveRL = (this._x - ex) / 10 + eRL; this.moveUD = -Math.abs(eUD) * 2; this.spring = 12; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; this.hurtPower = 20; if (this.centerY < ey - fromChar.isTall / 2 && this._y + this.moveUD > ey - fromChar.isTall) { this.centerY = ey - fromChar.isTall - this.spread; } makeThud(this._x, 100 + Math.abs(eUD * 5)); _root.movePerformed('landstomp', this.worth, this.ItIs); } else { this.eRL = eRL * 2; this.eUD = -15 - Math.abs(eRL / 2); if (Math.abs(this.eRL) < 5) { this.eRL = 5 * v6; } angle = fromChar._rotation * Math.PI / 180; this.moveRL = Math.cos(angle) * this.eRL - Math.sin(angle) * this.eUD; this.moveUD = Math.cos(angle) * this.eUD + Math.sin(angle) * this.eRL; if (fromChar._currentframe < 7 && fromChar._xscale * (this.centerX - ex) > 0 && Math.abs(fromChar.moveRL) > 5) { fromChar.JumpFunc(6); fromChar.gotoAndStop('Kick'); this.rotter = this.moveRL * 4; this.spring = 6; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; this.hurtPower = 30; makeThud(this._x, 100 + Math.abs(eRL * 5)); _root.movePerformed('kick', this.worth, this.ItIs); } else { this.moveRL += v6 * 10; this.moveUD = 0; this.spring = 6; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; this.hurtPower = 5; makeThud(this._x, 50 + Math.abs(eRL * 5)); _root.movePerformed('tap', this.worth, this.ItIs); } } this.InShell.stop(); if (this.health > 0) { if (this.health - this.hurtPower > 0) { this.health -= this.hurtPower; } else { this.health = 0; StompBaddie(this.ItIs, this._x); } } if (this.health > 0) { if (!this.CheckHead()) { this.jumpAnchor._rotation = 0; this._rotation = 0; this.gotoAndStop('stunjump'); } } else { if (this.CheckHead()) { this.moveRL *= 2; this.moveUD = 0; } else { if (this.moveUD > -20) { this.moveUD = -20; } } this.jumpAnchor._rotation = 0; this._rotation = 0; this.gotoAndStop('deadjump'); } powEffect(this._x, this._y - this.spread, this.moveRL / 5, this.moveUD / 5, 100, -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433); } return false; }; standardHitCharStunnedPwnFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { if (this.downTime == 0) { ++this.combo; this.comboSome += 39; if (fromChar._currentframe == 12) { playSound('rollHit', this._x, Math.abs((eRL - this.moveRL) * 10)); } else { makeThud(this._x, Math.abs((eRL - this.moveRL) * 10)); } this.downTime = 10; this.coma = this.comaMax; this.spring = 6; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; shakeRL = 3; var facing = (this._x - ex) / Math.abs(this._x - ex); fromChar.rollRL *= 0.5; fromChar._alpha = 80; this.hurtPower = 30; this.eRL = 0; this.eUD = -10 - Math.abs(eRL * 2); if (fromChar._currentframe == 31) { angle = (10 * facing + fromChar._rotation) * Math.PI / 180; _root.movePerformed('slide', this.worth, this.ItIs); } else { angle = (55 * facing + fromChar._rotation) * Math.PI / 180; } this.moveRL = Math.cos(angle) * this.eRL - Math.sin(angle) * this.eUD; this.moveUD = Math.cos(angle) * this.eUD + Math.sin(angle) * this.eRL; if (this.health - this.hurtPower > 0) { this.health -= this.hurtPower; if (!this.CheckHead()) { this.jumpAnchor._rotation = 0; this._rotation = 0; this.gotoAndStop('stunjump'); } else {} if (fromChar.CheckHead()) { fromChar.moveRL = eRL - facing * 20; } else {} } else { if (this.health > 0) { this.health = 0; StompBaddie(this.ItIs, this._x); } if (this.CheckHead()) { this.moveRL *= 2; this.moveUD = 0; } else { if (this.moveUD > -20) { this.moveUD = -20; } } this.jumpAnchor._rotation = 0; this._rotation = 0; this.gotoAndStop('deadjump'); } this.JumpGuide(); powEffect(this._x, this._y - this.spread, this.moveRL / 5, this.moveUD / 5, 100, -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433); return true; } return false; }; castleHitCharFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { _root.makeThud(ex, 100); _root.playSound('SandCrumble', ex, 100); var v4 = this._x - ex; this._xscale = (v4 / Math.abs(v4)) * 100; this.moveRL = (v4 / Math.abs(v4)) * 5; shakeRL = 3; if (fromChar._currentframe == 7) { ++fromChar.combo; fromChar.comboSome += 39; if (fromChar.combo > 1) { fromChar.gNHD = ELayer.getNextHighestDepth(); ELayer.attachMovie('messagePopup', 'combo!' + fromChar.gNHD, fromChar.gNHD, {'_x': fromChar._x + 40, '_y': fromChar._y - 30, 'smoke': fromChar.combo + '!'}); } this.moveRL = (this._x - ex) / 10 + eRL; this.moveUD = -Math.abs(fromChar.moveUD) * 2; _root.movePerformed('landstomp', this.worth, this.ItIs); this.gotoAndStop('kicked'); delete this.hitPwnFunc; delete this.hitCharFunc; return true; } if (fromChar._currentframe < 7) { fromChar.JumpFunc(6); _root.movePerformed('kick', this.worth, this.ItIs); fromChar.gotoAndStop('Kick'); } this.gotoAndStop('kicked'); delete this.hitPwnFunc; delete this.hitCharFunc; return true; }; castleHitPwnFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { _root.makeThud(ex, 100); _root.playSound('SandCrumble', ex, 100); var v4 = this._x - ex; this._xscale = (v4 / Math.abs(v4)) * 100; this.downTime = 1; this.moveRL = (v4 / Math.abs(v4)) * 5; shakeRL = 3; if (Math.abs(fromChar.moveRL) < 20 && !superPwn) { if (fromChar.moveRL == 0) { temp = fromChar._xscale / 100; } else { temp = fromChar.moveRL; } fromChar.rollRL *= 0.5; fromChar._alpha = 80; fromChar.moveRL = temp - (temp / Math.abs(temp)) * 10; fromChar.JumpFunc(15); _root.movePerformed('pwned', this.worth, this.ItIs); this.gotoAndStop('kicked'); delete this.hitCharFunc; delete this.hitPwnFunc; delete this.getAttacked; return true; } _root.movePerformed('superpwned', this.worth, this.ItIs); this.gotoAndStop('kicked'); delete this.hitCharFunc; delete this.hitPwnFunc; delete this.getAttacked; return true; }; castleGetAttacked = function (ex, ey, hitPower, eRot, eType, fromChar) { _root.makeThud(ex, 100); _root.playSound('SandCrumble', ex, 100); var v3 = this._x - ex; this._xscale = (v3 / Math.abs(v3)) * 100; this.downTime = 1; this.gotoAndStop('kicked'); delete this.hitCharFunc; delete this.hitPwnFunc; delete this.getAttacked; return 'blank'; }; standardHitCharStunJumpFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { if (this.downTime == 0 && (fromChar.Standing() || this._y > ey - 20)) { if (fromChar.isAttacking) { this.moveRL = fromChar.moveRL; return false; } ++this.combo; this.comboSome += 39; if (this.combo > 1) { this.gNHD = ELayer.getNextHighestDepth(); ELayer.attachMovie('messagePopup', 'combo!' + this.gNHD, this.gNHD, {'_x': this._x + 40, '_y': this._y - 30, 'smoke': this.combo + '!'}); } tempRL = eRL - this.moveRL; tempUD = eUD - this.moveUD; if (Math.abs(eRL) > 5) { var v6 = eRL / Math.abs(eRL); } else { var v6 = (this._x - ex) / Math.abs(this._x - ex); } shakeRL = 1; this.downTime = 10; if (fromChar._currentframe == 7) { ++fromChar.combo; fromChar.comboSome += 39; if (fromChar.combo > 1) { fromChar.gNHD = ELayer.getNextHighestDepth(); ELayer.attachMovie('messagePopup', 'combo!' + fromChar.gNHD, fromChar.gNHD, {'_x': fromChar._x + 40, '_y': fromChar._y - 30, 'smoke': fromChar.combo + '!'}); } this.moveRL = (this._x - ex) / 10 + eRL; this.moveUD = eUD * 2; this.spring = -6; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (this.centerY < ey - fromChar.isTall / 2 && this._y + this.moveUD > ey - fromChar.isTall) { this.centerY = ey - fromChar.isTall - this.spread; } makeThud(this._x, 100 + Math.abs(eUD * 5)); _root.movePerformed('headbutt', this.worth, this.ItIs); this.hurtPower = 20; } else { this.eRL = 0; this.eUD = -10 - Math.abs(eRL * 2); if (fromChar._currentframe == 31) { angle = (0 * v6 + fromChar._rotation) * Math.PI / 180; this.hurtPower = 10; this.spring = -6; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; makeThud(this._x, 60 + Math.abs(eRL * 5)); _root.movePerformed('slide', this.worth, this.ItIs); } else { angle = (45 * v6 + fromChar._rotation) * Math.PI / 180; this.hurtPower = 5; this.spring = 6; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; makeThud(this._x, 50 + Math.abs(eRL * 5)); _root.movePerformed('tap', this.worth, this.ItIs); } this.moveRL = Math.cos(angle) * this.eRL - Math.sin(angle) * this.eUD; this.moveUD = Math.cos(angle) * this.eUD + Math.sin(angle) * this.eRL; } if (fromChar.RightIsDown()) { this.moveRL += 7; } else { if (fromChar.LeftIsDown()) { this.moveRL -= 7; } } powEffect(this._x, this._y - this.spread, this.moveRL / 5, this.moveUD / 5, 100, -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433); if (this.isWearing == 'nothing') { if (this.health > 0) { this.InShell.gotoAndPlay(1); if (this.health - this.hurtPower > 0) { this.health -= this.hurtPower; } else { this.health = 0; StompBaddie(this.ItIs, this._x); } } if (this.health > 0) { this.coma = this.comaMax; } else { if (this.CheckHead()) { this.moveRL *= 2; this.moveUD = 0; } else { if (this.moveUD > -20) { this.moveUD = -20; } } this.gotoAndStop('deadjump'); } } this.JumpGuide(); } return false; }; cinHitCharStunJumpFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { if (!this.hitTest(ex + eRL, ey - 10 - eUD, true) && eUD > 0) { this.onEnterFrame = function () { if (fromChar._currentframe != 14) { this.onEnterFrame = _root.stompedEnterFrame; } }; this.gotoAndStop('Stomped'); _root.tempBounced = true; fromChar.aBadOn = this.ID; this.spring = -12; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * (this._xscale / Math.abs(this._xscale)) * 1.3; fromChar._y = this._y - this.ycharup; playSound('BadStomp', this._x, 100); fromChar.gotoAndStop('BaddieLand'); fromChar.JumpPadLanded = false; delete this.hitPwnFunc; delete this.hitCharFunc; } }; standardHitCharDeadJumpFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { if (this.downTime == 0 && (fromChar.Standing() || this._y > ey - 20)) { if (fromChar.isAttacking) { this.moveRL = fromChar.moveRL; return false; } ++this.combo; this.comboSome += 39; if (this.combo > 1) { this.gNHD = ELayer.getNextHighestDepth(); ELayer.attachMovie('messagePopup', 'combo!' + this.gNHD, this.gNHD, {'_x': this._x + 40, '_y': this._y - 30, 'smoke': this.combo + '!'}); } tempRL = eRL - this.moveRL; tempUD = eUD - this.moveUD; if (Math.abs(eRL) > 5) { var v6 = eRL / Math.abs(eRL); } else { var v6 = (this._x - ex) / Math.abs(this._x - ex); } this.downTime = 5; shakeRL = 1; if (fromChar._currentframe == 7) { ++fromChar.combo; fromChar.comboSome += 39; if (fromChar.combo > 1) { fromChar.gNHD = ELayer.getNextHighestDepth(); ELayer.attachMovie('messagePopup', 'combo!' + fromChar.gNHD, fromChar.gNHD, {'_x': fromChar._x + 40, '_y': fromChar._y - 30, 'smoke': fromChar.combo + '!'}); } this.moveRL = (this._x - ex) / 10 + eRL; this.moveUD = -Math.abs(eUD * 2); this.spring = -6; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (this.centerY < ey - fromChar.isTall / 2 && this._y + this.moveUD > ey - fromChar.isTall) { this.centerY = ey - fromChar.isTall - this.spread; } makeThud(this._x, 100 + Math.abs(eUD * 5)); _root.movePerformed('headbutt', this.worth, this.ItIs); } else { this.eRL = 0; this.eUD = -10 - Math.abs(eRL); if (fromChar._currentframe == 31) { angle = (0 * v6 + fromChar._rotation) * Math.PI / 180; this.hurtPower = 10; this.spring = -6; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; makeThud(this._x, 60 + Math.abs(eRL * 5)); _root.movePerformed('slide', this.worth, this.ItIs); } else { angle = (45 * v6 + fromChar._rotation) * Math.PI / 180; this.hurtPower = 5; this.spring = 6; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; makeThud(this._x, 50 + Math.abs(eRL * 5)); _root.movePerformed('tap', this.worth, this.ItIs); } this.moveRL = Math.cos(angle) * this.eRL - Math.sin(angle) * this.eUD; this.moveUD = Math.cos(angle) * this.eUD + Math.sin(angle) * this.eRL; } if (this.moveUD > -20) { this.moveUD = -20; } if (fromChar.RightIsDown()) { this.moveRL += 7; } else { if (fromChar.LeftIsDown()) { this.moveRL -= 7; } } this._x += this.moveRL; this._y += this.moveUD; this.centerX = this._x; this.centerY = this._y - this.spread; powEffect(this._x, this._y - this.spread, this.moveRL / 5, this.moveUD / 5, 100, -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433); } }; standardHitCharPwnFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { delete this.onEnterFrame; ++this.combo; this.comboSome += 39; this.gotoAndStop('Stomped'); this.coma = this.comaMax; this.hurtPower = 20; shakeRL = 3; var v5 = (this._x - ex) / Math.abs(this._x - ex); this.moveRL = v5 * 10 + eRL; this.moveUD = -10 - Math.abs(eRL); this.rotter = this.moveRL * 2; if (this.moveUD > -20) { this.moveUD = -20; } powEffect(this._x, this._y - this.spread, this.moveRL / 5, this.moveUD / 5, 100, -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433); this.downTime = 10; this.spring = 6; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (this.health > 0) { if (this.health - this.hurtPower > 0) { this.health -= this.hurtPower; } else { this.health = 0; StompBaddie(this.ItIs, this._x); } } if (this.health > 0) { this.coma = this.comaMax; if (this.moveUD == 0 || this.CheckHead()) { this.moveRL *= 2; this.gotoAndStop('stunLand'); } else { this.jumpAnchor._rotation = 0; this._rotation = 0; this.gotoAndStop('stunjump'); } } else { if (this.CheckHead()) { this.moveRL *= 2; this.moveUD = 0; } else { if (this.moveUD > -20) { this.moveUD = -20; } } this.jumpAnchor._rotation = 0; this._rotation = 0; this.gotoAndStop('deadjump'); } if (Math.abs(fromChar.moveRL) < 20 && !superPwn) { if (eRL == 0) { temp = fromChar._xscale / 100; } else { temp = eRL; } fromChar.rollRL *= 0.5; fromChar._alpha = 80; fromChar.moveRL = temp - (temp / Math.abs(temp)) * 10; if (!fromChar.CheckHead()) { fromChar.moveRL = temp - (temp / Math.abs(temp)) * 10; fromChar.JumpFunc(12); } else { fromChar.moveRL = temp - (temp / Math.abs(temp)) * 25; } playSound('BadStomp', this._x, 100); _root.movePerformed('pwned', this.worth, this.ItIs); delete this.hitPwnFunc; delete this.hitCharFunc; return true; } playSound('rollHit', this._x, Math.abs((eRL - this.moveRL) * 10)); _root.movePerformed('superpwned', this.worth, this.ItIs); delete this.hitPwnFunc; delete this.hitCharFunc; return true; }; protectedHitCharPwnFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { this.gotoAndStop('Stomped'); playSound('BadStomp', this._x, 100); this.hurtPower = 20; this.downTime = 10; delete this.onEnterFrame; this.coma = 20; this.spring = 3; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; shakeRL = 3; this.gotoAndStop('stunLand'); if (Math.abs(eRL) < 10) { temp = fromChar._xscale / 10; } else { temp = eRL; } this.moveRL = eRL * 2; fromChar.rollRL *= 0.5; fromChar._alpha = 80; if (!fromChar.CheckHead()) { fromChar.moveRL = temp - (temp / Math.abs(temp)) * 10; fromChar.JumpFunc(12); _root.movePerformed('pwned', this.worth, this.ItIs); delete this.hitPwnFunc; delete this.hitCharFunc; return true; } fromChar.moveRL = temp - (temp / Math.abs(temp)) * 25; _root.movePerformed('pwned', this.worth, this.ItIs); delete this.hitPwnFunc; delete this.hitCharFunc; return true; }; crabHitCharPwnFunc = function (ex, ey, eRL, eUD, eBadOn, fromChar) { if (this.Status == 'attackSide') { temp = this.hitCharFunc(ex, ey, eRL, eUD, eBadOn, fromChar); messagePopup(temp); return temp; } else { delete this.onEnterFrame; ++this.combo; this.comboSome += 39; this.gotoAndStop('Stomped'); this.coma = this.comaMax; this.hurtPower = 20; shakeRL = 3; var v6 = (this._x - ex) / Math.abs(this._x - ex); this.moveRL = v6 * 10 + eRL; this.moveUD = -10 - Math.abs(eRL); this.rotter = this.moveRL * 2; if (this.moveUD > -20) { this.moveUD = -20; } powEffect(this._x, this._y - this.spread, this.moveRL / 5, this.moveUD / 5, 100, -Math.atan2(-this.moveRL, -this.moveUD) / 0.0174532925199433); this.downTime = 10; this.spring = 6; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; if (this.health > 0) { if (this.health - this.hurtPower > 0) { this.health -= this.hurtPower; } else { this.health = 0; StompBaddie(this.ItIs, this._x); } } if (this.health > 0) { this.coma = this.comaMax; if (this.moveUD == 0 || this.CheckHead()) { this.moveRL *= 2; this.gotoAndStop('stunLand'); } else { this.jumpAnchor._rotation = 0; this._rotation = 0; this.gotoAndStop('stunjump'); } } else { if (this.CheckHead()) { this.moveRL *= 2; this.moveUD = 0; } else { if (this.moveUD > -20) { this.moveUD = -20; } } this.jumpAnchor._rotation = 0; this._rotation = 0; this.gotoAndStop('deadjump'); } if (Math.abs(fromChar.moveRL) < 20 && !superPwn) { if (eRL == 0) { temp = fromChar._xscale / 100; } else { temp = eRL; } fromChar.rollRL *= 0.5; fromChar._alpha = 80; fromChar.moveRL = temp - (temp / Math.abs(temp)) * 10; if (!fromChar.CheckHead()) { fromChar.moveRL = temp - (temp / Math.abs(temp)) * 10; fromChar.JumpFunc(12); } else { fromChar.moveRL = temp - (temp / Math.abs(temp)) * 25; } playSound('BadStomp', this._x, 100); _root.movePerformed('pwned', this.worth, this.ItIs); delete this.hitPwnFunc; delete this.hitCharFunc; return true; } playSound('rollHit', this._x, Math.abs((eRL - this.moveRL) * 10)); _root.movePerformed('superpwned', this.worth, this.ItIs); delete this.hitPwnFunc; delete this.hitCharFunc; return true; } }; standardHitCharSwimFunc = function (ex, ey, hitPower, eRot, eType, fromChar) { var v4 = ex - this._x; var v5 = ey - (this._y - this.spread); var v6 = Math.sqrt(v4 * v4 + v5 * v5); if (v6 < this.isWide + fromChar.isTall / 2 && fromChar._alpha == 100) { fromChar.moveRL = v4 / 2; fromChar.moveUD = v5 / 2; fromChar._xscale = (-v4 / Math.abs(v4)) * 100; fromChar.nowSpeed = Math.sqrt(fromChar.moveRL * fromChar.moveRL + fromChar.moveUD * fromChar.moveUD); if (fromChar.nowSpeed > 15) { fromChar.moveRL *= 15 / fromChar.nowSpeed; fromChar.moveUD *= 15 / fromChar.nowSpeed; } fromChar.gotoAndStop('WaterFrontSlam'); this.gotoAndStop('Attack'); _root.HurtPants(this.attackStrength, fromChar); return true; } }; standardGetAttacked = function (ex, ey, hitPower, eRot, eType, fromChar) { this.recenterPoints(); this._rotation = 0; this._x = this.centerX; this._y = this.centerY + this.spread; delete this.onEnterFrame; this.hurtPower = hitPower; this.coma = this.comaMax; ++this.combo; this.comboSome += 39; if (this.combo > 1) { this.gNHD = ELayer.getNextHighestDepth(); ELayer.attachMovie('messagePopup', 'combo!' + this.gNHD, this.gNHD, {'_x': this._x + 40, '_y': this._y - 30, 'smoke': this.combo + '!'}); } if (eType == 'airPwn') { ++fromChar.combo; fromChar.comboSome += 39; if (fromChar.combo > 1) { fromChar.gNHD = ELayer.getNextHighestDepth(); ELayer.attachMovie('messagePopup', 'combo!' + fromChar.gNHD, fromChar.gNHD, {'_x': fromChar._x + 40, '_y': fromChar._y - 30, 'smoke': fromChar.combo + '!'}); } fromChar.airPwning = true; fromChar.accelUD += 0.25; fromChar.moveRL = (ex - this._x) / 3; fromChar.moveUD = -10; fromChar.FloatUp = 10; this.moveRL = -fromChar.moveRL; this.moveUD = -15; this.shakeRL = hitPower; this.downTime = 20; this.b = 1; this.rotter = ((this._x - ex) / Math.abs(this._x - ex)) * 40; this.spring = -6; _root.playSound(this.slashSound, this._x, 100); } else { if (substring(eType, 1, 3) == 'jab') { if (hitPower > 16) { shakeRL = 3; this.moveRL = hitPower * fromChar._xscale / 200; this.moveUD = -hitPower * 0.25; this.shakeRL = fromChar._xscale / 5; this.downTime = 5; } else { this.moveRL = hitPower * fromChar._xscale / 200; this.moveUD = -hitPower * 0.8; this.shakeRL = fromChar._xscale / 5; this.downTime = 1; } this.b = 4; this.rotter = 0; this.spring = 6; makeThud(this._x, 100); } else { _root.playSound(this.slashSound, this._x, 100); this.moveRL = hitPower * Math.sin(eRot * 0.0174532925199433) * 0.9; this.moveUD = -Math.abs(hitPower) * Math.cos(eRot * 0.0174532925199433) - 6; this.rotter = this.moveRL * 4; this.shakeRL = this.moveRL; this.downTime = 10; this.b = 5; this.spring = 6; } } this.spring *= 0.5; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; this._x += this.shakeRL / 2; this.shakeRL = -this.shakeRL; if (this._currentframe == 5 || this._currentframe == 12 || this._currentframe > 30) { this._rotation = 0; this.InShellrotation = 0; this.jumpAnchor._rotation = 0; } if (this.health > 0) { if (this.health - this.hurtPower > 0) { this.health -= this.hurtPower; this.gotoAndStop('Hit'); delete this.hitCharFunc; delete this.hitPwnFunc; return 'slice'; } this.health = 0; StompBaddie(this.ItIs, this._x); } this.gotoAndStop('Hit'); delete this.hitCharFunc; delete this.hitPwnFunc; return 'slice'; }; protectedGetAttacked = function (ex, ey, hitPower, eRot, eType, fromChar) { delete this.onEnterFrame; this.hurtPower = hitPower; this.coma = 10; this.gotoAndStop('Hit'); delete this.hitCharFunc; delete this.hitPwnFunc; if (eType == 'airPwn') { fromChar.airPwning = true; fromChar.accelUD += 0.25; this.moveRL = fromChar.moveRL / 2; fromChar.moveRL = (ex - this._x) / 5; fromChar.moveUD = -10; fromChar.FloatUp = 10; this.moveRL += -fromChar.moveRL * 2; this.moveUD = 0; this.shakeRL = hitPower; this.downTime = 20; this.b = 0; this.spring = -3; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; _root.playSound(this.slashSound, this._x, 100); return 'airPwn'; } else { if (substring(eType, 1, 3) == 'jab') { if (hitPower > 16) { shakeRL = 4; this.moveRL = fromChar._xscale / 4; } else { shakeRL = 2; this.moveRL = fromChar._xscale / 5; } this.moveUD = 0; this.downTime = 10; this.b = 0; makeThud(ex, 100); this.spring = 4; this.spring *= 0.5; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * this.facing; return 'jab'; } else { this.recenterPoints(); _root.playSound(this.slashSound, this._x, 100); this.moveRL = hitPower * (fromChar._xscale / 100); this.moveUD = 0; this.rotter = this.moveRL * 4; this.shakeRL = this.moveRL; this.downTime = 10; this.b = 0; if (this.isWearing != 'nothing') { throwHat(this.centerX, this.centerY - this.spread, this.moveRL * 0.5, -20, this._xscale, this._rotation, this.isWearing); } this.hatEffect = null; removeMovieClip(this.thisHat); delete this.thisHat; this.isWearing = 'nothing'; this.getAttacked = standardGetAttacked; return 'deflect'; } } }; StompBaddie = function (ItIs, ex) { playSound(ItIs + 'Stomped', ex, 100); ++BaddiesStomped; ++BaddiesStompedSession; BaddiesStompedInFace += 4; OutPut.trackbaddieshell.baddiepop(); }; SimpleRLFunc = function (sticky) { if (this.moveRL > 35) { this.fakeRL = this.RLx(35); this.fakeUD = this.RLy(35); } else { if (this.moveRL < -35) { this.fakeRL = this.RLx(-35); this.fakeUD = this.RLy(-35); } else { this.fakeRL = this.RLx(this.moveRL); this.fakeUD = this.RLy(this.moveRL); } } if (tehwallz.hitTest(this.centerX - (this.spread + 3) + this.fakeRL, this.centerY, true)) { this.WallHitLeft = true; } else { this.WallHitLeft = false; } if (tehwallz.hitTest(this.centerX + (this.spread + 3) + this.fakeRL, this.centerY, true)) { this.WallHitRight = true; } else { this.WallHitRight = false; } if (this.WallHitLeft && !this.WallHitRight) { while (!tehwallz.hitTest(this.centerX - (this.spread + 3), this.centerY - this.spread, true)) { this.centerX += this.RLx(-1); this.centerY += this.RLy(-1); } while (tehwallz.hitTest(this.centerX - (this.spread + 2), this.centerY - this.spread, true)) { this.centerX += this.RLx(1); this.centerY += this.RLy(1); } this._x = this.centerX + this.spread * Math.sin((this._rotation + 180) * 0.0174532925199433); this._y = this.centerY - this.spread * Math.cos((this._rotation + 180) * 0.0174532925199433); if (!sticky && (this.RLy(this.moveRL) < -6 || Math.abs(this._rotation) > 90)) { this.JumpFunc(0); return 'wallJump'; } this.fakeRL *= -this.bounceDefault; this.moveRL *= -this.bounceDefault; } else { if (this.WallHitRight && !this.WallHitLeft) { while (!tehwallz.hitTest(this.centerX + (this.spread + 3), this.centerY - this.spread, true)) { this.centerX += this.RLx(1); this.centerY += this.RLy(1); } while (tehwallz.hitTest(this.centerX + (this.spread + 2), this.centerY - this.spread, true)) { this.centerX += this.RLx(-1); this.centerY += this.RLy(-1); } this._x = this.centerX + this.spread * Math.sin((this._rotation + 180) * 0.0174532925199433); this._y = this.centerY - this.spread * Math.cos((this._rotation + 180) * 0.0174532925199433); if (!sticky && (this.RLy(this.moveRL) < -6 || Math.abs(this._rotation) > 90)) { this.JumpFunc(0); return 'wallJump'; } this.fakeRL *= -this.bounceDefault; this.moveRL *= -this.bounceDefault; } } this.wrapper = false; if (this.aPlatzOn > -1) { this.onPlatOffset += this.moveRL; this.tempX = aPlatz['aPlatz' + this.aPlatzOn]._x; this.hairRL = this.tempX + this.onPlatOffset - this._x; if (this.platSide > 0) { this._rotation = aPlatz['aPlatz' + this.aPlatzOn]._rotation + aPlatz['aPlatz' + this.aPlatzOn].moveRot + 180; } else { this._rotation = aPlatz['aPlatz' + this.aPlatzOn]._rotation + aPlatz['aPlatz' + this.aPlatzOn].moveRot; } aPlatz['aPlatz' + this.aPlatzOn].whileOn(this.onPlatOffset, this.moveRL, 0.75, this); angle = this._rotation * Math.PI / 180; x1 = this.onPlatOffset; y1 = -this.spread; this.centerX = aPlatz['aPlatz' + this.aPlatzOn]._x + (Math.cos(angle) * x1 - Math.sin(angle) * y1); this.centerY = aPlatz['aPlatz' + this.aPlatzOn]._y + (Math.cos(angle) * y1 + Math.sin(angle) * x1); this._x = this.centerX + this.spread * Math.sin((this._rotation + 180) * 0.0174532925199433); this._y = this.centerY - this.spread * Math.cos((this._rotation + 180) * 0.0174532925199433); this.hairRL = this.moveRL; this.hairRL = this._x - this.oX; this.hairUD = this._y - this.oY; this.wrapper = 'aPlatz'; if (aPlatz['aPlatz' + this.aPlatzOn].canBuck) { var v3 = aPlatz['aPlatz' + this.aPlatzOn].moveUD; aPlatz['aPlatz' + this.aPlatzOn].getPlatSpeed(this); var v5 = v3 - aPlatz['aPlatz' + this.aPlatzOn].moveUD; if (v5 < -1) { this.JumpFunc(2); return 'Fall'; } } if (Math.abs(this._rotation) > 85 || !(this.onPlatOffset + this.moveRL + this.spread > -aPlatz['aPlatz' + this.aPlatzOn]._xscale / 2 && this.onPlatOffset + this.moveRL - this.spread < aPlatz['aPlatz' + this.aPlatzOn]._xscale / 2 && aPlatz['aPlatz' + this.aPlatzOn].otherStayOn())) { this.JumpFunc(0.5); return 'Fall'; } if (this.onPlatOffset + this.moveRL - this.spread < -aPlatz['aPlatz' + this.aPlatzOn]._xscale / 2) { return 'rEdge'; } else { if (this.onPlatOffset + this.moveRL + this.spread > aPlatz['aPlatz' + this.aPlatzOn]._xscale / 2) { return 'lEdge'; } } } else { if (testAll(this._x + this.RLx(this.moveRL + 2) + this.RAnchx(this._rotation * 0.0174532925199433) + this.UDx(this.WasSix()), this._y + this.RLy(this.moveRL + 2) + this.RAnchy(this._rotation * 0.0174532925199433) + this.UDy(this.WasSix())) && testAll(this._x + this.RLx(this.moveRL - 2) + this.LAnchx(this._rotation * 0.0174532925199433) + this.UDx(this.WasSix()), this._y + this.RLy(this.moveRL - 2) + this.LAnchy(this._rotation * 0.0174532925199433) + this.UDy(this.WasSix()))) { FindRot(this._rotation + 180, this._x + this.fakeRL, this._y + this.fakeUD, Math.abs(this.moveRL), this.spread, false, this); angle = this.wallRot * Math.PI / 180; if (this.wallX > -1000) { ex = this.centerX + this.RLx(this.moveRL) - this.wallX; ey = this.centerY + this.RLy(this.moveRL) - this.wallY; vx = Math.cos(angle) * this.moveRL; vy = Math.sin(angle) * this.moveRL + 1; angle = this.wallRot * Math.PI / 180; ex1 = Math.cos(angle) * ex + Math.sin(angle) * ey; ey1 = Math.cos(angle) * ey - Math.sin(angle) * ex; vx1 = Math.cos(angle) * vx + Math.sin(angle) * vy; vy1 = Math.cos(angle) * vy - Math.sin(angle) * vx; if (vy1 > -0.5) { ey1 = -this.spread; this.centerX = this.wallX + Math.cos(angle) * ex1 - Math.sin(angle) * ey1; this.centerY = this.wallY + Math.cos(angle) * ey1 + Math.sin(angle) * ex1; this._x = this.centerX + this.spread * Math.sin((this.wallRot + 180) * 0.0174532925199433); this._y = this.centerY - this.spread * Math.cos((this.wallRot + 180) * 0.0174532925199433); this._rotation = this.wallRot; } else { this.centerX += this.RLx(this.moveRL); this.centerY += this.RLy(this.moveRL); this._x = this.centerX + this.spread * Math.sin((this._rotation + 180) * 0.0174532925199433); this._y = this.centerY - this.spread * Math.cos((this._rotation + 180) * 0.0174532925199433); _root.messagePopup('justjumped3'); this.JumpFunc(0); return 'Fall'; } } else { this.centerX += this.fakeRL; this.centerY += this.fakeUD; this._x = this.centerX + this.spread * Math.sin((this._rotation + 180) * 0.0174532925199433); this._y = this.centerY - this.spread * Math.cos((this._rotation + 180) * 0.0174532925199433); } } else { if (testWallz(this._x + this.RLx(this.moveRL + 2) + this.RAnchx(this._rotation * Math.PI / 180) + this.UDx(this.WasSix()), this._y + this.RAnchy(this._rotation * Math.PI / 180) + this.UDy(this.WasSix() + this.RLy(this.moveRL + 2)))) { this._x += this.fakeRL; this.centerX += this.fakeRL; this._rotation = 0; if (this._xscale < 0) { this.wrapper = 'rEdge'; } else { this.wrapper = 'rBackEdge'; } } else { if (testWallz(this._x + this.RLx(this.moveRL - 2) + this.LAnchx(this._rotation * Math.PI / 180) + this.UDx(this.WasSix()), this._y + this.LAnchy(this._rotation * Math.PI / 180) + this.UDy(this.WasSix() + this.RLy(this.moveRL - 2)))) { this._x += this.fakeRL; this.centerX += this.fakeRL; this._rotation = 0; if (this._xscale > 0) { this.wrapper = 'lEdge'; } else { this.wrapper = 'lBackEdge'; } } else { if (testPlatz(this._x + this.RLx(this.moveRL + 2) + this.RAnchx(this._rotation * Math.PI / 180) + this.UDx(this.WasSix()), this._y + this.RAnchy(this._rotation * Math.PI / 180) + this.UDy(this.WasSix() + this.RLy(this.moveRL + 2)))) { this._x += this.fakeRL; this.centerX += this.fakeRL; this._y += this.fakeUD; this.centerY += this.fakeUD; if (this._xscale < 0) { this.wrapper = 'rEdge'; } else { this.wrapper = 'rBackEdge'; } } else { if (testPlatz(this._x + this.RLx(this.moveRL - 2) + this.LAnchx(this._rotation * Math.PI / 180) + this.UDx(this.WasSix()), this._y + this.LAnchy(this._rotation * Math.PI / 180) + this.UDy(this.WasSix() + this.RLy(this.moveRL - 2)))) { this._x += this.fakeRL; this.centerX += this.fakeRL; this._y += this.fakeUD; this.centerY += this.fakeUD; if (this._xscale > 0) { this.wrapper = 'lEdge'; } else { this.wrapper = 'lBackEdge'; } } else { if (sticky) { if (testAll(this._x + this.UDx(this.WasSix()), this._y + this.UDy(this.WasSix()))) { return 'Wall'; } else { _root.messagePopup('justjumped6'); this.JumpFunc(0); this.JumpGuide(); return 'Fall'; } } else { _root.messagePopup('justjumped7'); this.JumpFunc(0); this.JumpGuide(); return 'Fall'; } } } } } } } this.recenterPoints(); if (this.wrapper == 'Fall') { if (this.groundLandProtect > -1) { this.groundLandProtect = 2; } _root.messagePopup('justjumped4'); this.JumpFunc(0); } if (this.WallHitLeft || this.WallHitRight) { return 'Wall'; } else { if (this.wrapper == false) { return 'Gravy'; } else { return this.wrapper; } } }; stompedEnterFrame = function () { this.moveRL = 0; if (this.aPlatzOn > -1) { this.RLFunc(); } this.spring += (this.spread * 2 - this.ycharup) / this.springy; this.spring *= 0.9; this.ycharup += this.spring; this._yscale = (this.ycharup / this.spread * 2) * 100; this._xscale = (100 - this._yscale + 100) * (this._xscale / Math.abs(this._xscale)) * 1.3; if (this.spring < this.Thrust && this._yscale > 100) { this.jumpAnchor._rotation = 0; this._rotation = 0; this.downTime = 20; if (Char.moveRL > 0) { this.moveRL = -5; } else { this.moveRL = 5; } this.rotter = this.moveRL * 5; this.aPlatzOn = -1; if (this.health <= 0) { this.gotoAndStop('deadjump'); this.JumpGuide(); } else { this.coma = this.comaMax; this.gotoAndStop('stunjump'); this.JumpGuide(); } delete this.onEnterFrame; } }; JumpPadReleasedEnterFrame = function () { if (this.originRot == this._rotation) { } else { if (Math.abs(this.originRot - this._rotation) > 1) { this._rotation += (this.originRot - this._rotation) / 10; } else { this._rotation = originRot; } } this.spring += (this.Thrust * 2 - this.springHeight) / this.springy; this.spring *= 0.94; this.springHeight += this.spring; this.springing._yscale = this.springHeight * 1.666666666666667; this.surface._y = -this.springHeight; if (Math.abs(this.spring) < 0.02 && (this.Thrust > 40 && Math.abs(this._yscale - 120) < 1 || this.Thrust <= 40 && Math.abs(this._yscale - this.Thrust * 2) < 1)) { this.surface._y = -this.springHeight; this.springing._yscale = this.springHeight * 1.666666666666667; delete this.onEnterFrame; } }; SpringBoardLeft = function () { this.moveRL += (this.anchorX - this._x) / 60; this.moveUD += (this.anchorY - this._y) / 20; this.moveRL -= this.moveRL / Math.abs(this.moveRL) / 5; this.moveUD -= this.moveUD / Math.abs(this.moveUD) / 5; this._x += this.moveRL; this._y += this.moveUD; _root.Foreground[this._name + 'Smoke']._x = this._x; _root.Foreground[this._name + 'Smoke']._y = this._y; if (Math.abs(this.moveUD) < 1 && Math.abs(this.anchorY - this._y) < 1) { this.moveRL = 0; this.moveUD = 0; delete this.onEnterFrame; } }; FireScratch = function (ex, ey, escale, eRL, eUD, eRot) { ELayer.attachMovie('ScratchBlast', 'ScratchBlast', getNextHighestDepth(), {'_x': ex + eRL * 12, '_y': ey + eUD * 12, '_xscale': 100, '_rotation': eRot - 90}); BLayer.attachMovie('scratchBullet', ['Baddie' + BaddieCount], BLayer.getNextHighestDepth(), {'_x': ex + eRL * 12, '_y': ey + eUD * 12 + 15, '_xscale': escale, 'moveRL': eRL, 'moveUD': eUD, 'lifespan': 400, 'ItIs': 'Scratch', 'health': 1, 'fullHealth': 1, 'b': 0, 'downTime': 0, 'spring': 0, 'isWide': 15, 'spread': 15, 'mass': 2, 'ID': BaddieCount, 'hitShellFunc': pwnedByShell, 'isWearing': 'nothing'}); BaddieArray.push(BaddieCount); ++BaddieCount; }; throwHat = function (ex, ey, eRL, eUD, eScale, eRot, isWearing) { var v1 = ELayer.getNextHighestDepth(); ELayer.attachMovie('HatFly', 'HatFly' + v1, v1, {'_x': ex, '_y': ey, 'moveRL': eRL, 'moveUD': eUD, '_xscale': eScale, '_rotation': eRot + eRL * 3, 'isWearing': isWearing, 'onEnterFrame': flyingHatEnterFrame}); }; setHat = function (eThis, eHat) { if (eHat == 'goblet') { eThis.gotoAndStop(4); } else { if (eHat == 'baseball') { eThis.gotoAndStop(1); } else { if (eHat == 'lamp') { eThis.gotoAndStop(2); } else { if (eHat == 'pumpkin') { eThis.gotoAndStop(3); } else { if (eHat == 'pirate') { eThis.gotoAndStop(5); } else { eThis.gotoAndStop(6); } } } } } }; pumpkinHatEffect = function () { _root.ELayer['hatEffect' + this.ID]._x = this.centerX; _root.ELayer['hatEffect' + this.ID]._y = this.centerY; }; lampHatEffect = function () { _root.UberForeground['hatEffect' + this.ID]._xscale = this._xscale; _root.UberForeground['hatEffect' + this.ID]._rotation = this.InShellrotation; _root.UberForeground['hatEffect' + this.ID]._x = this.centerX; _root.UberForeground['hatEffect' + this.ID]._y = this.centerY; }; flyingHatEnterFrame = function () { ++this.moveUD; this._x += this.moveRL; this._y += this.moveUD; this._rotation += this.moveRL * 3; }; throwSword = function (ex, ey, eScale, hitPower) { var v1 = ELayer.getNextHighestDepth(); ELayer.attachMovie('pirateSwordDetached', 'pirateSwordDetached' + v1, v1, {'_x': ex, '_y': ey, '_xscale': eScale, 'moveRL': hitPower * (-eScale / 500), 'moveUD': -hitPower * 0.75, 'onEnterFrame': flyingSwordEnterFrame}); }; throwToothpick = function (ex, ey, eScale, hitPower, color) { var v2 = ELayer.getNextHighestDepth(); ELayer.attachMovie('toothpickDetached', 'toothpickDetached' + v2, v2, {'_x': ex, '_y': ey, '_xscale': eScale, 'moveRL': hitPower * (-eScale / 500), 'moveUD': -hitPower * 0.75, 'color': color, '_rotation': random(10) * 5, 'onEnterFrame': flyingToothpickEnterFrame}); _root.ColorEmPants(color, ELayer['toothpickDetached' + v2]); }; flyingSwordEnterFrame = function () { ++this.moveUD; this._x += this.moveRL; this._y += this.moveUD; this._rotation -= this._xscale * 0.4; if (testAll(this._x + this.moveRL, this._y + this.moveUD)) { while (!testAll(this._x + this.moveRL, this._y)) { ++this._y; } this._rotation = 0; this.gotoAndPlay('done'); delete this.onEnterFrame; } }; flyingToothpickEnterFrame = function () { ++this.moveUD; this._x += this.moveRL; this._y += this.moveUD; this._rotation -= this._xscale * 0.5; if (testAll(this._x + this.moveRL, this._y + this.moveUD) && !testAll(this._x + this.moveRL, this._y - this.moveUD) && this.moveUD > 0) { while (!testAll(this._x + this.moveRL, this._y)) { ++this._y; } this._rotation = 0; this.gotoAndPlay('done'); delete this.onEnterFrame; } }; BallBonusPlatFind = function () { var v2 = 0; while (aPlatz['aPlatz' + v2]._x != undefined) { angle = (aPlatz['aPlatz' + v2]._rotation + aPlatz['aPlatz' + v2].moveRot) * Math.PI / 180; aPlatz['aPlatz' + v2].getPlatSpeed(this); var v3 = this.centerX + this.moveRL - aPlatz['aPlatz' + v2]._x; var v4 = this.centerY + this.moveUD - aPlatz['aPlatz' + v2]._y; var v7 = Math.cos(angle) * v3 + Math.sin(angle) * v4; var v9 = Math.cos(angle) * v4 - Math.sin(angle) * v3; var v6 = this.centerX - aPlatz['aPlatz' + v2]._x; var v5 = this.centerY - aPlatz['aPlatz' + v2]._y; var v10 = Math.cos(angle) * v6 + Math.sin(angle) * v5; var v8 = Math.cos(angle) * v5 - Math.sin(angle) * v6; this.fakeRL = Math.cos(angle) * this.moveRL + Math.sin(angle) * this.moveUD; this.fakeUD = Math.cos(angle) * this.moveUD - Math.sin(angle) * this.moveRL; if (Math.abs(v7) < aPlatz['aPlatz' + v2]._xscale / 2 + this.spread && Math.abs(v9) < this.spread && this.fakeUD > 0 && (aPlatz['aPlatz' + v2].doubleSided || Math.abs(v8) > this.spread)) { if (Math.abs(v7) > aPlatz['aPlatz' + v2]._xscale / 2 && ItIs == 'SnailShell' && false) { if (v7 > 0) { v3 = aPlatz['aPlatz' + v2]._xscale / 2; } else { v3 = -aPlatz['aPlatz' + v2]._xscale / 2; } v4 = 0; this.wallX = aPlatz['aPlatz' + v2]._x + (Math.cos(angle) * v3 - Math.sin(angle) * v4); this.wallY = aPlatz['aPlatz' + v2]._y + (Math.cos(angle) * v4 + Math.sin(angle) * v3); v3 = this.centerX + this.moveRL - this.wallX; v4 = this.centerY + this.moveUD - this.wallY; this.wallRot = -Math.atan2(this.wallX - this.centerX, this.wallY - this.centerY) / 0.0174532925199433; angle = -this.wallRot * Math.PI / 180; v6 = Math.cos(angle) * v3 + Math.sin(angle) * v4; v5 = Math.cos(angle) * v4 - Math.sin(angle) * v3; v5 += this.spread; v5 *= -this.bounceDefault * 0.75; v5 -= this.spread; this.fakeRL = Math.cos(angle) * this.moveRL + Math.sin(angle) * this.moveUD; this.fakeUD = Math.cos(angle) * this.moveUD - Math.sin(angle) * this.moveRL; this.fakeUD *= -this.bounceDefault * 0.75; temp = aPlatz['aPlatz' + v2].onCharLand(_x, _y, this.fakeRL, this.fakeUD, this); aPlatz['aPlatz' + v2].getPlatSpeed(this); this.moveRL = Math.cos(angle) * this.fakeRL + Math.sin(angle) * this.fakeUD; this.moveUD = Math.cos(angle) * this.fakeUD - Math.sin(angle) * this.fakeRL; this.centerX = this.wallX + (Math.cos(angle) * v6 - Math.sin(angle) * v5); this._x = this.centerX; this.centerY = this.wallY + (Math.cos(angle) * v5 + Math.sin(angle) * v6); this._y = this.centerY + this.spread; if (aPlatz['aPlatz' + v2].canThud) { makeThud(this._x, Math.abs(this.fakeUD) * 10); } this.rotateInAir(); } else { this.aPlatzOn = v2; return true; } } ++v2; } }; makeScurryPrint = function (ex, ey, escale, erot) { tempX = Math.floor((MaxX + ex) / 2880); tempY = Math.floor((MaxY + ey) / 1920); temp = tempY + tempX * FGtilesY; ELayer.scurryprint._x = ex + MaxX - tempX * 2880; ELayer.scurryprint._y = ey + MaxY + (random(4) - 2) - tempY * 1920; ELayer.scurryprint._rotation = erot; _root['levelBitmap' + temp].draw(ELayer.scurryprint, ELayer.scurryprint.transform.matrix); ELayer.scurryprint._x = -MaxX - 20; }; PlatMoveVacant = function () { if (!_root.Paused) { if (this._x > this.centerRL) { this.moveRL -= this.speedRL; } else { this.moveRL += this.speedRL; } if (Math.abs(this.moveRL) > 10) { this._x += 10 * (this.moveRL / Math.abs(this.moveRL)); } else { this._x += this.moveRL; } Foreground['PlatSmoke' + this.id]._x = this._x; Foreground['PlatSmoke' + this.id]._y = this._y; } }; JumpPadLockMoveVacant = function () { if (this._x > this.centerRL) { this.moveRL -= this.speedRL; } else { this.moveRL += this.speedRL; } if (Math.abs(this.moveRL) > this.maxRL) { this._x += this.maxRL * (this.moveRL / Math.abs(this.moveRL)); } else { this._x += this.moveRL; } }; PlatMoveOccupied = function () { if (!_root.Paused) { if (this._x > this.centerRL) { this.moveRL -= this.speedRL; } else { this.moveRL += this.speedRL; } if (Math.abs(this.moveRL) > 10) { this._x += 10 * (this.moveRL / Math.abs(this.moveRL)); } else { this._x += this.moveRL; } this.smokeRL = this._x - this.oldx; Char._x += this.smokeRL; this.oldx = this._x; Foreground['PlatSmoke' + this.id]._x = this._x; } }; JumpPadLockMoveOccupied = function () { if (this._x > this.centerRL) { this.moveRL -= this.speedRL; } else { this.moveRL += this.speedRL; } if (Math.abs(this.moveRL) > this.maxRL) { this._x += this.maxRL * (this.moveRL / Math.abs(this.moveRL)); } else { this._x += this.moveRL; } this.smokeRL = this._x - this.oldx; Char._x += this.smokeRL; this.oldx = this._x; if (!_root.Char.JumpIsDown()) { _root.Char.SisDown = false; } if (_root.Char.JumpIsDown() && !_root.Char.SisDown && this._currentframe == 9 && Health != 0) { _root.Char.SisDown = true; this.gotoAndPlay(12); this.onEnterFrame = JumpPadLockMoveVacant; } }; SpawnSparkle = function (ex, ey) { attachMovie('Sparkle', ['Sparkle' + ssN], 5000 + ssN); _root['Sparkle' + ssN]._x = ex; _root['Sparkle' + ssN]._y = ey; if (ssN > 20) { ssN = 0; } else { ++ssN; } }; SpawnBaddies = function (ex, ey, ename, exs, eRL, eUD) { if (exs == undefined) { exs = 100; } if (ename == 'SnailShell') { attachMovie(ename, 'SnailShell', 999, {'_x': ex, '_y': ey}); return SnailShell; } else { BLayer.attachMovie(ename, ['Baddie' + BaddieCount], BaddieCount, {'_x': ex, '_y': ey, 'moveRL': eRL, 'moveUD': eUD, '_xscale': exs, 'ID': BaddieCount}); BaddieArray.push(BaddieCount); return _root.BLayer['Baddie' + BaddieCount]; } }; removeBaddie = function (ID, removeIt) { if (removeIt == undefined) { removeIt = true; } var v2 = 0; while (v2 < BaddieArray.length) { i = BaddieArray[v2]; if (i == ID) { if (removeIt) { removeMovieClip(BLayer['Baddie' + ID]); } BaddieArray.splice(v2, 1); break; } ++v2; } if (LevelType == 'Arena' && LevelPower > 0) { if (BaddieArray.length == 0 && BLayer.Cannon.thisSpawnerArray[badPos] == undefined && !_root['allBaddiesGone' + LevelLoaded]) { messagePopup('spawnKey!'); _root['allBaddiesGone' + LevelLoaded] = true; OutPut.gotoAndStop('levels'); if (_root.BLayer.Cannon == undefined) { if (LevelLoaded == 'Bonus5' || LevelLoaded == 'Bonus6' || LevelLoaded == 'Bonus8') { gonnaLaunch = 'Key'; } else { gonnaLaunch = 'DiscoShard'; } playSound('starGrab', 300, 100); thisBad = _root.SpawnBaddies(300, -200, gonnaLaunch, 100, 0, -10); thisBad.gotoAndStop('Jump'); thisBad.moveRL = 0; thisBad.moveUD = -10; thisBad.FloatUp = 0; thisBad.rotter = 30; BaddieArray.push('done'); } } } }; createEmptyMovieClip('RotFix', 999); if (!debug) { createEmptyMovieClip('RotFind', 998); } LevelsArray = [['Level4', 'Bonus4', 'Bonus2'], ['Level8', 'nothing', 'Bonus15', 'Trans1', 'Trans2'], ['Level1', 'Bonus18', 'Bonus14', 'Trans3'], ['Level9', 'Bonus17', 'Bonus19', 'Trans4'], ['Level11', 'Level11', 'Trans5'], ['Level14', 'Bonus24'], ['Level10', 'Bonus22', 'Bonus9', 'Trans7', 'Trans6', 'Trans8'], ['Level6', 'Bonus10', 'Bonus5', 'Bonus6', 'Bonus8', 'Bonus7', 'Bonus11', 'Bonus12', 'Trans9', 'Level18', 'Trans11'], ['Level7', 'Bonus21', 'Bonus20', 'Trans12'], ['Trans13', 'nothing', 'Trans14', 'Trans15', 'Bonus25'], ['Level17', 'nothing']]; challengeGoalBonus4 = 500000; challengeGoalBonus17 = 11; challengeGoalBonus18 = 0; challengeGoalLevel11 = 10; challengeGoalBonus24 = 0; challengeGoalBonus22 = 0; challengeGoalBonus21 = 0; challengeGoalBonus10 = 0; challengeGoalBonus12 = 0; challengeGoalBonus11 = 0; challengeGoalBonus7 = 0; challengeGoalBonus8 = 0; challengeGoalBonus6 = 0; challengeGoalBonus5 = 0; shouldFlush = false; oldMainLevelID = -1; cutsceneProgress = 5; isMuteSFX = false; LoadLevel = function (LoadIt, DoorIt, startTimer, softReset) { if (LoadIt == undefined) { LoadIt = LevelsArray[MainLevelID][0]; _root.LoadIt = LoadIt; } else { _root.LoadIt = LoadIt; } _root.DoorIt = DoorIt; trace('downloadLevel ' + LoadIt); levelContainer = createEmptyMovieClip('levelContainer', levelDepth); foregroundContainer = createEmptyMovieClip('foregroundContainer', foregroundDepth); OutPut.attachMovie('FadeIn', 'FadeIn', OutPut.getNextHighestDepth(), {'worm': LoadIt}); OutPut.FadeIn.stop(); OutPut.attachMovie('loadHUD', 'loadHUD', OutPut.getNextHighestDepth(), {'_xscale': eScale, '_yscale': eScale}); OutPut.loadHUD.loadBar._xscale = 0; OutPut.loadHUD.gotoAndStop(1); if (isExternal) { loadMovie(basePath + 'Levels/' + LoadIt + '.swf', levelContainer); timerClip.onEnterFrame = function () { trace('waiting' + levelContainer.getBytesLoaded()); if (levelContainer.getBytesLoaded() > 1 && levelContainer.getBytesLoaded() >= levelContainer.getBytesTotal()) { delete timerClip.onEnterFrame; LoadForeground(LoadIt, DoorIt, startTimer, softReset); } else { OutPut.loadHUD.loadBar._xscale = (levelContainer.getBytesLoaded() / levelContainer.getBytesTotal()) * 100; } }; } else { OldLoadLevel(LoadIt, DoorIt, startTimer, softReset); } }; LoadForeground = function (LoadIt, DoorIt, startTimer, softReset) { trace('downloadForeground'); loadMovie(basePath + 'Levels/' + LoadIt + '.swf', foregroundContainer); timerClip.onEnterFrame = function () { if (foregroundContainer.getBytesLoaded() > 1 && foregroundContainer.getBytesLoaded() >= foregroundContainer.getBytesTotal()) { delete timerClip.onEnterFrame; OldLoadLevel(LoadIt, DoorIt, startTimer, softReset); } }; }; OldLoadLevel = function (LoadIt, DoorIt, startTimer, softReset) { messagePopup('LoadLevel ' + LoadIt); if (softReset == undefined) { softReset = false; } spawnChar('Char', 0); if (cooping) { spawnChar('CharQTP', 1); } Paused = true; trace('levelContainer' + levelContainer); notSoRandomN = 0; SpringBoardCount = 0; aPlatzCount = 0; CoinCount = 0; BackgroundCoinCount = 0; CoinTTCount = 0; SwiftCount = 0; objectCount = 0; _root.tehground = levelContainer.attachMovie('tehground' + LoadIt, 'tehground', 3); _root.surface = levelContainer.attachMovie('surface' + LoadIt, 'surface', 1); _root.water = levelContainer.attachMovie('water' + LoadIt, 'water', 0); _root.tehwallz = levelContainer.attachMovie('tehwallz' + LoadIt, 'tehwallz', 2); _root.tehplatformz = levelContainer.attachMovie('tehplatformz' + LoadIt, 'tehplatformz', 4); _root.aPlatz = levelContainer.attachMovie('aPlatz' + LoadIt, 'aPlatz', 6); _root.tehhangz = levelContainer.attachMovie('tehhangz' + LoadIt, 'tehhangz', 5); _root.InteractLayer = levelContainer.attachMovie('InteractLayer' + LoadIt, 'InteractLayer', 7); levelScale = 100; eScale = 0; ScrollEverything(); setBounds(); firstMaxX = MaxX; firstMaxY = MaxY; theSpreadX = MaxX - MinX; theSpreadY = MaxY - MinY; delete Char.onEnterFrame; Char.gotoAndStop('DoorOut'); scrollEngine = function () { null; }; ShowSmoke = false; var v3 = 0; while (v3 < ShowSmokeArray.length) { if (ShowSmokeArray[v3] == LoadIt) { ShowSmoke = true; } ++v3; } if (!ShowSmoke) { tehground._alpha = 0; tehwallz._alpha = 0; tehplatformz._alpha = 0; surface._alpha = 0; tehhangz._alpha = 0; } aPlatz._alpha = 0; water._alpha = 0; createEmptyMovieClip('ELayer', 501); if (debug) { testDot = ELayer.attachMovie('testDot', 'testDot', 2); testDotB = ELayer.attachMovie('testDotB', 'testDotB', 1); RotFind = ELayer.attachMovie('RotFind', 'RotFind', 0, {'_alpha': showDebug}); crossDebug = ELayer.attachMovie('crossDebug', 'crossDebug', 3, {'_x': -1000, '_y': 1000}); crossDebug.stop(); v3 = 0; while (v3 < 25) { ELayer.attachMovie('dot', 'dot' + v3, v3 + 10, {'_x': -1000, '_y': 1000}); ++v3; } } LevelPower = -1; MainLevelID = -1; v3 = 0; while (v3 < LevelsArray.length) { var v2 = 0; while (v2 < LevelsArray[v3].length) { if (LevelsArray[v3][v2] == LoadIt) { MainLevelID = v3; LevelPower = v2; break; } ++v2; } ++v3; } nestedBonusLevel = LevelsArray[MainLevelID][1]; nestedLevelType = getLevelType(nestedBonusLevel); if (LoadIt == 'Level11') { challengeScoreLevel11 = 0; v3 = 0; while (v3 < castlesArray.length) { if (_root.castlesArray[v3]) { ++_root.challengeScoreLevel11; } ++v3; } if (challengeScoreLevel11 > 0) { APITrackEvent('ChallengeLevel11', challengeScoreLevel11); } } if (MainLevelID > LevelSelect && LevelPower == 0) { LevelSelect = MainLevelID; shouldFlush = true; } if (oldMainLevelID != MainLevelID && LevelPower == 0) { if (_root['challengeScore' + nestedBonusLevel] < _root['challengeGoal' + nestedBonusLevel] || _root['challengeScore' + nestedBonusLevel] == 0) { canChangePants = true; } else { canChangePants = false; } if (MainLevelID > progressStatus) { contSquiggles = Squiggles; contLives = Lives; progressStatus = MainLevelID; } oldMainLevelID = MainLevelID; } if (substring(LoadIt, 1, 5) == 'Level' && substring(LevelLoaded, 1, 5) == 'Menus') { APIStartGame(); APIStartLevel(substring(LoadIt, 6, 1)); } if (LoadIt == 'Bonus4') { movePerformed = movePerformedBonus; } else { movePerformed = function () { return false; }; } oStep = -1; if (LoadIt == 'Level11' || LoadIt == 'Trans5' || LoadIt == 'Trans13') { footStep = function (ex, ey, escale, erot, mRL, fric, aplatz) { if (fric) { _root.inkSplat(ex, ey, escale / 4 + Math.abs(mRL) * (escale / Math.abs(escale)) * 5, erot); } else { if (water.hitTest(ex, ey + 10, true)) { edepth = _root.waterSplat(ex, ey, escale / 2 + Math.abs(mRL) * (escale / Math.abs(escale)) * 3, erot); var v2 = random(4); while (oStep == v2) { v2 = random(4); } oStep = v2; soundContainer.quickSound('splish' + oStep, escale, _root['waterSplat' + edepth]); } else { edepth = _root.sandSplat(ex, ey, escale * 1 + Math.abs(mRL) * (escale / Math.abs(escale)) * 6, erot, aplatz); var v2 = random(3); while (oStep == v2) { v2 = random(3); } oStep = v2; soundContainer.quickSound('sandStep' + oStep, escale, _root['sandSplat' + edepth]); } } }; footSlide = function (ex, ey, escale, erot, mRL, fric, eThis) { if (fric) { if (eThis.smokeN > 0) { --eThis.smokeN; } else { _root.inkSplat(ex, ey, mRL * 6, erot); eThis.smokeN = 2; } } else { if (water.hitTest(ex, ey + 10, true)) { if (eThis.smokeN > 0) { --eThis.smokeN; } else { _root.waterSplat(ex, ey, mRL * 4, erot); eThis.smokeN = 1; } } else { if (eThis.smokeN > 0) { --eThis.smokeN; } else { _root.sandSplat(ex, ey, mRL * 8, erot); eThis.smokeN = 3; } } } }; makeFootprint = function (ex, ey, erot) { tempX = Math.floor((MaxX + ex) / 2880); tempY = Math.floor((MaxY + ey) / 1920); temp = tempY + tempX * FGtilesY; ELayer.footprint._x = ex + MaxX - tempX * 2880; ELayer.footprint._y = ey + MaxY + (random(4) - 2) - tempY * 1920; ELayer.footprint._rotation = erot; _root['levelBitmap' + temp].draw(ELayer.footprint, ELayer.footprint.transform.matrix); ELayer.footprint._x = -MaxX - 20; }; ELayer.attachMovie('footprint', 'footprint', ELayer.getNextHighestDepth(), {'_y': -MaxY}); ELayer.attachMovie('scurryprint', 'scurryprint', ELayer.getNextHighestDepth(), {'_y': -MaxY}); } else { footStep = function (ex, ey, escale, erot, mRL, fric) { escale = escale / 4 + Math.abs(mRL) * (escale / Math.abs(escale)) * 5; if (fric) { _root.inkSplat(ex, ey, escale, erot); } else { if (water.hitTest(ex, ey, true)) { _root.waterSplat(ex, ey, escale, erot); } } }; footSlide = function (ex, ey, escale, erot, mRL, fric, eThis) { if (eThis.aPlatzOn > -1) { } else { if (fric) { if (eThis.smokeN > 0) { --eThis.smokeN; } else { _root.inkSplat(ex, ey, escale / 4 + Math.abs(mRL) * (escale / Math.abs(escale)) * 5, erot); eThis.smokeN = 2; } } else { if (water.hitTest(ex, ey, true)) { if (eThis.smokeN > 0) { --eThis.smokeN; } else { _root.waterSplat(ex, ey, escale / 4 + Math.abs(mRL) * (escale / Math.abs(escale)) * 5, erot); eThis.smokeN = 2; } } else { if (eThis.smokeN > 0) { --eThis.smokeN; } else { _root.smokeSplash(ex, ey, Math.abs(mRL) * 6, erot); eThis.smokeN = 5; } } } } makeFootprint = function () { return null; }; }; } spawnBaddiesArrayBonus6 = ['Spider', 'Spider', 'Spider', 'Duck', 'Spider', 'Spider', 'Spider', 'Spider', 'Duck']; spawnBaddiesArrayBonus7 = ['Spider', 'Duck', 'Spider', 'Spider', 'elitePirate']; spawnBaddiesArrayBonus11 = ['Spider', 'Spider', 'Spider', 'Spider', 'Duck', 'Spider', 'Spider', 'Spider', 'Spider', 'Spider', 'elitePirate']; spawnBaddiesArrayBonus23 = ['BeachBall', 'Hamburger', 'Turtal', 'Turtle', 'SpringMan', 'Sawnik', 'DemonTurtle', 'Spider', 'Parrot', 'Ninja']; badPos = 0; if (_root[LoadIt + 'CoinGot'] == undefined) { _root[LoadIt + 'CoinGot'] = new Array(); _root[LoadIt + 'CoinGot'][0] = false; } if (_root[LoadIt + 'TTGot'] == undefined) { _root[LoadIt + 'TTGot'] = false; } RotFind.RLx = RLx; RotFind.RLy = RLy; RotFind.UDx = UDx; RotFind.UDy = UDy; RotFind.WasSix = WasSix; RotFind.spread = 10; RotFind.RAnchx = RAnchx; RotFind.RAnchy = RAnchy; RotFind.LAnchx = LAnchx; RotFind.LAnchy = LAnchy; RotFind.WraptoGround = WraptoGround; tehwallz.Box.RLFunc = RLFunc; tehwallz.Box.WraptoGround = WraptoGround; tehwallz.movingWallz.gears.smokeRL = 0; UberForeground = foregroundContainer.attachMovie('UberForeground' + LoadIt, 'UberForeground', 9); if (softReset && LevelLoaded == LoadIt) { LoadIt = LoadIt; DoorIt = DoorIt; temp = 3; onEnterFrame = function () { if (temp > 0) { --temp; } else { onEnterFrame = Lock30; finishLoading(LoadIt, DoorIt); } }; } else { buildCache(LoadIt, DoorIt); } }; getLevelType = function (eLevel) { if (eLevel == 'Bonus4') { return 'TrickAttack'; } else { if (eLevel == 'Bonus18' || eLevel == 'Bonus24') { return 'TimeTrial'; } else { if (eLevel == 'Bonus17') { return 'CollectCount'; } else { if (eLevel == ' ') { return 'StopWatch'; } else { if (eLevel == 'Bonus21' || eLevel == 'Bonus22') { return 'Golf'; } else { if (eLevel == 'Bonus23' || eLevel == 'Bonus5' || eLevel == 'Bonus6' || eLevel == 'Bonus8' || eLevel == 'Bonus7' || eLevel == 'Bonus11' || eLevel == 'Bonus12') { return 'Arena'; } else { return 'nothing'; } } } } } } }; FindRot = function (jumprot, ex, ey, nowSpeed, spread, anchor, fromWhere, sliding) { RotFind._x = ex; RotFind._y = ey; RotFind._rotation = jumprot - 180; RotFind.spread = spread; RotFind._xscale = spread * 2; RotFind.moveRL = nowSpeed; nowSpeed = nowSpeed * 2 + 20; var v5 = Math.sin((RotFind._rotation + 180) * 0.0174532925199433); var v3 = -Math.cos((RotFind._rotation + 180) * 0.0174532925199433); for (;;) { if (!(testAll(RotFind._x + RotFind.RAnchx(RotFind._rotation * 0.0174532925199433), RotFind._y + RotFind.RAnchy(RotFind._rotation * 0.0174532925199433), true, false) && testAll(RotFind._x + RotFind.LAnchx(RotFind._rotation * 0.0174532925199433), RotFind._y + RotFind.LAnchy(RotFind._rotation * 0.0174532925199433), true, false))) break; RotFind._x -= v5; RotFind._y -= v3; } if (tehwallz.hitTest(RotFind._x + (spread + 2), RotFind._y, true) || tehwallz.hitTest(RotFind._x - (spread + 2), RotFind._y, true)) { nowSpeed += 20; v5 = 0; while (tehwallz.hitTest(RotFind._x + this.RLx(spread + 2), RotFind._y - spread, true)) { --RotFind._x; } while (tehwallz.hitTest(RotFind._x - this.RLx(spread + 2), RotFind._y - spread, true)) { ++RotFind._x; } } var v4 = 0; while (v4 < nowSpeed + 5) { if (!testAll(RotFind._x + RotFind.RAnchx(RotFind._rotation * 0.0174532925199433) + v5 * 2, RotFind._y + RotFind.RAnchy(RotFind._rotation * 0.0174532925199433) + v3 * 2, true, false) && !testAll(RotFind._x + RotFind.LAnchx(RotFind._rotation * 0.0174532925199433) + v5 * 2, RotFind._y + RotFind.LAnchy(RotFind._rotation * 0.0174532925199433) + v3 * 2, true, false)) { RotFind._x += v5; RotFind._y += v3; } else { break; } ++v4; } this.temp = RotFind.WraptoGround(true, anchor, true, 'rotfind', sliding, nowSpeed); if (this.temp == 'broke') { fromWhere.wallX = -10000; return 'broke'; } else { fromWhere.wallStatus = temp; fromWhere.wallX = RotFind._x; fromWhere.wallY = RotFind._y; fromWhere.wallRot = RotFind._rotation; return RotFind._rotation; } }; WraptoGround = function (pull, anchor, breakIt, origin, sliding, nowSpeed) { this.temp = false; var v4 = this._x; var v3 = this._y; var v2 = this._rotation * Math.PI / 180; if (testAll(v4 + this.RAnchx(v2) + this.UDx(this.WasSix()), v3 + this.RAnchy(v2) + this.UDy(this.WasSix()), true, sliding) && testAll(v4 + this.LAnchx(v2) + this.UDx(this.WasSix()), v3 + this.LAnchy(v2) + this.UDy(this.WasSix()), true, sliding) && pull || anchor) { var v16 = Math.sin(v2); var v15 = -Math.cos(v2); var v8 = 0; while (v8 < nowSpeed) { if (!testAll(v4 + this.RAnchx(v2) + this.UDx(2), v3 + this.RAnchy(v2) + this.UDy(2), true, sliding) && !testAll(v4 + this.LAnchx(v2) + this.UDx(2), v3 + this.LAnchy(v2) + this.UDy(2), true, sliding)) { v4 += v16; v3 -= v15; } else { break; } if (v8 > nowSpeed - 2) { messagePopup('wrapspeedbreak = ' + nowSpeed); return 'broke'; } ++v8; } var v10 = 0; for (;;) { if (!(!testAll(v4 + this.RAnchx(v2) + this.UDx(2), v3 + this.RAnchy(v2) + this.UDy(2), true, sliding) || !testAll(v4 + this.LAnchx(v2) + this.UDx(2), v3 + this.LAnchy(v2) + this.UDy(2), true, sliding))) break; if (!testAll(v4 + this.RAnchx(v2) + this.UDx(2), v3 + this.RAnchy(v2) + this.UDy(2), true, sliding)) { var v12 = this.RAnchx(v2); var v11 = this.RAnchy(v2); v2 += 0.0174532925199433; var v6 = this.RAnchx(v2) - v12; var v7 = this.RAnchy(v2) - v11; v4 += v6; v3 += v7; v10 += Math.sqrt(v6 * v6 + v7 * v7); } if (!testAll(v4 + this.LAnchx(v2) + this.UDx(2), v3 + this.LAnchy(v2) + this.UDy(2), true, sliding)) { var v14 = this.LAnchx(v2); var v13 = this.LAnchy(v2); v2 -= 0.0174532925199433; v6 = this.LAnchx(v2) - v14; v7 = this.LAnchy(v2) - v13; v4 += v6; v3 += v7; v10 += Math.sqrt(v6 * v6 + v7 * v7); } if (v10 > nowSpeed && breakIt) { messagePopup(this + ' broke '); return 'broke'; } } this.temp = 'TwoFeet'; } else { this.temp = 'broke'; } var v16 = Math.sin(v2); var v15 = Math.cos(v2); for (;;) { if (!(testAll(v4 + this.RAnchx(v2), v3 + this.RAnchy(v2), true, sliding) && testAll(v4 + this.LAnchx(v2), v3 + this.LAnchy(v2), true, sliding))) break; v4 += v16; v3 -= v15; } for (;;) { if (!(testAll(v4 + this.RAnchx(v2), v3 + this.RAnchy(v2), true, sliding) || testAll(v4 + this.LAnchx(v2), v3 + this.LAnchy(v2), true, sliding))) break; if (testAll(v4 + this.RAnchx(v2), v3 + this.RAnchy(v2), true, sliding)) { var v12 = this.RAnchx(v2); var v11 = this.RAnchy(v2); v2 -= 0.0174532925199433; v4 += this.RAnchx(v2) - v12; v3 += this.RAnchy(v2) - v11; } if (testAll(v4 + this.LAnchx(v2), v3 + this.LAnchy(v2), true, sliding)) { var v14 = this.LAnchx(v2); var v13 = this.LAnchy(v2); v2 += 0.0174532925199433; v4 += this.LAnchx(v2) - v14; v3 += this.LAnchy(v2) - v13; } } this._x = v4; this._y = v3; this._rotation = v2 * 180 / Math.PI; return this.temp; }; looseFindRot = function (jumprot, ex, ey, nowSpeed, spread, fromWhere) { RotFind._x = ex; RotFind._y = ey; RotFind._rotation = jumprot - 180; RotFind.spread = spread; RotFind.nowSpeed = nowSpeed; var v4 = Math.sin((RotFind._rotation + 180) * 0.0174532925199433); var v3 = -Math.cos((RotFind._rotation + 180) * 0.0174532925199433); var v2 = 0; while (v2 < nowSpeed) { if (!testAll(RotFind._x + RotFind.RAnchx(this._rotation * 0.0174532925199433) + v4, RotFind._y + RotFind.RAnchy(this._rotation * 0.0174532925199433) + v3, true, false) && !testAll(RotFind._x + v4, RotFind._y + RotFind.LAnchy(this._rotation * 0.0174532925199433) + v3, true, false)) { RotFind._x += v4; RotFind._y += v3; } else { break; } ++v2; } if (RotFind.WraptoGround(true, true, true, 'rotfind') == 'broke') { fromWhere.wallX = -10000; return 'broke'; } else { fromWhere.wallX = RotFind._x; fromWhere.wallY = RotFind._y; return RotFind._rotation; } }; buildCache = function (LoadIt, DoorIt) { trace('buildCache foregroundContainer ' + foregroundContainer); levelContainer.attachMovie('Foreground' + LoadIt, 'Foreground', 8); createEmptyMovieClip('levelShell', 20); OutPut.loadHUD.gotoAndStop(2); OutPut.loadHUD.loadBar._xscale = 0; bitSpreadX = 2880 * bitRes - 1; bitSpreadY = 1920 * bitRes - 1; FGsuperX = MaxX - MinX; FGsuperY = MaxY - MinY; FGtilesX = Math.round(FGsuperX / bitSpreadX + 0.5); FGtilesY = Math.round(FGsuperY / bitSpreadY + 0.5); totalTiles = FGtilesX * FGtilesY + 1; if (LoadIt == 'Level6' || LoadIt == 'Bonus24') { backgroundRatios = [0.3, 0.5, 0.9300000000000001]; } else { if (LoadIt == 'Level10') { backgroundRatios = [0.3, 0.45, 0.6, 0.75, 0.95]; } else { if (LoadIt == 'Bonus9' || LoadIt == 'Trans8') { backgroundRatios = [0.8]; } else { if (LoadIt == 'Bonus23' || LoadIt == 'Trans10') { backgroundRatios = [0.5]; } else { if (LoadIt == 'Trans13') { backgroundRatios = [0.2, 0.4, 0.8]; } else { if (LoadIt == 'Level7' || LoadIt == 'Trans7' || LoadIt == 'Bonus17') { backgroundRatios = [0.3, 0.5, 0.7, 0.9300000000000001]; } else { if (LoadIt == 'Bonus2') { backgroundRatios = [0.2, 0.4]; } else { if (LoadIt == 'Bonus21' || LoadIt == 'Bonus20' || LoadIt == 'Bonus10') { backgroundRatios = [0.4, 0.6]; } else { if (LoadIt == 'Bonus12') { backgroundRatios = [0.6, 0.65, 0.85, 0.9300000000000001]; } else { if (LoadIt == 'Level1' || LoadIt == 'Bonus18') { backgroundRatios = [0.1, 0.3, 0.5, 0.7, 0.9]; } else { if (LoadIt == 'Level16' || LoadIt == 'Trans4' || LoadIt == 'Trans5') { backgroundRatios = [0.1, 0.3, 0.5, 0.75, 0.95]; } else { if (LoadIt == 'Bonus13') { backgroundRatios = [0.05, 0.15, 0.5, 0.7, 0.8]; } else { if (LoadIt == 'Level15') { backgroundRatios = [0.5]; } else { if (LoadIt == 'Bonus4' || LoadIt == 'Bonus14') { backgroundRatios = [0.6, 0.9]; } else { if (LoadIt == 'Trans3') { backgroundRatios = [0.05, 0.15, 0.3, 0.6, 0.8]; } else { if (LoadIt == 'Level9') { backgroundRatios = [0.05, 0.15, 0.3, 0.6, 0.9]; } else { if (LoadIt == 'Level11') { backgroundRatios = [0.2, 0.4, 0.6, 0.7, 0.9]; } else { if (LoadIt == 'Trans6') { backgroundRatios = [0.15, 0.3, 0.6, 0.75, 0.875]; } else { if (LoadIt == 'Trans1' || LoadIt == 'Trans2') { backgroundRatios = [0.05, 0.1, 0.3, 0.5, 0.9]; } else { if (LoadIt == 'Level4') { backgroundRatios = [0.2, 0.4, 0.6, 0.7, 0.9]; } else { if (LoadIt == 'Level8') { backgroundRatios = [0.05, 0.1, 0.15, 0.2, 0.95]; } else { backgroundRatios = [0.3, 0.6, 0.8]; } } } } } } } } } } } } } } } } } } } } } totalBackgrounds = backgroundRatios.length; scrollX = FGsuperX - stageX; scrollY = FGsuperY - stageY; BGsuperX = new Array(); BGsuperY = new Array(); BGtilesX = new Array(); BGtilesY = new Array(); backgroundPercX = new Array(); backgroundPercY = new Array(); var v2 = 1; while (v2 < totalBackgrounds + 1) { BGsuperX[v2 - 1] = stageX + scrollX * backgroundRatios[v2 - 1]; BGsuperY[v2 - 1] = stageY + scrollY * backgroundRatios[v2 - 1]; BGtilesX[v2 - 1] = Math.round(BGsuperX[v2 - 1] / bitSpreadX + 0.5); BGtilesY[v2 - 1] = Math.round(BGsuperY[v2 - 1] / bitSpreadY + 0.5); backgroundPercX[v2 - 1] = BGsuperX[v2 - 1] / FGsuperX; backgroundPercY[v2 - 1] = BGsuperY[v2 - 1] / FGsuperY; totalTiles += BGtilesX[v2 - 1] * BGtilesY[v2 - 1]; ++v2; } tilesLoaded = 0; eDepth = 0; ex = 0; ey = 0; superX = FGsuperX; superY = FGsuperY; tilesX = FGtilesX; tilesY = FGtilesY; levelContainer.Foreground._xscale = 100 / bitRes; levelContainer.Foreground._yscale = 100 / bitRes; onEnterFrame = function () { if (ex < tilesX) { if (superX > bitSpreadX) { tempX = bitSpreadX; } else { tempX = superX; } if (superY > bitSpreadY) { tempY = bitSpreadY; } else { tempY = superY; } _root['levelBitmap' + eDepth] = new flash.display.BitmapData(tempX / bitRes + 1, tempY / bitRes + 1, true, 0); levelShell.createEmptyMovieClip('levelClip' + eDepth, eDepth); levelShell['levelClip' + eDepth].attachBitmap(_root['levelBitmap' + eDepth], 0); levelContainer.Foreground._x = MaxX / bitRes - (bitSpreadX / bitRes) * ex; levelContainer.Foreground._y = MaxY / bitRes - (bitSpreadY / bitRes) * ey; _root['levelBitmap' + eDepth].draw(levelContainer.Foreground, levelContainer.Foreground.transform.matrix); levelShell['levelClip' + eDepth]._x = -MaxX + bitSpreadX * ex; levelShell['levelClip' + eDepth]._y = -MaxY + bitSpreadY * ey; levelShell['levelClip' + eDepth]._xscale = 100 * bitRes; levelShell['levelClip' + eDepth]._yscale = 100 * bitRes; ++eDepth; if (superY > bitSpreadY) { superY -= bitSpreadY; } ++ey; ++tilesLoaded; OutPut.loadHUD.loadBar._xscale = (tilesLoaded / totalTiles) * 100; if (ey == tilesY) { superY = FGsuperY; if (superX > bitSpreadX) { superX -= bitSpreadX; } ey = 0; ++ex; } } else { levelContainer.Foreground.removeMovieClip(); eDepth = 0; ex = 0; ey = 0; bgNum = 1; flattenBackgrounds = false; if (flattenBackgrounds) { createEmptyMovieClip('BGScroll', 10); thisBGScroll = BGScroll; } else { createEmptyMovieClip('BGScroll' + bgNum, 10 + bgNum); thisBGScroll = _root['BGScroll' + bgNum]; var v4 = 100 / backgroundRatios[bgNum - 1] - 100; thisBGScroll.z = v4 / 200; } if (LoadIt == 'Level9' || LoadIt == 'Bonus14' || LoadIt == 'Bonus15' || LoadIt == 'Level7' || LoadIt == 'Trans7' || LoadIt == 'Level10' || LoadIt == 'Bonus6' || LoadIt == 'Trans11') { backgroundFilter = function () { setBrightness(thisBGScroll, -(1 - backgroundRatios[bgNum - 1]) * 0.55); }; } else { if (LoadIt == 'Level4' || LoadIt == 'Level15' || LoadIt == 'Trans6' || LoadIt == 'Bonus23' || LoadIt == 'Level6' || LoadIt == 'Bonus21' || LoadIt == 'Bonus20' || LoadIt == 'Bonus8' || LoadIt == 'Bonus12' || LoadIt == 'Bonus25' || LoadIt == 'Bonus10' || LoadIt == 'Trans12') { backgroundFilter = function () { return null; }; } else { backgroundFilter = function () { setBrightness(thisBGScroll, (1 - backgroundRatios[bgNum - 1]) * 0.5); }; } } backgroundFilter(); _root.Background = levelContainer.attachMovie('Background' + LoadIt + 'BG' + bgNum, 'Background', 10, {'_xscale': backgroundPercX[0] * (100 / bitRes), '_yscale': backgroundPercY[0] * (100 / bitRes)}); superX = BGsuperX[0]; superY = BGsuperY[0]; tilesX = BGtilesX[0]; tilesY = BGtilesY[0]; onEnterFrame = function () { if (bgNum < totalBackgrounds + 1) { if (ex < tilesX) { if (ey < tilesY) { if (superX > bitSpreadX) { tempX = bitSpreadX; } else { tempX = superX; } if (superY > bitSpreadY) { tempY = bitSpreadY; } else { tempY = superY; } _root['BGlevelBitmap' + bgNum + 'BG' + eDepth] = new flash.display.BitmapData(tempX / bitRes + 1, tempY / bitRes + 1, true, 0); thisBGlevelBitmap = _root['BGlevelBitmap' + bgNum + 'BG' + eDepth]; if (thisBGScroll['BGlevelClip' + eDepth] == undefined) { thisBGScroll.createEmptyMovieClip('BGlevelClip' + eDepth, eDepth); thisBGScroll['BGlevelClip' + eDepth].attachBitmap(_root['BGlevelBitmap' + bgNum + 'BG' + eDepth], 0); } Background._x = (MaxX / bitRes) * backgroundPercX[bgNum - 1] - (bitSpreadX / bitRes) * ex; Background._y = backgroundPercY[bgNum - 1] * (MaxY / bitRes) - (bitSpreadY / bitRes) * ey; thisBGlevelBitmap.draw(Background, Background.transform.matrix); thisBGScroll['BGlevelClip' + eDepth]._x = bitSpreadX * ex; thisBGScroll['BGlevelClip' + eDepth]._y = bitSpreadY * ey; ++eDepth; if (superY > bitSpreadY) { superY -= bitSpreadY; } ++ey; ++tilesLoaded; OutPut.loadHUD.loadBar._xscale = (tilesLoaded / totalTiles) * 100; } else { superY = BGsuperY[bgNum - 1]; if (superX > 2880) { superX -= bitSpreadX; } ey = 0; ++ex; } } else { Background.removeMovieClip(); ++bgNum; if (bgNum < totalBackgrounds + 1) { if (!flattenBackgrounds) { createEmptyMovieClip('BGScroll' + bgNum, 10 + bgNum); thisBGScroll = _root['BGScroll' + bgNum]; var v4 = 100 / backgroundRatios[bgNum - 1] - 100; thisBGScroll.z = v4 / 200; } backgroundFilter(); _root.Background = levelContainer.attachMovie('Background' + LoadIt + 'BG' + bgNum, 'Background', 10, {'_xscale': backgroundPercX[bgNum - 1] * (100 / bitRes), '_yscale': backgroundPercY[bgNum - 1] * (100 / bitRes)}); if (bgNum == 2 && LoadIt == 'Level4') { var v2 = new flash.filters.BlurFilter(0, 0, 3); var v3 = new Array(); v3.push(v2); v2.blurX = 1.35; v2.blurY = 1.35; Background.filters = v3; } eDepth = 0; ex = 0; ey = 0; superX = BGsuperX[bgNum - 1]; superY = BGsuperY[bgNum - 1]; tilesX = BGtilesX[bgNum - 1]; tilesY = BGtilesY[bgNum - 1]; } } } else { Background.removeMovieClip(); _root.Uberbackground = levelContainer.attachMovie('Uberbackground' + LoadIt, 'Uberbackground', 11, {'_y': 480}); if (Uberbackground != undefined) { UBGlevelBitmap = new flash.display.BitmapData(stageX + 1, stageY + 1, false, 0); createEmptyMovieClip('UBGstatic', 0); UBGstatic.attachBitmap(UBGlevelBitmap, 0); UBGlevelBitmap.draw(Uberbackground, Uberbackground.transform.matrix); UBGstatic._xscale = eScale; UBGstatic._yscale = eScale; Uberbackground.removeMovieClip(); } ++tilesLoaded; OutPut.loadHUD.loadBar._xscale = (tilesLoaded / totalTiles) * 100; finishLoading(LoadIt, DoorIt); } }; } }; }; finishLoading = function (LoadIt, DoorIt) { trace('finish loading'); saveNetworkData(); if (shouldFlush) { Fancy_local_data.flush(); shouldFlush = false; } if (DoorIt == undefined) { DoorIt = 'Door0'; var v3 = 0; while (InteractLayer['Door' + v3] != undefined) { if (InteractLayer['Door' + v3].worm == LevelLoaded) { DoorIt = 'Door' + v3; break; } ++v3; } } LevelLoaded = LoadIt; DoorLoaded = DoorIt; JumpPadCount = 0; BaddieCount = 0; CastleCount = 0; BaddieArray = new Array(); _root.BLayer = levelContainer.attachMovie('BLayer' + LoadIt, 'BLayer', 12); if (InteractLayer[DoorIt].quickSpawn) { Char.char.gotoAndPlay('quickIdle'); InteractLayer[DoorIt].gotoAndStop('vanished'); } else { InteractLayer[DoorIt].gotoAndPlay('doorOut'); } Char._y = Math.round(InteractLayer[DoorIt]._y); Char.centerY = Char._y - Char.isTall / 2; if (InteractLayer[DoorIt].quickDrop) { Char._x = Math.round(InteractLayer[DoorIt]._x); } else { Char._x = Math.round(InteractLayer[DoorIt]._x + InteractLayer[DoorIt]._xscale / 2.5); } Char.centerX = Char._x; Char._xscale = InteractLayer[DoorIt]._xscale; loadMusic(LoadIt, DoorIt); if (BackgroundVolume == 0) { OutPut.FadeIn.spring = 0; OutPut.FadeIn.onEnterFrame = function () { this.spring += 0.2; if (BackgroundVolume + this.spring < 100) { BackgroundVolume += this.spring; } else { BackgroundVolume = 100; } BackgroundMusic.setVolume(BackgroundVolume); }; } offsetX = 0; SmoothUD = 0; SmoothRL = 0; offsetY = 0; shakeCamN = 0; cinematicScroll = false; vOffset = 110; if (nestedLevelType == 'Golf' && LevelPower == 1) { scrollEngine = CharAndShellScroll; gameCamera = 'CharAndShellScroll'; maxZoomedOut = 2; rightDist = 300; originalRightDist = 300; maxZoomedIn = 1; vRatio = 1; ShellSmoothOffsetY = 0; ShellSmoothOffsetX = 0; setCharScroll(0); } else { if (LoadIt == 'Level12' && false) { scrollEngine = ShellScroll; gameCamera = 'ShellScroll'; } else { if (LoadIt == 'Bonus16' || LoadIt == 'Bonus17' || LoadIt == 'Bonus21' || LoadIt == 'Level12') { scrollEngine = CharAndShellScroll; gameCamera = 'CharAndShellScroll'; maxZoomedOut = 2; rightDist = 300; originalRightDist = 300; maxZoomedIn = 1; vRatio = 1; ShellSmoothOffsetY = 0; ShellSmoothOffsetX = 0; setCharScroll(0); } else { if (LoadIt == 'Trans4' && false) { maxZoomedOut = 5; rightDist = 400; originalRightDist = 400; maxZoomedIn = 1; scrollEngine = CinScroll; gameCamera = 'Cin'; } else { if (LoadIt == 'Level1' && DoorIt == 'Door0') { maxZoomedOut = 1; rightDist = 600; originalRightDist = 600; maxZoomedIn = 0.5; CameraX = 300; Camera2X = 50; camX = 50; CameraY = -5; Camera2Y = -5; camY = -5; scrollEngine = IndCinScroll; gameCamera = 'IndCin'; } else { if (LoadIt == 'Trans2') { maxZoomedOut = 1; rightDist = 450; originalRightDist = 450; maxZoomedIn = 0.5; CameraX = 50; Camera2X = 50; camX = 50; CameraY = 20; Camera2Y = 20; camY = 20; scrollEngine = IndCinScroll; gameCamera = 'IndCin'; } else { if (LoadIt == 'Trans1') { maxZoomedOut = 1; rightDist = 550; originalRightDist = 550; maxZoomedIn = 0.6; scrollEngine = CinScroll; gameCamera = 'Cin'; shakeCamN = 0; } else { if (LoadIt == 'Bonus18' || LoadIt == 'Bonus14') { vOffset = 60; scrollEngine = CharScroll; gameCamera = 'Char'; } else { if (LoadIt == 'Trans11' || LoadIt == 'Trans15' && DoorIt == 'Door0') { scrollEngine = MiddleScroll; gameCamera = 'Char'; } else { if (LoadIt == 'Level18' && DoorIt == 'Door2') { scrollEngine = CharScroll; gameCamera = 'Char'; levelScale = 150; } else { if (CharQTP == undefined) { scrollEngine = CharScroll; gameCamera = 'Char'; } } } } } } } } } } } delete oldScrollEngine; ScrollEverything(); if (LoadIt == 'Trans11') { _root['set' + gameCamera + 'Scroll'](0); } else { _root['set' + gameCamera + 'Scroll'](_root.Char._xscale * 1.5); } OutPut.HealthBar._xscale = Health; if (isTimed && timerDisplayed || true) { OutPut.tickerShell._alpha = 100; } else { OutPut.tickerShell._alpha = 0; } if (LevelPower == 0) { if (_root['highScoreTT' + LevelLoaded] == undefined) { _root['highScoreTT' + LevelLoaded] = 0; } if (nestedLevelType == 'TrickAttack') { ScoreString = _root['challengeScore' + nestedBonusLevel].toString(); while (length(ScoreString) < 7) { ScoreString = '0' + ScoreString; } } else { frameCounter = _root['challengeScore' + nestedBonusLevel]; secondCounter = Math.round((frameCounter / 30) * 100) / 100; ScoreString = secondCounter.toString(); stringLength = ScoreString.indexOf('.'); if (stringLength < 0) { ScoreString += '.00'; } else { if (length(ScoreString) < stringLength + 3) { ScoreString += '0'; } } Score = 0; } frameTimer = function () { null; }; if (LoadIt == 'Level6') { OutPut.gotoAndStop('Keys'); } else { OutPut.gotoAndStop('levels'); } } else { if (LevelPower == 1 && getLevelType(LoadIt) != 'nothing') { OutPut.gotoAndStop('challengeStart'); LevelType = getLevelType(LoadIt); GoalString = _root['challengeGoal' + nestedBonusLevel].toString(); while (length(GoalString) < 7) { GoalString = '0' + GoalString; } if (LevelType == 'CollectCount') { Score = _root['challengeGoal' + nestedBonusLevel] - 1; ScoreString = '0000000'; frameCounter = 3600; timeLimitSmoke = '120.00'; b = 95; frameTimer = waitForMovementTimer; } else { if (LevelType == 'TrickAttack') { Score = 0; ScoreString = '0000000'; frameCounter = 3600; timeLimitSmoke = '120.00'; b = 95; frameTimer = waitForMovementTimer; } else { if (LevelType == 'TimeTrial') { frameCounter = 3600; timeLimitSmoke = '120.00'; ScoreString = '120.00'; b = 95; frameTimer = nullTimer; } else { if (LevelType == 'Golf') { frameCounter = 3600; timeLimitSmoke = '120.00'; ScoreString = '120.00'; b = 95; frameTimer = waitForMovementTimer; } } } } } else { if (getLevelType(LoadIt) == 'Arena') { LevelType = 'Arena'; _root['allBaddiesGone' + LoadIt] = false; frameTimer = ArenaWaitFrameTimer; OutPut.gotoAndStop('Arena'); } else { if (substring(LoadIt, 1, 5) == 'Menus') { frameTimer = function () { null; }; isTimed = false; OutPut.gotoAndStop('menus'); } else { if (LoadIt == 'Bonus23') { frameTimer = function () { null; }; OutPut.gotoAndStop('trackBaddies'); } else { frameTimer = function () { null; }; OutPut.gotoAndStop('levels'); } } } } } onEnterFrame = unpausedEnterFrame; Paused = false; ColorEmPants(isColor, 'Char'); ColorEmPants(isColor, OutPut.counterLives); OutPut.FadeIn.play(); removeMovieClip(OutPut.loadHUD); if (LoadIt == 'Menus1') { } firstMaxBaddies = maxBaddies; maxBaddies += 5; comboTimer = -100; comboTimerMax = 120; delete moveArray; moveArray = new Array(); delete moveArrayString; moveArrayString = new String(); resetMoveValues(); moveComboScore = 0; comboMultiplier = 0.5; moveComboScoreSmoke = 0; OutPut.ComboTimerShell._alpha = 0; didThatLast = 'done'; popupArray = new Array(); arrayPopupN = 0; charLoadWeapon(); Setup(); Setup = _root[LoadIt + 'Setup']; Setup(); delete Setup; }; TrickAttackFrameTimer = function () { activeFrameTimer(-1); if (frameCounter == 0) { comboTimer = 0; updateComboTimer(); if (Score > 0) { APITrackEvent('Challenge' + LevelLoaded, Score); } if (Score > _root['challengeScore' + nestedBonusLevel]) { _root['challengeScore' + LevelLoaded] = Score; saveNetworkData(); shouldFlush = true; } Char.removeMovieClip(); _root.slideLoop.stop(); _root.rollLoop.stop(); OutPut.gotoAndStop('ChallengeDone'); if (Score >= _root['challengeGoal' + LevelLoaded] && Score > 0) { playSound('success'); OutPut.fade.gotoAndStop('TimesUpWin'); } else { playSound('failure'); OutPut.fade.gotoAndStop('TimesUpLose'); } b = 30; onEnterFrame = function () { Lock30(); if (b > 0) { --b; } else { if (JumpIsDown()) { onEnterFrame = Lock30; FadeItOut(_root.LevelsArray[_root.MainLevelID][0], undefined, false, false); } } }; } if (Char._currentframe != 7) { updateComboTimer(); } if (arrayPopupN > 0) { --arrayPopupN; } else { if (popupArray.length > 0) { arrayPopupN = 7; OutPut.attachMovie('messagePopup', 'combo!' + gNHD, gNHD, {'_x': 649, '_y': 450, 'smoke': popupArray.shift() + '!'}); } } if (OutPut.ComboTimerShell._alpha > 0 && comboTimer < 0) { OutPut.ComboTimerShell.ComboBar._xscale = 0; OutPut.ComboTimerShell._alpha -= 2; } }; CollectCountFrameTimer = function () { activeFrameTimer(-1); Score = _root['challengeGoal' + LevelLoaded] - BaddiesStomped; if (frameCounter == 0 || BaddiesStomped == _root['challengeGoal' + LevelLoaded]) { if (frameCounter > 0) { APITrackEvent('Challenge' + LevelLoaded, frameCounter); } if (frameCounter > _root['challengeScore' + nestedBonusLevel]) { _root['challengeScore' + nestedBonusLevel] = frameCounter; saveNetworkData(); shouldFlush = true; } Char.removeMovieClip(); _root.slideLoop.stop(); _root.rollLoop.stop(); SnailShell.removeMovieClip(); OutPut.gotoAndStop('challengeDone'); if (frameCounter == 0) { playSound('failure'); OutPut.fade.gotoAndStop('didntFinish'); } else { playSound('success'); OutPut.fade.gotoAndStop('CollectFinished'); } b = 30; onEnterFrame = function () { Lock30(); if (b > 0) { --b; } else { if (JumpIsDown()) { onEnterFrame = Lock30; FadeItOut(_root.LevelsArray[_root.MainLevelID][0], undefined, false, false); } } }; } }; TimeTrialFrameTimer = function () { activeFrameTimer(-1); if (frameCounter == 0) { Char.removeMovieClip(); _root.slideLoop.stop(); _root.rollLoop.stop(); SnailShell.removeMovieClip(); playSound('failure'); OutPut.gotoAndStop('challengeDone'); OutPut.fade.gotoAndStop('didntFinish'); b = 30; onEnterFrame = function () { Lock30(); if (b > 0) { --b; } else { if (JumpIsDown()) { onEnterFrame = Lock30; FadeItOut(_root.LevelsArray[_root.MainLevelID][0], undefined, false, false); } } }; } }; TimeTrialWin = function () { delete _root.frameTimer; _root.Char.removeMovieClip(); _root.slideLoop.stop(); _root.rollLoop.stop(); _root.APITrackEvent('Challenge' + _root.LevelLoaded, _root.frameCounter); if (_root.frameCounter > _root['challengeScore' + _root.LevelLoaded]) { _root['challengeScore' + _root.LevelLoaded] = _root.frameCounter; _root.saveNetworkData(); } delete _root.scrollEngine; _root.timeLimitSmoke = _root.stringCounter; _root.playSound('success'); _root.OutPut.gotoAndStop('challengeDone'); _root.OutPut.fade.gotoAndStop('TimeTrialGoal'); b = 60; _root.onEnterFrame = function () { _root.Lock30(); if (b > 0) { --b; } else { if (JumpIsDown()) { _root.onEnterFrame = _root.Lock30; _root.FadeItOut(_root.LevelsArray[_root.MainLevelID][0], _root[_root.LevelsArray[_root.MainLevelID][0] + _root.LevelLoaded + 'Door0'], false, false); } } }; }; GolfFrameTimer = function () { activeFrameTimer(-1); if (frameCounter == 0) { Char.removeMovieClip(); _root.slideLoop.stop(); _root.rollLoop.stop(); SnailShell.removeMovieClip(); playSound('failure'); OutPut.gotoAndStop('challengeDone'); OutPut.fade.gotoAndStop('didntFinish'); b = 30; onEnterFrame = function () { Lock30(); if (b > 0) { --b; } else { if (JumpIsDown()) { onEnterFrame = Lock30; FadeItOut(_root.LevelsArray[_root.MainLevelID][0], undefined, false, false); } } }; } }; GolfChallengeFinish = function () { delete _root.frameTimer; APITrackEvent('Challenge' + LevelLoaded, _root.frameCounter); if (_root.frameCounter > _root['challengeScore' + _root.LevelLoaded]) { _root['challengeScore' + LevelLoaded] = frameCounter; _root.saveNetworkData(); shouldFlush = true; } delete _root.scrollEngine; _root.timeLimitSmoke = _root.stringCounter; _root.playSound('success'); _root.OutPut.gotoAndStop('challengeDone'); _root.OutPut.fade.gotoAndStop('TimeTrialGoal'); b = 60; _root.onEnterFrame = function () { _root.Lock30(); if (b > 0) { --b; } else { if (JumpIsDown()) { _root.onEnterFrame = _root.Lock30; _root.FadeItOut(_root.LevelsArray[_root.MainLevelID][0], _root[_root.LevelsArray[_root.MainLevelID][0] + _root.LevelLoaded + 'Door0'], false, false); } } }; }; ArenaWaitFrameTimer = function () { if (BLayer.Cannon.thisSpawnerArray == undefined) { baddiesTotal = BaddieArray.length; } else { baddiesTotal = BaddieArray.length + BLayer.Cannon.thisSpawnerArray.length - badPos; } frameTimer = ArenaFrameTimer; }; ArenaFrameTimer = function () { if (baddiesTotal - BaddiesStomped == 1) { timeLimitSmoke = '1 baddie left!'; } else { timeLimitSmoke = baddiesTotal - BaddiesStomped + ' baddies left!'; } }; waitForMovementTimer = function () { if (frameCounter == 1) { FadeItOut(_root.LevelsArray[_root.MainLevelID][0], undefined, false, false); } else { if (b > 0) { --b; } else { if (Char._currentframe != 1) { frameTimer = _root[LevelType + 'FrameTimer']; } } } }; nullTimer = function () { if (frameCounter == 1) { FadeItOut(_root.LevelsArray[_root.MainLevelID][0], undefined, false, false); } }; setContrast = function (mc, contrast) { var v1 = new flash.geom.ColorTransform(); var v2 = new flash.geom.Transform(mc); v1.blueMultiplier = contrast; v1.greenMultiplier = v1.blueMultiplier; v1.redMultiplier = v1.blueMultiplier; v1.blueOffset = 128 - 128 * contrast; v1.greenOffset = v1.blueOffset; v1.redOffset = v1.blueOffset; v2.colorTransform = v1; }; setBrightness = function (mc, brightness) { trace('brightness = ' + brightness); var v1 = new flash.geom.ColorTransform(); var v3 = new flash.geom.Transform(mc); v1.blueMultiplier = 1 - Math.abs(brightness); v1.greenMultiplier = v1.blueMultiplier; v1.redMultiplier = v1.blueMultiplier; v1.blueOffset = brightness > 0 ? brightness * 256 : 0; v1.greenOffset = v1.blueOffset; v1.redOffset = v1.blueOffset; v3.colorTransform = v1; }; setBounds = function () { MaxX = Math.round(-InteractLayer.MaxX._x); MinX = Math.round(-InteractLayer.MinX._x); if (MinX > MaxX) { MinX = MaxX; } MaxY = Math.round(-InteractLayer.MaxY._y); MinY = Math.round(-InteractLayer.MinY._y); if (MinY > MaxY) { MinY = MaxY; } }; spawnChar = function (eName, eDepth) { if (eName == 'Char') { isTall = 50; rotDamp = 1; } else { isTall = 30; rotDamp = 0.25; } _root.Char = charContainer.attachMovie(eName, eName, eDepth, {'moveRL': 0, 'moveUD': 0, 'Jump': 83, 'SisDown': false, 'yerdown': false, 'friction': 0.88, 'temp': false, 'thisIs': eName, 'hairRL': 0, 'hairUD': 0, 'gelHair': gelHair, 'aBadOn': -1, 'aPlatzOn': -1, 'nowSpeed': 0, 'wallPause': 0, 'wallJumped': false, 'wallJumpFell': false, 'TempStill': false, 'FloatStill': false, 'canPlatLedge': false, 'jpN': 1010, 'rpN': 5, 'RLFunc': RLFunc, 'mRL': mRL, 'mUD': mUD, 'RLx': RLx, 'RLy': RLy, 'UDx': UDx, 'UDy': UDy, 'WasSix': WasSix, 'SwimReachX': SwimReachX, 'SwimReachY': SwimReachY, 'platRL': 0, 'platUD': 0, 'spread': 10, 'RAnchx': RAnchx, 'RAnchy': RAnchy, 'LAnchx': LAnchx, 'LAnchy': LAnchy, 'JumpFunc': CharJumpFunc, 'JumpGuide': JumpGuide, 'SwimGuide': SwimGuide, 'SwimLand': SwimLand, 'isWading': false, 'WraptoGround': WraptoGround, 'crazyLander': crazyLander, 'wallToGround': wallToGround, 'HeadLand': HeadLand, 'CheckHead': CheckHead, 'Standing': Standing, 'JumpListener': JumpListener, 'CheckBaddieHit': CheckBaddieHit, 'CheckBaddieJumpHit': CheckBaddieJumpHit, 'CheckBaddiePwning': CheckBaddiePwning, 'CheckBaddieAirPwning': CheckBaddieAirPwning, 'CheckAttack': CheckAttack, 'CheckAirAttack': CheckAirAttack, 'CheckJumpPad': CheckJumpPad, 'CheckInteractHit': CheckInteractHit, 'CheckLedgeDown': CheckLedgeDown, 'LedgeDownIt': LedgeDownIt, 'Died': Died, 'LedgeIt': LedgeIt, 'LedgeLandIt': LedgeLandIt, 'HangIt': HangIt, 'zipStuff': zipStuff, 'WallIt': WallIt, 'testSpringBoard': testSpringBoard, 'BonusPlatJumpLand': BonusPlatJumpLand, 'BonusPlatFind': BonusPlatFind, 'JumpLand': JumpLand, 'CharBallTest': CharBallTest, 'JumpLandFrame': JumpLandFrame, 'predictGround': predictGround, 'StandingOnTheLedge': StandingOnTheLedge, 'EveryFrame': EveryFrame, 'rockOutCounter': 0, 'maxRL': 20, 'longJumping': false, 'wasLongJumping': false, 'canWallRun': true, 'smokeRot': 0, 'tilt': 0, 'delayRot': 0, 'fliprot': 0, 'straightToRun': false, 'alreadyLanded': false, 'jumpAgainN': 0, 'combo': 0, 'downTime': 0, 'RLFall': RLFall, 'zipJumpAgainN': 0, 'slideSounding': false, 'platOffsetUD': 0, 'firstLap': true, 'freeFallLooping': false, 'resetJumpStuff': resetJumpStuff, 'crazyWallsTests': crazyWallsTests, 'findThatLedgeTil': findThatLedgeTil, 'rotateInAirLite': rotateInAirLite, 'slopeStuff': slopeStuff, 'resetPosition': resetPosition, 'tehwallzSuperTest': tehwallzSuperTest, 'tehwallzSuperTest2': tehwallzSuperTest2, 'isTall': isTall, 'justLanded': false, 'rotDamp': rotDamp, 'TimeTrialLine': 'Z', 'isRiding': 'nothing', 'isCarrying': 'nothing', 'pencilOut': 0, 'sheathing': false, 'nextSwipe': 1, 'hitStart': 5, 'hitAccel': 0.75, 'isAttacking': false, 'fallView': 0, 'walkLock': false, 'InShellRot': 0, 'ReachX': ReachX, 'ReachY': ReachY, 'ReachXR': ReachXR, 'ReachYR': ReachYR, 'ReachXL': ReachXL, 'ReachYL': ReachYL}); _root[eName].resetJumpStuff(); _root[eName].RightIsDown = function () { return false; }; _root[eName].LeftIsDown = function () { return false; }; _root[eName].UpIsDown = function () { return false; }; _root[eName].DownIsDown = function () { return false; }; _root[eName].JumpIsDown = function () { return false; }; _root[eName].AttackIsDown = function () { return false; }; fakeRightIsDown = false; fakeLeftIsDown = false; fakeUpIsDown = false; fakeDownIsDown = false; fakeJumpIsDown = false; fakeAttackIsDown = false; replayN = 0; _root[eName].gelHair(); replayGo = function () { return null; }; }; startControls = function (keyListener) { if (KeyIsDownType) { Char.RightIsDown = function () { return Key.isDown(rootRight) && !Key.isDown(rootLeft); }; Char.LeftIsDown = function () { return !Key.isDown(rootRight) && Key.isDown(rootLeft); }; Char.UpIsDown = function () { return Key.isDown(rootUp) && !Key.isDown(rootDown); }; Char.DownIsDown = function () { return Key.isDown(rootDown) && !Key.isDown(rootUp); }; Char.JumpIsDown = function () { return Key.isDown(rootJump); }; Char.AttackIsDown = function () { return Key.isDown(rootAttack); }; } else { Char.RightIsDown = function () { return fakeRightIsDown && !fakeLeftIsDown; }; Char.LeftIsDown = function () { return !fakeRightIsDown && fakeLeftIsDown; }; Char.UpIsDown = function () { return fakeUpIsDown && !fakeDownIsDown; }; Char.DownIsDown = function () { return fakeDownIsDown && !fakeUpIsDown; }; Char.JumpIsDown = function () { return fakeJumpIsDown; }; Char.AttackIsDown = function () { return fakeAttackIsDown; }; } JumpIsDown = Char.JumpIsDown; }; ostartControls = function () { messagePopup('startControls'); Char.RightIsDown = function () { return Key.isDown(rootRight) && !Key.isDown(rootLeft); }; Char.LeftIsDown = function () { return !Key.isDown(rootRight) && Key.isDown(rootLeft); }; Char.UpIsDown = function () { return Key.isDown(rootUp) && !Key.isDown(rootDown); }; Char.DownIsDown = function () { return Key.isDown(rootDown) && !Key.isDown(rootUp); }; Char.JumpIsDown = function () { return Key.isDown(rootJump); }; Char.AttackIsDown = function () { return Key.isDown(rootAttack); }; }; replaystartControls = function () { if (!replayingStuff) { replayN = 0; replayArray = new Array(); replayGo = function () { if (mouseControl) { var v1 = -(-_x + 360 - _xmouse) / 200; if (v1 > 1.2) { v1 = 1.2; } else { if (v1 < -1.2) { v1 = -1.2; } } if (v1 > 0.2) { fakeRightIsDown = v1 - 0.2; fakeLeftIsDown = 0; replayArray[replayN] = v1 - 0.2; } else { if (v1 < -0.2) { fakeLeftIsDown = -v1 - 0.2; fakeRightIsDown = 0; replayArray[replayN] = v1 + 0.2; } else { fakeRightIsDown = 0; fakeLeftIsDown = 0; } } } else { if (fakeRightIsDown && !fakeLeftIsDown) { replayArray[replayN] = 1; } else { if (fakeLeftIsDown && !fakeRightIsDown) { replayArray[replayN] = -1; } else { replayArray[replayN] = 0; } } } if (fakeDownIsDown && !fakeUpIsDown) { replayArray[replayN + 1] = 1; } else { if (fakeUpIsDown && !fakeDownIsDown) { replayArray[replayN + 1] = -1; } else { replayArray[replayN + 1] = 0; } } if (fakeJumpIsDown) { replayArray[replayN + 2] = 1; } else { replayArray[replayN + 2] = 0; } if (fakeAttackIsDown) { replayArray[replayN + 3] = 1; } else { replayArray[replayN + 3] = 0; } replayN += 4; }; } else { replayN = 0; replayGo = function () { if (replayArray[replayN] == undefined) { playSound('PauseSound'); BackgroundMusic.setVolume(0); BackgroundVolume = 0; OutPut.attachMovie('PauseMenu', 'PauseMenu', OutPut.getNextHighestDepth()); Paused = true; OutPut.PauseMenu.toReplay = true; delete replayGo; return false; } if (mouseControl) { var v1 = replayArray[replayN]; if (v1 > 20) { fakeRightIsDown = v1; fakeLeftIsDown = 0; } else { if (v1 < -20) { fakeLeftIsDown = -v1; fakeRightIsDown = 0; } else { fakeRightIsDown = 0; fakeLeftIsDown = 0; } } } else { fakeRightIsDown = replayArray[replayN] == 1; fakeLeftIsDown = replayArray[replayN] == -1; } fakeDownIsDown = replayArray[replayN + 1] == 1; fakeUpIsDown = replayArray[replayN + 1] == -1; fakeJumpIsDown = replayArray[replayN + 2] == 1; fakeAttackIsDown = replayArray[replayN + 3] == 1; replayN += 4; }; } Char.RightIsDown = CharRightIsDown; Char.LeftIsDown = CharLeftIsDown; Char.UpIsDown = CharUpIsDown; Char.DownIsDown = CharDownIsDown; Char.JumpIsDown = CharJumpIsDown; Char.AttackIsDown = CharAttackIsDown; fakeRightIsDown = false; fakeLeftIsDown = false; fakeUpIsDown = false; fakeDownIsDown = false; fakeJumpIsDown = false; fakeAttackIsDown = false; }; keyListener = new Object(); keyListener.onKeyDown = function () { var v1 = Key.getCode(); if (v1 == rootRight) { fakeRightIsDown = true; } if (v1 == rootLeft) { fakeLeftIsDown = true; } if (v1 == rootUp) { fakeUpIsDown = true; } if (v1 == rootDown) { fakeDownIsDown = true; } if (v1 == rootJump) { fakeJumpIsDown = true; } if (v1 == rootAttack) { fakeAttackIsDown = true; } }; keyListener.onKeyUp = function () { var v1 = Key.getCode(); if (v1 == rootRight) { fakeRightIsDown = false; } if (v1 == rootLeft) { fakeLeftIsDown = false; } if (v1 == rootUp) { fakeUpIsDown = false; } if (v1 == rootDown) { fakeDownIsDown = false; } if (v1 == rootJump) { fakeJumpIsDown = false; } if (v1 == rootAttack) { fakeAttackIsDown = false; } }; Key.addListener(keyListener); jumpHold = false; grappleHold = false; CharQTPGrappleIsDown = function () { if (!mouseIsDown) { mouseHold = false; } if (Math.abs(quickRot(_xmouse - this._x, _ymouse - this._y)) < 80 && mouseIsDown) { mouseHold = true; } return mouseHold; }; CharQTPJumpIsDown = function () { if (!mouseIsDown) { mouseHold = false; } if (Math.abs(quickRot(_xmouse - this._x, _ymouse - this._y)) < 80 && mouseIsDown) { mouseHold = true; } return mouseHold; }; quickRot = function (eRL, eUD) { return -Math.atan2(-eRL, -eUD) / 0.0174532925199433; }; mouseIsFarEnough = function (eThis) { return Math.sqrt((_xmouse - eThis._x) * (_xmouse - eThis._x) + (_ymouse - eThis._y) * (_ymouse - eThis._y)) > 100; }; compressArray = function (workArray) { frames = workArray.length / 4; sortedArray = new Array(); compressedArray = new Array(); var v2 = 0; while (v2 < 4) { var v1 = 0; while (v1 < frames) { sortedArray.push(workArray[v1 * 4 + v2]); ++v1; } ++v2; } lastEntry = sortedArray[0]; compressedString = LevelLoaded + ',' + DoorLoaded + ','; replayCombo = 0; v2 = 0; while (v2 < workArray.length) { ++replayCombo; if (lastEntry == sortedArray[v2 + 1]) { } else { if (replayCombo > 1) { compressedString = compressedString + lastEntry + 'x' + replayCombo; } else { compressedString += lastEntry; } replayCombo = 0; if (sortedArray[v2 + 1] != undefined) { compressedString += ','; } } lastEntry = sortedArray[v2 + 1]; ++v2; } return compressedString; }; decompressArray = function (compressedString) { finalArray = new Array(); finalSortedArray = new Array(); compressedArray = compressedString.split(','); replayLevel = compressedArray[0]; replayDoor = compressedArray[1]; compressedArray.splice(0, 2); var v3 = 0; while (v3 < compressedArray.length) { if (compressedArray[v3].indexOf('x') == -1) { finalSortedArray.push(compressedArray[v3]); } else { ex = compressedArray[v3].indexOf('x'); tempButton = Number(compressedArray[v3].substring(0, ex)); presses = Number(compressedArray[v3].substring(ex + 1)); var v2 = 0; while (v2 < presses) { finalSortedArray.push(tempButton); ++v2; } } ++v3; } v3 = 0; while (v3 < finalSortedArray.length / 4) { var v1 = 0; while (v1 < 4) { finalArray.push(finalSortedArray[v1 * (finalSortedArray.length / 4) + v3]); ++v1; } ++v3; } return finalArray; }; PauseListener = function () { if (!Key.isDown(32)) { SpisDown = false; } if (Key.isDown(32) && !SpisDown && substring(LevelLoaded, 1, 5) != 'Menus') { playSound('PauseSound'); BackgroundMusic.setVolume(0); BackgroundVolume = 0; SpisDown = true; OutPut.attachMovie('PauseMenu', 'PauseMenu', OutPut.getNextHighestDepth()); Paused = true; onEnterFrame = function () { i = 0; while (syncHold > getTimer()) { ++i; if (i > 20000) { break; } } syncHold = getTimer() + 33; MouseHider(); if (Key.isDown(81)) { QuittoMenu(); onEnterFrame = Lock30; } if (!Key.isDown(32)) { SpisDown = false; } if (Key.isDown(32) && !SpisDown && OutPut.PauseMenu._currentframe == 6) { SpisDown = true; OutPut.PauseMenu.play(); removeMovieClip(pausedClip); BackgroundMusic.setVolume(100); BackgroundVolume = 100; playSound('unPauseSound'); } }; } }; showDebug = 100; unpausedEnterFrame = function () { trace('unpause'); onEnterInput(); MouseHider(); frameTimer(); replayGo(); gameplayMusicToggle(); baddieIndicator(); scrollEngine(); Char.CheckInteractHit(Char._x + 30 * Math.cos((Char._rotation - 90) * 0.0174532925199433), Char._y + 30 * Math.sin((Char._rotation - 90) * 0.0174532925199433), Char.moveRL, Char.moveUD, Char); if (Char._alpha != 100) { Char._alpha += 0.5; if (Char._alpha >= 85) { Char._alpha = 100; } } if (stageY * (100 / _yscale) - Char._y < MinY - 700 && Char._currentframe != 21) { Char.gotoAndStop('Die'); } }; baddieIndicator = function () { Char.viewLock = _root.lockOnBaddieCheck(Char._x, Char._y - Char.isTall / 2, 250, Char._xscale); baddie = BLayer['Baddie' + Char.viewLock]; if (Char.viewLock > -1 && baddie.worth > 0) { InteractLayer.baddieMark.bar._xscale = (baddie.health / baddie.fullHealth) * 100; if (Math.abs(baddie._x + baddie.moveRL * 10 - Char._x) > 150) { InteractLayer.baddieMark.gotoAndStop(2); } else { InteractLayer.baddieMark.gotoAndStop(1); } if (InteractLayer.baddieMark._alpha < 100) { InteractLayer.baddieMark._alpha += 20; } InteractLayer.baddieMark._x += (baddie._x - InteractLayer.baddieMark._x) / 2; InteractLayer.baddieMark._y += (baddie._y - baddie.spread * 3 - InteractLayer.baddieMark._y) / 2; } else { if (InteractLayer.baddieMark._alpha > 0) { InteractLayer.baddieMark._alpha -= 20; } } }; if (debug) { onEnterInput = function () { if (Key.isDown(79)) { levelScale -= 2; } if (Key.isDown(80) && levelScale < 200) { levelScale += 2; } if (Key.isDown(67)) { if (gameCamera == 'CharScroll') { scrollEngine = ManualScroll; gameCamera = 'ManualScroll'; } else { if (gameCamera == 'ManualScroll') { scrollEngine = CharScroll; gameCamera = 'CharScroll'; } } } if (Key.isDown(82)) { Health = 100; OutPut.HealthBar._xscale = Health; replayingStuff = false; delete _root[LevelLoaded + 'CoinGot']; SquigglesGet = 0; BaddiesStomped = 0; Squiggles = 0; onEnterFrame = Lock30; EndLevel(true); LoadLevel(LevelLoaded, DoorLoaded, false, true); } if (!Key.isDown(86)) { VisDown = false; } if (Key.isDown(86) && !VisDown) { VisDown = true; if (showDebug == 100) { RotFind._alpha = 0; testDotB._alpha = 0; testDot._alpha = 0; showDebug = 0; } else { RotFind._alpha = 100; testDotB._alpha = 100; testDot._alpha = 100; showDebug = 100; } var v2 = 0; while (v2 < popupScroll - popupFloor) { OutPut['popup' + (v2 + popupFloor)]._alpha = showDebug; ++v2; } } if (Key.isDown(49)) { EndLevel(true); LoadLevel(LevelLoaded, 'Door0', false, true); } else { if (Key.isDown(50)) { EndLevel(true); LoadLevel(LevelLoaded, 'Door1', false, true); } else { if (Key.isDown(51)) { EndLevel(true); LoadLevel(LevelLoaded, 'Door2', false, true); } else { if (Key.isDown(52)) { EndLevel(true); LoadLevel(LevelLoaded, 'Door3', false, true); } else { if (Key.isDown(53)) { EndLevel(true); LoadLevel(LevelLoaded, 'Door4', false, true); } else { if (Key.isDown(54)) { EndLevel(true); LoadLevel(LevelLoaded, 'Door5', false, true); } else { if (Key.isDown(55)) { EndLevel(true); LoadLevel(LevelLoaded, 'Door6', false, true); } else { if (Key.isDown(56)) { EndLevel(true); LoadLevel(LevelLoaded, 'Door7', false, true); } else { if (Key.isDown(57)) { EndLevel(true); LoadLevel(LevelLoaded, 'Door8', false, true); } else { if (Key.isDown(58)) { EndLevel(true); LoadLevel(LevelLoaded, 'Door9', false, true); } } } } } } } } } } }; } else { onEnterInput = function () {}; } CharXPoint = 0; CharYPoint = 0; shakeRL = 0; CharScroll = function (eScroll) { if (Char._currentframe > 35 && Char._currentframe < 45) { ScrollOffsetX = Char.nowSpeed * 15 * Math.sin(Char.eRot * 0.0174532925199433); SmoothScroller = ScrollOffsetX; SmoothScroll = SmoothScroller; ScrollOffsetY = -(Char.nowSpeed * 15) * Math.cos(Char.eRot * 0.0174532925199433) + Char.fallView; } else { if (Char.gonnaWallJump) { } else { if (eScroll != undefined) { SmoothScroller = eScroll; } else { if (Char._currentframe == 18) { SmoothScroller = Char._xscale * 0.75; } else { if (Math.abs(Char.moveRL) < 5) { if (Char.platRL * Char._xscale < 0) { SmoothScroller = Char._xscale * 1.5 + Char.platRL * 20; } else { SmoothScroller = Char._xscale * 1.5; } } else { SmoothScroller = (Char.moveRL / Math.abs(Char.moveRL)) * 150 + Char.moveRL * 2; } } } if (Math.abs(SmoothScroll - SmoothScroller) > 15) { SmoothScroll -= 15 * (SmoothScroll - SmoothScroller) / Math.abs(SmoothScroll - SmoothScroller); } else { SmoothScroll = SmoothScroller; } } if (Char._currentframe == 7) { ScrollOffsetX = SmoothScroll; ScrollOffsetY = Char.fallView - vOffset; } else { ScrollOffsetX = Char.RLx(SmoothScroll) + xRot(vOffset, Char._rotation); ScrollOffsetY = Char.RLy(SmoothScroll / 2) + Char.fallView + yRot(vOffset, Char._rotation); } } var v2 = ScrollOffsetX - SmoothScrollX; var v1 = ScrollOffsetY - SmoothScrollY; var v3 = Math.sqrt(v2 * v2 + v1 * v1); if (v3 > 15) { v2 *= 15 / v3; v1 *= 15 / v3; } SmoothScrollX += v2; SmoothScrollY += v1; smoothAgainX += (SmoothScrollX - smoothAgainX) / 12; smoothAgainY += (SmoothScrollY - smoothAgainY) / 12; SmoothCharX += (Char._x - SmoothCharX) / 6; SmoothCharY += (CharYPoint - SmoothCharY) / 6; focusScroll(SmoothCharX, smoothAgainX, SmoothCharY, smoothAgainY, -shakeRL, shakeRL); if (shakeRL == 0) { } else { if (Math.abs(shakeRL) < 0.1) { shakeRL = 0; } else { shakeRL *= -0.75; } } }; oldIndCinScroll = function () { if (shakeCamX[Math.floor(shakeCamN)] == undefined) { shakeCamN = 0; } offsetX += (shakeCamX[Math.floor(shakeCamN)] * 1 - offsetX) / 7; offsetY += (shakeCamY[Math.floor(shakeCamN)] * 1 - offsetY) / 7; var v3 = Camera2X - CameraX; var v2 = Camera2Y - CameraY; var v1 = Math.sqrt(v3 * v3 + v2 * v2); rightDist = originalRightDist / (levelScale / 100); if (v1 > rightDist * maxZoomedOut) { v1 = rightDist * maxZoomedOut; } else { if (v1 < rightDist * maxZoomedIn) { v1 = rightDist * maxZoomedIn; } } if (v1 / rightDist > 0) { offsetX *= 1 - v1 / rightDist + maxZoomedIn; offsetY *= 1 - v1 / rightDist + maxZoomedIn; } else { offsetY = 0; offsetX = 0; } levelScale += ((rightDist / v1) * 100 - levelScale) / 20; ScrollTwo(CameraX, CameraY, Camera2X, Camera2Y, offsetX, offsetY); shakeCamN += 0.2; }; IndCinScroll = function () { var v3 = Camera2X - CameraX; var v2 = Camera2Y - CameraY; var v1 = Math.sqrt(v3 * v3 + v2 * v2); if (v1 > rightDist * maxZoomedOut) { v1 = rightDist * maxZoomedOut; } else { if (v1 < rightDist * maxZoomedIn) { v1 = rightDist * maxZoomedIn; } } rightDist = originalRightDist / (levelScale / 100); if (v1 > rightDist * maxZoomedOut) { v1 = rightDist * maxZoomedOut; } else { if (v1 < rightDist * maxZoomedIn) { v1 = rightDist * maxZoomedIn; } } if (v1 / rightDist > 0) { offsetX *= 1 - v1 / rightDist + maxZoomedIn; offsetY *= 1 - v1 / rightDist + maxZoomedIn; } else { offsetY = 0; offsetX = 0; } ScrollTwo(CameraX, CameraY, Camera2X, Camera2Y, offsetX, offsetY); if ((rightDist / v1) * 100 - levelScale < 0) { levelScale += ((rightDist / v1) * 100 - levelScale) / 10; } else { levelScale += ((rightDist / v1) * 100 - levelScale) / 50; } }; CinScroll = function () { var v2 = Char._x - CameraX; var v3 = CharYPoint - CameraY; if (v2 * -camFacing > 0) { v2 *= 3; } var v1 = Math.sqrt(v2 * v2 + v3 * v3); if (v1 > originalRightDist * maxZoomedOut) { if (Math.abs(Char.moveRL) > 15) { CharScroll(); } else { if (v1 > originalRightDist * maxZoomedOut * 2) { if (cinematicScroll && Math.abs(levelScale - 100) < 0.1) { levelScale = 100; switchCameraBack(); } else { CharScroll(); } } else { if (v1 > originalRightDist * maxZoomedOut) { CharScroll((-v2 / Math.abs(v2)) * 150); } else { CharScroll(-v2 / 2); } } } Char.walkLock = false; if (Char.isCarrying == 'pencil' || Char.sheathing) { Char.maxRL = 15; } else { Char.maxRL = 20; } } else { Char.walkLock = true; Char.maxRL = 12; if (shakeCamX[Math.floor(shakeCamN)] == undefined) { shakeCamN = 0; } offsetX += (shakeCamX[Math.floor(shakeCamN)] * 2 - offsetX) / 16; offsetY += (shakeCamY[Math.floor(shakeCamN)] * 2 - offsetY) / 16; ScrollTwo(Char._x, CharYPoint, CameraX, CameraY, offsetX, offsetY, 80, true); shakeCamN += 0.5; } rightDist = originalRightDist / (levelScale / 100); if (v1 > rightDist * maxZoomedOut) { v1 = rightDist * maxZoomedOut; } else { if (v1 < rightDist * maxZoomedIn) { v1 = rightDist * maxZoomedIn; } } if (v1 / rightDist > 0) { offsetX *= 1 - v1 / rightDist + maxZoomedIn; offsetY *= 1 - v1 / rightDist + maxZoomedIn; } else { offsetY = 0; offsetX = 0; } if ((rightDist / v1) * 100 - levelScale < 0) { levelScale += ((rightDist / v1) * 100 - levelScale) / 10; } else { levelScale += ((rightDist / v1) * 100 - levelScale) / 50; } }; switchToCin = function (ex, ey, mzIn, mzOut, eDist, eBack, eFacing) { camFacing = eFacing; Char.walkLock = true; Char.maxRL = 10; CameraX = ex; camX = CameraX; CameraY = ey; camY = CameraY; maxZoomedIn = mzIn; maxZoomedOut = mzOut; switchBackDist = eBack; rightDist = eDist; originalRightDist = rightDist; cinematicScroll = true; scrollSnapBack = true; oldScrollEngine = scrollEngine; oldGameCamera = gameCamera; oldLevelScale = levelScale; scrollEngine = CinScroll; gameCamera = 'Cin'; offsetX = 0; offsetY = 0; shakeCamN = 0; }; switchCameraBack = function () { Char.walkLock = false; if (Char.isCarrying == 'pencil' || Char.sheathing) { Char.maxRL = 12; } else { Char.maxRL = 20; } cinematicScroll = false; scrollEngine = oldScrollEngine; gameCamera = oldgameCamera; }; BaddieScroll = function () { if (BLayer['Baddie' + nowBad].health > 0 && BLayer['Baddie' + nowBad].canZoom) { var v6 = BLayer['Baddie' + nowBad]._x - Char._x; var v5 = BLayer['Baddie' + nowBad]._y - Char._y; badDist = Math.sqrt(v6 * v6 + v5 * v5); } else { badDist = 1000; } var v1 = 0; while (v1 < BaddieArray.length) { i = BaddieArray[v1]; if (BLayer['Baddie' + i].canZoom && BLayer['Baddie' + i].health > 0) { var v4 = BLayer['Baddie' + i]._x - Char._x; var v3 = BLayer['Baddie' + i]._y - Char._y; var v2 = Math.sqrt(v4 * v4 + v3 * v3); if (v2 < 800) { if (v2 > badDist) { nowBad = i; } } else { if (v2 < badDist) { nowBad = i; } } } badX = BLayer['Baddie' + nowBad]._x; badY = BLayer['Baddie' + nowBad]._y; ++v1; } if (badDist > 800) { camX = badX; camY = badY; levelScale += (100 - levelScale) / 40; CharScroll(); if (scrollSnapBack) { if (levelScale > 98) { switchCameraBack(); } } } else { SmoothScroll = (camDistX / Math.abs(camDistX)) * 150; ScrollTwo(Char._x, CharYPoint, badX, badY, 0, 0); } }; CharAndShellScroll = function () { if (SnailShell != undefined) { if (Char._currentframe == 7) { CharX = Char._x + Char.moveRL * 2; CharY = CharYPoint; } else { CharX = Char._x + Char.moveRL * 2; CharY = CharYPoint; } ShellOffsetX = SnailShell.moveRL * 2; ShellOffsetY = SnailShell.moveUD * 2; var v3 = ShellOffsetX - ShellSmoothOffsetX; var v2 = ShellOffsetY - ShellSmoothOffsetY; var v4 = Math.sqrt(v3 * v3 + v2 * v2); if (v4 > 5) { v3 *= 5 / v4; v2 *= 5 / v4; ShellSmoothOffsetX += v3; ShellSmoothOffsetY += v2; } camDistX = SnailShell.centerX + ShellSmoothOffsetX - CharX; camDistY = SnailShell.centerY + ShellSmoothOffsetY - CharY; var v1 = Math.sqrt(camDistX * camDistX + camDistY * 1.5 * (camDistY * 1.5)); rightDist = originalRightDist / (levelScale / 100); if (v1 > rightDist * maxZoomedOut) { camDistX *= rightDist * maxZoomedOut / v1; camDistY *= rightDist * maxZoomedOut / v1; v1 = rightDist * maxZoomedOut; } else { if (v1 < rightDist * maxZoomedIn) { v1 = rightDist * maxZoomedIn; } } if ((rightDist / v1) * 100 - levelScale < 0) { levelScale += ((rightDist / v1) * 100 - levelScale) / 10; } else { levelScale += ((rightDist / v1) * 100 - levelScale) / 50; } smoothAgainX += (camDistX / 2 - smoothAgainX) / 8; smoothAgainY += (camDistY / 2 - smoothAgainY) / 8; SmoothCharX += (CharX + smoothAgainX - SmoothCharX) / 12; vRatio += (1 - Math.abs(camDistY * 1.5 / rightDist * maxZoomedOut) - vRatio) / 10; SmoothCharY += (CharY + smoothAgainY - vOffset * vRatio - SmoothCharY) / 12; focusScroll(SmoothCharX, 0, SmoothCharY, 0, -shakeRL, shakeRL); if (shakeRL == 0) { } else { if (Math.abs(shakeRL) < 0.1) { shakeRL = 0; } else { shakeRL *= -0.75; } } } }; MiddleScroll = function () { CharScroll(0); }; ScrollTwo = function (ex, ey, ex2, ey2, offsetX, offsetY) { camDistX = ex2 - ex; camDistY = ey2 - ey; ScrollOffsetX = camDistX / 2; ScrollOffsetY = camDistY / 2 - vOffset * (levelScale / 100); var v2 = ScrollOffsetX - SmoothScrollX; var v1 = ScrollOffsetY - SmoothScrollY; var v3 = Math.sqrt(v2 * v2 + v1 * v1); if (v3 > 15) { v2 *= 15 / v3; v1 *= 15 / v3; } SmoothScrollX += v2; SmoothScrollY += v1; smoothAgainX += (SmoothScrollX - smoothAgainX) / 12; smoothAgainY += (SmoothScrollY - smoothAgainY) / 12; SmoothCharX += (ex - SmoothCharX) / 6; SmoothCharY += (ey - SmoothCharY) / 6; focusScroll(SmoothCharX, smoothAgainX + offsetX, SmoothCharY, smoothAgainY + offsetY, -shakeRL, shakeRL); shakeRL *= -0.75; }; ShellScroll = function () { if (SnailShell.centerX != undefined) { SmoothCharX += (SnailShell.centerX - SmoothCharX) / 3; SmoothCharY += (SnailShell.centerY - SmoothCharY) / 3; focusScroll(-(SmoothCharX + SmoothRL), -(SmoothCharY + SmoothUD), 0, 0); } else { CharScroll(); } }; ManualScroll = function () { if (Key.isDown(73)) { SmoothUD = -25; } else { if (Key.isDown(75)) { SmoothUD = 25; } else { SmoothUD = 0; } } if (Key.isDown(74)) { SmoothRL = -25; } else { if (Key.isDown(76)) { SmoothRL = 25; } else { SmoothRL = 0; } } SmoothCharX += SmoothRL; SmoothCharY += SmoothUD; focusScroll(-SmoothCharX, -SmoothCharY, 0, 0); }; shakeCamX = [13.7, 9.85, 6.15, 2.35, -1.25, 0.2, 1.6, 3.05, 4.45, 5.85, 7.2, 8.6, 6.6, 6.35, 4.5, 2.7, 0.85, -0.9, -2.8, -4.6, -6.25, -7.9, -9.5, -7.95, -6.4, -4.85, -1.85, -0.4, 1, 2.45, 0.8, -0.75, -2.4, -4, -4.05, -2.5, -1.05, -1.05, -2.55, -4.05, -4.1, -4.2, -2.7, -1.3, -1.3, -2.8, -4.25, -4.2, -4.1, -1.1, 0.3, 1.8, 1.75, -1.1, -3.9, -5.2, -6.5, -4.9, -3.35, -1.7, -0.3, -0.2, -0.1, -2.8, -2.65, 0.35, 1.8, 3.25, 4.65, 4.7, 3.35, 2, 0.8, -0.45, -1.65, -2.75, -3.85, -3.55, -3.25, -5.6, -3.95, -2.3, -2.05, -4.4, -4, -2.3, -0.55, 1, 2.6, 4.1, 5.6, 4.45, 2.1, 1.15, 0.3, -0.55, -0.1, 0.2, -0.55, -1.3, -2.05, -0.2, -0.9, -1.55, 0.3, -0.3, 0.3, 2.2, 2.8, 2.15, 0.4, 0.05, -0.15, -0.25, -0.15]; shakeCamY = [5.65, 6.55, 7.35, 6.05, 7.4, 6.3, 4.2, 5.1, 4.05, 5.3, 9.6, 6.85, 8.15, 7.8, 8.1, 9.4, 8.35, 6.45, 8.449999999999999, 6.6, 4.75, 6.1, 7.5, 5.7, 3.9, 2.25, 5.3, 6.7, 5, 3.3, 1.55, 0, -1.5, -3, -6.05, -7.45, -8.800000000000001, -10.2, -11.55, -11.3, -12.5, -13.75, -13.35, -13.05, -11.25, -10.85, -10.55, -8.75, -5.6, -3.9, -2.2, -3.45, -4.7, -7.25, -9.75, -10.8, -11.8, -12.7, -13.65, -14.55, -15.45, -16.25, -17, -19.15, -19.8, -19, -18.25, -16.05, -12.6, -10.6, -8.550000000000001, -6.55, -4.6, -1.3, -0.8, -0.25, -2.4, -3.1, -3.85, -5.75, -6.3, -6.9, -7.35, -9.050000000000001, -9.449999999999999, -9.75, -8.699999999999999, -7.55, -9.15, -9.35, -9.4, -8.35, -8.4, -8.4, -8.4, -8.300000000000001, -8.15, -9.25, -8.949999999999999, -8.6, -8.199999999999999, -7.7, -8.35, -7.65, -7, -6.25, -5.4, -4.6, -2.35, -0.15, 2, 3.05, 4.15, 6.5, 7.8]; CharQTPScroll = function () { if (Math.abs(eScale - levelScale) > 0.1) { eScale += (levelScale - eScale) / 10; _yscale = eScale; _xscale = eScale; UBGstatic._yscale = (100 / eScale) * 100; OutPut._yscale = UBGstatic._yscale; UBGstatic._xscale = UBGstatic._yscale; OutPut._xscale = UBGstatic._yscale; BGScroll._yscale = (100 / eScale) * 100; BGScroll._xscale = BGScroll._yscale; } SmoothCharX = -((_xmouse + CharQTP._x * 3) / 4); SmoothCharY = -((_ymouse + CharQTP._y * 3) / 4); focusScroll(SmoothCharX, SmoothCharY, -CharQTP._x, -CharQTP._y); }; CameraBothScroll = function () { ScrollTwo(CameraFollow1._x, CameraFollow1._y, CameraFollow2._x, CameraFollow2._y, 0, 0, 10, false); return false; SmoothCharX = -((Char._x + cameraFollow2._x) / 2); SmoothCharY = -((Char._y - 50 + (cameraFollow2._y - 50)) / 2); var v2 = Math.abs(cameraFollow2._x - Char._x); var v1 = Math.abs(cameraFollow2._y - Char._y) * 1.5; if (v2 > v1) { nowDist = v2 * 0.3; } else { nowDist = v1 * 0.3; } if (nowDist > rightDist * 1.5) { v2 = cameraFollow2._x - Char._x; v1 = cameraFollow2._y - Char._y; var v3 = Math.sqrt(v2 * v2 + v1 * v1); v2 *= rightDist * 2 * 1.25 / v3; v1 *= rightDist * 2 * 1.25 / v3; SmoothCharX = -(Char._x + v2); SmoothCharY = -(Char._y + v1); nowDist = rightDist * 1.5; } else { if (nowDist > rightDist) { } else { nowDist = rightDist; } } eScale += ((rightDist / nowDist) * 100 - eScale) / 5; _yscale = eScale; _xscale = eScale; UBGstatic._yscale = (100 / eScale) * 100; OutPut._yscale = UBGstatic._yscale; UBGstatic._xscale = UBGstatic._yscale; OutPut._xscale = UBGstatic._yscale; BGScroll._yscale = (100 / eScale) * 100; BGScroll._xscale = BGScroll._yscale; focusScroll(SmoothCharX, SmoothCharY, -((Char._x + cameraFollow2._x) / 2), -((Char._y - 50 + (cameraFollow2._y - 50)) / 2)); }; setCharScroll = function (ex) { SmoothScroll = ex; SmoothScrollX = Char.RLx(SmoothScroll); smoothAgainX = SmoothScrollX; SmoothScrollY = Char.RLy(SmoothScroll) - vOffset; smoothAgainY = SmoothScrollY; SmoothCharX = Char._x; SmoothCharY = Char._y; CharYPoint = Char._y; focusScroll(SmoothCharX, smoothAgainX, SmoothCharY, smoothAgainY, -shakeRL, shakeRL); }; setCinScroll = function () { setCharScroll(0); }; setIndCinScroll = function () { setCharScroll(0); }; setScrollTwo = function (ex, ey, ex2, ey2, offsetX, offsetY) { camDistX = ex2 - ex; camDistY = ey2 - ey; ScrollOffsetX = camDistX / 2; SmoothScrollX = ScrollOffsetX; smoothAgainX = SmoothScrollX; ScrollOffsetY = camDistY / 2 - vOffset; SmoothScrollY = ScrollOffsetY; smoothAgainY = SmoothScrollY; SmoothCharX = ex; SmoothCharY = ey; focusScroll(SmoothCharX, smoothAgainX, SmoothCharY, smoothAgainY, -shakeRL, shakeRL); }; focusScroll = function (xFocus, offX, yFocus, offY, shakeX, shakeY) { smoothTheX = -(xFocus + offX * 100 / levelScale) + (stageX / 2) * (100 / levelScale); if (smoothTheX > MaxX) { smoothTheX = MaxX; } else { if (smoothTheX < MinX + stageX * (100 / levelScale)) { smoothTheX = MinX + stageX * (100 / levelScale); } } theX = smoothTheX * (levelScale / 100) + shakeX; smoothTheY = -(yFocus + offY * 100 / levelScale) + (stageY / 2) * (100 / levelScale); if (smoothTheY > MaxY) { smoothTheY = MaxY; } else { if (smoothTheY < MinY + stageY * (100 / levelScale)) { smoothTheY = MinY + stageY * (100 / levelScale); } } theY = smoothTheY * (levelScale / 100) + shakeY; ScrollEverything(); }; ScrollEverything = function () { if (eScale != levelScale) { tempScale = -(100 / (levelScale / 100) - 100 - 100) - 100 + 100; cameraZ = tempScale - 100 + 100; eScale = levelScale; charContainer._xscale = eScale; levelContainer._xscale = charContainer._xscale; levelShell._xscale = charContainer._xscale; ELayer._xscale = charContainer._xscale; foregroundContainer._xscale = charContainer._xscale; charContainer._yscale = eScale; levelContainer._yscale = charContainer._yscale; levelShell._yscale = charContainer._yscale; ELayer._yscale = charContainer._yscale; foregroundContainer._yscale = charContainer._yscale; var v2 = 1; while (v2 < totalBackgrounds + 1) { z = _root['BGScroll' + v2].z * 200 + 100 - cameraZ; _root['BGScroll' + v2].ratio = 100 / (100 + z); _root['BGScroll' + v2]._xscale = 100 * _root['BGScroll' + v2].ratio / backgroundRatios[v2 - 1]; _root['BGScroll' + v2]._yscale = 100 * _root['BGScroll' + v2].ratio / backgroundRatios[v2 - 1]; ++v2; } } v2 = 1; while (v2 < totalBackgrounds + 1) { _root['BGScroll' + v2]._x = ((smoothTheX - firstMaxX) * _root['BGScroll' + v2]._xscale / 100) * backgroundRatios[v2 - 1] - theX; _root['BGScroll' + v2]._y = ((smoothTheY - firstMaxY) * _root['BGScroll' + v2]._yscale / 100) * backgroundRatios[v2 - 1] - theY; ++v2; } OutPut._x = -theX; UBGstatic._x = OutPut._x; OutPut._y = -theY; UBGstatic._y = OutPut._y; _x = theX; _y = theY; }; Lock30 = function () { i = 0; while (syncHold > getTimer()) { ++i; if (i > 2000000) { break; } } if (Key.isDown(16)) { syncHold = getTimer() + 330; } else { if (Key.isDown(70)) { syncHold = getTimer(); } else { syncHold = getTimer() + 33; } } }; gameplayMusicToggle = function () { if (!Key.isDown(77)) { MisDown = false; } if (Key.isDown(77) && !MisDown) { MisDown = true; if (isMute) { isMute = false; saveNetworkData(); loadMusic(LevelLoaded, DoorLoaded); BackgroundMusic.setVolume(100); BackgroundVolume = 100; } else { isMute = true; saveNetworkData(); soundIs = 'mute'; BackgroundMusic.stop(); } } }; gameplayBackgroundToggle = function () { if (!Key.isDown(66)) { BisDown = false; } if (Key.isDown(66) && !BisDown) { BisDown = true; if (isScroll) { BGScrollOffsetX = BGScroll._x + theX; BGScrollOffsetY = BGScroll._y + theY; isScroll = false; saveNetworkData(); } else { isScroll = true; saveNetworkData(); } } }; gameplayToggleTimerDisplayed = function () { if (!Key.isDown(84)) { TisDown = false; } if (Key.isDown(84) && !TisDown) { if (isTimed) { if (timerDisplayed) { OutPut.tickerShell._alpha = 0; timerDisplayed = false; saveNetworkData(); } else { OutPut.tickerShell._alpha = 100; timerDisplayed = true; saveNetworkData(); } } TisDown = true; } }; gameplaySmokeToggle = function () { if (!Key.isDown(16)) { ShisDown = false; } if (Key.isDown(16) && !ShisDown) { ShisDown = true; if (tehground._alpha == 0) { tehground._alpha = 100; tehwallz._alpha = 100; tehplatformz._alpha = 100; surface._alpha = 100; tehhangz._alpha = 100; } else { tehground._alpha = 0; tehwallz._alpha = 0; tehplatformz._alpha = 0; surface._alpha = 0; tehhangz._alpha = 0; } } }; onMouseDown = function () { if (OutPut.MouseMenu == undefined) { OutPut.attachMovie('MouseMenu', 'MouseMenu', OutPut.getNextHighestDepth(), {'_alpha': 0}); } HideThatMouse = 40; Mouse.show(); }; onMouseMove = function () { if (OutPut.MouseMenu == undefined) { OutPut.attachMovie('MouseMenu', 'MouseMenu', OutPut.getNextHighestDepth(), {'_alpha': 0}); } HideThatMouse = 40; Mouse.show(); }; HideThatMouse = 40; MouseHider = function () { if (HideThatMouse > 0) { --HideThatMouse; } if (HideThatMouse == 0) { Mouse.hide(); HideThatMouse = -1; } }; killFadeOut = function () { removeMovieClip(OutPut.FadeOut); }; FadeItOut = function (LoadIt, DoorIt, startTimer, quickFade) { OutPut.attachMovie('FadeOut', 'FadeOut', OutPut.getNextHighestDepth(), {'worm': LoadIt, 'wormDoor': DoorIt, 'startTimer': startTimer, 'softReset': softReset, 'quickFade': quickFade}); if (guster > 30) { while (!false) { } } }; ChangeLevel = function (LoadIt, DoorIt, startTimer, quickFade) { _root.slideLoop.stop(); _root.rollLoop.stop(); if (SquigglesGet > 0) { APITrackEvent('SquigglesGet', SquigglesGet); SquigglesGet = 0; SquigglesGetYourMom = 37; } if (BaddiesStomped > 0) { APITrackEvent('BaddiesStomped', BaddiesStomped); BaddiesStomped = 0; BaddiesStompedInFace = 42; } if (LevelPower == 1 && getLevelType(LevelLoaded) != 'nothing') { onEnterFrame = Lock30; frameCounter = 1; frameTimer(); } else { FadeItOut(LoadIt, DoorIt, startTimer, quickFade); } }; EndLevel = function (softReset) { if (softReset == undefined) { softReset = false; } removeMovieClip(Char); removeMovieClip(UberForeground); removeMovieClip(tehground); removeMovieClip(tehwallz); removeMovieClip(tehhangz); removeMovieClip(tehplatformz); removeMovieClip(aPlatz); removeMovieClip(surface); removeMovieClip(PlatzSmoke); removeMovieClip(BLayer); removeMovieClip(ELayer); removeMovieClip(WLayer); removeMovieClip(InteractLayer); delete SnailShell; removeMovieClip(water); if (signBubbleShell != undefined) { removeMovieClip(signBubbleShell); } if (OutPut.PauseMenu != undefined) { removeMovieClip(OutPut.PauseMenu); } if (!softReset) { removeMovieClip(UBGstatic); if (!isLevelExternal[LevelLoaded]) { removeMovieClip(foregroundContainer); removeMovieClip(levelContainer); } removeMovieClip(levelShell); var v2 = 1; while (v2 < totalBackgrounds + 1) { removeMovieClip(_root['BGScroll' + v2]); ++v2; } } }; SuperRemoveMovie = function (eThis) { removeMovieClip(eThis); }; ColorEmPants = function (ColorEm, eName, old) { var v2 = new Color(eName); ColorThosePants = new Object(); if (old) { ColorThosePants.ra = PantsPallet[ColorEm][0]; ColorThosePants.ga = PantsPallet[ColorEm][1]; ColorThosePants.ba = PantsPallet[ColorEm][2]; } else { ColorThosePants.ra = newPantsPallet[ColorEm][0]; ColorThosePants.ga = newPantsPallet[ColorEm][1]; ColorThosePants.ba = newPantsPallet[ColorEm][2]; } v2.setTransform(ColorThosePants); }; PantsPallet = [[100, 60, 0], [0, 90, 0], [100, 20, 20], [0, 30, 100], [0, 60, 60], [60, 0, 100], [100, 100, 0], [0, 90, 100], [100, 50, 50], [15, 15, 15]]; newPantsPallet = [[100, 60, 0], [0, 90, 0], [100, 20, 20], [0, 30, 100], [0, 40, 60], [0, 0, 0], [35, 0, 60], [0, 40, 0], [100, 0, 100], [20, 20, 20], [65, 35, 0], [80, 80, 80], [80, 80, 0]]; SkigPop = function (ex, ey, eRL, eUD) { attachMovie('SquiggleJump', 'SquiggleJump', getNextHighestDepth(), {'_x': ex, '_y': ey, 'moveRL': eRL, 'moveUD': -eUD / 2}); }; QuittoMenu = function () { var v2 = 1; while (v2 < 50) { delete _root['Bonus' + v2 + 'CoinGot']; ++v2; } v2 = 1; while (v2 < 50) { delete _root['Level' + v2 + 'CoinGot']; delete _root['Level' + v2 + 'TTGot']; ++v2; } v2 = 1; while (v2 < 50) { delete _root['Trans' + v2 + 'CoinGot']; ++v2; } Squiggles = 0; brad; BaddiesStompedSession = 0; Lives = 3; LivesUnderground = 98; Health = 100; isTimed = false; frameTimer = function () { null; }; ChangeLevel('Menus2', undefined, false, false); APIEndLevel(substring(LevelLoaded, 6, 1)); APIEndGame(); }; getMusic = function (LoadIt, DoorIt) { if (isMute || LoadIt == 'Trans10' || LoadIt == 'Bonus8' || LoadIt == 'Menus3') { return 'mute'; } else { if (LoadIt == 'MiniTrial') { return 'MiniTrial'; } else { if (LoadIt == 'Level4' || LoadIt == 'Bonus2') { return 'Squiggleville'; } else { if (LoadIt == 'Trans1' || LoadIt == 'Level18' && DoorIt == 'Door2') { return 'Cinematic'; } else { if (LoadIt == 'Level8') { if (DoorIt == 'Door0') { return 'Majesty'; } else { return 'mute'; } } else { if (LoadIt == 'Level1') { return 'NewOuter'; } else { if (LoadIt == 'Level9') { return 'Forest'; } else { if (LoadIt == 'Level11') { return 'Beach'; } else { if (LoadIt == 'Level14') { return 'Adventuring'; } else { if (LoadIt == 'Level7' || LoadIt == 'Trans6' || LoadIt == 'Trans7' || LoadIt == 'Bonus20') { return 'Caverns'; } else { if (LoadIt == 'Level10' || LoadIt == 'Bonus9') { return 'SunkenTower'; } else { if (LoadIt == 'Bonus10') { if (_root.challengeScoreBonus7 > _root.challengeGoalBonus7 && _root.challengeScoreBonus11 > _root.challengeGoalBonus11 && _root.challengeScoreBonus12 > _root.challengeGoalBonus12) { return 'PirateDisco'; } else { return 'mute'; } } else { if (LoadIt == 'Trans13' || LoadIt == 'Trans14' || LoadIt == 'Trans15') { return 'Island'; } else { if (LoadIt == 'Bonus25' || LoadIt == 'Bonus15') { return 'CaveLol'; } else { if (LoadIt == 'BossFight' || LoadIt == 'Trans2' || LoadIt == 'Level17') { return 'BossFight'; } else { if (LoadIt == 'Trans11') { return 'TommyCaveBSide'; } else { if (LoadIt == 'Bonus4') { return 'Tricks'; } else { if (LoadIt == 'Bonus18' || LoadIt == 'Bonus24') { return 'Race'; } else { if (LoadIt == 'Bonus17') { return 'Challenge3'; } else { if (LoadIt == 'Bonus21' || LoadIt == 'Bonus22') { return 'Challenge4'; } else { if (substring(LoadIt, 1, 5) == 'Trans' && LoadIt != 'Trans8' && LoadIt != 'Trans9' || LoadIt == 'Menus1' || LoadIt == 'Menus2' || LoadIt == 'Menus4') { return 'Transitional'; } else { return 'PirateShip'; } } } } } } } } } } } } } } } } } } } } } }; SpawnPencilSwing = function (ex, ey) { if (UberForeground.PencilShell != undefined) { UberForeground.PencilShell.removeMovieClip(UberForeground.PencilShell); } UberForeground.attachMovie('PencilShell', 'PencilShell', UberForeground.getNextHighestDepth(), {'_x': ex, '_y': ey, 'moveUD': -10}); }; FarTimes = 0; activeFrameTimer = function (eCount) { frameCounter += eCount; frameCounterAndBeyond += eCount * 12; secondCounter = Math.round((frameCounter / 30) * 100) / 100; stringCounter = secondCounter.toString(); stringLength = stringCounter.indexOf('.'); if (stringLength < 0) { stringCounter += '.00'; } else { if (length(stringCounter) < stringLength + 3) { stringCounter += '0'; } } timeLimitSmoke = stringCounter; }; checkBestestTime = function () { if (secondCounter < bestestTime || bestestTime == 0) { bestestTime = secondCounter; saveNetworkData(); shouldFlush = true; APIBestTime(bestestTime); bestestTimeString = bestestTime.toString(); stringLength = bestestTimeString.indexOf('.'); if (stringLength < 0) { bestestTimeString += '.00'; } else { if (length(bestestTimeString) < stringLength + 3) { bestestTimeString += '0'; } } } }; popupScroll = 0; popupFloor = 0; if (debug) { messagePopup = function (smoke) { trace(smoke); if (OutPut['popup' + (popupScroll - 1)].oSmoke == smoke) { ++OutPut['popup' + (popupScroll - 1)].combo; OutPut['popup' + (popupScroll - 1)].smoke = smoke + ' x' + OutPut['popup' + (popupScroll - 1)].combo; } else { OutPut.attachMovie('messagePopupStatic', 'popup' + popupScroll, OutPut.getNextHighestDepth(), {'_x': 710, '_y': 50 + (popupScroll - popupFloor) * 15, 'oSmoke': smoke, 'smoke': smoke, 'ID': popupScroll, '_alpha': showDebug, 'combo': 1}); ++popupScroll; if (popupScroll - popupFloor > 24) { reorderFloor(popupFloor + 1); } } }; } else { messagePopup = function (smoke) { return null; }; } popUpInGame = function (ePop, whichMessage, etrigger, fromChar) { messagePopup(whichMessage); if (fromChar == undefined) { fromChar = etrigger; } if (InteractLayer['textBubble' + ePop] != undefined) { InteractLayer['textBubble' + ePop].textBubble.gotoAndStop(1); InteractLayer['textBubble' + ePop]._alpha = 100; InteractLayer['textBubble' + ePop].etrigger = etrigger; InteractLayer['textBubble' + ePop].textBubble.gotoAndStop(2); InteractLayer['textBubble' + ePop].textBubble.textTween.gotoAndStop(whichMessage); InteractLayer['textBubble' + ePop].fromChar = fromChar; _root.playSound('PageContinue', etrigger._x, 100); } }; wonPants = function () { if (canChangePants) { isColor = MainLevelID + 4; ColorEmPants(isColor, Char); ColorEmPants(isColor, OutPut.counterLives); playSound('oldTrophyGet'); saveNetworkData(); } }; reorderFloor = function (ID) { popupFloor = ID; removeMovieClip(OutPut['popup' + ID]); var v1 = 0; while (v1 < popupScroll - popupFloor) { OutPut['popup' + (v1 + popupFloor)]._y = 50 + v1 * 15; ++v1; } }; popupBottle = function (eThis) { if (ELayer.bottlePopup == undefined) { var v2 = ELayer.getNextHighestDepth(); ELayer.attachMovie('bottlePopup', 'bottlePopup', v2, {'_x': eThis._x, '_y': eThis._y, '_alpha': 0}); ELayer.bottlePopup.onEnterFrame = function () { if (this._alpha < 100) { this._alpha += 10; } else { delete this.onEnterFrame; } }; ELayer.bottlePopup.gotoAndStop(MainLevelID); } }; movePerformedBonus = function (didThat, howHard, baddie) { messagePopup('didThat = ' + didThat); if (howHard == undefined) { howHard = 1; } canDoThis = true; if (baddie == undefined) { if (didThatLast != didThat) { if (_root[didThat + 'Smoke'] == undefined) { return false; } comboMultiplier += 0.5; moveArray.push(_root[didThat + 'Smoke']); gNHD = OutPut.getNextHighestDepth(); popupArray.push(_root[didThat + 'Smoke']); comboTimerMax -= comboTimerMax / 30; if (moveArray.length == 1) { moveArrayString = _root[didThat + 'Smoke']; } else { if (moveArray.length > 10) { moveArrayString = '...'; var v2 = moveArray.length - 10; while (v2 < moveArray.length) { moveArrayString += ' + ' + moveArray[v2]; ++v2; } } else { moveArrayString = moveArrayString + ' + ' + _root[didThat + 'Smoke']; } } if (didThatLast != 'done') { _root[didThatLast + 'HoldValue'] -= _root[didThatLast + 'HoldValue'] / 5; } _root[didThat + 'MoveValue'] -= _root[didThat + 'MoveValue'] / 5; didThatLast = didThat; moveComboScore += _root[didThat + 'MoveValue']; } else { moveComboScore += _root[didThat + 'HoldValue'] * howHard; } if (comboMultiplier == 1) { moveComboScoreSmoke = Math.round(moveComboScore); } else { moveComboScoreSmoke = Math.round(moveComboScore) + ' x ' + comboMultiplier; } comboTimer = comboTimerMax; OutPut.ComboTimerShell._alpha = 100; updateComboTimer(); } else { comboMultiplier += 0.5; moveArray.push(baddie + ' ' + _root[didThat + 'Smoke']); moveComboScore += _root[didThat + 'MoveValue'] * howHard; if (moveArray.length == 1) { moveArrayString = baddie + ' ' + _root[didThat + 'Smoke']; } else { if (moveArray.length > 10) { moveArrayString = '...'; var v2 = moveArray.length - 10; while (v2 < moveArray.length) { moveArrayString += ' + ' + moveArray[v2]; ++v2; } } else { moveArrayString = moveArrayString + ' + ' + baddie + ' ' + _root[didThat + 'Smoke']; } } gNHD = OutPut.getNextHighestDepth(); OutPut.attachMovie('messagePopup', 'combo!' + gNHD, gNHD, {'_x': 630, '_y': 450, 'smoke': baddie + ' ' + _root[didThat + 'Smoke'] + '!'}); if (comboMultiplier == 1) { moveComboScoreSmoke = Math.round(moveComboScore); } else { moveComboScoreSmoke = Math.round(moveComboScore) + ' x ' + comboMultiplier; } comboTimer = comboTimerMax; OutPut.ComboTimerShell._alpha = 100; updateComboTimer(); messagePopup(baddie + ' ' + didThat); } if (_root[didThat + 'HoldValue'] == undefined) { didThatLast = 'done'; } }; updateComboTimer = function () { if (comboTimer < -50) { } else { if (comboTimer <= 0) { moveComboScoreSmoke = Math.round(moveComboScore * comboMultiplier); Score += moveComboScoreSmoke; moveComboScore = 0; comboMultiplier = 0.5; delete moveArray; moveArray = new Array(); delete moveArrayString; moveArrayString = new String(); comboTimer = -100; comboTimerMax = 120; ScoreString = Score.toString(); while (length(ScoreString) < 7) { ScoreString = '0' + ScoreString; } if (Score >= _root['challengeGoal' + LevelLoaded] && Score > 0) { if (InteractLayer.Door0.storyScoreBadge) { InteractLayer.Door0.checkBox.gotoAndStop(2); } if (InteractLayer.Door1.storyScoreBadge) { InteractLayer.Door1.checkBox.gotoAndStop(2); } } } else { if (comboTimer > 0) { if (comboTimer == comboTimerMax - 2) { if (_root[didThatLast + 'HoldValue'] != undefined) { messagePopup('easyDegrade = ' + didThatLast + ': ' + _root[didThatLast + 'HoldValue']); _root[didThatLast + 'HoldValue'] -= _root[didThatLast + 'HoldValue'] / 5; } didThatLast = 'done'; } var v2 = Score + Math.round(moveComboScore * comboMultiplier); ScoreString = v2.toString(); while (length(ScoreString) < 7) { ScoreString = '0' + ScoreString; } OutPut.ComboTimerShell.ComboBar._xscale = (comboTimer / comboTimerMax) * 100; --comboTimer; } } } }; notSoRandom = function (i) { if (notSoRandomN == 100) { notSoRandomN = 0; } var v1 = Math.floor(i * [0.343, 0.733, 0.012, 0.702, 0.247, 0.506, 0.494, 0.815, 0.02, 0.328, 0.256, 0.8080000000000001, 0.253, 0.275, 0.035, 0.504, 0.127, 0.877, 0.6770000000000001, 0.276, 0.77, 0.117, 0.022, 0.939, 0.01, 0.718, 0.632, 0.642, 0.714, 0.648, 0.265, 0.172, 0.016, 0.213, 0.87, 0.219, 0.6820000000000001, 0.9330000000000001, 0.219, 0.145, 0.593, 0.225, 0.27, 0.511, 0.261, 0.152, 0.2, 0.967, 0.877, 0.923, 0.246, 0.587, 0.583, 0.285, 0.325, 0.983, 0.208, 0.421, 0.523, 0.99, 0.524, 0.515, 0.362, 0.597, 0.38, 0.295, 0.622, 0.185, 0.826, 0.155, 0.527, 0.358, 0.9360000000000001, 0.21, 0.996, 0.815, 0.186, 0.395, 0.9330000000000001, 0.983, 0.293, 0.61, 0.297, 0.14, 0.331, 0.746, 0.87, 0.11, 0.158, 0.449, 0.397, 0.339, 0.775, 0.371, 0.784, 0.955, 0.418, 0.08, 0.142, 0.364][notSoRandomN]); ++notSoRandomN; return v1; }; resetMoveValues = function () { backflipMoveValue = 150; backflipHoldValue = 10; dbackflipMoveValue = 175; dbackflipHoldValue = 20; matrixflipMoveValue = 500; matrixflipHoldValue = 50; wallflipMoveValue = 200; wallflipHoldValue = 30; slideMoveValue = 100; slideHoldValue = 0.2; slideboostMoveValue = 120; walljumpMoveValue = 500; wallslideMoveValue = 150; wallslideHoldValue = 0.8; wallslidefrontMoveValue = 130; wallslidefrontHoldValue = 0.6; ledgegrabMoveValue = 550; frontslideMoveValue = 130; frontslideHoldValue = 0.5; rollMoveValue = 140; rollHoldValue = 0.6; diveMoveValue = 300; diveHoldValue = 15; ledgehopMoveValue = 200; torpedoMoveValue = 200; torpedoHoldValue = 1; pushOffMoveValue = 250; canonballMoveValue = 220; canonballHoldValue = 7; slidingledgegrabMoveValue = 600; springpadMoveValue = 800; superjumpMoveValue = 250; superjumpHoldValue = 12; wallrunMoveValue = 150; wallrunHoldValue = 1; tapMoveValue = 50; wallflipMoveValue = 50; slideMoveValue = 75; headbuttMoveValue = 100; landstompMoveValue = 60; kickMoveValue = 750; pwnedMoveValue = 70; superpwnedMoveValue = 500; quickstompMoveValue = 1000; heavystompMoveValue = 1500; slashHighMoveValue = 200; slashLowMoveValue = 200; jabMoveValue = 50; }; backflipSmoke = 'Backflip'; dbackflipSmoke = 'Double Backflip'; matrixflipSmoke = 'Matrix Flip'; wallflipSmoke = 'Wall Flip'; slideSmoke = 'Slide'; slideboostSmoke = 'Slide Boost'; frontslideSmoke = 'Down Slide'; quickstompSmoke = 'Quick Stomp'; heavystompSmoke = 'Heavy Stomp'; walljumpSmoke = 'Wall Jump'; rollSmoke = 'Roll'; ledgehopSmoke = 'Ledge Hop'; diveSmoke = 'Dive'; torpedoSmoke = 'Torpedo'; canonballSmoke = 'Canonball'; pushOffSmoke = 'Underwater Pushoff'; wallslideSmoke = 'Back Slide'; wallslidefrontSmoke = 'Wall Slide'; ledgegrabSmoke = 'Ledge Grab'; slidingledgegrabSmoke = 'Ledge Snag'; springpadSmoke = 'Spring Pad'; superjumpSmoke = 'Spin Jump'; wallrunSmoke = 'Wall Run'; tapSmoke = 'Tap'; slideSmoke = 'Slide'; headbuttSmoke = 'Headbutt'; landstompSmoke = 'Overstomp'; kickSmoke = 'Kick'; pwnedSmoke = 'Pwned'; superpwnedSmoke = 'Super Pwned'; slashLowSmoke = 'Slash High'; slashHighSmoke = 'Slash Low'; jabSmoke = 'Jab'; resetAllData = function () { isColor = 0; LevelSelect = 0; timerDisplayed = false; isMute = false; bestestTime = 0; bestestTimeString = '0.00'; CharHasWeapon = 'nothing'; progressStatus = -1; cutsceneProgress = -1; contSquiggles = 0; contLives = 3; controlDefaults(); castlesArray = [false, false, false, false, false, false, false, false, false, false]; bottlesArray = new Array(); var v2 = 0; while (v2 < LevelsArray.length) { _root['highScoreTT' + LevelsArray[v2][0]] = 0; _root['starsArray' + LevelsArray[v2][0]] = [false, false, false]; var v3 = 0; while (v3 < LevelsArray[v2].length) { if (getLevelType(LevelsArray[v2][v3]) != 'nothing') { messagePopup(LevelsArray[v2][v3]); _root['challengeScore' + LevelsArray[v2][v3]] = 0; } ++v3; } bottlesArray[v2] = false; ++v2; } saveNetworkData(); }; controlDefaults = function () { rootRight = 39; rootLeft = 37; rootUp = 38; rootDown = 40; rootJump = 83; rootAttack = 65; }; saveNetworkData = function () { Fancy_local_data.data.isColor = isColor; Fancy_local_data.data.LevelSelect = LevelSelect; if (LevelSelect == 20) { APITrackEvent('GoHome', 1); } Fancy_local_data.data.timerDisplayed = timerDisplayed; Fancy_local_data.data.isMute = isMute; Fancy_local_data.data.bestestTime = bestestTime; Fancy_local_data.data.rootJump = rootJump; Fancy_local_data.data.CharHasWeapon = CharHasWeapon; if (CharHasWeapon == 'Pencil') { APITrackEvent('HasPencil', 1); } Fancy_local_data.data.progressStatus = progressStatus; Fancy_local_data.data.contSquiggles = contSquiggles; Fancy_local_data.data.contLives = contLives; Fancy_local_data.data.rootRight = rootRight; Fancy_local_data.data.rootLeft = rootLeft; Fancy_local_data.data.rootUp = rootUp; Fancy_local_data.data.rootDown = rootDown; Fancy_local_data.data.rootJump = rootJump; Fancy_local_data.data.rootAttack = rootAttack; Fancy_local_data.data.castlesArray = castlesArray; Fancy_local_data.data.bottlesArray = bottlesArray; BottlesCollected = 0; var v2 = 0; while (v2 < bottlesArray.length) { if (bottlesArray[v2]) { ++BottlesCollected; } ++v2; } Fancy_local_data.data.KeyIsDownType = KeyIsDownType; StarsCollected = 0; v2 = 0; while (v2 < LevelsArray.length) { if (LevelsArray[v2][0] != 'nothing') { Fancy_local_data.data['highScoreTT' + LevelsArray[v2][0]] = _root['highScoreTT' + LevelsArray[v2][0]]; APITrackEvent('highScoreTT' + LevelsArray[v2][0], _root['highScoreTT' + LevelsArray[v2][0]]); } Fancy_local_data.data['starsArray' + LevelsArray[v2][0]] = _root['starsArray' + LevelsArray[v2][0]]; var v3 = 0; while (v3 < 3) { if (_root['starsArray' + LevelsArray[v2][0]][v3]) { ++StarsCollected; } ++v3; } v3 = 0; while (v3 < LevelsArray[v2].length) { if (getLevelType(LevelsArray[v2][v3]) != 'nothing') { Fancy_local_data.data['challengeScore' + LevelsArray[v2][v3]] = _root['challengeScore' + LevelsArray[v2][v3]]; APITrackEvent('Challenge' + LevelsArray[v2][v3], _root['challengeScore' + LevelsArray[v2][v3]]); } ++v3; } ++v2; } if (BottlesCollected > 0) { APITrackEvent('BottlesCollected', BottlesCollected); } if (StarsCollected > 0) { APITrackEvent('StarsCollected', StarsCollected); } }; SafeLoader = function (eLoad) { if (isNaN(Fancy_local_data.data[eLoad])) { Fancy_local_data.data[eLoad] = 0; _root[eLoad] = 0; } else { if (Fancy_local_data.data[eLoad] == undefined) { Fancy_local_data.data[eLoad] = 0; _root[eLoad] = 0; } else { _root[eLoad] = Fancy_local_data.data[eLoad]; } } }; Fancy_local_data = SharedObject.getLocal('FPAW3'); if (Fancy_local_data.data.icanhasdata == undefined) { resetAllData(); Fancy_local_data.data.icanhasdata = true; } else { isColor = Fancy_local_data.data.isColor; LevelSelect = Fancy_local_data.data.LevelSelect; timerDisplayed = Fancy_local_data.data.timerDisplayed; isMute = Fancy_local_data.data.isMute; isScroll = Fancy_local_data.data.isScroll; bestestTime = Fancy_local_data.data.bestestTime; CharHasWeapon = Fancy_local_data.data.CharHasWeapon; progressStatus = Fancy_local_data.data.progressStatus; contSquiggles = Fancy_local_data.data.contSquiggles; contLives = Fancy_local_data.data.contLives; rootRight = Fancy_local_data.data.rootRight; rootLeft = Fancy_local_data.data.rootLeft; rootUp = Fancy_local_data.data.rootUp; rootDown = Fancy_local_data.data.rootDown; rootJump = Fancy_local_data.data.rootJump; rootAttack = Fancy_local_data.data.rootAttack; castlesArray = Fancy_local_data.data.castlesArray; bottlesArray = Fancy_local_data.data.bottlesArray; var i = 0; while (i < LevelsArray.length) { SafeLoader('highScoreTT' + LevelsArray[i][0]); if (Fancy_local_data.data['starsArray' + LevelsArray[i][0]] == undefined) { _root['starsArray' + LevelsArray[i][0]] = [false, false, false]; } else { _root['starsArray' + LevelsArray[i][0]] = Fancy_local_data.data['starsArray' + LevelsArray[i][0]]; } var n = 0; while (n < LevelsArray[i].length) { if (getLevelType(LevelsArray[i][n]) != 'nothing') { SafeLoader('challengeScore' + LevelsArray[i][n]); } ++n; } ++i; } } if (Fancy_local_data.data.KeyIsDownType == undefined) { KeyIsDownType = true; } else { KeyIsDownType = Fancy_local_data.data.KeyIsDownType; } if (isExternal && false) { } else { soundNameArray = ['KnockKnock', 'Ow', 'hitHead', 'CharJump', 'HeadHit', 'Spring', 'CharHurt', 'DoorCreak', 'BadStomp', 'PauseSound', 'unPauseSound', 'CoinVoice', 'DoorClose', 'ClickLock', 'OneUpSound', 'DeathKnell', 'Fanfare', 'TrophyGetSound', 'oldTrophyGet', 'SwordNoise', 'Thud', 'golfCup', 'BadSlash', 'baseballHit', 'spiderDie', 'swordClang', 'swordPoke', 'quickStompStun', 'pinball', 'CharSlash', 'CharJab', 'CharSaw', 'CharSpin', 'CharClang', 'BatDie', 'GoldenSquiggle', 'MiniTrial', 'success', 'failure', 'MenuSelect', 'SandCrumble', 'footStep0', 'footStep1', 'footStep2', 'sandStep0', 'sandStep1', 'sandStep2', 'BlockHit', 'PageContinue', 'RatShoot', 'starGrab', 'kothCannon', 'quickStompStun', 'Draining', 'plugCreaking', 'tubDraining', 'beardWimp', 'QTPKick', 'thwock', 'QTPAlert', 'QTPIntroMob', 'swimDive', 'swimCannonball', 'waterBackSplash', 'splish0', 'splish1', 'splish2', 'splish3', 'smashWind', 'waterLoop', 'slideLoop', 'rollLoop', 'rollHit', 'thud0', 'thud1', 'thud2', 'ribbit', 'crabClaw', 'ploink', 'beardWhip', 'beardHit', 'SpiderStomped', 'FrogStomped', 'BatStomped', 'DuckStomped', 'ParrotStomped', 'RatStomped', 'CrabStomped', 'beardSmashWoosh', 'beardSmash', 'trapdoor', 'message']; var i = 0; while (i < soundNameArray.length) { _root[soundNameArray[i]] = new Sound(soundContainer.createEmptyMovieClip('soundmc' + i, i)); _root[soundNameArray[i]].attachSound(soundNameArray[i]); ++i; } BadSlash.setVolume(300); baseballHit.setVolume(200); loadMusic = function (LoadIt, DoorIt) { soundTo = _root.getMusic(LoadIt, DoorIt); if (soundTo != _root.soundIs) { BackgroundMusic.stop(); delete _root.BackgroundMusic; BackgroundMusic = new Sound(createEmptyMovieClip('BGMContainer', 11000)); if (isExternal) { BackgroundMusic.loadSound(basePath + 'Music/' + soundTo + '.mp3', true); BackgroundMusic.onSoundComplete = function () { BackgroundMusic.start(); }; } else { BackgroundMusic.attachSound(soundTo); BackgroundMusic.start(0, 999); } if (LoadIt == 'MiniTrial') { BackgroundMusic.setVolume(100); BackgroundVolume = 100; } else { BackgroundMusic.setVolume(0); BackgroundVolume = 0; } soundIs = soundTo; } }; quickSoundN = 0; soundContainer.quickSound = function (eSound, eVol, ePan, eThis) { _root['quickSound' + quickSoundN] = new Sound(soundContainer.createEmptyMovieClip('quicksoundmc' + quickSoundN, soundNameArray.length + quickSoundN)); _root['quickSound' + quickSoundN].attachSound(eSound); _root['quickSound' + quickSoundN].start(); if (quickSoundN > 5) { quickSoundN = 0; } else { ++quickSoundN; } }; soundContainer.quickSoundUnMute = soundContainer.quickSound; soundContainer.quickSoundMute = function () { return false; }; } playSoundUnMute = function (eSound, ex, eVol, forward) { if (forward == undefined) { forward = 0; } if (ex == 0) { messagePopup('zero ex'); } if (ex != undefined) { if (eVol == undefined) { messagePopup('vol'); } var v6 = (smoothTheX + ex) * (levelScale / 100) / 3.6 - 100; if (Math.abs(v6) > 100) { eVol -= Math.abs(v6 / 3); if (eVol < 20) { eVol = 20; } v6 = (v6 / Math.abs(v6)) * 100; } if (eVol > 200) { eVol = 200; } _root[eSound].setPan(v6); _root[eSound].setVolume(eVol); } _root[eSound].start(forward, 1); }; playSound = playSoundUnMute; playSoundMute = function () { return false; }; updateSound = function (eSound, ex, eVol) { var v3 = (smoothTheX + ex) * (levelScale / 100) / 3.6 - 100; if (Math.abs(v3) > 100) { eVol -= Math.abs(v3 / 3); if (eVol < 20) { eVol = 20; } v3 = (v3 / Math.abs(v3)) * 100; } if (eVol > 200) { eVol = 200; } _root[eSound].setPan(v3); _root[eSound].setVolume(eVol); }; oThud = -1; makeThud = function (ex, eVol) { var v1 = random(3); while (oThud == v1) { v1 = random(3); } oThud = v1; playSound('thud' + oThud, ex, eVol, 0); }; var levelDepth = 100; var foregroundDepth = 600; var timerDepth = 1002; var timerClip = createEmptyMovieClip('timerClip', timerDepth); var levelName = ''; var downloadedLevelNum = 0; attachMovie('OutPut', 'OutPut', 1000, {'_xscale': (100 / _xscale) * 100, '_yscale': (100 / _yscale) * 100}); syncHold = getTimer() + 33; slowScroller = 0; introEnterFrame = function () { i = 0; while (syncHold > getTimer()) { ++i; if (i > 20000) { break; } } syncHold = getTimer() + 33; MouseHider(); if (!Key.isDown(77)) { MisDown = false; } if (Key.isDown(77) && !MisDown) { MisDown = true; if (isMute) { isMute = false; saveNetworkData(); soundIs = getMusic(LevelLoaded); BackgroundMusic = new Sound(createEmptyMovieClip('soundmc6', 10006)); BackgroundMusic.attachSound(soundIs); BackgroundMusic.setVolume(100); BackgroundVolume = 100; BackgroundMusic.start(0, 1000); } else { isMute = true; saveNetworkData(); soundIs = 'mute'; BackgroundMusic.stop(); } } if (Math.abs(MinY - theY) > 2 && !unlocked) { introScroller = (MinY - theY) / 10; if (introScroller < -8) { if (slowScroller > -8) { slowScroller -= 0.05; } introScroller = slowScroller; } else { if (introScroller > -0.05) { introScroller = -0.05; } } if (Key.isDown(83) || Key.isDown(38) || Key.isDown(40) || Key.isDown(37) || Key.isDown(39) || mouseIsDown) { theY += introScroller * 2; } else { theY += introScroller; } BGScroll._x = Math.round((-theX + firstMaxX) * 0.5); BGScroll._y = Math.round((-theY + firstMaxY) * 0.5); OutPut._x = -theX; UBGstatic._x = OutPut._x; OutPut._y = -theY; UBGstatic._y = OutPut._y; _y = theY; if (Math.abs(MinY - theY) <= 1205 && OutPut != undefined) { removeMovieClip(OutPut); } } else { theY = MinY; MaxY = theY; BGScroll._x = Math.round((-theX + firstMaxX) * 0.5); BGScroll._y = Math.round((-theY + firstMaxY) * 0.5); OutPut._x = -theX; UBGstatic._x = OutPut._x; OutPut._y = -theY; UBGstatic._y = OutPut._y; _y = theY; InteractLayer.Door0.gotoAndPlay(71); onEnterFrame = unpausedEnterFrame; } }; shadowEnterFrame = function () { this.escale = (800 + BLayer['Baddie' + this.badID]._y) / 8; if (this.escale > 98) { removeMovieClip(this); } else { this._x = BLayer['Baddie' + this.badID]._x; this._xscale = this.escale; this._yscale = this.escale; } }; guster = 30; cooping = false; unlockIt = true; usingMouse = true; mouseControl = false; bitRes = 1; replayingStuff = false; theX = 0; theY = 0; terminalDeath = 25; stageX = 720; stageY = 480; levelScale = 100; _yscale = 100; _xscale = 100; eScale = 100; isTimed = false; debugOutput = ' '; Mouse.hide(); SquigglesGet = 0; SquigglesGetYourMom = 37; BaddiesStomped = 0; BaddiesStompedInFace = 42; var ssN = 0; var Boxit = false; var SmoothScroll = 0; SnapBack = [0, 0]; Paused = false; BackgroundVolume = 100; KillWallJump = false; oldGridFrame = 0; tehsnappy = false; Squiggles = 0; BaddiesStompedSession = 0; Lives = 3; LivesUnderground = 98; Health = 100; syncHold = 0; trace('load level ' + Load); LoadLevel(Load, Door, false, false); stop(); }




http://swfchan.com/42/209497/info.shtml
Created: 8/10 -2018 17:36:49 Last modified: 8/10 -2018 17:36:49 Server time: 22/12 -2024 10:33:15