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

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

Dodge the Turrets.swf

This is the info page for
Flash #27869

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


Text
$TXT

Game Over

PLAY AGAIN

CLICK ANYWHERE TO BEGIN!

ActionScript [AS1/AS2]

Frame 1
function makeBullet(x, y, velx, vely, type) { if (type == "missile") { var _local1 = new logic.Missile(x, y, velx, vely, "thing2"); } else if (type == "grenade") { var _local1 = new logic.Grenade(x, y, velx, vely, "grenade"); } } _root.game = new logic.Game(); _root.entities = new Array();
Instance of Symbol 21 MovieClip in Frame 1
onClipEvent (load) { woo = new logic.Turret(this); }
Instance of Symbol 21 MovieClip in Frame 1
onClipEvent (load) { woo = new logic.Turret(this); }
Frame 2
stop();
Instance of Symbol 25 MovieClip "timePlaying" in Frame 2
onClipEvent (load) { woo = new logic.TextWindow(this); woo.SetText("Survived: "); } onClipEvent (enterFrame) { woo.SetText(("Survived: " + _root.game.GetTimePlaying()) + " Seconds."); }
Instance of Symbol 38 MovieClip "player" in Frame 2
onClipEvent (load) { this.velx = 0; this.vely = 0; } onClipEvent (enterFrame) { this.velx = (this._x - _root._xmouse) * -0.5; this.vely = (this._y - _root._ymouse) * -0.5; this._x = this._x + this.velx; this._y = this._y + this.vely; play(); }
Instance of Symbol 21 MovieClip in Frame 2
onClipEvent (load) { woo = new logic.GrenadeTurret(this); }
Instance of Symbol 21 MovieClip in Frame 2
onClipEvent (load) { woo = new logic.GrenadeTurret(this); }
Instance of Symbol 21 MovieClip in Frame 2
onClipEvent (load) { woo = new logic.Turret(this); }
Instance of Symbol 21 MovieClip in Frame 2
onClipEvent (load) { woo = new logic.Turret(this); }
Instance of Symbol 21 MovieClip in Frame 2
onClipEvent (load) { woo = new logic.Turret(this); }
Instance of Symbol 21 MovieClip in Frame 2
onClipEvent (load) { woo = new logic.Turret(this); }
Instance of Symbol 46 MovieClip "text" in Frame 2
onClipEvent (load) { this._visible = false; }
Symbol 7 MovieClip [explosion] Frame 1
this._rotation = Math.random() * 360; if (this.hitTest(_root.player._x, _root.player._y)) { _root.game.gameOver(); }
Symbol 7 MovieClip [explosion] Frame 17
this.removeMovieClip();
Symbol 12 MovieClip [grenade] Frame 1
stop();
Symbol 14 MovieClip [puff] Frame 8
this.removeMovieClip();
Symbol 21 MovieClip Frame 1
stop();
Symbol 51 MovieClip [__Packages.logic.Entity] Frame 0
class logic.Entity { var x, clip, y; function Entity (clip) { PrepareClip(clip); } function UpdateMC() { clip._x = x; clip._y = y; } function ClearClass() { clip.removeMovieClip(); Think = null; } function OnGameActivate() { } function PrepareClip(clip) { this.clip = clip; this.clip.code = this; this.clip.onEnterFrame = function () { if (_root.game.gameInSession()) { this.code.Think(); } }; x = this.clip._x; y = this.clip._y; _root.entities.push(this); } function Remove() { ClearClass(); } function Think() { } }
Symbol 52 MovieClip [__Packages.logic.TProjectile] Frame 0
class logic.TProjectile extends logic.Entity { var x, y, velx, vely, bounces, nextTrail, PrepareClip, Remove, clip, UpdateMC; function TProjectile (x, y, velx, vely, symbol) { super(); this.x = x; this.y = y; this.velx = velx; this.vely = vely; bounces = 0; nextTrail = 0; var _local3 = lib.Control.blankMC("projectile"); _local3.attachMovie(symbol, "symbol", 1); _local3._x = x; _local3._y = y; _local3.code = this; PrepareClip(_local3); } function Trail() { var _local2 = lib.Control.blankMC("puff"); _local2.attachMovie("puff", "puff", 1); _local2._x = x; _local2._y = y; var _local3 = Math.atan2(vely, velx); _local2._rotation = _local3 * 57.3; _local2._rotation = _local2._rotation + ((Math.random() * 30) - 15); } function Explode() { velx = 0; vely = 0; var _local2 = lib.Control.blankMC("explosion"); _local2.attachMovie("explosion", "explosion", 1); _local2._x = x; _local2._y = y; Remove(); } function Think() { x = x + velx; y = y + vely; if (nextTrail < getTimer()) { Trail(); nextTrail = getTimer() + 70; } clip._rotation = Math.atan2(vely, velx) * 57.3; if (bounces >= 1) { if ((x > 550) or (x < 0)) { velx = velx * -1; bounces--; return(undefined); } if ((y > 400) or (y < 0)) { vely = vely * -1; bounces--; return(undefined); } } UpdateMC(); if ((x > 550) or (x < 0)) { Explode(); } if ((y > 400) or (y < 0)) { Explode(); } if (_root.player.hitTest(clip._x, clip._y, true)) { Explode(); } } }
Symbol 53 MovieClip [__Packages.lib.Control] Frame 0
class lib.Control { function Control () { } static function blankMC(name) { return(_root.createEmptyMovieClip((name + "_") + _root.getNextHighestDepth(), _root.getNextHighestDepth())); } static function timer(delay, func, target) { var _local2 = blankMC(); _local2.attachMovie("thing", "timer", 1); _local2._x = 20; _local2._y = 20; _local2.func = func; _local2.target = target; _local2.mytime = getTimer() + delay; _local2.onEnterFrame = function () { if (this.mytime < getTimer()) { this.func.call(this.target); this.removeMovieClip(); } }; } static function getAllEntities() { return(_root.entities); } static function getClipsByName(prefix, target) { var _local3 = length(prefix); var _local2 = new Array(); for (var _local5 in target) { if (typeof(target[_local5]) == "movieclip") { if (target[_local5]._name.substr(0, _local3) == prefix) { _local2.push(target[_local5]); } } } return(_local2); } }
Symbol 54 MovieClip [__Packages.logic.Missile] Frame 0
class logic.Missile extends logic.TProjectile { function Missile (x, y, velx, vely, symbol) { super(x, y, velx, vely, symbol); } }
Symbol 55 MovieClip [__Packages.logic.Grenade] Frame 0
class logic.Grenade extends logic.TProjectile { var bounces, x, velx, y, vely, clip, UpdateMC, Explode; function Grenade (x, y, velx, vely, symbol) { super(x, y, velx, vely, symbol); bounces = 10; } function Think() { x = x + velx; y = y + vely; vely = vely + 0.28; clip._rotation = Math.atan2(vely, velx) * 57.3; if (bounces >= 1) { if ((x > 550) or (x < 0)) { velx = velx * -1; bounces--; clip.gotoAndPlay(1); return(undefined); } if (y > 400) { vely = vely * -0.6; y = 400; bounces--; clip.gotoAndPlay(1); return(undefined); } } UpdateMC(); if ((x > 550) or (x < 0)) { Explode(); } if (y > 400) { Explode(); } if (_root.player.hitTest(clip._x, clip._y, true)) { Explode(); } } }
Symbol 56 MovieClip [__Packages.logic.Game] Frame 0
class logic.Game { function Game () { Mouse.hide(); PrepareClip(); } function PrepareClip() { var _local2 = lib.Control.blankMC(); _local2.code = this; _local2.onEnterFrame = function () { this.code.Think(); }; } function Think() { if (gameInSession()) { timePlaying++; } } function Activate() { inSession = true; _root.beginButton._visible = false; var _local3 = lib.Control.getAllEntities(); for (var _local4 in _local3) { _local3[_local4].OnGameActivate(); } } function Restart() { var _local3 = lib.Control.getClipsByName("projectile", _root); for (var _local4 in _local3) { _local3[_local4].code.Remove(); } _root.player._visible = true; _root.play(); _root.beginButton._visible = true; timePlaying = 0; Mouse.hide(); } function GetTimePlaying() { return((Math.floor(timePlaying / 60) + ".") + (Math.floor(timePlaying) % 60)); } function gameOver() { _root.text._visible = true; _root.player._visible = false; Mouse.show(); inSession = false; } function gameInSession() { return(inSession); } var inSession = false; var timePlaying = 0; }
Symbol 57 MovieClip [__Packages.logic.ProjectileLauncher] Frame 0
class logic.ProjectileLauncher extends logic.Entity { var fireDelay, projectiles, fireTimer, clip; function ProjectileLauncher (clip) { super(clip); fireDelay = 4000; projectiles = new Array(); } function OnGameActivate() { fireTimer = getTimer() + (fireDelay - ((Math.random() * fireDelay) / 2)); } function FireThink(angle, speed, startdist, type) { if (fireTimer < getTimer()) { Fire(clip._x + (Math.cos(angle) * startdist), clip._y + (Math.sin(angle) * startdist), Math.cos(angle) * speed, Math.sin(angle) * speed, type); if (fireDelay > 40) { fireDelay = fireDelay - 50; } fireTimer = getTimer() + (fireDelay - ((Math.random() * fireDelay) / 2)); } } function Think() { } function Fire(x, y, xvel, yvel, type) { _root.makeBullet(x, y, xvel, yvel, type); clip.play(); } }
Symbol 58 MovieClip [__Packages.logic.Turret] Frame 0
class logic.Turret extends logic.ProjectileLauncher { var vx, clip, vy, hitx, hity, moveAxis, spawntime, x, y, FireThink, UpdateMC; function Turret (clip) { super(clip); vx = Math.cos(this.clip._rotation / 57.3) * 4; vy = Math.sin((this.clip._rotation + 90) / 57.3) * 4; hitx = 0; hity = 0; moveAxis = 2; spawntime = getTimer(); } function Movement() { if (((getTimer() - spawntime) > 6000) and (moveAxis == 2)) { moveAxis = 0; } if (moveAxis == 0) { x = x + vx; if ((x < 40) or (x > 510)) { vx = vx * -1; x = x + vx; hitx++; } if (hitx > 1) { moveAxis = 1; hitx = 0; } } if (moveAxis == 1) { y = y + vy; if ((y < 40) or (y > 360)) { vy = vy * -1; y = y + vy; hity++; } if (hity > 1) { moveAxis = 0; hity = 0; } } } function DoFireThink(angle, speed) { FireThink(angle, speed, clip._width / 1.2, "missile"); } function Think() { var _local8 = 5; var _local7 = _root.player._x; var _local6 = _root.player._y; var _local4 = _local7 - x; var _local3 = _local6 - y; var _local10 = Math.sqrt((_local4 * _local4) + (_local3 * _local3)); if (_local10 < 400) { var _local5 = Math.atan2(_local3, _local4); var _local9 = _local5 * 57.3; clip._rotation = _local9; DoFireThink(_local5, _local8); } Movement(); UpdateMC(); } }
Symbol 59 MovieClip [__Packages.logic.TextWindow] Frame 0
class logic.TextWindow extends logic.Entity { var clip; function TextWindow (clip, text) { super(clip); } function SetText(text) { thetext = text; clip.txt.text = thetext; } var thetext = ""; }
Symbol 60 MovieClip [__Packages.logic.GrenadeTurret] Frame 0
class logic.GrenadeTurret extends logic.Turret { var FireThink, clip, x, vx, y, UpdateMC; function GrenadeTurret (clip) { super(clip); } function DoFireThink(angle, speed) { FireThink(angle, speed, clip._width / 1.2, "grenade"); } function Movement() { x = x + vx; if ((x < 40) or (x > 510)) { vx = vx * -1; x = x + vx; } } function Think() { var _local13 = _root.player._x; var _local12 = _root.player._y; var _local4 = _local13 - x; var _local3 = _local12 - y; var _local9 = Math.sqrt((_local3 * _local3) + (_local4 * _local4)); var _local10 = Math.atan2(_local3, _local4); var _local14 = ((Math.cos(_local10) * _local9) / 2) + x; var _local7 = ((Math.sin(_local10) * _local9) / 2) + y; var _local15 = 0.28; var _local5 = 5; var _local6 = 40; _local7 = _local7 - (_local5 * _local6); _local4 = _local14 - x; _local3 = _local7 - y; var _local11 = Math.sqrt((_local3 * _local3) + (_local4 * _local4)); _local5 = ((_local11 * _local15) / _local6) * _local5; var _local8 = Math.atan2(_local3, _local4); var _local16 = _local8 * 57.3; clip._rotation = _local16; DoFireThink(_local8, _local5); UpdateMC(); } }
Symbol 38 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 29
gotoAndPlay (2);
Symbol 45 Button
on (release) { _root.game.Restart(); }
Symbol 50 Button
on (press) { _root.game.Activate(); }

