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/52048352?noj=FRM52048352-22DC" width="1" height="1"></div>

Space Shooter.swf

This is the info page for
Flash #183274

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


Text
GAME
OVER!

ActionScript [AS3]

Section 1
//MainTimeline (ProyectoFinal_Jos_fla.MainTimeline) package ProyectoFinal_Jos_fla { import flash.events.*; import flash.display.*; import flash.text.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.geom.*; import flash.media.*; import flash.net.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.system.*; import flash.ui.*; import flash.utils.*; import flash.xml.*; public dynamic class MainTimeline extends MovieClip { public var txtScore:TextField; public var txtFinalScore:TextField; public var mcMain:MovieClip; public var leftDown:Boolean; public var upDown:Boolean; public var rightDown:Boolean; public var downDown:Boolean; public var mainSpeed:int; public var cTime:int; public var cLimit:int; public var shootAllow:Boolean; public var enemyTime:int; public var enemyLimit:int; public var score:int; public var bulletContainer:MovieClip; public var gameOver:Boolean; public var particleContainer:MovieClip; public function MainTimeline(){ addFrameScript(0, frame1, 4, frame5); } public function moveChar(_arg1:Event):void{ var _local2:*; if (leftDown){ mcMain.x = (mcMain.x - mainSpeed); }; if (upDown){ mcMain.y = (mcMain.y - mainSpeed); }; if (rightDown){ mcMain.x = (mcMain.x + mainSpeed); }; if (downDown){ mcMain.y = (mcMain.y + mainSpeed); }; if (mcMain.x <= 0){ mcMain.x = (mcMain.x + mainSpeed); }; if (mcMain.y <= 0){ mcMain.y = (mcMain.y + mainSpeed); }; if (mcMain.x >= (stage.stageWidth - mcMain.width)){ mcMain.x = (mcMain.x - mainSpeed); }; if (mcMain.y >= (stage.stageHeight - mcMain.height)){ mcMain.y = (mcMain.y - mainSpeed); }; if (cTime < cLimit){ cTime++; } else { shootAllow = true; cTime = 0; }; if (enemyTime < enemyLimit){ enemyTime++; } else { _local2 = new Enemy(); _local2.y = (-1 * _local2.height); _local2.x = int((Math.random() * (stage.stageWidth - _local2.width))); _local2.gotoAndStop(int((Math.random() * 3))); _local2.gotoAndStop(int((Math.random() * 4))); addChild(_local2); enemyTime = 0; }; txtScore.text = ("Score: " + score); } public function checkKeysDown(_arg1:KeyboardEvent):void{ var _local2:Bullet; if ((((_arg1.keyCode == 37)) || ((_arg1.keyCode == 65)))){ leftDown = true; }; if ((((_arg1.keyCode == 38)) || ((_arg1.keyCode == 87)))){ upDown = true; }; if ((((_arg1.keyCode == 39)) || ((_arg1.keyCode == 68)))){ rightDown = true; }; if ((((_arg1.keyCode == 40)) || ((_arg1.keyCode == 83)))){ downDown = true; }; if ((((_arg1.keyCode == 32)) && (shootAllow))){ shootAllow = false; _local2 = new Bullet(); _local2.x = ((mcMain.x + (mcMain.width / 2)) - (_local2.width / 2)); _local2.y = mcMain.y; bulletContainer.addChild(_local2); }; } public function checkKeysUp(_arg1:KeyboardEvent):void{ if ((((_arg1.keyCode == 37)) || ((_arg1.keyCode == 65)))){ leftDown = false; }; if ((((_arg1.keyCode == 38)) || ((_arg1.keyCode == 87)))){ upDown = false; }; if ((((_arg1.keyCode == 39)) || ((_arg1.keyCode == 68)))){ rightDown = false; }; if ((((_arg1.keyCode == 40)) || ((_arg1.keyCode == 83)))){ downDown = false; }; } public function generateParticles(_arg1:Event):void{ var _local3:Shape; var _local4:int; var _local5:DisplayObject; if ((Math.random() * 10) < 2){ _local3 = new Shape(); _local4 = (int((Math.random() * 5)) + 1); _local3.graphics.beginFill(0x999999, 1); _local3.graphics.drawRect(_local4, _local4, _local4, _local4); _local3.x = int((Math.random() * stage.stageWidth)); _local3.y = -10; particleContainer.addChild(_local3); }; var _local2:int; while (_local2 < particleContainer.numChildren) { _local5 = particleContainer.getChildAt(_local2); particleContainer.getChildAt(_local2).y = (_local5.y + (mainSpeed * 0.5)); if (_local5.y >= 400){ particleContainer.removeChild(_local5); }; _local2++; }; } public function goBack(_arg1:MouseEvent):void{ gotoAndStop(1); stage.removeEventListener(MouseEvent.CLICK, goBack); } function frame1(){ stop(); leftDown = false; upDown = false; rightDown = false; downDown = false; mainSpeed = 5; cTime = 0; cLimit = 12; shootAllow = true; enemyTime = 0; enemyLimit = 16; score = 0; bulletContainer = new MovieClip(); addChild(bulletContainer); gameOver = false; mcMain.addEventListener(Event.ENTER_FRAME, moveChar); stage.addEventListener(KeyboardEvent.KEY_DOWN, checkKeysDown); stage.addEventListener(KeyboardEvent.KEY_UP, checkKeysUp); stage.addEventListener(Event.ENTER_FRAME, generateParticles); if (particleContainer == null){ particleContainer = new MovieClip(); addChild(particleContainer); }; } function frame5(){ stop(); stage.addEventListener(MouseEvent.CLICK, goBack); mcMain.x = stage.stageWidth; mcMain.y = stage.stageHeight; mcMain.removeEventListener(Event.ENTER_FRAME, moveChar); txtFinalScore.text = ("Final Score: " + score); } } }//package ProyectoFinal_Jos_fla
Section 2
//Bullet (Bullet) package { import flash.events.*; import flash.display.*; public class Bullet extends MovieClip { private var _root:Object; private var speed:int;// = 10 public function Bullet(){ addEventListener(Event.ADDED, beginClass); addEventListener(Event.ENTER_FRAME, eFrame); } private function beginClass(_arg1:Event):void{ _root = MovieClip(root); } private function eFrame(_arg1:Event):void{ y = (y - speed); if (this.y < (-1 * this.height)){ removeEventListener(Event.ENTER_FRAME, eFrame); _root.bulletContainer.removeChild(this); }; if (_root.gameOver){ removeEventListener(Event.ENTER_FRAME, eFrame); this.parent.removeChild(this); }; } public function removeListeners():void{ removeEventListener(Event.ENTER_FRAME, eFrame); } } }//package
Section 3
//Enemy (Enemy) package { import flash.events.*; import flash.display.*; public class Enemy extends MovieClip { private var _root:Object; private var speed:int;// = 5 public function Enemy(){ addEventListener(Event.ADDED, beginClass); addEventListener(Event.ENTER_FRAME, eFrame); } private function beginClass(_arg1:Event):void{ _root = MovieClip(root); } private function eFrame(_arg1:Event):void{ var _local3:MovieClip; y = (y + speed); if (this.y > stage.stageHeight){ removeEventListener(Event.ENTER_FRAME, eFrame); _root.removeChild(this); }; var _local2:int; while (_local2 < _root.bulletContainer.numChildren) { _local3 = _root.bulletContainer.getChildAt(_local2); if (hitTestObject(_local3)){ removeEventListener(Event.ENTER_FRAME, eFrame); _root.removeChild(this); _root.bulletContainer.removeChild(_local3); _local3.removeListeners(); _root.score = (_root.score + 5); }; _local2++; }; if (hitTestObject(_root.mcMain)){ _root.gameOver = true; _root.gotoAndStop("lose"); }; if (_root.gameOver){ removeEventListener(Event.ENTER_FRAME, eFrame); this.parent.removeChild(this); }; } public function removeListeners():void{ this.removeEventListener(Event.ENTER_FRAME, eFrame); } } }//package

