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

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

~~~~~~~~~~~~~~~~~~~~Death.swf

This is the info page for
Flash #54202

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


ActionScript [AS3]
Section 1
//AAGun (AAGun) package { import flash.events.*; import flash.display.*; public class AAGun extends MovieClip { var speed:Number;// = 5 public function AAGun(){ speed = 5; super(); this.x = 275; this.y = 200; addEventListener(Event.ENTER_FRAME, moveGun); } public function moveGun(_arg1:Event){ var _local2:*; var _local3:*; _local2 = this.x; _local3 = this.y; if (MovieClip(parent).A_Button){ _local2 = (_local2 - speed); }; if (MovieClip(parent).D_Button){ _local2 = (_local2 + speed); }; if (MovieClip(parent).W_Button){ _local3 = (_local3 - speed); }; if (MovieClip(parent).S_Button){ _local3 = (_local3 + speed); }; if (_local2 < 10){ _local2 = 10; }; if (_local2 > 540){ _local2 = 540; }; if (_local3 < 20){ _local3 = 20; }; if (_local3 > 380){ _local3 = 380; }; this.x = _local2; this.y = _local3; } } }//package
Section 2
//Asteroid (Asteroid) package { import flash.events.*; import flash.display.*; public class Asteroid extends MovieClip { private var canStartAsteroid;// = true private var vx:Number; private var vy:Number;// = -400 public function Asteroid(){ vy = -400; canStartAsteroid = true; super(); init(); } private function init():void{ this.y = (this.y + vy); addEventListener(Event.ENTER_FRAME, onEnterFrame); } public function resetAsteroid():void{ this.y = ((Math.random() * -100) - 100); this.x = (Math.random() * 550); vy = ((Math.random() * 2) + 4); } public function startAsteroid():void{ if (canStartAsteroid == true){ this.x = (Math.random() * 550); this.y = ((Math.random() * -100) - 100); vy = ((Math.random() * 2) + 4); canStartAsteroid = false; }; } private function onEnterFrame(_arg1:Event):void{ if (canStartAsteroid == false){ this.y = (this.y + vy); }; if ((this.y - 50) > stage.stageHeight){ this.y = ((Math.random() * -400) - 100); this.x = (Math.random() * 550); vy = ((Math.random() * 2) + 4); canStartAsteroid = true; }; } } }//package
Section 3
//Bullet (Bullet) package { import flash.events.*; import flash.display.*; public class Bullet extends MovieClip { private var myBulletRotation:Number;// = 0 private var deltaY; private var deltaX; private var bulletMoving:Boolean;// = false public function Bullet(){ bulletMoving = false; myBulletRotation = 0; super(); init(); } public function startBullet(_arg1, _arg2, _arg3, _arg4, _arg5:Number):void{ if (bulletMoving == false){ this.x = _arg1; this.y = _arg2; deltaX = _arg3; deltaY = _arg4; myBulletRotation = _arg5; this.rotation = myBulletRotation; bulletMoving = true; }; } public function init():void{ this.x = 150; this.y = 600; addEventListener(Event.ENTER_FRAME, moveBullet); } public function resetBullet():void{ this.x = 150; this.y = 600; bulletMoving = false; } public function moveBullet(_arg1:Event){ if (bulletMoving == true){ this.y = (this.y + deltaY); this.x = (this.x + deltaX); if ((((((((this.y < 0)) || ((this.y > 400)))) || ((this.x < 0)))) || ((this.x > 550)))){ this.x = 150; this.y = 600; bulletMoving = false; }; }; } } }//package
Section 4
//gunshot (gunshot) package { import flash.media.*; public dynamic class gunshot extends Sound { } }//package
Section 5
//popcork (popcork) package { import flash.media.*; public dynamic class popcork extends Sound { } }//package
Section 6
//star (star) package { import flash.display.*; public dynamic class star extends MovieClip { } }//package
Section 7
//StartTrigGame (StartTrigGame) package { import flash.events.*; import flash.media.*; import flash.display.*; import flash.utils.*; public class StartTrigGame extends MovieClip { private var myHitSound:Sound; public var A_Button; var canFire:Boolean;// = true private var numAsteroids:Number;// = 10 var shotxspeed:Number;// = 0 private var numBullets:Number;// = 20 private var asteroidArray:Array; private var bulletArray:Array; var whichBullet:Number;// = 0 var bulletSpeed:Number;// = 8 public var W_Button; public var D_Button:Boolean; public var S_Button; private var myCannon:AAGun; var shotyspeed:Number;// = 0 var myTimer:Timer; var whichAsteroid:Number;// = 0 public function StartTrigGame(){ bulletSpeed = 8; shotxspeed = 0; shotyspeed = 0; numBullets = 20; whichBullet = 0; canFire = true; numAsteroids = 10; whichAsteroid = 0; super(); init(); } function timerFunction(_arg1:TimerEvent):void{ asteroidArray[whichAsteroid].startAsteroid(); whichAsteroid++; if (whichAsteroid >= (asteroidArray.length - 1)){ whichAsteroid = 0; }; } public function keyUpFunction(_arg1:KeyboardEvent){ if (_arg1.keyCode == 87){ W_Button = false; } else { if (_arg1.keyCode == 83){ S_Button = false; } else { if (_arg1.keyCode == 65){ A_Button = false; } else { if (_arg1.keyCode == 68){ D_Button = false; }; }; }; }; } private function init():void{ var _local1:uint; var _local2:uint; var _local3:*; var _local4:*; myHitSound = new popcork(); myCannon = new AAGun(); bulletArray = new Array(); asteroidArray = new Array(); _local1 = 0; while (_local1 < numAsteroids) { _local3 = new Asteroid(); addChild(_local3); asteroidArray.push(_local3); _local1++; }; addChild(myCannon); _local2 = 0; while (_local2 < numBullets) { _local4 = new Bullet(); addChild(_local4); bulletArray.push(_local4); _local2++; }; stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownFunction); stage.addEventListener(KeyboardEvent.KEY_UP, keyUpFunction); addEventListener(Event.ENTER_FRAME, onEnterFrame); stage.addEventListener(MouseEvent.MOUSE_DOWN, onMousePress); stage.addEventListener(MouseEvent.MOUSE_UP, onMyMouseUp); myTimer = new Timer(1000); myTimer.addEventListener(TimerEvent.TIMER, timerFunction); myTimer.start(); } public function keyDownFunction(_arg1:KeyboardEvent){ if (_arg1.keyCode == 87){ W_Button = true; } else { if (_arg1.keyCode == 83){ S_Button = true; } else { if (_arg1.keyCode == 65){ A_Button = true; } else { if (_arg1.keyCode == 68){ D_Button = true; }; }; }; }; } public function onMyMouseUp(_arg1:MouseEvent):void{ canFire = true; } public function onEnterFrame(_arg1:Event):void{ var _local2:Number; var _local3:Number; var _local4:int; var _local5:int; _local2 = Math.atan2((mouseY - myCannon.y), (mouseX - myCannon.x)); _local3 = Math.round(((_local2 * 180) / Math.PI)); myCannon.rotation = _local3; _local4 = (bulletArray.length - 1); while (_local4 >= 0) { _local5 = (asteroidArray.length - 1); while (_local5 >= 0) { if (bulletArray[_local4].hitTestObject(asteroidArray[_local5])){ myHitSound.play(0, 1); asteroidArray[_local5].resetAsteroid(); bulletArray[_local4].resetBullet(); }; _local5--; }; _local4--; }; } public function onMousePress(_arg1:MouseEvent):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local2 = (myCannon.y - mouseY); _local3 = (myCannon.x - mouseX); _local4 = Math.sqrt(((_local3 * _local3) + (_local2 * _local2))); _local5 = ((myCannon.y - mouseY) / _local4); shotyspeed = (bulletSpeed * _local5); shotyspeed = (shotyspeed * -1); _local6 = ((mouseX - myCannon.x) / _local4); shotxspeed = (bulletSpeed * _local6); _local7 = Math.atan2((mouseY - myCannon.y), (mouseX - myCannon.x)); _local8 = Math.round(((_local7 * 180) / Math.PI)); if (canFire == true){ bulletArray[whichBullet].startBullet(myCannon.x, myCannon.y, shotxspeed, shotyspeed, _local8); whichBullet++; if (whichBullet >= (bulletArray.length - 1)){ whichBullet = 0; }; canFire = false; }; } } }//package