Library Items

Symbol 1 GraphicUsed by:2
Symbol 2 MovieClip [thing2]Uses:1
Symbol 3 GraphicUsed by:7
Symbol 4 GraphicUsed by:5 7
Symbol 5 MovieClipUses:4Used by:7
Symbol 6 SoundUsed by:7
Symbol 7 MovieClip [explosion]Uses:3 5 6 4
Symbol 8 GraphicUsed by:12
Symbol 9 GraphicUsed by:10
Symbol 10 MovieClipUses:9Used by:12
Symbol 11 SoundUsed by:12
Symbol 12 MovieClip [grenade]Uses:8 10 11
Symbol 13 GraphicUsed by:14
Symbol 14 MovieClip [puff]Uses:13
Symbol 15 GraphicUsed by:21
Symbol 16 GraphicUsed by:21
Symbol 17 GraphicUsed by:21
Symbol 18 GraphicUsed by:21
Symbol 19 SoundUsed by:21
Symbol 20 GraphicUsed by:21
Symbol 21 MovieClipUses:15 16 17 18 19 20Used by:Timeline
Symbol 51 MovieClip [__Packages.logic.Entity]
Symbol 52 MovieClip [__Packages.logic.TProjectile]
Symbol 53 MovieClip [__Packages.lib.Control]
Symbol 54 MovieClip [__Packages.logic.Missile]
Symbol 55 MovieClip [__Packages.logic.Grenade]
Symbol 56 MovieClip [__Packages.logic.Game]
Symbol 57 MovieClip [__Packages.logic.ProjectileLauncher]
Symbol 58 MovieClip [__Packages.logic.Turret]
Symbol 59 MovieClip [__Packages.logic.TextWindow]
Symbol 60 MovieClip [__Packages.logic.GrenadeTurret]
Symbol 22 GraphicUsed by:25
Symbol 23 FontUsed by:24 40 42 49
Symbol 24 EditableTextUses:23Used by:25
Symbol 25 MovieClipUses:22 24Used by:Timeline
Symbol 26 GraphicUsed by:Timeline
Symbol 27 GraphicUsed by:38
Symbol 28 GraphicUsed by:38
Symbol 29 GraphicUsed by:38
Symbol 30 GraphicUsed by:35
Symbol 31 GraphicUsed by:35
Symbol 32 GraphicUsed by:35
Symbol 33 GraphicUsed by:35
Symbol 34 GraphicUsed by:35
Symbol 35 MovieClipUses:30 31 32 33 34Used by:38
Symbol 36 GraphicUsed by:38
Symbol 37 GraphicUsed by:38
Symbol 38 MovieClipUses:27 28 29 35 36 37Used by:Timeline
Symbol 39 GraphicUsed by:46
Symbol 40 TextUses:23Used by:46
Symbol 41 GraphicUsed by:45
Symbol 42 TextUses:23Used by:45
Symbol 43 GraphicUsed by:45
Symbol 44 GraphicUsed by:45
Symbol 45 ButtonUses:41 42 43 44Used by:46
Symbol 46 MovieClipUses:39 40 45Used by:Timeline
Symbol 47 GraphicUsed by:50
Symbol 48 GraphicUsed by:50
Symbol 49 TextUses:23Used by:50
Symbol 50 ButtonUses:47 48 49Used by:Timeline

