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

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

kw3d.swf

This is the info page for
Flash #88103

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


Text
67890

12345

arrows

space

kw3d

ActionScript [AS3]

Section 1
//MainTimeline (game_fla.MainTimeline) package game_fla { import flash.display.*; public dynamic class MainTimeline extends MovieClip { public var myPre:Preloader; public var mygame:Game; public function MainTimeline(){ addFrameScript(0, frame1, 2, frame3); } function frame3(){ if (this.numChildren > 0){ this.removeChildAt(0); }; mygame = new Game(this); stop(); } function frame1(){ myPre = new Preloader(this); } } }//package game_fla
Section 2
//menu_2 (game_fla.menu_2) package game_fla { import flash.display.*; public dynamic class menu_2 extends MovieClip { public var startbut:SimpleButton; public function menu_2(){ addFrameScript(0, frame1, 39, frame40); } function frame1(){ stop(); } function frame40(){ stop(); } } }//package game_fla
Section 3
//sounds_mc_6 (game_fla.sounds_mc_6) package game_fla { import flash.display.*; public dynamic class sounds_mc_6 extends MovieClip { public function sounds_mc_6(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package game_fla
Section 4
//Game (Game) package { import flash.display.*; import flash.events.*; import mochi.*; import flash.ui.*; import flash.net.*; public class Game { private var ob; private var mySoundsCh:Object; public var myClip:mainGraphics; private var gameOb:Object; private var m:Number; private var n:Number; private var myParent; private var ob2; public function Game(_arg1:Sprite){ myParent = _arg1; if (myParent.numChildren > 0){ myParent.removeChildAt(0); }; prepareGame(); } private function startGame():void{ if (myParent.numChildren > 1){ myParent.removeChildAt(1); }; myParent.stage.focus = myClip; gameOb.gameW = 600; gameOb.gameH = 450; gameOb.score = 0; myClip.gamemc.visible = true; gameOb.tiles = new Object(); gameOb.tilesArr = new Array(); gameOb.fX = 0; gameOb.fY = 0; gameOb.spacer = 60; gameOb.focal = 40; gameOb.numOfTiles = 10; gameOb.zSpeed = 1; gameOb.xSpeed = 2; n = 1; while (n <= gameOb.numOfTiles) { gameOb.tiles[n] = new Tiles(); ob = gameOb.tiles[n]; myClip.gamemc.addChildAt(ob, 0); gameOb.tilesArr.push(ob); ob.z = (gameOb.focal + (gameOb.spacer * n)); if (n > 1){ ob2 = gameOb.tiles[(n - 1)]; m = ((ob2.currentFrame - 1) * 2); ob.xr = gameOb.keyDirs[m]; ob.xval = (ob2.xval + ((gameOb.xSpeed * gameOb.spacer) * ob.xr)); ob.yr = gameOb.keyDirs[(m + 1)]; ob.yval = (ob2.yval + ((gameOb.xSpeed * gameOb.spacer) * ob.yr)); } else { ob.xval = 0; ob.yval = 0; }; ob.gotoAndStop(rand(1, 6)); n++; }; drawTiles(); gameOb.gameStatus = "play"; gameOb.myDate = new Date(); gameOb.startTime = gameOb.myDate.getTime(); } private function reStartGame():void{ myClip.logo.gotoAndStop(1); gameOb.gameStatus = "start"; } private function moveTiles():void{ ob = gameOb.tilesArr[0]; if (ob.z > gameOb.focal){ gameOb.zSpeed = (((gameOb.timeFrame / 25) * ob.z) / gameOb.focal); if (ob.xval > (gameOb.fX + (gameOb.xSpeed * gameOb.zSpeed))){ gameOb.fX = (gameOb.fX + (gameOb.xSpeed * gameOb.zSpeed)); } else { if (ob.xval < (gameOb.fX - (gameOb.xSpeed * gameOb.zSpeed))){ gameOb.fX = (gameOb.fX - (gameOb.xSpeed * gameOb.zSpeed)); }; }; if (ob.yval > (gameOb.fY + (gameOb.xSpeed * gameOb.zSpeed))){ gameOb.fY = (gameOb.fY + (gameOb.xSpeed * gameOb.zSpeed)); } else { if (ob.yval < (gameOb.fY - (gameOb.xSpeed * gameOb.zSpeed))){ gameOb.fY = (gameOb.fY - (gameOb.xSpeed * gameOb.zSpeed)); }; }; drawTiles(); }; } private function rand(_arg1:Number, _arg2:Number):Number{ var _local3:*; _local3 = (_arg1 + Math.floor((Math.random() * (_arg2 - _arg1)))); return (_local3); } private function prepareGame(){ myClip = new mainGraphics(); myParent.stage.stageFocusRect = false; gameOb = new Object(); gameOb.stageW = 600; gameOb.stageH = 450; myClip.focusRect = false; myClip.menumc.startbut.mouseEnabled = true; myClip.gamemc.visible = false; myClip.gamemc.mouseEnabled = false; myClip.gamemc.mouseChildren = false; myClip.txt1.text = ""; myClip.txt2.text = ""; myClip.txt1.mouseEnabled = false; myClip.txt2.mouseEnabled = false; myClip.x = (gameOb.stageW / 2); myClip.y = (gameOb.stageH / 2); myClip.gamemc.mouseEnabled = false; myParent.addChild(myClip); gameOb.gameStatus = "start"; gameOb.keys = new Object(); gameOb.keys[Keyboard.UP] = {down:0, f:2, xd:0, yd:-1}; gameOb.keys[Keyboard.DOWN] = {down:0, f:4, xd:0, yd:1}; gameOb.keys[Keyboard.LEFT] = {down:0, f:1, xd:-1, yd:0}; gameOb.keys[Keyboard.RIGHT] = {down:0, f:3, xd:1, yd:0}; gameOb.keys[Keyboard.SPACE] = {down:0, f:5, xd:0, yd:0}; gameOb.keyDirs = [-1, 0, 0, -1, 1, 0, 0, 1, 0, 0]; mySoundsCh = new Object(); mySoundsCh.soundCounter = 0; gameOb.sound = 1; myClip.addEventListener(KeyboardEvent.KEY_DOWN, downKeys, false, 0, true); myClip.addEventListener(KeyboardEvent.KEY_UP, upKeys, false, 0, true); myClip.addEventListener(MouseEvent.MOUSE_DOWN, mclick, false, 0, true); myClip.addEventListener(Event.ENTER_FRAME, runGame, false, 0, true); } private function runGame(_arg1:Event):void{ gameOb.myDate = new Date(); gameOb.newTime = gameOb.myDate.getTime(); gameOb.timeFrame = (gameOb.newTime - gameOb.startTime); if (gameOb.timeFrame > 100){ gameOb.startTime = gameOb.newTime; return; }; if (((((!((myParent.stage.focus == myClip))) && (!((gameOb.gameStatus == "showAd"))))) && (!((gameOb.gameStatus == "gameover"))))){ myParent.stage.focus = myClip; }; if (gameOb.gameStatus == "start"){ return; }; if (gameOb.gameStatus == "startanim"){ if (myClip.menumc.currentFrame == 40){ startGame(); }; return; } else { if (gameOb.gameStatus == "endanim"){ if (myClip.menumc.currentFrame == 65){ endGame(); }; return; } else { if ((((gameOb.gameStatus == "gameover")) || ((gameOb.gameStatus == "showAd")))){ return; }; }; }; moveTiles(); gameOb.startTime = gameOb.newTime; } private function saveso():void{ var _local1:SharedObject; _local1 = SharedObject.getLocal("keyway2"); _local1.clear(); _local1.data.sound = gameOb.sound; _local1.flush(); } private function drawTiles():void{ var _local1:Number; n = 0; while (n < gameOb.tilesArr.length) { ob = gameOb.tilesArr[n]; ob.z = (ob.z - gameOb.zSpeed); _local1 = ((2 * gameOb.focal) / (gameOb.focal + ob.z)); ob.x = (_local1 * (ob.xval - gameOb.fX)); ob.y = (_local1 * (ob.yval - gameOb.fY)); ob.scaleX = _local1; ob.scaleY = _local1; ob.alpha = (1 - (n / 20)); n++; }; } private function upKeys(_arg1:KeyboardEvent):void{ if (gameOb.keys[_arg1.keyCode] == null){ return; }; if (gameOb.keys[_arg1.keyCode].down == 1){ gameOb.keys[_arg1.keyCode].down = 0; }; } private function readso(){ var _local1:SharedObject; _local1 = SharedObject.getLocal("keyway2"); if (_local1.data.sound != null){ gameOb.sound = _local1.data.sound; myClip.soundoptions.gotoAndStop(gameOb.sound); }; } private function endGame():void{ myClip.gamemc.visible = false; gameOb.gameStatus = "gameover"; } private function addSound(_arg1:String, _arg2:int=1):void{ var _local3:Class; if (gameOb.sound == 2){ return; }; mySoundsCh.soundCounter++; if (mySoundsCh.soundCounter == 20){ mySoundsCh.soundCounter = 0; }; _local3 = (myParent.loaderInfo.applicationDomain.getDefinition(_arg1) as Class); mySoundsCh.sloop = new (_local3); mySoundsCh[("s" + mySoundsCh.soundCounter)] = new (_local3); mySoundsCh[("s" + mySoundsCh.soundCounter)].play(0, _arg2); } private function mclick(_arg1:MouseEvent):void{ if (_arg1.target.name == "startbut"){ if (gameOb.gameStatus == "start"){ myClip.menumc.gotoAndPlay(2); gameOb.gameStatus = "startanim"; }; } else { if (_arg1.target.name == "tony"){ navigateToURL(new URLRequest("http://www.tonypa.pri.ee"), "_blank"); } else { if (_arg1.target.name == "kevin"){ navigateToURL(new URLRequest("http://www.incompetech.com"), "_blank"); } else { if (_arg1.target.name == "soundoptions"){ gameOb.sound = (1 + (gameOb.sound % 2)); myClip.soundoptions.gotoAndStop(gameOb.sound); } else { if (gameOb.gameStatus == "gameover"){ }; }; }; }; }; } private function downKeys(_arg1:KeyboardEvent):void{ if (gameOb.keys[_arg1.keyCode] == null){ return; }; if (gameOb.keys[_arg1.keyCode].down == 0){ gameOb.keys[_arg1.keyCode].down = 1; ob = gameOb.tilesArr[0]; if (ob.currentFrame == gameOb.keys[_arg1.keyCode].f){ ob = gameOb.tilesArr.shift(); ob.z = (ob.z + (gameOb.spacer * gameOb.numOfTiles)); gameOb.tilesArr.push(ob); myClip.gamemc.addChildAt(ob, 0); ob2 = gameOb.tilesArr[(gameOb.tilesArr.length - 2)]; m = ((ob2.currentFrame - 1) * 2); ob.xr = gameOb.keyDirs[m]; ob.xval = (ob2.xval + ((gameOb.xSpeed * gameOb.spacer) * ob.xr)); ob.yr = gameOb.keyDirs[(m + 1)]; ob.yval = (ob2.yval + ((gameOb.xSpeed * gameOb.spacer) * ob.yr)); ob.gotoAndStop(rand(1, 6)); }; }; } } }//package
Section 5
//mainGraphics (mainGraphics) package { import flash.display.*; import flash.text.*; public dynamic class mainGraphics extends MovieClip { public var gamemc:MovieClip; public var menumc:MovieClip; public var txt1:TextField; public var txt2:TextField; public function mainGraphics(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 6
//Preloader (Preloader) package { import flash.display.*; import flash.events.*; public class Preloader { private var stageH:Number; private var lb:Sprite; private var stageW:Number; private var myColors:Object; private var myParent; public function Preloader(_arg1:Sprite){ myParent = _arg1; prepareGame(); } private function prepareGame(){ stageW = 600; stageH = 450; myColors = new Object(); myColors.white = 0xFFFFFF; myColors.black = 0; myParent.loaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress, false, 0, true); myParent.loaderInfo.addEventListener(Event.COMPLETE, loadDone, false, 0, true); lb = new Sprite(); lb.y = ((stageH / 2) - 5); lb.x = ((stageW / 2) - 50); myParent.addChild(lb); } private function loadProgress(_arg1:ProgressEvent):void{ var _local2:Number; _local2 = (_arg1.bytesLoaded / _arg1.bytesTotal); lb.graphics.clear(); lb.graphics.lineStyle(2, myColors.black, 1, true, "none", null, null, 3); lb.graphics.drawRect(0, 0, 100, 10); lb.graphics.beginFill(myColors.black); lb.graphics.drawRect(0, 0, (_local2 * 100), 10); } private function loadDone(_arg1:Event):void{ myParent.removeChild(lb); myParent.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, loadProgress); myParent.loaderInfo.removeEventListener(Event.COMPLETE, loadDone); myParent.gotoAndPlay(2); } } }//package
Section 7
//Tiles (Tiles) package { import flash.display.*; public dynamic class Tiles extends MovieClip { } }//package

