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

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

Defense Game - Turret Mode.swf

This is the info page for
Flash #48041

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


Text
$

Loading: 100%

Loading: 100%

Start Game

Start Game

Loading: 100%

89438$

$

Sell

Sell

Tid

Next:

Congratulation!!!
You won the game
Since this was a demo
there will soon be a
new advanced 2. version
,but until then..
thanks 4 playing!

ActionScript [AS1/AS2]

Frame 1
stop(); inGame = false; loaded = false; onEnterFrame = function () { if (_currentframe == 1) { procent = ("Loading: " + Math.round((getBytesLoaded() / getBytesTotal()) * 100)) + "%"; if ((procent == "Loading: 100%") and (!loaded)) { loaded = true; load_sign_mc.play(); } if (loaded) { procent = "Loaded"; } } };
Frame 2
stop(); stopAllSounds(); var B = new Sound(); B.attachSound("beat little heavy loop"); B.start(0.07, 9999); _root.createEmptyMovieClip("grid", 19); _root.createEmptyMovieClip("temp", 20); _root.createEmptyMovieClip("turrets_mc", 18); _root.createEmptyMovieClip("squares_mc", 17); _root.createEmptyMovieClip("enemies", 14); _root.createEmptyMovieClip("lasers", 15); _root.createEmptyMovieClip("missiles", 16); var errorSound = new Sound(); errorSound.attachSound("error"); var buildSound = new Sound(); buildSound.attachSound("build"); var maximise = new Sound(); maximise.attachSound("maximise"); var maximis = new Sound(); maximis.attachSound("menu_back_12"); building = false; selling = false; spotX = 0; spotY = 0; turret = 0; tcnt = 1; ecnt = 1; money = 100; wave = 0; mcnt = 1; lcnt = 1; mmcnt = 1; tid = 20; time = 45; var waves = new Array(["little troop"], ["little troop", "little troop", "little troop"], ["little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop"], ["little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop"], ["little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop"], ["little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop"], ["little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop"], ["little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop"], ["little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop"], ["little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop"], ["little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop"], ["little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop"], ["little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop", "little troop"]); var places = new Array([], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []); i = 0; while (i <= 19) { j = 0; while (j <= 19) { places[i][j] = "empty"; j++; } i++; } i = 0; while (i < 15) { places[2][i] = "taken"; places[3][i] = "taken"; places[16][i] = "taken"; places[17][i] = "taken"; i++; } i = 2; while (i < 18) { places[i][15] = "taken"; places[i][16] = "taken"; i++; } var turrets = new Array(["laser turret", 25], ["missile turret", 30]); grid.lineStyle(1, 0, 25); i = 0; while (i <= 400) { grid.moveTo(i, 0); grid.lineTo(i, 400); grid.moveTo(0, i); grid.lineTo(400, i); i = i + 20; } launchWave = function () { u = 0; while (u <= (waves[wave].length + 1)) { _root.enemies.attachMovie(waves[wave][u], ecnt, ecnt); _root.enemies[ecnt]._x = 60; _root.enemies[ecnt]._y = -30 - (40 * u); _root.enemies[ecnt]._rotation = 150 + random(60); _root.enemies[ecnt].life = (wave * 30) + 100; _root.enemies[ecnt].onEnterFrame = function () { if ((this.life <= 0) and (this._currentframe == 1)) { this.play(); _root.money = _root.money + 10; } if (this._currentframe == 9) { this.removeMovieClip(); } this._x = this._x + Math.sin(this._rotation * (Math.PI/180)); this._y = this._y + (Math.cos(this._rotation * (Math.PI/180)) * -1); if (ib.hitTest(this._x + (Math.sin((this._rotation - 50) * (Math.PI/180)) * 30), this._y + (Math.cos((this._rotation - 50) * (Math.PI/180)) * -30), true)) { this._rotation = this._rotation + 5; } if (ob.hitTest(this._x + (Math.sin((this._rotation + 50) * (Math.PI/180)) * 30), this._y + (Math.cos((this._rotation + 50) * (Math.PI/180)) * -30), true)) { this._rotation = this._rotation - 5; } }; ecnt++; u++; } if (wave < 10) { wave++; } else { gotoAndStop (3); _root.createEmptyMovieClip("grid", 19); _root.createEmptyMovieClip("temp", 20); _root.createEmptyMovieClip("turrets_mc", 18); _root.createEmptyMovieClip("squares_mc", 17); _root.createEmptyMovieClip("enemies", 14); _root.createEmptyMovieClip("lasers", 15); _root.createEmptyMovieClip("missiles", 16); } }; launchWave(); onEnterFrame = function () { if (inGame) { tid = tid - 0.0303030303030303; time = Math.ceil(tid) + " sec"; if (tid <= 0) { _root.launchWave(); tid = 20; } if (building) { grid._visible = true; } else { grid._visible = false; } } }; onMouseDown = function () { if (inGame) { if (building and (_xmouse < 400)) { spotX = Math.floor(_xmouse / 20); spotY = Math.floor(_ymouse / 20); if (_root.places[spotX][spotY] == "empty") { if (_root.money >= _root.turrets[turret][1]) { _root.money = _root.money - _root.turrets[turret][1]; buildSound.start(); _root.squares_mc.attachMovie("square", _root.tcnt, _root.tcnt); _root.squares_mc[tcnt]._x = (spotX * 20) + 10; _root.squares_mc[tcnt]._y = (spotY * 20) + 10; _root.turrets_mc.attachMovie(_root.turrets[turret][0], _root.tcnt, _root.tcnt); _root.turrets_mc[tcnt]._x = (spotX * 20) + 10; _root.turrets_mc[tcnt]._y = (spotY * 20) + 10; _root.turrets_mc[tcnt].gotTarget = false; _root.turrets_mc[tcnt].Target = undefined; _root.turrets_mc[tcnt].fireTime = 0; _root.turrets_mc[tcnt].tcnt = _root.tcnt; _root.turrets_mc[tcnt].turret = _root.turrets[turret][0]; _root.turrets_mc[tcnt].onEnterFrame = function () { if (inGame) { if (this.turret == "laser turret") { this.fireTime++; if (!this.gotTarget) { e = 1; while (e <= _root.ecnt) { if (this.hitTest(_root.enemies[e]._x, _root.enemies[e]._y, true)) { this.Target = e; this.gotTarget = true; break; } e++; } } else { this.diffX = _root.enemies[this.Target]._x - this._x; this.diffY = _root.enemies[this.Target]._y - this._y; this._rotation = ((Math.atan2(this.diffY, this.diffX) * 180) / Math.PI) + 90; if ((this.fireTime > 25) and (enemies[this.Target].life > 0)) { lasers.createEmptyMovieClip(lcnt, lcnt); lasers[lcnt].lineStyle(2, 12845056, 80); lasers[lcnt].moveTo(this._x, this._y); lasers[lcnt].lineTo(enemies[this.Target]._x, enemies[this.Target]._y); lasers[lcnt].onEnterFrame = function () { this._alpha = this._alpha - 20; if (this._alpha <= 0) { this.removeMovieClip(); } }; maximise.start(0.05); enemies[this.Target].life = enemies[this.Target].life - 34; this.fireTime = 0; lcnt++; } if (!this.hitTest(_root.enemies[this.Target]._x, _root.enemies[this.Target]._y, true)) { this.gotTarget = false; this.Target = 0; } } this.onMouseDown = function () { if ((selling and (Math.abs(_xmouse - this._x) < 10)) and (Math.abs(_ymouse - this._y) < 10)) { _root.money = _root.money + 10; _root.places[(this._x - 10) / 20][(this._y - 10) / 20] = "empty"; removeMovieClip(_root.squares_mc[this.tcnt]); this.removeMovieClip(); } }; } if (this.turret == "missile turret") { this.fireTime++; if (!this.gotTarget) { e = 1; while (e <= _root.ecnt) { if (this.hitTest(_root.enemies[e]._x, _root.enemies[e]._y, true)) { this.Target = e; this.gotTarget = true; break; } e++; } } else { this.diffX = _root.enemies[this.Target]._x - this._x; this.diffY = _root.enemies[this.Target]._y - this._y; this._rotation = ((Math.atan2(this.diffY, this.diffX) * 180) / Math.PI) + 90; if ((this.fireTime > 60) and (enemies[this.Target].life > 0)) { missiles.attachMovie("missile", mmcnt, mmcnt); missiles[mmcnt].Target = this.Target; missiles[mmcnt].alive = true; missiles[mmcnt]._x = this._x; missiles[mmcnt]._y = this._y; missiles[mmcnt]._rotation = this._rotation; missiles[mmcnt].onEnterFrame = function () { if (this.alive) { this.diffX = enemies[this.Target]._x - this._x; this.diffY = enemies[this.Target]._y - this._y; this._rotation = (Math.atan2(this.diffY, this.diffX) * 180) / Math.PI; this._x = this._x + (Math.sin((this._rotation + 90) * (Math.PI/180)) * 2); this._y = this._y + (Math.cos((this._rotation + 90) * (Math.PI/180)) * -2); this._rotation = this._rotation + 180; if (enemies[this.Target]._x == undefined) { this.play(); } if (enemies[this.Target].hitTest(this._x, this._y, true)) { enemies[this.Target].life = enemies[this.Target].life - 60; this.play(); maximis.start(0.2); this.alive = false; } } if (this._currentframe == this._totalframes) { this.removeMovieClip(); } }; this.fireTime = 0; mmcnt++; } if (!this.hitTest(_root.enemies[this.Target]._x, _root.enemies[this.Target]._y, true)) { this.gotTarget = false; this.Target = 0; } } this.onMouseDown = function () { if ((selling and (Math.abs(_xmouse - this._x) < 10)) and (Math.abs(_ymouse - this._y) < 10)) { _root.money = _root.money + 10; _root.places[(this._x - 10) / 20][(this._y - 10) / 20] = "empty"; removeMovieClip(_root.squares_mc[this.tcnt]); this.removeMovieClip(); } }; } } }; _root.tcnt++; _root.places[spotX][spotY] = "taken"; } else { errorSound.start(); } } else { errorSound.start(); } } } }; laser_mc.onRelease = function () { if (inGame) { turret = 0; if (this._currentframe == 1) { missile_mc.gotoAndStop(1); sell_mc.gotoAndStop(1); temp["1"].removeMovieClip(); this.gotoAndStop(2); _root.building = true; _root.selling = false; _root.temp.attachMovie("laser turret", "1", 1); _root.temp["1"]._x = _xmouse; _root.temp["1"]._y = _ymouse; _root.temp["1"].onEnterFrame = function () { if (inGame) { spotX = Math.floor(_xmouse / 20); spotY = Math.floor(_ymouse / 20); this._x = (spotX * 20) + 10; this._y = (spotY * 20) + 10; this.gotoAndStop(2); if (_xmouse < 400) { this._alpha = 50; } else { this._alpha = 0; } } }; } else { this.gotoAndStop(1); _root.building = false; temp["1"].removeMovieClip(); } } }; missile_mc.onRelease = function () { if (inGame) { turret = 1; if (this._currentframe == 1) { laser_mc.gotoAndStop(1); sell_mc.gotoAndStop(1); temp["1"].removeMovieClip(); this.gotoAndStop(2); _root.building = true; _root.selling = false; _root.temp.attachMovie("missile turret", "1", 1); _root.temp["1"]._x = _xmouse; _root.temp["1"]._y = _ymouse; _root.temp["1"].onEnterFrame = function () { if (inGame) { spotX = Math.floor(_xmouse / 20); spotY = Math.floor(_ymouse / 20); this._x = (spotX * 20) + 10; this._y = (spotY * 20) + 10; this.gotoAndStop(2); if (_xmouse < 400) { this._alpha = 50; } else { this._alpha = 0; } } }; } else { this.gotoAndStop(1); _root.building = false; temp["1"].removeMovieClip(); } } }; sell_mc.onRelease = function () { if (inGame) { if (this._currentframe == 1) { laser_mc.gotoAndStop(1); missile_mc.gotoAndStop(1); temp["1"].removeMovieClip(); this.gotoAndStop(2); _root.building = false; _root.selling = true; _root.temp.attachMovie("sellSign", "1", 1); _root.temp["1"]._x = _xmouse; _root.temp["1"]._y = _ymouse; _root.temp["1"].onEnterFrame = function () { this._x = _xmouse; this._y = _ymouse; if (_xmouse < 400) { this._alpha = 100; } else { this._alpha = 0; } }; } else { this.gotoAndStop(1); temp["1"].removeMovieClip(); _root.selling = false; } } };
Symbol 11 MovieClip [laser turret] Frame 1
stop();
Symbol 16 MovieClip [missile turret] Frame 1
stop();
Symbol 30 MovieClip [little troop] Frame 1
stop();
Symbol 42 MovieClip [missile] Frame 1
stop();
Symbol 58 Button
on (release) { _root.inGame = true; _root.gotoAndStop(2); }
Symbol 60 MovieClip Frame 1
stop();
Symbol 60 MovieClip Frame 30
stop();
Symbol 73 MovieClip Frame 1
stop();
Symbol 76 MovieClip Frame 1
stop();
Symbol 79 MovieClip Frame 1
stop();

