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

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

Viking Puzzle.swf

This is the info page for
Flash #14761

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


ActionScript [AS1/AS2]
Frame 1
tellTarget ("/Congratulations") { stop(); }; numRows = "3"; numCols = "3"; numCells = numRows * numCols; i = "1"; while (i < numCells) { Set("pos" add i, i); i = i + "1"; } empty = numCells; i = "1"; while (numCols >= i) { Set("x" add i, getProperty("/p" add i, _x)); i = i + "1"; } i = "1"; while (numRows >= i) { Set("y" add i, getProperty("/p" add ("1" + ((i - "1") * numCols)), _y)); i = i + "1"; } nextFrame();
Frame 3
call("Winner"); if (winner == "1") { call("Shuffle"); tellTarget ("/Congratulations") { gotoAndStop (1); stop(); }; } else { pos = eval ("pos" add clicked); emptyRow = "1" + int((empty - "1") / numCols); emptyCol = empty - ((emptyRow - "1") * numCols); clickedRow = "1" + int((pos - "1") / numCols); clickedCol = pos - ((clickedRow - "1") * numCols); rowDiff = clickedRow - emptyRow; colDiff = clickedCol - emptyCol; if (rowDiff < "0") { rowDiff = -rowDiff; } if (colDiff < "0") { colDiff = -colDiff; } adjacent = (rowDiff + colDiff) == "1"; if (adjacent == "1") { setProperty("/p" add clicked, _x , eval ("x" add emptyCol)); setProperty("/p" add clicked, _y , eval ("y" add emptyRow)); Set("pos" add clicked, empty); empty = pos; call("Winner"); if (winner == "1") { tellTarget ("/Congratulations") { play(); }; } } }
Frame 4
i = "1"; while (numCells >= i) { Set("cell" add i, i); i = i + "1"; } i = "1"; while (numCells >= i) { Set("random" add i, random("1000")); i = i + "1"; } lo = "1"; up = "9"; while (lo < up) { i = lo; j = lo; while (i < up) { if (eval ("random" add (i + "1")) < eval ("random" add i)) { temp = eval ("random" add i); Set("random" add i, eval ("random" add (i + "1"))); Set("random" add (i + "1"), temp); temp = eval ("cell" add i); Set("cell" add i, eval ("cell" add (i + "1"))); Set("cell" add (i + "1"), temp); j = i; } i = i + "1"; } up = j; i = up; while (lo < i) { if (eval ("random" add i) < eval ("random" add (i - "1"))) { temp = eval ("random" add i); Set("random" add i, eval ("random" add (i - "1"))); Set("random" add (i - "1"), temp); temp = eval ("cell" add i); Set("cell" add i, eval ("cell" add (i - "1"))); Set("cell" add (i - "1"), temp); j = i; } i = i - "1"; } lo = j; } i = "1"; r = "1"; c = "1"; while (numCells >= i) { piece = eval ("cell" add i); if (piece == "9") { empty = i; } else { Set("pos" add piece, i); setProperty("/p" add piece, _x , eval ("x" add c)); setProperty("/p" add piece, _y , eval ("y" add r)); } c = c + "1"; if (numCols < c) { c = "1"; r = r + "1"; } i = i + "1"; }
Frame 6
winner = "1"; i = "1"; while (i < numCells) { if (eval ("pos" add i) <> i) { winner = "0"; } i = i + "1"; }
Symbol 3 Button
on (release) { Set("/:clicked", "1"); call("/:Click"); }
Symbol 7 Button
on (release) { Set("/:clicked", "2"); call("/:Click"); }
Symbol 11 Button
on (release) { Set("/:clicked", "3"); call("/:Click"); }
Symbol 15 Button
on (release) { Set("/:clicked", "4"); call("/:Click"); }
Symbol 19 Button
on (release) { Set("/:clicked", "5"); call("/:Click"); }
Symbol 23 Button
on (release) { Set("/:clicked", "6"); call("/:Click"); }
Symbol 27 Button
on (release) { Set("/:clicked", "7"); call("/:Click"); }
Symbol 31 Button
on (release) { Set("/:clicked", "8"); call("/:Click"); }
Symbol 39 MovieClip Frame 45
gotoAndPlay (35);

Library Items

Symbol 1 BitmapUsed by:2
Symbol 2 GraphicUses:1Used by:3
Symbol 3 ButtonUses:2Used by:4
Symbol 4 MovieClipUses:3Used by:Timeline
Symbol 5 BitmapUsed by:6
Symbol 6 GraphicUses:5Used by:7
Symbol 7 ButtonUses:6Used by:8
Symbol 8 MovieClipUses:7Used by:Timeline
Symbol 9 BitmapUsed by:10
Symbol 10 GraphicUses:9Used by:11
Symbol 11 ButtonUses:10Used by:12
Symbol 12 MovieClipUses:11Used by:Timeline
Symbol 13 BitmapUsed by:14
Symbol 14 GraphicUses:13Used by:15
Symbol 15 ButtonUses:14Used by:16
Symbol 16 MovieClipUses:15Used by:Timeline
Symbol 17 BitmapUsed by:18
Symbol 18 GraphicUses:17Used by:19
Symbol 19 ButtonUses:18Used by:20
Symbol 20 MovieClipUses:19Used by:Timeline
Symbol 21 BitmapUsed by:22
Symbol 22 GraphicUses:21Used by:23
Symbol 23 ButtonUses:22Used by:24
Symbol 24 MovieClipUses:23Used by:Timeline
Symbol 25 BitmapUsed by:26
Symbol 26 GraphicUses:25Used by:27
Symbol 27 ButtonUses:26Used by:28
Symbol 28 MovieClipUses:27Used by:Timeline
Symbol 29 BitmapUsed by:30
Symbol 30 GraphicUses:29Used by:31
Symbol 31 ButtonUses:30Used by:32
Symbol 32 MovieClipUses:31Used by:Timeline
Symbol 33 GraphicUsed by:39
Symbol 34 BitmapUsed by:35
Symbol 35 GraphicUses:34Used by:39
Symbol 36 GraphicUsed by:39
Symbol 37 GraphicUsed by:39
Symbol 38 GraphicUsed by:39
Symbol 39 MovieClipUses:33 35 36 37 38Used by:Timeline
Symbol 40 GraphicUsed by:Timeline

Instance Names

"p1"Frame 1Symbol 4 MovieClip
"p2"Frame 1Symbol 8 MovieClip
"p3"Frame 1Symbol 12 MovieClip
"p4"Frame 1Symbol 16 MovieClip
"p5"Frame 1Symbol 20 MovieClip
"p6"Frame 1Symbol 24 MovieClip
"p7"Frame 1Symbol 28 MovieClip
"p8"Frame 1Symbol 32 MovieClip
"Congratulations"Frame 1Symbol 39 MovieClip

Labels

"Click"Frame 3
"Shuffle"Frame 4
"Winner"Frame 6




http://swfchan.com/3/14761/info.shtml
Created: 3/6 -2019 09:17:57 Last modified: 3/6 -2019 09:17:57 Server time: 05/11 -2024 06:58:48