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

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

RPS-Sim-2.swf

This is the info page for
Flash #251268

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


Text
Winner

<p align="center"><font face="Verdana" size="3" color="#ffffff" letterSpacing="0.000000" kerning="1">obj</font></p>

<p align="left"><font face="Bahnschrift SemiBold SemiConden" size="56" color="#660033" letterSpacing="0.000000" kerning="1">Rock Paper Scissors Simulator</font></p>

Start

ActionScript [AS1/AS2]

Frame 1
stop(); start_btn.onRelease = function () { gotoAndPlay (1); };
Frame 2
function showWinningBanner() { var _local4 = winner(); if (_local4 != undefined) { if (_root.winBanner == undefined) { var _local3 = this.attachMovie("WinnerBanner", "winBanner", this.getNextHighestDepth()); _local3._x = 400; _local3._y = 300; } else { _root.winBanner.setObj(_local4); } } } function winner() { if (allObj.length < maxObj) { return(undefined); } var _local3; var _local2 = 0; while (_local2 < allObj.length) { var _local4 = allObj[_local2]; var _local1 = _local4.getType(); if (_local1 == undefined) { return(undefined); } if (_local3 == undefined) { _local3 = _local1; } if (_local3 != _local1) { return(undefined); } _local2++; } return(_local3); } function randomlyChooseType(movieClip) { var _local1 = Math.random(); if (_local1 < 0.33) { movieClip.setType("Rock"); } else if (_local1 < 0.67) { movieClip.setType("Paper"); } else { movieClip.setType("Scissors"); } } function checkCollision(movieClip, objects) { var _local1 = 0; while (_local1 < objects.length) { if (objects[_local1] != movieClip) { if (movieClip.hitTest(objects[_local1])) { return(objects[_local1]); } } _local1++; } return(undefined); } function moveObjects(objects) { var _local7 = 0; while (_local7 < objects.length) { var _local1 = objects[_local7]; var _local2 = "None"; var _local3 = "None"; var _local6 = 0; if (_local1.moveTimer != undefined) { _local6 = _local1.moveTimer; } if ((_local6 == 0) || ((_local1.prevLeftRight == undefined) || (_local1.prevUpDown == undefined))) { while ((_local2 == "None") && (_local3 == "None")) { var _local4 = Math.random(); var _local5 = Math.random(); if (_local4 < 0.33) { _local2 = "Up"; } else if (_local4 < 0.67) { _local2 = "None"; } else { _local2 = "Down"; } if (_local5 < 0.33) { _local3 = "Left"; } else if (_local5 < 0.67) { _local3 = "None"; } else { _local3 = "Right"; } } } else { _local2 = _local1.prevUpDown; _local3 = _local1.prevLeftRight; } if ((_local2 == "Up") && (_local1._y <= 0)) { _local2 = "Down"; } else if ((_local2 == "Down") && (_local1._y >= stageHeight)) { _local2 = "Up"; } if ((_local3 == "Left") && (_local1._x <= 0)) { _local3 = "Right"; } else if ((_local3 == "Right") && (_local1._x >= stageWidth)) { _local3 = "Left"; } if (_local2 == "Down") { _local1._y = _local1._y + 1; } else if (_local2 == "Up") { _local1._y = _local1._y - 1; } if (_local3 == "Left") { _local1._x = _local1._x - 1; } else if (_local3 == "Right") { _local1._x = _local1._x + 1; } if (_local6 == 0) { _local1.moveTimer = moveTimerMax; } else { _local6--; _local1.moveTimer = _local6; } _local1.prevUpDown = _local2; _local1.prevLeftRight = _local3; _local7++; } } stop(); var allObj = new Array(0); var nuts = 0; var maxObj = 100; var stageWidth = 800; var stageHeight = 600; var moveTimerMax = 50; _root.onEnterFrame = function () { var _local4 = 0; while (_local4 < allObj.length) { var _local2 = allObj[_local4]; if (!_local2.initialTypeSet) { randomlyChooseType(_local2); _local2.initialTypeSet = true; var _local3 = 20; while (checkCollision(_local2, allObj) != undefined) { _local2._x = Math.random() * stageWidth; _local2._y = Math.random() * stageHeight; if (_local3 == 0) { break; } _local3--; } } var _local5 = checkCollision(_local2, allObj); if (_local5 != undefined) { _local2.collidedWith(_local5.getType()); } _local4++; } if (allObj.length < maxObj) { var _local6 = this.attachMovie("RPS_obj", "deez" + nuts, this.getNextHighestDepth()); _local6._x = 100 + nuts; _local6._y = 100 + nuts; allObj.push(_local6); nuts = nuts + 1; } moveObjects(allObj); showWinningBanner(); };
Symbol 16 MovieClip Frame 1
stop();
Symbol 16 MovieClip Frame 2
stop();
Symbol 16 MovieClip Frame 3
stop();
Symbol 16 MovieClip Frame 4
stop();
Symbol 17 MovieClip [WinnerBanner] Frame 1
function setObj(winningObjName) { switch (winningObjName) { case "Rock" : winningObj.gotoAndStop(2); break; case "Paper" : winningObj.gotoAndStop(3); break; case "Scissors" : winningObj.gotoAndStop(4); } winningObj._visible = true; } var winningObj = this.winObj; winningObj._visible = false;
Symbol 18 MovieClip [RPS_obj] Frame 1
function getType() { var _local2 = this.inner._currentframe; switch (_local2) { case 2 : return("Rock"); case 3 : return("Paper"); case 4 : return("Scissors"); } return("None"); } function setType(objType) { var _local2 = this.inner; switch (objType) { case "Rock" : _local2.gotoAndStop(2); break; case "Paper" : _local2.gotoAndStop(3); break; case "Scissors" : _local2.gotoAndStop(4); break; default : _local2.gotoAndStop(1); } } function collidedWith(objType) { var _local1 = getType(); switch (objType) { case "Rock" : if (_local1 != "Paper") { setType("Rock"); } break; case "Paper" : if (_local1 != "Scissors") { setType("Paper"); } break; case "Scissors" : if (_local1 == "Rock") { break; } setType("Scissors"); } } var moveTimer = 0; var prevLeftRight; var prevUpDown; var initialTypeSet = false;

