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

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

Mario Remix - Boss Edition.swf

This is the info page for
Flash #62918

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


ActionScript [AS1/AS2]
Combined Code
movieClip 108 { } movieClip 113 { } button 114 { on (release) { getURL('http://www.newgrounds.com', 'blank'); } } button 119 { on (release) { _root.play(); } } movieClip 120 { frame 1 { _root.stop(); PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100; if (PercentLoaded != 100) { bar._xscale = PercentLoaded; } else { gotoAndStop('loaded'); } } frame 2 { gotoAndPlay(1); } } frame 2 { function resetFunction() { _global.resetDuplicates = true; } function gameOverFunction() { _root.gotoAndPlay('gameOver'); } function coinAdditionFunction(collectedCoins) { _global.coinTotal += collectedCoins; } function marioLivesCheck() { if (_global.marioLives > 0 && _global.inStage) { p = 1; while (p <= 6) { if (_global['item' + p] == '1-up' && _root.doOnce) { _global['item' + p] = 'empty'; _root.upSound.start(0, 1); _root.doOnce = false; --_global.marioLives; } ++p; } } else { _root.marioDeath(); } } function marioDeath() { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); _global.inStage = false; _global.characterStatus = 'deathMario'; _root.character.deathSpeed = 12; } } function marioHurt() { if (!_root.invincible) { switch (_global.characterStatus) { case 'smallMario': _root.doOnce = true; _root.marioLivesCheck(); break; case 'largeMario': _global.characterStatus = 'smallMario'; _root.pDownSound.start(0, 1); break; case 'fireMario': _global.characterStatus = 'smallMario'; break; case 'iceMario': _global.characterStatus = 'smallMario'; _root.pDownSound.start(0, 1); } _root.character.hitTimer = 45; _root.invincible = true; } } function hitFunction(hit) { if (hit == 'right') { _root.character.xSpeed = 0; } if (hit == 'left') { _root.character.xSpeed = 0; } if (hit == 'floor') { _root.character.grav_y = 0; _root.character.jumping = false; _root.character.ySpeed = 0; _root.character.falling = false; } if (hit == 'ceiling') { _root.character.ySpeed = 0; } } function hitEnemyFunction(hit) { if (hit == 'right') { _root.enemy._xscale = _root.enemy.startXScale; _root.enemy.faceLeft = true; _root.enemy.xSpeed = -_root.enemy.xSpeed; } if (hit == 'left') { _root.enemy.faceLeft = false; _root.enemy._xscale = -_root.enemy.startXScale; _root.enemy.xSpeed = -_root.enemy.xSpeed; } if (hit == 'floor') { if (_root.enemy.enemyStatus == 'fadeJump') { _root.enemy.enemyStatus = 'fadeNormal'; _root.enemy.jumpTimer = 50; } else { _root.enemy.enemyStatus = 'normal'; _root.enemy.jumpTimer = 75; } _root.enemy.jumping = false; _root.enemy.ySpeed = 0; _root.enemy.falling = false; } if (hit == 'ceiling') { _root.enemy.ySpeed = 0; } } function turnFunction() { if (_root.enemy.faceLeft) { if (_root.character._x > _root.enemy._x) { _root.enemy.faceLeft = false; _root.enemy._xscale = -_root.enemy.startXScale; } } else { if (_root.character._x < _root.enemy._x) { _root.enemy.faceLeft = true; _root.enemy._xscale = _root.enemy.startXScale; } } } function enemyAttackFunction(attacks) { attackNumber = Math.ceil(Math.random() * attacks); switch (attackNumber) { case 1: _root.enemy.enemyStatus = 'attack1'; break; case 2: _root.enemy.enemyStatus = 'attack2'; break; case 3: _root.enemy.enemyStatus = 'attack3'; break; case 4: _root.enemy.enemyStatus = 'attack4'; break; case 5: _root.enemy.enemyStatus = 'attack5'; break; case 6: _root.enemy.enemyStatus = 'attack6'; break; case 7: _root.enemy.enemyStatus = 'attack7'; break; case 8: _root.enemy.enemyStatus = 'attack8'; break; case 9: _root.enemy.enemyStatus = 'attack9'; break; case 10: _root.enemy.enemyStatus = 'attack10'; } } function jumpStartFunction(ySpeedSet, xSpeedSet) { _root.enemy.enemyStatus = 'jump'; _root.enemy.xSpeed = xSpeedSet; _root.enemy.ySpeed = ySpeedSet; _root.enemy.jumping = true; _root.enemy.falling = false; } keyListener = new Object(); keyListener.onKeyDown = function () { itemKey = Key.getAscii(); if (_global.inStage) { switch (itemKey) { case 49: if (_global.item1 != '1-up') { _root.itemBox1.giveItem = true; if (_global.item1 != 'empty') { _root.pUpSound.start(0, 1); _root.character.hitTimer = 35; _root.invincible = true; } _global.item1 = 'empty'; } break; case 50: if (_global.item2 != '1-up') { _root.itemBox2.giveItem = true; if (_global.item2 != 'empty') { _root.pUpSound.start(0, 1); _root.character.hitTimer = 35; _root.invincible = true; } _global.item2 = 'empty'; } break; case 51: if (_global.item3 != '1-up') { _root.itemBox3.giveItem = true; if (_global.item3 != 'empty') { _root.pUpSound.start(0, 1); _root.character.hitTimer = 35; _root.invincible = true; } _global.item3 = 'empty'; } break; case 52: if (_global.item4 != '1-up') { _root.itemBox4.giveItem = true; if (_global.item4 != 'empty') { _root.pUpSound.start(0, 1); _root.character.hitTimer = 35; _root.invincible = true; } _global.item4 = 'empty'; } break; case 53: if (_global.item5 != '1-up') { _root.itemBox5.giveItem = true; if (_global.item5 != 'empty') { _root.pUpSound.start(0, 1); _root.character.hitTimer = 35; _root.invincible = true; } _global.item5 = 'empty'; } break; case 54: if (_global.item6 != '1-up') { _root.itemBox6.giveItem = true; if (_global.item6 != 'empty') { _root.pUpSound.start(0, 1); _root.character.hitTimer = 35; _root.invincible = true; } _global.item6 = 'empty'; } } } if (Key.isDown(81)) { if (_quality == 'HIGH' && qualityControl == 1) { _quality = 'LOW'; qualityControl = 2; } if (_quality == 'MEDIUM' && qualityControl == 1) { _quality = 'HIGH'; qualityControl = 2; } if (_quality == 'LOW' && qualityControl == 1) { _quality = 'MEDIUM'; qualityControl = 2; } } keyCode = Key.getAscii(); }; keyListener.onKeyUp = function () { if (!Key.isDown(81)) { qualityControl = 1; } }; Key.addListener(keyListener); } frame 2 { var savefile = SharedObject.getLocal('marioSpritesBetaSave'); if (savefile.data.mb == undefined) { _global.motherBrainDefeated = false; } else { _global.motherBrainDefeated = savefile.data.mb; } if (savefile.data.cm == undefined) { _global.crocomireDefeated = false; } else { _global.crocomireDefeated = savefile.data.cm; } if (savefile.data.pt == undefined) { _global.phantoonDefeated = false; } else { _global.phantoonDefeated = savefile.data.pt; } if (savefile.data.kd == undefined) { _global.kraidDefeated = false; } else { _global.kraidDefeated = savefile.data.kd; } if (savefile.data.mr == undefined) { _global.mechaRidleyDefeated = false; } else { _global.mechaRidleyDefeated = savefile.data.mr; } if (savefile.data.kc == undefined) { _global.killerCoralDefeated = false; } else { _global.killerCoralDefeated = savefile.data.kc; } if (savefile.data.tb == undefined) { _global.troubleBruinDefeated = false; } else { _global.troubleBruinDefeated = savefile.data.tb; } if (savefile.data.ag == undefined) { _global.agileDefeated = false; } else { _global.agileDefeated = savefile.data.ag; } if (savefile.data.dr == undefined) { _global.draculaDefeated = false; } else { _global.draculaDefeated = savefile.data.dr; } if (savefile.data.dh == undefined) { _global.deathDefeated = false; } else { _global.deathDefeated = savefile.data.dh; } if (savefile.data.ts == undefined) { _global.teamSonicDefeated = false; } else { _global.teamSonicDefeated = savefile.data.ts; } if (savefile.data.ms == undefined) { _global.mechaSonicDefeated = false; } else { _global.mechaSonicDefeated = savefile.data.ms; } if (savefile.data.sm == undefined) { _global.superMechaDefeated = false; } else { _global.superMechaDefeated = savefile.data.sm; } if (savefile.data.fr == undefined) { _global.flameRobotnikDefeated = false; } else { _global.flameRobotnikDefeated = savefile.data.fr; } if (savefile.data.fb == undefined) { _global.fireballRobotnikDefeated = false; } else { _global.fireballRobotnikDefeated = savefile.data.fb; } if (savefile.data.dl == undefined) { _global.drillRobotnikDefeated = false; } else { _global.drillRobotnikDefeated = savefile.data.dl; } if (savefile.data.fc == undefined) { _global.flyingCastleDefeated = false; } else { _global.flyingCastleDefeated = savefile.data.fc; } if (savefile.data.ro == undefined) { _global.robirdoDefeated = false; } else { _global.robirdoDefeated = savefile.data.ro; } if (savefile.data.wg == undefined) { _global.wigglerDefeated = false; } else { _global.wigglerDefeated = savefile.data.wg; } if (savefile.data.sy == undefined) { _global.shyGuyDefeated = false; } else { _global.shyGuyDefeated = savefile.data.sy; } if (savefile.data.pp == undefined) { _global.piranhaPlantsDefeated = false; } else { _global.piranhaPlantsDefeated = savefile.data.pp; } if (savefile.data.sn == undefined) { _global.snifitTankDefeated = false; } else { _global.snifitTankDefeated = savefile.data.sn; } if (savefile.data.kk == undefined) { _global.krackoDefeated = false; } else { _global.krackoDefeated = savefile.data.kk; } if (savefile.data.kg == undefined) { _global.kingDededeDefeated = false; } else { _global.kingDededeDefeated = savefile.data.kg; } if (savefile.data.ww == undefined) { _global.whispyWoodsDefeated = false; } else { _global.whispyWoodsDefeated = savefile.data.ww; } if (savefile.data.mk == undefined) { _global.metaKnightDefeated = false; } else { _global.metaKnightDefeated = savefile.data.mk; } if (savefile.data.bs == undefined) { _global.brightShineDefeated = false; } else { _global.brightShineDefeated = savefile.data.bs; } if (savefile.data.sw == undefined) { _global.swordManDefeated = false; } else { _global.swordManDefeated = savefile.data.sw; } if (savefile.data.am == undefined) { _global.airManDefeated = false; } else { _global.airManDefeated = savefile.data.am; } if (savefile.data.gm == undefined) { _global.gravityManDefeated = false; } else { _global.gravityManDefeated = savefile.data.gm; } if (savefile.data.bh == undefined) { _global.brightManDefeated = false; } else { _global.brightManDefeated = savefile.data.bh; } if (savefile.data.fi == undefined) { _global.fireManDefeated = false; } else { _global.fireManDefeated = savefile.data.fi; } if (savefile.data.fz == undefined) { _global.freezeManDefeated = false; } else { _global.freezeManDefeated = savefile.data.fz; } if (savefile.data.cu == undefined) { _global.cloudManDefeated = false; } else { _global.cloudManDefeated = savefile.data.cu; } if (savefile.data.gu == undefined) { _global.groundManDefeated = false; } else { _global.groundManDefeated = savefile.data.gu; } if (savefile.data.totalDefeated == undefined) { _global.enemiesDefeated = 0; } else { _global.enemiesDefeated = savefile.data.totalDefeated; } if (savefile.data.coins == undefined) { _global.coinTotal = 30; } else { _global.coinTotal = savefile.data.coins; } if (savefile.data.yoshi == undefined) { _global.yoshiTotal = 0; } else { _global.yoshiTotal = savefile.data.yoshi; } } frame 2 { stageMusic = new Sound(); titleMusic = new Sound(); titleMusic.attachSound('titleMusic'); jumpSound = new Sound(); jumpSound.attachSound('soundJump'); coinSound = new Sound(); coinSound.attachSound('soundCoin'); pDownSound = new Sound(); pDownSound.attachSound('soundPDown'); pUpSound = new Sound(); pUpSound.attachSound('soundPUp'); stompSound = new Sound(); stompSound.attachSound('soundStomp'); upSound = new Sound(); upSound.attachSound('sound1up'); deathSound = new Sound(); deathSound.attachSound('soundDeath'); beepSound = new Sound(); beepSound.attachSound('soundBeep'); yoshicoinSound = new Sound(); yoshicoinSound.attachSound('soundYoshiCoin'); charactervoiceSound = new Sound(); charactervoiceSound.attachSound('soundMarioVoice'); kirbystarSound = new Sound(); kirbystarSound.attachSound('soundKirbyStar'); megamandeathSound = new Sound(); megamandeathSound.attachSound('soundMegamanDeath'); megamanshotSound = new Sound(); megamanshotSound.attachSound('soundMegamanShot'); bulletbillSound = new Sound(); bulletbillSound.attachSound('soundBulletBill'); yoshispitSound = new Sound(); yoshispitSound.attachSound('soundYoshiSpit'); turtleSound = new Sound(); turtleSound.attachSound('soundTurtle'); flowergrowSound = new Sound(); flowergrowSound.attachSound('soundFlowerGrow'); springjumpSound = new Sound(); springjumpSound.attachSound('soundSpringJump'); mariofireballSound = new Sound(); mariofireballSound.attachSound('soundMarioFireball'); bombexplodeSound = new Sound(); bombexplodeSound.attachSound('soundBombExplode'); pipeSound = new Sound(); pipeSound.attachSound('soundPipe'); startgameSound = new Sound(); startgameSound.attachSound('soundStartGame'); megamanLandSound = new Sound(); megamanLandSound.attachSound('soundMegamanLand'); gravityFlipSound = new Sound(); gravityFlipSound.attachSound('soundGravityFlip'); brightmanShineSound = new Sound(); brightmanShineSound.attachSound('soundBrightmanShine'); bandsdeathSound = new Sound(); bandsdeathSound.attachSound('soundBandSDeath'); brightdashSound = new Sound(); brightdashSound.attachSound('soundBrightDash'); brightshotSound = new Sound(); brightshotSound.attachSound('soundBrightShot'); dededeexhaleSound = new Sound(); dededeexhaleSound.attachSound('soundDededeExhale'); dededefallSound = new Sound(); dededefallSound.attachSound('soundDededeFall'); dededehammerSound = new Sound(); dededehammerSound.attachSound('soundDededeHammer'); dededeinhaleSound = new Sound(); dededeinhaleSound.attachSound('soundDededeInhale'); dededejumpSound = new Sound(); dededejumpSound.attachSound('soundDededeJump'); krackolightningSound = new Sound(); krackolightningSound.attachSound('soundKrackoLightning'); metajumpSound = new Sound(); metajumpSound.attachSound('soundMetaJump'); metarollSound = new Sound(); metarollSound.attachSound('soundMetaRoll'); metaslashSound = new Sound(); metaslashSound.attachSound('soundMetaSlash'); shineshotSound = new Sound(); shineshotSound.attachSound('soundShineShot'); whispyappleSound = new Sound(); whispyappleSound.attachSound('soundWhispyApple'); whispyblowSound = new Sound(); whispyblowSound.attachSound('soundWhispyBlow'); whispydeathSound = new Sound(); whispydeathSound.attachSound('soundWhispyDeath'); drillshotSound = new Sound(); drillshotSound.attachSound('soundDrillShot'); mechabladeSound = new Sound(); mechabladeSound.attachSound('soundMechaBlade'); mechachargeSound = new Sound(); mechachargeSound.attachSound('soundMechaCharge'); mechadashSound = new Sound(); mechadashSound.attachSound('soundMechaDash'); mechadeathSound = new Sound(); mechadeathSound.attachSound('soundMechaDeath'); mechalaser1Sound = new Sound(); mechalaser1Sound.attachSound('soundMechaLaser1'); mechalaser2Sound = new Sound(); mechalaser2Sound.attachSound('soundMechaLaser2'); mechaslideSound = new Sound(); mechaslideSound.attachSound('soundMechaSlide'); robotnikfireSound = new Sound(); robotnikfireSound.attachSound('soundRobotnikFire'); sonicdeathSound = new Sound(); sonicdeathSound.attachSound('soundSonicDeath'); sonicjumpSound = new Sound(); sonicjumpSound.attachSound('soundSonicJump'); sonicrollSound = new Sound(); sonicrollSound.attachSound('soundSonicRoll'); sonicspinSound = new Sound(); sonicspinSound.attachSound('soundSonicSpin'); airshotSound = new Sound(); airshotSound.attachSound('soundAirShot'); airvaccuumSound = new Sound(); airvaccuumSound.attachSound('soundAirVaccuum'); cloudlightningSound = new Sound(); cloudlightningSound.attachSound('soundCloudLightning'); firemanshotSound = new Sound(); firemanshotSound.attachSound('soundFiremanShot'); freezejumpSound = new Sound(); freezejumpSound.attachSound('soundFreezeJump'); freezeshotSound = new Sound(); freezeshotSound.attachSound('soundFreezeShot'); freezethrowSound = new Sound(); freezethrowSound.attachSound('soundFreezeThrow'); grounddigSound = new Sound(); grounddigSound.attachSound('soundGroundDig'); grounddrillshotSound = new Sound(); grounddrillshotSound.attachSound('soundGroundDrillShot'); groundinvincibleSound = new Sound(); groundinvincibleSound.attachSound('soundGroundInvincible'); swordsplitSound = new Sound(); swordsplitSound.attachSound('soundSwordSplit'); swordwaveSound = new Sound(); swordwaveSound.attachSound('soundSwordWave'); crocomirefireSound = new Sound(); crocomirefireSound.attachSound('soundCrocomireFire'); crocomirehurtSound = new Sound(); crocomirehurtSound.attachSound('soundCrocomireHurt'); crocomireroarSound = new Sound(); crocomireroarSound.attachSound('soundCrocomireRoar'); kraidroarSound = new Sound(); kraidroarSound.attachSound('soundKraidRoar'); phantoonbounceSound = new Sound(); phantoonbounceSound.attachSound('soundPhantoonBounce'); phantoondropSound = new Sound(); phantoondropSound.attachSound('soundPhantoonDrop'); phantoonroarSound = new Sound(); phantoonroarSound.attachSound('soundPhantoonRoar'); ridleyopenSound = new Sound(); ridleyopenSound.attachSound('soundRidleyOpen'); rocketexplosionSound = new Sound(); rocketexplosionSound.attachSound('soundRocketExplosion'); troublelaserSound = new Sound(); troublelaserSound.attachSound('soundTroubleLaser'); troubledeathSound = new Sound(); troubledeathSound.attachSound('soundTroubleDeath'); draculaappearSound = new Sound(); draculaappearSound.attachSound('soundDraculaAppear'); darkshotSound = new Sound(); darkshotSound.attachSound('soundDarkShot'); deathlaserSound = new Sound(); deathlaserSound.attachSound('soundDeathLaser'); deathslash1Sound = new Sound(); deathslash1Sound.attachSound('soundDeathSlash1'); deathslash2Sound = new Sound(); deathslash2Sound.attachSound('soundDeathSlash2'); } frame 2 { _global.frameSelect = ''; _global.characterSelect = 'mario'; _global.item1 = 'empty'; _global.item2 = 'empty'; _global.item3 = 'empty'; _global.item4 = 'empty'; _global.item5 = 'empty'; _global.item6 = 'empty'; _global.characterStatus = 'smallMario'; _global.resetDuplicates = false; _global.inStage = false; _global.marioLives = 0; _global.posControl = 1; } frame 116 { _root.titleMusic.start(0, 200); } movieClip 124 { } movieClip 127 { } movieClip 131 { } movieClip 133 { } instance of movieClip 133 { onClipEvent (enterFrame) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { _root.titleMusic.stop(); _root.startgameSound.start(0, 1); _root.gotoAndPlay('directionsTransition'); } } } movieClip 135 { } instance of movieClip 135 { onClipEvent (enterFrame) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { _root.gotoAndStop('credits'); } } } movieClip 137 { } instance of movieClip 137 { onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { getURL('http://www.armorgames.com/', '_blank'); } } } frame 117 { stop(); } movieClip 142 { } instance of movieClip 142 { onClipEvent (enterFrame) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { _root.gotoAndStop('title'); } } } instance of movieClip 133 { onClipEvent (load) { this.gotoAndStop(1); } } instance of movieClip 135 { onClipEvent (load) { this.gotoAndStop(1); } } instance of movieClip 137 { onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { getURL('http://www.armorgames.com/', '_blank'); } } } movieClip 147 { } frame 163 { stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); } instance of movieClip 133 { onClipEvent (enterFrame) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { _root.startgameSound.start(0, 1); _root.play(); } } } movieClip 152 { } instance of movieClip 152 { onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_global.posControl > 1) { _root.beepSound.start(0, 1); --_global.posControl; } } } } movieClip 156 { frame 1 { stop(); } } movieClip 192 { instance of movieClip 156 { onClipEvent (load) { if (_global.robirdoDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.robirdoDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos1') { _global.frameSelect = 'robirdo'; _root.stageMusic.stop(); _root.stageMusic.attachSound('robirdoStage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.drillRobotnikDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.drillRobotnikDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos1') { _global.frameSelect = 'drillRobotnik'; _root.stageMusic.stop(); _root.stageMusic.attachSound('robotnikStage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.crocomireDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.crocomireDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos1') { _global.frameSelect = 'crocomire'; _root.stageMusic.stop(); _root.stageMusic.attachSound('metroid2Stage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.whispyWoodsDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.whispyWoodsDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos1') { _global.frameSelect = 'whispyWoods'; _root.stageMusic.stop(); _root.stageMusic.attachSound('kirbyStage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.gravityManDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.gravityManDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos1') { _root.stageMusic.stop(); _root.stageMusic.attachSound('mm5Stage'); _root.stageMusic.start(0, 200); _global.frameSelect = 'gravityMan'; _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.krackoDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.krackoDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos1' or _root.stages.yposition == 'pos2') { _global.frameSelect = 'kracko'; _root.stageMusic.stop(); _root.stageMusic.attachSound('kirbyStage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.draculaDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.draculaDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos1' or _root.stages.yposition == 'pos2') { _global.frameSelect = 'dracula'; _root.stageMusic.stop(); _root.stageMusic.attachSound('castlevaniaStage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.flameRobotnikDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.flameRobotnikDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos1' or _root.stages.yposition == 'pos2') { _global.frameSelect = 'flameRobotnik'; _root.stageMusic.stop(); _root.stageMusic.attachSound('robotnikStage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.wigglerDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.wigglerDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos1' or _root.stages.yposition == 'pos2') { _root.stageMusic.stop(); _root.stageMusic.attachSound('smCastleStage'); _root.stageMusic.start(0, 200); _global.frameSelect = 'wiggler'; _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.brightManDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.brightManDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos1' or _root.stages.yposition == 'pos2') { _root.stageMusic.stop(); _root.stageMusic.attachSound('mm4Stage'); _root.stageMusic.start(0, 200); _global.frameSelect = 'brightMan'; _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.brightShineDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.brightShineDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos2' or _root.stages.yposition == 'pos3') { _global.frameSelect = 'brightShine'; _root.stageMusic.stop(); _root.stageMusic.attachSound('kirbyStage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.kraidDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.kraidDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos2' or _root.stages.yposition == 'pos3') { _global.frameSelect = 'kraid'; _root.stageMusic.stop(); _root.stageMusic.attachSound('metroid2Stage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.fireManDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.fireManDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos2' or _root.stages.yposition == 'pos3') { _global.frameSelect = 'fireMan'; _root.stageMusic.stop(); _root.stageMusic.attachSound('firemanStage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.cloudManDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.cloudManDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos2' or _root.stages.yposition == 'pos3') { _root.stageMusic.stop(); _root.stageMusic.attachSound('mm8Stage'); _root.stageMusic.start(0, 200); _global.frameSelect = 'cloudMan'; _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.fireballRobotnikDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.fireballRobotnikDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos2' or _root.stages.yposition == 'pos3') { _global.frameSelect = 'fireballRobotnik'; _root.stageMusic.stop(); _root.stageMusic.attachSound('robotnikStage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.flyingCastleDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.kamekCastleDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos3' or _root.stages.yposition == 'pos4') { _root.stageMusic.stop(); _root.stageMusic.attachSound('smCastleStage'); _root.stageMusic.start(0, 200); _global.frameSelect = 'flyingCastle'; _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.phantoonDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.phantoonDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos3' or _root.stages.yposition == 'pos4') { _global.frameSelect = 'phantoon'; _root.stageMusic.stop(); _root.stageMusic.attachSound('metroid2Stage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.mechaSonicDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.mechaSonicDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos3' or _root.stages.yposition == 'pos4') { _global.frameSelect = 'mechaSonic'; _root.stageMusic.stop(); _root.stageMusic.attachSound('sonicStage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.snifitTankDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.snifitTankDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos3' or _root.stages.yposition == 'pos4') { _global.frameSelect = 'snifitTank'; _root.stageMusic.stop(); _root.stageMusic.attachSound('smCastleStage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.airManDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.airManDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos3' or _root.stages.yposition == 'pos4') { _root.stageMusic.stop(); _root.stageMusic.attachSound('mm2Stage'); _root.stageMusic.start(0, 200); _global.frameSelect = 'airMan'; _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.shyGuyDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.shyGuyDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos4' or _root.stages.yposition == 'pos5') { _global.frameSelect = 'shyGuy'; _root.stageMusic.stop(); _root.stageMusic.attachSound('smCastleStage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.killerCoralDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.killerCoralDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos4' or _root.stages.yposition == 'pos5') { _global.frameSelect = 'killerCoral'; _root.stageMusic.stop(); _root.stageMusic.attachSound('coralStage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.groundManDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.groundManDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos4' or _root.stages.yposition == 'pos5') { _root.stageMusic.stop(); _root.stageMusic.attachSound('mm8Stage'); _root.stageMusic.start(0, 200); _global.frameSelect = 'groundMan'; _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.mechaRidleyDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.mechaRidleyDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos4' or _root.stages.yposition == 'pos5') { _global.frameSelect = 'mechaRidley'; _root.stageMusic.stop(); _root.stageMusic.attachSound('metroid2Stage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.freezeManDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.freezeManDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true) && _global.enemiesDefeated >= 15) { if (_root.stages.yposition == 'pos5' or _root.stages.yposition == 'pos6') { _root.stageMusic.stop(); _root.stageMusic.attachSound('mm8Stage'); _root.stageMusic.start(0, 200); _global.frameSelect = 'freezeMan'; _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.troubleBruinDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.troubleBruinDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true) && _global.enemiesDefeated >= 15) { if (_root.stages.yposition == 'pos5' or _root.stages.yposition == 'pos6') { _root.stageMusic.stop(); _root.stageMusic.attachSound('headdyStage'); _root.stageMusic.start(0, 200); _global.frameSelect = 'troubleBruin'; _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.teamSonicDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.teamSonicDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true) && _global.enemiesDefeated >= 15) { if (_root.stages.yposition == 'pos5' or _root.stages.yposition == 'pos6') { _root.stageMusic.stop(); _root.stageMusic.attachSound('sonicStage'); _root.stageMusic.start(0, 200); _global.frameSelect = 'teamSonic'; _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.kingDededeDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.kingDededeDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true) && _global.enemiesDefeated >= 15) { if (_root.stages.yposition == 'pos5' or _root.stages.yposition == 'pos6') { _root.stageMusic.stop(); _global.frameSelect = 'kingDedede'; _root.stageMusic.attachSound('kirbyFinalStage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.metaKnightDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.metaKnightDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true) && _global.enemiesDefeated >= 15) { if (_root.stages.yposition == 'pos5' or _root.stages.yposition == 'pos6') { _root.stageMusic.stop(); _global.frameSelect = 'metaKnight'; _root.stageMusic.attachSound('kirbyStage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.agileDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.agileDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_root.stages.yposition == 'pos4' or _root.stages.yposition == 'pos5') { _root.stageMusic.stop(); _root.stageMusic.attachSound('mmx2Stage'); _root.stageMusic.start(0, 200); _global.frameSelect = 'agile'; _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.enemiesDefeated >= 15) { _visible = false; } else { _visible = true; } } } instance of movieClip 156 { onClipEvent (load) { if (_global.enemiesDefeated >= 15) { _visible = false; } else { _visible = true; } } } instance of movieClip 156 { onClipEvent (load) { if (_global.enemiesDefeated >= 15) { _visible = false; } else { _visible = true; } } } instance of movieClip 156 { onClipEvent (load) { if (_global.enemiesDefeated >= 15) { _visible = false; } else { _visible = true; } } } instance of movieClip 156 { onClipEvent (load) { if (_global.enemiesDefeated >= 15) { _visible = false; } else { _visible = true; } } } instance of movieClip 156 { onClipEvent (load) { if (_global.motherBrainDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.motherBrainDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true) && _global.enemiesDefeated >= 20) { if (_root.stages.yposition == 'pos6' or _root.stages.yposition == 'pos7') { _root.stageMusic.stop(); _root.stageMusic.attachSound('motherBrainStage'); _root.stageMusic.start(0, 200); _global.frameSelect = 'motherBrain'; _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.piranhaPlantsDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.piranhaPlantsDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true) && _global.enemiesDefeated >= 20) { if (_root.stages.yposition == 'pos6' or _root.stages.yposition == 'pos7') { _root.stageMusic.stop(); _global.frameSelect = 'piranhaPlants'; _root.stageMusic.attachSound('piranhaStage'); _root.stageMusic.start(0, 200); _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.superMechaDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.superMechaDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true) && _global.enemiesDefeated >= 20) { if (_root.stages.yposition == 'pos6' or _root.stages.yposition == 'pos7') { _root.stageMusic.stop(); _root.stageMusic.attachSound('sonicFinalStage'); _root.stageMusic.start(0, 200); _global.frameSelect = 'superMecha'; _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.swordManDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.swordManDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true) && _global.enemiesDefeated >= 20) { if (_root.stages.yposition == 'pos6' or _root.stages.yposition == 'pos7') { _root.stageMusic.stop(); _root.stageMusic.attachSound('mm8Stage'); _root.stageMusic.start(0, 200); _global.frameSelect = 'swordMan'; _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.deathDefeated) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_global.deathDefeated) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true) && _global.enemiesDefeated >= 20) { if (_root.stages.yposition == 'pos6' or _root.stages.yposition == 'pos7') { _root.stageMusic.stop(); _root.stageMusic.attachSound('castlevaniaStage'); _root.stageMusic.start(0, 200); _global.frameSelect = 'death'; _root.gotoAndPlay('startScreen'); } } } } instance of movieClip 156 { onClipEvent (load) { if (_global.enemiesDefeated >= 20) { _visible = false; } else { _visible = true; } } } instance of movieClip 156 { onClipEvent (load) { if (_global.enemiesDefeated >= 20) { _visible = false; } else { _visible = true; } } } instance of movieClip 156 { onClipEvent (load) { if (_global.enemiesDefeated >= 20) { _visible = false; } else { _visible = true; } } } instance of movieClip 156 { onClipEvent (load) { if (_global.enemiesDefeated >= 20) { _visible = false; } else { _visible = true; } } } instance of movieClip 156 { onClipEvent (load) { if (_global.enemiesDefeated >= 20) { _visible = false; } else { _visible = true; } } } } instance stages of movieClip 192 { onClipEvent (load) { pos1 = 478.4; pos2 = 697.6; pos3 = 917.6; pos4 = 1136; pos5 = 1356.8; pos6 = 1575.2; posControl = _global.posControl; yposition = 'pos' + posControl; } onClipEvent (enterFrame) { posControl = _global.posControl; yposition = 'pos' + posControl; switch (yposition) { case 'pos1': _y = _y - Math.round((_y - pos1) * 0.2); break; case 'pos2': _y = _y - Math.round((_y - pos2) * 0.2); break; case 'pos3': _y = _y - Math.round((_y - pos3) * 0.2); break; case 'pos4': _y = _y - Math.round((_y - pos4) * 0.2); break; case 'pos5': _y = _y - Math.round((_y - pos5) * 0.2); break; case 'pos6': _y = _y - Math.round((_y - pos6) * 0.2); } } } movieClip 197 { } instance of movieClip 152 { onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_global.posControl < 6) { _root.beepSound.start(0, 1); ++_global.posControl; } } } } movieClip 203 { } movieClip 206 { } movieClip 209 { } movieClip 214 { } movieClip 219 { } movieClip 220 { frame 1 { stop(); } } movieClip 222 { frame 1 { stop(); } instance of movieClip 206 { onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { _root.gotoAndPlay('itemShop'); } } } instance of movieClip 209 { onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { _root.gotoAndPlay('minigames'); } } } instance of movieClip 220 { onClipEvent (load) { if (_global.characterSelect == 'mario') { this.gotoAndStop(1); } if (_global.characterSelect == 'luigi') { this.gotoAndStop(2); } } onClipEvent (enterFrame) { if (_global.characterSelect == 'mario') { this.gotoAndStop(1); } if (_global.characterSelect == 'luigi') { this.gotoAndStop(2); } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_global.characterSelect == 'mario') { _root.charactervoiceSound.attachSound('soundLuigiVoice'); _root.charactervoiceSound.start(0, 1); _global.characterSelect = 'luigi'; } else { _root.charactervoiceSound.attachSound('soundMarioVoice'); _root.charactervoiceSound.start(0, 1); _global.characterSelect = 'mario'; } } } } } instance of movieClip 222 { onClipEvent (load) { if (_global.enemiesDefeated >= 0) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } } instance of movieClip 222 { onClipEvent (load) { if (_global.enemiesDefeated >= 5) { this.gotoAndStop(3); } else { this.gotoAndStop(1); } } } instance of movieClip 222 { onClipEvent (load) { if (_global.enemiesDefeated >= 35) { this.gotoAndStop(4); } else { this.gotoAndStop(1); } } } movieClip 226 { } instance of movieClip 226 { onClipEvent (load) { _root.yoshiText.text = _global.yoshiTotal.toString(); _root.coinText.text = _global.coinTotal.toString(); _root.savefile.data.mb = _global.motherBrainDefeated; _root.savefile.data.cm = _global.crocomireDefeated; _root.savefile.data.pt = _global.phantoonDefeated; _root.savefile.data.kd = _global.kraidDefeated; _root.savefile.data.mr = _global.mechaRidleyDefeated; _root.savefile.data.kc = _global.killerCoralDefeated; _root.savefile.data.tb = _global.troubleBruinDefeated; _root.savefile.data.ag = _global.agileDefeated; _root.savefile.data.dr = _global.draculaDefeated; _root.savefile.data.dh = _global.deathDefeated; _root.savefile.data.ts = _global.teamSonicDefeated; _root.savefile.data.ms = _global.mechaSonicDefeated; _root.savefile.data.sm = _global.superMechaDefeated; _root.savefile.data.fr = _global.flameRobotnikDefeated; _root.savefile.data.fb = _global.fireballRobotnikDefeated; _root.savefile.data.dl = _global.drillRobotnikDefeated; _root.savefile.data.fc = _global.flyingCastleDefeated; _root.savefile.data.ro = _global.robirdoDefeated; _root.savefile.data.wg = _global.wigglerDefeated; _root.savefile.data.sy = _global.shyGuyDefeated; _root.savefile.data.pp = _global.piranhaPlantsDefeated; _root.savefile.data.sn = _global.snifitTankDefeated; _root.savefile.data.kk = _global.krackoDefeated; _root.savefile.data.kg = _global.kingDededeDefeated; _root.savefile.data.ww = _global.whispyWoodsDefeated; _root.savefile.data.mk = _global.metaKnightDefeated; _root.savefile.data.bs = _global.brightShineDefeated; _root.savefile.data.sw = _global.swordManDefeated; _root.savefile.data.am = _global.airManDefeated; _root.savefile.data.gm = _global.gravityManDefeated; _root.savefile.data.bh = _global.brightManDefeated; _root.savefile.data.fi = _global.fireManDefeated; _root.savefile.data.fz = _global.freezeManDefeated; _root.savefile.data.cu = _global.cloudManDefeated; _root.savefile.data.gu = _global.groundManDefeated; _root.savefile.data.totalDefeated = _global.enemiesDefeated; _root.savefile.data.coins = _global.coinTotal; _root.savefile.data.yoshi = _global.yoshiTotal; _root.savefile.flush(); } onClipEvent (enterFrame) { _root.yoshiText.text = _global.yoshiTotal.toString(); _root.coinText.text = _global.coinTotal.toString(); } } instance of movieClip 137 { onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { getURL('http://www.armorgames.com/', '_blank'); } } } movieClip 230 { } instance of movieClip 230 { onClipEvent (load) { muted = false; } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (!muted) { _root.stageMusic.stop(); muted = true; } else { _root.stageMusic.start(0, 200); muted = false; } } } } frame 206 { stop(); _global.inStage = false; _global.resetDuplicates = false; savefile.data.mb = _global.motherBrainDefeated; savefile.data.cm = _global.crocomireDefeated; savefile.data.pt = _global.phantoonDefeated; savefile.data.kd = _global.kraidDefeated; savefile.data.mr = _global.mechaRidleyDefeated; savefile.data.kc = _global.killerCoralDefeated; savefile.data.tb = _global.troubleBruinDefeated; savefile.data.ag = _global.agileDefeated; savefile.data.dr = _global.draculaDefeated; savefile.data.dh = _global.deathDefeated; savefile.data.ts = _global.teamSonicDefeated; savefile.data.ms = _global.mechaSonicDefeated; savefile.data.sm = _global.superMechaDefeated; savefile.data.fr = _global.flameRobotnikDefeated; savefile.data.fb = _global.fireballRobotnikDefeated; savefile.data.dl = _global.drillRobotnikDefeated; savefile.data.fc = _global.flyingCastleDefeated; savefile.data.ro = _global.robirdoDefeated; savefile.data.wg = _global.wigglerDefeated; savefile.data.sy = _global.shyGuyDefeated; savefile.data.pp = _global.piranhaPlantsDefeated; savefile.data.sn = _global.snifitTankDefeated; savefile.data.kk = _global.krackoDefeated; savefile.data.kg = _global.kingDededeDefeated; savefile.data.ww = _global.whispyWoodsDefeated; savefile.data.mk = _global.metaKnightDefeated; savefile.data.bs = _global.brightShineDefeated; savefile.data.sw = _global.swordManDefeated; savefile.data.am = _global.airManDefeated; savefile.data.gm = _global.gravityManDefeated; savefile.data.bh = _global.brightManDefeated; savefile.data.fi = _global.fireManDefeated; savefile.data.fz = _global.freezeManDefeated; savefile.data.cu = _global.cloudManDefeated; savefile.data.gu = _global.groundManDefeated; savefile.data.totalDefeated = _global.enemiesDefeated; savefile.data.coins = _global.coinTotal; savefile.data.yoshi = _global.yoshiTotal; savefile.flush(); } frame 207 { i = 1; doOnce = true; invincible = false; _global.inStage = false; } movieClip 233 { } movieClip 239 { } movieClip 242 { } movieClip 245 { frame 1 { stop(); } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { _root.pipeSound.start(0, 1); } } onClipEvent (mouseUp) { if (hitTest(_root._xmouse, _root._ymouse, true)) { _root.gotoAndStop('mainMenu'); } } } instance of movieClip 226 { onClipEvent (load) { _root.coinText.text = _global.coinTotal.toString(); } onClipEvent (enterFrame) { _root.coinText.text = _global.coinTotal.toString(); } } instance of movieClip 226 { onClipEvent (load) { _visible = false; doOnce = true; } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_global.coinTotal >= 5) { p = 1; while (p <= 6) { if (_global['item' + p] == 'empty' && doOnce) { doOnce = false; _root.coinSound.start(0, 1); _global.coinTotal -= 5; _global['item' + p] = 'mushroom'; } ++p; } } } } onClipEvent (mouseUp) { doOnce = true; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; doOnce = true; } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_global.coinTotal >= 10) { p = 1; while (p <= 6) { if (_global['item' + p] == 'empty' && doOnce) { doOnce = false; _root.coinSound.start(0, 1); _global.coinTotal -= 10; ++_global.marioLives; _global['item' + p] = '1-up'; } ++p; } } } } onClipEvent (mouseUp) { doOnce = true; } } movieClip 254 { } movieClip 266 { } movieClip 267 { } movieClip 271 { } movieClip 275 { } movieClip 287 { } movieClip 292 { } movieClip 294 { } movieClip 308 { instance hitZone of movieClip 226 { onClipEvent (load) { _visible = false; } } } movieClip 316 { } movieClip 320 { } movieClip 324 { } movieClip 336 { } movieClip 340 { } movieClip 344 { } movieClip 358 { } movieClip 362 { } movieClip 363 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } } instance character of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; hitTimer = 0; slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0) { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.resetFunction(); } } } } frame 208 { stop(); } movieClip 365 { } movieClip 366 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.enemy.footBase) && _root.enemy.ySpeed < 0) { hit = 'floor'; _root.hitEnemyFunction(hit); _root.enemy._y = _parent._y + _parent._height; } if (hitTest(_root.character.footBase) && _root.character.ySpeed <= 0) { hit = 'floor'; _root.hitFunction(hit); _root.character._y = _parent._y; } } } } movieClip 368 { } movieClip 369 { instance of movieClip 368 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { this._visible = false; } onClipEvent (enterFrame) { if (_root.character.hitTest(this) && _global.characterStatus != 'deathMario') { if (_root.character._x < _parent._x) { hit = 'right'; _root.character._x = _parent._x - _root.character._width / 1.25; } else { hit = 'left'; _root.character._x = _parent._x + _root.character._width / 1.25; } _root.hitFunction(hit); } if (_root.enemy.footBase.hitTest(this)) { if (_root.enemy._x < _parent._x) { hit = 'right'; _root.enemy._x = _parent._x - _root.enemy._width / 2 - 2; } else { hit = 'left'; _root.enemy._x = _parent._x + _root.enemy._width / 2 + 2; } _root.hitEnemyFunction(hit); } } } } movieClip 371 { } movieClip 372 { instance of movieClip 371 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (_root.character.hitTest(this) && _global.characterStatus != 'deathMario') { hit = 'ceiling'; _root.hitFunction(hit); _root.character._y = _parent._y + _root.character._height + 1; } } } } instance of movieClip 371 { onClipEvent (load) { _visible = false; doOnce = true; activeControl = 0; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { if (activeControl < 3) { ++activeControl; } if (activeControl == 1) { if (_global.coinTotal >= 5) { p = 1; while (p <= 6) { if (_global['item' + p] == 'empty' && doOnce) { doOnce = false; _root.coinSound.start(0, 1); _global.coinTotal -= 5; _global['item' + p] = 'mushroom'; } ++p; } } } } else { doOnce = true; activeControl = 0; } } } instance of movieClip 371 { onClipEvent (load) { _visible = false; doOnce = true; activeControl = 0; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { if (activeControl < 3) { ++activeControl; } if (activeControl == 1) { if (_global.coinTotal >= 10) { p = 1; while (p <= 6) { if (_global['item' + p] == 'empty' && doOnce) { doOnce = false; _root.coinSound.start(0, 1); _global.coinTotal -= 10; ++_global.marioLives; _global['item' + p] = '1-up'; } ++p; } } } } else { doOnce = true; activeControl = 0; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; doOnce = true; } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_global.coinTotal >= 20) { p = 1; while (p <= 6) { if (_global['item' + p] == 'empty' && doOnce) { doOnce = false; _root.coinSound.start(0, 1); _global.coinTotal -= 20; _global['item' + p] = 'freezeFlower'; } ++p; } } } } onClipEvent (mouseUp) { doOnce = true; } } instance of movieClip 371 { onClipEvent (load) { _visible = false; doOnce = true; activeControl = 0; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { if (activeControl < 3) { ++activeControl; } if (activeControl == 1) { if (_global.coinTotal >= 20) { p = 1; while (p <= 6) { if (_global['item' + p] == 'empty' && doOnce) { doOnce = false; _root.coinSound.start(0, 1); _global.coinTotal -= 20; _global['item' + p] = 'freezeFlower'; } ++p; } } } } else { doOnce = true; activeControl = 0; } } } frame 209 { i = 1; doOnce = true; invincible = false; _global.inStage = false; } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { _root.pipeSound.start(0, 1); } } onClipEvent (mouseUp) { if (hitTest(_root._xmouse, _root._ymouse, true)) { _root.gotoAndStop('mainMenu'); } } } instance of movieClip 226 { onClipEvent (load) { _root.yoshiText.text = _global.yoshiTotal.toString(); _root.coinText.text = _global.coinTotal.toString(); } onClipEvent (enterFrame) { _root.yoshiText.text = _global.yoshiTotal.toString(); _root.coinText.text = _global.coinTotal.toString(); } } instance character of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; hitTimer = 0; slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0) { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.resetFunction(); _root.gameOverFunction(); } } } } instance of movieClip 308 { onClipEvent (load) { this.gotoAndStop(1); doOnce = true; } onClipEvent (enterFrame) { if (hitTest(_root._xmouse, _root._ymouse, false)) { this.play(); _root.directionsText.gotoAndStop(3); } else { this.gotoAndStop(1); } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_global.yoshiTotal >= 3) { doOnce = false; _global.yoshiTotal -= 3; _root.stageMusic.stop(); _root.stageMusic.attachSound('bonus2Stage'); _root.stageMusic.start(0, 200); _root.yoshicoinSound.start(0, 1); _global.frameSelect = 'hammerGame'; _root.gotoAndPlay('ministart'); } } } onClipEvent (mouseUp) { doOnce = true; } } movieClip 380 { } instance of movieClip 380 { onClipEvent (load) { this.gotoAndStop(1); doOnce = true; } onClipEvent (enterFrame) { if (hitTest(_root._xmouse, _root._ymouse, false)) { this.play(); _root.directionsText.gotoAndStop(2); } else { this.gotoAndStop(1); } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_global.yoshiTotal >= 2) { doOnce = false; _global.yoshiTotal -= 2; _root.stageMusic.stop(); _root.stageMusic.attachSound('bonus1Stage'); _root.stageMusic.start(0, 200); _root.yoshicoinSound.start(0, 1); _global.frameSelect = 'balloonGame'; _root.gotoAndPlay('ministart'); } } } onClipEvent (mouseUp) { doOnce = true; } } movieClip 387 { frame 1 { _root.yoshispitSound.start(0, 1); } instance yoshiTongue of movieClip 226 { onClipEvent (load) { _visible = false; } } frame 12 { _root.yoshiMario.attacking = false; } } instance of movieClip 387 { onClipEvent (load) { this.gotoAndStop(1); doOnce = true; } onClipEvent (enterFrame) { if (hitTest(_root._xmouse, _root._ymouse, false)) { this.play(); _root.directionsText.gotoAndStop(4); } else { this.gotoAndStop(1); } } onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { if (_global.yoshiTotal >= 4) { doOnce = false; _global.yoshiTotal -= 4; _root.stageMusic.stop(); _root.stageMusic.attachSound('bonus2Stage'); _root.stageMusic.start(0, 200); _root.yoshicoinSound.start(0, 1); _global.frameSelect = 'yoshiGame'; _root.gotoAndPlay('ministart'); } } } onClipEvent (mouseUp) { doOnce = true; } } frame 210 { stop(); } frame 211 { i = 1; collectedCoins = 0; } movieClip 389 { frame 1 { stop(); } frame 2 { _root.stageMusic.stop(); _root.deathSound.start(0, 1); _global.inStage = false; _global.characterStatus = 'deathMario'; } } instance balloonMario of movieClip 389 { onClipEvent (load) { xPos = 0; xSpeed = 0; deathSpeed = 12; } onClipEvent (enterFrame) { if (_currentframe == 1) { if (xSpeed == 0) { _x = _x + Math.sin(xPos) * 1.5; xPos += 0.15; } _x = _x + xSpeed; if (_x < 120) { _x = 120; xSpeed = -xSpeed; } if (_x > 605) { _x = 605; xSpeed = -xSpeed; } if (Key.isDown(37)) { if (xSpeed > -10) { --xSpeed; } } if (Key.isDown(39)) { if (xSpeed < 10) { ++xSpeed; } } } if (_currentframe == 2) { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { collectedCoins = _root.collectedCoins; _root.coinAdditionFunction(collectedCoins); _root.resetFunction(); _root.gameOverFunction(); } } } } movieClip 395 { frame 7 { stop(); } } movieClip 396 { } movieClip 401 { instance of movieClip 396 { onClipEvent (load) { itemSet = Math.ceil(Math.random() * 10); switch (itemSet) { case 1: case 2: case 3: case 4: case 5: this.gotoAndStop('coin'); break; case 6: case 7: this.gotoAndStop('spike'); break; case 8: case 9: case 10: this.gotoAndStop('3coin'); } } onClipEvent (enterFrame) { if (hitTest(_root.balloonMario)) { if (_currentframe == 1) { _root.coinSound.start(0, 1); ++_root.collectedCoins; this.gotoAndStop(4); } if (_currentframe == 2) { _root.coinSound.start(0, 1); _root.collectedCoins += 3; this.gotoAndStop(4); } if (_currentframe == 3) { if (hitTest(_root.balloonMario)) { _root.balloonMario.gotoAndStop(2); } } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.balloonMario)) { _root.balloonMario.gotoAndStop(2); } } } } instance parentBalloon of movieClip 401 { onClipEvent (load) { if (_name != 'parentBalloon') { balloonColor = Math.ceil(Math.random() * 9); switch (balloonColor) { case 1: case 2: this.gotoAndStop('redBalloon'); break; case 3: case 4: this.gotoAndStop('purpleBalloon'); break; case 5: case 6: this.gotoAndStop('yellowBalloon'); break; case 7: case 8: this.gotoAndStop('greenBalloon'); break; case 9: xSpeed = 0; this.gotoAndStop('ghostBalloon'); } _x = Math.random() * 485 + 120; ySpeed = 4; } else { gameTimer = 1850; _root.timerText.text = Math.ceil(gameTimer / 25); balloonTimer = 45; } } onClipEvent (enterFrame) { if (_name != 'parentBalloon') { if (_global.resetDuplicates) { this.removeMovieClip(); } if (_currentframe == 5) { _x = _x + xSpeed; if (_root.balloonMario._x < _x) { if (xSpeed > -1) { xSpeed -= 0.5; } } else { if (xSpeed < 1) { xSpeed += 0.5; } } } _y = _y + ySpeed; if (_y > 700) { this.removeMovieClip(); } } else { _root.timerText.text = Math.ceil(gameTimer / 25); --balloonTimer; --gameTimer; if (gameTimer <= 0) { collectedCoins = _root.collectedCoins; _root.coinAdditionFunction(collectedCoins); _root.resetFunction(); _root.gameOverFunction(); } if (balloonTimer <= 0) { balloonTimer = 45; this.duplicateMovieClip('balloon' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } } } movieClip 406 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.balloonMario)) { _root.balloonMario.gotoAndStop(2); } } } } instance parentCloud of movieClip 406 { onClipEvent (load) { if (_name != 'parentCloud') { cloudSet = Math.ceil(Math.random() * 10); switch (cloudSet) { case 1: case 2: case 3: this.gotoAndStop('cloud1'); break; case 4: case 5: case 6: this.gotoAndStop('cloud2'); break; case 7: case 8: case 9: this.gotoAndStop('cloud3'); break; case 10: this.gotoAndStop('cloud4'); } ySpeed = 4; xSpeed = Math.random() * 3 - 1.5; _x = Math.random() * 485 + 120; } else { timerControl = 150; cloudTimer = timerControl; } } onClipEvent (enterFrame) { if (_name != 'parentCloud') { if (_global.resetDuplicates) { this.removeMovieClip(); } if (_x < 120) { _x = 120; xSpeed = -xSpeed; } if (_x > 605) { _x = 605; xSpeed = -xSpeed; } _x = _x + xSpeed; _y = _y + ySpeed; if (_y > 700) { this.removeMovieClip(); } } else { _root.coinText.text = _root.collectedCoins; --cloudTimer; if (cloudTimer <= 0) { if (timerControl > 70) { timerControl -= 10; } cloudTimer = timerControl; this.duplicateMovieClip('cloud' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } } } movieClip 410 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentBullet of movieClip 410 { onClipEvent (load) { if (_name != 'parentBullet') { _root.bulletbillSound.start(0, 1); ySpeed = 11; _x = Math.random() * 485 + 120; } else { bulletTimer = 200; } } onClipEvent (enterFrame) { if (_name != 'parentBullet') { if (_global.resetDuplicates) { this.removeMovieClip(); } if (hitTest(_root.balloonMario)) { _root.balloonMario.gotoAndStop(2); } _y = _y + ySpeed; if (_y > 700) { this.removeMovieClip(); } } else { --bulletTimer; if (bulletTimer <= 0) { bulletTimer = 200; this.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } } } frame 212 { stop(); } frame 213 { i = 1; collectedCoins = 0; } instance character of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; hitTimer = 0; slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { this.gotoAndStop(3); if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0) { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } if (_y > 800) { _root.resetFunction(); _root.gameOverFunction(); } } else { this.gotoAndStop(7); --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { collectedCoins = _root.collectedCoins; _root.coinAdditionFunction(collectedCoins); _root.resetFunction(); _root.gameOverFunction(); } } } } instance parentBullet of movieClip 410 { onClipEvent (load) { if (_name != 'parentBullet') { _root.bulletbillSound.start(0, 1); xSpeed = 10; } else { _root.coinText.text = _root.collectedCoins; timerControl = 240; bulletTimer = timerControl; } } onClipEvent (enterFrame) { if (_name != 'parentBullet') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x - xSpeed; if (_y > 700) { this.removeMovieClip(); } } else { _root.coinText.text = _root.collectedCoins; --bulletTimer; if (bulletTimer <= 0) { if (timerControl > 160) { timerControl -= 20; } bulletTimer = timerControl; this.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } } } movieClip 420 { } movieClip 421 { frame 1 { stop(); } instance of movieClip 420 { onClipEvent (load) { _root.bombexplodeSound.start(0, 1); timer = 8; } onClipEvent (enterFrame) { if (timer > 0) { --timer; } else { _parent.removeMovieClip(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } movieClip 422 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } } instance parentBomb of movieClip 421 { onClipEvent (load) { bombTimer = 20; } onClipEvent (enterFrame) { if (_currentframe == 2) { --bombTimer; } if (bombTimer <= 0) { _parent._parent.removeMovieClip(); } } } } movieClip 424 { instance of movieClip 422 { onClipEvent (load) { itemSet = Math.ceil(Math.random() * 10); switch (itemSet) { case 1: case 2: case 3: case 4: case 5: this.gotoAndStop('smallMole'); break; case 6: case 7: this.gotoAndStop('bomb'); break; case 8: case 9: case 10: this.gotoAndStop('largeMole'); } _y = 75; timer = 50; bombTimer = 0; } onClipEvent (enterFrame) { --timer; if (timer > 0) { if (hitTest(_root.character.mario.hammerAttack.hitZone)) { if (_currentframe == 1) { _root.coinSound.start(0, 1); ++_root.collectedCoins; timer = 0; } if (_currentframe == 2) { _root.coinSound.start(0, 1); _root.collectedCoins += 3; timer = 0; } } } if (timer <= 0) { if (_currentframe != 3) { _y = _y + 10; if (_y > 75) { _parent.removeMovieClip(); } } else { this.parentBomb.gotoAndStop(2); } } if (_y > 0 && timer > 0) { _y = _y - 2.5; } } } } instance parentMole of movieClip 424 { onClipEvent (load) { if (_name != 'parentMole') { _x = Math.random() * 675 + 25; } else { gameTimer = 2250; _root.timerText.text = Math.ceil(gameTimer / 25); timerControl = 58; timer = timerControl; } } onClipEvent (enterFrame) { if (_name == 'parentMole') { _root.timerText.text = Math.ceil(gameTimer / 25); --timer; --gameTimer; if (timer <= 0) { this.duplicateMovieClip('mole' + _root.i, _root.getNextHighestDepth()); ++_root.i; if (timerControl > 27) { --timerControl; } timer = timerControl; } if (gameTimer <= 0) { collectedCoins = _root.collectedCoins; _root.coinAdditionFunction(collectedCoins); _root.resetFunction(); _root.gameOverFunction(); } } else { if (_global.resetDuplicates) { this.removeMovieClip(); } } } } frame 214 { stop(); } frame 215 { i = 1; collectedCoins = 0; } instance parentItem of movieClip 396 { onClipEvent (load) { if (_name != 'parentItem') { xSpeed = 8; itemSet = Math.ceil(Math.random() * 10); switch (itemSet) { case 1: case 2: case 3: case 4: case 5: case 6: this.gotoAndStop('coin'); break; case 7: case 8: case 9: this.gotoAndStop('spike'); break; case 10: this.gotoAndStop('3coin'); } } else { _root.coinText.text = _root.collectedCoins; gameTimer = 2000; _root.timerText.text = Math.ceil(gameTimer / 25); timerControl = 40; timer = timerControl; } } onClipEvent (enterFrame) { if (_name != 'parentItem') { if (_global.resetDuplicates) { this.removeMovieClip(); } if (_currentframe != 3) { if (hitTest(_root.yoshiMario.yoshiAttack.yoshiTongue)) { if (_currentframe == 1) { _root.coinSound.start(0, 1); ++_root.collectedCoins; } if (_currentframe == 2) { _root.coinSound.start(0, 1); _root.collectedCoins += 3; } this.gotoAndStop(4); } } else { if (_currentframe == 3) { if (hitTest(_root.yoshiMario)) { if (_root.collectedCoins > 1) { _root.collectedCoins -= 2; } else { _root.collectedCoins = 0; } } } } _x = _x - xSpeed; if (_x < -100) { this.removeMovieClip(); } } else { _root.timerText.text = Math.ceil(gameTimer / 25); _root.coinText.text = _root.collectedCoins; --timer; --gameTimer; if (gameTimer <= 0) { collectedCoins = _root.collectedCoins; _root.coinAdditionFunction(collectedCoins); _root.resetFunction(); _root.gameOverFunction(); } if (timer <= 0) { if (timerControl > 20) { timerControl -= 0.5; } timer = Math.ceil(timerControl); this.duplicateMovieClip('item' + _root.i, _root.getNextHighestDepth()); _root['item' + _root.i]._y = 110; ++_root.i; this.duplicateMovieClip('item' + _root.i, _root.getNextHighestDepth()); _root['item' + _root.i]._y = 210; ++_root.i; this.duplicateMovieClip('item' + _root.i, _root.getNextHighestDepth()); _root['item' + _root.i]._y = 310; ++_root.i; this.duplicateMovieClip('item' + _root.i, _root.getNextHighestDepth()); _root['item' + _root.i]._y = 410; ++_root.i; this.duplicateMovieClip('item' + _root.i, _root.getNextHighestDepth()); _root['item' + _root.i]._y = 510; ++_root.i; } } } } movieClip 430 { } movieClip 433 { } instance yoshiMario of movieClip 433 { onClipEvent (load) { pos1 = 110; pos2 = 210; pos3 = 310; pos4 = 410; pos5 = 510; _y = pos1; posControl = 1; deathSpeed = 12; position = 'pos' + posControl; faceLeft = true; startXScale = _xscale; spriteStatus = 'rightWalk'; attacking = false; jumping = false; lickOnce = true; jumpOnce = true; } onClipEvent (enterFrame) { position = 'pos' + posControl; this.gotoAndStop(spriteStatus); if (Key.isDown(68) && lickOnce) { attacking = true; lickOnce = false; } if (attacking && !jumping) { spriteStatus = 'rightAttack'; } if (!attacking && !jumping) { spriteStatus = 'rightWalk'; } if (Key.isDown(38) && jumpOnce) { jumpOnce = false; if (posControl > 1) { --posControl; } } if (Key.isDown(40) && jumpOnce) { jumpOnce = false; if (posControl < 5) { ++posControl; } } switch (position) { case 'pos1': _y = _y - Math.round((_y - pos1) * 0.25); break; case 'pos2': _y = _y - Math.round((_y - pos2) * 0.25); break; case 'pos3': _y = _y - Math.round((_y - pos3) * 0.25); break; case 'pos4': _y = _y - Math.round((_y - pos4) * 0.25); break; case 'pos5': _y = _y - Math.round((_y - pos5) * 0.25); } if (_currentframe == 7) { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { collectedCoins = _root.collectedCoins; _root.coinAdditionFunction(collectedCoins); _root.resetFunction(); _root.gameOverFunction(); } } } onClipEvent (keyUp) { if (!Key.isDown(68)) { lickOnce = true; } if (!Key.isDown(38) and !Key.isDown(40)) { jumpOnce = true; } } } frame 216 { stop(); } movieClip 438 { frame 1 { stop(); } } instance of movieClip 438 { onClipEvent (load) { if (_global.characterSelect == 'mario') { this.gotoAndStop(1); } if (_global.characterSelect == 'luigi') { this.gotoAndStop(2); } } } instance of movieClip 438 { onClipEvent (load) { this.gotoAndStop(1); } } frame 266 { _root.gotoAndPlay(_global.frameSelect); } frame 268 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 680; startY = 325; } movieClip 442 { } movieClip 444 { } movieClip 447 { } movieClip 452 { frame 25 { stop(); } instance of movieClip 226 { onClipEvent (load) { _global.coinTotal += 40; ++_global.yoshiTotal; _visible = false; } onClipEvent (enterFrame) { _root.enemy._alpha -= 5; if (_root.enemy._alpha < -50) { if (!_global.motherBrainDefeated) { ++_global.enemiesDefeated; _global.motherBrainDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } } } } movieClip 453 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.stompSound.start(0, 1); _root.character.ySpeed = 12; _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.stompSound.start(0, 1); _root.character.ySpeed = 12; _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 447 { onClipEvent (load) { timer = 30; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.enemyHealth > 30) { _parent.enemyStatus = 'normal'; } else { _parent.enemyStatus = 'dying'; } } } } instance of movieClip 452 { onClipEvent (load) { _root.resetFunction(); } } } instance enemy of movieClip 453 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 18; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); } } movieClip 463 { } instance of movieClip 463 { onClipEvent (enterFrame) { if (_currentframe == 9) { _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].rotation = 45; _root['bullet' + _root.i].xSpeed = -6; _root['bullet' + _root.i].ySpeed = 6; _root['bullet' + _root.i].xPos = _x - 20; _root['bullet' + _root.i].yPos = _y + 10; ++_root.i; } } } instance of movieClip 463 { onClipEvent (enterFrame) { if (_currentframe == 17) { _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].rotation = 0; _root['bullet' + _root.i].ySpeed = 7; _root['bullet' + _root.i].xPos = _x - 6; _root['bullet' + _root.i].yPos = _y + 15; ++_root.i; } } } instance of movieClip 463 { onClipEvent (enterFrame) { if (_currentframe == 9) { _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].rotation = 45; _root['bullet' + _root.i].xSpeed = -6; _root['bullet' + _root.i].ySpeed = 6; _root['bullet' + _root.i].xPos = _x - 17; _root['bullet' + _root.i].yPos = _y + 20; ++_root.i; } } } instance of movieClip 463 { onClipEvent (enterFrame) { if (_currentframe == 17) { _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].rotation = 0; _root['bullet' + _root.i].ySpeed = 7; _root['bullet' + _root.i].xPos = _x + 6; _root['bullet' + _root.i].yPos = _y + 15; ++_root.i; } } } instance of movieClip 463 { onClipEvent (enterFrame) { if (_currentframe == 25) { _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].rotation = 45; _root['bullet' + _root.i].xSpeed = -6; _root['bullet' + _root.i].ySpeed = 6; _root['bullet' + _root.i].xPos = _x - 38; _root['bullet' + _root.i].yPos = _y + 9; ++_root.i; } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); _root.parentStuff.duplicateMovieClip('highGround', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); _root.parentStuff.duplicateMovieClip('highGround', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } movieClip 466 { } movieClip 469 { } movieClip 479 { } movieClip 483 { } movieClip 487 { } movieClip 499 { } movieClip 503 { } movieClip 507 { } movieClip 521 { } movieClip 524 { } movieClip 525 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } movieClip 527 { } instance parentStuff of movieClip 527 { onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 269 { stop(); } movieClip 531 { frame 7 { stop(); } } movieClip 532 { instance of movieClip 531 { onClipEvent (load) { timer = 30; } onClipEvent (enterFrame) { if (timer > 0) { --timer; } else { _parent.xPos = _root.character._x; _parent.yPos = _root.character._y; _parent._x = _parent.startX; _parent._y = _parent.startY; _parent.ySpeed = (_parent._y - _parent.yPos) / 75; _parent.xSpeed = (_parent._x - _parent.xPos) / 75; _parent.gotoAndStop(1); } } } } instance of movieClip 532 { onClipEvent (load) { this.gotoAndStop(1); startX = _x; startY = _y; xPos = _root.character._x; yPos = _root.character._y; ySpeed = (_y - yPos) / 75; xSpeed = (_x - xPos) / 75; } onClipEvent (enterFrame) { if (_currentframe == 1) { if (_y < yPos) { this.gotoAndStop(2); } _y = _y - ySpeed; _x = _x - xSpeed; } if (_global.resetDuplicates) { this.gotoAndStop(2); } if (hitTest(_root.character)) { _root.marioHurt(); this.gotoAndStop(2); } } } movieClip 534 { } instance parentBullet of movieClip 534 { onClipEvent (load) { if (_name != 'parentBullet') { _rotation = rotation; _x = xPos; _y = yPos; } } onClipEvent (enterFrame) { if (_name != 'parentBullet') { if (hitTest(_root.character)) { _root.marioHurt(); this.removeMovieClip(); } if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x + xSpeed; _y = _y + ySpeed; } } } instance of movieClip 366 { onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 270 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 130; startY = 350; } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } movieClip 537 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } movieClip 541 { } movieClip 545 { } movieClip 546 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_root.enemy.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_root.enemy.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } frame 3 { stop(); } instance of movieClip 545 { onClipEvent (load) { timer = 30; _root.crocomirefireSound.start(0, 1); } onClipEvent (enterFrame) { --timer; if (timer == 25) { _root.parentFire1.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); ++_root.i; _root.parentFire2.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); ++_root.i; } if (timer <= 0) { _root.enemy.attackTimer = 35; _root.enemy.enemyStatus = 'normal'; } } } } movieClip 552 { } movieClip 553 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_root.enemy.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_root.enemy.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_root.enemy.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } frame 12 { stop(); } instance of movieClip 552 { onClipEvent (load) { timer = 30; _root.crocomireroarSound.start(0, 1); } onClipEvent (enterFrame) { --timer; if (timer == 25) { mulitplyNumber = Math.ceil(Math.random() * 2 + 2); while (mulitplyNumber > 0) { _root.parentRock.duplicateMovieClip('rock' + _root.i, _root.getNextHighestDepth()); ++_root.i; --mulitplyNumber; } } if (timer <= 0) { _root.enemy.attackTimer = 35; _root.enemy.enemyStatus = 'normal'; } } } } movieClip 554 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 545 { onClipEvent (load) { timer = 30; _root.crocomirehurtSound.start(0, 1); } onClipEvent (enterFrame) { --timer; if (_parent.enemyHealth >= 3) { _root.spikes._x += 0.75; } if (timer <= 0) { _root.enemy.attackTimer = 1; _root.enemy.enemyStatus = 'normal'; } } } instance of movieClip 545 { onClipEvent (load) { _global.coinTotal += 5; ++_global.yoshiTotal; _root.resetFunction(); } onClipEvent (enterFrame) { _parent._alpha -= 2; if (_root.enemy._alpha < -25) { if (!_global.crocomireDefeated) { ++_global.enemiesDefeated; _global.crocomireDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } } } } instance enemy of movieClip 554 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 13; attackTimer = 30; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { if (attackTimer > 0) { --attackTimer; } else { attackNumber = Math.ceil(Math.random() * 2); if (attackNumber == 1) { enemyStatus = 'attack1'; } if (attackNumber == 2) { enemyStatus = 'attack2'; } } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 271 { stop(); } movieClip 558 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentFire1 of movieClip 558 { onClipEvent (load) { if (_name != 'parentFire1') { _x = _root.enemy._x - 25; _y = _root.enemy._y - 145; xSpeed = 10; ySpeed = 1.5; } } onClipEvent (enterFrame) { if (_name != 'parentFire1') { if (_x < -150) { this.removeMovieClip(); } if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x - xSpeed; _y = _y - ySpeed; } } } movieClip 562 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentFire2 of movieClip 562 { onClipEvent (load) { if (_name != 'parentFire2') { _x = _root.enemy._x - 25; _y = _root.enemy._y - 130; xSpeed = 7; ySpeed = 6; } } onClipEvent (enterFrame) { if (_name != 'parentFire2') { if (_x < -150) { this.removeMovieClip(); } if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x - xSpeed; _y = _y + ySpeed; } } } movieClip 564 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentRock of movieClip 564 { onClipEvent (load) { if (_name != 'parentRock') { _x = Math.random() * Stage.width; rotationSpeed = Math.ceil(Math.random() * 40 - 20); ySpeed = Math.random() * 6 + 6; } } onClipEvent (enterFrame) { if (_name != 'parentRock') { _rotation = _rotation + rotationSpeed; _y = _y + ySpeed; ySpeed += 0.25; if (_global.resetDuplicates) { this.removeMovieClip(); } if (_y > 600) { this.removeMovieClip(); } } } } instance of movieClip 369 { onClipEvent (enterFrame) { _x = _root.spikes._x; } } frame 272 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 105; startY = 400; } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } movieClip 569 { } movieClip 570 { frame 3 { stop(); } } movieClip 573 { } movieClip 574 { frame 3 { stop(); } } movieClip 575 { } movieClip 576 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { --_root.enemy.enemyHealth; _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.phantoonroarSound.start(0, 1); timer = 50; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 35; } _parent.enemyStatus = 'open'; } } } instance of movieClip 575 { onClipEvent (load) { _global.coinTotal += 20; ++_global.yoshiTotal; _root.resetFunction(); } onClipEvent (enterFrame) { if (_root.enemy._alpha < -40) { if (!_global.phantoonDefeated) { ++_global.enemiesDefeated; _global.phantoonDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } _parent._alpha -= 4; } } } instance enemy of movieClip 576 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 6; lowTimer = 3; attackTimer = 45; openTimer = 75; fadeTimer = 100; alphaControl = 100; faceLeft = true; fadeOut = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus != 'death') { if (fadeTimer > 0) { --fadeTimer; } else { if (_alpha > -40 && fadeOut) { _alpha = Math.random() * alphaControl + 60; alphaControl -= 5; } else { if (fadeOut) { if (lowTimer > 0) { _x = Math.random() * Stage.width; _y = Math.random() * Stage.height; if (_x > 600) { _x = 600; } if (_x < 120) { _x = 120; } if (_y < 50) { _y = 50; } if (_y > 350) { _y = 350; } --lowTimer; } else { lowTimer = 3; _y = 450; } } fadeOut = false; } if (_alpha < 100 && !fadeOut) { _alpha = Math.random() * alphaControl + 60; alphaControl += 5; } else { if (!fadeOut) { fadeTimer = 100; alphaControl = 100; } fadeOut = true; } } if (_alpha >= 100) { --attackTimer; if (attackTimer <= 0) { attackTimer = 45; _root.parentFire.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } if (enemyStatus == 'open') { if (openTimer > 0) { --openTimer; } else { openTimer = 75; enemyStatus = 'normal'; } } if (enemyStatus == 'normal') { if (openTimer > 0) { --openTimer; } else { openTimer = 75; enemyStatus = 'open'; } } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 273 { stop(); } movieClip 581 { } movieClip 587 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } movieClip 592 { frame 5 { stop(); } } movieClip 593 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.ground)) { _parent.timer = 6; _parent.ySpeed = 14; _parent._y = _root.ground._y + 22; _parent.fireStatus = 'groundHit'; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.ground)) { _parent.timer = 6; _parent.ySpeed = 14; _parent._y = _root.ground._y + 22; _parent.fireStatus = 'groundHit'; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; _root.phantoonbounceSound.start(0, 1); } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; timer = 7; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { _parent.removeMovieClip(); } } } } instance parentFire of movieClip 593 { onClipEvent (load) { if (_name != 'parentFire') { _root.phantoondropSound.start(0, 1); fireTimer = Math.ceil(Math.random() * 50) + 50; fireStatus = 'falling'; ySpeed = 12; _x = _root.enemy._x; _y = _root.enemy._y + 160; if (_root.character._x < _x) { xSpeed = 4; } else { xSpeed = -4; } } else { this.gotoAndStop(1); } } onClipEvent (enterFrame) { if (_name != 'parentFire') { if (_global.resetDuplicates) { this.removeMovieClip(); } if (hitTest(_root.wall1) or hitTest(_root.wall2)) { fireStatus = 'vanish'; } --fireTimer; if (fireTimer <= 0) { fireStatus = 'vanish'; } this.gotoAndStop(fireStatus); if (fireStatus == 'falling') { _y = _y + ySpeed; } if (fireStatus == 'groundHit') { --timer; if (timer <= 0) { fireStatus = 'bounce'; } } if (fireStatus == 'bounce') { _x = _x - xSpeed; _y = _y - ySpeed; --ySpeed; } } } } instance parentWall of movieClip 587 { onClipEvent (load) { if (_name == 'parentWall') { attackTimer = 150; } else { _x = xPos; _y = -50; _alpha = 75; ySpeed = 8; } } onClipEvent (enterFrame) { if (_name == 'parentWall') { --attackTimer; if (attackTimer == 0) { xPos = 65; while (xPos <= 700) { this.duplicateMovieClip('wallFire' + xPos, _root.getNextHighestDepth()); _root['wallFire' + xPos].xPos = xPos; xPos += 120; } attackTimer = 300; } } else { if (_global.resetDuplicates) { this.removeMovieClip(); } _y = _y + ySpeed; if (_y > 650) { this.removeMovieClip(); } } } } frame 274 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 105; startY = 330; } movieClip 600 { frame 1 { stop(); } frame 2 { _root.ridleyopenSound.start(0, 1); } frame 18 { _root.parentRocket.duplicateMovieClip('rocket' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } movieClip 603 { frame 1 { _root.ground1._x = _root.ground1.startX; } frame 74 { _root.ground1._x += 65; } } movieClip 610 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } movieClip 611 { frame 1 { stop(); } instance of movieClip 610 { onClipEvent (load) { _root.ground1._x = 1000; } onClipEvent (enterFrame) { if (_currentframe >= 16) { _root.ground1._x = _root.ground1.startX; _parent.gotoAndStop(1); } } } } movieClip 617 { frame 6 { _root.parentFire1.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); ++_root.i; _root.parentFire2.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); ++_root.i; _root.crocomirefireSound.start(0, 1); } frame 16 { _root.parentFire1.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); ++_root.i; _root.parentFire2.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); ++_root.i; } frame 26 { _root.parentFire1.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); ++_root.i; _root.parentFire2.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } movieClip 620 { frame 2 { stop(); } } movieClip 629 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 15 { stop(); } } movieClip 630 { } movieClip 631 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 617 { onClipEvent (enterFrame) { if (_currentframe >= 35) { _parent.enemyStatus = 'normal'; } } } instance of movieClip 620 { onClipEvent (load) { timer = 15; } onClipEvent (enterFrame) { if (timer > 0) { --timer; } else { _parent.enemyStatus = 'normal'; } } } instance of movieClip 630 { onClipEvent (load) { _root.mechadeathSound.start(0, 1); _global.coinTotal += 30; ++_global.yoshiTotal; _root.resetFunction(); } onClipEvent (enterFrame) { if (_root.enemy._alpha < -20) { if (!_global.mechaRidleyDefeated) { ++_global.enemiesDefeated; _global.mechaRidleyDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } _root.enemy._alpha -= 2; } } } movieClip 633 { } movieClip 634 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } movieClip 635 { frame 1 { stop(); } instance of movieClip 634 { onClipEvent (enterFrame) { if (_currentframe >= 20) { _parent.gotoAndStop(1); } } } } movieClip 636 { instance of movieClip 600 { onClipEvent (load) { attackTimer = 150; } onClipEvent (enterFrame) { if (attackTimer > 0) { --attackTimer; } else { attackTimer = 150; this.play(); } } } instance arm1 of movieClip 611 { onClipEvent (load) { attackTimer = 175; } onClipEvent (enterFrame) { if (attackTimer > 0) { --attackTimer; } else { attackTimer = 175; this.gotoAndStop(2); } } } instance of movieClip 631 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 10; attackTimer = 40; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { if (attackTimer > 0) { --attackTimer; } else { attackTimer = 110; enemyStatus = 'attack1'; } } } } instance of movieClip 635 { onClipEvent (load) { attackTimer = 35; } onClipEvent (enterFrame) { if (attackTimer > 0) { --attackTimer; } else { attackTimer = 160; this.gotoAndStop(2); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentFire1 of movieClip 558 { onClipEvent (load) { if (_name != 'parentFire1') { _x = _root.enemy._x - 55; _y = _root.enemy._y - 225; xSpeed = -10; ySpeed = 4.5; } } onClipEvent (enterFrame) { if (_name != 'parentFire1') { _x = _x + xSpeed; _y = _y + ySpeed; if (_global.resetDuplicates) { this.removeMovieClip(); } if (_x < -75 or _y > 625) { this.removeMovieClip(); } } } } instance parentFire2 of movieClip 562 { onClipEvent (load) { if (_name != 'parentFire2') { _x = _root.enemy._x - 50; _y = _root.enemy._y - 225; xSpeed = -6; ySpeed = 8; } } onClipEvent (enterFrame) { if (_name != 'parentFire2') { _x = _x + xSpeed; _y = _y + ySpeed; if (_global.resetDuplicates) { this.removeMovieClip(); } if (_x < -75 or _y > 625) { this.removeMovieClip(); } } } } movieClip 638 { frame 1 { stop(); } instance of movieClip 629 { onClipEvent (load) { timer = 17; _root.rocketexplosionSound.start(0, 1); } onClipEvent (enterFrame) { --timer; if (timer <= 0) { _parent.removeMovieClip(); } } } } instance parentRocket of movieClip 638 { onClipEvent (load) { if (_name != 'parentRocket') { _x = _root.enemy._x + 60; _y = _root.enemy._y - 230; propulsionTimer = 12; _rotation = 135; } } onClipEvent (enterFrame) { if (_name != 'parentRocket') { if (_global.resetDuplicates) { this.removeMovieClip(); } if (hitTest(_root.character)) { _rotation = 0; this.gotoAndStop(2); } if (_currentframe == 1) { --propulsionTimer; } if (propulsionTimer > 0) { _x = _x - 15; _y = _y - 15; } else { if (propulsionTimer > -35 && _currentframe == 1) { ySpeed = Math.abs(_y - _root.character._y) / 20; xSpeed = Math.abs(_x - _root.character._x) / 20; if (_y <= _root._root.character._y) { _y = _y + ySpeed; } else { _y = _y - ySpeed; } if (_x <= _root.character._x) { _x = _x + xSpeed; } else { _x = _x - xSpeed; } a = Math.abs(_x - _root.character._x); b = Math.abs(_y - _root.character._y); rotation = Math.atan(b / a) * 180 / Math.PI; if (_root.character._x < _x && _root.character._y > _y) { rotation = -rotation - 270; } if (_root.character._x < _x && _root.character._y < _y) { rotation -= 270; } if (_root.character._x > _x && _root.character._y > _y) { rotation -= 90; } if (_root.character._x > _x && _root.character._y < _y) { rotation = -rotation - 90; } _rotation = rotation; } else { _rotation = 0; this.gotoAndStop(2); } } } } } movieClip 645 { } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 275 { stop(); } instance ground1 of movieClip 366 { onClipEvent (load) { startX = _x; } } frame 276 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 130; startY = 300; } movieClip 647 { } instance kraidBackground of movieClip 647 { onClipEvent (load) { startX = _x; startY = _y; rumble = false; } onClipEvent (enterFrame) { if (rumble) { _x = startX + Math.random() * 4 - 2; _y = startY + Math.random() * 4 - 2; } else { _x = startX; _y = startY; } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_y > 625) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); } if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_y > 625) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); } if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); _root.resetFunction(); } } } } movieClip 652 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentHand of movieClip 652 { onClipEvent (load) { if (_name != 'parentHand') { _x = _root.enemy._x - 160; _y = _root.enemy._y - 450; xSpeed = Math.random() * 8 + 4; ySpeed = Math.random() * 18 - 9; } } onClipEvent (enterFrame) { if (_name != 'parentHand') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x - xSpeed; _y = _y - ySpeed; if (_x < -50) { this.removeMovieClip(); } } } } movieClip 655 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.parentHand.duplicateMovieClip('hand' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } movieClip 656 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 5 { _root.rocketexplosionSound.start(0, 1); } frame 8 { _root.kraidBackground.rumble = true; } frame 12 { _root.kraidBackground.rumble = false; } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.kraidBackground.rumble = false; _root.enemy.attackTimer = 100; _root.enemy.enemyStatus = 'normal'; } } } movieClip 659 { } movieClip 660 { } movieClip 661 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase)) { if (_root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } else { _root.marioHurt(); } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase)) { if (_root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } else { _root.marioHurt(); } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase)) { if (_root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } else { _root.marioHurt(); } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase)) { if (_root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } else { _root.marioHurt(); } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 656 { onClipEvent (enterFrame) { if (_parent.moveForward) { _parent._x -= 2; } else { _parent._x += 2; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { timer = 22; _root.kraidroarSound.start(0, 1); _visible = false; } onClipEvent (enterFrame) { --timer; _root.character._x -= 5; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 12; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 660 { onClipEvent (load) { _root.resetFunction(); _global.coinTotal += 15; ++_global.yoshiTotal; startX = _parent._x; } onClipEvent (enterFrame) { if (_root.enemy._alpha < -40) { if (!_global.kraidDefeated) { ++_global.enemiesDefeated; _global.kraidDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } _parent._alpha -= 1.5; _parent._x = startX + Math.random() * 12 - 6; _parent._y += 4; } } } instance enemy of movieClip 661 { onClipEvent (load) { enemyStatus = 'normal'; attackTimer = 100; spikeTimer = 125; enemyHealth = 15; moveForward = true; } onClipEvent (enterFrame) { if (_x > 600) { moveForward = true; } if (_x < 480) { moveForward = false; } this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { if (spikeTimer > 0) { --spikeTimer; } else { spikeTimer = 125; _root.parentSpike.duplicateMovieClip('spike' + _root.i, _root.getNextHighestDepth()); ++_root.i; } if (attackTimer > 0) { --attackTimer; } else { enemyStatus = 'move'; } } } } movieClip 663 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentSpike of movieClip 663 { onClipEvent (load) { if (_name != 'parentSpike') { _x = _root.enemy._x - 145; _y = _root.enemy._y - 345; xSpeed = 12; } } onClipEvent (enterFrame) { if (_name != 'parentSpike') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x - xSpeed; if (_x < -100) { this.removeMovieClip(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 277 { stop(); } frame 278 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 40; startY = 120; } movieClip 666 { } movieClip 679 { } instance raft1 of movieClip 679 { onClipEvent (load) { ySpeed = 3; } onClipEvent (enterFrame) { _y = _y + ySpeed; if (_y > 500) { _y = 500; ySpeed = -ySpeed; } if (_y < 200) { _y = 200; ySpeed = -ySpeed; } } } movieClip 682 { } movieClip 685 { } movieClip 686 { } movieClip 690 { } movieClip 694 { } movieClip 696 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 15; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 690 { onClipEvent (load) { _global.coinTotal += 25; ++_global.yoshiTotal; _root.resetFunction(); startX = _parent._x; } onClipEvent (enterFrame) { if (_root.enemy._alpha < -50) { if (!_global.killerCoralDefeated) { ++_global.enemiesDefeated; _global.killerCoralDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } _parent._x = startX + Math.random() * 12 - 6; _parent._y += 4; _parent._alpha -= 5; } } } instance enemy of movieClip 696 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 7; ySpeed = 5; c = 4.75; attackTimer = 100; } onClipEvent (enterFrame) { _x = _x + Math.sin(c) * 3.25; _y = _y + Math.cos(c) * 6; c += 0.05; this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { if (attackTimer > 0) { --attackTimer; } else { _root.parentDrill.duplicateMovieClip('drill' + _root.i, _root.getNextHighestDepth()); ++_root.i; attackTimer = 100; } } } } movieClip 700 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentDrill of movieClip 700 { onClipEvent (load) { if (_name != 'parentDrill') { _root.phantoondropSound.start(0, 1); _x = _root.enemy._x - 20; _y = _root.enemy._y - 175; xSpeed = Math.ceil(Math.random() * 5) + 5; } } onClipEvent (enterFrame) { if (_name != 'parentDrill') { _x = _x - xSpeed; if (_global.resetDuplicates) { this.removeMovieClip(); } if (_x < -100) { this.removeMovieClip(); } } } } movieClip 706 { } instance raft2 of movieClip 679 { onClipEvent (load) { ySpeed = -3.5; } onClipEvent (enterFrame) { _y = _y + ySpeed; if (_y > 500) { _y = 500; ySpeed = -ySpeed; } if (_y < 200) { _y = 200; ySpeed = -ySpeed; } } } instance raft3 of movieClip 679 { onClipEvent (load) { ySpeed = 2.5; } onClipEvent (enterFrame) { _y = _y + ySpeed; if (_y > 500) { _y = 500; ySpeed = -ySpeed; } if (_y < 200) { _y = 200; ySpeed = -ySpeed; } } } instance raft4 of movieClip 679 { onClipEvent (load) { xSpeed = -4; } onClipEvent (enterFrame) { _x = _x + xSpeed; if (_x > 675) { _x = 675; xSpeed = -xSpeed; } if (_x < 75) { _x = 75; xSpeed = -xSpeed; } } } instance raft5 of movieClip 679 { onClipEvent (load) { xSpeed = 4; } onClipEvent (enterFrame) { _x = _x + xSpeed; if (_x > 675) { _x = 675; xSpeed = -xSpeed; } if (_x < 75) { _x = 75; xSpeed = -xSpeed; } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_y > 625) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); } if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_y > 625) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); } if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 279 { stop(); } instance of movieClip 366 { onClipEvent (enterFrame) { _y = _root.raft1._y - 42; } } instance of movieClip 366 { onClipEvent (enterFrame) { _y = _root.raft2._y - 42; } } instance of movieClip 366 { onClipEvent (enterFrame) { _y = _root.raft3._y - 42; } } instance of movieClip 366 { onClipEvent (enterFrame) { _x = _root.raft5._x - 50; if (hitTest(_root.character.footBase) && _root.character.ySpeed <= 0) { _root.character._x += _root.raft5.xSpeed; } } } instance of movieClip 366 { onClipEvent (enterFrame) { _x = _root.raft4._x - 50; if (hitTest(_root.character.footBase) && _root.character.ySpeed <= 0) { _root.character._x += _root.raft4.xSpeed; } } } instance raft6 of movieClip 679 { onClipEvent (load) { xSpeed = 4; } onClipEvent (enterFrame) { _x = _x + xSpeed; if (_x > 675) { _x = 675; xSpeed = -xSpeed; } if (_x < 75) { _x = 75; xSpeed = -xSpeed; } } } instance of movieClip 366 { onClipEvent (enterFrame) { _x = _root.raft6._x - 50; if (hitTest(_root.character.footBase) && _root.character.ySpeed <= 0) { _root.character._x += _root.raft6.xSpeed; } } } frame 280 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 710 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentEnergy2 of movieClip 710 { onClipEvent (load) { if (_name != 'parentEnergy2') { _x = _root.enemy._x; _y = _root.enemy._y - 20; switch (ePosition) { case 'pos1': xSpeed = -10; break; case 'pos2': xSpeed = 10; } } } onClipEvent (enterFrame) { if (_name != 'parentEnergy2') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x + xSpeed; if (_x < -100 or _x > 825) { this.removeMovieClip(); } } } } movieClip 721 { } movieClip 729 { } movieClip 730 { frame 12 { _root.troublelaserSound.start(0, 1); _root.parentEnergy1.duplicateMovieClip('energy' + _root.i, _root.getNextHighestDepth()); _root['energy' + _root.i].ePosition = 'pos1'; ++_root.i; _root.parentEnergy1.duplicateMovieClip('energy' + _root.i, _root.getNextHighestDepth()); _root['energy' + _root.i].ePosition = 'pos2'; ++_root.i; _root.parentEnergy1.duplicateMovieClip('energy' + _root.i, _root.getNextHighestDepth()); _root['energy' + _root.i].ePosition = 'pos3'; ++_root.i; _root.parentEnergy1.duplicateMovieClip('energy' + _root.i, _root.getNextHighestDepth()); _root['energy' + _root.i].ePosition = 'pos4'; ++_root.i; _root.parentEnergy1.duplicateMovieClip('energy' + _root.i, _root.getNextHighestDepth()); _root['energy' + _root.i].ePosition = 'pos5'; ++_root.i; } frame 15 { _root.enemy.attackTimer = 35; _root.enemy.enemyStatus = 'normal'; } } movieClip 740 { frame 5 { _root.troublelaserSound.start(0, 1); _root.parentEnergy2.duplicateMovieClip('energy' + _root.i, _root.getNextHighestDepth()); _root['energy' + _root.i].ePosition = 'pos1'; ++_root.i; _root.parentEnergy2.duplicateMovieClip('energy' + _root.i, _root.getNextHighestDepth()); _root['energy' + _root.i].ePosition = 'pos2'; ++_root.i; } frame 11 { _root.enemy.attackTimer = 35; _root.enemy.enemyStatus = 'normal'; } } movieClip 744 { } movieClip 745 { } movieClip 746 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 15; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 745 { onClipEvent (load) { timer = 40; ySpeed = 8; } onClipEvent (enterFrame) { --timer; if (timer < 0) { _root.nextFrame(); } _rotation = _rotation + 10; _y = _y - ySpeed; --ySpeed; } } instance of movieClip 226 { onClipEvent (load) { _root.troubledeathSound.start(0, 1); _visible = false; ySpeed = 16; } onClipEvent (enterFrame) { _parent._x += 15; _parent._y -= ySpeed; --ySpeed; } } } instance enemy of movieClip 746 { onClipEvent (load) { enemyStatus = 'normal'; runSpeed = 12; enemyHealth = 7; attackTimer = 40; runTimer = 30; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'run') { if (runTimer > 0) { --runTimer; } else { enemyStatus = 'normal'; runTimer = 20; } if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } } if (enemyStatus == 'normal') { if (runTimer > 0) { --runTimer; } else { _root.turnFunction(); enemyStatus = 'run'; runTimer = 45; xSpeed = 10; } if (attackTimer > 0) { if (runTimer > 0) { --attackTimer; } } else { _root.turnFunction(); attacks = 2; _root.enemyAttackFunction(attacks); } } } } movieClip 748 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentEnergy1 of movieClip 748 { onClipEvent (load) { if (_name != 'parentEnergy1') { if (_root.enemy.faceLeft) { _x = _root.enemy._x + 50; } else { _x = _root.enemy._x - 50; } _y = _root.enemy._y - 100; switch (ePosition) { case 'pos1': xSpeed = -12; break; case 'pos2': xSpeed = -8; ySpeed = -8; break; case 'pos3': ySpeed = -12; break; case 'pos4': xSpeed = 8; ySpeed = -8; break; case 'pos5': xSpeed = 12; } } } onClipEvent (enterFrame) { if (_name != 'parentEnergy1') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x + xSpeed; _y = _y + ySpeed; if (_x < -100 or _x > 825) { this.removeMovieClip(); } if (_y < -100 or _y > 750) { this.removeMovieClip(); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 281 { stop(); } movieClip 751 { } movieClip 757 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 24 { _root.enemy.attackTimer = 30; _root.enemy.enemyStatus = 'normal'; } } movieClip 760 { } movieClip 761 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 15; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 760 { onClipEvent (load) { timer = 40; ySpeed = 8; } onClipEvent (enterFrame) { --timer; if (timer < 0) { _root.nextFrame(); } _rotation = _rotation + 10; _y = _y - ySpeed; --ySpeed; } } instance of movieClip 226 { onClipEvent (load) { _root.troubledeathSound.start(0, 1); _visible = false; ySpeed = 16; } onClipEvent (enterFrame) { _parent._x += 15; _parent._y -= ySpeed; --ySpeed; } } } instance enemy of movieClip 761 { onClipEvent (load) { enemyStatus = 'normal'; startAttacks = false; c = 0; xSpeed = 10; enemyHealth = 7; attackTimer = 30; faceLeft = true; } onClipEvent (enterFrame) { if (!startAttacks) { this.gotoAndStop(1); if (_y > 410) { _y = _y - 15; } else { startAttacks = true; } } else { this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { _y = _y + Math.cos(c) * 2; c += 0.05; if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } if (attackTimer > 0) { --attackTimer; } else { enemyStatus = 'attack1'; } } } } } movieClip 763 { } movieClip 766 { } movieClip 767 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (_parent.faceLeft) { _parent._x += 25; } else { _parent._x -= 25; } if (_parent._x > 800 or _parent._x < -100) { if (_parent.faceLeft) { _parent.faceLeft = false; _parent._x = -145; _parent.enemyStatus = 'normal'; } else { _parent.faceLeft = true; _parent._x = 835; _parent.enemyStatus = 'normal'; } } } } instance of movieClip 744 { onClipEvent (load) { _root.troubledeathSound.start(0, 1); ySpeed = 14; } onClipEvent (enterFrame) { _y = _y - ySpeed; _x = _x - 15; --ySpeed; } } instance of movieClip 766 { onClipEvent (load) { timer = 50; _global.coinTotal += 30; ++_global.yoshiTotal; _root.resetFunction(); ySpeed = 14; } onClipEvent (enterFrame) { --timer; if (timer < 0) { if (!_global.troubleBruinDefeated) { ++_global.enemiesDefeated; _global.troubleBruinDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } _rotation = _rotation + 15; _y = _y + ySpeed; } } } instance enemy of movieClip 767 { onClipEvent (load) { _x = 625; startAttacks = false; enemyStatus = 'normal'; c = 0; enemyHealth = 7; attackTimer = 25; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { if (!startAttacks) { this.gotoAndStop(1); if (_y > 390) { _y = _y - 15; } else { startAttacks = true; } } else { this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { if (faceLeft) { _xscale = startXScale; if (_x > 625) { _x = _x - 25; } } else { _xscale = -startXScale; if (_x < 75) { _x = _x + 25; } } _y = _y + Math.cos(c) * 3; c += 0.05; if (attackTimer > 0) { --attackTimer; } else { attackTimer = 25; _root.parentRocket.duplicateMovieClip('rocket' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } } } } movieClip 770 { frame 3 { stop(); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentRocket of movieClip 770 { onClipEvent (load) { if (_name != 'parentRocket') { if (_root.enemy.faceLeft) { xSpeed = -10; _x = _root.enemy._x + 8; } else { _xscale = -_xscale; xSpeed = 10; _x = _root.enemy._x - 8; } _y = _root.enemy._y - 18; } } onClipEvent (enterFrame) { if (_name != 'parentRocket') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x + xSpeed; if (_x < -100 or _x > 825) { this.removeMovieClip(); } } } } frame 284 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 775 { } movieClip 778 { } movieClip 781 { frame 3 { _root.parentEnergy.duplicateMovieClip('energy' + _root.i, _root.getNextHighestDepth()); ++_root.i; } frame 7 { _root.parentEnergy.duplicateMovieClip('energy' + _root.i, _root.getNextHighestDepth()); ++_root.i; } frame 11 { _root.parentEnergy.duplicateMovieClip('energy' + _root.i, _root.getNextHighestDepth()); ++_root.i; } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.enemy.attackTimer = 15; _root.enemy.attackNumber = 0; _root.enemy.enemyStatus = 'normal'; } } } movieClip 785 { frame 1 { _root.deathslash1Sound.start(0, 1); } frame 4 { _root.parentSickle.duplicateMovieClip('sickle' + _root.i, _root.getNextHighestDepth()); ++_root.i; } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.enemy.attackTimer = 15; _root.enemy.attackNumber = 0; _root.enemy.enemyStatus = 'normal'; } } } movieClip 788 { frame 1 { _root.deathslash2Sound.start(0, 1); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.enemy.attackTimer = 8; _root.enemy.attackNumber = 0; _root.enemy.enemyStatus = 'normal'; } } } movieClip 792 { frame 1 { _root.deathslash1Sound.start(0, 1); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.enemy.attackTimer = 8; _root.enemy.attackNumber = 0; _root.enemy.enemyStatus = 'normal'; } } } movieClip 795 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { timer = 15; _visible = false; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 12; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 226 { onClipEvent (load) { _global.coinTotal += 40; ++_global.yoshiTotal; _root.resetFunction(); startX = _parent._x; _visible = false; } onClipEvent (enterFrame) { if (_root.enemy._alpha < -30) { if (!_global.deathDefeated) { ++_global.enemiesDefeated; _global.deathDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } _parent._x = startX + Math.random() * 12 - 6; _parent._alpha -= 3; } } } instance enemy of movieClip 795 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 11; attackTimer = 30; jumping = false; falling = false; charDistance = Math.abs(_x - _root.character._x); faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { charDistance = Math.abs(_x - _root.character._x); this.gotoAndStop(enemyStatus); if (enemyStatus == 'attack1') { if (_x < -100) { xSpeed = 0; _x = -95; } if (_x > 825) { xSpeed = 0; _x = 820; } if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } if (ySpeed > -21) { ySpeed -= 1.5; } _y = _y - ySpeed; if (jumping) { if (ySpeed < 0) { jumping = false; falling = true; } } } if (enemyStatus == 'normal') { if (attackTimer > 0) { --attackTimer; } else { _root.turnFunction(); if (charDistance > 160) { attackNumber = Math.ceil(Math.random() * 4); if (attackNumber == 1 or attackNumber == 2) { enemyStatus = 'attack1'; } if (attackNumber == 3) { enemyStatus = 'attack2'; } if (attackNumber == 4) { enemyStatus = 'attack3'; } } else { attackNumber = Math.ceil(Math.random() * 2); if (attackNumber == 1) { enemyStatus = 'attack5'; } if (attackNumber == 2) { enemyStatus = 'attack4'; } } } if (enemyStatus == 'attack1') { _root.turnFunction(); attackTimer = 8; xSpeed = Math.ceil(Math.random() * 10) + 10; ySpeed = 24; } } } } movieClip 804 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentSickle of movieClip 804 { onClipEvent (load) { if (_name != 'parentSickle') { if (!_root.enemy.faceLeft) { _xscale = -_xscale; xSpeed = 10; _x = _root.enemy._x + 45; } else { xSpeed = -10; _x = _root.enemy._x - 45; } _y = _root.enemy._y - 60; } } onClipEvent (enterFrame) { if (_name != 'parentSickle') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x + xSpeed; if (_x < -50 or _x > 775) { this.removeMovieClip(); } } } } movieClip 806 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentEnergy of movieClip 806 { onClipEvent (load) { if (_name != 'parentEnergy') { _root.deathlaserSound.start(0, 1); if (!_root.enemy.faceLeft) { _xscale = -_xscale; xSpeed = 21; _x = _root.enemy._x + 55; } else { xSpeed = -21; _x = _root.enemy._x - 55; } _y = _root.enemy._y - 82; } } onClipEvent (enterFrame) { if (_name != 'parentEnergy') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x + xSpeed; if (_x < -50 or _x > 775) { this.removeMovieClip(); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 285 { stop(); } instance of movieClip 368 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (_root.character.hitTest(this)) { if (_root.character._x < _parent._x) { hit = 'right'; _root.character._x = _parent._x - 27; } else { hit = 'left'; _root.character._x = _parent._x + 27; } _root.hitFunction(hit); } } } instance of movieClip 368 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (_root.character.hitTest(this)) { if (_root.character._x < _x) { hit = 'right'; _root.character._x = _x - 27; } else { hit = 'left'; _root.character._x = _x + 27; } _root.hitFunction(hit); } } } frame 286 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 812 { } movieClip 817 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentFire1 of movieClip 817 { onClipEvent (load) { if (_name != 'parentFire1') { _root.darkshotSound.start(0, 1); if (!_root.enemy.faceLeft) { _xscale = -_xscale; xSpeed = 15; _x = _root.enemy._x + 40; } else { xSpeed = -15; _x = _root.enemy._x - 40; } _y = _root.enemy._y - 85; } } onClipEvent (enterFrame) { if (_name != 'parentFire1') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x + xSpeed; _y = _y - ySpeed; if (_x < -100 or _x > 825) { this.removeMovieClip(); } } } } movieClip 832 { frame 1 { _root.draculaappearSound.start(0, 1); } instance of movieClip 226 { onClipEvent (load) { _root.enemy.enemyStatus = 'fadeIn'; } } } movieClip 833 { frame 1 { _root.draculaappearSound.start(0, 1); } instance of movieClip 226 { onClipEvent (load) { attacks = 2; _root.enemyAttackFunction(attacks); } } } movieClip 841 { instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.parentFire2.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } instance of movieClip 226 { onClipEvent (enterFrame) { _root.enemy.fadeTimer = 10; _root.enemy.enemyStatus = 'normal'; } } } movieClip 848 { instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.parentFire1.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } instance of movieClip 226 { onClipEvent (enterFrame) { _root.enemy.fadeTimer = 10; _root.enemy.enemyStatus = 'normal'; } } } movieClip 851 { instance of movieClip 226 { onClipEvent (enterFrame) { _root.enemy.enemyStatus = 'normal'; } } } movieClip 852 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 833 { onClipEvent (load) { _parent._x = Math.random() * Stage.width; if (_parent._x < _root.character._x) { _parent.faceLeft = false; _parent._xscale = -_parent.startXScale; } else { _parent.faceLeft = true; _parent._xscale = _parent.startXScale; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; _global.coinTotal += 10; ++_global.yoshiTotal; _root.resetFunction(); } onClipEvent (enterFrame) { if (_root.enemy._alpha < -40) { if (!_global.draculaDefeated) { ++_global.enemiesDefeated; _global.draculaDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } _parent._alpha -= 4; } } } instance enemy of movieClip 852 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 8; fadeTimer = 20; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { if (fadeTimer > 0) { --fadeTimer; } else { enemyStatus = 'fadeOut'; } } } } movieClip 856 { } movieClip 857 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentFire2 of movieClip 857 { onClipEvent (load) { if (_name != 'parentFire2') { _root.crocomirefireSound.start(0, 1); if (!_root.enemy.faceLeft) { _xscale = -_xscale; xSpeed = 7; _x = _root.enemy._x - 10; } else { xSpeed = -7; _x = _root.enemy._x + 10; } _y = _root.enemy._y - 50; } } onClipEvent (enterFrame) { if (_name != 'parentFire2') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x + xSpeed; _y = _y - ySpeed; if (_x < -50 or _x > 775) { this.removeMovieClip(); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 287 { stop(); } frame 288 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 862 { } movieClip 867 { frame 1 { stop(); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 2 { stop(); } frame 7 { _root.enemy.enemyStatus = 'attack2'; } } movieClip 879 { frame 1 { _root.freezejumpSound.start(0, 1); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 9 { _root.parentWave.duplicateMovieClip('wave' + _root.i, _root.getNextHighestDepth()); ++_root.i; } frame 19 { _root.enemy.enemyStatus = 'attack2'; } } movieClip 883 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } movieClip 887 { } movieClip 888 { frame 1 { _root.megamandeathSound.start(0, 1); } frame 5 { stop(); } instance of movieClip 887 { onClipEvent (enterFrame) { _x = _x + 0; _y = _y + 10; } } instance of movieClip 887 { onClipEvent (enterFrame) { _x = _x + -7; _y = _y + -7; } } instance of movieClip 887 { onClipEvent (enterFrame) { _x = _x + -10; _y = _y + 0; } } instance of movieClip 887 { onClipEvent (enterFrame) { _x = _x + -7; _y = _y + 7; } } instance of movieClip 887 { onClipEvent (enterFrame) { _x = _x + 7; _y = _y + 7; } } instance of movieClip 887 { onClipEvent (enterFrame) { _x = _x + 10; _y = _y + 0; } } instance of movieClip 887 { onClipEvent (enterFrame) { _x = _x + 7; _y = _y + -7; } } instance of movieClip 887 { onClipEvent (enterFrame) { _x = _x + 0; _y = _y + -10; } } } movieClip 889 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_root.enemy.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.character._y -= 5; --_root.enemy.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 867 { onClipEvent (load) { _root.freezejumpSound.start(0, 1); ySpeed = 35; } onClipEvent (enterFrame) { if (ySpeed == 0) { this.play(); } if (ySpeed <= -37.5) { this.play(); } else { _root.enemy._y -= ySpeed; ySpeed -= 2.5; } } } instance of movieClip 883 { onClipEvent (load) { if (_root.enemy.faceLeft) { _root.enemy.xSpeed = 25; } else { _root.enemy.xSpeed = -25; } } onClipEvent (enterFrame) { charDistance = Math.abs(_root.enemy._x - _root.character._x); if (_root.enemy.faceLeft) { _root.enemy.xSpeed = 25; } else { _root.enemy.xSpeed = -25; } if (charDistance < 75 && _root.character._y < _root.enemy._y) { _root.enemy.enemyStatus = 'attack3'; } _root.enemy._x -= _root.enemy.xSpeed; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 20; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { _root.enemy.restTimer = 85; _root.enemy.enemyStatus = 'attack2'; } } } instance of movieClip 888 { onClipEvent (load) { _global.coinTotal += 30; ++_global.yoshiTotal; timer = 50; _root.resetFunction(); } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (!_global.agileDefeated) { ++_global.enemiesDefeated; _global.agileDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } } } } instance enemy of movieClip 889 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 8; restTimer = 30; attackTimer = 65; faceLeft = true; startX = _x; startY = _y; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'attack2') { if (restTimer > 0) { --restTimer; } else { enemyStatus = 'normal'; restTimer = 85; } if (attackTimer > 0) { --attackTimer; } else { _root.turnFunction(); attackTimer = 65; enemyStatus = 'attack1'; } } if (enemyStatus == 'normal') { if (restTimer > 0) { --restTimer; } else { restTimer = 85; enemyStatus = 'attack2'; } } } } movieClip 891 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentWave of movieClip 891 { onClipEvent (load) { if (_name != 'parentWave') { faceLeft = _root.enemy.faceLeft; if (faceLeft) { xSpeed = 20; _x = _root.enemy._x - 85; } else { xSpeed = -20; _xscale = -_xscale; _x = _root.enemy._x + 85; } _y = _root.enemy._y - 75; } } onClipEvent (enterFrame) { if (_name != 'parentWave') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x - xSpeed; if (_x < -75 or _x > 800) { this.removeMovieClip(); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 289 { stop(); } frame 290 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 895 { } movieClip 900 { } movieClip 902 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 900 { onClipEvent (load) { timer = 60; ySpeed = 20; } onClipEvent (enterFrame) { --timer; _parent._y -= ySpeed; if (ySpeed > 0) { ySpeed -= 0.75; } if (timer <= 0) { _parent.enemyStatus = 'normal'; } } } instance of movieClip 226 { onClipEvent (load) { _root.sonicdeathSound.start(0, 1); _visible = false; ySpeed = 10; ++_root.enemyControl.enemyDeath; } onClipEvent (enterFrame) { if (_parent._y < 1000) { --ySpeed; _parent._y -= ySpeed; } } } } instance of movieClip 902 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 3; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (_root.character._x > _x) { faceLeft = false; } if (_root.character._x < _x) { faceLeft = true; } if (faceLeft) { _xscale = -startXScale; } else { _xscale = startXScale; } if (enemyStatus == 'normal') { ySpeed = Math.abs(_y - _root.character._y) / 25; xSpeed = Math.abs(_x - _root.character._x) / 25; if (_y < _root._root.character._y) { _y = _y + ySpeed; } else { _y = _y - ySpeed; } if (_x < _root.character._x) { _x = _x + xSpeed; } else { _x = _x - xSpeed; } } } } movieClip 908 { } movieClip 913 { } movieClip 915 { } movieClip 916 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 908 { onClipEvent (load) { _root.sonicspinSound.start(0, 1); } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 24 { stop(); } instance of movieClip 915 { onClipEvent (load) { _root.sonicrollSound.start(0, 1); _root.enemy2.xSpeed = 20; timer = 30; } onClipEvent (enterFrame) { if (timer > 0) { --timer; _root.enemy2._x -= _root.enemy2.xSpeed; } else { if (_root.enemy2.faceLeft) { if (_root.character._x > _root.enemy2._x) { _root.enemy2.faceLeft = false; _root.enemy2._xscale = -_root.enemy2.startXScale; } } else { if (_root.character._x < _root.enemy2._x) { _root.enemy2.faceLeft = true; _root.enemy2._xscale = _root.enemy2.startXScale; } } _root.enemy2.attackTimer = 40; _root.enemy2.enemyStatus = 'normal'; } } } } movieClip 919 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance footBase of movieClip 226 { onClipEvent (load) { timer = 20; _visible = false; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _root.sonicdeathSound.start(0, 1); _visible = false; ySpeed = 10; ++_root.enemyControl.enemyDeath; } onClipEvent (enterFrame) { if (_parent._y < 1000) { --ySpeed; _parent._y -= ySpeed; } } } } instance enemy2 of movieClip 919 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 4; attackTimer = 30; xSpeed = 20; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { if (_x < 0) { _x = 0; faceLeft = false; } if (_x > 725) { _x = 725; faceLeft = true; } if (faceLeft) { xSpeed = 20; _xscale = startXScale; } else { xSpeed = -20; _xscale = -startXScale; } this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { if (attackTimer > 0) { --attackTimer; } else { if (faceLeft) { if (_root.character._x > _x) { faceLeft = false; _xscale = -startXScale; } } else { if (_root.character._x < _x) { faceLeft = true; _xscale = startXScale; } } enemyStatus = 'attack1'; } } } } movieClip 927 { } movieClip 928 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_root.enemy.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 31 { stop(); } instance of movieClip 927 { onClipEvent (load) { _root.turnFunction(); xSpeedSet = 9; ySpeedSet = 24; _root.sonicjumpSound.start(0, 1); _root.jumpStartFunction(ySpeedSet, xSpeedSet); } } } movieClip 932 { } movieClip 934 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 932 { onClipEvent (load) { timer = 20; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 226 { onClipEvent (load) { _root.sonicdeathSound.start(0, 1); _visible = false; ++_root.enemyControl.enemyDeath; ySpeed = 10; } onClipEvent (enterFrame) { if (_parent._y < 1000) { --ySpeed; _parent._y -= ySpeed; } } } } instance enemy of movieClip 934 { onClipEvent (load) { enemyStatus = 'normal'; runSpeed = 7; enemyHealth = 4; attackTimer = 30; jumpTimer = 50; jumping = true; falling = false; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'jump') { if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } if (ySpeed > -21) { ySpeed -= 1.5; } _y = _y - ySpeed; if (jumping) { if (ySpeed < 0) { jumping = false; falling = true; } } } if (enemyStatus == 'normal') { if (jumpTimer > 0) { jumpTimer -= 3; } else { _root.turnFunction(); attacks = 1; _root.enemyAttackFunction(attacks); } } } } instance enemyControl of movieClip 226 { onClipEvent (load) { enemyDeath = 0; timer = 35; } onClipEvent (enterFrame) { if (enemyDeath >= 3) { --timer; if (timer <= 0) { _root.play(); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 291 { stop(); } frame 292 { stop(); } movieClip 948 { frame 82 { _root.nextFrame(); } } movieClip 957 { } movieClip 962 { } movieClip 968 { instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.parentEnergy.duplicateMovieClip('energy' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.enemy.attackTimer = 40; _root.enemy.enemyStatus = 'jump'; _root.enemy.falling = true; } } } movieClip 972 { } movieClip 973 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 12 { stop(); } instance of movieClip 972 { onClipEvent (load) { if (_root.enemy.faceLeft) { _root.enemy.xSpeed = 40; } else { _root.enemy.xSpeed = -40; } timer = 10; } onClipEvent (enterFrame) { if (timer > 0) { --timer; _root.enemy._x -= _root.enemy.xSpeed; } else { _root.enemy.attackTimer = 40; _root.enemy.enemyStatus = 'normal'; } } } } movieClip 976 { frame 1 { _root.sonicspinSound.start(0, 1); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 15 { stop(); _root.sonicrollSound.start(); } instance of movieClip 962 { onClipEvent (load) { if (_root.enemy.faceLeft) { _root.enemy.xSpeed = 27; } else { _root.enemy.xSpeed = -27; } timer = 30; } onClipEvent (enterFrame) { if (timer > 0) { --timer; _root.enemy._x -= _root.enemy.xSpeed; } else { _root.turnFunction(); _root.enemy.attackTimer = 40; _root.enemy.enemyStatus = 'normal'; } } } } movieClip 979 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 962 { onClipEvent (enterFrame) { if (_parent.ySpeed == 0 && _parent.jumping) { blast = Math.ceil(Math.random() * 2); if (blast == 1) { _parent.jumping = false; _parent.falling = false; _parent.enemyStatus = 'attack3'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance footBase of movieClip 226 { onClipEvent (load) { timer = 16; _visible = false; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 226 { onClipEvent (load) { _root.sonicdeathSound.start(0, 1); _global.coinTotal += 30; ++_global.yoshiTotal; _visible = false; _root.resetFunction(); timer = 50; ySpeed = 10; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (!_global.teamSonicDefeated) { ++_global.enemiesDefeated; _global.teamSonicDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } if (_parent._y < 1000) { --ySpeed; _parent._y -= ySpeed; } } } } instance enemy of movieClip 979 { onClipEvent (load) { enemyStatus = 'normal'; runSpeed = 11; enemyHealth = 6; attackTimer = 35; jumpTimer = 50; jumping = true; falling = false; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'jump') { if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } if (ySpeed > -21) { ySpeed -= 1.5; } _y = _y - ySpeed; if (jumping) { if (ySpeed < 0) { jumping = false; falling = true; } } } if (enemyStatus == 'normal') { if (faceLeft) { _x = _x - runSpeed; } else { _x = _x + runSpeed; } if (jumpTimer > 0) { jumpTimer -= 0.5; } else { _root.turnFunction(); ySpeedSet = 19.5; _root.jumpStartFunction(ySpeedSet, xSpeedSet); } if (attackTimer > 0) { if (jumpTimer > 0) { --attackTimer; } } else { _root.turnFunction(); attacks = 2; _root.enemyAttackFunction(attacks); } } } } movieClip 980 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentEnergy of movieClip 980 { onClipEvent (load) { if (_name != 'parentEnergy') { _root.mechalaser1Sound.start(0, 1); if (!_root.enemy.faceLeft) { _xscale = -_xscale; xSpeed = 40; _x = _root.enemy._x + 25; } else { xSpeed = -40; _x = _root.enemy._x - 25; } _y = _root.enemy._y - 45; } } onClipEvent (enterFrame) { if (_name != 'parentEnergy') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x + xSpeed; if (_x < -100 or _x > 825) { this.removeMovieClip(); } } } } frame 294 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 987 { } movieClip 988 { frame 3 { stop(); _root.mechaslideSound.start(0, 1); } } movieClip 994 { } movieClip 995 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 9 { stop(); } instance of movieClip 994 { onClipEvent (load) { _root.mechabladeSound.start(0, 1); if (_root.enemy.faceLeft) { _root.enemy.xSpeed = 30; } else { _root.enemy.xSpeed = -30; } timer = 30; } onClipEvent (enterFrame) { if (timer > 0) { --timer; _root.enemy._x -= _root.enemy.xSpeed; } else { _root.turnFunction(); _root.enemy.attackTimer = 30; _root.enemy.enemyStatus = 'normal'; } } } } movieClip 998 { } movieClip 1003 { } movieClip 1005 { instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.parentEnergy.duplicateMovieClip('energy' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.parentEnergy.duplicateMovieClip('energy' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.parentEnergy.duplicateMovieClip('energy' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.enemy.attackTimer = 30; _root.enemy.enemyStatus = 'normal'; } } } movieClip 1009 { frame 1 { stop(); } } movieClip 1010 { } movieClip 1011 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 998 { onClipEvent (load) { _root.mechadashSound.start(0, 1); if (_root.enemy.faceLeft) { _root.enemy.xSpeed = 35; xFactor = 1.25; } else { _root.enemy.xSpeed = -35; xFactor = -1.25; } timer = 28; } onClipEvent (enterFrame) { --timer; if (_root.enemy.faceLeft) { xFactor = 1.25; } else { xFactor = -1.25; } if (timer > 0) { _root.enemy._x -= _root.enemy.xSpeed; _root.enemy.xSpeed -= xFactor; } else { _root.turnFunction(); _root.enemy.attackTimer = 30; _root.enemy.enemyStatus = 'normal'; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 1003 { onClipEvent (load) { timer = 40; } onClipEvent (enterFrame) { if (timer > 0) { --timer; } else { _root.turnFunction(); _root.enemy.attackTimer = 30; _root.enemy.enemyStatus = 'normal'; } } } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 1009 { onClipEvent (load) { timer = 15; } onClipEvent (enterFrame) { --timer; if (timer == 8) { this.play(); } if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 1010 { onClipEvent (load) { _root.mechadeathSound.start(0, 1); _global.coinTotal += 20; ++_global.yoshiTotal; _root.resetFunction(); } onClipEvent (enterFrame) { if (_root.enemy._alpha < -30) { if (!_global.mechaSonicDefeated) { ++_global.enemiesDefeated; _global.mechaSonicDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } _parent._alpha -= 3; } } } instance enemy of movieClip 1011 { onClipEvent (load) { enemyStatus = 'normal'; runSpeed = 12; enemyHealth = 10; attackTimer = 30; runTimer = 18; jumping = true; falling = false; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'run') { if (runTimer > 0) { --runTimer; } else { enemyStatus = 'normal'; runTimer = 18; } if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } } if (enemyStatus == 'normal') { if (runTimer > 0) { --runTimer; } else { _root.turnFunction(); enemyStatus = 'run'; runTimer = 25; xSpeed = 18; } if (attackTimer > 0) { if (runTimer > 0) { --attackTimer; } } else { _root.turnFunction(); attacks = 4; _root.enemyAttackFunction(attacks); } } } } instance parentEnergy of movieClip 980 { onClipEvent (load) { if (_name != 'parentEnergy') { _root.mechalaser1Sound.start(0, 1); if (!_root.enemy.faceLeft) { _xscale = -_xscale; xSpeed = 35; _x = _root.enemy._x + 35; } else { xSpeed = -35; _x = _root.enemy._x - 35; } _y = _root.enemy._y - 75; } } onClipEvent (enterFrame) { if (_name != 'parentEnergy') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x + xSpeed; if (_x < -100 or _x > 825) { this.removeMovieClip(); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 295 { stop(); } frame 296 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 1015 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentBall of movieClip 1015 { onClipEvent (load) { if (_name != 'parentBall') { _root.mechalaser1Sound.start(0, 1); faceLeft = _root.enemy.faceLeft; if (faceLeft) { _x = _root.enemy._x - 40; xSpeed = 30; } else { _x = _root.enemy._x + 40; xSpeed = -30; } _y = _root.enemy._y - 42; } } onClipEvent (enterFrame) { if (_name != 'parentBall') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x - xSpeed; if (_x < -75 or _x > 800) { this.removeMovieClip(); } } } } movieClip 1022 { } movieClip 1023 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 5 { stop(); } instance of movieClip 1022 { onClipEvent (load) { _root.mechadashSound.start(0, 1); if (_root.enemy.faceLeft) { _root.enemy.xSpeed = 40; xFactor = 1; } else { _root.enemy.xSpeed = -40; xFactor = -1; } timer = 28; } onClipEvent (enterFrame) { --timer; if (_root.enemy.faceLeft) { xFactor = 1; } else { xFactor = -1; } if (timer > 0) { _root.enemy._x -= _root.enemy.xSpeed; _root.enemy.xSpeed -= xFactor; } else { _root.turnFunction(); _root.enemy.attackTimer = 15; _root.enemy.enemyStatus = 'normal'; } } } } movieClip 1031 { } movieClip 1032 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 6 { stop(); } instance of movieClip 1031 { onClipEvent (load) { _root.mechabladeSound.start(0, 1); if (_root.enemy.faceLeft) { _root.enemy.xSpeed = 32; } else { _root.enemy.xSpeed = -32; } timer = 45; } onClipEvent (enterFrame) { --timer; if (_root.enemy.faceLeft) { _root.enemy.xSpeed = 32; } else { _root.enemy.xSpeed = -32; } if (timer > 0) { _root.enemy._x -= _root.enemy.xSpeed; } else { _parent.play(); } } } frame 11 { _root.enemy.attackTimer = 15; _root.enemy.enemyStatus = 'normal'; } } movieClip 1036 { frame 3 { stop(); } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; timer = 15; } onClipEvent (enterFrame) { if (timer > 0) { --timer; _root.enemy._y -= 20; } else { _parent.play(); } } } frame 6 { stop(); } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; timer = 40; faceLeft = _root.enemy.faceLeft; if (faceLeft) { xSpeed = 12; } else { xSpeed = -12; } } onClipEvent (enterFrame) { faceLeft = _root.enemy.faceLeft; if (faceLeft) { xSpeed = 12; } else { xSpeed = -12; } if (timer > 0) { if (timer == 30 or timer == 20 or timer == 10) { _root.parentLaser.duplicateMovieClip('laser' + _root.i, _root.getNextHighestDepth()); ++_root.i; } --timer; _root.enemy._x -= xSpeed; } else { _parent.play(); } } } frame 7 { stop(); } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; timer = 15; } onClipEvent (enterFrame) { if (timer > 0) { --timer; _root.enemy._y += 20; } else { _parent.play(); } } } frame 10 { _root.enemy.attackTimer = 15; _root.enemy.enemyStatus = 'normal'; } } movieClip 1039 { } movieClip 1040 { frame 3 { stop(); _root.mechaslideSound.start(0, 1); } instance of movieClip 1039 { onClipEvent (load) { if (_root.enemy.faceLeft) { _root.enemy.xSpeed = 25; } else { _root.enemy.xSpeed = -25; } timer = 25; } onClipEvent (enterFrame) { --timer; if (_root.enemy.faceLeft) { _root.enemy.xSpeed = 25; } else { _root.enemy.xSpeed = -25; } if (timer > 0) { _root.enemy._x -= _root.enemy.xSpeed; } else { _parent.play(); } } } frame 6 { _root.enemy.attackTimer = 15; _root.enemy.enemyStatus = 'normal'; } } movieClip 1045 { frame 11 { _root.parentBall.duplicateMovieClip('ball' + _root.i, _root.getNextHighestDepth()); ++_root.i; } frame 15 { _root.enemy.attackTimer = 15; _root.enemy.enemyStatus = 'normal'; } } movieClip 1050 { } movieClip 1051 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _root.mechachargeSound.start(0, 1); _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 20; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 15; } _parent.vulnerableTimer = 28; _parent.enemyStatus = 'charging'; } } } instance of movieClip 1010 { onClipEvent (load) { _root.mechadeathSound.start(0, 1); _global.coinTotal += 40; ++_global.yoshiTotal; _root.resetFunction(); } onClipEvent (enterFrame) { if (_root.enemy._alpha < -30) { if (!_global.superMechaDefeated) { ++_global.enemiesDefeated; _global.superMechaDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } _parent._alpha -= 3; } } } instance enemy of movieClip 1051 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 8; vulnerableTimer = 75; attackTimer = 15; attackNumber = 4; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'vulnerable') { if (vulnerableTimer > 0) { --vulnerableTimer; } else { vulnerableTimer = 28; enemyStatus = 'charging'; } } if (enemyStatus == 'charging') { if (vulnerableTimer > 0) { --vulnerableTimer; } else { attackNumber = 4; enemyStatus = 'normal'; } } if (enemyStatus == 'normal') { if (attackNumber <= 0) { vulnerableTimer = 65; enemyStatus = 'vulnerable'; } if (attackTimer > 0) { --attackTimer; } else { _root.turnFunction(); attacks = 5; --attackNumber; _root.enemyAttackFunction(attacks); } } } } movieClip 1053 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentLaser of movieClip 1053 { onClipEvent (load) { if (_name != 'parentLaser') { _root.mechalaser2Sound.start(0, 1); _y = _root.enemy._y + 25; _x = _root.enemy._x; ySpeed = 16; } } onClipEvent (enterFrame) { if (_name != 'parentLaser') { if (_global.resetDuplicates) { this.removeMovieClip(); } _y = _y + ySpeed; if (_y > 650) { this.removeMovieClip(); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 297 { stop(); } frame 298 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 270; startY = 330; } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); _root.parentStuff.duplicateMovieClip('highGround', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); _root.parentStuff.duplicateMovieClip('highGround', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_y > 625) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); } if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_y > 625) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); } if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); _root.resetFunction(); } } } } movieClip 1058 { } instance parentStuff of movieClip 1058 { onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 299 { stop(); } movieClip 1061 { } movieClip 1063 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { timer = 50; _global.coinTotal += 10; ++_global.yoshiTotal; _root.resetFunction(); _visible = false; startX = _parent._x; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (!_global.flameRobotnikDefeated) { ++_global.enemiesDefeated; _global.flameRobotnikDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } _parent._x = startX + Math.random() * 6 - 3; _parent._y += 2; } } } instance enemy of movieClip 1063 { onClipEvent (load) { startXScale = _xscale; enemyHealth = 9; enemyStatus = 'normal'; startFlame = true; faceLeft = true; attackTimer = 40; _y = 660; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus != 'death') { if (attackTimer > 0) { --attackTimer; if (attackTimer == 1) { enemyStatus = 'normal'; _y = 660; if (_root.character._x > Stage.width / 2) { _x = 550; } else { _x = 150; } if (_root.character._x > _x) { faceLeft = false; _xscale = -startXScale; } else { faceLeft = true; _xscale = startXScale; } } if (_y < 660) { _y = _y + Math.abs(_y - 660) / 8; } } else { if (_y > 540) { _y = _y - Math.abs(_y - 550) / 8; } if (_y == 550) { if (startFlame) { _root.parentFlame.duplicateMovieClip('flame' + _root.i, _root.getNextHighestDepth()); ++_root.i; startFlame = false; } } } } } } movieClip 1072 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 17 { stop(); } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (_parent._name != 'parentFlame') { _root.enemy.attackTimer = 40; _root.enemy.startFlame = true; _parent.removeMovieClip(); } } } } instance parentFlame of movieClip 1072 { onClipEvent (load) { if (_name != 'parentFlame') { _root.robotnikfireSound.start(0, 1); if (!_root.enemy.faceLeft) { _x = _root.enemy._x + 50; } else { _xscale = -_xscale; _x = _root.enemy._x - 50; } _y = _root.enemy._y - 126; } } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } } } frame 300 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 1077 { } movieClip 1080 { frame 4 { stop(); } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.parentFire1.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); _root['fire' + _root.i].positionVar = 'pos1'; ++_root.i; } } } movieClip 1083 { frame 4 { stop(); } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.parentFire1.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); _root['fire' + _root.i].positionVar = 'pos2'; ++_root.i; } } } movieClip 1086 { frame 4 { stop(); } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.parentFire1.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); _root['fire' + _root.i].positionVar = 'pos2'; ++_root.i; } } } movieClip 1089 { frame 4 { stop(); } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.parentFire2.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); _root['fire' + _root.i].positionVar = 'pos1'; ++_root.i; } } } movieClip 1092 { frame 4 { stop(); } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.parentFire2.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); _root['fire' + _root.i].positionVar = 'pos2'; ++_root.i; } } } movieClip 1095 { frame 4 { stop(); } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.parentFire2.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); _root['fire' + _root.i].positionVar = 'pos2'; ++_root.i; } } } movieClip 1098 { } movieClip 1099 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 25; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 1098 { onClipEvent (load) { _global.coinTotal += 15; ++_global.yoshiTotal; _root.resetFunction(); } onClipEvent (enterFrame) { if (_root.enemy._alpha < -20) { if (!_global.fireballRobotnikDefeated) { ++_global.enemiesDefeated; _global.fireballRobotnikDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } _parent._alpha -= 2; } } } instance enemy of movieClip 1099 { onClipEvent (load) { enemyStatus = 'normal'; runSpeed = 6; enemyHealth = 8; attackTimer = 30; c = 0; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); _y = _y + Math.cos(c) * 5.5; c += 0.05; if (faceLeft) { _x = _x - runSpeed; } else { _x = _x + runSpeed; } if (_x < -150) { faceLeft = false; _x = -150; _xscale = -startXScale; } if (_x > 875) { faceLeft = true; _x = 875; _xscale = startXScale; } if (enemyStatus != 'injured' and enemyStatus != 'death') { if (attackTimer > 0) { --attackTimer; } else { attackTimer = 35; attacks = 6; _root.enemyAttackFunction(attacks); } } } } movieClip 1105 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentFire1 of movieClip 1105 { onClipEvent (load) { if (_name != 'parentFire1') { _root.robotnikfireSound.start(0, 1); faceLeft = _root.enemy.faceLeft; if (faceLeft) { xSpeed = -12; } else { _xscale = -_xscale; xSpeed = 12; } if (positionVar == 'pos1') { _x = _root.enemy._x; _y = _root.enemy._y; } else { if (faceLeft) { _x = _root.enemy._x - 115; _y = _root.enemy._y; } else { _x = _root.enemy._x + 115; _y = _root.enemy._y; } } ySpeed = 10; } } onClipEvent (enterFrame) { if (_name != 'parentFire1') { if (_global.resetDuplicates) { this.removeMovieClip(); } _y = _y + ySpeed; _x = _x + xSpeed; if (_y > 675) { this.removeMovieClip(); } } } } movieClip 1111 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentFire2 of movieClip 1111 { onClipEvent (load) { if (_name != 'parentFire2') { _root.robotnikfireSound.start(0, 1); faceLeft = _root.enemy.faceLeft; if (positionVar == 'pos1') { _x = _root.enemy._x; _y = _root.enemy._y + 50; } else { if (faceLeft) { _x = _root.enemy._x - 75; _y = _root.enemy._y + 50; } else { _x = _root.enemy._x + 75; _y = _root.enemy._y + 50; } } ySpeed = 10; } } onClipEvent (enterFrame) { if (_name != 'parentFire2') { if (_global.resetDuplicates) { this.removeMovieClip(); } _y = _y + ySpeed; if (_y > 675) { this.removeMovieClip(); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 301 { stop(); } frame 302 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 1115 { } movieClip 1118 { } movieClip 1126 { } movieClip 1128 { frame 6 { stop(); } instance of movieClip 1126 { onClipEvent (enterFrame) { _y = _y - 6; } } } movieClip 1129 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 1118 { onClipEvent (load) { timer = 30; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { _parent.enemyStatus = 'normal'; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 1128 { onClipEvent (load) { timer = 60; _global.coinTotal += 5; ++_global.yoshiTotal; _root.resetFunction(); } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (!_global.drillRobotnikDefeated) { ++_global.enemiesDefeated; _global.drillRobotnikDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } } } } instance enemy of movieClip 1129 { onClipEvent (load) { enemyStatus = 'normal'; faceLeft = true; enemyHealth = 9; xSpeed = 8; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus != 'death') { if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } if (_x < -175) { _xscale = -startXScale; _x = -175; enemyStatus = 'normal'; faceLeft = false; _root.parentDrill.duplicateMovieClip('drill' + _root.i, _root.getNextHighestDepth()); ++_root.i; } if (_x > 900) { _xscale = startXScale; _x = 900; enemyStatus = 'normal'; faceLeft = true; _root.parentDrill.duplicateMovieClip('drill' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } } } movieClip 1131 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentDrill of movieClip 1131 { onClipEvent (load) { if (_name != 'parentDrill') { _root.drillshotSound.start(0, 1); if (_root.enemy.faceLeft) { xSpeed = 15; } else { _x = -50; _xscale = -_xscale; xSpeed = -15; } } } onClipEvent (enterFrame) { if (_name != 'parentDrill') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x - xSpeed; if (_x < -100 or _x > 825) { this.removeMovieClip(); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 303 { stop(); } frame 304 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 160; startY = 400; } movieClip 1136 { } movieClip 1141 { } movieClip 1143 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { timer = 6; _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); ++_root.i; _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } if (timer >= 0) { --timer; } else { _root.enemy.attackTimer = 45; _root.enemy.enemyStatus = 'normal'; } } } instance of movieClip 1141 { onClipEvent (load) { timer = 27; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 30; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; _global.coinTotal += 5; ++_global.yoshiTotal; _root.resetFunction(); } onClipEvent (enterFrame) { _parent._alpha -= 3; if (_root.enemy._alpha < -30) { if (!_global.robirdoDefeated) { ++_global.enemiesDefeated; _global.robirdoDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } } } } instance enemy of movieClip 1143 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 9; attackTimer = 45; faceLeft = true; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { if (attackTimer > 0) { --attackTimer; } else { attacks = 1; _root.enemyAttackFunction(attacks); } } } } movieClip 1145 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentBullet of movieClip 1145 { onClipEvent (load) { if (_name != 'parentBullet') { _root.yoshispitSound.start(0, 1); xSpeed = -10; _x = _root.enemy._x - 65; _y = _root.enemy._y - 145; } } onClipEvent (enterFrame) { if (_name != 'parentBullet') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x + xSpeed; if (_x < -100) { this.removeMovieClip(); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_y > 625) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); } if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_y > 625) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); } if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 305 { stop(); } frame 306 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 1149 { } movieClip 1150 { frame 1 { _root.crocomirefireSound.start(0, 1); } } movieClip 1153 { frame 8 { stop(); } } movieClip 1154 { frame 10 { _root.enemy.castleKamek.enemyStatus = 'normal'; } } movieClip 1156 { } movieClip 1157 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { _root.enemy.death = true; _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 12; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 1156 { onClipEvent (load) { _root.enemy.death = true; _root.enemy.ySpeed = 0; } } } movieClip 1159 { instance of movieClip 1150 { onClipEvent (enterFrame) { if (!_parent.death) { if (_parent.ySpeed > 0) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } else { this.gotoAndStop(1); } } } instance castleKamek of movieClip 1157 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 6; attackTimer = 150; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { if (_root.character._x < _root.enemy._x) { faceLeft = true; } else { faceLeft = false; } if (faceLeft) { _xscale = startXScale; } else { _xscale = -startXScale; } if (enemyStatus == 'attack1') { _root.kamek.activated = true; } this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { --attackTimer; if (attackTimer <= 0) { attackTimer = 150; _root.kamek._y = Math.random() * 600; if (_root.kamek._y < 100) { _root.kamek._y = 100; } if (_root.kamek._y > 450) { _root.kamek._y = 450; } _root.kamek.faceLeft = true; enemyStatus = 'attack1'; } } } } } instance enemy of movieClip 1159 { onClipEvent (load) { ySpeed = 5; xSpeed = 5; attackTimer = 50; faceLeft = true; startY = _y; startXScale = _xscale; death = false; } onClipEvent (enterFrame) { if (!death) { ySpeed -= 0.05; _y = _y - ySpeed; _x = _x - xSpeed; if (faceLeft) { _xscale = startXScale; xSpeed = 5; } else { _xscale = -startXScale; xSpeed = -5; } if (_x < -175) { _y = startY; faceLeft = false; _x = -175; ySpeed = 5; } if (_x > 900) { _y = startY; faceLeft = true; _x = 900; ySpeed = 5; } --attackTimer; if (attackTimer <= 0) { _root.bulletbillSound.start(0, 1); _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].xPos = 'pos1'; ++_root.i; _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].xPos = 'pos2'; ++_root.i; attackTimer = 65; } } else { _root.resetFunction(); if (_y <= -500) { if (!_global.flyingCastleDefeated) { ++_global.enemiesDefeated; _global.flyingCastleDefeated = true; } _global.coinTotal += 20; ++_global.yoshiTotal; _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } _y = _y - ySpeed; ++ySpeed; } } } instance parentBullet of movieClip 410 { onClipEvent (load) { if (_name != 'parentBullet') { if (_root.character._y < _root.enemy._y) { _yscale = -_yscale; _y = _root.enemy._y - 230; ySpeed = 10; } else { ySpeed = -10; _y = _root.enemy._y - 125; } if (xPos == 'pos1') { _x = _root.enemy._x - 101; } else { _x = _root.enemy._x + 101; _xscale = -_xscale; } } } onClipEvent (enterFrame) { if (_name != 'parentBullet') { if (_global.resetDuplicates) { this.removeMovieClip(); } _y = _y - ySpeed; if (_y < -100 or _y > 625) { this.removeMovieClip(); } } } } movieClip 1165 { instance of movieClip 226 { onClipEvent (load) { _visible = false; _parent.xSpeed = -1.5; } onClipEvent (enterFrame) { _parent._x += _parent.xSpeed; if (_parent._x < -100) { _parent._x = 825; } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_y > 625) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); } if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_y > 625) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); } if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); _root.resetFunction(); } } } } movieClip 1168 { frame 1 { stop(); } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance kamek of movieClip 1168 { onClipEvent (load) { activated = false; faceLeft = true; xSpeed = 15; startXScale = _xscale; } onClipEvent (enterFrame) { if (activated) { if (faceLeft) { _xscale = startXScale; _x = _x - xSpeed; } else { _xscale = -startXScale; _x = _x + xSpeed; } if (_x < -100) { _x = -100; _y = Math.random() * 600; if (_y < 100) { _y = 100; } if (_y > 450) { _y = 450; } faceLeft = false; } if (_x > 1000 && !faceLeft) { _root.enemy.castleKamek.enemyStatus = 'surface'; faceLeft = true; activated = false; } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 307 { stop(); } instance of movieClip 366 { onClipEvent (enterFrame) { _x = _root.bird1._x - 50; _y = _root.bird1._y - 90; if (hitTest(_root.character.footBase) && _root.character.ySpeed <= 0) { _root.character._x += _root.bird1.xSpeed; } } } instance of movieClip 366 { onClipEvent (enterFrame) { _x = _root.bird2._x - 50; _y = _root.bird2._y - 90; if (hitTest(_root.character.footBase) && _root.character.ySpeed <= 0) { _root.character._x += _root.bird2.xSpeed; } } } instance of movieClip 366 { onClipEvent (enterFrame) { _x = _root.bird3._x - 50; _y = _root.bird3._y - 90; if (hitTest(_root.character.footBase) && _root.character.ySpeed <= 0) { _root.character._x += _root.bird3.xSpeed; } } } instance of movieClip 366 { onClipEvent (enterFrame) { _x = _root.bird4._x - 50; _y = _root.bird4._y - 90; if (hitTest(_root.character.footBase) && _root.character.ySpeed <= 0) { _root.character._x += _root.bird4.xSpeed; } } } instance of movieClip 366 { onClipEvent (enterFrame) { _x = _root.bird5._x - 50; _y = _root.bird5._y - 90; if (hitTest(_root.character.footBase) && _root.character.ySpeed <= 0) { _root.character._x += _root.bird5.xSpeed; } } } instance of movieClip 366 { onClipEvent (enterFrame) { _x = _root.bird6._x - 50; _y = _root.bird6._y - 90; if (hitTest(_root.character.footBase) && _root.character.ySpeed <= 0) { _root.character._x += _root.bird6.xSpeed; } } } instance of movieClip 366 { onClipEvent (enterFrame) { _x = _root.bird7._x - 50; _y = _root.bird7._y - 90; if (hitTest(_root.character.footBase) && _root.character.ySpeed <= 0) { _root.character._x += _root.bird7.xSpeed; } } } frame 308 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 30; startY = 330; } movieClip 1172 { } movieClip 1174 { } movieClip 1177 { frame 13 { --_root.enemyControl.enemyCounter; _root.plant4.enemyStatus = 'down'; } } movieClip 1178 { frame 20 { _root.plant4.enemyStatus = 'normal'; } } movieClip 1181 { } movieClip 1182 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { --_root.enemyControl.enemyCounter; _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance pipe of movieClip 1174 { onClipEvent (load) { startXScale = _xscale; } onClipEvent (enterFrame) { if (_parent.faceLeft) { _xscale = startXScale; } else { _xscale = -startXScale; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 18; } onClipEvent (enterFrame) { --timer; if (timer == 15 or timer == 10 or timer == 5) { _root.parentFire.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); ++_root.i; } if (timer <= 0) { _parent.attackTimer = 30; _parent.enemyStatus = 'retreat'; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 20; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 1181 { onClipEvent (load) { _root.flowergrowSound.start(0, 1); ++_root.enemyControl.enemyDeath; } onClipEvent (enterFrame) { if (_y > 2) { _y = _y - 2; } } } } instance plant4 of movieClip 1182 { onClipEvent (load) { enemyStatus = 'down'; this.gotoAndStop(enemyStatus); startXScale = _xscale; enemyHealth = 2; attackTimer = 40; faceLeft = true; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { if (attackTimer > 0) { --attackTimer; } else { _root.turnFunction(); _root.yoshispitSound.start(0, 1); enemyStatus = 'upAttack'; } } if (_root.character._x < _x) { faceLeft = true; this.pipe._xscale = this.pipe.startXScale; _xscale = startXScale; } else { faceLeft = false; this.pipe._xscale = -this.pipe.startXScale; _xscale = -startXScale; } } } movieClip 1185 { } movieClip 1187 { } movieClip 1190 { } movieClip 1191 { frame 13 { --_root.enemyControl.enemyCounter; _root.plant1.enemyStatus = 'down'; } } movieClip 1192 { frame 20 { _root.plant1.enemyStatus = 'normal'; } } movieClip 1194 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { --_root.enemyControl.enemyCounter; _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance pipe of movieClip 1187 { onClipEvent (load) { startXScale = _xscale; } onClipEvent (enterFrame) { if (_parent.faceLeft) { _xscale = startXScale; } else { _xscale = -startXScale; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 8; } onClipEvent (enterFrame) { --timer; if (timer == 2) { _root.parentShell.duplicateMovieClip('shell' + _root.i, _root.getNextHighestDepth()); ++_root.i; } if (timer <= 0) { _parent.attackTimer = 30; _parent.enemyStatus = 'retreat'; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 20; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 1181 { onClipEvent (load) { _root.flowergrowSound.start(0, 1); ++_root.enemyControl.enemyDeath; } onClipEvent (enterFrame) { if (_y > 2) { _y = _y - 2; } } } } instance plant1 of movieClip 1194 { onClipEvent (load) { enemyStatus = 'down'; this.gotoAndStop(enemyStatus); startXScale = _xscale; enemyHealth = 2; attackTimer = 40; faceLeft = true; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { if (attackTimer > 0) { --attackTimer; } else { _root.turnFunction(); _root.yoshispitSound.start(0, 1); enemyStatus = 'downAttack'; } } if (_root.character._x < _x) { faceLeft = true; this.pipe._xscale = this.pipe.startXScale; _xscale = startXScale; } else { faceLeft = false; this.pipe._xscale = -this.pipe.startXScale; _xscale = -startXScale; } } } movieClip 1197 { } movieClip 1199 { } movieClip 1202 { frame 13 { --_root.enemyControl.enemyCounter; _root.plant2.enemyStatus = 'down'; } } movieClip 1203 { frame 20 { _root.plant2.enemyStatus = 'normal'; } } movieClip 1205 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { --_root.enemyControl.enemyCounter; _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance pipe of movieClip 1199 { onClipEvent (load) { startXScale = _xscale; } onClipEvent (enterFrame) { if (_parent.faceLeft) { _xscale = startXScale; } else { _xscale = -startXScale; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 8; } onClipEvent (enterFrame) { --timer; if (timer == 2) { _root.parentSpike.duplicateMovieClip('spike' + _root.i, _root.getNextHighestDepth()); ++_root.i; } if (timer <= 0) { _parent.attackTimer = 30; _parent.enemyStatus = 'retreat'; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 20; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 1181 { onClipEvent (load) { _root.flowergrowSound.start(0, 1); ++_root.enemyControl.enemyDeath; } onClipEvent (enterFrame) { if (_y > 2) { _y = _y - 2; } } } } instance plant2 of movieClip 1205 { onClipEvent (load) { enemyStatus = 'down'; this.gotoAndStop(enemyStatus); startXScale = _xscale; enemyHealth = 2; attackTimer = 40; faceLeft = true; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { if (attackTimer > 0) { --attackTimer; } else { _root.turnFunction(); _root.yoshispitSound.start(0, 1); enemyStatus = 'upAttack'; } } if (_root.character._x < _x) { faceLeft = true; this.pipe._xscale = this.pipe.startXScale; _xscale = startXScale; } else { faceLeft = false; this.pipe._xscale = -this.pipe.startXScale; _xscale = -startXScale; } } } movieClip 1208 { } movieClip 1210 { } movieClip 1213 { frame 13 { --_root.enemyControl.enemyCounter; _root.plant3.enemyStatus = 'down'; } } movieClip 1214 { frame 20 { _root.plant3.enemyStatus = 'normal'; } } movieClip 1216 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { --_root.enemyControl.enemyCounter; _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance pipe of movieClip 1210 { onClipEvent (load) { startXScale = _xscale; } onClipEvent (enterFrame) { if (_parent.faceLeft) { _xscale = startXScale; } else { _xscale = -startXScale; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 8; } onClipEvent (enterFrame) { --timer; if (timer == 2) { _root.parentGhost.duplicateMovieClip('ghost' + _root.i, _root.getNextHighestDepth()); ++_root.i; } if (timer <= 0) { _parent.attackTimer = 30; _parent.enemyStatus = 'retreat'; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 20; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 1181 { onClipEvent (load) { _root.flowergrowSound.start(0, 1); ++_root.enemyControl.enemyDeath; } onClipEvent (enterFrame) { if (_y > 2) { _y = _y - 2; } } } } instance plant3 of movieClip 1216 { onClipEvent (load) { enemyStatus = 'down'; this.gotoAndStop(enemyStatus); startXScale = _xscale; enemyHealth = 2; attackTimer = 40; faceLeft = true; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { if (attackTimer > 0) { --attackTimer; } else { _root.turnFunction(); _root.yoshispitSound.start(0, 1); enemyStatus = 'upAttack'; } } if (_root.character._x < _x) { faceLeft = true; this.pipe._xscale = this.pipe.startXScale; _xscale = startXScale; } else { faceLeft = false; this.pipe._xscale = -this.pipe.startXScale; _xscale = -startXScale; } } } movieClip 1219 { } movieClip 1221 { } movieClip 1224 { frame 13 { --_root.enemyControl.enemyCounter; _root.plant5.enemyStatus = 'down'; } } movieClip 1225 { frame 20 { _root.plant5.enemyStatus = 'normal'; } } movieClip 1227 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { --_root.enemyControl.enemyCounter; _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance pipe of movieClip 1221 { onClipEvent (load) { startXScale = _xscale; } onClipEvent (enterFrame) { if (_parent.faceLeft) { _xscale = startXScale; } else { _xscale = -startXScale; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 8; } onClipEvent (enterFrame) { --timer; if (timer == 2) { _root.parentFlame.duplicateMovieClip('flame' + _root.i, _root.getNextHighestDepth()); ++_root.i; } if (timer <= 0) { _parent.attackTimer = 30; _parent.enemyStatus = 'retreat'; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 20; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 1181 { onClipEvent (load) { _root.flowergrowSound.start(0, 1); ++_root.enemyControl.enemyDeath; } onClipEvent (enterFrame) { if (_y > 2) { _y = _y - 2; } } } } instance plant5 of movieClip 1227 { onClipEvent (load) { enemyStatus = 'down'; this.gotoAndStop(enemyStatus); enemyHealth = 2; startXScale = _xscale; attackTimer = 40; faceLeft = true; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { if (attackTimer > 0) { --attackTimer; } else { _root.turnFunction(); _root.yoshispitSound.start(0, 1); enemyStatus = 'downAttack'; } } if (_root.character._x < _x) { faceLeft = true; this.pipe._xscale = this.pipe.startXScale; _xscale = startXScale; } else { faceLeft = false; this.pipe._xscale = -this.pipe.startXScale; _xscale = -startXScale; } } } movieClip 1230 { } movieClip 1232 { } movieClip 1236 { frame 13 { --_root.enemyControl.enemyCounter; _root.plant6.enemyStatus = 'down'; } } movieClip 1237 { frame 20 { _root.plant6.enemyStatus = 'normal'; } } movieClip 1239 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { --_root.enemyControl.enemyCounter; _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance pipe of movieClip 1232 { onClipEvent (load) { startXScale = _xscale; } onClipEvent (enterFrame) { if (_parent.faceLeft) { _xscale = startXScale; } else { _xscale = -startXScale; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 8; } onClipEvent (enterFrame) { --timer; if (timer == 2) { _root.parentBall.duplicateMovieClip('ball' + _root.i, _root.getNextHighestDepth()); ++_root.i; } if (timer <= 0) { _parent.attackTimer = 30; _parent.enemyStatus = 'retreat'; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 20; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 1181 { onClipEvent (load) { _root.flowergrowSound.start(0, 1); ++_root.enemyControl.enemyDeath; } onClipEvent (enterFrame) { if (_y > 2) { _y = _y - 2; } } } } instance plant6 of movieClip 1239 { onClipEvent (load) { enemyStatus = 'down'; this.gotoAndStop(enemyStatus); enemyHealth = 2; startXScale = _xscale; attackTimer = 40; faceLeft = true; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { if (attackTimer > 0) { --attackTimer; } else { _root.turnFunction(); _root.yoshispitSound.start(0, 1); enemyStatus = 'upAttack'; } } if (_root.character._x < _x) { faceLeft = true; this.pipe._xscale = this.pipe.startXScale; _xscale = startXScale; } else { faceLeft = false; this.pipe._xscale = -this.pipe.startXScale; _xscale = -startXScale; } } } movieClip 1242 { } movieClip 1244 { } movieClip 1247 { frame 13 { --_root.enemyControl.enemyCounter; _root.plant7.enemyStatus = 'down'; } } movieClip 1248 { frame 20 { _root.plant7.enemyStatus = 'normal'; } } movieClip 1250 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_parent.enemyHealth <= 0) { --_root.enemyControl.enemyCounter; _parent.enemyStatus = 'death'; } else { _parent.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance pipe of movieClip 1244 { onClipEvent (load) { startXScale = _xscale; } onClipEvent (enterFrame) { if (_parent.faceLeft) { _xscale = startXScale; } else { _xscale = -startXScale; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 8; } onClipEvent (enterFrame) { --timer; if (timer == 2) { _root.parentThing.duplicateMovieClip('thing' + _root.i, _root.getNextHighestDepth()); ++_root.i; } if (timer <= 0) { _parent.attackTimer = 30; _parent.enemyStatus = 'retreat'; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 20; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 1181 { onClipEvent (load) { _root.flowergrowSound.start(0, 1); ++_root.enemyControl.enemyDeath; } onClipEvent (enterFrame) { if (_y > 2) { _y = _y - 2; } } } } instance plant7 of movieClip 1250 { onClipEvent (load) { enemyStatus = 'down'; this.gotoAndStop(enemyStatus); enemyHealth = 2; startXScale = _xscale; attackTimer = 40; faceLeft = true; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { if (attackTimer > 0) { --attackTimer; } else { _root.turnFunction(); _root.yoshispitSound.start(0, 1); enemyStatus = 'downAttack'; } } if (_root.character._x < _x) { faceLeft = true; this.pipe._xscale = this.pipe.startXScale; _xscale = startXScale; } else { faceLeft = false; this.pipe._xscale = -this.pipe.startXScale; _xscale = -startXScale; } } } movieClip 1253 { frame 1 { stop(); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { timer = 4; _visible = false; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { _parent.ySpeed = Math.ceil(Math.random() * 10) + 8; _parent.gotoAndStop(1); } } } } instance parentSpike of movieClip 1253 { onClipEvent (load) { if (_name != 'parentSpike') { ySpeed = 10; _y = _root.plant2._y - 60; if (_root.plant2.faceLeft) { xSpeed = 3; _x = _root.plant2._x - 18; } else { xSpeed = -3; _xscale = -_xscale; _x = _root.plant2._x + 18; } } } onClipEvent (enterFrame) { if (_name != 'parentSpike') { if (_global.resetDuplicates) { this.removeMovieClip(); } _y = _y - ySpeed; --ySpeed; if (!hitTest(_root.ground)) { _x = _x - xSpeed; } else { _y = _root.ground._y; this.gotoAndStop(2); } if (_x < -50 or _x > 775 or _y > 625) { this.removeMovieClip(); } } } } movieClip 1256 { frame 1 { stop(); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentGhost of movieClip 1256 { onClipEvent (load) { if (_name != 'parentGhost') { timer = 75; startXScale = _xscale; _y = _root.plant3._y - 60; if (_root.plant3.faceLeft) { _x = _root.plant3._x - 20; } else { _xscale = -_xscale; _x = _root.plant3._x + 20; } } } onClipEvent (enterFrame) { if (_name != 'parentGhost') { if (_global.resetDuplicates) { this.removeMovieClip(); } --timer; if (timer <= 0) { _alpha = _alpha - 5; } if (_alpha <= 0) { this.removeMovieClip(); } if (_root.character._x > _x) { faceLeft = false; } if (_root.character._x < _x) { faceLeft = true; } if (faceLeft) { _xscale = startXScale; } else { _xscale = -startXScale; } ySpeed = Math.abs(_y - _root.character._y) / 25; xSpeed = Math.abs(_x - _root.character._x) / 25; if (ySpeed > 8) { ySpeed = 8; } if (xSpeed > 8) { xSpeed = 8; } if (ySpeed > 3) { ySpeed = 3; } if (xSpeed > 3) { xSpeed = 3; } if (_y < _root._root.character._y) { _y = _y + ySpeed; } else { _y = _y - ySpeed; } if (_x < _root.character._x) { _x = _x + xSpeed; } else { _x = _x - xSpeed; } } } } movieClip 1259 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentFire of movieClip 1259 { onClipEvent (load) { if (_name != 'parentFire') { ySpeed = 21; _y = _root.plant4._y - 60; if (_root.plant4.faceLeft) { xSpeed = 3; _x = _root.plant4._x - 20; } else { xSpeed = -3; _x = _root.plant4._x + 20; } } } onClipEvent (enterFrame) { if (_name != 'parentFire') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x - xSpeed; _y = _y - ySpeed; --ySpeed; if (_y > 625) { this.removeMovieClip(); } } } } movieClip 1262 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentFlame of movieClip 1262 { onClipEvent (load) { if (_name != 'parentFlame') { timer = 40; startXScale = _xscale; _y = _root.plant5._y - 28; if (_root.plant5.faceLeft) { _x = _root.plant5._x - 57; } else { _xscale = -_xscale; _x = _root.plant5._x + 57; } } } onClipEvent (enterFrame) { if (_name != 'parentFlame') { if (_global.resetDuplicates) { this.removeMovieClip(); } --timer; if (timer <= 0) { _alpha = _alpha - 15; } if (_alpha <= 0) { this.removeMovieClip(); } if (_root.character._x > _x) { faceLeft = false; } if (_root.character._x < _x) { faceLeft = true; } if (faceLeft) { _xscale = startXScale; } else { _xscale = -startXScale; } ySpeed = Math.abs(_y - _root.character._y) / 15; xSpeed = Math.abs(_x - _root.character._x) / 15; if (ySpeed > 15) { ySpeed = 15; } if (xSpeed > 15) { xSpeed = 15; } if (ySpeed > 6) { ySpeed = 6; } if (xSpeed > 6) { xSpeed = 6; } if (_y < _root._root.character._y) { _y = _y + ySpeed; } else { _y = _y - ySpeed; } if (_x < _root.character._x) { _x = _x + xSpeed; } else { _x = _x - xSpeed; } } } } movieClip 1267 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentBall of movieClip 1267 { onClipEvent (load) { if (_name != 'parentBall') { timer = 100; ySpeed = Math.ceil(Math.random() * 12) + 15; _y = _root.plant6._y - 70; if (_root.plant6.faceLeft) { xSpeed = Math.ceil(Math.random() * 8); _x = _root.plant6._x - 15; } else { xSpeed = -Math.ceil(Math.random() * 8); _x = _root.plant6._x + 15; } } } onClipEvent (enterFrame) { if (_name != 'parentBall') { if (_global.resetDuplicates) { this.removeMovieClip(); } --timer; if (timer <= 0) { _alpha = _alpha - 20; } if (_alpha <= 0) { this.removeMovieClip(); } _y = _y - ySpeed; if (!hitTest(_root.ground)) { _x = _x - xSpeed; --ySpeed; } else { this.gotoAndStop(1); _y = _root.ground._y - 10; } if (_x < -50 or _x > 775 or _y > 625) { this.removeMovieClip(); } } } } movieClip 1269 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentShell of movieClip 1269 { onClipEvent (load) { if (_name != 'parentShell') { _y = _root.plant1._y - 28; if (_root.plant1.faceLeft) { _x = _root.plant1._x - 57; xSpeed = 15; } else { _xscale = -_xscale; _x = _root.plant1._x + 57; xSpeed = -15; } } } onClipEvent (enterFrame) { if (_name != 'parentShell') { if (_global.resetDuplicates) { this.removeMovieClip(); } if (!hitTest(_root.ground)) { _y = _y + 5; } else { _y = _root.ground._y; } _x = _x - xSpeed; if (_x < -50 or _x > 775) { this.removeMovieClip(); } } } } movieClip 1271 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentThing of movieClip 1271 { onClipEvent (load) { if (_name != 'parentThing') { _y = _root.plant7._y - 28; ySpeed = 3; if (_root.plant7.faceLeft) { _x = _root.plant7._x - 57; xSpeed = 10; } else { _xscale = -_xscale; _x = _root.plant7._x + 57; xSpeed = -10; } } } onClipEvent (enterFrame) { if (_name != 'parentThing') { if (_global.resetDuplicates) { this.removeMovieClip(); } _y = _y - ySpeed; _x = _x - xSpeed; if (!hitTest(_root.ground)) { ySpeed -= 0.5; } else { ySpeed = 18; _y = _root.ground._y; } if (_x < -50 or _x > 775) { this.removeMovieClip(); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 309 { stop(); } instance ground of movieClip 365 { onClipEvent (load) { _visible = false; } } instance enemyControl of movieClip 226 { onClipEvent (load) { enemyCounter = 0; enemyDeath = 0; timer = 50; } onClipEvent (enterFrame) { if (enemyDeath >= 7) { _global.resetDuplicates = true; if (!_global.piranhaPlantsDefeated) { ++_global.enemiesDefeated; _global.piranhaPlantsDefeated = true; } _global.coinTotal += 40; ++_global.yoshiTotal; _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } if (timer > 0) { --timer; } else { if (enemyCounter < 3) { enemySelect = Math.ceil(Math.random() * 7); if (_root['plant' + enemySelect].enemyStatus == 'down') { _root['plant' + enemySelect].enemyStatus = 'move'; ++enemyCounter; timer = 50; } } } } } frame 310 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 1274 { instance hitSpot of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { q = 1; while (q <= 5) { if (hitTest(_root['flowers' + q].hitSpot)) { _parent._x = _root['flowers' + q]._x; _parent.enemyStatus = 'flowerHide'; } ++q; } } } } movieClip 1290 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 16 { stop(); } } instance parentFire of movieClip 1290 { onClipEvent (load) { if (_name != 'parentFire') { _root.crocomirefireSound.start(0, 1); _x = _root.enemy._x; _y = _root.enemy._y; } } onClipEvent (enterFrame) { if (_name != 'parentFire') { if (_global.resetDuplicates) { this.removeMovieClip(); } if (_currentframe == 16) { this.removeMovieClip(); } } } } movieClip 1293 { frame 1 { stop(); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentFireball of movieClip 1293 { onClipEvent (load) { if (_name != 'parentFireball') { _root.mariofireballSound.start(0, 1); _x = _root.enemy._x; _y = _root.enemy._y; ySpeed = 10; } } onClipEvent (enterFrame) { if (_name != 'parentFireball') { if (_global.resetDuplicates) { this.removeMovieClip(); } _y = _y - ySpeed; --ySpeed; if (ySpeed <= 0) { this.gotoAndStop(2); } if (_y > 650) { this.removeMovieClip(); } } } } movieClip 1299 { } movieClip 1303 { } movieClip 1308 { } movieClip 1310 { frame 50 { _root.enemy.enemyStatus = 'flowerShow'; } } movieClip 1311 { frame 23 { _root.flowers1._visible = true; _root.flowers2._visible = true; _root.flowers3._visible = true; _root.flowers4._visible = true; _root.flowers5._visible = true; _root.parentFire.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); ++_root.i; _root.enemy.enemyStatus = 'fire'; } } movieClip 1315 { frame 11 { _root.enemy.enemyStatus = 'fly'; } } movieClip 1319 { } movieClip 1323 { frame 6 { _root.springjumpSound.start(0, 1); _root.enemy.enemyStatus = 'balloon'; } } movieClip 1325 { } movieClip 1327 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 1299 { onClipEvent (load) { xSpeed = 8; if (_parent.faceLeft) { _parent._x -= xSpeed; } else { _parent._x += xSpeed; } } onClipEvent (enterFrame) { if (_parent.faceLeft) { _parent._x -= xSpeed; } else { _parent._x += xSpeed; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { q = 1; while (q <= 5) { if (hitTest(_root['flowers' + q].hitSpot)) { _root['flowers' + q]._visible = false; _parent._x = _root['flowers' + q]._x; _parent.enemyStatus = 'flowerHide'; } ++q; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 1311 { onClipEvent (load) { setEnemy = Math.ceil(Math.random() * 5); q = 1; while (q <= 5) { _root['flowers' + q]._visible = true; ++q; } switch (setEnemy) { case 1: _root.enemy._x = _root.flowers1._x; _root.flowers1._visible = false; break; case 2: _root.enemy._x = _root.flowers2._x; _root.flowers2._visible = false; break; case 3: _root.enemy._x = _root.flowers3._x; _root.flowers3._visible = false; break; case 4: _root.enemy._x = _root.flowers4._x; _root.flowers4._visible = false; break; case 5: _root.enemy._x = _root.flowers5._x; _root.flowers5._visible = false; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 1319 { onClipEvent (load) { timer = 75; heightTimer = 20; xSpeed = 12; } onClipEvent (enterFrame) { if (heightTimer > 0) { --heightTimer; _parent._y -= 18; } else { if (timer > 0) { --timer; if (timer == 73 or timer == 60 or timer == 45 or timer == 30 or timer == 15) { _root.parentBomb.duplicateMovieClip('bomb' + _root.i, _root.getNextHighestDepth()); ++_root.i; } if (_parent.faceLeft) { _parent._x -= xSpeed; } else { _parent._x += xSpeed; } } else { if (_parent._y < _parent.startY) { _parent._y += 18; } else { _parent._y = _parent.startY; _parent.attackTimer = 30; _parent.enemyStatus = 'normal'; } } } } } instance of movieClip 1325 { onClipEvent (load) { xSpeedSet = 10; ySpeedSet = 28; _root.jumpStartFunction(ySpeedSet, xSpeedSet); } } instance of movieClip 226 { onClipEvent (load) { timer = 15; _visible = false; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 12; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 226 { onClipEvent (load) { _global.coinTotal += 25; ++_global.yoshiTotal; _root.resetFunction(); timer = 50; ySpeed = 12; _visible = false; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (!_global.shyGuyDefeated) { ++_global.enemiesDefeated; _global.shyGuyDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } --ySpeed; _parent._y -= ySpeed; } } } instance enemy of movieClip 1327 { onClipEvent (load) { enemyStatus = 'normal'; startY = _y; enemyHealth = 12; attackTimer = 30; fireTimer = 52; jumping = true; falling = false; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'jump') { if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } if (ySpeed > -21) { --ySpeed; } _y = _y - ySpeed; if (jumping) { if (ySpeed < 0) { jumping = false; falling = true; } } } if (enemyStatus == 'fire') { if (fireTimer > 0) { --fireTimer; if (fireTimer == 35 or fireTimer == 10) { _root.parentFireball.duplicateMovieClip('fireball' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } else { fireTimer = 52; attackTimer = 30; enemyStatus = 'normal'; } xSpeed = 10; if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } } if (enemyStatus == 'normal') { xSpeed = 8; if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } if (attackTimer > 0) { --attackTimer; } else { _root.turnFunction(); attacks = 3; _root.enemyAttackFunction(attacks); } } } } movieClip 1328 { frame 1 { stop(); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 420 { onClipEvent (load) { timer = 8; } onClipEvent (enterFrame) { if (timer > 0) { --timer; } else { _parent.removeMovieClip(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; _root.bombexplodeSound.start(0, 1); } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentBomb of movieClip 1328 { onClipEvent (load) { if (_name != 'parentBomb') { _x = _root.enemy._x; _y = _root.enemy._y; } } onClipEvent (enterFrame) { if (_name != 'parentBomb') { if (_global.resetDuplicates) { this.removeMovieClip(); } if (_currentframe == 1) { _rotation = _rotation + 15; _y = _y + 18; } else { _rotation = 0; } if (hitTest(_root.ground)) { this.gotoAndStop(2); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 311 { stop(); } frame 312 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 210; startY = 240; } movieClip 1332 { } movieClip 1333 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } movieClip 1336 { } movieClip 1345 { } movieClip 1346 { instance of movieClip 1345 { onClipEvent (load) { this.gotoAndStop(1); timer = 30; } onClipEvent (enterFrame) { enemyHealth = _root.enemy.enemyHealth; if (timer > 0) { if (timer == 10) { turretFrame = _currentframe; if (_root.enemy.enemyStatus != 'injured') { _root.bulletDuplicateFunction(turretFrame); } } --timer; } else { if (_currentframe == 8) { this.gotoAndStop(1); } else { this.nextFrame(); } if (enemyHealth >= 6) { timer = 40; } else { if (enemyHealth < 6 && enemyHealth >= 3) { timer = 30; } else { timer = 20; } } } } } } movieClip 1348 { frame 1 { stop(); } instance of movieClip 1333 { onClipEvent (enterFrame) { this.gotoAndStop(_parent.enemyStatus); } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; if (_parent.enemyStatus != 'injured') { --_parent.enemyHealth; } if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 1333 { onClipEvent (load) { _root.resetFunction(); } onClipEvent (enterFrame) { this.gotoAndStop(_parent.enemyStatus); } } instance of movieClip 1345 { onClipEvent (load) { this.play; } } instance of movieClip 1345 { onClipEvent (load) { this.play; } } } instance enemy of movieClip 1348 { onClipEvent (load) { enemyStatus = 'normal'; faceLeft = true; xSpeed = 5; enemyHealth = 9; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus != 'death') { if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } if (_x < -175) { _xscale = -startXScale; _x = -175; enemyStatus = 'normal'; faceLeft = false; } if (_x > 900) { _xscale = startXScale; _x = 900; enemyStatus = 'normal'; faceLeft = true; } } else { if (_alpha < -30) { if (!_global.snifitTankDefeated) { ++_global.enemiesDefeated; _global.snifitTankDefeated = true; } _global.coinTotal += 20; ++_global.yoshiTotal; _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } _alpha = _alpha - 3; } } } movieClip 1350 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentBullet of movieClip 1350 { onClipEvent (enterFrame) { if (_name != 'parentBullet') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x + xSpeed; _y = _y + ySpeed; if (_x < -50 or _x > 875) { this.removeMovieClip(); } if (_y < -50) { this.removeMovieClip(); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 313 { function bulletDuplicateFunction(turretFrame) { _root.rocketexplosionSound.start(0, 1); switch (turretFrame) { case 1: _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].xSpeed = -12; _root['bullet' + _root.i].ySpeed = 0; _root['bullet' + _root.i]._x = _root.enemy._x + 35; _root['bullet' + _root.i]._y = _root.enemy._y - 75; ++_root.i; _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].xSpeed = 12; _root['bullet' + _root.i].ySpeed = 0; _root['bullet' + _root.i]._x = _root.enemy._x - 35; _root['bullet' + _root.i]._y = _root.enemy._y - 75; ++_root.i; break; case 2: _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].xSpeed = -6; _root['bullet' + _root.i].ySpeed = -6; _root['bullet' + _root.i]._x = _root.enemy._x + 50; _root['bullet' + _root.i]._y = _root.enemy._y - 105; ++_root.i; _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].xSpeed = 6; _root['bullet' + _root.i].ySpeed = -6; _root['bullet' + _root.i]._x = _root.enemy._x - 50; _root['bullet' + _root.i]._y = _root.enemy._y - 105; ++_root.i; break; case 3: _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].xSpeed = 0; _root['bullet' + _root.i].ySpeed = -12; _root['bullet' + _root.i]._x = _root.enemy._x + 80; _root['bullet' + _root.i]._y = _root.enemy._y - 125; ++_root.i; _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].xSpeed = 0; _root['bullet' + _root.i].ySpeed = -12; _root['bullet' + _root.i]._x = _root.enemy._x - 80; _root['bullet' + _root.i]._y = _root.enemy._y - 125; ++_root.i; break; case 4: _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].xSpeed = 6; _root['bullet' + _root.i].ySpeed = -6; _root['bullet' + _root.i]._x = _root.enemy._x + 110; _root['bullet' + _root.i]._y = _root.enemy._y - 110; ++_root.i; _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].xSpeed = -6; _root['bullet' + _root.i].ySpeed = -6; _root['bullet' + _root.i]._x = _root.enemy._x - 110; _root['bullet' + _root.i]._y = _root.enemy._y - 110; ++_root.i; break; case 5: _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].xSpeed = 12; _root['bullet' + _root.i].ySpeed = 0; _root['bullet' + _root.i]._x = _root.enemy._x + 125; _root['bullet' + _root.i]._y = _root.enemy._y - 85; ++_root.i; _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].xSpeed = -12; _root['bullet' + _root.i].ySpeed = 0; _root['bullet' + _root.i]._x = _root.enemy._x - 125; _root['bullet' + _root.i]._y = _root.enemy._y - 85; ++_root.i; break; case 6: _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].xSpeed = 6; _root['bullet' + _root.i].ySpeed = -6; _root['bullet' + _root.i]._x = _root.enemy._x + 110; _root['bullet' + _root.i]._y = _root.enemy._y - 110; ++_root.i; _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].xSpeed = -6; _root['bullet' + _root.i].ySpeed = -6; _root['bullet' + _root.i]._x = _root.enemy._x - 110; _root['bullet' + _root.i]._y = _root.enemy._y - 110; ++_root.i; break; case 7: _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].xSpeed = 0; _root['bullet' + _root.i].ySpeed = -12; _root['bullet' + _root.i]._x = _root.enemy._x + 80; _root['bullet' + _root.i]._y = _root.enemy._y - 125; ++_root.i; _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].xSpeed = 0; _root['bullet' + _root.i].ySpeed = -12; _root['bullet' + _root.i]._x = _root.enemy._x - 80; _root['bullet' + _root.i]._y = _root.enemy._y - 125; ++_root.i; break; case 8: _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].xSpeed = -6; _root['bullet' + _root.i].ySpeed = -6; _root['bullet' + _root.i]._x = _root.enemy._x + 50; _root['bullet' + _root.i]._y = _root.enemy._y - 105; ++_root.i; _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); _root['bullet' + _root.i].xSpeed = 6; _root['bullet' + _root.i].ySpeed = -6; _root['bullet' + _root.i]._x = _root.enemy._x - 50; _root['bullet' + _root.i]._y = _root.enemy._y - 105; ++_root.i; } } stop(); } frame 314 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 140; startY = 250; } movieClip 1352 { } instance wigglerBackground of movieClip 1352 { onClipEvent (load) { startX = _x; startY = _y; treesStartX = _root.trees._x; treesStartY = _root.trees._y; rumble = false; } onClipEvent (enterFrame) { if (rumble) { _x = startX + Math.random() * 4 - 2; _y = startY + Math.random() * 4 - 2; _root.trees._x = treesStartX + Math.random() * 4 - 2; _root.trees._y = treesStartY + Math.random() * 4 - 2; _root.highestGround._x = treesStartX + Math.random() * 4 - 2; _root.highestGround._y = treesStartY + Math.random() * 4 - 2; } else { _x = startX; _y = startY; _root.trees._x = treesStartX; _root.trees._y = treesStartY; _root.highestGround._x = treesStartX; _root.highestGround._y = treesStartY; } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); _root.trees.duplicateMovieClip('highGround', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); _root.trees.duplicateMovieClip('highGround', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } movieClip 1357 { } movieClip 1358 { } movieClip 1359 { frame 31 { _root.enemy.attackStatus = 2; } } movieClip 1362 { } movieClip 1363 { } movieClip 1366 { frame 23 { _root.enemy.attackStatus = 3; } } movieClip 1369 { } movieClip 1372 { } movieClip 1379 { frame 45 { stop(); } } movieClip 1380 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_root.enemy.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured' + _parent.attackStatus; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 1362 { onClipEvent (load) { timer = 30; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { _parent.enemyStatus = 'attack' + _parent.attackStatus; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance injured2 of movieClip 1363 { onClipEvent (load) { timer = 30; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { _parent.enemyStatus = 'attack' + _parent.attackStatus; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured' + _parent.attackStatus; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 1372 { onClipEvent (load) { timer = 30; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { _parent.enemyStatus = 'attack' + _parent.attackStatus; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 1379 { onClipEvent (load) { timer = 50; _global.coinTotal += 10; ++_global.yoshiTotal; _root.resetFunction(); } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (!_global.wigglerDefeated) { ++_global.enemiesDefeated; _global.wigglerDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } } } } instance enemy of movieClip 1380 { onClipEvent (load) { enemyStatus = 'attack1'; faceLeft = true; enemyHealth = 15; attackStatus = 1; xSpeed = 0; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus != 'death') { if (enemyHealth <= 10 && enemyHealth > 5) { if (attackStatus == 1) { enemyStatus = 'charge1'; } } if (enemyHealth <= 5) { if (attackStatus == 2) { enemyStatus = 'transform'; } } switch (attackStatus) { case 1: xSpeed = 10; break; case 2: xSpeed = 15; break; case 3: _root.wigglerBackground.rumble = true; xSpeed = 20; } if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } if (_x < -225) { _xscale = -startXScale; _x = -225; enemyStatus = 'attack' + attackStatus; faceLeft = false; } if (_x > 950) { _xscale = startXScale; _x = 950; enemyStatus = 'attack' + attackStatus; faceLeft = true; } } else { _root.wigglerBackground.rumble = false; } } } movieClip 1382 { } instance trees of movieClip 1382 { onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 315 { stop(); } frame 316 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 1386 { } movieClip 1389 { } movieClip 1393 { } movieClip 1399 { frame 1 { _root.dededehammerSound.start(0, 1); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.enemy.attackTimer = 40; _root.enemy.enemyStatus = 'normal'; } } } movieClip 1400 { frame 1 { stop(); } } movieClip 1403 { frame 1 { _root.dededeinhaleSound.start(0, 1); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 4 { stop(); } } movieClip 1406 { frame 1 { _root.dededeinhaleSound.start(0, 1); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 15 { _root.parentStar.duplicateMovieClip('star' + _root.i, _root.getNextHighestDepth()); ++_root.i; } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.enemy.attackTimer = 30; _root.enemy.enemyStatus = 'normal'; } } } movieClip 1409 { frame 2 { stop(); } } movieClip 1413 { frame 25 { stop(); } } movieClip 1414 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 1400 { onClipEvent (enterFrame) { if (_parent.charDistance > 100) { if (_parent.faceLeft) { xSpeed = 14; } else { xSpeed = -14; } _parent._x -= xSpeed; } else { this.gotoAndStop(2); } } } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { _root.enemy._y += 10; if (hitTest(_root.ground)) { _root.enemy._y = _root.ground._y + _root.ground._height; _root.enemy.enemyStatus = 'normal'; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { timer = 15; _visible = false; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 12; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 1413 { onClipEvent (load) { timer = 50; _global.coinTotal += 30; ++_global.yoshiTotal; _root.resetFunction(); } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (!_global.kingDededeDefeated) { ++_global.enemiesDefeated; _global.kingDededeDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } } } } instance enemy of movieClip 1414 { onClipEvent (load) { enemyStatus = 'normal'; xSpeed = 10; enemyHealth = 11; attackTimer = 50; flyTimer = 150; runTimer = 10; jumpTimer = 60; jumping = true; falling = false; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { charDistance = Math.abs(_x - _root.character._x); this.gotoAndStop(enemyStatus); if (enemyStatus == 'fly') { if (flyTimer > 0) { --flyTimer; } else { flyTimer = 150; _root.dededeexhaleSound.start(0, 1); enemyStatus = 'flyFall'; } if (_root.character._x > _x) { faceLeft = false; } if (_root.character._x < _x) { faceLeft = true; } if (faceLeft) { _xscale = startXScale; } else { _xscale = -startXScale; } ySpeed = Math.abs(_y - _root.character._y) / 30; xSpeed = Math.abs(_x - _root.character._x) / 25; if (_y < _root._root.character._y) { _y = _y + ySpeed; } else { _y = _y - ySpeed; } if (_x < _root.character._x) { _x = _x + xSpeed; } else { _x = _x - xSpeed; } } if (enemyStatus == 'jump') { if (flyTimer > 0) { --flyTimer; } else { flyTimer = 60; enemyStatus = 'fly'; } _x = _x - xSpeed; if (ySpeed > -21) { ySpeed -= 1.5; } _y = _y - ySpeed; if (jumping) { if (ySpeed < 0) { jumping = false; falling = true; } } } if (enemyStatus == 'fall') { _x = _x - xSpeed; if (xSpeed > 0) { xSpeed -= 0.5; } if (xSpeed < 0) { xSpeed += 0.5; } if (xSpeed == 0) { enemyStatus = 'normal'; runTimer = 25; } } if (enemyStatus == 'run') { if (flyTimer > 0) { --flyTimer; } else { flyTimer = 60; enemyStatus = 'fly'; } if (jumpTimer > 0) { --jumpTimer; } else { _root.turnFunction(); xSpeedSet = 10; ySpeedSet = 28.5; _root.dededejumpSound.start(0, 1); _root.jumpStartFunction(ySpeedSet, xSpeedSet); } if (charDistance < 100) { if (faceLeft && _root.character._x < _x) { _root.dededefallSound.start(0, 1); enemyStatus = 'fall'; } if (!faceLeft && _root.character._x > _x) { _root.dededefallSound.start(0, 1); enemyStatus = 'fall'; } } if (runTimer > 0) { --runTimer; } else { enemyStatus = 'normal'; runTimer = 25; } if (faceLeft) { xSpeed = 10; } else { xSpeed = -10; } _x = _x - xSpeed; } if (enemyStatus == 'normal') { if (runTimer > 0) { --runTimer; } else { _root.turnFunction(); enemyStatus = 'run'; runTimer = 40; xSpeed = 10; } if (attackTimer > 0) { if (runTimer > 0) { --attackTimer; } } else { _root.turnFunction(); attacks = 2; _root.enemyAttackFunction(attacks); } } } } movieClip 1416 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentStar of movieClip 1416 { onClipEvent (load) { if (_name != 'parentStar') { if (!_root.enemy.faceLeft) { _xscale = -_xscale; xSpeed = 21; rotationSpeed = 20; _x = _root.enemy._x + 40; } else { xSpeed = -21; rotationSpeed = -20; _x = _root.enemy._x - 40; } _y = _root.enemy._y - 40; _root.kirbystarSound.start(0, 1); } } onClipEvent (enterFrame) { if (_name != 'parentStar') { if (_global.resetDuplicates) { this.removeMovieClip(); } _rotation = _rotation + rotationSpeed; _x = _x + xSpeed; _y = _y - ySpeed; if (_x < -50 or _x > 775) { this.removeMovieClip(); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 317 { stop(); } frame 318 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 1420 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance of movieClip 1420 { onClipEvent (load) { faceLeft = true; xSpeed = 5; startXScale = -_xscale; } onClipEvent (enterFrame) { if (faceLeft) { xSpeed = 5; } else { xSpeed = -5; } _x = _x - xSpeed; if (_x < -75) { _xscale = startXScale; faceLeft = false; _x = -75; } if (_x > 800) { _xscale = -startXScale; faceLeft = true; _x = 800; } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } movieClip 1424 { } movieClip 1429 { } movieClip 1436 { frame 1 { stop(); } instance of movieClip 226 { onClipEvent (load) { _visible = false; ySpeed = 0; } onClipEvent (enterFrame) { if (_root.enemy._y < 350) { _root.enemy._y += ySpeed; if (ySpeed < 18) { ySpeed += 2; } } else { _parent.play(); } } } frame 2 { _root.krackolightningSound.start(0, 1); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 22 { _root.krackolightningSound.start(0, 1); } frame 42 { stop(); } instance of movieClip 226 { onClipEvent (load) { _visible = false; ySpeed = 0; } onClipEvent (enterFrame) { if (_root.enemy._y > _root.enemy.yPos) { _root.enemy._y -= ySpeed; if (ySpeed < 18) { ySpeed += 2; } } else { _root.enemy._y = _root.enemy.yPos; _root.enemy.attackTimer = 22; _root.enemy.enemyStatus = 'normal'; } } } } movieClip 1438 { instance of movieClip 1429 { onClipEvent (enterFrame) { if (_root.character._y > _parent._y) { if (_root.character._x > _parent._x) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } else { if (_root.character._x > _parent._x) { this.gotoAndStop(4); } else { this.gotoAndStop(3); } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 15; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_root.enemy.c > 4.75) { _root.enemy.enemyStatus = 'attack1'; } else { _root.enemy.attackTimer = 15; _root.enemy.enemyStatus = 'normal'; } } } } instance of movieClip 226 { onClipEvent (load) { timer = 50; _global.coinTotal += 10; ++_global.yoshiTotal; _visible = false; c = 4.75; _root.resetFunction(); } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (!_global.krackoDefeated) { ++_global.enemiesDefeated; _global.krackoDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } _parent._y -= 2; _parent._x += Math.sin(c) * 3; c += 0.08; } } } instance enemy of movieClip 1438 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 8; attackTimer = 22; c = 4.75; xPos = _x; yPos = _y; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'attack1') { _x = _x + Math.sin(c) * 26; _y = _y + Math.cos(c) * 15; c += 0.08; if (c >= 11) { enemyStatus = 'normal'; attackTimer = 30; _x = xPos; _y = yPos; c = 0; } } if (enemyStatus == 'normal') { if (attackTimer > 0) { --attackTimer; } else { c = 4.75; attacks = 2; _root.enemyAttackFunction(attacks); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 319 { stop(); } frame 320 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 1444 { } movieClip 1450 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 5 { stop(); } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { _root.enemy._y += 18; if (hitTest(_root.ground)) { _root.enemy._y = _root.ground._y + _root.ground._height; _root.enemy.enemyStatus = 'normal'; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } movieClip 1454 { } movieClip 1466 { frame 32 { stop(); } } movieClip 1467 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; blockChance = Math.random() * 100; if (blockChance <= 35) { _parent.enemyStatus = 'block'; } else { --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { timer = 10; _visible = false; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { _parent.enemyStatus = 'normal'; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 1454 { onClipEvent (load) { if (_root.enemy.faceLeft) { _root.enemy.xSpeed = 30; xFactor = 1.25; } else { _root.enemy.xSpeed = -30; xFactor = -1.25; } timer = 45; } onClipEvent (enterFrame) { --timer; if (_root.enemy._x > 675) { _root.enemy.faceLeft = true; _root.enemy._xscale = _root.enemy.startXScale; _root.enemy._x = 675; } if (_root.enemy._x < 50) { _root.enemy.faceLeft = false; _root.enemy._xscale = -_root.enemy.startXScale; _root.enemy._x = 50; } if (_root.enemy.faceLeft) { xFactor = 1.25; } else { xFactor = -1.25; } if (timer > 0) { _root.enemy._x -= _root.enemy.xSpeed; _root.enemy.xSpeed -= xFactor; } else { _root.turnFunction(); _root.enemy.attackTimer = 25; _root.enemy.enemyStatus = 'normal'; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { timer = 3; _visible = false; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { _parent.enemyStatus = 'normal'; _parent.attackTimer = 18; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; blockChance = Math.random() * 100; if (blockChance <= 35) { _parent.enemyStatus = 'block'; } else { --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; if (_root.enemy.faceLeft) { xSpeed = 20; } else { xSpeed = -20; } timer = 25; } onClipEvent (enterFrame) { --timer; _parent._x -= xSpeed; if (_root.enemy._x > 675) { _root.enemy.faceLeft = true; _root.enemy._xscale = _root.enemy.startXScale; _root.enemy._x = 675; } if (_root.enemy._x < 50) { _root.enemy.faceLeft = false; _root.enemy._xscale = -_root.enemy.startXScale; _root.enemy._x = 50; } if (_root.enemy.faceLeft) { xSpeed = 20; } else { xSpeed = -20; } if (timer <= 0) { _parent.enemyStatus = 'normal'; _parent.attackTimer = 20; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; blockChance = Math.random() * 100; if (blockChance <= 35) { --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } } instance of movieClip 226 { onClipEvent (load) { timer = 15; _visible = false; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 12; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 1466 { onClipEvent (load) { _global.coinTotal += 25; ++_global.yoshiTotal; timer = 50; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (!_global.metaKnightDefeated) { ++_global.enemiesDefeated; _global.metaKnightDefeated = true; } _root.resetFunction(); _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } } } } instance enemy of movieClip 1467 { onClipEvent (load) { enemyStatus = 'normal'; runSpeed = 10; enemyHealth = 7; attackTimer = 30; runTimer = 10; jumpTimer = 60; jumping = true; falling = false; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { charDistance = Math.abs(_x - _root.character._x); this.gotoAndStop(enemyStatus); if (enemyStatus == 'jump') { if (charDistance < 50 && _root.character._y > _y) { enemyStatus = 'jumpAttack'; } if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } if (ySpeed > -21) { ySpeed -= 1.5; } _y = _y - ySpeed; if (jumping) { if (ySpeed < 0) { jumping = false; falling = true; } } } if (enemyStatus == 'run') { if (jumpTimer > 0) { --jumpTimer; } else { _root.turnFunction(); xSpeedSet = 10; ySpeedSet = 24; _root.metajumpSound.start(0, 1); _root.jumpStartFunction(ySpeedSet, xSpeedSet); } if (runTimer > 0) { --runTimer; } else { enemyStatus = 'normal'; runTimer = 25; } if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } } if (enemyStatus == 'normal') { if (runTimer > 0) { --runTimer; } else { _root.turnFunction(); enemyStatus = 'run'; runTimer = 40; xSpeed = 8; } if (attackTimer > 0) { if (runTimer > 0) { --attackTimer; } } else { _root.turnFunction(); if (charDistance > 100) { attackNumber = Math.ceil(Math.random() * 2); if (attackNumber == 1) { _root.metarollSound.start(0, 1); enemyStatus = 'attack1'; } if (attackNumber == 2) { _root.brightdashSound.start(0, 1); enemyStatus = 'attack3'; } } else { _root.metaslashSound.start(0, 1); enemyStatus = 'attack2'; } } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 321 { stop(); } frame 322 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 350; startY = 370; } movieClip 1473 { instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.parentFire.duplicateMovieClip('fire' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.enemy.attackTimer = 75; _root.enemy.enemyStatus = 'normal'; } } } movieClip 1476 { frame 6 { stop(); } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.brightdashSound.start(0, 1); if (_root.enemy.faceLeft) { xSpeed = -18; } else { xSpeed = 18; } timer = 25; } onClipEvent (enterFrame) { if (_root.enemy.faceLeft) { xSpeed = -18; } else { xSpeed = 18; } if (timer > 0) { --timer; _root.enemy._x += xSpeed; } else { _root.enemy.attackTimer = 75; _root.enemy.enemyStatus = 'normal'; } } } } movieClip 1480 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 18; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance footBase of movieClip 226 { onClipEvent (load) { ++_root.enemyControl.enemyDeath; _root.bandsdeathSound.start(0, 1); _visible = false; } } } instance enemy of movieClip 1480 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 7; attackTimer = 75; jumpTimer = 60; jumping = true; falling = false; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'jump') { if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } if (ySpeed > -21) { ySpeed -= 1.5; } _y = _y - ySpeed; if (jumping) { if (ySpeed < 0) { jumping = false; falling = true; } } } if (enemyStatus == 'normal') { if (jumpTimer > 0) { --jumpTimer; } else { xSpeedSet = 10; ySpeedSet = 21; _root.metajumpSound.start(0, 1); _root.jumpStartFunction(ySpeedSet, xSpeedSet); } if (attackTimer > 0) { if (jumpTimer > 0) { --attackTimer; } } else { _root.turnFunction(); attacks = 2; _root.enemyAttackFunction(attacks); } } } } movieClip 1482 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentFire of movieClip 1482 { onClipEvent (load) { if (_name != 'parentFire') { _root.brightshotSound.start(0, 1); _y = _root.enemy._y - 20; if (_root.enemy.faceLeft) { xSpeed = -15; _x = _root.enemy._x - 30; } else { _xscale = -_xscale; xSpeed = 15; _x = _root.enemy._x + 30; } } } onClipEvent (enterFrame) { if (_name != 'parentFire') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x + xSpeed; if (_x < -75 or _x > 800) { this.removeMovieClip(); } } } } movieClip 1484 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentRang of movieClip 1484 { onClipEvent (load) { if (_name != 'parentRang') { _root.shineshotSound.start(0, 1); _y = _root.enemy2._y - 20; if (_root.enemy2.faceLeft) { xSpeed = -12; _x = _root.enemy2._x - 30; } else { _xscale = -_xscale; xSpeed = 12; _x = _root.enemy2._x + 30; } } } onClipEvent (enterFrame) { if (_name != 'parentRang') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x + xSpeed; if (_x < -75 or _x > 800) { this.removeMovieClip(); } } } } movieClip 1488 { instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.parentRang.duplicateMovieClip('rang' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.enemy2.attackTimer = 40; _root.enemy2.enemyStatus = 'normal'; } } } movieClip 1492 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy2.enemyHealth <= 0) { _root.enemy2.enemyStatus = 'death'; } else { _root.enemy2.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 18; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance footBase of movieClip 226 { onClipEvent (load) { ++_root.enemyControl.enemyDeath; _root.bandsdeathSound.start(0, 1); _visible = false; } } } instance enemy2 of movieClip 1492 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 7; attackTimer = 40; jumpTimer = 40; jumping = true; falling = false; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (_x < 0) { _x = 0; faceLeft = false; _xscale = -startXScale; } if (_x > 725) { _x = 725; faceLeft = true; _xscale = startXScale; } if (enemyStatus == 'jump') { if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } if (ySpeed > -19.5) { ySpeed -= 1.5; } else { enemyStatus = 'normal'; jumpTimer = 40; jumping = false; ySpeed = 0; falling = false; } _y = _y - ySpeed; if (jumping) { if (ySpeed < 0) { jumping = false; falling = true; } } } if (enemyStatus == 'normal') { if (jumpTimer > 0) { --jumpTimer; } else { xSpeedSet = 10; ySpeedSet = 21; _root.metajumpSound.start(0, 1); enemyStatus = 'jump'; xSpeed = xSpeedSet; ySpeed = ySpeedSet; jumping = true; falling = false; } if (attackTimer > 0) { if (jumpTimer > 0) { --attackTimer; } } else { if (faceLeft) { if (_root.character._x > _x) { faceLeft = false; _xscale = -startXScale; } } else { if (_root.character._x < _x) { faceLeft = true; _xscale = startXScale; } } enemyStatus = 'attack1'; } } } } instance enemyControl of movieClip 226 { onClipEvent (load) { enemyDeath = 0; timer = 30; } onClipEvent (enterFrame) { if (enemyDeath >= 2) { _root.resetFunction(); --timer; if (timer <= 0) { if (!_global.brightShineDefeated) { ++_global.enemiesDefeated; _global.brightShineDefeated = true; } _global.coinTotal += 15; ++_global.yoshiTotal; _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 323 { stop(); } frame 324 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 1499 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.parentApple.appleTimer = 1000; _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { timer = 30; _root.whispyblowSound.start(0, 1); _visible = false; } onClipEvent (enterFrame) { _root.character._x -= 9; if (timer >= 0) { --timer; } else { _root.enemy.attackTimer = Math.ceil(Math.random() * 20 + 20); _root.enemy.enemyStatus = 'normal'; } } } instance of movieClip 226 { onClipEvent (load) { timer = 18; _visible = false; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { _parent.attackTimer = 0; _parent.enemyStatus = 'normal'; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.whispydeathSound.start(0, 1); _global.coinTotal += 5; ++_global.yoshiTotal; _root.resetFunction(); timer = 50; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (!_global.whispyWoodsDefeated) { ++_global.enemiesDefeated; _global.whispyWoodsDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } } } } instance enemy of movieClip 1499 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 8; attackTimer = 30; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { if (attackTimer > 0) { --attackTimer; } else { _root.turnFunction(); attacks = 1; _root.enemyAttackFunction(attacks); } } } } movieClip 1501 { frame 27 { stop(); } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.whispyappleSound.start(0, 1); _parent.falling = true; } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentApple of movieClip 1501 { onClipEvent (load) { if (_name != 'parentApple') { falling = false; ySpeed = 4; _x = Math.random() * (Stage.width * 0.66); _y = Math.random() * 175 + 50; } else { appleSet = 60; appleTimer = appleSet; } } onClipEvent (enterFrame) { if (_name != 'parentApple') { if (_global.resetDuplicates) { this.removeMovieClip(); } if (falling) { _y = _y + ySpeed; ++ySpeed; } if (_y > 600) { this.removeMovieClip(); } } else { if (appleTimer > 0) { --appleTimer; } else { this.duplicateMovieClip('apple' + _root.i, _root.getNextHighestDepth()); appleTimer = appleSet; } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 325 { stop(); } frame 326 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 1510 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 3 { _root.parentWave.duplicateMovieClip('wave' + _root.i, _root.getNextHighestDepth()); ++_root.i; } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 8 { _root.enemy.attackTimer = 30; _root.enemy.enemyStatus = 'normal'; } } movieClip 1520 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } movieClip 1525 { frame 1 { stop(); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 4 { stop(); } } movieClip 1526 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } frame 18 { stop(); _root.swordsplitSound.start(0, 1); } instance of movieClip 1520 { onClipEvent (load) { xSpeed = 25; xFactor = 1.25; timer = 40; } onClipEvent (enterFrame) { --timer; if (timer > 0) { _x = _x - xSpeed; xSpeed -= xFactor; } else { _root.enemy.attackTimer = 25; _root.enemy.enemyStatus = 'normal'; } } } instance of movieClip 1525 { onClipEvent (load) { xSpeed = -25; xFactor = 1.25; timer = 40; } onClipEvent (enterFrame) { --timer; if (xSpeed == 0) { this.play(); } if (timer > 0) { _x = _x - xSpeed; xSpeed += xFactor; } else { _root.enemy.attackTimer = 25; _root.enemy.enemyStatus = 'normal'; } } } } movieClip 1539 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 10 { stop(); _root.groundinvincibleSound.start(0, 1); } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 20; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { _parent.play(); } } } frame 14 { _root.enemy.attackTimer = 35; _root.enemy.enemyStatus = 'normal'; } } movieClip 1541 { frame 1 { stop(); } } movieClip 1544 { } movieClip 1545 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; timer = 8; } onClipEvent (enterFrame) { if (timer > 0) { --timer; } else { _root.turnFunction(); xSpeedSet = 7.5; ySpeedSet = 21; _root.freezejumpSound.start(0, 1); _root.jumpStartFunction(ySpeedSet, xSpeedSet); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 1544 { onClipEvent (load) { timer = 16; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 888 { onClipEvent (load) { timer = 50; _global.coinTotal += 40; ++_global.yoshiTotal; _root.resetFunction(); } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (!_global.swordManDefeated) { ++_global.enemiesDefeated; _global.swordManDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } } } } instance enemy of movieClip 1545 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 8; attackTimer = 30; jumpTimer = 50; jumping = true; falling = false; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'jump') { if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } if (ySpeed > -21) { ySpeed -= 1.5; } _y = _y - ySpeed; if (jumping) { if (ySpeed < 0) { jumping = false; falling = true; } } } if (enemyStatus == 'normal') { if (jumpTimer > 0) { --jumpTimer; } else { enemyStatus = 'jumpCharge'; } if (attackTimer > 0) { if (jumpTimer > 0) { --attackTimer; } } else { _root.turnFunction(); attacks = 3; _root.enemyAttackFunction(attacks); } } } } instance parentWave of movieClip 891 { onClipEvent (load) { if (_name != 'parentWave') { _root.swordwaveSound.start(0, 1); faceLeft = _root.enemy.faceLeft; if (faceLeft) { xSpeed = 16; _x = _root.enemy._x - 160; } else { xSpeed = -16; _xscale = -_xscale; _x = _root.enemy._x + 160; } _y = _root.enemy._y - 40; } } onClipEvent (enterFrame) { if (_name != 'parentWave') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x - xSpeed; if (_x < -75 or _x > 800) { this.removeMovieClip(); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 327 { stop(); } frame 328 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 1553 { } movieClip 1558 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentWind of movieClip 1558 { onClipEvent (load) { if (_name != 'parentWind') { if (!_root.enemy.faceLeft) { _xscale = -_xscale; xSpeed = Math.random() * 4 + 3; _x = _root.enemy._x + 25; _y = _root.enemy._y - 10; } else { xSpeed = -(Math.random() * 4 + 3); _x = _root.enemy._x - 25; _y = _root.enemy._y - 10; } ySpeed = Math.random() * 12 + 2; timer = 20; } } onClipEvent (enterFrame) { if (_name != 'parentWind') { if (_global.resetDuplicates) { this.removeMovieClip(); } --timer; if (timer > 0) { _x = _x + xSpeed; _y = _y - ySpeed; } if (timer <= -10) { xSpeed += xSpeed / 12; _x = _x + xSpeed; } if (_x < -50 or _x > 775) { this.removeMovieClip(); } } } } movieClip 1562 { } movieClip 1565 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 1562 { onClipEvent (load) { _root.airvaccuumSound.start(0, 1); timer = 30; } onClipEvent (enterFrame) { if (timer >= 0) { --timer; } else { _root.enemy.attackTimer = Math.ceil(Math.random() * 20 + 20); _root.enemy.enemyStatus = 'normal'; } } } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (_parent.faceLeft) { _root.character._x += 12; } else { _root.character._x -= 12; } } } instance footBase of movieClip 226 { onClipEvent (load) { timer = 25; _visible = false; } onClipEvent (enterFrame) { if (timer == 15) { mulitplyNumber = Math.ceil(Math.random() * 4 + 4); while (mulitplyNumber > 0) { _root.parentWind.duplicateMovieClip('wind' + _root.i, _root.getNextHighestDepth()); ++_root.i; --mulitplyNumber; } } if (timer >= 0) { --timer; } else { _root.enemy.attackTimer = 35; _root.enemy.enemyStatus = 'normal'; } } } instance of movieClip 226 { onClipEvent (load) { _root.airshotSound.start(0, 1); _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 1544 { onClipEvent (load) { timer = 12; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 888 { onClipEvent (load) { timer = 50; _global.coinTotal += 20; ++_global.yoshiTotal; _root.resetFunction(); } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (!_global.airManDefeated) { ++_global.enemiesDefeated; _global.airManDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } } } } instance enemy of movieClip 1565 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 8; attackTimer = 35; jumpTimer = 20; jumping = true; falling = false; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'jump') { if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } if (ySpeed > -21) { ySpeed -= 1.5; } _y = _y - ySpeed; if (jumping) { if (ySpeed < 0) { jumping = false; falling = true; } } } if (enemyStatus == 'normal') { if (jumpTimer > 0) { --jumpTimer; } else { _root.turnFunction(); xSpeedSet = 10; ySpeedSet = 21; _root.megamanLandSound.start(0, 1); _root.jumpStartFunction(ySpeedSet, xSpeedSet); } if (attackTimer > 0) { if (jumpTimer > 0) { --attackTimer; } } else { _root.turnFunction(); attacks = 2; _root.enemyAttackFunction(attacks); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 329 { stop(); } frame 330 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 1572 { } movieClip 1577 { instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } frame 14 { _root.gravityFlipSound.start(0, 1); } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; if (_root.enemy._yscale == _root.enemy.startYScale) { ySpeed = 24.5; } else { ySpeed = -24.5; } } onClipEvent (enterFrame) { _root.enemy._y -= ySpeed; } } frame 26 { _root.enemy._yscale = -_root.enemy._yscale; } frame 37 { _root.enemy.enemyStatus = 'normal'; } } movieClip 1578 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 1544 { onClipEvent (load) { timer = 12; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { _root.enemy.enemyStatus = 'normal'; } } } instance of movieClip 888 { onClipEvent (load) { timer = 50; _global.coinTotal += 5; ++_global.yoshiTotal; _root.resetFunction(); } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (!_global.gravityManDefeated) { ++_global.enemiesDefeated; _global.gravityManDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } } } } instance enemy of movieClip 1578 { onClipEvent (load) { enemyStatus = 'normal'; runSpeed = 7; flipTimer = 75; enemyHealth = 8; attackTimer = 50; jumpTimer = 30; jumping = true; falling = false; faceLeft = true; startXScale = _xscale; startYScale = _yscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'jump') { if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } if (ySpeed > -21) { ySpeed -= 1.5; } if (_yscale == startYScale) { _y = _y - ySpeed; } else { _y = _y + ySpeed; } if (ySpeed == 15 or ySpeed == -15) { _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); ++_root.i; } if (jumping) { if (ySpeed < 0) { jumping = false; falling = true; } } } if (enemyStatus == 'normal') { if (faceLeft) { _x = _x - runSpeed; } else { _x = _x + runSpeed; } if (flipTimer > 0) { --flipTimer; } else { flipTimer = 75; enemyStatus = 'flip'; } if (jumpTimer > 0) { --jumpTimer; } else { xSpeedSet = 10; ySpeedSet = 21; _root.megamanLandSound.start(0, 1); _root.jumpStartFunction(ySpeedSet, xSpeedSet); } } } } movieClip 1580 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentBullet of movieClip 1580 { onClipEvent (load) { if (_name != 'parentBullet') { _root.megamanshotSound.start(0, 1); faceLeft = _root.enemy.faceLeft; yScale = _root.enemy._yscale; if (faceLeft) { xSpeed = 20; _x = _root.enemy._x - 50; } else { xSpeed = -20; _x = _root.enemy._x + 50; } if (yScale > 0) { _y = _root.enemy._y - 45; } else { _y = _root.enemy._y + 45; } a = _x - _root.character._x; b = Math.abs(_y - _root.character._y); c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)); speed = c / 14; xSpeed = a / speed; if (_root.character._y < _y) { ySpeed = b / speed; } else { ySpeed = -b / speed; } } } onClipEvent (enterFrame) { if (_name != 'parentBullet') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x - xSpeed; _y = _y - ySpeed; if (_x < -75 or _x > 800) { this.removeMovieClip(); } if (_y < -75 or _y > 650) { this.removeMovieClip(); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 331 { stop(); } frame 332 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 1587 { } movieClip 1592 { instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.parentFlame.duplicateMovieClip('flame' + _root.i, _root.getNextHighestDepth()); ++_root.i; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.enemy.enemyStatus = 'normal'; _root.enemy.attackTimer = 35; } } } movieClip 1594 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 1544 { onClipEvent (load) { timer = 12; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 888 { onClipEvent (load) { timer = 50; _global.coinTotal += 15; ++_global.yoshiTotal; _root.resetFunction(); } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (!_global.fireManDefeated) { ++_global.enemiesDefeated; _global.fireManDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } } } } instance enemy of movieClip 1594 { onClipEvent (load) { enemyStatus = 'normal'; runSpeed = 7; enemyHealth = 8; attackTimer = 35; jumpTimer = 50; jumping = true; falling = false; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'jump') { if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } if (ySpeed > -21) { ySpeed -= 1.5; } _y = _y - ySpeed; if (jumping) { if (ySpeed < 0) { jumping = false; falling = true; } } } if (enemyStatus == 'normal') { if (faceLeft) { _x = _x - runSpeed; } else { _x = _x + runSpeed; } if (jumpTimer > 0) { --jumpTimer; } else { _root.turnFunction(); xSpeedSet = 10; ySpeedSet = 21; _root.megamanLandSound.start(0, 1); _root.jumpStartFunction(ySpeedSet, xSpeedSet); } if (attackTimer > 0) { if (jumpTimer > 0) { --attackTimer; } } else { _root.turnFunction(); attacks = 1; _root.enemyAttackFunction(attacks); } } } } movieClip 1599 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentFlame of movieClip 1599 { onClipEvent (load) { if (_name != 'parentFlame') { _root.firemanshotSound.start(0, 1); if (!_root.enemy.faceLeft) { _xscale = -_xscale; xSpeed = 11; _x = _root.enemy._x + 10; } else { xSpeed = -11; _x = _root.enemy._x - 10; } _y = _root.enemy._y; } } onClipEvent (enterFrame) { if (_name != 'parentFlame') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x + xSpeed; _y = _y - ySpeed; if (_x < -50 or _x > 775) { this.removeMovieClip(); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 333 { stop(); } frame 334 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 210; startY = 380; } movieClip 1605 { } movieClip 1609 { frame 1 { _root.airvaccuumSound.start(0, 1); } frame 3 { _root.weather.gotoAndStop(1); _root.weather.darkSky.play(); } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { _root.character._x -= 10; } } frame 39 { _root.enemy.attackTimer = 65; _root.enemy.enemyStatus = 'normal'; } } movieClip 1614 { frame 12 { _root.weather.gotoAndStop(2); _root.parentLight.duplicateMovieClip('light' + _root.i, _root.getNextHighestDepth()); ++_root.i; } frame 18 { _root.enemy.attackTimer = 50; _root.enemy.enemyStatus = 'normal'; } } movieClip 1623 { frame 17 { _root.enemy.enemyStatus = 'normal'; } } movieClip 1625 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.character._y -= 5; --_parent.enemyHealth; _parent.enemyStatus = 'injured'; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.character._y -= 5; } } } instance of movieClip 1614 { onClipEvent (load) { _root.cloudlightningSound.start(0, 1); } } instance of movieClip 1544 { onClipEvent (load) { timer = 16; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'recover'; } } } instance of movieClip 888 { onClipEvent (load) { timer = 50; _global.coinTotal += 15; ++_global.yoshiTotal; _root.resetFunction(); } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (!_global.cloudManDefeated) { ++_global.enemiesDefeated; _global.cloudManDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } } } } instance enemy of movieClip 1625 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 8; attackTimer = 75; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'normal') { xSpeed = 11; if (faceLeft) { _xscale = startXScale; _x = _x - xSpeed; } else { _xscale = -startXScale; _x = _x + xSpeed; } if (attackTimer > 0) { --attackTimer; } else { attacks = 2; _root.enemyAttackFunction(attacks); } } } } movieClip 1630 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 14 { stop(); } } instance parentLight of movieClip 1630 { onClipEvent (load) { if (_name != 'parentLight') { _x = _root.character._x; } } onClipEvent (enterFrame) { if (_name != 'parentLight') { if (_global.resetDuplicates) { this.removeMovieClip(); } if (_currentframe == 14) { this.removeMovieClip(); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_y > 625) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); } if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_y > 625) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); } if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { if (_global.characterStatus != 'deathMario') { _root.stageMusic.stop(); _root.deathSound.start(0, 1); } _root.gameOverFunction(); _root.resetFunction(); } } } } movieClip 1634 { frame 1 { stop(); } } movieClip 1637 { frame 6 { _root.weather.gotoAndStop(1); } } movieClip 1638 { frame 1 { stop(); } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 335 { stop(); } frame 336 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 1643 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 5 { stop(); } } instance parentDrill of movieClip 1643 { onClipEvent (load) { if (_name != 'parentDrill') { _root.grounddrillshotSound.start(0, 1); faceLeft = _root.enemy.faceLeft; if (faceLeft) { _x = _root.enemy._x - 50; xSpeed = 15; } else { _x = _root.enemy._x + 50; _xscale = -_xscale; xSpeed = -15; } _y = _root.enemy._y - 82; } } onClipEvent (enterFrame) { if (_name != 'parentDrill') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x - xSpeed; if (_x < -100 or _x > 825) { this.removeMovieClip(); } } } } movieClip 1651 { frame 6 { _root.groundinvincibleSound.start(0, 1); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 35 { _root.enemy.attackTimer = 20; _root.enemy.enemyStatus = 'normal'; } } movieClip 1659 { } movieClip 1660 { frame 5 { stop(); } instance of movieClip 1659 { onClipEvent (load) { _root.enemy.drillTimer = Math.ceil(Math.random() * 50) + 50; } } } movieClip 1663 { frame 2 { stop(); } } movieClip 1665 { instance of movieClip 1659 { onClipEvent (load) { _root.enemy.drillTimer = Math.ceil(Math.random() * 50) + 50; } } frame 6 { _root.enemy.attackTimer = 20; _root.enemy.drillTimer = 100; _root.enemy.enemyStatus = 'normal'; } } movieClip 1674 { frame 11 { _root.parentDrill.duplicateMovieClip('drill' + _root.i, _root.getNextHighestDepth()); ++_root.i; } frame 14 { _root.enemy.attackTimer = 20; _root.enemy.enemyStatus = 'normal'; } } movieClip 1676 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 1663 { onClipEvent (load) { _root.grounddigSound.start(0, 1); timer = 20; } onClipEvent (enterFrame) { if (timer > 0) { _root.enemy._y += 6; --timer; } else { _root.enemy.enemyStatus = 'surface'; } } } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; timer = 20; surfaceTimer = 20; _root.enemy._x = Math.random() * Stage.width; if (_root.enemy._x < 100) { _root.enemy._x = 100; } if (_root.enemy._x > 625) { _root.enemy._x = 625; } } onClipEvent (enterFrame) { if (surfaceTimer > 0) { --surfaceTimer; } else { if (timer > 0) { _root.enemy._y -= 6; --timer; } else { _root.enemy.enemyStatus = 'open'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 1544 { onClipEvent (load) { timer = 15; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 888 { onClipEvent (load) { timer = 50; _global.coinTotal += 25; ++_global.yoshiTotal; _root.resetFunction(); } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (!_global.groundManDefeated) { ++_global.enemiesDefeated; _global.groundManDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } } } } instance enemy of movieClip 1676 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 8; attackTimer = 20; drillTimer = 100; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'attack2' or enemyStatus == 'attack4') { if (faceLeft) { xSpeed = 15; _xscale = startXScale; } else { xSpeed = -15; _xscale = -startXScale; } _x = _x - xSpeed; if (drillTimer > 0) { --drillTimer; } else { enemyStatus = 'dive'; } } if (enemyStatus == 'normal') { if (attackTimer > 0) { --attackTimer; } else { _root.turnFunction(); attacks = 4; _root.enemyAttackFunction(attacks); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } movieClip 1684 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance of movieClip 1684 { onClipEvent (load) { drillAttack = 150; runSpeed = 5; ySpeed = 100; faceLeft = false; } onClipEvent (enterFrame) { if (drillAttack > 0) { --drillAttack; if (faceLeft) { _x = _x - runSpeed; } else { _x = _x + runSpeed; } if (_x < 50) { faceLeft = false; _x = 50; } if (_x > 675) { faceLeft = true; _x = 675; } } else { if (ySpeed == 100) { ySpeed = 26; } if (ySpeed > -25) { --ySpeed; _y = _y + ySpeed; } else { ySpeed = 100; drillAttack = 150; } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 337 { stop(); } frame 338 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 1690 { } movieClip 1692 { } instance shadowBackground of movieClip 1692 { onClipEvent (load) { _alpha = 0; } } movieClip 1700 { frame 5 { _root.brightmanShineSound.start(0, 1); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; _root.enemy.attackTimer = 40; _root.enemy.enemyStatus = 'normal'; } } } movieClip 1705 { instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.enemy.fadeTimer = 75; _root.enemy.jumpTimer = 10; _root.enemy.enemyStatus = 'fadeNormal'; } } } movieClip 1709 { instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.enemy.fadeTimer = 125; _root.enemy.enemyStatus = 'normal'; } } } movieClip 1712 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance footBase of movieClip 226 { onClipEvent (load) { timer = 6; _root.parentBullet.duplicateMovieClip('bullet' + _root.i, _root.getNextHighestDepth()); ++_root.i; _visible = false; } onClipEvent (enterFrame) { if (timer >= 0) { --timer; } else { _root.enemy.attackTimer = 40; _root.enemy.enemyStatus = 'normal'; } } } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 1705 { onClipEvent (enterFrame) { if (_root.shadowBackground._alpha < 100) { _root.shadowBackground._alpha += 20; } } } instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 1709 { onClipEvent (enterFrame) { if (_root.shadowBackground._alpha > 0) { _root.shadowBackground._alpha -= 20; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 1544 { onClipEvent (load) { timer = 12; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 888 { onClipEvent (load) { timer = 50; _global.coinTotal += 10; ++_global.yoshiTotal; _root.resetFunction(); } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (!_global.brightManDefeated) { ++_global.enemiesDefeated; _global.brightManDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } } } } instance enemy of movieClip 1712 { onClipEvent (load) { enemyStatus = 'normal'; enemyHealth = 8; attackTimer = 45; jumpTimer = 30; fadeTimer = 125; jumping = true; falling = false; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'jump' or enemyStatus == 'fadeJump') { if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } if (ySpeed > -21) { ySpeed -= 1.5; } _y = _y - ySpeed; if (jumping) { if (ySpeed < 0) { jumping = false; falling = true; } } } if (enemyStatus == 'fadeNormal') { if (fadeTimer > 0) { --fadeTimer; } else { enemyStatus = 'fadeIn'; } if (jumpTimer > 0) { --jumpTimer; } else { _root.turnFunction(); enemyStatus = 'fadeJump'; xSpeed = 8; ySpeed = 24; jumping = true; falling = false; } } if (enemyStatus == 'normal') { if (fadeTimer > 0) { --fadeTimer; } else { enemyStatus = 'fadeOut'; } if (jumpTimer > 0) { --jumpTimer; } else { _root.turnFunction(); xSpeedSet = Math.ceil(Math.random() * 6 + 6); ySpeedSet = 24; _root.megamanLandSound.start(0, 1); _root.jumpStartFunction(ySpeedSet, xSpeedSet); } if (attackTimer > 0) { if (jumpTimer > 0) { --attackTimer; } } else { _root.turnFunction(); attacks = 2; _root.enemyAttackFunction(attacks); } } } } movieClip 1715 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentBullet of movieClip 1715 { onClipEvent (load) { if (_name != 'parentBullet') { _root.megamanshotSound.start(0, 1); if (!_root.enemy.faceLeft) { xSpeed = 13; _x = _root.enemy._x + 45; } else { xSpeed = -13; _x = _root.enemy._x - 45; } _y = _root.enemy._y - 26; } } onClipEvent (enterFrame) { if (_name != 'parentBullet') { if (_global.resetDuplicates) { this.removeMovieClip(); } _x = _x + xSpeed; _y = _y - ySpeed; if (_x < -25 or _x > 750) { this.removeMovieClip(); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 339 { stop(); } frame 340 { i = 1; doOnce = true; invincible = false; _global.inStage = true; startX = 90; startY = 330; } movieClip 1721 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 5 { stop(); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentIce of movieClip 1721 { onClipEvent (load) { if (_name != 'parentIce') { fallTimer = 15; _x = Math.random() * 600 + 50; } else { timer = 80; } } onClipEvent (enterFrame) { if (_name != 'parentIce') { if (_global.resetDuplicates) { this.removeMovieClip(); } --fallTimer; if (fallTimer <= 0) { _y = _y + 15; } if (_y > 625) { this.removeMovieClip(); } } else { --timer; if (timer <= 0) { this.duplicateMovieClip('ice' + _root.i, _root.getNextHighestDepth()); ++_root.i; timer = 80; } } } } movieClip 1724 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } } instance parentBlast of movieClip 1724 { onClipEvent (load) { if (_name != 'parentBlast') { _root.freezethrowSound.start(0, 1); if (!_root.enemy.faceLeft) { _yscale = -_yscale; ySpeed = 12; _x = _root.enemy._x + 20; } else { ySpeed = 12; _x = _root.enemy._x - 20; } _y = _root.enemy._y - 12; } } onClipEvent (enterFrame) { if (_name != 'parentBlast') { if (_global.resetDuplicates) { this.removeMovieClip(); } _y = _y + ySpeed; if (_y > 700) { this.removeMovieClip(); } } } } movieClip 1734 { } movieClip 1738 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 3 { stop(); } } movieClip 1751 { instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } frame 7 { stop(); } } movieClip 1755 { frame 1 { _root.freezeshotSound.start(0, 1); } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.enemy.attackTimer = 30; _root.enemy.enemyStatus = 'normal'; } } } movieClip 1760 { frame 3 { _root.parentBlast.duplicateMovieClip('blast' + _root.i, _root.getNextHighestDepth()); ++_root.i; } instance of movieClip 226 { onClipEvent (load) { _visible = false; _root.enemy.attackTimer = 30; _root.enemy.enemyStatus = 'jump'; _root.enemy.falling = true; } } } movieClip 1763 { instance footBase of movieClip 226 { onClipEvent (load) { _visible = false; } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 1738 { onClipEvent (enterFrame) { if (_parent.ySpeed == 0 && _parent.jumping) { blast = Math.ceil(Math.random() * 2); if (blast == 1) { _parent.jumping = false; _parent.falling = false; _parent.enemyStatus = 'jumpAttack1'; } } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; } } } instance of movieClip 226 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (this.hitTest(_root.character.footBase) && _root.character.ySpeed < 0) { _root.character.ySpeed = 12; _root.stompSound.start(0, 1); _root.character._y -= 5; --_parent.enemyHealth; if (_root.enemy.enemyHealth <= 0) { _root.enemy.enemyStatus = 'death'; } else { _root.enemy.enemyStatus = 'injured'; } } } } instance of movieClip 365 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (hitTest(_root.character)) { _root.marioHurt(); } } } instance of movieClip 226 { onClipEvent (load) { _root.turnFunction(); _visible = false; timer = 7; } onClipEvent (enterFrame) { if (timer > 0) { --timer; } else { _root.enemy.attackTimer = 30; _root.enemy.enemyStatus = 'jump'; _root.enemy.falling = true; } } } instance of movieClip 1544 { onClipEvent (load) { timer = 16; } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (_parent.attackTimer <= 0) { _parent.attackTimer = 20; } _parent.enemyStatus = 'normal'; } } } instance of movieClip 888 { onClipEvent (load) { _global.coinTotal += 25; ++_global.yoshiTotal; timer = 50; _root.resetFunction(); } onClipEvent (enterFrame) { --timer; if (timer <= 0) { if (!_global.freezeManDefeated) { ++_global.enemiesDefeated; _global.freezeManDefeated = true; } _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); } } } } instance enemy of movieClip 1763 { onClipEvent (load) { enemyStatus = 'normal'; runSpeed = 8; enemyHealth = 9; attackTimer = 30; jumpTimer = 50; jumping = true; falling = false; faceLeft = true; startXScale = _xscale; } onClipEvent (enterFrame) { this.gotoAndStop(enemyStatus); if (enemyStatus == 'jump') { if (faceLeft) { _x = _x - xSpeed; } else { _x = _x + xSpeed; } if (ySpeed > -21) { ySpeed -= 1.5; } _y = _y - ySpeed; if (jumping) { if (ySpeed < 0) { jumping = false; falling = true; } } } if (enemyStatus == 'normal') { if (faceLeft) { _x = _x - runSpeed; } else { _x = _x + runSpeed; } if (jumpTimer > 0) { --jumpTimer; } else { _root.turnFunction(); xSpeedSet = 10; ySpeedSet = 24; _root.freezejumpSound.start(0, 1); _root.jumpStartFunction(ySpeedSet, xSpeedSet); } if (attackTimer > 0) { if (jumpTimer > 0) { --attackTimer; } } else { _root.turnFunction(); attacks = 1; _root.enemyAttackFunction(attacks); } } } } instance of movieClip 226 { onClipEvent (load) { if (_global.characterSelect == 'mario') { _root.parentMario.duplicateMovieClip('character', _root.getNextHighestDepth()); } if (_global.characterSelect == 'luigi') { _root.parentLuigi.duplicateMovieClip('character', _root.getNextHighestDepth()); } _root.character._x = _root.startX; _root.character._y = _root.startY; } onClipEvent (enterFrame) { _root.parentLuigi._y = -100; _root.parentMario._y = -100; _root.parentLuigi._x = -100; _root.parentMario._x = -100; } } instance parentMario of movieClip 363 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 10) { if (xSpeed >= -9) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -9) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -9) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -10) { if (xSpeed <= 9) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 9) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 9) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -16) { xSpeed -= 2; } } else { if (xSpeed > -9) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -9) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 16) { xSpeed += 2; } } else { if (xSpeed < 9) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 9) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 3 and xSpeed > -3) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 3; } if (xSpeed > 0) { xSpeed -= 3; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { jumping = true; _root.jumpSound.start(0, 1); jumpOnce = true; ySpeed = 18; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -24) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance parentLuigi of movieClip 525 { onClipEvent (load) { grav_y = 0; xSpeed = 0; ySpeed = 0; if (_name == 'character') { hitTimer = 0; } slowDown = false; falling = false; jumping = false; attacking = false; jumpOnce = false; spriteDirection = 'right'; spriteStatus = 'rightStand'; } onClipEvent (enterFrame) { if (_global.resetDuplicates) { this.removeMovieClip(); } this.gotoAndStop(_global.characterStatus); this.mario.gotoAndStop(spriteStatus); if (_global.characterStatus != 'deathMario') { if (hitTimer > 0) { _alpha = Math.random() * 25 + 50; --hitTimer; } else { _alpha = 100; } if (hitTimer == 1) { _root.invincible = false; } if (Key.isDown(37)) { spriteDirection = 'left'; } if (Key.isDown(39)) { spriteDirection = 'right'; } if (spriteDirection == 'left') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'leftAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'leftDuck'; } if (Key.isDown(37)) { if (ySpeed == 0) { if (xSpeed < 12) { if (xSpeed >= -11) { spriteStatus = 'leftWalk'; } else { spriteStatus = 'leftRun'; } } else { spriteStatus = 'leftSlide'; } } } if (ySpeed > 0) { if (xSpeed >= -11) { spriteStatus = 'leftJump'; } else { spriteStatus = 'leftRunJump'; } } if (ySpeed < 0) { if (xSpeed >= -11) { spriteStatus = 'leftFall'; } else { spriteStatus = 'leftRunFall'; } } if (!Key.isDown(40) && !Key.isDown(37) && !jumping && !falling && !attacking) { spriteStatus = 'leftStand'; } } if (spriteDirection == 'right') { _x = _x + xSpeed; if (attacking) { spriteStatus = 'rightAttack'; } if (Key.isDown(40) && !jumping && !falling) { spriteStatus = 'rightDuck'; } if (Key.isDown(39)) { if (ySpeed == 0) { if (xSpeed > -12) { if (xSpeed <= 11) { spriteStatus = 'rightWalk'; } else { spriteStatus = 'rightRun'; } } else { spriteStatus = 'rightSlide'; } } } if (ySpeed > 0) { if (xSpeed <= 11) { spriteStatus = 'rightJump'; } else { spriteStatus = 'rightRunJump'; } } if (ySpeed < 0) { if (xSpeed <= 11) { spriteStatus = 'rightFall'; } else { spriteStatus = 'rightRunFall'; } } if (!Key.isDown(40) && !Key.isDown(39) && !jumping && !falling && !attacking) { spriteStatus = 'rightStand'; } } if (grav_y > 0) { falling = true; jumpOnce = true; } if (jumping or falling) { grav_y = 0; } if (!jumping && !falling) { grav_y = 23; _y = _y + grav_y; } if (Key.isDown(68) && !jumping && !falling) { attacking = true; if (_global.characterStatus == 'iceMario') { _root.invincible = true; } } else { if (hitTimer <= 0 && _name == 'character') { _root.invincible = false; } attacking = false; } if (Key.isDown(37)) { if (Key.isDown(65)) { if (xSpeed > -18) { xSpeed -= 2; } } else { if (xSpeed > -11) { xSpeed -= 2; } } if (!Key.isDown(65)) { if (xSpeed < -11) { ++xSpeed; } } } if (Key.isDown(39)) { if (Key.isDown(65)) { if (xSpeed < 18) { xSpeed += 2; } } else { if (xSpeed < 11) { xSpeed += 2; } } if (!Key.isDown(65)) { if (xSpeed > 11) { --xSpeed; } } } if (!Key.isDown(39) && !Key.isDown(37)) { if (xSpeed < 1 and xSpeed > -1) { xSpeed = 0; } if (xSpeed < 0) { xSpeed += 1; } if (xSpeed > 0) { xSpeed -= 1; } } if (Key.isDown(83) && !jumping && !falling && !jumpOnce) { _root.jumpSound.start(0, 1); jumping = true; jumpOnce = true; ySpeed = 22; } if (!Key.isDown(83) && !jumping && !falling) { jumpOnce = false; } if (!Key.isDown(83) && jumping) { if (ySpeed > 9) { ySpeed = 9; } } if (jumping) { ySpeed -= 0.01; _y = _y - ySpeed; if (ySpeed < 0) { jumping = false; falling = true; } } if (falling) { _y = _y - ySpeed; if (ySpeed > -23) { ySpeed -= 3; } } } else { --deathSpeed; _y = _y - deathSpeed; if (_y > 800) { _root.gameOverFunction(); _root.resetFunction(); } } } } instance itemBox1 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item1; this.gotoAndStop(_global.item1); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item1); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox2 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item2; this.gotoAndStop(_global.item2); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item2); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox3 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item3; this.gotoAndStop(_global.item3); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item3); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox4 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item4; this.gotoAndStop(_global.item4); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item4); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox5 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item5; this.gotoAndStop(_global.item5); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item5); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } instance itemBox6 of movieClip 245 { onClipEvent (load) { giveItem = false; itemSet = _global.item6; this.gotoAndStop(_global.item6); } onClipEvent (enterFrame) { this.gotoAndStop(_global.item6); if (giveItem) { switch (itemSet) { case 'empty': itemSet = 'empty'; break; case 'mushroom': _global.characterStatus = 'largeMario'; itemSet = 'empty'; break; case 'fireFlower': _global.characterStatus = 'fireMario'; itemSet = 'empty'; break; case 'freezeFlower': _global.characterStatus = 'iceMario'; itemSet = 'empty'; break; case '1-up': _root.extraLifeFunction(); itemSet = 'empty'; break; case 'cloud': _global.characterStatus = 'cloudMario'; itemSet = 'empty'; } } } } frame 341 { stop(); } frame 342 { _global.inStage = false; _root.resetFunction(); } frame 426 { _global.characterStatus = 'smallMario'; _root.stageMusic.stop(); _root.stageMusic.attachSound('menuMusic'); _root.stageMusic.start(0, 300); _root.gotoAndStop('mainMenu'); }




http://swfchan.com/13/62918/info.shtml
Created: 13/4 -2019 23:58:10 Last modified: 13/4 -2019 23:58:10 Server time: 05/05 -2024 14:27:17