Código:
PORFAVOR!!! function Start() { setProperty("master", _xscale, scale); setProperty("master", _yscale, scale); setProperty("win", _visible, 0); setProperty("lose", _visible, 0); h = _root.master._height; w = _root.master._width; gap = "8"; x = 8; y = 8; choice1 = 0; choice2 = 0; mc1 = 0; mc2 = 0; correct = 0; x = (550 - (w * wide + gap * (wide - 1))) / 2 + w / 2; y = (325 - (h * high + gap * (high - 1))) / 2 + h / 2; start = int(getTimer() / 1000); Shuffle(); } // End of the function function Lose() { for (i = 0; i < shuffleArray.length; i++) { tellTarget("rump" + i) { gotoAndStop(3); } // End of TellTarget setProperty("rump" + i, _alpha, 15); } // end of for duplicateMovieClip("lose", "youlose", 100); setProperty("lose", _visible, 0); } // End of the function function Clean() { choice1 = 0; choice2 = 0; mc1 = 0; mc2 = 0; for (i = 0; i < shuffleArray.length; i++) { eval("rump" + i + "active") = false; } // end of for } // End of the function function Check() { if (choice1 == choice2) { for (i = 0; i < shuffleArray.length; i++) { eval("rump" + i + "active") = true; } // end of for correct++; tellTarget(/:mc1) { gotoAndPlay("correct"); } // End of TellTarget tellTarget(/:mc2) { gotoAndPlay("correct"); } // End of TellTarget if (correct == shuffleArray.length / 2) { for (i = 0; i < shuffleArray.length; i++) { tellTarget("rump" + i) { gotoAndStop(3); } // End of TellTarget setProperty("rump" + i, _alpha, 15); } // end of for duplicateMovieClip("win", "youwin", 100); setProperty(win, _visible, 0); min = 0; sec = "00"; stop(); } // end if } else { for (i = 0; i < shuffleArray.length; i++) { eval("rump" + i + "active") = true; } // end of for tellTarget(/:mc1) { gotoAndPlay("wrong"); } // End of TellTarget tellTarget(/:mc2) { gotoAndPlay("wrong"); } // End of TellTarget } // end if } // End of the function function Shuffle() { Number = wide * high; indexArray = new Array(number); n = 1; for (i = 0; i < number; i = i + 2) { indexArray[i] = n; indexArray[i + 1] = n; n++; } // end of for shuffleArray = new Array(number); n = 0; for (i = number; i > 0; i--) { ran = random(i); shuffleArray[n] = indexArray[ran]; indexArray.splice(ran, 1); n++; } // end of for Build(shuffleArray); } // End of the function function Build(shuffleArray) { setProperty("master", _visible, 0); row = 0; xpos = x; ypos = y; for (i = 0; i < shuffleArray.length; i++) { duplicateMovieClip("master", "rump" + i, i); row++; setProperty("rump" + i, _x, xpos); setProperty("rump" + i, _y, ypos); if (row < wide) { xpos = Number(gap) + Number(w) + Number(xpos); } else { ypos = Number(gap) + Number(h) + Number(ypos); xpos = x; row = 0; } // end if eval("_root.rump" + i + "butts:frame") = shuffleArray[i]; frame = shuffleArray[i]; tellTarget("rump" + i + "butts") { gotoAndStop(/:frame); } // End of TellTarget } // end of for } // End of the function stop();