STORY LOOP FURRY PORN GAMES C SERVICES [?] [R] RND POPULAR | Archived flashes: 229595 |
/disc/ · /res/ — /show/ · /fap/ · /gg/ · /swf/ | P0001 · P2595 · P5190 |
This is the info page for Flash #183274 |
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_flaSection 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); } } }//packageSection 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 Graphic | Used by:24 | |
Symbol 2 Graphic | Used by:3 | |
Symbol 3 MovieClip | Uses:2 | Used by:24 |
Symbol 4 Graphic | Used by:24 | |
Symbol 5 Graphic | Used by:6 | |
Symbol 6 MovieClip | Uses:5 | Used by:24 |
Symbol 7 Graphic | Used by:8 | |
Symbol 8 MovieClip | Uses:7 | Used by:24 |
Symbol 9 Graphic | Used by:10 | |
Symbol 10 MovieClip | Uses:9 | Used by:24 |
Symbol 11 Graphic | Used by:12 | |
Symbol 12 MovieClip | Uses:11 | Used by:24 |
Symbol 13 Graphic | Used by:14 | |
Symbol 14 MovieClip | Uses:13 | Used by:24 |
Symbol 15 Graphic | Used by:16 | |
Symbol 16 MovieClip | Uses:15 | Used by:24 |
Symbol 17 Graphic | Used by:24 | |
Symbol 18 Graphic | Used by:24 | |
Symbol 19 Graphic | Used by:24 | |
Symbol 20 Graphic | Used by:24 | |
Symbol 21 Graphic | Used by:24 | |
Symbol 22 Graphic | Used by:24 | |
Symbol 23 Graphic | Used 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 Graphic | Used by:27 | |
Symbol 26 Sound | Used by:27 | |
Symbol 27 MovieClip {Bullet} | Uses:25 26 | |
Symbol 28 Graphic | Used by:62 | |
Symbol 29 Graphic | Used by:30 | |
Symbol 30 MovieClip | Uses:29 | Used by:62 |
Symbol 31 Graphic | Used by:32 | |
Symbol 32 MovieClip | Uses:31 | Used by:62 |
Symbol 33 Graphic | Used by:34 | |
Symbol 34 MovieClip | Uses:33 | Used by:62 |
Symbol 35 Graphic | Used by:36 | |
Symbol 36 MovieClip | Uses:35 | Used by:62 |
Symbol 37 Graphic | Used by:38 | |
Symbol 38 MovieClip | Uses:37 | Used by:62 |
Symbol 39 Graphic | Used by:40 | |
Symbol 40 MovieClip | Uses:39 | Used by:62 |
Symbol 41 Graphic | Used by:42 | |
Symbol 42 MovieClip | Uses:41 | Used by:62 |
Symbol 43 Graphic | Used by:44 | |
Symbol 44 MovieClip | Uses:43 | Used by:62 |
Symbol 45 Graphic | Used by:46 | |
Symbol 46 MovieClip | Uses:45 | Used by:62 |
Symbol 47 Graphic | Used by:48 | |
Symbol 48 MovieClip | Uses:47 | Used by:62 |
Symbol 49 Graphic | Used by:50 | |
Symbol 50 MovieClip | Uses:49 | Used by:62 |
Symbol 51 Graphic | Used by:52 | |
Symbol 52 MovieClip | Uses:51 | Used by:62 |
Symbol 53 Graphic | Used by:54 | |
Symbol 54 MovieClip | Uses:53 | Used by:62 |
Symbol 55 Graphic | Used by:56 | |
Symbol 56 MovieClip | Uses:55 | Used by:62 |
Symbol 57 Graphic | Used by:62 | |
Symbol 58 Graphic | Used by:59 | |
Symbol 59 MovieClip | Uses:58 | Used by:62 |
Symbol 60 Graphic | Used by:61 | |
Symbol 61 MovieClip | Uses:60 | Used by:62 |
Symbol 62 MovieClip | Uses:28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 57 59 61 | Used by:63 |
Symbol 63 MovieClip | Uses:62 | Used by:Timeline |
Symbol 64 Graphic | Used by:65 | |
Symbol 65 MovieClip | Uses:64 | Used by:Timeline |
Symbol 66 Font | Used by:67 71 | |
Symbol 67 EditableText | Uses:66 | Used by:Timeline |
Symbol 68 Sound | Used by:Timeline | |
Symbol 69 Font | Used by:70 | |
Symbol 70 Text | Uses:69 | Used by:Timeline |
Symbol 71 EditableText | Uses:66 | Used by:Timeline |
Instance Names
"mcMain" | Frame 1 | Symbol 65 MovieClip |
"txtScore" | Frame 1 | Symbol 67 EditableText |
"txtFinalScore" | Frame 5 | Symbol 71 EditableText |
Special Tags
FileAttributes (69) | Timeline Frame 1 | Access local files only, Metadata not present, AS3. |
Labels
"cancionfondo" | Frame 1 |
"lose" | Frame 5 |
"pewpew" | Symbol 27 MovieClip {Bullet} Frame 1 |
|