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>

brainbuster.swf

This is the info page for
Flash #10730

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


Text
Brain Buster

Play Game

Instructions

The aim of the game is to guess the
secret code. It consists of four pegs,
where each is one of six possible
colours. You must guess the correct
combination of coloured pegs to win.

Peg palette

First row

0

10

0

Yes

No

ActionScript [AS1/AS2]

Frame 1
stop();
Frame 2
playGame_btn.onPress = function () { _root.gotoAndPlay("Start"); }; instructions_btn.onPress = function () { _root.gotoAndPlay("Instructions"); }; website_btn.onRelease = function () { getURL ("http://www.jonmiles.co.uk", "_blank"); }; stop();
Frame 4
next_btn.onPress = function () { gotoAndStop ("Guessing"); }; stop();
Frame 5
board_mc.blackPeg_mc.makeUnmoveable(); board_mc.cyanPeg_mc.makeUnmoveable(); board_mc.greenPeg_mc.makeUnmoveable(); board_mc.redPeg_mc.makeUnmoveable(); board_mc.whitePeg_mc.makeUnmoveable(); board_mc.yellowPeg_mc.makeUnmoveable(); next_btn.onPress = function () { gotoAndStop ("Clues"); };
Frame 6
green_mc.correct(); white1_mc.kinda(); white2_mc.kinda(); next_btn.onPress = function () { _root.gotoAndStop("Scoring"); };
Frame 7
return_btn.onPress = function () { _root.gotoAndStop("Title"); };
Frame 8
function playAgain() { playAgain_mc._visible = true; confirmPlayAgain_btn._visible = true; cancelPlayAgain_btn._visible = true; } function hideInterface() { playAgain_mc._visible = false; confirmPlayAgain_btn._visible = false; cancelPlayAgain_btn._visible = false; } var BLACK = 0; var CYAN = 1; var GREEN = 2; var RED = 3; var YELLOW = 4; var WHITE = 5; stop(); var game = new CodeBreaker(); hideInterface(); confirmPlayAgain_btn.onPress = function () { game.reset(); hideInterface(); }; cancelPlayAgain_btn.onPress = function () { game.remove(); gotoAndStop ("Title"); };
Symbol 10 MovieClip [peg] Frame 1
#initclip 9 Object.registerClass("peg", Peg); #endinitclip stop();
Symbol 13 MovieClip [cover] Frame 1
this.stop();
Symbol 13 MovieClip [cover] Frame 61
this.stop(); _parent.codeRevealed();
Symbol 13 MovieClip [cover] Frame 121
this.stop(); _parent.codeCovered();
Symbol 17 MovieClip [light] Frame 1
#initclip 6 Object.registerClass("light", Light); #endinitclip this.stop();
Symbol 19 MovieClip [slot] Frame 1
#initclip 7 Object.registerClass("slot", Slot); #endinitclip this.stop();
Symbol 21 MovieClip [board] Frame 1
#initclip 8 Object.registerClass("board", Board); #endinitclip
Symbol 24 MovieClip Frame 1
stop(); onEnterFrame = function () { framesLoaded = Math.ceil((_parent.getBytesLoaded() / _parent.getBytesTotal()) * 100); gotoAndStop(framesLoaded); if (framesLoaded >= 90) { _root.gotoAndPlay("Title"); } };
Symbol 71 MovieClip [__Packages.Light] Frame 0
class Light extends MovieClip { var gotoAndStop; function Light () { super(); } function correct() { gotoAndStop("correct"); } function kinda() { gotoAndStop("kinda"); } function reset() { gotoAndStop("Off"); } }
Symbol 72 MovieClip [__Packages.Slot] Frame 0
class Slot extends MovieClip { var _x, _y, _parent; function Slot () { super(); } function fill(myPeg) { peg = myPeg; peg._x = _x; peg._y = _y; peg.setSlot(this); _parent.pegFilled(); } function getPeg() { return(peg); } function isFilled() { if (peg != null) { return(true); } return(false); } function lock() { locked = true; peg.makeUnmoveable(); } function unlock() { locked = false; peg.makeMoveable(); } function remove() { if (locked == false) { peg = null; _parent.pegRemoved(); return(true); } return(false); } var BLACK = 0; var CYAN = 1; var GREEN = 2; var RED = 3; var YELLOW = 4; var WHITE = 5; var filled = false; var locked = false; var peg = null; }
Symbol 73 MovieClip [__Packages.Peg] Frame 0
class Peg extends MovieClip { var onPress, useHandCursor, onRelease, color, gotoAndStop; function Peg () { super(); makeMoveable(); } function makeMoveable() { onPress = function () { if (this.inSlot()) { if (this.slot.remove() == true) { this.slot = null; // unexpected jump } return(undefined); } else { var _local2 = this._parent.attachMovie("peg", "peg" + this._parent.getNextHighestDepth(), this._parent.getNextHighestDepth(), {game:this.game}); _local2.setColor(this.color); _local2._x = this._x; _local2._y = this._y; } this.swapDepths(this._parent.getNextHighestDepth()); this.startDrag(); this.onRelease = function () { this.stopDrag(); if (this.game.checkPeg(this) == false) { this.removeMovieClip(); } else { var _local2 = new Sound(); _local2.attachSound("pegClick" + Math.round((Math.random() * 1) + 1)); _local2.start(); this.onRelease = null; } }; }; } function makeUnmoveable() { useHandCursor = false; onPress = null; onRelease = null; } function inSlot() { if (slot != null) { return(true); } return(false); } function setSlot(mySlot) { slot = mySlot; } function getColor() { return(color); } function setColor(color) { this.color = color; switch (color) { case BLACK : gotoAndStop("Black"); break; case CYAN : gotoAndStop("Cyan"); break; case GREEN : gotoAndStop("Green"); break; case RED : gotoAndStop("Red"); break; case WHITE : gotoAndStop("White"); break; case YELLOW : gotoAndStop("Yellow"); } } var BLACK = 0; var CYAN = 1; var GREEN = 2; var RED = 3; var YELLOW = 4; var WHITE = 5; var slot = null; }
Symbol 74 MovieClip [__Packages.CodeBreaker] Frame 0
class CodeBreaker { var gameBoard_mc; function CodeBreaker () { initGame(); } function currentGuess() { return(guess); } function guessesAllowed() { return(guesses); } function checkPeg(myPeg) { return(gameBoard_mc.placePeg(myPeg)); } function pegPlaced() { pegs++; if (pegs == 4) { score = score - 1; _root.score_txt.text = score; if (gameBoard_mc.checkGuess() == true) { win(); } else if (guessesLeft() == true) { guess++; pegs = 0; } else { lose(); } } } function guessesLeft() { if (guess < guesses) { return(true); } return(false); } function pegRemoved() { pegs--; } function win() { gameBoard_mc.revealCode(); total = total + score; games = games + 1; _root.total_txt.text = total; _root.games_txt.text = games; } function lose() { gameBoard_mc.revealCode(); games = games + 1; _root.games_txt.text = games; } function initGame() { _root.attachMovie("board", "gameBoard_mc", _root.getNextHighestDepth(), {game:this, _x:200.5, _y:55}); gameBoard_mc = _root.gameBoard_mc; newGame(); } function reset() { gameBoard_mc.coverCode(); score = 10; _root.score_txt.text = score; } function newGame() { gameBoard_mc.clear(); gameBoard_mc.makeCode(); pegs = 0; guess = 1; } function remove() { gameBoard_mc.remove(); removeMovieClip(gameBoard_mc); } var guess = 1; var total = 0; var score = 10; var games = 0; var guesses = 10; var pegs = 0; }
Symbol 75 MovieClip [__Packages.Board] Frame 0
class Board extends MovieClip { var _height, attachMovie, getNextHighestDepth, game, cover, removeMovieClip; function Board () { super(); makeBoard(); makePegs(); } function makePegs() { var _local2; var _local3 = _height - 20; _local2 = attachMovie("peg", "blackPeg_mc", getNextHighestDepth(), {game:game, _x:0, _y:_local3}); _local2.setColor(BLACK); _local2 = attachMovie("peg", "cyanPeg_mc", getNextHighestDepth(), {game:game, _x:30, _y:_local3}); _local2.setColor(CYAN); _local2 = attachMovie("peg", "greenPeg_mc", getNextHighestDepth(), {game:game, _x:60, _y:_local3}); _local2.setColor(GREEN); _local2 = attachMovie("peg", "redPeg_mc", getNextHighestDepth(), {game:game, _x:90, _y:_local3}); _local2.setColor(RED); _local2 = attachMovie("peg", "whitePeg_mc", getNextHighestDepth(), {game:game, _x:120, _y:_local3}); _local2.setColor(WHITE); _local2 = attachMovie("peg", "yellowPeg_mc", getNextHighestDepth(), {game:game, _x:150, _y:_local3}); _local2.setColor(YELLOW); } function makeBoard() { var _local4 = 0; var _local6 = _height - 30; var _local7 = 0; while (_local7 < game.guessesAllowed()) { var _local2 = 0; while (_local2 < 4) { var _local3 = attachMovie("slot", ("slot" + _local4) + "_mc", getNextHighestDepth()); _local3._x = (_local2 + 1) * 30; _local3._y = _local6; slots[_local4] = _local3; var _local5 = attachMovie("light", ("light" + _local4) + "_mc", getNextHighestDepth()); _local5._x = (_local2 - 4.25) * 30; _local5._y = _local6; lights[_local4] = _local5; _local4++; _local2++; } _local6 = _local6 - (_local3._height + (_local3._height / 2)); _local7++; } cover = attachMovie("cover", "codeCover_mc", getNextHighestDepth()); cover._y = -40; } function makeCode() { var _local2 = 0; while (_local2 < 4) { var _local3 = attachMovie("peg", "codePeg" + _local2, -16380 + _local2); code[_local2] = Math.round(Math.random() * 5); _local3._x = (_local2 + 1) * 30; _local3._y = -25; _local3.useHandCursor = false; _local3.onPress = null; _local3.setColor(code[_local2]); _local2++; } } function placePeg(myPeg) { var _local3 = 0; while (_local3 < 4) { var _local4 = ((game.currentGuess() - 1) * 4) + _local3; var _local2 = slots[_local4]; if (myPeg.hitTest(_local2) && (!_local2.isFilled())) { _local2.fill(myPeg); return(true); } _local3++; } return(false); } function checkGuess() { var _local9 = false; var _local8 = 0; var _local6 = 0; var _local4 = Array(3); var _local5 = 0; while (_local5 < 4) { var _local7 = ((game.currentGuess() - 1) * 4) + _local5; _local4[_local5] = slots[_local7].getPeg().getColor(); slots[_local7].lock(); _local5++; } var _local3 = Array(3); _local5 = 0; while (_local5 < 4) { _local3[_local5] = code[_local5]; _local5++; } _local5 = 0; while (_local5 < 4) { if (_local3[_local5] == _local4[_local5]) { _local8++; _local4[_local5] = null; _local3[_local5] = null; } _local5++; } if (_local8 < 4) { _local5 = 0; while (_local5 < 4) { if (_local4[_local5] != null) { var _local2 = 0; while (_local2 < 4) { if ((_local3[_local2] != null) && (_local3[_local2] == _local4[_local5])) { _local6++; _local4[_local5] = null; _local3[_local2] = null; } _local2++; } } _local5++; } } else { _local9 = true; } _local5 = 0; while (_local5 < 4) { var _local7 = ((game.currentGuess() - 1) * 4) + _local5; if (_local8 > 0) { lights[_local7].correct(); _local8--; } else if (_local6 > 0) { lights[_local7].kinda(); _local6--; } _local5++; } return(_local9); } function pegFilled() { game.pegPlaced(); } function pegRemoved() { game.pegRemoved(); } function revealCode() { cover.gotoAndPlay("Reveal"); } function coverCode() { cover.gotoAndPlay("Cover"); } function codeRevealed() { _root.playAgain(); } function codeCovered() { game.newGame(); } function clear() { var _local2 = 0; while (_local2 < slots.length) { lights[_local2].reset(); slots[_local2].unlock(); var _local3 = slots[_local2].getPeg(); _local3.removeMovieClip(); slots[_local2].remove(); _local2++; } } function remove() { var _local2 = 0; while (_local2 < slots.length) { var _local3 = slots[_local2].getPeg(); (removeMovieClip());// not popped (removeMovieClip());// not popped (removeMovieClip());// not popped _local2++; } } var BLACK = 0; var CYAN = 1; var GREEN = 2; var RED = 3; var YELLOW = 4; var WHITE = 5; var pegs = 0; var code = Array(3); var lights = new Array(39); var slots = new Array(39); }

Library Items

Symbol 1 Sound [pegClick2]
Symbol 2 Sound [pegClick1]
Symbol 3 GraphicUsed by:10
Symbol 4 GraphicUsed by:10
Symbol 5 GraphicUsed by:10
Symbol 6 GraphicUsed by:10
Symbol 7 GraphicUsed by:10
Symbol 8 GraphicUsed by:10
Symbol 9 GraphicUsed by:10
Symbol 10 MovieClip [peg]Uses:3 4 5 6 7 8 9
Symbol 11 GraphicUsed by:13
Symbol 12 GraphicUsed by:13
Symbol 13 MovieClip [cover]Uses:11 12
Symbol 14 GraphicUsed by:17
Symbol 15 GraphicUsed by:17
Symbol 16 GraphicUsed by:17
Symbol 17 MovieClip [light]Uses:14 15 16Used by:Timeline
Symbol 18 GraphicUsed by:19
Symbol 19 MovieClip [slot]Uses:18Used by:Timeline
Symbol 20 GraphicUsed by:21
Symbol 21 MovieClip [board]Uses:20Used by:Timeline
Symbol 22 ShapeTweeningUsed by:24
Symbol 23 GraphicUsed by:24
Symbol 24 MovieClipUses:22 23Used by:Timeline
Symbol 71 MovieClip [__Packages.Light]
Symbol 72 MovieClip [__Packages.Slot]
Symbol 73 MovieClip [__Packages.Peg]
Symbol 74 MovieClip [__Packages.CodeBreaker]
Symbol 75 MovieClip [__Packages.Board]
Symbol 25 FontUsed by:26
Symbol 26 TextUses:25Used by:Timeline
Symbol 27 FontUsed by:28 33 42 45 46 57 59 61 64 67
Symbol 28 TextUses:27Used by:30
Symbol 29 GraphicUsed by:30
Symbol 30 ButtonUses:28 29Used by:Timeline
Symbol 31 GraphicUsed by:34
Symbol 32 GraphicUsed by:34
Symbol 33 TextUses:27Used by:34
Symbol 34 ButtonUses:31 32 33Used by:Timeline
Symbol 35 GraphicUsed by:Timeline
Symbol 36 GraphicUsed by:38
Symbol 37 GraphicUsed by:38
Symbol 38 ButtonUses:36 37Used by:Timeline
Symbol 39 GraphicUsed by:41
Symbol 40 GraphicUsed by:41
Symbol 41 ButtonUses:39 40Used by:Timeline
Symbol 42 TextUses:27Used by:Timeline
Symbol 43 GraphicUsed by:Timeline
Symbol 44 GraphicUsed by:Timeline
Symbol 45 TextUses:27Used by:Timeline
Symbol 46 TextUses:27Used by:Timeline
Symbol 47 GraphicUsed by:Timeline
Symbol 48 GraphicUsed by:Timeline
Symbol 49 GraphicUsed by:Timeline
Symbol 50 GraphicUsed by:Timeline
Symbol 51 GraphicUsed by:Timeline
Symbol 52 GraphicUsed by:54
Symbol 53 GraphicUsed by:54
Symbol 54 ButtonUses:52 53Used by:Timeline
Symbol 55 GraphicUsed by:Timeline
Symbol 56 GraphicUsed by:Timeline
Symbol 57 EditableTextUses:27Used by:Timeline
Symbol 58 GraphicUsed by:Timeline
Symbol 59 EditableTextUses:27Used by:Timeline
Symbol 60 GraphicUsed by:Timeline
Symbol 61 EditableTextUses:27Used by:Timeline
Symbol 62 GraphicUsed by:65
Symbol 63 GraphicUsed by:65 68
Symbol 64 TextUses:27Used by:65
Symbol 65 ButtonUses:62 63 64Used by:Timeline
Symbol 66 GraphicUsed by:68
Symbol 67 TextUses:27Used by:68
Symbol 68 ButtonUses:66 63 67Used by:Timeline
Symbol 69 GraphicUsed by:70
Symbol 70 MovieClipUses:69Used by:Timeline

Instance Names

"playGame_btn"Frame 2Symbol 30 Button
"instructions_btn"Frame 2Symbol 34 Button
"website_btn"Frame 2Symbol 38 Button
"next_btn"Frame 4Symbol 41 Button
"board_mc"Frame 5Symbol 21 MovieClip [board]
"green_mc"Frame 6Symbol 17 MovieClip [light]
"white1_mc"Frame 6Symbol 17 MovieClip [light]
"white2_mc"Frame 6Symbol 17 MovieClip [light]
"return_btn"Frame 7Symbol 54 Button
"total_txt"Frame 8Symbol 57 EditableText
"score_txt"Frame 8Symbol 59 EditableText
"games_txt"Frame 8Symbol 61 EditableText
"confirmPlayAgain_btn"Frame 8Symbol 65 Button
"cancelPlayAgain_btn"Frame 8Symbol 68 Button
"playAgain_mc"Frame 8Symbol 70 MovieClip

Special Tags

Protect (24)Timeline Frame 131 bytes "..$1$N9$NU6NDQ27x9XIlFp.eGyOt0."
ExportAssets (56)Timeline Frame 1Symbol 1 as "pegClick2"
ExportAssets (56)Timeline Frame 1Symbol 2 as "pegClick1"
ExportAssets (56)Timeline Frame 1Symbol 10 as "peg"
ExportAssets (56)Timeline Frame 1Symbol 13 as "cover"
ExportAssets (56)Timeline Frame 1Symbol 17 as "light"
ExportAssets (56)Timeline Frame 1Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 1Symbol 21 as "board"
ExportAssets (56)Timeline Frame 1Symbol 71 as "__Packages.Light"
ExportAssets (56)Timeline Frame 1Symbol 72 as "__Packages.Slot"
ExportAssets (56)Timeline Frame 1Symbol 73 as "__Packages.Peg"
ExportAssets (56)Timeline Frame 1Symbol 74 as "__Packages.CodeBreaker"
ExportAssets (56)Timeline Frame 1Symbol 75 as "__Packages.Board"
ExportAssets (56)Timeline Frame 5Symbol 21 as "board"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 5Symbol 19 as "slot"
ExportAssets (56)Timeline Frame 6Symbol 17 as "light"
ExportAssets (56)Timeline Frame 6Symbol 17 as "light"
ExportAssets (56)Timeline Frame 6Symbol 17 as "light"
ExportAssets (56)Timeline Frame 6Symbol 17 as "light"
ExportAssets (56)Timeline Frame 6Symbol 17 as "light"
ExportAssets (56)Timeline Frame 6Symbol 17 as "light"
ExportAssets (56)Timeline Frame 6Symbol 17 as "light"
ExportAssets (56)Timeline Frame 6Symbol 17 as "light"
ExportAssets (56)Timeline Frame 6Symbol 17 as "light"
ExportAssets (56)Timeline Frame 6Symbol 17 as "light"
ExportAssets (56)Timeline Frame 6Symbol 17 as "light"
ExportAssets (56)Timeline Frame 6Symbol 17 as "light"

Labels

"Title"Frame 2
"Instructions"Frame 3
"Aim"Frame 4
"Guessing"Frame 5
"Clues"Frame 6
"Scoring"Frame 7
"Start"Frame 8
"Black"Symbol 10 MovieClip [peg] Frame 2
"BlackFade"Symbol 10 MovieClip [peg] Frame 3
"Cyan"Symbol 10 MovieClip [peg] Frame 34
"Green"Symbol 10 MovieClip [peg] Frame 35
"Red"Symbol 10 MovieClip [peg] Frame 36
"White"Symbol 10 MovieClip [peg] Frame 37
"Yellow"Symbol 10 MovieClip [peg] Frame 38
"Reveal"Symbol 13 MovieClip [cover] Frame 2
"Cover"Symbol 13 MovieClip [cover] Frame 62
"Off"Symbol 17 MovieClip [light] Frame 1
"correct"Symbol 17 MovieClip [light] Frame 2
"kinda"Symbol 17 MovieClip [light] Frame 3
"Empty"Symbol 19 MovieClip [slot] Frame 1




http://swfchan.com/3/10730/info.shtml
Created: 8/6 -2019 02:37:29 Last modified: 8/6 -2019 02:37:29 Server time: 22/12 -2024 10:05:13