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

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

Minesweeper.swf

This is the info page for
Flash #23905

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


Text
Click once to mark.  Double-click to open.

go

15

10

Enter Vertical size:

Enter Horizontal size:

20

Enter Number of bombs:

restart

ActionScript [AS1/AS2]

Frame 1
stop();
Frame 2
function box(px, py, box_type) { this.x = px; this.y = py; this.type = box_type; this.isopen = false; this.isNUM = function () { return((0 < this.type) && (type < 9)); }; this.isBOMB = function () { return(this.type == "bomb"); }; } function name(px, py) { return((("b_" + px) + "_") + py); } function Mname(px, py) { return((("m_" + px) + "_") + py); } function convert(nam) { return("b" + (substring(nam, 2, nam.length - 1))); } function convertM(nam) { return("m" + (substring(nam, 2, nam.length - 1))); } function convert(nam) { return("b" + (substring(nam, 2, nam.length - 1))); } function isbomb(BX) { return(eval (BX).type == "bomb"); } function isempty(BX) { return(eval (BX).type == "empty"); } function istype(BX) { return(eval (BX).type); } function count_bomb(BX) { var count = 0; var x = eval (BX).x; var y = eval (BX).y; var i = (y - 1); while ((y + 1) >= i) { if (isbomb(name(x - 1, i))) { count++; } if (isbomb(name(x + 1, i))) { count++; } if (isbomb(name(x, i))) { count++; } i++; } return(count); } var win = ((sizeX * sizeY) - numof_bomb); var x = 1; while (sizeX >= x) { var y = 1; while (sizeY >= y) { Set(name(x, y), new box(x, y, "empty")); y++; } x++; } var bomb = new Array(numof_bomb); var i = 0; while (i < numof_bomb) { var x = (random(sizeX) + 1); var y = (random(sizeY) + 1); if (!isbomb(name(x, y))) { Set(name(x, y), new box(x, y, "bomb")); bomb[i] = name(x, y); } else { i--; } i++; } var x = 1; while (sizeX >= x) { var y = 1; while (sizeY >= y) { if (!isbomb(name(x, y))) { eval (name(x, y)).type = count_bomb(name(x, y)); if (eval (name(x, y)).type == 0) { eval (name(x, y)).type = "empty"; } } y++; } x++; }
Frame 3
function open(BX) { var x = eval (BX).x; var y = eval (BX).y; var i = (y - 1); while ((y + 1) >= i) { var j = (x - 1); while ((x + 1) >= j) { eval (Mname(j, i)).gotoAndStop(3); j++; } i++; } } function check(BX) { if (!eval (BX).isopen) { win--; } eval (BX).isopen = true; if (win == 0) { gotoAndStop (4); } } function dead() { var i = 0; while (i < numof_bomb) { eval (convertM(bomb[i])).num = "X"; eval (convertM(bomb[i])).gotoAndStop(3); i++; } gotoAndStop (5); } var l = 20; thebox._width = 480 / sizeX; thebox._height = 295 / sizeY; var i = 1; while (sizeX >= i) { var j = 1; while (sizeY >= j) { l++; duplicateMovieClip (thebox, Mname(i, j), l); eval (Mname(i, j))._x = ((i - 1) * thebox._width) + 36; eval (Mname(i, j))._y = ((j - 1) * thebox._height) + 36; j++; } i++; } stop();
Frame 4
getURL ("javascript:alert('You Won!')"); stop();
Frame 5
getURL ("javascript:alert('You Lose!')"); stop();
Symbol 5 Button
on (press) { play(); }
Symbol 14 Button
on (release) { gotoAndStop (2); click++; tellTarget (timer) { play(); }; var _root:temp = ("b" + (substring(this._name, 2, this._name.length - 1))); }
Symbol 15 MovieClip Frame 1
stop();
Symbol 15 MovieClip Frame 8
if (1 < _parent.click) { _parent.click = 0; _parent.gotoAndPlay(3); } else { _parent.click = 0; _parent.gotoAndStop(1); _parent.symbol.play(); }
Symbol 19 MovieClip Frame 1
stop();
Symbol 19 MovieClip Frame 2
stop();
Symbol 19 MovieClip Frame 3
stop();
Symbol 22 MovieClip Frame 1
click = 0; stop();
Symbol 22 MovieClip Frame 2
stop();
Symbol 22 MovieClip Frame 3
var curr_box = _root.convert(this._name); var curr_type = _root.istype(curr_box); if (curr_type == "bomb") { if (num != "X") { _root.dead(); } } else { _root.check(curr_box); if ((0 < curr_type) && (curr_type < 9)) { num = curr_type; } if (curr_type == "empty") { _root.open(curr_box); } } stop();
Symbol 27 Button
on (release) { l = 0; var i = 1; while (sizeX >= i) { var j = 1; while (sizeY >= j) { unloadMovie (Mname(i, j)); j++; } i++; } gotoAndStop (1); }

Library Items

Symbol 1 FontUsed by:2 4 6 7 8 9 10 11 21 25
Symbol 2 TextUses:1Used by:Timeline
Symbol 3 GraphicUsed by:5
Symbol 4 TextUses:1Used by:5
Symbol 5 ButtonUses:3 4Used by:Timeline
Symbol 6 EditableTextUses:1Used by:Timeline
Symbol 7 EditableTextUses:1Used by:Timeline
Symbol 8 TextUses:1Used by:Timeline
Symbol 9 TextUses:1Used by:Timeline
Symbol 10 EditableTextUses:1Used by:Timeline
Symbol 11 TextUses:1Used by:Timeline
Symbol 12 GraphicUsed by:Timeline
Symbol 13 GraphicUsed by:14
Symbol 14 ButtonUses:13Used by:22
Symbol 15 MovieClipUsed by:22
Symbol 16 GraphicUsed by:22
Symbol 17 GraphicUsed by:19
Symbol 18 GraphicUsed by:19
Symbol 19 MovieClipUses:17 18Used by:22
Symbol 20 GraphicUsed by:22
Symbol 21 EditableTextUses:1Used by:22
Symbol 22 MovieClipUses:14 15 16 19 20 21Used by:Timeline
Symbol 23 GraphicUsed by:Timeline
Symbol 24 GraphicUsed by:27
Symbol 25 TextUses:1Used by:27
Symbol 26 GraphicUsed by:27
Symbol 27 ButtonUses:24 25 26Used by:Timeline
Symbol 28 GraphicUsed by:Timeline

Instance Names

"thebox"Frame 2Symbol 22 MovieClip
"timer"Symbol 22 MovieClip Frame 1Symbol 15 MovieClip
"symbol"Symbol 22 MovieClip Frame 1Symbol 19 MovieClip

Special Tags

EnableDebugger (58)Timeline Frame 131 bytes "..$1$jC$M5g55dREyIYx/DQ1uoWWQ1."

Labels

"initialize_all"Frame 2
"make_grid"Frame 3
"WIN"Frame 4
"LOSE"Frame 5

Dynamic Text Variables

sizeXSymbol 6 EditableText"15"
sizeYSymbol 7 EditableText"10"
numof_bombSymbol 10 EditableText"20"
numSymbol 21 EditableText""




http://swfchan.com/5/23905/info.shtml
Created: 25/5 -2019 19:31:44 Last modified: 25/5 -2019 19:31:44 Server time: 22/12 -2024 10:03:41