Library Items

Symbol 1 Sound {popcork}
Symbol 2 Sound {gunshot}
Symbol 3 GraphicUsed by:4
Symbol 4 MovieClipUses:3Used by:5
Symbol 5 MovieClip {Bullet}Uses:4
Symbol 6 GraphicUsed by:9
Symbol 7 GraphicUsed by:9
Symbol 8 GraphicUsed by:9
Symbol 9 MovieClipUses:6 7 8Used by:10
Symbol 10 MovieClip {AAGun}Uses:9
Symbol 11 GraphicUsed by:12
Symbol 12 MovieClip {star}Uses:11
Symbol 13 ShapeTweeningUsed by:20
Symbol 14 ShapeTweeningUsed by:20
Symbol 15 ShapeTweeningUsed by:20
Symbol 16 ShapeTweeningUsed by:20
Symbol 17 ShapeTweeningUsed by:20
Symbol 18 ShapeTweeningUsed by:20
Symbol 19 GraphicUsed by:20
Symbol 20 MovieClipUses:13 14 15 16 17 18 19Used by:21 48
Symbol 21 MovieClip {Asteroid}Uses:20
Symbol 22 GraphicUsed by:53
Symbol 23 GraphicUsed by:53
Symbol 24 GraphicUsed by:52
Symbol 25 ShapeTweeningUsed by:29
Symbol 26 ShapeTweeningUsed by:29
Symbol 27 ShapeTweeningUsed by:29
Symbol 28 GraphicUsed by:29
Symbol 29 MovieClipUses:25 26 27 28Used by:52
Symbol 30 ShapeTweeningUsed by:38
Symbol 31 ShapeTweeningUsed by:38
Symbol 32 ShapeTweeningUsed by:38
Symbol 33 ShapeTweeningUsed by:38
Symbol 34 ShapeTweeningUsed by:38
Symbol 35 ShapeTweeningUsed by:38
Symbol 36 ShapeTweeningUsed by:38
Symbol 37 GraphicUsed by:38
Symbol 38 MovieClipUses:30 31 32 33 34 35 36 37Used by:39
Symbol 39 MovieClipUses:38Used by:40
Symbol 40 MovieClipUses:39Used by:52
Symbol 41 GraphicUsed by:42
Symbol 42 MovieClipUses:41Used by:43
Symbol 43 MovieClipUses:42Used by:52
Symbol 44 GraphicUsed by:45
Symbol 45 MovieClipUses:44Used by:46
Symbol 46 MovieClipUses:45Used by:47
Symbol 47 MovieClipUses:46Used by:52
Symbol 48 MovieClipUses:20Used by:49 50 51
Symbol 49 MovieClipUses:48Used by:52
Symbol 50 MovieClipUses:48Used by:52
Symbol 51 MovieClipUses:48Used by:52
Symbol 52 MovieClipUses:24 29 40 43 47 49 50 51Used by:53
Symbol 53 MovieClipUses:22 23 52Used by:Timeline
Symbol 54 SoundUsed by:Timeline

Special Tags

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




http://swfchan.com/11/54202/info.shtml
Created: 21/4 -2019 21:53:13 Last modified: 21/4 -2019 21:53:13 Server time: 13/05 -2024 02:04:05