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

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

BUSEY VS QUALL.swf

This is the info page for
Flash #95713

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


Text
0

Score

ActionScript [AS3]

Section 1
//Bullet (Game.Bullet) package Game { import flash.display.*; public class Bullet extends MovieClip { public function Bullet(_arg1:Number, _arg2:Number){ this.x = _arg1; this.y = _arg2; } public function update(){ this.y = (this.y - C.BULLET_SPEED); } public function notInScreen():Boolean{ return ((this.y <= 0)); } } }//package Game
Section 2
//C (Game.C) package Game { public class C { public static const PLAYER_SPEED:Number = 4; public static const PLAYER_START_X:Number = 400; public static const PLAYER_START_Y:Number = 415; public static const PLAYER_LEFT_BOUND:Number = 50; public static const PLAYER_RIGHT_BOUND:Number = 550; public static const ENEMY_SPEED:Number = 5; public static const ENEMY_ADVANCE:Number = 65; public static const SPAWN_ENEMY_CHANCE:Number = 0.03; public static const ENEMY_START_X:Number = 100; public static const ENEMY_START_Y:Number = 30; public static const ENEMY_STARTING_POINTS:Number = 10; public static const ENEMY_REDUCE_POINTS:Number = 2; public static const BULLET_SPEED:Number = 6; public static const BULLET_DELAY:Number = 1000; public static const PLAYER_START_SCORE:Number = 0; } }//package Game
Section 3
//Enemy (Game.Enemy) package Game { import flash.display.*; public class Enemy extends MovieClip { private var facing:Number; private var score:Number; public function Enemy(){ this.x = C.ENEMY_START_X; this.y = C.ENEMY_START_Y; this.facing = C.ENEMY_SPEED; this.score = C.ENEMY_STARTING_POINTS; } public function update(){ this.x = (this.x + this.facing); if ((((this.x > C.PLAYER_RIGHT_BOUND)) || ((this.x < C.PLAYER_LEFT_BOUND)))){ this.facing = (this.facing * -1); this.y = (this.y + C.ENEMY_ADVANCE); this.score = (this.score - C.ENEMY_REDUCE_POINTS); }; } public function getPointsWorth(){ return (this.score); } } }//package Game
Section 4
//busey_hya (busey_hya) package { import flash.media.*; public dynamic class busey_hya extends Sound { } }//package
Section 5
//GameController (GameController) package { import flash.events.*; import Game.*; import flash.media.*; import flash.display.*; import flash.text.*; import flash.utils.*; import flash.geom.*; public class GameController extends MovieClip { public var mcGameStage:MovieClip; public var txtScorePlayer:TextField; private var player:Player; private var playerScore:Number; private var enemies:Array; private var bullets:Array; private var lastBulletTime:Number; private var moveX:Number; private var fireBullet:Boolean; private var sound1:busey_hya; var myChannel1:SoundChannel; private var sound2:quall_eh; var myChannel2:SoundChannel; public function GameController(){ sound1 = new busey_hya(); myChannel1 = sound1.play(); sound2 = new quall_eh(); myChannel2 = sound2.play(); super(); addFrameScript(0, frame1); } public function startGame(){ player = new Player(); player.x = C.PLAYER_START_X; player.y = C.PLAYER_START_Y; mcGameStage.addChild(player); playerScore = C.PLAYER_START_SCORE; moveX = 0; fireBullet = false; lastBulletTime = getTimer(); enemies = new Array(); bullets = new Array(); mcGameStage.addEventListener(Event.ENTER_FRAME, update); addEventListener(Event.ADDED_TO_STAGE, gameAddedToStage); if (stage != null){ stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); stage.addEventListener(KeyboardEvent.KEY_UP, keyUpHandler); }; } private function gameAddedToStage(_arg1:Event):void{ stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); stage.addEventListener(KeyboardEvent.KEY_UP, keyUpHandler); } private function keyDownHandler(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 32){ fireBullet = true; sound1.play(); } else { if (_arg1.keyCode == 37){ moveX = -1; } else { if (_arg1.keyCode == 39){ moveX = 1; }; }; }; } private function keyUpHandler(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 37){ moveX = 0; } else { if (_arg1.keyCode == 39){ moveX = 0; }; }; } private function update(_arg1:Event){ var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; if (moveX > 0){ if (player.x <= C.PLAYER_RIGHT_BOUND){ player.x = (player.x + C.PLAYER_SPEED); }; } else { if (moveX < 0){ if (player.x > C.PLAYER_LEFT_BOUND){ player.x = (player.x - C.PLAYER_SPEED); }; }; }; if (fireBullet){ _local4 = getTimer(); if ((_local4 - lastBulletTime) > C.BULLET_DELAY){ lastBulletTime = _local4; _local5 = new Bullet(player.x, player.y); bullets.push(_local5); mcGameStage.addChild(_local5); }; fireBullet = false; }; if (Math.random() < C.SPAWN_ENEMY_CHANCE){ _local6 = new Enemy(); enemies.push(_local6); mcGameStage.addChild(_local6); }; _local2 = (enemies.length - 1); while (_local2 >= 0) { enemies[_local2].update(); _local2--; }; _local2 = (bullets.length - 1); while (_local2 >= 0) { bullets[_local2].update(); if (bullets[_local2].notInScreen()){ mcGameStage.removeChild(bullets[_local2]); bullets.splice(_local2, 1); }; _local2--; }; _local2 = (bullets.length - 1); while (_local2 >= 0) { _local3 = (enemies.length - 1); while (_local3 >= 0) { if (bullets[_local2].hitTestObject(enemies[_local3])){ playerScore = (playerScore + enemies[_local3].getPointsWorth()); mcGameStage.removeChild(bullets[_local2]); mcGameStage.removeChild(enemies[_local3]); bullets.splice(_local2, 1); enemies.splice(_local3, 1); sound2.play(); break; }; _local3--; }; _local2--; }; _local3 = (enemies.length - 1); while (_local3 >= 0) { if (player.hitTestObject(enemies[_local3])){ mcGameStage.removeChild(player); mcGameStage.removeChild(enemies[_local3]); enemies.splice(_local3, 1); gameOver(); break; }; _local3--; }; txtScorePlayer.text = String(playerScore); } private function gameOver(){ player = null; mcGameStage.removeEventListener(Event.ENTER_FRAME, update); stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpHandler); } function frame1(){ startGame(); } } }//package
Section 6
//Player (Player) package { import flash.display.*; public dynamic class Player extends MovieClip { } }//package
Section 7
//quall_eh (quall_eh) package { import flash.media.*; public dynamic class quall_eh extends Sound { } }//package

Library Items

Symbol 1 Sound {busey_hya}
Symbol 2 Sound {quall_eh}
Symbol 3 BitmapUsed by:4
Symbol 4 GraphicUses:3Used by:5
Symbol 5 MovieClip {Player}Uses:4
Symbol 6 BitmapUsed by:7
Symbol 7 GraphicUses:6Used by:8
Symbol 8 MovieClip {Game.Enemy}Uses:7
Symbol 9 GraphicUsed by:10
Symbol 10 MovieClip {Game.Bullet}Uses:9
Symbol 11 GraphicUsed by:Timeline
Symbol 12 GraphicUsed by:13
Symbol 13 MovieClipUses:12Used by:Timeline
Symbol 14 FontUsed by:15 16
Symbol 15 EditableTextUses:14Used by:Timeline
Symbol 16 TextUses:14Used by:Timeline

Instance Names

"mcGameStage"Frame 1Symbol 13 MovieClip
"txtScorePlayer"Frame 1Symbol 15 EditableText

Special Tags

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




http://swfchan.com/20/95713/info.shtml
Created: 24/3 -2019 06:56:09 Last modified: 24/3 -2019 06:56:09 Server time: 22/12 -2024 04:00:35