Combined Code
movieClip 21 zsabrewall {
}
movieClip 24 {
}
movieClip 25 {
frame 17 {
_parent.bullet.kill();
}
}
movieClip 26 BulletZSabreSpreadshot {
}
movieClip 29 {
}
movieClip 30 BulletZSabreSlash {
}
movieClip 32 BulletNoseBullet {
}
movieClip 41 {
}
movieClip 42 BulletClawMissile {
frame 3 {
gotoAndPlay('normal');
}
frame 11 {
bullet.kill();
}
}
movieClip 46 {
}
movieClip 50 {
}
movieClip 52 {
}
movieClip 54 {
}
movieClip 56 {
}
movieClip 61 {
}
movieClip 64 {
}
movieClip 68 {
}
movieClip 72 {
}
movieClip 75 {
}
movieClip 77 {
}
movieClip 80 {
}
movieClip 83 {
frame 12 {
com.homestarrunner.stinkoman.StinkoGame.killAll();
}
frame 41 {
com.homestarrunner.stinkoman.ui.Interface.showKeepTry();
}
frame 80 {
if (_parent.gameMode == 'jumping') {
com.homestarrunner.stinkoman.gamemode.JumpingGame.doneDying();
} else {
com.homestarrunner.stinkoman.StinkoGame.doneDying();
}
stop();
}
}
movieClip 96 {
frame 82 {
com.homestarrunner.stinkoman.StinkoGame.levelDoneDone();
}
}
movieClip 101 {
}
movieClip 128 {
frame 95 {
_parent.mPlayer.getFrozen();
}
frame 200 {
_parent.mPlayer.getUnfrozen();
}
}
movieClip 130 {
}
movieClip 133 {
}
movieClip 134 playerRegular {
frame 1 {
stop();
}
frame 7 {
stop();
}
frame 13 {
stop();
}
frame 19 {
stop();
}
frame 25 {
stop();
}
frame 31 {
stop();
}
frame 37 {
stop();
}
frame 43 {
stop();
}
frame 49 {
stop();
}
frame 55 {
stop();
}
frame 61 {
stop();
}
frame 69 {
stop();
}
frame 77 {
stop();
}
frame 85 {
stop();
}
frame 93 {
stop();
}
frame 104 {
stop();
}
frame 115 {
stop();
}
frame 123 {
stop();
}
frame 131 {
stop();
}
frame 143 {
stop();
}
frame 154 {
stop();
}
frame 167 {
stop();
}
frame 180 {
stop();
}
frame 188 {
stop();
}
frame 198 {
stop();
}
frame 208 {
stop();
}
frame 219 {
stop();
}
frame 247 {
play();
}
frame 321 {
gotoAndStop('levelDone');
}
frame 365 {
com.homestarrunner.stinkoman.StinkoGame.levelDoneDone();
}
}
movieClip 138 {
}
movieClip 140 {
}
movieClip 142 {
}
movieClip 144 {
}
movieClip 146 {
}
movieClip 149 {
}
movieClip 156 {
}
movieClip 157 {
}
movieClip 160 {
}
movieClip 164 {
}
movieClip 165 {
frame 12 {
com.homestarrunner.stinkoman.StinkoGame.killAll();
}
frame 41 {
com.homestarrunner.stinkoman.ui.Interface.showKeepTry();
}
frame 80 {
com.homestarrunner.stinkoman.StinkoGame.doneDying();
stop();
}
}
movieClip 170 {
frame 64 {
com.homestarrunner.stinkoman.StinkoGame.levelDoneDone();
}
}
movieClip 174 {
}
movieClip 175 playerOneUp {
frame 1 {
stop();
}
frame 7 {
stop();
}
frame 13 {
stop();
}
frame 19 {
stop();
}
frame 25 {
stop();
}
frame 31 {
stop();
}
frame 37 {
stop();
}
frame 43 {
stop();
}
frame 49 {
stop();
}
frame 55 {
stop();
}
frame 61 {
stop();
}
frame 69 {
stop();
}
frame 77 {
stop();
}
frame 85 {
stop();
}
frame 93 {
stop();
}
frame 104 {
stop();
}
frame 115 {
stop();
}
frame 123 {
stop();
}
frame 131 {
stop();
}
frame 143 {
stop();
}
frame 154 {
stop();
}
frame 167 {
stop();
}
frame 180 {
stop();
}
frame 188 {
stop();
}
frame 196 {
stop();
}
frame 202 {
play();
}
frame 276 {
gotoAndStop('levelDone');
}
}
movieClip 178 {
}
movieClip 181 {
}
movieClip 183 {
}
movieClip 185 {
}
movieClip 187 {
}
movieClip 189 {
}
movieClip 193 {
frame 2 {
_parent.mPlayerWithFist.punchGround(punchGroundTest_mc);
}
}
movieClip 197 {
}
movieClip 198 {
frame 12 {
com.homestarrunner.stinkoman.StinkoGame.killAll();
}
frame 41 {
com.homestarrunner.stinkoman.ui.Interface.showKeepTry();
}
frame 80 {
com.homestarrunner.stinkoman.StinkoGame.doneDying();
stop();
}
}
movieClip 201 {
frame 82 {
com.homestarrunner.stinkoman.StinkoGame.levelDoneDone();
}
}
movieClip 207 {
frame 48 {
gotoAndPlay('loop');
}
}
movieClip 210 {
}
movieClip 211 playerFistman {
frame 1 {
stop();
}
frame 7 {
stop();
}
frame 13 {
stop();
}
frame 19 {
stop();
}
frame 25 {
stop();
}
frame 33 {
stop();
}
frame 41 {
stop();
}
frame 47 {
stop();
}
frame 53 {
stop();
}
frame 59 {
stop();
}
frame 65 {
stop();
}
frame 73 {
stop();
}
frame 81 {
stop();
}
frame 89 {
stop();
}
frame 97 {
stop();
}
frame 110 {
stop();
}
frame 123 {
stop();
}
frame 131 {
stop();
}
frame 139 {
stop();
}
frame 145 {
stop();
}
frame 219 {
gotoAndStop('levelDone');
}
}
movieClip 212 {
}
movieClip 216 {
}
movieClip 220 {
}
movieClip 222 {
}
movieClip 224 {
}
movieClip 226 {
}
movieClip 231 {
}
movieClip 232 {
}
movieClip 236 {
}
movieClip 240 {
}
movieClip 242 {
frame 12 {
com.homestarrunner.stinkoman.StinkoGame.killAll();
}
frame 41 {
com.homestarrunner.stinkoman.ui.Interface.showKeepTry();
}
frame 80 {
if (_parent.gameMode == 'jumping') {
JumpingGame.doneDying();
} else {
com.homestarrunner.stinkoman.StinkoGame.doneDying();
}
stop();
}
}
movieClip 243 playerBeefy {
frame 1 {
stop();
}
frame 7 {
stop();
}
frame 13 {
stop();
}
frame 19 {
stop();
}
frame 25 {
stop();
}
frame 31 {
stop();
}
frame 37 {
stop();
}
frame 43 {
stop();
}
frame 49 {
stop();
}
frame 55 {
stop();
}
frame 61 {
stop();
}
frame 69 {
stop();
}
frame 77 {
stop();
}
frame 85 {
stop();
}
frame 93 {
stop();
}
frame 104 {
stop();
}
frame 115 {
stop();
}
frame 128 {
stop();
}
}
movieClip 245 {
}
movieClip 246 bossbackground {
}
movieClip 248 creditsSky {
}
movieClip 255 cloud_mc {
}
movieClip 257 castlewall {
}
movieClip 259 Bullet24 {
frame 15 {
stop();
bullet.kill();
}
}
movieClip 276 {
frame 80 {
_parent.myBoss.finishCapeToss();
}
}
movieClip 278 {
}
movieClip 280 {
}
movieClip 282 {
}
movieClip 285 {
frame 9 {
_parent.myBoss.startZoom(14);
}
frame 23 {
_parent.myBoss.stopZoom();
}
frame 40 {
_parent.myBoss.jumpBack(22);
}
frame 62 {
_parent.myBoss.stopJump();
}
frame 64 {
_parent.myBoss.changeState('idle');
}
}
movieClip 291 {
frame 9 {
_parent.myBoss.startZoom(14);
}
frame 23 {
_parent.myBoss.stopZoom();
}
frame 40 {
_parent.myBoss.jumpBack(22);
}
frame 62 {
_parent.myBoss.stopJump();
}
frame 64 {
_parent.myBoss.changeState('idle');
}
}
movieClip 297 {
frame 5 {
_parent.myBoss.startLeap(10);
}
frame 15 {
_parent.myBoss.stopLeap();
}
frame 46 {
_parent.myBoss.jumpBack(8);
}
frame 54 {
_parent.myBoss.stopJump();
}
frame 56 {
_parent.myBoss.changeState('idle');
}
}
movieClip 303 {
frame 5 {
_parent.myBoss.startLeap(10);
}
frame 15 {
_parent.myBoss.stopLeap();
}
frame 46 {
_parent.myBoss.jumpBack(8);
}
frame 54 {
_parent.myBoss.stopJump();
}
frame 56 {
_parent.myBoss.changeState('idle');
}
}
movieClip 306 {
}
movieClip 307 {
frame 11 {
_parent.myBoss.slash();
}
frame 50 {
_parent.myBoss.changeState('idle');
}
}
movieClip 312 {
frame 11 {
_parent.myBoss.slash();
}
frame 50 {
_parent.myBoss.changeState('idle');
}
}
movieClip 338 {
frame 35 {
_parent.myBoss.startFlying(65);
}
frame 43 {
_parent.myBoss.fireSpreadshot(true);
}
frame 67 {
_parent.myBoss.fireSpreadshot(true);
}
frame 90 {
_parent.myBoss.fireSpreadshot(false);
}
frame 100 {
_parent.myBoss.stopMoving();
}
frame 140 {
_parent.myBoss.finishFlying();
}
}
movieClip 342 {
frame 35 {
_parent.myBoss.startFlying(65);
}
frame 43 {
_parent.myBoss.fireSpreadshot(true);
}
frame 67 {
_parent.myBoss.fireSpreadshot(true);
}
frame 90 {
_parent.myBoss.fireSpreadshot(false);
}
frame 100 {
_parent.myBoss.stopMoving();
}
frame 140 {
_parent.myBoss.finishFlying();
}
}
movieClip 343 BossZSabre_mc {
frame 1 {
stop();
}
frame 10 {
animator_mc.flippedz_mc._visible = false;
}
}
movieClip 345 {
}
movieClip 347 {
}
movieClip 349 {
}
movieClip 351 {
}
movieClip 352 {
}
movieClip 355 {
}
movieClip 362 {
frame 27 {
_parent.myBoss.shoot();
}
frame 55 {
_parent.myBoss.shoot();
}
}
movieClip 370 {
frame 196 {
gotoAndStop(1);
}
frame 203 {
stop();
}
}
movieClip 372 {
frame 196 {
gotoAndStop(1);
}
}
movieClip 373 {
frame 196 {
gotoAndStop(1);
}
frame 203 {
stop();
}
}
movieClip 374 {
frame 192 {
gotoAndPlay(1);
}
frame 199 {
stop();
}
}
movieClip 378 {
}
movieClip 387 BossEndBoss_mc {
frame 1 {
stop();
}
frame 22 {
myBoss.changeState('firing');
}
frame 32 {
stop();
myBoss.changeState('charging');
}
frame 53 {
myBoss.fadeBackground();
}
frame 188 {
stop();
myBoss.doneDying();
}
}
movieClip 389 {
frame 1 {
stop();
}
frame 9 {
stop();
}
frame 15 {
stop();
}
frame 20 {
stop();
}
frame 28 {
stop();
}
}
movieClip 406 {
}
movieClip 409 {
}
movieClip 410 {
}
movieClip 411 {
frame 1 {
stop();
}
frame 7 {
stop();
}
}
movieClip 413 {
}
movieClip 415 {
}
movieClip 416 bossWall_mc {
frame 1 {
stop();
}
}
movieClip 420 {
}
movieClip 422 {
frame 1 {
stop();
}
frame 14 {
stop();
}
}
movieClip 426 {
}
movieClip 427 {
frame 1 {
stop();
}
frame 14 {
stop();
}
}
movieClip 431 {
}
movieClip 432 {
frame 1 {
stop();
}
frame 14 {
stop();
}
}
movieClip 438 {
frame 13 {
gotoAndPlay(1);
}
frame 19 {
_parent._parent.mBoss.fireBullet();
}
frame 22 {
gotoAndPlay(1);
}
frame 35 {
gotoAndPlay(1);
}
}
movieClip 439 {
frame 1 {
stop();
}
}
movieClip 441 {
}
movieClip 446 {
frame 41 {
stop();
mBoss.doneFrooshing();
}
}
movieClip 447 bossSnake_mc {
}
movieClip 449 brainBossFire_mc {
}
movieClip 459 {
frame 1 {
stop();
}
frame 6 {
trace('bossBrain_mc.animator_mc: ' + _parent.myBoss.dead);
if (!_parent.myBoss.dead) {
gotoAndPlay('flash');
}
}
frame 11 {
if (!_parent.myBoss.dead) {
gotoAndPlay('off');
_parent.myBoss.shootBullets();
}
}
frame 72 {
_parent.myBoss.doneDying();
stop();
}
}
movieClip 460 brainBoss {
frame 1 {
stop();
}
}
movieClip 463 {
frame 1 {
stop();
}
frame 36 {
this._parent.myBoss.doneStomping(this.mID);
stop();
}
}
movieClip 471 {
frame 3 {
gotoAndPlay('normal');
}
}
movieClip 472 {
frame 1 {
stop();
}
frame 13 {
this._parent.myBoss.doneHeadEnter();
}
frame 49 {
stop();
}
frame 55 {
this._parent.myBoss.doneHeadLeave();
stop();
}
}
movieClip 475 bossChicken_mc {
frame 1 {
stop();
}
frame 95 {
myBoss.doneDying();
stop();
}
}
movieClip 476 bossBrain_mc {
frame 1 {
stop();
}
}
movieClip 479 cloudskymiddle {
frame 1 {
stop();
}
frame 80 {
gotoAndStop(1);
}
}
movieClip 483 {
}
movieClip 487 {
}
movieClip 489 {
}
movieClip 490 {
}
movieClip 491 1up_walker_mc {
frame 1 {
stop();
}
frame 14 {
stop();
}
frame 55 {
stop();
com.homestarrunner.stinkoman.StinkoGame.levelDoneDone();
}
frame 63 {
stop();
}
}
movieClip 497 {
frame 15 {
gotoAndPlay('walk');
}
frame 42 {
gotoAndPlay('walk');
}
frame 69 {
_parent._parent.myBoss.walking = true;
gotoAndPlay('walk_halfway');
}
}
movieClip 505 {
frame 1 {
stop();
}
frame 56 {
gotoAndPlay('opening');
}
frame 82 {
gotoAndStop('normal');
}
}
movieClip 515 {
}
movieClip 516 {
frame 1 {
stop();
}
frame 17 {
_parent._parent._parent.myBoss.returnHeadToNormal();
}
frame 50 {
_parent._parent._parent.myBoss.flameAttackFinished();
_parent._parent._parent.myBoss.returnHeadToNormal();
}
}
movieClip 522 {
frame 1 {
stop();
}
frame 10 {
_parent._parent._parent.myBoss.fireNoseBullet();
}
}
movieClip 523 {
}
movieClip 535 {
frame 1 {
stop();
}
frame 47 {
_parent._parent.myBoss.meterIsFull();
stop();
}
}
movieClip 536 {
}
movieClip 538 {
}
movieClip 540 {
frame 1 {
stop();
}
frame 16 {
_parent.myBoss.stopArmFollowing();
}
frame 50 {
_parent.myBoss.makeArmStopHurting();
}
}
movieClip 541 BossTrogador_mc {
frame 1 {
main.front_foot.gotoAndPlay('walk');
main.back_foot.gotoAndPlay('walk_halfway');
}
}
movieClip 544 level9_background {
frame 1 {
stop();
}
}
movieClip 550 dropCloudBaddie {
frame 6 {
gotoAndPlay('loop');
}
frame 9 {
this.myDrop.collectable = true;
}
frame 40 {
myDrop.kill();
stop();
}
frame 42 {
myDrop.kill();
stop();
}
}
movieClip 553 {
}
movieClip 557 {
}
movieClip 561 {
}
movieClip 563 {
}
movieClip 564 {
frame 1 {
stop();
}
frame 70 {
_parent.mBoss.halfwayPointReached();
}
}
movieClip 565 BossTornado_mc {
frame 1 {
stop();
}
}
movieClip 568 {
}
movieClip 571 {
}
movieClip 595 {
frame 7 {
_parent._parent.mBoss.setFridgeOpen(true, 'left');
}
frame 14 {
stop();
}
frame 39 {
_parent._parent.mBoss.setFridgeOpen(false, 'left');
}
frame 48 {
stop();
}
frame 71 {
_parent._parent.mBoss.setFridgeOpen(true, 'right');
}
frame 79 {
stop();
}
frame 103 {
_parent._parent.mBoss.setFridgeOpen(false, 'left');
}
frame 110 {
stop();
}
}
movieClip 596 {
}
movieClip 599 {
frame 75 {
_parent.mBoss.shoot(mDometantID);
}
}
movieClip 601 {
}
movieClip 602 BossNegative_mc {
frame 1 {
trace('boss negative was created');
}
frame 86 {
mBoss.entranceFinished();
}
frame 124 {
mBoss.roarFinished();
}
frame 161 {
mBoss.stepFinished();
}
frame 219 {
mBoss.stepFinished();
}
}
movieClip 603 Bullet23 {
frame 51 {
stop();
bullet.kill();
}
}
movieClip 605 Bullet8 {
}
movieClip 609 Bullet3 {
}
movieClip 610 Bullet21 {
}
movieClip 612 Bullet19 {
}
movieClip 615 {
}
movieClip 616 ShooterObstacle9 {
}
movieClip 617 ShooterObstacle8 {
}
movieClip 620 ShooterObstacle7 {
}
movieClip 623 ShooterObstacle6 {
}
movieClip 626 ShooterObstacle5 {
}
movieClip 629 ShooterObstacle4 {
}
movieClip 632 ShooterObstacle3 {
}
movieClip 633 ShooterObstacle26 {
}
movieClip 634 ShooterObstacle25 {
}
movieClip 635 ShooterObstacle24 {
}
movieClip 638 ShooterObstacle23 {
}
movieClip 641 ShooterObstacle22 {
}
movieClip 644 ShooterObstacle21 {
}
movieClip 645 ShooterObstacle20 {
}
movieClip 648 ShooterObstacle2 {
}
movieClip 653 ShooterObstacle19 {
}
movieClip 654 ShooterObstacle18 {
}
movieClip 655 ShooterObstacle17 {
}
movieClip 656 ShooterObstacle16 {
}
movieClip 657 ShooterObstacle15 {
}
movieClip 658 ShooterObstacle14 {
}
movieClip 659 ShooterObstacle13 {
}
movieClip 660 ShooterObstacle12 {
}
movieClip 661 ShooterObstacle11 {
}
movieClip 662 ShooterObstacle10 {
}
movieClip 663 ShooterObstacle1 {
}
movieClip 664 ShooterObstacle0 {
}
movieClip 666 {
}
movieClip 668 {
}
movieClip 673 Checkpoint0 {
frame 1 {
stop();
}
frame 9 {
gotoAndPlay('float');
}
}
movieClip 675 {
}
movieClip 676 Wall1 {
}
movieClip 677 {
}
movieClip 685 {
}
movieClip 687 {
}
movieClip 689 {
frame 1 {
_parent.mEnemySkullbotGunFloat.createBullet();
}
frame 5 {
_parent.mEnemySkullbotGunFloat.createBullet();
}
}
movieClip 690 Enemy44 {
frame 1 {
stop();
}
frame 32 {
stop();
}
}
movieClip 694 Enemy39 {
frame 1 {
stop();
}
frame 11 {
play();
}
}
movieClip 701 {
}
movieClip 703 {
}
movieClip 704 {
}
movieClip 705 {
}
movieClip 707 {
frame 1 {
stop();
}
frame 46 {
stop();
}
}
movieClip 708 Enemy2 {
frame 1 {
stop();
}
frame 11 {
stop();
}
}
movieClip 713 {
}
movieClip 715 {
}
movieClip 716 Enemy0 {
frame 1 {
stop();
}
frame 27 {
stop();
}
frame 33 {
stop();
}
}
movieClip 718 {
}
movieClip 719 {
}
movieClip 720 Ornament32 {
}
movieClip 723 {
}
movieClip 726 moonsky2 {
frame 1 {
stop();
}
}
movieClip 729 cloudskyfront {
frame 1 {
stop();
}
frame 80 {
gotoAndStop(1);
}
}
movieClip 733 cloudskyback {
frame 1 {
stop();
}
}
frame 1 {
com.homestarrunner.stinkoman.struct.StinkomanXMLData.load();
}
// unknown tag 88 length 295
movieClip 2731 __Packages.com.homestarrunner.stinkoman.StinkoGame {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.StinkoGame) {
var v1 = function (p_mc, pld, viewBox_mc) {
var v5 = this;
if (com.homestarrunner.stinkoman.struct.GlobalData.bossLevel()) {
_root._quality = 'HIGH';
} else {
_root._quality = 'LOW';
}
com.homestarrunner.stinkoman.StinkoGame.ld = pld;
com.homestarrunner.stinkoman.StinkoGame._mc = p_mc;
com.homestarrunner.stinkoman.StinkoGame.bullet_mc = com.homestarrunner.stinkoman.StinkoGame._mc.bullet_mc;
com.homestarrunner.stinkoman.bullet.BulletFriendly.onScreenCounter = 0;
com.homestarrunner.stinkoman.bullet.Bullet.killAll();
com.homestarrunner.stinkoman.StinkoGame.scrollLimitR = 300;
com.homestarrunner.stinkoman.StinkoGame.scrollLimitL = 200;
com.homestarrunner.stinkoman.StinkoGame.scrollLimitB = 200;
com.homestarrunner.stinkoman.StinkoGame.scrollLimitT = 200;
com.homestarrunner.stinkoman.StinkoGame.activeStageCounterX = 0;
com.homestarrunner.stinkoman.StinkoGame.activeStageCounterY = 0;
com.homestarrunner.stinkoman.StinkoGame.viewBox = new Object();
com.homestarrunner.stinkoman.StinkoGame.viewBox.l = viewBox_mc._x;
com.homestarrunner.stinkoman.StinkoGame.viewBox.t = viewBox_mc._y;
com.homestarrunner.stinkoman.StinkoGame.viewBox.r = viewBox_mc._x + viewBox_mc._width;
com.homestarrunner.stinkoman.StinkoGame.viewBox.b = viewBox_mc._y + viewBox_mc._height;
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 1) {
com.homestarrunner.stinkoman.StinkoGame.sScrollA = new com.homestarrunner.stinkoman.util.SeamlessScroll('sky', com.homestarrunner.stinkoman.StinkoGame._mc.skyA_mc, false, true, 2, com.homestarrunner.stinkoman.StinkoGame.viewBox);
com.homestarrunner.stinkoman.StinkoGame.sScrollB = new com.homestarrunner.stinkoman.util.SeamlessScroll('sky2', com.homestarrunner.stinkoman.StinkoGame._mc.skyB_mc, false, true, 0, com.homestarrunner.stinkoman.StinkoGame.viewBox);
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 2) {
com.homestarrunner.stinkoman.StinkoGame.sScrollA = new com.homestarrunner.stinkoman.util.SeamlessScroll('sky', com.homestarrunner.stinkoman.StinkoGame._mc.skyA_mc, false, true, 0, com.homestarrunner.stinkoman.StinkoGame.viewBox);
com.homestarrunner.stinkoman.StinkoGame.sScrollB = new com.homestarrunner.stinkoman.util.SeamlessScroll('kitchenWall', com.homestarrunner.stinkoman.StinkoGame._mc.skyB_mc, false, true, 2, com.homestarrunner.stinkoman.StinkoGame.viewBox);
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 3) {
com.homestarrunner.stinkoman.StinkoGame.sScrollA = new com.homestarrunner.stinkoman.util.SeamlessScroll('sky', com.homestarrunner.stinkoman.StinkoGame._mc.skyA_mc, false, true, 2, com.homestarrunner.stinkoman.StinkoGame.viewBox);
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 4) {
com.homestarrunner.stinkoman.StinkoGame.sScrollA = new com.homestarrunner.stinkoman.util.SeamlessScroll('cavern', com.homestarrunner.stinkoman.StinkoGame._mc.skyA_mc, false, true, 0, com.homestarrunner.stinkoman.StinkoGame.viewBox);
com.homestarrunner.stinkoman.StinkoGame.sScrollB = new com.homestarrunner.stinkoman.util.SeamlessScroll('level4_foreground', com.homestarrunner.stinkoman.StinkoGame._mc.skyB_mc, false, true, 2, com.homestarrunner.stinkoman.StinkoGame.viewBox);
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 5) {
com.homestarrunner.stinkoman.StinkoGame.sScrollA = new com.homestarrunner.stinkoman.util.SeamlessScroll('moonsky2', com.homestarrunner.stinkoman.StinkoGame._mc.skyA_mc, false, true, 2, com.homestarrunner.stinkoman.StinkoGame.viewBox);
com.homestarrunner.stinkoman.StinkoGame.sScrollB = new com.homestarrunner.stinkoman.util.SeamlessScroll('moonsky1', com.homestarrunner.stinkoman.StinkoGame._mc.skyB_mc, false, true, 0, com.homestarrunner.stinkoman.StinkoGame.viewBox);
if (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel != 3) {
com.homestarrunner.stinkoman.StinkoGame.sScrollC = com.homestarrunner.stinkoman.StinkoGame._mc.skyC_mc.attachMovie('shipFlyBy', 'shipFlyBy', 1);
}
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 6) {
com.homestarrunner.stinkoman.StinkoGame.sScrollA = new com.homestarrunner.stinkoman.util.SeamlessScroll('cloudskyback', com.homestarrunner.stinkoman.StinkoGame._mc.skyA_mc, false, true, 0, com.homestarrunner.stinkoman.StinkoGame.viewBox);
com.homestarrunner.stinkoman.StinkoGame.sScrollB = new com.homestarrunner.stinkoman.util.SeamlessScroll('cloudskymiddle', com.homestarrunner.stinkoman.StinkoGame._mc.skyB_mc, false, true, 0, com.homestarrunner.stinkoman.StinkoGame.viewBox);
com.homestarrunner.stinkoman.StinkoGame.sScrollC = new com.homestarrunner.stinkoman.util.SeamlessScroll('cloudskyfront', com.homestarrunner.stinkoman.StinkoGame._mc.skyC_mc, false, true, 0, com.homestarrunner.stinkoman.StinkoGame.viewBox);
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 7) {
com.homestarrunner.stinkoman.StinkoGame.sScrollA = new com.homestarrunner.stinkoman.util.SeamlessScroll('iceskyback', com.homestarrunner.stinkoman.StinkoGame._mc.skyA_mc, false, true, 0, com.homestarrunner.stinkoman.StinkoGame.viewBox);
com.homestarrunner.stinkoman.StinkoGame.sScrollB = new com.homestarrunner.stinkoman.util.SeamlessScroll('iceskyfront', com.homestarrunner.stinkoman.StinkoGame._mc.skyB_mc, false, true, 2, com.homestarrunner.stinkoman.StinkoGame.viewBox);
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 8) {
if (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel < 3) {
com.homestarrunner.stinkoman.StinkoGame.sScrollA = new com.homestarrunner.stinkoman.util.SeamlessScroll('negativeSkyBack', com.homestarrunner.stinkoman.StinkoGame._mc.skyA_mc, false, true, 0, com.homestarrunner.stinkoman.StinkoGame.viewBox);
com.homestarrunner.stinkoman.StinkoGame.sScrollB = new com.homestarrunner.stinkoman.util.SeamlessScroll('negativeSkyFront', com.homestarrunner.stinkoman.StinkoGame._mc.skyB_mc, false, true, 2, com.homestarrunner.stinkoman.StinkoGame.viewBox);
}
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 9) {
com.homestarrunner.stinkoman.StinkoGame.sScrollA = new com.homestarrunner.stinkoman.util.SeamlessScroll('level9_background', com.homestarrunner.stinkoman.StinkoGame._mc.skyA_mc, false, true, 2, com.homestarrunner.stinkoman.StinkoGame.viewBox);
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 10) {
if (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 4) {
com.homestarrunner.stinkoman.StinkoGame.sScrollA = new com.homestarrunner.stinkoman.util.SeamlessScroll('zsabrewall', com.homestarrunner.stinkoman.StinkoGame._mc.skyA_mc, true, true, 2, com.homestarrunner.stinkoman.StinkoGame.viewBox);
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 5) {
com.homestarrunner.stinkoman.StinkoGame.sScrollA = new com.homestarrunner.stinkoman.util.SeamlessScroll('bossbackground', com.homestarrunner.stinkoman.StinkoGame._mc.skyA_mc, false, false, 2, com.homestarrunner.stinkoman.StinkoGame.viewBox);
} else {
com.homestarrunner.stinkoman.StinkoGame.sScrollA = new com.homestarrunner.stinkoman.util.SeamlessScroll('castlewall', com.homestarrunner.stinkoman.StinkoGame._mc.skyA_mc, true, true, 2, com.homestarrunner.stinkoman.StinkoGame.viewBox);
}
}
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 11) {
com.homestarrunner.stinkoman.StinkoGame.sScrollA = new com.homestarrunner.stinkoman.util.SeamlessScroll('creditsSky', com.homestarrunner.stinkoman.StinkoGame._mc.skyA_mc, false, false, 2, com.homestarrunner.stinkoman.StinkoGame.viewBox);
}
}
}
}
}
}
}
}
}
}
}
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 4 && com.homestarrunner.stinkoman.struct.GlobalData.subsublevel < 3) {
com.homestarrunner.stinkoman.StinkoGame.oneUp = new com.homestarrunner.stinkoman.player.Homestar(com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc);
} else {
delete com.homestarrunner.stinkoman.StinkoGame.oneUp;
}
com.homestarrunner.stinkoman.StinkoGame.ld.redrawStageFromXML();
var v3;
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 4) {
v3 = com.homestarrunner.stinkoman.StinkoGame._mc.playerClip_mc.attachMovie('playerFistman', 'playerClip', 1);
com.homestarrunner.stinkoman.StinkoGame.player1 = new com.homestarrunner.stinkoman.player.PlayerWithFist(v3);
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 5) {
v3 = com.homestarrunner.stinkoman.StinkoGame._mc.playerClip_mc.attachMovie('playerOneUp', 'playerClip', 1);
com.homestarrunner.stinkoman.StinkoGame.player1 = new com.homestarrunner.stinkoman.player.PlayerOneUp(v3);
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 7) {
v3 = com.homestarrunner.stinkoman.StinkoGame._mc.playerClip_mc.attachMovie('playerRegular', 'playerClip', 1);
com.homestarrunner.stinkoman.StinkoGame.player1 = new com.homestarrunner.stinkoman.player.PlayerIce(v3);
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 9) {
v3 = com.homestarrunner.stinkoman.StinkoGame._mc.playerClip_mc.attachMovie('playerShooter', 'playerClip', 1);
com.homestarrunner.stinkoman.StinkoGame.player1 = new com.homestarrunner.stinkoman.player.PlayerShip(v3);
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 10 && (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 4 || com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 5)) {
v3 = com.homestarrunner.stinkoman.StinkoGame._mc.playerClip_mc.attachMovie('playerBeefy', 'playerClip', 1);
com.homestarrunner.stinkoman.StinkoGame.player1 = new com.homestarrunner.stinkoman.player.PlayerBeefy(v3);
if (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 4) {
com.homestarrunner.stinkoman.StinkoGame.player1.disableInput();
}
} else {
v3 = com.homestarrunner.stinkoman.StinkoGame._mc.playerClip_mc.attachMovie('playerRegular', 'playerClip', 1);
com.homestarrunner.stinkoman.StinkoGame.player1 = new com.homestarrunner.stinkoman.player.Player(v3);
}
}
}
}
}
if (com.homestarrunner.stinkoman.struct.GlobalData.startAtCheckpoint) {
com.homestarrunner.stinkoman.StinkoGame.killEnemiesNearPoint(com.homestarrunner.stinkoman.StinkoGame.player1._mc._x, com.homestarrunner.stinkoman.StinkoGame.player1._mc._y);
if (com.homestarrunner.stinkoman.StinkoGame.oneUp != undefined) {
com.homestarrunner.stinkoman.StinkoGame.killEnemiesNearPoint(com.homestarrunner.stinkoman.StinkoGame.oneUp._mc._x, com.homestarrunner.stinkoman.StinkoGame.oneUp._mc._y);
}
}
com.homestarrunner.stinkoman.StinkoGame.drawActiveStage(true);
com.homestarrunner.stinkoman.StinkoGame.originX = com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._x;
com.homestarrunner.stinkoman.StinkoGame.bullet_mc._x = com.homestarrunner.stinkoman.StinkoGame.originX;
com.homestarrunner.stinkoman.StinkoGame.originY = com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._y;
com.homestarrunner.stinkoman.StinkoGame.bullet_mc._y = com.homestarrunner.stinkoman.StinkoGame.originY;
com.homestarrunner.stinkoman.StinkoGame.scrollLockX = com.homestarrunner.stinkoman.StinkoGame.ld.levelProperties.ScrollLockX == 'true';
com.homestarrunner.stinkoman.StinkoGame.scrollLockY = com.homestarrunner.stinkoman.StinkoGame.ld.levelProperties.ScrollLockY == 'true';
com.homestarrunner.stinkoman.StinkoGame.inProgress = true;
if (com.homestarrunner.stinkoman.struct.GlobalData.bossLevel()) {
com.homestarrunner.stinkoman.StinkoGame.initBoss();
}
if (!com.homestarrunner.stinkoman.struct.GlobalData.startMusicAtCutscene()) {
com.homestarrunner.stinkoman.StinkoGame.gameSound.stop();
com.homestarrunner.stinkoman.StinkoGame.gameSound = new com.homestarrunner.stinkoman.SoundTrack(com.homestarrunner.stinkoman.StinkoGame._mc);
com.homestarrunner.stinkoman.StinkoGame.gameSound.startFromBeginning();
}
com.homestarrunner.stinkoman.StinkoGame.player1.resetCamera();
};
com.homestarrunner.stinkoman.StinkoGame = v1;
var v2 = v1.prototype;
v1.nudge = function (x, y) {
com.homestarrunner.stinkoman.StinkoGame.activeStageCounterX += x;
com.homestarrunner.stinkoman.StinkoGame.activeStageCounterY += y;
if (x != 0) {
if (com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._x + x > com.homestarrunner.stinkoman.StinkoGame.originX) {
return false;
}
}
if (y != 0) {
if (com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._y + y < com.homestarrunner.stinkoman.StinkoGame.originY) {
return false;
}
}
com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._x += x;
com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._y += y;
com.homestarrunner.stinkoman.StinkoGame.bossMan._mc._y += y;
com.homestarrunner.stinkoman.StinkoGame._mc.bullet_mc._x = com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._x;
com.homestarrunner.stinkoman.StinkoGame._mc.bullet_mc._y = com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._y;
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 4) {
com.homestarrunner.stinkoman.StinkoGame.sScrollA.nudge(x / 2, y);
com.homestarrunner.stinkoman.StinkoGame.sScrollB.nudge(x, y);
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 8) {
com.homestarrunner.stinkoman.StinkoGame.sScrollA.nudge(-x, y);
com.homestarrunner.stinkoman.StinkoGame.sScrollB.nudge(x / 2, y);
} else {
com.homestarrunner.stinkoman.StinkoGame.sScrollA.nudge(x / 3, y / 3);
com.homestarrunner.stinkoman.StinkoGame.sScrollB.nudge(x / 2, y / 2);
com.homestarrunner.stinkoman.StinkoGame.sScrollC.nudge(x * 2, y * 2);
}
}
if (Math.floor(Math.abs(com.homestarrunner.stinkoman.StinkoGame.activeStageCounterX) / 10) > 1 || Math.floor(Math.abs(com.homestarrunner.stinkoman.StinkoGame.activeStageCounterY) / 10) > 1) {
com.homestarrunner.stinkoman.StinkoGame.drawActiveStage();
com.homestarrunner.stinkoman.StinkoGame.activeStageCounterX = 0;
com.homestarrunner.stinkoman.StinkoGame.activeStageCounterY = 0;
}
return true;
};
v1.getGlobalCoord = function (clip_mc) {
var v1 = new Object();
v1.x = clip_mc._x + com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._x;
v1.y = clip_mc._y + com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._y;
return v1;
};
v1.getPlayerGlobal = function () {
var v1 = new Object();
v1.x = com.homestarrunner.stinkoman.StinkoGame.player1._mc._x - com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._x;
v1.y = com.homestarrunner.stinkoman.StinkoGame.player1._mc._y - com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._y;
return v1;
};
v1.drawActiveStage = function (force) {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.StinkoGame.ld.stageObjSource.length) {
var v1 = com.homestarrunner.stinkoman.StinkoGame.ld.stageObjSource[v2];
if (!v1.__get__active()) {
if (com.homestarrunner.stinkoman.StinkoGame.isWithinActiveStage(v1.x, v1.y, 200, 200)) {
v1.assignedObject = com.homestarrunner.stinkoman.StinkoGame.ld.addStageObject(v1.classType, v1.subType, v1.x, v1.y, v1.depth, v1.propObj);
v1.__set__active(true);
}
} else {
if (v1.assignedObject.dontRespawn == false && !com.homestarrunner.stinkoman.StinkoGame.isWithinActiveStage(v1.assignedObject._mc._x, v1.assignedObject._mc._y, 200, 200)) {
v1.__set__active(false);
v1.assignedObject.kill();
v1.assignedObject = undefined;
}
}
++v2;
}
};
v1.resetEnemies = function () {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.StinkoGame.ld.stageObjSource.length) {
var v2 = com.homestarrunner.stinkoman.StinkoGame.ld.stageObjSource[v1];
v2.__set__active(false);
++v1;
}
};
v1.isWithinActiveStage = function (x, y, xBuf, yBuf) {
return x > com.homestarrunner.stinkoman.StinkoGame.viewBox.l - com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._x - xBuf && x < com.homestarrunner.stinkoman.StinkoGame.viewBox.r - com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._x + xBuf && y > com.homestarrunner.stinkoman.StinkoGame.viewBox.t - com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._y - yBuf && y < com.homestarrunner.stinkoman.StinkoGame.viewBox.b - com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._y + yBuf;
};
v1.jumpToOrigin = function () {
com.homestarrunner.stinkoman.StinkoGame.bullet_mc._x = com.homestarrunner.stinkoman.StinkoGame.originX;
com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._x = com.homestarrunner.stinkoman.StinkoGame.bullet_mc._x;
com.homestarrunner.stinkoman.StinkoGame.bullet_mc._y = com.homestarrunner.stinkoman.StinkoGame.originY;
com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._y = com.homestarrunner.stinkoman.StinkoGame.bullet_mc._y;
com.homestarrunner.stinkoman.StinkoGame.drawActiveStage(true);
};
v1.winLevel = function () {
if (!com.homestarrunner.stinkoman.StinkoGame.inProgress) {
return undefined;
}
com.homestarrunner.stinkoman.StinkoGame.oneUp._mc.gotoAndStop('waitHappy');
com.homestarrunner.stinkoman.StinkoGame.oneUp.enabled = false;
com.homestarrunner.stinkoman.StinkoGame.stopGamePlay();
if (com.homestarrunner.stinkoman.struct.GlobalData.shouldLevelWarp()) {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel != 4) {
com.homestarrunner.stinkoman.StinkoGame.player1._mc.gotoAndStop('levelDone');
} else {
com.homestarrunner.stinkoman.StinkoGame.oneUp.win();
}
} else {
com.homestarrunner.stinkoman.struct.GlobalData.lastSceneStorage = new Object();
com.homestarrunner.stinkoman.struct.GlobalData.lastSceneStorage.gameStageX = com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._x;
com.homestarrunner.stinkoman.struct.GlobalData.lastSceneStorage.gameStageY = com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._y;
com.homestarrunner.stinkoman.struct.GlobalData.lastSceneStorage.playerX = com.homestarrunner.stinkoman.StinkoGame.player1._mc._x;
com.homestarrunner.stinkoman.struct.GlobalData.lastSceneStorage.playerY = com.homestarrunner.stinkoman.StinkoGame.player1._mc._y;
com.homestarrunner.stinkoman.StinkoGame.player1._mc.animator_mc.stop();
com.homestarrunner.stinkoman.StinkoGame.levelDoneDone();
}
com.homestarrunner.stinkoman.StinkoGame.inProgress = false;
};
v1.loseLife = function (homestarInstead) {
com.homestarrunner.stinkoman.StinkoGame.stopGamePlay();
com.homestarrunner.stinkoman.StinkoGame.player1._mc.stop();
com.homestarrunner.stinkoman.StinkoGame.bossMan.stop();
--com.homestarrunner.stinkoman.struct.GlobalData.mans;
com.homestarrunner.stinkoman.struct.GlobalData.hits = 0;
com.homestarrunner.stinkoman.ui.Interface.update();
if (homestarInstead) {
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 6) {
var v1;
v1 = com.homestarrunner.stinkoman.StinkoGame._mc.playerYouDead_mc.attachMovie('playerRegular', 'playerClip', 1);
v1._x = com.homestarrunner.stinkoman.StinkoGame.player1._mc._x;
v1._y = com.homestarrunner.stinkoman.StinkoGame.player1._mc._y;
v1.gotoAndStop('youDead_' + com.homestarrunner.stinkoman.StinkoGame.player1.facingDir);
com.homestarrunner.stinkoman.StinkoGame.player1._mc.removeMovieClip();
} else {
com.homestarrunner.stinkoman.StinkoGame.player1.gotoYouDead();
}
}
};
v1.stopGamePlay = function () {
com.homestarrunner.stinkoman.StinkoGame.inProgress = false;
delete com.homestarrunner.stinkoman.StinkoGame.player1._mc.onEnterFrame;
com.homestarrunner.stinkoman.StinkoGame.gameSound.stop();
};
v1.doneDying = function () {
if (com.homestarrunner.stinkoman.struct.GlobalData.mans > 0) {
_root.gotoAndPlay('youDead');
} else {
_root.gotoAndPlay('gameOver');
}
};
v1.spotlightWait = function () {
_root.spotlight_mc.gotoAndPlay('wait');
};
v1.doneDyingAndCrying = function () {
_root.gotoAndStop('gamePlayGo');
com.homestarrunner.stinkoman.StinkoGame.ld.reset();
com.homestarrunner.stinkoman.StinkoGame.player1.reset();
com.homestarrunner.stinkoman.StinkoGame.resetEnemies();
if (com.homestarrunner.stinkoman.struct.GlobalData.startMusicAtCutscene()) {
com.homestarrunner.stinkoman.StinkoGame.gameSound.stop();
com.homestarrunner.stinkoman.StinkoGame.gameSound = new com.homestarrunner.stinkoman.SoundTrack(com.homestarrunner.stinkoman.StinkoGame._mc);
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel != 4) {
com.homestarrunner.stinkoman.StinkoGame.gameSound.startFromBeginning();
}
}
};
v1.levelDoneDone = function () {
com.homestarrunner.stinkoman.struct.GlobalData.markCurrentLevelAsDone();
com.homestarrunner.stinkoman.struct.GlobalData.levelUp();
_root.gotoAndPlay('cutScene');
};
v1.initBoss = function () {
com.homestarrunner.stinkoman.StinkoGame.scrollLockX = true;
com.homestarrunner.stinkoman.StinkoGame.scrollLockY = true;
switch (com.homestarrunner.stinkoman.struct.GlobalData.sublevel) {
case 1:
com.homestarrunner.stinkoman.StinkoGame.bossMan = new com.homestarrunner.stinkoman.stageobject.boss.BossBrain(com.homestarrunner.stinkoman.StinkoGame._mc.boss_mc);
break;
case 2:
com.homestarrunner.stinkoman.StinkoGame.bossMan = new com.homestarrunner.stinkoman.stageobject.boss.BossChicken(com.homestarrunner.stinkoman.StinkoGame._mc.boss_mc);
break;
case 3:
com.homestarrunner.stinkoman.StinkoGame.bossMan = new com.homestarrunner.stinkoman.stageobject.boss.BossWall(com.homestarrunner.stinkoman.StinkoGame._mc.boss_mc);
break;
case 4:
com.homestarrunner.stinkoman.StinkoGame.bossMan = new com.homestarrunner.stinkoman.stageobject.boss.BossSnake(com.homestarrunner.stinkoman.StinkoGame._mc.boss_mc);
break;
case 5:
com.homestarrunner.stinkoman.StinkoGame.bossMan = new com.homestarrunner.stinkoman.stageobject.boss.BossNebulon(com.homestarrunner.stinkoman.StinkoGame._mc.boss_mc);
break;
case 6:
com.homestarrunner.stinkoman.StinkoGame.bossMan = new com.homestarrunner.stinkoman.stageobject.boss.BossTornado(com.homestarrunner.stinkoman.StinkoGame._mc.boss_mc);
break;
case 7:
com.homestarrunner.stinkoman.StinkoGame.bossMan = new com.homestarrunner.stinkoman.stageobject.boss.BossIceMachine(com.homestarrunner.stinkoman.StinkoGame._mc.boss_mc);
break;
case 8:
com.homestarrunner.stinkoman.StinkoGame.bossMan = new com.homestarrunner.stinkoman.stageobject.boss.BossNegative(com.homestarrunner.stinkoman.StinkoGame._mc.boss_mc);
com.homestarrunner.stinkoman.StinkoGame.scrollLockY = false;
break;
case 9:
com.homestarrunner.stinkoman.StinkoGame.bossMan = new com.homestarrunner.stinkoman.stageobject.boss.BossGangster(com.homestarrunner.stinkoman.StinkoGame._mc.boss_mc);
com.homestarrunner.stinkoman.StinkoGame.scrollLockY = false;
break;
case 10:
if (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 1) {
com.homestarrunner.stinkoman.StinkoGame.bossMan = new com.homestarrunner.stinkoman.stageobject.boss.BossEndBoss(com.homestarrunner.stinkoman.StinkoGame._mc.boss_mc);
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 4) {
com.homestarrunner.stinkoman.StinkoGame.bossMan = new com.homestarrunner.stinkoman.stageobject.boss.BossZSabre(com.homestarrunner.stinkoman.StinkoGame._mc.boss_mc);
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 5) {
com.homestarrunner.stinkoman.StinkoGame.bossMan = new com.homestarrunner.stinkoman.stageobject.boss.BossTrogador(com.homestarrunner.stinkoman.StinkoGame._mc.boss_mc);
} else {
trace('Invalid boss level 10.' + com.homestarrunner.stinkoman.struct.GlobalData.subsublevel);
}
}
}
break;
case 10:
com.homestarrunner.stinkoman.StinkoGame.bossMan = new com.homestarrunner.stinkoman.stageobject.boss.BossEndBoss(com.homestarrunner.stinkoman.StinkoGame._mc.boss_mc);
}
var v2 = new Sound(com.homestarrunner.stinkoman.StinkoGame._mc);
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 5) {
v2.attachSound('1up_guy2.wav');
} else {
v2.attachSound('stinko_challenge.wav');
}
v2.start();
v2.onSoundComplete = function () {
false;
};
};
v1.killAll = function () {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.StinkoGame.ld.stageObjects.length) {
com.homestarrunner.stinkoman.StinkoGame.ld.stageObjects[v1]._mc.removeMovieClip();
com.homestarrunner.stinkoman.StinkoGame.ld.stageObjects[v1]._mc.mStageObject.kill();
++v1;
}
com.homestarrunner.stinkoman.StinkoGame.ld.clearStageObjects();
};
v1.killEnemiesNearPoint = function (x, y) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.StinkoGame.ld.stageObjSource.length) {
var v2 = com.homestarrunner.stinkoman.StinkoGame.ld.stageObjSource[v1];
if (v2.classType != 'Enemy') {
} else {
var v4 = v2.x - x;
var v3 = v2.y - y;
if (v4 > -100 && v4 < 100 && (v3 > -150 && v3 < 50)) {
com.homestarrunner.stinkoman.StinkoGame.ld.stageObjSource.splice(v1, 1);
--v1;
}
}
++v1;
}
};
v1.inProgress = false;
ASSetPropFlags(com.homestarrunner.stinkoman.StinkoGame.prototype, null, 1);
}
#endinitclip
}
movieClip 2732 __Packages.com.homestarrunner.stinkoman.player.Homestar {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.player) {
_global.com.homestarrunner.stinkoman.player = new Object();
}
if (!_global.com.homestarrunner.stinkoman.player.Homestar) {
var v1 = function (parent_mc) {
var thisHomestar = this;
com.homestarrunner.stinkoman.player.Homestar.levelBeaten = false;
this._mc = parent_mc.attachMovie('1up_walker_mc', '1up_walker_mc', -1);
this.xVel = 1.5;
this.yVel = 2;
this.happy = false;
this.facingDir = 'right';
this._mc.onEnterFrame = function () {
thisHomestar.update();
};
if (com.homestarrunner.stinkoman.struct.GlobalData.startAtCheckpoint) {
this._mc._x = com.homestarrunner.stinkoman.struct.GlobalData.checkpointOneUpX;
this._mc._y = com.homestarrunner.stinkoman.struct.GlobalData.checkpointOneUpY;
} else {
this._mc._x = 46;
this._mc._y = 280;
}
this.enabled = true;
this.makeSad();
};
com.homestarrunner.stinkoman.player.Homestar = v1;
var v2 = v1.prototype;
v2.update = function () {
if (!this.enabled) {
return undefined;
}
--this.happyCounter;
if (this.happyCounter == 0) {
this.makeSad();
}
this._mc._x += this.xVel;
var v2;
this._mc._y += this.yVel;
v2 = com.homestarrunner.stinkoman.stageobject.MoveablePlatform.hitWalkies(this._mc.hitTestWalk_mc);
if (v2 == undefined) {
v2 = com.homestarrunner.stinkoman.stageobject.Platform.hit(this._mc.hitTestWalk_mc);
}
if (v2 != undefined) {
this._mc._y = v2._y;
this.yVel = 0;
} else {
this.yVel += 1;
}
if (this.yVel >= 10) {
this.yVel = 0;
}
if (this._mc._y > 500) {
this.kill();
return undefined;
}
var v3 = com.homestarrunner.stinkoman.stageobject.LavaFall.hitToHurt(this._mc.hitTestBlock_mc);
if (v3.length > 0) {
this.kill();
return undefined;
}
var v4 = com.homestarrunner.stinkoman.stageobject.enemy.Enemy.anyPlayerDangerTest(this._mc.hitTestBlock_mc);
if (v4 != undefined) {
this.kill();
return undefined;
}
};
v2.kill = function () {
this._mc.gotoAndStop('hurt');
this.xVel = 0;
this.yVel = 0;
com.homestarrunner.stinkoman.StinkoGame.player1.enabled = false;
com.homestarrunner.stinkoman.StinkoGame.player1._mc.animator_mc.stop();
var v3 = this;
this.enabled = false;
com.homestarrunner.stinkoman.StinkoGame.loseLife(true);
var v2 = new com.homestarrunner.stinkoman.effect.CameraEffectPan(this._mc, this._mc._x, this._mc._y, 10, this.doneCentering);
};
v2.doneCentering = function () {
var v2 = this._mc._parent._parent.spotlight_mc;
var v3 = new Object();
v3.x = this._mc._x;
v3.y = this._mc._y - 25;
this._mc._parent.localToGlobal(v3);
v2._x = v3.x;
v2._y = v3.y;
v2.gotoAndStop('on');
v2._xscale = 1000;
v2._yscale = 1000;
if (com.homestarrunner.stinkoman.player.Homestar.levelBeaten) {
v2.scaleTo(100, 1, 'linear', 0, com.homestarrunner.stinkoman.player.Homestar.doneZoomingPlaySound);
} else {
v2.scaleTo(100, 1, 'linear', 0, com.homestarrunner.stinkoman.StinkoGame.spotlightWait);
}
};
v2.win = function () {
this.xVel = 0;
this.yVel = 0;
com.homestarrunner.stinkoman.player.Homestar.levelBeaten = true;
com.homestarrunner.stinkoman.StinkoGame.player1.enabled = false;
com.homestarrunner.stinkoman.StinkoGame.player1._mc.animator_mc.stop();
var v2 = new com.homestarrunner.stinkoman.effect.CameraEffectPan(this._mc, this._mc._x, this._mc._y, 10, this.doneCentering);
};
v2.waitForMoment = function () {
_root.spotlight_mc.gotoAndPlay('wait');
};
v2.correctHappyState = function () {
if (this.happy) {
this._mc.gotoAndStop('walkHappy');
} else {
this._mc.gotoAndStop('walk');
}
};
v1.doneZoomingPlaySound = function () {
com.homestarrunner.stinkoman.StinkoGame.oneUp._mc.gotoAndPlay('waitHappyTalk');
};
v2.makeHappy = function () {
if (!this.enabled) {
return undefined;
}
this.happy = true;
this.happyCounter = 20;
var v2 = this._mc.animator_mc._currentframe;
this._mc.gotoAndStop('walkHappy');
this._mc.animator_mc._currentframe = v2;
};
v2.makeSad = function () {
if (!this.enabled) {
return undefined;
}
this.happy = false;
var v2 = this._mc.animator_mc._currentframe;
this._mc.gotoAndStop('walk');
this._mc.animator_mc._currentframe = v2;
};
ASSetPropFlags(com.homestarrunner.stinkoman.player.Homestar.prototype, null, 1);
}
#endinitclip
}
movieClip 2733 __Packages.com.homestarrunner.stinkoman.struct.GlobalData {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.struct) {
_global.com.homestarrunner.stinkoman.struct = new Object();
}
if (!_global.com.homestarrunner.stinkoman.struct.GlobalData) {
var v1 = function () {};
com.homestarrunner.stinkoman.struct.GlobalData = v1;
var v2 = v1.prototype;
v1.init = function () {
com.homestarrunner.stinkoman.struct.GlobalData.level = 1;
com.homestarrunner.stinkoman.struct.GlobalData.sublevel = 1;
com.homestarrunner.stinkoman.struct.GlobalData.subsublevel = 1;
com.homestarrunner.stinkoman.struct.GlobalData.mans = 3;
com.homestarrunner.stinkoman.struct.GlobalData.shields = 3;
com.homestarrunner.stinkoman.struct.GlobalData.items = 0;
com.homestarrunner.stinkoman.struct.GlobalData.maxHits = 4;
com.homestarrunner.stinkoman.struct.GlobalData.hits = com.homestarrunner.stinkoman.struct.GlobalData.maxHits;
com.homestarrunner.stinkoman.struct.GlobalData.startAtCheckpoint = false;
com.homestarrunner.stinkoman.struct.GlobalData.levelLengths = new Array();
com.homestarrunner.stinkoman.struct.GlobalData.levelLengths[0] = [3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 1];
com.homestarrunner.stinkoman.struct.GlobalData.bossLevels = {};
com.homestarrunner.stinkoman.struct.GlobalData.bossLevels[[1, 1, 3]] = true;
com.homestarrunner.stinkoman.struct.GlobalData.bossLevels[[1, 2, 3]] = true;
com.homestarrunner.stinkoman.struct.GlobalData.bossLevels[[1, 3, 3]] = true;
com.homestarrunner.stinkoman.struct.GlobalData.bossLevels[[1, 4, 3]] = true;
com.homestarrunner.stinkoman.struct.GlobalData.bossLevels[[1, 5, 3]] = true;
com.homestarrunner.stinkoman.struct.GlobalData.bossLevels[[1, 6, 3]] = true;
com.homestarrunner.stinkoman.struct.GlobalData.bossLevels[[1, 7, 3]] = true;
com.homestarrunner.stinkoman.struct.GlobalData.bossLevels[[1, 8, 3]] = true;
com.homestarrunner.stinkoman.struct.GlobalData.bossLevels[[1, 9, 3]] = true;
com.homestarrunner.stinkoman.struct.GlobalData.bossLevels[[1, 10, 1]] = true;
com.homestarrunner.stinkoman.struct.GlobalData.bossLevels[[1, 10, 4]] = true;
com.homestarrunner.stinkoman.struct.GlobalData.bossLevels[[1, 10, 5]] = true;
if (com.homestarrunner.stinkoman.struct.GlobalData.levelLengths[0].length != com.homestarrunner.stinkoman.struct.GlobalData.maxSublevel) {
trace('maxSubLevel (' + com.homestarrunner.stinkoman.struct.GlobalData.maxSublevel + ') or levelLengths (length = ' + com.homestarrunner.stinkoman.struct.GlobalData.levelLengths[0].length + ') is wrong. (maxSublevel should be equal to the length)');
}
};
v1.setUpdatedDifficulty = function (isUpdated) {
com.homestarrunner.stinkoman.struct.GlobalData.updatedDifficulty = isUpdated;
if (isUpdated) {
com.homestarrunner.stinkoman.struct.GlobalData.maxHits = 6;
com.homestarrunner.stinkoman.struct.GlobalData.mans = 5;
com.homestarrunner.stinkoman.struct.GlobalData.shields = 5;
} else {
com.homestarrunner.stinkoman.struct.GlobalData.maxHits = 4;
com.homestarrunner.stinkoman.struct.GlobalData.mans = 3;
com.homestarrunner.stinkoman.struct.GlobalData.shields = 3;
}
com.homestarrunner.stinkoman.struct.GlobalData.hits = com.homestarrunner.stinkoman.struct.GlobalData.maxHits;
};
v1.cutSceneEnded = function () {
trace('cutscene end: sublevel = ' + com.homestarrunner.stinkoman.struct.GlobalData.sublevel + ' subsublevel = ' + com.homestarrunner.stinkoman.struct.GlobalData.subsublevel);
_root.cutScene_mc.removeMovieClip();
var v2 = com.homestarrunner.stinkoman.struct.GlobalData.levelLengths[com.homestarrunner.stinkoman.struct.GlobalData.level - 1][com.homestarrunner.stinkoman.struct.GlobalData.sublevel - 1];
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == com.homestarrunner.stinkoman.struct.GlobalData.maxSublevel && com.homestarrunner.stinkoman.struct.GlobalData.subsublevel > v2) {
com.homestarrunner.stinkoman.struct.GlobalData.init();
com.homestarrunner.stinkoman.StinkoGame.killAll();
_root.gotoAndStop('youDead');
_root.gotoAndStop('tuneInNextWeek');
return undefined;
}
if (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel > v2 && (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 3 || com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 4 || com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 5 || com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 6 || com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 7 || com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 8 || com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 9)) {
com.homestarrunner.stinkoman.struct.GlobalData.levelUp();
_root.gotoAndStop('youDead');
_root.gotoAndStop('cutScene');
com.homestarrunner.stinkoman.struct.GlobalData.showCutScene();
return undefined;
}
if (com.homestarrunner.stinkoman.struct.GlobalData.shouldShowStartLevelScreen()) {
trace('loadFile');
_root.gotoAndPlay('loadFile');
} else {
trace('gamePlayGo');
_root.gotoAndPlay('gamePlayGo');
}
};
v1.showCutScene = function () {
trace('Playing cutscene externalSwf/cutscene' + com.homestarrunner.stinkoman.struct.GlobalData.level + '.' + com.homestarrunner.stinkoman.struct.GlobalData.sublevel + '.' + com.homestarrunner.stinkoman.struct.GlobalData.subsublevel + '.swf');
_root.cutSceneParent_mc.loadMovie('externalSwf/cutscene' + com.homestarrunner.stinkoman.struct.GlobalData.level + '.' + com.homestarrunner.stinkoman.struct.GlobalData.sublevel + '.' + com.homestarrunner.stinkoman.struct.GlobalData.subsublevel + '.swf');
if (com.homestarrunner.stinkoman.struct.GlobalData.startMusicAtCutscene()) {
com.homestarrunner.stinkoman.StinkoGame.gameSound.stop();
com.homestarrunner.stinkoman.StinkoGame.gameSound = new com.homestarrunner.stinkoman.SoundTrack(com.homestarrunner.stinkoman.StinkoGame._mc);
}
};
v1.levelUp = function () {
com.homestarrunner.stinkoman.struct.GlobalData.startAtCheckpoint = false;
++com.homestarrunner.stinkoman.struct.GlobalData.subsublevel;
if (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel > com.homestarrunner.stinkoman.struct.GlobalData.levelLengths[com.homestarrunner.stinkoman.struct.GlobalData.level - 1][com.homestarrunner.stinkoman.struct.GlobalData.sublevel - 1]) {
++com.homestarrunner.stinkoman.struct.GlobalData.sublevel;
com.homestarrunner.stinkoman.struct.GlobalData.subsublevel = 1;
com.homestarrunner.stinkoman.struct.GlobalData.lastSceneStorage = new Object();
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel > com.homestarrunner.stinkoman.struct.GlobalData.levelLengths[com.homestarrunner.stinkoman.struct.GlobalData.level - 1].length) {
trace('Error: Reached the end of all the levels while trying to level up');
++com.homestarrunner.stinkoman.struct.GlobalData.level;
com.homestarrunner.stinkoman.struct.GlobalData.sublevel = 1;
}
}
};
v1.shouldLevelWarp = function () {
if (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 1 && com.homestarrunner.stinkoman.struct.GlobalData.sublevel != 3) {
return true;
}
if (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel != 1 || !com.homestarrunner.stinkoman.struct.GlobalData.bossLevel()) {
return false;
} else {
return true;
}
};
v1.shouldShowStartLevelScreen = function () {
trace('shouldShowStartLevelScreen, sublevel = ' + com.homestarrunner.stinkoman.struct.GlobalData.sublevel + ', subsublevel = ' + com.homestarrunner.stinkoman.struct.GlobalData.subsublevel);
if (com.homestarrunner.stinkoman.struct.GlobalData.bossLevel()) {
return false;
}
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 3) {
return false;
}
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 10 && com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 6) {
return false;
}
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 11) {
return false;
}
return true;
};
v1.goalWarpsPlayer = function () {
if (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 1 && com.homestarrunner.stinkoman.struct.GlobalData.sublevel != 3) {
return true;
}
if (com.homestarrunner.stinkoman.struct.GlobalData.bossLevel()) {
return false;
} else {
return true;
}
};
v1.bossLevel = function () {
return com.homestarrunner.stinkoman.struct.GlobalData.bossLevels[[com.homestarrunner.stinkoman.struct.GlobalData.level, com.homestarrunner.stinkoman.struct.GlobalData.sublevel, com.homestarrunner.stinkoman.struct.GlobalData.subsublevel]] === true;
};
v1.startMusicAtCutscene = function () {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 10) {
return false;
}
return com.homestarrunner.stinkoman.struct.GlobalData.bossLevel();
};
v1.getLevelMusicName = function () {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 10) {
if (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 4 || com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 6) {
return 'Level1.10.4.mp3';
}
if (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 5) {
return 'Level1.10.5.mp3';
}
}
if (com.homestarrunner.stinkoman.struct.GlobalData.bossLevel()) {
return 'Boss_Fight.mp3';
}
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 3) {
return 'Level1.' + com.homestarrunner.stinkoman.struct.GlobalData.sublevel + '.' + com.homestarrunner.stinkoman.struct.GlobalData.subsublevel + '.mp3';
}
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 11) {
return null;
}
return 'Level1.' + com.homestarrunner.stinkoman.struct.GlobalData.sublevel + '.mp3';
};
v1.resetHits = function () {
com.homestarrunner.stinkoman.struct.GlobalData.hits = com.homestarrunner.stinkoman.struct.GlobalData.maxHits;
};
v1.resetShields = function () {
if (com.homestarrunner.stinkoman.struct.GlobalData.updatedDifficulty) {
com.homestarrunner.stinkoman.struct.GlobalData.shields = 5;
} else {
com.homestarrunner.stinkoman.struct.GlobalData.shields = 3;
}
};
v1.fillHits = function (numToAdd) {
if (numToAdd == undefined) {
com.homestarrunner.stinkoman.struct.GlobalData.hits = com.homestarrunner.stinkoman.struct.GlobalData.maxHits;
} else {
com.homestarrunner.stinkoman.struct.GlobalData.hits += numToAdd;
if (com.homestarrunner.stinkoman.struct.GlobalData.hits > com.homestarrunner.stinkoman.struct.GlobalData.maxHits) {
com.homestarrunner.stinkoman.struct.GlobalData.hits = com.homestarrunner.stinkoman.struct.GlobalData.maxHits;
}
}
com.homestarrunner.stinkoman.ui.Interface.update();
};
v1.extraMan = function () {
++com.homestarrunner.stinkoman.struct.GlobalData.mans;
com.homestarrunner.stinkoman.ui.Interface.update();
};
v1.getShield = function () {
++com.homestarrunner.stinkoman.struct.GlobalData.shields;
com.homestarrunner.stinkoman.ui.Interface.update();
};
v1.useShield = function () {
if (com.homestarrunner.stinkoman.struct.GlobalData.shields > 0) {
--com.homestarrunner.stinkoman.struct.GlobalData.shields;
com.homestarrunner.stinkoman.ui.Interface.update();
return true;
} else {
return false;
}
};
v1.getMaxBulletsOnScreen = function () {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 9) {
return 10;
}
return 3;
};
v1.markCurrentLevelAsDone = function () {
com.homestarrunner.stinkoman.struct.StinkoSaveData.markLevelAsFinished(com.homestarrunner.stinkoman.struct.GlobalData.sublevel, com.homestarrunner.stinkoman.struct.GlobalData.subsublevel);
};
v1.maxSublevel = 11;
v1.startAtCheckpoint = false;
v1.useLocalLevelBuffer = false;
v1.makePlayerInvincible = false;
v1.makePlayerFast = false;
v1.updatedDifficulty = false;
ASSetPropFlags(com.homestarrunner.stinkoman.struct.GlobalData.prototype, null, 1);
}
#endinitclip
}
movieClip 2734 __Packages.com.homestarrunner.stinkoman.SoundTrack {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.SoundTrack) {
var v1 = function (p_mc) {
super(p_mc);
var thisSoundTrack = this;
this.musicName = com.homestarrunner.stinkoman.struct.GlobalData.getLevelMusicName();
if (this.musicName == null) {
return undefined;
}
this.attachSound(this.musicName);
thisSoundTrack.start();
this.onSoundComplete = function () {
thisSoundTrack.loopSound();
};
};
com.homestarrunner.stinkoman.SoundTrack = v1;
com.homestarrunner.stinkoman.SoundTrack extends Sound;
var v2 = v1.prototype;
v2.startFromBeginning = function () {
stop();
this.start();
};
v2.loopSound = function () {
stop();
switch (this.musicName) {
case 'Level1.1.mp3':
this.start(2.52);
break;
case 'Level1.8.mp3':
this.start(2.58);
break;
case 'Level1.9.mp3':
this.start(4.54);
break;
default:
this.start();
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.SoundTrack.prototype, null, 1);
}
#endinitclip
}
movieClip 2735 __Packages.com.homestarrunner.stinkoman.ui.Interface {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.ui) {
_global.com.homestarrunner.stinkoman.ui = new Object();
}
if (!_global.com.homestarrunner.stinkoman.ui.Interface) {
var v1 = function () {};
com.homestarrunner.stinkoman.ui.Interface = v1;
var v2 = v1.prototype;
v1.setMovieClips = function (interface_mc, interface_background_mc) {
com.homestarrunner.stinkoman.ui.Interface._mc = interface_mc;
com.homestarrunner.stinkoman.ui.Interface._backgroundMC = interface_background_mc;
com.homestarrunner.stinkoman.ui.Interface.update();
};
v1.update = function (p_mc) {
if (p_mc != undefined) {
com.homestarrunner.stinkoman.ui.Interface._mc = p_mc;
}
com.homestarrunner.stinkoman.ui.Interface._mc.mans_txt.text = com.homestarrunner.stinkoman.struct.GlobalData.mans;
com.homestarrunner.stinkoman.ui.Interface._mc.items_mc.items_txt.text = com.homestarrunner.stinkoman.struct.GlobalData.items;
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 9) {
com.homestarrunner.stinkoman.ui.Interface._mc.items_mc.items_txt.text = com.homestarrunner.stinkoman.struct.GlobalData.shields;
}
com.homestarrunner.stinkoman.ui.Interface._mc.sublevel_txt.text = com.homestarrunner.stinkoman.struct.GlobalData.sublevel + '.' + com.homestarrunner.stinkoman.struct.GlobalData.subsublevel;
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 8) {
com.homestarrunner.stinkoman.ui.Interface._mc.sublevel_txt.text = '-0.' + com.homestarrunner.stinkoman.struct.GlobalData.subsublevel;
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 10 && com.homestarrunner.stinkoman.struct.GlobalData.subsublevel > 1) {
com.homestarrunner.stinkoman.ui.Interface._mc.sublevel_txt.text = com.homestarrunner.stinkoman.struct.GlobalData.sublevel + '.' + (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel - 1);
}
}
if (com.homestarrunner.stinkoman.struct.GlobalData.updatedDifficulty) {
com.homestarrunner.stinkoman.ui.Interface._mc.energy_meter_mc.gotoAndStop('helpy' + com.homestarrunner.stinkoman.struct.GlobalData.hits);
} else {
com.homestarrunner.stinkoman.ui.Interface._mc.energy_meter_mc.gotoAndStop('classic' + com.homestarrunner.stinkoman.struct.GlobalData.hits);
}
com.homestarrunner.stinkoman.ui.Interface._mc.keepTry_mc._visible = false;
com.homestarrunner.stinkoman.ui.Interface._mc.keepTry_black_mc._visible = false;
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 3 && com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 1) {
com.homestarrunner.stinkoman.ui.Interface._mc.items_mc._visible = true;
com.homestarrunner.stinkoman.ui.Interface._mc.items_mc.itemType_mc.gotoAndStop(1);
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 3 && com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 2) {
com.homestarrunner.stinkoman.ui.Interface._mc.items_mc._visible = true;
com.homestarrunner.stinkoman.ui.Interface._mc.items_mc.itemType_mc.gotoAndStop(2);
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 9) {
com.homestarrunner.stinkoman.ui.Interface._mc.items_mc._visible = true;
com.homestarrunner.stinkoman.ui.Interface._mc.items_mc.itemType_mc.gotoAndStop(3);
} else {
com.homestarrunner.stinkoman.ui.Interface._mc.items_mc._visible = false;
}
}
}
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 5) {
com.homestarrunner.stinkoman.ui.Interface._mc.head_type.gotoAndStop('oneUp');
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 9) {
com.homestarrunner.stinkoman.ui.Interface._mc.head_type.gotoAndStop('ship');
} else {
com.homestarrunner.stinkoman.ui.Interface._mc.head_type.gotoAndStop('stinko');
}
}
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 10 && com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 6 && com.homestarrunner.stinkoman.struct.GlobalData.hits > 0) {
com.homestarrunner.stinkoman.ui.Interface._mc.escape_timer_mc._visible = true;
} else {
com.homestarrunner.stinkoman.ui.Interface._mc.escape_timer_mc._visible = false;
}
};
v1.updateEscapeTimer = function (timeleft) {
if (timeleft < 0) {
com.homestarrunner.stinkoman.ui.Interface._mc.escape_timer_mc._visible = false;
return undefined;
}
com.homestarrunner.stinkoman.ui.Interface._mc.escape_timer_mc.timeleft_top.text = timeleft;
com.homestarrunner.stinkoman.ui.Interface._mc.escape_timer_mc.timeleft_bottom.text = timeleft;
};
v1.showKeepTry = function () {
if (com.homestarrunner.stinkoman.struct.GlobalData.mans > 0) {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 10 && com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 6) {
com.homestarrunner.stinkoman.ui.Interface._mc.keepTry_black_mc._visible = true;
} else {
com.homestarrunner.stinkoman.ui.Interface._mc.keepTry_mc._visible = true;
}
}
};
v1.showStartUpMessage = function () {
if (com.homestarrunner.stinkoman.struct.GlobalData.bossLevel()) {
com.homestarrunner.stinkoman.ui.Interface._mc.previewMessage_mc.textVar = '';
return undefined;
}
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 10 && com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 6) {
com.homestarrunner.stinkoman.ui.Interface._mc.previewMessage_mc.textVar = '';
return undefined;
}
com.homestarrunner.stinkoman.ui.Interface._mc.previewMessage_mc.textVar = 'START PLAY!';
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 5 || com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 9) {
com.homestarrunner.stinkoman.ui.Interface._mc.previewMessage_mc._txt.textColor = 16777215;
}
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 3 && com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 1) {
com.homestarrunner.stinkoman.ui.Interface._mc.previewMessage_mc.textVar = 'PUNCH RAINDROPS TO COLLECT 20 ITEMS!';
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 1 && com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 1) {
com.homestarrunner.stinkoman.ui.Interface._mc.previewMessage_mc.textVar = 'START PLAY!\nA - JUMP,\nS - FIRE,\nARROW KEYS - MOVE';
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 3 && com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 2) {
com.homestarrunner.stinkoman.ui.Interface._mc.previewMessage_mc.textVar = 'GET TENBREAD BUT NOT OTHER THINGS!';
com.homestarrunner.stinkoman.ui.Interface._mc.previewMessage_mc._y += 120;
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 4 && com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 1) {
com.homestarrunner.stinkoman.ui.Interface._mc.previewMessage_mc.textVar = 'PROTECT 1-UP!\nA - JUMP,\nS - POUND,\nARROW KEYS - MOVE';
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 9 && com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 1) {
com.homestarrunner.stinkoman.ui.Interface._mc.previewMessage_mc.textVar = 'S - SHOOT\nA - SHIELD';
}
}
}
}
}
};
v1.hide = function () {
com.homestarrunner.stinkoman.ui.Interface._mc._visible = false;
com.homestarrunner.stinkoman.ui.Interface._backgroundMC._visible = false;
};
ASSetPropFlags(com.homestarrunner.stinkoman.ui.Interface.prototype, null, 1);
}
#endinitclip
}
movieClip 2736 __Packages.com.homestarrunner.stinkoman.struct.StinkoSaveData {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.struct) {
_global.com.homestarrunner.stinkoman.struct = new Object();
}
if (!_global.com.homestarrunner.stinkoman.struct.StinkoSaveData) {
var v1 = function () {};
com.homestarrunner.stinkoman.struct.StinkoSaveData = v1;
var v2 = v1.prototype;
v1.isLevelFinished = function (sublevel, subsublevel) {
if (!com.homestarrunner.stinkoman.struct.StinkoSaveData.loadedSaveData) {
com.homestarrunner.stinkoman.struct.StinkoSaveData.loadSaveData();
}
var v2 = sublevel + '.' + subsublevel;
var v1 = com.homestarrunner.stinkoman.struct.StinkoSaveData.levelsFinished[v2] == true;
return v1;
};
v1.isLevelUnlocked = function (sublevel, subsublevel) {
if (com.homestarrunner.stinkoman.struct.GlobalData.useLocalLevelBuffer) {
return true;
}
if (sublevel == 10 && subsublevel > 1) {
return com.homestarrunner.stinkoman.struct.StinkoSaveData.isLevelFinished(sublevel, subsublevel - 1);
}
if (subsublevel == 3) {
return com.homestarrunner.stinkoman.struct.StinkoSaveData.isLevelFinished(sublevel, subsublevel - 1);
}
return true;
};
v1.markLevelAsFinished = function (sublevel, subsublevel) {
var v1 = sublevel + '.' + subsublevel;
trace('Marking level as finished: ' + v1);
com.homestarrunner.stinkoman.struct.StinkoSaveData.levelsFinished[v1] = true;
com.homestarrunner.stinkoman.util.LocalData.save('stinkoman', v1, true, '/');
};
v1.loadSaveData = function () {
var v4 = com.homestarrunner.stinkoman.util.LocalData.loadData('stinkoman', '/');
trace('Loading save data. Completed levels:');
var v3 = 1;
while (v3 <= 11) {
var v2 = 1;
while (v2 <= 6) {
var v1 = v3 + '.' + v2;
if (v4[v1] == true) {
com.homestarrunner.stinkoman.struct.StinkoSaveData.levelsFinished[v1] = true;
trace(' ' + v1);
}
++v2;
}
++v3;
}
com.homestarrunner.stinkoman.struct.StinkoSaveData.loadedSaveData = true;
};
v1.loadedSaveData = false;
v1.levelsFinished = new Array();
ASSetPropFlags(com.homestarrunner.stinkoman.struct.StinkoSaveData.prototype, null, 1);
}
#endinitclip
}
movieClip 2737 __Packages.com.homestarrunner.stinkoman.util.LocalData {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.util) {
_global.com.homestarrunner.stinkoman.util = new Object();
}
if (!_global.com.homestarrunner.stinkoman.util.LocalData) {
var v1 = function () {};
com.homestarrunner.stinkoman.util.LocalData = v1;
var v2 = v1.prototype;
v1.save = function (record, field, value, path) {
var v1;
if (path == undefined) {
v1 = Object(SharedObject.getLocal(record));
} else {
v1 = Object(SharedObject.getLocal(record, path));
}
v1.data[field] = value;
v1.flush();
};
v1.load = function (record, field, path) {
if (path == undefined) {
return (Object(SharedObject.getLocal(record))).data[field];
} else {
return (Object(SharedObject.getLocal(record, path))).data[field];
}
};
v1.loadData = function (record, path) {
if (path == undefined) {
return (Object(SharedObject.getLocal(record))).data;
} else {
return (Object(SharedObject.getLocal(record, path))).data;
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.util.LocalData.prototype, null, 1);
}
#endinitclip
}
movieClip 2738 __Packages.com.homestarrunner.stinkoman.stageobject.StageObject {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.StageObject) {
var v1 = function (pParent_mc, x, y, pSubType, pSymbolName, depth) {
var v2 = this;
if (com.homestarrunner.stinkoman.stageobject.StageObject.namingCounter == undefined) {
com.homestarrunner.stinkoman.stageobject.StageObject.namingCounter = 0;
}
this.subType = pSubType;
this.symbolName = pSymbolName;
this.parent_mc = pParent_mc;
this.dontRespawn = false;
if (this.symbolName == 'YMovingPlatform0') {
this.symbolName = 'YMovingPlatform0fix';
}
this._mc = this.parent_mc.attachMovie(this.symbolName, this.symbolName + '_so' + com.homestarrunner.stinkoman.stageobject.StageObject.namingCounter++, depth);
if (this._mc == undefined) {
trace('Couldn\'t attach symbol ' + this.symbolName + '!');
}
this._mc._x = x;
this._mc._y = y;
this._mc.mStageObject = this;
};
com.homestarrunner.stinkoman.stageobject.StageObject = v1;
var v2 = v1.prototype;
v2.updateDepthParam = function () {
this.depth = this._mc.getDepth();
};
v2.kill = function () {
this.clearFromObjectsArray();
this._mc.removeMovieClip();
false;
};
v2.clearFromObjectsArray = function () {
this.die();
};
v2.die = function () {};
v2.getAdditonalAttributes = function () {
return null;
};
v1.stageObjectArray = new Array();
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.StageObject.prototype, null, 1);
}
#endinitclip
}
movieClip 2739 __Packages.com.homestarrunner.stinkoman.stageobject.MoveablePlatform {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.MoveablePlatform) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'MoveablePlatform' + typeNum, depth);
if (com.homestarrunner.stinkoman.stageobject.MoveablePlatform.MoveablePlatformArray == undefined) {
com.homestarrunner.stinkoman.stageobject.MoveablePlatform.MoveablePlatformArray = new Array();
}
this.movementOffset = new Array();
this.movementOffset._x = 16;
this.movementOffset._y = 8;
this.switchCode = Number(initObj.switchCode);
if (this.switchCode == undefined || isNaN(this.switchCode)) {
this.switchCode = 0;
}
this.axis = initObj.axis;
if (this.axis == undefined) {
this.axis = '_x';
}
this.range = Number(initObj.range);
if (this.range == undefined || isNaN(this.range)) {
this.range = 0;
}
this.start = Number(initObj.start);
if (this.start == undefined || isNaN(this.start)) {
this.start = 0;
}
if (this.start > this.range) {
this.start = this.range;
}
this.dir = Number(initObj.dir);
if (this.dir == undefined || isNaN(this.dir)) {
this.dir = 1;
}
this.pos = this.start;
this.classType = 'MoveablePlatform';
var v5 = this;
com.homestarrunner.stinkoman.stageobject.MoveablePlatform.MoveablePlatformArray.push(this);
if (com.homestarrunner.stinkoman.editor.LevelEditor.editorActive) {
this.updateRangeLife();
this.updateStartPos();
} else {
this._mc[this.axis] += this.pos * this.movementOffset[this.axis];
}
this.updateArrowDir();
};
com.homestarrunner.stinkoman.stageobject.MoveablePlatform = v1;
com.homestarrunner.stinkoman.stageobject.MoveablePlatform extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.MoveablePlatform.MoveablePlatformArray.length) {
if (this == com.homestarrunner.stinkoman.stageobject.MoveablePlatform.MoveablePlatformArray[v2]) {
com.homestarrunner.stinkoman.stageobject.MoveablePlatform.MoveablePlatformArray.splice(v2, 1);
break;
}
++v2;
}
};
v1.hit = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.MoveablePlatform.MoveablePlatformArray.length) {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.MoveablePlatform.MoveablePlatformArray[v1]._mc) && test_mc != com.homestarrunner.stinkoman.stageobject.MoveablePlatform.MoveablePlatformArray[v1]._mc) {
return com.homestarrunner.stinkoman.stageobject.MoveablePlatform.MoveablePlatformArray[v1]._mc;
}
++v1;
}
return undefined;
};
v1.hitWalkies = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.MoveablePlatform.MoveablePlatformArray.length) {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.MoveablePlatform.MoveablePlatformArray[v1]._mc.hitTest_mc)) {
return com.homestarrunner.stinkoman.stageobject.MoveablePlatform.MoveablePlatformArray[v1]._mc;
}
++v1;
}
return undefined;
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.switchCode = this.switchCode;
v2.axis = this.axis;
v2.range = this.range;
v2.start = this.start;
v2.dir = this.dir;
return v2;
};
v1.affectAll = function (code) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.MoveablePlatform.MoveablePlatformArray.length) {
if (com.homestarrunner.stinkoman.stageobject.MoveablePlatform.MoveablePlatformArray[v1].switchCode == code) {
com.homestarrunner.stinkoman.stageobject.MoveablePlatform.MoveablePlatformArray[v1].affect();
}
++v1;
}
};
v2.affect = function () {
var v2 = this.pos;
this.pos += this.dir;
if (this.pos > this.range) {
this.pos -= 2;
this.dir = -1;
}
if (this.pos < 0) {
this.pos += 2;
this.dir = 1;
}
this._mc[this.axis] += this.movementOffset[this.axis] * this.dir;
if (com.homestarrunner.stinkoman.stageobject.MoveablePlatform.hit(this._mc) != undefined) {
this._mc[this.axis] -= this.movementOffset[this.axis] * this.dir;
this.pos = v2;
}
this.updateArrowDir();
};
v2.updateRangeLife = function (newRange) {
if (newRange != undefined) {
this.range = newRange;
}
var v2 = 0;
while (this._mc['guide' + v2]._name != undefined) {
this._mc['guide' + v2].removeMovieClip();
++v2;
}
v2 = 0;
while (v2 <= this.range) {
var v3 = this._mc.attachMovie('MovablePlatformGhost', 'guide' + v2, v2);
v3[this.axis] = v2 * this.movementOffset[this.axis];
++v2;
}
};
v2.updateStartPos = function (newPos) {
if (newPos != undefined) {
this.start = newPos;
}
this._mc.panel_mc[this.axis] = this.start * this.movementOffset[this.axis];
};
v2.resetAxis = function (newAxis) {
if (newAxis != undefined) {
this.axis = newAxis;
}
this._mc.panel_mc._x = 0;
this._mc.panel_mc._y = 0;
this.updateRangeLife();
this.updateStartPos();
this.updateArrowDir();
};
v2.updateArrowDir = function () {
var v2 = this.dir;
if (!com.homestarrunner.stinkoman.editor.LevelEditor.editorActive) {
if (this.pos + this.dir > this.range) {
this.indicateLimitHit();
v2 = -1;
}
if (this.pos + this.dir < 0) {
this.indicateLimitHit();
v2 = 1;
}
}
if (this.axis == '_x') {
if (v2 > 0) {
this._mc.panel_mc.gotoAndStop('r');
} else {
this._mc.panel_mc.gotoAndStop('l');
}
} else {
if (v2 > 0) {
this._mc.panel_mc.gotoAndStop('d');
} else {
this._mc.panel_mc.gotoAndStop('u');
}
}
};
v2.indicateLimitHit = function () {
this._mc.indicator_mc.gotoAndPlay('go');
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.MoveablePlatform.prototype, null, 1);
}
#endinitclip
}
movieClip 2740 __Packages.com.homestarrunner.stinkoman.editor.LevelEditor {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.editor) {
_global.com.homestarrunner.stinkoman.editor = new Object();
}
if (!_global.com.homestarrunner.stinkoman.editor.LevelEditor) {
var v1 = function (p_mc, pGameStage_mc) {
var v5 = this;
com.homestarrunner.stinkoman.editor.LevelEditor.editorActive = true;
var v4 = new Sound(_root);
v4.setVolume(0);
com.homestarrunner.stinkoman.editor.LevelEditor._mc = p_mc;
var v6 = new com.homestarrunner.stinkoman.editor.PropertyInspector(com.homestarrunner.stinkoman.editor.LevelEditor._mc.propertyInspector_mc);
com.homestarrunner.stinkoman.editor.LevelEditor.lData = new com.homestarrunner.stinkoman.struct.LevelData(p_mc, pGameStage_mc, true);
com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc = pGameStage_mc;
com.homestarrunner.stinkoman.editor.LevelEditor.gameStageStartingX = com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc._x;
com.homestarrunner.stinkoman.editor.LevelEditor.gameStageStartingY = com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc._y;
com.homestarrunner.stinkoman.editor.LevelEditor.viewProps = new Object();
com.homestarrunner.stinkoman.editor.LevelEditor.zoomScale = 1;
com.homestarrunner.stinkoman.editor.LevelEditor.stageVelX = 0;
com.homestarrunner.stinkoman.editor.LevelEditor.stageVelY = 0;
com.homestarrunner.stinkoman.editor.LevelEditor.gridSize = 8;
com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc.onEnterFrame = function () {
com.homestarrunner.stinkoman.editor.LevelEditor.updateGameStage();
};
com.homestarrunner.stinkoman.editor.LevelEditor.mainMenuBar = com.homestarrunner.stinkoman.editor.LevelEditor._mc.mainMenuBar;
com.homestarrunner.stinkoman.editor.LevelEditor.initMenus();
pGameStage_mc.onMouseDown = function () {
com.homestarrunner.stinkoman.editor.LevelEditor.stagePressed();
};
pGameStage_mc.onMouseUp = function () {
com.homestarrunner.stinkoman.editor.LevelEditor.stageReleased();
};
com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects = new Array();
com.homestarrunner.stinkoman.editor.LevelEditor.initStagePal();
com.homestarrunner.stinkoman.editor.LevelEditor.updateButtonEnabled();
com.homestarrunner.stinkoman.editor.LevelEditor._mc.levelXML_mc._visible = false;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.loadLevel_mc._visible = false;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.levelProperties_mc._visible = false;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.confirmBufferWrite_mc._visible = false;
com.homestarrunner.stinkoman.editor.LevelEditor.keyListener = new Object();
com.homestarrunner.stinkoman.editor.LevelEditor.keyListener.onKeyDown = function () {
com.homestarrunner.stinkoman.editor.LevelEditor.keyPressed();
};
Key.addListener(com.homestarrunner.stinkoman.editor.LevelEditor.keyListener);
com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc.playerloc_mc.onPress = function () {
this.startDrag(false);
};
com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc.playerloc_mc.onRelease = function () {
_root.stopDrag();
};
this.initStageResizing();
};
com.homestarrunner.stinkoman.editor.LevelEditor = v1;
var v2 = v1.prototype;
v2.initStageResizing = function () {
Stage.scaleMode = 'noScale';
Stage.align = 'TL';
var moveToRight = [com.homestarrunner.stinkoman.editor.LevelEditor._mc.objectPalChooser, com.homestarrunner.stinkoman.editor.LevelEditor._mc.stageObjPal_sp, com.homestarrunner.stinkoman.editor.LevelEditor._mc.scrollRight_btn, com.homestarrunner.stinkoman.editor.LevelEditor._mc.bringUp_btn, com.homestarrunner.stinkoman.editor.LevelEditor._mc.bringToTop_btn, com.homestarrunner.stinkoman.editor.LevelEditor._mc.bringDown_btn, com.homestarrunner.stinkoman.editor.LevelEditor._mc.bringToBottom_btn, com.homestarrunner.stinkoman.editor.LevelEditor._mc.trash_btn];
var growToRight = [com.homestarrunner.stinkoman.editor.LevelEditor._mc.mainMenuBar, com.homestarrunner.stinkoman.editor.LevelEditor._mc.viewMask_mc, com.homestarrunner.stinkoman.editor.LevelEditor._mc.mask_mc];
var moveToBottom = [com.homestarrunner.stinkoman.editor.LevelEditor._mc.scrollDown_btn, com.homestarrunner.stinkoman.editor.LevelEditor._mc.scrollLeft_btn, com.homestarrunner.stinkoman.editor.LevelEditor._mc.scrollRight_btn, com.homestarrunner.stinkoman.editor.LevelEditor._mc.origin_btn, com.homestarrunner.stinkoman.editor.LevelEditor._mc.endOrigin_btn, com.homestarrunner.stinkoman.editor.LevelEditor._mc.bringUp_btn, com.homestarrunner.stinkoman.editor.LevelEditor._mc.bringToTop_btn, com.homestarrunner.stinkoman.editor.LevelEditor._mc.bringDown_btn, com.homestarrunner.stinkoman.editor.LevelEditor._mc.bringToBottom_btn, com.homestarrunner.stinkoman.editor.LevelEditor._mc.trash_btn, com.homestarrunner.stinkoman.editor.LevelEditor._mc.propertyInspector_mc];
var growToBottom = [com.homestarrunner.stinkoman.editor.LevelEditor._mc.viewMask_mc, com.homestarrunner.stinkoman.editor.LevelEditor._mc.mask_mc];
var v4 = {};
var lastWidth = Stage.width;
var lastHeight = Stage.height;
v4.onResize = function () {
var v3 = Stage.width - lastWidth;
var v2 = Stage.height - lastHeight;
var v1;
for (v1 in moveToRight) {
moveToRight[v1]._x += v3;
}
for (v1 in growToRight) {
growToRight[v1]._width += v3;
}
for (v1 in moveToBottom) {
moveToBottom[v1]._y += v2;
}
for (v1 in growToBottom) {
growToBottom[v1]._height += v2;
}
com.homestarrunner.stinkoman.editor.LevelEditor._mc.stageObjPal_sp.setSize(130, Stage.height - 50.75);
com.homestarrunner.stinkoman.editor.LevelEditor.gameStageStartingY += v2;
lastWidth = Stage.width;
lastHeight = Stage.height;
};
Stage.addListener(v4);
};
v1.initMenus = function () {
var v2 = com.homestarrunner.stinkoman.editor.LevelEditor.mainMenuBar.addMenu('File');
v2.addMenuItem({'label': 'Load from XML', 'instanceName': 'openXML_menuItem', 'type': 'command'});
v2.addMenuItem({'label': 'Load from Buffer', 'instanceName': 'openBuffer_menuItem', 'type': 'command'});
v2.addMenuItem({'label': 'Save to Buffer', 'instanceName': 'saveBuffer_menuItem', 'type': 'command'});
v2.addMenuItem({'label': 'Show XML', 'instanceName': 'showXML_menuItem', 'type': 'command'});
var v4 = com.homestarrunner.stinkoman.editor.LevelEditor.mainMenuBar.addMenu('Edit');
v4.addMenuItem({'label': 'Clear all', 'instanceName': 'clear_menuItem', 'type': 'command'});
v4.addMenuItem({'label': 'Select all (A)', 'instanceName': 'selectAll_menuItem', 'type': 'command'});
v4.addMenuItem({'label': 'Level Properties', 'instanceName': 'prop_menuItem', 'type': 'command'});
var v6 = com.homestarrunner.stinkoman.editor.LevelEditor.mainMenuBar.addMenu('View');
v6.addMenuItem({'label': 'Zoom Out (Z)', 'instanceName': 'zoom_menuItem', 'type': 'command'});
v6.addMenuItem({'label': 'Unzoom (Z,U)', 'instanceName': 'unzoom_menuItem', 'type': 'command'});
var v5 = new Object();
v5.change = function (event) {
var v1 = event.menuItem;
for (var v2 in v1.attributes) {
}
switch (v1.attributes.instanceName) {
case 'openBuffer_menuItem':
trace('Open level from buffer');
com.homestarrunner.stinkoman.editor.LevelEditor.lData.setXML(com.homestarrunner.stinkoman.util.LocalData.load('stinkomanLevel', 'lDataXML', '/'));
com.homestarrunner.stinkoman.editor.LevelEditor.refreshBackground();
break;
case 'saveBuffer_menuItem':
trace('Save level to buffer');
com.homestarrunner.stinkoman.editor.LevelEditor.saveBufferChosen();
break;
case 'openXML_menuItem':
trace('Open existing level');
com.homestarrunner.stinkoman.editor.LevelEditor.createOpenWindow();
break;
case 'clear_menuItem':
trace('Clear all');
com.homestarrunner.stinkoman.editor.LevelEditor.clearAll();
break;
case 'prop_menuItem':
com.homestarrunner.stinkoman.editor.LevelEditor._mc.levelProperties_mc._visible = true;
break;
case 'showXML_menuItem':
trace('Show XML');
com.homestarrunner.stinkoman.editor.LevelEditor.openXMLwindow();
break;
case 'selectAll_menuItem':
trace('Select all');
com.homestarrunner.stinkoman.editor.LevelEditor.selectAll();
break;
case 'zoom_menuItem':
trace('Show all');
com.homestarrunner.stinkoman.editor.LevelEditor.showAll();
break;
case 'unzoom_menuItem':
trace('Unzoom');
com.homestarrunner.stinkoman.editor.LevelEditor.unzoom();
break;
default:
trace('Couldn\'t find a match');
}
com.homestarrunner.stinkoman.editor.LevelEditor._mc.bringUp_btn.setFocus();
};
v2.addEventListener('change', v5);
v4.addEventListener('change', v5);
v6.addEventListener('change', v5);
var v7 = new Object();
v7.change = function (eventObj) {
if (eventObj.target.value == 0) {
com.homestarrunner.stinkoman.editor.LevelEditor._mc.sky_mc._visible = false;
} else {
com.homestarrunner.stinkoman.editor.LevelEditor._mc.sky_mc._visible = true;
}
com.homestarrunner.stinkoman.editor.LevelEditor.refreshBackground();
};
com.homestarrunner.stinkoman.editor.LevelEditor._mc.levelProperties_mc.backgroundA.maximum = com.homestarrunner.stinkoman.editor.LevelEditor._mc.sky_mc._totalframes;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.levelProperties_mc.backgroundA.addEventListener('change', v7);
};
v1.centerGameStage = function () {
com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc._x = com.homestarrunner.stinkoman.editor.LevelEditor.gameStageStartingX;
com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc._y = com.homestarrunner.stinkoman.editor.LevelEditor.gameStageStartingY;
};
v1.moveGameStageToEndpoint = function () {
com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc._x = com.homestarrunner.stinkoman.editor.LevelEditor.gameStageStartingX - com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc._width + com.homestarrunner.stinkoman.editor.LevelEditor._mc.viewMask_mc._width;
};
v1.setSelected = function (obj) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects.length) {
com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[v1]._mc._alpha = 100;
++v1;
}
com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects = new Array();
if (obj != undefined) {
com.homestarrunner.stinkoman.editor.LevelEditor.addSelected(obj);
}
com.homestarrunner.stinkoman.editor.LevelEditor.updateButtonEnabled();
};
v1.addSelected = function (obj) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects.length) {
if (com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[v1] == obj) {
com.homestarrunner.stinkoman.editor.LevelEditor.lastSelectedObjIndex = v1;
return undefined;
}
++v1;
}
com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects.push(obj);
com.homestarrunner.stinkoman.editor.LevelEditor.lastSelectedObjIndex = com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects.length - 1;
obj._mc._alpha = 70;
com.homestarrunner.stinkoman.editor.LevelEditor.updateButtonEnabled();
};
v1.removeSelected = function (num) {
com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects.splice(num, 1);
com.homestarrunner.stinkoman.editor.LevelEditor.updateButtonEnabled();
};
v1.deleteSelected = function () {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects.length) {
com.homestarrunner.stinkoman.editor.LevelEditor.lData.removeObject(com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[v1]);
++v1;
}
com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects = new Array();
com.homestarrunner.stinkoman.editor.LevelEditor.updateButtonEnabled();
com.homestarrunner.stinkoman.editor.LevelEditor.lData.compressDepths();
};
v1.duplicateSelected = function () {
var v3 = new Array();
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects.length) {
var v1 = com.homestarrunner.stinkoman.editor.LevelEditor.addStageObject(com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[v2].classType, com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[v2].subType);
v1._mc._x = com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[v2]._mc._x + com.homestarrunner.stinkoman.editor.LevelEditor.gridSize;
v1._mc._y = com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[v2]._mc._y + com.homestarrunner.stinkoman.editor.LevelEditor.gridSize;
v3.push(v1);
++v2;
}
com.homestarrunner.stinkoman.editor.LevelEditor.setSelected(undefined);
v2 = 0;
while (v2 < v3.length) {
com.homestarrunner.stinkoman.editor.LevelEditor.addSelected(v3[v2]);
++v2;
}
};
v1.scrollOn = function (dir, alignment) {
if (alignment == 'v') {
com.homestarrunner.stinkoman.editor.LevelEditor.stageVelY = 10 * -dir;
} else {
com.homestarrunner.stinkoman.editor.LevelEditor.stageVelX = 10 * -dir;
}
};
v1.scrollOff = function () {
com.homestarrunner.stinkoman.editor.LevelEditor.stageVelX = 0;
com.homestarrunner.stinkoman.editor.LevelEditor.stageVelY = 0;
};
v1.updateGameStage = function () {
com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc._x += com.homestarrunner.stinkoman.editor.LevelEditor.stageVelX;
com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc._y -= com.homestarrunner.stinkoman.editor.LevelEditor.stageVelY;
if (com.homestarrunner.stinkoman.editor.LevelEditor.stageVelX > 0) {
com.homestarrunner.stinkoman.editor.LevelEditor.stageVelX += 0.2;
} else {
if (com.homestarrunner.stinkoman.editor.LevelEditor.stageVelX < 0) {
com.homestarrunner.stinkoman.editor.LevelEditor.stageVelX -= 0.2;
}
}
if (com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc._x > com.homestarrunner.stinkoman.editor.LevelEditor.gameStageStartingX) {
com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc._x = com.homestarrunner.stinkoman.editor.LevelEditor.gameStageStartingX;
com.homestarrunner.stinkoman.editor.LevelEditor.stageVelX = 0;
}
if (com.homestarrunner.stinkoman.editor.LevelEditor.stageVelY > 0) {
com.homestarrunner.stinkoman.editor.LevelEditor.stageVelY += 0.2;
} else {
if (com.homestarrunner.stinkoman.editor.LevelEditor.stageVelY < 0) {
com.homestarrunner.stinkoman.editor.LevelEditor.stageVelY -= 0.2;
}
}
if (com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc._y < com.homestarrunner.stinkoman.editor.LevelEditor.gameStageStartingY) {
com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc._y = com.homestarrunner.stinkoman.editor.LevelEditor.gameStageStartingY;
com.homestarrunner.stinkoman.editor.LevelEditor.stageVelY = 0;
}
};
v1.stagePressed = function () {
if (!com.homestarrunner.stinkoman.editor.LevelEditor._mc.mask_mc.hitTest(_root._xmouse, _root._ymouse, true)) {
return undefined;
}
var v6 = com.homestarrunner.stinkoman.editor.LevelEditor.lData.stageObjects.slice();
v6.sort(function (a, b) {
return b._mc.getDepth() - a._mc.getDepth();
});
var v5 = 0;
while (v5 < v6.length) {
var v3 = v6[v5];
if (v3._mc.hitTest(_root._xmouse, _root._ymouse, true)) {
com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc.createEmptyMovieClip('dragGuide', -1);
com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc.dragGuide._x = v3._mc._x;
com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc.dragGuide._y = v3._mc._y;
com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc.dragGuide.startDrag(false);
com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc.dragGuide.onEnterFrame = function () {
com.homestarrunner.stinkoman.editor.LevelEditor.followDragGuide();
};
var v4 = -1;
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects.length) {
if (com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[v2] == v3) {
v4 = v2;
break;
}
++v2;
}
if (v4 > -1) {
if (Key.isDown(17)) {
com.homestarrunner.stinkoman.editor.LevelEditor.removeSelected(v4);
com.homestarrunner.stinkoman.editor.LevelEditor.lastSelectedObjIndex = 0;
} else {
com.homestarrunner.stinkoman.editor.LevelEditor.lastSelectedObjIndex = v4;
}
return undefined;
}
if (Key.isDown(17)) {
com.homestarrunner.stinkoman.editor.LevelEditor.addSelected(v3);
} else {
com.homestarrunner.stinkoman.editor.LevelEditor.setSelected(v3);
}
return undefined;
}
++v5;
}
com.homestarrunner.stinkoman.editor.LevelEditor.setSelected(undefined);
};
v1.stageReleased = function () {
delete com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc.dragGuide.onEnterFrame;
_root.stopDrag();
com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc.dragGuide.removeMovieClip();
};
v1.followDragGuide = function () {
var v3 = Math.round(com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc.dragGuide._x / com.homestarrunner.stinkoman.editor.LevelEditor.gridSize) * com.homestarrunner.stinkoman.editor.LevelEditor.gridSize;
var v2 = Math.round(com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc.dragGuide._y / com.homestarrunner.stinkoman.editor.LevelEditor.gridSize) * com.homestarrunner.stinkoman.editor.LevelEditor.gridSize;
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects.length) {
if (com.homestarrunner.stinkoman.editor.LevelEditor.lastSelectedObjIndex != v1) {
com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[v1]._mc._x = v3 + (com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[v1]._mc._x - com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[com.homestarrunner.stinkoman.editor.LevelEditor.lastSelectedObjIndex]._mc._x);
com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[v1]._mc._y = v2 + (com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[v1]._mc._y - com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[com.homestarrunner.stinkoman.editor.LevelEditor.lastSelectedObjIndex]._mc._y);
}
++v1;
}
com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[com.homestarrunner.stinkoman.editor.LevelEditor.lastSelectedObjIndex]._mc._x = v3;
com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[com.homestarrunner.stinkoman.editor.LevelEditor.lastSelectedObjIndex]._mc._y = v2;
};
v1.changeStagePal = function (num) {
var v3 = 0;
while (v3 < com.homestarrunner.stinkoman.editor.LevelEditor.palDepthCount) {
com.homestarrunner.stinkoman.editor.LevelEditor._mc.stageObjPal_sp.content[v3.toString()].removeMovieClip();
++v3;
}
com.homestarrunner.stinkoman.editor.LevelEditor._mc.stageObjPal_sp.refreshPane();
com.homestarrunner.stinkoman.editor.LevelEditor.palDepthCount = 0;
com.homestarrunner.stinkoman.editor.LevelEditor.palHeightCount = 10;
var v5 = 0;
var v7 = 10;
if (com.homestarrunner.stinkoman.editor.LevelEditor.showExtraEnemies) {
v7 = 50;
}
v3 = 0;
while (v5 < v7) {
var v2 = com.homestarrunner.stinkoman.editor.LevelEditor._mc.stageObjPal_sp.content.attachMovie(com.homestarrunner.stinkoman.editor.LevelEditor.typeArray[num] + v3, v3, com.homestarrunner.stinkoman.editor.LevelEditor.palDepthCount++);
if (v2._name == undefined) {
++v5;
++v3;
continue;
} else {
v5 = 0;
}
if (v2._height > 60) {
v2._height = 60;
v2._xscale = v2._yscale;
}
var v4 = v2.getBounds(com.homestarrunner.stinkoman.editor.LevelEditor._mc.stageObjPal_sp.content);
v2.animator_mc.stop();
v2._y = com.homestarrunner.stinkoman.editor.LevelEditor.palHeightCount;
v2._x = 10;
v2.stop();
if ((v3 == 37 || v3 == 38) && com.homestarrunner.stinkoman.editor.LevelEditor.typeArray[num] == 'Enemy') {
v2.animator_mc.gotoAndStop(30);
if (v3 == 37) {
v2._y -= 30;
}
}
if (v4.yMin < 0) {
v2._y += -v4.yMin;
}
if (v4.xMin < 0) {
v2._x += -v4.xMin;
}
v2.mID = v3;
v2.mType = com.homestarrunner.stinkoman.editor.LevelEditor.typeArray[num];
com.homestarrunner.stinkoman.editor.LevelEditor.palHeightCount += v2._height + com.homestarrunner.stinkoman.editor.LevelEditor.palHeightSpacer;
v2.onRelease = function () {
com.homestarrunner.stinkoman.editor.LevelEditor.addStageObject(this.mType, this.mID);
};
++v3;
}
var v8 = com.homestarrunner.stinkoman.editor.LevelEditor._mc.stageObjPal_sp.content.attachMovie('spacer', 'spacer', com.homestarrunner.stinkoman.editor.LevelEditor.palDepthCount++);
v8._y = com.homestarrunner.stinkoman.editor.LevelEditor.palHeightCount;
com.homestarrunner.stinkoman.editor.LevelEditor.palHeightCount += v8._height;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.stageObjPal_sp.vPosition = 0;
};
v1.initStagePal = function () {
com.homestarrunner.stinkoman.editor.LevelEditor.palDepthCount = 0;
com.homestarrunner.stinkoman.editor.LevelEditor.palHeightCount = 10;
com.homestarrunner.stinkoman.editor.LevelEditor.palHeightSpacer = 4;
com.homestarrunner.stinkoman.editor.LevelEditor.typeArray = new Array('Platform', 'Ornament', 'Obstacle', 'XMovingPlatform', 'YMovingPlatform', 'Enemy', 'Ladder', 'Wall', 'Hazard', 'Trap', 'Powerup', 'Goal', 'Checkpoint', 'Switch', 'SwitchedWall', 'LavaFall', 'MoveablePlatform', 'WarpPad', 'ShooterSpeedTrigger', 'ShooterObstacle');
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.editor.LevelEditor.typeArray.length) {
com.homestarrunner.stinkoman.editor.LevelEditor._mc.objectPalChooser.addItem(com.homestarrunner.stinkoman.editor.LevelEditor.typeArray[v1], v1);
++v1;
}
com.homestarrunner.stinkoman.editor.LevelEditor.palChangeListener = new Object();
com.homestarrunner.stinkoman.editor.LevelEditor.palChangeListener.change = function (eventObj) {
com.homestarrunner.stinkoman.editor.LevelEditor.changeStagePal(com.homestarrunner.stinkoman.editor.LevelEditor._mc.objectPalChooser.selectedIndex);
};
com.homestarrunner.stinkoman.editor.LevelEditor._mc.objectPalChooser.addEventListener('change', com.homestarrunner.stinkoman.editor.LevelEditor.palChangeListener);
com.homestarrunner.stinkoman.editor.LevelEditor.changeStagePal(0);
};
v1.addStageObject = function (type, id) {
var v2 = (-com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc._x + com.homestarrunner.stinkoman.editor.LevelEditor._mc.mask_mc._width / 2) / com.homestarrunner.stinkoman.editor.LevelEditor.zoomScale;
var v1 = (-com.homestarrunner.stinkoman.editor.LevelEditor.gameStage_mc._y + com.homestarrunner.stinkoman.editor.LevelEditor._mc.mask_mc._height / 2) / com.homestarrunner.stinkoman.editor.LevelEditor.zoomScale;
v2 = Math.floor(v2 / com.homestarrunner.stinkoman.editor.LevelEditor.gridSize) * com.homestarrunner.stinkoman.editor.LevelEditor.gridSize;
v1 = Math.floor(v1 / com.homestarrunner.stinkoman.editor.LevelEditor.gridSize) * com.homestarrunner.stinkoman.editor.LevelEditor.gridSize;
var v3 = com.homestarrunner.stinkoman.editor.LevelEditor.lData.addStageObject(type, id, v2, v1);
return v3;
};
v1.clearAll = function () {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.editor.LevelEditor.lData.stageObjects.length) {
com.homestarrunner.stinkoman.editor.LevelEditor.lData.stageObjects[v1].kill();
++v1;
}
com.homestarrunner.stinkoman.editor.LevelEditor.lData.stageObjects = new Array();
};
v1.shiftDepth = function (dir, allTheWay) {
var v1 = com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[com.homestarrunner.stinkoman.editor.LevelEditor.lastSelectedObjIndex];
if (v1 == null || v1 == undefined) {
return undefined;
}
if (v1._mc.getDepth() == 0 && dir < 0) {
return undefined;
}
if (v1._mc.getDepth() >= com.homestarrunner.stinkoman.editor.LevelEditor.lData.stageObjects.length - 1 && dir > 0) {
return undefined;
}
if (allTheWay) {
if (dir < 0) {
var v2 = v1._mc.getDepth();
while (v2 > 0) {
v1._mc.swapDepths(v1._mc.getDepth() - 1);
--v2;
}
} else {
var v2 = v1._mc.getDepth();
while (v2 <= com.homestarrunner.stinkoman.editor.LevelEditor.lData.stageObjects.length) {
v1._mc.swapDepths(v1._mc.getDepth() + 1);
++v2;
}
}
} else {
v1._mc.swapDepths(v1._mc.getDepth() + dir);
}
};
v1.shiftGroupDepthOneNotch = function (dir) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects.length) {
com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[v1]._mc.swapDepths(com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[v1]._mc.getDepth() + dir);
++v1;
}
};
v1.updateButtonEnabled = function () {
com.homestarrunner.stinkoman.editor.LevelEditor._mc.bringUp_btn.enabled = com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects.length == 1;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.bringToTop_btn.enabled = com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects.length == 1;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.bringToBottom_btn.enabled = com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects.length == 1;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.bringDown_btn.enabled = com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects.length == 1;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.trash_btn.enabled = com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects.length > 0;
if (com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects.length == 1) {
com.homestarrunner.stinkoman.editor.PropertyInspector.activate(com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[0]);
} else {
com.homestarrunner.stinkoman.editor.PropertyInspector.disable();
}
};
v1.openXMLwindow = function () {
com.homestarrunner.stinkoman.editor.LevelEditor._mc.levelXML_mc._visible = true;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.levelXML_mc._txt.text = com.homestarrunner.stinkoman.editor.LevelEditor.lData.getXML();
};
v1.closeXMLwindow = function () {
com.homestarrunner.stinkoman.editor.LevelEditor._mc.levelXML_mc._visible = false;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.levelXML_mc._txt.text = '';
};
v1.createOpenWindow = function () {
com.homestarrunner.stinkoman.editor.LevelEditor._mc.loadLevel_mc._visible = true;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.loadLevel_mc.fileName.text = com.homestarrunner.stinkoman.util.LocalData.load('stinkomanLevel', 'filename');
};
v1.loadLevel = function () {
com.homestarrunner.stinkoman.util.LocalData.save('stinkomanLevel', 'filename', com.homestarrunner.stinkoman.editor.LevelEditor._mc.loadLevel_mc.fileName.text);
com.homestarrunner.stinkoman.editor.LevelEditor.lData.loadFromFile(com.homestarrunner.stinkoman.editor.LevelEditor._mc.loadLevel_mc.fileName.text, com.homestarrunner.stinkoman.editor.LevelEditor.refreshBackground);
com.homestarrunner.stinkoman.editor.LevelEditor.closeLoadLevelWindow();
};
v1.refreshBackground = function () {
trace('Set sky to ' + com.homestarrunner.stinkoman.editor.LevelEditor.lData.levelProperties.bkgrdA);
com.homestarrunner.stinkoman.editor.LevelEditor._mc.sky_mc.gotoAndStop(com.homestarrunner.stinkoman.editor.LevelEditor.lData.levelProperties.bkgrdA);
};
v1.closeLoadLevelWindow = function () {
com.homestarrunner.stinkoman.editor.LevelEditor._mc.loadLevel_mc._visible = false;
};
v1.isActive = function () {
if (com.homestarrunner.stinkoman.editor.LevelEditor.editorActive == false || com.homestarrunner.stinkoman.editor.LevelEditor.editorActive == undefined) {
return false;
}
return true;
};
v1.keyPressed = function () {
var v1 = Key.getCode();
if (com.homestarrunner.stinkoman.editor.LevelEditor._mc.levelXML_mc._visible || com.homestarrunner.stinkoman.editor.LevelEditor._mc.loadLevel_mc._visible || com.homestarrunner.stinkoman.editor.LevelEditor._mc.levelProperties_mc._visible || com.homestarrunner.stinkoman.editor.LevelEditor._mc.confirmBufferWrite_mc._visible) {
return undefined;
}
switch (v1) {
case 37:
com.homestarrunner.stinkoman.editor.LevelEditor.nudge(-1, 0);
break;
case 39:
com.homestarrunner.stinkoman.editor.LevelEditor.nudge(1, 0);
break;
case 38:
com.homestarrunner.stinkoman.editor.LevelEditor.nudge(0, -1);
break;
case 40:
com.homestarrunner.stinkoman.editor.LevelEditor.nudge(0, 1);
break;
case 27:
com.homestarrunner.stinkoman.editor.LevelEditor.setSelected(undefined);
break;
case 8:
com.homestarrunner.stinkoman.editor.LevelEditor.deleteSelected();
break;
case 46:
com.homestarrunner.stinkoman.editor.LevelEditor.deleteSelected();
break;
case 65:
com.homestarrunner.stinkoman.editor.LevelEditor.selectAll();
break;
case 68:
com.homestarrunner.stinkoman.editor.LevelEditor.duplicateSelected();
break;
case 90:
if (!Key.isDown(17)) {
if (com.homestarrunner.stinkoman.editor.LevelEditor.zoomScale != 1) {
com.homestarrunner.stinkoman.editor.LevelEditor.unzoom();
} else {
com.homestarrunner.stinkoman.editor.LevelEditor.showAll();
}
}
break;
case 85:
com.homestarrunner.stinkoman.editor.LevelEditor.unzoom();
break;
case 189:
com.homestarrunner.stinkoman.editor.LevelEditor.zoomOut();
break;
case 187:
com.homestarrunner.stinkoman.editor.LevelEditor.zoomIn();
break;
default:
}
};
v1.selectAll = function () {
com.homestarrunner.stinkoman.editor.LevelEditor.setSelected(undefined);
for (var v1 in com.homestarrunner.stinkoman.editor.LevelEditor.lData.stageObjects) {
com.homestarrunner.stinkoman.editor.LevelEditor.addSelected(com.homestarrunner.stinkoman.editor.LevelEditor.lData.stageObjects[v1]);
}
};
v1.nudge = function (x, y) {
var v5 = Key.isDown(16);
var v2 = 1;
if (v5) {
v2 = 5;
}
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects.length) {
com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[v1]._mc._x += x * com.homestarrunner.stinkoman.editor.LevelEditor.gridSize * v2;
com.homestarrunner.stinkoman.editor.LevelEditor.selectedObjects[v1]._mc._y += y * com.homestarrunner.stinkoman.editor.LevelEditor.gridSize * v2;
++v1;
}
};
v1.applyProperties = function () {
com.homestarrunner.stinkoman.editor.LevelEditor._mc.levelProperties_mc.scrollX.selected = com.homestarrunner.stinkoman.editor.LevelEditor.lData.levelProperties.ScrollLockX == 'true';
com.homestarrunner.stinkoman.editor.LevelEditor._mc.levelProperties_mc.scrollY.selected = com.homestarrunner.stinkoman.editor.LevelEditor.lData.levelProperties.ScrollLockY == 'true';
com.homestarrunner.stinkoman.editor.LevelEditor._mc.levelProperties_mc.backgroundA.value = com.homestarrunner.stinkoman.editor.LevelEditor.lData.levelProperties.bkgrdA;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc.playerloc_mc._x = com.homestarrunner.stinkoman.editor.LevelEditor.lData.levelProperties.playerStartX;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc.playerloc_mc._y = com.homestarrunner.stinkoman.editor.LevelEditor.lData.levelProperties.playerStartY;
};
v1.showAll = function () {
com.homestarrunner.stinkoman.editor.LevelEditor.savePosition();
var v1 = 0;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc._width = com.homestarrunner.stinkoman.editor.LevelEditor._mc.mask_mc._width;
v1 = com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc._xscale;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc._xscale = 100;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc._yscale = 100;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc._height = com.homestarrunner.stinkoman.editor.LevelEditor._mc.mask_mc._height;
if (com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc._xscale < v1) {
v1 = com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc._xscale;
}
com.homestarrunner.stinkoman.editor.LevelEditor.zoomScale = v1 / 100;
com.homestarrunner.stinkoman.editor.LevelEditor.updateZoom();
com.homestarrunner.stinkoman.editor.LevelEditor.centerGameStage();
};
v1.unzoom = function () {
com.homestarrunner.stinkoman.editor.LevelEditor.zoomScale = 1;
com.homestarrunner.stinkoman.editor.LevelEditor.updateZoom();
com.homestarrunner.stinkoman.editor.LevelEditor.loadPosition();
};
v1.zoomOut = function () {
com.homestarrunner.stinkoman.editor.LevelEditor.savePosition();
com.homestarrunner.stinkoman.editor.LevelEditor.zoomScale -= 0.1;
com.homestarrunner.stinkoman.editor.LevelEditor.updateZoom();
com.homestarrunner.stinkoman.editor.LevelEditor.loadPosition();
};
v1.zoomIn = function () {
com.homestarrunner.stinkoman.editor.LevelEditor.savePosition();
com.homestarrunner.stinkoman.editor.LevelEditor.zoomScale += 0.1;
com.homestarrunner.stinkoman.editor.LevelEditor.updateZoom();
com.homestarrunner.stinkoman.editor.LevelEditor.loadPosition();
};
v1.savePosition = function () {
com.homestarrunner.stinkoman.editor.LevelEditor.viewProps.x = (-com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc._x + com.homestarrunner.stinkoman.editor.LevelEditor._mc.mask_mc._width / 2) / com.homestarrunner.stinkoman.editor.LevelEditor.zoomScale;
com.homestarrunner.stinkoman.editor.LevelEditor.viewProps.y = (-com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc._y + com.homestarrunner.stinkoman.editor.LevelEditor._mc.mask_mc._height / 2) / com.homestarrunner.stinkoman.editor.LevelEditor.zoomScale;
};
v1.loadPosition = function () {
com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc._x = -com.homestarrunner.stinkoman.editor.LevelEditor.zoomScale * com.homestarrunner.stinkoman.editor.LevelEditor.viewProps.x + com.homestarrunner.stinkoman.editor.LevelEditor._mc.mask_mc._width / 2;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc._y = -com.homestarrunner.stinkoman.editor.LevelEditor.zoomScale * com.homestarrunner.stinkoman.editor.LevelEditor.viewProps.y + com.homestarrunner.stinkoman.editor.LevelEditor._mc.mask_mc._height / 2;
};
v1.updateZoom = function () {
com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc._xscale = 100 * com.homestarrunner.stinkoman.editor.LevelEditor.zoomScale;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc._yscale = com.homestarrunner.stinkoman.editor.LevelEditor._mc.gameStage_mc._xscale;
};
v1.saveBufferChosen = function () {
com.homestarrunner.stinkoman.editor.LevelEditor._mc.confirmBufferWrite_mc._visible = true;
com.homestarrunner.stinkoman.editor.LevelEditor._mc.confirmBufferWrite_mc.num_txt.text = com.homestarrunner.stinkoman.editor.LevelEditor.lData.stageObjects.length;
if (com.homestarrunner.stinkoman.editor.LevelEditor.lData.stageObjects.length < 10) {
com.homestarrunner.stinkoman.editor.LevelEditor._mc.confirmBufferWrite_mc.num_txt.text += '!!!!';
com.homestarrunner.stinkoman.editor.LevelEditor._mc.confirmBufferWrite_mc.num_txt.textColor = 16711680;
} else {
com.homestarrunner.stinkoman.editor.LevelEditor._mc.confirmBufferWrite_mc.num_txt.textColor = 6710886;
}
};
v1.saveBufferConfirmed = function () {
com.homestarrunner.stinkoman.util.LocalData.save('stinkomanLevel', 'lDataXML', com.homestarrunner.stinkoman.editor.LevelEditor.lData.getXML(), '/');
com.homestarrunner.stinkoman.editor.LevelEditor._mc.confirmBufferWrite_mc._visible = false;
};
v1.saveBufferCancelled = function () {
com.homestarrunner.stinkoman.editor.LevelEditor._mc.confirmBufferWrite_mc._visible = false;
};
v1.showExtraEnemies = false;
v1.editorActive = false;
ASSetPropFlags(com.homestarrunner.stinkoman.editor.LevelEditor.prototype, null, 1);
}
#endinitclip
}
movieClip 2741 __Packages.com.homestarrunner.stinkoman.struct.LevelData {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.struct) {
_global.com.homestarrunner.stinkoman.struct = new Object();
}
if (!_global.com.homestarrunner.stinkoman.struct.LevelData) {
var v1 = function (p_mc, pgameStage_mc, pEditorMode) {
var v2 = this;
this.stageObjects = new Array();
this.stageObjSource = new Array();
this.editorMode = pEditorMode;
this._mc = p_mc;
this.gameStage_mc = pgameStage_mc;
this.gameStage_mc = this._mc.gameStage_mc;
};
com.homestarrunner.stinkoman.struct.LevelData = v1;
var v2 = v1.prototype;
v2.reset = function () {
var v2 = 0;
while (v2 < this.stageObjSource.length) {
delete this.stageObjSource[v2];
++v2;
}
this.stageObjSource = new Array();
v2 = 0;
while (v2 < this.stageObjects.length) {
delete this.stageObjects[v2];
++v2;
}
this.stageObjects = new Array();
this.setXML(this.levelXML);
};
v2.addObject = function (newObject) {
this.stageObjects.push(newObject);
};
v2.removeObject = function (deadObject) {
var v2 = 0;
while (v2 < this.stageObjects.length) {
if (this.stageObjects[v2]._mc.getDepth() == deadObject._mc.getDepth()) {
this.stageObjects[v2].kill();
this.stageObjects.splice(v2, 1);
return undefined;
}
++v2;
}
};
v2.getXML = function () {
this.levelXML = new XML();
this.compressDepths();
var v2 = 0;
while (v2 < this.stageObjects.length) {
var v3 = new Object();
v3.sT = this.stageObjects[v2].subType;
v3.cT = this.stageObjects[v2].classType;
v3.d = this.stageObjects[v2]._mc.getDepth();
v3.x = this.stageObjects[v2]._mc._x;
v3.y = this.stageObjects[v2]._mc._y;
if (this.stageObjects[v2].getAdditonalAttributes() != null) {
v3.addProps = this.stageObjects[v2].getAdditonalAttributes();
}
this.levelXML.appendChild(com.homestarrunner.stinkoman.util.XMLUtil.createNodeFromObjects(this.levelXML, 'SO', v3));
this.levelXML.appendChild(this.levelXML.createTextNode('\n'));
++v2;
}
this.levelProperties = new Object();
this.levelProperties.ScrollLockX = this._mc.levelProperties_mc.scrollX.selected;
this.levelProperties.ScrollLockY = this._mc.levelProperties_mc.scrollY.selected;
this.levelProperties.playerStartX = this._mc.gameStage_mc.playerloc_mc._x;
this.levelProperties.playerStartY = this._mc.gameStage_mc.playerloc_mc._y;
this.levelProperties.bkgrdA = this._mc.levelProperties_mc.backgroundA.value;
this.levelXML.appendChild(com.homestarrunner.stinkoman.util.XMLUtil.createNodeFromObjects(this.levelXML, 'levelProperties', this.levelProperties));
this.levelXML.ignoreWhite = true;
return this.levelXML;
};
v2.clearStageObjects = function () {
var v2 = 0;
while (v2 < this.stageObjects.length) {
this.stageObjects[v2].kill();
++v2;
}
this.stageObjects = new Array();
};
v2.compressDepths = function () {
var v2 = 0;
while (v2 < this.stageObjects.length) {
this.stageObjects[v2].updateDepthParam();
++v2;
}
this.stageObjects.sortOn('depth', Array.NUMERIC);
v2 = 0;
while (v2 < this.stageObjects.length) {
++v2;
}
v2 = 0;
while (v2 < this.stageObjects.length) {
if (this.stageObjects[v2]._mc.getDepth() > v2) {
this.stageObjects[v2]._mc.swapDepths(v2);
}
++v2;
}
v2 = 0;
while (v2 < this.stageObjects.length) {
if (this.stageObjects[v2]._mc.getDepth() == undefined) {
this.stageObjects[v2].kill();
this.stageObjects.splice(v2, 1);
--v2;
}
++v2;
}
return this.stageObjects.length;
};
v2.setXML = function (newData) {
this.levelXML = new XML(newData.toString());
this.levelXML.ignoreWhite = true;
if (this.editorMode) {
this.redrawStageFromXML();
}
};
v2.redrawStageFromXML = function () {
this.clearStageObjects();
var v3 = 0;
while (v3 < this.levelXML.childNodes.length) {
trace('redrawStageFromXML: i = ' + v3);
var v5 = new Object();
var v6 = new Object();
if (this.levelXML.childNodes[v3].nodeName != 'SO') {
} else {
var v2 = 0;
while (v2 < this.levelXML.childNodes[v3].childNodes.length) {
if (this.levelXML.childNodes[v3].childNodes[v2].nodeName == 'addProps') {
var v4 = 0;
while (v4 < this.levelXML.childNodes[v3].childNodes[v2].childNodes.length) {
v6[this.levelXML.childNodes[v3].childNodes[v2].childNodes[v4].nodeName] = this.levelXML.childNodes[v3].childNodes[v2].childNodes[v4].firstChild.nodeValue;
++v4;
}
} else {
v5[this.levelXML.childNodes[v3].childNodes[v2].nodeName] = this.levelXML.childNodes[v3].childNodes[v2].firstChild.nodeValue;
}
++v2;
}
this.stageObjSource.push(new com.homestarrunner.stinkoman.stageobject.StageObjectData(v5.cT, Number(v5.sT), Number(v5.x), Number(v5.y), v5.d, v6));
if (this.editorMode) {
this.addStageObject(v5.cT, Number(v5.sT), Number(v5.x), Number(v5.y), Number(v5.d), v6);
}
}
++v3;
}
this.levelProperties = com.homestarrunner.stinkoman.util.XMLUtil.createObjectFromNode(com.homestarrunner.stinkoman.util.XMLUtil.getNamedNode(this.levelXML, 'levelProperties', 0));
if (this.editorMode) {
com.homestarrunner.stinkoman.editor.LevelEditor.applyProperties();
}
};
v2.addStageObject = function (type, subtype, x, y, depth, initObj) {
if (x == undefined || y == undefined) {
trace('LevelData::addStageObject: x or maybe y is undefined. Not good.');
}
var v3;
if (depth == undefined) {
depth = this.stageObjects.length;
}
switch (type) {
case 'Platform':
v3 = new com.homestarrunner.stinkoman.stageobject.Platform(this.gameStage_mc, x, y, subtype, depth);
this.addObject(v3);
return v3;
case 'Ornament':
v3 = new com.homestarrunner.stinkoman.stageobject.Ornament(this.gameStage_mc, x, y, subtype, depth);
this.addObject(v3);
return v3;
case 'XMovingPlatform':
v3 = new com.homestarrunner.stinkoman.stageobject.XMovingPlatform(this.gameStage_mc, x, y, subtype, depth, initObj);
this.addObject(v3);
return v3;
case 'YMovingPlatform':
v3 = new com.homestarrunner.stinkoman.stageobject.YMovingPlatform(this.gameStage_mc, x, y, subtype, depth, initObj);
this.addObject(v3);
return v3;
case 'Enemy':
if (subtype == 0) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyMiniToothbot(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 1) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyToothbot(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 2) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyChick(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 3) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyBouncebot(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 4) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyCabbage(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 5) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyBouncechick(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 6) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyChickJogger(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 7 || subtype == 22) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyFlyingToothbot(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 8 || subtype == 16) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyVacgun(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 9 || subtype == 19 || subtype == 20 || subtype == 27) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyTriggerable(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 10) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyGokul(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 11) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyFlyingToothbot(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 12) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyPoorbt(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 13) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyGaspeau(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 14) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyChamCham(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 15) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyAstromund(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 17 || subtype == 18 || subtype == 40 || subtype == 41) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyDometant(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 21) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyPlugman(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 23 || subtype == 28) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyStothos(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 24) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyFullbide(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 25) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyMybenj(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 26) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 29 || subtype == 31 || subtype == 32) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyShooter(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 30) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyShark(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 33) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyJellyfish(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 34) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyClam(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 35) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyManta(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 36) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyVolcano(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 37 || subtype == 38) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyThorn(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 39) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyCoral(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 42) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbot(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 43) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotGunFace(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 44) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotGunFloat(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 45) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotHeadTrap(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 46) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullStack(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 47) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemySkull(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 48) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyFatSkullbot(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 49) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyPrancer(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 50) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyPodSpawn(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 51) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyPod(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 52) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyZSabreSilhouette(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 53) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.Enemy(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 54) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemySticklyMan(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 99) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyBB(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 100) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyChickJoggerShades(this.gameStage_mc, x, y, subtype, depth, initObj);
} else {
if (subtype == 101) {
v3 = new com.homestarrunner.stinkoman.stageobject.enemy.EnemyLavaHider(this.gameStage_mc, x, y, subtype, depth, initObj);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
this.addObject(v3);
return v3;
case 'Ladder':
v3 = new com.homestarrunner.stinkoman.stageobject.Ladder(this.gameStage_mc, x, y, subtype, depth, initObj);
this.addObject(v3);
return v3;
case 'Obstacle':
v3 = new com.homestarrunner.stinkoman.stageobject.Obstacle(this.gameStage_mc, x, y, subtype, depth, initObj);
this.addObject(v3);
return v3;
case 'Wall':
v3 = new com.homestarrunner.stinkoman.stageobject.Wall(this.gameStage_mc, x, y, subtype, depth, initObj);
this.addObject(v3);
return v3;
case 'Hazard':
v3 = new com.homestarrunner.stinkoman.stageobject.Hazard(this.gameStage_mc, x, y, subtype, depth, initObj);
this.addObject(v3);
return v3;
case 'Trap':
v3 = new com.homestarrunner.stinkoman.stageobject.Trap(this.gameStage_mc, x, y, subtype, depth, initObj);
this.addObject(v3);
return v3;
case 'Goal':
v3 = new com.homestarrunner.stinkoman.stageobject.Goal(this.gameStage_mc, x, y, subtype, depth, initObj);
this.addObject(v3);
return v3;
case 'Checkpoint':
v3 = new com.homestarrunner.stinkoman.stageobject.Checkpoint(this.gameStage_mc, x, y, subtype, depth, initObj);
this.addObject(v3);
return v3;
case 'Powerup':
v3 = new com.homestarrunner.stinkoman.stageobject.Powerup(this.gameStage_mc, x, y, subtype, depth, initObj);
this.addObject(v3);
return v3;
case 'SwitchedWall':
v3 = new com.homestarrunner.stinkoman.stageobject.SwitchedWall(this.gameStage_mc, x, y, subtype, depth, initObj);
this.addObject(v3);
return v3;
case 'Switch':
v3 = new com.homestarrunner.stinkoman.stageobject.Switch(this.gameStage_mc, x, y, subtype, depth, initObj);
this.addObject(v3);
return v3;
case 'LavaFall':
v3 = new com.homestarrunner.stinkoman.stageobject.LavaFall(this.gameStage_mc, x, y, subtype, depth, initObj);
this.addObject(v3);
return v3;
case 'MoveablePlatform':
v3 = new com.homestarrunner.stinkoman.stageobject.MoveablePlatform(this.gameStage_mc, x, y, subtype, depth, initObj);
this.addObject(v3);
return v3;
case 'WarpPad':
v3 = new com.homestarrunner.stinkoman.stageobject.WarpPad(this.gameStage_mc, x, y, subtype, depth, initObj);
this.addObject(v3);
return v3;
case 'ShooterSpeedTrigger':
v3 = new com.homestarrunner.stinkoman.stageobject.ShooterSpeedTrigger(this.gameStage_mc, x, y, subtype, depth, initObj);
this.addObject(v3);
return v3;
case 'ShooterObstacle':
v3 = new com.homestarrunner.stinkoman.stageobject.ShooterObstacle(this.gameStage_mc, x, y, subtype, depth, initObj);
this.addObject(v3);
return v3;
}
this.addObject(v3);
return v3;
};
v2.loadFromFile = function (XMLfilename, onComplete) {
trace('LevelData::loadFromFile()' + XMLfilename);
var thisLD = this;
this.levelXML = new XML();
this.levelXML.ignoreWhite = true;
this.levelXML.load(XMLfilename);
this.levelXML.onLoad = function () {
if (thisLD.editorMode) {
thisLD.redrawStageFromXML();
} else {
thisLD._mc.levelStart_mc.gotoAndPlay('levelLoaded');
}
if (onComplete) {
onComplete();
}
};
};
ASSetPropFlags(com.homestarrunner.stinkoman.struct.LevelData.prototype, null, 1);
}
#endinitclip
}
movieClip 2742 __Packages.com.homestarrunner.stinkoman.util.XMLUtil {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.util) {
_global.com.homestarrunner.stinkoman.util = new Object();
}
if (!_global.com.homestarrunner.stinkoman.util.XMLUtil) {
var v1 = function () {};
com.homestarrunner.stinkoman.util.XMLUtil = v1;
var v2 = v1.prototype;
v1.getNamedNode = function (parentNode, desiredName, desiredNum) {
var v3 = 0;
if (desiredNum == undefined) {
desiredNum = 1;
}
var v1 = 0;
while (v1 < parentNode.childNodes.length) {
if (parentNode.childNodes[v1].nodeName == desiredName) {
if (v3 < desiredNum - 1) {
++v3;
} else {
return parentNode.childNodes[v1];
}
}
++v1;
}
return new XMLNode();
};
v1.createNodeFromObjects = function (parentXML, nodeName, objToCopy) {
var v4 = parentXML.createElement(nodeName);
for (var v5 in objToCopy) {
var v1 = parentXML.createElement(v5);
if (typeof objToCopy[v5] == 'object') {
v1 = com.homestarrunner.stinkoman.util.XMLUtil.createNodeFromObjects(parentXML, v5, objToCopy[v5]);
} else {
v1.appendChild(parentXML.createTextNode(objToCopy[v5]));
}
v4.appendChild(v1);
}
return v4;
};
v1.createObjectFromNode = function (node) {
var v3 = new Object();
var v1 = 0;
while (v1 < node.childNodes.length) {
v3[node.childNodes[v1].nodeName] = node.childNodes[v1].firstChild.nodeValue;
++v1;
}
return v3;
};
ASSetPropFlags(com.homestarrunner.stinkoman.util.XMLUtil.prototype, null, 1);
}
#endinitclip
}
movieClip 2743 __Packages.com.homestarrunner.stinkoman.stageobject.StageObjectData {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.StageObjectData) {
var v1 = function (pclassType, psubType, px, py, pdepth, ppropObj) {
this.classType = pclassType;
this.subType = psubType;
this.x = px;
this.y = py;
this.depth = pdepth;
this.propObj = new Object();
for (var v3 in ppropObj) {
this.propObj[v3] = ppropObj[v3];
}
this._active = false;
this.assignedObject = undefined;
this.canSpawn = true;
};
com.homestarrunner.stinkoman.stageobject.StageObjectData = v1;
var v2 = v1.prototype;
v2.__get__active = function () {
return this._active;
};
v2.__set__active = function (val) {
this._active = val;
this.canSpawn = false;
return this.__get__active();
};
v2.addProperty('active', v2.__get__active, v2.__set__active);
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.StageObjectData.prototype, null, 1);
}
#endinitclip
}
movieClip 2744 __Packages.com.homestarrunner.stinkoman.stageobject.Platform {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.Platform) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'Platform' + typeNum, depth);
if (com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray == undefined) {
com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray = new Array();
}
this.classType = 'Platform';
this.standable = true;
this.disappearing = false;
this.damage = 0;
var v4 = this;
com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray.push(this);
this._mc.animator_mc.stop();
this._mc.mType = 'vert';
this._mc.subtype = this.subType;
this._mc.mPlatform = this;
if (!com.homestarrunner.stinkoman.editor.LevelEditor.isActive()) {
this._mc.editorGuide_mc._visible = false;
}
};
com.homestarrunner.stinkoman.stageobject.Platform = v1;
com.homestarrunner.stinkoman.stageobject.Platform extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray.length) {
if (this == com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray[v2]) {
com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray.splice(v2, 1);
break;
}
++v2;
}
};
v1.hit = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray.length) {
if (!com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray[v1].standable) {
} else {
if (com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray[v1].subType == 41) {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray[v1]._mc.hitTest_mc)) {
if (!com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray[v1].disappearing) {
com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray[v1].disappearing = true;
com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray[v1]._mc.gotoAndPlay('disappear');
}
return com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray[v1]._mc;
}
}
if (com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray[v1]._mc.hitTest_mc._name != undefined) {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray[v1]._mc.hitTest_mc)) {
return com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray[v1]._mc;
}
} else {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray[v1]._mc)) {
return com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray[v1]._mc;
}
}
}
++v1;
}
v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.Obstacle.ObstacleArray.length) {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.Obstacle.ObstacleArray[v1]._mc.hitTest_mc)) {
return com.homestarrunner.stinkoman.stageobject.Obstacle.ObstacleArray[v1]._mc;
}
++v1;
}
v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar.biztarArray.length) {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar.biztarArray[v1]._mc.hitTest_mc)) {
return com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar.biztarArray[v1]._mc.hitTest_mc;
}
++v1;
}
return undefined;
};
v2.handlePlayerLanding = function () {
if (this.subType == 59) {
if (this.damage == 0) {
this._mc.gotoAndPlay('damage1');
} else {
if (this.damage == 1) {
this._mc.gotoAndPlay('damage2');
} else {
if (this.damage == 2) {
this._mc.gotoAndPlay('break');
}
}
}
}
};
v2.doneDisappearing = function () {
this.disappearing = false;
};
v1.unpause = function () {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray.length) {
com.homestarrunner.stinkoman.stageobject.Platform.PlatformArray[v1]._mc.animator_mc.play();
++v1;
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.Platform.prototype, null, 1);
}
#endinitclip
}
movieClip 2745 __Packages.com.homestarrunner.stinkoman.stageobject.Obstacle {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.Obstacle) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'Obstacle' + typeNum, depth);
if (com.homestarrunner.stinkoman.stageobject.Obstacle.ObstacleArray == undefined) {
com.homestarrunner.stinkoman.stageobject.Obstacle.ObstacleArray = new Array();
}
this.classType = 'Obstacle';
var v4 = this;
com.homestarrunner.stinkoman.stageobject.Obstacle.ObstacleArray.push(this);
this._mc.animator_mc.stop();
this._mc.mType = 'vert';
};
com.homestarrunner.stinkoman.stageobject.Obstacle = v1;
com.homestarrunner.stinkoman.stageobject.Obstacle extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.Obstacle.ObstacleArray.length) {
if (this == com.homestarrunner.stinkoman.stageobject.Obstacle.ObstacleArray[v2]) {
com.homestarrunner.stinkoman.stageobject.Obstacle.ObstacleArray.splice(v2, 1);
break;
}
++v2;
}
};
v1.hit = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.Obstacle.ObstacleArray.length) {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.Obstacle.ObstacleArray[v1]._mc)) {
return com.homestarrunner.stinkoman.stageobject.Obstacle.ObstacleArray[v1]._mc;
}
++v1;
}
return undefined;
};
v1.unpause = function () {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.Obstacle.ObstacleArray.length) {
com.homestarrunner.stinkoman.stageobject.Obstacle.ObstacleArray[v1]._mc.animator_mc.play();
++v1;
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.Obstacle.prototype, null, 1);
}
#endinitclip
}
movieClip 2746 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.Enemy {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.Enemy) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'Enemy' + typeNum, depth);
if (com.homestarrunner.stinkoman.stageobject.enemy.Enemy.EnemyArray == undefined) {
com.homestarrunner.stinkoman.stageobject.enemy.Enemy.EnemyArray = new Array();
}
this.dead = false;
this.classType = 'Enemy';
var thisEnemy = this;
com.homestarrunner.stinkoman.stageobject.enemy.Enemy.EnemyArray.push(this);
this.maxVelY = 2;
this.maxVelX = 2;
this.velX = 2;
this.velY = 2;
if (!com.homestarrunner.stinkoman.editor.LevelEditor.editorActive) {
this._mc.onEnterFrame = function () {
thisEnemy.update();
};
}
this.vulnerable = true;
};
com.homestarrunner.stinkoman.stageobject.enemy.Enemy = v1;
com.homestarrunner.stinkoman.stageobject.enemy.Enemy extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.enemy.Enemy.EnemyArray.length) {
if (this == com.homestarrunner.stinkoman.stageobject.enemy.Enemy.EnemyArray[v2]) {
com.homestarrunner.stinkoman.stageobject.enemy.Enemy.EnemyArray.splice(v2, 1);
break;
}
++v2;
}
};
v2.update = function () {};
v2.updateHurtFlasher = function () {
--this.hurtFlashCounter;
if (this.hurtFlashCounter == 0) {
if ((this.hurtFlashColor.getTransform()).ra == 100) {
this.hurtFlashColor.setTransform(this.hurtFlashTrans);
} else {
this.hurtFlashColor.setTransform({'ra': 100, 'ga': 100, 'ba': 100, 'rb': 0});
}
this.hurtFlashCounter = 3;
}
};
v2.clearHurtFlasher = function () {
this.hurtFlashColor.setTransform({'ra': 100, 'rb': 0, 'ga': 100, 'ba': 100});
this.hurtFlashCounter = 3;
};
v2.initHurtFlasher = function (clip_mc) {
if (clip_mc == undefined) {
clip_mc = this._mc;
}
this.hurtFlashTrans = new Object();
this.hurtFlashColor = new Color(clip_mc);
this.hurtFlashTrans.ra = 39;
this.hurtFlashTrans.ga = 39;
this.hurtFlashTrans.ba = 39;
this.hurtFlashTrans.rb = 156;
this.hurtFlashCounter = 3;
};
v2.updateDead = function () {
this._mc._x += this.velX;
this._mc._y += this.velY;
--this.deadAnimateCounter;
if (this._mc._y < -200 || this.deadAnimateCounter < 0) {
this.remove();
}
};
v2.die = function (x, y) {
var thisEnemy = this;
this.dontRespawn = true;
this._mc.onEnterFrame = function () {
thisEnemy.updateDead();
};
this._mc.gotoAndPlay('dieRight');
this.dead = true;
this.velX = 20 * x;
this.velY = 20 * y;
this.deadAnimateCounter = 200;
};
v2.takeDamage = function (x, y) {
this.die(x, y);
};
v2.remove = function () {
var v3;
delete this._mc.onEnterFrame;
this._mc.removeMovieClip();
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.enemy.Enemy.EnemyArray.length) {
if (com.homestarrunner.stinkoman.stageobject.enemy.Enemy.EnemyArray[v2]._mc._name == undefined) {
v3 = v2;
}
++v2;
}
com.homestarrunner.stinkoman.stageobject.enemy.Enemy.EnemyArray.splice(v3, 1);
};
v2.collideTest = function (test_mc) {
return this._mc.hitTest(test_mc);
};
v2.hurtByPlayerTest = function (test_mc) {
return this._mc.hitTest(test_mc);
};
v1.anyHurtByPlayerTest = function (test_mc) {
var v2 = new Array();
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.enemy.Enemy.EnemyArray.length) {
if (!com.homestarrunner.stinkoman.stageobject.enemy.Enemy.EnemyArray[v1].dead && com.homestarrunner.stinkoman.stageobject.enemy.Enemy.EnemyArray[v1].hurtByPlayerTest(test_mc)) {
v2.push(com.homestarrunner.stinkoman.stageobject.enemy.Enemy.EnemyArray[v1]);
}
++v1;
}
return v2;
};
v2.playerDangerTest = function (test_mc) {
return this._mc.hitTest(test_mc);
};
v1.anyPlayerDangerTest = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.enemy.Enemy.EnemyArray.length) {
if (!com.homestarrunner.stinkoman.stageobject.enemy.Enemy.EnemyArray[v1].dead && com.homestarrunner.stinkoman.stageobject.enemy.Enemy.EnemyArray[v1].playerDangerTest(test_mc)) {
return com.homestarrunner.stinkoman.stageobject.enemy.Enemy.EnemyArray[v1];
}
++v1;
}
return undefined;
};
v2.reverse = function () {
this.velX = -this.velX;
if (this.velX >= 0) {
this._mc.gotoAndStop('right');
this.facingDir = 'right';
} else {
this._mc.gotoAndStop('left');
this.facingDir = 'left';
}
};
v2.reverseFacingDir = function () {
if (this.facingDir == 'right') {
this.facingDir = 'left';
} else {
this.facingDir = 'right';
}
};
v2.applyFacingDir = function () {
if (this.facingDir == 'right') {
this._mc.gotoAndStop('right');
} else {
this._mc.gotoAndStop('left');
}
};
v2.applyInitObjProperties = function (initObj) {
for (var v3 in initObj) {
if (isNaN(initObj[v3])) {
this[v3] = initObj[v3];
} else {
this[v3] = Number(initObj[v3]);
}
}
};
v1.FLASH_COUNTER_LENGTH = 3;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.Enemy.prototype, null, 1);
}
#endinitclip
}
movieClip 2747 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v3 = this;
this._mc.animator_mc.stop();
this.maxVelY = 0;
this.maxVelX = -2;
this.velX = -2;
this.velY = 0;
this.hitPoints = 6;
--this.invincibleCounter;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar.biztarArray.push(this);
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.takeDamage = function (x, y) {
if (this.invincibleCounter <= 0 && this.hitPoints > 0) {
--this.hitPoints;
this._mc.nextFrame();
this.invincibleCounter = 6;
}
if (this.hitPoints == 0) {
this.die(x, y);
this.removeFromBiztarArray();
}
};
v2.updateDead = function () {
delete this._mc.onEnterFrame;
};
v2.update = function () {
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
}
};
v2.playerDangerTest = function (test_mc) {
return false;
};
v2.removeFromBiztarArray = function () {
var v3;
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar.biztarArray.length) {
if (com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar.biztarArray[v2]._mc._name == this._mc._name) {
v3 = v2;
break;
}
++v2;
}
com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar.biztarArray.splice(v3, 1);
};
v1.hit = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar.biztarArray.length) {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar.biztarArray[v1]._mc)) {
return com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar.biztarArray[v1]._mc;
}
++v1;
}
return undefined;
};
v1.clearAll = function () {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar.biztarArray.length) {
delete com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar.biztarArray[v1];
++v1;
}
com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar.biztarArray = new Array();
};
v1.biztarArray = new Array();
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar.prototype, null, 1);
}
#endinitclip
}
movieClip 2748 __Packages.com.homestarrunner.stinkoman.stageobject.Ornament {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.Ornament) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'Ornament' + typeNum, depth);
if (com.homestarrunner.stinkoman.stageobject.Ornament.OrnamentArray == undefined) {
com.homestarrunner.stinkoman.stageobject.Ornament.OrnamentArray = new Array();
}
this.classType = 'Ornament';
var v4 = this;
com.homestarrunner.stinkoman.stageobject.Ornament.OrnamentArray.push(this);
if (!com.homestarrunner.stinkoman.editor.LevelEditor.isActive()) {
this._mc.editorGuide_mc._visible = false;
} else {
this._mc.stop();
}
};
com.homestarrunner.stinkoman.stageobject.Ornament = v1;
com.homestarrunner.stinkoman.stageobject.Ornament extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.Ornament.OrnamentArray.length) {
if (this == com.homestarrunner.stinkoman.stageobject.Ornament.OrnamentArray[v2]) {
com.homestarrunner.stinkoman.stageobject.Ornament.OrnamentArray.splice(v2, 1);
break;
}
++v2;
}
};
v2.winGame = function () {
if (!com.homestarrunner.stinkoman.editor.LevelEditor.editorActive) {
com.homestarrunner.stinkoman.StinkoGame.winLevel();
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.Ornament.prototype, null, 1);
}
#endinitclip
}
movieClip 2749 __Packages.com.homestarrunner.stinkoman.stageobject.XMovingPlatform {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.XMovingPlatform) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'XMovingPlatform' + typeNum, depth);
if (com.homestarrunner.stinkoman.stageobject.XMovingPlatform.XMovingPlatformArray == undefined) {
com.homestarrunner.stinkoman.stageobject.XMovingPlatform.XMovingPlatformArray = new Array();
}
this.classType = 'XMovingPlatform';
var thisXMovingPlatform = this;
com.homestarrunner.stinkoman.stageobject.XMovingPlatform.XMovingPlatformArray.push(this);
this.lRange = x;
this.rRange = 100;
this.maxVel = 3;
this.vel = 2;
for (var v4 in initObj) {
this[v4] = Number(initObj[v4]);
}
this._mc.rangeGuide_mc._x = this.rRange;
this._mc.mPlatform = this;
if (com.homestarrunner.stinkoman.editor.LevelEditor.isActive()) {
} else {
this._mc.rangeGuide_mc._visible = false;
this._mc.onEnterFrame = function () {
thisXMovingPlatform.update();
};
if (this.startAtEnd > 0) {
this._mc._x = this.lRange + this.rRange;
}
}
};
com.homestarrunner.stinkoman.stageobject.XMovingPlatform = v1;
com.homestarrunner.stinkoman.stageobject.XMovingPlatform extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.XMovingPlatform.XMovingPlatformArray.length) {
if (this == com.homestarrunner.stinkoman.stageobject.XMovingPlatform.XMovingPlatformArray[v2]) {
com.homestarrunner.stinkoman.stageobject.XMovingPlatform.XMovingPlatformArray.splice(v2, 1);
break;
}
++v2;
}
};
v2.update = function () {
if (this.vel > 0 && this._mc._x >= this.lRange + this.rRange) {
this.vel = -this.vel;
}
if (this.vel < 0 && this._mc._x <= this.lRange) {
this.vel = -this.vel;
}
if (this._mc._x < this.lRange + 30) {
this.vel += 0.4;
}
if (this._mc._x > this.lRange + this.rRange - 30) {
this.vel -= 0.4;
}
if (this.vel >= this.maxVel) {
this.vel = this.maxVel;
}
if (this.vel <= -this.maxVel) {
this.vel = -this.maxVel;
}
this._mc._x += this.vel;
};
v2.moveRangeGuideTo = function (newVal) {
if (newVal < this._mc.x) {
newVal = this._mc.x;
}
this.rRange = newVal;
this._mc.rangeGuide_mc._x = this.rRange;
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.rRange = this.rRange;
v2.maxVel = this.maxVel;
return v2;
};
v2.handlePlayerLanding = function () {
if (this.subType == 6) {
this._mc.platform.play();
}
};
v1.hit = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.XMovingPlatform.XMovingPlatformArray.length) {
if (!com.homestarrunner.stinkoman.stageobject.XMovingPlatform.XMovingPlatformArray[v1].standable) {
} else {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.XMovingPlatform.XMovingPlatformArray[v1]._mc.hitArea_mc)) {
return com.homestarrunner.stinkoman.stageobject.XMovingPlatform.XMovingPlatformArray[v1];
}
}
++v1;
}
return undefined;
};
v2.standable = true;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.XMovingPlatform.prototype, null, 1);
}
#endinitclip
}
movieClip 2750 __Packages.com.homestarrunner.stinkoman.stageobject.YMovingPlatform {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.YMovingPlatform) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'YMovingPlatform' + typeNum, depth);
if (com.homestarrunner.stinkoman.stageobject.YMovingPlatform.YMovingPlatformArray == undefined) {
com.homestarrunner.stinkoman.stageobject.YMovingPlatform.YMovingPlatformArray = new Array();
}
this.classType = 'YMovingPlatform';
var thisYMovingPlatform = this;
com.homestarrunner.stinkoman.stageobject.YMovingPlatform.YMovingPlatformArray.push(this);
this.bRange = y;
this.tRange = -100;
this.maxVel = 3;
this.vel = 2;
for (var v4 in initObj) {
this[v4] = Number(initObj[v4]);
}
this.maxVel = 3;
this._mc.rangeGuide_mc._y = this.tRange;
this._mc.mPlatform = this;
if (com.homestarrunner.stinkoman.editor.LevelEditor.isActive()) {
} else {
this._mc.rangeGuide_mc._visible = false;
this._mc.onEnterFrame = function () {
thisYMovingPlatform.update();
};
}
};
com.homestarrunner.stinkoman.stageobject.YMovingPlatform = v1;
com.homestarrunner.stinkoman.stageobject.YMovingPlatform extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.YMovingPlatform.YMovingPlatformArray.length) {
if (this == com.homestarrunner.stinkoman.stageobject.YMovingPlatform.YMovingPlatformArray[v2]) {
com.homestarrunner.stinkoman.stageobject.YMovingPlatform.YMovingPlatformArray.splice(v2, 1);
break;
}
++v2;
}
};
v2.update = function () {
var v3 = this.bRange + this.tRange;
var v2 = this.bRange;
if (this.vel < 0 && this._mc._y <= v3) {
this.vel = -this.vel;
}
if (this.vel > 0 && this._mc._y >= v2) {
this.vel = -this.vel;
}
if (this.vel > this.maxVel) {
this.vel = this.maxVel;
}
if (this.vel < -this.maxVel) {
this.vel = -this.maxVel;
}
this._mc._y += this.vel;
};
v2.moveYRangeGuideTo = function (newVal) {
this.tRange = newVal;
this._mc.rangeGuide_mc._y = this.tRange;
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.tRange = this.tRange;
v2.maxVel = this.maxVel;
return v2;
};
v2.handlePlayerLanding = function () {
if (this.subType == 6) {
this._mc.platform.play();
}
};
v1.hit = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.YMovingPlatform.YMovingPlatformArray.length) {
if (!com.homestarrunner.stinkoman.stageobject.YMovingPlatform.YMovingPlatformArray[v1].standable) {
} else {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.YMovingPlatform.YMovingPlatformArray[v1]._mc.hitArea_mc)) {
return com.homestarrunner.stinkoman.stageobject.YMovingPlatform.YMovingPlatformArray[v1];
}
}
++v1;
}
return undefined;
};
v2.standable = true;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.YMovingPlatform.prototype, null, 1);
}
#endinitclip
}
movieClip 2751 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyMiniToothbot {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyMiniToothbot) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
this.facingDir = 'left';
var v3 = this;
this._mc.animator_mc.stop();
this.maxVelY = 0;
this.maxVelX = -1.5;
this.velX = -1.5;
this.velY = 0;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyMiniToothbot = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyMiniToothbot extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {
if ((this._mc._x > (com.homestarrunner.stinkoman.StinkoGame.getPlayerGlobal()).x && com.homestarrunner.stinkoman.StinkoGame.player1.facingDir == 'right' || this._mc._x < (com.homestarrunner.stinkoman.StinkoGame.getPlayerGlobal()).x && com.homestarrunner.stinkoman.StinkoGame.player1.facingDir == 'left') && Math.abs(this._mc._y - (com.homestarrunner.stinkoman.StinkoGame.getPlayerGlobal()).y) < 30) {
this.velX = 0;
this._mc.gotoAndStop('crouch' + this.facingDir);
this.crouching = true;
this.vulnerable = false;
return undefined;
} else {
this.crouching = false;
this.vulnerable = true;
if (this.facingDir == 'right') {
this.velX = 1.5;
} else {
this.velX = -1.5;
}
this._mc.gotoAndStop(this.facingDir);
}
if (this.velX == 0) {
this._mc.animator_mc.stop();
} else {
this._mc.animator_mc.play();
}
this._mc._x += this.velX;
if (com.homestarrunner.stinkoman.stageobject.Platform.hit(this._mc.hitTest_mc) == undefined) {
this.reverse();
}
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) != undefined) {
var v2 = 0;
while (v2 < 5) {
this._mc._x -= this.velX;
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) == undefined) {
v2 = 6;
}
++v2;
}
this.reverse();
}
};
v2.hurtByPlayerTest = function (test_mc) {
return this._mc.hitTest(test_mc);
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyMiniToothbot.prototype, null, 1);
}
#endinitclip
}
movieClip 2752 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyToothbot {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyToothbot) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v3 = this;
this._mc.animator_mc.stop();
this.maxVelY = 0;
this.maxVelX = -1.5;
this.velX = -1.5;
this.velY = 0;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyToothbot = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyToothbot extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.updateDead = function () {
delete this._mc.onEnterFrame;
};
v2.update = function () {
if (this.velX == 0) {
this._mc.animator_mc.stop();
} else {
this._mc.animator_mc.play();
}
this._mc._x += this.velX;
if (com.homestarrunner.stinkoman.stageobject.Platform.hit(this._mc.hitTest_mc) == undefined) {
this.reverse();
}
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) != undefined) {
var v2 = 0;
while (v2 < 5) {
this._mc._x -= this.velX;
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) == undefined) {
v2 = 6;
}
++v2;
}
this.reverse();
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyToothbot.prototype, null, 1);
}
#endinitclip
}
movieClip 2753 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyChick {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyChick) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v4 = this;
this.maxVelY = 0;
this.maxVelX = -1.5;
this.velX = -1.5;
this.velY = 0;
this.hitPoints = 4;
this.invincibleCounter = 0;
this.initHurtFlasher(this._mc.chickun_mc.animator_mc);
this.facingDir = 'left';
this.applyInitObjProperties(initObj);
this.applyFacingDir();
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyChick = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyChick extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.takeDamage = function (x, y) {
if (this.invincibleCounter == 0) {
--this.hitPoints;
this.invincibleCounter = 24;
}
if (this.hitPoints == 0) {
this.die(x, y);
}
};
v2.die = function (x, y) {
var v2 = this;
delete this._mc.onEnterFrame;
this._mc.chickun_mc.gotoAndPlay('die');
this.dead = true;
this.dontRespawn = true;
this.velX = 0;
this.velY = 0;
};
v2.update = function () {
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
};
v2.collideTest = function (test_mc) {
if (this._mc.chickun_mc.animator_mc.chickbone_mc.hitTest(test_mc) || this._mc.chickun_mc.hurtTest_mc.hitTest(test_mc)) {
return true;
} else {
return false;
}
};
v2.hurtByPlayerTest = function (test_mc) {
return this._mc.chickun_mc.hurtByPlayer_mc.hitTest(test_mc);
};
v2.playerDangerTest = function (test_mc) {
return this._mc.chickun_mc.hurtTest_mc.hitTest(test_mc) || this._mc.chickun_mc.boneAttack_mc.hitTest(test_mc);
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.facingDir = this.facingDir;
return v2;
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyChick.prototype, null, 1);
}
#endinitclip
}
movieClip 2754 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyBouncebot {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyBouncebot) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v3 = this;
this.maxVelY = 0;
this.maxVelX = -1.5;
this.velX = 0;
this.velY = 0;
this.jumpingDir = -1;
if (com.homestarrunner.stinkoman.editor.LevelEditor.editorActive) {
this._mc.stop();
}
this._mc.myEnemyBouncebot = this;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyBouncebot = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyBouncebot extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {
this._mc._x += this.velX;
if (Math.random() > 0.7) {
this.jumpingDir = -this.jumpingDir;
}
this._mc._x += 30 * this.jumpingDir;
if (com.homestarrunner.stinkoman.stageobject.Platform.hit(this._mc.hitTest_mc) == undefined) {
this._mc._x -= 30 * this.jumpingDir;
this.jumpingDir = -this.jumpingDir;
} else {
this._mc._x -= 30 * this.jumpingDir;
}
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) != undefined) {
this.reverse();
}
};
v2.startJump = function () {
this.velX = 2 * this.jumpingDir;
};
v2.stopJump = function () {
this.velX = 0;
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyBouncebot.prototype, null, 1);
}
#endinitclip
}
movieClip 2755 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyCabbage {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyCabbage) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v3 = this;
if (com.homestarrunner.stinkoman.editor.LevelEditor.editorActive) {
this._mc.stop();
}
this._mc.myEnemyCabbage = this;
this.vulnerable = false;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyCabbage = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyCabbage extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {};
v2.hurtByPlayerTest = function (test_mc) {
return this._mc.hurtByPlayer_mc.hitTest(test_mc);
};
v2.playerDangerTest = function (test_mc) {
return this._mc.bulletL_mc.hitTest(test_mc) || this._mc.hurtByPlayer_mc.hitTest(test_mc);
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyCabbage.prototype, null, 1);
}
#endinitclip
}
movieClip 2756 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyBouncechick {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyBouncechick) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v4 = this;
this.maxVelY = 0;
this.maxVelX = 2;
this.velX = 0;
this.velY = 0;
if (com.homestarrunner.stinkoman.editor.LevelEditor.editorActive) {
this._mc.stop();
}
if (initObj.jumpingDir != undefined) {
this.jumpingDir = Number(initObj.jumpingDir);
} else {
this.jumpingDir = 1;
}
this._mc.myEnemyBouncechick = v4;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyBouncechick = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyBouncechick extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {
this._mc._x += this.velX;
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) != undefined || com.homestarrunner.stinkoman.stageobject.Wall.hit(this._mc) != undefined) {
this.reverse();
}
};
v2.startJump = function () {
this._mc._x += this.jumpLength * this.jumpingDir;
if (com.homestarrunner.stinkoman.stageobject.Platform.hit(this._mc.hitTest_mc) == undefined) {
this._mc._x -= this.jumpLength * this.jumpingDir;
this.jumpingDir = -this.jumpingDir;
} else {
this._mc._x -= this.jumpLength * this.jumpingDir;
}
this.velX = 4 * this.jumpingDir;
};
v2.stopJump = function () {
this.velX = 0;
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.jumpingDir = this.jumpingDir;
return v2;
};
v2.die = function (x, y) {
this.dead = true;
var thisEnemy = this;
this.dontRespawn = true;
this._mc.onEnterFrame = function () {
thisEnemy.updateDead();
};
this._mc._y -= this._mc._height - 5;
this._mc.gotoAndPlay('dieRight');
this.deadAnimateCounter = 200;
};
v2.updateDead = function () {
this._mc.gotoAndPlay('dieRight');
delete this._mc.onEnterFrame;
};
v2.jumpLength = 73;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyBouncechick.prototype, null, 1);
}
#endinitclip
}
movieClip 2757 __Packages.com.homestarrunner.stinkoman.stageobject.Wall {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.Wall) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'Wall' + typeNum, depth);
if (com.homestarrunner.stinkoman.stageobject.Wall.WallArray == undefined) {
com.homestarrunner.stinkoman.stageobject.Wall.WallArray = new Array();
}
this.classType = 'Wall';
var v3 = this;
com.homestarrunner.stinkoman.stageobject.Wall.WallArray.push(this);
this._mc.animator_mc.stop();
this._mc.mType = 'vert';
if (!com.homestarrunner.stinkoman.editor.LevelEditor.isActive()) {
this._mc.editorGuide_mc._visible = false;
}
};
com.homestarrunner.stinkoman.stageobject.Wall = v1;
com.homestarrunner.stinkoman.stageobject.Wall extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.Wall.WallArray.length) {
if (this == com.homestarrunner.stinkoman.stageobject.Wall.WallArray[v2]) {
com.homestarrunner.stinkoman.stageobject.Wall.WallArray.splice(v2, 1);
break;
}
++v2;
}
};
v1.hit = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.Wall.WallArray.length) {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.Wall.WallArray[v1]._mc)) {
return com.homestarrunner.stinkoman.stageobject.Wall.WallArray[v1]._mc;
}
++v1;
}
return undefined;
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.Wall.prototype, null, 1);
}
#endinitclip
}
movieClip 2758 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyChickJogger {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyChickJogger) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v4 = this;
this._mc.animator_mc.stop();
this.facingDir = 'left';
this.applyInitObjProperties(initObj);
this.applyFacingDir();
this.maxVelY = 0;
this.maxVelX = 5;
if (this.facingDir == 'left') {
this.velX = -0.5;
} else {
this.velX = 0.5;
}
this.velY = 0;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyChickJogger = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyChickJogger extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {
if (this.velX == 0) {
this._mc.animator_mc.stop();
} else {
this._mc.animator_mc.play();
}
this._mc._x += this.velX;
if (this.velX > 0) {
this.velX += 0.04;
if (this.velX > this.maxVelX) {
this.velX = this.maxVelX;
}
} else {
this.velX -= 0.04;
if (this.velX < -this.maxVelX) {
this.velX = this.maxVelX;
}
}
if (com.homestarrunner.stinkoman.stageobject.Platform.hit(this._mc.hitTest_mc) == undefined) {
this._mc._x -= this.velX;
if (this.velX < 0) {
this.velX = 0.5;
} else {
this.velX = -0.5;
}
this.reverseFacingDir();
this.applyFacingDir();
} else {
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) != undefined || com.homestarrunner.stinkoman.stageobject.Wall.hit(this._mc) != undefined) {
var v2 = 0;
while (v2 < 5) {
this._mc._x -= this.velX;
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) == undefined || com.homestarrunner.stinkoman.stageobject.Wall.hit(this._mc) == undefined) {
v2 = 6;
}
++v2;
}
if (this.velX < 0) {
this.velX = 0.5;
} else {
this.velX = -0.5;
}
this.reverseFacingDir();
this.applyFacingDir();
}
}
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.facingDir = this.facingDir;
return v2;
};
v2.updateDead = function () {
delete this._mc.onEnterFrame;
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyChickJogger.prototype, null, 1);
}
#endinitclip
}
movieClip 2759 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyFlyingToothbot {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyFlyingToothbot) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var thisEnemyFlyingToothbot = this;
this.maxVelY = 0;
this.maxVelX = 4;
this.velX = -3;
this.velY = 0;
this.lRange = x;
this.rRange = 100;
this.facingDir = 'left';
for (var v4 in initObj) {
this[v4] = Number(initObj[v4]);
}
if (com.homestarrunner.stinkoman.editor.LevelEditor.isActive()) {
} else {
this._mc.rangeGuide_mc._visible = false;
this._mc.onEnterFrame = function () {
thisEnemyFlyingToothbot.update();
};
}
if (this.subType == 22) {
this.vulnerable = false;
}
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyFlyingToothbot = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyFlyingToothbot extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.collideTest = function (test_mc) {
return this._mc.animator_mc.hurtTest_mc.hitTest(test_mc);
};
v2.hurtByPlayerTest = function (test_mc) {
return this._mc.animator_mc.hurtTest_mc.hitTest(test_mc);
};
v2.playerDangerTest = function (test_mc) {
return this._mc.animator_mc.hurtTest_mc.hitTest(test_mc);
};
v2.update = function () {
if (this.velX > 0 && this._mc._x >= this.lRange + this.rRange) {
this.reverse();
}
if (this.velX < 0 && this._mc._x <= this.lRange) {
this.reverse();
}
if (this.velX >= this.maxVelX) {
this.velX = this.maxVelX;
}
if (this.velX <= -this.maxVelX) {
this.velX = -this.maxVelX;
}
this._mc._x += this.velX;
};
v2.updateDead = function () {
delete this._mc.onEnterFrame;
};
v2.moveRangeGuideTo = function (newVal) {
if (newVal < this._mc.x) {
newVal = this._mc.x;
}
this.rRange = newVal;
this._mc.rangeGuide_mc._x = this.rRange;
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.rRange = this.rRange;
v2.maxVelX = this.maxVelX;
return v2;
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyFlyingToothbot.prototype, null, 1);
}
#endinitclip
}
movieClip 2760 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyVacgun {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyVacgun) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v3 = this;
this.maxVelY = 0;
this.maxVelX = -1.5;
this.velX = -1.5;
this.velY = 0;
this.hitPoints = 3;
this.invincibleCounter = 0;
this.initHurtFlasher(this._mc.chickun_mc.animator_mc);
this.facingDir = 'left';
this._mc.mVacgun = this;
this.applyInitObjProperties(initObj);
this.applyFacingDir();
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyVacgun = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyVacgun extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.takeDamage = function (x, y) {
if (this.invincibleCounter == 0) {
--this.hitPoints;
this.invincibleCounter = 24;
}
if (this.hitPoints == 0) {
this.die(x, y);
}
};
v2.die = function (x, y) {
var v2 = this;
this._mc.gotoAndPlay('die');
this.dead = true;
this.dontRespawn = true;
this.velX = 0;
this.velY = 0;
};
v2.update = function () {
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
};
v2.collideTest = function (test_mc) {
return this._mc.hitTest_mc.hitTest(test_mc);
};
v2.hurtByPlayerTest = function (test_mc) {
return this._mc.hitTest_mc.hitTest(test_mc);
};
v2.playerDangerTest = function (test_mc) {
return this._mc.hitTest_mc.hitTest(test_mc);
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.facingDir = this.facingDir;
return v2;
};
v2.shoot = function () {
var v2;
if (this.subType == 8) {
v2 = 'Bullet2';
} else {
v2 = 'Bullet7';
}
if (this.facingDir == 'left') {
var v3 = new com.homestarrunner.stinkoman.bullet.Bullet(v2, this._mc._x - 14, this._mc._y - 29, -13, 0, false);
} else {
var v3 = new com.homestarrunner.stinkoman.bullet.Bullet(v2, this._mc._x + 14, this._mc._y - 29, 13, 0, false);
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyVacgun.prototype, null, 1);
}
#endinitclip
}
movieClip 2761 __Packages.com.homestarrunner.stinkoman.bullet.Bullet {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.bullet) {
_global.com.homestarrunner.stinkoman.bullet = new Object();
}
if (!_global.com.homestarrunner.stinkoman.bullet.Bullet) {
var v1 = function (symbolName, start_x, start_y, pxVel, pyVel, pFriendly, pGrav, pDeflectable) {
if (com.homestarrunner.stinkoman.bullet.Bullet.bulletArray == undefined) {
com.homestarrunner.stinkoman.bullet.Bullet.bulletArray = new Array();
com.homestarrunner.stinkoman.bullet.Bullet.depthCount = 0;
}
if (pGrav == undefined) {
this.gravity = 0;
} else {
this.gravity = pGrav;
}
this.classType = 'Bullet';
this.xVel = pxVel;
this.yVel = pyVel;
this.friendly = pFriendly;
this.deflectable = pDeflectable;
if (pDeflectable == undefined) {
this.deflectable = true;
}
this.active = true;
this._mc = com.homestarrunner.stinkoman.StinkoGame.bullet_mc.attachMovie(symbolName, 'bullet' + com.homestarrunner.stinkoman.bullet.Bullet.depthCount, com.homestarrunner.stinkoman.bullet.Bullet.depthCount++);
this._mc._x = start_x;
this._mc._y = start_y;
this._mc.bullet = this;
if (this.xVel > 0) {
this._mc.gotoAndStop('right');
} else {
this._mc.gotoAndStop('left');
}
var thisBullet = this;
this._mc.onEnterFrame = function () {
thisBullet.update();
};
com.homestarrunner.stinkoman.bullet.Bullet.bulletArray.push(this);
};
com.homestarrunner.stinkoman.bullet.Bullet = v1;
var v2 = v1.prototype;
v2.update = function () {
this._mc._x += this.xVel;
this._mc._y += this.yVel;
if (this.sineAmt > 0) {
this._mc.bullet_mc._y = this.sineAmt * Math.sin(this.sineCount);
this.sineCount += 6.283185307179586 / this.sinePeriod;
}
this.yVel += this.gravity;
if (!this.isOnScreen()) {
this.kill();
}
this.testForHits();
this.subClassUpdate();
};
v2.isOnScreen = function () {
return com.homestarrunner.stinkoman.StinkoGame.isWithinActiveStage(this._mc._x, this._mc._y, 20, 20);
};
v2.subClassUpdate = function () {};
v2.playerDangerTest = function (test_mc) {
return this._mc.hitTest(test_mc);
};
v1.anyPlayerDangerTest = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.bullet.Bullet.bulletArray.length) {
if (!com.homestarrunner.stinkoman.bullet.Bullet.bulletArray[v1].friendly && com.homestarrunner.stinkoman.bullet.Bullet.bulletArray[v1].active && com.homestarrunner.stinkoman.bullet.Bullet.bulletArray[v1].playerDangerTest(test_mc)) {
return com.homestarrunner.stinkoman.bullet.Bullet.bulletArray[v1];
}
++v1;
}
return undefined;
};
v2.onHitPlayer = function () {};
v2.kill = function () {
this.clearFromObjectsArray();
this._mc.removeMovieClip();
false;
};
v2.clearFromObjectsArray = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.bullet.Bullet.bulletArray.length) {
if (this == com.homestarrunner.stinkoman.bullet.Bullet.bulletArray[v2]) {
com.homestarrunner.stinkoman.bullet.Bullet.bulletArray.splice(v2, 1);
break;
}
++v2;
}
};
v2.testForHits = function () {};
v1.killAll = function () {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.bullet.Bullet.bulletArray.length) {
com.homestarrunner.stinkoman.bullet.Bullet.bulletArray[v1]._mc.removeMovieClip();
delete com.homestarrunner.stinkoman.bullet.Bullet.bulletArray[v1];
++v1;
}
com.homestarrunner.stinkoman.bullet.Bullet.bulletArray = new Array();
};
v2.deflect = function () {
if (!this.deflectable) {
return undefined;
}
this._mc.myBullet = this;
if (this.xVel > 0) {
this._mc.gotoAndPlay('deflect_right');
} else {
this._mc.gotoAndPlay('deflect_left');
}
this.xVel = 0;
this.active = false;
delete this._mc.onEnterFrame;
};
v2.sineAmt = 0;
v2.sinePeriod = 1;
v2.sineCount = 0;
v2.gravity = 0;
v1.depthCount = 0;
ASSetPropFlags(com.homestarrunner.stinkoman.bullet.Bullet.prototype, null, 1);
}
#endinitclip
}
movieClip 2762 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyTriggerable {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyTriggerable) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v3 = this;
if (com.homestarrunner.stinkoman.editor.LevelEditor.editorActive) {
this._mc.stop();
}
this._mc.myEnemyTriggerable = this;
this.vulnerable = false;
this.triggered = false;
if (!com.homestarrunner.stinkoman.editor.LevelEditor.isActive()) {
this._mc.triggerGuide_mc._visible = false;
}
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyTriggerable = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyTriggerable extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {
if (!this.triggered && com.homestarrunner.stinkoman.StinkoGame.player1._mc.hitTest(this._mc)) {
this.triggered = true;
this._mc.gotoAndPlay('go');
}
};
v2.hurtByPlayerTest = function (test_mc) {
return this._mc.hurtByPlayer_mc.hitTest(test_mc);
};
v2.playerDangerTest = function (test_mc) {
if (this.subType == 9) {
return this._mc.animator_mc.ship_mc.hitTest(test_mc) || this._mc.animator_mc.bullet1.hitTest(test_mc) || this._mc.animator_mc.bullet2.hitTest(test_mc) || this._mc.animator_mc.bullet3.hitTest(test_mc) || this._mc.animator_mc.bullet4.hitTest(test_mc);
} else {
return this._mc.hitTest_mc.hitTest(test_mc);
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyTriggerable.prototype, null, 1);
}
#endinitclip
}
movieClip 2763 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyGokul {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyGokul) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v3 = this;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyGokul = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyGokul extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {};
v2.die = function (x, y) {
var v2 = this;
this._mc.gotoAndPlay('die');
this.dead = true;
this.dontRespawn = true;
this.velX = 0;
this.velY = 0;
};
v2.hurtByPlayerTest = function (test_mc) {
return this._mc.hitTest_mc.hitTest(test_mc);
};
v2.playerDangerTest = function (test_mc) {
return this._mc.hitTest_mc.hitTest(test_mc);
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyGokul.prototype, null, 1);
}
#endinitclip
}
movieClip 2764 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyPoorbt {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyPoorbt) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v4 = this;
if (com.homestarrunner.stinkoman.editor.LevelEditor.editorActive) {
this._mc.stop();
}
this.shotsFired = 0;
this._mc.mPoorbt = this;
this.shotsToFire = Number(initObj.shotsToFire);
if (this.shotsToFire == undefined || isNaN(initObj.shotsToFire)) {
this.shotsToFire = 1;
}
this.vulnerable = false;
this.triggered = false;
this.enterFrom = initObj.facingDir;
if (this.enterFrom == undefined) {
this.enterFrom = 'left';
}
if (this.enterFrom == 'left') {
this.facingDir = 'right';
this.velX = 6;
} else {
this.facingDir = 'left';
this.velX = -4;
}
if (!com.homestarrunner.stinkoman.editor.LevelEditor.isActive()) {
this._mc.triggerGuide_mc._visible = false;
}
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyPoorbt = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyPoorbt extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {
var thisPoorbt = this;
if (!this.triggered && com.homestarrunner.stinkoman.StinkoGame.player1._mc.hitTest(this._mc)) {
this.triggered = true;
this.vulnerable = true;
var v2 = new Object({'y': 0});
if (this.enterFrom == 'left') {
v2.x = com.homestarrunner.stinkoman.StinkoGame.viewBox.l - 10;
} else {
v2.x = com.homestarrunner.stinkoman.StinkoGame.viewBox.r + 10;
}
com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc.globalToLocal(v2);
this._mc.gotoAndStop(this.facingDir + 'with');
this._mc._x = v2.x;
this.enterCounter = 24;
this._mc.onEnterFrame = function () {
thisPoorbt.updateEnter();
};
}
};
v2.updateEnter = function () {
this._mc._x += this.velX;
--this.enterCounter;
var v2 = new Object({'x': this._mc._x, 'y': 0});
this._mc._parent.localToGlobal(v2);
if (v2.x > com.homestarrunner.stinkoman.StinkoGame.viewBox.l + 30 && v2.x < com.homestarrunner.stinkoman.StinkoGame.viewBox.r - 30) {
this._mc.gotoAndStop(this.facingDir + 'Shoot');
delete this._mc.onEnterFrame;
}
};
v2.updateExit = function () {
this._mc._x += this.velX;
var v2 = new Object({'x': this._mc._x, 'y': 0});
this._mc._parent.localToGlobal(v2);
if (v2.x < com.homestarrunner.stinkoman.StinkoGame.viewBox.l - 30 || v2.x > com.homestarrunner.stinkoman.StinkoGame.viewBox.r + 30) {
this._mc.gotoAndStop('done');
delete this._mc.onEnterFrame;
}
};
v2.hurtByPlayerTest = function (test_mc) {
return this._mc.hurtByPlayer_mc.hitTest(test_mc);
};
v2.playerDangerTest = function (test_mc) {
return this._mc.animator_mc.ship_mc.hitTest(test_mc) || this._mc.animator_mc.bullet1.hitTest(test_mc) || this._mc.animator_mc.bullet2.hitTest(test_mc) || this._mc.animator_mc.bullet3.hitTest(test_mc) || this._mc.animator_mc.bullet4.hitTest(test_mc);
};
v2.createBullet = function () {
if (this.facingDir == 'left') {
var v2 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet5', this._mc._x - 14, this._mc._y - 24, -13, 0, false);
} else {
var v2 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet4', this._mc._x + 14, this._mc._y - 24, 13, 0, false);
}
++this.shotsFired;
};
v2.resumeRunning = function () {
if (this.shotsFired < this.shotsToFire) {
this._mc.gotoAndStop(this.facingDir + 'Shoot');
return undefined;
}
var thisPoorbt = this;
this.velX = -this.velX * 2;
if (this.facingDir == 'left') {
this.facingDir = 'right';
} else {
this.facingDir = 'left';
}
this.enterCounter = 30;
this._mc.gotoAndStop(this.facingDir + 'Without');
this._mc.onEnterFrame = function () {
thisPoorbt.updateExit();
};
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.facingDir = this.facingDir;
v2.shotsToFire = this.shotsToFire;
return v2;
};
v2.updateDead = function () {
--this.deadAnimateCounter;
if (this._mc._y < -200 || this.deadAnimateCounter < 0) {
this.remove();
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyPoorbt.prototype, null, 1);
}
#endinitclip
}
movieClip 2765 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyGaspeau {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyGaspeau) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v3 = this;
if (com.homestarrunner.stinkoman.editor.LevelEditor.editorActive) {
this._mc.stop();
}
this._mc.mGaspeau = this;
this.vulnerable = false;
this.triggered = false;
this.facingDir = initObj.facingDir;
if (this.facingDir == undefined) {
this.facingDir = 'left';
}
if (!com.homestarrunner.stinkoman.editor.LevelEditor.isActive()) {
this._mc.triggerGuide_mc._visible = false;
}
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyGaspeau = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyGaspeau extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {
var thisGaspeau = this;
if (!this.triggered && (com.homestarrunner.stinkoman.StinkoGame.oneUp._mc.hitTest(this._mc) || com.homestarrunner.stinkoman.StinkoGame.player1._mc.hitTest(this._mc))) {
this.triggered = true;
this.vulnerable = true;
var v2 = new Object({'y': 0});
if (this.facingDir == 'right') {
v2.x = com.homestarrunner.stinkoman.StinkoGame.viewBox.l - 10;
this.velX = 6;
} else {
v2.x = com.homestarrunner.stinkoman.StinkoGame.viewBox.r + 10;
this.velX = -3;
}
com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc.globalToLocal(v2);
this._mc.gotoAndStop(this.facingDir);
this._mc._x = v2.x;
this._mc.onEnterFrame = function () {
thisGaspeau.updateEnter();
};
}
};
v2.updateEnter = function () {
this._mc._x += this.velX;
var v2 = new Object({'x': this._mc._x, 'y': 0});
this._mc._parent.localToGlobal(v2);
if (v2.x < com.homestarrunner.stinkoman.StinkoGame.viewBox.l - 50 || v2.x > com.homestarrunner.stinkoman.StinkoGame.viewBox.r + 50) {
this._mc.gotoAndStop('done');
delete this._mc.onEnterFrame;
}
};
v2.hurtByPlayerTest = function (test_mc) {
return this._mc.hitTest_mc.hitTest(test_mc);
};
v2.playerDangerTest = function (test_mc) {
return this._mc.hitTest_mc.hitTest(test_mc);
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.facingDir = this.facingDir;
return v2;
};
v2.updateDead = function () {
--this.deadAnimateCounter;
if (this._mc._y < -200 || this.deadAnimateCounter < 0) {
this.remove();
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyGaspeau.prototype, null, 1);
}
#endinitclip
}
movieClip 2766 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyChamCham {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyChamCham) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v3 = this;
this._mc.mChamCham = this;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyChamCham = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyChamCham extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {};
v2.die = function (x, y) {
var v2 = this;
this._mc.gotoAndPlay('die');
this.dead = true;
this.dontRespawn = true;
this.velX = 0;
this.velY = 0;
};
v2.shoot = function () {
var v2 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet6', this._mc._x - 45, this._mc._y - 30, 0, -7, false, 0, false);
var v3 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet6', this._mc._x + 45, this._mc._y - 30, 0, -7, false, 0, false);
};
v2.hurtByPlayerTest = function (test_mc) {
return this._mc.hurtByPlayer_mc.hitTest(test_mc);
};
v2.playerDangerTest = function (test_mc) {
return this._mc.hitTest_mc.hitTest(test_mc);
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyChamCham.prototype, null, 1);
}
#endinitclip
}
movieClip 2767 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyAstromund {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyAstromund) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v4 = this;
if (com.homestarrunner.stinkoman.editor.LevelEditor.isActive()) {
this._mc.stop();
delete this._mc.onEnterFrame;
} else {
this._mc.triggerGuide_mc._visible = false;
}
this._mc.mAstromund = this;
this.vulnerable = false;
this.triggered = false;
this.facingDir = initObj.facingDir;
if (this.facingDir == undefined) {
this.facingDir = 'left';
}
if (this.facingDir == 'left') {
this.enterFrom = 'right';
this.velX = -6;
} else {
this.enterFrom = 'left';
this.velX = 6;
}
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyAstromund = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyAstromund extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {
var thisAstromund = this;
if (!this.triggered && com.homestarrunner.stinkoman.StinkoGame.player1._mc.hitTest(this._mc)) {
this.triggered = true;
this.vulnerable = true;
var v2 = new Object({'y': 0});
if (this.enterFrom == 'left') {
v2.x = com.homestarrunner.stinkoman.StinkoGame.viewBox.l - 10;
} else {
v2.x = com.homestarrunner.stinkoman.StinkoGame.viewBox.r + 10;
}
com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc.globalToLocal(v2);
this._mc.gotoAndStop(this.facingDir);
this._mc._x = v2.x;
this._mc.onEnterFrame = function () {
thisAstromund.updateRunning();
};
}
};
v2.updateRunning = function () {
this._mc._x += this.velX;
var v2;
this._mc._y += this.yVel;
v2 = com.homestarrunner.stinkoman.stageobject.MoveablePlatform.hitWalkies(this._mc.hitTestWalk_mc);
if (v2 == undefined) {
v2 = com.homestarrunner.stinkoman.stageobject.Platform.hit(this._mc.hitTestWalk_mc);
}
if (v2 != undefined) {
this._mc._y = v2._y;
this.yVel = 0;
} else {
this.yVel += 1;
}
if (this.yVel >= 10) {
this.yVel = 0;
}
if (this._mc._y > 500) {
this.remove();
return undefined;
}
};
v2.applyFacingDir = function () {};
v2.hurtByPlayerTest = function (test_mc) {
if (this._mc.hurtByPlayer_mc.hitTest(test_mc)) {
var v2 = new Object({'x': test_mc._x, 'y': test_mc._y});
test_mc._parent.localToGlobal(v2);
var v3 = new Object({'x': this._mc.hurtByPlayer_mc._x, 'y': this._mc.hurtByPlayer_mc._y});
this._mc.localToGlobal(v3);
if (this.facingDir == 'right' && v2.x < v3.x || this.facingDir == 'left' && v2.x > v3.x) {
return true;
}
} else {
return false;
}
};
v2.playerDangerTest = function (test_mc) {
return this._mc.hurtPlayer_mc.hitTest(test_mc);
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.facingDir = this.facingDir;
return v2;
};
v2.updateDead = function () {
--this.deadAnimateCounter;
if (this._mc._y < -200 || this.deadAnimateCounter < 0) {
this.remove();
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyAstromund.prototype, null, 1);
}
#endinitclip
}
movieClip 2768 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyDometant {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyDometant) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v4 = this;
this.maxVelY = 0;
this.maxVelX = -1.5;
this.velX = -1.5;
this.velY = 0;
this.hitPoints = 2;
this.invincibleCounter = 0;
this.initHurtFlasher(this._mc);
this._mc.mDometant = this;
this.applyInitObjProperties(initObj);
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyDometant = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyDometant extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.takeDamage = function (x, y) {
if (this.invincibleCounter == 0) {
--this.hitPoints;
this.invincibleCounter = 24;
}
if (this.hitPoints == 0) {
this.die(x, y);
}
};
v2.die = function (x, y) {
var v2 = this;
this._mc.gotoAndPlay('die');
this.dead = true;
this.dontRespawn = true;
this.velX = 0;
this.velY = 0;
};
v2.update = function () {
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
};
v2.collideTest = function (test_mc) {
return this._mc.hitTest_mc.hitTest(test_mc);
};
v2.hurtByPlayerTest = function (test_mc) {
return this._mc.hitTest_mc.hitTest(test_mc);
};
v2.playerDangerTest = function (test_mc) {
return this._mc.hitTest_mc.hitTest(test_mc);
};
v2.getAdditonalAttributes = function () {
var v1 = new Object();
return v1;
};
v2.shoot = function () {
var v2;
if (this.subType == 17 || this.subType == 18) {
v2 = 'Bullet2';
} else {
v2 = 'Bullet20';
}
if (this.subType == 17 || this.subType == 40) {
var v7 = new com.homestarrunner.stinkoman.bullet.Bullet(v2, this._mc._x, this._mc._y - 15, -8, 0, false);
var v6 = new com.homestarrunner.stinkoman.bullet.Bullet(v2, this._mc._x, this._mc._y - 15, 8, 0, false);
var v5 = new com.homestarrunner.stinkoman.bullet.Bullet(v2, this._mc._x, this._mc._y - 15, 8, -8, false);
var v4 = new com.homestarrunner.stinkoman.bullet.Bullet(v2, this._mc._x, this._mc._y - 15, -8, -8, false);
var v3 = new com.homestarrunner.stinkoman.bullet.Bullet(v2, this._mc._x, this._mc._y - 15, 0, -8, false);
} else {
var v7 = new com.homestarrunner.stinkoman.bullet.Bullet(v2, this._mc._x, this._mc._y + 15, -8, 0, false);
var v6 = new com.homestarrunner.stinkoman.bullet.Bullet(v2, this._mc._x, this._mc._y + 15, 8, 0, false);
var v5 = new com.homestarrunner.stinkoman.bullet.Bullet(v2, this._mc._x, this._mc._y + 15, 8, 8, false);
var v4 = new com.homestarrunner.stinkoman.bullet.Bullet(v2, this._mc._x, this._mc._y + 15, -8, 8, false);
var v3 = new com.homestarrunner.stinkoman.bullet.Bullet(v2, this._mc._x, this._mc._y + 15, 0, 8, false);
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyDometant.prototype, null, 1);
}
#endinitclip
}
movieClip 2769 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyPlugman {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyPlugman) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v4 = this;
this.velX = 0;
this.velY = 0;
this.hitPoints = 5;
this.baseHitPoints = 2;
this._mc.mEnemy = this;
this.invincibleCounter = 0;
this.initHurtFlasher(this._mc.animator_mc.base_mc);
this.facingDir = 'left';
this.applyInitObjProperties(initObj);
this.applyFacingDir();
this.shootTimer = 20;
this.shootTop = false;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyPlugman = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyPlugman extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.takeDamage = function (x, y) {
if (this.invincibleCounter == 0) {
--this.baseHitPoints;
if (this.baseHitPoints == 0) {
this.destroyBase();
}
--this.hitPoints;
this.invincibleCounter = 24;
}
if (this.hitPoints == 0) {
this.die(x, y);
}
};
v2.die = function (x, y) {
var v2 = this;
delete this._mc.onEnterFrame;
this._mc.animator_mc.gotoAndPlay('die');
this.dead = true;
this.dontRespawn = true;
};
v2.update = function () {
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
if (this.baseHitPoints <= 0) {
--this.shootTimer;
if (this.shootTimer < 0) {
this.shoot();
}
}
if ((com.homestarrunner.stinkoman.StinkoGame.getPlayerGlobal()).x > this._mc._x + 10) {
this.facingDir = 'right';
} else {
this.facingDir = 'left';
}
this.applyFacingDir();
};
v2.collideTest = function (test_mc) {
if (this.baseHitPoints > 0) {
return this._mc.animator_mc.base_mc.hitTest(test_mc);
} else {
return this._mc.animator_mc.top_mc.hitTest(test_mc);
}
};
v2.hurtByPlayerTest = function (test_mc) {
if (this.baseHitPoints > 0) {
return this._mc.animator_mc.base_mc.hitTest(test_mc);
} else {
return this._mc.animator_mc.top_mc.hitTest(test_mc);
}
};
v2.playerDangerTest = function (test_mc) {
if (this.baseHitPoints > 0) {
return this._mc.animator_mc.base_mc.hitTest(test_mc);
} else {
return this._mc.animator_mc.top_mc.hitTest(test_mc);
}
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.facingDir = this.facingDir;
return v2;
};
v2.destroyBase = function () {
this._mc.animator_mc.gotoAndPlay('destroyBase');
this.invincibleCounter = 24;
this.shootTimer = 40;
};
v2.shoot = function () {
var v2 = new Object({'x': this._mc._x, 'y': this._mc._y - 58});
this._mc._parent.localToGlobal(v2);
com.homestarrunner.stinkoman.StinkoGame.bullet_mc.globalToLocal(v2);
var v3;
if (this.facingDir == 'right') {
v3 = 10;
v2.x += 0;
} else {
v3 = -10;
v2.x -= 25;
}
if (this.shootTop) {
this.shootTimer = 60;
v2.y += 2;
} else {
this.shootTimer = 20;
v2.y += 28;
}
this.shootTop = !this.shootTop;
var v4 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet10', v2.x, v2.y, v3, 0, false, 0, false);
this._mc.animator_mc.top_mc.gotoAndPlay('shoot');
};
v2.readyForSecondPhase = function () {
this.initHurtFlasher(this._mc.animator_mc.base_mc);
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyPlugman.prototype, null, 1);
}
#endinitclip
}
movieClip 2770 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyStothos {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyStothos) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v3 = this;
this._mc.animator_mc.stop();
this.maxVelY = 0;
this.maxVelX = -2;
this.velX = -2;
this.velY = 0;
this.hitPoints = 3;
this.invincibleCounter = 0;
this.initHurtFlasher(this._mc);
this._mc.mEnemy = this;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyStothos = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyStothos extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.takeDamage = function (x, y) {
if (this.invincibleCounter == 0) {
--this.hitPoints;
this.invincibleCounter = 24;
}
if (this.hitPoints == 0) {
this.die(x, y);
}
};
v2.updateDead = function () {
delete this._mc.onEnterFrame;
};
v2.update = function () {
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
if (this.velX == 0) {
this._mc.animator_mc.stop();
} else {
this._mc.animator_mc.play();
}
this._mc._x += this.velX;
if (com.homestarrunner.stinkoman.stageobject.Platform.hit(this._mc.hitTest_mc) == undefined) {
this.reverse();
}
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) != undefined) {
var v2 = 0;
while (v2 < 5) {
this._mc._x -= this.velX;
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) == undefined) {
v2 = 6;
}
++v2;
}
this.reverse();
}
};
v2.shoot = function (dir) {
var v2 = new Object({'x': this._mc._x, 'y': this._mc._y - 41});
this._mc._parent.localToGlobal(v2);
com.homestarrunner.stinkoman.StinkoGame.bullet_mc.globalToLocal(v2);
var v3;
if (dir == 'right') {
v3 = 10;
v2.x += 25;
} else {
v3 = -10;
v2.x -= 25;
}
var v4 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet12', v2.x, v2.y, v3, 0, false, 0, false);
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyStothos.prototype, null, 1);
}
#endinitclip
}
movieClip 2771 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyFullbide {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyFullbide) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v4 = this;
this.velX = 0;
this.velY = 0;
if (com.homestarrunner.stinkoman.editor.LevelEditor.editorActive) {
this._mc.stop();
}
this._mc.myEnemyFullbide = this;
this.vulnerable = false;
this.triggered = false;
if (!com.homestarrunner.stinkoman.editor.LevelEditor.isActive()) {
this._mc.triggerGuide_mc._visible = false;
}
if (initObj.facingDir == undefined) {
this.facingDir = 'left';
} else {
this.facingDir = initObj.facingDir;
}
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyFullbide = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyFullbide extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {
if (!this.triggered && com.homestarrunner.stinkoman.StinkoGame.player1._mc.hitTest(this._mc)) {
this.startFlyin();
} else {
this._mc._x += this.velX;
this._mc._y += this.velY;
if (this._mc._y > this.originalY) {
this.velY = -6;
}
var v2 = new Object({'x': this._mc._x, 'y': 0});
this._mc._parent.localToGlobal(v2);
if (v2.x < com.homestarrunner.stinkoman.StinkoGame.viewBox.l - 30 || v2.x > com.homestarrunner.stinkoman.StinkoGame.viewBox.r + 30) {
this.remove();
delete this._mc.onEnterFrame;
}
}
};
v2.startFlyin = function () {
this.triggered = true;
this.vulnerable = true;
this._mc.gotoAndPlay(this.facingDir);
if (this.facingDir == 'right') {
this.velX = 12;
} else {
this.velX = -10;
}
var v2 = new Object({'y': 0});
if (this.facingDir == 'right') {
v2.x = com.homestarrunner.stinkoman.StinkoGame.viewBox.l;
} else {
v2.x = com.homestarrunner.stinkoman.StinkoGame.viewBox.r + 10;
}
com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc.globalToLocal(v2);
this._mc._x = v2.x;
this.originalY = this._mc._y;
this._mc._y -= 120;
this.velY = 6;
};
v2.hurtByPlayerTest = function (test_mc) {
return this._mc.hitTest_mc.hitTest(test_mc);
};
v2.playerDangerTest = function (test_mc) {
return this._mc.hitTest_mc.hitTest(test_mc);
};
v2.getAdditonalAttributes = function () {
return new Object({'facingDir': this.facingDir});
};
v2.applyFacingDir = function () {};
v2.updateDead = function () {
--this.deadAnimateCounter;
if (this.deadAnimateCounter < 0) {
this.remove();
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyFullbide.prototype, null, 1);
}
#endinitclip
}
movieClip 2772 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyMybenj {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyMybenj) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v3 = this;
this._mc.animator_mc.stop();
this.maxVelY = 0;
this.maxVelX = 6;
this.velX = -6;
this.velY = 0;
this.pickNewDirection();
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyMybenj = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyMybenj extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.updateDead = function () {
delete this._mc.onEnterFrame;
};
v2.update = function () {
var v3 = (com.homestarrunner.stinkoman.StinkoGame.getGlobalCoord(this._mc)).x;
if (v3 > com.homestarrunner.stinkoman.StinkoGame.viewBox.r + 8 || v3 < com.homestarrunner.stinkoman.StinkoGame.viewBox.l - 3) {
return undefined;
}
if (this.velX == 0) {
this._mc.animator_mc.stop();
} else {
this._mc.animator_mc.play();
}
this._mc._x += this.velX;
if (com.homestarrunner.stinkoman.stageobject.Platform.hit(this._mc.hitTest_mc) == undefined) {
this.reverse();
this.resetReverseCounter();
return undefined;
}
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) != undefined || com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar.hit(this._mc) != undefined) {
var v2 = 0;
while (v2 < 5) {
this._mc._x -= this.velX;
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) == undefined && com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar.hit(this._mc) == undefined) {
v2 = 6;
}
++v2;
}
this.resetReverseCounter();
this.reverse();
}
--this.reverseCounter;
if (this.reverseCounter < 0) {
this.pickNewDirection();
}
};
v2.pickNewDirection = function () {
this.resetReverseCounter();
this.reverse();
};
v2.resetReverseCounter = function () {
this.reverseCounter = Math.floor(Math.random() * 12) + 9;
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyMybenj.prototype, null, 1);
}
#endinitclip
}
movieClip 2773 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyShooter {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyShooter) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v4 = this;
if (initObj.velX == undefined || isNaN(initObj.velX)) {
this.velX = 0;
} else {
this.velX = Number(initObj.velX);
}
if (initObj.velY == undefined || isNaN(initObj.velY)) {
this.velY = 0;
} else {
this.velY = Number(initObj.velY);
}
if (com.homestarrunner.stinkoman.editor.LevelEditor.editorActive) {
this._mc.stop();
this._mc.animator_mc.stop();
}
this.initHurtFlasher(this._mc);
this.invincibleCounter = 0;
switch (this.subType) {
case 29:
this.hitPoints = 3;
break;
case 30:
this.hitPoints = 2;
break;
case 31:
this.hitPoints = 3;
break;
case 32:
this.hitPoints = 1;
break;
case 33:
this.hitPoints = 2;
break;
default:
this.hitPoints = 1;
}
this.dontRespawn = true;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyShooter = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyShooter extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {
this._mc._x += this.velX;
this._mc._y += this.velY;
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.velX = this.velX;
v2.velY = this.velY;
return v2;
};
v2.updateDead = function () {
delete this._mc.onEnterFrame;
};
v2.takeDamage = function (x, y) {
if (this.invincibleCounter < 1) {
--this.hitPoints;
this.invincibleCounter = 6;
}
if (this.hitPoints <= 0) {
this.die();
this.clearHurtFlasher();
}
};
v2.die = function (x, y) {
this.dontRespawn = true;
delete this._mc.onEnterFrame;
this._mc.stop();
switch (this.subType) {
case 34:
this._mc.gotoAndPlay('die');
break;
case 35:
this._mc.gotoAndPlay('die');
default:
this._mc.animator_mc.gotoAndPlay('die');
}
this.dead = true;
this.velX = 0;
this.velY = 0;
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyShooter.prototype, null, 1);
}
#endinitclip
}
movieClip 2774 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyShark {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyShark) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.waitToLaunchCounter = 0;
this.launching = false;
this.velX = -5;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyShark = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyShark extends com.homestarrunner.stinkoman.stageobject.enemy.EnemyShooter;
var v2 = v1.prototype;
v2.update = function () {
var v2 = new Object({'x': com.homestarrunner.stinkoman.StinkoGame.viewBox.r - 90, 'y': com.homestarrunner.stinkoman.StinkoGame.viewBox.t + (com.homestarrunner.stinkoman.StinkoGame.viewBox.b - com.homestarrunner.stinkoman.StinkoGame.viewBox.t) / 2});
this._mc._parent.globalToLocal(v2);
if (!this.launching) {
this._mc._x += this.velX;
this._mc._y += this.velY;
if (this._mc._x < v2.x) {
this.waitToLaunchCounter = 10;
this.launching = true;
}
} else {
if (this.waitToLaunchCounter > 0) {
--this.waitToLaunchCounter;
this._mc._x += 1;
} else {
this._mc._x += this.velX;
this._mc._y += this.velY;
this.velX -= 2;
}
}
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
};
v2.shoot = function () {
var v2 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet16', this._mc._x - 5, this._mc._y, -6, -5, false, 0.8);
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyShark.prototype, null, 1);
}
#endinitclip
}
movieClip 2775 __Packages.com.homestarrunner.stinkoman.gamemode.ShootingGame {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.gamemode) {
_global.com.homestarrunner.stinkoman.gamemode = new Object();
}
if (!_global.com.homestarrunner.stinkoman.gamemode.ShootingGame) {
var v1 = function (p_mc, pld, viewBox_mc) {
super(p_mc, pld, viewBox_mc);
com.homestarrunner.stinkoman.gamemode.ShootingGame.scrollMoveCounter = 0;
com.homestarrunner.stinkoman.gamemode.ShootingGame.setNewAutoscroll(20, 0);
};
com.homestarrunner.stinkoman.gamemode.ShootingGame = v1;
com.homestarrunner.stinkoman.gamemode.ShootingGame extends com.homestarrunner.stinkoman.StinkoGame;
var v2 = v1.prototype;
v1.nudge = function (x, y) {
com.homestarrunner.stinkoman.StinkoGame.activeStageCounterX += x;
com.homestarrunner.stinkoman.StinkoGame.activeStageCounterY += y;
if (x != 0) {
if (com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._x + x > com.homestarrunner.stinkoman.StinkoGame.originX) {
return false;
}
}
if (y != 0) {
if (com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._y + y < com.homestarrunner.stinkoman.StinkoGame.originY) {
return false;
}
}
com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._x += x;
com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._y += y;
com.homestarrunner.stinkoman.StinkoGame.bossMan._mc._y += y;
com.homestarrunner.stinkoman.StinkoGame._mc.bullet_mc._x = com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._x;
com.homestarrunner.stinkoman.StinkoGame._mc.bullet_mc._y = com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._y;
var v3;
++com.homestarrunner.stinkoman.gamemode.ShootingGame.scrollMoveCounter;
if (com.homestarrunner.stinkoman.gamemode.ShootingGame.scrollMoveCounter == 4) {
com.homestarrunner.stinkoman.gamemode.ShootingGame.scrollMoveCounter = 0;
}
if (x != 0) {
if (Math.abs(x / 2) < 1) {
if (com.homestarrunner.stinkoman.gamemode.ShootingGame.scrollMoveCounter % 2 == 0) {
com.homestarrunner.stinkoman.StinkoGame.sScrollB.nudge(Math.abs(x) / x, 0);
}
} else {
com.homestarrunner.stinkoman.StinkoGame.sScrollB.nudge(x / 2, 0);
}
if (Math.abs(x / 4) < 1) {
if (com.homestarrunner.stinkoman.gamemode.ShootingGame.scrollMoveCounter % 4 == 0) {
com.homestarrunner.stinkoman.StinkoGame.sScrollA.nudge(Math.abs(x) / x, 0);
}
} else {
com.homestarrunner.stinkoman.StinkoGame.sScrollA.nudge(x / 4, 0);
}
}
if (Math.floor(Math.abs(com.homestarrunner.stinkoman.StinkoGame.activeStageCounterX) / 10) > 1 || Math.floor(Math.abs(com.homestarrunner.stinkoman.StinkoGame.activeStageCounterY) / 10) > 1) {
com.homestarrunner.stinkoman.gamemode.ShootingGame.drawActiveStage();
com.homestarrunner.stinkoman.StinkoGame.activeStageCounterX = 0;
com.homestarrunner.stinkoman.StinkoGame.activeStageCounterY = 0;
}
return true;
};
v1.drawActiveStage = function (force) {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.StinkoGame.ld.stageObjSource.length) {
var v1 = com.homestarrunner.stinkoman.StinkoGame.ld.stageObjSource[v2];
if (!v1.__get__active()) {
if (com.homestarrunner.stinkoman.StinkoGame.isWithinActiveStage(v1.x, v1.y, 200, 200)) {
if (v1.canSpawn) {
v1.assignedObject = com.homestarrunner.stinkoman.StinkoGame.ld.addStageObject(v1.classType, v1.subType, v1.x, v1.y, v1.depth, v1.propObj);
v1.__set__active(true);
v1.canSpawn = false;
}
}
} else {
if (!com.homestarrunner.stinkoman.StinkoGame.isWithinActiveStage(v1.assignedObject._mc._x, v1.assignedObject._mc._y, 200, 200)) {
v1.assignedObject.kill();
v1.assignedObject = undefined;
v1.__set__active(false);
v1.canSpawn = false;
}
}
++v2;
}
};
v1.setNewAutoscroll = function (x, y) {
com.homestarrunner.stinkoman.StinkoGame.player1.autoScrollSpeed.x = x;
com.homestarrunner.stinkoman.StinkoGame.player1.autoScrollSpeed.y = y;
};
ASSetPropFlags(com.homestarrunner.stinkoman.gamemode.ShootingGame.prototype, null, 1);
}
#endinitclip
}
movieClip 2776 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyJellyfish {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyJellyfish) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.sliding = false;
this._mc.mJellyfish = this;
if (this.velY != 0) {
this.xtoyRatio = -3 / this.velY;
} else {
this.xtoyRatio = 0;
}
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyJellyfish = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyJellyfish extends com.homestarrunner.stinkoman.stageobject.enemy.EnemyShooter;
var v2 = v1.prototype;
v2.setSliding = function (val) {
this.sliding = val;
if (this.sliding) {
this.velX = -3;
}
};
v2.update = function () {
if (!this.sliding) {
if (this.velX > 0.1 || this.velX < -0.1) {
this.velX *= 0.4;
} else {
this.velX = 0;
}
}
this._mc._x += this.velX;
if (this.velX != 0) {
this._mc._y += this.velX * this.xtoyRatio;
}
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyJellyfish.prototype, null, 1);
}
#endinitclip
}
movieClip 2777 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyClam {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyClam) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.isOpen = false;
this._mc.mClam = this;
this.hitPoints = 1;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyClam = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyClam extends com.homestarrunner.stinkoman.stageobject.enemy.EnemyShooter;
var v2 = v1.prototype;
v2.openClam = function () {
this.isOpen = true;
this.vulnerable = this.isOpen;
};
v2.closeClam = function () {
this.isOpen = false;
this.vulnerable = this.isOpen;
};
v2.update = function () {
if (!this.isOpen) {
this._mc._x += this.velX;
this._mc._y += this.velY;
}
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
};
v2.shoot = function () {
var v2 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet16', this._mc._x - 5, this._mc._y, -6, -5, false, 0.8);
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyClam.prototype, null, 1);
}
#endinitclip
}
movieClip 2778 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyManta {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyManta) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v3 = this;
this.velX = 0;
this.velY = 0;
this.hitPoints = 3;
this._mc.mEnemy = this;
this.invincibleCounter = 0;
this.initHurtFlasher(this._mc.animator_mc.base_mc);
this.entranceFinished = false;
this.applyInitObjProperties(initObj);
this.applyFacingDir();
this.shootTimer = 20;
this.giveUpCounter = 400;
this.swingUp = true;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyManta = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyManta extends com.homestarrunner.stinkoman.stageobject.enemy.EnemyShooter;
var v2 = v1.prototype;
v2.takeDamage = function (x, y) {
if (this.invincibleCounter == 0) {
--this.hitPoints;
this.invincibleCounter = 18;
}
if (this.hitPoints == 0) {
this.die(x, y);
}
};
v2.update = function () {
if (!this.entranceFinished) {
var v2 = new Object({'x': com.homestarrunner.stinkoman.StinkoGame.viewBox.r - 60, 'y': com.homestarrunner.stinkoman.StinkoGame.viewBox.t + (com.homestarrunner.stinkoman.StinkoGame.viewBox.b - com.homestarrunner.stinkoman.StinkoGame.viewBox.t) / 2});
this._mc._x += com.homestarrunner.stinkoman.StinkoGame.player1.autoScrollSpeed.x / 10;
this._mc._parent.globalToLocal(v2);
this._mc._x -= (this._mc._x - v2.x) / 4;
this._mc._y -= (this._mc._y - v2.y) / 4;
if (Math.abs(this._mc._x - v2.x) < 10 && Math.abs(this._mc._y - v2.y) < 10) {
this.entranceFinished = true;
}
} else {
if (this.giveUpCounter < 1) {
this._mc._x -= 3 * com.homestarrunner.stinkoman.StinkoGame.player1.autoScrollSpeed.x / 10;
this._mc._y -= com.homestarrunner.stinkoman.StinkoGame.player1.autoScrollSpeed.y / 10;
} else {
this._mc._x += com.homestarrunner.stinkoman.StinkoGame.player1.autoScrollSpeed.x / 10;
this._mc._y -= com.homestarrunner.stinkoman.StinkoGame.player1.autoScrollSpeed.y / 10;
--this.giveUpCounter;
--this.shootTimer;
if (this.shootTimer < 0) {
this.shoot();
}
if (this.swingUp) {
var v2 = new Object({'x': 0, 'y': com.homestarrunner.stinkoman.StinkoGame.viewBox.t + 80});
} else {
var v2 = new Object({'x': 0, 'y': com.homestarrunner.stinkoman.StinkoGame.viewBox.b - 80});
}
this._mc._parent.globalToLocal(v2);
this._mc._y -= (this._mc._y - v2.y) / 10;
if (Math.abs(this._mc._y - v2.y) < 2) {
this.swingUp = !this.swingUp;
}
}
}
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
};
v2.getAdditonalAttributes = function () {
var v1 = new Object();
return v1;
};
v2.shoot = function () {
var v3 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet18', this._mc._x - 38, this._mc._y - 20, -20, 0, false, 0, false);
var v2 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet18', this._mc._x - 38, this._mc._y + 20, -20, 0, false, 0, false);
this.shootTimer = 16;
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyManta.prototype, null, 1);
}
#endinitclip
}
movieClip 2779 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyVolcano {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyVolcano) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this._mc.mEnemy = this;
this.vulnerable = false;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyVolcano = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyVolcano extends com.homestarrunner.stinkoman.stageobject.enemy.EnemyShooter;
var v2 = v1.prototype;
v2.update = function () {};
v2.hurtByPlayerTest = function (test_mc) {
return undefined;
};
v2.playerDangerTest = function (test_mc) {
return this._mc.hurtTest_mc.hitTest(test_mc) || this._mc.animator_mc.rock1.hitTest(test_mc) || this._mc.animator_mc.rock2.hitTest(test_mc);
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyVolcano.prototype, null, 1);
}
#endinitclip
}
movieClip 2780 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyThorn {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyThorn) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
if (com.homestarrunner.stinkoman.editor.LevelEditor.editorActive) {
this._mc.animator_mc.gotoAndStop(30);
}
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyThorn = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyThorn extends com.homestarrunner.stinkoman.stageobject.enemy.EnemyShooter;
var v2 = v1.prototype;
v2.update = function () {};
v2.hurtByPlayerTest = function (test_mc) {
return undefined;
};
v2.playerDangerTest = function (test_mc) {
return this._mc.animator_mc.hurtTest_mc.hitTest(test_mc);
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyThorn.prototype, null, 1);
}
#endinitclip
}
movieClip 2781 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyCoral {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyCoral) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyCoral = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyCoral extends com.homestarrunner.stinkoman.stageobject.enemy.EnemyShooter;
var v2 = v1.prototype;
v2.takeDamage = function (x, y) {
this._mc.gotoAndPlay('hit');
};
v2.hurtByPlayerTest = function (test_mc) {
return this._mc.hitTest_mc.hitTest(test_mc);
};
v2.playerDangerTest = function (test_mc) {
return this._mc.hitTest_mc.hitTest(test_mc);
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyCoral.prototype, null, 1);
}
#endinitclip
}
movieClip 2782 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbot {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbot) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
this.facingDir = 'left';
var v4 = this;
this._mc.animator_mc.stop();
this.initHurtFlasher(this._mc);
this.maxVelY = 0;
this.maxVelX = -1.5;
this.velX = -1.5;
this.velY = 0;
this.applyInitObjProperties(initObj);
this.applyFacingDir();
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbot = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbot extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.takeDamage = function (x, y) {
if (this.invincibleCounter == 0) {
--this.hitPoints;
this.invincibleCounter = 24;
}
if (this.hitPoints == 0) {
this.die(x, y);
}
};
v2.update = function () {
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
if (this.velX == 0) {
this._mc.animator_mc.stop();
} else {
this._mc.animator_mc.play();
}
this._mc._x += this.velX;
if (com.homestarrunner.stinkoman.stageobject.Platform.hit(this._mc.hitTest_mc) == undefined) {
this.reverse();
}
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) != undefined) {
var v2 = 0;
while (v2 < 5) {
this._mc._x -= this.velX;
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) == undefined) {
v2 = 6;
}
++v2;
}
this.reverse();
}
};
v2.playerDangerTest = function (test_mc) {
return this._mc.hurtTest_mc.hitTest(test_mc);
};
v2.invincibleCounter = 0;
v2.invincibleTime = 24;
v2.hitPoints = 1;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbot.prototype, null, 1);
}
#endinitclip
}
movieClip 2783 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotGunFace {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotGunFace) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
this.facingDir = 'left';
var v4 = this;
this._mc.mEnemySkullbotGunFace = this;
this._mc.animator_mc.stop();
this.initHurtFlasher(this._mc);
this.maxVelY = 0;
this.maxVelX = -2;
this.velX = -2;
this.velY = 0;
this.applyInitObjProperties(initObj);
this.applyFacingDir();
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotGunFace = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotGunFace extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.createBullet = function () {
var v2 = 8;
var v3 = 20;
var v5 = 24;
if (this.facingDir == 'left') {
var v4 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet21', this._mc._x - 17, this._mc._y - 37, -v2, 0, false);
v4.sineAmt = v3;
v4.sinePeriod = v5;
} else {
var v4 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet21', this._mc._x + 17, this._mc._y - 37, v2, 0, false);
v4.sineAmt = v3;
v4.sinePeriod = v5;
}
};
v2.takeDamage = function (x, y) {
if (this.invincibleCounter == 0) {
--this.hitPoints;
this.invincibleCounter = 24;
}
if (this.hitPoints == 0) {
this.die(x, y);
}
};
v2.update = function () {
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
if (this.shootCount > 0) {
--this.shootCount;
if (this.shootCount <= 0) {
this.walkCount = this.walkTime;
if (this.facingDir == 'left') {
this._mc.gotoAndStop('left');
} else {
this._mc.gotoAndStop('right');
}
}
} else {
--this.walkCount;
this._mc._x += this.velX;
if (com.homestarrunner.stinkoman.stageobject.Platform.hit(this._mc.hitTest_mc) == undefined) {
this.reverse();
}
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) != undefined) {
var v2 = 0;
while (v2 < 5) {
this._mc._x -= this.velX;
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) == undefined) {
v2 = 6;
}
++v2;
}
this.reverse();
}
if (this.walkCount <= 0) {
this.shootCount = this.shootTime;
if (this.facingDir == 'left') {
this._mc.gotoAndStop('leftShoot');
} else {
this._mc.gotoAndStop('rightShoot');
}
}
}
};
v2.playerDangerTest = function (test_mc) {
return this._mc.hurtTest_mc.hitTest(test_mc);
};
v2.shootCount = 0;
v2.singleBulletTime = 4;
v2.shootTime = 3 * com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotGunFace.prototype.singleBulletTime - 1;
v2.walkCount = 0;
v2.walkTime = 50;
v2.invincibleCounter = 0;
v2.invincibleTime = 24;
v2.hitPoints = 3;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotGunFace.prototype, null, 1);
}
#endinitclip
}
movieClip 2784 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotGunFloat {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotGunFloat) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
this.facingDir = 'left';
var v4 = this;
this._mc.mEnemySkullbotGunFloat = this;
this._mc.animator_mc.stop();
this.initHurtFlasher(this._mc);
this.maxVelY = 0;
this.maxVelX = 2;
this.velX = -2;
this.velY = 0;
this.lRange = x;
this.rRange = 100;
this.facingDir = 'left';
this.applyInitObjProperties(initObj);
this.applyFacingDir();
if (!com.homestarrunner.stinkoman.editor.LevelEditor.isActive()) {
this._mc.rangeGuide_mc._visible = false;
}
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotGunFloat = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotGunFloat extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.createBullet = function () {
var v2 = 8;
var v3 = 20;
var v5 = 24;
if (this.facingDir == 'left') {
var v4 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet21', this._mc._x - 17, this._mc._y - 37, -v2, 0, false);
v4.sineAmt = v3;
v4.sinePeriod = v5;
} else {
var v4 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet21', this._mc._x + 17, this._mc._y - 37, v2, 0, false);
v4.sineAmt = v3;
v4.sinePeriod = v5;
}
};
v2.takeDamage = function (x, y) {
if (this.invincibleCounter == 0) {
--this.hitPoints;
this.invincibleCounter = 24;
}
if (this.hitPoints == 0) {
this.die(x, y);
}
};
v2.update = function () {
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
if (this.shootCount > 0) {
--this.shootCount;
if (this.shootCount <= 0) {
this.walkCount = this.walkTime;
if (this.facingDir == 'left') {
this._mc.gotoAndStop('left');
} else {
this._mc.gotoAndStop('right');
}
}
} else {
--this.walkCount;
this._mc._x += this.velX;
if (this.velX > 0 && this._mc._x >= this.lRange + this.rRange) {
this.reverse();
}
if (this.velX < 0 && this._mc._x <= this.lRange) {
this.reverse();
}
if (this.velX >= this.maxVelX) {
this.velX = this.maxVelX;
}
if (this.velX <= -this.maxVelX) {
this.velX = -this.maxVelX;
}
if (this.walkCount <= 0) {
this.shootCount = this.shootTime;
if (this.facingDir == 'left') {
this._mc.gotoAndStop('leftShoot');
} else {
this._mc.gotoAndStop('rightShoot');
}
}
}
};
v2.moveRangeGuideTo = function (newVal) {
if (newVal < this._mc.x) {
newVal = this._mc.x;
}
this.rRange = newVal;
this._mc.rangeGuide_mc._x = this.rRange;
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.rRange = this.rRange;
v2.maxVelX = this.maxVelX;
return v2;
};
v2.playerDangerTest = function (test_mc) {
return this._mc.hurtTest_mc.hitTest(test_mc);
};
v2.shootCount = 0;
v2.singleBulletTime = 4;
v2.shootTime = 3 * com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotGunFloat.prototype.singleBulletTime - 1;
v2.walkCount = 0;
v2.walkTime = 50;
v2.invincibleCounter = 0;
v2.invincibleTime = 24;
v2.hitPoints = 3;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotGunFloat.prototype, null, 1);
}
#endinitclip
}
movieClip 2785 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotHeadTrap {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotHeadTrap) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v3 = this;
this._mc.mSkullbotHeadTrap = this;
this.facingDir = 'left';
this.initHurtFlasher(this._mc);
this.applyInitObjProperties(initObj);
this.applyFacingDir();
this.vulnerable = false;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotHeadTrap = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotHeadTrap extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
var v2 = com.homestarrunner.stinkoman.bullet.BulletFriendly.anyDeflect(this._mc);
if (v2 != undefined) {
v2.deflect();
}
};
v2.takeDamage = function (x, y) {
if (this.invincibleCounter == 0) {
--this.hitPoints;
this.invincibleCounter = this.invincibleTime;
}
if (this.hitPoints == 0) {
this.die(x, y);
}
};
v2.hurtByPlayerTest = function (test_mc) {
return this._mc.animator_mc.head_mc.hitTest(test_mc) || this._mc.animator_mc.sleephead_mc.hitTest(test_mc);
};
v2.updateDead = function () {
delete this._mc.onEnterFrame;
};
v2.accel = 0.5;
v2.invincibleCounter = 0;
v2.invincibleTime = 24;
v2.hitPoints = 3;
v2.gravity = 2;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullbotHeadTrap.prototype, null, 1);
}
#endinitclip
}
movieClip 2786 __Packages.com.homestarrunner.stinkoman.bullet.BulletFriendly {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.bullet) {
_global.com.homestarrunner.stinkoman.bullet = new Object();
}
if (!_global.com.homestarrunner.stinkoman.bullet.BulletFriendly) {
var v1 = function (symbolName, start_x, start_y, pxVel, pyVel, pGrav) {
super(symbolName, start_x, start_y, pxVel, pyVel, true, pGrav);
++com.homestarrunner.stinkoman.bullet.BulletFriendly.onScreenCounter;
if (com.homestarrunner.stinkoman.bullet.BulletFriendly.onScreenCounter > com.homestarrunner.stinkoman.struct.GlobalData.getMaxBulletsOnScreen()) {
this.kill();
}
this.startingY = start_y;
if (com.homestarrunner.stinkoman.bullet.BulletFriendly.shootSound == undefined) {
com.homestarrunner.stinkoman.bullet.BulletFriendly.shootSound = new Sound(_root);
com.homestarrunner.stinkoman.bullet.BulletFriendly.shootSound.attachSound('stinko_maybeshoot.wav');
}
com.homestarrunner.stinkoman.bullet.BulletFriendly.shootSound.start();
};
com.homestarrunner.stinkoman.bullet.BulletFriendly = v1;
com.homestarrunner.stinkoman.bullet.BulletFriendly extends com.homestarrunner.stinkoman.bullet.Bullet;
var v2 = v1.prototype;
v2.subClassUpdate = function () {
if (this._mc._y > this.startingY + 20) {
this.kill();
}
};
v1.anyDeflect = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.bullet.Bullet.bulletArray.length) {
if (com.homestarrunner.stinkoman.bullet.Bullet.bulletArray[v1].friendly && com.homestarrunner.stinkoman.bullet.Bullet.bulletArray[v1].active && com.homestarrunner.stinkoman.bullet.Bullet.bulletArray[v1]._mc.hitTest(test_mc)) {
return com.homestarrunner.stinkoman.bullet.Bullet.bulletArray[v1];
}
++v1;
}
return undefined;
};
v2.testForHits = function () {
var v3 = com.homestarrunner.stinkoman.stageobject.enemy.Enemy.anyHurtByPlayerTest(this._mc);
var v4;
var v2 = 0;
while (v2 < v3.length) {
if (this.xVel > 0) {
v4 = 1;
} else {
v4 = -1;
}
++v2;
}
if (v3.length > 0) {
v2 = 0;
while (v2 < v3.length) {
if (v3[v2].vulnerable) {
v3[v2].takeDamage(v4, -1);
this.avalancheMakeHomestarHappy();
this.kill();
} else {
this.deflect();
}
++v2;
}
}
if (com.homestarrunner.stinkoman.struct.GlobalData.bossLevel()) {
if (com.homestarrunner.stinkoman.StinkoGame.bossMan.hurtByPlayerTest(this._mc)) {
com.homestarrunner.stinkoman.StinkoGame.bossMan.takeDamage(0, 0);
this.kill();
}
}
};
v2.avalancheMakeHomestarHappy = function () {};
v2.kill = function () {
this.clearFromObjectsArray();
--com.homestarrunner.stinkoman.bullet.BulletFriendly.onScreenCounter;
this._mc.removeMovieClip();
false;
};
v1.onScreenCounter = 0;
ASSetPropFlags(com.homestarrunner.stinkoman.bullet.BulletFriendly.prototype, null, 1);
}
#endinitclip
}
movieClip 2787 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullStack {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullStack) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v4 = this;
this._mc.mEnemySkullStack = this;
this.initHurtFlasher(this._mc);
this.applyInitObjProperties(initObj);
this.applyFacingDir();
this.velX = -3;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullStack = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullStack extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.hop = function () {
this.movingCount = this.movingTime;
};
v2.update = function () {
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
if (this.movingCount > 0) {
--this.movingCount;
this._mc._x += this.velX;
if (this.movingCount == 0) {
if (com.homestarrunner.stinkoman.stageobject.Platform.hit(this._mc.hitTest_mc) == undefined) {
this._mc._x -= this.velX;
this.reverse();
}
}
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) != undefined) {
var v2 = 0;
while (v2 < 5) {
this._mc._x -= this.velX;
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) == undefined) {
v2 = 6;
}
++v2;
}
this.reverse();
}
}
};
v2.takeDamage = function (x, y) {
if (this.invincibleCounter == 0) {
var v3 = 0;
var v2 = false;
--this.hitPoints;
switch (this.hitPoints) {
case 4:
this._mc.animator_mc.skull1_mc._visible = false;
v3 = this._mc.animator_mc.skull1_mc._y;
v2 = true;
break;
case 3:
this._mc.animator_mc.skull2_mc._visible = false;
v3 = this._mc.animator_mc.skull2_mc._y;
v2 = true;
break;
case 2:
this._mc.animator_mc.skull3_mc._visible = false;
v3 = this._mc.animator_mc.skull3_mc._y;
v2 = true;
break;
case 1:
this._mc.animator_mc.skull4_mc._visible = false;
v3 = this._mc.animator_mc.skull4_mc._y;
v2 = true;
}
this.invincibleCounter = this.invincibleTime;
if (v2) {
var v4 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet22', this._mc._x, this._mc._y + this._mc.animator_mc._y + v3, 5 * (Math.random() - 0.5), 0, false);
}
if (this.hitPoints == 0) {
this.die(x, y);
}
}
};
v2.playerDangerTest = function (test_mc) {
var v2 = 1;
while (v2 <= 5) {
var v3 = this._mc.animator_mc['skull' + v2 + '_mc'];
if (v3._visible && v3.hitTest(test_mc)) {
return true;
}
++v2;
}
return false;
};
v2.invincibleCounter = 0;
v2.invincibleTime = 24;
v2.movingCount = 0;
v2.movingTime = 7;
v2.hitPoints = 5;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemySkullStack.prototype, null, 1);
}
#endinitclip
}
movieClip 2788 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemySkull {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemySkull) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v4 = this;
this._mc.mEnemySkull = this;
this.maxVelY = 16;
this.maxVelX = 8;
this.velY = 0;
this.velX = -5;
this.applyInitObjProperties(initObj);
this.applyFacingDir();
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemySkull = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemySkull extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.jump = function () {
this.velY = -this.jumpSpeed;
if (this.facingDir == 'left') {
this.velX = -5;
} else {
this.velX = 5;
}
this.midair = true;
};
v2.update = function () {
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) != undefined || com.homestarrunner.stinkoman.stageobject.Wall.hit(this._mc) != undefined) {
var v2 = 0;
while (v2 < 5) {
this._mc._x -= this.velX;
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) == undefined && com.homestarrunner.stinkoman.stageobject.Wall.hit(this._mc) == undefined) {
v2 = 6;
}
++v2;
}
this.reverse();
}
if (this.midair) {
this._mc._x += this.velX;
this._mc._y += this.velY;
this.velY += this.gravity;
if (this.velY > this.maxVelY) {
this.velY = this.maxVelY;
}
var v3 = com.homestarrunner.stinkoman.stageobject.Platform.hit(this._mc.hitTest_mc);
if (v3 != undefined) {
this._mc._y = v3._y;
this.velY = 0;
this.midair = false;
}
} else {
this.jump();
}
};
v2.jumpSpeed = 16;
v2.gravity = 4;
v2.midair = false;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemySkull.prototype, null, 1);
}
#endinitclip
}
movieClip 2789 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyFatSkullbot {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyFatSkullbot) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v3 = this;
this._mc.mEnemyFatSkullbot = this;
this.hitPoints = 4;
this.invincibleCounter = 0;
this.initHurtFlasher(this._mc);
this.facingDir = 'left';
this.applyInitObjProperties(initObj);
this.applyFacingDir();
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyFatSkullbot = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyFatSkullbot extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.takeDamage = function (x, y) {
if (this.invincibleCounter == 0) {
--this.hitPoints;
this.invincibleCounter = 24;
}
if (this.hitPoints == 0) {
this.die(x, y);
}
};
v2.spawnEnemy = function () {
var v3 = this._mc.animator_mc.spawn_position_mc;
var v2 = 1;
if (this.facingDir == 'right') {
v2 = -1;
}
this.childSkull = com.homestarrunner.stinkoman.StinkoGame.ld.addStageObject('Enemy', 47, this._mc._x + this._mc.animator_mc._x + v2 * this._mc.animator_mc.spawn_position_mc._x, this._mc._y + this._mc.animator_mc._y + this._mc.animator_mc.spawn_position_mc._y, undefined);
this.childSkull.facingDir = this.facingDir;
this.childSkull.applyFacingDir();
this.childSkull.jump();
};
v2.die = function (x, y) {
var v2 = this;
delete this._mc.onEnterFrame;
this._mc.animator_mc.gotoAndPlay('die');
this.dead = true;
this.dontRespawn = true;
};
v2.update = function () {
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
if ((this.childSkull == null || this.childSkull.dead) && !this.spitting) {
this._mc.animator_mc.gotoAndPlay('spit');
this.spitting = true;
}
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.facingDir = this.facingDir;
return v2;
};
v2.childSkull = null;
v2.spitting = false;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyFatSkullbot.prototype, null, 1);
}
#endinitclip
}
movieClip 2790 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyPrancer {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyPrancer) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v4 = this;
this.facingDir = 'left';
this.initHurtFlasher(this._mc);
this.applyInitObjProperties(initObj);
this.applyFacingDir();
this.maxVelY = 8;
this.maxVelX = 10;
if (this.facingDir == 'left') {
this.velX = -this.maxVelX;
} else {
this.velX = this.maxVelX;
}
this.velY = 0;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyPrancer = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyPrancer extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
var v4 = com.homestarrunner.stinkoman.stageobject.Platform.hit(this._mc.hitTestWalk_mc);
var v2 = false;
if (v4 != undefined) {
v2 = true;
this._mc._y = v4._y;
this.velY = 0;
} else {
this.velY += this.gravity;
if (this.velY > this.maxVelY) {
this.velY = this.maxVelY;
}
}
if (v2) {
var v3 = com.homestarrunner.stinkoman.StinkoGame.getPlayerGlobal();
if (this._mc._x < v3.x - this.turnAroundSpacing) {
this.accelRight();
} else {
if (this._mc._x > v3.x + this.turnAroundSpacing) {
this.accelLeft();
} else {
if (this.velX < 0) {
this.accelLeft();
} else {
this.accelRight();
}
}
}
}
this._mc._x += this.velX;
this._mc._y += this.velY;
};
v2.accelLeft = function () {
this.velX -= this.accel;
if (this.velX < -this.maxVelX) {
this.velX = -this.maxVelX;
}
this.facingDir = 'left';
this.applyFacingDir();
};
v2.accelRight = function () {
this.velX += this.accel;
if (this.velX > this.maxVelX) {
this.velX = this.maxVelX;
}
this.facingDir = 'right';
this.applyFacingDir();
};
v2.takeDamage = function (x, y) {
if (this.invincibleCounter == 0) {
--this.hitPoints;
this.invincibleCounter = this.invincibleTime;
}
if (this.hitPoints == 0) {
this.die(x, y);
}
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.facingDir = this.facingDir;
return v2;
};
v2.playerDangerTest = function (test_mc) {
return this._mc.hurtTest_mc.hitTest(test_mc);
};
v2.updateDead = function () {
delete this._mc.onEnterFrame;
};
v2.accel = 0.4;
v2.invincibleCounter = 0;
v2.invincibleTime = 24;
v2.hitPoints = 5;
v2.gravity = 2;
v2.turnAroundSpacing = 40;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyPrancer.prototype, null, 1);
}
#endinitclip
}
movieClip 2791 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyPodSpawn {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyPodSpawn) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v4 = this;
this._mc.mEnemyPodSpawn = this;
this.facingDir = 'left';
this.hitPoints = 4;
this.invincibleCounter = 0;
this.initHurtFlasher(this._mc);
this.applyInitObjProperties(initObj);
this.applyFacingDir();
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyPodSpawn = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyPodSpawn extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.takeDamage = function (x, y) {
if (this.invincibleCounter == 0) {
--this.hitPoints;
this.invincibleCounter = 24;
}
if (this.hitPoints == 0) {
this.die(x, y);
}
};
v2.spawnEnemy = function () {
this.childPod = com.homestarrunner.stinkoman.StinkoGame.ld.addStageObject('Enemy', 51, this._mc._x + this._mc.animator_mc._x, this._mc._y + this._mc.animator_mc._y, undefined);
this.childPod.facingDir = this.facingDir;
this.childPod.applyFacingDir();
};
v2.applyFacingDir = function () {
super.applyFacingDir();
trace('applying the facing dir? Facing dir = ' + this.facingDir);
};
v2.die = function (x, y) {
var v2 = this;
delete this._mc.onEnterFrame;
this._mc.gotoAndPlay('dieRight');
this.dead = true;
this.dontRespawn = true;
};
v2.hurtByPlayerTest = function (test_mc) {
return this._mc.hurtTest_mc.hitTest(test_mc);
};
v2.update = function () {
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
if ((this.childPod == null || this.childPod.dead) && !this.spitting) {
this._mc.animator_mc.gotoAndPlay('spit');
this.spitting = true;
}
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.facingDir = this.facingDir;
return v2;
};
v2.childPod = null;
v2.spitting = false;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyPodSpawn.prototype, null, 1);
}
#endinitclip
}
movieClip 2792 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyPod {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyPod) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v3 = this;
this._mc.mEnemyPod = this;
this.facingDir = 'left';
this.velY = 0;
this.velX = 5;
this.maxVelX = 15;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyPod = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyPod extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {
if (this.moving) {
if (this.facingDir == 'left') {
this._mc._x -= this.velX;
} else {
this._mc._x += this.velX;
}
this.velX += 0.5;
if (this.velX > this.maxVelX) {
this.velX = this.maxVelX;
}
}
};
v2.die = function (x, y) {
var v2 = this;
delete this._mc.onEnterFrame;
this._mc.gotoAndPlay('dieRight');
this.dead = true;
this.dontRespawn = true;
this.velX = 0;
this.velY = 0;
};
v2.moving = false;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyPod.prototype, null, 1);
}
#endinitclip
}
movieClip 2793 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyZSabreSilhouette {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyZSabreSilhouette) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v3 = this;
if (com.homestarrunner.stinkoman.editor.LevelEditor.isActive()) {
this._mc.stop();
delete this._mc.onEnterFrame;
} else {
this._mc.triggerGuide_mc._visible = false;
}
this._mc.mZSabreSilhouette = this;
this.vulnerable = false;
this.triggered = false;
this.facingDir = initObj.facingDir;
if (this.facingDir == undefined) {
this.facingDir = 'left';
}
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyZSabreSilhouette = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyZSabreSilhouette extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {
var v2 = this;
if (!this.triggered && com.homestarrunner.stinkoman.StinkoGame.player1._mc.hitTest(this._mc)) {
this.triggered = true;
this.vulnerable = true;
this._mc.gotoAndStop(this.facingDir);
}
};
v2.applyFacingDir = function () {};
v2.hurtByPlayerTest = function (test_mc) {
return false;
};
v2.playerDangerTest = function (test_mc) {
return this._mc.animator_mc.bullets_mc.bullet1_mc.hitTest(test_mc) || this._mc.animator_mc.bullets_mc.bullet2_mc.hitTest(test_mc) || this._mc.animator_mc.bullets_mc.bullet3_mc.hitTest(test_mc);
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.facingDir = this.facingDir;
return v2;
};
v2.updateDead = function () {
--this.deadAnimateCounter;
if (this._mc._y < -200 || this.deadAnimateCounter < 0) {
this.remove();
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyZSabreSilhouette.prototype, null, 1);
}
#endinitclip
}
movieClip 2794 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemySticklyMan {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemySticklyMan) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v3 = this;
this.facingDir = 'left';
this.initHurtFlasher(this._mc);
this.applyInitObjProperties(initObj);
this.applyFacingDir();
this.maxVelY = 8;
this.maxVelX = 10;
if (this.facingDir == 'left') {
this.velX = -this.maxVelX;
} else {
this.velX = this.maxVelX;
}
this.velY = 0;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemySticklyMan = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemySticklyMan extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
var v3 = com.homestarrunner.stinkoman.stageobject.Platform.hit(this._mc.hitTestWalk_mc);
var v2 = false;
if (v3 != undefined) {
v2 = true;
this._mc._y = v3._y;
this.velY = 0;
} else {
this.velY += this.gravity;
if (this.velY > this.maxVelY) {
this.velY = this.maxVelY;
}
}
switch (this.state) {
case this.STATE_WAITING:
this.velX = 0;
++this.waitCounter;
if (this.waitCounter >= 30 * this.SECONDS) {
this.switchState(this.STATE_MOVING_AWAY);
}
break;
case this.STATE_CHASING:
this.chaseUpdate(v2);
if (com.homestarrunner.stinkoman.StinkoGame.player1.boredCounter > 120) {
this.switchState(this.STATE_MOVING_AWAY);
}
break;
case this.STATE_MOVING_AWAY:
this.moveAwayUpdate(v2);
if (com.homestarrunner.stinkoman.StinkoGame.player1.boredCounter < 10) {
this.switchState(this.STATE_CHASING);
}
break;
case this.STATE_HURT:
this.velX *= 0.4;
++this.hurtCounter;
if (this.hurtCounter >= 24) {
this.hurtCounter = 0;
this.switchState(this.STATE_CHASING);
}
break;
case this.STATE_IDLE:
this.velX *= 0.8;
if (Math.abs(this.velX) < 0.1) {
this.velX = 0;
}
if (com.homestarrunner.stinkoman.StinkoGame.player1.boredCounter < 10) {
this.switchState(this.STATE_CHASING);
}
}
this._mc._x += this.velX;
this._mc._y += this.velY;
};
v2.chaseUpdate = function (onGround) {
if (!onGround) {
return undefined;
}
var v2 = com.homestarrunner.stinkoman.StinkoGame.getPlayerGlobal();
if (this._mc._x < v2.x) {
this.runRight();
if (this.velX > 0.7 * this.maxVelX && Math.random() < 0.01) {
this.jump();
}
} else {
this.runLeft();
if (this.velX < -0.7 * this.maxVelX && Math.random() < 0.01) {
this.jump();
}
}
};
v2.runLeft = function () {
this.velX -= this.accel;
if (this.velX < -this.maxVelX) {
this.velX = -this.maxVelX;
}
this.facingDir = 'left';
this.applyFacingDir();
};
v2.runRight = function () {
this.velX += this.accel;
if (this.velX > this.maxVelX) {
this.velX = this.maxVelX;
}
this.facingDir = 'right';
this.applyFacingDir();
};
v2.moveAwayUpdate = function (onGround) {
if (!onGround) {
return undefined;
}
var v4 = 550;
var v3 = v4 / 2;
var v2 = v4 / 6;
if (this._mc._x > v4 - v2) {
this.runLeft();
return undefined;
}
if (this._mc._x < v2) {
this.runRight();
return undefined;
}
var v5 = com.homestarrunner.stinkoman.StinkoGame.getPlayerGlobal();
if (v5.x < v3) {
this.runRight();
if (this._mc._x > v3 + v2) {
this.stopMovingAway(v5);
}
} else {
this.runLeft();
if (this._mc._x < v3 - v2) {
this.stopMovingAway(v5);
}
}
};
v2.stopMovingAway = function (playerPosition) {
if (this._mc._x < playerPosition.x) {
this.facingDir = 'right';
} else {
this.facingDir = 'left';
}
trace('Stopping moving away. facingDir = ' + this.facingDir);
this.switchState(this.STATE_IDLE);
};
v2.jump = function () {
this.velY = -this.initialJumpSpeed;
};
v2.switchState = function (newState) {
if (this.state == newState) {
return undefined;
}
trace('Sticklyman newState: ' + newState);
this.state = newState;
this.applyFacingDir();
};
v2.applyFacingDir = function () {
var v2;
switch (this.state) {
case this.STATE_WAITING:
case this.STATE_IDLE:
v2 = 'idle';
break;
case this.STATE_CHASING:
case this.STATE_MOVING_AWAY:
v2 = 'run';
break;
case this.STATE_HURT:
v2 = 'hurt';
}
this._mc.gotoAndStop(v2 + '_' + this.facingDir);
};
v2.takeDamage = function (x, y) {
if (this.invincibleCounter == 0) {
++this.numberOfTimesHit;
this.invincibleCounter = this.invincibleTime;
if (this.facingDir == 'left') {
this.velX = 20;
} else {
this.velX = -20;
}
this.switchState(this.STATE_HURT);
}
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.facingDir = this.facingDir;
return v2;
};
v2.playerDangerTest = function (test_mc) {
return this._mc.hurtTest_mc.hitTest(test_mc);
};
v2.updateDead = function () {
delete this._mc.onEnterFrame;
};
v2.SECONDS = 24;
v2.STATE_WAITING = 'waiting';
v2.STATE_CHASING = 'chasing';
v2.STATE_HURT = 'hurt';
v2.STATE_MOVING_AWAY = 'movingAway';
v2.STATE_IDLE = 'idle';
v2.state = com.homestarrunner.stinkoman.stageobject.enemy.EnemySticklyMan.prototype.STATE_WAITING;
v2.accel = 0.5;
v2.invincibleCounter = 0;
v2.invincibleTime = 48;
v2.gravity = 3;
v2.initialJumpSpeed = 20;
v2.numberOfTimesHit = 0;
v2.hurtCounter = 0;
v2.waitCounter = 0;
v2.stopChasingCounter = 0;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemySticklyMan.prototype, null, 1);
}
#endinitclip
}
movieClip 2795 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyBB {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyBB) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
var v4 = this;
this._mc.mBB = this;
this.facingDir = 'left';
this.applyInitObjProperties(initObj);
this.applyFacingDir();
this.maxVelY = 5;
this.maxVelX = 8;
this.velY = 0;
this.velX = -5;
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyBB = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyBB extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.update = function () {
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) != undefined || com.homestarrunner.stinkoman.stageobject.Wall.hit(this._mc) != undefined) {
var v2 = 0;
while (v2 < 5) {
this._mc._x -= this.velX;
if (com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc) == undefined && com.homestarrunner.stinkoman.stageobject.Wall.hit(this._mc) == undefined) {
v2 = 6;
}
++v2;
}
this.reverse();
}
if (this.midair) {
this._mc._x += this.velX;
this._mc._y += this.velY;
this.velY += this.gravity;
if (this.velY > this.maxVelY) {
this.velY = this.maxVelY;
}
var v3 = com.homestarrunner.stinkoman.stageobject.Platform.hit(this._mc.hitTestWalk_mc);
if (v3 != undefined) {
this._mc._y = v3._y;
this.velY = 0;
this.midair = false;
}
} else {
if (this.sadCount > 0) {
--this.sadCount;
if (this.sadCount == 0) {
this.applyFacingDir();
}
} else {
if (Math.random() < 0.01) {
if (Math.random() < 0.5) {
this.reverse();
}
this.jump();
}
}
}
};
v2.jump = function () {
this.velY = -this.jumpSpeed;
if (this.facingDir == 'left') {
this.velX = -5;
} else {
this.velX = 5;
}
this.midair = true;
};
v2.updateDead = function () {
delete this._mc.onEnterFrame;
};
v2.playerDangerTest = function (test_mc) {
return false;
};
v2.takeDamage = function (x, y) {
if (x > 0) {
this.facingDir = 'left';
this._mc.gotoAndStop('sadLeft');
} else {
this.facingDir = 'right';
this._mc.gotoAndStop('sadRight');
}
this.sadCount = this.sadTime;
};
v2.jumpSpeed = 8;
v2.gravity = 2;
v2.midair = false;
v2.sadTime = 24;
v2.sadCount = 0;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyBB.prototype, null, 1);
}
#endinitclip
}
movieClip 2796 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyChickJoggerShades {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyChickJoggerShades) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
var v3 = this;
this.initHurtFlasher(this._mc);
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyChickJoggerShades = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyChickJoggerShades extends com.homestarrunner.stinkoman.stageobject.enemy.EnemyChickJogger;
var v2 = v1.prototype;
v2.takeDamage = function (x, y) {
if (this.invincibleCounter == 0) {
--this.hitPoints;
this.invincibleCounter = 24;
}
if (this.hitPoints == 0) {
this.die(x, y);
}
};
v2.update = function () {
super.update();
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
};
v2.getAdditonalAttributes = function () {
return super.getAdditonalAttributes();
};
v2.invincibleCounter = 0;
v2.invincibleTime = 24;
v2.hitPoints = 2;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyChickJoggerShades.prototype, null, 1);
}
#endinitclip
}
movieClip 2797 __Packages.com.homestarrunner.stinkoman.stageobject.enemy.EnemyLavaHider {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy) {
_global.com.homestarrunner.stinkoman.stageobject.enemy = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.enemy.EnemyLavaHider) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, depth, initObj);
this.classType = 'Enemy';
if (com.homestarrunner.stinkoman.stageobject.enemy.EnemyLavaHider.LavaHiderArray == undefined) {
com.homestarrunner.stinkoman.stageobject.enemy.EnemyLavaHider.LavaHiderArray = new Array();
}
com.homestarrunner.stinkoman.stageobject.enemy.EnemyLavaHider.LavaHiderArray.push(this);
};
com.homestarrunner.stinkoman.stageobject.enemy.EnemyLavaHider = v1;
com.homestarrunner.stinkoman.stageobject.enemy.EnemyLavaHider extends com.homestarrunner.stinkoman.stageobject.enemy.Enemy;
var v2 = v1.prototype;
v2.die = function (x, y) {
var v2 = this;
this._mc.gotoAndPlay('die');
this.dead = true;
this.dontRespawn = true;
this.velX = 0;
this.velY = 0;
};
v2.hurtByPlayerTest = function (test_mc) {
return false;
};
v2.playerDangerTest = function (test_mc) {
return this._mc.hitTest_mc && this._mc.hitTest_mc.hitTest(test_mc);
};
v2.flip = function () {
this.isShown = !this.isShown;
if (this.isShown) {
this._mc.gotoAndPlay('rise');
} else {
this._mc.gotoAndPlay('hide');
}
};
v1.flipAll = function () {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.enemy.EnemyLavaHider.LavaHiderArray.length) {
com.homestarrunner.stinkoman.stageobject.enemy.EnemyLavaHider.LavaHiderArray[v1].flip();
++v1;
}
};
v2.isShown = false;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.enemy.EnemyLavaHider.prototype, null, 1);
}
#endinitclip
}
movieClip 2798 __Packages.com.homestarrunner.stinkoman.stageobject.Ladder {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.Ladder) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'Ladder' + typeNum, depth);
if (com.homestarrunner.stinkoman.stageobject.Ladder.LadderArray == undefined) {
com.homestarrunner.stinkoman.stageobject.Ladder.LadderArray = new Array();
}
this.classType = 'Ladder';
var v4 = this;
com.homestarrunner.stinkoman.stageobject.Ladder.LadderArray.push(this);
this._mc.animator_mc.stop();
this._mc.mType = 'vert';
};
com.homestarrunner.stinkoman.stageobject.Ladder = v1;
com.homestarrunner.stinkoman.stageobject.Ladder extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.Ladder.LadderArray.length) {
if (this == com.homestarrunner.stinkoman.stageobject.Ladder.LadderArray[v2]) {
com.homestarrunner.stinkoman.stageobject.Ladder.LadderArray.splice(v2, 1);
break;
}
++v2;
}
};
v1.hit = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.Ladder.LadderArray.length) {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.Ladder.LadderArray[v1]._mc)) {
return com.homestarrunner.stinkoman.stageobject.Ladder.LadderArray[v1];
}
++v1;
}
return undefined;
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.Ladder.prototype, null, 1);
}
#endinitclip
}
movieClip 2799 __Packages.com.homestarrunner.stinkoman.stageobject.Hazard {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.Hazard) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'Hazard' + typeNum, depth);
if (com.homestarrunner.stinkoman.stageobject.Hazard.HazardArray == undefined) {
com.homestarrunner.stinkoman.stageobject.Hazard.HazardArray = new Array();
}
this.classType = 'Hazard';
var v3 = this;
com.homestarrunner.stinkoman.stageobject.Hazard.HazardArray.push(this);
};
com.homestarrunner.stinkoman.stageobject.Hazard = v1;
com.homestarrunner.stinkoman.stageobject.Hazard extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.Hazard.HazardArray.length) {
if (this == com.homestarrunner.stinkoman.stageobject.Hazard.HazardArray[v2]) {
com.homestarrunner.stinkoman.stageobject.Hazard.HazardArray.splice(v2, 1);
break;
}
++v2;
}
};
v1.anyPlayerDangerTest = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.Hazard.HazardArray.length) {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.Hazard.HazardArray[v1]._mc.hitTest_mc)) {
return com.homestarrunner.stinkoman.stageobject.Hazard.HazardArray[v1];
}
++v1;
}
return undefined;
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.Hazard.prototype, null, 1);
}
#endinitclip
}
movieClip 2800 __Packages.com.homestarrunner.stinkoman.stageobject.Trap {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.Trap) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'Trap' + typeNum, depth);
if (com.homestarrunner.stinkoman.stageobject.Trap.TrapArray == undefined) {
com.homestarrunner.stinkoman.stageobject.Trap.TrapArray = new Array();
}
this.classType = 'Trap';
var v4 = this;
com.homestarrunner.stinkoman.stageobject.Trap.TrapArray.push(this);
this._mc.safe = false;
if (com.homestarrunner.stinkoman.editor.LevelEditor.isActive()) {
this._mc.stop();
}
};
com.homestarrunner.stinkoman.stageobject.Trap = v1;
com.homestarrunner.stinkoman.stageobject.Trap extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.Trap.TrapArray.length) {
if (this == com.homestarrunner.stinkoman.stageobject.Trap.TrapArray[v2]) {
com.homestarrunner.stinkoman.stageobject.Trap.TrapArray.splice(v2, 1);
break;
}
++v2;
}
};
v2.getHitClip = function () {
if (this._mc.hitTest_mc._name != undefined) {
return this._mc.hitTest_mc;
} else {
return this._mc;
}
};
v1.anyPlayerDangerTest = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.Trap.TrapArray.length) {
if (!com.homestarrunner.stinkoman.stageobject.Trap.TrapArray[v1]._mc.safe && test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.Trap.TrapArray[v1].getHitClip())) {
return com.homestarrunner.stinkoman.stageobject.Trap.TrapArray[v1];
}
++v1;
}
return undefined;
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.Trap.prototype, null, 1);
}
#endinitclip
}
movieClip 2801 __Packages.com.homestarrunner.stinkoman.stageobject.Goal {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.Goal) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'Goal' + typeNum, depth);
this.classType = 'Goal';
var thisGoal = this;
this._mc.onEnterFrame = function () {
thisGoal.update();
};
if (!com.homestarrunner.stinkoman.editor.LevelEditor.editorActive) {
this._mc._visible = false;
}
};
com.homestarrunner.stinkoman.stageobject.Goal = v1;
com.homestarrunner.stinkoman.stageobject.Goal extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {};
v2.update = function () {
if (com.homestarrunner.stinkoman.struct.GlobalData.goalWarpsPlayer() && com.homestarrunner.stinkoman.StinkoGame.inProgress && this._mc.hitTest(com.homestarrunner.stinkoman.StinkoGame.player1._mc) && com.homestarrunner.stinkoman.struct.GlobalData.sublevel != 4) {
com.homestarrunner.stinkoman.StinkoGame.winLevel();
return undefined;
}
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 4 && this._mc.hitTest(com.homestarrunner.stinkoman.StinkoGame.oneUp._mc)) {
com.homestarrunner.stinkoman.StinkoGame.winLevel();
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.Goal.prototype, null, 1);
}
#endinitclip
}
movieClip 2802 __Packages.com.homestarrunner.stinkoman.stageobject.Checkpoint {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.Checkpoint) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'Checkpoint' + typeNum, depth);
this.classType = 'Checkpoint';
var thisCheckpoint = this;
this._mc.onEnterFrame = function () {
thisCheckpoint.update();
};
if (com.homestarrunner.stinkoman.editor.LevelEditor.editorActive) {
return undefined;
}
this._mc.marker_mc._visible = false;
if (!com.homestarrunner.stinkoman.struct.GlobalData.updatedDifficulty) {
this._mc._visible = false;
}
};
com.homestarrunner.stinkoman.stageobject.Checkpoint = v1;
com.homestarrunner.stinkoman.stageobject.Checkpoint extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {};
v2.update = function () {
if (com.homestarrunner.stinkoman.editor.LevelEditor.editorActive) {
return undefined;
}
if (!com.homestarrunner.stinkoman.struct.GlobalData.updatedDifficulty) {
this.kill();
return undefined;
}
if (this.activated) {
return undefined;
}
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 4) {
if (this._mc.hitTest_mc.hitTest(com.homestarrunner.stinkoman.StinkoGame.oneUp._mc)) {
this.activated = true;
com.homestarrunner.stinkoman.struct.GlobalData.startAtCheckpoint = true;
com.homestarrunner.stinkoman.struct.GlobalData.checkpointOneUpX = this._mc._x;
com.homestarrunner.stinkoman.struct.GlobalData.checkpointOneUpY = this._mc._y;
com.homestarrunner.stinkoman.struct.GlobalData.checkpointX = this._mc._x;
com.homestarrunner.stinkoman.struct.GlobalData.checkpointY = 120;
this._mc.play();
}
} else {
if (this._mc.hitTest_mc.hitTest(com.homestarrunner.stinkoman.StinkoGame.player1._mc)) {
this.activated = true;
com.homestarrunner.stinkoman.struct.GlobalData.startAtCheckpoint = true;
com.homestarrunner.stinkoman.struct.GlobalData.checkpointX = this._mc._x;
com.homestarrunner.stinkoman.struct.GlobalData.checkpointY = this._mc._y;
if (com.homestarrunner.stinkoman.StinkoGame.player1 instanceof com.homestarrunner.stinkoman.player.PlayerShip) {
com.homestarrunner.stinkoman.struct.GlobalData.checkpointScrollSpeedX = com.homestarrunner.stinkoman.StinkoGame.player1.autoScrollSpeed.x;
com.homestarrunner.stinkoman.struct.GlobalData.checkpointScrollSpeedY = com.homestarrunner.stinkoman.StinkoGame.player1.autoScrollSpeed.y;
}
this._mc.play();
}
}
};
v2.activated = false;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.Checkpoint.prototype, null, 1);
}
#endinitclip
}
movieClip 2803 __Packages.com.homestarrunner.stinkoman.player.Player {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.player) {
_global.com.homestarrunner.stinkoman.player = new Object();
}
if (!_global.com.homestarrunner.stinkoman.player.Player) {
var v1 = function (p_mc) {
var thisPlayer = this;
this._mc = p_mc;
this.startingPos = new Object();
this.incrSpeed = 5;
this.climbVelocity = 3;
this.maxSpeed = new Object();
this.maxSpeed.x = 5;
this.maxSpeed.y = 10;
this.gravity = 3;
this.facingDir = 'right';
this.enabled = true;
this.jumpDeceleration = 0.8;
this.defaultDeceleration = 0.4;
this.deceleration = 0.4;
this.defaultJumpHeight = 20;
this.jumpHeight = 20;
this.yVel = 0;
this.xVel = 0;
this.jumping = false;
this.punching = false;
this.jumpButtonDown = false;
this.climbing = false;
this.bulletDelayCounter = 0;
this.framesAliveCounter = 0;
this.soundMaker = new Sound(this._mc);
this.isFrozen = false;
this.acceptingInput = true;
this.invincibleLength = 48;
if (com.homestarrunner.stinkoman.struct.GlobalData.updatedDifficulty) {
this.invincibleLength = 72;
}
this.onSafeGroundTime = 12;
if (com.homestarrunner.stinkoman.struct.GlobalData.makePlayerFast) {
this.maxSpeed.x = 30;
}
if (com.homestarrunner.stinkoman.struct.GlobalData.startAtCheckpoint) {
this._mc._x = com.homestarrunner.stinkoman.struct.GlobalData.checkpointX;
this._mc._y = com.homestarrunner.stinkoman.struct.GlobalData.checkpointY;
} else {
this._mc._x = com.homestarrunner.stinkoman.StinkoGame.ld.levelProperties.playerStartX;
this._mc._y = com.homestarrunner.stinkoman.StinkoGame.ld.levelProperties.playerStartY;
}
this.boredCounter = 0;
this.bored = false;
this._mc.onEnterFrame = function () {
thisPlayer.update();
};
};
com.homestarrunner.stinkoman.player.Player = v1;
var v2 = v1.prototype;
v2.newMan = function () {};
v2.newGame = function () {};
v2.reset = function () {
var thisPlayer = this;
this._mc.onEnterFrame = function () {
thisPlayer.update();
};
this.facingDir = 'right';
this.enabled = true;
this.invincibleCounter = 0;
this.hitRecoverCounter = 0;
this.framesAliveCounter = 0;
com.homestarrunner.stinkoman.struct.GlobalData.resetHits();
com.homestarrunner.stinkoman.StinkoGame.jumpToOrigin();
this._mc._x = com.homestarrunner.stinkoman.StinkoGame.ld.levelProperties.playerStartX;
this._mc._y = com.homestarrunner.stinkoman.StinkoGame.ld.levelProperties.playerStartY;
com.homestarrunner.stinkoman.StinkoGame.inProgress = true;
this.deceleration = this.defaultDeceleration;
this.jumpHeight = this.defaultJumpHeight;
this.yVel = 0;
this.xVel = 0;
this.jumping = false;
this.climbing = false;
this.jumpButtonDown = false;
this._mc.animator_mc.stop();
com.homestarrunner.stinkoman.ui.Interface.update();
this.bored = false;
this.boredCounter = 0;
};
v2.moveRight = function () {
this.facingDir = 'right';
if (this.climbing) {
return undefined;
}
this._mc.animator_mc.play();
this.xVel += this.incrSpeed;
if (this.xVel > this.maxSpeed.x) {
this.xVel = this.maxSpeed.x;
}
};
v2.moveLeft = function () {
this.facingDir = 'left';
if (this.climbing) {
return undefined;
}
this._mc.animator_mc.play();
this.xVel -= this.incrSpeed;
if (this.xVel < -this.maxSpeed.x) {
this.xVel = -this.maxSpeed.x;
}
};
v2.climbUp = function () {
if (this.punching) {
return undefined;
}
var v3 = com.homestarrunner.stinkoman.stageobject.Ladder.hit(this._mc.hitTestHurt_mc);
var v2 = com.homestarrunner.stinkoman.stageobject.Ladder.hit(this._mc.hitTestLadderTop_mc);
if (v2 == undefined) {
if (v3 != undefined && this.climbing) {
this.jumping = true;
this.yVel = -this.climbVelocity - 12;
this.xVel = 0;
}
this.climbing = false;
return undefined;
} else {
if (v3 != undefined) {
this.climbing = true;
this.jumping = false;
this.moveTo((com.homestarrunner.stinkoman.StinkoGame.getGlobalCoord(v2._mc)).x + v2._mc._width / 2, null);
this.xVel = 0;
this.yVel = -this.climbVelocity;
} else {
this.climbing = false;
}
}
};
v2.climbDown = function () {
if (this.punching) {
return undefined;
}
var v3 = com.homestarrunner.stinkoman.stageobject.Ladder.hit(this._mc.hitTestHurt_mc);
var v2 = com.homestarrunner.stinkoman.stageobject.Ladder.hit(this._mc.hitTestLadderBottom_mc);
if (v2 != undefined) {
if (v3 != undefined) {
this.yVel = this.climbVelocity;
} else {
this.moveTo(null, (com.homestarrunner.stinkoman.StinkoGame.getGlobalCoord(v2._mc)).y + 25);
}
this.climbing = true;
this.moveTo((com.homestarrunner.stinkoman.StinkoGame.getGlobalCoord(v2._mc)).x + v2._mc._width / 2, null);
this.xVel = 0;
} else {
this.climbing = false;
}
};
v2.jump = function () {
this.soundMaker.attachSound('stinko_maybejump2.wav');
this.soundMaker.start();
this.jumpButtonDown = true;
this.jumping = true;
if (!this.climbing) {
this.yVel = -this.jumpHeight;
}
this.climbing = false;
};
v2.punch = function () {
if (this.climbing) {
this._mc.gotoAndStop('climbpunch_' + this.facingDir);
} else {
if (this.jumping) {
this._mc.gotoAndStop('jumppunch_' + this.facingDir);
} else {
if (Math.abs(this.xVel) > 1) {
this._mc.gotoAndStop('runpunch_' + this.facingDir);
} else {
this._mc.gotoAndStop('punch_' + this.facingDir);
}
}
}
this._mc.animator_mc.play();
this.punching = true;
this.testForPunchHit();
--this.bulletDelayCounter;
if (this.bulletDelayCounter < 0) {
this.bulletDelayCounter = this.BULLET_DELAY;
var v3 = 10;
var v4 = com.homestarrunner.stinkoman.StinkoGame.getPlayerGlobal();
var v2 = v4.x + this._mc.wave_mc._x;
var v5 = v4.y + this._mc.wave_mc._y - 6;
if (this.facingDir == 'right') {
v2 += 30;
v3 = 10;
} else {
v2 -= 15;
v3 = -10;
}
var v6 = new com.homestarrunner.stinkoman.bullet.BulletFriendly('Bullet1', v2, v5, v3, 0.2);
}
};
v2.update = function () {
if (this.enabled) {
this.updateCounters();
if (this.jumping) {
this.xVel *= this.jumpDeceleration;
} else {
this.xVel *= this.deceleration;
}
if (this.xVel < 0.1 && this.xVel > 0 || this.xVel > -0.1 && this.xVel < 0) {
this.xVel = 0;
}
if (this.hitRecoverCounter <= 0 && !this.punching && !this.climbing && !this.bored) {
if (!this.jumping) {
this._mc.gotoAndStop('run_' + this.facingDir);
} else {
if (Math.abs(this.xVel) > 1) {
this._mc.gotoAndStop('spin_' + this.facingDir);
} else {
this._mc.gotoAndStop('jump_' + this.facingDir);
}
}
}
this.acceptPlayerInput();
this.testForPlayerHurt();
if (!this.climbing) {
if (this.yVel < this.maxSpeed.y) {
this.yVel += this.gravity;
}
}
this.move(this.xVel, 0);
var v4 = com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc.hitTestHurt_mc);
if (v4 == undefined) {
v4 = com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar.hit(this._mc.hitTestHurt_mc);
}
if (v4 != undefined) {
this.move(-this.xVel, 0);
}
var v8 = com.homestarrunner.stinkoman.stageobject.Wall.hit(this._mc.hitTestHurt_mc);
if (v8 != undefined) {
this.move(-this.xVel, 0);
}
this.move(0, this.yVel);
if (!this.climbing || this.yVel > 0) {
var v3 = com.homestarrunner.stinkoman.stageobject.Platform.hit(this._mc.hitTestWalk_mc);
var v2 = com.homestarrunner.stinkoman.stageobject.YMovingPlatform.hit(this._mc.hitTestWalk_mc);
if (v2 == undefined) {
v2 = com.homestarrunner.stinkoman.stageobject.XMovingPlatform.hit(this._mc.hitTestWalk_mc);
}
var v7;
if (v3 != undefined) {
v7 = new Object({'x': v3._x, 'y': v3._y});
v3._parent.localToGlobal(v7);
}
var v5 = new Object({'x': v2._mc._x, 'y': v2._mc._y});
v2._mc._parent.localToGlobal(v5);
if (this.yVel > 0) {
if (v3 != undefined) {
this.yVel = 0;
var v6 = 0;
if (v3.subtype == 42) {
v6 = -3;
} else {
if (v3.subtype == 43 || v3.subtype == 54) {
v6 = 3;
}
}
switch (v3.subtype) {
if (v3.subtype !== 59) {
} else {
case 19:
case 41:
case 42:
case 43:
case 54:
this.onSafeGroundCount = 0;
}
}
this.move(v6, v7.y - this._mc._y);
if (this.jumping) {
this.soundMaker.attachSound('stinko_land.wav');
this.soundMaker.start();
if (v3.hasOwnProperty('mPlatform') && v3.mPlatform instanceof com.homestarrunner.stinkoman.stageobject.Platform) {
(com.homestarrunner.stinkoman.stageobject.Platform(v3.mPlatform)).handlePlayerLanding();
}
}
this.jumping = false;
this.climbing = false;
} else {
if (v2 != undefined) {
if (v2.classType == 'YMovingPlatform') {
this.yVel = v2.vel;
(com.homestarrunner.stinkoman.stageobject.YMovingPlatform(v2)).handlePlayerLanding();
} else {
this.yVel = 0;
this.move(v2.vel, 0);
(com.homestarrunner.stinkoman.stageobject.XMovingPlatform(v2)).handlePlayerLanding();
}
this.move(0, v5.y - this._mc._y);
if (this.jumping) {
this.soundMaker.attachSound('stinko_land.wav');
this.soundMaker.start();
}
this.jumping = false;
this.onSafeGroundCount = 0;
} else {
if (!this.climbing) {
this.jumping = true;
}
if (this._mc._y > 500) {
this.takeFallDamage();
}
}
}
} else {
v4 = com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc.hitTestHurt_mc);
if (v4 == undefined) {
v4 = com.homestarrunner.stinkoman.stageobject.enemy.EnemyBiztar.hit(this._mc.hitTestHurt_mc);
}
if (v4 != undefined) {
this.move(0, -this.yVel);
this.yVel = -this.yVel / 2;
}
if (v2) {
if (v2.classType == 'YMovingPlatform') {
this.move(0, v5.y - this._mc._y);
this.yVel = v2.vel;
this.jumping = false;
} else {
this.move(v2.vel, 0);
}
}
}
if (com.homestarrunner.stinkoman.stageobject.Wall.hit(this._mc.hitTestHurt_mc)) {
this.move(0, -this.yVel);
}
}
if (this.climbing) {
if (!this.punching) {
if (com.homestarrunner.stinkoman.stageobject.Ladder.hit(this._mc.hitTestLadderTop_mc) == undefined) {
this._mc.gotoAndStop('butt');
if (!this.getKeyIsDown(38)) {
this.climbing = false;
this.yVel = 2;
this.jumping = true;
this._mc.gotoAndStop('jump_' + this.facingDir);
}
} else {
this._mc.gotoAndStop('climb');
}
if (Math.abs(this.yVel) > 0) {
this._mc.animator_mc.play();
} else {
this._mc.animator_mc.stop();
}
}
if (!com.homestarrunner.stinkoman.stageobject.Ladder.hit(this._mc)) {
this.climbing = false;
if (this.yVel > 0) {
}
}
this.yVel = 0;
} else {
if (!this.getKeyIsDown(39) && !this.getKeyIsDown(37) && !this.jumping && !this.punching && this.hitRecoverCounter <= 0) {
if (!this.bored) {
this._mc.gotoAndStop('wait_' + this.facingDir);
}
}
}
if (!this.jumping && !this.climbing) {
++this.onSafeGroundCount;
if (this.onSafeGroundCount > this.onSafeGroundTime) {
this.lastSafeX = (this.getStageCoords()).x;
this.lastSafeY = (this.getStageCoords()).y;
}
} else {
this.onSafeGroundCount = 0;
}
if (this._mc.hitTestLadderTop_mc == undefined) {
this.yVel = 0;
}
}
};
v2.endLife = function () {
com.homestarrunner.stinkoman.StinkoGame.loseLife(false);
};
v2.testForPlayerHurt = function () {
if (this.invincibleCounter > 0) {
return undefined;
}
if (this.isFrozen) {
return undefined;
}
var v3 = 1;
var v2 = com.homestarrunner.stinkoman.stageobject.enemy.Enemy.anyPlayerDangerTest(this._mc.hitTestHurt_mc);
if (v2 == undefined) {
v2 = com.homestarrunner.stinkoman.stageobject.Hazard.anyPlayerDangerTest(this._mc.hitTestHurt_mc);
}
if (v2 == undefined) {
v2 = com.homestarrunner.stinkoman.stageobject.Trap.anyPlayerDangerTest(this._mc.hitTestHurt_mc);
if (v2 != undefined && v2.subType == 12) {
this.getHitFrozen();
return undefined;
}
}
if (v2 == undefined) {
v2 = com.homestarrunner.stinkoman.bullet.Bullet.anyPlayerDangerTest(this._mc.hitTestHurt_mc);
}
if (v2 == undefined) {
v2 = com.homestarrunner.stinkoman.StinkoGame.bossMan.playerDangerTest(this._mc.hitTestHurt_mc);
}
if (v2 == undefined) {
return undefined;
} else {
if (v2.classType == 'Enemy' && v2.subType == 21) {
v3 = 2;
}
if (v2.classType == 'Hazard' && v2.subType < 4) {
com.homestarrunner.stinkoman.struct.GlobalData.hits = 0;
}
if (v2.classType == 'Boss' && com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 10 && v2.state == 'charging') {
com.homestarrunner.stinkoman.struct.GlobalData.hits = 0;
}
if (v2.classType == 'Bullet') {
this.takeDamage(v2._mc._x < this._mc._x + this._mc._width / 2);
var v4 = com.homestarrunner.stinkoman.bullet.Bullet(v2);
v4.onHitPlayer();
} else {
if (v2._mc._x + v2._mc._width / 2 > (this.getStageCoords()).x + this._mc._width / 2) {
this.takeDamage(true, v3);
} else {
this.takeDamage(false, v3);
}
}
}
};
v2.getHitFrozen = function () {};
v2.testForPunchHit = function () {
var v3 = com.homestarrunner.stinkoman.stageobject.enemy.Enemy.anyHurtByPlayerTest(this._mc.wave_mc);
var v2 = 0;
while (v2 < v3.length) {
var v4;
if (this.facingDir == 'right') {
v4 = 1;
} else {
v4 = -1;
}
if (v3[v2].vulnerable || v3[v2].vulnerable == undefined) {
v3[v2].takeDamage(v4, -1);
}
++v2;
}
};
v2.takeDamage = function (fromRight, hitVal) {
if (com.homestarrunner.stinkoman.struct.GlobalData.makePlayerInvincible) {
return undefined;
}
if (this.isFrozen) {
this._mc.animator_mc.gotoAndPlay('unFreeze');
this.invincibleCounter = this.invincibleLength;
return undefined;
}
if (hitVal == undefined) {
hitVal = 1;
}
this.hitRecoverCounter = 24;
this.invincibleCounter = this.invincibleLength;
if (!this.climbing) {
if (fromRight) {
this.xVel = -20;
} else {
this.xVel = 20;
}
}
this.yVel = -8;
this.jumping = false;
this.climbing = false;
this._mc.gotoAndStop('hit_' + this.facingDir);
this._mc.animator_mc.play();
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 11) {
return undefined;
}
com.homestarrunner.stinkoman.struct.GlobalData.hits -= hitVal;
com.homestarrunner.stinkoman.ui.Interface.update();
if (com.homestarrunner.stinkoman.struct.GlobalData.hits <= 0) {
this.endLife();
}
};
v2.takeFallDamage = function () {
if (com.homestarrunner.stinkoman.struct.GlobalData.updatedDifficulty) {
this.takeDamage(true);
if (com.homestarrunner.stinkoman.struct.GlobalData.hits > 0) {
this.resetToLastSafePlace();
}
} else {
this.endLife();
}
};
v2.resetToLastSafePlace = function () {
this.yVel = -2;
this.xVel = 0;
this.setStageCoords(this.lastSafeX, this.lastSafeY);
this.resetCamera();
};
v2.updateCounters = function () {
++this.framesAliveCounter;
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 10 && com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 6) {
var v4 = 91;
var v6 = this.framesAliveCounter / 24;
var v3 = Math.floor(v4 - v6);
com.homestarrunner.stinkoman.ui.Interface.updateEscapeTimer(v3);
if (v3 < 0) {
_root.escape_explosion_mc._visible = true;
_root.escape_explosion_mc.play();
this.takeDamage(true, 100);
} else {
if (Math.random() < 0.1) {
var v7 = com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._x;
var v8 = com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._y;
var v5 = 550 * Math.random();
var v9 = new com.homestarrunner.stinkoman.bullet.BulletRubble(v5 - v7, -20 - v8);
}
if (Math.random() < 0.03) {
var v10 = new com.homestarrunner.stinkoman.effect.CameraEffectShake(_root, 10, 2);
}
}
}
if (this.hitRecoverCounter > 0) {
--this.hitRecoverCounter;
if (this.hitRecoverCounter == 0) {
this._mc.gotoAndStop('wait_' + this.facingDir);
}
}
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
if (this.invincibleCounter % 6 == 0 && this.hitRecoverCounter <= 0) {
this._mc.animator_mc._visible = false;
} else {
this._mc.animator_mc._visible = true;
}
if (this.invincibleCounter == 0) {
this._mc.animator_mc._visible = true;
}
}
this.updateBored();
};
v2.updateBored = function () {
++this.boredCounter;
if (this.boredCounter > 120 && !this.bored) {
this.bored = true;
this._mc.gotoAndStop('bored_' + this.facingDir);
}
};
v2.acceptPlayerInput = function () {
if (this.hitRecoverCounter > 0 || this.isFrozen || !this.acceptingInput) {
return undefined;
}
if (this.getKeyIsDown(39)) {
this.moveRight();
this.resetBoredCounter();
} else {
if (this.getKeyIsDown(37)) {
this.moveLeft();
this.resetBoredCounter();
}
}
if (this.getKeyIsDown(65) && (!this.jumping || com.homestarrunner.stinkoman.struct.GlobalData.makePlayerFast) && !this.jumpButtonDown) {
this.jump();
this.resetBoredCounter();
} else {
if (this.getKeyIsDown(38)) {
this.climbUp();
this.resetBoredCounter();
} else {
if (this.getKeyIsDown(40)) {
this.climbDown();
this.resetBoredCounter();
}
}
}
if (!this.getKeyIsDown(65)) {
this.jumpButtonDown = false;
}
if (this.getKeyIsDown(83)) {
this.resetBoredCounter();
this.punch();
} else {
this.bulletDelayCounter = 0;
this.punching = false;
}
};
v2.resetBoredCounter = function () {
this.boredCounter = 0;
this.bored = false;
};
v2.getStageCoords = function () {
var v2 = new Object();
v2.x = this._mc._x - com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._x;
v2.y = this._mc._y - com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._y;
return v2;
};
v2.setStageCoords = function (x, y) {
this._mc._x = x + com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._x;
this._mc._y = y + com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._y;
};
v2.resetCamera = function () {
var v2 = 100;
var v3 = 0;
while (v3 < 50) {
this.move(v2, v2);
this.move(-v2, -v2);
++v3;
}
};
v2.move = function (x, y) {
var v2 = this._mc._x + x;
var v3 = this._mc._y + y;
if (!com.homestarrunner.stinkoman.StinkoGame.scrollLockX && (v2 > com.homestarrunner.stinkoman.StinkoGame.scrollLimitR && x > 0 || v2 < com.homestarrunner.stinkoman.StinkoGame.scrollLimitL && x < 0)) {
if (!com.homestarrunner.stinkoman.StinkoGame.nudge(-x, 0) && v2 > com.homestarrunner.stinkoman.StinkoGame.viewBox.l && v2 < com.homestarrunner.stinkoman.StinkoGame.viewBox.r) {
this._mc._x = v2;
}
} else {
if (v2 > com.homestarrunner.stinkoman.StinkoGame.viewBox.l + 20 && x < 0 || v2 < com.homestarrunner.stinkoman.StinkoGame.viewBox.r - 20 && x > 0) {
this._mc._x = v2;
}
}
if (!com.homestarrunner.stinkoman.StinkoGame.scrollLockY && (v3 > com.homestarrunner.stinkoman.StinkoGame.scrollLimitB && y > 0 || v3 < com.homestarrunner.stinkoman.StinkoGame.scrollLimitT && y < 0)) {
if (!com.homestarrunner.stinkoman.StinkoGame.nudge(0, -y)) {
this._mc._y = v3;
}
} else {
this._mc._y = v3;
}
};
v2.moveTo = function (x, y) {
var v3;
var v2;
if (x != null) {
v3 = x - this._mc._x;
} else {
v3 = 0;
}
if (y != null) {
v2 = y - this._mc._y;
} else {
v2 = 0;
}
this.move(v3, v2);
};
v2.getBlown = function (offset) {
this.move(offset, 0);
};
v2.stopMovement = function () {
this.xVel = 0;
this.yVel = 0;
};
v2.gotoYouDead = function () {
this._mc.gotoAndStop('youDead_' + this.facingDir);
};
v2.getKeyIsDown = function (keyCode) {
if (!this.acceptingInput) {
return false;
}
return Key.isDown(keyCode);
};
v2.enableInput = function () {
this.acceptingInput = true;
};
v2.disableInput = function () {
this.acceptingInput = false;
this.punching = false;
};
v2.BULLET_DELAY = 7;
v2.framesAliveCounter = 0;
ASSetPropFlags(com.homestarrunner.stinkoman.player.Player.prototype, null, 1);
}
#endinitclip
}
movieClip 2804 __Packages.com.homestarrunner.stinkoman.bullet.BulletRubble {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.bullet) {
_global.com.homestarrunner.stinkoman.bullet = new Object();
}
if (!_global.com.homestarrunner.stinkoman.bullet.BulletRubble) {
var v1 = function (start_x, start_y) {
super('Bullet3', start_x, start_y, 0, 10, true, 0, false);
};
com.homestarrunner.stinkoman.bullet.BulletRubble = v1;
com.homestarrunner.stinkoman.bullet.BulletRubble extends com.homestarrunner.stinkoman.bullet.Bullet;
var v2 = v1.prototype;
v2.isOnScreen = function () {
return com.homestarrunner.stinkoman.StinkoGame.isWithinActiveStage(this._mc._x, this._mc._y, 30, 30);
};
ASSetPropFlags(com.homestarrunner.stinkoman.bullet.BulletRubble.prototype, null, 1);
}
#endinitclip
}
movieClip 2805 __Packages.com.homestarrunner.stinkoman.effect.CameraEffect {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.effect) {
_global.com.homestarrunner.stinkoman.effect = new Object();
}
if (!_global.com.homestarrunner.stinkoman.effect.CameraEffect) {
var v1 = function (p_mc) {
var thisCameraEffect = this;
this._mc = p_mc;
this._mc.onEnterFrame = function () {
thisCameraEffect.update();
};
};
com.homestarrunner.stinkoman.effect.CameraEffect = v1;
var v2 = v1.prototype;
v2.update = function () {};
ASSetPropFlags(com.homestarrunner.stinkoman.effect.CameraEffect.prototype, null, 1);
}
#endinitclip
}
movieClip 2806 __Packages.com.homestarrunner.stinkoman.effect.CameraEffectShake {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.effect) {
_global.com.homestarrunner.stinkoman.effect = new Object();
}
if (!_global.com.homestarrunner.stinkoman.effect.CameraEffectShake) {
var v1 = function (p_mc, pTotalTicks, pShakeRange) {
super(p_mc);
this.originalClipX = 0;
this.originalClipY = 0;
this.ticksLeft = pTotalTicks;
this.shakeRange = pShakeRange;
};
com.homestarrunner.stinkoman.effect.CameraEffectShake = v1;
com.homestarrunner.stinkoman.effect.CameraEffectShake extends com.homestarrunner.stinkoman.effect.CameraEffect;
var v2 = v1.prototype;
v2.update = function () {
--this.ticksLeft;
if (this.ticksLeft <= 0) {
this._mc._x = this.originalClipX;
this._mc._y = this.originalClipY;
delete this._mc.onEnterFrame;
false;
} else {
var v3 = Math.floor(Math.random() * 2 * this.shakeRange - this.shakeRange);
var v2 = Math.floor(Math.random() * 2 * this.shakeRange - this.shakeRange);
this._mc._x = this.originalClipX + v3;
this._mc._y = this.originalClipY + v2;
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.effect.CameraEffectShake.prototype, null, 1);
}
#endinitclip
}
movieClip 2807 __Packages.com.homestarrunner.stinkoman.player.PlayerShip {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.player) {
_global.com.homestarrunner.stinkoman.player = new Object();
}
if (!_global.com.homestarrunner.stinkoman.player.PlayerShip) {
var v1 = function (p_mc) {
super(p_mc);
var thisPlayer = this;
this.incrSpeed = 2;
this.maxSpeed = new Object();
this.maxSpeed.x = 6;
this.maxSpeed.y = 6;
this.enabled = true;
this.defaultDeceleration = 0.8;
this.deceleration = 0.8;
this.punching = false;
this.yVel = 0;
this.xVel = 0;
this.shieldCounter = 0;
this.jumpButtonDown = false;
this.autoScrollSpeed = new Object();
this.shipTiltState = 'flat';
this.bulletDelayCounter = 0;
this.soundMaker = new Sound(this._mc);
if (com.homestarrunner.stinkoman.struct.GlobalData.startAtCheckpoint) {
this._mc._x = com.homestarrunner.stinkoman.struct.GlobalData.checkpointX;
this._mc._y = com.homestarrunner.stinkoman.struct.GlobalData.checkpointY;
this.autoScrollSpeed.x = com.homestarrunner.stinkoman.struct.GlobalData.checkpointScrollSpeedX;
this.autoScrollSpeed.y = com.homestarrunner.stinkoman.struct.GlobalData.checkpointScrollSpeedY;
} else {
this._mc._x = com.homestarrunner.stinkoman.StinkoGame.ld.levelProperties.playerStartX;
this._mc._y = com.homestarrunner.stinkoman.StinkoGame.ld.levelProperties.playerStartY;
}
this._mc.onEnterFrame = function () {
thisPlayer.update();
};
this._mc.shield_mc._visible = false;
this.BULLET_DELAY = 10;
if (com.homestarrunner.stinkoman.struct.GlobalData.updatedDifficulty) {
this.BULLET_DELAY = 5;
}
};
com.homestarrunner.stinkoman.player.PlayerShip = v1;
com.homestarrunner.stinkoman.player.PlayerShip extends com.homestarrunner.stinkoman.player.Player;
var v2 = v1.prototype;
v2.newMan = function () {};
v2.newGame = function () {};
v2.reset = function () {
var thisPlayer = this;
this._mc.onEnterFrame = function () {
thisPlayer.update();
};
this.facingDir = 'right';
this.enabled = true;
this.invincibleCounter = 0;
this.hitRecoverCounter = 0;
com.homestarrunner.stinkoman.struct.GlobalData.resetHits();
com.homestarrunner.stinkoman.struct.GlobalData.resetShields();
com.homestarrunner.stinkoman.StinkoGame.jumpToOrigin();
this._mc._x = com.homestarrunner.stinkoman.StinkoGame.ld.levelProperties.playerStartX;
this._mc._y = com.homestarrunner.stinkoman.StinkoGame.ld.levelProperties.playerStartY;
com.homestarrunner.stinkoman.StinkoGame.inProgress = true;
this.deceleration = this.defaultDeceleration;
this.yVel = 0;
this.xVel = 0;
this._mc.animator_mc.stop();
com.homestarrunner.stinkoman.ui.Interface.update();
this.bored = false;
this.boredCounter = 0;
};
v2.punch = function () {
--this.bulletDelayCounter;
if (this.bulletDelayCounter < 0) {
this.bulletDelayCounter = this.BULLET_DELAY;
var v6 = 10;
var v3 = com.homestarrunner.stinkoman.StinkoGame.getPlayerGlobal();
var v2 = v3.x;
var v4 = v3.y;
v2 += 10;
var v5 = new com.homestarrunner.stinkoman.bullet.BulletFriendly('Bullet15', v2, v4, 14 + this.autoScrollSpeed.x / 10, -this.autoScrollSpeed.y / 10);
}
};
v2.fireAlternateShot = function () {
if (this.shieldCounter < 1) {
if (com.homestarrunner.stinkoman.struct.GlobalData.useShield()) {
if (com.homestarrunner.stinkoman.struct.GlobalData.updatedDifficulty) {
this.shieldCounter = 90;
this._mc.shield_mc.gotoAndPlay('longer');
} else {
this.shieldCounter = 75;
this._mc.shield_mc.gotoAndPlay('normal');
}
this._mc.shield_mc._visible = true;
} else {
this.soundMaker.attachSound('deflect.wav');
this.soundMaker.start();
}
}
};
v2.update = function () {
if (this.enabled) {
if (this.shieldCounter > 0) {
--this.shieldCounter;
this._mc.shield_mc._visible = true;
} else {
this._mc.shield_mc._visible = false;
this._mc.shield_mc.stop();
}
com.homestarrunner.stinkoman.gamemode.ShootingGame.nudge(-this.autoScrollSpeed.x / 10, this.autoScrollSpeed.y / 10);
this.updateCounters();
this.acceptPlayerInput();
this.testForPlayerHurt();
this.move(this.xVel, 0);
this.move(0, this.yVel);
if (com.homestarrunner.stinkoman.stageobject.ShooterObstacle.anyHitPoint(this._mc.shooterCollide_mc)) {
this.takeDamage();
}
}
};
v2.endLife = function () {
com.homestarrunner.stinkoman.StinkoGame.loseLife(false);
};
v2.testForPlayerHurt = function () {
var v2 = com.homestarrunner.stinkoman.stageobject.enemy.Enemy.anyPlayerDangerTest(this._mc.hitTestHurt_mc);
if (v2 != undefined) {
this.takeDamage();
} else {
if (com.homestarrunner.stinkoman.bullet.Bullet.anyPlayerDangerTest(this._mc.hitTestHurt_mc)) {
this.takeDamage();
}
}
if (v2 == undefined) {
v2 = com.homestarrunner.stinkoman.StinkoGame.bossMan.playerDangerTest(this._mc.hitTestHurt_mc);
if (v2 != undefined) {
this.takeDamage();
}
}
};
v2.testForPunchHit = function () {
var v3 = com.homestarrunner.stinkoman.stageobject.enemy.Enemy.anyHurtByPlayerTest(this._mc.wave_mc);
var v2 = 0;
while (v2 < v3.length) {
var v4;
if (this.facingDir == 'right') {
v4 = 1;
} else {
v4 = -1;
}
if (v3[v2].vulnerable || v3[v2].vulnerable == undefined) {
v3[v2].takeDamage(v4, -1);
}
++v2;
}
};
v2.takeDamage = function (fromRight, hitVal) {
if (this.invincibleCounter > 0) {
return undefined;
}
if (this.shieldCounter > 0) {
return undefined;
}
this.xVel = 0;
this.yVel = 0;
if (hitVal == undefined) {
hitVal = 1;
}
this.hitRecoverCounter = 24;
this.invincibleCounter = 48;
this._mc.gotoAndStop('hit');
this._mc.explode_mc.gotoAndPlay('go');
this._mc.animator_mc.gotoAndPlay(1);
com.homestarrunner.stinkoman.struct.GlobalData.hits -= hitVal;
com.homestarrunner.stinkoman.ui.Interface.update();
if (com.homestarrunner.stinkoman.struct.GlobalData.hits <= 0) {
this.endLife();
}
};
v2.acceptPlayerInput = function () {
if (Key.isDown(39)) {
this.xVel += this.incrSpeed;
} else {
if (Key.isDown(37)) {
this.xVel -= this.incrSpeed;
}
}
if (Key.isDown(40)) {
this.yVel += this.incrSpeed;
this._mc.gotoAndPlay('up');
this.shipTiltState = 'up';
} else {
if (Key.isDown(38)) {
this.yVel -= this.incrSpeed;
this._mc.gotoAndPlay('down');
this.shipTiltState = 'down';
} else {
if (this.shipTiltState == 'down') {
this._mc.gotoAndPlay('downReturn');
} else {
if (this.shipTiltState == 'up') {
this._mc.gotoAndPlay('upReturn');
}
}
this.shipTiltState = 'straight';
}
}
if (this.xVel < 0) {
if (this.xVel > -this.deceleration) {
this.xVel = 0;
} else {
this.xVel += this.deceleration;
}
}
if (this.xVel > 0) {
if (this.xVel < this.deceleration) {
this.xVel = 0;
} else {
this.xVel -= this.deceleration;
}
}
if (this.yVel < 0) {
if (this.yVel > -this.deceleration) {
this.yVel = 0;
} else {
this.yVel += this.deceleration;
}
}
if (this.yVel > 0) {
if (this.yVel < this.deceleration) {
this.yVel = 0;
} else {
this.yVel -= this.deceleration;
}
}
if (this.xVel > this.maxSpeed.x) {
this.xVel = this.maxSpeed.x;
}
if (this.xVel < -this.maxSpeed.x) {
this.xVel = -this.maxSpeed.x;
}
if (this.yVel > this.maxSpeed.y) {
this.yVel = this.maxSpeed.y;
}
if (this.yVel < -this.maxSpeed.y) {
this.yVel = -this.maxSpeed.y;
}
if (Key.isDown(65)) {
this.fireAlternateShot();
}
if (Key.isDown(83)) {
this.punch();
} else {
this.bulletDelayCounter = 0;
this.punching = false;
}
};
v2.getStageCoords = function () {
var v2 = new Object();
v2.x = this._mc._x - com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._x;
v2.y = this._mc._y - com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._y;
return v2;
};
v2.move = function (x, y) {
var v3 = this._mc._x + x;
var v2 = this._mc._y + y;
var v5 = true;
var v4 = true;
if (v5 && (v3 > com.homestarrunner.stinkoman.StinkoGame.viewBox.l + 5 && x < 0 || v3 < com.homestarrunner.stinkoman.StinkoGame.viewBox.r - 5 && x > 0)) {
this._mc._x = v3;
}
if (v4 && (v2 > com.homestarrunner.stinkoman.StinkoGame.viewBox.t + 5 && y < 0 || v2 < com.homestarrunner.stinkoman.StinkoGame.viewBox.b - 5 && y > 0)) {
this._mc._y = v2;
}
};
v2.gotoYouDead = function () {
this._mc.gotoAndStop('youDead');
};
ASSetPropFlags(com.homestarrunner.stinkoman.player.PlayerShip.prototype, null, 1);
}
#endinitclip
}
movieClip 2808 __Packages.com.homestarrunner.stinkoman.stageobject.ShooterObstacle {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.ShooterObstacle) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'ShooterObstacle' + typeNum, depth);
if (com.homestarrunner.stinkoman.stageobject.ShooterObstacle.ShooterObstacleArray == undefined) {
com.homestarrunner.stinkoman.stageobject.ShooterObstacle.ShooterObstacleArray = new Array();
}
this.classType = 'ShooterObstacle';
var v3 = this;
com.homestarrunner.stinkoman.stageobject.ShooterObstacle.ShooterObstacleArray.push(this);
this._mc.animator_mc.stop();
};
com.homestarrunner.stinkoman.stageobject.ShooterObstacle = v1;
com.homestarrunner.stinkoman.stageobject.ShooterObstacle extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.ShooterObstacle.ShooterObstacleArray.length) {
if (this == com.homestarrunner.stinkoman.stageobject.ShooterObstacle.ShooterObstacleArray[v2]) {
com.homestarrunner.stinkoman.stageobject.ShooterObstacle.ShooterObstacleArray.splice(v2, 1);
break;
}
++v2;
}
};
v1.hit = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.ShooterObstacle.ShooterObstacleArray.length) {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.ShooterObstacle.ShooterObstacleArray[v1]._mc.hitTest1_mc) || test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.ShooterObstacle.ShooterObstacleArray[v1]._mc.hitTest2_mc)) {
return com.homestarrunner.stinkoman.stageobject.ShooterObstacle.ShooterObstacleArray[v1]._mc;
}
++v1;
}
return undefined;
};
v1.unpause = function () {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.ShooterObstacle.ShooterObstacleArray.length) {
com.homestarrunner.stinkoman.stageobject.ShooterObstacle.ShooterObstacleArray[v1]._mc.animator_mc.play();
++v1;
}
};
v1.anyHitPoint = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.ShooterObstacle.ShooterObstacleArray.length) {
if (com.homestarrunner.stinkoman.stageobject.ShooterObstacle.ShooterObstacleArray[v1]._mc.hitTest1_mc.hitTest(test_mc) || com.homestarrunner.stinkoman.stageobject.ShooterObstacle.ShooterObstacleArray[v1]._mc.hitTest2_mc.hitTest(test_mc)) {
trace(com.homestarrunner.stinkoman.stageobject.ShooterObstacle.ShooterObstacleArray[v1].subType);
return true;
}
++v1;
}
return false;
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.ShooterObstacle.prototype, null, 1);
}
#endinitclip
}
movieClip 2809 __Packages.com.homestarrunner.stinkoman.stageobject.Powerup {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.Powerup) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'Powerup' + typeNum, depth);
this.classType = 'Powerup';
var thisPowerup = this;
this.collected = false;
this._mc.onEnterFrame = function () {
thisPowerup.update();
};
};
com.homestarrunner.stinkoman.stageobject.Powerup = v1;
com.homestarrunner.stinkoman.stageobject.Powerup extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {};
v2.update = function () {
if (!this.collected && this._mc.hitTest(com.homestarrunner.stinkoman.StinkoGame.player1._mc.hitTestHurt_mc)) {
this._mc.gotoAndPlay('collect');
this.dontRespawn = true;
this.collected = true;
if (this.subType == 0) {
com.homestarrunner.stinkoman.struct.GlobalData.fillHits();
} else {
if (this.subType == 1) {
com.homestarrunner.stinkoman.struct.GlobalData.extraMan();
} else {
if (this.subType == 2) {
com.homestarrunner.stinkoman.struct.GlobalData.getShield();
}
}
}
delete this._mc.onEnterFrame;
}
};
v2.collected = false;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.Powerup.prototype, null, 1);
}
#endinitclip
}
movieClip 2810 __Packages.com.homestarrunner.stinkoman.stageobject.SwitchedWall {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.SwitchedWall) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'SwitchedWall' + typeNum, depth);
if (com.homestarrunner.stinkoman.stageobject.SwitchedWall.SwitchedWallArray == undefined) {
com.homestarrunner.stinkoman.stageobject.SwitchedWall.SwitchedWallArray = new Array();
}
this.classType = 'SwitchedWall';
var v3 = this;
com.homestarrunner.stinkoman.stageobject.SwitchedWall.SwitchedWallArray.push(this);
this._mc.animator_mc.stop();
this._mc.mType = 'vert';
};
com.homestarrunner.stinkoman.stageobject.SwitchedWall = v1;
com.homestarrunner.stinkoman.stageobject.SwitchedWall extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.SwitchedWall.SwitchedWallArray.length) {
if (this == com.homestarrunner.stinkoman.stageobject.SwitchedWall.SwitchedWallArray[v2]) {
com.homestarrunner.stinkoman.stageobject.SwitchedWall.SwitchedWallArray.splice(v2, 1);
break;
}
++v2;
}
};
v1.hit = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.SwitchedWall.SwitchedWallArray.length) {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.SwitchedWall.SwitchedWallArray[v1]._mc)) {
return com.homestarrunner.stinkoman.stageobject.SwitchedWall.SwitchedWallArray[v1]._mc;
}
++v1;
}
return undefined;
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.switchCode = this.switchCode;
v2.startPosition = this.startPosition;
return v2;
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.SwitchedWall.prototype, null, 1);
}
#endinitclip
}
movieClip 2811 __Packages.com.homestarrunner.stinkoman.stageobject.Switch {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.Switch) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'Switch' + typeNum, depth);
var v4 = this;
if (com.homestarrunner.stinkoman.stageobject.Switch.SwitchArray == undefined) {
com.homestarrunner.stinkoman.stageobject.Switch.SwitchArray = new Array();
}
this.classType = 'Switch';
this.switchCode = Number(initObj.switchCode);
if (this.switchCode == undefined || isNaN(this.switchCode)) {
this.switchCode = 0;
}
com.homestarrunner.stinkoman.stageobject.Switch.SwitchArray.push(this);
};
com.homestarrunner.stinkoman.stageobject.Switch = v1;
com.homestarrunner.stinkoman.stageobject.Switch extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.Switch.SwitchArray.length) {
if (this == com.homestarrunner.stinkoman.stageobject.Switch.SwitchArray[v2]) {
com.homestarrunner.stinkoman.stageobject.Switch.SwitchArray.splice(v2, 1);
break;
}
++v2;
}
};
v1.hit = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.Switch.SwitchArray.length) {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.Switch.SwitchArray[v1]._mc)) {
return com.homestarrunner.stinkoman.stageobject.Switch.SwitchArray[v1];
}
++v1;
}
return undefined;
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.switchCode = this.switchCode;
return v2;
};
v2.activate = function () {
this._mc.gotoAndPlay('on');
com.homestarrunner.stinkoman.stageobject.MoveablePlatform.affectAll(this.switchCode);
};
v2.update = function () {};
v2.DIR_CHANGE_TIMING = 72;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.Switch.prototype, null, 1);
}
#endinitclip
}
movieClip 2812 __Packages.com.homestarrunner.stinkoman.stageobject.LavaFall {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.LavaFall) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'LavaFall' + typeNum, depth);
if (com.homestarrunner.stinkoman.stageobject.LavaFall.LavaFallArray == undefined) {
com.homestarrunner.stinkoman.stageobject.LavaFall.LavaFallArray = new Array();
}
this.classType = 'LavaFall';
this.blocked = false;
var v4 = this;
com.homestarrunner.stinkoman.stageobject.LavaFall.LavaFallArray.push(this);
this.originalSplashHeight = this._mc.lavaFallBlocker_mc._y;
this.originalMaskHeight = this._mc.fallMask_mc._height;
};
com.homestarrunner.stinkoman.stageobject.LavaFall = v1;
com.homestarrunner.stinkoman.stageobject.LavaFall extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.LavaFall.LavaFallArray.length) {
if (this == com.homestarrunner.stinkoman.stageobject.LavaFall.LavaFallArray[v2]) {
com.homestarrunner.stinkoman.stageobject.LavaFall.LavaFallArray.splice(v2, 1);
break;
}
++v2;
}
};
v1.hit = function (test_mc) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.LavaFall.LavaFallArray.length) {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.LavaFall.LavaFallArray[v1]._mc.hitTest_mc)) {
return com.homestarrunner.stinkoman.stageobject.LavaFall.LavaFallArray[v1];
}
++v1;
}
return undefined;
};
v1.noneAreBlocked = function () {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.LavaFall.LavaFallArray.length) {
com.homestarrunner.stinkoman.stageobject.LavaFall.LavaFallArray[v1].unblock();
com.homestarrunner.stinkoman.stageobject.LavaFall.LavaFallArray[v1].testForPlatformBlock();
++v1;
}
};
v2.testForPlatformBlock = function () {
var v2 = com.homestarrunner.stinkoman.stageobject.MoveablePlatform.hit(this._mc.hitTest_mc);
if (v2 != undefined) {
this.block(v2._y + 75);
}
};
v1.hitToHurt = function (test_mc) {
var v2 = new Array();
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.LavaFall.LavaFallArray.length) {
if (test_mc.hitTest(com.homestarrunner.stinkoman.stageobject.LavaFall.LavaFallArray[v1]._mc.fallMask_mc)) {
v2.push(com.homestarrunner.stinkoman.stageobject.LavaFall.LavaFallArray[v1]);
}
++v1;
}
return v2;
};
v2.getAdditonalAttributes = function () {
var v1 = new Object();
return v1;
};
v2.block = function (heightToBlock) {
this.blocked = true;
this._mc.lavaFallBlocker_mc._y = heightToBlock - 75;
this._mc.fallMask_mc._height = heightToBlock - 36;
};
v2.unblock = function (heightToBlock) {
this.blocked = false;
this._mc.lavaFallBlocker_mc._y = this.originalSplashHeight;
this._mc.fallMask_mc._height = this.originalMaskHeight;
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.LavaFall.prototype, null, 1);
}
#endinitclip
}
movieClip 2813 __Packages.com.homestarrunner.stinkoman.stageobject.WarpPad {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.WarpPad) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'WarpPad' + typeNum, depth);
this.classType = 'WarpPad';
var thisWarpPad = this;
if (initObj.off_x == undefined) {
this.off_x = 100;
} else {
this.off_x = Number(initObj.off_x);
}
if (initObj.off_y == undefined) {
this.off_y = 0;
} else {
this.off_y = Number(initObj.off_y);
}
if (!com.homestarrunner.stinkoman.editor.LevelEditor.editorActive) {
this._mc.onEnterFrame = function () {
thisWarpPad.update();
};
this._mc.targetGuide_mc._visible = false;
}
this.moveYRangeGuideTo(this.off_y);
this.moveRangeGuideTo(this.off_x);
};
com.homestarrunner.stinkoman.stageobject.WarpPad = v1;
com.homestarrunner.stinkoman.stageobject.WarpPad extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.off_x = this.off_x;
v2.off_y = this.off_y;
return v2;
};
v2.activate = function () {};
v2.update = function () {
if (this._mc.warpTrigger_mc.hitTest(com.homestarrunner.stinkoman.StinkoGame.player1._mc.hitTestWalk_mc)) {
var v4 = com.homestarrunner.stinkoman.StinkoGame.getGlobalCoord(this._mc);
v4.x += this._mc.warpTrigger_mc._width / 2;
var v5 = new Object({'x': com.homestarrunner.stinkoman.StinkoGame.player1._mc._x, 'y': com.homestarrunner.stinkoman.StinkoGame.player1._mc._y});
var v3 = new Object();
v3.x = v4.x - v5.x + this.off_x;
v3.y = v4.y - v5.y + this.off_y;
if (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 3 && com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 8) {
com.homestarrunner.stinkoman.StinkoGame.player1._mc._x += this.off_x;
com.homestarrunner.stinkoman.StinkoGame.player1._mc._y += this.off_y;
} else {
com.homestarrunner.stinkoman.StinkoGame.player1.move(v3.x, v3.y);
}
com.homestarrunner.stinkoman.StinkoGame.player1.stopMovement();
var v7 = new com.homestarrunner.stinkoman.effect.CameraEffectFlash(_root, 1, 3);
}
};
v2.moveYRangeGuideTo = function (newVal) {
this.off_y = newVal;
this._mc.targetGuide_mc._y = this.off_y;
};
v2.moveRangeGuideTo = function (newVal) {
this.off_x = newVal;
this._mc.targetGuide_mc._x = this.off_x;
};
v2.__get__rRange = function () {
return this.off_x;
};
v2.__get__tRange = function () {
return this.off_y;
};
v2.addProperty('rRange', v2.__get__rRange, function () {});
v2.addProperty('tRange', v2.__get__tRange, function () {});
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.WarpPad.prototype, null, 1);
}
#endinitclip
}
movieClip 2814 __Packages.com.homestarrunner.stinkoman.effect.CameraEffectFlash {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.effect) {
_global.com.homestarrunner.stinkoman.effect = new Object();
}
if (!_global.com.homestarrunner.stinkoman.effect.CameraEffectFlash) {
var v1 = function (p_mc, pTotalFlashes, pFlashLength) {
super(p_mc);
this.originalClipX = 0;
this.originalClipY = 0;
this._mc.attachMovie('cameraFlash_mc', 'flash_mc', 1);
this.ticker = pFlashLength;
this.flashLength = pFlashLength;
this.flashesLeft = pTotalFlashes;
this.flash();
};
com.homestarrunner.stinkoman.effect.CameraEffectFlash = v1;
com.homestarrunner.stinkoman.effect.CameraEffectFlash extends com.homestarrunner.stinkoman.effect.CameraEffect;
var v2 = v1.prototype;
v2.update = function () {
--this.ticker;
if (this.ticker <= 0) {
this.flash();
} else {
this._mc.flash_mc._alpha = 100 - 100 * (this.ticker / this.flashLength);
}
};
v2.flash = function () {
--this.flashesLeft;
if (this.flashesLeft < 0) {
this._mc.flash_mc.removeMovieClip();
delete this._mc.onEnterFrame;
false;
} else {
this._mc.flash_mc._alpha = 100;
this.ticker = this.flashLength;
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.effect.CameraEffectFlash.prototype, null, 1);
}
#endinitclip
}
movieClip 2815 __Packages.com.homestarrunner.stinkoman.stageobject.ShooterSpeedTrigger {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.ShooterSpeedTrigger) {
var v1 = function (parent_mc, x, y, typeNum, depth, initObj) {
super(parent_mc, x, y, typeNum, 'Goal' + typeNum, depth);
this.classType = 'ShooterSpeedTrigger';
var thisShooterSpeedTrigger = this;
this._mc.onEnterFrame = function () {
thisShooterSpeedTrigger.update();
};
if (initObj.newXSpeed == undefined) {
this.newXSpeed = 1;
} else {
this.newXSpeed = initObj.newXSpeed;
}
if (initObj.newYSpeed == undefined) {
this.newYSpeed = 0;
} else {
this.newYSpeed = initObj.newYSpeed;
}
if (!com.homestarrunner.stinkoman.editor.LevelEditor.editorActive) {
this._mc._visible = false;
}
};
com.homestarrunner.stinkoman.stageobject.ShooterSpeedTrigger = v1;
com.homestarrunner.stinkoman.stageobject.ShooterSpeedTrigger extends com.homestarrunner.stinkoman.stageobject.StageObject;
var v2 = v1.prototype;
v2.clearFromObjectsArray = function () {};
v2.update = function () {
if (com.homestarrunner.stinkoman.StinkoGame.inProgress && this._mc.hitTest(com.homestarrunner.stinkoman.StinkoGame.player1._mc)) {
com.homestarrunner.stinkoman.gamemode.ShootingGame.setNewAutoscroll(this.newXSpeed, this.newYSpeed);
return undefined;
}
};
v2.getAdditonalAttributes = function () {
var v2 = new Object();
v2.newXSpeed = this.newXSpeed;
v2.newYSpeed = this.newYSpeed;
return v2;
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.ShooterSpeedTrigger.prototype, null, 1);
}
#endinitclip
}
movieClip 2816 __Packages.com.homestarrunner.stinkoman.editor.PropertyInspector {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.editor) {
_global.com.homestarrunner.stinkoman.editor = new Object();
}
if (!_global.com.homestarrunner.stinkoman.editor.PropertyInspector) {
var v1 = function (p_mc) {
var v2 = this;
com.homestarrunner.stinkoman.editor.PropertyInspector._mc = p_mc;
};
com.homestarrunner.stinkoman.editor.PropertyInspector = v1;
var v2 = v1.prototype;
v1.activate = function (obj) {
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.gotoAndPlay('off');
if (obj.classType != 'Enemy') {
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.gotoAndPlay(obj.classType);
} else {
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.gotoAndPlay(obj.classType + obj.subType);
}
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj = obj;
};
v1.disable = function () {
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.gotoAndStop('off');
};
v1.initialize = function (classname) {
switch (com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.classType) {
case 'MoveablePlatform':
com.homestarrunner.stinkoman.editor.PropertyInspector.initSwitchCodeStepper();
com.homestarrunner.stinkoman.editor.PropertyInspector.initMoveablePlatformInputs();
break;
case 'SwitchedWall':
com.homestarrunner.stinkoman.editor.PropertyInspector.initSwitchCodeStepper();
break;
case 'Switch':
com.homestarrunner.stinkoman.editor.PropertyInspector.initSwitchCodeStepper();
break;
case 'XMovingPlatform':
com.homestarrunner.stinkoman.editor.PropertyInspector.initRightRangeGuideStepper();
break;
case 'YMovingPlatform':
com.homestarrunner.stinkoman.editor.PropertyInspector.initUpperRangeGuideStepper();
break;
case 'WarpPad':
com.homestarrunner.stinkoman.editor.PropertyInspector.initRightRangeGuideStepper();
com.homestarrunner.stinkoman.editor.PropertyInspector.initUpperRangeGuideStepper();
break;
case 'ShooterSpeedTrigger':
com.homestarrunner.stinkoman.editor.PropertyInspector.initShooterSteppers();
break;
case 'Enemy':
if (com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 5) {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.editor.PropertyInspector._mc.jumpingDir.length) {
if ((com.homestarrunner.stinkoman.editor.PropertyInspector._mc.jumpingDir.getItemAt(v1)).data == com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.jumpingDir) {
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.jumpingDir.selectedIndex = v1;
break;
}
++v1;
}
var v2 = new Object();
v2.change = function (eventObj) {
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.jumpingDir = eventObj.target.value;
};
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.jumpingDir.addEventListener('change', v2);
} else {
if (com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 2 || com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 8 || com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 6 || com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 12 || com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 13 || com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 15 || com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 16 || com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 21 || com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 24 || com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType >= 42 && com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType <= 50 || com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 52) {
com.homestarrunner.stinkoman.editor.PropertyInspector.initFacingDirDropdown();
} else {
if (com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 7 || com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 11 || com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 22 || com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 44) {
com.homestarrunner.stinkoman.editor.PropertyInspector.initRightRangeGuideStepper();
} else {
if (com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 29 || com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 30 || com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 31 || com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 32) {
com.homestarrunner.stinkoman.editor.PropertyInspector.initShooterEnemySteppers();
} else {
if (com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 33 || com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 34) {
com.homestarrunner.stinkoman.editor.PropertyInspector.initShooterEnemySteppers();
}
}
}
}
}
if (com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.subType == 12) {
com.homestarrunner.stinkoman.editor.PropertyInspector.initStepper(com.homestarrunner.stinkoman.editor.PropertyInspector._mc.shotsStepper, 'shotsToFire');
}
}
};
v1.initRightRangeGuideStepper = function () {
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.rangeGuideStepper.value = com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.rRange;
var v1 = new Object();
v1.change = function (eventObj) {
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.moveRangeGuideTo(eventObj.target.value);
};
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.rangeGuideStepper.addEventListener('change', v1);
};
v1.initUpperRangeGuideStepper = function () {
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.rangeGuideStepperY.value = com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.tRange;
var v1 = new Object();
v1.change = function (eventObj) {
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.moveYRangeGuideTo(eventObj.target.value);
};
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.rangeGuideStepperY.addEventListener('change', v1);
};
v1.initSwitchCodeStepper = function () {
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.switchCodeStepper.value = com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.switchCode;
var v1 = new Object();
v1.change = function (eventObj) {
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.switchCode = eventObj.target.value;
};
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.switchCodeStepper.addEventListener('change', v1);
};
v1.initMoveablePlatformInputs = function () {
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.startStepper.value = com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.start;
var v3 = new Object();
v3.change = function (eventObj) {
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.updateStartPos(eventObj.target.value);
};
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.startStepper.addEventListener('change', v3);
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.startStepper.maximum = com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.range;
if (com.homestarrunner.stinkoman.editor.PropertyInspector._mc.startStepper.value > com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.range) {
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.startStepper.value = com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.range;
}
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.rangeStepper.value = com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.range;
var v2 = new Object();
v2.change = function (eventObj) {
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.updateRangeLife(eventObj.target.value);
eventObj.target._parent.startStepper.maximum = eventObj.target.value;
if (eventObj.target._parent.startStepper.value > eventObj.target.value) {
eventObj.target._parent.startStepper.value = eventObj.target.value;
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.updateStartPos(eventObj.target.value);
}
};
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.rangeStepper.addEventListener('change', v2);
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.forwardCheckbox.selected = com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.dir == 1;
var v5 = new Object();
v5.click = function (eventObj) {
if (eventObj.target.selected) {
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.dir = 1;
} else {
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.dir = -1;
}
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.updateArrowDir();
};
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.forwardCheckbox.addEventListener('click', v5);
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.editor.PropertyInspector._mc.axis.length) {
if ((com.homestarrunner.stinkoman.editor.PropertyInspector._mc.axis.getItemAt(v1)).data == com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.axis) {
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.axis.selectedIndex = v1;
break;
}
++v1;
}
var v4 = new Object();
v4.change = function (eventObj) {
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.resetAxis(eventObj.target.value);
};
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.axis.addEventListener('change', v4);
};
v1.initFacingDirDropdown = function () {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.editor.PropertyInspector._mc.facingDir.length) {
if ((com.homestarrunner.stinkoman.editor.PropertyInspector._mc.facingDir.getItemAt(v1)).data == com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.facingDir) {
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.facingDir.selectedIndex = v1;
break;
}
++v1;
}
var v2 = new Object();
v2.change = function (eventObj) {
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.facingDir = eventObj.target.value;
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.applyFacingDir();
};
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.facingDir.addEventListener('change', v2);
};
v1.initShooterSteppers = function () {
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.xStepper.value = com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.newXSpeed;
var v2 = new Object();
v2.change = function (eventObj) {
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.newXSpeed = eventObj.target.value;
};
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.xStepper.addEventListener('change', v2);
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.yStepper.value = com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.newYSpeed;
var v1 = new Object();
v1.change = function (eventObj) {
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.newYSpeed = eventObj.target.value;
};
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.yStepper.addEventListener('change', v1);
};
v1.initShooterEnemySteppers = function () {
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.xStepper.value = com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.velX;
var v2 = new Object();
v2.change = function (eventObj) {
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.velX = eventObj.target.value;
};
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.xStepper.addEventListener('change', v2);
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.yStepper.value = com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.velY;
var v1 = new Object();
v1.change = function (eventObj) {
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.velY = eventObj.target.value;
};
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.yStepper.addEventListener('change', v1);
};
v1.initShotsStepper = function () {
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.switchCodeStepper.value = com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.switchCode;
var v1 = new Object();
v1.change = function (eventObj) {
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj.switchCode = eventObj.target.value;
};
com.homestarrunner.stinkoman.editor.PropertyInspector._mc.switchCodeStepper.addEventListener('change', v1);
};
v1.initStepper = function (stepperComponent, paramName) {
stepperComponent.value = com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj[paramName];
var v1 = new Object();
v1.change = function (eventObj) {
com.homestarrunner.stinkoman.editor.PropertyInspector.currentObj[paramName] = Number(eventObj.target.value);
};
stepperComponent.addEventListener('change', v1);
};
ASSetPropFlags(com.homestarrunner.stinkoman.editor.PropertyInspector.prototype, null, 1);
}
#endinitclip
}
movieClip 2817 __Packages.com.homestarrunner.stinkoman.effect.CameraEffectPan {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.effect) {
_global.com.homestarrunner.stinkoman.effect = new Object();
}
if (!_global.com.homestarrunner.stinkoman.effect.CameraEffectPan) {
var v1 = function (p_mc, pTargetX, pTargetY, pUpdateSpeed, pCallback) {
super(p_mc);
this.targetX = pTargetX;
this.targetY = pTargetY;
this.updateSpeed = pUpdateSpeed;
this.callback = pCallback;
};
com.homestarrunner.stinkoman.effect.CameraEffectPan = v1;
com.homestarrunner.stinkoman.effect.CameraEffectPan extends com.homestarrunner.stinkoman.effect.CameraEffect;
var v2 = v1.prototype;
v2.update = function () {
var v3 = (com.homestarrunner.stinkoman.StinkoGame.viewBox.r - com.homestarrunner.stinkoman.StinkoGame.viewBox.l) / 2;
var v4 = this._mc._x + com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc._x;
var v2 = false;
if (v4 < v3 - this.updateSpeed) {
v2 = com.homestarrunner.stinkoman.StinkoGame.nudge(this.updateSpeed, 0);
if (v2) {
com.homestarrunner.stinkoman.StinkoGame.player1._mc._x += this.updateSpeed;
}
} else {
if (v4 > v3 + this.updateSpeed) {
v2 = com.homestarrunner.stinkoman.StinkoGame.nudge(-this.updateSpeed, 0);
if (v2) {
com.homestarrunner.stinkoman.StinkoGame.player1._mc._x -= this.updateSpeed;
}
}
}
if (!v2) {
this.kill();
}
};
v2.kill = function () {
this.callback();
delete this._mc.onEnterFrame;
false;
};
ASSetPropFlags(com.homestarrunner.stinkoman.effect.CameraEffectPan.prototype, null, 1);
}
#endinitclip
}
movieClip 2818 __Packages.com.homestarrunner.stinkoman.util.SeamlessScroll {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.util) {
_global.com.homestarrunner.stinkoman.util = new Object();
}
if (!_global.com.homestarrunner.stinkoman.util.SeamlessScroll) {
var v1 = function (libraryName, targetClip, vert, horiz, overlap, viewBox) {
var v15 = this;
this.libraryName = libraryName;
this.vert = vert;
this.horiz = horiz;
this.overlap = overlap;
this.updateCounterX = 0;
this.updateCounterY = 0;
this.parentClip = targetClip;
if (viewBox == undefined) {
viewBox = new Object({'l': 0, 'r': _root._width, 't': 0, 'b': _root._height});
}
viewBox.w = viewBox.r - viewBox.l;
viewBox.h = viewBox.b - viewBox.t;
this.viewBox = viewBox;
this.depthCounter = 0;
this.panelClips = new Array();
this.panelMatrix = [];
var v8 = this.parentClip.attachMovie(libraryName, 'clp' + this.depthCounter, this.depthCounter++);
if (v8._name == undefined) {
trace('Warning: Seamless scroll was unable to attach a movie clip called ' + libraryName + ' to ' + targetClip._name);
return undefined;
}
this.xSpacing = Math.floor(v8._width) - overlap;
this.ySpacing = Math.floor(v8._height) - overlap;
v8.removeMovieClip();
this.numberClipsWide = 1;
if (horiz) {
this.numberClipsWide = Math.ceil(viewBox.w / this.xSpacing) + 2;
}
this.numberClipsHigh = 1;
if (vert) {
this.numberClipsHigh = Math.ceil(viewBox.h / this.ySpacing) + 2;
}
trace('SeamlessScroll: numberClipsHigh = ' + this.numberClipsHigh + ', numberClipsWide = ' + this.numberClipsWide);
var v5 = 0;
while (v5 < this.numberClipsHigh) {
this.panelMatrix.push([]);
var v3 = 0;
while (v3 < this.numberClipsWide) {
var v4 = this.parentClip.attachMovie(libraryName, 'clp' + this.depthCounter, this.depthCounter++);
this.panelClips.push(v4);
this.panelMatrix[v5].push(v4);
++v3;
}
++v5;
}
this.updatePositions();
};
com.homestarrunner.stinkoman.util.SeamlessScroll = v1;
var v2 = v1.prototype;
v2.updatePositions = function () {
var v5 = 0;
if (this.horiz) {
v5 = this.xPosition % this.xSpacing;
if (v5 > 0) {
v5 -= this.xSpacing;
}
v5 -= this.xSpacing;
}
var v4 = 0;
if (this.vert) {
v4 = this.yPosition % this.ySpacing;
if (v4 > 0) {
v4 -= this.ySpacing;
}
v4 -= this.ySpacing;
}
var v3 = 0;
while (v3 < this.panelMatrix.length) {
var v2 = 0;
while (v2 < this.panelMatrix[0].length) {
this.panelMatrix[v3][v2]._x = v5 + v2 * this.xSpacing;
this.panelMatrix[v3][v2]._y = v4 + v3 * this.ySpacing;
++v2;
}
++v3;
}
};
v2.remove = function () {
for (var v2 in this.panelClips) {
this.panelClips[v2].removeMovieClip();
}
delete this.parentClip.onEnterFrame;
};
v2.nudge = function (x, y) {
if (this.horiz) {
this.xPosition += x;
}
if (this.vert) {
this.yPosition += y;
}
this.updatePositions();
};
v2.xPosition = 0;
v2.yPosition = 0;
ASSetPropFlags(com.homestarrunner.stinkoman.util.SeamlessScroll.prototype, null, 1);
}
#endinitclip
}
movieClip 2819 __Packages.com.homestarrunner.stinkoman.player.PlayerWithFist {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.player) {
_global.com.homestarrunner.stinkoman.player = new Object();
}
if (!_global.com.homestarrunner.stinkoman.player.PlayerWithFist) {
var v1 = function (p_mc) {
super(p_mc);
this.defaultJumpHeight = 8;
this.jumpHeight = 8;
this.blockingLava = false;
this.overhead = false;
this._mc.mPlayerWithFist = this;
};
com.homestarrunner.stinkoman.player.PlayerWithFist = v1;
com.homestarrunner.stinkoman.player.PlayerWithFist extends com.homestarrunner.stinkoman.player.Player;
var v2 = v1.prototype;
v2.moveRight = function () {
this.facingDir = 'right';
if (this.climbing) {
return undefined;
}
this._mc.animator_mc.play();
this.xVel += this.incrSpeed;
if (this.xVel > this.maxSpeed.x) {
this.xVel = this.maxSpeed.x;
}
};
v2.moveLeft = function () {
this.facingDir = 'left';
if (this.climbing) {
return undefined;
}
this._mc.animator_mc.play();
this.xVel -= this.incrSpeed;
if (this.xVel < -this.maxSpeed.x) {
this.xVel = -this.maxSpeed.x;
}
};
v2.climbUp = function () {};
v2.climbDown = function () {};
v2.jump = function () {
this.soundMaker.attachSound('stinko_maybejump2.wav');
this.soundMaker.start();
this.jumpButtonDown = true;
this.jumping = true;
if (!this.climbing) {
this.yVel -= this.jumpHeight;
}
this.climbing = false;
};
v2.punchGround = function (punchGroundTest_mc) {
if (!com.homestarrunner.stinkoman.stageobject.Platform.hit(punchGroundTest_mc)) {
return undefined;
}
var v7 = new com.homestarrunner.stinkoman.effect.CameraEffectShake(_root, 5, 4);
var v4 = com.homestarrunner.stinkoman.StinkoGame.getPlayerGlobal();
var v3 = v4.x;
if (this.facingDir == 'left') {
v3 -= 60;
} else {
v3 += 40;
}
var v5 = v4.y + 10;
var v6 = new com.homestarrunner.stinkoman.bullet.BulletAvalanche(v3, v5);
com.homestarrunner.stinkoman.stageobject.enemy.EnemyLavaHider.flipAll();
};
v2.punch = function () {
if (this.jumping) {
} else {
if (Math.abs(this.xVel) > 1) {
this._mc.gotoAndStop('runpunch_' + this.facingDir);
} else {
this._mc.gotoAndStop('punch_' + this.facingDir);
}
}
this._mc.animator_mc.play();
this.punching = true;
this.testForPunchHit();
};
v2.update = function () {
if (this.enabled) {
this.updateCounters();
this.testForLavaBlock();
this.testForBulletBlock();
var v7 = '';
if (this.overhead) {
this.resetBoredCounter();
v7 = 'lava_';
}
if (this.jumping) {
this.xVel *= this.jumpDeceleration;
} else {
this.xVel *= this.deceleration;
}
if (this.xVel < 0.1 && this.xVel > 0 || this.xVel > -0.1 && this.xVel < 0) {
this.xVel = 0;
}
if (this.hitRecoverCounter <= 0 && !this.punching && !this.climbing && !this.bored) {
if (!this.jumping) {
this._mc.gotoAndStop(v7 + 'run_' + this.facingDir);
} else {
if (Math.abs(this.xVel) > 1) {
this._mc.gotoAndStop('spin_' + this.facingDir);
} else {
this._mc.gotoAndStop('jump_' + this.facingDir);
}
}
}
this.acceptPlayerInput();
this.testForPlayerHurt();
if (!this.climbing) {
if (this.yVel < this.maxSpeed.y) {
this.yVel += this.gravity;
}
}
this.move(this.xVel, 0);
var v5 = com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc.hitTestHurt_mc);
if (v5 != undefined) {
this.move(-this.xVel, 0);
}
var v9 = com.homestarrunner.stinkoman.stageobject.Wall.hit(this._mc.hitTestHurt_mc);
if (v9 != undefined) {
this.move(-this.xVel, 0);
}
this.move(0, this.yVel);
if (!this.climbing || this.yVel > 0) {
var v3 = com.homestarrunner.stinkoman.stageobject.Platform.hit(this._mc.hitTestWalk_mc);
if (v3 == undefined) {
v3 = com.homestarrunner.stinkoman.stageobject.MoveablePlatform.hitWalkies(this._mc.hitTestWalk_mc);
}
var v2 = com.homestarrunner.stinkoman.stageobject.YMovingPlatform.hit(this._mc.hitTestWalk_mc);
if (v2 == undefined) {
v2 = com.homestarrunner.stinkoman.stageobject.XMovingPlatform.hit(this._mc.hitTestWalk_mc);
}
var v6;
if (v3 != undefined) {
v6 = new Object({'x': v3._x, 'y': v3._y});
v3._parent.localToGlobal(v6);
this._mc._parent.globalToLocal(v6);
}
var v4 = new Object({'x': v2._mc._x, 'y': v2._mc._y});
v2._mc._parent.localToGlobal(v4);
this._mc._parent.globalToLocal(v4);
if (this.yVel > 0) {
if (v2 != undefined) {
if (v2.classType == 'YMovingPlatform') {
this.yVel = v2.vel;
} else {
this.yVel = 0;
this.move(v2.vel, 0);
}
this.move(0, v4.y - this._mc._y);
if (this.jumping) {
this.soundMaker.attachSound('stinko_land.wav');
this.soundMaker.start();
var v8 = com.homestarrunner.stinkoman.stageobject.Switch.hit(this._mc.hitTestWalk_mc);
if (v8 != undefined) {
v8.activate();
} else {}
}
this.jumping = false;
} else {
if (v3 != undefined) {
this.yVel = 0;
this.move(0, v6.y - this._mc._y);
if (this.jumping) {
this.soundMaker.attachSound('stinko_land.wav');
this.soundMaker.start();
var v8 = com.homestarrunner.stinkoman.stageobject.Switch.hit(this._mc.hitTestLadderBottom_mc);
if (v8 != undefined) {
v8.activate();
} else {}
}
this.jumping = false;
this.climbing = false;
} else {
if (!this.climbing) {
this.jumping = true;
}
if (this._mc._y > 500) {
this.endLife();
}
}
}
} else {
v5 = com.homestarrunner.stinkoman.stageobject.Obstacle.hit(this._mc.hitTestHurt_mc);
if (v5 != undefined) {
this.move(0, -this.yVel);
this.yVel = -this.yVel / 2;
}
if (v2) {
if (v2.classType == 'YMovingPlatform') {
this.move(0, v4.y - this._mc._y);
this.yVel = v2.vel;
this.jumping = false;
} else {
this.move(v2.vel, 0);
}
}
}
if (com.homestarrunner.stinkoman.stageobject.Wall.hit(this._mc.hitTestHurt_mc)) {
this.move(0, -this.yVel);
}
}
if (this.climbing) {
if (!this.punching) {
if (com.homestarrunner.stinkoman.stageobject.Ladder.hit(this._mc.hitTestLadderTop_mc) == undefined) {
this._mc.gotoAndStop('butt');
} else {
this._mc.gotoAndStop('climb');
}
if (Math.abs(this.yVel) > 0) {
this._mc.animator_mc.play();
} else {
this._mc.animator_mc.stop();
}
}
if (!com.homestarrunner.stinkoman.stageobject.Ladder.hit(this._mc)) {
this.climbing = false;
if (this.yVel > 0) {
}
}
this.yVel = 0;
} else {
if (!Key.isDown(39) && !Key.isDown(37) && !this.jumping && !this.punching && this.hitRecoverCounter <= 0) {
if (!this.bored) {
this._mc.gotoAndStop(v7 + 'wait_' + this.facingDir);
}
}
}
if (this._mc.hitTestLadderTop_mc == undefined) {
this.yVel = 0;
}
}
};
v2.endLife = function () {
com.homestarrunner.stinkoman.StinkoGame.loseLife(false);
};
v2.testForPlayerHurt = function () {
if (this.invincibleCounter > 0) {
return undefined;
}
var v2 = com.homestarrunner.stinkoman.stageobject.enemy.Enemy.anyPlayerDangerTest(this._mc.hitTestHurt_mc);
if (v2 == undefined) {
v2 = com.homestarrunner.stinkoman.stageobject.Hazard.anyPlayerDangerTest(this._mc.hitTestHurt_mc);
}
if (v2 == undefined) {
v2 = com.homestarrunner.stinkoman.stageobject.Trap.anyPlayerDangerTest(this._mc.hitTestHurt_mc);
}
if (v2 == undefined) {
v2 = com.homestarrunner.stinkoman.bullet.Bullet.anyPlayerDangerTest(this._mc.hitTestHurt_mc);
}
if (v2 == undefined) {
v2 = com.homestarrunner.stinkoman.StinkoGame.bossMan.playerDangerTest(this._mc.hitTestHurt_mc);
}
if (v2 == undefined) {
return undefined;
} else {
if (v2.classType == 'Hazard' && v2.subType < 4) {
com.homestarrunner.stinkoman.struct.GlobalData.hits = 0;
}
if (v2.classType == 'Bullet') {
this.takeDamage(v2._mc._x < this._mc._x + this._mc._width / 2);
} else {
if (v2._mc._x + v2._mc._width / 2 > (this.getStageCoords()).x + this._mc._width / 2) {
this.takeDamage(true);
} else {
this.takeDamage(false);
}
}
}
};
v2.testForLavaBlock = function () {
var v2;
v2 = com.homestarrunner.stinkoman.stageobject.LavaFall.hit(this._mc.hitTestHurt_mc);
if (v2 != undefined) {
this.overhead = true;
this.blockLava(v2);
} else {
this.overhead = false;
v2 = com.homestarrunner.stinkoman.stageobject.LavaFall.hit(this._mc.animator_mc.fist_mc);
if (v2 != undefined) {
this.blockLava(v2);
} else {
com.homestarrunner.stinkoman.stageobject.LavaFall.noneAreBlocked();
}
}
};
v2.blockLava = function (lavaHit) {
this.blockingLava = true;
var v2 = new Object();
v2.x = 0;
v2.y = this._mc.animator_mc.fist_mc._y;
this._mc.animator_mc.localToGlobal(v2);
lavaHit._mc.globalToLocal(v2);
if (this.overhead) {
v2.y += 5;
}
lavaHit.block(v2.y);
};
v2.testForPunchHit = function () {
var v4 = com.homestarrunner.stinkoman.stageobject.enemy.Enemy.anyHurtByPlayerTest(this._mc.animator_mc.fist_mc);
var v2 = 0;
while (v2 < v4.length) {
var v3;
if (this.facingDir == 'right') {
v3 = 1;
} else {
v3 = -1;
}
v4[v2].takeDamage(v3, -1);
++v2;
}
};
v2.testForBulletBlock = function () {
var v2 = com.homestarrunner.stinkoman.bullet.Bullet.anyPlayerDangerTest(this._mc.animator_mc.fist_mc);
if (v2 != undefined) {
v2.deflect();
}
};
v2.takeDamage = function (fromRight) {
this.hitRecoverCounter = 24;
this.invincibleCounter = 48;
if (!this.climbing) {
if (fromRight) {
this.xVel = -20;
} else {
this.xVel = 20;
}
}
this.jumping = false;
this.climbing = false;
this._mc.gotoAndStop('hit_' + this.facingDir);
this._mc.animator_mc.play();
--com.homestarrunner.stinkoman.struct.GlobalData.hits;
com.homestarrunner.stinkoman.ui.Interface.update();
if (com.homestarrunner.stinkoman.struct.GlobalData.hits <= 0) {
this.endLife();
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.player.PlayerWithFist.prototype, null, 1);
}
#endinitclip
}
movieClip 2820 __Packages.com.homestarrunner.stinkoman.bullet.BulletAvalanche {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.bullet) {
_global.com.homestarrunner.stinkoman.bullet = new Object();
}
if (!_global.com.homestarrunner.stinkoman.bullet.BulletAvalanche) {
var v1 = function (start_x, start_y) {
super('Bullet3', start_x, start_y, 0, 10, 0);
};
com.homestarrunner.stinkoman.bullet.BulletAvalanche = v1;
com.homestarrunner.stinkoman.bullet.BulletAvalanche extends com.homestarrunner.stinkoman.bullet.BulletFriendly;
var v2 = v1.prototype;
v2.subClassUpdate = function () {};
v2.avalancheMakeHomestarHappy = function () {
com.homestarrunner.stinkoman.StinkoGame.oneUp.makeHappy();
};
v2.gravity = 0;
v1.depthCount = 0;
ASSetPropFlags(com.homestarrunner.stinkoman.bullet.BulletAvalanche.prototype, null, 1);
}
#endinitclip
}
movieClip 2821 __Packages.com.homestarrunner.stinkoman.player.PlayerOneUp {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.player) {
_global.com.homestarrunner.stinkoman.player = new Object();
}
if (!_global.com.homestarrunner.stinkoman.player.PlayerOneUp) {
var v1 = function (p_mc) {
super(p_mc);
this.maxSpeed.x = 4.2;
this.defaultJumpHeight = 24;
this.jumpHeight = 24;
this.climbVelocity = 2.2;
};
com.homestarrunner.stinkoman.player.PlayerOneUp = v1;
com.homestarrunner.stinkoman.player.PlayerOneUp extends com.homestarrunner.stinkoman.player.Player;
var v2 = v1.prototype;
v2.punch = function () {
if (this.climbing) {
this._mc.gotoAndStop('climbpunch_' + this.facingDir);
} else {
if (this.jumping) {
this._mc.gotoAndStop('jumppunch_' + this.facingDir);
} else {
if (Math.abs(this.xVel) > 1) {
this._mc.gotoAndStop('runpunch_' + this.facingDir);
} else {
this._mc.gotoAndStop('punch_' + this.facingDir);
}
}
}
this._mc.animator_mc.play();
this.punching = true;
if (!this.jumping) {
this.xVel = 0;
}
this.testForPunchHit();
};
v2.testForPunchHit = function () {
var v4 = com.homestarrunner.stinkoman.stageobject.enemy.Enemy.anyHurtByPlayerTest(this._mc.animator_mc.kick_mc);
var v3 = 0;
while (v3 < v4.length) {
var v2;
if (this.jumping || Math.abs(this.xVel) > 1) {
if (this._mc.animator_mc._currentframe < 5) {
v2 = 1;
} else {
v2 = -1;
}
} else {
if (this.facingDir == 'right') {
v2 = 1;
} else {
v2 = -1;
}
}
v4[v3].takeDamage(v2, -1);
++v3;
}
var v5 = com.homestarrunner.stinkoman.StinkoGame.bossMan.hurtByPlayerTest(this._mc.animator_mc.kick_mc);
if (v5 != undefined) {
v5.takeDamage();
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.player.PlayerOneUp.prototype, null, 1);
}
#endinitclip
}
movieClip 2822 __Packages.com.homestarrunner.stinkoman.player.PlayerIce {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.player) {
_global.com.homestarrunner.stinkoman.player = new Object();
}
if (!_global.com.homestarrunner.stinkoman.player.PlayerIce) {
var v1 = function (p_mc) {
super(p_mc);
this.defaultDeceleration = 0.96;
this.deceleration = 0.96;
this.incrSpeedIce = 0.2;
this._mc.mPlayer = this;
};
com.homestarrunner.stinkoman.player.PlayerIce = v1;
com.homestarrunner.stinkoman.player.PlayerIce extends com.homestarrunner.stinkoman.player.Player;
var v2 = v1.prototype;
v2.moveRight = function () {
this.facingDir = 'right';
if (this.climbing) {
return undefined;
}
this._mc.animator_mc.play();
if (this.jumping) {
this.xVel += this.incrSpeed;
} else {
this.xVel += this.incrSpeedIce;
}
if (this.xVel > this.maxSpeed.x) {
this.xVel = this.maxSpeed.x;
}
};
v2.moveLeft = function () {
this.facingDir = 'left';
if (this.climbing) {
return undefined;
}
this._mc.animator_mc.play();
if (this.jumping) {
this.xVel -= this.incrSpeed;
} else {
this.xVel -= this.incrSpeedIce;
}
if (this.xVel < -this.maxSpeed.x) {
this.xVel = -this.maxSpeed.x;
}
};
v2.takeDamage = function (fromRight, hitVal) {
if (hitVal == undefined) {
hitVal = 1;
}
if (com.homestarrunner.stinkoman.struct.GlobalData.bossLevel()) {
fromRight = true;
}
this.hitRecoverCounter = 24;
this.invincibleCounter = 48;
if (!this.climbing) {
if (fromRight) {
this.xVel = -5;
} else {
this.xVel = 5;
}
}
this.yVel = -8;
this.jumping = false;
this.climbing = false;
this._mc.gotoAndStop('hit_' + this.facingDir);
this._mc.animator_mc.play();
com.homestarrunner.stinkoman.struct.GlobalData.hits -= hitVal;
com.homestarrunner.stinkoman.ui.Interface.update();
if (com.homestarrunner.stinkoman.struct.GlobalData.hits <= 0) {
this.endLife();
}
};
v2.updateBored = function () {
++this.boredCounter;
if (this.boredCounter > 20 && !this.bored) {
this.bored = true;
this._mc.gotoAndStop('bored_ice_' + this.facingDir);
}
};
v2.getHitFrozen = function () {
if (this.isFrozen) {
return undefined;
}
this._mc.gotoAndStop('bored_ice_' + this.facingDir);
this._mc.animator_mc.gotoAndPlay('freeze');
this.getFrozen();
this.bored = true;
};
v2.getFrozen = function () {
this.isFrozen = true;
};
v2.getUnfrozen = function () {
this.isFrozen = false;
this.takeDamage(!this.facingDir);
};
ASSetPropFlags(com.homestarrunner.stinkoman.player.PlayerIce.prototype, null, 1);
}
#endinitclip
}
movieClip 2823 __Packages.com.homestarrunner.stinkoman.player.PlayerBeefy {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.player) {
_global.com.homestarrunner.stinkoman.player = new Object();
}
if (!_global.com.homestarrunner.stinkoman.player.PlayerBeefy) {
var v1 = function (p_mc) {
super(p_mc);
this.jumpHeight = 25;
};
com.homestarrunner.stinkoman.player.PlayerBeefy = v1;
com.homestarrunner.stinkoman.player.PlayerBeefy extends com.homestarrunner.stinkoman.player.Player;
var v2 = v1.prototype;
ASSetPropFlags(com.homestarrunner.stinkoman.player.PlayerBeefy.prototype, null, 1);
}
#endinitclip
}
movieClip 2824 __Packages.com.homestarrunner.stinkoman.stageobject.boss.Boss {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss) {
_global.com.homestarrunner.stinkoman.stageobject.boss = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss.Boss) {
var v1 = function (parent_mc, symbolName) {
this._mc = parent_mc.attachMovie(symbolName, 'boss', 1);
this.classType = 'Boss';
this.maxVelY = 0;
this.maxVelX = -1.5;
this.velX = 0;
this.velY = 0;
this.hitPoints = 5;
this.invincibleCounter = 0;
this.invincibleCounterReset = 24;
this.initHurtFlasher(this._mc);
var thisBoss = this;
this._mc.onEnterFrame = function () {
thisBoss.updateCounters();
thisBoss.update();
};
this.dead = false;
};
com.homestarrunner.stinkoman.stageobject.boss.Boss = v1;
var v2 = v1.prototype;
v2.takeDamage = function (x, y) {
trace('Boss::takeDamage');
if (this.invincibleCounter == 0) {
--this.hitPoints;
this.invincibleCounter = this.invincibleCounterReset;
}
if (this.hitPoints <= 0) {
this.die(x, y);
}
this.takeDamageSubclass();
};
v2.takeDamageSubclass = function () {};
v2.die = function (x, y) {
trace('Boss:die()');
var thisBoss = this;
this.dead = true;
com.homestarrunner.stinkoman.struct.GlobalData.markCurrentLevelAsDone();
this._mc.onEnterFrame = function () {
thisBoss.updateDead();
};
this.clearHurtFlasher();
this._mc.animator_mc.gotoAndPlay('die');
this.animateDeath();
this.velX = 0;
this.velY = 0;
this.deadAnimateCounter = 30;
com.homestarrunner.stinkoman.StinkoGame.gameSound.stop();
};
v2.animateDeath = function () {};
v2.doneDying = function () {
com.homestarrunner.stinkoman.StinkoGame.player1._mc.gotoAndStop('happy');
com.homestarrunner.stinkoman.StinkoGame.inProgress = false;
com.homestarrunner.stinkoman.StinkoGame.player1.enabled = false;
com.homestarrunner.stinkoman.StinkoGame.gameSound.stop();
};
v2.update = function () {};
v2.updateCounters = function () {
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
};
v2.updateDead = function () {};
v2.hurtByPlayerTest = function (test_mc) {
return this._mc.hurtByPlayer_mc.hitTest(test_mc) && this.invincibleCounter <= 0;
};
v2.playerDangerTest = function (test_mc) {
return undefined;
};
v2.updateHurtFlasher = function () {
--this.hurtFlashCounter;
if (this.hurtFlashCounter == 0) {
if ((this.hurtFlashColor.getTransform()).ra == 100) {
this.hurtFlashColor.setTransform(this.hurtFlashTrans);
} else {
this.hurtFlashColor.setTransform({'ra': 100, 'ga': 100, 'ba': 100, 'rb': 0});
}
this.hurtFlashCounter = 3;
}
};
v2.clearHurtFlasher = function () {
this.hurtFlashColor.setTransform({'ra': 100, 'rb': 0, 'ga': 100, 'ba': 100});
this.hurtFlashCounter = 3;
};
v2.initHurtFlasher = function (clip_mc) {
if (clip_mc == undefined) {
clip_mc = this._mc;
}
this.hurtFlashTrans = new Object();
this.hurtFlashColor = new Color(clip_mc);
this.hurtFlashTrans.ra = 39;
this.hurtFlashTrans.ga = 39;
this.hurtFlashTrans.ba = 39;
this.hurtFlashTrans.rb = 156;
this.hurtFlashCounter = 3;
};
v2.stop = function () {
delete this._mc.onEnterFrame;
};
v2.invincibleCounterReset = 24;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.boss.Boss.prototype, null, 1);
}
#endinitclip
}
movieClip 2825 __Packages.com.homestarrunner.stinkoman.stageobject.boss.BossBrain {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss) {
_global.com.homestarrunner.stinkoman.stageobject.boss = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss.BossBrain) {
var v1 = function (parent_mc) {
super(parent_mc, 'bossBrain_mc');
this._mc.myBoss = this;
this.movePattArr = new Array(1, 2, 3, 4, 3, 5, 1, 2, 3, 4, 3, 6);
this.pattIndex = -1;
this._mc._x = -200;
this._mc._y = 10;
this.velX = 10;
this.velY = 0;
this.hitPoints = 7;
this.movementPhase = 0;
this.flashLength = 30;
};
com.homestarrunner.stinkoman.stageobject.boss.BossBrain = v1;
com.homestarrunner.stinkoman.stageobject.boss.BossBrain extends com.homestarrunner.stinkoman.stageobject.boss.Boss;
var v2 = v1.prototype;
v2.update = function () {
this._mc._x += this.velX;
this._mc._y += this.velY;
if (this.dead || this.hitPoints <= 0) {
return undefined;
}
switch (this.movementPhase) {
case 0:
if (this._mc._x > 350) {
this.facingDir = 'left';
this._mc.gotoAndStop('left');
this.startNewPhase();
}
break;
case 1:
this.updateHover();
break;
case 2:
if (this._mc._y >= 150) {
this.startNewPhase();
}
break;
case 3:
this.updateShoot();
break;
case 4:
if (this._mc._y <= 10) {
this.startNewPhase();
}
break;
case 5:
if (this._mc._x < 20) {
this.facingDir = 'right';
this._mc.gotoAndStop('right');
this.startNewPhase();
}
break;
case 6:
if (this._mc._x > 350) {
this.facingDir = 'left';
this._mc.gotoAndStop('left');
this.startNewPhase();
}
break;
default:
}
};
v2.startNewPhase = function () {
this.velY = 0;
this.velX = 0;
++this.pattIndex;
if (this.pattIndex >= this.movePattArr.length) {
this.pattIndex = 0;
}
this.movementPhase = this.movePattArr[this.pattIndex];
switch (this.movePattArr[this.pattIndex]) {
case 1:
this.startHover();
break;
case 2:
this.startDescend();
break;
case 3:
this.startShoot();
break;
case 4:
this.startAscend();
break;
case 5:
this.velX = -25 + this.hitPoints;
break;
case 6:
this.velX = 25 - this.hitPoints;
}
};
v2.updateHover = function () {
if (this._mc._y > 30) {
this.velY -= 2;
} else {
this.velY += 2;
}
--this.nextPhaseTimer;
if (this.nextPhaseTimer == 0) {
this.startNewPhase();
}
};
v2.startHover = function () {
this.velY = 2;
this.nextPhaseTimer = 48;
};
v2.startDescend = function () {
this.velY = 14 - this.hitPoints;
};
v2.startShoot = function () {
if (this.dead) {
return undefined;
}
this.nextPhaseTimer = this.flashLength;
this.waitingToShoot = false;
this._mc.animator_mc.gotoAndPlay('flash');
};
v2.updateShoot = function () {
if (this.dead) {
return undefined;
}
--this.nextPhaseTimer;
if (this.nextPhaseTimer == 0) {
if (!this.waitingToShoot) {
this.waitingToShoot = true;
this.nextPhaseTimer = this.flashLength;
this._mc.animator_mc.gotoAndPlay('shoot');
} else {
this.startNewPhase();
}
}
};
v2.startAscend = function () {
this.velY = -14 + this.hitPoints;
};
v2.shootBullets = function () {
var v3 = new Object({'x': this._mc.hurtByPlayer_mc._x, 'y': this._mc.hurtByPlayer_mc._y});
this._mc.localToGlobal(v3);
_root.bullet_mc.globalToLocal(v3);
if (this.facingDir == 'left') {
var v7 = new com.homestarrunner.stinkoman.bullet.Bullet('brainBossFire_mc', v3.x - 10, v3.y - 10, -10, 6, false, 0);
var v6 = new com.homestarrunner.stinkoman.bullet.Bullet('brainBossFire_mc', v3.x, v3.y, -10, 8, false, 0);
var v5 = new com.homestarrunner.stinkoman.bullet.Bullet('brainBossFire_mc', v3.x, v3.y, -10, 0, false, 0);
var v4 = new com.homestarrunner.stinkoman.bullet.Bullet('brainBossFire_mc', v3.x + 10, v3.y + 10, -10, 10, false, 0);
} else {
var v7 = new com.homestarrunner.stinkoman.bullet.Bullet('brainBossFire_mc', v3.x + 10, v3.y - 10, 10, 6, false, 0);
var v6 = new com.homestarrunner.stinkoman.bullet.Bullet('brainBossFire_mc', v3.x, v3.y, 10, 8, false, 0);
var v5 = new com.homestarrunner.stinkoman.bullet.Bullet('brainBossFire_mc', v3.x, v3.y, 10, 0, false, 0);
var v4 = new com.homestarrunner.stinkoman.bullet.Bullet('brainBossFire_mc', v3.x - 10, v3.y + 10, 10, 10, false, 0);
}
};
v2.playerDangerTest = function (test_mc) {
if (this._mc.hitTestA.hitTest(test_mc) || this._mc.hitTestB.hitTest(test_mc)) {
return this;
} else {
return undefined;
}
};
v2.takeDamageSubclass = function () {
this.flashLength -= 5;
if (this.flashLength < 5) {
this.flashLength = 5;
}
};
v2.updateDead = function () {
if (this.dead) {
this._mc.animator_mc.gotoAndPlay('die');
delete this._mc.onEnterFrame;
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.boss.BossBrain.prototype, null, 1);
}
#endinitclip
}
movieClip 2826 __Packages.com.homestarrunner.stinkoman.stageobject.boss.BossChicken {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss) {
_global.com.homestarrunner.stinkoman.stageobject.boss = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss.BossChicken) {
var v1 = function (parent_mc) {
super(parent_mc, 'bossChicken_mc');
this.hitPoints = 5;
this.bodyParts = new Array();
this.legMode = new Array();
this._mc.myBoss = this;
this.bodyParts[0] = this._mc.legA_mc;
this.bodyParts[1] = this._mc.legB_mc;
this.bodyParts[2] = this._mc.legC_mc;
this.head = this._mc.head_mc;
var v3 = 0;
while (v3 < 3) {
this.bodyParts[v3].mID = v3;
this.bodyParts[v3].startY = this.bodyParts[v3]._y;
this.bodyParts[v3]._x = this.getRandomX();
this.legMode[v3] = 5;
++v3;
}
this.head._x = this.getRandomX();
this.legMode[0] = 0;
this.headMode = 5;
this.stompingLeftMax = 240;
this.stompingLeftCounter = 240;
this.headViewableMax = 60;
this.headViewableCounter = 60;
};
com.homestarrunner.stinkoman.stageobject.boss.BossChicken = v1;
com.homestarrunner.stinkoman.stageobject.boss.BossChicken extends com.homestarrunner.stinkoman.stageobject.boss.Boss;
var v2 = v1.prototype;
v2.update = function () {
var v2 = 0;
while (v2 < this.bodyParts.length) {
switch (this.legMode[v2]) {
case 0:
this.legEnter(v2);
break;
case 1:
this.legMoveAround(v2);
break;
case 2:
this.startStomp(v2);
break;
case 3:
break;
case 4:
this.legLeave(v2);
break;
default:
}
++v2;
}
--this.stompingLeftCounter;
if (this.headMode == 1) {
--this.headViewableCounter;
if (this.headViewableCounter < 0) {
this.headMode = 2;
this.head.gotoAndPlay('leave');
}
}
if (this.legMode[0] == 5 && this.legMode[1] == 5 && this.headMode == 5) {
this.head._x = this.getRandomX();
this.startHeadEnter();
this.headMode = 0;
}
};
v2.legEnter = function (legNum) {
this.bodyParts[legNum]._y += 5;
if (this.bodyParts[legNum]._y > this.bodyParts[legNum].startY + 85) {
++this.legMode[legNum];
this.bodyParts[legNum].target = this.getRandomX();
this.bodyParts[legNum].moveTilStompCounter = 3;
}
};
v2.legMoveAround = function (legNum) {
if (this.bodyParts[legNum]._x > this.bodyParts[legNum].target + 16) {
this.bodyParts[legNum]._x -= 15;
} else {
if (this.bodyParts[legNum]._x < this.bodyParts[legNum].target - 16) {
this.bodyParts[legNum]._x += 15;
} else {
this.bodyParts[legNum].target = this.getRandomX();
--this.bodyParts[legNum].moveTilStompCounter;
if (this.bodyParts[legNum].moveTilStompCounter < 0) {
++this.legMode[legNum];
}
}
}
};
v2.startStomp = function (legNum) {
this.bodyParts[legNum].gotoAndPlay('stomp');
++this.legMode[legNum];
};
v2.doneStomping = function (legNum) {
++this.legMode[legNum];
};
v2.legLeave = function (legNum) {
this.bodyParts[legNum]._y -= 5;
if (this.bodyParts[legNum]._y < this.bodyParts[legNum].startY) {
if (this.stompingLeftCounter < 0) {
this.legMode[legNum] = 5;
} else {
this.legMode[legNum] = 0;
this.bodyParts[legNum]._x = this.getRandomX();
}
}
};
v2.getRandomX = function () {
var v1 = Math.floor(com.homestarrunner.stinkoman.StinkoGame.viewBox.l + Math.random() * (com.homestarrunner.stinkoman.StinkoGame.viewBox.r - com.homestarrunner.stinkoman.StinkoGame.viewBox.l - 50));
return v1;
};
v2.startHeadEnter = function () {
this.head.gotoAndPlay('stomp');
++this.headMode;
};
v2.doneHeadEnter = function () {
this.headMode = 1;
};
v2.doneHeadLeave = function () {
this.stompingLeftCounter = this.stompingLeftMax;
this.headViewableCounter = this.headViewableMax;
if (!this.dead) {
this.headMode = 5;
this.bodyParts[0]._x = this.getRandomX();
this.legMode[0] = 0;
this.bodyParts[1]._x = this.getRandomX();
this.legMode[1] = 0;
} else {
this._mc.gotoAndPlay('boneShower');
}
};
v2.legModesAreFive = function () {
var v2 = 0;
while (v2 < this.bodyParts.length) {
if (this.legMode[v2] != 5) {
return false;
}
++v2;
}
return true;
};
v2.playerDangerTest = function (test_mc) {
var v2 = 0;
while (v2 < this.bodyParts.length) {
if (this.bodyParts[v2].footHT_mc.hitTest(test_mc) || this.bodyParts[v2].leg.hitTest(test_mc)) {
return this;
}
++v2;
}
if (this.head.headObj_mc.hitTest_mc.hitTest(test_mc)) {
return this;
}
return undefined;
};
v2.hurtByPlayerTest = function (test_mc) {
var v2 = this.head.headObj_mc.hurtTest_mc.hitTest(test_mc) && this.invincibleCounter <= 0;
if (v2) {
this.head.headObj_mc.gotoAndPlay('hit');
this.head.gotoAndPlay('leave');
this.headMode = 2;
this.headViewableMax -= 8;
}
return v2;
};
v2.stop = function () {
var v2 = 0;
while (v2 < this.bodyParts.length) {
this.bodyParts[v2].stop();
++v2;
}
delete this._mc.onEnterFrame;
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.boss.BossChicken.prototype, null, 1);
}
#endinitclip
}
movieClip 2827 __Packages.com.homestarrunner.stinkoman.stageobject.boss.BossWall {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss) {
_global.com.homestarrunner.stinkoman.stageobject.boss = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss.BossWall) {
var v1 = function (parent_mc) {
super(parent_mc, 'BossWall_mc');
this.hitPoints = 16;
this.reverseTimer = this.REVERSE_TIMER_LENGTH;
this.facingDir = 'right';
this.killCounter = 0;
};
com.homestarrunner.stinkoman.stageobject.boss.BossWall = v1;
com.homestarrunner.stinkoman.stageobject.boss.BossWall extends com.homestarrunner.stinkoman.stageobject.boss.Boss;
var v2 = v1.prototype;
v2.update = function () {
--this.reverseTimer;
if (this.reverseTimer <= 0) {
this.reverseBelt();
}
if (this._mc.conveyor_mc.hitTest(com.homestarrunner.stinkoman.StinkoGame.player1._mc)) {
if (this.facingDir == 'left') {
com.homestarrunner.stinkoman.StinkoGame.player1._mc._x -= 3;
} else {
com.homestarrunner.stinkoman.StinkoGame.player1._mc._x += 3;
}
}
};
v2.playerDangerTest = function (test_mc) {
if (this._mc.bossWallFists_mc.fist1.hitTest(test_mc) || this._mc.bossWallFists_mc.fist2.hitTest(test_mc)) {
return this;
}
return undefined;
};
v2.hurtByPlayerTest = function (test_mc) {
if (this._mc.wallSegments_mc.hitTest(test_mc) && this.invincibleCounter <= 0) {
return true;
}
};
v2.takeDamageSubclass = function () {
if (this.hitPoints % 4 == 0) {
++this.killCounter;
this._mc.wallSegments_mc.gotoAndPlay('kill' + this.killCounter);
}
};
v2.reverseBelt = function () {
if (this.facingDir == 'right') {
this.facingDir = 'left';
} else {
this.facingDir = 'right';
}
this._mc.belt_graphic_mc.gotoAndStop(this.facingDir);
this.reverseTimer = this.REVERSE_TIMER_LENGTH;
};
v2.updateDead = function () {
++this.deadCounter;
if (this.deadCounter > 10) {
com.homestarrunner.stinkoman.struct.GlobalData.subsublevel = 4;
_root.gotoAndStop('cutScene');
}
};
v2.REVERSE_TIMER_LENGTH = 128;
v2.deadCounter = 0;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.boss.BossWall.prototype, null, 1);
}
#endinitclip
}
movieClip 2828 __Packages.com.homestarrunner.stinkoman.stageobject.boss.BossSnake {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss) {
_global.com.homestarrunner.stinkoman.stageobject.boss = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss.BossSnake) {
var v1 = function (parent_mc) {
super(parent_mc, 'bossSnake_mc');
this.hitPoints = 15;
var thisSnake = this;
this.viewBox = com.homestarrunner.stinkoman.StinkoGame.viewBox;
this.applyFacingDir();
this.jumping = false;
this.waiting = true;
this.maxWaitCounter = 24;
this.waitCounter = 24;
this.segmentSpeed = 7;
this.shotCounter = 10;
this.gravity = 0.1;
this._mc.mBoss = this;
this.segments = new Array();
var v3 = 0;
while (v3 < 6) {
this.segments.push(this._mc['bodyPart' + v3]);
this.segments[v3].id = v3;
this.segments[v3].lastX = this.segments[v3]._x;
this.segments[v3].lastY = this.segments[v3]._y;
if (v3 == 0) {
this.segments[v3].onEnterFrame = function () {
this._x += (thisSnake._mc.head_mc._x + thisSnake._mc.head_mc._width / 2 - this.lastX) / thisSnake.segmentSpeed;
this._y += (thisSnake._mc.head_mc._y + thisSnake._mc.head_mc._height / 2 - this.lastY) / thisSnake.segmentSpeed;
this.lastX = this._x;
this.lastY = this._y;
};
} else {
this.segments[v3].onEnterFrame = function () {
this._x += (thisSnake.segments[this.id - 1]._x - this.lastX) / thisSnake.segmentSpeed;
this._y += (thisSnake.segments[this.id - 1]._y - this.lastY) / thisSnake.segmentSpeed;
this.lastX = this._x;
this.lastY = this._y;
};
}
++v3;
}
this._mc.froosh_mc._y = this.viewBox.t;
this._mc.froosh_mc._x = this.viewBox.l - 100;
this.frooshTimer = 48;
this._mc.froosh_mc.mBoss = this;
this.segmentsLeft = this.segments.length;
this.setPropertyOfAll('_x', -500);
this.setPropertyOfAll('_y', -500);
this.initHurtFlasher(this.segments[this.segmentsLeft - 1]);
};
com.homestarrunner.stinkoman.stageobject.boss.BossSnake = v1;
com.homestarrunner.stinkoman.stageobject.boss.BossSnake extends com.homestarrunner.stinkoman.stageobject.boss.Boss;
var v2 = v1.prototype;
v2.applyFacingDir = function () {
this._mc.head_mc.gotoAndStop(this.facingDir);
};
v2.updateCounters = function () {
if (this.waiting) {
--this.waitCounter;
}
if (this.waitCounter < 0) {
this.startJump();
this.waitCounter = this.maxWaitCounter + this.hitPoints;
}
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
this.updateHurtFlasher();
if (this.invincibleCounter == 0) {
this.clearHurtFlasher();
}
}
if (this.jumping) {
--this.shotCounter;
if (this.shotCounter == 0) {
this.shoot();
this.shotCounter = Math.floor(Math.random() * 10 + this.hitPoints) + 10;
}
}
if (!this.frooshBusy) {
--this.frooshTimer;
if (this.frooshTimer < 0) {
this.popFroosh();
this.frooshTimer = 30 - (15 - this.hitPoints);
}
}
};
v2.update = function () {
if (this.jumping) {
this._mc.head_mc._x += this.velX;
this._mc.head_mc._y += this.velY;
this.velY += this.gravity;
if (this.velY > 0 && this.segments[this.segments.length - 1]._y > this.viewBox.b + 20) {
this.jumping = false;
this.waiting = true;
}
}
};
v2.startJump = function () {
this.jumping = true;
this.waiting = false;
var v2;
var v3;
v2 = Math.random() * (this.viewBox.r - this.viewBox.l - 50) + this.viewBox.l + 25;
if (v2 < (this.viewBox.r - this.viewBox.l) / 2 + this.viewBox.l) {
this.facingDir = 'right';
this.velX = 2 - (15 - this.hitPoints) * 0.1;
} else {
this.facingDir = 'left';
this.velX = -2 - (15 - this.hitPoints) * 0.1;
}
v3 = this.viewBox.b + 20;
this.setPropertyOfAll('_x', v2);
this.setPropertyOfAll('_y', v3);
this.applyFacingDir();
this.velY = -6 - (15 - this.hitPoints) * 0.6;
this.gravity = 0.1 + (15 - this.hitPoints) * 0.015;
};
v2.playerDangerTest = function (test_mc) {
if (this._mc.head_mc.hitTest(test_mc)) {
return this;
}
if (this._mc.froosh_mc.hitTest_mc.hitTest(test_mc)) {
return this;
}
var v2 = 0;
while (v2 < this.segmentsLeft) {
if (this.segments[v2].hitTest(test_mc)) {
return this;
}
++v2;
}
return undefined;
};
v2.hurtByPlayerTest = function (test_mc) {
if (this.waiting) {
return false;
}
if (this.segmentsLeft <= 0) {
return this.invincibleCounter <= 0 && this._mc.head_mc.hitTest(test_mc);
} else {
return this.invincibleCounter <= 0 && this.segments[this.segmentsLeft - 1].hitTest(test_mc);
}
};
v2.takeDamageSubclass = function () {
if (this.hitPoints % 2 == 1) {
this.segments[this.segmentsLeft - 1].gotoAndPlay('explode');
--this.segmentsLeft;
if (this.segmentsLeft > 0) {
this.initHurtFlasher(this.segments[this.segmentsLeft - 1]);
} else {
this.initHurtFlasher(this._mc.head_mc);
}
}
this._mc.head_mc.animator_mc.gotoAndPlay('hurt');
};
v2.setPropertyOfAll = function (propertyName, val) {
this._mc.head_mc[propertyName] = val;
var v2 = 0;
while (v2 < this.segments.length) {
this.segments[v2][propertyName] = val;
if (propertyName == '_x') {
this.segments[v2].lastX = val;
}
if (propertyName == '_y') {
this.segments[v2].lastY = val;
}
++v2;
}
};
v2.shoot = function () {
if (this._mc.head_mc._y > com.homestarrunner.stinkoman.StinkoGame.player1._mc._y) {
this._mc.head_mc.animator_mc.gotoAndPlay('shoot');
}
};
v2.fireBullet = function () {
var v2 = 21;
if (this.facingDir == 'right') {
v2 = 20;
}
var v3 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet6', this._mc.head_mc._x + v2, this._mc.head_mc._y, 0, -9, false, 0, false);
};
v2.updateDead = function () {
com.homestarrunner.stinkoman.struct.GlobalData.subsublevel = 4;
_root.gotoAndStop('cutScene');
};
v2.popFroosh = function () {
var v2 = com.homestarrunner.stinkoman.StinkoGame.player1._mc._x + 5;
this._mc.froosh_mc._x = v2;
this._mc.froosh_mc.gotoAndPlay('go');
this.frooshBusy = true;
};
v2.doneFrooshing = function () {
this.frooshBusy = false;
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.boss.BossSnake.prototype, null, 1);
}
#endinitclip
}
movieClip 2829 __Packages.com.homestarrunner.stinkoman.stageobject.boss.BossNebulon {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss) {
_global.com.homestarrunner.stinkoman.stageobject.boss = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss.BossNebulon) {
var v1 = function (parent_mc) {
super(parent_mc, 'BossNebulon_mc');
this._mc.mBoss = this;
this._mc._y = 75;
this._mc._x = 200;
this.lLimit = 100;
this.rLimit = 350;
this.hitPoints = 8;
this.sideHP = new Object();
this.sideHP.lEye_mc = 4;
this.sideHP.rEye_mc = 4;
this.walkDir = 1;
this.velX = 5;
this.invincibleCounterReset = 48;
this.pauseCounterReset = 36;
this.pauseCounter = 36;
this._mc.mouth_mc.stop();
this.blowing = false;
this.shotsPerRound = 1;
this.shootCounterReset = 64;
this.shootCounter = 64;
};
com.homestarrunner.stinkoman.stageobject.boss.BossNebulon = v1;
com.homestarrunner.stinkoman.stageobject.boss.BossNebulon extends com.homestarrunner.stinkoman.stageobject.boss.Boss;
var v2 = v1.prototype;
v2.update = function () {
if (this.pauseCounter > 0) {
--this.pauseCounter;
this._mc.lFoot_mc.stop();
this._mc.rFoot_mc.stop();
} else {
this.step();
}
--this.shootCounter;
if (this.shootCounter < 0) {
if (this.invincibleCounter <= 0) {
this._mc.mouth_mc.gotoAndPlay('attackStart');
this.shootCounter = this.shootCounterReset;
this.shotsLeft = this.shotsPerRound;
}
}
if (this.blowing) {
com.homestarrunner.stinkoman.StinkoGame.player1.getBlown(-6);
}
};
v2.playerDangerTest = function (test_mc) {
if (this._mc.body_mc.hitTest(test_mc)) {
return this;
}
return undefined;
};
v2.hurtByPlayerTest = function (test_mc) {
if (this.invincibleCounter > 0) {
return undefined;
}
if (this._mc.lEye_mc.eye_mc.hitTest(test_mc) && this.sideHP.lEye_mc > 0) {
this.initHurtFlasher(this._mc.lEye_mc);
this.lastDamaged = 'lEye_mc';
return this;
}
if (this._mc.rEye_mc.eye_mc.hitTest(test_mc) && this.sideHP.rEye_mc > 0) {
this.initHurtFlasher(this._mc.rEye_mc);
this.lastDamaged = 'rEye_mc';
return this;
}
};
v2.takeDamageSubclass = function () {
this.shootCounter = this.shootCounterReset;
--this.sideHP[this.lastDamaged];
if (this.sideHP[this.lastDamaged] <= 0) {
this._mc[this.lastDamaged].eye_mc.gotoAndStop('dead');
this._mc[this.lastDamaged].stop();
} else {
this._mc[this.lastDamaged].eye_mc.gotoAndPlay('hurt');
}
this._mc.mouth_mc.gotoAndPlay('hurt');
++this.shotsPerRound;
};
v2.updateDead = function () {
com.homestarrunner.stinkoman.struct.GlobalData.subsublevel = 4;
_root.gotoAndStop('cutScene');
};
v2.shoot = function () {
this.blowing = false;
var v2 = new Object();
v2.x = this._mc.mouth_mc._x;
v2.y = this._mc.mouth_mc._y;
this._mc.localToGlobal(v2);
com.homestarrunner.stinkoman.StinkoGame.bullet_mc.globalToLocal(v2);
var v3 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet8', v2.x, v2.y, -12, Math.floor(Math.random() * 24 - 12), false);
this.shootCounter = this.shootCounterReset;
--this.shotsLeft;
if (this.shotsLeft > 0) {
this._mc.mouth_mc.gotoAndPlay('attack');
} else {
this._mc.mouth_mc.gotoAndStop('closed');
}
};
v2.step = function () {
this._mc.lFoot_mc.play();
this._mc.rFoot_mc.play();
this._mc._x += this.velX * this.walkDir;
if (this._mc._x < this.lLimit || this._mc._x > this.rLimit) {
this.walkDir = -this.walkDir;
this._mc._x += this.velX * this.walkDir;
this.pauseCounter = 24;
}
};
v2.blow = function () {
this.blowing = true;
this.shootCounter = this.shootCounterReset;
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.boss.BossNebulon.prototype, null, 1);
}
#endinitclip
}
movieClip 2830 __Packages.com.homestarrunner.stinkoman.stageobject.boss.BossTornado {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss) {
_global.com.homestarrunner.stinkoman.stageobject.boss = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss.BossTornado) {
var v1 = function (parent_mc) {
super(parent_mc, 'BossTornado_mc');
this.hitPoints = 14;
this.facingDir = 'left';
this._mc._x = 275;
this._mc._y = 200;
this.currentMode = 'waiting';
this.modeCounter = 30;
this.shotsPerRound = 3;
this.shotsLeft = 3;
this.initHurtFlasher(this._mc.animator_mc.eyeClip_mc);
this.blowTimer = 60;
this.blowDir = 0;
this.passCounter = 3;
this.lightningStormCounter = 0;
this.invincibleCounterReset = 48;
this._mc.mBoss = this;
};
com.homestarrunner.stinkoman.stageobject.boss.BossTornado = v1;
com.homestarrunner.stinkoman.stageobject.boss.BossTornado extends com.homestarrunner.stinkoman.stageobject.boss.Boss;
var v2 = v1.prototype;
v2.update = function () {
com.homestarrunner.stinkoman.StinkoGame.player1.getBlown(4 * this.blowDir);
com.homestarrunner.stinkoman.StinkoGame.sScrollC.nudge(10 * this.blowDir, 0);
com.homestarrunner.stinkoman.StinkoGame.sScrollB.nudge(5 * this.blowDir, 0);
if (this.lightningStormCounter > 0) {
--this.lightningStormCounter;
if (this.lightningStormCounter == 0) {
this._mc.animator_mc.play();
com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc.colorTo(undefined, 0.3, 'linear');
com.homestarrunner.stinkoman.StinkoGame.sScrollA.parentClip.colorTo(undefined, 0.3, 'linear');
}
}
if (this.lightningStormCounter == 40) {
var v5 = com.homestarrunner.stinkoman.StinkoGame.viewBox.r - com.homestarrunner.stinkoman.StinkoGame.viewBox.l;
var v2 = 0;
while (v2 < 5) {
var v3 = com.homestarrunner.stinkoman.StinkoGame.viewBox.l + (v5 / 6) * (v2 + 1);
var v4 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet11', v3, -5, 0, 20, false, 0, false);
++v2;
}
}
if (this.lightningStormCounter == 0) {
--this.modeCounter;
if (this.modeCounter < 0) {
this.nextMode();
}
}
};
v2.playerDangerTest = function (test_mc) {
if (this._mc.animator_mc.tornado_mc.hitTestB_mc.hitTest(test_mc) || this._mc.animator_mc.tornado_mc.hitTestA_mc.hitTest(test_mc)) {
return this;
}
return undefined;
};
v2.hurtByPlayerTest = function (test_mc) {
if (this._mc.animator_mc.tornado_mc.eyes_mc.hitTest(test_mc) && this.invincibleCounter <= 0) {
return true;
}
};
v2.halfwayPointReached = function () {
--this.passCounter;
if (this.passCounter == 0) {
this.passCounter = 3;
this._mc.animator_mc.stop();
com.homestarrunner.stinkoman.StinkoGame.sScrollA.parentClip.colorTo(6710886, 0.3, 'linear');
com.homestarrunner.stinkoman.StinkoGame._mc.gameStage_mc.colorTo(3355443, 0.3, 'linear');
this.lightningStormCounter = 64;
}
};
v2.takeDamageSubclass = function () {
if (this.hitPoints == 4) {
this.shotsPerRound = 5;
}
};
v2.updateDead = function () {
com.homestarrunner.stinkoman.struct.GlobalData.subsublevel = 4;
_root.gotoAndStop('cutScene');
};
v2.updateFacingDir = function () {
this._mc.gotoAndStop(this.facingDir);
};
v2.switchFacingDir = function () {
if (this.facingDir == 'right') {
this.facingDir = 'left';
} else {
this.facingDir = 'right';
}
this.updateFacingDir();
};
v2.nextMode = function () {
switch (this.currentMode) {
case 'waiting':
this.currentMode = 'shooting';
this.shotsLeft = this.shotsPerRound;
this.shoot();
break;
case 'shooting':
this.shoot();
break;
case 'moving':
this.switchFacingDir();
this.currentMode = 'waiting';
this.modeCounter = 30;
if (this.facingDir == 'right') {
this.blowDir = -1;
} else {
this.blowDir = 1;
}
}
};
v2.shoot = function () {
if (this.shotsLeft > 0) {
var v3;
var v2 = new Object({'x': this._mc.animator_mc.tornado_mc._x, 'y': this._mc.animator_mc.tornado_mc._y});
this._mc.animator_mc.localToGlobal(v2);
this._mc.bullet_mc.globalToLocal(v2);
if (this.facingDir == 'right') {
v3 = (this.shotsLeft / 2) * 5;
} else {
v3 = (this.shotsLeft / 2) * -5;
}
var v4 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet9', v2.x, v2.y, v3, -20, false, 2, false);
--this.shotsLeft;
this.modeCounter = 10;
} else {
this.currentMode = 'moving';
this.modeCounter = 99;
this.blowDir = 0;
this._mc.animator_mc.play();
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.boss.BossTornado.prototype, null, 1);
}
#endinitclip
}
movieClip 2831 __Packages.com.homestarrunner.stinkoman.stageobject.boss.BossIceMachine {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss) {
_global.com.homestarrunner.stinkoman.stageobject.boss = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss.BossIceMachine) {
var v1 = function (parent_mc) {
super(parent_mc, 'BossIceMachine_mc');
this.hitPoints = 7;
this.modesArray = new Array('waitingA', 'cubing', 'waitingB', 'churning');
this.currentMode = -1;
this.modeCounter = 20;
this.shotsPerRound = 3;
this.shotsLeft = 3;
this.nextShotCounter = 10;
this.initHurtFlasher(this._mc.body_mc);
this._mc._y -= 500;
this.velY = 10;
this._mc.mBoss = this;
this._mc.motor_mc.stop();
this._mc.mouth_mc.stop();
this._mc.iceShot0.stop();
this._mc.iceShot1.stop();
this._mc.iceShot2.stop();
this._mc.iceShot3.stop();
this._mc.iceShot4.stop();
this._mc.eyes_mc.stop();
this.eyesClosed = false;
this.waitingForIcicles = false;
};
com.homestarrunner.stinkoman.stageobject.boss.BossIceMachine = v1;
com.homestarrunner.stinkoman.stageobject.boss.BossIceMachine extends com.homestarrunner.stinkoman.stageobject.boss.Boss;
var v2 = v1.prototype;
v2.update = function () {
if (this._mc._y > -72) {
this._mc._y = -72;
var v3 = new com.homestarrunner.stinkoman.effect.CameraEffectShake(_root, 12, 4);
} else {
if (this._mc._y < -72) {
this._mc._y += this.velY;
this.velY += 1;
}
}
--this.modeCounter;
if (this.modeCounter < 0) {
this.nextMode();
}
if (this.modesArray[this.currentMode] == 'cubing') {
--this.nextShotCounter;
if (this.nextShotCounter < 0) {
this.shootCube();
}
}
};
v2.playerDangerTest = function (test_mc) {
if (this._mc.blastA_mc.hitTest(test_mc) || this._mc.bodyShot_mc.hitTest(test_mc)) {
return this;
}
var v2 = 0;
while (v2 < 5) {
if (this._mc['iceShot' + v2].hitTest(test_mc)) {
return this;
}
++v2;
}
return undefined;
};
v2.hurtByPlayerTest = function (test_mc) {
if (!this.eyesClosed && this._mc.eyes_mc.hitTest(test_mc) && this.invincibleCounter <= 0) {
return true;
}
};
v2.takeDamageSubclass = function () {
this._mc.eyes_mc.gotoAndPlay('hurt');
this.eyesClosed = true;
if (this.hitPoints == 5 || this.hitPoints == 3) {
this.shotsPerRound = 4;
}
if (this.hitPoints == 4) {
this.shotsPerRound = 3;
}
if (this.hitPoints == 2) {
this.shotsPerRound = 2;
}
if (this.hitPoints == 1) {
this.shotsPerRound = 4;
}
};
v2.updateDead = function () {
com.homestarrunner.stinkoman.struct.GlobalData.subsublevel = 4;
_root.gotoAndStop('cutScene');
};
v2.nextMode = function () {
++this.currentMode;
if (this.currentMode >= this.modesArray.length) {
this.currentMode = 0;
}
switch (this.modesArray[this.currentMode]) {
case 'waitingA':
this.modeCounter = 30;
this.startWait();
break;
case 'cubing':
this.startShootCubeMode();
break;
case 'waitingB':
this.startWaitB();
this.modeCounter = 34 + this.hitPoints * 2;
break;
case 'churning':
this.startChurnMode();
}
};
v2.shootCube = function () {
this.nextShotCounter = 30 + this.hitPoints * 2;
--this.shotsLeft;
this._mc['iceShot' + this.shotsLeft].gotoAndPlay('go');
if (this.shotsLeft < 0) {
this.nextMode();
}
};
v2.startWait = function () {
if (!this.eyesClosed) {
this._mc.eyes_mc.gotoAndPlay('close');
}
this._mc.motor_mc.stop();
};
v2.startWaitB = function () {
this._mc.motor_mc.stop();
this._mc.blastA_mc.gotoAndStop('off');
this._mc.blastB_mc.gotoAndStop('off');
this._mc.eyes_mc.gotoAndPlay('open');
this.eyesClosed = false;
};
v2.startShootCubeMode = function () {
this.modeCounter = 2000;
this.shotsLeft = this.shotsPerRound;
this.shootCube();
this._mc.motor_mc.play();
this._mc.blastA_mc.gotoAndStop('on');
this._mc.blastB_mc.gotoAndStop('on');
};
v2.startChurnMode = function () {
this.modeCounter = 2000;
this._mc.motor_mc.play();
this._mc.door_mc.gotoAndPlay('open');
};
v2.fireChurn = function () {
var v6 = com.homestarrunner.stinkoman.StinkoGame.viewBox.r - com.homestarrunner.stinkoman.StinkoGame.viewBox.l - 100;
var v5 = Math.floor(Math.random() * 40);
var v2 = 0;
while (v2 < 5) {
var v3 = v5 + com.homestarrunner.stinkoman.StinkoGame.viewBox.l + (v6 / 5) * v2;
var v4 = new com.homestarrunner.stinkoman.bullet.BulletIcicle('Bullet14', v3, -5, 0, 12, false, 0, false);
++v2;
}
this.waitingForIcicles = true;
};
v2.getIciclesDoneMessage = function () {
if (!this.waitingForIcicles) {
return undefined;
}
this.waitingForIcicles = false;
this.nextMode();
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.boss.BossIceMachine.prototype, null, 1);
}
#endinitclip
}
movieClip 2832 __Packages.com.homestarrunner.stinkoman.bullet.BulletIcicle {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.bullet) {
_global.com.homestarrunner.stinkoman.bullet = new Object();
}
if (!_global.com.homestarrunner.stinkoman.bullet.BulletIcicle) {
var v1 = function (symbolName, start_x, start_y, pxVel, pyVel, pFriendly, pGrav, pDeflectable) {
super(symbolName, start_x, start_y, pxVel, pyVel, pFriendly, pGrav, pDeflectable);
this._mc.animator_mc.stop();
this._mc.mBullet = this;
};
com.homestarrunner.stinkoman.bullet.BulletIcicle = v1;
com.homestarrunner.stinkoman.bullet.BulletIcicle extends com.homestarrunner.stinkoman.bullet.Bullet;
var v2 = v1.prototype;
v2.subClassUpdate = function () {
if (this._mc._y > com.homestarrunner.stinkoman.StinkoGame.viewBox.b - 55) {
this.xVel = 0;
this.yVel = 0;
this._mc.animator_mc.gotoAndPlay('smash');
com.homestarrunner.stinkoman.StinkoGame.bossMan.getIciclesDoneMessage();
this.active = false;
delete this._mc.onEnterFrame;
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.bullet.BulletIcicle.prototype, null, 1);
}
#endinitclip
}
movieClip 2833 __Packages.com.homestarrunner.stinkoman.stageobject.boss.BossNegative {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss) {
_global.com.homestarrunner.stinkoman.stageobject.boss = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss.BossNegative) {
var v1 = function (parent_mc) {
super(parent_mc, 'BossNegative_mc');
this.hitPoints = 6;
this.initHurtFlasher(this._mc.body_mc.bossHeart_mc.ham_mc);
this._mc.mBoss = this;
this._mc.gotoAndPlay('entrance');
this.animState = 'enter';
this.waitCounterMax = 25;
this.currentStepDirection = -1;
this.stagePos = 0;
this.nextPhaseIsRoar = false;
this.fridgeCounterMax = 84;
this.fridgeCounter = 84;
this.nextHeartDirection = 'Right';
this._mc._x = 300;
this._mc._y = 190;
this.invincibleCounterReset = 36;
this.damageClips = new Array();
this.damageClips.push('forkA');
this.damageClips.push('forkB');
this.damageClips.push('spikeA');
this.damageClips.push('spikeB');
this.damageClips.push('blockA');
this.damageClips.push('blockB');
};
com.homestarrunner.stinkoman.stageobject.boss.BossNegative = v1;
com.homestarrunner.stinkoman.stageobject.boss.BossNegative extends com.homestarrunner.stinkoman.stageobject.boss.Boss;
var v2 = v1.prototype;
v2.update = function () {
switch (this.animState) {
case 'enter':
break;
case 'roar':
break;
case 'wait':
--this.waitCounter;
if (this.waitCounter < 0) {
this.nextPhase();
}
break;
case 'stepping':
}
if (this.animState != 'enter') {
--this.fridgeCounter;
if (this.fridgeCounter < 0) {
if (this.fridgeOpen) {
this.closeFridge();
} else {
if (this.animState != 'roar') {
this.openFridge();
}
}
}
}
var v2 = com.homestarrunner.stinkoman.bullet.BulletFriendly.anyDeflect(this._mc.body_mc.bossHeart_mc.door_mc);
if (v2 != undefined) {
v2.deflect();
}
};
v2.shootA = function () {};
v2.shootB = function () {};
v2.shoot = function (IDNum) {
var v3 = this._mc['dometant' + IDNum];
var v2 = new Object({'x': v3._x, 'y': v3._y});
this._mc.localToGlobal(v2);
com.homestarrunner.stinkoman.StinkoGame._mc.bullet_mc.globalToLocal(v2);
if (IDNum < 2) {
var v8 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet2', v2.x, v2.y + 15, -8, 0, false, 0, false);
var v7 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet2', v2.x, v2.y + 15, 8, 0, false, 0, false);
var v6 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet2', v2.x, v2.y + 15, 8, 8, false, 0, false);
var v5 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet2', v2.x, v2.y + 15, -8, 8, false, 0, false);
var v4 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet2', v2.x, v2.y + 15, 0, 8, false, 0, false);
} else {
var v8 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet2', v2.x, v2.y - 15, -8, 0, false, 0, false);
var v7 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet2', v2.x, v2.y - 15, 8, 0, false, 0, false);
var v6 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet2', v2.x, v2.y - 15, 8, -8, false, 0, false);
var v5 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet2', v2.x, v2.y - 15, -8, -8, false, 0, false);
var v4 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet2', v2.x, v2.y - 15, 0, -8, false, 0, false);
}
};
v2.playerDangerTest = function (test_mc) {
var v2 = 0;
while (v2 < this.damageClips.length) {
if (this._mc[this.damageClips[v2]].hitTest(test_mc)) {
return this;
}
++v2;
}
return undefined;
};
v2.hurtByPlayerTest = function (test_mc) {
if (this._mc.body_mc.bossHeart_mc.ham_mc.hitTest(test_mc) && this.invincibleCounter <= 0 && this.fridgeOpen) {
return true;
}
};
v2.nextPhase = function () {
if (this.nextPhaseIsRoar) {
this.roar();
} else {
this.startStep();
}
};
v2.takeDamageSubclass = function () {
this.waitCounterMax -= 4;
if (this.waitCounterMax < 5) {
this.waitCounterMax = 5;
}
if (this.fridgeOpen) {
this.fridgeCounter = 8;
}
if (this.hitPoints > 2) {
this.nextPhaseIsRoar = true;
}
if (this.nextHeartDirection == 'Left') {
this.nextHeartDirection = 'Right';
} else {
this.nextHeartDirection = 'Left';
}
};
v2.startStep = function () {
if (this.stagePos < -6) {
this.currentStepDirection = 1;
}
if (this.stagePos >= 0) {
this.currentStepDirection = -1;
}
if (this.currentStepDirection < 0) {
this._mc.gotoAndPlay('stepLeft');
} else {
this._mc.gotoAndPlay('stepRight');
}
this.animState = 'stepping';
};
v2.updateDead = function () {
com.homestarrunner.stinkoman.struct.GlobalData.subsublevel = 4;
_root.gotoAndStop('cutScene');
};
v2.entranceFinished = function () {
this._mc.body_mc.bossHeart_mc.stop();
this._mc.dometant0.mDometantID = 0;
this._mc.dometant1.mDometantID = 1;
this._mc.dometant2.mDometantID = 2;
this._mc.dometant3.mDometantID = 3;
this._mc.dometant2.gotoAndPlay(45);
this._mc.dometant3.gotoAndPlay(45);
this.roar();
};
v2.roarFinished = function () {
this.wait();
};
v2.stepFinished = function () {
this._mc._x += 32 * this.currentStepDirection;
this.stagePos += this.currentStepDirection;
this.wait();
};
v2.roar = function () {
this.nextPhaseIsRoar = false;
this.animState = 'roar';
this._mc.gotoAndPlay('roar');
};
v2.wait = function () {
this._mc.gotoAndStop('wait');
this.animState = 'wait';
this.waitCounter = this.waitCounterMax;
};
v2.setFridgeOpen = function (newVal, pFridgeDir) {
this.fridgeOpen = newVal;
this.fridgeDirection = pFridgeDir;
};
v2.openFridge = function () {
this.fridgeCounter = this.fridgeCounterMax / 2;
this._mc.body_mc.bossHeart_mc.gotoAndPlay('open' + this.nextHeartDirection);
};
v2.closeFridge = function () {
this.fridgeCounter = this.fridgeCounterMax;
this._mc.body_mc.bossHeart_mc.play();
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.boss.BossNegative.prototype, null, 1);
}
#endinitclip
}
movieClip 2834 __Packages.com.homestarrunner.stinkoman.stageobject.boss.BossGangster {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss) {
_global.com.homestarrunner.stinkoman.stageobject.boss = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss.BossGangster) {
var v1 = function (parent_mc) {
super(parent_mc, 'BossGangster_mc');
this._mc.mBoss = this;
this._mc._y = 500;
this._mc._x = 200;
this.initHurtFlasher(this._mc.head_mc);
this.swingUp = true;
this.shootTimer = 20;
this.hitPoints = 15;
this.mouthOpen = false;
this.mouthTimerReset = 40;
this.mouthTimer = 40;
this.invincibleCounterReset = 16;
this.lunging = false;
this.lungingLeft = true;
this.lungeTimerReset = 200;
this.lungeTimer = 200;
};
com.homestarrunner.stinkoman.stageobject.boss.BossGangster = v1;
com.homestarrunner.stinkoman.stageobject.boss.BossGangster extends com.homestarrunner.stinkoman.stageobject.boss.Boss;
var v2 = v1.prototype;
v2.update = function () {
if (!this.entranceFinished) {
var v2 = new Object({'x': com.homestarrunner.stinkoman.StinkoGame.viewBox.r - 100, 'y': com.homestarrunner.stinkoman.StinkoGame.viewBox.t + (com.homestarrunner.stinkoman.StinkoGame.viewBox.b - com.homestarrunner.stinkoman.StinkoGame.viewBox.t) / 2});
this._mc._parent.globalToLocal(v2);
this._mc._x -= (this._mc._x - v2.x) / 2;
this._mc._y -= (this._mc._y - v2.y) / 2;
if (Math.abs(this._mc._x - v2.x) < 10 && Math.abs(this._mc._y - v2.y) < 10) {
this.entranceFinished = true;
this.swingInNewDirection();
}
} else {
--this.mouthTimer;
if (this.mouthTimer < 0) {
this.mouthTriggered();
}
if (!this.lunging) {
--this.lungeTimer;
if (this.lungeTimer < 0) {
this.lunging = true;
this.lungeTriggered();
}
--this.shootTimer;
if (this.shootTimer < 0) {
this.startShootSequence();
}
}
}
};
v2.swingInNewDirection = function () {
this.swingUp = !this.swingUp;
var v2 = this.getTargetSwingPoint();
this._mc.tween('_y', v2.y, 2, 'easeInQuad', 0, {'scope': this, 'func': 'swingInNewDirection'}, 1);
};
v2.getTargetSwingPoint = function () {
var v2;
if (this.swingUp) {
v2 = new Object({'x': 0, 'y': com.homestarrunner.stinkoman.StinkoGame.viewBox.t + 80});
this._mc._parent.globalToLocal(v2);
return v2;
}
v2 = new Object({'x': 0, 'y': com.homestarrunner.stinkoman.StinkoGame.viewBox.b - 80});
this._mc._parent.globalToLocal(v2);
return v2;
};
v2.playerDangerTest = function (test_mc) {
if (this._mc.hitTest_mc.hitTest(test_mc) || this._mc.head_mc.hitTest(test_mc)) {
return this;
}
return undefined;
};
v2.hurtByPlayerTest = function (test_mc) {
if (this.invincibleCounter > 0) {
return undefined;
}
if (this._mc.head_mc.hurtTest_mc.hitTest(test_mc)) {
return this;
}
};
v2.takeDamageSubclass = function () {
--this.mouthTimerReset;
this.lungeTimerReset -= 5;
this.mouthTriggered();
};
v2.updateDead = function () {
com.homestarrunner.stinkoman.struct.GlobalData.subsublevel = 4;
_root.gotoAndStop('cutScene');
};
v2.shoot = function () {
var v2 = new Object();
v2.x = this._mc.torso_mc.gunshot_mc._x;
v2.y = this._mc.torso_mc.gunshot_mc._y;
this._mc.torso_mc.localToGlobal(v2);
com.homestarrunner.stinkoman.StinkoGame.bullet_mc.globalToLocal(v2);
var v3 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet19', v2.x, v2.y, -12, Math.floor(Math.random() * 24 - 12), false);
};
v2.startShootSequence = function () {
this.shootTimer = 55;
this._mc.torso_mc.gotoAndPlay('shoot');
};
v2.mouthTriggered = function () {
this.mouthOpen = !this.mouthOpen;
if (this.mouthOpen) {
this._mc.head_mc.gotoAndStop('open');
this.mouthTimer = this.mouthTimerReset;
} else {
this._mc.head_mc.gotoAndStop('closed');
this.mouthTimer = Math.floor(Math.random() * 30) + 10;
}
};
v2.lungeTriggered = function () {
this._mc.stopTween();
var v2 = new Object();
var v5;
var v3;
var v4;
if (this.lungingLeft) {
v2 = new Object({'x': com.homestarrunner.stinkoman.StinkoGame.viewBox.l + 20, 'y': 0});
v5 = 'easeInSine';
v4 = 'lungeTriggered';
v3 = 0.5;
} else {
v2 = new Object({'x': com.homestarrunner.stinkoman.StinkoGame.viewBox.r - 100, 'y': 0});
v5 = 'linear';
v4 = 'lungeEnded';
v3 = 0;
}
this._mc._parent.globalToLocal(v2);
this._mc.tween('_x', v2.x, 1, 'easeInSine', v3, {'scope': this, 'func': v4});
this.lungingLeft = !this.lungingLeft;
};
v2.lungeEnded = function () {
this.lunging = false;
this.lungeTimer = this.lungeTimerReset;
this.lungingLeft = true;
this.swingInNewDirection();
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.boss.BossGangster.prototype, null, 1);
}
#endinitclip
}
movieClip 2835 __Packages.com.homestarrunner.stinkoman.stageobject.boss.BossEndBoss {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss) {
_global.com.homestarrunner.stinkoman.stageobject.boss = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss.BossEndBoss) {
var v1 = function (parent_mc) {
super(parent_mc, 'BossEndBoss_mc');
this._mc.myBoss = this;
this._mc._x = 400;
this._mc._y = 306;
this.movementDirection = -1;
this.velX = 1;
this.hitPoints = 5;
};
com.homestarrunner.stinkoman.stageobject.boss.BossEndBoss = v1;
com.homestarrunner.stinkoman.stageobject.boss.BossEndBoss extends com.homestarrunner.stinkoman.stageobject.boss.Boss;
var v2 = v1.prototype;
v2.update = function () {
if (this.state == this.STATE_NORMAL_ATTACK) {
this._mc._x += this.movementDirection * this.velX;
if (this.movementDirection < 0 && this._mc._x < this.leftMostPosition) {
this.movementDirection = 1;
} else {
if (this.movementDirection > 0 && this._mc._x > this.rightMostPosition) {
this.movementDirection = -1;
}
}
} else {
if (this.state == this.STATE_MOVING_BACK) {
if (this._mc._x < this.rightMostPosition) {
this._mc._x += 0.2 * (this.rightMostPosition - this._mc._x);
this._mc._x += 2;
}
} else {
if (this.state == this.STATE_CHARGING) {
if (this.movementDirection < 0 && this.velX < 9) {
this.velX += 1;
}
this._mc._x += this.movementDirection * this.velX;
if (this.movementDirection < 0 && this._mc._x < this.chargingLeftMostPosition) {
this.movementDirection = 1;
this.velX = 3;
} else {
if (this.movementDirection > 0 && this._mc._x > this.chargingRightMostPosition) {
this.movementDirection = -1;
this.velX = 0;
}
}
if (this._mc.hitTest(com.homestarrunner.stinkoman.StinkoGame.player1._mc.hitTestHurt_mc)) {
com.homestarrunner.stinkoman.StinkoGame.player1.takeDamage(true, 1);
}
}
}
}
if (this.state == this.STATE_FIRING || this.state == this.STATE_CHARGING) {
if (this.bulletCount <= 0) {
var v2 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet24', this._mc._x + this._mc.bullet_position._x, this._mc._y + this._mc.bullet_position._y, 0, 0, false);
this.bulletCount = this.bulletPeriod;
}
--this.bulletCount;
}
};
v2.changeState = function (newState) {
trace('Change state: ' + newState);
this.state = newState;
if (newState == this.STATE_MOVING_BACK) {
this._mc.gotoAndPlay('transform');
this.clearHurtFlasher();
}
if (newState == this.STATE_CHARGING) {
this.movementDirection = -1;
this.velX = 0;
}
};
v2.shoot = function () {
var v2 = new com.homestarrunner.stinkoman.bullet.Bullet('Bullet23', this._mc._x + this._mc.bullet_position._x, this._mc._y + this._mc.bullet_position._y, 0, 0, false);
};
v2.playerDangerTest = function (test_mc) {
if (this.state == this.STATE_NORMAL_ATTACK) {
if (this._mc.body_mc.hitTest(test_mc)) {
return this;
}
return undefined;
}
if (this.state != this.STATE_DYING) {
if (this._mc.hitTest(test_mc)) {
return this;
}
}
return undefined;
};
v2.takeDamage = function (x, y) {
if (this.state == this.STATE_MOVING_BACK || this.state == this.STATE_FIRING) {
return undefined;
}
super.takeDamage();
};
v2.hurtByPlayerTest = function (test_mc) {
if (this.state == this.STATE_NORMAL_ATTACK) {
if (this._mc.body_mc.hitTest(test_mc)) {
return this;
}
return undefined;
}
if (this.state != this.STATE_DYING) {
if (this._mc.hitTest(test_mc)) {
return this;
}
}
return undefined;
};
v2.takeDamageSubclass = function () {
if (this.invincibleCounter != this.invincibleCounterReset) {
return undefined;
}
switch (this.hitPoints) {
case 4:
this._mc.eye1_mc.gotoAndPlay('hurt');
break;
case 3:
this._mc.eye2_mc.gotoAndPlay('hurt');
break;
case 2:
this._mc.eye3_mc.gotoAndPlay('hurt');
break;
case 1:
this.changeState(this.STATE_MOVING_BACK);
break;
case 0:
}
};
v2.animateDeath = function () {
this._mc.gotoAndPlay('die');
this.changeState(this.STATE_DYING);
this.pausePlayer();
};
v2.fadeBackground = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.Ornament.OrnamentArray.length) {
var v1 = com.homestarrunner.stinkoman.stageobject.Ornament.OrnamentArray[v2];
trace('Checking ornament: ' + v1.subType);
if (v1.subType == 26) {
v1._mc.play();
}
++v2;
}
};
v2.pausePlayer = function () {
com.homestarrunner.stinkoman.StinkoGame.player1.disableInput();
com.homestarrunner.stinkoman.StinkoGame.player1.facingDir = 'right';
};
v2.doneDying = function () {
com.homestarrunner.stinkoman.StinkoGame.inProgress = false;
com.homestarrunner.stinkoman.StinkoGame.player1.enabled = false;
com.homestarrunner.stinkoman.StinkoGame.gameSound.stop();
com.homestarrunner.stinkoman.StinkoGame.player1._mc.gotoAndPlay('walk_off');
};
v2.STATE_INITIAL = 'initial';
v2.STATE_NORMAL_ATTACK = 'normal attack';
v2.STATE_MOVING_BACK = 'moving back';
v2.STATE_FIRING = 'firing';
v2.STATE_CHARGING = 'charging';
v2.STATE_DYING = 'dying';
v2.state = com.homestarrunner.stinkoman.stageobject.boss.BossEndBoss.prototype.STATE_NORMAL_ATTACK;
v2.movementDirection = -1;
v2.leftMostPosition = 320;
v2.rightMostPosition = 400;
v2.chargingLeftMostPosition = 170;
v2.chargingRightMostPosition = 230;
v2.bulletCount = 0;
v2.bulletPeriod = 6;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.boss.BossEndBoss.prototype, null, 1);
}
#endinitclip
}
movieClip 2836 __Packages.com.homestarrunner.stinkoman.stageobject.boss.BossZSabre {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss) {
_global.com.homestarrunner.stinkoman.stageobject.boss = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss.BossZSabre) {
var v1 = function (parent_mc) {
super(parent_mc, 'BossZSabre_mc');
this._mc.myBoss = this;
this._mc._x = this.rightStandingPoint;
this._mc._y = 304;
this.hitPoints = 7;
};
com.homestarrunner.stinkoman.stageobject.boss.BossZSabre = v1;
com.homestarrunner.stinkoman.stageobject.boss.BossZSabre extends com.homestarrunner.stinkoman.stageobject.boss.Boss;
var v2 = v1.prototype;
v2.update = function () {
if (this.state !== this.STATE_IDLE) {
} else {
++this.idleCount;
if (this.idleCount > this.idleTime) {
this.idleCount = 0;
--this.attacksLeftInPhase;
if (this.attacksLeftInPhase == 0) {
this.changeState(this.STATE_FLYING);
this.attacksLeftInPhase = 4;
if (Math.random() < 0.5) {
this.attacksLeftInPhase += 2;
}
} else {
var v2 = [this.STATE_LEAP, this.STATE_SLASH, this.STATE_ZOOM];
var v4 = Math.floor(v2.length * Math.random());
this.changeState(v2[v4]);
}
}
}
this._mc._x += this.velX;
if (this._mc.animator_mc.blockTest_mc) {
var v3 = com.homestarrunner.stinkoman.bullet.BulletFriendly.anyDeflect(this._mc.animator_mc.blockTest_mc);
if (v3 != undefined) {
v3.deflect();
}
}
};
v2.changeState = function (newState) {
this.state = newState;
switch (this.state) {
case this.STATE_IDLE:
this.velX = 0;
this.idleCount = 0;
this._mc.gotoAndStop(this.state + '_' + this.facingDirection);
break;
case this.STATE_INTRO:
case this.STATE_ZOOM:
case this.STATE_LEAP:
case this.STATE_SLASH:
case this.STATE_FLYING:
this._mc.gotoAndStop(this.state + '_' + this.facingDirection);
}
};
v2.animateDeath = function () {
this.doneDying();
};
v2.updateDead = function () {
com.homestarrunner.stinkoman.StinkoGame.levelDoneDone();
};
v2.hurtByPlayerTest = function (test_mc) {
if (this._mc.animator_mc.hurtTest_mc) {
return this._mc.animator_mc.hurtTest_mc.hitTest(test_mc) && this.invincibleCounter <= 0;
}
return false;
};
v2.playerDangerTest = function (test_mc) {
if (this._mc.animator_mc.hittest_mc) {
if (this._mc.animator_mc.hittest_mc.hitTest(test_mc)) {
return this;
}
}
return undefined;
};
v2.startZoom = function (numFrames) {
if (this.facingDirection == this.FACING_LEFT) {
this.startMovingTo(this.rightStandingPoint - 380, numFrames);
} else {
this.startMovingTo(this.leftStandingPoint + 380, numFrames);
}
};
v2.stopZoom = function () {
this.stopMoving();
};
v2.startLeap = function (numFrames) {
if (this.facingDirection == this.FACING_LEFT) {
this.startMovingTo(com.homestarrunner.stinkoman.StinkoGame.player1._mc._x + 40, numFrames);
} else {
this.startMovingTo(com.homestarrunner.stinkoman.StinkoGame.player1._mc._x - 40, numFrames);
}
};
v2.stopLeap = function () {
this.stopMoving();
};
v2.jumpBack = function (numFrames) {
if (this.facingDirection == this.FACING_LEFT) {
this.startMovingTo(this.rightStandingPoint, numFrames);
} else {
this.startMovingTo(this.leftStandingPoint, numFrames);
}
};
v2.stopJump = function () {
this.stopMoving();
};
v2.slash = function () {
if (this.facingDirection == this.FACING_LEFT) {
new com.homestarrunner.stinkoman.bullet.BulletZSabreSlash('BulletZSabreSlash', this._mc._x + this._mc.animator_mc.bullet_position._x, this._mc._y + this._mc.animator_mc.bullet_position._y, -20, 0, false);
} else {
new com.homestarrunner.stinkoman.bullet.BulletZSabreSlash('BulletZSabreSlash', this._mc._x - this._mc.animator_mc.bullet_position._x, this._mc._y + this._mc.animator_mc.bullet_position._y, 20, 0, false);
}
};
v2.finishCapeToss = function () {
trace('Finished Cape Toss');
this.changeState(this.STATE_IDLE);
this.idleCount = -48;
com.homestarrunner.stinkoman.StinkoGame.player1.enableInput();
};
v2.startFlying = function (numFrames) {
if (this.facingDirection == this.FACING_LEFT) {
this.startMovingTo(this.leftStandingPoint, numFrames);
} else {
this.startMovingTo(this.rightStandingPoint, numFrames);
}
};
v2.finishFlying = function () {
if (this.facingDirection == this.FACING_LEFT) {
this.facingDirection = this.FACING_RIGHT;
} else {
this.facingDirection = this.FACING_LEFT;
}
this.changeState('idle');
};
v2.fireSpreadshot = function (forward) {
var v2 = this.facingDirection == this.FACING_LEFT && forward || this.facingDirection == this.FACING_RIGHT && !forward;
trace('Firing spreadshot. forward = ' + forward + ', firingLeft = ' + v2);
if (v2) {
new com.homestarrunner.stinkoman.bullet.BulletZSabreSpreadshot('BulletZSabreSpreadshot', this._mc._x + this._mc.animator_mc.bullet_position._x, this._mc._y + this._mc.animator_mc.bullet_position._y, true);
} else {
new com.homestarrunner.stinkoman.bullet.BulletZSabreSpreadshot('BulletZSabreSpreadshot', this._mc._x + this._mc.animator_mc.bullet_position._x, this._mc._y + this._mc.animator_mc.bullet_position._y, false);
}
};
v2.startMovingTo = function (location, numFrames) {
var v3 = location - this._mc._x;
var v2 = v3 / numFrames;
this.velX = v2;
};
v2.stopMoving = function () {
this.velX = 0;
};
v2.STATE_INTRO = 'intro';
v2.STATE_IDLE = 'idle';
v2.STATE_ZOOM = 'zoom';
v2.STATE_LEAP = 'leap';
v2.STATE_SLASH = 'slash';
v2.STATE_FLYING = 'flying';
v2.state = com.homestarrunner.stinkoman.stageobject.boss.BossZSabre.prototype.STATE_INTRO;
v2.FACING_LEFT = 'left';
v2.FACING_RIGHT = 'right';
v2.facingDirection = com.homestarrunner.stinkoman.stageobject.boss.BossZSabre.prototype.FACING_LEFT;
v2.idleCount = 0;
v2.idleTime = 24;
v2.attacksLeftInPhase = 3;
v2.rightStandingPoint = 480;
v2.leftStandingPoint = 50;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.boss.BossZSabre.prototype, null, 1);
}
#endinitclip
}
movieClip 2837 __Packages.com.homestarrunner.stinkoman.bullet.BulletZSabreSlash {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.bullet) {
_global.com.homestarrunner.stinkoman.bullet = new Object();
}
if (!_global.com.homestarrunner.stinkoman.bullet.BulletZSabreSlash) {
var v1 = function (symbolName, start_x, start_y, pxVel, pyVel, pFriendly, pGrav, pDeflectable) {
super(symbolName, start_x, start_y, pxVel, pyVel, pFriendly, pGrav, pDeflectable);
if (pxVel > 0) {
this._mc._xscale *= -1;
}
};
com.homestarrunner.stinkoman.bullet.BulletZSabreSlash = v1;
com.homestarrunner.stinkoman.bullet.BulletZSabreSlash extends com.homestarrunner.stinkoman.bullet.Bullet;
var v2 = v1.prototype;
v2.playerDangerTest = function (test_mc) {
if (this._mc.hitTest_mc) {
return this._mc.hitTest_mc.hitTest(test_mc);
}
return false;
};
ASSetPropFlags(com.homestarrunner.stinkoman.bullet.BulletZSabreSlash.prototype, null, 1);
}
#endinitclip
}
movieClip 2838 __Packages.com.homestarrunner.stinkoman.bullet.BulletZSabreSpreadshot {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.bullet) {
_global.com.homestarrunner.stinkoman.bullet = new Object();
}
if (!_global.com.homestarrunner.stinkoman.bullet.BulletZSabreSpreadshot) {
var v1 = function (symbolName, start_x, start_y, fireLeft) {
super(symbolName, start_x, start_y, 0, 0, false, 0, false);
if (!fireLeft) {
this._mc._xscale *= -1;
}
};
com.homestarrunner.stinkoman.bullet.BulletZSabreSpreadshot = v1;
com.homestarrunner.stinkoman.bullet.BulletZSabreSpreadshot extends com.homestarrunner.stinkoman.bullet.Bullet;
var v2 = v1.prototype;
v2.playerDangerTest = function (test_mc) {
return this._mc.bullets_mc.bullet1_mc && this._mc.bullets_mc.bullet1_mc.hitTest(test_mc) || this._mc.bullets_mc.bullet2_mc && this._mc.bullets_mc.bullet2_mc.hitTest(test_mc) || this._mc.bullets_mc.bullet3_mc && this._mc.bullets_mc.bullet3_mc.hitTest(test_mc);
};
ASSetPropFlags(com.homestarrunner.stinkoman.bullet.BulletZSabreSpreadshot.prototype, null, 1);
}
#endinitclip
}
movieClip 2839 __Packages.com.homestarrunner.stinkoman.stageobject.boss.BossTrogador {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss) {
_global.com.homestarrunner.stinkoman.stageobject.boss = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.boss.BossTrogador) {
var v1 = function (parent_mc) {
super(parent_mc, 'BossTrogador_mc');
this._mc.myBoss = this;
this._mc._x = 0;
this._mc._y = -28;
this._mc.main._x = this.rightmostPosition;
this.velX = 0.8;
this.hitPoints = this.hitPointCycles * (this.headHitPoints + this.bodyHitPoints);
};
com.homestarrunner.stinkoman.stageobject.boss.BossTrogador = v1;
com.homestarrunner.stinkoman.stageobject.boss.BossTrogador extends com.homestarrunner.stinkoman.stageobject.boss.Boss;
var v2 = v1.prototype;
v2.update = function () {
if (this.walking) {
var v6 = this.velX;
var v7 = 0.25;
if (this.breathingFire) {
v6 *= 0.5;
v7 *= 0.5;
}
this._mc.main._x += this.walkDirection * v6;
this._mc.main.head._x += this.walkDirection * v7;
if (this._mc.main._x < this.leftmostPosition) {
this.walkDirection = 1;
}
if (this._mc.main._x > this.rightmostPosition) {
this.walkDirection = -1;
}
}
++this.armAttackCount;
if (this.armAttackCount > 60) {
this.armAttackCount = 0;
switch (this.attackIndex) {
case 0:
this.fireFoot();
break;
case 1:
this.armAttack();
this.armAttackCount = -20;
break;
case 2:
this.chargeMeter();
this.armAttackCount = -30;
break;
case 3:
this.noseAttack();
if (this.hitPoints < 6) {
this.fireFoot();
}
}
++this.attackIndex;
if (this.attackIndex >= 4) {
this.attackIndex = 0;
}
}
this.moveArmTowardsPlayer();
var v5 = [this._mc.main.hitTest1_mc, this._mc.main.hitTest2_mc, this._mc.main.head.hitTest1_mc, this._mc.main.head.hitTest2_mc, this._mc.arm.main.hitTest_mc];
var v2 = 0;
while (v2 < v5.length) {
var v4 = v5[v2];
var v3 = com.homestarrunner.stinkoman.bullet.BulletFriendly.anyDeflect(v4);
if (v3 != undefined) {
v3.deflect();
}
++v2;
}
};
v2.isShowingWeakPoint = function () {
var v2 = this.hitPoints % (this.bodyHitPoints + this.headHitPoints);
return v2 > 0 && v2 <= this.bodyHitPoints;
};
v2.animateDeath = function () {
this.doneDying();
};
v2.updateDead = function () {
com.homestarrunner.stinkoman.StinkoGame.levelDoneDone();
};
v2.hurtByPlayerTest = function (test_mc) {
if (this.invincibleCounter > 0) {
return false;
}
if (this.isShowingWeakPoint()) {
return this._mc.main.body.hurtTest_mc && this._mc.main.body.hurtTest_mc.hitTest(test_mc);
} else {
return !this.breathingFire && this._mc.main.head.hurtTest_mc.hitTest(test_mc);
}
};
v2.takeDamageSubclass = function () {
if (this.invincibleCounter != this.invincibleCounterReset) {
return undefined;
}
var v2 = this.hitPoints % (this.bodyHitPoints + this.headHitPoints);
if (v2 == this.bodyHitPoints) {
this.revealWeakPoint();
}
if (v2 == 0) {
this.hideWeakPoint();
if (!this.breathingFire) {
this._mc.main.head.main.gotoAndPlay('hurt');
}
}
if (v2 >= this.bodyHitPoints) {
this._mc.main.head.main.gotoAndPlay('hurt');
}
};
v2.revealWeakPoint = function () {
this._mc.main.body.gotoAndPlay('opening');
};
v2.hideWeakPoint = function () {
this._mc.main.body.gotoAndPlay('close');
};
v2.returnHeadToNormal = function () {
if (this.isShowingWeakPoint()) {
this._mc.main.head.main.gotoAndStop('squint');
} else {
this._mc.main.head.main.gotoAndStop('normal');
}
};
v2.playerDangerTest = function (test_mc) {
if (this._mc.main.hitTest1_mc.hitTest(test_mc) || this._mc.main.hitTest2_mc.hitTest(test_mc) || this._mc.main.head.hitTest1_mc.hitTest(test_mc) || this._mc.main.head.hitTest2_mc.hitTest(test_mc) || this.armHurtsPlayer && this._mc.arm.main.hitTest_mc.hitTest(test_mc) || this._mc.main.head.main.hitTest1_mc && this._mc.main.head.main.hitTest1_mc.hitTest(test_mc) || this._mc.main.head.main.hitTest2_mc && this._mc.main.head.main.hitTest2_mc.hitTest(test_mc) || this._mc.main.head.main.hitTest3_mc && this._mc.main.head.main.hitTest3_mc.hitTest(test_mc)) {
return this;
}
return undefined;
};
v2.chargeMeter = function () {
this._mc.main.meter.gotoAndPlay('charging');
};
v2.meterIsFull = function () {
this.flameAttack();
};
v2.flameAttack = function () {
this._mc.main.head.main.gotoAndPlay('fire');
this.breathingFire = true;
};
v2.flameAttackFinished = function () {
this._mc.main.meter.gotoAndPlay('decharge');
this.breathingFire = false;
};
v2.noseAttack = function () {
this._mc.main.head.nosecannon.play();
};
v2.fireNoseBullet = function () {
new com.homestarrunner.stinkoman.bullet.Bullet('BulletNoseBullet', this._mc._x + this._mc.main._x + this._mc.main.head._x + this._mc.main.head.nosecannon._x, this._mc._y + this._mc.main._y + this._mc.main.head._y + this._mc.main.head.nosecannon._y, -8, -4, false);
};
v2.armAttack = function () {
this.armDesiredY = com.homestarrunner.stinkoman.StinkoGame.player1._mc._y;
this._mc.arm._y = this.armDesiredY;
if (Math.random() < 0.5) {
this._mc.arm.y += 20;
} else {
this._mc.arm.y -= 20;
}
this._mc.arm.play();
this.armFollowing = true;
this.armHurtsPlayer = true;
};
v2.moveArmTowardsPlayer = function () {
if (this.armFollowing) {
this.armDesiredY = com.homestarrunner.stinkoman.StinkoGame.player1._mc._y;
}
var v2 = this.armDesiredY - this._mc.arm._y;
this._mc.arm._y += 0.2 * v2;
};
v2.stopArmFollowing = function () {
this.armFollowing = false;
};
v2.makeArmStopHurting = function () {
this.armHurtsPlayer = false;
};
v2.fireFoot = function () {
var v2;
var v3;
if (Math.random() < 0.5) {
v2 = this._mc.main.front_foot;
v3 = this._mc.main.back_foot;
} else {
v2 = this._mc.main.back_foot;
v3 = this._mc.main.front_foot;
}
v2.gotoAndPlay('fire');
v3.gotoAndPlay('stand');
new com.homestarrunner.stinkoman.bullet.BulletClawMissile('BulletClawMissile', this._mc._x + this._mc.main._x + v2._x + v2.bullet_position._x, this._mc._y + this._mc.main._y + v2._y + v2.bullet_position._y, -15, 0, false);
this.walking = false;
};
v2.STATE_IDLE = 'idle';
v2.state = com.homestarrunner.stinkoman.stageobject.boss.BossTrogador.prototype.STATE_IDLE;
v2.leftmostPosition = -40;
v2.rightmostPosition = 40;
v2.walkDirection = -1;
v2.highestArmPosition = 102;
v2.lowestArmPosition = 252;
v2.armAttackCount = 0;
v2.walking = true;
v2.attackIndex = 0;
v2.breathingFire = false;
v2.armFollowing = false;
v2.armDesiredY = 0;
v2.armHurtsPlayer = false;
v2.headHitPoints = 3;
v2.bodyHitPoints = 3;
v2.hitPointCycles = 3;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.boss.BossTrogador.prototype, null, 1);
}
#endinitclip
}
movieClip 2840 __Packages.com.homestarrunner.stinkoman.bullet.BulletClawMissile {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.bullet) {
_global.com.homestarrunner.stinkoman.bullet = new Object();
}
if (!_global.com.homestarrunner.stinkoman.bullet.BulletClawMissile) {
var v1 = function (symbolName, start_x, start_y, pxVel, pyVel, pFriendly, pGrav, pDeflectable) {
super(symbolName, start_x, start_y, pxVel, pyVel, pFriendly, pGrav, pDeflectable);
};
com.homestarrunner.stinkoman.bullet.BulletClawMissile = v1;
com.homestarrunner.stinkoman.bullet.BulletClawMissile extends com.homestarrunner.stinkoman.bullet.Bullet;
var v2 = v1.prototype;
v2.onHitPlayer = function () {
this.xVel = 0;
this.yVel = 0;
this._mc.gotoAndPlay('explode');
};
ASSetPropFlags(com.homestarrunner.stinkoman.bullet.BulletClawMissile.prototype, null, 1);
}
#endinitclip
}
movieClip 2841 __Packages.com.homestarrunner.stinkoman.gamemode.JumpingGame {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.gamemode) {
_global.com.homestarrunner.stinkoman.gamemode = new Object();
}
if (!_global.com.homestarrunner.stinkoman.gamemode.JumpingGame) {
var v1 = function (p_mc, viewBox_mc) {
var thisJumpingGame = this;
com.homestarrunner.stinkoman.gamemode.JumpingGame._mc = p_mc;
com.homestarrunner.stinkoman.struct.GlobalData.items = 0;
com.homestarrunner.stinkoman.ui.Interface.update();
if (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel == 1) {
com.homestarrunner.stinkoman.gamemode.JumpingGame.direction = 'up';
} else {
com.homestarrunner.stinkoman.gamemode.JumpingGame.direction = 'down';
}
com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox = new Object();
com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.l = viewBox_mc._x;
com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.t = viewBox_mc._y;
com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.r = viewBox_mc._x + viewBox_mc._width;
com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.b = viewBox_mc._y + viewBox_mc._height;
_root.skyA_mc.attachMovie('jumpingSky', 'jumpingSky', 0);
var v4;
v4 = com.homestarrunner.stinkoman.gamemode.JumpingGame._mc.playerClip_mc.attachMovie('playerRegular', 'playerClip', 1);
com.homestarrunner.stinkoman.gamemode.JumpingGame.player1 = new com.homestarrunner.stinkoman.player.JumpingPlayer(v4, com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.l, com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.r, com.homestarrunner.stinkoman.gamemode.JumpingGame.direction);
com.homestarrunner.stinkoman.gamemode.JumpingGame.gameSound = new com.homestarrunner.stinkoman.SoundTrack(com.homestarrunner.stinkoman.gamemode.JumpingGame._mc);
com.homestarrunner.stinkoman.gamemode.JumpingGame.gameSound.startFromBeginning();
com.homestarrunner.stinkoman.gamemode.JumpingGame.inProgress = true;
com.homestarrunner.stinkoman.gamemode.JumpingGame._mc.onEnterFrame = function () {
thisJumpingGame.update();
};
};
com.homestarrunner.stinkoman.gamemode.JumpingGame = v1;
var v2 = v1.prototype;
v2.update = function () {
if (!com.homestarrunner.stinkoman.gamemode.JumpingGame.inProgress) {
return undefined;
}
if (com.homestarrunner.stinkoman.gamemode.JumpingGame.direction == 'up') {
com.homestarrunner.stinkoman.gamemode.JumpingGame.updateUp();
} else {
com.homestarrunner.stinkoman.gamemode.JumpingGame.updateDown();
}
--com.homestarrunner.stinkoman.gamemode.JumpingGame.cloudPopCounter;
var v3 = this;
if (com.homestarrunner.stinkoman.gamemode.JumpingGame.cloudPopCounter < 0) {
com.homestarrunner.stinkoman.gamemode.JumpingGame.cloudPopCounter = Math.floor(Math.random() * 25);
var v2 = com.homestarrunner.stinkoman.gamemode.JumpingGame._mc.gameStage_mc.attachMovie('cloud_mc', 'cloud_mc' + com.homestarrunner.stinkoman.gamemode.JumpingGame.cloudDepthCounter, com.homestarrunner.stinkoman.gamemode.JumpingGame.cloudDepthCounter++);
if (com.homestarrunner.stinkoman.gamemode.JumpingGame.cloudDepthCounter > 300) {
com.homestarrunner.stinkoman.gamemode.JumpingGame.cloudDepthCounter = 101;
}
v2.gotoAndStop(Math.floor(Math.random() * v2._totalframes) + 1);
v2._x = Math.floor(Math.random() * (com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.r - com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.l));
if (com.homestarrunner.stinkoman.gamemode.JumpingGame.direction == 'up') {
v2._y = com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.t - 40;
} else {
v2._y = com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.b + 40;
}
v2.onEnterFrame = function () {
if (com.homestarrunner.stinkoman.gamemode.JumpingGame.direction == 'up') {
this._y += 10;
if (this._y > com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.b + 20) {
this.removeMovieClip();
}
} else {
this._y -= 10;
if (this._y < com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.t - 20) {
this.removeMovieClip();
}
}
};
}
};
v1.updateUp = function () {
--com.homestarrunner.stinkoman.gamemode.JumpingGame.dropPopCounter;
if (com.homestarrunner.stinkoman.gamemode.JumpingGame.dropPopCounter < 0) {
com.homestarrunner.stinkoman.gamemode.JumpingGame.dropPopCounter = Math.floor(Math.random() * 25) + 5;
var v1 = new com.homestarrunner.stinkoman.stageobject.Drop(com.homestarrunner.stinkoman.gamemode.JumpingGame._mc.gameStage_mc);
}
--com.homestarrunner.stinkoman.gamemode.JumpingGame.buzzPopCounter;
if (com.homestarrunner.stinkoman.gamemode.JumpingGame.buzzPopCounter < 0) {
com.homestarrunner.stinkoman.gamemode.JumpingGame.buzzPopCounter = Math.floor(Math.random() * 25) + 25;
var v2 = new com.homestarrunner.stinkoman.stageobject.CloudBuzzer(com.homestarrunner.stinkoman.gamemode.JumpingGame._mc.gameStage_mc);
}
};
v1.updateDown = function () {
--com.homestarrunner.stinkoman.gamemode.JumpingGame.foodCounter;
if (com.homestarrunner.stinkoman.gamemode.JumpingGame.foodCounter < 0) {
com.homestarrunner.stinkoman.gamemode.JumpingGame.foodCounter = Math.floor(Math.random() * 3) + 2;
var v1 = Math.floor(Math.random() * 6);
if (v1 == 5) {
v1 = 0;
}
var v2 = new com.homestarrunner.stinkoman.stageobject.JumpingFood(com.homestarrunner.stinkoman.gamemode.JumpingGame._mc.gameStage_mc, v1);
}
};
v1.loseLife = function () {
com.homestarrunner.stinkoman.gamemode.JumpingGame.inProgress = false;
delete com.homestarrunner.stinkoman.gamemode.JumpingGame.player1._mc.onEnterFrame;
com.homestarrunner.stinkoman.gamemode.JumpingGame.player1._mc.stop();
com.homestarrunner.stinkoman.gamemode.JumpingGame.player1._mc.gotoAndStop('youDead_' + com.homestarrunner.stinkoman.gamemode.JumpingGame.player1.facingDir);
com.homestarrunner.stinkoman.gamemode.JumpingGame.gameSound.stop();
};
v1.doneDying = function () {
if (com.homestarrunner.stinkoman.struct.GlobalData.mans > 0) {
com.homestarrunner.stinkoman.gamemode.JumpingGame.player1.reset();
com.homestarrunner.stinkoman.gamemode.JumpingGame.gameSound.startFromBeginning();
com.homestarrunner.stinkoman.stageobject.JumpingEnemy.resetEnemies();
com.homestarrunner.stinkoman.gamemode.JumpingGame.inProgress = true;
com.homestarrunner.stinkoman.ui.Interface.update();
} else {
_root.gotoAndPlay('gameOver');
}
};
v1.doneAscending = function () {
com.homestarrunner.stinkoman.struct.GlobalData.markCurrentLevelAsDone();
com.homestarrunner.stinkoman.struct.GlobalData.levelUp();
com.homestarrunner.stinkoman.gamemode.JumpingGame.gameSound.stop();
_root.gotoAndPlay('cutScene');
};
v1.doneDescending = function () {
com.homestarrunner.stinkoman.struct.GlobalData.markCurrentLevelAsDone();
com.homestarrunner.stinkoman.struct.GlobalData.levelUp();
com.homestarrunner.stinkoman.gamemode.JumpingGame.gameSound.stop();
_root.gotoAndPlay('cutScene');
delete com.homestarrunner.stinkoman.gamemode.JumpingGame._mc.onEnterFrame;
};
v1.depthCounter = 301;
v1.cloudPopCounter = 0;
v1.cloudDepthCounter = 101;
v1.dropPopCounter = 0;
v1.buzzPopCounter = 0;
v1.foodCounter = 0;
ASSetPropFlags(com.homestarrunner.stinkoman.gamemode.JumpingGame.prototype, null, 1);
}
#endinitclip
}
movieClip 2842 __Packages.com.homestarrunner.stinkoman.player.JumpingPlayer {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.player) {
_global.com.homestarrunner.stinkoman.player = new Object();
}
if (!_global.com.homestarrunner.stinkoman.player.JumpingPlayer) {
var v1 = function (p_mc, plLimit, prLimit, pDirection) {
this.lLimit = plLimit;
this.rLimit = prLimit;
this.incrSpeed = 4;
this.maxSpeed = 12;
this.shadowArray = new Array();
this.direction = pDirection;
this._mc = p_mc;
this._mc.gameMode = 'jumping';
this.reset();
};
com.homestarrunner.stinkoman.player.JumpingPlayer = v1;
var v2 = v1.prototype;
v2.reset = function () {
var thisJumpingPlayer = this;
this.xVel = 0;
this.facingDir = 'right';
this._mc._x = this.lLimit + (this.rLimit - this.lLimit) / 2;
if (this.direction == 'up') {
this._mc._y = 233;
} else {
this._mc._y = 150;
if (com.homestarrunner.stinkoman.struct.GlobalData.updatedDifficulty) {
this._mc._y = 100;
}
}
this._mc.gotoAndStop('jump_' + this.facingDir);
this.punching = false;
com.homestarrunner.stinkoman.struct.GlobalData.resetHits();
com.homestarrunner.stinkoman.struct.GlobalData.items = 0;
com.homestarrunner.stinkoman.ui.Interface.update();
this.invincibleCounter = 0;
this.hitRecoverCounter = 0;
this._mc.onEnterFrame = function () {
thisJumpingPlayer.update();
};
};
v2.update = function () {
this.updateShadow();
this.updateCounters();
if (this.hitRecoverCounter <= 0) {
if (Key.isDown(39)) {
this.moveRight();
} else {
if (Key.isDown(37)) {
this.moveLeft();
}
}
if (Key.isDown(83)) {
this.punching = true;
} else {
this.punching = false;
}
if (this.punching) {
this._mc.gotoAndStop('jumppunch_' + this.facingDir);
} else {
this._mc.gotoAndStop('jump_' + this.facingDir);
}
}
this._mc._x += this.xVel;
if (this._mc._x < this.lLimit) {
this._mc._x -= this.xVel;
this.xVel -= this.xVel;
}
if (this._mc._x > this.rLimit) {
this._mc._x -= this.xVel;
this.xVel -= this.xVel;
}
this.xVel *= this.deceleration;
this.testForDamage();
if (this.punching) {
this.testForPopDrop();
}
};
v2.moveRight = function () {
this.facingDir = 'right';
this._mc.animator_mc.play();
this.xVel += this.incrSpeed;
if (this.xVel > this.maxSpeed) {
this.xVel = this.maxSpeed;
}
};
v2.moveLeft = function () {
this.facingDir = 'left';
this._mc.animator_mc.play();
this.xVel -= this.incrSpeed;
if (this.xVel < -this.maxSpeed) {
this.xVel = -this.maxSpeed;
}
};
v2.updateShadow = function () {
var v4 = this;
--this.shadowTimeCounter;
if (this.shadowTimeCounter <= 0) {
this.shadowTimeCounter = 5;
var v3 = _root.gameStage_mc.attachMovie('jumpShadow', 'jumpShadow' + this.shadowDepthCounter, this.shadowDepthCounter++);
v3._x = this._mc._x;
v3._y = this._mc._y;
v3._alpha = 50;
v3.gotoAndStop(this.facingDir);
if (this.shadowDepthCounter >= 100) {
this.shadowDepthCounter = 0;
}
if (this.direction == 'up') {
v3.onEnterFrame = function () {
this._y += 20;
if (this._y > 500) {
this.removeMovieClip();
}
};
} else {
v3.onEnterFrame = function () {
this._y -= 20;
if (this._y < -50) {
this.removeMovieClip();
}
};
}
}
};
v2.testForDamage = function () {
if (this.invincibleCounter > 0) {
return undefined;
}
if (this.direction == 'up') {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray.length) {
if (com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray[v2].hurtPlayer(this._mc.hitTestHurt_mc)) {
if (com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray[v2].mType == 1) {
this.takeDamage();
} else {
this.testForCollect(com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray[v2]);
}
}
++v2;
}
} else {}
};
v2.takeDamage = function (fromRight) {
this.hitRecoverCounter = 24;
this.invincibleCounter = 48;
this.punching = false;
if (this.facingDir == 'right') {
this.xVel = -20;
} else {
this.xVel = 20;
}
this._mc.gotoAndStop('hit_' + this.facingDir);
this._mc.animator_mc.play();
--com.homestarrunner.stinkoman.struct.GlobalData.hits;
com.homestarrunner.stinkoman.ui.Interface.update();
if (com.homestarrunner.stinkoman.struct.GlobalData.hits == 0) {
this.endLife();
}
};
v2.updateCounters = function () {
if (this.hitRecoverCounter > 0) {
--this.hitRecoverCounter;
if (this.hitRecoverCounter == 0) {
this._mc.gotoAndStop('wait_' + this.facingDir);
}
}
if (this.invincibleCounter > 0) {
--this.invincibleCounter;
if (this.invincibleCounter % 6 == 0 && this.hitRecoverCounter <= 0) {
this._mc._visible = false;
} else {
this._mc._visible = true;
}
if (this.invincibleCounter == 0) {
this._mc._visible = true;
}
}
};
v2.endLife = function () {
--com.homestarrunner.stinkoman.struct.GlobalData.mans;
com.homestarrunner.stinkoman.struct.GlobalData.hits = 0;
com.homestarrunner.stinkoman.ui.Interface.update();
com.homestarrunner.stinkoman.gamemode.JumpingGame.loseLife();
};
v2.testForPopDrop = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray.length) {
if (com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray[v2].mType == 0 && com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray[v2].hurtPlayer(this._mc.wave_mc)) {
com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray[v2].pop();
}
++v2;
}
};
v2.testForCollect = function (dropObj) {
if (dropObj.popped) {
++com.homestarrunner.stinkoman.struct.GlobalData.items;
com.homestarrunner.stinkoman.ui.Interface.update();
dropObj._mc.gotoAndPlay('shineGet');
if (com.homestarrunner.stinkoman.struct.GlobalData.items >= 20) {
com.homestarrunner.stinkoman.gamemode.JumpingGame.doneAscending();
}
}
};
v2.deceleration = 0.8;
v2.shadowDepthCounter = 0;
v2.shadowTimeCounter = 5;
ASSetPropFlags(com.homestarrunner.stinkoman.player.JumpingPlayer.prototype, null, 1);
}
#endinitclip
}
movieClip 2843 __Packages.com.homestarrunner.stinkoman.stageobject.JumpingEnemy {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.JumpingEnemy) {
var v1 = function (pStage_mc, clipname) {
if (com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray == undefined || com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray.length == 0) {
com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray = new Array();
}
var thisJumpingEnemy = this;
this.stage_mc = pStage_mc;
this._mc = this.stage_mc.attachMovie(clipname, 'JumpingEnemy' + com.homestarrunner.stinkoman.gamemode.JumpingGame.depthCounter, com.homestarrunner.stinkoman.gamemode.JumpingGame.depthCounter++);
if (com.homestarrunner.stinkoman.gamemode.JumpingGame.depthCounter > 600) {
com.homestarrunner.stinkoman.gamemode.JumpingGame.depthCounter = 301;
}
this._mc.onEnterFrame = function () {
thisJumpingEnemy.update();
};
com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray.push(this);
};
com.homestarrunner.stinkoman.stageobject.JumpingEnemy = v1;
var v2 = v1.prototype;
v2.update = function () {};
v2.clearFromObjectsArray = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray.length) {
if (com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray[v2] == this) {
com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray.splice(v2, 1);
return undefined;
}
++v2;
}
};
v2.kill = function () {
this.clearFromObjectsArray();
this._mc.removeMovieClip();
false;
};
v2.hurtPlayer = function (test_mc) {
return this._mc.hitArea_mc.hitTest(test_mc);
};
v1.resetEnemies = function () {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray.length) {
com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray[v1]._mc.removeMovieClip();
delete com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray[v1];
++v1;
}
com.homestarrunner.stinkoman.stageobject.JumpingEnemy.enemyArray = new Array();
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.JumpingEnemy.prototype, null, 1);
}
#endinitclip
}
movieClip 2844 __Packages.com.homestarrunner.stinkoman.stageobject.Drop {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.Drop) {
var v1 = function (pStage_mc) {
super(pStage_mc, 'dropCloudBaddie');
this._mc._x = Math.floor(Math.random() * (com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.r - com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.l));
this._mc._y = com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.t - 40;
this.popped = false;
this.collectable = false;
this.mType = 0;
this._mc.myDrop = this;
};
com.homestarrunner.stinkoman.stageobject.Drop = v1;
com.homestarrunner.stinkoman.stageobject.Drop extends com.homestarrunner.stinkoman.stageobject.JumpingEnemy;
var v2 = v1.prototype;
v2.update = function () {
this._mc._y += 15;
if (this._mc._y > com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.b + 20) {
this._mc.removeMovieClip();
false;
}
};
v2.pop = function () {
if (!this.popped) {
this._mc.gotoAndPlay('splish');
this.popped = true;
delete this._mc.onEnterFrame;
}
};
v2.collect = function () {};
v2.popped = false;
v2.collectable = false;
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.Drop.prototype, null, 1);
}
#endinitclip
}
movieClip 2845 __Packages.com.homestarrunner.stinkoman.stageobject.CloudBuzzer {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.CloudBuzzer) {
var v1 = function (pStage_mc) {
super(pStage_mc, 'cloudBuzzer_mc');
this._mc._x = Math.floor(Math.random() * (com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.r - com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.l));
this._mc._y = com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.b + 40;
this.mType = 1;
};
com.homestarrunner.stinkoman.stageobject.CloudBuzzer = v1;
com.homestarrunner.stinkoman.stageobject.CloudBuzzer extends com.homestarrunner.stinkoman.stageobject.JumpingEnemy;
var v2 = v1.prototype;
v2.update = function () {
this._mc._y -= 6;
var v2 = this._mc._parent._parent.player_mc;
if (v2._x - 10 > this._mc._x) {
this._mc._x += 3;
} else {
this._mc._x -= 3;
}
if (this._mc._y < com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.t - 20) {
this.kill();
}
};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.CloudBuzzer.prototype, null, 1);
}
#endinitclip
}
movieClip 2846 __Packages.com.homestarrunner.stinkoman.stageobject.JumpingFood {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject) {
_global.com.homestarrunner.stinkoman.stageobject = new Object();
}
if (!_global.com.homestarrunner.stinkoman.stageobject.JumpingFood) {
var v1 = function (pStage_mc, whichNum) {
super(pStage_mc, 'descent' + whichNum);
this._mc._x = Math.floor(Math.random() * (com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.r - com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.l));
this._mc._y = com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.b + 40;
this.foodType = whichNum;
this.eaten = false;
this.mType = 2;
this._mc.mFood = this;
};
com.homestarrunner.stinkoman.stageobject.JumpingFood = v1;
com.homestarrunner.stinkoman.stageobject.JumpingFood extends com.homestarrunner.stinkoman.stageobject.JumpingEnemy;
var v2 = v1.prototype;
v2.update = function () {
this._mc._y -= 15;
if (this._mc._y < com.homestarrunner.stinkoman.gamemode.JumpingGame.viewBox.t - 50) {
this._mc.removeMovieClip();
false;
}
if (!this.eaten && com.homestarrunner.stinkoman.gamemode.JumpingGame.player1._mc.hitTestHurt_mc.hitTest(this._mc)) {
if (this.foodType == 0) {
++com.homestarrunner.stinkoman.struct.GlobalData.items;
if (com.homestarrunner.stinkoman.struct.GlobalData.items >= 10) {
com.homestarrunner.stinkoman.gamemode.JumpingGame.doneDescending();
}
} else {
--com.homestarrunner.stinkoman.struct.GlobalData.items;
if (com.homestarrunner.stinkoman.struct.GlobalData.items <= 0) {
com.homestarrunner.stinkoman.struct.GlobalData.items = 0;
}
}
this.eatMe();
com.homestarrunner.stinkoman.ui.Interface.update();
}
};
v2.eatMe = function () {
if (!this.eaten) {
this._mc.gotoAndPlay('chomp');
this.eaten = true;
delete this._mc.onEnterFrame;
}
};
v2.collect = function () {};
ASSetPropFlags(com.homestarrunner.stinkoman.stageobject.JumpingFood.prototype, null, 1);
}
#endinitclip
}
movieClip 2847 __Packages.com.homestarrunner.stinkoman.struct.StinkomanXMLData {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.struct) {
_global.com.homestarrunner.stinkoman.struct = new Object();
}
if (!_global.com.homestarrunner.stinkoman.struct.StinkomanXMLData) {
var v1 = function () {};
com.homestarrunner.stinkoman.struct.StinkomanXMLData = v1;
var v2 = v1.prototype;
v1.load = function () {
com.homestarrunner.stinkoman.struct.StinkomanXMLData.XMLArray = new Array();
var v1 = 0;
while (v1 <= com.homestarrunner.stinkoman.struct.GlobalData.maxSublevel) {
com.homestarrunner.stinkoman.struct.StinkomanXMLData.XMLArray[v1] = new Array();
++v1;
}
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(1, 1);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(1, 2);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(1, 3);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(1, 4);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(2, 1);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(2, 2);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(2, 3);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(2, 4);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(3, 3);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(4, 1);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(4, 2);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(4, 3);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(5, 1);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(5, 2);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(5, 3);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(6, 1);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(6, 2);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(6, 3);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(7, 1);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(7, 2);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(7, 3);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(8, 1);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(8, 2);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(8, 3);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(9, 1);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(9, 2);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(9, 3);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(10, 1);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(10, 2);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(10, 3);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(10, 4);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(10, 5);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(10, 6);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.makeNewXML(11, 1);
};
v1.makeNewXML = function (sub, subsub) {
var xmlName = 'levelData/level1.' + sub + '.' + subsub + '.xml';
trace('Loading ' + xmlName);
++com.homestarrunner.stinkoman.struct.StinkomanXMLData.dataFilesRequested;
com.homestarrunner.stinkoman.struct.StinkomanXMLData.XMLArray[sub][subsub] = new XML();
com.homestarrunner.stinkoman.struct.StinkomanXMLData.XMLArray[sub][subsub].ignoreWhite = true;
com.homestarrunner.stinkoman.struct.StinkomanXMLData.XMLArray[sub][subsub].load(xmlName);
com.homestarrunner.stinkoman.struct.StinkomanXMLData.XMLArray[sub][subsub].onLoad = function (success) {
trace('XMLfile ' + sub + '.' + subsub + ' loaded. Success = ' + success);
++com.homestarrunner.stinkoman.struct.StinkomanXMLData.dataFilesLoaded;
trace('Loaded ' + xmlName);
};
};
v1.allLoaded = function () {
if (com.homestarrunner.stinkoman.struct.StinkomanXMLData.dataFilesLoaded >= com.homestarrunner.stinkoman.struct.StinkomanXMLData.dataFilesRequested) {
return true;
} else {
return false;
}
};
v1.getXML = function (sub, subsub) {
trace('getXML: ' + sub + '.' + subsub);
if (com.homestarrunner.stinkoman.struct.GlobalData.useLocalLevelBuffer) {
return new XML((com.homestarrunner.stinkoman.util.LocalData.load('stinkomanLevel', 'lDataXML', '/')).toString());
} else {
if (com.homestarrunner.stinkoman.struct.StinkomanXMLData.XMLArray[sub][subsub] == undefined) {
trace('Couldn\'t find XML for level ' + sub + ', sublevel ' + subsub + '. ' + 'Check that the makeNewXML function is being called in StinkomanXMLData');
}
return com.homestarrunner.stinkoman.struct.StinkomanXMLData.XMLArray[sub][subsub];
}
};
v1.dataFilesLoaded = 0;
v1.dataFilesRequested = 0;
ASSetPropFlags(com.homestarrunner.stinkoman.struct.StinkomanXMLData.prototype, null, 1);
}
#endinitclip
}
movieClip 2848 __Packages.com.robertpenner.easing.Quad {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.robertpenner) {
_global.com.robertpenner = new Object();
}
if (!_global.com.robertpenner.easing) {
_global.com.robertpenner.easing = new Object();
}
if (!_global.com.robertpenner.easing.Quad) {
var v1 = function () {};
com.robertpenner.easing.Quad = v1;
var v2 = v1.prototype;
v1.easeIn = function (t, b, c, d) {
t /= d;
return c * t * t + b;
};
v1.easeOut = function (t, b, c, d) {
t /= d;
return -c * t * (t - 2) + b;
};
v1.easeInOut = function (t, b, c, d) {
t /= d / 2;
if (t < 1) {
return (c / 2) * t * t + b;
}
return (-c / 2) * (--t * (t - 2) - 1) + b;
};
v1.easeOutIn = function (t, b, c, d) {
t /= d / 2;
if (t < 1) {
return (-c / 2) * (--t * t - 1) + b;
}
return (c / 2) * (--t * t + 1) + b;
};
ASSetPropFlags(com.robertpenner.easing.Quad.prototype, null, 1);
}
#endinitclip
}
movieClip 2849 __Packages.com.robertpenner.easing.Circ {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.robertpenner) {
_global.com.robertpenner = new Object();
}
if (!_global.com.robertpenner.easing) {
_global.com.robertpenner.easing = new Object();
}
if (!_global.com.robertpenner.easing.Circ) {
var v1 = function () {};
com.robertpenner.easing.Circ = v1;
var v2 = v1.prototype;
v1.easeIn = function (t, b, c, d) {
t /= d;
return -c * (Math.sqrt(1 - t * t) - 1) + b;
};
v1.easeOut = function (t, b, c, d) {
t = t / d - 1;
return c * Math.sqrt(1 - t * t) + b;
};
v1.easeInOut = function (t, b, c, d) {
t /= d / 2;
if (t < 1) {
return (-c / 2) * (Math.sqrt(1 - t * t) - 1) + b;
}
t -= 2;
return (c / 2) * (Math.sqrt(1 - t * t) + 1) + b;
};
v1.easeOutIn = function (t, b, c, d) {
t /= d / 2;
if (t < 1) {
return (c / 2) * Math.sqrt(1 - --t * t) + b;
}
return (c / 2) * (2 - Math.sqrt(1 - --t * t)) + b;
};
ASSetPropFlags(com.robertpenner.easing.Circ.prototype, null, 1);
}
#endinitclip
}
movieClip 2850 __Packages.com.robertpenner.easing.Quart {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.robertpenner) {
_global.com.robertpenner = new Object();
}
if (!_global.com.robertpenner.easing) {
_global.com.robertpenner.easing = new Object();
}
if (!_global.com.robertpenner.easing.Quart) {
var v1 = function () {};
com.robertpenner.easing.Quart = v1;
var v2 = v1.prototype;
v1.easeIn = function (t, b, c, d) {
t /= d;
return c * t * t * t * t + b;
};
v1.easeOut = function (t, b, c, d) {
t = t / d - 1;
return -c * (t * t * t * t - 1) + b;
};
v1.easeInOut = function (t, b, c, d) {
t /= d / 2;
if (t < 1) {
return (c / 2) * t * t * t * t + b;
}
t -= 2;
return (-c / 2) * (t * t * t * t - 2) + b;
};
v1.easeOutIn = function (t, b, c, d) {
t /= d / 2;
if (t < 1) {
return (-c / 2) * (--t * t * t * t - 1) + b;
}
return (c / 2) * (--t * t * t * t + 1) + b;
};
ASSetPropFlags(com.robertpenner.easing.Quart.prototype, null, 1);
}
#endinitclip
}
movieClip 2851 __Packages.com.robertpenner.easing.Sine {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.robertpenner) {
_global.com.robertpenner = new Object();
}
if (!_global.com.robertpenner.easing) {
_global.com.robertpenner.easing = new Object();
}
if (!_global.com.robertpenner.easing.Sine) {
var v1 = function () {};
com.robertpenner.easing.Sine = v1;
var v2 = v1.prototype;
v1.easeIn = function (t, b, c, d) {
return -c * Math.cos((t / d) * 1.570796326794897) + c + b;
};
v1.easeOut = function (t, b, c, d) {
return c * Math.sin((t / d) * 1.570796326794897) + b;
};
v1.easeInOut = function (t, b, c, d) {
return (-c / 2) * (Math.cos(Math.PI * t / d) - 1) + b;
};
v1.easeOutIn = function (t, b, c, d) {
t /= d / 2;
if (t < 1) {
return (c / 2) * Math.sin(Math.PI * t / 2) + b;
}
return (-c / 2) * (Math.cos(Math.PI * --t / 2) - 2) + b;
};
ASSetPropFlags(com.robertpenner.easing.Sine.prototype, null, 1);
}
#endinitclip
}
movieClip 2852 __Packages.com.robertpenner.easing.Back {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.robertpenner) {
_global.com.robertpenner = new Object();
}
if (!_global.com.robertpenner.easing) {
_global.com.robertpenner.easing = new Object();
}
if (!_global.com.robertpenner.easing.Back) {
var v1 = function () {};
com.robertpenner.easing.Back = v1;
var v2 = v1.prototype;
v1.easeIn = function (t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t /= d;
return c * t * t * ((s + 1) * t - s) + b;
};
v1.easeOut = function (t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / d - 1;
return c * (t * t * ((s + 1) * t + s) + 1) + b;
};
v1.easeInOut = function (t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t /= d / 2;
if (t < 1) {
s *= 1.525;
return (c / 2) * (t * t * ((s + 1) * t - s)) + b;
}
t -= 2;
s *= 1.525;
return (c / 2) * (t * t * ((s + 1) * t + s) + 2) + b;
};
v1.easeOutIn = function (t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t /= d / 2;
if (t < 1) {
s *= 1.525;
return (c / 2) * (--t * t * ((s + 1) * t + s) + 1) + b;
}
s *= 1.525;
return (c / 2) * (--t * t * ((s + 1) * t - s) + 1) + b;
};
ASSetPropFlags(com.robertpenner.easing.Back.prototype, null, 1);
}
#endinitclip
}
movieClip 2853 __Packages.com.robertpenner.easing.Quint {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.robertpenner) {
_global.com.robertpenner = new Object();
}
if (!_global.com.robertpenner.easing) {
_global.com.robertpenner.easing = new Object();
}
if (!_global.com.robertpenner.easing.Quint) {
var v1 = function () {};
com.robertpenner.easing.Quint = v1;
var v2 = v1.prototype;
v1.easeIn = function (t, b, c, d) {
t /= d;
return c * t * t * t * t * t + b;
};
v1.easeOut = function (t, b, c, d) {
t = t / d - 1;
return c * (t * t * t * t * t + 1) + b;
};
v1.easeInOut = function (t, b, c, d) {
t /= d / 2;
if (t < 1) {
return (c / 2) * t * t * t * t * t + b;
}
t -= 2;
return (c / 2) * (t * t * t * t * t + 2) + b;
};
v1.easeOutIn = function (t, b, c, d) {
t /= d / 2;
return (c / 2) * (--t * t * t * t * t + 1) + b;
};
ASSetPropFlags(com.robertpenner.easing.Quint.prototype, null, 1);
}
#endinitclip
}
movieClip 2854 __Packages.com.robertpenner.easing.Linear {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.robertpenner) {
_global.com.robertpenner = new Object();
}
if (!_global.com.robertpenner.easing) {
_global.com.robertpenner.easing = new Object();
}
if (!_global.com.robertpenner.easing.Linear) {
var v1 = function () {};
com.robertpenner.easing.Linear = v1;
var v2 = v1.prototype;
v1.easeNone = function (t, b, c, d) {
return c * t / d + b;
};
v1.easeIn = function (t, b, c, d) {
return c * t / d + b;
};
v1.easeOut = function (t, b, c, d) {
return c * t / d + b;
};
v1.easeInOut = function (t, b, c, d) {
return c * t / d + b;
};
v1.easeOutIn = function (t, b, c, d) {
return c * t / d + b;
};
ASSetPropFlags(com.robertpenner.easing.Linear.prototype, null, 1);
}
#endinitclip
}
movieClip 2855 __Packages.com.robertpenner.easing.Expo {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.robertpenner) {
_global.com.robertpenner = new Object();
}
if (!_global.com.robertpenner.easing) {
_global.com.robertpenner.easing = new Object();
}
if (!_global.com.robertpenner.easing.Expo) {
var v1 = function () {};
com.robertpenner.easing.Expo = v1;
var v2 = v1.prototype;
v1.easeIn = function (t, b, c, d) {
return (t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b;
};
v1.easeOut = function (t, b, c, d) {
return (t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b;
};
v1.easeInOut = function (t, b, c, d) {
if (t == 0) {
return b;
}
if (t == d) {
return b + c;
}
t /= d / 2;
if (t < 1) {
return (c / 2) * Math.pow(2, 10 * (t - 1)) + b;
}
return (c / 2) * (-Math.pow(2, -10 * --t) + 2) + b;
};
v1.easeOutIn = function (t, b, c, d) {
if (t == 0) {
return b;
}
if (t == d) {
return b + c;
}
t /= d / 2;
if (t < 1) {
return (c / 2) * (-Math.pow(2, -10 * t) + 1) + b;
}
return (c / 2) * (Math.pow(2, 10 * (t - 2)) + 1) + b;
};
ASSetPropFlags(com.robertpenner.easing.Expo.prototype, null, 1);
}
#endinitclip
}
movieClip 2856 __Packages.com.robertpenner.easing.Elastic {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.robertpenner) {
_global.com.robertpenner = new Object();
}
if (!_global.com.robertpenner.easing) {
_global.com.robertpenner.easing = new Object();
}
if (!_global.com.robertpenner.easing.Elastic) {
var v1 = function () {};
com.robertpenner.easing.Elastic = v1;
var v2 = v1.prototype;
v1.easeIn = function (t, b, c, d, a, p) {
if (t == 0) {
return b;
}
t /= d;
if (t == 1) {
return b + c;
}
if (!p) {
p = d * 0.3;
}
if (!a || a < Math.abs(c)) {
a = c;
var v7 = p / 4;
t -= 1;
return -(a * Math.pow(2, 10 * t) * Math.sin((t * d - v7) * 6.283185307179586 / p)) + b;
}
v7 = (p / 6.283185307179586) * Math.asin(c / a);
t -= 1;
return -(a * Math.pow(2, 10 * t) * Math.sin((t * d - v7) * 6.283185307179586 / p)) + b;
};
v1.easeOut = function (t, b, c, d, a, p) {
if (t == 0) {
return b;
}
t /= d;
if (t == 1) {
return b + c;
}
if (!p) {
p = d * 0.3;
}
if (!a || a < Math.abs(c)) {
a = c;
var v7 = p / 4;
return a * Math.pow(2, -10 * t) * Math.sin((t * d - v7) * 6.283185307179586 / p) + c + b;
}
v7 = (p / 6.283185307179586) * Math.asin(c / a);
return a * Math.pow(2, -10 * t) * Math.sin((t * d - v7) * 6.283185307179586 / p) + c + b;
};
v1.easeInOut = function (t, b, c, d, a, p) {
if (t == 0) {
return b;
}
t /= d / 2;
if (t == 2) {
return b + c;
}
if (!p) {
p = d * 0.45;
}
if (!a || a < Math.abs(c)) {
a = c;
var v7 = p / 4;
} else {
var v7 = (p / 6.283185307179586) * Math.asin(c / a);
}
if (t < 1) {
t -= 1;
return -0.5 * (a * Math.pow(2, 10 * t) * Math.sin((t * d - v7) * 6.283185307179586 / p)) + b;
}
t -= 1;
return a * Math.pow(2, -10 * t) * Math.sin((t * d - v7) * 6.283185307179586 / p) * 0.5 + c + b;
};
v1.easeOutIn = function (t, b, c, d, a, p) {
if (t == 0) {
return b;
}
t /= d / 2;
if (t == 2) {
return b + c;
}
if (!p) {
p = d * 0.45;
}
if (!a || a < Math.abs(c)) {
a = c;
var v7 = p / 4;
} else {
var v7 = (p / 6.283185307179586) * Math.asin(c / a);
}
if (t < 1) {
return 0.5 * (a * Math.pow(2, -10 * t) * Math.sin((t * d - v7) * 6.283185307179586 / p)) + c / 2 + b;
}
return c / 2 + 0.5 * (a * Math.pow(2, 10 * (t - 2)) * Math.sin((t * d - v7) * 6.283185307179586 / p)) + b;
};
ASSetPropFlags(com.robertpenner.easing.Elastic.prototype, null, 1);
}
#endinitclip
}
movieClip 2857 __Packages.com.robertpenner.easing.Bounce {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.robertpenner) {
_global.com.robertpenner = new Object();
}
if (!_global.com.robertpenner.easing) {
_global.com.robertpenner.easing = new Object();
}
if (!_global.com.robertpenner.easing.Bounce) {
var v1 = function () {};
com.robertpenner.easing.Bounce = v1;
var v2 = v1.prototype;
v1.easeOut = function (t, b, c, d) {
t /= d;
if (t < 0.3636363636363637) {
return c * (7.5625 * t * t) + b;
} else {
if (t < 0.7272727272727273) {
t -= 0.5454545454545454;
return c * (7.5625 * t * t + 0.75) + b;
} else {
if (t < 0.9090909090909091) {
t -= 0.8181818181818182;
return c * (7.5625 * t * t + 0.9375) + b;
} else {
t -= 0.9545454545454546;
return c * (7.5625 * t * t + 0.984375) + b;
}
}
}
};
v1.easeIn = function (t, b, c, d) {
return c - com.robertpenner.easing.Bounce.easeOut(d - t, 0, c, d) + b;
};
v1.easeInOut = function (t, b, c, d) {
if (t < d / 2) {
return com.robertpenner.easing.Bounce.easeIn(t * 2, 0, c, d) * 0.5 + b;
} else {
return com.robertpenner.easing.Bounce.easeOut(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;
}
};
v1.easeOutIn = function (t, b, c, d) {
if (t < d / 2) {
return com.robertpenner.easing.Bounce.easeOut(t * 2, 0, c, d) * 0.5 + b;
}
return com.robertpenner.easing.Bounce.easeIn(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;
};
ASSetPropFlags(com.robertpenner.easing.Bounce.prototype, null, 1);
}
#endinitclip
}
movieClip 2858 __Packages.zigo.tweenManager {
#initclip
if (!_global.zigo) {
_global.zigo = new Object();
}
if (!_global.zigo.tweenManager) {
var v1 = function () {
this.playing = false;
this.autoStop = false;
this.broadcastEvents = false;
this.autoOverwrite = true;
this.ints = new Array();
this.lockedTweens = new Object();
this.tweenList = new Array();
};
zigo.tweenManager = v1;
var v2 = v1.prototype;
v2.cleanUp = function () {
if (!(this.tweenList instanceof Array && this.tweenList.length > 0)) {
return undefined;
}
for (var v2 in this.tweenList) {
if (this.tweenList[v2].mc._x == undefined) {
this.tweenList.splice(Number(v2), 1);
}
}
if (this.tweenList.length == 0) {
this.tweenList = [];
this.deinit();
}
for (v2 in this.ints) {
if (this.ints[v2] != undefined && this.ints[v2].mc._x == undefined) {
this.removeDelayedTween(Number(v2));
}
}
};
v2.__set__updateInterval = function (time) {
if (this.playing) {
this.deinit();
this.updateTime = time;
this.init();
} else {
this.updateTime = time;
}
return this.__get__updateInterval();
};
v2.__get__updateInterval = function () {
return this.updateTime;
};
v2.__set__controllerDepth = function (v) {
if (_global.isNaN(v) == true) {
return undefined;
}
if (this.tweenHolder._name != undefined) {
this.tweenHolder.swapDepths(v);
} else {
this._th_depth = v;
}
return this.__get__controllerDepth();
};
v2.__get__controllerDepth = function () {
return this._th_depth;
};
v2.init = function () {
if (this.updateTime > 0) {
clearInterval(this.updateIntId);
this.updateIntId = setInterval(this, 'update', this.updateTime);
} else {
if (this.tweenHolder._name == undefined) {
this.tweenHolder = _root.createEmptyMovieClip('_th_', this._th_depth);
}
var tm = this;
this.tweenHolder.onEnterFrame = function () {
tm.update.call(tm);
};
}
this.playing = true;
this.now = getTimer();
};
v2.deinit = function () {
this.playing = false;
clearInterval(this.updateIntId);
delete this.tweenHolder.onEnterFrame;
};
v2.update = function () {
var v2;
var v10;
var v3;
var v13 = false;
v10 = this.tweenList.length;
if (this.broadcastEvents) {
var v4;
var v7;
var v5;
var v9;
v4 = {};
v7 = {};
v5 = {};
v9 = {};
}
while (v10--) {
v2 = this.tweenList[v10];
if (v2.mc._x == undefined) {
v13 = true;
continue;
}
if (v2.pt != -1) {
continue;
}
if (v2.ts + v2.d > this.now) {
if (v2.ctm == undefined) {
v2.mc[v2.pp] = v2.ef(this.now - v2.ts, v2.ps, v2.ch, v2.d, v2.e1, v2.e2);
} else {
var v8 = {};
for (v3 in v2.ctm) {
v8[v3] = v2.ef(this.now - v2.ts, v2.stm[v3], v2.ctm[v3], v2.d, v2.e1, v2.e2);
}
v2.c.setTransform(v8);
}
if (this.broadcastEvents) {
if (v4[targetPath(v2.mc)] == undefined) {
v4[targetPath(v2.mc)] = v2.mc;
}
if (v5[targetPath(v2.mc)] == undefined) {
v5[targetPath(v2.mc)] = [];
}
v5[targetPath(v2.mc)].push((v2.ctm != undefined) ? '_ct_' : v2.pp);
}
if (v2.cb.updfunc != undefined) {
var v6 = v2.cb.updfunc;
if (typeof v6 == 'string' && v2.cb.updscope != undefined) {
v6 = v2.cb.updscope[v6];
}
v6.apply(v2.cb.updscope, v2.cb.updargs);
}
} else {
if (v2.ctm == undefined) {
v2.mc[v2.pp] = v2.ps + v2.ch;
} else {
var v8 = {};
for (v3 in v2.ctm) {
v8[v3] = v2.stm[v3] + v2.ctm[v3];
}
v2.c.setTransform(v8);
}
if (this.broadcastEvents) {
if (v4[targetPath(v2.mc)] == undefined) {
v4[targetPath(v2.mc)] = v2.mc;
}
if (v7[targetPath(v2.mc)] == undefined) {
v7[targetPath(v2.mc)] = v2.mc;
}
if (v5[targetPath(v2.mc)] == undefined) {
v5[targetPath(v2.mc)] = [];
}
v5[targetPath(v2.mc)].push((v2.ctm != undefined) ? '_ct_' : v2.pp);
if (v9[targetPath(v2.mc)] == undefined) {
v9[targetPath(v2.mc)] = [];
}
v9[targetPath(v2.mc)].push((v2.ctm != undefined) ? '_ct_' : v2.pp);
}
if (v2.cb.updfunc != undefined) {
var v6 = v2.cb.updfunc;
if (typeof v6 == 'string' && v2.cb.updscope != undefined) {
v6 = v2.cb.updscope[v6];
}
v6.updfunc.apply(v2.cb.updscope, v2.cb.updargs);
}
if (endt == undefined) {
var endt = new Array();
}
endt.push(v10);
}
}
if (v13) {
this.cleanUp();
}
for (v3 in v4) {
v4[v3].broadcastMessage('onTweenUpdate', {'target': v4[v3], 'props': v5[v3]});
}
if (endt != undefined) {
this.endTweens(endt);
}
for (v3 in v7) {
v7[v3].broadcastMessage('onTweenEnd', {'target': v7[v3], 'props': v9[v3]});
}
this.now = getTimer();
if (this.updateTime > 0) {
updateAfterEvent();
}
};
v2.endTweens = function (tid_arr) {
var v2;
var v9;
var v3;
var v5;
var v8;
v2 = [];
v9 = tid_arr.length;
v3 = 0;
while (v3 < v9) {
v5 = this.tweenList[tid_arr[v3]].cb;
if (v5 != undefined) {
var v6 = true;
for (v8 in v2) {
if (v2[v8] == v5) {
v6 = false;
break;
}
}
if (v6) {
v2.push(v5);
}
}
this.tweenList.splice(tid_arr[v3], 1);
++v3;
}
v3 = 0;
while (v3 < v2.length) {
var v4 = v2[v3].func;
if (typeof v4 == 'string' && v2[v3].scope != undefined) {
v4 = v2[v3].scope[v4];
}
v4.apply(v2[v3].scope, v2[v3].args);
++v3;
}
if (this.tweenList.length == 0) {
this.deinit();
}
};
v2.removeDelayedTween = function (index) {
clearInterval(this.ints[index].intid);
this.ints[index] = undefined;
var v2 = true;
for (var v3 in this.ints) {
if (this.ints[v3] != undefined) {
v2 = false;
break;
}
}
if (v2) {
this.ints = [];
}
};
v2.addTween = function (mc, props, pEnd, sec, eqFunc, callback, extra1, extra2) {
var v4;
var v13;
var v6;
var v3;
var v2;
if (!this.playing) {
this.init();
}
var v12 = [];
for (v4 in props) {
v13 = props[v4];
v6 = true;
if (v13.substr(0, 4) != '_ct_') {
var v17 = (typeof pEnd[v4] == 'string') ? Number(pEnd[v4]) : pEnd[v4] - mc[v13];
if (this.autoOverwrite) {
for (v3 in this.tweenList) {
v2 = this.tweenList[v3];
if (v2.mc == mc && v2.pp == v13) {
v2.ps = mc[v13];
v2.ch = v17;
v2.ts = this.now;
v2.d = sec * 1000;
v2.ef = eqFunc;
v2.cb = callback;
v2.e1 = extra1;
v2.e2 = extra2;
v2.pt = -1;
v6 = false;
v12.push(v2.pp);
break;
}
}
}
if (v6) {
this.tweenList.unshift({'mc': mc, 'pp': v13, 'ps': mc[v13], 'ch': v17, 'ts': this.now, 'd': sec * 1000, 'ef': eqFunc, 'cb': callback, 'e1': extra1, 'e2': extra2, 'pt': -1});
}
} else {
var v16 = new Color(mc);
var v20 = v16.getTransform();
var v19 = {};
for (v3 in pEnd[v4]) {
if (pEnd[v4][v3] != v20[v3] && pEnd[v4][v3] != undefined) {
v19[v3] = (typeof pEnd[v4][v3] == 'string') ? v20[v3] + Number(pEnd[v4][v3]) : pEnd[v4][v3] - v20[v3];
}
}
if (this.autoOverwrite) {
for (v3 in this.tweenList) {
v2 = this.tweenList[v3];
if (v2.mc == mc && v2.ctm != undefined) {
v2.c = v16;
v2.stm = v20;
v2.ctm = v19;
v2.ts = this.now;
v2.d = sec * 1000;
v2.ef = eqFunc;
v2.cb = callback;
v2.e1 = extra1;
v2.e2 = extra2;
v2.pt = -1;
v6 = false;
v12.push('_ct_');
break;
}
}
}
if (v6) {
this.tweenList.unshift({'mc': mc, 'c': v16, 'stm': v20, 'ctm': v19, 'ts': this.now, 'd': sec * 1000, 'ef': eqFunc, 'cb': callback, 'e1': extra1, 'e2': extra2, 'pt': -1});
}
}
}
if (this.broadcastEvents) {
if (v12.length > 0) {
mc.broadcastMessage('onTweenInterrupt', {'target': mc, 'props': v12});
}
mc.broadcastMessage('onTweenStart', {'target': mc, 'props': props});
}
if (callback.startfunc != undefined) {
var v27 = callback.startfunc;
if (typeof v27 == 'string' && callback.startscope != undefined) {
v27 = callback.startscope[v27];
}
v27.apply(callback.startscope, callback.startargs);
}
if (sec == 0) {
this.update();
}
};
v2.addTweenWithDelay = function (delay, mc, props, pEnd, sec, eqFunc, callback, extra1, extra2) {
var il;
var v3;
il = this.ints.length;
v3 = setInterval(function (obj) {
obj.removeDelayedTween(il);
if (mc._x != undefined) {
obj.addTween(mc, props, pEnd, sec, eqFunc, callback, extra1, extra2);
}
}, delay * 1000, this);
this.ints[il] = {'mc': mc, 'props': props, 'pend': pEnd, 'intid': v3, 'st': getTimer(), 'delay': delay * 1000, 'args': arguments.slice(1), 'pt': -1};
if (!this.playing) {
this.init();
}
};
v2.removeTween = function (mc, props) {
var v8;
var v2;
var v5;
v8 = false;
if (props == undefined && this.broadcastEvents != true) {
v8 = true;
}
v2 = this.tweenList.length;
var v4 = {};
while (v2--) {
if (this.tweenList[v2].mc == mc) {
if (v8) {
this.tweenList.splice(v2, 1);
} else {
for (v5 in props) {
if (this.tweenList[v2].pp == props[v5]) {
this.tweenList.splice(v2, 1);
if (v4[targetPath(mc)] == undefined) {
v4[targetPath(mc)] = {'t': mc, 'p': []};
}
v4[targetPath(mc)].p.push(props[v5]);
} else {
if (props[v5] == '_ct_' && this.tweenList[v2].ctm != undefined && this.tweenList[v2].mc == mc) {
this.tweenList.splice(v2, 1);
if (v4[targetPath(mc)] == undefined) {
v4[targetPath(mc)] = {'t': mc, 'p': []};
}
v4[targetPath(mc)].p.push('_ct_');
}
}
}
}
}
}
v2 = this.ints.length;
while (v2--) {
if (this.ints[v2].mc == mc) {
if (v8) {
this.removeDelayedTween(Number(v2));
} else {
for (v5 in props) {
for (var v11 in this.ints[v2].props) {
if (this.ints[v2].props[v11] == props[v5]) {
this.ints[v2].props.splice(v11, 1);
this.ints[v2].pend.splice(v11, 1);
if (v4[targetPath(mc)] == undefined) {
v4[targetPath(mc)] = {'t': mc, 'p': []};
}
v4[targetPath(mc)].p.push(props[v5]);
}
}
if (this.ints[v2].props.length == 0) {
clearInterval(this.ints[v2].intid);
}
}
}
}
}
if (this.broadcastEvents) {
for (v11 in v4) {
if (v4[v11].p.length > 0) {
v4[v11].t.broadcastMessage('onTweenInterrupt', {'target': v4[v11].t, 'props': v4[v11].p});
}
}
}
if (this.tweenList.length == 0) {
this.deinit();
}
};
v2.isTweening = function (mc, prop) {
var v4 = prop == undefined;
for (var v6 in this.tweenList) {
var v2 = this.tweenList[v6];
if (this.tweenList[v6].mc == mc && this.tweenList[v6].pt == -1 && (v4 || prop == v2.pp || prop == '_ct_' && v2.ctm != undefined)) {
return true;
}
}
return false;
};
v2.getTweens = function (mc) {
var v2 = 0;
for (var v4 in this.tweenList) {
if (this.tweenList[v4].mc == mc) {
++v2;
}
}
return v2;
};
v2.lockTween = function (mc, bool) {
this.lockedTweens[targetPath(mc)] = bool;
};
v2.isTweenLocked = function (mc) {
if (this.lockedTweens[targetPath(mc)] == undefined) {
return false;
} else {
return this.lockedTweens[targetPath(mc)];
}
};
v2.ffTween = function (mc, propsObj) {
var v4 = mc == undefined;
var v6 = propsObj == undefined;
for (var v8 in this.tweenList) {
var v2 = this.tweenList[v8];
if ((v2.mc == mc || v4) && (v6 || propsObj[v2.pp] == true)) {
if (v2.pt != -1) {
v2.pt = -1;
}
v2.ts = this.now - v2.d;
}
}
for (v8 in this.ints) {
if (this.ints[v8] != undefined) {
if (this.ints[v8].mc == mc || v4) {
if (this.ints[v8].mc._x != undefined) {
var v3 = this.ints[v8].args;
v3[3] = 0;
this.addTween.apply(this, v3);
}
this.removeDelayedTween(Number(v8));
}
}
}
this.update();
};
v2.rewTween = function (mc, propsObj) {
var v3 = mc == undefined;
var v5 = propsObj == undefined;
for (var v7 in this.tweenList) {
var v2 = this.tweenList[v7];
if ((v2.mc == mc || v3) && (v5 || propsObj[v2.pp] == true)) {
if (v2.pt != -1) {
v2.pt = -1;
}
v2.ts = this.now;
}
}
for (v7 in this.ints) {
if (this.ints[v7] != undefined) {
if (this.ints[v7].mc == mc || v3) {
if (this.ints[v7].mc._x != undefined) {
this.addTween.apply(this, this.ints[v7].args);
}
this.removeDelayedTween(Number(v7));
}
}
}
this.update();
};
v2.isTweenPaused = function (mc, prop) {
if (mc == undefined) {
return null;
}
var v5 = prop == undefined;
for (var v6 in this.tweenList) {
var v2 = this.tweenList[v6];
if (this.tweenList[v6].mc == mc && (v5 || prop == v2.pp || prop == '_ct_' && v2.ctm != undefined)) {
return Boolean(this.tweenList[v6].pt != -1);
}
}
for (v6 in this.ints) {
if (this.ints[v6] != undefined && this.ints[v6].mc == mc) {
return Boolean(this.ints[v6].pt != -1);
}
}
return false;
};
v2.pauseTween = function (mc, propsObj) {
var v3 = mc == undefined;
if (v3 == false && this.isTweenPaused(mc) == true) {
return undefined;
}
var v6 = propsObj == undefined;
for (var v7 in this.tweenList) {
var v2 = this.tweenList[v7];
if (v2.pt == -1 && (v2.mc == mc || v3) && (v6 || propsObj[v2.pp] == true || propsObj._ct_ != undefined && v2.ctm != undefined)) {
v2.pt = this.now;
}
}
for (v7 in this.ints) {
if (this.ints[v7] != undefined) {
if (this.ints[v7].pt == -1 && (this.ints[v7].mc == mc || v3)) {
this.ints[v7].pt = this.now;
}
}
}
};
v2.unpauseTween = function (mc, propsObj) {
var v4 = mc == undefined;
if (v4 == false && this.isTweenPaused(mc) === false) {
return undefined;
}
var v7 = propsObj == undefined;
if (!this.playing) {
this.init();
}
for (var v2 in this.tweenList) {
var v3 = this.tweenList[v2];
if (v3.pt != -1 && (v3.mc == mc || v4) && (v7 || propsObj[v3.pp] == true) || propsObj._ct_ != undefined && v3.ctm != undefined) {
v3.ts = this.now - (v3.pt - v3.ts);
v3.pt = -1;
}
}
for (v2 in this.ints) {
if (this.ints[v2] != undefined) {
if (this.ints[v2].pt != -1 && (this.ints[v2].mc == mc || v4)) {
this.ints[v2].delay -= this.ints[v2].pt - this.ints[v2].st;
this.ints[v2].st = this.now;
this.ints[v2].intid = setInterval(function (obj, id) {
obj.addTween.apply(obj, obj.ints[id].args);
clearInterval(obj.ints[id].intid);
obj.ints[id] = undefined;
}, this.ints[v2].delay, this, v2);
}
}
}
};
v2.pauseAll = function () {
this.pauseTween();
};
v2.unpauseAll = function () {
this.unpauseTween();
};
v2.stopAll = function () {
for (var v2 in this.ints) {
this.removeDelayedTween(Number(v2));
}
this.tweenList = new Array();
this.deinit();
};
v2.toString = function () {
return '[AS2 tweenManager 1.2.0]';
};
v2._th_depth = 6789;
v2.addProperty('controllerDepth', v2.__get__controllerDepth, v2.__set__controllerDepth);
v2.addProperty('updateInterval', v2.__get__updateInterval, v2.__set__updateInterval);
ASSetPropFlags(zigo.tweenManager.prototype, null, 1);
}
#endinitclip
}
movieClip 2859 __Packages.com.robertpenner.easing.Cubic {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.robertpenner) {
_global.com.robertpenner = new Object();
}
if (!_global.com.robertpenner.easing) {
_global.com.robertpenner.easing = new Object();
}
if (!_global.com.robertpenner.easing.Cubic) {
var v1 = function () {};
com.robertpenner.easing.Cubic = v1;
var v2 = v1.prototype;
v1.easeIn = function (t, b, c, d) {
t /= d;
return c * t * t * t + b;
};
v1.easeOut = function (t, b, c, d) {
t = t / d - 1;
return c * (t * t * t + 1) + b;
};
v1.easeInOut = function (t, b, c, d) {
t /= d / 2;
if (t < 1) {
return (c / 2) * t * t * t + b;
}
t -= 2;
return (c / 2) * (t * t * t + 2) + b;
};
v1.easeOutIn = function (t, b, c, d) {
t /= d / 2;
return (c / 2) * (--t * t * t + 1) + b;
};
ASSetPropFlags(com.robertpenner.easing.Cubic.prototype, null, 1);
}
#endinitclip
}
movieClip 2860 __Packages.com.homestarrunner.stinkoman.ui.MenuSelect {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.ui) {
_global.com.homestarrunner.stinkoman.ui = new Object();
}
if (!_global.com.homestarrunner.stinkoman.ui.MenuSelect) {
var v1 = function () {};
com.homestarrunner.stinkoman.ui.MenuSelect = v1;
var v2 = v1.prototype;
v1.init = function () {
com.homestarrunner.stinkoman.ui.MenuSelect.pos = 0;
com.homestarrunner.stinkoman.ui.MenuSelect.updateView();
};
v1.downArrow = function () {
++com.homestarrunner.stinkoman.ui.MenuSelect.pos;
if (com.homestarrunner.stinkoman.ui.MenuSelect.pos >= com.homestarrunner.stinkoman.ui.MenuSelect.numPos) {
com.homestarrunner.stinkoman.ui.MenuSelect.pos = 0;
}
com.homestarrunner.stinkoman.ui.MenuSelect.updateView();
};
v1.upArrow = function () {
--com.homestarrunner.stinkoman.ui.MenuSelect.pos;
if (com.homestarrunner.stinkoman.ui.MenuSelect.pos < 0) {
com.homestarrunner.stinkoman.ui.MenuSelect.pos = com.homestarrunner.stinkoman.ui.MenuSelect.numPos - 1;
}
com.homestarrunner.stinkoman.ui.MenuSelect.updateView();
};
v1.setPos = function (num) {
com.homestarrunner.stinkoman.ui.MenuSelect.pos = num;
com.homestarrunner.stinkoman.ui.MenuSelect.updateView();
};
v1.goPressed = function () {
switch (com.homestarrunner.stinkoman.ui.MenuSelect.pos) {
case 0:
com.homestarrunner.stinkoman.struct.GlobalData.setUpdatedDifficulty(false);
_root.gotoAndPlay('levelSelect');
break;
case 1:
com.homestarrunner.stinkoman.struct.GlobalData.setUpdatedDifficulty(true);
_root.gotoAndPlay('levelSelect');
break;
case 2:
_root.gotoAndPlay('optionsScreen');
break;
case 3:
_root.gotoAndStop('egg');
}
};
v1.updateView = function () {
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.ui.MenuSelect.numPos) {
_root.menuSelect_mc['head' + v2 + '_mc']._visible = v2 == com.homestarrunner.stinkoman.ui.MenuSelect.pos;
++v2;
}
_root.menuSelect_mc.explanation_mc.gotoAndStop(com.homestarrunner.stinkoman.ui.MenuSelect.pos + 1);
};
v1.numPos = 4;
ASSetPropFlags(com.homestarrunner.stinkoman.ui.MenuSelect.prototype, null, 1);
}
#endinitclip
}
movieClip 2861 __Packages.com.homestarrunner.stinkoman.ui.LevelSelect {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.homestarrunner) {
_global.com.homestarrunner = new Object();
}
if (!_global.com.homestarrunner.stinkoman) {
_global.com.homestarrunner.stinkoman = new Object();
}
if (!_global.com.homestarrunner.stinkoman.ui) {
_global.com.homestarrunner.stinkoman.ui = new Object();
}
if (!_global.com.homestarrunner.stinkoman.ui.LevelSelect) {
var v1 = function (p_mc) {};
com.homestarrunner.stinkoman.ui.LevelSelect = v1;
var v2 = v1.prototype;
v1.update = function (p_mc) {
if (p_mc != undefined) {
com.homestarrunner.stinkoman.ui.LevelSelect._mc = p_mc;
}
com.homestarrunner.stinkoman.ui.LevelSelect.choiceClips = new Array();
var v1 = 1;
while (v1 <= com.homestarrunner.stinkoman.ui.LevelSelect.maxMenuSubLevel) {
com.homestarrunner.stinkoman.ui.LevelSelect.choiceClips.push(com.homestarrunner.stinkoman.ui.LevelSelect._mc['choice' + v1]);
++v1;
}
com.homestarrunner.stinkoman.ui.LevelSelect.firstSelectionYPosition = com.homestarrunner.stinkoman.ui.LevelSelect.choiceClips[0]._y;
com.homestarrunner.stinkoman.ui.LevelSelect.scrollJumpHeight = 112;
com.homestarrunner.stinkoman.ui.LevelSelect.scrollPosition = 0;
com.homestarrunner.stinkoman.ui.LevelSelect.maxScrollPosition = com.homestarrunner.stinkoman.ui.LevelSelect.maxMenuSubLevel - 1 - 1;
com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem = 0;
com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem = 0;
v1 = 0;
while (v1 < com.homestarrunner.stinkoman.ui.LevelSelect.maxMenuSubLevel) {
com.homestarrunner.stinkoman.ui.LevelSelect.choiceClips[v1].mID = v1;
com.homestarrunner.stinkoman.ui.LevelSelect.choiceClips[v1].levelSelectHighlight_mc._visible = false;
++v1;
}
com.homestarrunner.stinkoman.ui.LevelSelect.choiceClips[0].levelSelectHighlight_mc._visible = true;
com.homestarrunner.stinkoman.ui.LevelSelect._mc.scrollUp_btn.onRelease = function () {
com.homestarrunner.stinkoman.ui.LevelSelect.scrollSelector(-1);
};
com.homestarrunner.stinkoman.ui.LevelSelect._mc.scrollDown_btn.onRelease = function () {
com.homestarrunner.stinkoman.ui.LevelSelect.scrollSelector(1);
};
com.homestarrunner.stinkoman.ui.LevelSelect.updateScrollBarAvailability();
};
v1.subDisplay = function (buttonParent_mc) {
var v6 = com.homestarrunner.stinkoman.struct.GlobalData.levelLengths[com.homestarrunner.stinkoman.struct.GlobalData.level - 1][buttonParent_mc.mID];
var v3 = 0;
while (v3 < com.homestarrunner.stinkoman.ui.LevelSelect.maxPossibleSubSubLevel) {
var v2 = buttonParent_mc['choice' + (v3 + 1)];
if (v2 == undefined) {
} else {
if (v3 >= v6) {
v2._visible = false;
} else {
v2.mID = buttonParent_mc.mID;
v2.smID = v3;
v2._btn.onRelease = function () {
com.homestarrunner.stinkoman.ui.LevelSelect.choose(this._parent.mID, this._parent.smID);
};
v2.txt.text = com.homestarrunner.stinkoman.ui.LevelSelect.getItemText(v2.mID, v2.smID);
var v4 = com.homestarrunner.stinkoman.ui.LevelSelect.itemIsUnlocked(v2.mID, v2.smID);
v2.txt._visible = v4;
v2.lock._visible = !v4;
v2.tick._visible = com.homestarrunner.stinkoman.ui.LevelSelect.itemIsCompleted(v2.mID, v2.smID);
}
}
++v3;
}
};
v1.itemIsExpanded = function (index) {
return com.homestarrunner.stinkoman.ui.LevelSelect.choiceClips[index]._currentframe > 1;
};
v1.expandItem = function (index) {
com.homestarrunner.stinkoman.ui.LevelSelect.choiceClips[index].gotoAndStop('stageselect');
};
v1.closeItem = function (index) {
com.homestarrunner.stinkoman.ui.LevelSelect.choiceClips[index].gotoAndStop(1);
};
v1.updateHighlight = function () {
trace('Updated highlight, item = ' + com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem + ', subItem = ' + com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem);
var v2 = 0;
while (v2 < com.homestarrunner.stinkoman.ui.LevelSelect.maxMenuSubLevel) {
com.homestarrunner.stinkoman.ui.LevelSelect.choiceClips[v2].levelSelectHighlight_mc._visible = com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem == v2;
if (!com.homestarrunner.stinkoman.ui.LevelSelect.itemIsExpanded(v2)) {
} else {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.ui.LevelSelect.maxPossibleSubSubLevel) {
var v3 = com.homestarrunner.stinkoman.ui.LevelSelect.choiceClips[v2]['choice' + (v1 + 1)];
if (v3 == undefined) {
} else {
v3.highlight_mc._visible = com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem == v2 && com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem == v1;
}
++v1;
}
}
++v2;
}
};
v1.jumpToSubnav = function (num) {
com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem = num;
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.ui.LevelSelect.choiceClips.length) {
if (v1 == num) {
com.homestarrunner.stinkoman.ui.LevelSelect.expandItem(v1);
} else {
com.homestarrunner.stinkoman.ui.LevelSelect.closeItem(v1);
}
++v1;
}
com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem = 0;
com.homestarrunner.stinkoman.ui.LevelSelect.updateHighlight();
};
v1.returnFromSubnav = function (num) {
com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem = num;
com.homestarrunner.stinkoman.ui.LevelSelect.closeItem(num);
com.homestarrunner.stinkoman.ui.LevelSelect.updateHighlight();
};
v1.rollOver = function (num) {
com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem = num;
com.homestarrunner.stinkoman.ui.LevelSelect.updateHighlight();
};
v1.upArrow = function () {
if (com.homestarrunner.stinkoman.ui.LevelSelect.itemIsExpanded(com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem) && com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem >= 2) {
if (com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem == 2) {
com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem = 0;
} else {
com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem = 1;
}
} else {
if (com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem > 0) {
--com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem;
}
}
com.homestarrunner.stinkoman.ui.LevelSelect.updateHighlight();
com.homestarrunner.stinkoman.ui.LevelSelect.scrollToLevel(com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem);
};
v1.downArrow = function () {
if (com.homestarrunner.stinkoman.ui.LevelSelect.itemIsExpanded(com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem) && com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem <= 1) {
if (com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem == 9) {
com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem += 2;
} else {
com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem = 2;
}
} else {
if (com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem < com.homestarrunner.stinkoman.ui.LevelSelect.maxMenuSubLevel - 1) {
++com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem;
com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem = 0;
}
}
com.homestarrunner.stinkoman.ui.LevelSelect.updateHighlight();
com.homestarrunner.stinkoman.ui.LevelSelect.scrollToLevel(com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem);
};
v1.leftArrow = function () {
if (!com.homestarrunner.stinkoman.ui.LevelSelect.itemIsExpanded(com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem)) {
return undefined;
}
var v1 = com.homestarrunner.stinkoman.struct.GlobalData.levelLengths[com.homestarrunner.stinkoman.struct.GlobalData.level - 1][com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem];
if (com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem == 1) {
--com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem;
} else {
if (com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem >= 3) {
--com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem;
}
}
com.homestarrunner.stinkoman.ui.LevelSelect.updateHighlight();
};
v1.rightArrow = function () {
if (!com.homestarrunner.stinkoman.ui.LevelSelect.itemIsExpanded(com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem)) {
return undefined;
}
if (com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem == 0) {
++com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem;
}
if (com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem == 9) {
if (com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem == 2) {
++com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem;
}
}
com.homestarrunner.stinkoman.ui.LevelSelect.updateHighlight();
};
v1.subnavRollOver = function (num, snum) {
if (!com.homestarrunner.stinkoman.struct.StinkoSaveData.isLevelUnlocked(num + 1, snum + 1)) {
return undefined;
}
com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem = num;
com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem = snum;
com.homestarrunner.stinkoman.ui.LevelSelect.updateHighlight();
};
v1.goPressed = function () {
if (com.homestarrunner.stinkoman.ui.LevelSelect.itemIsExpanded(com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem)) {
com.homestarrunner.stinkoman.ui.LevelSelect.choose(com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem, com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubSubItem);
} else {
com.homestarrunner.stinkoman.ui.LevelSelect.jumpToSubnav(com.homestarrunner.stinkoman.ui.LevelSelect.selectedSubItem);
}
com.homestarrunner.stinkoman.ui.LevelSelect.updateHighlight();
};
v1.choose = function (subItem, subSubItem) {
if (!com.homestarrunner.stinkoman.ui.LevelSelect.itemIsUnlocked(subItem, subSubItem)) {
return undefined;
}
com.homestarrunner.stinkoman.struct.GlobalData.level = 1;
com.homestarrunner.stinkoman.struct.GlobalData.sublevel = com.homestarrunner.stinkoman.ui.LevelSelect.getSubLevel(subItem, subSubItem);
com.homestarrunner.stinkoman.struct.GlobalData.subsublevel = com.homestarrunner.stinkoman.ui.LevelSelect.getSubSubLevel(subItem, subSubItem);
com.homestarrunner.stinkoman.ui.LevelSelect._mc._parent.gotoAndPlay('cutScene');
};
v1.scrollToLevel = function (num) {
if (com.homestarrunner.stinkoman.ui.LevelSelect.scrollPosition < num - 1) {
com.homestarrunner.stinkoman.ui.LevelSelect.scrollPosition = num - 1;
}
if (com.homestarrunner.stinkoman.ui.LevelSelect.scrollPosition > num) {
com.homestarrunner.stinkoman.ui.LevelSelect.scrollPosition = num;
}
com.homestarrunner.stinkoman.ui.LevelSelect.updateScrollBarAvailability();
com.homestarrunner.stinkoman.ui.LevelSelect.updatePositions();
};
v1.scrollSelector = function (dir) {
com.homestarrunner.stinkoman.ui.LevelSelect.scrollPosition += dir;
if (com.homestarrunner.stinkoman.ui.LevelSelect.scrollPosition < 0) {
com.homestarrunner.stinkoman.ui.LevelSelect.scrollPosition = 0;
}
if (com.homestarrunner.stinkoman.ui.LevelSelect.scrollPosition > com.homestarrunner.stinkoman.ui.LevelSelect.maxScrollPosition) {
com.homestarrunner.stinkoman.ui.LevelSelect.scrollPosition = com.homestarrunner.stinkoman.ui.LevelSelect.maxScrollPosition;
}
com.homestarrunner.stinkoman.ui.LevelSelect.updateScrollBarAvailability();
com.homestarrunner.stinkoman.ui.LevelSelect.updatePositions();
};
v1.updatePositions = function () {
var v1 = 0;
while (v1 < com.homestarrunner.stinkoman.ui.LevelSelect.maxMenuSubLevel) {
com.homestarrunner.stinkoman.ui.LevelSelect.choiceClips[v1]._y = com.homestarrunner.stinkoman.ui.LevelSelect.firstSelectionYPosition + (v1 - com.homestarrunner.stinkoman.ui.LevelSelect.scrollPosition) * com.homestarrunner.stinkoman.ui.LevelSelect.scrollJumpHeight;
++v1;
}
};
v1.updateScrollBarAvailability = function () {
if (com.homestarrunner.stinkoman.ui.LevelSelect.scrollPosition <= 0) {
com.homestarrunner.stinkoman.ui.LevelSelect._mc.scrollUp_btn.enabled = false;
com.homestarrunner.stinkoman.ui.LevelSelect._mc.scrollUp_btn._visible = false;
} else {
com.homestarrunner.stinkoman.ui.LevelSelect._mc.scrollUp_btn.enabled = true;
com.homestarrunner.stinkoman.ui.LevelSelect._mc.scrollUp_btn._visible = true;
}
if (com.homestarrunner.stinkoman.ui.LevelSelect.scrollPosition >= com.homestarrunner.stinkoman.ui.LevelSelect.maxScrollPosition) {
com.homestarrunner.stinkoman.ui.LevelSelect._mc.scrollDown_btn.enabled = false;
com.homestarrunner.stinkoman.ui.LevelSelect._mc.scrollDown_btn._visible = false;
} else {
com.homestarrunner.stinkoman.ui.LevelSelect._mc.scrollDown_btn.enabled = true;
com.homestarrunner.stinkoman.ui.LevelSelect._mc.scrollDown_btn._visible = true;
}
};
v1.getSubLevel = function (subItem, subSubItem) {
return subItem + 1;
};
v1.getSubSubLevel = function (subItem, subSubItem) {
var v2 = com.homestarrunner.stinkoman.ui.LevelSelect.getSubLevel(subItem, subSubItem);
var v1 = subSubItem + 1;
if (v2 == 10 && v1 >= 2) {
++v1;
}
return v1;
};
v1.itemIsUnlocked = function (subItem, subSubItem) {
var v2 = com.homestarrunner.stinkoman.ui.LevelSelect.getSubLevel(subItem, subSubItem);
var v1 = com.homestarrunner.stinkoman.ui.LevelSelect.getSubSubLevel(subItem, subSubItem);
return com.homestarrunner.stinkoman.struct.StinkoSaveData.isLevelUnlocked(v2, v1);
};
v1.itemIsCompleted = function (subItem, subSubItem) {
var v2 = com.homestarrunner.stinkoman.ui.LevelSelect.getSubLevel(subItem, subSubItem);
var v1 = subSubItem + 1;
if (v2 == 10) {
if (v1 >= 4) {
v1 += 2;
return com.homestarrunner.stinkoman.struct.StinkoSaveData.isLevelFinished(v2, v1);
}
++v1;
}
return com.homestarrunner.stinkoman.struct.StinkoSaveData.isLevelFinished(v2, v1);
};
v1.getItemText = function (subItem, subSubItem) {
var v2 = com.homestarrunner.stinkoman.ui.LevelSelect.getSubLevel(subItem, subSubItem);
var v1 = subSubItem + 1;
if (v1 == 3) {
return 'BOSS';
} else {
if (v1 == 4) {
return 'FINAL BOSS';
} else {
if (v2 == 8) {
return 'STAGE-0.' + v1;
} else {
return 'STAGE ' + v2 + '.' + v1;
}
}
}
};
v1.maxMenuSubLevel = 10;
v1.maxPossibleSubSubLevel = 6;
v1.selectedSubItem = 0;
v1.selectedSubSubItem = 0;
ASSetPropFlags(com.homestarrunner.stinkoman.ui.LevelSelect.prototype, null, 1);
}
#endinitclip
}
frame 10 {
if (_root._totalframes > 0 && _root._framesloaded == _root._totalframes && com.homestarrunner.stinkoman.struct.StinkomanXMLData.allLoaded()) {
var version = System.capabilities.version;
var firstSpace = version.indexOf(' ');
var tempString = version.substring(firstSpace + 1, version.length);
var tempArray = tempString.split(',');
var majorVersion = parseInt(tempArray[0]);
trace(majorVersion + '= Flash player version');
if (majorVersion >= 7) {
_root.gotoAndPlay('loadedGo');
} else {
gotoAndStop(1);
}
} else {
_root.gotoAndPlay('loopLoader');
}
}
frame 12 {
stop();
}
frame 19 {
if (_global.$tweenManager == undefined) {
_global.$tweenManager = new zigo.tweenManager();
trace('_global.$tweenManager = ' + _global.$tweenManager);
} else {
_global.$tweenManager.cleanUp();
_global.$tweenManager.init();
}
com.robertpenner.easing.Back;
com.robertpenner.easing.Bounce;
com.robertpenner.easing.Circ;
com.robertpenner.easing.Cubic;
com.robertpenner.easing.Elastic;
com.robertpenner.easing.Expo;
com.robertpenner.easing.Linear;
com.robertpenner.easing.Quad;
com.robertpenner.easing.Quart;
com.robertpenner.easing.Quint;
com.robertpenner.easing.Sine;
var Mp = MovieClip.prototype;
Mp.addListener = function () {
if (!this._listeners) {
AsBroadcaster.initialize(this);
}
this.addListener.apply(this, arguments);
};
ASSetPropFlags(Mp, 'addListener', 1, 0);
Mp.tween = function (props, pEnd, seconds, animType, delay, callback, extra1, extra2) {
if (_global.$tweenManager.isTweenLocked(this)) {
trace('tween not added, this movieclip is locked');
return undefined;
}
if (arguments.length < 2) {
trace('tween not added, props & pEnd must be defined');
return undefined;
}
if (typeof props == 'string') {
if (props.indexOf(',') > -1) {
props = ((props.split(' ')).join('')).split(',');
} else {
props = [props];
}
}
if (!(pEnd instanceof Array)) {
pEnd = [pEnd];
while (pEnd.length < props.length) {
pEnd.push(pEnd[0]);
}
}
if (seconds == undefined) {
seconds = 2;
} else {
if (seconds < 0.01) {
seconds = 0;
}
}
if (delay < 0.01 || delay == undefined) {
delay = 0;
}
switch (typeof animType) {
case 'string':
animType = animType.toLowerCase();
if (animType == 'linear') {
var eqf = com.robertpenner.easing.Linear.easeNone;
} else {
if (animType.indexOf('easeoutin') == 0) {
var t = animType.substr(9);
t = (t.charAt(0)).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeOutIn;
} else {
if (animType.indexOf('easeinout') == 0) {
var t = animType.substr(9);
t = (t.charAt(0)).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeInOut;
} else {
if (animType.indexOf('easein') == 0) {
var t = animType.substr(6);
t = (t.charAt(0)).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeIn;
} else {
if (animType.indexOf('easeout') == 0) {
var t = animType.substr(7);
t = (t.charAt(0)).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeOut;
}
}
}
}
}
if (eqf == undefined) {
var eqf = com.robertpenner.easing.Expo.easeOut;
}
break;
case 'function':
var eqf = animType;
break;
case 'object':
if (animType.ease != undefined && animType.pts != undefined) {
var eqf = animType.ease;
extra1 = animType.pts;
} else {
var eqf = com.robertpenner.easing.Expo.easeOut;
}
break;
default:
var eqf = com.robertpenner.easing.Expo.easeOut;
}
switch (typeof callback) {
case 'function':
callback = {'func': callback, 'scope': this._parent};
break;
case 'string':
var ilp;
var funcp;
var scope;
var args;
var a;
ilp = callback.indexOf('(');
funcp = callback.slice(0, ilp);
scope = eval(funcp.slice(0, funcp.lastIndexOf('.')));
func = eval(funcp);
args = (callback.slice(ilp + 1, callback.lastIndexOf(')'))).split(',');
var i = 0;
while (i < args.length) {
a = eval(args[i]);
if (a != undefined) {
args[i] = a;
}
++i;
}
callback = {'func': func, 'scope': scope, 'args': args};
}
if (_global.$tweenManager.autoStop) {
_global.$tweenManager.removeTween(this);
}
if (delay > 0) {
_global.$tweenManager.addTweenWithDelay(delay, this, props, pEnd, seconds, eqf, callback, extra1, extra2);
} else {
_global.$tweenManager.addTween(this, props, pEnd, seconds, eqf, callback, extra1, extra2);
}
};
Mp.stopTween = function (props) {
if (typeof props == 'string') {
if (props.indexOf(',') > -1) {
props = ((props.split(' ')).join('')).split(',');
} else {
props = [props];
}
}
_global.$tweenManager.removeTween(this, props);
};
Mp.isTweening = function (prop) {
return _global.$tweenManager.isTweening(this, prop);
};
Mp.getTweens = function () {
return _global.$tweenManager.getTweens(this);
};
Mp.lockTween = function () {
_global.$tweenManager.lockTween(this, true);
};
Mp.unlockTween = function () {
_global.$tweenManager.lockTween(this, false);
};
Mp.isTweenLocked = function () {
return _global.$tweenManager.isTweenLocked(this);
};
Mp.isTweenPaused = function (prop) {
return _global.$tweenManager.isTweenPaused(this, prop);
};
Mp.pauseTween = function (props) {
var v4;
if (props != undefined) {
if (typeof props == 'string') {
if (props.indexOf(',') > -1) {
props = ((props.split(' ')).join('')).split(',');
} else {
props = [props];
}
}
v4 = {};
for (var v5 in props) {
v4[props[v5]] = true;
}
}
_global.$tweenManager.pauseTween(this, v4);
};
Mp.unpauseTween = function (props) {
var v4;
if (props != undefined) {
if (typeof props == 'string') {
if (props.indexOf(',') > -1) {
props = ((props.split(' ')).join('')).split(',');
} else {
props = [props];
}
}
v4 = {};
for (var v5 in props) {
v4[props[v5]] = true;
}
}
_global.$tweenManager.unpauseTween(this, v4);
};
Mp.pauseAllTweens = function () {
_global.$tweenManager.pauseTween();
};
Mp.unpauseAllTweens = function () {
_global.$tweenManager.unpauseTween();
};
Mp.stopAllTweens = function () {
_global.$tweenManager.stopAll();
};
Mp.ffTween = function (props) {
var v4;
if (props != undefined) {
if (typeof props == 'string') {
if (props.indexOf(',') > -1) {
props = ((props.split(' ')).join('')).split(',');
} else {
props = [props];
}
}
v4 = {};
for (var v5 in props) {
v4[props[v5]] = true;
}
}
_global.$tweenManager.ffTween(this, v4);
};
Mp.rewTween = function (props) {
var v4;
if (props != undefined) {
if (typeof props == 'string') {
if (props.indexOf(',') > -1) {
props = ((props.split(' ')).join('')).split(',');
} else {
props = [props];
}
}
v4 = {};
for (var v5 in props) {
v4[props[v5]] = true;
}
}
_global.$tweenManager.rewTween(this, v4);
};
Mp.alphaTo = function (destAlpha, seconds, animType, delay, callback, extra1, extra2) {
this.tween(['_alpha'], [destAlpha], seconds, animType, delay, callback, extra1, extra2);
};
Mp.scaleTo = function (destScale, seconds, animType, delay, callback, extra1, extra2) {
this.tween(['_xscale', '_yscale'], [destScale, destScale], seconds, animType, delay, callback, extra1, extra2);
};
Mp.sizeTo = function (destSize, seconds, animType, delay, callback, extra1, extra2) {
this.tween(['_width', '_height'], [destSize, destSize], seconds, animType, delay, callback, extra1, extra2);
};
Mp.slideTo = function (destX, destY, seconds, animType, delay, callback, extra1, extra2) {
this.tween(['_x', '_y'], [destX, destY], seconds, animType, delay, callback, extra1, extra2);
};
Mp.rotateTo = function (destRotation, seconds, animType, delay, callback, extra1, extra2) {
this.tween(['_rotation'], [destRotation], seconds, animType, delay, callback, extra1, extra2);
};
_global.getColorTransObj = function (type, amt, rgb) {
switch (type) {
return {'rb': 0, 'ra': 100, 'gb': 0, 'ga': 100, 'bb': 0, 'ba': 100};
case 'brightness':
var v4 = 100 - Math.abs(amt);
var v6 = 0;
if (amt > 0) {
v6 = 256 * (amt / 100);
}
return {'ra': v4, 'rb': v6, 'ga': v4, 'gb': v6, 'ba': v4, 'bb': v6};
case 'brightOffset':
var v6 = 256 * (amt / 100);
return {'ra': 100, 'rb': v6, 'ga': 100, 'gb': v6, 'ba': 100, 'bb': v6};
case 'contrast':
var v2 = {};
v2.ba = amt;
v2.ga = v2.ba;
v2.ra = v2.ba;
v2.bb = 128 - 1.28 * amt;
v2.gb = v2.bb;
v2.rb = v2.bb;
return v2;
case 'invertColor':
var v2 = {};
v2.ba = 100 - 2 * amt;
v2.ga = v2.ba;
v2.ra = v2.ba;
v2.bb = amt * 2.55;
v2.gb = v2.bb;
v2.rb = v2.bb;
return v2;
case 'tint':
if (rgb == undefined || rgb == null) {
return {'rb': 0, 'ra': 100, 'gb': 0, 'ga': 100, 'bb': 0, 'ba': 100};
}
var v8 = rgb >> 16;
var v9 = rgb >> 8 & 255;
var v7 = rgb & 255;
var v5 = amt / 100;
var v2 = {'rb': v8 * v5, 'gb': v9 * v5, 'bb': v7 * v5};
v2.ba = 100 - amt;
v2.ga = v2.ba;
v2.ra = v2.ba;
return v2;
}
return {'rb': 0, 'ra': 100, 'gb': 0, 'ga': 100, 'bb': 0, 'ba': 100};
};
Mp.brightnessTo = function (bright, seconds, animType, delay, callback, extra1, extra2) {
this.tween(['_ct_'], [getColorTransObj('brightness', bright)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.brightOffsetTo = function (percent, seconds, animType, delay, callback, extra1, extra2) {
this.tween(['_ct_'], [getColorTransObj('brightOffset', percent)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.contrastTo = function (percent, seconds, animType, delay, callback, extra1, extra2) {
this.tween(['_ct_'], [getColorTransObj('contrast', percent)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.colorTo = function (rgb, seconds, animType, delay, callback, extra1, extra2) {
this.tween(['_ct_'], [getColorTransObj('tint', 100, rgb)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.colorTransformTo = function (ra, rb, ga, gb, ba, bb, aa, ab, seconds, animType, delay, callback, extra1, extra2) {
var v2 = {'ra': ra, 'rb': rb, 'ga': ga, 'gb': gb, 'ba': ba, 'bb': bb, 'aa': aa, 'ab': ab};
this.tween(['_ct_'], [v2], seconds, animType, delay, callback, extra1, extra2);
};
Mp.invertColorTo = function (percent, seconds, animType, delay, callback, extra1, extra2) {
this.tween(['_ct_'], [getColorTransObj('invertColor', percent)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.tintTo = function (rgb, percent, seconds, animType, delay, callback, extra1, extra2) {
this.tween(['_ct_'], [getColorTransObj('tint', percent, rgb)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.getFrame = function () {
return this._currentframe;
};
Mp.setFrame = function (fr) {
this.gotoAndStop(Math.round(fr));
};
Mp.addProperty('_frame', Mp.getFrame, Mp.setFrame);
Mp.frameTo = function (endframe, duration, animType, delay, callback, extra1, extra2) {
if (endframe == undefined) {
endframe = this._totalframes;
}
this.tween('_frame', endframe, duration, animType, delay, callback, extra1, extra2);
};
var TFP = TextField.prototype;
if (!TFP.origAddListener) {
TFP.origAddListener = TFP.addListener;
ASSetPropFlags(TFP, 'origAddListener', 1, 0);
TFP.addListener = function () {
if (!this._listeners) {
AsBroadcaster.initialize(this);
}
this.origAddListener.apply(this, arguments);
};
}
var $_$methods = ['tween', 'stopTween', 'isTweening', 'getTweens', 'lockTween', 'isTweenLocked', 'unlockTween', 'isTweenPaused', 'pauseTween', 'unpauseTween', 'pauseAllTweens', 'unpauseAllTweens', 'stopAllTweens', 'ffTween', 'rewTween', 'getFrame', 'setFrame', '_frame', 'frameTo', 'alphaTo', 'brightnessTo', 'colorTo', 'colorTransformTo', 'invertColorTo', 'tintTo', 'scaleTo', 'sizeTo', 'slideTo', 'rotateTo', 'brightOffsetTo', 'contrastTo'];
for (var $_$i in $_$methods) {
ASSetPropFlags(Mp, $_$methods[$_$i], 1, 0);
if (($_$methods[$_$i].toLowerCase()).indexOf('frame') == -1) {
TFP[$_$methods[$_$i]] = Mp[$_$methods[$_$i]];
ASSetPropFlags(TFP, $_$methods[$_$i], 1, 0);
}
}
delete Mp;
delete TFP;
delete $_$methods;
delete $_$i;
_quality = 'HIGH';
stop();
}
button 739 {
on (release, keyPress '<Space>') {
_parent.gotoAndStop('cinematic');
}
}
movieClip 1108 Bullet11 {
}
movieClip 1110 {
}
movieClip 1111 Bullet12 {
}
movieClip 1113 Bullet13 {
}
movieClip 1117 {
frame 1 {
stop();
}
frame 8 {
_parent.mBullet.kill();
}
}
movieClip 1118 Bullet14 {
}
movieClip 1120 Bullet15 {
frame 1 {
stop();
}
frame 2 {
play();
}
frame 5 {
myBullet.kill();
}
frame 11 {
play();
}
frame 14 {
myBullet.kill();
}
}
movieClip 1122 Bullet16 {
frame 1 {
stop();
}
}
movieClip 1127 {
}
movieClip 1128 Bullet17 {
frame 1 {
stop();
}
}
movieClip 1129 Bullet18 {
}
movieClip 1133 Bullet20 {
}
movieClip 1140 Bullet9 {
}
movieClip 1149 {
frame 1 {
stop();
}
}
movieClip 1151 {
frame 1 {
stop();
}
}
movieClip 1154 {
}
movieClip 1156 {
}
movieClip 1161 {
frame 1 {
stop();
}
frame 6 {
stop();
}
}
movieClip 1164 {
}
movieClip 1168 {
}
movieClip 1176 {
}
movieClip 1177 {
frame 1 {
stop();
}
frame 20 {
this._parent.mBoss.shoot();
}
frame 56 {
stop();
this._parent.mBoss.blow();
}
}
movieClip 1178 BossNebulon_mc {
}
movieClip 1180 shipFlyBy {
frame 302 {
stop();
}
}
movieClip 1181 {
}
movieClip 1184 {
}
movieClip 1185 cloudBuzzer_mc {
}
movieClip 1187 descent0 {
frame 1 {
stop();
}
frame 5 {
mFood.kill();
this.removeMovieClip();
}
}
movieClip 1189 descent1 {
frame 1 {
stop();
}
frame 5 {
mFood.kill();
this.removeMovieClip();
}
}
movieClip 1191 descent2 {
frame 1 {
stop();
}
frame 5 {
mFood.kill();
this.removeMovieClip();
}
}
movieClip 1193 descent3 {
frame 1 {
stop();
}
frame 5 {
mFood.kill();
this.removeMovieClip();
}
}
movieClip 1195 descent4 {
frame 1 {
stop();
}
frame 5 {
mFood.kill();
this.removeMovieClip();
}
}
movieClip 1196 {
}
movieClip 1197 jumpShadow {
frame 1 {
stop();
}
frame 6 {
stop();
}
}
movieClip 1205 level9_foreground {
frame 1 {
stop();
}
}
movieClip 1208 {
frame 1 {
stop();
}
frame 6 {
_parent.mBoss.shoot();
}
frame 8 {
_parent.mBoss.shoot();
}
frame 10 {
_parent.mBoss.shoot();
}
frame 12 {
_parent.mBoss.shoot();
}
frame 14 {
_parent.mBoss.shoot();
}
frame 16 {
_parent.mBoss.shoot();
}
}
movieClip 1211 {
frame 1 {
stop();
}
frame 7 {
stop();
}
}
movieClip 1212 BossGangster_mc {
}
movieClip 1217 cavern {
frame 1 {
stop();
}
}
movieClip 1219 iceskyback {
frame 1 {
stop();
}
}
movieClip 1221 iceskyfront {
frame 1 {
stop();
}
}
movieClip 1225 jumpingSky {
}
movieClip 1227 kitchenWall {
}
movieClip 1235 level4_foreground {
}
movieClip 1240 moonsky1 {
frame 1 {
stop();
}
}
movieClip 1243 sky {
frame 1 {
stop();
}
}
movieClip 1246 sky2 {
frame 1 {
stop();
}
}
movieClip 1247 negativeSkyBack {
frame 1 {
stop();
}
}
movieClip 1249 {
frame 1 {
stop();
}
}
movieClip 1250 negativeSkyFront {
frame 1 {
stop();
}
}
movieClip 1252 cameraFlash_mc {
frame 2 {
stop();
}
}
movieClip 1254 {
}
movieClip 1257 {
}
movieClip 1261 {
}
movieClip 1268 {
}
movieClip 1271 {
frame 1 {
stop();
}
frame 63 {
_parent.mBoss.fireChurn();
}
}
movieClip 1274 {
}
movieClip 1282 {
frame 1 {
stop();
}
frame 19 {
stop();
}
frame 29 {
stop();
}
}
movieClip 1284 {
}
movieClip 1291 {
}
movieClip 1292 {
frame 1 {
stop();
}
frame 6 {
stop();
}
}
movieClip 1295 {
frame 2 {
_parent.mouth_mc.gotoAndStop('opened');
}
frame 13 {
_parent.mouth_mc.gotoAndStop('closed');
}
frame 56 {
stop();
}
}
movieClip 1296 BossIceMachine_mc {
}
movieClip 1301 {
}
movieClip 1308 {
frame 1 {
stop();
}
}
movieClip 1314 {
frame 1 {
stop();
}
frame 84 {
gotoAndStop(1);
}
frame 188 {
gotoAndStop(1);
}
}
movieClip 1319 {
}
movieClip 1322 {
frame 4 {
stop();
}
}
movieClip 1327 {
frame 4 {
stop();
}
}
movieClip 1328 {
frame 6 {
stop();
}
}
movieClip 1329 {
frame 6 {
stop();
}
}
movieClip 1336 {
frame 22 {
stop();
}
}
movieClip 1339 {
frame 9 {
ShootingGame.killAll();
}
frame 56 {
com.homestarrunner.stinkoman.ui.Interface.showKeepTry();
}
frame 86 {
com.homestarrunner.stinkoman.StinkoGame.doneDying();
stop();
}
}
movieClip 1341 {
frame 60 {
com.homestarrunner.stinkoman.StinkoGame.levelDoneDone();
stop();
}
}
movieClip 1342 playerShooter {
frame 1 {
stop();
}
frame 8 {
stop();
}
frame 13 {
stop();
}
frame 19 {
stop();
}
frame 25 {
stop();
}
frame 30 {
stop();
}
frame 37 {
stop();
}
frame 49 {
stop();
}
}
movieClip 1343 {
}
movieClip 1344 {
frame 268 {
_parent.gotoAndStop('cinematic');
}
}
frame 35 {
gotoAndStop('titleScreen');
}
frame 60 {
gotoAndStop('titleScreen');
}
frame 76 {
trace('enter the title screen?');
_quality = 'HIGH';
stop();
}
button 1358 {
on (release, keyPress '<Space>') {
_root.gotoAndPlay('titleScreen');
}
}
movieClip 2389 {
frame 1 {
}
frame 1092 {
_root.gotoAndStop('titleScreen');
}
}
frame 78 {
gotoAndStop(_currentframe - 1);
}
frame 86 {
trace('enter the title screen?');
_quality = 'HIGH';
stop();
}
button 2390 {
on (release, keyPress '<Space>') {
_parent.gotoAndPlay('menuSelect');
}
}
movieClip 2401 {
}
movieClip 2404 {
}
movieClip 2481 {
frame 1 {
play();
}
frame 894 {
_root.gotoAndStop('cinematic');
}
}
frame 88 {
gotoAndStop(_currentframe - 1);
}
frame 96 {
_quality = 'HIGH';
stop();
}
// unknown tag 88 length 295
movieClip 2488 {
frame 1 {
stop();
}
}
// unknown tag 88 length 295
button 2492 {
on (release) {
com.homestarrunner.stinkoman.ui.MenuSelect.setPos(0);
com.homestarrunner.stinkoman.ui.MenuSelect.goPressed();
}
on (rollOver) {
com.homestarrunner.stinkoman.ui.MenuSelect.setPos(0);
}
}
button 2494 {
on (release) {
com.homestarrunner.stinkoman.ui.MenuSelect.setPos(2);
com.homestarrunner.stinkoman.ui.MenuSelect.goPressed();
}
on (rollOver) {
com.homestarrunner.stinkoman.ui.MenuSelect.setPos(2);
}
}
button 2496 {
on (release) {
com.homestarrunner.stinkoman.ui.MenuSelect.setPos(3);
com.homestarrunner.stinkoman.ui.MenuSelect.goPressed();
}
on (rollOver) {
com.homestarrunner.stinkoman.ui.MenuSelect.setPos(3);
}
}
movieClip 2498 {
}
button 2499 {
on (keyPress '<Down>') {
com.homestarrunner.stinkoman.ui.MenuSelect.downArrow();
}
on (keyPress '<Up>') {
com.homestarrunner.stinkoman.ui.MenuSelect.upArrow();
}
on (keyPress '<Space>') {
com.homestarrunner.stinkoman.ui.MenuSelect.goPressed();
}
}
button 2502 {
on (release) {
com.homestarrunner.stinkoman.ui.MenuSelect.setPos(1);
com.homestarrunner.stinkoman.ui.MenuSelect.goPressed();
}
on (rollOver) {
com.homestarrunner.stinkoman.ui.MenuSelect.setPos(1);
}
}
movieClip 2504 {
frame 1 {
com.homestarrunner.stinkoman.struct.GlobalData.init();
com.homestarrunner.stinkoman.ui.MenuSelect.init();
}
frame 24 {
stop();
}
}
frame 98 {
gotoAndStop(_currentframe - 1);
}
frame 105 {
_quality = 'HIGH';
stop();
}
button 2507 {
on (release, keyPress '<Space>') {
_root.gotoAndStop('menuSelect');
}
}
button 2510 {
on (release) {
book_mc.book_mc.gotoAndStop(book_mc.book_mc._currentframe - 1);
}
}
button 2513 {
on (release) {
book_mc.book_mc.gotoAndStop(book_mc.book_mc._currentframe + 1);
}
}
button 2516 {
on (keyPress '<Left>') {
book_mc.book_mc.gotoAndStop(book_mc.book_mc._currentframe - 1);
}
on (keyPress '<Right>') {
book_mc.book_mc.gotoAndStop(book_mc.book_mc._currentframe + 1);
}
}
movieClip 2517 {
frame 1 {
book_mc.loadMovie('externalSwf/stinkomanual.swf');
}
frame 24 {
stop();
}
}
frame 107 {
gotoAndStop(_currentframe - 1);
}
frame 115 {
_quality = 'HIGH';
stop();
}
button 2539 {
on (release, keyPress '<Space>') {
_parent.gotoAndPlay('menuSelect');
}
}
movieClip 2540 {
frame 301 {
gotoAndPlay('optionsLoop');
}
}
frame 117 {
gotoAndStop(_currentframe - 1);
}
frame 126 {
_quality = 'HIGH';
stop();
}
button 2547 {
on (release) {
com.homestarrunner.stinkoman.ui.LevelSelect.jumpToSubnav(mID);
}
on (rollOver) {
com.homestarrunner.stinkoman.ui.LevelSelect.rollOver(mID);
}
}
movieClip 2550 {
}
button 2551 {
on (release) {
com.homestarrunner.stinkoman.ui.LevelSelect.returnFromSubnav(mID);
}
}
button 2557 {
on (rollOver) {
com.homestarrunner.stinkoman.ui.LevelSelect.subnavRollOver(mID, smID);
}
}
movieClip 2560 {
}
movieClip 2562 {
}
movieClip 2564 {
}
movieClip 2565 {
}
movieClip 2566 {
frame 1 {
stop();
}
frame 3 {
com.homestarrunner.stinkoman.ui.LevelSelect.subDisplay(this);
}
}
button 2571 {
on (release) {
com.homestarrunner.stinkoman.ui.LevelSelect.jumpToSubnav(mID);
}
on (rollOver) {
com.homestarrunner.stinkoman.ui.LevelSelect.rollOver(mID);
}
}
movieClip 2574 {
frame 1 {
stop();
}
frame 3 {
com.homestarrunner.stinkoman.ui.LevelSelect.subDisplay(this);
}
}
button 2579 {
on (release) {
com.homestarrunner.stinkoman.ui.LevelSelect.jumpToSubnav(mID);
}
on (rollOver) {
com.homestarrunner.stinkoman.ui.LevelSelect.rollOver(mID);
}
}
movieClip 2582 {
frame 1 {
stop();
}
frame 3 {
com.homestarrunner.stinkoman.ui.LevelSelect.subDisplay(this);
}
}
button 2587 {
on (release) {
com.homestarrunner.stinkoman.ui.LevelSelect.jumpToSubnav(mID);
}
on (rollOver) {
com.homestarrunner.stinkoman.ui.LevelSelect.rollOver(mID);
}
}
movieClip 2590 {
frame 1 {
stop();
}
frame 3 {
com.homestarrunner.stinkoman.ui.LevelSelect.subDisplay(this);
}
}
button 2595 {
on (release) {
com.homestarrunner.stinkoman.ui.LevelSelect.jumpToSubnav(mID);
}
on (rollOver) {
com.homestarrunner.stinkoman.ui.LevelSelect.rollOver(mID);
}
}
movieClip 2598 {
frame 1 {
stop();
}
frame 3 {
com.homestarrunner.stinkoman.ui.LevelSelect.subDisplay(this);
}
}
button 2603 {
on (release) {
com.homestarrunner.stinkoman.ui.LevelSelect.jumpToSubnav(mID);
}
on (rollOver) {
com.homestarrunner.stinkoman.ui.LevelSelect.rollOver(mID);
}
}
movieClip 2606 {
frame 1 {
stop();
}
frame 3 {
com.homestarrunner.stinkoman.ui.LevelSelect.subDisplay(this);
}
}
button 2612 {
on (release) {
com.homestarrunner.stinkoman.ui.LevelSelect.jumpToSubnav(mID);
}
on (rollOver) {
com.homestarrunner.stinkoman.ui.LevelSelect.rollOver(mID);
}
}
movieClip 2615 {
frame 1 {
stop();
}
frame 3 {
com.homestarrunner.stinkoman.ui.LevelSelect.subDisplay(this);
}
}
button 2620 {
on (release) {
com.homestarrunner.stinkoman.ui.LevelSelect.jumpToSubnav(mID);
}
on (rollOver) {
com.homestarrunner.stinkoman.ui.LevelSelect.rollOver(mID);
}
}
movieClip 2623 {
frame 1 {
stop();
}
frame 3 {
com.homestarrunner.stinkoman.ui.LevelSelect.subDisplay(this);
}
}
button 2628 {
on (release) {
com.homestarrunner.stinkoman.ui.LevelSelect.jumpToSubnav(mID);
}
on (rollOver) {
com.homestarrunner.stinkoman.ui.LevelSelect.rollOver(mID);
}
}
movieClip 2630 {
frame 1 {
stop();
}
frame 3 {
com.homestarrunner.stinkoman.ui.LevelSelect.subDisplay(this);
}
}
button 2633 {
on (release) {
com.homestarrunner.stinkoman.ui.LevelSelect.jumpToSubnav(mID);
}
on (rollOver) {
com.homestarrunner.stinkoman.ui.LevelSelect.rollOver(mID);
}
}
movieClip 2637 {
frame 1 {
stop();
}
frame 3 {
com.homestarrunner.stinkoman.ui.LevelSelect.subDisplay(this);
}
}
button 2648 {
on (release, keyPress '<Escape>') {
_root.gotoAndStop('titleScreen');
}
}
movieClip 2649 {
frame 300 {
gotoAndPlay('levelSelectLoop');
}
}
button 2650 {
on (keyPress '<Down>') {
com.homestarrunner.stinkoman.ui.LevelSelect.downArrow();
}
on (keyPress '<Up>') {
com.homestarrunner.stinkoman.ui.LevelSelect.upArrow();
}
on (keyPress '<Left>') {
com.homestarrunner.stinkoman.ui.LevelSelect.leftArrow();
}
on (keyPress '<Right>') {
com.homestarrunner.stinkoman.ui.LevelSelect.rightArrow();
}
on (keyPress '<Space>') {
com.homestarrunner.stinkoman.ui.LevelSelect.goPressed();
}
}
movieClip 2651 {
frame 1 {
com.homestarrunner.stinkoman.ui.LevelSelect.update(this);
stop();
}
}
frame 128 {
gotoAndStop(_currentframe - 1);
}
frame 136 {
function cutSceneEnded() {
com.homestarrunner.stinkoman.struct.GlobalData.cutSceneEnded();
}
_quality = 'HIGH';
_root.cutSceneAllowed = true;
com.homestarrunner.stinkoman.struct.GlobalData.showCutScene();
cutscene_button.onRelease = function () {
trace('jez: cutscene end via click');
com.homestarrunner.stinkoman.struct.GlobalData.cutSceneEnded();
};
cutscene_button.onKeyDown = function () {
if (Key.getCode() == 32) {
trace('jez: cutscene end via key press');
com.homestarrunner.stinkoman.struct.GlobalData.cutSceneEnded();
}
};
Key.addListener(cutscene_button);
stop();
}
movieClip 2654 {
frame 8 {
stop();
}
}
frame 145 {
_quality = 'HIGH';
stop();
}
movieClip 2659 {
}
movieClip 2661 {
frame 1 {
stop();
}
}
button 2663 {
on (release, keyPress '<Space>') {
_parent.gotoAndPlay('gamePlayGo');
}
}
movieClip 2664 {
frame 1 {
StinkoGame.gameSound.stop();
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 5) {
levelPose_mc.gotoAndStop('oneUp');
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 8) {
levelPose_mc.gotoAndStop('negative');
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 9) {
levelPose_mc.gotoAndStop('ship');
}
}
}
gotoAndPlay('levelLoaded');
}
frame 2 {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 8) {
level_txt.text = 'TRY LEVEL -0.' + com.homestarrunner.stinkoman.struct.GlobalData.subsublevel;
} else {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 10) {
level_txt.text = 'TRY LEVEL ' + com.homestarrunner.stinkoman.struct.GlobalData.sublevel + '.' + (com.homestarrunner.stinkoman.struct.GlobalData.subsublevel - 1);
} else {
level_txt.text = 'TRY LEVEL ' + com.homestarrunner.stinkoman.struct.GlobalData.sublevel + '.' + com.homestarrunner.stinkoman.struct.GlobalData.subsublevel;
}
}
}
frame 117 {
_parent.gotoAndPlay('gamePlayGo');
}
}
frame 153 {
trace('GamePlay reached ' + this._name);
trace('GamePlay GlobalData.subsublevel = ' + com.homestarrunner.stinkoman.struct.GlobalData.subsublevel);
com.homestarrunner.stinkoman.ui.Interface.setMovieClips(interface_mc, interface_background_mc);
com.homestarrunner.stinkoman.ui.Interface.showStartUpMessage();
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 11) {
com.homestarrunner.stinkoman.ui.Interface.hide();
viewbox_mc._height += 64;
credits_fade_in_mc.gotoAndPlay(1);
} else {
credits_fade_in_mc.stop();
credits_fade_in_mc._visible = false;
}
escape_explosion_mc._visible = false;
var sGame;
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 3 && com.homestarrunner.stinkoman.struct.GlobalData.subsublevel != 3) {
new com.homestarrunner.stinkoman.gamemode.JumpingGame(_root, viewbox_mc);
} else {
trace('_root: Stinkogame!');
_root.lData = new com.homestarrunner.stinkoman.struct.LevelData(_root, _root.gameStage_mc, false);
_root.lData.setXML(com.homestarrunner.stinkoman.struct.StinkomanXMLData.getXML(com.homestarrunner.stinkoman.struct.GlobalData.sublevel, com.homestarrunner.stinkoman.struct.GlobalData.subsublevel));
_root.lData.reset();
delete sGame;
Bulllet.killAll();
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 9) {
sGame = new com.homestarrunner.stinkoman.gamemode.ShootingGame(_root, _root.lData, viewbox_mc);
} else {
sGame = new com.homestarrunner.stinkoman.StinkoGame(_root, _root.lData, viewbox_mc);
com.homestarrunner.stinkoman.stageobject.Platform.unpause();
}
}
stop();
}
movieClip 2667 {
frame 1 {
stop();
}
frame 32 {
com.homestarrunner.stinkoman.ui.Interface.showKeepTry();
}
frame 75 {
trace('done dying');
com.homestarrunner.stinkoman.StinkoGame.doneDying();
}
}
movieClip 2672 {
frame 1 {
stop();
}
frame 30 {
stop();
}
}
movieClip 2674 {
}
movieClip 2676 {
}
instance viewbox_mc of movieClip 2676 {
}
// unknown tag 88 length 103
movieClip 2683 {
frame 1 {
stop();
}
}
movieClip 2692 {
frame 1 {
stop();
}
}
movieClip 2697 {
frame 1 {
stop();
}
}
movieClip 2698 {
}
movieClip 2700 {
}
movieClip 2702 {
}
movieClip 2704 {
frame 67 {
stop();
}
}
movieClip 2709 {
}
movieClip 2710 {
}
movieClip 2711 {
}
movieClip 2715 {
frame 5070 {
stop();
com.homestarrunner.stinkoman.StinkoGame.stopGamePlay();
_root.gotoAndStop('titleScreen');
}
}
frame 155 {
gotoAndStop(_currentframe - 1);
}
frame 163 {
_quality = 'HIGH';
com.homestarrunner.stinkoman.struct.GlobalData.lastSceneStorage.gameStageX = undefined;
com.homestarrunner.stinkoman.struct.GlobalData.lastSceneStorage.playerX = undefined;
stop();
}
button 2716 {
on (release, keyPress '<Space>') {
_root.gotoAndPlay('tenderVittles');
}
}
movieClip 2726 {
frame 1 {
stop();
}
}
movieClip 2727 {
frame 1 {
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 5) {
gameOverPortrait_mc.gotoAndStop('oneUp');
}
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 8) {
gameOverPortrait_mc.gotoAndStop('negative');
}
if (com.homestarrunner.stinkoman.struct.GlobalData.sublevel == 9) {
gameOverPortrait_mc.gotoAndStop('ship');
}
}
frame 132 {
_parent.gotoAndPlay('tenderVittles');
}
}
frame 171 {
_quality = 'HIGH';
stop();
}
movieClip 2729 {
frame 275 {
getURL('stinkogame.html', '');
stop();
}
}
frame 182 {
com.homestarrunner.stinkoman.StinkoGame.doneDyingAndCrying();
}