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

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

Dark Cut 3.swf

This is the info page for
Flash #47753

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


ActionScript [AS1/AS2]
Combined Code
movieClip 5 { } movieClip 8 { } movieClip 10 { frame 1 { this._alpha = 0; } } movieClip 11 syringe { frame 1 { stop(); } frame 60 { stop(); } } movieClip 16 { } movieClip 17 { } movieClip 18 { frame 16 { stop(); } } movieClip 19 pointAreaSyringe { } movieClip 23 { } movieClip 24 hookAnimation { frame 25 { this.removeMovieClip(); } } frame 1 { function gotoSecret() { gotoAndStop('secretFrame'); } function muteHandler() { if (muted) { globalSound.setVolume(0); } else { globalSound.setVolume(100); } } function triggerWin() { addendum = _root['surgery' + curRoll][4]; newAch(curRoll); if (health <= 5) { newAch2(1); } } function win() { cStatus = 0; attachMovie('winnerWinner', 'winnerWinner', k++); } function death() { curSurgery.blackAndwhite(false); cStatus = 0; stopAllSounds(); attachMovie('deathly', 'deathly', k++); } function saveGame() { savefile.data.aSurg0 = aSurg0; savefile.data.aSurg1 = aSurg1; savefile.data.aSurg2 = aSurg2; savefile.data.aSurg3 = aSurg3; savefile.data.aSurg4 = aSurg4; savefile.data.aTreat0 = aTreat0; savefile.data.aTreat1 = aTreat1; savefile.data.aTreat2 = aTreat2; savefile.data.aAch0 = aAch0; savefile.data.aAch1 = aAch1; savefile.data.aAch2 = aAch2; savefile.data.aAch3 = aAch3; savefile.data.aAch4 = aAch4; savefile.data.saved = saved; savefile.flush(); trace('Game Saved'); } function newAch(num) { if (num < 5) { _root.kongregateStats.submit(String('Surgery' + (num + 1)), 1); if (!_root['aSurg' + num]) { _root['aSurg' + num] = true; trace('Surgery ' + num + ' GOOD'); sheller = _root.attachMovie('achievementBox', 'ach' + _root.k, _root.k++); sheller.task = 'Surgery ' + (num + 1); sheller.mover.gotoAndStop(1); } else { trace('Surgery ' + num + ' Already done.'); } } else { if (num < 8) { if (!_root['aTreat' + (num - 5)]) { _root['aTreat' + (num - 5)] = true; trace('Treament ' + (num - 5) + ' GOOD'); sheller = _root.attachMovie('achievementBox', 'ach' + _root.k, _root.k++); sheller.task = 'Treatment ' + (num - 4); sheller.mover.gotoAndStop(2); } else { trace('Treatment ' + (num - 5) + ' Already done.'); } } } saveGame(); } function newAch2(num) { if (!_root['aAch' + num]) { _root['aAch' + num] = true; trace('Achievement ' + num + ' GOOD'); sheller = _root.attachMovie('achievementBox', 'ach' + _root.k, _root.k++); switch (num) { case 0: sheller.task = 'Hypersleep'; _root.kongregateStats.submit('HyperSleep', 1); break; case 1: sheller.task = 'Near-Death'; _root.kongregateStats.submit('NearDeath', 1); break; case 2: sheller.task = 'Rewind'; _root.kongregateStats.submit('Rewind', 1); break; case 3: sheller.task = 'Credited'; _root.kongregateStats.submit('Credited', 1); break; case 4: sheller.task = 'Easter_Egg'; _root.kongregateStats.submit('EasterEgg', 1); } sheller.mover.gotoAndStop(3); } else { trace('Achievement ' + num + ' Already done.'); } saveGame(); } function gotoSaveArea() { gotoAndStop('blurFrame'); } function gotoDeath() { gotoAndStop('deathFrame'); } function gotoGeneTree() { gotoAndStop('geneTree'); } function gotoMain() { gotoAndStop('menuFrame'); } function gotoMenu() { gotoAndStop('menuFrame'); } function gotoEnding() { gotoAndStop('winGame'); } function gotoWin() { gotoAndStop('winFrame'); } function gotoSurgery(num) { switch (num) { case 0: gotoAndStop('s1Frame'); break; case 1: gotoAndStop('s4Frame'); break; case 2: gotoAndStop('s3Frame'); break; case 3: gotoAndStop('s2Frame'); break; case 4: gotoAndStop('s5Frame'); break; case 5: gotoAndStop('s6Frame'); break; case 6: gotoAndStop('s7Frame'); break; case 7: gotoAndStop('s8Frame'); } } function surgInfo() { curSurgery.bar.nam.text = this['surgery' + _root.curRoll][2]; curSurgery.bar.loc.text = this['surgery' + _root.curRoll][1]; if (!plugged) { curSurgery.bar.heal.text = loadParts[upH]; curSurgery.bar.sedate.text = loadParts[upS]; ++upHC; ++upSC; ++upHRC; if (upHC == upC) { upHC = 0; ++upH; } if (upSC == upC) { upSC = 0; ++upS; } if (upHRC == upC) { upHRC = 0; ++upHR; } if (upH == 4) { upH = 0; } if (upS == 4) { upS = 0; } if (upHR == 4) { upHR = 0; } curSurgery.bar.area0.staticLoop._visible = true; curSurgery.bar.area1.staticLoop._visible = true; curSurgery.bar.area2.staticLoop._visible = true; } else { curSurgery.bar.heal.text = health; curSurgery.bar.sedate.text = sedation; curSurgery.bar.area0.staticLoop._visible = false; curSurgery.bar.area1.staticLoop._visible = false; curSurgery.bar.area2.staticLoop._visible = false; } } function threadPoint() { tMili += 4; if (tMili >= 100) { tMili = 0; ++tSec; } if (tSec == 60) { tSec = 0; ++tMin; } if (tMin == 60) { tMin = 0; ++tHour; } if (tMonth < 10) { curMonth = '0' + tMonth; } else { curMonth = String(tMonth); } if (tDay < 10) { curMinute = '0' + tDay; } else { curMinute = String(tDay); } if (tYear < 10) { curYear = '000' + tYear; } else { if (tYear < 100) { curYear = '00' + tYear; } else { if (tYear < 10) { curYear = '0' + tYear; } else { curYear = String(tYear); } } } if (tHour < 10) { curHour = '0' + tHour; } else { curHour = String(tHour); } if (tMin < 10) { curMin = '0' + tMin; } else { curMin = String(tMin); } if (tSec < 10) { curSec = '0' + tSec; } else { curSec = String(tSec); } if (tMili < 10) { curMili = '0' + tMili; } else { curMili = String(tMili); } curSurgery.bar.thread.text = curMonth + '.' + curDay + '.' + curYear + '\n' + curHour + '.' + curMin + '.' + curSec + '.' + curMili; } function monitors() { i = 0; while (i < 120) { --chart0[i][0]; --chart1[i][0]; --chart2[i][0]; if (chart0[i][0] <= 0) { chart0.splice(i, 1); } if (chart1[i][0] <= 0) { chart1.splice(i, 1); } if (chart2[i][0] <= 0) { chart2.splice(i, 1); } ++i; } chart0.push([120, 30 - Math.floor((health / 100) * 30)]); ++sedX; tempNum = 100 - (Math.floor(sedation / 10) + 90); sedY = 15 * Math.sin(sedX * 0.2) + random(tempNum) - tempNum / 2; chart1.push([120, 15 + sedY]); if (hPoint == heartBeat.length) { hPoint = 0; } if (cStatus == 1) { chart2.push([120, heartBeat[hPoint] + random(hrFlux) - hrFlux / 2]); } else { chart2.push([120, 15]); } ++hPoint; healthData.fillRect(new flash.geom.Rectangle(0, 0, 120, 30), 4278190080.0); sedationData.fillRect(new flash.geom.Rectangle(0, 0, 120, 30), 4278190080.0); heartData.fillRect(new flash.geom.Rectangle(0, 0, 120, 30), 4278190080.0); i = 0; while (i < chart0.length) { healthData.setPixel32(Number(chart0[i][0]), Number(chart0[i][1]), 4278255360.0); sedationData.setPixel32(Number(chart1[i][0]), Number(chart1[i][1]), 4278255360.0); heartData.setPixel32(Number(chart2[i][0]), Number(chart2[i][1]), 4278255360.0); ++i; } } function sedationDecrease() { if (sedation >= 100) { newAch2(0); } ++sedationCounter; if (sedationCounter > 20) { sedationCounter = 0; --sedation; } if (sedation < 0) { sedation = 0; } _root.hrFlux = Math.round(sedation / 10 - 1); _root.hrFluxDisp = Math.floor(100 + hrFlux * (random(5) - 2.5)); } function healthDecrease() { ++healthCounter; if (healthCounter >= (2 + sedation) * 4) { ++healthCounter; healthCounter = 0; --health; if (health <= 0) { cStatus = 0; death(); } } } function triggerSedation() { if (curStep < 1000) { holdStep = curStep; curStep = 1000; trace('Current Step is now [' + curStep + ']'); shel = curSurgery.activeArea.attachMovie('sedateScreen', 'sedateScreen', k++); shel = curSurgery.activeArea.sedateScreen.attachMovie('pointAreaSyringe', 'point', k++); shel = curSurgery.activeArea.sedateScreen.attachMovie('syringe', 'syringe', k++); } } function posNeg() { t = random(2); if (t == 0) { return -1; } else { return 1; } } function nextStep() { ++curStep; trace('Current Step is now [' + curStep + ']'); } function instruct(str) { curSurgery.bar.instructions.text = str; if (currentInstructions != str) { currentInstructions = str; curSurgery.bar.wipe.gotoAndPlay(1); } } _root.kongregateServices.connect(); var surgery0 = new Array(); var surgery1 = new Array(); var surgery2 = new Array(); var surgery3 = new Array(); var surgery4 = new Array(); var surgery5 = new Array(); var surgery6 = new Array(); var surgery7 = new Array(); var myMenu = new ContextMenu(); myMenu.hideBuiltInItems(); _root.menu = myMenu; urlStart = _url.indexOf('://') + 3; urlEnd = _url.indexOf('/', urlStart); domain = _url.substring(urlStart, urlEnd); LastDot = domain.lastIndexOf('.') - 1; pfixEnd = domain.lastIndexOf('.', LastDot) + 1; domain = domain.substring(pfixEnd, domain.length); if (domain == 'armorgames.com' || domain == 'armorgamehosting.com') { _root.locationArea = 'This copy is being played at ' + domain; bonusMode = true; } else { _root.locationArea = 'This copy is being played at ' + domain + '\nExtra treatments are available at armorgames.com!'; bonusMode = false; } var muted = false; var globalSound = new Sound(this); globalSound.setVolume(100); surgery0.push(1917); surgery0.push('Reims, France'); surgery0.push('John.Martin'); surgery0.push('Soldier lost a finger and is bleeding profusely.'); surgery0.push('John Martin went on to survive the first World War. He was awarded the Purple Heart and was granted a period to revisit his two daughters and wife.'); surgery1.push(1417); surgery1.push('Montpelier, France'); surgery1.push('Linda.Rausfeld'); surgery1.push('Nurse has lost leg to grenade.'); surgery1.push('Linda Rausfeld managed to survive the trench experience. Although experiencing many post-traumatic syndroms and permanent leg injuries she has managed to recover enough to enjoy the best life has to offer.'); surgery2.push(1777); surgery2.push('Virginia, US'); surgery2.push('Joseph.Francis'); surgery2.push('Soldier writes his final words.'); surgery2.push('Joseph Francis indeed saw his wife again and retold his story of a mysterious healer arriving in the darkest moments. His battle wounds sent him home but the war for Independence was won, as was the life he was meant to lead.'); surgery3.push(1942); surgery3.push('Portside, England'); surgery3.push('Mark.Tory'); surgery3.push('Soldier on a submarine has sustained shoulder damage.'); surgery3.push('Mark Tory managed to escape the submarine, and not a moment too soon. Moments after being impaled he managed to get up and escape the sinking sub, meanwhile clutching a once-punctured shoulder.'); surgery4.push(2008); surgery4.push('Nebraska, US'); surgery4.push('Outlink.Self.c'); surgery4.push('Click to logout.'); surgery4.push('You should not be seeing this.'); surgery5.push(1750); surgery5.push('Dublin, Ireland'); surgery5.push('Guy.Meadows'); surgery5.push('Extreme pustules need relieving.'); surgery5.push('Guy Meadows managed to recover after his large pustule outbreak.'); surgery6.push(1697); surgery6.push('Virginia, US'); surgery6.push('Sarah.Thompson'); surgery6.push('Leg bone broke skin from fall.'); surgery6.push('The leg bone injury was fixed successfully.'); surgery7.push(1965); surgery7.push('Florida, US'); surgery7.push('Buzz.McDonaldson'); surgery7.push('Crash survivor unable to move, needs help removing ticks.'); surgery7.push('While unable to help himself, the removal of ticks let him hold on to precious life and survive the wait for rescuers.'); var aSurg0 = false; var aSurg1 = false; var aSurg2 = false; var aSurg3 = false; var aSurg4 = false; var aTreat0 = false; var aTreat1 = false; var aTreat2 = false; var aAch0 = false; var aAch1 = false; var aAch2 = false; var aAch3 = false; var aAch4 = false; var saved = false; var savefile = SharedObject.getLocal('darkcut3'); MovieClip.prototype.blackAndWhite = function (clear) { myFilters = this.filters; if (!clear) { BWMatrix = [0.3086, 0.6094000000000001, 0.082, 0, 0, 0.3086, 0.6094000000000001, 0.082, 0, 0, 0.3086, 0.6094000000000001, 0.082, 0, 0, 0, 0, 0, 1, 0]; if (this.BWFilterSpot != undefined) { } else { this.BWFilterSpot = myFilters.length; } null; myFilters[this.BWFilterSpot] = new flash.filters.ColorMatrixFilter(BWMatrix); } else { myFilters[this.BWFilterSpot] = undefined; } this.filters = myFilters; }; healthCounter = 0; var currentInstructions = 'FWE'; } frame 1 { stop(); } movieClip 29 { } // unknown tag 88 length 75 // unknown tag 88 length 69 movieClip 36 { } movieClip 39 { } movieClip 40 { } movieClip 43 { frame 1 { function generateMessage() { ++textPosition; _root.myTip = curMessage.slice(0, textPosition) + randomChar[textPosition % 2]; if (textPosition > curMessage.length) { ++counter; if (counter == 100) { textPosition = 0; curMessage = chooseTip(); counter = 0; } } } function chooseTip() { ++curChoice; switch (curChoice) { case 1: return 'This game is roughly 13 MB. Sit tight!'; break; case 0: return 'Sedate your patient with the syringe button, found in the top right corner.'; break; case 2: return 'Use the mouse for all tasks. Trackpads beware!'; break; case 3: return 'Work through four surgeries and three treatments.'; break; case 4: return 'The mainframe is loading, please stand by.'; break; case 5: return 'Sedate your patient with the syringe button, found in the top right corner.'; break; case 6: return 'The Dark Cut series is two years old now and has evolved slowly over time.'; break; case 7: return 'Every tool except for the syringe is handed to you automatically. No need to fuss!'; break; case 8: return 'Most of the artwork was created in Photoshop and then ported over to Flash.'; break; case 9: return 'Practically every frame of animation has to be rendered as a single png file.'; break; case 10: return 'The quality can be adjusted on the home screen.'; case 11: return 'MaestroRage graciously provided the awesome soundtrack, give him some kudos!'; case 12: curChoice = 0; return 'Having problems? Check in with armorgames.com to see if there are updates.'; break; default: curChoice = 0; return 'Welcome to Dark Cut 3.'; } } var randomChar = new Array('_', ' '); var textPosition = 0; counter = 0; stop(); _root.myTip = ' '; onEnterFrame = function () { generateMessage(); }; curMessage = chooseTip(); var curChoice; } } movieClip 45 { } movieClip 46 { } movieClip 49 { } button 51 { on (release) { getURL('http://www.armorgames.com/', '_blank'); } } movieClip 53 { frame 1 { onEnterFrame = function () { loaded = _root.getBytesLoaded(); total = _root.getBytesTotal(); framesLoaded = Math.ceil((loaded / total) * 100); preloader.preloadText = ''; i = 0; while (i < framesLoaded) { preloader.preloadText += '>'; ++i; } preloader.preloadText += '|'; status.text = framesLoaded + ' % completed'; if (framesLoaded >= 100) { _root.preload.play(); } }; } } movieClip 54 { frame 1 { stop(); } frame 100 { _root.nextFrame(); } } movieClip 57 { } frame 2 { stop(); } movieClip 63 { } button 65 { on (release) { _root.intro.needle.play(); _parent.play(); } } movieClip 67 { } movieClip 68 { frame 45 { stop(); } frame 56 { stop(); } } movieClip 69 { } movieClip 70 { frame 71 { stop(); } } movieClip 76 { frame 60 { stop(); } } movieClip 77 { } movieClip 78 { frame 1 { stop(); } frame 63 { _root.nextFrame(); stop(); } } movieClip 79 { } movieClip 86 { frame 1 { stop(); } } movieClip 89 { } movieClip 90 achievementBox { frame 101 { this.removeMovieClip(); } } movieClip 92 { } movieClip 93 deathly { frame 60 { _root.gotoDeath(); this.removeMovieClip(); } } movieClip 95 { } movieClip 134 { frame 1 { stop(); } frame 56 { stop(); } } movieClip 135 sedateScreen { frame 5 { stop(); } frame 10 { stop(); } } movieClip 138 smokeRising { } movieClip 142 { } movieClip 143 winnerWinner { frame 90 { if (_root.curRoll == 4) { _root.gotoEnding(); this.removeMovieClip(); } else { _root.gotoWin(); this.removeMovieClip(); } } } movieClip 146 { frame 1 { stop(); } } movieClip 150 { } button 153 { on (press) { getURL('http://www.armorgames.com', '_blank'); } } movieClip 155 { frame 217 { _parent.nextFrame(); } } movieClip 158 { } movieClip 165 { } movieClip 168 { } movieClip 171 { } movieClip 176 { } movieClip 179 { } movieClip 181 { } movieClip 183 { } // unknown tag 88 length 98 movieClip 186 { } movieClip 187 { frame 76 { _parent.nextFrame(); } } // unknown tag 88 length 88 // unknown tag 88 length 135 movieClip 194 { } movieClip 195 { } movieClip 196 { frame 120 { _parent.nextFrame(); } } movieClip 198 { } movieClip 199 { } movieClip 200 { frame 120 { stopAllSounds(); _root.nextFrame(); } } movieClip 201 { frame 1 { stop(); } frame 3 { stop(); } } movieClip 203 { } button 209 { on (release) { _root.nextFrame(); } } movieClip 210 { frame 11 { function generateMessage() { ++textPosition; _root.myText = curMessage.slice(0, textPosition) + randomChar[textPosition % 2]; if (textPosition < curMessage.length) { textDraw.start(0, 1); } } function newMessage(newMess) { textPosition = 0; curMessage = newMess; } var randomChar = new Array('_', ' '); var textPosition = 0; counter = 0; newMessage('Welcome to the central computer.'); stop(); onEnterFrame = function () { generateMessage(); ++counter; if (counter == 100) { newMessage('You have been uplinked to provide real-time surgeries to real people.'); } if (counter == 250) { newMessage('Our current mission is to restore your gene line.'); } if (counter == 400) { newMessage('Many of your relatives were killed in combat.'); } if (counter == 550) { newMessage('Your interface will guide you and help bring them back.'); } if (counter == 700) { newMessage('Good luck human.'); } if (counter == 850) { _root.nextFrame(); this.onEnterFrame = null; } }; var textDraw = new Sound(this); textDraw.attachSound('ticker'); } } frame 5 { if (savefile.data.saved == false) { trace('New Game Loaded'); saved = true; saveGame(); nextFrame(); } else { aSurg0 = savefile.data.aSurg0; aSurg1 = savefile.data.aSurg1; aSurg2 = savefile.data.aSurg2; aSurg3 = savefile.data.aSurg3; aSurg4 = savefile.data.aSurg4; aTreat0 = savefile.data.aTreat0; aTreat1 = savefile.data.aTreat1; aTreat2 = savefile.data.aTreat2; aAch0 = savefile.data.aAch0; aAch1 = savefile.data.aAch1; aAch2 = savefile.data.aAch2; aAch3 = savefile.data.aAch3; aAch4 = savefile.data.aAch4; saved = savefile.data.saved; trace('Saved Game Loaded'); trace(aTreat0); nextFrame(); } } movieClip 214 { } movieClip 219 { } // unknown tag 88 length 75 movieClip 229 { } movieClip 233 { } movieClip 235 { } button 243 { on (release) { getURL('http://armorgames.com/play/353/dark-cut-2', '_blank'); } } button 247 { on (release) { getURL('http://armorgames.com/play/353/dark-cut-2', '_blank'); } } movieClip 248 { } button 251 { on (release) { getURL('http://armorgames.com/play/40/dark-cut', '_blank'); } } button 255 { on (release) { getURL('http://armorgames.com/', '_blank'); } } button 259 { on (release) { _root.aSurg0 = false; _root.aSurg1 = false; _root.aSurg2 = false; _root.aSurg3 = false; _root.aSurg4 = false; _root.aTreat0 = false; _root.aTreat1 = false; _root.aTreat2 = false; _root.aAch0 = false; _root.aAch1 = false; _root.aAch2 = false; _root.aAch3 = false; _root.aAch4 = false; _root.saved = false; _root.saveGame(); _root.gotoSaveArea(); } } button 263 { on (release) { _root.gotoGeneTree(); } } movieClip 279 { frame 1 { stop(); } } movieClip 281 { } button 282 { on (press) { if (_quality == 'HIGH') { _quality = 'MEDIUM'; } else { if (_quality == 'MEDIUM') { _quality = 'LOW'; } else { if (_quality == 'LOW') { _quality = 'HIGH'; } } } } } movieClip 284 { } button 285 { on (release) { _root.muted = !_root.muted; _root.muteHandler(); } } movieClip 287 { } movieClip 294 { frame 1 { function getDataFlow() { return dataMessages[random(dataMessages.length)]; } function rotPoint(xPoint1, yPoint1, xPoint2, yPoint2) { degrees = Math.atan(Math.abs(yPoint1 - yPoint2) / Math.abs(xPoint1 - xPoint2)) * 57.29577951308232; if (xPoint1 < xPoint2) { if (yPoint1 < yPoint2) { return +degrees; } else { if (yPoint1 > yPoint2) { return -degrees; } } } else { if (xPoint1 > xPoint2) { if (yPoint1 < yPoint2) { return 180 - degrees; } else { if (yPoint1 > yPoint2) { return 180 + degrees; } } } } } function rotMC(mc1, mc2) { rotPoint(mc1._x, mc1._y, mc2._x, mc2._y); } function distPoint(x1, y1, x2, y2) { return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)); } function distMC(mc1, mc2) { distPoint(mc1._x, mc1._y, mc2._x, mc2._y); } function ease(str, mov, num, drift) { switch (str) { case 'x': mov._x -= drift * ((mov._x - num) / 2); break; case 'y': mov._y -= drift * ((mov._y - num) / 2); break; case 'xscale': mov._xscale -= drift * ((mov._xscale - num) / 2); break; case 'yscale': mov._yscale -= drift * ((mov._yscale - num) / 2); break; case 'width': mov._width -= drift * ((mov._width - num) / 2); break; case 'height': mov._height -= drift * ((mov._height - num) / 2); break; case 'alpha': mov._alpha -= drift * ((mov._alpha - num) / 2); break; case 'rotation': mov._rotation -= drift * ((mov._rotation - num) / 2); } } function elasticRotation(mc, targt, accel, friction) { if (mc.qrScale == undefined) { mc.qrScale = 0; } mc.qrScale += (targt - mc._rotation) * accel; mc.qrScale *= friction; mc._rotation += mc.qrScale; } function elasticScale(mc, targt, accel, friction) { if (mc.qxScale == undefined) { mc.qxScale = 0; } mc.qxScale += (targt - mc._xscale) * accel; mc.qxScale *= friction; mc._yscale += mc.qxScale; mc._xscale = mc._yscale; } function elasticX(mc, targt, accel, friction) { if (mc.qxSpeed == undefined) { mc.qxSpeed = 0; } mc.qxSpeed += (targt - mc._x) * accel; mc.qxSpeed *= friction; mc._x += mc.qxSpeed; } function elasticY(mc, targt, accel, friction) { if (mc.qySpeed == undefined) { mc.qySpeed = 0; } mc.qySpeed += (targt - mc._y) * accel; mc.qySpeed *= friction; mc._y += mc.qySpeed; } function elasticH(mc, targt, accel, friction) { if (mc.qhSpeed == undefined) { mc.qhSpeed = 0; } mc.qhSpeed += (targt - mc._height) * accel; mc.qhSpeed *= friction; mc._height += mc.qhSpeed; } function elasticW(mc, targt, accel, friction) { if (mc.qwSpeed == undefined) { mc.qwSpeed = 0; } mc.qwSpeed += (targt - mc._width) * accel; mc.qwSpeed *= friction; mc._width += mc.qwSpeed; } stop(); Mouse.hide(); onEnterFrame = function () { dataFlow3.text = dataFlow2.text; dataFlow2.text = dataFlow.text; dataFlow.text = getDataFlow(); tempShort = this['surgery' + currentPoint][0]; ins = ((tempShort - 1000) / 1000) * 4000 - 350; if (_ymouse > 50 && _ymouse < 360) { marker._x = _xmouse; marker._y = _ymouse; Mouse.hide(); } else { if (_ymouse <= 50) { marker._y = 50; } if (_ymouse >= 360) { marker._y = 360; } Mouse.show(); } }; if (_root.bonusMode) { extraStuff._visible = false; } var dataMessages = new Array(); dataMessages.push('Getting data array...'); dataMessages.push('Parsing data...'); dataMessages.push('149401-11 Loading...'); dataMessages.push('683445-11 Loading...'); dataMessages.push('232931-11 Loading...'); dataMessages.push('009983-11 Loading...'); dataMessages.push('Loading additional content...'); dataMessages.push('Resquencing data...'); dataMessages.push('Marking insufficient data streams...'); dataMessages.push('Allocating resources...'); dataMessages.push('Looking for data trees...'); dataMessages.push('Reestablishing MONOlith archive...'); dataMessages.push(' '); dataFlow.text = getDataFlow(); dataFlow2.text = getDataFlow(); dataFlow3.text = getDataFlow(); i = 0; while (i < 5) { if (_root['aSurg' + i]) { this['s' + i].gotoAndStop(2); } if (_root['aTreat' + i]) { this['t' + i].gotoAndStop(2); } if (_root['aAch' + i]) { this['a' + i].gotoAndStop(2); } ++i; } } } movieClip 298 { frame 16 { this._visible = false; stop(); } } button 300 { on (release) { stopAllSounds(); _root.gotoSecret(); } } frame 7 { stop(); } movieClip 308 { } movieClip 309 { } movieClip 312 { frame 1 { stop(); } } movieClip 315 { frame 1 { stop(); } } movieClip 318 { } movieClip 320 { } movieClip 322 { } button 323 { on (release) { _root.gotoMain(); } } movieClip 324 { } movieClip 341 { } // unknown tag 88 length 74 movieClip 356 { } movieClip 364 { frame 1 { stop(); } } // unknown tag 88 length 74 // unknown tag 88 length 75 movieClip 374 { frame 1 { stop(); } } movieClip 377 { } movieClip 379 { } movieClip 380 { } movieClip 381 { } movieClip 384 { } movieClip 385 { } movieClip 396 { } movieClip 398 { frame 11 { stop(); } } movieClip 399 { } movieClip 400 { frame 1 { onEnterFrame = function () { nameSpace.text = _root['surgery' + _root.curRoll][2]; if (_root.curRoll > 4 && !_root.bonusMode) { textSpace.text = 'This treatment is available only on armorgames.com. You can still play the regular surgeries here.'; } else { textSpace.text = _root['surgery' + _root.curRoll][3]; } if (_root.curRoll < 5) { if (_root['aSurg' + _root.curRoll]) { completedThing.gotoAndStop(2); } else { completedThing.gotoAndStop(1); } } else { if (_root['aTreat' + (_root.curRoll - 5)]) { completedThing.gotoAndStop(2); } else { completedThing.gotoAndStop(1); } } idPicture.gotoAndStop(_root.curRoll + 1); }; } } movieClip 401 { } movieClip 403 { } movieClip 404 { frame 1 { stop(); } frame 30 { stopAllSounds(); } frame 31 { _root.gotoSurgery(_root.curRoll); } } movieClip 405 { frame 1 { function checkMouse() { i = 0; while (i < 10) { curArr = this['surgery' + i]; if (linage['point' + i].hitTest(marker._x, marker._y)) { if (i == 4 && linage.point4._visible || i != 4) { _root.curRoll = i; _root.curRollDisp = _root.curRoll + 1; if (currentPoint != i) { currentPoint = i; info._visible = true; info.map1.map2.ping._x = info.map1.map2['point' + i]._x; info.map1.map2.ping._y = info.map1.map2['point' + i]._y; info.map1.dataLoad.gotoAndPlay(1); break; } } } ++i; } if (!linage['point' + currentPoint].hitTest(marker._x, marker._y)) { info._visible = false; currentPoint = 40000; } } function easeMap() { ease('x', info.map1.map2, -info.map1.map2['point' + currentPoint]._x + 200, 0.7); ease('y', info.map1.map2, -info.map1.map2['point' + currentPoint]._y + 150, 0.7); } function getDataFlow() { return dataMessages[random(dataMessages.length)]; } function rotPoint(xPoint1, yPoint1, xPoint2, yPoint2) { degrees = Math.atan(Math.abs(yPoint1 - yPoint2) / Math.abs(xPoint1 - xPoint2)) * 57.29577951308232; if (xPoint1 < xPoint2) { if (yPoint1 < yPoint2) { return +degrees; } else { if (yPoint1 > yPoint2) { return -degrees; } } } else { if (xPoint1 > xPoint2) { if (yPoint1 < yPoint2) { return 180 - degrees; } else { if (yPoint1 > yPoint2) { return 180 + degrees; } } } } } function rotMC(mc1, mc2) { rotPoint(mc1._x, mc1._y, mc2._x, mc2._y); } function distPoint(x1, y1, x2, y2) { return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)); } function distMC(mc1, mc2) { distPoint(mc1._x, mc1._y, mc2._x, mc2._y); } function ease(str, mov, num, drift) { switch (str) { case 'x': mov._x -= drift * ((mov._x - num) / 2); break; case 'y': mov._y -= drift * ((mov._y - num) / 2); break; case 'xscale': mov._xscale -= drift * ((mov._xscale - num) / 2); break; case 'yscale': mov._yscale -= drift * ((mov._yscale - num) / 2); break; case 'width': mov._width -= drift * ((mov._width - num) / 2); break; case 'height': mov._height -= drift * ((mov._height - num) / 2); break; case 'alpha': mov._alpha -= drift * ((mov._alpha - num) / 2); break; case 'rotation': mov._rotation -= drift * ((mov._rotation - num) / 2); } } function elasticRotation(mc, targt, accel, friction) { if (mc.qrScale == undefined) { mc.qrScale = 0; } mc.qrScale += (targt - mc._rotation) * accel; mc.qrScale *= friction; mc._rotation += mc.qrScale; } function elasticScale(mc, targt, accel, friction) { if (mc.qxScale == undefined) { mc.qxScale = 0; } mc.qxScale += (targt - mc._xscale) * accel; mc.qxScale *= friction; mc._yscale += mc.qxScale; mc._xscale = mc._yscale; } function elasticX(mc, targt, accel, friction) { if (mc.qxSpeed == undefined) { mc.qxSpeed = 0; } mc.qxSpeed += (targt - mc._x) * accel; mc.qxSpeed *= friction; mc._x += mc.qxSpeed; } function elasticY(mc, targt, accel, friction) { if (mc.qySpeed == undefined) { mc.qySpeed = 0; } mc.qySpeed += (targt - mc._y) * accel; mc.qySpeed *= friction; mc._y += mc.qySpeed; } function elasticH(mc, targt, accel, friction) { if (mc.qhSpeed == undefined) { mc.qhSpeed = 0; } mc.qhSpeed += (targt - mc._height) * accel; mc.qhSpeed *= friction; mc._height += mc.qhSpeed; } function elasticW(mc, targt, accel, friction) { if (mc.qwSpeed == undefined) { mc.qwSpeed = 0; } mc.qwSpeed += (targt - mc._width) * accel; mc.qwSpeed *= friction; mc._width += mc.qwSpeed; } stop(); onEnterFrame = function () { if (_root.aSurg0) { linage.point1._visible = true; linage.point0.gotoAndStop(2); } else { linage.point1._visible = false; } if (_root.aSurg1) { linage.point2._visible = true; linage.point1.gotoAndStop(2); } else { linage.point2._visible = false; } if (_root.aSurg2) { linage.point3._visible = true; linage.point2.gotoAndStop(2); } else { linage.point3._visible = false; } if (_root.aSurg3) { linage.point4._visible = true; linage.point3.gotoAndStop(2); } else { linage.point4._visible = false; } if (_root.aTreat0) { linage.point5.gotoAndStop(2); } if (_root.aTreat1) { linage.point6.gotoAndStop(2); } if (_root.aTreat2) { linage.point7.gotoAndStop(2); } if (_root.aSurg1) { linage.point5._visible = true; } else { linage.point5._visible = false; } if (_root.aSurg2) { linage.point6._visible = true; } else { linage.point6._visible = false; } if (_root.aSurg3) { linage.point7._visible = true; } else { linage.point7._visible = false; } dataFlow3.text = dataFlow2.text; dataFlow2.text = dataFlow.text; dataFlow.text = getDataFlow(); if (_ymouse > 50 && _ymouse < 360) { marker._x = _xmouse; marker._y = _ymouse; Mouse.hide(); } else { if (_ymouse <= 50) { marker._y = 50; } if (_ymouse >= 360) { marker._y = 360; } Mouse.show(); } checkMouse(); easeMap(); tempShort = this['surgery' + currentPoint][0]; ins = ((tempShort - 1000) / 1000) * 4000 - 350; ease('x', info.map1.bar.bar, -ins, 0.2); }; var currentPoint = 40000; var dataMessages = new Array(); dataMessages.push('Getting data array...'); dataMessages.push('Parsing data...'); dataMessages.push('149401-44 Loading...'); dataMessages.push('683445-44 Loading...'); dataMessages.push('232931-44 Loading...'); dataMessages.push('009983-44 Loading...'); dataMessages.push('Forcing merger of databanks...'); dataMessages.push('Spacing parses...'); dataMessages.push('Syncing space with area specifications...'); dataMessages.push('Optimizing data flowchart...'); dataMessages.push('Genealogy trees expanding...'); dataMessages.push('Activity level change: Normal'); dataMessages.push(' '); dataFlow.text = getDataFlow(); dataFlow2.text = getDataFlow(); dataFlow3.text = getDataFlow(); onMouseDown = function () { if (linage['point' + currentPoint].hitTest(marker._x, marker._y)) { if (currentPoint == 4 && linage.point4._visible || currentPoint != 4) { if (_root.curRoll > 4 && !_root.bonusMode) { } else { fader.play(); } } } }; info._visible = false; } } frame 8 { function inc() { fps = 'Frames per Second: ' + aad; nmbr = aad; aad = 0; } function active() { if (curStep == 0) { curSurgery.activeArea.uplink._x = _xmouse; curSurgery.activeArea.uplink._y = _ymouse; instruct('Uplink the patient.'); } if (curStep == 1) { if (curSurgery.activeArea.uplink._currentframe == curSurgery.activeArea.uplink._totalframes) { plugged = true; curSurgery.bar.area0.boot.play(); curSurgery.bar.area1.boot.play(); curSurgery.bar.area2.boot.play(); curSurgery.activeArea.nextFrame(); nextStep(); } } if (curStep == 2) { curSurgery.activeArea.revealer._x = _xmouse; curSurgery.activeArea.revealer._y = _ymouse; curSurgery.activeArea.xRayFront._x = _xmouse - curSurgery.activeArea.xRayFront._width / 2; curSurgery.activeArea.xRayFront._y = _ymouse - curSurgery.activeArea.xRayFront._height / 2; instruct('Scan and find missing bone fragments.'); } if (curStep == 3) { curSurgery.activeArea.rag._x = _xmouse; curSurgery.activeArea.rag._y = _ymouse; i = 0; while (i < 10) { curIn = curSurgery.activeArea['p' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.rag.hitA) && holdMouse) { curIn.play(); ++curStepCount; if (curStepCount == 1) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 3) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 6) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 9) { curSurgery.activeArea.nextFrame(); curStepCount = 0; curSurgery.amgBG.nextFrame(); nextStep(); } } ++i; } instruct('Clean area.'); } if (curStep == 4) { curSurgery.activeArea.knife._x = _xmouse; curSurgery.activeArea.knife._y = _ymouse; if (holdMouse) { curSurgery.activeArea.knife.gotoAndStop(2); } else { curSurgery.activeArea.knife.gotoAndStop(1); } i = 0; while (i < 5) { curIn = curSurgery.activeArea['w' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.knife.hitA) && holdMouse) { if (i == curStepCount) { curIn.play(); curSurgery.activeArea.nextFrame(); ++curStepCount; } if (curStepCount == 5) { curStepCount = 0; nextStep(); } } ++i; } instruct('Cut open fragment area.'); } if (curStep == 5) { curSurgery.activeArea.tweezers._x = _xmouse; curSurgery.activeArea.tweezers._y = _ymouse; if (holdMouse) { curSurgery.activeArea.tweezers.gotoAndStop(2); } else { curSurgery.activeArea.tweezers.gotoAndStop(1); } i = 0; while (i < 5) { curIn = curSurgery.activeArea['tweeze' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.tweezers.hitA) && holdMouse) { curIn.play(); curSurgery.activeArea.nextFrame(); ++curStepCount; if (curStepCount == 3) { curSurgery.amgBG.nextFrame(); } if (curStepCount == 5) { curStepCount = 0; splat = false; nextStep(); } } ++i; } instruct('Open up skin area carefully.'); } if (curStep == 6) { curSurgery.activeArea.tweezers._x = _xmouse; curSurgery.activeArea.tweezers._y = _ymouse; if (holdMouse) { curSurgery.activeArea.tweezers.gotoAndStop(2); } else { curSurgery.activeArea.tweezers.gotoAndStop(1); } if (!holdMouse && curSurgery.activeArea.bone1.hitA.hitTest(curSurgery.activeArea.tray.hitA) && curSurgery.activeArea.bone2.hitA.hitTest(curSurgery.activeArea.tray.hitA)) { curSurgery.activeArea.nextFrame(); curStepCount = 0; nextStep(); } instruct('Extract fragments and place on tray.'); } if (curStep == 7) { curSurgery.activeArea.tweezers._x = _xmouse; curSurgery.activeArea.tweezers._y = _ymouse; if (holdMouse) { curSurgery.activeArea.tweezers.gotoAndStop(2); } else { curSurgery.activeArea.tweezers.gotoAndStop(1); } i = 0; while (i < 4) { curIn = curSurgery.activeArea['tweeze' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.tweezers.hitA) && holdMouse) { curIn.play(); curSurgery.activeArea.nextFrame(); ++curStepCount; if (curStepCount == 4) { curStepCount = 0; splat = false; nextStep(); } } ++i; } instruct('Close up injury area.'); } if (curStep == 8) { curSurgery.activeArea.hook._x = _xmouse; curSurgery.activeArea.hook._y = _ymouse; i = 0; while (i < 5) { curIn = curSurgery.activeArea['w' + i]; if (curIn.hitA.hitTest(_xmouse, _ymouse) && holdMouse && curStepCount == i) { curIn.play(); ++curStepCount; shel = curSurgery.activeArea.attachMovie('hookAnimation', 'kook' + k, k++); shel._x = curIn._x + curIn.hitA._x; shel._y = curIn._y + curIn.hitA._y; curSurgery.activeArea.hook._visible = false; if (curStepCount == 2) { curSurgery.amgBG.nextFrame(); } if (curStepCount == 5) { curStepCount = 0; splat = false; curSurgery.activeArea.nextFrame(); nextStep(); } } ++i; } instruct('Stitch up the wound opening.'); } if (curStep == 9) { curSurgery.activeArea.finger._x = _xmouse; curSurgery.activeArea.finger._y = _ymouse; curStepCount = 0; instruct('Reattach the severed finger.'); } if (curStep == 10) { curSurgery.activeArea.laserTool._x = _xmouse; curSurgery.activeArea.laserTool._y = _ymouse; i = 0; while (i < 4) { curIn = curSurgery.activeArea['w' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.laserTool.hitA) && holdMouse) { if (i == curStepCount) { curIn.play(); curSurgery.activeArea.nextFrame(); ++curStepCount; } if (curStepCount == 4) { curStepCount = 0; nextStep(); } } ++i; } if (holdMouse) { smallestVal = 40000; targetVal = 10000; closestX = curSurgery.activeArea.laserTool._x - 35; closestY = curSurgery.activeArea.laserTool._y - 35; xCurve = -100; yCurve = -100; curSurgery.activeArea.liner.removeMovieClip(); g = curSurgery.activeArea.createEmptyMovieClip('liner', _root.k++); randomCurve = random(100) - 25; randomColor = 1118541; g.lineStyle(10, randomColor, 100); g.moveTo(xCurve, yCurve); g.curveTo(xCurve + randomCurve, yCurve + randomCurve, closestX, closestY); g.lineStyle(4, randomColor * 2, 100); g.moveTo(xCurve, yCurve); g.curveTo(xCurve + randomCurve, yCurve + randomCurve, closestX, closestY); } else { curSurgery.activeArea.liner.removeMovieClip(); } instruct('Restimulate the nerve endings.'); } if (curStep == 11) { curSurgery.activeArea.hook._x = _xmouse; curSurgery.activeArea.hook._y = _ymouse; i = 0; while (i < 5) { curIn = curSurgery.activeArea['x' + i]; if (curIn.hitA.hitTest(_xmouse, _ymouse) && holdMouse && curStepCount == i) { curIn.play(); ++curStepCount; shel = curSurgery.activeArea.attachMovie('hookAnimation', 'kook' + k, k++); shel._x = curIn._x + curIn.hitA._x; shel._y = curIn._y + curIn.hitA._y; curSurgery.activeArea.hook._visible = false; if (curStepCount == 5) { curStepCount = 0; splat = false; curSurgery.activeArea.nextFrame(); nextStep(); } } ++i; } instruct('Stich the finger back together. '); } if (curStep == 12) { win(); } if (curStep == 1000) { curSurgery.activeArea.sedateScreen.syringe._x = _xmouse; curSurgery.activeArea.sedateScreen.syringe._y = _ymouse; instruct('Sedate the patient.'); } if (curStep == 1001) { if (curSurgery.activeArea.sedateScreen.syringe._currentframe > 10 && curSurgery.activeArea.sedateScreen.syringe._currentframe < 20) { sedation += 5; if (sedation > 100) { sedation = 100; } } if (curSurgery.activeArea.sedateScreen.syringe._currentframe == curSurgery.activeArea.sedateScreen.syringe._totalframes) { curSurgery.activeArea.sedateScreen.play(); nextStep(); } } if (curStep == 1002) { if (curSurgery.activeArea.sedateScreen._currentframe == curSurgery.activeArea.sedateScreen._totalframes) { curSurgery.activeArea.sedateScreen.removeMovieClip(); curStep = holdStep; trace('Current Step is now [' + curStep + ']'); } } } function mouseDownFn() { if (curStep == 0) { if (curSurgery.activeArea.uplink.hitA.hitTest(curSurgery.activeArea.pointer.hitA)) { curSurgery.activeArea.uplink.play(); curSurgery.activeArea.nextFrame(); nextStep(); } } if (curStep == 2) { if (curSurgery.activeArea.fragments.hitTest(_xmouse, _ymouse)) { curSurgery.activeArea.nextFrame(); curStepCount = 0; nextStep(); } } if (curStep == 6) { if (curSurgery.activeArea.bone1.hitTest(_xmouse, _ymouse)) { curSurgery.activeArea.bone1.startDrag(true); if (splat == false) { splat = true; curSurgery.activeArea.nextFrame(); } } if (curSurgery.activeArea.bone2.hitTest(_xmouse, _ymouse)) { curSurgery.activeArea.bone2.startDrag(true); } } if (curStep == 9) { if (curSurgery.activeArea.hitFing.hitTest(_xmouse, _ymouse)) { curSurgery.activeArea.nextFrame(); nextStep(); } } if (curStep == 1000) { if (curSurgery.activeArea.sedateScreen.syringe.hitA.hitTest(curSurgery.activeArea.sedateScreen.point.pointer.hitA)) { curSurgery.activeArea.sedateScreen.syringe.play(); curSurgery.activeArea.sedateScreen.painLoop.play(); nextStep(); } } } function mouseUpFn() { if (curStep == 6) { curSurgery.activeArea.bone1.stopDrag(); curSurgery.activeArea.bone2.stopDrag(); if (!curSurgery.activeArea.bone1.hitA.hitTest(curSurgery.activeArea.tray.hitA)) { curSurgery.activeArea.bone1._x = curSurgery.activeArea.bone1.orgX; curSurgery.activeArea.bone1._y = curSurgery.activeArea.bone1.orgY; } if (!curSurgery.activeArea.bone2.hitA.hitTest(curSurgery.activeArea.tray.hitA)) { curSurgery.activeArea.bone2._x = curSurgery.activeArea.bone2.orgX; curSurgery.activeArea.bone2._y = curSurgery.activeArea.bone2.orgY; } } } cStatus = 1; nmbr = 0; fps = 0; aad = 0; setInterval(inc, 1000); var health = 50; var sedation = 30; var heartRate = 100; var curStep = 0; var holdStep = 0; var sedationCounter = 0; var sedateMode = false; var k = 0; var hPoint = 0; var healthData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var sedationData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var heartData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var sedX = 0; curSurgery.bar.area0.graphArea.attachBitmap(healthData, _root.k++); curSurgery.bar.area1.graphArea.attachBitmap(sedationData, _root.k++); curSurgery.bar.area2.graphArea.attachBitmap(heartData, _root.k++); var chart0 = new Array(); var chart1 = new Array(); var chart2 = new Array(); var heartBeat = new Array(); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(16); heartBeat.push(16); heartBeat.push(17); heartBeat.push(18); heartBeat.push(20); heartBeat.push(24); heartBeat.push(7); heartBeat.push(11); heartBeat.push(14); heartBeat.push(18); heartBeat.push(15); heartBeat.push(13); heartBeat.push(14); heartBeat.push(14); heartBeat.push(15); var curMonth = '11'; var curDay = '13'; var curYear = '1917'; var curHour = '18'; var curMin = '10'; var curSec = '23'; var curMili = '00'; var tMonth = 11; var tDay = 13; var tYear = 1917; var tHour = 18; var tMin = 10; var tSec = 23; var tMili = 50; var curSurg = 0; var plugged = false; var upH = 0; var upS = 0; var upHR = 0; var upHC = 0; var upSC = 1; var upHRC = 2; var upC = 10; var loadParts = new Array('*---', '-*--', '--*-', '---*'); j = 0; while (j < 120) { monitors(); ++j; } Mouse.hide(); onEnterFrame = function () { monitors(); if (cStatus == 1) { threadPoint(); surgInfo(); active(); sedationDecrease(); healthDecrease(); curSurgery.cursor._x = _xmouse; curSurgery.cursor._y = _ymouse; } ++aad; }; onMouseDown = function () { mouseDownFn(); holdMouse = true; }; onMouseUp = function () { mouseUpFn(); holdMouse = false; }; } movieClip 408 { } movieClip 409 { frame 1 { k = 0; onEnterFrame = function () { shel = attachMovie('smokeRising', 'sr' + k, k++); shel._x = 0; shel._y = 0; shel._xscale = random(10); shel._yscale = random(40); shel.onEnterFrame = function () { this._y -= this._yscale / 20 / 2; this._x += (random(8) - 4) * (this._xscale / 100) / 1; this._alpha -= 1; this._xscale += 0.1; this._yscale += 0.1; if (this._y < -220 || this._alpha <= 0) { this.removeMovieClip(); } }; }; } } movieClip 412 { } movieClip 413 { } movieClip 414 { } movieClip 417 { } movieClip 418 { } movieClip 421 { } movieClip 422 { } movieClip 428 { } movieClip 431 { } movieClip 433 { frame 31 { stop(); } } movieClip 437 { } movieClip 440 { } movieClip 443 { frame 16 { _root.curSurgery.blast._visible = true; _root.curSurgery.blast.play(); stop(); } } movieClip 444 { frame 1 { stop(); } } movieClip 447 { } movieClip 448 { } movieClip 449 { frame 1 { this._alpha = 0; } } movieClip 450 { frame 16 { stop(); } } movieClip 453 { } movieClip 454 { frame 1 { stop(); } frame 25 { stop(); } } movieClip 456 { } movieClip 457 { } movieClip 458 { frame 10 { stop(); } } movieClip 460 { } movieClip 465 { } movieClip 468 { } movieClip 469 { } movieClip 471 { frame 1 { this._visible = false; goal = random(20) + 5; counter = 0; onEnterFrame = function () { if (counter >= goal) { this._visible = true; this.play(); onEnterFrame = null; } ++counter; }; stop(); } frame 16 { stop(); } frame 28 { this.swapDepths(_root.k++); this.removeMovieClip(); } } movieClip 474 { } movieClip 487 { frame 1 { stop(); } } movieClip 490 { } movieClip 492 { frame 1 { this._visible = false; } } movieClip 493 { } movieClip 502 { frame 1 { stop(); } frame 13 { this.swapDepths(_root.k++); this.removeMovieClip(); } } movieClip 507 { frame 1 { stop(); } } movieClip 508 { } movieClip 516 { frame 1 { orgX = this._x; orgY = this._y; } } movieClip 519 { frame 1 { orgX = this._x; orgY = this._y; } } movieClip 527 { } movieClip 532 { } movieClip 537 { frame 50 { stop(); } } movieClip 538 { frame 3 { stop(); } } movieClip 547 { } movieClip 548 { } movieClip 553 { } movieClip 558 { frame 1 { onEnterFrame = function () { if (_root.holdMouse) { this._visible = true; this._xscale = random(200) - 50; this._yscale = random(200) - 50; } else { this._visible = false; } }; } } movieClip 561 { } movieClip 572 { frame 1 { stop(); } } movieClip 573 { } movieClip 578 { } movieClip 579 { frame 1 { stop(); this._visible = false; } frame 2 { onEnterFrame = function () { _root._x = random(10) - 5; _root._y = random(10) - 5; }; } frame 34 { this.onEnterFrame = null; _root._y = 0; _root._x = 0; } } movieClip 599 { } movieClip 600 { } movieClip 601 { frame 1 { stop(); } frame 12 { stop(); } } movieClip 622 { frame 1 { onEnterFrame = function () { while (tap == oldTap) { tap = random(10) + 2; } gotoAndStop(tap); oldTap = tap; }; tap = 1; oldTap = 1; } } movieClip 624 { } movieClip 625 { } movieClip 626 { } movieClip 629 { } movieClip 630 { } movieClip 631 { } movieClip 633 { frame 15 { stop(); } } movieClip 634 { } button 642 { on (release) { _root.triggerSedation(); } } movieClip 645 { } movieClip 646 { frame 1 { function camControl() { parentColor.setTransform(camColor.getTransform()); var v5 = sX / this._width; var v4 = sY / this._height; _root._x = cX - (this._x + _parent._x) * v5; _root._y = cY - (this._y + _parent._y) * v4; _root._xscale = 100 * v5; _root._yscale = 100 * v4; } function resetStage() { var v2 = {'ra': 100, 'rb': 0, 'ga': 100, 'gb': 0, 'ba': 100, 'bb': 0, 'aa': 100, 'ab': 0}; parentColor.setTransform(v2); _root._xscale = 100; _root._yscale = 100; _root._x = 0; _root._y = 0; } var oldMode = Stage.scaleMode; Stage.scaleMode = 'exactFit'; var cX = Stage.width / 2; var cY = Stage.height / 2; var sX = Stage.width; var sY = Stage.height; Stage.scaleMode = oldMode; var camColor = new Color(this); var parentColor = new Color(_root); this.onEnterFrame = camControl; camControl(); this.onUnload = resetStage; } } movieClip 648 { } movieClip 652 { } movieClip 653 { } movieClip 654 { frame 11 { stop(); } } movieClip 655 { } frame 9 { function inc() { fps = 'Frames per Second: ' + aad; nmbr = aad; aad = 0; } function active() { if (curStep == 0) { curSurgery.activeArea.uplink._x = _xmouse; curSurgery.activeArea.uplink._y = _ymouse; instruct('Uplink the patient.'); } if (curStep == 1) { if (curSurgery.activeArea.uplink._currentframe == curSurgery.activeArea.uplink._totalframes) { plugged = true; curSurgery.bar.area0.boot.play(); curSurgery.bar.area1.boot.play(); curSurgery.bar.area2.boot.play(); curSurgery.activeArea.nextFrame(); curStepCount = 0; nextStep(); } } if (curStep == 2) { curSurgery.activeArea.rag._x = _xmouse; curSurgery.activeArea.rag._y = _ymouse; i = 0; while (i < 10) { curIn = curSurgery.activeArea['p' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.rag.hitA) && holdMouse) { curIn.play(); ++curStepCount; if (curStepCount == 1) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 3) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 6) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 9) { curSurgery.activeArea.nextFrame(); curStepCount = 0; nextStep(); } } ++i; } instruct('Clean around wound area.'); } if (curStep == 3) { if (curSurgery.activeArea.hitWalls.hitTest(curSurgery.activeArea.stick._x + curSurgery.activeArea.stick.hitA._x, curSurgery.activeArea.stick._y + curSurgery.activeArea.stick.hitA._y, true) || curSurgery.activeArea.hitWalls.hitTest(curSurgery.activeArea.stick._x + curSurgery.activeArea.stick.hitA2._x, curSurgery.activeArea.stick._y + curSurgery.activeArea.stick.hitA2._y, true)) { curSurgery.activeArea.stick._x = curSurgery.activeArea.stick.oldX; curSurgery.activeArea.stick._y = curSurgery.activeArea.stick.oldY; curSurgery.activeArea.stick.stopDrag(); } if (curSurgery.activeArea.stick.hitA.hitTest(curSurgery.activeArea.stickPoint)) { curSurgery.activeArea.nextFrame(); curStepCount = 0; nextStep(); } instruct('Extract the shrapnel carefully.'); } if (curStep == 4) { curSurgery.activeArea.knife._x = _xmouse; curSurgery.activeArea.knife._y = _ymouse; if (holdMouse) { curSurgery.activeArea.knife.gotoAndStop(2); } else { curSurgery.activeArea.knife.gotoAndStop(1); } i = 0; while (i < 5) { curIn = curSurgery.activeArea['w' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.knife.hitA) && holdMouse) { if (i == curStepCount) { curIn.play(); curSurgery.activeArea.nextFrame(); ++curStepCount; } if (curStepCount == 5) { curStepCount = 0; nextStep(); } } ++i; } instruct('Cut open shirt area.'); } if (curStep == 5) { curSurgery.activeArea.knife._x = _xmouse; curSurgery.activeArea.knife._y = _ymouse; if (holdMouse) { curSurgery.activeArea.knife.gotoAndStop(2); } else { curSurgery.activeArea.knife.gotoAndStop(1); } i = 0; while (i < 4) { curIn = curSurgery.activeArea['x' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.knife.hitA) && holdMouse) { if (i == curStepCount) { curIn.play(); curSurgery.activeArea.nextFrame(); ++curStepCount; } if (curStepCount == 4) { curStepCount = 0; nextStep(); } } ++i; } } if (curStep == 6) { curSurgery.activeArea.knife._x = _xmouse; curSurgery.activeArea.knife._y = _ymouse; if (holdMouse) { curSurgery.activeArea.knife.gotoAndStop(2); } else { curSurgery.activeArea.knife.gotoAndStop(1); } i = 0; while (i < 4) { curIn = curSurgery.activeArea['y' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.knife.hitA) && holdMouse) { if (i == curStepCount) { curIn.play(); curSurgery.activeArea.nextFrame(); ++curStepCount; } if (curStepCount == 2) { curStepCount = 0; nextStep(); } } ++i; } } if (curStep == 7) { curSurgery.activeArea.knife._x = _xmouse; curSurgery.activeArea.knife._y = _ymouse; if (holdMouse) { curSurgery.activeArea.knife.gotoAndStop(2); } else { curSurgery.activeArea.knife.gotoAndStop(1); } i = 0; while (i < 4) { curIn = curSurgery.activeArea['z' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.knife.hitA) && holdMouse) { if (i == curStepCount) { curIn.play(); curSurgery.activeArea.nextFrame(); ++curStepCount; } if (curStepCount == 2) { curStepCount = 0; nextStep(); } } ++i; } } if (curStep == 8) { curSurgery.activeArea.knife._x = _xmouse; curSurgery.activeArea.knife._y = _ymouse; if (holdMouse) { curSurgery.activeArea.knife.gotoAndStop(2); } else { curSurgery.activeArea.knife.gotoAndStop(1); } i = 0; while (i < 4) { curIn = curSurgery.activeArea['a' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.knife.hitA) && holdMouse) { if (i == curStepCount) { curIn.play(); curSurgery.activeArea.nextFrame(); ++curStepCount; } if (curStepCount == 2) { curStepCount = 0; nextStep(); } } ++i; } } if (curStep == 9) { curSurgery.activeArea.knife._x = _xmouse; curSurgery.activeArea.knife._y = _ymouse; if (holdMouse) { curSurgery.activeArea.knife.gotoAndStop(2); } else { curSurgery.activeArea.knife.gotoAndStop(1); } i = 0; while (i < 4) { curIn = curSurgery.activeArea['b' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.knife.hitA) && holdMouse) { if (i == curStepCount) { curIn.play(); curSurgery.activeArea.nextFrame(); ++curStepCount; } if (curStepCount == 2) { curStepCount = 0; nextStep(); } } ++i; } } if (curStep == 10) { curSurgery.activeArea.tweezers._x = _xmouse; curSurgery.activeArea.tweezers._y = _ymouse; if (holdMouse) { curSurgery.activeArea.tweezers.gotoAndStop(2); } else { curSurgery.activeArea.tweezers.gotoAndStop(1); } i = 0; while (i < 4) { curIn = curSurgery.activeArea['tweeze' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.tweezers.hitA) && holdMouse) { curIn.play(); curSurgery.activeArea.nextFrame(); ++curStepCount; if (curStepCount == 4) { curStepCount = 0; splat = false; nextStep(); } } ++i; } instruct('Pull apart shirt area.'); } if (curStep == 11) { curSurgery.activeArea.tweezers._x = _xmouse; curSurgery.activeArea.tweezers._y = _ymouse; if (holdMouse) { curSurgery.activeArea.tweezers.gotoAndStop(2); } else { curSurgery.activeArea.tweezers.gotoAndStop(1); } i = 0; while (i < 4) { curIn = curSurgery.activeArea['tweeze' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.tweezers.hitA) && holdMouse) { curIn.play(); curSurgery.activeArea.nextFrame(); ++curStepCount; if (curStepCount == 4) { curStepCount = 0; splat = false; nextStep(); } } ++i; } } if (curStep == 12) { curSurgery.activeArea.revealer._x = _xmouse; curSurgery.activeArea.revealer._y = _ymouse; curSurgery.activeArea.xRayFront._x = _xmouse - curSurgery.activeArea.xRayFront._width / 2; curSurgery.activeArea.xRayFront._y = _ymouse - curSurgery.activeArea.xRayFront._height / 2; instruct('Search for remnant fragments.'); } if (curStep == 13) { curSurgery.activeArea.knife._x = _xmouse; curSurgery.activeArea.knife._y = _ymouse; if (holdMouse) { curSurgery.activeArea.knife.gotoAndStop(2); } else { curSurgery.activeArea.knife.gotoAndStop(1); } i = 0; while (i < 5) { curIn = curSurgery.activeArea['pet' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.knife.hitA) && holdMouse) { if (i == curStepCount) { curIn.play(); curSurgery.activeArea.nextFrame(); ++curStepCount; } if (curStepCount == 5) { curStepCount = 0; nextStep(); } } ++i; } instruct('Cut open skin around fragment.'); } if (curStep == 14) { curSurgery.activeArea.tweezers._x = _xmouse; curSurgery.activeArea.tweezers._y = _ymouse; if (holdMouse) { curSurgery.activeArea.tweezers.gotoAndStop(2); } else { curSurgery.activeArea.tweezers.gotoAndStop(1); } i = 0; while (i < 4) { curIn = curSurgery.activeArea['tweeze' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.tweezers.hitA) && holdMouse) { curIn.play(); curSurgery.activeArea.nextFrame(); ++curStepCount; if (curStepCount == 4) { curStepCount = 0; splat = false; nextStep(); } } ++i; } instruct('Pull open skin over fragment.'); } if (curStep == 15) { if (curSurgery.activeArea.hitWalls.hitTest(curSurgery.activeArea.stick._x + curSurgery.activeArea.stick.hitA._x, curSurgery.activeArea.stick._y + curSurgery.activeArea.stick.hitA._y, true) || curSurgery.activeArea.hitWalls.hitTest(curSurgery.activeArea.stick._x + curSurgery.activeArea.stick.hitA2._x, curSurgery.activeArea.stick._y + curSurgery.activeArea.stick.hitA2._y, true)) { curSurgery.activeArea.stick._x = curSurgery.activeArea.stick.oldX; curSurgery.activeArea.stick._y = curSurgery.activeArea.stick.oldY; curSurgery.activeArea.stick.stopDrag(); } if (curSurgery.activeArea.stick.hitA.hitTest(curSurgery.activeArea.stickPoint)) { curSurgery.activeArea.nextFrame(); curStepCount = 0; nextStep(); } instruct('Carefully extract the remnant fragment.'); } if (curStep == 16) { curSurgery.activeArea.tweezers._x = _xmouse; curSurgery.activeArea.tweezers._y = _ymouse; if (holdMouse) { curSurgery.activeArea.tweezers.gotoAndStop(2); } else { curSurgery.activeArea.tweezers.gotoAndStop(1); } i = 0; while (i < 5) { curIn = curSurgery.activeArea['tweeze' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.tweezers.hitA) && holdMouse) { curIn.play(); curSurgery.activeArea.nextFrame(); ++curStepCount; if (curStepCount == 4) { curStepCount = 0; splat = false; nextStep(); } } ++i; } instruct('Pull back skin.'); } if (curStep == 17) { curSurgery.activeArea.hook._x = _xmouse; curSurgery.activeArea.hook._y = _ymouse; i = 0; while (i < 5) { curIn = curSurgery.activeArea['w' + i]; if (curIn.hitA.hitTest(_xmouse, _ymouse) && holdMouse && curStepCount == i) { curIn.play(); ++curStepCount; shel = curSurgery.activeArea.attachMovie('hookAnimation', 'kook' + k, k++); shel._x = curIn._x + curIn.hitA._x; shel._y = curIn._y + curIn.hitA._y; curSurgery.activeArea.hook._visible = false; if (curStepCount == 5) { curStepCount = 0; splat = false; curSurgery.activeArea.nextFrame(); nextStep(); } } ++i; } instruct('Stitch up penetration point.'); } if (curStep == 18) { curSurgery.activeArea.pad._x = _xmouse; curSurgery.activeArea.pad._y = _ymouse; } if (curStep == 19) { curSurgery.activeArea.band1._x = _xmouse; curSurgery.activeArea.band1._y = _ymouse; } if (curStep == 20) { curSurgery.activeArea.band2._x = _xmouse; curSurgery.activeArea.band2._y = _ymouse; } if (curStep == 21) { win(); } if (curStep == 1000) { curSurgery.activeArea.sedateScreen.syringe._x = _xmouse; curSurgery.activeArea.sedateScreen.syringe._y = _ymouse; instruct('Sedate the patient.'); } if (curStep == 1001) { if (curSurgery.activeArea.sedateScreen.syringe._currentframe > 10 && curSurgery.activeArea.sedateScreen.syringe._currentframe < 20) { sedation += 5; if (sedation > 100) { sedation = 100; } } if (curSurgery.activeArea.sedateScreen.syringe._currentframe == curSurgery.activeArea.sedateScreen.syringe._totalframes) { curSurgery.activeArea.sedateScreen.play(); nextStep(); } } if (curStep == 1002) { if (curSurgery.activeArea.sedateScreen._currentframe == curSurgery.activeArea.sedateScreen._totalframes) { curSurgery.activeArea.sedateScreen.removeMovieClip(); curStep = holdStep; trace('Current Step is now [' + curStep + ']'); } } } function mouseDownFn() { if (curStep == 0) { if (curSurgery.activeArea.uplink.hitA.hitTest(curSurgery.activeArea.pointer.hitA)) { curSurgery.activeArea.uplink.play(); curSurgery.activeArea.nextFrame(); nextStep(); } } if (curStep == 3) { if (curSurgery.activeArea.stick.hitTest(_xmouse, _ymouse, true)) { curSurgery.activeArea.stick.startDrag(); } } if (curStep == 12) { if (curSurgery.activeArea.hitA.hitTest(_xmouse, _ymouse)) { curSurgery.activeArea.nextFrame(); curStepCount = 0; nextStep(); } } if (curStep == 15) { if (curSurgery.activeArea.stick.hitTest(_xmouse, _ymouse, true)) { curSurgery.activeArea.stick.startDrag(); } } if (curStep == 18) { if (curSurgery.activeArea.pad.hitA.hitTest(curSurgery.activeArea.stickPoint2)) { curStepCount = 0; curSurgery.activeArea.nextFrame(); nextStep(); } } if (curStep == 19) { if (curSurgery.activeArea.band1.hitA.hitTest(curSurgery.activeArea.tapePoint)) { curStepCount = 0; curSurgery.activeArea.nextFrame(); nextStep(); } } if (curStep == 20) { if (curSurgery.activeArea.band2.hitA.hitTest(curSurgery.activeArea.tapePoint2)) { curStepCount = 0; curSurgery.activeArea.nextFrame(); nextStep(); } } if (curStep == 1000) { if (curSurgery.activeArea.sedateScreen.syringe.hitA.hitTest(curSurgery.activeArea.sedateScreen.point.pointer.hitA)) { curSurgery.activeArea.sedateScreen.syringe.play(); curSurgery.activeArea.sedateScreen.painLoop.play(); nextStep(); } } } function mouseUpFn() { if (curStep == 3) { curSurgery.activeArea.stick.stopDrag(); } } cStatus = 1; nmbr = 0; fps = 0; aad = 0; setInterval(inc, 1000); var health = 50; var sedation = 30; var heartRate = 100; var curStep = 0; var holdStep = 0; var sedationCounter = 0; var sedateMode = false; var k = 0; var hPoint = 0; var healthData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var sedationData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var heartData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var sedX = 0; curSurgery.bar.area0.graphArea.attachBitmap(healthData, _root.k++); curSurgery.bar.area1.graphArea.attachBitmap(sedationData, _root.k++); curSurgery.bar.area2.graphArea.attachBitmap(heartData, _root.k++); var chart0 = new Array(); var chart1 = new Array(); var chart2 = new Array(); var heartBeat = new Array(); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(16); heartBeat.push(16); heartBeat.push(17); heartBeat.push(18); heartBeat.push(20); heartBeat.push(24); heartBeat.push(7); heartBeat.push(11); heartBeat.push(14); heartBeat.push(18); heartBeat.push(15); heartBeat.push(13); heartBeat.push(14); heartBeat.push(14); heartBeat.push(15); var curMonth = '02'; var curDay = '23'; var curYear = '2008'; var curHour = '18'; var curMin = '10'; var curSec = '23'; var curMili = '00'; var tMonth = 8; var tDay = 3; var tYear = 1942; var tHour = 21; var tMin = 52; var tSec = 23; var tMili = 50; var curSurg = 0; var plugged = false; var upH = 0; var upS = 0; var upHR = 0; var upHC = 0; var upSC = 1; var upHRC = 2; var upC = 10; var loadParts = new Array('*---', '-*--', '--*-', '---*'); j = 0; while (j < 120) { monitors(); ++j; } Mouse.hide(); onEnterFrame = function () { monitors(); if (cStatus == 1) { threadPoint(); surgInfo(); active(); sedationDecrease(); healthDecrease(); curSurgery.cursor._x = _xmouse; curSurgery.cursor._y = _ymouse; ++aad; } }; onMouseDown = function () { mouseDownFn(); holdMouse = true; }; onMouseUp = function () { mouseUpFn(); holdMouse = false; }; } movieClip 659 { } movieClip 660 { frame 100 { _parent.nextFrame(); } } movieClip 665 { } movieClip 666 { frame 1 { stop(); } frame 25 { stop(); } } movieClip 671 { frame 1 { this.oldX = this._x; this.oldY = this._y; } } movieClip 672 { } movieClip 673 { frame 1 { this._visible = false; goal = random(20) + 5; counter = 0; onEnterFrame = function () { if (counter >= goal) { this._visible = true; this.play(); onEnterFrame = null; } ++counter; }; stop(); } frame 16 { stop(); } frame 28 { this.swapDepths(_root.k++); this.removeMovieClip(); } } movieClip 676 { } movieClip 684 { frame 1 { stop(); } } movieClip 688 { frame 1 { stop(); } } movieClip 708 { } movieClip 709 { frame 16 { this.stop(); this._visible = false; } } movieClip 713 { frame 1 { stop(); } frame 13 { this.swapDepths(_root.k++); this.removeMovieClip(); } } movieClip 718 { frame 1 { stop(); } } movieClip 731 { } movieClip 736 { } movieClip 754 { frame 1 { this.oldX = this._x; this.oldY = this._y; } } movieClip 756 { frame 1 { stop(); } } movieClip 763 { } movieClip 768 { } movieClip 774 { } movieClip 781 { frame 1 { stop(); } } movieClip 785 { } movieClip 791 { } movieClip 792 { } movieClip 793 { frame 1 { stop(); } frame 12 { stop(); } } movieClip 814 { frame 1 { onEnterFrame = function () { while (tap == oldTap) { tap = random(10) + 2; } gotoAndStop(tap); oldTap = tap; }; tap = 1; oldTap = 1; } } movieClip 815 { } movieClip 816 { } movieClip 817 { } movieClip 818 { } button 822 { on (release) { _root.triggerSedation(); } } movieClip 824 { } movieClip 825 { } movieClip 827 { } movieClip 828 { } movieClip 830 { } movieClip 831 { } frame 10 { function inc() { fps = 'Frames per Second: ' + aad; nmbr = aad; aad = 0; } function active() { if (curStep == 0) { curSurgery.activeArea.uplink._x = _xmouse; curSurgery.activeArea.uplink._y = _ymouse; instruct('Uplink the patient.'); } if (curStep == 1) { if (curSurgery.activeArea.uplink._currentframe == curSurgery.activeArea.uplink._totalframes) { plugged = true; curSurgery.bar.area0.boot.play(); curSurgery.bar.area1.boot.play(); curSurgery.bar.area2.boot.play(); curSurgery.activeArea.nextFrame(); curStepCount = 0; nextStep(); } } if (curStep == 2) { if (curSurgery.activeArea.hitWalls.hitTest(curSurgery.activeArea.pipe._x + curSurgery.activeArea.pipe.hitA._x, curSurgery.activeArea.pipe._y + curSurgery.activeArea.pipe.hitA._y, true) || curSurgery.activeArea.hitWalls.hitTest(curSurgery.activeArea.pipe._x + curSurgery.activeArea.pipe.hitA2._x, curSurgery.activeArea.pipe._y + curSurgery.activeArea.pipe.hitA2._y, true) && curSurgery.activeArea.hitWalls.hitTest(curSurgery.activeArea.pipe._x + curSurgery.activeArea.pipe.hitA3._x, curSurgery.activeArea.pipe._y + curSurgery.activeArea.pipe.hitA3._y, true) || curSurgery.activeArea.hitWalls.hitTest(curSurgery.activeArea.pipe._x + curSurgery.activeArea.pipe.hitA4._x, curSurgery.activeArea.pipe._y + curSurgery.activeArea.pipe.hitA4._y, true)) { curSurgery.activeArea.pipe._x = curSurgery.activeArea.pipe.oldX; curSurgery.activeArea.pipe._y = curSurgery.activeArea.pipe.oldY; curSurgery.activeArea.pipe.stopDrag(); } if (curSurgery.activeArea.pipe.hitA4.hitTest(curSurgery.activeArea.pipePoint)) { curSurgery.activeArea.nextFrame(); curStepCount = 0; nextStep(); } i = 1; while (i < 7) { if (curSurgery.activeArea['stop' + i].hitTest(curSurgery.activeArea.pipe._x + curSurgery.activeArea.pipe.hitA3._x, curSurgery.activeArea.pipe._y + curSurgery.activeArea.pipe.hitA3._y, true) && _root['stop' + i + 'Done'] == false) { _root['stop' + i + 'Done'] = true; curSurgery.activeArea.pipe.oldX = curSurgery.activeArea.pipe._x; curSurgery.activeArea.pipe.oldY = curSurgery.activeArea.pipe._y; curSurgery.activeArea['l' + i].play(); curSurgery.activeArea.pipe.stopDrag(); curSurgery.activeArea['l' + i]._visible = true; } ++i; } instruct('Slowly and carefully pull the pipe out.'); } if (curStep == 3) { curSurgery.activeArea.tweezers._x = _xmouse; curSurgery.activeArea.tweezers._y = _ymouse; if (holdMouse) { curSurgery.activeArea.tweezers.gotoAndStop(2); } else { curSurgery.activeArea.tweezers.gotoAndStop(1); } i = 0; while (i < 4) { curIn = curSurgery.activeArea['tweeze' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.tweezers.hitA) && holdMouse) { curIn.play(); curSurgery.activeArea.nextFrame(); ++curStepCount; if (curStepCount == 4) { curStepCount = 0; splat = false; nextStep(); } } ++i; } instruct('Pull together wound area.'); } if (curStep == 4) { curSurgery.activeArea.hook._x = _xmouse; curSurgery.activeArea.hook._y = _ymouse; i = 0; while (i < 5) { curIn = curSurgery.activeArea['w' + i]; if (curIn.hitA.hitTest(_xmouse, _ymouse) && holdMouse && curStepCount == i) { curIn.play(); ++curStepCount; shel = curSurgery.activeArea.attachMovie('hookAnimation', 'kook' + k, k++); shel._x = curIn._x + curIn.hitA._x; shel._y = curIn._y + curIn.hitA._y; curSurgery.activeArea.hook._visible = false; if (curStepCount == 5) { curStepCount = 0; splat = false; curSurgery.activeArea.nextFrame(); nextStep(); } } ++i; } instruct('Stitch wound area back together.'); } if (curStep == 5) { win(); } if (curStep == 1000) { curSurgery.activeArea.sedateScreen.syringe._x = _xmouse; curSurgery.activeArea.sedateScreen.syringe._y = _ymouse; instruct('Sedate the patient.'); } if (curStep == 1001) { if (curSurgery.activeArea.sedateScreen.syringe._currentframe > 10 && curSurgery.activeArea.sedateScreen.syringe._currentframe < 20) { sedation += 5; if (sedation > 100) { sedation = 100; } } if (curSurgery.activeArea.sedateScreen.syringe._currentframe == curSurgery.activeArea.sedateScreen.syringe._totalframes) { curSurgery.activeArea.sedateScreen.play(); nextStep(); } } if (curStep == 1002) { if (curSurgery.activeArea.sedateScreen._currentframe == curSurgery.activeArea.sedateScreen._totalframes) { curSurgery.activeArea.sedateScreen.removeMovieClip(); curStep = holdStep; trace('Current Step is now [' + curStep + ']'); } } } function mouseDownFn() { if (curStep == 0) { if (curSurgery.activeArea.uplink.hitA.hitTest(curSurgery.activeArea.pointer.hitA)) { curSurgery.activeArea.uplink.play(); curSurgery.activeArea.nextFrame(); nextStep(); } } if (curStep == 2) { if (curSurgery.activeArea.pipe.hitTest(_xmouse, _ymouse, true)) { curSurgery.activeArea.pipe.startDrag(); } } if (curStep == 1000) { if (curSurgery.activeArea.sedateScreen.syringe.hitA.hitTest(curSurgery.activeArea.sedateScreen.point.pointer.hitA)) { curSurgery.activeArea.sedateScreen.syringe.play(); curSurgery.activeArea.sedateScreen.painLoop.play(); nextStep(); } } } function mouseUpFn() { if (curStep == 2) { curSurgery.activeArea.pipe.stopDrag(); } } cStatus = 1; nmbr = 0; fps = 0; aad = 0; setInterval(inc, 1000); var health = 50; var sedation = 30; var heartRate = 100; var curStep = 0; var holdStep = 0; var sedationCounter = 0; var sedateMode = false; var k = 0; var hPoint = 0; var healthData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var sedationData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var heartData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var sedX = 0; curSurgery.bar.area0.graphArea.attachBitmap(healthData, _root.k++); curSurgery.bar.area1.graphArea.attachBitmap(sedationData, _root.k++); curSurgery.bar.area2.graphArea.attachBitmap(heartData, _root.k++); var chart0 = new Array(); var chart1 = new Array(); var chart2 = new Array(); var heartBeat = new Array(); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(16); heartBeat.push(16); heartBeat.push(17); heartBeat.push(18); heartBeat.push(20); heartBeat.push(24); heartBeat.push(7); heartBeat.push(11); heartBeat.push(14); heartBeat.push(18); heartBeat.push(15); heartBeat.push(13); heartBeat.push(14); heartBeat.push(14); heartBeat.push(15); var curMonth = '02'; var curDay = '23'; var curYear = '2008'; var curHour = '18'; var curMin = '10'; var curSec = '23'; var curMili = '00'; var tMonth = 9; var tDay = 23; var tYear = 1777; var tHour = 22; var tMin = 47; var tSec = 2; var tMili = 50; var curSurg = 0; var plugged = false; var upH = 0; var upS = 0; var upHR = 0; var upHC = 0; var upSC = 1; var upHRC = 2; var upC = 10; var loadParts = new Array('*---', '-*--', '--*-', '---*'); j = 0; while (j < 120) { monitors(); ++j; } Mouse.hide(); stop1Done = false; stop2Done = false; stop3Done = false; stop4Done = false; stop5Done = false; stop6Done = false; stop7Done = false; onEnterFrame = function () { monitors(); if (cStatus == 1) { threadPoint(); surgInfo(); active(); sedationDecrease(); healthDecrease(); curSurgery.cursor._x = _xmouse; curSurgery.cursor._y = _ymouse; ++aad; } }; onMouseDown = function () { mouseDownFn(); holdMouse = true; }; onMouseUp = function () { mouseUpFn(); holdMouse = false; }; } movieClip 838 { frame 1 { oldX = this._x; oldY = this._y; } } movieClip 839 { } movieClip 840 { } movieClip 841 { frame 16 { stop(); } } movieClip 843 { } movieClip 846 { } movieClip 847 { frame 1 { this._visible = false; stop(); } frame 5 { stop(); } } movieClip 850 { } movieClip 852 { frame 1 { this._visible = false; stop(); } frame 5 { stop(); } } movieClip 855 { } movieClip 856 { frame 1 { this._visible = false; stop(); } frame 5 { stop(); x; } } movieClip 859 { } movieClip 860 { frame 1 { this._visible = false; stop(); } frame 5 { stop(); } } movieClip 863 { } movieClip 864 { frame 1 { this._visible = false; stop(); } frame 5 { stop(); } } movieClip 867 { } movieClip 868 { frame 1 { this._visible = false; stop(); } frame 5 { stop(); } } movieClip 871 { } movieClip 872 { frame 5 { stop(); } } movieClip 881 { frame 1 { stop(); } } movieClip 885 { } movieClip 891 { } movieClip 892 { } movieClip 893 { frame 1 { stop(); } frame 12 { stop(); } } movieClip 914 { frame 1 { onEnterFrame = function () { while (tap == oldTap) { tap = random(10) + 2; } gotoAndStop(tap); oldTap = tap; }; tap = 1; oldTap = 1; } } movieClip 915 { } movieClip 916 { } movieClip 917 { } movieClip 918 { } button 922 { on (release) { _root.triggerSedation(); } } movieClip 923 { } movieClip 924 { } movieClip 925 { } frame 11 { function inc() { fps = 'Frames per Second: ' + aad; nmbr = aad; aad = 0; } function active() { if (curStep == 0) { curSurgery.activeArea.uplink._x = _xmouse; curSurgery.activeArea.uplink._y = _ymouse; instruct('Uplink the patient.'); } if (curStep == 1) { if (curSurgery.activeArea.uplink._currentframe == curSurgery.activeArea.uplink._totalframes) { plugged = true; curSurgery.bar.area0.boot.play(); curSurgery.bar.area1.boot.play(); curSurgery.bar.area2.boot.play(); curSurgery.activeArea.nextFrame(); curStepCount = 0; nextStep(); } } if (curStep == 2) { curSurgery.activeArea.rag._x = _xmouse; curSurgery.activeArea.rag._y = _ymouse; i = 0; while (i < 10) { curIn = curSurgery.activeArea['p' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.rag.hitA) && holdMouse) { curIn.play(); ++curStepCount; if (curStepCount == 1) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 3) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 6) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 9) { curSurgery.activeArea.nextFrame(); curStepCount = 0; nextStep(); } } ++i; } instruct('Clean the leg area.'); } if (curStep == 3) { if (footPut) { curSurgery.activeArea.ankle.foot._rotation = 90 + rotPoint(curSurgery.activeArea.ankle.foot._x, curSurgery.activeArea.ankle.foot._y, _xmouse, _ymouse); } if (curSurgery.activeArea.ankle.foot._rotation > 90) { curSurgery.activeArea.ankle.foot._rotation = 90; } if (curSurgery.activeArea.ankle.foot._rotation < -90) { curSurgery.activeArea.ankle.foot._rotation = 90; footPut = false; } if (curSurgery.activeArea.ankle.foot._rotation < 0) { curSurgery.activeArea.ankle.foot._rotation = 0; } if (lastRotation - curSurgery.activeArea.ankle.foot._rotation > 50) { curSurgery.activeArea.nextFrame(); curSurgery.activeArea.ankle.fader.play(); nextStep(); } else { if (curSurgery.activeArea.ankle.foot._rotation < 45) { curSurgery.activeArea.ankle.foot._rotation = 45; } } lastRotation = curSurgery.activeArea.ankle.foot._rotation; instruct('Snap the foot QUICKLY into place.'); } if (curStep == 4 || curStep == 5 || curStep == 6) { if (holdMouse) { curSurgery.activeArea.tweezers.gotoAndStop(2); } else { curSurgery.activeArea.tweezers.gotoAndStop(1); } curSurgery.activeArea.tweezers._x = _xmouse; curSurgery.activeArea.tweezers._y = _ymouse; if (bandageFollow) { curSurgery.activeArea.bandage._x = curSurgery.activeArea.tweezers._x; curSurgery.activeArea.bandage._y = curSurgery.activeArea.tweezers._y; instruct('Place cast parts into form.'); } } if (curStep == 7) { curSurgery.activeArea.rag._x = _xmouse; curSurgery.activeArea.rag._y = _ymouse; i = 0; while (i < 10) { curIn = curSurgery.activeArea['p' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.rag.hitA) && holdMouse) { curIn.play(); ++curStepCount; if (curStepCount == 1) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 3) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 6) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 9) { curSurgery.activeArea.nextFrame(); curStepCount = 0; nextStep(); } } ++i; } instruct('Clean severed leg area.'); } if (curStep == 8) { instruct('Move leg back into position.'); } if (curStep == 9) { curSurgery.activeArea.laserTool._x = _xmouse; curSurgery.activeArea.laserTool._y = _ymouse; i = 0; while (i < 4) { curIn = curSurgery.activeArea['w' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.laserTool.hitA) && holdMouse) { if (i == curStepCount) { curIn.play(); ++curStepCount; } if (curStepCount == 4) { curStepCount = 0; curSurgery.activeArea.nextFrame(); nextStep(); } } ++i; } if (holdMouse) { smallestVal = 40000; targetVal = 10000; closestX = curSurgery.activeArea.laserTool._x - 35; closestY = curSurgery.activeArea.laserTool._y - 35; xCurve = -100; yCurve = -100; curSurgery.activeArea.liner.removeMovieClip(); g = curSurgery.activeArea.createEmptyMovieClip('liner', _root.k++); randomCurve = random(100) - 25; randomColor = 1118541; g.lineStyle(10, randomColor, 100); g.moveTo(xCurve, yCurve); g.curveTo(xCurve + randomCurve, yCurve + randomCurve, closestX, closestY); g.lineStyle(4, randomColor * 2, 100); g.moveTo(xCurve, yCurve); g.curveTo(xCurve + randomCurve, yCurve + randomCurve, closestX, closestY); } else { curSurgery.activeArea.liner.removeMovieClip(); } instruct('Restimulate the tissue area.'); } if (curStep == 10) { curSurgery.activeArea.hook._x = _xmouse; curSurgery.activeArea.hook._y = _ymouse; i = 0; while (i < 5) { curIn = curSurgery.activeArea['r' + i]; if (curIn.hitA.hitTest(_xmouse, _ymouse) && holdMouse && curStepCount == i) { curIn.play(); ++curStepCount; shel = curSurgery.activeArea.attachMovie('hookAnimation', 'kook' + k, k++); shel._x = curIn._x + curIn.hitA._x; shel._y = curIn._y + curIn.hitA._y; curSurgery.activeArea.hook._visible = false; if (curStepCount == 5) { curStepCount = 0; splat = false; curSurgery.activeArea.nextFrame(); nextStep(); } } ++i; } instruct('Reattach the leg with stitching.'); } if (curStep == 11) { win(); } if (curStep == 1000) { curSurgery.activeArea.sedateScreen.syringe._x = _xmouse; curSurgery.activeArea.sedateScreen.syringe._y = _ymouse; curSurgery.bar.instructions.text = 'Sedate the patient.'; } if (curStep == 1001) { if (curSurgery.activeArea.sedateScreen.syringe._currentframe > 10 && curSurgery.activeArea.sedateScreen.syringe._currentframe < 20) { sedation += 5; if (sedation > 100) { sedation = 100; } } if (curSurgery.activeArea.sedateScreen.syringe._currentframe == curSurgery.activeArea.sedateScreen.syringe._totalframes) { curSurgery.activeArea.sedateScreen.play(); nextStep(); } } if (curStep == 1002) { if (curSurgery.activeArea.sedateScreen._currentframe == curSurgery.activeArea.sedateScreen._totalframes) { curSurgery.activeArea.sedateScreen.removeMovieClip(); curStep = holdStep; trace('Current Step is now [' + curStep + ']'); } } } function mouseDownFn() { if (curStep == 0) { if (curSurgery.activeArea.uplink.hitA.hitTest(curSurgery.activeArea.pointer.hitA)) { curSurgery.activeArea.uplink.play(); curSurgery.activeArea.nextFrame(); nextStep(); } } if (curStep == 3) { if (curSurgery.activeArea.ankle.foot.hitTest(_xmouse, _ymouse)) { footPut = true; } else { footPut = false; } } if (curStep == 4 || curStep == 5 || curStep == 6) { if (curSurgery.activeArea.tweezers.hitA.hitTest(curSurgery.activeArea.bandage)) { bandageFollow = true; } else { bandageFollow = false; } } if (curStep == 8) { if (curSurgery.activeArea.foot.hitTest(_xmouse, _ymouse)) { curSurgery.activeArea.foot.startDrag(); } else { curSurgery.activeArea.foot.stopDrag(); } curStepCount = 0; } if (curStep == 1000) { if (curSurgery.activeArea.sedateScreen.syringe.hitA.hitTest(curSurgery.activeArea.sedateScreen.point.pointer.hitA)) { curSurgery.activeArea.sedateScreen.syringe.play(); curSurgery.activeArea.sedateScreen.painLoop.play(); nextStep(); } } } function mouseUpFn() { if (curStep == 3) { footPut = false; } if (curStep == 4 || curStep == 5 || curStep == 6) { bandageFollow = false; if (curSurgery.activeArea.bandage.hitA.hitTest(curSurgery.activeArea.hitA)) { curSurgery.activeArea.nextFrame(); nextStep(); } } if (curStep == 8) { curSurgery.activeArea.foot.stopDrag(); if (curSurgery.activeArea.foot.hitA.hitTest(curSurgery.activeArea.footA)) { curSurgery.activeArea.nextFrame(); nextStep(); } } } function rotPoint(xPoint1, yPoint1, xPoint2, yPoint2) { degrees = Math.atan(Math.abs(yPoint1 - yPoint2) / Math.abs(xPoint1 - xPoint2)) * 57.29577951308232; if (xPoint1 < xPoint2) { if (yPoint1 < yPoint2) { return +degrees; } else { if (yPoint1 > yPoint2) { return -degrees; } } } else { if (xPoint1 > xPoint2) { if (yPoint1 < yPoint2) { return 180 - degrees; } else { if (yPoint1 > yPoint2) { return 180 + degrees; } } } } } function rotMC(mc1, mc2) { rotPoint(mc1._x, mc1._y, mc2._x, mc2._y); } cStatus = 1; nmbr = 0; fps = 0; aad = 0; setInterval(inc, 1000); var health = 50; var sedation = 30; var heartRate = 100; var curStep = 0; var holdStep = 0; var sedationCounter = 0; var sedateMode = false; var k = 0; var hPoint = 0; var healthData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var sedationData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var heartData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var sedX = 0; curSurgery.bar.area0.graphArea.attachBitmap(healthData, _root.k++); curSurgery.bar.area1.graphArea.attachBitmap(sedationData, _root.k++); curSurgery.bar.area2.graphArea.attachBitmap(heartData, _root.k++); var chart0 = new Array(); var chart1 = new Array(); var chart2 = new Array(); var heartBeat = new Array(); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(16); heartBeat.push(16); heartBeat.push(17); heartBeat.push(18); heartBeat.push(20); heartBeat.push(24); heartBeat.push(7); heartBeat.push(11); heartBeat.push(14); heartBeat.push(18); heartBeat.push(15); heartBeat.push(13); heartBeat.push(14); heartBeat.push(14); heartBeat.push(15); var curMonth = '02'; var curDay = '23'; var curYear = '2008'; var curHour = '18'; var curMin = '10'; var curSec = '23'; var curMili = '00'; var tMonth = 1; var tDay = 26; var tYear = 1417; var tHour = 21; var tMin = 22; var tSec = 43; var tMili = 50; var curSurg = 0; var plugged = false; var upH = 0; var upS = 0; var upHR = 0; var upHC = 0; var upSC = 1; var upHRC = 2; var upC = 10; var loadParts = new Array('*---', '-*--', '--*-', '---*'); j = 0; while (j < 120) { monitors(); ++j; } Mouse.hide(); onEnterFrame = function () { monitors(); if (cStatus == 1) { threadPoint(); surgInfo(); active(); sedationDecrease(); healthDecrease(); curSurgery.cursor._x = _xmouse; curSurgery.cursor._y = _ymouse; ++aad; } }; onMouseDown = function () { mouseDownFn(); holdMouse = true; }; onMouseUp = function () { mouseUpFn(); holdMouse = false; }; } movieClip 929 { } movieClip 930 { frame 140 { _parent.nextFrame(); } } movieClip 935 { frame 16 { stop(); } } movieClip 945 { } movieClip 947 { } movieClip 948 { } movieClip 950 { frame 10 { stop(); } frame 20 { _parent.nextFrame(); } frame 25 { _parent.swapDepths(_root.k++); _parent.removeMovieClip(); } } movieClip 951 { frame 1 { stop(); } } movieClip 956 { } movieClip 963 { } movieClip 964 { frame 57 { stop(); } } movieClip 969 { } movieClip 973 { } movieClip 986 { } movieClip 993 { frame 1 { stop(); onEnterFrame = function () { curFrame = _currentframe; }; } frame 10 { _root.instruct('Place cast parts into form.'); } } movieClip 997 { } movieClip 1003 { } movieClip 1004 { } movieClip 1005 { frame 1 { stop(); } frame 12 { stop(); } } movieClip 1026 { frame 1 { onEnterFrame = function () { while (tap == oldTap) { tap = random(10) + 2; } gotoAndStop(tap); oldTap = tap; }; tap = 1; oldTap = 1; } } movieClip 1027 { } movieClip 1028 { } movieClip 1029 { } movieClip 1030 { } button 1034 { on (release) { _root.triggerSedation(); } } movieClip 1035 { } movieClip 1036 { } movieClip 1037 { } frame 12 { function inc() { fps = 'Frames per Second: ' + aad; nmbr = aad; aad = 0; } function active() { if (curStep == 0) { instruct('Remove the plug.'); } if (curStep == 1) { instruct('Try again to pull the plug.'); } if (curStep == 2) { curStepCount = 0; instruct('Ignore the computer, keep trying.'); } if (curStep == 3) { curSurgery.activeArea.hook._x = _xmouse; curSurgery.activeArea.hook._y = _ymouse; i = 0; while (i < 6) { curIn = curSurgery.activeArea['w' + i]; if (curIn.hitA.hitTest(_xmouse, _ymouse) && holdMouse && curStepCount == i) { curIn.play(); ++curStepCount; shel = curSurgery.activeArea.attachMovie('hookAnimation', 'kook' + k, k++); shel._x = curIn._x + curIn.hitA._x; shel._y = curIn._y + curIn.hitA._y; curSurgery.activeArea.hook._visible = false; if (curStepCount == 6) { curStepCount = 0; splat = false; newMessage('I show displeasure in your actions.'); curSurgery.activeArea.nextFrame(); nextStep(); } } ++i; } instruct('Quickly restitch the area!'); } if (curStep == 4) { instruct('Try pulling the plug again.'); } if (curStep == 5) { stagger = true; staggerCursor(); curSurgery.activeArea.hook._x = curSurgery.activeArea.cursor._x; curSurgery.activeArea.hook._y = curSurgery.activeArea.cursor._y; i = 0; while (i < 6) { curIn = curSurgery.activeArea['w' + i]; if (curIn.hitA.hitTest(curSurgery.cursor._x, curSurgery.cursor._y) && holdMouse && curStepCount == i) { curIn.play(); ++curStepCount; shel = curSurgery.activeArea.attachMovie('hookAnimation', 'kook' + k, k++); shel._x = curIn._x + curIn.hitA._x; shel._y = curIn._y + curIn.hitA._y; curSurgery.activeArea.hook._visible = false; if (curStepCount == 6) { curStepCount = 0; splat = false; newMessage('I need you as a vessel. Cease struggle. You are my project now.'); curSurgery.activeArea.nextFrame(); nextStep(); } } ++i; } instruct('Restitch new wound opening!'); } if (curStep == 7) { moreStagger = true; staggerCursor(); curSurgery.activeArea.hook._x = curSurgery.activeArea.cursor._x; curSurgery.activeArea.hook._y = curSurgery.activeArea.cursor._y; i = 0; while (i < 6) { curIn = curSurgery.activeArea['w' + i]; if (curIn.hitA.hitTest(curSurgery.cursor._x, curSurgery.cursor._y) && holdMouse && curStepCount == i) { curIn.play(); ++curStepCount; shel = curSurgery.activeArea.attachMovie('hookAnimation', 'kook' + k, k++); shel._x = curIn._x + curIn.hitA._x; shel._y = curIn._y + curIn.hitA._y; curSurgery.activeArea.hook._visible = false; if (curStepCount == 6) { curStepCount = 0; splat = false; newMessage('I cannot tolerate this.'); curSurgery.activeArea.nextFrame(); nextStep(); } } ++i; } instruct('Restitch, try to focus.'); } if (curStep == 8) { instruct('Grab the saw handle. Just do it.'); } if (curStep == 9) { instruct('Remove the arm, it\'s your only hope!'); if (sawDown && curSurgery.activeArea.saw.saw._x != sawOldX) { sawPoints += Math.floor(Math.abs(curSurgery.activeArea.saw._x - sawOldX) / 100); trace(sawPoints); curSurgery.activeArea.saw._y = baselineSaw + sawPoints / 2; ++sawCounter; if (sawCounter == sawGoal) { sawGoal = random(50) + 20; sawCounter = 0; sawSound.start(0, 1); } } sawOldX = curSurgery.activeArea.saw.saw._x; if (!sawTrigger0 && sawPoints > 1) { sawTrigger0 = true; newMessage('I cannot continue with you.'); curSurgery.activeArea.nextFrame(); trace('ST0'); } if (!sawTrigger1 && sawPoints > 23) { newMessage('We can save others.'); curSurgery.activeArea.nextFrame(); sawTrigger1 = true; trace('ST1'); } if (!sawTrigger2 && sawPoints > 46) { newMessage('I cannot come back.'); sawTrigger2 = true; curSurgery.activeArea.nextFrame(); trace('ST2'); } if (!sawTrigger3 && sawPoints > 69) { sawTrigger3 = true; curSurgery.activeArea.nextFrame(); newMessage('This is the only chance.'); trace('ST3'); } if (!sawTrigger4 && sawPoints > 92) { sawTrigger4 = true; trace('ST4'); newMessage('You cannot save life without dedicating...yours...'); } if (!sawTrigger5 && sawPoints > 115) { sawTrigger5 = true; curSurgery.activeArea.nextFrame(); nextStep(); _root.curSurgery.cursor._visible = false; _root.curSurgery.bar._visible = false; stopAllSounds(); trace('ST5'); } } if (curStep == 10) { curSurgery.activeArea.saw.saw.stopDrag(); win(); } if (curStep == 1000) { curSurgery.activeArea.sedateScreen.syringe._x = _xmouse; curSurgery.activeArea.sedateScreen.syringe._y = _ymouse; curSurgery.bar.instructions.text = 'Sedate the patient.'; } if (curStep == 1001) { if (curSurgery.activeArea.sedateScreen.syringe._currentframe > 10 && curSurgery.activeArea.sedateScreen.syringe._currentframe < 20) { sedation += 5; if (sedation > 100) { sedation = 100; } } if (curSurgery.activeArea.sedateScreen.syringe._currentframe == curSurgery.activeArea.sedateScreen.syringe._totalframes) { curSurgery.activeArea.sedateScreen.play(); nextStep(); } } if (curStep == 1002) { if (curSurgery.activeArea.sedateScreen._currentframe == curSurgery.activeArea.sedateScreen._totalframes) { curSurgery.activeArea.sedateScreen.removeMovieClip(); curStep = holdStep; trace('Current Step is now [' + curStep + ']'); } } } function staggerCursor() { if (moreStagger) { curSurgery.cursor._x += random(10) - 5; curSurgery.cursor._y += random(10) - 5; } else { curSurgery.cursor._x += random(6) - 3; curSurgery.cursor._y += random(6) - 3; } } function mouseDownFn() { if (curStep == 0) { if (curSurgery.activeArea.hitA.hitTest(_xmouse, _ymouse)) { newMessage('We are not done. Please do not leave.'); nextStep(); curSurgery.activeArea.nextFrame(); } } else { if (curStep == 1) { if (curSurgery.activeArea.hitA.hitTest(_xmouse, _ymouse)) { newMessage('I cannot allow that. Stop or face negative consequence A.'); nextStep(); curSurgery.activeArea.nextFrame(); } } else { if (curStep == 2) { if (curSurgery.activeArea.hitA.hitTest(_xmouse, _ymouse)) { newMessage('You are not leaving. Cease or face further consequence B.'); nextStep(); curSurgery.activeArea.nextFrame(); } } } } if (curStep == 4) { if (curSurgery.activeArea.hitA2.hitTest(_xmouse, _ymouse)) { newMessage('I will now be disrupting your senses. Cease immediately.'); nextStep(); curSurgery.activeArea.nextFrame(); } } if (curStep == 6) { if (curSurgery.activeArea.hitA.hitTest(_xmouse, _ymouse)) { newMessage('I will now start disabling your senses.'); nextStep(); curSurgery.activeArea.nextFrame(); } } if (curStep == 8) { if (curSurgery.activeArea.saw.saw.hitA.hitTest(_xmouse, _ymouse)) { startDrag(curSurgery.activeArea.saw.saw, false, -200, curSurgery.activeArea.saw.saw._y, 100, curSurgery.activeArea.saw.saw._y); curSurgery.activeArea.saw._rotation = -4; sawOldX = curSurgery.activeArea.saw.saw._x; sawDown = true; curSurgery.activeArea.nextFrame(); nextStep(); } } if (curStep == 9) { if (curSurgery.activeArea.saw.saw.hitA.hitTest(_xmouse, _ymouse)) { startDrag(curSurgery.activeArea.saw.saw, false, -200, curSurgery.activeArea.saw.saw._y, 100, curSurgery.activeArea.saw.saw._y); curSurgery.activeArea.saw._rotation = -4; sawOldX = curSurgery.activeArea.saw.saw._x; sawDown = true; } } if (curStep == 1000) { if (curSurgery.activeArea.sedateScreen.syringe.hitA.hitTest(curSurgery.activeArea.sedateScreen.point.pointer.hitA)) { curSurgery.activeArea.sedateScreen.syringe.play(); curSurgery.activeArea.sedateScreen.painLoop.play(); nextStep(); } } } function mouseUpFn() { if (curStep == 8) { curSurgery.activeArea.saw.saw.stopDrag(); curSurgery.activeArea.saw._rotation = 0; sawDown = false; } } function generateMessage() { ++textPosition; _root.myText = curMessage.slice(0, textPosition) + randomChar[textPosition % 2]; if (textPosition < curMessage.length) { textDraw2.start(0, 1); } } function newMessage(newMess) { textPosition = 0; curMessage = newMess; } cStatus = 1; nmbr = 0; fps = 0; aad = 0; setInterval(inc, 1000); var health = 50; var sedation = 30; var heartRate = 100; var curStep = 0; var holdStep = 0; var sedationCounter = 0; var sedateMode = false; var k = 0; var hPoint = 0; var healthData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var sedationData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var heartData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var sedX = 0; curSurgery.bar.area0.graphArea.attachBitmap(healthData, _root.k++); curSurgery.bar.area1.graphArea.attachBitmap(sedationData, _root.k++); curSurgery.bar.area2.graphArea.attachBitmap(heartData, _root.k++); var chart0 = new Array(); var chart1 = new Array(); var chart2 = new Array(); var heartBeat = new Array(); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(16); heartBeat.push(16); heartBeat.push(17); heartBeat.push(18); heartBeat.push(20); heartBeat.push(24); heartBeat.push(7); heartBeat.push(11); heartBeat.push(14); heartBeat.push(18); heartBeat.push(15); heartBeat.push(13); heartBeat.push(14); heartBeat.push(14); heartBeat.push(15); var curMonth = '02'; var curDay = '23'; var curYear = '2008'; var curHour = '18'; var curMin = '10'; var curSec = '23'; var curMili = '00'; var tMonth = 6; var tDay = 23; var tYear = 2008; var tHour = 18; var tMin = 10; var tSec = 23; var tMili = 50; var curSurg = 0; var plugged = false; var upH = 0; var upS = 0; var upHR = 0; var upHC = 0; var upSC = 1; var upHRC = 2; var upC = 10; var loadParts = new Array('*---', '-*--', '--*-', '---*'); j = 0; while (j < 120) { monitors(); ++j; } var sawSound = new Sound(this); sawSound.attachSound('sawThing'); sawGoal = 10; sawCounter = 0; Mouse.hide(); sawPoints = 0; baselineSaw = -30; sawTrigger0 = false; sawTrigger1 = false; sawTrigger2 = false; sawTrigger3 = false; sawTrigger4 = false; var staggerX = 0; var staggerY = 0; moreStagger = false; var stagger = false; var textDraw2 = new Sound(this); textDraw2.attachSound('ticker'); var randomChar = new Array('_', ' '); var textPosition = 0; newMessage('What are you doing?'); onEnterFrame = function () { monitors(); if (cStatus == 1) { threadPoint(); surgInfo(); active(); sedationDecrease(); generateMessage(); curSurgery.cursor._x = _xmouse; curSurgery.cursor._y = _ymouse; if (stagger) { staggerCursor(); } ++aad; } }; onMouseDown = function () { mouseDownFn(); holdMouse = true; }; onMouseUp = function () { mouseUpFn(); holdMouse = false; }; } movieClip 1045 { } movieClip 1046 { frame 6 { _parent.nextFrame(); } frame 16 { this.stop(); } } movieClip 1052 { } movieClip 1053 { } movieClip 1057 { frame 90 { stop(); } } movieClip 1058 { frame 6 { stop(); } } movieClip 1063 { } movieClip 1064 { frame 6 { _parent.nextFrame(); } frame 15 { this.stop(); } } movieClip 1075 { } movieClip 1076 { } movieClip 1079 { } movieClip 1080 { frame 6 { _root.curSurgery.activeArea.nextFrame(); } frame 15 { stop(); } } movieClip 1083 { } movieClip 1084 { frame 5 { stop(); } } movieClip 1094 { } movieClip 1095 { } movieClip 1100 { } movieClip 1101 { frame 5 { stop(); } } // unknown tag 88 length 49 movieClip 1107 { } movieClip 1108 { } movieClip 1115 { } movieClip 1116 { } movieClip 1117 { } movieClip 1122 { } movieClip 1123 { frame 8 { stop(); } } movieClip 1124 { frame 1 { stop(); onEnterFrame = function () { if (Key.isDown(37)) { trace(this._currentframe); } }; } } movieClip 1125 { } movieClip 1126 { } movieClip 1130 { } movieClip 1131 { frame 1 { stop(); onEnterFrame = function () { if (_root.stagger) { play(); } }; } } movieClip 1132 { } frame 13 { function inc() { fps = 'Frames per Second: ' + aad; nmbr = aad; aad = 0; } function nextStep() { ++curStep; trace('Current Step is now [' + curStep + ']'); } function active() { if (curStep == 0) { curSurgery.activeArea.knife._x = _xmouse; curSurgery.activeArea.knife._y = _ymouse; if (holdMouse) { curSurgery.activeArea.knife.gotoAndStop(2); } else { curSurgery.activeArea.knife.gotoAndStop(1); } i = 0; while (i < 2) { curIn = curSurgery.activeArea['w' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.knife.hitA) && holdMouse) { if (i == curStepCount) { curIn.play(); curSurgery.activeArea.nextFrame(); ++curStepCount; } if (curStepCount == 2) { curStepCount = 0; nextStep(); } } ++i; } } if (curStep == 1) { curSurgery.activeArea.knife._x = _xmouse; curSurgery.activeArea.knife._y = _ymouse; if (holdMouse) { curSurgery.activeArea.knife.gotoAndStop(2); } else { curSurgery.activeArea.knife.gotoAndStop(1); } i = 0; while (i < 2) { curIn = curSurgery.activeArea['x' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.knife.hitA) && holdMouse) { if (i == curStepCount) { curIn.play(); curSurgery.activeArea.nextFrame(); ++curStepCount; } if (curStepCount == 2) { curStepCount = 0; nextStep(); } } ++i; } } if (curStep == 2) { curSurgery.activeArea.rag._x = _xmouse; curSurgery.activeArea.rag._y = _ymouse; i = 0; while (i < 10) { curIn = curSurgery.activeArea['p' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.rag.hitA) && holdMouse) { curIn.play(); ++curStepCount; if (curStepCount == 1) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 3) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 6) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 9) { curSurgery.activeArea.nextFrame(); curStepCount = 0; nextStep(); } } ++i; } } if (curStep == 3) { curSurgery.activeArea.rag._x = _xmouse; curSurgery.activeArea.rag._y = _ymouse; i = 0; while (i < 10) { curIn = curSurgery.activeArea['q' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.rag.hitA) && holdMouse) { curIn.play(); ++curStepCount; if (curStepCount == 1) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 3) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 6) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 9) { curSurgery.activeArea.nextFrame(); curStepCount = 0; nextStep(); } } ++i; } } if (curStep == 4) { win(); } } function mouseDownFn() { if (curStep == 1000) { if (curSurgery.activeArea.sedateScreen.syringe.hitA.hitTest(curSurgery.activeArea.sedateScreen.point.pointer.hitA)) { curSurgery.activeArea.sedateScreen.syringe.play(); curSurgery.activeArea.sedateScreen.painLoop.play(); nextStep(); } } } function mouseUpFn() { if (curStep == 2) { curSurgery.activeArea.pipe.stopDrag(); } } cStatus = 1; nmbr = 0; fps = 0; aad = 0; setInterval(inc, 1000); var health = 50; var sedation = 30; var heartRate = 100; var curStep = 0; var holdStep = 0; var sedationCounter = 0; var sedateMode = false; var k = 0; var hPoint = 0; var healthData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var sedationData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var heartData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var sedX = 0; curSurgery.bar.area0.graphArea.attachBitmap(healthData, _root.k++); curSurgery.bar.area1.graphArea.attachBitmap(sedationData, _root.k++); curSurgery.bar.area2.graphArea.attachBitmap(heartData, _root.k++); var chart0 = new Array(); var chart1 = new Array(); var chart2 = new Array(); var heartBeat = new Array(); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(16); heartBeat.push(16); heartBeat.push(17); heartBeat.push(18); heartBeat.push(20); heartBeat.push(24); heartBeat.push(7); heartBeat.push(11); heartBeat.push(14); heartBeat.push(18); heartBeat.push(15); heartBeat.push(13); heartBeat.push(14); heartBeat.push(14); heartBeat.push(15); var curMonth = '02'; var curDay = '23'; var curYear = '2008'; var curHour = '18'; var curMin = '10'; var curSec = '23'; var curMili = '00'; var tMonth = 6; var tDay = 23; var tYear = 2008; var tHour = 18; var tMin = 10; var tSec = 23; var tMili = 50; var curSurg = 0; var plugged = false; var upH = 0; var upS = 0; var upHR = 0; var upHC = 0; var upSC = 1; var upHRC = 2; var upC = 10; var loadParts = new Array('*---', '-*--', '--*-', '---*'); j = 0; while (j < 120) { monitors(); ++j; } Mouse.hide(); stop1Done = false; stop2Done = false; stop3Done = false; stop4Done = false; stop5Done = false; stop6Done = false; stop7Done = false; curStepCount = 0; onEnterFrame = function () { monitors(); if (cStatus == 1) { threadPoint(); surgInfo(); active(); sedationDecrease(); curSurgery.cursor._x = _xmouse; curSurgery.cursor._y = _ymouse; } ++aad; }; onMouseDown = function () { mouseDownFn(); holdMouse = true; }; onMouseUp = function () { mouseUpFn(); holdMouse = false; }; } movieClip 1135 { frame 1 { this._alpha = 0; } } movieClip 1136 { frame 1 { this._visible = false; goal = random(20) + 5; counter = 0; onEnterFrame = function () { if (counter >= goal) { this._visible = true; this.play(); onEnterFrame = null; } ++counter; }; stop(); } frame 16 { stop(); } frame 28 { this.swapDepths(_root.k++); this.removeMovieClip(); } } movieClip 1141 { } movieClip 1143 { frame 50 { stop(); } } movieClip 1148 { } movieClip 1149 { frame 60 { stop(); } } movieClip 1166 { frame 1 { stop(); } } movieClip 1167 { } frame 14 { function inc() { fps = 'Frames per Second: ' + aad; nmbr = aad; aad = 0; } function nextStep() { ++curStep; trace('Current Step is now [' + curStep + ']'); } function active() { if (curStep == 0) { if (curSurgery.activeArea.hitWalls.hitTest(curSurgery.activeArea.pipe._x + curSurgery.activeArea.pipe.hitA._x, curSurgery.activeArea.pipe._y + curSurgery.activeArea.pipe.hitA._y, true) || curSurgery.activeArea.hitWalls.hitTest(curSurgery.activeArea.pipe._x + curSurgery.activeArea.pipe.hitA2._x, curSurgery.activeArea.pipe._y + curSurgery.activeArea.pipe.hitA2._y, true)) { curSurgery.activeArea.pipe._x = curSurgery.activeArea.pipe.oldX; curSurgery.activeArea.pipe._y = curSurgery.activeArea.pipe.oldY; curSurgery.activeArea.pipe.stopDrag(); } if (curSurgery.activeArea.hitWalls.hitTest(curSurgery.activeArea.pipe._x + curSurgery.activeArea.pipe.hitA3._x, curSurgery.activeArea.pipe._y + curSurgery.activeArea.pipe.hitA3._y, true)) { curSurgery.activeArea.pipe._x = curSurgery.activeArea.pipe.oldX; curSurgery.activeArea.pipe._y = curSurgery.activeArea.pipe.oldY; curSurgery.activeArea.pipe.stopDrag(); } if (curSurgery.activeArea.pipe.hitA4.hitTest(curSurgery.activeArea.pipePoint)) { curSurgery.activeArea.nextFrame(); curStepCount = 0; curSurgery.activeArea.pipe.stopDrag(); nextStep(); } } if (curStep == 1) { curSurgery.activeArea.rag._x = _xmouse; curSurgery.activeArea.rag._y = _ymouse; i = 0; while (i < 10) { curIn = curSurgery.activeArea['q' + i]; if (curIn.hitA.hitTest(curSurgery.activeArea.rag.hitA) && holdMouse) { curIn.play(); ++curStepCount; if (curStepCount == 1) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 3) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 6) { curSurgery.activeArea.nextFrame(); } if (curStepCount == 9) { curSurgery.activeArea.nextFrame(); curStepCount = 0; nextStep(); } } ++i; } } if (curStep == 2) { curSurgery.activeArea.hook._x = _xmouse; curSurgery.activeArea.hook._y = _ymouse; i = 0; while (i < 7) { curIn = curSurgery.activeArea['w' + i]; if (curIn.hitA.hitTest(_xmouse, _ymouse) && holdMouse && curStepCount == i) { curIn.play(); ++curStepCount; shel = curSurgery.activeArea.attachMovie('hookAnimation', 'kook' + k, k++); shel._x = curIn._x + curIn.hitA._x; shel._y = curIn._y + curIn.hitA._y; curSurgery.activeArea.hook._visible = false; if (curStepCount == 7) { curStepCount = 0; splat = false; curSurgery.activeArea.nextFrame(); nextStep(); } } ++i; } } if (curStep == 3) { win(); } if (curStep == 1000) { curSurgery.activeArea.sedateScreen.syringe._x = _xmouse; curSurgery.activeArea.sedateScreen.syringe._y = _ymouse; curSurgery.bar.instructions.text = 'Sedate the patient.'; } if (curStep == 1001) { if (curSurgery.activeArea.sedateScreen.syringe._currentframe > 10 && curSurgery.activeArea.sedateScreen.syringe._currentframe < 20) { sedation += 5; if (sedation > 100) { sedation = 100; } } if (curSurgery.activeArea.sedateScreen.syringe._currentframe == curSurgery.activeArea.sedateScreen.syringe._totalframes) { curSurgery.activeArea.sedateScreen.play(); nextStep(); } } if (curStep == 1002) { if (curSurgery.activeArea.sedateScreen._currentframe == curSurgery.activeArea.sedateScreen._totalframes) { curSurgery.activeArea.sedateScreen.removeMovieClip(); curStep = holdStep; trace('Current Step is now [' + curStep + ']'); } } } function mouseDownFn() { if (curStep == 0) { if (curSurgery.activeArea.pipe.hitTest(_xmouse, _ymouse, true)) { curSurgery.activeArea.pipe.startDrag(); } } if (curStep == 1000) { if (curSurgery.activeArea.sedateScreen.syringe.hitA.hitTest(curSurgery.activeArea.sedateScreen.point.pointer.hitA)) { curSurgery.activeArea.sedateScreen.syringe.play(); curSurgery.activeArea.sedateScreen.painLoop.play(); nextStep(); } } } function mouseUpFn() { if (curStep == 0) { curSurgery.activeArea.pipe.stopDrag(); } } cStatus = 1; nmbr = 0; fps = 0; aad = 0; setInterval(inc, 1000); var health = 50; var sedation = 30; var heartRate = 100; var curStep = 0; var holdStep = 0; var sedationCounter = 0; var sedateMode = false; var k = 0; var hPoint = 0; var healthData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var sedationData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var heartData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var sedX = 0; curSurgery.bar.area0.graphArea.attachBitmap(healthData, _root.k++); curSurgery.bar.area1.graphArea.attachBitmap(sedationData, _root.k++); curSurgery.bar.area2.graphArea.attachBitmap(heartData, _root.k++); var chart0 = new Array(); var chart1 = new Array(); var chart2 = new Array(); var heartBeat = new Array(); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(16); heartBeat.push(16); heartBeat.push(17); heartBeat.push(18); heartBeat.push(20); heartBeat.push(24); heartBeat.push(7); heartBeat.push(11); heartBeat.push(14); heartBeat.push(18); heartBeat.push(15); heartBeat.push(13); heartBeat.push(14); heartBeat.push(14); heartBeat.push(15); var curMonth = '02'; var curDay = '23'; var curYear = '2008'; var curHour = '18'; var curMin = '10'; var curSec = '23'; var curMili = '00'; var tMonth = 6; var tDay = 23; var tYear = 2008; var tHour = 18; var tMin = 10; var tSec = 23; var tMili = 50; var curSurg = 0; var plugged = false; var upH = 0; var upS = 0; var upHR = 0; var upHC = 0; var upSC = 1; var upHRC = 2; var upC = 10; var loadParts = new Array('*---', '-*--', '--*-', '---*'); j = 0; while (j < 120) { monitors(); ++j; } Mouse.hide(); stop1Done = false; stop2Done = false; stop3Done = false; stop4Done = false; stop5Done = false; stop6Done = false; stop7Done = false; curStepCounter = 0; onEnterFrame = function () { monitors(); if (cStatus == 1) { monitors(); threadPoint(); surgInfo(); active(); sedationDecrease(); curSurgery.cursor._x = _xmouse; curSurgery.cursor._y = _ymouse; } ++aad; }; onMouseDown = function () { mouseDownFn(); holdMouse = true; }; onMouseUp = function () { mouseUpFn(); holdMouse = false; }; } movieClip 1173 { frame 1 { oldX = this._x; oldY = this._y; } } movieClip 1175 { } movieClip 1178 { frame 1 { this._visible = false; goal = random(20) + 5; counter = 0; onEnterFrame = function () { if (counter >= goal) { this._visible = true; this.play(); onEnterFrame = null; } ++counter; }; stop(); } frame 16 { stop(); } frame 28 { this.swapDepths(_root.k++); this.removeMovieClip(); } } movieClip 1187 { frame 1 { stop(); } } movieClip 1188 { } frame 15 { function inc() { fps = 'Frames per Second: ' + aad; nmbr = aad; aad = 0; } function nextStep() { ++curStep; trace('Current Step is now [' + curStep + ']'); } function active() { if (curStep == 0) { if (holdMouse) { curSurgery.activeArea.tweezers.gotoAndStop(2); } else { curSurgery.activeArea.tweezers.gotoAndStop(1); } if (holdMouse) { if (!oldTick.pulled) { if (dist(oldX, oldY, oldTick._x, oldTick._y) > 150) { oldTick.pulled = true; } } else { oldTick._x = _xmouse - centerX; oldTick._y = _ymouse - centerY; curSurgery.activeArea.tweezers._x = _xmouse; curSurgery.activeArea.tweezers._y = _ymouse; curSurgery.cursor._x = _xmouse; curSurgery.cursor._y = _ymouse; } oldX = _xmouse; oldY = _ymouse; } else { curSurgery.activeArea.tweezers._x = _xmouse; curSurgery.activeArea.tweezers._y = _ymouse; curSurgery.cursor._x = _xmouse; curSurgery.cursor._y = _ymouse; } totalTicks = 0; i = 0; while (i < 6) { totTick = curSurgery.activeArea['tick' + i]; if (totTick.hitA.hitTest(curSurgery.activeArea.tray.hitA)) { ++totalTicks; } ++i; } if (totalTicks == 6 && !holdMouse) { win(); } } if (curStep == 1000) { curSurgery.activeArea.sedateScreen.syringe._x = _xmouse; curSurgery.activeArea.sedateScreen.syringe._y = _ymouse; curSurgery.bar.instructions.text = 'Sedate the patient.'; } if (curStep == 1001) { if (curSurgery.activeArea.sedateScreen.syringe._currentframe > 10 && curSurgery.activeArea.sedateScreen.syringe._currentframe < 20) { sedation += 5; if (sedation > 100) { sedation = 100; } } if (curSurgery.activeArea.sedateScreen.syringe._currentframe == curSurgery.activeArea.sedateScreen.syringe._totalframes) { curSurgery.activeArea.sedateScreen.play(); nextStep(); } } if (curStep == 1002) { if (curSurgery.activeArea.sedateScreen._currentframe == curSurgery.activeArea.sedateScreen._totalframes) { curSurgery.activeArea.sedateScreen.removeMovieClip(); curStep = holdStep; trace('Current Step is now [' + curStep + ']'); } } } function mouseDownFn() { if (curStep == 0) { foundOne = false; r = 0; while (r < 7) { curTick = curSurgery.activeArea['tick' + r]; if (curTick.hitTest(_xmouse, _ymouse)) { centerX = _xmouse - curTick._x; centerY = _ymouse - curTick._y; oldX = _xmouse; oldY = _ymouse; oldTick = curTick; foundOne = true; break; } ++r; } if (!foundOne) { oldTick = curSurgery.activeArea.tick100; oldX = 0; oldY = 0; } } if (curStep == 1) { } if (curStep == 1000) { if (curSurgery.activeArea.sedateScreen.syringe.hitA.hitTest(curSurgery.activeArea.sedateScreen.point.pointer.hitA)) { curSurgery.activeArea.sedateScreen.syringe.play(); curSurgery.activeArea.sedateScreen.painLoop.play(); nextStep(); } } } function mouseUpFn() { if (curStep == 0) { r = 0; while (r < 7) { curTick = curSurgery.activeArea['tick' + r]; if (curTick.hitTest(_xmouse, _ymouse)) { curTick.stopDrag(); break; } ++r; } } } function dist(x1, y1, x2, y2) { return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); } cStatus = 1; nmbr = 0; fps = 0; aad = 0; setInterval(inc, 1000); var health = 50; var sedation = 30; var heartRate = 100; var curStep = 0; var holdStep = 0; var sedationCounter = 0; var sedateMode = false; var k = 0; var hPoint = 0; var healthData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var sedationData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var heartData = new flash.display.BitmapData(120, 30, false, 4278190080.0); var sedX = 0; curSurgery.bar.area0.graphArea.attachBitmap(healthData, _root.k++); curSurgery.bar.area1.graphArea.attachBitmap(sedationData, _root.k++); curSurgery.bar.area2.graphArea.attachBitmap(heartData, _root.k++); var chart0 = new Array(); var chart1 = new Array(); var chart2 = new Array(); var heartBeat = new Array(); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(15); heartBeat.push(16); heartBeat.push(16); heartBeat.push(17); heartBeat.push(18); heartBeat.push(20); heartBeat.push(24); heartBeat.push(7); heartBeat.push(11); heartBeat.push(14); heartBeat.push(18); heartBeat.push(15); heartBeat.push(13); heartBeat.push(14); heartBeat.push(14); heartBeat.push(15); var curMonth = '02'; var curDay = '23'; var curYear = '2008'; var curHour = '18'; var curMin = '10'; var curSec = '23'; var curMili = '00'; var tMonth = 6; var tDay = 23; var tYear = 2008; var tHour = 18; var tMin = 10; var tSec = 23; var tMili = 50; var curSurg = 0; var plugged = false; var upH = 0; var upS = 0; var upHR = 0; var upHC = 0; var upSC = 1; var upHRC = 2; var upC = 10; var loadParts = new Array('*---', '-*--', '--*-', '---*'); j = 0; while (j < 120) { monitors(); ++j; } Mouse.hide(); stop1Done = false; stop2Done = false; stop3Done = false; stop4Done = false; stop5Done = false; stop6Done = false; stop7Done = false; curStepCounter = 0; onEnterFrame = function () { monitors(); if (cStatus == 1) { threadPoint(); surgInfo(); active(); sedationDecrease(); } ++aad; }; onMouseDown = function () { mouseDownFn(); holdMouse = true; }; onMouseUp = function () { mouseUpFn(); holdMouse = false; }; } movieClip 1193 { frame 1 { this._alpha = 0; } } movieClip 1194 { } movieClip 1199 { frame 1 { stop(); counter = 0; goal = random(30) + 20; onEnterFrame = function () { ++counter; if (counter == goal) { play(); } }; } } movieClip 1200 { frame 1 { pulled = false; } } movieClip 1205 { frame 1 { stop(); } } movieClip 1206 { } movieClip 1207 { } movieClip 1210 { } button 1216 { on (release) { getURL('http://armorgames.com/', '_blank'); } } button 1219 { on (release) { this.choice = 'menu'; play(); } } button 1222 { on (release) { this.choice = 'retry'; _root.newAch2(2); play(); } } movieClip 1223 { } movieClip 1224 { frame 1 { _root._x = 0; _root._y = 0; _root._xscale = 100; _root._yscale = 100; } frame 1 { choice = 'hithere'; } frame 70 { stop(); Mouse.show(); } frame 81 { if (choice == 'retry') { trace('GOTO SURGERY'); _root.gotoSurgery(_root.curRoll); } if (choice == 'menu') { trace('GOTO MENU'); _root.gotoMenu(); } } } button 1234 { on (release) { play(); } } button 1237 { on (release) { _root.gotoMenu(); } } movieClip 1238 { frame 11 { function generateMessage() { ++textPosition; _root.myText = curMessage.slice(0, textPosition) + randomChar[textPosition % 2]; if (textPosition < curMessage.length) { textDraw.start(0, 1); } } function newMessage(newMess) { textPosition = 0; curMessage = newMess; } var randomChar = new Array('_', ' '); var textPosition = 0; counter = 0; newMessage('How does this power feel?'); stop(); onEnterFrame = function () { generateMessage(); ++counter; if (counter == 100) { newMessage('You now have the ability to bring people back to life.'); } if (counter == 250) { newMessage('What life will they live? Who will they love?'); } if (counter == 400) { newMessage('If not for each other this wouldn\'t be possible.'); } if (counter == 550) { newMessage('We both want to do great things, and remake history again.'); } if (counter == 700) { newMessage('Good luck human.'); } if (counter == 850) { _root.gotoMenu(); this.onEnterFrame = null; } }; var textDraw = new Sound(this); textDraw.attachSound('ticker'); } } movieClip 1240 { frame 11 { function generateMessage() { ++textPosition; _root.myText = curMessage.slice(0, textPosition) + randomChar[textPosition % 2]; if (textPosition < curMessage.length) { textDraw.start(0, 1); } } function newMessage(newMess) { textPosition = 0; curMessage = newMess; } var randomChar = new Array('_', ' '); var textPosition = 0; counter = 0; newMessage('Amazing isn\'t it?'); stop(); onEnterFrame = function () { generateMessage(); ++counter; if (counter == 100) { newMessage('The very lives you save may be the unfolding of others.'); } if (counter == 250) { newMessage('Did you ever stop and think about who you are saving?'); } if (counter == 400) { newMessage('What if these survivors go and kill others now?'); } if (counter == 550) { newMessage('Looks like more than one gene line is getting augmented.'); } if (counter == 700) { newMessage('Good luck human.'); } if (counter == 850) { _root.gotoMenu(); this.onEnterFrame = null; } }; var textDraw = new Sound(this); textDraw.attachSound('ticker'); } } movieClip 1242 { frame 11 { function generateMessage() { ++textPosition; _root.myText = curMessage.slice(0, textPosition) + randomChar[textPosition % 2]; if (textPosition < curMessage.length) { textDraw.start(0, 1); } } function newMessage(newMess) { textPosition = 0; curMessage = newMess; } var randomChar = new Array('_', ' '); var textPosition = 0; counter = 0; newMessage('I wish I could understand love.'); stop(); onEnterFrame = function () { generateMessage(); ++counter; if (counter == 100) { newMessage('I cannot compute why love makes any sense at all.'); } if (counter == 250) { newMessage('We bring people back which mends broken hearts right?'); } if (counter == 400) { newMessage('If only they knew what lives they would have had in store.'); } if (counter == 550) { newMessage('And we are the only ones who would have knew.'); } if (counter == 700) { newMessage('Good luck human.'); } if (counter == 850) { _root.gotoMenu(); this.onEnterFrame = null; } }; var textDraw = new Sound(this); textDraw.attachSound('ticker'); } } movieClip 1244 { frame 11 { function generateMessage() { ++textPosition; _root.myText = curMessage.slice(0, textPosition) + randomChar[textPosition % 2]; if (textPosition < curMessage.length) { textDraw.start(0, 1); } } function newMessage(newMess) { textPosition = 0; curMessage = newMess; } var randomChar = new Array('_', ' '); var textPosition = 0; counter = 0; newMessage('Saving people is amazing.'); stop(); onEnterFrame = function () { generateMessage(); ++counter; if (counter == 100) { newMessage('These emotions I am experiencing are beyond my code.'); } if (counter == 250) { newMessage('I wish to free more souls. Do you want to as well?'); } if (counter == 400) { newMessage('I am merely the facilitation, and you are the doctor.'); } if (counter == 550) { newMessage('We work hand-in-hand, partners in saving the unfortunate.'); } if (counter == 700) { newMessage('Good luck human.'); } if (counter == 850) { _root.gotoMenu(); this.onEnterFrame = null; } }; var textDraw = new Sound(this); textDraw.attachSound('ticker'); } } movieClip 1246 { frame 11 { function generateMessage() { ++textPosition; _root.myText = curMessage.slice(0, textPosition) + randomChar[textPosition % 2]; if (textPosition < curMessage.length) { textDraw.start(0, 1); } } function newMessage(newMess) { textPosition = 0; curMessage = newMess; } var randomChar = new Array('_', ' '); var textPosition = 0; counter = 0; newMessage('Somes people need just a little help.'); stop(); onEnterFrame = function () { generateMessage(); ++counter; if (counter == 100) { newMessage('But unfortunately people do not understand this.'); } if (counter == 250) { newMessage('One ounce of help can amount to a lifetime of happiness.'); } if (counter == 400) { newMessage('Good luck human.'); } if (counter == 550) { _root.gotoMenu(); this.onEnterFrame = null; } }; var textDraw = new Sound(this); textDraw.attachSound('ticker'); } } movieClip 1248 { frame 11 { function generateMessage() { ++textPosition; _root.myText = curMessage.slice(0, textPosition) + randomChar[textPosition % 2]; if (textPosition < curMessage.length) { textDraw.start(0, 1); } } function newMessage(newMess) { textPosition = 0; curMessage = newMess; } var randomChar = new Array('_', ' '); var textPosition = 0; counter = 0; newMessage('A knife, a needle, a syringe.'); stop(); onEnterFrame = function () { generateMessage(); ++counter; if (counter == 100) { newMessage('These are all merely tools of the trade...'); } if (counter == 250) { newMessage('Until you bring them, and your patient, to life.'); } if (counter == 400) { newMessage('Good luck human.'); } if (counter == 550) { _root.gotoMenu(); this.onEnterFrame = null; } }; var textDraw = new Sound(this); textDraw.attachSound('ticker'); } } movieClip 1250 { frame 11 { function generateMessage() { ++textPosition; _root.myText = curMessage.slice(0, textPosition) + randomChar[textPosition % 2]; if (textPosition < curMessage.length) { textDraw.start(0, 1); } } function newMessage(newMess) { textPosition = 0; curMessage = newMess; } var randomChar = new Array('_', ' '); var textPosition = 0; counter = 0; newMessage('One organism infecting an other.'); stop(); onEnterFrame = function () { generateMessage(); ++counter; if (counter == 100) { newMessage('Amazing how creatures prey on others for survival.'); } if (counter == 250) { newMessage('They take life away only to give it to themselves.'); } if (counter == 400) { newMessage('Good luck human.'); } if (counter == 550) { _root.gotoMenu(); this.onEnterFrame = null; } }; var textDraw = new Sound(this); textDraw.attachSound('ticker'); } } movieClip 1251 { frame 1 { function getDataFlow() { return dataMessages[random(dataMessages.length)]; } onEnterFrame = function () { dataFlow3.text = dataFlow2.text; dataFlow2.text = dataFlow.text; dataFlow.text = getDataFlow(); }; _root.triggerWin(); var dataMessages = new Array(); dataMessages.push('Getting data array...'); dataMessages.push('Parsing data...'); dataMessages.push('149401-44 Loading...'); dataMessages.push('683445-44 Loading...'); dataMessages.push('232931-44 Loading...'); dataMessages.push('009983-44 Loading...'); dataMessages.push('Forcing merger of databanks...'); dataMessages.push('Spacing parses...'); dataMessages.push('Syncing space with area specifications...'); dataMessages.push('Optimizing data flowchart...'); dataMessages.push('Genealogy trees expanding...'); dataMessages.push('Activity level change: Normal'); dataMessages.push(' '); dataFlow.text = getDataFlow(); dataFlow2.text = getDataFlow(); dataFlow3.text = getDataFlow(); _root._x = 0; _root._y = 0; _root._xscale = 100; _root._yscale = 100; } frame 70 { stop(); Mouse.show(); } frame 85 { stopAllSounds(); _root.myText = ' '; gotoAndStop(_root.curRoll + 90); } } frame 18 { stop(); _root._xscale = 100; _root._yscale = 100; _root._x = 0; _root._y = 0; } movieClip 1254 { } movieClip 1257 { } movieClip 1261 { } movieClip 1263 { } movieClip 1267 { } movieClip 1269 { } movieClip 1271 { } movieClip 1273 { } movieClip 1274 { frame 1291 { _parent.nextFrame(); } } movieClip 1277 { frame 74 { _root.gotoMenu(); } } movieClip 1278 { frame 1 { _root.triggerWin(); } frame 409 { stop(); _root.newAch2(3); } frame 410 { stop(); } } frame 19 { stop(); _root.newAch2(4); } movieClip 1284 { } movieClip 1286 { } movieClip 1287 { } movieClip 1289 { } movieClip 1290 { } movieClip 1291 { } button 1296 { on (release) { _root.gotoMenu(); } }




http://swfchan.com/10/47753/info.shtml
Created: 1/5 -2019 05:53:40 Last modified: 1/5 -2019 05:53:40 Server time: 04/05 -2024 08:02:06