Library Items

Symbol 1 Sound [build]
Symbol 2 Sound [error]
Symbol 3 Sound [maximise]
Symbol 4 Sound [menu_back_12]
Symbol 5 Sound [beat little heavy loop]
Symbol 6 GraphicUsed by:11 16
Symbol 7 GraphicUsed by:8
Symbol 8 MovieClipUses:7Used by:11 71
Symbol 9 GraphicUsed by:10
Symbol 10 MovieClipUses:9Used by:11 16
Symbol 11 MovieClip [laser turret]Uses:6 8 10
Symbol 12 GraphicUsed by:15
Symbol 13 GraphicUsed by:15
Symbol 14 GraphicUsed by:15
Symbol 15 MovieClipUses:12 13 14Used by:16 74
Symbol 16 MovieClip [missile turret]Uses:6 15 10
Symbol 17 GraphicUsed by:18
Symbol 18 MovieClipUses:17Used by:19
Symbol 19 MovieClip [square]Uses:18
Symbol 20 FontUsed by:21 52 53 54 55 59 67 68 77 78 80 81 82
Symbol 21 EditableTextUses:20Used by:22
Symbol 22 MovieClip [sellSign]Uses:21
Symbol 23 GraphicUsed by:27
Symbol 24 GraphicUsed by:25
Symbol 25 MovieClipUses:24Used by:27
Symbol 26 GraphicUsed by:27
Symbol 27 MovieClipUses:23 25 26Used by:30
Symbol 28 GraphicUsed by:29
Symbol 29 MovieClipUses:28Used by:30
Symbol 30 MovieClip [little troop]Uses:27 29
Symbol 31 ShapeTweeningUsed by:39
Symbol 32 GraphicUsed by:39
Symbol 33 GraphicUsed by:39
Symbol 34 GraphicUsed by:39
Symbol 35 GraphicUsed by:39
Symbol 36 ShapeTweeningUsed by:39
Symbol 37 GraphicUsed by:39
Symbol 38 GraphicUsed by:39
Symbol 39 MovieClipUses:31 32 33 34 35 36 37 38Used by:42
Symbol 40 GraphicUsed by:41
Symbol 41 MovieClipUses:40Used by:42
Symbol 42 MovieClip [missile]Uses:39 41
Symbol 43 GraphicUsed by:44
Symbol 44 MovieClipUses:43Used by:Timeline
Symbol 45 GraphicUsed by:50
Symbol 46 GraphicUsed by:50
Symbol 47 BitmapUsed by:48
Symbol 48 GraphicUses:47Used by:49
Symbol 49 MovieClipUses:48Used by:50
Symbol 50 MovieClipUses:45 46 49Used by:Timeline
Symbol 51 GraphicUsed by:60
Symbol 52 EditableTextUses:20Used by:60
Symbol 53 EditableTextUses:20Used by:60
Symbol 54 TextUses:20Used by:57 58
Symbol 55 TextUses:20Used by:57 58
Symbol 56 GraphicUsed by:57 58
Symbol 57 ButtonUses:54 55 56Used by:60
Symbol 58 ButtonUses:54 55 56Used by:60
Symbol 59 EditableTextUses:20Used by:60
Symbol 60 MovieClipUses:51 52 53 57 58 59Used by:Timeline
Symbol 61 GraphicUsed by:62
Symbol 62 MovieClipUses:61Used by:Timeline
Symbol 63 GraphicUsed by:64
Symbol 64 MovieClipUses:63Used by:69
Symbol 65 GraphicUsed by:66
Symbol 66 MovieClipUses:65Used by:69
Symbol 67 EditableTextUses:20Used by:69
Symbol 68 EditableTextUses:20Used by:69
Symbol 69 MovieClipUses:64 66 67 68Used by:Timeline
Symbol 70 GraphicUsed by:73 76
Symbol 71 MovieClipUses:8Used by:73
Symbol 72 GraphicUsed by:73
Symbol 73 MovieClipUses:70 71 72Used by:Timeline
Symbol 74 MovieClipUses:15Used by:76
Symbol 75 GraphicUsed by:76
Symbol 76 MovieClipUses:70 74 75Used by:Timeline
Symbol 77 EditableTextUses:20Used by:79
Symbol 78 EditableTextUses:20Used by:79
Symbol 79 MovieClipUses:77 78Used by:Timeline
Symbol 80 EditableTextUses:20Used by:Timeline
Symbol 81 EditableTextUses:20Used by:Timeline
Symbol 82 TextUses:20Used by:Timeline