Library Items

Symbol 1 GraphicUsed by:Timeline
Symbol 2 GraphicUsed by:19
Symbol 3 FontUsed by:4 5
Symbol 4 EditableTextUses:3Used by:19
Symbol 5 EditableTextUses:3Used by:19
Symbol 6 GraphicUsed by:8
Symbol 7 GraphicUsed by:8
Symbol 8 ButtonUses:6 7Used by:17
Symbol 9 FontUsed by:10 11
Symbol 10 EditableTextUses:9Used by:17
Symbol 11 EditableTextUses:9Used by:17
Symbol 12 GraphicUsed by:17 22
Symbol 13 GraphicUsed by:17 22
Symbol 14 FontUsed by:15
Symbol 15 EditableTextUses:14Used by:16
Symbol 16 MovieClipUses:15Used by:17
Symbol 17 MovieClip {game_fla.menu_2}Uses:8 10 11 12 13 16Used by:19
Symbol 18 MovieClipUsed by:19
Symbol 19 MovieClip {mainGraphics}Uses:2 4 5 17 18Used by:Timeline
Symbol 20 MovieClip {game_fla.sounds_mc_6}Used by:Timeline
Symbol 21 GraphicUsed by:22
Symbol 22 MovieClip {Tiles}Uses:21 12 13Used by:Timeline

Instance Names

"startbut"Symbol 17 MovieClip {game_fla.menu_2} Frame 1Symbol 8 Button
"txt1"Symbol 19 MovieClip {mainGraphics} Frame 1Symbol 4 EditableText
"txt2"Symbol 19 MovieClip {mainGraphics} Frame 1Symbol 5 EditableText
"menumc"Symbol 19 MovieClip {mainGraphics} Frame 1Symbol 17 MovieClip {game_fla.menu_2}
"gamemc"Symbol 19 MovieClip {mainGraphics} Frame 1Symbol 18 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS3.
Protect (24)Timeline Frame 10 bytes ""




http://swfchan.com/18/88103/info.shtml
Created: 29/3 -2019 16:19:19 Last modified: 29/3 -2019 16:19:19 Server time: 19/04 -2024 12:56:52