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

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

gridgame.swf

This is the info page for
Flash #4141

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


Text
Score:

Max:

reset

reset

sound

sound

ActionScript [AS1/AS2]

Frame 1
function playRandomSound() { if (sound_is_on) { sound_array[random(sound_array.length) + 1].start(); } } function setup() { cells = array(); var i = 0; while (i < size) { cells[i] = array(); var j = 0; while (j < size) { cell = this.attachMovie("cell", (("cell_" + i) + "_") + j, (i * size) + j); cell._x = ((cell._width + padding) * j) + 20; cell._y = ((cell._height + padding) * i) + 20; cell._rotation = random(4) * 90; cell.rot = cell._rotation; cell.onPress = cellClick; cell.runFunction = cellRun; cell.i = i; cell.j = j; cell.run = false; cells[i][j] = cell; j++; } i++; } ready = true; } function cellClick() { if (ready) { if (score > max) { max = score; } score = 1; this.onEnterFrame = cellThink; this.gotoAndPlay(2); playRandomSound(); this.rot = this._rotation + 90; while (this.rot > 180) { this.rot = this.rot - 360; } } } function cellRun() { if (ready) { score++; this.onEnterFrame = cellThink; this.gotoAndPlay(2); playRandomSound(); this.rot = this.rot + 90; while (this.rot > 180) { this.rot = this.rot - 360; } } } function cellThink() { ready = false; this._rotation = this._rotation + speed; if ((this._rotation - this.rot) == 0) { ready = true; this.onEnterFrame = null; if (this.rot == n_e) { if ((cells[this.i - 1][this.j].rot == s_w) || (cells[this.i - 1][this.j].rot == s_e)) { cells[this.i - 1][this.j].runFunction(); this.arrow2.gotoAndPlay(2); } if ((cells[this.i][this.j + 1].rot == s_w) || (cells[this.i][this.j + 1].rot == n_w)) { cells[this.i][this.j + 1].runFunction(); this.arrow1.gotoAndPlay(2); } } else if (this.rot == s_e) { if ((cells[this.i + 1][this.j].rot == n_w) || (cells[this.i + 1][this.j].rot == n_e)) { cells[this.i + 1][this.j].runFunction(); this.arrow1.gotoAndPlay(2); } if ((cells[this.i][this.j + 1].rot == s_w) || (cells[this.i][this.j + 1].rot == n_w)) { cells[this.i][this.j + 1].runFunction(); this.arrow2.gotoAndPlay(2); } } else if (this.rot == s_w) { if ((cells[this.i + 1][this.j].rot == n_w) || (cells[this.i + 1][this.j].rot == n_e)) { cells[this.i + 1][this.j].runFunction(); this.arrow1.gotoAndPlay(2); } if ((cells[this.i][this.j - 1].rot == s_e) || (cells[this.i][this.j - 1].rot == n_e)) { cells[this.i][this.j - 1].runFunction(); this.arrow1.gotoAndPlay(1); } } else if (this.rot == n_w) { if ((cells[this.i - 1][this.j].rot == s_w) || (cells[this.i - 1][this.j].rot == s_e)) { cells[this.i - 1][this.j].runFunction(); this.arrow1.gotoAndPlay(1); } if ((cells[this.i][this.j - 1].rot == s_e) || (cells[this.i][this.j - 1].rot == n_e)) { cells[this.i][this.j - 1].runFunction(); this.arrow1.gotoAndPlay(2); } } } } var size = 16; var padding = 0; var ready = false; var speed = 10; var score = 0; var max = 0; var n_e = -90; var s_e = 0; var s_w = 90; var n_w = 180; sound_is_on = true; sound_mc._visible = false; sound1 = new Sound(this); sound1.attachSound("sound1"); sound1.setVolume(50); sound2 = new Sound(this); sound2.attachSound("sound2"); sound2.setVolume(50); sound3 = new Sound(this); sound3.attachSound("sound3"); sound3.setVolume(50); sound4 = new Sound(this); sound4.attachSound("sound4"); sound4.setVolume(50); sound5 = new Sound(this); sound5.attachSound("sound5"); sound5.setVolume(50); sound6 = new Sound(this); sound6.attachSound("sound6"); sound6.setVolume(50); sound7 = new Sound(this); sound7.attachSound("sound7"); sound7.setVolume(50); sound_array = new array(sound1, sound2, sound3, sound4, sound5, sound6, sound7); sound_btn.onPress = function () { if (!sound_is_on) { sound_mc._visible = false; sound_is_on = true; } else { sound_mc._visible = true; sound_is_on = false; } }; reset_btn.onPress = function () { if (ready) { setup(); } }; setup();
Symbol 10 MovieClip Frame 1
stop();
Symbol 11 MovieClip [cell] Frame 1
stop();

Library Items

Symbol 1 Sound [sound7]
Symbol 2 Sound [sound6]
Symbol 3 Sound [sound5]
Symbol 4 Sound [sound4]
Symbol 5 Sound [sound3]
Symbol 6 Sound [sound2]
Symbol 7 Sound [sound1]
Symbol 8 GraphicUsed by:11
Symbol 9 GraphicUsed by:11
Symbol 10 MovieClipUsed by:11
Symbol 11 MovieClip [cell]Uses:8 9 10
Symbol 12 GraphicUsed by:Timeline
Symbol 13 FontUsed by:14 15 16 17 18 19 23 24
Symbol 14 EditableTextUses:13Used by:Timeline
Symbol 15 TextUses:13Used by:Timeline
Symbol 16 EditableTextUses:13Used by:Timeline
Symbol 17 TextUses:13Used by:Timeline
Symbol 18 TextUses:13Used by:21
Symbol 19 TextUses:13Used by:21
Symbol 20 GraphicUsed by:21 25
Symbol 21 ButtonUses:18 19 20Used by:Timeline
Symbol 22 GraphicUsed by:Timeline
Symbol 23 TextUses:13Used by:25
Symbol 24 TextUses:13Used by:25
Symbol 25 ButtonUses:23 24 20Used by:Timeline
Symbol 26 GraphicUsed by:27
Symbol 27 MovieClipUses:26Used by:Timeline

Instance Names

"reset_btn"Frame 1Symbol 21 Button
"sound_btn"Frame 1Symbol 25 Button
"sound_mc"Frame 1Symbol 27 MovieClip
"arrow1"Symbol 11 MovieClip [cell] Frame 1Symbol 10 MovieClip
"arrow2"Symbol 11 MovieClip [cell] Frame 1Symbol 10 MovieClip

Special Tags

Protect (24)Timeline Frame 10 bytes ""
ExportAssets (56)Timeline Frame 1Symbol 1 as "sound7"
ExportAssets (56)Timeline Frame 1Symbol 2 as "sound6"
ExportAssets (56)Timeline Frame 1Symbol 3 as "sound5"
ExportAssets (56)Timeline Frame 1Symbol 4 as "sound4"
ExportAssets (56)Timeline Frame 1Symbol 5 as "sound3"
ExportAssets (56)Timeline Frame 1Symbol 6 as "sound2"
ExportAssets (56)Timeline Frame 1Symbol 7 as "sound1"
ExportAssets (56)Timeline Frame 1Symbol 11 as "cell"

Labels

"rot0"Symbol 11 MovieClip [cell] Frame 1

Dynamic Text Variables

scoreSymbol 14 EditableText""
maxSymbol 16 EditableText""




http://swfchan.com/1/4141/info.shtml
Created: 17/6 -2019 05:31:35 Last modified: 17/6 -2019 05:31:35 Server time: 20/04 -2024 01:33:58