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

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

Simo Hayha Simulator.swf

This is the info page for
Flash #156164

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


Text
<p align="center"><font face="_sans" size="79" color="#000000" letterSpacing="0.000000" kerning="0">Simo Häyhä</font></p><p align="center"><font face="_sans" size="79" color="#000000" letterSpacing="0.000000" kerning="0">Simulator</font></p>

<p align="center"><font face="_sans" size="79" color="#ffffff" letterSpacing="0.000000" kerning="0">Game Over</font></p><p align="center"><font face="_sans" size="21" color="#ffffff" letterSpacing="0.000000" kerning="0">Click this message to continue</font></p>

<p align="left"></p>

<p align="left"><font face="_sans" size="43" color="#000000" letterSpacing="0.000000" kerning="0">START</font></p>

ActionScript [AS3]

Section 1
//Bullet (Bullet) package { import flash.display.*; public dynamic class Bullet extends MovieClip { } }//package
Section 2
//ButtonStart (ButtonStart) package { import flash.display.*; public dynamic class ButtonStart extends MovieClip { } }//package
Section 3
//Enemy1 (Enemy1) package { import flash.display.*; public class Enemy1 extends MovieClip { public var yspeed:int;// = 5 public var xspeed:int;// = 5 public var mydirection:String; public var rnd1:int; public var dead:Boolean; public function Enemy1(){ rnd1 = (Math.random() * 2); if (rnd1 == 0){ mydirection = "left"; }; if (rnd1 == 1){ mydirection = "right"; }; } public function action():void{ this.y = (this.y + yspeed); if (mydirection == "right"){ this.x = (this.x + xspeed); }; if (mydirection == "left"){ this.x = (this.x - xspeed); }; if (this.x < 5){ mydirection = "right"; }; if (this.x > 755){ mydirection = "left"; }; if (this.y > 610){ dead = true; }; } } }//package
Section 4
//Game (Game) package { import flash.events.*; import flash.display.*; import flash.utils.*; public class Game extends MovieClip { public var timer:Timer; public var score:int; public var rnd1:int; public var i:int; public var ii:int; public var buttonstart:ButtonStart; public var gametitle:Title; public var hero:Hero; public var scorebox:ScoreBox; public var enemy1:Enemy1; public var bullet:Bullet; public var gameovermessage:GameOverMessage; public var Left:Boolean; public var Right:Boolean; public var Space:Boolean; public var BulletArray:Array; public var EnemyArray:Array; public function Game(){ timer = new Timer(28); super(); timer.addEventListener(TimerEvent.TIMER, onTimer); StartScreen(); } public function StartScreen(){ var buttonstartfunction:Function; buttonstartfunction = function (_arg1:MouseEvent){ removeChild(buttonstart); removeChild(gametitle); SetUp(); }; gametitle = new Title(); addChild(gametitle); gametitle.x = 400; gametitle.y = 100; buttonstart = new ButtonStart(); addChild(buttonstart); buttonstart.x = 407; buttonstart.y = 327; buttonstart.addEventListener(MouseEvent.CLICK, buttonstartfunction); } public function SetUp(){ hero = new Hero(); addChild(hero); hero.x = 400; hero.y = 500; hero.dead = false; scorebox = new ScoreBox(); addChild(scorebox); scorebox.x = 25; scorebox.y = 12; score = 0; stage.addEventListener(KeyboardEvent.KEY_DOWN, KeyDownHandler); stage.addEventListener(KeyboardEvent.KEY_UP, KeyUpHandler); BulletArray = new Array(); EnemyArray = new Array(); timer.start(); } public function KeyDownHandler(_arg1:KeyboardEvent){ if (_arg1.keyCode == 39){ Right = true; }; if (_arg1.keyCode == 37){ Left = true; }; } public function KeyUpHandler(_arg1:KeyboardEvent){ if (_arg1.keyCode == 39){ Right = false; }; if (_arg1.keyCode == 37){ Left = false; }; if (_arg1.keyCode == 32){ Space = true; }; } public function onTimer(_arg1:TimerEvent):void{ IntroduceEnemies(); ProcessUserInput(); MoveObjects(); CollisionDetection(); RemoveDeadObjects(); UpdateDisplay(); CheckForGameOver(); } public function IntroduceEnemies(){ rnd1 = (Math.random() * 30); if (rnd1 == 1){ enemy1 = new Enemy1(); addChild(enemy1); enemy1.x = (Math.random() * 800); enemy1.y = -30; EnemyArray.push(enemy1); }; } public function ProcessUserInput(){ if (((Right) && ((hero.x < 780)))){ hero.x = (hero.x + 10); }; if (((Left) && ((hero.x > 20)))){ hero.x = (hero.x - 10); }; if (Space){ Shoot(); }; } public function Shoot(){ Space = false; bullet = new Bullet(); addChild(bullet); bullet.x = hero.x; bullet.y = hero.y; bullet.dead = false; BulletArray.push(bullet); } public function MoveObjects(){ var _local1:Object; i = 0; while (i < EnemyArray.length) { EnemyArray[i].action(); i++; }; for each (_local1 in BulletArray) { _local1.y = (_local1.y - 15); }; } public function CollisionDetection(){ i = 0; while (i < EnemyArray.length) { if (EnemyArray[i].hitTestObject(hero.HitZone)){ hero.dead = true; }; ii = 0; while (ii < BulletArray.length) { if (EnemyArray[i].hitTestObject(BulletArray[ii])){ EnemyArray[i].dead = true; BulletArray[ii].dead = true; score = (score + 5); }; ii++; }; i++; }; } public function RemoveDeadObjects(){ i = 0; while (i < BulletArray.length) { if (((BulletArray[i].dead) || ((BulletArray[i].y < 0)))){ removeChild(BulletArray[i]); BulletArray[i] = null; BulletArray.splice(i, 1); }; i++; }; i = 0; while (i < EnemyArray.length) { if (EnemyArray[i].dead){ removeChild(EnemyArray[i]); EnemyArray[i] = null; EnemyArray.splice(i, 1); }; i++; }; } public function UpdateDisplay(){ scorebox.scoretext.text = ("Score: " + score.toString()); } public function CheckForGameOver(){ if (hero.dead){ var gameoverfunction:Function = function (_arg1:MouseEvent){ RemoveAllObjects(); StartScreen(); }; timer.stop(); gameovermessage = new GameOverMessage(); addChild(gameovermessage); gameovermessage.x = 370; gameovermessage.y = 200; gameovermessage.addEventListener(MouseEvent.CLICK, gameoverfunction); }; } public function RemoveAllObjects(){ i = 0; while (i < BulletArray.length) { removeChild(BulletArray[i]); BulletArray[i] = null; i++; }; i = 0; while (i < EnemyArray.length) { removeChild(EnemyArray[i]); EnemyArray[i] = null; i++; }; BulletArray = []; EnemyArray = []; removeChild(hero); removeChild(gameovermessage); removeChild(scorebox); stage.removeEventListener(KeyboardEvent.KEY_DOWN, KeyDownHandler); stage.removeEventListener(KeyboardEvent.KEY_UP, KeyUpHandler); } } }//package
Section 5
//GameOverMessage (GameOverMessage) package { import flash.display.*; public dynamic class GameOverMessage extends MovieClip { } }//package
Section 6
//Hero (Hero) package { import flash.display.*; public dynamic class Hero extends MovieClip { public var HitZone:MovieClip; } }//package
Section 7
//ScoreBox (ScoreBox) package { import flash.display.*; import flash.text.*; public dynamic class ScoreBox extends MovieClip { public var scoretext:TextField; } }//package
Section 8
//Title (Title) package { import flash.display.*; public dynamic class Title extends MovieClip { } }//package