Library Items

Symbol 1 GraphicUsed by:24
Symbol 2 GraphicUsed by:3
Symbol 3 MovieClipUses:2Used by:24
Symbol 4 GraphicUsed by:24
Symbol 5 GraphicUsed by:6
Symbol 6 MovieClipUses:5Used by:24
Symbol 7 GraphicUsed by:8
Symbol 8 MovieClipUses:7Used by:24
Symbol 9 GraphicUsed by:10
Symbol 10 MovieClipUses:9Used by:24
Symbol 11 GraphicUsed by:12
Symbol 12 MovieClipUses:11Used by:24
Symbol 13 GraphicUsed by:14
Symbol 14 MovieClipUses:13Used by:24
Symbol 15 GraphicUsed by:16
Symbol 16 MovieClipUses:15Used by:24
Symbol 17 GraphicUsed by:24
Symbol 18 GraphicUsed by:24
Symbol 19 GraphicUsed by:24
Symbol 20 GraphicUsed by:24
Symbol 21 GraphicUsed by:24
Symbol 22 GraphicUsed by:24
Symbol 23 GraphicUsed by:24
Symbol 24 MovieClip {Enemy}Uses:1 3 4 6 8 10 12 14 16 17 18 19 20 21 22 23
Symbol 25 GraphicUsed by:27
Symbol 26 SoundUsed by:27
Symbol 27 MovieClip {Bullet}Uses:25 26
Symbol 28 GraphicUsed by:62
Symbol 29 GraphicUsed by:30
Symbol 30 MovieClipUses:29Used by:62
Symbol 31 GraphicUsed by:32
Symbol 32 MovieClipUses:31Used by:62
Symbol 33 GraphicUsed by:34
Symbol 34 MovieClipUses:33Used by:62
Symbol 35 GraphicUsed by:36
Symbol 36 MovieClipUses:35Used by:62
Symbol 37 GraphicUsed by:38
Symbol 38 MovieClipUses:37Used by:62
Symbol 39 GraphicUsed by:40
Symbol 40 MovieClipUses:39Used by:62
Symbol 41 GraphicUsed by:42
Symbol 42 MovieClipUses:41Used by:62
Symbol 43 GraphicUsed by:44
Symbol 44 MovieClipUses:43Used by:62
Symbol 45 GraphicUsed by:46
Symbol 46 MovieClipUses:45Used by:62
Symbol 47 GraphicUsed by:48
Symbol 48 MovieClipUses:47Used by:62
Symbol 49 GraphicUsed by:50
Symbol 50 MovieClipUses:49Used by:62
Symbol 51 GraphicUsed by:52
Symbol 52 MovieClipUses:51Used by:62
Symbol 53 GraphicUsed by:54
Symbol 54 MovieClipUses:53Used by:62
Symbol 55 GraphicUsed by:56
Symbol 56 MovieClipUses:55Used by:62
Symbol 57 GraphicUsed by:62
Symbol 58 GraphicUsed by:59
Symbol 59 MovieClipUses:58Used by:62
Symbol 60 GraphicUsed by:61
Symbol 61 MovieClipUses:60Used by:62
Symbol 62 MovieClipUses:28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 57 59 61Used by:63
Symbol 63 MovieClipUses:62Used by:Timeline
Symbol 64 GraphicUsed by:65
Symbol 65 MovieClipUses:64Used by:Timeline
Symbol 66 FontUsed by:67 71
Symbol 67 EditableTextUses:66Used by:Timeline
Symbol 68 SoundUsed by:Timeline
Symbol 69 FontUsed by:70
Symbol 70 TextUses:69Used by:Timeline
Symbol 71 EditableTextUses:66Used by:Timeline

Instance Names

"mcMain"Frame 1Symbol 65 MovieClip
"txtScore"Frame 1Symbol 67 EditableText
"txtFinalScore"Frame 5Symbol 71 EditableText

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS3.

Labels

"cancionfondo"Frame 1
"lose"Frame 5
"pewpew"Symbol 27 MovieClip {Bullet} Frame 1




http://swfchan.com/37/183274/info.shtml
Created: 6/8 -2019 21:47:58 Last modified: 6/8 -2019 21:47:58 Server time: 22/12 -2024 09:20:08