Library Items

Symbol 1 GraphicUsed by:17
Symbol 2 FontUsed by:3
Symbol 3 TextUses:2Used by:17
Symbol 4 GraphicUsed by:16
Symbol 5 FontUsed by:6
Symbol 6 EditableTextUses:5Used by:16
Symbol 7 BitmapUsed by:8 33
Symbol 8 GraphicUses:7Used by:9
Symbol 9 MovieClipUses:8Used by:16  Timeline
Symbol 10 BitmapUsed by:11 33
Symbol 11 GraphicUses:10Used by:12
Symbol 12 MovieClipUses:11Used by:16  Timeline
Symbol 13 BitmapUsed by:14 33
Symbol 14 GraphicUses:13Used by:15
Symbol 15 MovieClipUses:14Used by:16  Timeline
Symbol 16 MovieClipUses:4 6 9 12 15Used by:17 18
Symbol 17 MovieClip [WinnerBanner]Uses:1 3 16
Symbol 18 MovieClip [RPS_obj]Uses:16Used by:Timeline
Symbol 19 GraphicUsed by:Timeline
Symbol 20 FontUsed by:21
Symbol 21 EditableTextUses:20Used by:Timeline
Symbol 22 GraphicUsed by:32
Symbol 23 GraphicUsed by:32
Symbol 24 GraphicUsed by:31 32
Symbol 25 FontUsed by:26
Symbol 26 TextUses:25Used by:32
Symbol 27 GraphicUsed by:32
Symbol 28 GraphicUsed by:32
Symbol 29 GraphicUsed by:32
Symbol 30 GraphicUsed by:32
Symbol 31 MovieClipUses:24Used by:32
Symbol 32 ButtonUses:22 23 24 26 27 28 29 30 31Used by:Timeline
Symbol 33 GraphicUses:13 10 7Used by:Timeline

Instance Names

"start_btn"Frame 1Symbol 32 Button
"winObj"Symbol 17 MovieClip [WinnerBanner] Frame 1Symbol 16 MovieClip
"inner"Symbol 18 MovieClip [RPS_obj] Frame 1Symbol 16 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS1/AS2.
ExportAssets (56)Timeline Frame 1Symbol 17 as "WinnerBanner"
ExportAssets (56)Timeline Frame 1Symbol 18 as "RPS_obj"




http://swfchan.com/51/251268/info.shtml
Created: 23/1 -2023 12:34:39 Last modified: 23/1 -2023 12:34:39 Server time: 07/02 -2023 03:37:57