Library Items

Symbol 1 FontUsed by:2 5 26 29 43
Symbol 2 EditableTextUses:1Used by:3
Symbol 3 MovieClip {Title}Uses:2
Symbol 4 GraphicUsed by:6
Symbol 5 EditableTextUses:1Used by:6
Symbol 6 MovieClip {ScoreBox}Uses:4 5
Symbol 7 GraphicUsed by:24
Symbol 8 GraphicUsed by:9
Symbol 9 MovieClipUses:8Used by:24
Symbol 10 BitmapUsed by:11
Symbol 11 GraphicUses:10Used by:24
Symbol 12 BitmapUsed by:13
Symbol 13 GraphicUses:12Used by:24
Symbol 14 BitmapUsed by:15
Symbol 15 GraphicUses:14Used by:16
Symbol 16 MovieClipUses:15Used by:24
Symbol 17 GraphicUsed by:24
Symbol 18 BitmapUsed by:19
Symbol 19 GraphicUses:18Used by:20
Symbol 20 MovieClipUses:19Used by:24
Symbol 21 BitmapUsed by:22
Symbol 22 GraphicUses:21Used by:23
Symbol 23 MovieClipUses:22Used by:24
Symbol 24 MovieClip {Hero}Uses:7 9 11 13 16 17 20 23
Symbol 25 GraphicUsed by:30
Symbol 26 EditableTextUses:1Used by:30
Symbol 27 GraphicUsed by:28 44
Symbol 28 MovieClipUses:27Used by:30
Symbol 29 EditableTextUses:1Used by:30
Symbol 30 MovieClip {GameOverMessage}Uses:25 26 28 29
Symbol 31 GraphicUsed by:32
Symbol 32 MovieClipUses:31Used by:42
Symbol 33 BitmapUsed by:34
Symbol 34 GraphicUses:33Used by:35
Symbol 35 MovieClipUses:34Used by:42
Symbol 36 BitmapUsed by:37
Symbol 37 GraphicUses:36Used by:38
Symbol 38 MovieClipUses:37Used by:42
Symbol 39 BitmapUsed by:40
Symbol 40 GraphicUses:39Used by:41
Symbol 41 MovieClipUses:40Used by:42
Symbol 42 MovieClip {Enemy1}Uses:32 35 38 41
Symbol 43 EditableTextUses:1Used by:45
Symbol 44 MovieClipUses:27Used by:45
Symbol 45 MovieClip {ButtonStart}Uses:43 44
Symbol 46 GraphicUsed by:47
Symbol 47 MovieClip {Bullet}Uses:46
Symbol 48 GraphicUsed by:Timeline

Instance Names

"scoretext"Symbol 6 MovieClip {ScoreBox} Frame 1Symbol 5 EditableText
"HitZone"Symbol 24 MovieClip {Hero} Frame 1Symbol 9 MovieClip

Special Tags

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




http://swfchan.com/32/156164/info.shtml
Created: 24/10 -2018 02:54:18 Last modified: 24/10 -2018 02:54:18 Server time: 02/05 -2024 04:18:58