Instance Names

"timePlaying"Frame 2Symbol 25 MovieClip
"player"Frame 2Symbol 38 MovieClip
"text"Frame 2Symbol 46 MovieClip
"beginButton"Frame 2Symbol 50 Button
"txt"Symbol 25 MovieClip Frame 1Symbol 24 EditableText

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS1/AS2.
ExportAssets (56)Timeline Frame 1Symbol 2 as "thing2"
ExportAssets (56)Timeline Frame 1Symbol 7 as "explosion"
ExportAssets (56)Timeline Frame 1Symbol 12 as "grenade"
ExportAssets (56)Timeline Frame 1Symbol 14 as "puff"
ExportAssets (56)Timeline Frame 1Symbol 51 as "__Packages.logic.Entity"
ExportAssets (56)Timeline Frame 1Symbol 52 as "__Packages.logic.TProjectile"
ExportAssets (56)Timeline Frame 1Symbol 53 as "__Packages.lib.Control"
ExportAssets (56)Timeline Frame 1Symbol 54 as "__Packages.logic.Missile"
ExportAssets (56)Timeline Frame 1Symbol 55 as "__Packages.logic.Grenade"
ExportAssets (56)Timeline Frame 1Symbol 56 as "__Packages.logic.Game"
ExportAssets (56)Timeline Frame 1Symbol 57 as "__Packages.logic.ProjectileLauncher"
ExportAssets (56)Timeline Frame 1Symbol 58 as "__Packages.logic.Turret"
ExportAssets (56)Timeline Frame 1Symbol 59 as "__Packages.logic.TextWindow"
ExportAssets (56)Timeline Frame 1Symbol 60 as "__Packages.logic.GrenadeTurret"




http://swfchan.com/6/27869/info.shtml
Created: 21/5 -2019 01:11:23 Last modified: 21/5 -2019 01:11:23 Server time: 05/11 -2024 06:41:18