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

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

giraffe-attack.swf

This is the info page for
Flash #77627

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


ActionScript [AS1/AS2]
Combined Code
movieClip 4 { } movieClip 5 rocket { } movieClip 7 { } movieClip 8 explode { frame 11 { this.removeMovieClip(); } } movieClip 10 { } movieClip 11 star { } movieClip 13 { } movieClip 14 bombFall { frame 1 { stop(); } } movieClip 16 { } movieClip 17 bullet { } movieClip 19 { } movieClip 20 explosionOut2 { frame 1 { this._yscale = random(100) + 50; this._xscale = this._yscale; this._rotation = random(360); } frame 15 { this.removeMovieClip(); } } movieClip 21 explosionOut { frame 1 { this._yscale = random(400) + 100; this._xscale = this._yscale; this._rotation = random(360); } frame 51 { this.removeMovieClip(); } } movieClip 23 { } // unknown tag 88 length 152 movieClip 28 { } button 30 { on (release) { getURL('http://www.armorgames.com/', '_blank'); } } button 36 { on (release, keyPress '<Space>') { _root.restartSection(); } } button 40 { on (release) { _root.cleanStart(); } } button 43 { on (release) { getURL('http://www.armorgames.com/', '_blank'); } } movieClip 47 { } movieClip 50 { } movieClip 52 lose { frame 80 { stop(); } } movieClip 53 drawArea { } frame 1 { function menuHandler() { if (curStage >= 3 && curStage <= 8) { youLoseGoodDaySir(); } } function frameHandler() { if (expert) { modeStr = 'Expert Mode!!!!'; } else { modeStr = ' '; } if (cStatus == 1) { moveGiraffe(false); clearDrawingAreas(); createNeckPoint(); drawNeckPoint(); handleStars(); healthHandler(); if (curStage == 3) { addBombs(); handleBombs(); } if (curStage == 4) { addBombs(); handleBombs(); handleBullets(); } if (curStage == 5) { addBombs(); handleBombs(); spawnRockets(); handleRockets(); handleBullets(); } if (curStage == 6) { handleBombs(); handleRockets(); handleBullets(); } if (curStage == 7) { handleBullets(); handleWalrus(); handleRockets(); } if (curStage == 8) { addBombs(); handleBombs(); handleBullets(); handleWalrus(); handleRockets(); } } } function handleWalrus() { w.turret._rotation = rotateTo(w._x + w.turret._x, w._y + w.turret._y, gHead._x, gHead._y); ++wCounter; if (expert) { if (wCounter >= 4 && curStage == 7 || wCounter >= 8 && curStage == 8) { addThat(); } } else { if (wCounter >= 10 && curStage == 7 || wCounter >= 10 && curStage == 8) { addThat(); } } } function addThat() { var v1 = new Object(); v1.x = w.turret.tip._x; v1.y = w.turret.tip._y; w.turret.localToGlobal(v1); w.turret.fT.play(); addRocket(v1.x, v1.y, 15, w.turret._rotation); wCounter = 0; } function spawnRockets() { ++wCounter; if (expert) { if (wCounter >= 7) { addRocket(random(200), 710, 20, 180); wCounter = 0; } } else { if (wCounter >= 13) { addRocket(random(200), 710, 20, 180); wCounter = 0; } } } function addRocket(xPos, yPos, vel, rot) { shel = lineArea.attachMovie('rocket', 'rocket' + k, k++); shel.v = vel; shel._x = xPos; shel._y = yPos; shel._rotation = rot + 90; shel.yV = vel * Math.cos(rot * 0.0174532925199433); shel.xV = -(vel * Math.sin(rot * 0.0174532925199433)); rockets.push(shel); } function handleRockets() { i = 0; while (i < rockets.length) { var v1 = rockets[i]; v1._x += v1.xV; v1._y += v1.yV; if (v1._y < -20 || v1._y > 720 || v1._x < -20 || v1._x > 220) { v1.removeMovieClip(); rockets.splice(i, 1); } else { if (gHead.hitA.hitTest(v1._x, v1._y)) { killPlayer(); v1.removeMovieClip(); rockets.splice(i, 1); } } ++i; } } function addBombs() { if (active) { ++bombCounter; } if (expert) { if (curStage == 3 && bombCounter >= 3) { addB(); return undefined; } if (curStage == 4 && bombCounter >= 2) { addB(); return undefined; } if (curStage == 5 && bombCounter >= 7) { addB(); return undefined; } if (curStage == 8 && bombCounter >= 4) { addB(); return undefined; } } else { if (curStage == 3 && bombCounter >= 7) { addB(); return undefined; } if (curStage == 4 && bombCounter >= 4) { addB(); return undefined; } if (curStage == 5 && bombCounter >= 15) { addB(); return undefined; } if (curStage == 8 && bombCounter >= 7) { addB(); return undefined; } } } function addB() { bombCounter = 0; shel = itemArea.attachMovie('bombFall', 'bombFall' + k, k++); shel._x = random(sW); shel._y = -50; shel.life = 1; bombs.push(shel); } function handleBombs() { i = 0; while (i < bombs.length) { curBomb = bombs[i]; curBomb._y += 20; if (curBomb.hitTest(gHead.hitA)) { killPlayer(); curBomb.removeMovieClip(); bombs.splice(i, 1); } if (curBomb._y > 720) { curBomb.removeMovieClip(); bombs.splice(i, 1); } ++i; } } function handleBullets() { ++bulletsCounter; if (bulletsCounter == 4) { bulletsCounter = 0; bu = itemArea.attachMovie('bullet', 'bullet' + k, k++); bu2 = itemArea.attachMovie('bullet', 'bullet' + k, k++); var v2 = new Object(); v2.x = gHead.leftLaser._x; v2.y = gHead.leftLaser._y; var v3 = new Object(); v3.x = gHead.rightLaser._x; v3.y = gHead.rightLaser._y; gHead.localToGlobal(v2); gHead.localToGlobal(v3); bu._x = v2.x + random(6) - 3; bu._y = v2.y; bu2._x = v3.x + random(6) - 3; bu2._y = v3.y; bu2.v = -(neckSpeed * 1.2); bu.v = bu2.v; bu2.yV = bu.v * Math.cos(gHead._rotation * 0.0174532925199433); bu.yV = bu2.yV; bu2.xV = -(bu.v * Math.sin(gHead._rotation * 0.0174532925199433)); bu.xV = bu2.xV; bullets.push(bu); bullets.push(bu2); } i = 0; while (i < bullets.length) { var v1 = bullets[i]; v1._x += v1.xV; v1._y += v1.yV; if (v1._y < -20) { v1.removeMovieClip(); bullets.splice(i, 1); } else { if (v1.hitTest(w.box)) { w.flashWalrus.play(); v1.removeMovieClip(); bullets.splice(i, 1); --i; } } j = 0; while (j < bombs.length) { curBomb = bombs[j]; if (curBomb.hitTest(v1)) { --curBomb.life; curBomb.play(); if (curBomb.life == 0) { callExplosionAt(curBomb); bombs.splice(j, 1); curBomb.removeMovieClip(); v1.removeMovieClip(); bullets.splice(i, 1); --i; } } ++j; } ++i; } } function callExplosionAt(mov) { l = 0; while (l < 20) { shel = itemArea.attachMovie('explode', 'explode' + k, k++); shel._x = mov._x; shel._y = mov._y; shel._rotation = random(360); shel._yscale = random(300) + 50; shel._xscale = shel._yscale; var v1 = new Color(shel); ++l; } } function handleStars() { gHead.lTrail._yscale = random(20) + 100; gHead.rTrail._yscale = random(20) + 100; if (curStage != 6) { st = attachMovie('star', 'star' + k, k++); st2 = attachMovie('star', 'star' + k, k++); var v2 = new Object(); v2.x = gHead.leftRocket._x; v2.y = gHead.leftRocket._y; var v3 = new Object(); v3.x = gHead.rightRocket._x; v3.y = gHead.rightRocket._y; gHead.localToGlobal(v2); gHead.localToGlobal(v3); st._x = v2.x + random(6) - 3; st._y = v2.y; st2._x = v3.x + random(6) - 3; st2._y = v3.y; applyStarStyle(st); applyStarStyle(st2); stars.push(st); stars.push(st2); } i = 0; while (i < stars.length) { var v1 = stars[i]; v1._x += v1.xV; v1._y += v1.yV; ++v1.life; v1._alpha -= 2; if (v1.life > 40) { v1.removeMovieClip(); stars.splice(i, 1); } ++i; } } function applyStarStyle(mov) { mov._yscale = random(200) + 50; mov._xscale = mov._yscale; mov.v = neckSpeed * (mov._xscale / 100); mov.yV = mov.v * Math.cos(gHead._rotation * 0.0174532925199433); mov.xV = -(mov.v * Math.sin(gHead._rotation * 0.0174532925199433)); mov.life = 0; var v2 = new Color(mov); v2.setRGB(16777215); } function nuke() { f = 0; while (f < rockets.length) { rockets[f].removeMovieClip(); ++f; } f = 0; while (f < bombs.length) { bombs[f].removeMovieClip(); ++f; } f = 0; while (f < stars.length) { stars[f].removeMovieClip(); ++f; } f = 0; while (f < bullets.length) { bullets[f].removeMovieClip(); ++f; } rockets.splice(0, rockets.length); bombs.splice(0, bombs.length); stars.splice(0, stars.length); bullets.splice(0, bullets.length); lineArea.removeMovieClip(); attachMovie('drawArea', 'lineArea', k++); neckPoints.splice(0, neckPoints.length); clearDrawingAreas(); } function init() { trace('INIT LAUNCH'); nuke(); gHead._x = 100; gHead._y = 600; i = 0; while (i < neckSegment * 2) { createNeckPoint(); drawNeckPoint(); ++i; } onEnterFrame = frameHandler; df = 0; while (df < 40) { moveGiraffe(true); clearDrawingAreas(); createNeckPoint(); drawNeckPoint(); handleStars(); ++df; } } function moveGiraffe(fromInit) { if (controls == 'keyboard') { if (Key.isDown(37)) { xV -= s; } else { if (Key.isDown(39)) { xV += s; } } if (Key.isDown(38)) { yV -= s; } else { if (Key.isDown(40)) { yV += s; } } } if (controls == 'mouse') { if (_xmouse > gHead._x) { xV += s; if (_xmouse <= xV + gHead._x) { xV = 0; gHead._x = _xmouse; } } else { if (_xmouse < gHead._x) { xV -= s; if (_xmouse >= xV + gHead._x) { xV = 0; gHead._x = _xmouse; } } } if (_ymouse > gHead._y) { yV += s; if (_xmouse <= yV + gHead._y) { yV = 0; gHead._y = _ymouse; } } else { if (_ymouse < gHead._y) { yV -= s; if (_ymouse >= yV + gHead._y) { yV = 0; gHead._y = _ymouse; } } } } if (controls == 'mouse') { if (Key.isDown(37) || Key.isDown(39) || Key.isDown(40) || Key.isDown(38)) { controls = 'keyboard'; } } if (controls == 'keyboard') { if (oldX != _xmouse || oldY != _ymouse) { controls = 'mouse'; } } oldX = _xmouse; oldY = _ymouse; gHead._x += xV; if (!fromInit) { gHead._y += yV; } gHead._rotation = xV + yV; if (gHead._x > sW - 10) { gHead._x = sW - 10; xV *= -1; } if (gHead._x < 10) { gHead._x = 10; xV *= -1; } if (gHead._y > 640) { gHead._y = 640; yV *= -1; } if (gHead._y < 10) { gHead._y = 10; yV *= -1; } xV *= 0.8; yV *= 0.8; spots._x = gHead._x; spots._y = gHead._y; } function clearDrawingAreas() { drawArea.clear(); lineArea.clear(); } function createNeckPoint() { neckPoints.push(new flash.geom.Point(gHead._x, gHead._y)); if (neckPoints.length > neckSegments) { neckPoints.shift(); } } function drawNeckPoint() { drawArea.lineStyle(3, 16777215, 100); drawArea.beginFill(16777215, 100); drawArea.moveTo(neckPoints[0].x, neckPoints[0].y); lineArea.lineStyle(1, 0, 100); lineArea.moveTo(neckPoints[0].x, neckPoints[0].y); i = 0; while (i < neckPoints.length) { var v1 = neckPoints[i]; if (i != 0) { drawArea.lineTo(v1.x, v1.y); lineArea.lineTo(v1.x, v1.y); } ++i; } drawArea.lineTo(neckPoints[neckPoints.length - 1].x + nW, neckPoints[neckPoints.length - 1].y); lineArea.moveTo(neckPoints[neckPoints.length - 1].x + nW, neckPoints[neckPoints.length - 1].y); i = neckPoints.length - 1; while (i > -1) { v1 = neckPoints[i]; if (i != neckPoints.length - 1) { drawArea.lineTo(v1.x + nW, v1.y); lineArea.lineTo(v1.x + nW, v1.y); } --i; } drawArea.lineTo(neckPoints[0].x, neckPoints[0].y); drawArea.endFill(); i = 0; while (i < neckPoints.length) { v1 = neckPoints[i]; v1.y += neckSpeed; ++i; } } function healthHandler() { ++health; if (health > 100) { health = 100; } if (health < 0) { youLoseGoodDaySir(); } giraffeBar._xscale = health; } function youLoseGoodDaySir() { health = 0; giraffeBar._xscale = health; cStatus = 2; stop(); ++deaths; _root.blackAndWhite(false); attachMovie('lose', 'lose', k++); } function killPlayer() { health -= 50; de = 0; while (de < 5) { shel = attachMovie('explosionOut2', 'e' + k, k++); shel._x = gHead._x; shel._y = gHead._y; var v1 = new Color(shel); v1.setRGB(16711680); ++de; } } function callStage(num) { trace('BOOTING STAGE ' + num); curStage = num; if (curStage == 2) { init(); } if (curStage == 7) { nuke(); } if (curStage == 9) { nuke(); cStatus = 2; } active = true; } function ceaseFire() { active = false; } function rotateTo(x1, y1, x2, y2) { return -Math.atan2(x2 - x1, y2 - y1) * 180 / Math.PI; } function cleanStart() { trace('==cleanStart=='); health = 100; deaths = 0; lose.removeMovieClip(); _root.blackAndWhite(true); cStatus = 1; curStage = 0; gotoAndStop(2); } function startGame() { health = 100; deaths = 0; lose.removeMovieClip(); _root.blackAndWhite(true); cStatus = 1; curStage = 0; gotoAndPlay(3); } function restartSection() { trace('==restart=='); health = 100; lose.removeMovieClip(); _root.blackAndWhite(true); var v2 = 's' + curStage; cStatus = 1; gotoAndPlay(v2); init(); } Stage.showMenu = false; var my_cm = new ContextMenu(); var expert = false; var modeStr = ''; my_cm.onSelect = menuHandler; this.menu = my_cm; var active = false; var sW = 200; var SH = 700; var nW = 10; var neckSegments = 20; var neckSpeed = 700 / neckSegments; var xV = 0; var yV = 0; var s = 2; var k = 0; var curStage = 0; var cStatus = 1; var deaths = 0; var controls = 'keyboard'; var oldX = _xmouse; var oldY = _ymouse; var stars = new Array(); var bombs = new Array(); var bombCounter = 0; var rockets = new Array(); var wCounter = 0; var rocketCounter = 0; var bullets = new Array(); var bulletsCounter = 0; var neckPoints = new Array(); var health = 100; MovieClip.prototype.blackAndWhite = function (clear) {}; stop(); } button 56 { on (release) { getURL('http://www.armorgames.com/', '_blank'); } } button 62 { on (release) { _root.startGame(); _root.expert = false; _parent.play(); } } button 65 { on (release) { _root.startGame(); _root.expert = true; _parent.play(); } } movieClip 66 { } // unknown tag 88 length 46 movieClip 72 { frame 1 { stop(); } instance of movieClip 66 { onClipEvent (enterFrame) { loaded = _root.getBytesLoaded(); total = _root.getBytesTotal(); framesLoaded = Math.ceil((loaded / total) * 100); gotoAndStop(framesLoaded); if (framesLoaded >= 99) { _parent.pb._visible = true; } else { _parent.pb._visible = false; } } } frame 51 { stop(); } } // unknown tag 88 length 132 frame 3 { } movieClip 77 { } frame 5 { callStage(1); } movieClip 80 { } movieClip 81 { frame 1 { onEnterFrame = function () { if (_root.cStatus == 1) { play(); } else { stop(); } }; } } movieClip 87 { } button 89 { on (press) { getURL('http://www.armorgames.com', '_blank'); } } movieClip 90 { frame 1 { gotoAndPlay(2); } frame 161 { stop(); } } movieClip 93 { } movieClip 96 { } movieClip 100 { } movieClip 101 { } movieClip 105 { } movieClip 107 { } movieClip 108 { frame 1 { stop(); } frame 50 { stop(); } } movieClip 110 { } // unknown tag 88 length 211 button 115 { on (release) { gotoAndStop('s3'); } } button 116 { on (release) { gotoAndPlay(609); } } movieClip 118 { } movieClip 119 { } frame 594 { tg.play(); } frame 610 { callStage(2); } movieClip 122 { } movieClip 125 { } movieClip 126 { } movieClip 127 { frame 1 { onEnterFrame = function () { if (_root.cStatus == 1) { play(); } else { stop(); } }; } } movieClip 129 { } movieClip 131 { } movieClip 133 { frame 1 { this._visible = false; } } movieClip 134 { } button 135 { on (release) { gotoAndPlay(1214); } } movieClip 138 { } movieClip 141 { } movieClip 144 { } movieClip 147 { } movieClip 148 { } movieClip 150 { } movieClip 154 { } movieClip 155 { } movieClip 158 { } frame 1216 { callStage(3); } frame 1681 { ceaseFire(); } movieClip 160 { } movieClip 162 { } movieClip 165 { } movieClip 167 { } frame 1820 { callStage(4); } frame 2350 { ceaseFire(); } movieClip 170 { } movieClip 171 { frame 1 { onEnterFrame = function () { if (_root.cStatus == 1) { play(); } else { stop(); } }; } } frame 2420 { callStage(5); } movieClip 174 { } movieClip 177 { } movieClip 178 { } frame 3000 { callStage(6); } movieClip 181 { } movieClip 183 { } movieClip 184 { } movieClip 187 { } movieClip 189 { } movieClip 192 { } movieClip 194 { } movieClip 197 { frame 1 { stop(); } } movieClip 200 { } movieClip 203 { } movieClip 204 { frame 1 { stop(); } } movieClip 206 { } movieClip 207 { } frame 3700 { callStage(7); } movieClip 210 { } frame 4250 { callStage(8); } movieClip 214 { } movieClip 215 { frame 1 { onEnterFrame = function () { if (_root.cStatus == 1) { play(); } else { stop(); } }; } } frame 4810 { callStage(9); } movieClip 218 { } movieClip 219 { } frame 4876 { de = 0; while (de < 30) { shel = attachMovie('explosionOut', 'e' + k, k++); shel._x = jW._x; shel._y = jW._y; ++de; } } movieClip 220 { } // unknown tag 88 length 86 button 231 { on (release) { _root.cleanStart(); } } button 235 { on (release) { getURL('http://www.armorgames.com/', '_blank'); } } movieClip 236 { } frame 5083 { stop(); }




http://swfchan.com/16/77627/info.shtml
Created: 3/4 -2019 23:50:58 Last modified: 3/4 -2019 23:50:58 Server time: 22/12 -2024 04:23:22