Instance Names

"dirt"Frame 1Symbol 44 MovieClip
"grass"Frame 1Symbol 50 MovieClip
"load_sign_mc"Frame 1Symbol 60 MovieClip
"ib"Frame 1Symbol 62 MovieClip
"ob"Frame 1Symbol 62 MovieClip
"laser_mc"Frame 2Symbol 73 MovieClip
"missile_mc"Frame 2Symbol 76 MovieClip
"sell_mc"Frame 2Symbol 79 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS1/AS2.
ExportAssets (56)Timeline Frame 1Symbol 1 as "build"
ExportAssets (56)Timeline Frame 1Symbol 2 as "error"
ExportAssets (56)Timeline Frame 1Symbol 3 as "maximise"
ExportAssets (56)Timeline Frame 1Symbol 4 as "menu_back_12"
ExportAssets (56)Timeline Frame 1Symbol 5 as "beat little heavy loop"
ExportAssets (56)Timeline Frame 1Symbol 11 as "laser turret"
ExportAssets (56)Timeline Frame 1Symbol 16 as "missile turret"
ExportAssets (56)Timeline Frame 1Symbol 19 as "square"
ExportAssets (56)Timeline Frame 1Symbol 22 as "sellSign"
ExportAssets (56)Timeline Frame 1Symbol 30 as "little troop"
ExportAssets (56)Timeline Frame 1Symbol 42 as "missile"

Dynamic Text Variables

_root.procentSymbol 52 EditableText"Loading: 100%"
_root.procentSymbol 53 EditableText"Loading: 100%"
_root.procentSymbol 59 EditableText"Loading: 100%"
_root.moneySymbol 67 EditableText"89438$"
timeSymbol 80 EditableText"Tid"




http://swfchan.com/10/48041/info.shtml
Created: 30/4 -2019 17:17:35 Last modified: 30/4 -2019 17:17:35 Server time: 17/05 -2024 22:32:06