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

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

save_the_couch.swf

This is the info page for
Flash #98504

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


ActionScript [AS1/AS2]
Combined Code
movieClip 8 { } movieClip 9 { } button 11 { on (release) { _root.pMainProgram_mc.programButtonClicked('staf_send'); } } movieClip 17 { frame 5 { this.stop(); } frame 19 { this.gotoAndPlay('error'); } } movieClip 19 { frame 6 { stop(); } frame 13 { stop(); } } button 21 { on (release) { _root.pMainProgram_mc.programButtonClicked('play_game'); } } button 26 { on (release) { _root.pMainProgram_mc.programButtonClicked('wallpaper_800'); } } button 28 { on (release) { _root.pMainProgram_mc.programButtonClicked('wallpaper_1024'); } } button 30 { on (release) { _root.pMainProgram_mc.programButtonClicked('wallpaper_1280'); } } movieClip 34 EndingHangarMC { frame 9 { stop(); } frame 18 { stop(); } } movieClip 58 { } movieClip 59 { frame 200 { stop(); } } movieClip 60 MilFalconMC { frame 114 { _root.pMainProgram_mc.NotifyFromMC(undefined, 'milfalc_anifinished'); } frame 200 { stop(); } } movieClip 65 { } button 68 { on (release) { _root.pMainProgram_mc.programButtonClicked('skip_instructions'); } } movieClip 70 { } movieClip 73 InstructionsMC { frame 660 { _root.pMainProgram_mc.NotifyFromMC(undefined, 'instructions_finished'); } } frame 1 { _root.__startProgram = function () { gotoAndPlay(13); }; } movieClip 78 { } movieClip 83 { } movieClip 93 { frame 76 { this.stop(); } } movieClip 94 { frame 2 { var rat; var tot = _root.getBytesTotal(); var sof = _root.getBytesLoaded(); var fr; if (tot > 0) { rat = sof / tot; } else { rat = -9.99; } fr = Math.floor(100 * rat); saber_mc.gotoAndStop(fr); loaded_txt.text = String(fr) + '%'; if (fr >= 100) { this.gotoAndPlay('post_load'); } else { this.gotoAndPlay(1); } } frame 102 { _root.__startProgram(); } } frame 7 { this.stop(); } movieClip 115 { } movieClip 132 { frame 95 { this._parent.gotoAndPlay('still'); } } movieClip 146 { frame 81 { this._parent.gotoAndPlay('still'); } } movieClip 150 { } movieClip 152 { } movieClip 156 { } movieClip 160 { } movieClip 185 { frame 94 { this._parent._parent.NotifyFromTargetAnimation('hit_finished'); this.stop(); } } movieClip 186 TargetClipMC { frame 48 { var n = Math.random(); if (n > 0.5) { this.gotoAndPlay('still_brian'); } else { this.gotoAndPlay('still_peter'); } } frame 54 { this.stop(); } frame 61 { this.stop(); } frame 66 { this.stop(); } frame 71 { this.stop(); } frame 75 { this.stop(); } frame 80 { this.stop(); } } movieClip 188 MainProgramMC { #initclip Object.registerClass('MainProgramMC', MainProgram); #endinitclip } movieClip 191 EndGameTextMC { } movieClip 216 MissileBlastMC { frame 22 { this._parent.NotifyBlastFinished(); } } movieClip 223 Popup_Ar2 { frame 100 { _root.pMainProgram_mc.PopupNotify('done'); this.stop(); } } movieClip 248 Popup_C3po { frame 134 { _root.pMainProgram_mc.PopupNotify('done'); this.stop(); } } movieClip 261 Popup_Darth { frame 72 { _root.pMainProgram_mc.PopupNotify('done'); this.stop(); } } movieClip 284 Popup_Lea { frame 109 { _root.pMainProgram_mc.PopupNotify('done'); this.stop(); } } movieClip 316 Popup_Luke { frame 189 { _root.pMainProgram_mc.PopupNotify('done'); this.stop(); } } movieClip 353 Popup_Obi { frame 126 { _root.pMainProgram_mc.PopupNotify('done'); this.stop(); } } movieClip 362 Popup_Snake { frame 60 { _root.pMainProgram_mc.PopupNotify('done'); this.stop(); } } movieClip 394 { } button 402 { on (release) { _root.pMainProgram_mc.programButtonClicked('play_game'); } } movieClip 403 SplashScreenMC { } movieClip 413 { } movieClip 415 ShooterGraphicMC { frame 4 { this._parent.ShooterFrameNotify('shot_request'); } frame 9 { this._parent.ShooterFrameNotify('shot_fired'); } frame 30 { this._parent.ShooterFrameNotify('popdown'); this.stop(); } } movieClip 433 { } movieClip 437 { } movieClip 463 WinAnimationMC { frame 460 { _root.pMainProgram_mc.NotifyFromMC(undefined, 'winani_finished'); } } movieClip 464 MissleMC { #initclip Object.registerClass('MissleMC', Missle); #endinitclip } movieClip 465 ShooterMC { #initclip Object.registerClass('ShooterMC', Shooter); #endinitclip } movieClip 466 TargetMC { #initclip Object.registerClass('TargetMC', ShootTargetClip); #endinitclip } movieClip 472 { } movieClip 473 BackgroundMC { } movieClip 475 MissleGraphicMC { } movieClip 477 BalconyMC { } movieClip 478 __Packages.IMissle { #initclip if (!_global.IMissle) { _global.IMissle = function () {}; } #endinitclip } movieClip 479 __Packages.Missle { #initclip if (!_global.Missle) { var v1 = function () { super(); }; _global.Missle = v1; _global.Missle extends MovieClip; var v2 = v1.prototype; _global.Missle implements _global.IMissle; v2.initMissle = function (vMissleGraphicLibID_str, vMissleID, vTrajecX, vTrajecY, vTarget_mc, vTargetHitArea_mc, xmin, xmax, ymin, ymax, rot) { var v2 = true; if (!this.pIsMissleInited) { this.pMissleGraphic_mc = this.attachMovie(vMissleGraphicLibID_str, vMissleGraphicLibID_str + vMissleID, this.getNextHighestDepth()); if (!this.pMissleGraphic_mc) { v2 = false; } this.pMissileHitBlast_mc = undefined; this.pIsBlastingNow = false; this.pIsBlastFinished = false; this.pCurTrajecX = vTrajecX; this.pCurTrajecY = vTrajecY; if (typeof this.pCurTrajecX != 'number' || typeof this.pCurTrajecY != 'number') { v2 = false; } this.pTarget_mc = vTarget_mc; this.pTargetHitArea_mc = vTargetHitArea_mc; if (!this.pTarget_mc || !this.pTargetHitArea_mc) { v2 = false; } if (typeof xmin != 'number' || typeof xmax != 'number' || typeof ymin != 'number' || typeof ymax != 'number') { v2 = false; } this.pMissed_obj = this.constructMissedObj(xmin, xmax, ymin, ymax); this.pMissileRot = rot; if (isNaN(this.pMissileRot)) { v2 = false; } if (!v2) { trace('**** ERROR ****, missle init params incorrect:\r' + vMissleGraphicLibID_str + ' ' + vMissleID + ' ' + vTrajecX + ' ' + vTrajecY + ' ' + vTarget_mc + ' ' + xmin + ' ' + xmax + ' ' + ymin + ' ' + ymax); } } this.pIsMissleInited = true; return undefined; }; v2.MoveMissle = function () { return this._moveMissle(); }; v2.DieMissle = function () { this._die(); return undefined; }; v2.NotifyBlastFinished = function () { if (this.pMissileHitBlast_mc) { this.removeMovieClip(); } this.pIsBlastFinished = true; return undefined; }; v2._moveMissle = function () { var v2 = 1; if (this.pIsBlastingNow) { v2 = 4; return v2; } if (this.pIsBlastFinished) { v2 = 5; return v2; } this._x += this.pCurTrajecX; this._y += this.pCurTrajecY; if (this._y > this.pMissed_obj.ymax || this._y < this.pMissed_obj.ymin || this._x > this.pMissed_obj.xmax || this._x < this.pMissed_obj.xmin) { v2 = 3; this.createBlast(); this.pIsBlastingNow = true; return v2; } if (this.hitTest(this.pTargetHitArea_mc)) { v2 = 2; this.createBlast(); this.pIsBlastingNow = true; } return v2; }; v2.createBlast = function () { if (this.pMissleGraphic_mc) { this.pMissleGraphic_mc._visible = false; } if (!this.pMissileHitBlast_mc && !this.pIsBlastingNow) { this.pMissileHitBlast_mc = this.attachMovie('MissileBlastMC', 'missileblast_mc', this.getNextHighestDepth()); this.pMissileHitBlast_mc._rotation = -1 * this.pMissileRot; } else { trace('ERROR, missle blast alreay created: ' + this.pMissileHitBlast_mc); } }; v2._die = function () { delete this.pMissed_obj; delete this.pCurTrajecX; delete this.pCurTrajecY; delete this.pTarget_mc; delete this.pTargetHitArea_mc; if (this.pMissleGraphic_mc) { this.removeMovieClip(); } if (this.pMissileHitBlast_mc) { this.removeMovieClip(); } delete this.pMissleGraphic_mc; delete this.pMissileHitBlast_mc; delete this.pIsBlastingNow; delete this.pIsBlastFinished; delete this.pIsMissleInited; }; v2.constructMissedObj = function (xmin, xmax, ymin, ymax) { var v1 = new Object(); v1.xmin = xmin; v1.xmax = xmax; v1.ymin = ymin; v1.ymax = ymax; return v1; }; v2.pIsMissleInited = false; v2.pMissleGraphic_mc = undefined; v2.pTarget_mc = undefined; v2.pTargetHitArea_mc = undefined; v2.pCurTrajecX = 0; v2.pCurTrajecY = 0; v2.pMissed_obj = new Object(); v2.pMissileHitBlast_mc = undefined; v2.pIsBlastingNow = false; v2.pIsBlastFinished = false; v2.pMissileRot = 0; ASSetPropFlags(_global.Missle.prototype, null, 1); } #endinitclip } movieClip 480 __Packages.IShooter { #initclip if (!_global.IShooter) { _global.IShooter = function () {}; } #endinitclip } movieClip 481 __Packages.Shooter { #initclip if (!_global.Shooter) { var v1 = function () { super(); }; _global.Shooter = v1; _global.Shooter extends MovieClip; var v2 = v1.prototype; _global.Shooter implements _global.IShooter; v2.InitShooter = function (vCaller_mc, vShooterGraphicLibID_str, vShooterID, vGunRot) { var v2 = true; if (!this.pIsInited) { this.pShooterGraphic_mc = this.attachMovie(vShooterGraphicLibID_str, vShooterGraphicLibID_str + vShooterID, this.getNextHighestDepth()); if (!this.pShooterGraphic_mc) { v2 = false; } if (isNaN(vGunRot)) { v2 = false; } this.pShooterGraphicGun_mc = this.pShooterGraphic_mc.gun_mc; if (!this.pShooterGraphicGun_mc) { } this.pGunpointTip_mc = this.pShooterGraphic_mc.tip_mc; if (!this.pGunpointTip_mc) { trace('ERROR, shooter gun_mc gun tip mc invalid.'); } this.pGunpointTip_mc._visible = false; if (!vCaller_mc) { v2 = false; } this.pCaller_mc = vCaller_mc; if (!v2) { trace('**** ERROR ****, shooter init params incorrect:\r' + vCaller_mc + ' ' + vShooterGraphicLibID_str + ' ' + vShooterID + ' ' + vGunRot); } } this.pIsInited = true; return undefined; }; v2.ShooterFrameNotify = function (vWhich) { var v5; var v4; var v3; var v6; switch (vWhich) { case 'shot_request': v4 = new Object({'x': this.pGunpointTip_mc._x, 'y': this.pGunpointTip_mc._y}); this.pShooterGraphic_mc.localToGlobal(v4); v5 = v4; break; case 'shot_fired': if (this.pImpendingShot_obj) { v5 = this.pImpendingShot_obj; } else { trace('ERROR, shot object invalid at shooter shot.'); } break; case 'popdown': break; default: trace('ERROR, unknown shooter frame notification: ' + vWhich); } if (this.pCaller_mc) { v3 = this.pCaller_mc.NotifyFromShooter(this, vWhich, v5); } else { trace('ERROR, caller undfined for shooter shot notification.'); } if (v3) { if (vWhich !== 'shot_request') { } else { v6 = v3.qIsOkToShoot ? 'shootok' : 'movedown'; this.pShooterGraphic_mc.gotoAndPlay(v6); this.pImpendingShot_obj = v3; return undefined; } trace('ERROR, shooter caller return notification not required for: ' + vWhich); return undefined; } return undefined; }; v2.DieShooter = function () { this._die(); return undefined; }; v2._die = function () { delete this.pShooterGraphic_mc; delete this.pShooterGraphicGun_mc; delete this.pGunpointTip_mc; delete this.pCaller_mc; this.pIsInited = false; }; v2.pIsInited = false; v2.pShooterGraphic_mc = undefined; v2.pShooterGraphicGun_mc = undefined; v2.pGunpointTip_mc = undefined; v2.pCaller_mc = undefined; v2.pImpendingShot_obj = undefined; ASSetPropFlags(_global.Shooter.prototype, null, 1); } #endinitclip } movieClip 482 __Packages.ShootTargetClip { #initclip if (!_global.ShootTargetClip) { var v1 = function () { super(); }; _global.ShootTargetClip = v1; _global.ShootTargetClip extends MovieClip; var v2 = v1.prototype; v2.onEnterFrame = function () { var v2; if (this.pMoveStateCUR != this.pMoveStateLAST) { switch (this.pMoveStateCUR) { case -1: v2 = 'moveL'; break; case 1: v2 = 'moveR'; break; case 0: v2 = 'still'; break; case 3: v2 = 'hit'; break; case 4: v2 = 'moveL'; } this.pGraphic_mc.gotoAndPlay(v2); } this.pMoveStateLAST = this.pMoveStateCUR; if (this.pGraphicCharSpeaking) { if (this.pGraphicCharSpeaking !== 1) { } else {} } if (this.pIsMovingOffstage) { this._x -= 16; if (this._x < this.pMoveOffstageMIN) { this.pIsMovingOffstage = false; this.pCaller_mc.NotifyFromTarget('win_finished'); } } return undefined; }; v2.initTarget = function (vCaller) { var v2; if (!this.pGraphic_mc) { this.pGraphic_mc = this.attachMovie('TargetClipMC', 'targetGraphic_mc', this.getNextHighestDepth()); this.pGraphic_mc._xscale = 66; this.pGraphic_mc._yscale = 66; this.pGraphic_mc._x = -1 * (this.pGraphic_mc._width * 0.5); this.pGraphic_mc._y = -1 * (this.pGraphic_mc._height * 0.24); } this.pIsMovingOffstage = false; this.pCaller_mc = vCaller; if (!this.pCaller_mc) { trace('ERROR, caller needs to be passed to target.'); } this.pGraphicCharSpeaking = 0; this.pGraphic_mc.gotoAndPlay('still'); v2 = this.pGraphic_mc.hitarea_mc; v2._visible = false; if (!v2) { trace('ERROR, hit area is undefined for target.'); } this.pSpeed = 1; this.pMoveStateCUR = 0; this.pMoveStateLAST = 0; return v2; }; v2.moveTargetLeftRight = function (vIsLeft, vIncrPassed) { var v2 = vIsLeft ? -1 : 1; var v3; if (!isNaN(vIncrPassed)) { v3 = v2 * vIncrPassed; this._x += v3; this.pMoveStateCUR = v2; return undefined; } v3 = v2 * this.pIncrementLR * this.pSpeed; this._x += v3; this.pMoveStateCUR = v2; return undefined; }; v2.stopMoveTarget = function () { this.pMoveStateCUR = 0; return undefined; }; v2.AdjustNavSpeed = function (vSpeed) { this.pSpeed = vSpeed; return undefined; }; v2.startEndSequence = function (vIsWin) { if (vIsWin) { this.pMoveStateCUR = 4; this.pIsMovingOffstage = true; } else { this.pMoveStateCUR = 3; } }; v2.NotifyFromTargetAnimation = function (vWhich) { switch (vWhich) { case 'hit_finished': this.pCaller_mc.NotifyFromTarget(vWhich); break; default: } }; v2.pIncrementLR = 8; v2.pSpeed = 1; v2.pMoveStateCUR = 0; v2.pMoveStateLAST = 0; v2.pGraphic_mc = undefined; v2.pGraphicCharSpeaking = 0; v2.pCaller_mc = undefined; v2.pIsMovingOffstage = false; v2.pMoveOffstageMIN = -333; ASSetPropFlags(_global.ShootTargetClip.prototype, null, 1); } #endinitclip } movieClip 483 __Packages.MainProgram { #initclip if (!_global.MainProgram) { var v1 = function () {}; _global.MainProgram = v1; var v2 = v1.prototype; v2.onEnterFrame = function () { if (this.pIsGameRunning) { if (this.incrementTime()) { if (this.manageMissles() || this.p_Test_IsNoDie) { this.incrementDifficulty(); this.keyInputEnterframe(); this.manageShooters(); this.managePopups(); } else { this.pIsGameRunning = false; this.runGameplayEnd(false, 'start_end'); } return undefined; } this.pIsGameRunning = false; this.runGameplayEnd(true, 'start_end'); } return undefined; }; v2.initProgram = function () { if (!this.pIsProgramInited) { this.keyInputSetup(); this.pListOfBalconyLocs_ar = new Array(); this.pListOfBalconyLocs_ar.push(new Object({'_x': -18, '_y': 58})); this.pListOfBalconyLocs_ar.push(new Object({'_x': -18, '_y': 155})); this.pListOfBalconyLocs_ar.push(new Object({'_x': -18, '_y': 255})); this.pListOfBalconyLocs_ar.push(new Object({'_x': 825, '_y': 58})); this.pListOfBalconyLocs_ar.push(new Object({'_x': 825, '_y': 155})); this.pListOfBalconyLocs_ar.push(new Object({'_x': 825, '_y': 255})); } this.removeNonGameMCs(); this.setupSplashScreen(); this.pIsProgramInited = true; return undefined; }; v2.programButtonClicked = function (vWhich) { switch (vWhich) { case 'play_game': this.removeNonGameMCs(); if (this.pIsInstRunAlready) { this.resetGame(); } else { this.pIsInstRunAlready = true; this.setupScrollInstructions(); } break; case 'skip_instructions': this.skipInstructionsRunGame(); break; case 'staf_send': this.startStaf(); break; case 'wallpaper_800': getURL('http://content.otolabs.com/production/FamilyGuyGame/savethecouch800.html', 'wallpap_800'); break; case 'wallpaper_1024': getURL('http://content.otolabs.com/production/FamilyGuyGame/savethecouch1024.html', 'wallpap_1024'); break; case 'wallpaper_1280': getURL('http://content.otolabs.com/production/FamilyGuyGame/savethecouch1280.html', 'wallpap_1280'); break; default: trace('ERROR, unknown program button click: ' + vWhich); } }; v2.NotifyFromMC = function (mc, vWhich) { switch (vWhich) { case 'instructions_finished': this.skipInstructionsRunGame(); break; case 'winani_finished': this.removeWinAnimation(); this.createMilFalconAnimation(); break; case 'milfalc_anifinished': this.createEndLandingClip(this.pIsWonGame); break; default: trace('ERROR, unknown instruction from mc: ' + vWhich); } }; v2.setupSplashScreen = function () { if (!this.pSplashScreen_mc) { this.pSplashScreen_mc = _root.attachMovie(this.pSplashScreen_LibID, 'splashscreen_mc', _root.getNextHighestDepth()); } this.pSplashScreen_mc._x = -353.7; this.pSplashScreen_mc._y = -10.2; }; v2.removeSplashScreen = function () { if (this.pSplashScreen_mc) { removeMovieClip(this.pSplashScreen_mc); delete this.pSplashScreen_mc; } }; v2.setupScrollInstructions = function () { if (!this.pScrollInstructions_mc) { this.pScrollInstructions_mc = _root.attachMovie(this.pScrollInstructions_LibID, 'scrollinst_mc', _root.getNextHighestDepth()); } this.pScrollInstructions_mc._x = 400; this.pScrollInstructions_mc._y = 250; }; v2.skipInstructionsRunGame = function () { this.removeInstructions(); this.pIsInstRunAlready = true; this.resetGame(); }; v2.removeInstructions = function () { if (this.pScrollInstructions_mc) { removeMovieClip(this.pScrollInstructions_mc); delete this.pScrollInstructions_mc; } }; v2.createWinAnimation = function () { if (!this.pWinAnimation_mc) { this.pWinAnimation_mc = _root.attachMovie(this.pWinAnimation_LibID, 'winani_mc', _root.getNextHighestDepth()); } this.pWinAnimation_mc._x = 400; this.pWinAnimation_mc._y = 250; }; v2.removeWinAnimation = function () { if (this.pWinAnimation_mc) { removeMovieClip(this.pWinAnimation_mc); delete this.pWinAnimation_mc; } }; v2.createMilFalconAnimation = function () { if (!this.pMilFalconAnimation_mc) { this.pMilFalconAnimation_mc = _root.attachMovie(this.pMilFalconAnimation_LibID, 'milfalc_mc', _root.getNextHighestDepth()); } this.pMilFalconAnimation_mc._x = 400; this.pMilFalconAnimation_mc._y = 250; }; v2.removeMilFalconAnimation = function () { if (this.pMilFalconAnimation_mc) { removeMovieClip(this.pMilFalconAnimation_mc); delete this.pMilFalconAnimation_mc; } }; v2.createEndLandingClip = function (vIsWin) { var v3 = this.pTimeMAXD - this.pTimeCURR; var v9 = this.getTimeString(1, v3); var v4 = this.getTimeString(2, v3); var v5 = v9 + ':' + v4; var v7 = String(this.pMissleMissedCt); var v6 = 'time: ' + v5 + ' Missiles Dodged: ' + v7; var v8; if (!this.pEndLandingScreenClip_mc) { this.pEndLandingScreenClip_mc = _root.attachMovie(this.pEndLandingScreenClip_LibID, 'endlanding_mc', _root.getNextHighestDepth()); } this.pEndLandingScreenClip_mc._x = 400; this.pEndLandingScreenClip_mc._y = 250; v8 = vIsWin ? 'win' : 'lose'; this.pEndLandingScreenClip_mc.gotoAndPlay(v8); this.pEndLandingScreenClip_mc.staf_mc.gotoAndPlay('staf_start'); this.pEndLandingScreenClip_mc.staf_mc.stafgameres_txt.text = v6; }; v2.removeEndLandingClip = function () { if (this.pEndLandingScreenClip_mc) { removeMovieClip(this.pEndLandingScreenClip_mc); delete this.pEndLandingScreenClip_mc; } }; v2.removeNonGameMCs = function () { this.removeSplashScreen(); this.removeInstructions(); this.removeWinAnimation(); this.removeMilFalconAnimation(); this.removeEndLandingClip(); }; v2.resetGame = function () { var v3 = new Date(); var v2; this.removeNonGameMCs(); this.pIsWonGame = false; this.pCurDifficulty = 0; this.pTimeORIG = v3.getTime(); this.pTimeCURR = 0; this.pEndGameDisplay_mc.display_txt.text = ''; this.removePopup(true); this.pPopupCurPlaying = undefined; this.pPopupChanceFrameCUR = 0; this.pPopupGraceFrameCUR = 0; this.pPopupCurIdx = -1; this.pShooterCurDepthIdx = 0; this.pShooterDepths_ar = new Array(); v2 = 0; while (v2 < this.pMissileMAXCT + 2) { this.pShooterDepths_ar.push(this.pShooterDepthBASE + v2 * 6); ++v2; } this.sceneSetup(); this.pIsAllowNavigate = true; this.pIsGameRunning = true; return undefined; }; v2.sceneSetup = function () { var v6; var v4; var v3; var v5; this.pBackground_mc = this.sceneSetup_Background(); this.pTarget_mc = this.sceneSetup_Target(this.pBackground_mc._width, this.pBackground_mc._height); v5 = this.pBalconies_ar.length; v3 = 0; while (v3 < v5) { v4 = this.pBalconies_ar[v3]; removeMovieClip(v4); v4 = undefined; ++v3; } this.pBalconies_ar = new Array(); v5 = this.pListOfBalconyLocs_ar.length; v3 = 0; while (v3 < v5) { ++this.pUniqueIdx; v4 = _root.attachMovie('BalconyMC', 'balcony' + this.pUniqueIdx + '_mc', this.pBalconyDepth + v3 * 10); v4._x = this.pListOfBalconyLocs_ar[v3]._x; v4._y = this.pListOfBalconyLocs_ar[v3]._y; this.pBalconies_ar.push(v4); if (v3 >= 3 && v3 <= 5) { v4._xscale = -100; } ++v3; } v5 = this.pShooters_ar.length; v3 = 0; while (v3 < v5) { v4 = this.pShooters_ar[v3]; removeMovieClip(v4); v4 = undefined; ++v3; } this.pShooters_ar = new Array(); this.pMissileCurMaxCt = this.pMissileMINCT; this.pCtSinceLastShooter = 10000; this.destroyAllMissiles(); this.pMissleMissedCt = 0; if (!this.pEndGameDisplay_mc) { this.pEndGameDisplay_mc = _root.attachMovie('EndGameTextMC', 'EndGameText_mc', _root.getNextHighestDepth()); this.pEndGameDisplay_mc._x = 242; this.pEndGameDisplay_mc._y = 242; this.pEndGameDisplay_mc.display_txt.text = ''; } return undefined; }; v2.sceneSetup_Background = function () { var v3; if (_root[this.pBackground_StageName]) { v3 = _root[this.pBackground_StageName]; this.sceneSetup_DisplayInfo(v3); v3.opaqueBackground = 0; v3.cacheAsBitmap = true; v3._x = 0; v3._y = 0; return v3; } v3 = _root.attachMovie(this.pBackground_LibID, this.pBackground_StageName, _root.getNextHighestDepth()); this.sceneSetup_DisplayInfo(v3); v3.opaqueBackground = 0; v3.cacheAsBitmap = true; v3._x = 0; v3._y = 0; return v3; }; v2.sceneSetup_DisplayInfo = function (mc) { if (!this.pTimeDisplay_txt) { this.pTimeDisplay_txt = mc.scoreboard_mc.timer_txt; if (!this.pTimeDisplay_txt) { trace('ERROR, time display text invalid.'); } } if (!this.pMissleCtDisplay_txt) { this.pMissleCtDisplay_txt = mc.scoreboard_mc.missilecount_txt; if (!this.pMissleCtDisplay_txt) { trace('ERROR, missile ct display text invalid.'); } } this.pTimeDisplay_txt.text = '-:--'; this.pMissleCtDisplay_txt.text = '0'; }; v2.sceneSetup_Target = function (vSceneWID, vSceneHT) { var v3; if (_root[this.pTarget_StageName]) { v3 = _root[this.pTarget_StageName]; this.pTargetHitArea_mc = v3.initTarget(this); this.pTargetLimitXMIN = 0; this.pTargetLimitXMAX = vSceneWID; v3._x = vSceneWID / 2; v3._y = vSceneHT * 0.8100000000000001; return v3; } v3 = _root.attachMovie(this.pTarget_LibID, this.pTarget_StageName, _root.getNextHighestDepth()); this.pTargetHitArea_mc = v3.initTarget(this); this.pTargetLimitXMIN = 0; this.pTargetLimitXMAX = vSceneWID; v3._x = vSceneWID / 2; v3._y = vSceneHT * 0.8100000000000001; return v3; }; v2.incrementTime = function () { var v6; var v5; var v2; var v3; var v4 = true; this.pTimeCURR = (new Date()).getTime() - this.pTimeORIG; v3 = this.pTimeMAXD - this.pTimeCURR; v6 = this.getTimeString(1, v3); v5 = ':' + this.getTimeString(2, v3); v2 = v6 + v5; if (this.pTimeCURR >= this.pTimeMAXD - 900) { v2 = '0:00'; v4 = false; } if (this.pTimeDisplay_txt) { this.pTimeDisplay_txt.text = v2; } return v4; }; v2.incrementDifficulty = function () { var v2 = this.pTimeCURR / this.pTimeMAXD; v2 = Math.min(Math.max(0, v2), 1); if (this.pDifficultyUserLevel !== 0) { } else { this.pCurDifficulty = v2; return undefined; } this.pCurDifficulty = v2; return undefined; }; v2.NotifyFromShooter = function (vShooter_mc, vWhich, vParam1) { var v2; switch (vWhich) { return v2; case 'shot_request': vParam1.qIsShooterLeft = vShooter_mc._x < Stage.width / 2 ? true : false; v2 = this.determineShooterShot(vParam1); return v2; case 'shot_fired': this.createMissle(vParam1); return v2; case 'popdown': this.removeShooter(vShooter_mc); return v2; } return v2; }; v2.manageShooters = function () { var v3 = false; var v4 = this.pShooters_ar.length; var v2 = 1; var v5; this.pMissileCurMaxCt = Math.floor(this.pCurDifficulty * this.pMissileMAXCT); this.pMissileCurMaxCt = Math.max(this.pMissileMINCT, this.pMissileCurMaxCt); ++this.pCtSinceLastShooter; if (v4 < this.pMissileCurMaxCt) { v2 = 1 * (this.pCtSinceLastShooter / (20 + (1 - this.pCurDifficulty) * 30)); v2 *= 1 - v4 / this.pMissileCurMaxCt; v2 = Math.min(1, Math.max(0, v2)); v2 = Math.floor(v2 * 100); v3 = this.randRange(v2, 100) == v2; if (v3) { v5 = this.createShooter(); this.pShooters_ar.push(v5); } } return undefined; }; v2.createShooter = function () { var v3; var v4 = this.randRange(0, 5); var v7; var v6 = this.pListOfBalconyLocs_ar[v4]; var v5 = this.pShooterLocOffsetX; this.pCtSinceLastShooter = 0; ++this.pShooterCurDepthIdx; this.pShooterCurDepthIdx = this.pShooterCurDepthIdx >= this.pShooterDepths_ar.length ? 0 : this.pShooterCurDepthIdx; v7 = this.pShooterDepths_ar[this.pShooterCurDepthIdx]; ++this.pUniqueIdx; v3 = _root.attachMovie('ShooterMC', 'shooter' + this.pUniqueIdx + '_mc', v7); v3.InitShooter(this, 'ShooterGraphicMC', this.pUniqueIdx, 0); v3._xscale = 30; v3._yscale = 30; v3._rotation = 20; if (v4 >= 3 && v4 <= 5) { v3._xscale *= -1; v3._rotation *= -1; v5 *= -1; } v3._x = v6._x + v5; v3._y = v6._y + this.pShooterLocOffsetY; return v3; }; v2.determineShooterShot = function (vLoc_obj) { var v2 = new Object(); var v5 = 0; var v7 = 0; var v12; var v11; var v14; var v13; var v6; var v3; var v9; var v10 = false; var v8 = vLoc_obj.qIsShooterLeft; v2.qIsOkToShoot = true; v12 = this.pTarget_mc._x - vLoc_obj.x; v11 = this.pTarget_mc._y - vLoc_obj.y; v6 = Math.atan(v12 / v11); v5 = this.pSpeedMissleBASE + this.pCurDifficulty * this.pSpeedMissleMAX; this.pMissileDepthCUR += 6; v7 = this.pMissileDepthCUR > this.pMissileDepthBASE + 6 * (this.pMissileMAXCT + 1) ? this.pMissileDepthBASE : this.pMissileDepthCUR; this.pMissileDepthCUR = v7; v14 = Math.sin(v6) * v5; v13 = Math.cos(v6) * v5; v3 = v6 * MainProgram.pDEGS_PER_RAD * -1; v9 = v11 / v12; v10 = Math.abs(v3) < 15 || v9 < 0 && v3 > 0 && v8 || v9 > 0 && v3 < 0 && !v8; if (v10) { v2.qIsOkToShoot = false; return v2; } v2.qIsOkToShoot = true; v2.x = vLoc_obj.x; v2.y = vLoc_obj.y; v2.dy = v13; v2.dx = v14; v2.degs = v3; v2.qMissleDepth = v7; return v2; }; v2.removeShooter = function (vShooter_mc) { var v3; var v2; var v4; vShooter_mc.DieShooter(); removeMovieClip(vShooter_mc); v4 = this.pShooters_ar.length; v2 = 0; while (v2 < v4) { v3 = this.pShooters_ar[v2]; if (v3 == vShooter_mc) { this.pShooters_ar.splice(v2, 1); break; } ++v2; } return undefined; }; v2.manageMissles = function () { var v3; var v6 = 0; var v2; var v4 = this.pMissles_ar.length; var v5 = new Array(); var v7; var v8 = true; v2 = 0; while (v2 < v4) { v3 = this.pMissles_ar[v2]; v6 = v3.MoveMissle(); switch (v6) { break; case 1: case 2: v8 = false; break; case 3: ++this.pMissleMissedCt; if (this.pMissleCtDisplay_txt) { this.pMissleCtDisplay_txt.text = String(this.pMissleMissedCt); } break; case 4: break; case 5: v3.DieMissle(); removeMovieClip(v3); v5.push(v2); break; default: } ++v2; } v3 = undefined; v4 = v5.length; v2 = v4 - 1; while (v2 >= 0) { v7 = v5[v2]; this.pMissles_ar.splice(v7, 1); --v2; } return v8; }; v2.createMissle = function (vShot_obj) { var v3; ++this.pUniqueIdx; v3 = _root.attachMovie('MissleMC', 'missle' + this.pUniqueIdx + '_mc', vShot_obj.qMissleDepth); if (v3) { v3.initMissle('MissleGraphicMC', this.pUniqueIdx, vShot_obj.dx, vShot_obj.dy, this.pTarget_mc, this.pTargetHitArea_mc, -1, this.pBackground_mc._width, -1, this.pBackground_mc._height - 10, vShot_obj.degs); v3._x = vShot_obj.x; v3._y = vShot_obj.y; v3._rotation = vShot_obj.degs; this.pMissles_ar.push(v3); return undefined; } trace('ERROR, missle not created onstage: ' + v3); return undefined; }; v2.destroyAllMissiles = function () { var v2; var v4 = this.pMissles_ar.length; var v3; v3 = 0; while (v3 < v4) { v2 = this.pMissles_ar[v3]; if (v2) { v2.DieMissle(); removeMovieClip(v2); } v2 = undefined; ++v3; } this.pMissles_ar = new Array(); return undefined; }; v2.PopupNotify = function (vWhich) { switch (vWhich) { case 'done': this.removePopup(true); break; default: } }; v2.managePopups = function () { var v3; var v5; var v4; var v6; if (this.pPopupCurPlaying.length) { return undefined; } ++this.pPopupGraceFrameCUR; if (this.pPopupGraceFrameCUR > this.pPopupGraceFrameMAX) { ++this.pPopupChanceFrameCUR; v3 = this.pPopupChanceFrameCUR / this.pPopupChanceFrameMAX; v3 = Math.floor(100 * Math.min(Math.max(0, v3), 1)); v5 = this.randRange(v3, 100) == 100; if (v5) { ++this.pPopupCurIdx; if (this.pPopupCurIdx < this.pPopupCharLibIds_ar.length) { ++this.pUniqueIdx; this.pPopupCurPlaying = this.pPopupCharLibIds_ar[this.pPopupCurIdx]; this.pPopupCur_mc = _root.attachMovie(this.pPopupCurPlaying, this.pPopupCurPlaying + this.pUniqueIdx, this.pPopupCharDepth); v6 = Math.random() * this.pPopupOffsetXMAX; v4 = this.getPopupCharLocOffsets(this.pPopupCurPlaying); this.pPopupCur_mc._x += v4.x + v6; this.pPopupCur_mc._y += v4.y; return undefined; } trace('ERROR, popup cur index more than length: ' + this.pPopupCurIdx); this.pPopupCurPlaying = '_ERROR_'; } } return undefined; }; v2.removePopup = function (vIsRun) { var v2 = 0; var v4 = (this.pTimeMAXD - this.pTimeCURR) / 25; var v3 = 0; if (this.pPopupCur_mc) { removeMovieClip(this.pPopupCur_mc); this.pPopupCur_mc = undefined; } this.pPopupCurPlaying = undefined; this.pPopupChanceFrameCUR = 0; this.pPopupGraceFrameCUR = 0; v2 = vIsRun ? this.pPopupCharLibIds_ar.length - this.pPopupCurIdx : 0; if (v2 > 0) { v3 = v4 - (v2 * this.pPopupChanceFrameMAX + v2 * 10 * 25); this.pPopupGraceFrameMAX = Math.floor(v3 / v2); return undefined; } this.pPopupCurPlaying = '_FINISHED_'; return undefined; }; v2.getPopupCharLocOffsets = function (vWhich) { var v1 = new Object(); switch (vWhich) { case 'Popup_Luke': v1.x = 33; v1.y = 133; return v1; case 'Popup_Obi': v1.x = 33; v1.y = 288; return v1; case 'Popup_Ar2': v1.x = 33; v1.y = 333; return v1; case 'Popup_C3po': v1.x = 33; v1.y = 333; return v1; case 'Popup_Lea': v1.x = 222; v1.y = 388; return v1; case 'Popup_Snake': v1.x = 166; v1.y = 388; return v1; case 'Popup_Darth': v1.x = 333; v1.y = 455; return v1; } trace('ERROR, unknown popup char to get offset from: ' + vWhich); v1.x = 0; v1.y = 0; return v1; }; v2.NotifyFromTarget = function (vNotify) { switch (vNotify) { case 'hit_finished': this.runGameplayEnd(this.pIsWonGame, 'show_end_display'); break; case 'win_finished': this.runGameplayEnd(this.pIsWonGame, 'show_end_display'); break; default: trace('ERROR, unknown target notification: ' + vNotify); } }; v2.runGameplayEnd = function (vIsWin, vEndType) { var v3; this.pIsWonGame = vIsWin; switch (vEndType) { case 'start_end': this.pIsAllowNavigate = false; this.destroyAllMissiles(); this.removePopup(false); this.pTarget_mc.startEndSequence(vIsWin); return undefined; case 'show_end_display': this.pIsAllowNavigate = false; if (vIsWin) { this.createWinAnimation(); } else { this.createEndLandingClip(vIsWin); } return undefined; } return undefined; }; v2.startStaf = function () { var v4; var v7; var v5 = false; var v6 = 'http://dlc.thinkdesktop.com/acts/staf/staf.asp'; var v3; var v2; if (this.pEndLandingScreenClip_mc) { if (this.pEndLandingScreenClip_mc.staf_mc) { this.pEndLandingScreenClip_mc.staf_mc.sendStrEr_mc.gotoAndPlay('noerror'); v4 = this.pEndLandingScreenClip_mc.staf_mc.stafemail_txt.text; v7 = this.pEndLandingScreenClip_mc.staf_mc.stafgameres_txt.text; v5 = this.checkValidEmail(v4); if (!v5) { this.pEndLandingScreenClip_mc.staf_mc.stafSendStrEr_mc.gotoAndPlay('error'); return undefined; } v3 = new LoadVars(); v3.parent = this; v3.onLoad = function (b) { this.parent.LoadedStafVars(b, this); }; v2 = new LoadVars(); v2.CM = '00000'; v2.FI = '0000'; v2.recipemail = v4; v2.greeting = v7; v2.subject = 'Family Guy Star Wars Game Score'; v2.sendAndLoad(v6, v3, 'POST'); this.pEndLandingScreenClip_mc.staf_mc.gotoAndPlay('staf_status'); this.fillStafStatusText('Sending email...'); } return undefined; } trace('ERROR, end landing page invalid at startStaf().'); return undefined; }; v2.LoadedStafVars = function (vIsOK, lv) { var v2 = vIsOK ? 'Email send successful!' : 'Email send failed.'; this.fillStafStatusText(v2); }; v2.fillStafStatusText = function (str) { var v2; if (this.pEndLandingScreenClip_mc) { v2 = this.pEndLandingScreenClip_mc.staf_mc.stafSendStatus_txt; if (v2) { v2.text = str; } } return undefined; }; v2.KeyNavigation = function (vWhich) { var v3 = false; var v2; if (this.pIsAllowNavigate) { switch (vWhich) { case 0: this.pTarget_mc.stopMoveTarget(); return undefined; case 1: if (this.pTarget_mc._x < this.pTargetLimitXMAX) { v3 = false; v2 = this.pSpeedTargetBASE + this.pCurDifficulty * this.pSpeedTargetMAX; this.pTarget_mc.moveTargetLeftRight(v3, v2); } return undefined; case 2: if (this.pTarget_mc._x > this.pTargetLimitXMIN) { v3 = true; v2 = this.pSpeedTargetBASE + this.pCurDifficulty * this.pSpeedTargetMAX; this.pTarget_mc.moveTargetLeftRight(v3, v2); } return undefined; } trace('ERROR, main prog unknown key nav: ' + vWhich); return undefined; } return undefined; }; v2.KeyCheats = function (c) { if (this.pIsAllowCheats) { switch (c) { case 82: this.resetGame(); break; case 189: this.pTimeORIG -= 20000; } } }; v2.keyInputSetup = function () { var v2 = new Object(); v2.parent = this; v2.onKeyDown = function () { var v1 = Key.getCode(); }; v2.onKeyUp = function () { var v2 = Key.getCode(); switch (v2) { case 37: case 39: case 38: case 40: this.parent.KeyNavigation(0); break; case 189: this.parent.KeyCheats(v2); break; case 82: this.parent.KeyCheats(v2); break; default: } }; Key.addListener(v2); return undefined; }; v2.keyInputEnterframe = function () { if (Key.isDown(37)) { this.KeyNavigation(2); return undefined; } if (Key.isDown(39)) { this.KeyNavigation(1); } return undefined; }; v2.randRange = function (min, max) { var v1 = Math.floor(Math.random() * (max - min + 1)) + min; return v1; }; v2.getTimeString = function (vWhich, num) { var v2; switch (vWhich) { case 0: v2 = String(Math.floor(num / 1000 / 60 / 60)); return v2; case 1: v2 = String(Math.floor(num / 1000 / 60)); return v2; case 2: num = Math.floor(num / 1000 % 60); v2 = num < 10 ? String('0' + num) : num; return v2; } trace('ERROR, unknoen time str to get: ' + vWhich); return v2; }; v2.checkValidEmail = function (vEmail_str) { var v2 = vEmail_str.indexOf('@'); var v1 = vEmail_str.lastIndexOf('.'); if (vEmail_str.length > 4) { if (v2 > 0 && v1 > 0) { if (v2 < v1) { return true; } } } return false; }; v1.pDEGS_PER_RAD = 57.29577951308232; v2.pIsProgramInited = false; v2.pUniqueIdx = 0; v2.pSplashScreen_mc = undefined; v2.pSplashScreen_LibID = 'SplashScreenMC'; v2.pScrollInstructions_mc = undefined; v2.pScrollInstructions_LibID = 'InstructionsMC'; v2.pWinAnimation_mc = undefined; v2.pWinAnimation_LibID = 'WinAnimationMC'; v2.pMilFalconAnimation_mc = undefined; v2.pMilFalconAnimation_LibID = 'MilFalconMC'; v2.pBackground_mc = undefined; v2.pBackground_LibID = 'BackgroundMC'; v2.pBackground_StageName = 'background_mc'; v2.pTarget_mc = undefined; v2.pTargetHitArea_mc = undefined; v2.pTarget_LibID = 'TargetMC'; v2.pTarget_StageName = 'target_mc'; v2.pTimeDisplay_txt = undefined; v2.pTimeDisplay_StageName = 'TimeDisplay_mc'; v2.pEndLandingScreenClip_mc = undefined; v2.pEndLandingScreenClip_LibID = 'EndingHangarMC'; v2.pMissleCtDisplay_txt = undefined; v2.pMissleCtDisplay_StageName = 'MissleCountDisplay_mc'; v2.pEndGameDisplay_mc = undefined; v2.pIsWonGame = false; v2.pShooters_ar = new Array(); v2.pMissileMAXCT = 10; v2.pMissileMINCT = 2; v2.pMissileCurMaxCt = MainProgram.prototype.pMissileMINCT; v2.pCtSinceLastShooter = 0; v2.pListOfBalconyLocs_ar = new Array(); v2.pBalconies_ar = new Array(); v2.pShooterLocOffsetX = 24; v2.pShooterLocOffsetY = -94; v2.pMissles_ar = new Array(); v2.pMissleMissedCt = 0; v2.pCurDifficulty = 0; v2.pDifficultyUserLevel = 0; v2.pTimeCURR = 0; v2.pTimeMAXD = 90000; v2.pSpeedMissleBASE = 10; v2.pSpeedMissleMAX = 17; v2.pSpeedTargetBASE = 12; v2.pSpeedTargetMAX = 16; v2.pTargetLimitXMIN = 0; v2.pTargetLimitXMAX = 0; v2.pPopupCur_mc = undefined; v2.pPopupCharLibIds_ar = new Array('Popup_Luke', 'Popup_Obi', 'Popup_Ar2', 'Popup_C3po', 'Popup_Lea', 'Popup_Snake', 'Popup_Darth'); v2.pPopupCurPlaying = undefined; v2.pPopupCurIdx = -1; v2.pPopupChanceFrameCUR = 0; v2.pPopupChanceFrameMAX = 250; v2.pPopupGraceFrameCUR = 0; v2.pPopupGraceFrameMAX = 100; v2.pPopupOffsetXMAX = 333; v2.pMissileDepthBASE = 800; v2.pMissileDepthCUR = MainProgram.prototype.pMissileDepthBASE; v2.pBalconyDepth = 400; v2.pShooterDepths_ar = new Array(); v2.pShooterDepthBASE = MainProgram.prototype.pBalconyDepth + 150; v2.pShooterCurDepthIdx = 0; v2.pPopupCharDepth = MainProgram.prototype.pMissileDepthBASE + 300; v2.pIsInstRunAlready = false; v2.pIsAllowNavigate = false; v2.pIsGameRunning = false; v2.pIsAllowCheats = false; v2.p_Test_IsNoDie = false; ASSetPropFlags(_global.MainProgram.prototype, null, 1); } #endinitclip } frame 14 { var pMainProgram_mc; if (!pMainProgram_mc) { pMainProgram_mc = _root.attachMovie('MainProgramMC', 'Main_mc', _root.getNextHighestDepth()); } pMainProgram_mc.initProgram(); _root.stop(); }




http://swfchan.com/20/98504/info.shtml
Created: 22/3 -2019 12:21:57 Last modified: 22/3 -2019 12:21:57 Server time: 22/12 -2024 12:52:43