Frame 2
var sudoku = (new com.miniclip.sudoku.Sudoku(this));
Frame 22
mcHud.gotoAndPlay("menu");
Frame 29
stop();
Frame 30
mcHud.gotoAndPlay("play game");
Frame 46
var intro = (new com.miniclip.sudoku.Intro(this));
mcHud.gotoAndPlay("game");
Frame 47
intro.update();
particles.update();
Frame 48
if (intro.bDone) {
gotoAndPlay ("initgame");
} else {
prevFrame();
play();
}
Frame 51
sudoku.newGame();
stop();
Frame 58
particles.remove();
stop();
Frame 67
var win = (new com.miniclip.sudoku.Win(sudoku.getTiles(), sudoku.getTilesMenu()));
mcHud.gotoAndPlay("game_out");
var iFrame = 0;
Frame 68
win.update();
iFrame++;
if (iFrame == 120) {
gotoAndPlay ("menu");
}
Frame 69
prevFrame();
play();
Symbol 4 MovieClip Frame 1
stop();
Symbol 4 MovieClip Frame 8
stop();
Symbol 6 Button
on (rollOver) {
if (!this.oParent.bSelected) {
this.gotoAndPlay("onMouseOver");
}
}
on (rollOut, dragOut) {
if (!this.oParent.bSelected) {
this.gotoAndPlay("onMouseOut");
}
}
on (release) {
this.oParent.onRelease();
}
on (press) {
this.oParent.onPress();
}
Symbol 9 MovieClip Frame 9
stop();
Symbol 9 MovieClip Frame 71
stop();
Symbol 10 MovieClip [mcTile] Frame 1
stop();
Symbol 10 MovieClip [mcTile] Frame 18
stop();
Symbol 10 MovieClip [mcTile] Frame 30
stop();
Symbol 10 MovieClip [mcTile] Frame 39
stop();
Symbol 10 MovieClip [mcTile] Frame 49
stop();
Symbol 15 MovieClip [mcSymbol1] Frame 8
stop();
Symbol 15 MovieClip [mcSymbol1] Frame 20
stop();
Symbol 15 MovieClip [mcSymbol1] Frame 35
stop();
Symbol 19 MovieClip [mcSymbol2] Frame 12
stop();
Symbol 19 MovieClip [mcSymbol2] Frame 28
stop();
Symbol 19 MovieClip [mcSymbol2] Frame 43
stop();
Symbol 23 MovieClip [mcSymbol3] Frame 8
stop();
Symbol 23 MovieClip [mcSymbol3] Frame 20
stop();
Symbol 23 MovieClip [mcSymbol3] Frame 30
stop();
Symbol 27 MovieClip [mcSymbol4] Frame 17
stop();
Symbol 27 MovieClip [mcSymbol4] Frame 35
stop();
Symbol 27 MovieClip [mcSymbol4] Frame 57
stop();
Symbol 31 MovieClip [mcSymbol5] Frame 14
stop();
Symbol 31 MovieClip [mcSymbol5] Frame 26
stop();
Symbol 31 MovieClip [mcSymbol5] Frame 40
stop();
Symbol 35 MovieClip [mcSymbol6] Frame 11
stop();
Symbol 35 MovieClip [mcSymbol6] Frame 21
stop();
Symbol 35 MovieClip [mcSymbol6] Frame 32
stop();
Symbol 39 MovieClip [mcSymbol7] Frame 10
stop();
Symbol 39 MovieClip [mcSymbol7] Frame 25
stop();
Symbol 39 MovieClip [mcSymbol7] Frame 39
stop();
Symbol 43 MovieClip [mcSymbol8] Frame 20
stop();
Symbol 43 MovieClip [mcSymbol8] Frame 41
stop();
Symbol 43 MovieClip [mcSymbol8] Frame 63
stop();
Symbol 47 MovieClip [mcSymbol9] Frame 13
stop();
Symbol 47 MovieClip [mcSymbol9] Frame 27
stop();
Symbol 47 MovieClip [mcSymbol9] Frame 42
stop();
Symbol 62 MovieClip Frame 1
this._visible = false;
Symbol 68 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 73 MovieClip Frame 1
pushSWF1 = "http://www.miniclip.com/swfcontent/push/didyouknow.swf";
totalAds = 1;
gotoAndPlay ("ReadCookie");
Symbol 73 MovieClip Frame 9
so = SharedObject.getLocal("MiniclipLoaderAd");
showThisAd = so.data.showThisAd + 1;
if (showThisAd > totalAds) {
showThisAd = 1;
}
so.data.showThisAd = showThisAd;
gotoAndPlay ("prepareAd");
Symbol 73 MovieClip Frame 20
doReadCookie();
showAd = ((this["pushSWF" + showThisAd] + "?cacheBuster=") + getTimer()) + random(999999);
gotoAndPlay ("loadAd");
Symbol 73 MovieClip Frame 31
if (_url.indexOf("http") > -1) {
trace("trying to load ad: " + showAd);
mcAd.loadMovie(showAd);
}
mcCookie.doWriteCookie(showThisAd);
Symbol 73 MovieClip Frame 33
if ((mcAd.getBytesTotal() != 0) && (mcAd.getBytesLoaded() == mcAd.getBytesTotal())) {
lastAdShown = showThisAd;
doWriteCookie();
gotoAndStop ("showAd");
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 73 MovieClip Frame 41
stop();
Symbol 82 MovieClip Frame 1
stop();
Symbol 82 MovieClip Frame 100
stop();
Symbol 84 MovieClip Frame 1
stop();
Symbol 84 MovieClip Frame 12
_root.play();
_root.isFinished = true;
_parent.stop();
stop();
Symbol 88 Button
on (release) {
getURL ("http://www.miniclip.com/", "_blank");
}
Symbol 89 MovieClip Frame 2
_parent.mcAnimation.play();
stop();
Symbol 89 MovieClip Frame 13
_parent.gotoAndPlay("preload");
stop();
Symbol 103 MovieClip Frame 1
stop();
Symbol 103 MovieClip Frame 60
Symbol 103 MovieClip Frame 121
_parent.mcBackground.play();
stop();
Symbol 104 MovieClip Frame 1
_root.stop();
play();
Instance of Symbol 62 MovieClip "mcIntro" in Symbol 104 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 104 MovieClip Frame 2
xPos = _x;
yPos = _y;
mcBackground._x = mcBackground._x - xPos;
mcBackground._y = mcBackground._y - yPos;
mcAnimation._x = mcAnimation._x - xPos;
mcAnimation._y = mcAnimation._y - yPos;
var stageWidth = Stage.width;
var stageHeight = Stage.height;
var centerStageX = (stageWidth / 2);
var centerStageY = (stageHeight / 2);
mcBackground._width = stageWidth;
mcBackground._height = stageHeight;
mcAnimation._x = mcAnimation._x + centerStageX;
mcAnimation._y = mcAnimation._y + (centerStageY - (stageHeight / 10));
stop();
Instance of Symbol 84 MovieClip "mcLoadingAnimated" in Symbol 104 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 104 MovieClip Frame 3
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent == 100) {
_root.play();
stop();
} else {
mcLoadingAnimated._visible = true;
}
Symbol 104 MovieClip Frame 5
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent < 100) {
mcLoadingAnimated.mcLoading.gotoAndStop(loadedPercent);
mcLoadingAnimated.mcLoading.txtPercentLoaded1 = ("The game is loading (" + loadedPercent) + "%)";
mcLoadingAnimated.mcLoading.txtPercentLoaded2 = ("The game is loading (" + loadedPercent) + "%)";
gotoAndPlay(_currentframe - 1);
} else {
mcLoadingAnimated.play();
stop();
}
Symbol 309 MovieClip [__Packages.com.miniclip.sudoku.Sudoku] Frame 0
class com.miniclip.sudoku.Sudoku
{
var mcRoot, aTiles, aTilesMenu, settings, soundPlayer, scenery, mcContainer, mcDialogs, dialogOptions, dialogReset, loadSudoku, timer, mcPause, mcPrintHud;
function Sudoku (mcRoot) {
this.mcRoot = mcRoot;
aTiles = new Array();
aTilesMenu = new Array();
settings = new com.miniclip.sudoku.Settings();
soundPlayer = new com.miniclip.sudoku.SoundPlayer(this.mcRoot, this);
scenery = new com.miniclip.sudoku.Scenery(this.mcRoot);
mcContainer = this.mcRoot.createEmptyMovieClip("thegame", this.mcRoot.getNextHighestDepth());
mcContainer._x = 233;
mcContainer._y = 23;
mcDialogs = this.mcRoot.createEmptyMovieClip("dialogs", this.mcRoot.getNextHighestDepth());
dialogOptions = new com.miniclip.dialog.DialogOptions(mcDialogs, this);
dialogOptions.setPosition(275, 200);
dialogReset = new com.miniclip.dialog.DialogReset(mcDialogs, this);
loadSudoku = new com.miniclip.sudoku.LoadSudoku(mcContainer, this, 81);
loadSudoku.gameLoaded = _gameLoaded;
}
function optionsOpen() {
dialogOptions.open();
}
function statsOpen() {
dialogOptions.open();
dialogOptions.getMc().gotoAndPlay("stats");
}
function helpOpen() {
dialogOptions.open();
dialogOptions.getMc().gotoAndPlay("help");
}
function resetOpen() {
dialogReset.open();
}
function pause() {
timer.pause();
mcPause = mcRoot.attachMovie("mcPause", "mcPause", mcRoot.getNextHighestDepth());
mcPause.gotoAndPlay("in");
}
function unpause() {
timer.unpause();
mcPause.gotoAndPlay("out");
}
function soundSwitch() {
if (settings.bSoundandmusic) {
soundPlayer.disable();
settings.bSoundandmusic = false;
settings.save();
} else {
soundPlayer.enable();
settings.bSoundandmusic = true;
settings.save();
}
}
function setDifficulty(sDifficulty) {
settings.sDifficulty = sDifficulty;
}
function newGame() {
Mouse.addListener(this);
Key.addListener(this);
timer = new com.miniclip.sudoku.Timer(mcRoot);
reset();
}
function print() {
scenery.hide();
mcRoot.mcBackgroundColor._visible = false;
mcRoot.mcHud._visible = false;
mcPrintHud = mcContainer.attachMovie("mcPrintHud", "mcPrintHudda", mcContainer.getNextHighestDepth());
mcPrintHud._x = -231;
mcPrintHud._y = -22;
mcPrintHud.difficulty.text = "PUZZLE DIFFICULTY: " + settings.sDifficulty.toUpperCase();
var _local3 = new Date();
_local3.setTime(iTimestamp);
var _local4 = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
mcPrintHud.date.text = (((_local3.getDate() + " ") + _local4[_local3.getMonth()]) + " ") + _local3.getYear();
var _local2 = mcRoot.attachMovie("mcStopPrint", "mcStopPrint", mcRoot.getNextHighestDepth());
_local2._x = (Stage.width / 2) - (_local2._width / 2);
_local2._y = 350;
mcPrintHud.mcPrint = _local2;
print (mcContainer, "bmovie");
}
function stopPrint() {
if (settings.bBackgroundimage) {
scenery.show();
} else {
mcRoot.mcBackgroundColor._visible = true;
}
mcRoot.mcHud._visible = true;
mcPrintHud.mcPrint.removeMovieClip();
mcPrintHud.removeMovieClip();
}
function win() {
var _local2 = timer.stop();
if (puzzleIsSolved()) {
mcRoot.mcBackground.gotoAndPlay("start again");
}
if (settings.sDifficulty == "Easy") {
settings.iTotalTimeEasy = settings.iTotalTimeEasy + _local2;
settings.iNumGamesSolvedEasy++;
settings.iLastDayEasy = iDay;
if ((settings.iFastestTimeEasy == -1) || (_local2 < settings.iFastestTimeEasy)) {
settings.iFastestTimeEasy = _local2;
}
settings.iAverageTimeEasy = settings.iTotalTimeEasy / settings.iNumGamesSolvedEasy;
} else if (settings.sDifficulty == "Medium") {
settings.iTotalTimeMedium = settings.iTotalTimeMedium + _local2;
settings.iNumGamesSolvedMedium++;
settings.iLastDayMedium = iDay;
if ((settings.iFastestTimeMedium == -1) || (_local2 < settings.iFastestTimeMedium)) {
settings.iFastestTimeMedium = _local2;
}
settings.iAverageTimeMedium = settings.iTotalTimeMedium / settings.iNumGamesSolvedMedium;
} else if (settings.sDifficulty == "Hard") {
settings.iTotalTimeHard = settings.iTotalTimeHard + _local2;
settings.iNumGamesSolvedHard++;
settings.iLastDayHard = iDay;
if ((settings.iFastestTimeHard == -1) || (_local2 < settings.iFastestTimeHard)) {
settings.iFastestTimeHard = _local2;
}
settings.iAverageTimeHard = settings.iTotalTimeHard / settings.iNumGamesSolvedHard;
}
settings.save();
mcRoot.gotoAndPlay("win");
mcRoot.mcHud.mcWinAnim.gotoAndPlay("show");
mcRoot.mcHud.mcWinAnim.mcWin.gotoAndStop(settings.sDifficulty);
}
function getTiles() {
return(aTiles);
}
function getTilesMenu() {
return(aTilesMenu);
}
function reset() {
loadGame("http://www.miniclip.com/sudoku/getBoard.php?d=" + settings.sDifficulty);
}
function clear() {
delete timer;
var _local5 = 0;
while (_local5 < aTilesMenu.length) {
aTilesMenu[_local5].remove();
_local5++;
}
aTilesMenu = new Array();
var _local4 = 0;
while (_local4 < aTiles.length) {
var _local3 = 0;
while (_local3 < aTiles[_local4].length) {
aTiles[_local4][_local3].remove();
_local3++;
}
_local4++;
}
aTiles = new Array();
iLastX = -1;
iLastY = -1;
iCurrentSymbol = -1;
Mouse.removeListener(this);
Key.removeListener(this);
if (puzzleIsSolved() && (_root._currentframe > 44)) {
mcRoot.mcBackground.gotoAndPlay("start again");
}
}
function puzzleIsSolved() {
return((((settings.sDifficulty == "Easy") && (iDay == settings.iLastDayEasy)) || ((settings.sDifficulty == "Medium") && (iDay == settings.iLastDayMedium))) || ((settings.sDifficulty == "Hard") && (iDay == settings.iLastDayHard)));
}
function updateTileTypes() {
var _local4 = 0;
while (_local4 < aTilesMenu.length) {
aTilesMenu[_local4].setTileType(settings.sTileType);
_local4++;
}
var _local3 = 0;
while (_local3 < aTiles.length) {
var _local2 = 0;
while (_local2 < aTiles[_local3].length) {
aTiles[_local3][_local2].setTileType(settings.sTileType);
_local2++;
}
_local3++;
}
}
function loadGame(sUrl) {
loadSudoku.load(sUrl);
}
function _gameLoaded(oThis, aLoadedTiles, iDay, iTimestamp) {
oThis.gameLoaded(aLoadedTiles, iDay, iTimestamp);
}
function gameLoaded(aLoadedTiles, iDay, iTimestamp) {
mcRoot.intro.remove();
var _local7 = Math.sqrt(aLoadedTiles.length);
var _local5 = 0;
while (_local5 < aTilesMenu.length) {
aTilesMenu[_local5].remove();
_local5++;
}
aTilesMenu = new Array();
_local5 = 0;
while (_local5 < _local7) {
aTilesMenu[_local5] = new com.miniclip.sudoku.TileMenu(mcContainer, this, _local5, settings.sTileType);
aTilesMenu[_local5].mcTile._alpha = 70;
aTilesMenu[_local5].setSymbol(_local5 + 1);
if (_local5 == 0) {
aTilesMenu[_local5].setReadonly(false);
}
_local5++;
}
var _local4 = 0;
while (_local4 < aTiles.length) {
var _local3 = 0;
while (_local3 < aTiles[_local4].length) {
aTiles[_local4][_local3].remove();
_local3++;
}
_local4++;
}
aTiles = new Array();
_local4 = 0;
while (_local4 < _local7) {
aTiles[_local4] = new Array();
var _local3 = 0;
while (_local3 < _local7) {
aTiles[_local4][_local3] = new com.miniclip.sudoku.Tile(mcContainer, this, _local3, _local4, settings.sTileType);
var _local6 = aLoadedTiles[(_local4 * _local7) + _local3];
var _local8 = ((Math.floor(_local4 / 3) % 2) ? 0 : 1);
if ((Math.floor(_local3 / 3) % 2) == _local8) {
aTiles[_local4][_local3].mcTile.mcTileBackground.gotoAndStop("normal");
} else {
aTiles[_local4][_local3].mcTile.mcTileBackground.gotoAndStop("grey");
}
if (_local6 == 0) {
aTiles[_local4][_local3].setReadonly(false);
} else {
aTiles[_local4][_local3].setSymbol(_local6);
}
_local3++;
}
_local4++;
}
iCurrentSymbol = -1;
timer.reset();
timer.start();
this.iDay = iDay;
this.iTimestamp = iTimestamp;
mcRoot.gotoAndStop("newgame");
mcRoot.mcHud.mcDifficultyAnim.gotoAndPlay("show");
mcRoot.mcHud.mcDifficultyAnim.mcDifficulty.difficulty.text = "PUZZLE DIFFICULTY: " + settings.sDifficulty.toUpperCase();
if (puzzleIsSolved()) {
mcRoot.mcBackground.gotoAndPlay("game completed");
}
var _local10 = new Date();
_local10.setTime(this.iTimestamp);
var _local11 = Array("JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER");
mcRoot.mcHud.mcDateAnim.gotoAndPlay("show");
mcRoot.mcHud.mcDateAnim.mcDate.date.text = (_local10.getDate() + " ") + _local11[_local10.getMonth()];
if (settings.sDifficulty == "Easy") {
settings.iNumGamesEasy++;
} else if (settings.sDifficulty == "Medium") {
settings.iNumGamesMedium++;
} else if (settings.sDifficulty == "Hard") {
settings.iNumGamesHard++;
}
settings.save();
_root.tempTimerId = setInterval(this, "setCurrentSymbol", 300, 1);
}
function getBlockOffset(iPos) {
return(Math.floor(iPos / 3) * 3);
}
function validateSymbol(iY, iX, iSymbol) {
var _local3 = 0;
while (_local3 < aTiles.length) {
if (_local3 != iY) {
if (aTiles[_local3][iX].getSymbol() == iSymbol) {
return(false);
}
}
_local3++;
}
var _local2 = 0;
while (_local2 < aTiles[iY].length) {
if (_local2 != iX) {
if (aTiles[iY][_local2].getSymbol() == iSymbol) {
return(false);
}
}
_local2++;
}
var _local5 = getBlockOffset(iX);
var _local8 = getBlockOffset(iY);
_local3 = _local8;
while (_local3 < (_local8 + 3)) {
_local2 = _local5;
while (_local2 < (_local5 + 3)) {
if (((_local3 != iY) && (_local2 != iX)) && (aTiles[_local3][_local2].getSymbol() == iSymbol)) {
return(false);
}
_local2++;
}
_local3++;
}
return(true);
}
function getInvalidTiles(iY, iX, iSymbol) {
var _local4 = new Array();
var _local3 = 0;
while (_local3 < aTiles.length) {
if (_local3 != iY) {
if (aTiles[_local3][iX].getSymbol() == iSymbol) {
_local4[_local4.length] = aTiles[_local3][iX];
}
}
_local3++;
}
var _local2 = 0;
while (_local2 < aTiles[iY].length) {
if (_local2 != iX) {
if (aTiles[iY][_local2].getSymbol() == iSymbol) {
_local4[_local4.length] = aTiles[iY][_local2];
}
}
_local2++;
}
var _local7 = getBlockOffset(iX);
var _local9 = getBlockOffset(iY);
_local3 = _local9;
while (_local3 < (_local9 + 3)) {
_local2 = _local7;
while (_local2 < (_local7 + 3)) {
if (((_local3 != iY) && (_local2 != iX)) && (aTiles[_local3][_local2].getSymbol() == iSymbol)) {
_local4[_local4.length] = aTiles[_local3][_local2];
}
_local2++;
}
_local3++;
}
return(_local4);
}
function validateBoard(bDiscreet) {
var _local6 = true;
var _local3 = 0;
while (_local3 < aTiles.length) {
var _local2 = 0;
while (_local2 < aTiles[_local3].length) {
var _local4 = aTiles[_local3][_local2].getSymbol();
if ((_local4 == -1) || (!validateSymbol(_local3, _local2, _local4))) {
if (bDiscreet) {
return(false);
}
_local6 = false;
aTiles[_local3][_local2].setError(true);
} else if (!bDiscreet) {
aTiles[_local3][_local2].setError(false);
}
_local2++;
}
_local3++;
}
return(_local6);
}
function onKeyDown() {
var _local2 = Key.getCode();
if ((_local2 >= 49) && (_local2 <= 57)) {
onTileMenuPress(_local2 - 49);
} else if ((_local2 >= 65) && (_local2 <= 73)) {
onTileMenuPress(_local2 - 65);
}
}
function setCurrentSymbol(iCurrentSymbol) {
clearInterval(_root.tempTimerId);
this.iCurrentSymbol = iCurrentSymbol;
var _local5 = iCurrentSymbol - 1;
var _local4 = 0;
while (_local4 < aTilesMenu.length) {
var _local3 = com.miniclip.sudoku.TileMenu(aTilesMenu[_local4]);
if (_local5 == _local4) {
_local3.setReadonly(false);
_local3.mcTile.gotoAndPlay("onMouseOut");
_local3.bSelected = true;
_local3.mcTile._alpha = 100;
} else {
_local3.setReadonly(true);
_local3.bSelected = false;
_local3.mcTile._alpha = 70;
}
_local4++;
}
}
function onMouseDown() {
}
function onMouseUp() {
}
function onMouseWheel(delta) {
if (delta > 0) {
delta = 1;
} else if (delta < 0) {
delta = -1;
}
if (iCurrentSymbol == -1) {
var _local2 = ((delta == 1) ? 1 : 9);
} else {
var _local2 = iCurrentSymbol + delta;
if (_local2 >= 10) {
_local2 = 1;
}
if (_local2 <= 0) {
_local2 = 9;
}
}
onTileMenuPress(_local2 - 1);
}
function onTilePress(iY, iX) {
var _local4 = com.miniclip.sudoku.Tile(aTiles[iY][iX]);
if (!_local4.getReadonly()) {
if (Key.isDown(16) || (Key.isDown(32))) {
if (_local4.getSymbol() == -1) {
_local4.switchSymbolPossible(iCurrentSymbol);
}
} else if ((_local4.getSymbol() == iCurrentSymbol) || (iCurrentSymbol == -1)) {
_local4.setSymbol(-1);
soundPlayer.soundOnSymbolRemoved.start();
} else {
if (settings.bIngamehelp) {
var _local3 = getInvalidTiles(iY, iX, iCurrentSymbol);
if (_local3.length == 0) {
_local4.setSymbol(iCurrentSymbol);
_local4.removeSymbolsPossible();
soundPlayer.soundOnSymbolPlaced.start();
} else {
var _local2 = 0;
while (_local2 < _local3.length) {
_local3[_local2].setError(true);
_local2++;
}
soundPlayer.soundOnSymbolError.start();
}
} else {
_local4.setSymbol(iCurrentSymbol);
_local4.removeSymbolsPossible();
soundPlayer.soundOnSymbolPlaced.start();
}
if (validateBoard(true)) {
win();
}
}
} else {
soundPlayer.soundOnSymbolReadonly.start();
}
}
function onTileMenuPress(i) {
setCurrentSymbol(i + 1);
}
var iDay = -1;
var iTimestamp = -1;
var iLastX = -1;
var iLastY = -1;
var iCurrentSymbol = -1;
}
Symbol 310 MovieClip [__Packages.com.miniclip.sudoku.LoadSudoku] Frame 0
class com.miniclip.sudoku.LoadSudoku extends LoadVars
{
var mcRoot, oParent, iTiles, mcLoadSudoku, sLastUrl, iTimeout, aLoadedTiles, day, timestamp, loaded, getBytesTotal, getBytesLoaded;
function LoadSudoku (mcRoot, oParent, iTiles) {
super();
this.mcRoot = mcRoot;
this.oParent = oParent;
this.iTiles = iTiles;
}
function load(sUrl) {
mcLoadSudoku = mcRoot.attachMovie("mcLoadSudoku", "mcLoadSudoku" + mcRoot.getNextHighestDepth(), mcRoot.getNextHighestDepth());
mcLoadSudoku._visible = false;
sLastUrl = sUrl;
iTimeout = 100;
iIntervalId = setInterval(this, "_update", 50, this);
super.load(sUrl);
}
function onLoad(bSuccess) {
aLoadedTiles = new Array();
var _local2 = 1;
while (_local2 <= iTiles) {
aLoadedTiles[_local2 - 1] = this["tile" + _local2];
_local2++;
}
update();
mcLoadSudoku.removeMovieClip();
clearInterval(iIntervalId);
gameLoaded(oParent, aLoadedTiles, Number(day), Number(timestamp) * 1000);
}
function gameLoaded(oParent, aLoadedTiles, iDay) {
}
function getPercentLoaded() {
if (loaded) {
return(100);
}
if (getBytesTotal() == undefined) {
return(0);
}
return(Math.round((getBytesLoaded() / getBytesTotal()) * 100));
}
function _update(oThis) {
oThis.update();
}
function update() {
mcLoadSudoku.gotoAndStop(getPercentLoaded());
if ((--iTimeout) == 0) {
load(sLastUrl);
}
}
var iIntervalId = -1;
}
Symbol 311 MovieClip [__Packages.com.miniclip.sudoku.Timer] Frame 0
class com.miniclip.sudoku.Timer
{
var mcRoot;
function Timer (mcRoot) {
this.mcRoot = mcRoot;
iTimerId = setInterval(this, "update", 100);
}
function start() {
bRunning = true;
}
function stop() {
bRunning = false;
return(getSeconds() - iPausedSeconds);
}
function reset() {
iStart = new Date().getTime();
}
function pause() {
if (bRunning) {
iPauseStart = getSeconds();
stop();
}
}
function unpause() {
iPausedSeconds = iPausedSeconds + (getSeconds() - iPauseStart);
start();
}
function getSeconds() {
return(Math.floor((new Date().getTime() - iStart) / 1000));
}
function pad(iNumber) {
return(((iNumber < 10) ? ("0" + iNumber) : (iNumber)));
}
function update() {
if (bRunning) {
var _local2 = getSeconds() - iPausedSeconds;
var _local3 = Math.floor(_local2 / 60);
var _local5 = pad(_local3);
_local2 = _local2 % 60;
var _local4 = pad(_local2);
mcRoot.mcHud.mcTimerAnim.mcTimer.timer.text = (_local5 + ":") + _local4;
}
}
var iStart = -1;
var iPauseStart = -1;
var iPausedSeconds = 0;
var bRunning = false;
var iTimerId = 0;
}
Symbol 312 MovieClip [__Packages.com.miniclip.sudoku.Settings] Frame 0
class com.miniclip.sudoku.Settings
{
function Settings () {
load();
}
function set(originalValue, newValue) {
return(((newValue != undefined) ? (newValue) : (originalValue)));
}
function load() {
var _local2 = SharedObject.getLocal("SudokuSettings").data;
sDifficulty = set(sDifficulty, _local2.sDifficulty);
sTileType = set(sTileType, _local2.sTileType);
if (sTileType == "colors") {
sTileType = "numbers";
}
bIngamehelp = set(bIngamehelp, _local2.bIngamehelp);
bBackgroundimage = set(bBackgroundimage, _local2.bBackgroundimage);
bSoundandmusic = set(bSoundandmusic, _local2.bSoundandmusic);
iLastDayEasy = set(iLastDayEasy, _local2.iLastDayEasy);
iLastDayTimeEasy = set(iLastDayTimeEasy, _local2.iLastDayTimeEasy);
iNumGamesEasy = set(iNumGamesEasy, _local2.iNumGamesEasy);
iNumGamesSolvedEasy = set(iNumGamesSolvedEasy, _local2.iNumGamesSolvedEasy);
iTotalTimeEasy = set(iTotalTimeEasy, _local2.iTotalTimeEasy);
iFastestTimeEasy = set(iFastestTimeEasy, _local2.iFastestTimeEasy);
iAverageTimeEasy = set(iAverageTimeEasy, _local2.iAverageTimeEasy);
iLastDayMedium = set(iLastDayMedium, _local2.iLastDayMedium);
iLastDayTimeMedium = set(iLastDayTimeMedium, _local2.iLastDayTimeMedium);
iNumGamesMedium = set(iNumGamesMedium, _local2.iNumGamesMedium);
iNumGamesSolvedMedium = set(iNumGamesSolvedMedium, _local2.iNumGamesSolvedMedium);
iTotalTimeMedium = set(iTotalTimeMedium, _local2.iTotalTimeMedium);
iFastestTimeMedium = set(iFastestTimeMedium, _local2.iFastestTimeMedium);
iAverageTimeMedium = set(iAverageTimeMedium, _local2.iAverageTimeMedium);
iLastDayHard = set(iLastDayHard, _local2.iLastDayHard);
iLastDayTimeHard = set(iLastDayTimeHard, _local2.iLastDayTimeHard);
iNumGamesHard = set(iNumGamesHard, _local2.iNumGamesHard);
iNumGamesSolvedHard = set(iNumGamesSolvedHard, _local2.iNumGamesSolvedHard);
iTotalTimeHard = set(iTotalTimeHard, _local2.iTotalTimeHard);
iFastestTimeHard = set(iFastestTimeHard, _local2.iFastestTimeHard);
iAverageTimeHard = set(iAverageTimeHard, _local2.iAverageTimeHard);
}
function save() {
var _local2 = SharedObject.getLocal("SudokuSettings").data;
_local2.sDifficulty = sDifficulty;
_local2.sTileType = sTileType;
_local2.bIngamehelp = bIngamehelp;
_local2.bBackgroundimage = bBackgroundimage;
_local2.bSoundandmusic = bSoundandmusic;
_local2.iLastDayEasy = iLastDayEasy;
_local2.iLastDayTimeEasy = iLastDayTimeEasy;
_local2.iNumGamesEasy = iNumGamesEasy;
_local2.iNumGamesSolvedEasy = iNumGamesSolvedEasy;
_local2.iTotalTimeEasy = iTotalTimeEasy;
_local2.iFastestTimeEasy = iFastestTimeEasy;
_local2.iAverageTimeEasy = iAverageTimeEasy;
_local2.iLastDayMedium = iLastDayMedium;
_local2.iLastDayTimeMedium = iLastDayTimeMedium;
_local2.iNumGamesMedium = iNumGamesMedium;
_local2.iNumGamesSolvedMedium = iNumGamesSolvedMedium;
_local2.iTotalTimeMedium = iTotalTimeMedium;
_local2.iFastestTimeMedium = iFastestTimeMedium;
_local2.iAverageTimeMedium = iAverageTimeMedium;
_local2.iLastDayHard = iLastDayHard;
_local2.iLastDayTimeHard = iLastDayTimeHard;
_local2.iNumGamesHard = iNumGamesHard;
_local2.iNumGamesSolvedHard = iNumGamesSolvedHard;
_local2.iTotalTimeHard = iTotalTimeHard;
_local2.iFastestTimeHard = iFastestTimeHard;
_local2.iAverageTimeHard = iAverageTimeHard;
}
var sDifficulty = "Easy";
var sTileType = "numbers";
var bIngamehelp = true;
var bBackgroundimage = true;
var bSoundandmusic = true;
var iLastDayEasy = -1;
var iLastDayTimeEasy = -1;
var iNumGamesEasy = 0;
var iNumGamesSolvedEasy = 0;
var iTotalTimeEasy = 0;
var iFastestTimeEasy = -1;
var iAverageTimeEasy = 0;
var iLastDayMedium = -1;
var iLastDayTimeMedium = -1;
var iNumGamesMedium = 0;
var iNumGamesSolvedMedium = 0;
var iTotalTimeMedium = 0;
var iFastestTimeMedium = -1;
var iAverageTimeMedium = 0;
var iLastDayHard = -1;
var iLastDayTimeHard = -1;
var iNumGamesHard = 0;
var iNumGamesSolvedHard = 0;
var iTotalTimeHard = 0;
var iFastestTimeHard = -1;
var iAverageTimeHard = 0;
}
Symbol 313 MovieClip [__Packages.com.miniclip.sudoku.Scenery] Frame 0
class com.miniclip.sudoku.Scenery
{
var mcRoot, aClouds;
function Scenery (mcRoot) {
this.mcRoot = mcRoot;
aClouds = new Array();
aClouds[0] = this.mcRoot.mcCloud1;
aClouds[1] = this.mcRoot.mcCloud2;
reset(aClouds[0]);
reset(aClouds[1]);
setInterval(this, "update", 20);
}
function show() {
mcRoot.mcBackground._visible = true;
mcRoot.mcBackgroundColor._visible = false;
var _local2 = 0;
while (_local2 < aClouds.length) {
aClouds[_local2]._visible = true;
_local2++;
}
bVisible = true;
}
function hide() {
mcRoot.mcBackground._visible = false;
mcRoot.mcBackgroundColor._visible = true;
var _local2 = 0;
while (_local2 < aClouds.length) {
aClouds[_local2]._visible = false;
_local2++;
}
bVisible = false;
}
function reset(mcCloud) {
mcCloud._x = ((-Math.random()) * 150) - 50;
mcCloud._y = Math.random() * 210;
mcCloud.velX = 0.2 + (Math.random() * 0.4);
}
function update() {
if (bVisible) {
var _local2 = 0;
while (_local2 < aClouds.length) {
aClouds[_local2]._x = aClouds[_local2]._x + aClouds[_local2].velX;
if (aClouds[_local2]._x > (Stage.width + 100)) {
reset(aClouds[_local2]);
}
_local2++;
}
}
}
var bVisible = true;
}
Symbol 314 MovieClip [__Packages.com.miniclip.dialog.Dialog] Frame 0
class com.miniclip.dialog.Dialog
{
var mcRoot, oParent, mcDialog;
function Dialog (mcRoot, oParent, vPreDefinedDialog) {
init(mcRoot, oParent, vPreDefinedDialog);
}
function init(mcRoot, oParent, vPreDefinedDialog) {
this.mcRoot = mcRoot;
this.oParent = oParent;
if (vPreDefinedDialog == undefined) {
mcDialog = this.mcRoot.attachMovie("mcDialog", "mcDialog" + this.mcRoot.getNextHighestDepth(), this.mcRoot.getNextHighestDepth());
} else if (typeof(vPreDefinedDialog) == "string") {
mcDialog = this.mcRoot.attachMovie(vPreDefinedDialog, "mcDialog" + this.mcRoot.getNextHighestDepth(), this.mcRoot.getNextHighestDepth());
} else if (typeof(vPreDefinedDialog) == "movieclip") {
mcDialog = vPreDefinedDialog;
}
mcDialog.dialog = this;
hide();
}
function getMc() {
return(mcDialog);
}
function setSize(iWidth, iHeight) {
mcDialog._width = iWidth;
mcDialog._height = iHeight;
}
function setPosition(iX, iY) {
mcDialog._x = iX;
mcDialog._y = iY;
}
function center() {
setPosition((Stage.width / 2) - mcDialog._width, (Stage.height / 2) - mcDialog._height);
}
function show() {
mcDialog._visible = true;
onOpen(oParent);
}
function hide() {
mcDialog._visible = false;
}
function open() {
show();
onOpen(oParent);
}
function close() {
hide();
onClose(oParent);
}
function onOpen(oParent) {
}
function onClose(oParent) {
}
var bIsPreDefined = false;
}
Symbol 315 MovieClip [__Packages.com.miniclip.dialog.DialogOptions] Frame 0
class com.miniclip.dialog.DialogOptions extends com.miniclip.dialog.Dialog
{
var init, getMc, oParent;
function DialogOptions (mcRoot, oParent) {
super();
init(mcRoot, oParent, "mcOptions");
updateAll();
}
function formatSeconds(iSeconds) {
if (iSeconds != -1) {
var _local2 = Math.floor(iSeconds / 60);
iSeconds = iSeconds - (_local2 * 60);
var _local3 = ((iSeconds < 10) ? ("0" + iSeconds) : (iSeconds));
return(((_local2 > 0) ? ((_local2 + ":") + _local3) : (iSeconds)));
}
return("0");
}
function onOpen(oParent) {
oParent.settings.load();
var _local4 = getMc().mcOptionsSettings;
_local4.gotoAndStop(oParent.settings.sTileType);
_local4.mcIngamehelp.gotoAndStop((oParent.settings.bIngamehelp ? "on" : "off"));
_local4.mcBackgroundimage.gotoAndStop((oParent.settings.bBackgroundimage ? "on" : "off"));
_local4.mcSoundandmusic.gotoAndStop((oParent.settings.bSoundandmusic ? "on" : "off"));
_local4 = getMc().mcOptionsStats;
_local4.iNumGamesEasy.text = oParent.settings.iNumGamesEasy;
_local4.iNumGamesSolvedEasy.text = oParent.settings.iNumGamesSolvedEasy;
if (oParent.settings.iFastestTimeEasy != -1) {
_local4.iFastestTimeEasy.text = formatSeconds(oParent.settings.iFastestTimeEasy);
}
_local4.iAverageTimeEasy.text = formatSeconds(Math.round(oParent.settings.iAverageTimeEasy));
_local4.iNumGamesMedium.text = oParent.settings.iNumGamesMedium;
_local4.iNumGamesSolvedMedium.text = oParent.settings.iNumGamesSolvedMedium;
if (oParent.settings.iFastestTimeEasy != -1) {
_local4.iFastestTimeMedium.text = formatSeconds(oParent.settings.iFastestTimeMedium);
}
_local4.iAverageTimeMedium.text = formatSeconds(Math.round(oParent.settings.iAverageTimeMedium));
_local4.iNumGamesHard.text = oParent.settings.iNumGamesHard;
_local4.iNumGamesSolvedHard.text = oParent.settings.iNumGamesSolvedHard;
if (oParent.settings.iFastestTimeEasy != -1) {
_local4.iFastestTimeHard.text = formatSeconds(oParent.settings.iFastestTimeHard);
}
_local4.iAverageTimeHard.text = formatSeconds(Math.round(oParent.settings.iAverageTimeHard));
getMc().butt_return._visible = _root._currentframe > 44;
updateAll();
this.oParent.timer.pause();
}
function onClose(oParent) {
var _local2 = getMc().mcOptionsSettings;
oParent.settings.sTileType = _local2.tiletype;
oParent.settings.bIngamehelp = _local2.mcIngamehelp.frameLabel == "on";
oParent.settings.bBackgroundimage = _local2.mcBackgroundimage.frameLabel == "on";
oParent.settings.bSoundandmusic = _local2.mcSoundandmusic.frameLabel == "on";
oParent.settings.save();
updateAll();
this.oParent.timer.unpause();
}
function updateAll() {
if (oParent.settings.bBackgroundimage) {
oParent.scenery.show();
} else {
oParent.scenery.hide();
}
if (oParent.settings.bSoundandmusic) {
oParent.soundPlayer.enable();
} else {
oParent.soundPlayer.disable();
}
oParent.updateTileTypes();
}
}
Symbol 316 MovieClip [__Packages.com.miniclip.dialog.DialogReset] Frame 0
class com.miniclip.dialog.DialogReset extends com.miniclip.dialog.Dialog
{
var init, oParent, close;
function DialogReset (mcRoot, oParent) {
super();
init(mcRoot, oParent, "mcDialogReset");
}
function onOpen(oParent) {
this.oParent.timer.pause();
}
function onClose(oParent) {
this.oParent.timer.unpause();
}
function choseNo() {
close();
}
function choseYes() {
close();
_root.sudoku.clear();
_root.sudoku.newGame();
}
}
Symbol 317 MovieClip [__Packages.com.miniclip.sudoku.SoundPlayer] Frame 0
class com.miniclip.sudoku.SoundPlayer
{
var mcRoot, oParent, mcSounds, soundOnSymbolPlaced, soundOnSymbolRemoved, soundOnSymbolError, soundOnSymbolReadonly, mcSoundsAmbient, soundAmbient;
function SoundPlayer (mcRoot, oParent) {
this.mcRoot = mcRoot;
this.oParent = oParent;
mcSounds = this.mcRoot.createEmptyMovieClip("sounds", this.mcRoot.getNextHighestDepth());
soundOnSymbolPlaced = new Sound(mcSounds);
soundOnSymbolPlaced.attachSound("soundOnSymbolPlaced");
soundOnSymbolRemoved = new Sound(mcSounds);
soundOnSymbolRemoved.attachSound("soundOnSymbolRemoved");
soundOnSymbolError = new Sound(mcSounds);
soundOnSymbolError.attachSound("soundOnSymbolError");
soundOnSymbolReadonly = new Sound(mcSounds);
soundOnSymbolReadonly.attachSound("soundOnSymbolReadonly");
mcSoundsAmbient = this.mcRoot.createEmptyMovieClip("soundsAmbient", this.mcRoot.getNextHighestDepth());
soundAmbient = new Sound(mcSoundsAmbient);
soundAmbient.attachSound("soundAmbient");
soundAmbient.start(0, 999999);
enable();
}
function enable() {
bEnabled = true;
soundAmbient.setVolume(30);
soundOnSymbolError.setVolume(8);
soundOnSymbolPlaced.setVolume(25);
soundOnSymbolRemoved.setVolume(25);
soundOnSymbolReadonly.setVolume(25);
oParent.mcRoot.mcSound.gotoAndStop("on");
}
function disable() {
bEnabled = false;
soundAmbient.setVolume(0);
soundOnSymbolError.setVolume(0);
soundOnSymbolPlaced.setVolume(0);
soundOnSymbolReadonly.setVolume(0);
oParent.mcRoot.mcSound.gotoAndStop("off");
}
var bEnabled = true;
}
Symbol 318 MovieClip [__Packages.com.miniclip.sudoku.Tile] Frame 0
class com.miniclip.sudoku.Tile
{
var mcRoot, oParent, iX, iY, mcTile, iWidth, iHeight, aSymbolsPossible, symbol;
function Tile (mcRoot, oParent, iX, iY, sTileType) {
this.mcRoot = mcRoot;
this.oParent = oParent;
this.iX = iX;
this.iY = iY;
this.sTileType = sTileType;
mcTile = this.mcRoot.attachMovie("mcTile", (("mcTile" + this.iX) + "-") + this.iY, this.mcRoot.getNextHighestDepth());
mcTile.oParent = this;
iWidth = mcTile._width;
iHeight = mcTile._height;
aSymbolsPossible = new Array();
symbol = new com.miniclip.sudoku.Symbol(mcTile, this.sTileType);
update();
}
function setTileType(sTileType) {
if (this.sTileType != sTileType) {
this.sTileType = sTileType;
symbol.setTileType(this.sTileType);
var _local2 = 0;
while (_local2 < aSymbolsPossible.length) {
aSymbolsPossible[_local2].setTileType(this.sTileType);
_local2++;
}
}
}
function remove() {
mcTile.removeMovieClip();
var _local2 = 0;
while (_local2 < aSymbolsPossible.length) {
aSymbolsPossible[_local2].remove();
_local2++;
}
}
function setSymbol(iSymbol) {
symbol.setSymbol(iSymbol);
update();
}
function getSymbol() {
return(symbol.getSymbol());
}
function switchSymbolPossible(iSymbol) {
var _local2 = 0;
while (_local2 < aSymbolsPossible.length) {
if (aSymbolsPossible[_local2].getSymbol() == iSymbol) {
removeSymbolPossible(iSymbol);
sortSymbolsPossible();
return(undefined);
}
_local2++;
}
addSymbolPossible(iSymbol);
sortSymbolsPossible();
}
function addSymbolPossible(iSymbol) {
var _local2 = 0;
while (_local2 < aSymbolsPossible.length) {
if (aSymbolsPossible[_local2].getSymbol() == iSymbol) {
return(false);
}
_local2++;
}
aSymbolsPossible[_local2] = new com.miniclip.sudoku.Symbol(mcTile, sTileType + "Stop");
aSymbolsPossible[_local2].setSymbol(iSymbol);
update();
}
function removeSymbolPossible(iSymbol) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < aSymbolsPossible.length) {
if (aSymbolsPossible[_local2].getSymbol() == iSymbol) {
aSymbolsPossible[_local2].remove();
} else {
_local3[_local3.length] = aSymbolsPossible[_local2];
}
_local2++;
}
aSymbolsPossible = new Array();
_local2 = 0;
while (_local2 < _local3.length) {
aSymbolsPossible[_local2] = _local3[_local2];
_local2++;
}
update();
}
function removeSymbolsPossible() {
var _local2 = 0;
while (_local2 < aSymbolsPossible.length) {
aSymbolsPossible[_local2].remove();
_local2++;
}
aSymbolsPossible = new Array();
update();
}
function sortSymbolsPossible() {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < aSymbolsPossible.length) {
_local3[aSymbolsPossible[_local2].getSymbol()] = aSymbolsPossible[_local2];
_local2++;
}
aSymbolsPossible = new Array();
_local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2] != undefined) {
aSymbolsPossible[aSymbolsPossible.length] = _local3[_local2];
}
_local2++;
}
update();
}
function setReadonly(bReadonly) {
this.bReadonly = bReadonly;
update();
}
function getReadonly() {
return(bReadonly);
}
function setError(bError) {
mcTile.mcTileError.gotoAndPlay((bError ? "true" : "false"));
}
function update() {
mcTile._x = iX * (iWidth + 3);
mcTile._y = iY * (iHeight + 3);
symbol.getMc()._x = iWidth / 2;
symbol.getMc()._y = iHeight / 2;
if (bReadonly) {
symbol.getMc()._alpha = 100;
} else {
var _local3 = 0;
while (_local3 < aSymbolsPossible.length) {
var _local2 = com.miniclip.sudoku.Symbol(aSymbolsPossible[_local3]);
_local2.getMc()._width = iWidth / 3;
_local2.getMc()._height = iHeight / 3;
_local2.getMc()._x = 6 + ((_local3 % 3) * 8);
_local2.getMc()._y = 5 + (Math.floor(_local3 / 3) * 10);
_local2.getMc()._alpha = 50;
_local3++;
}
symbol.getMc()._alpha = 50;
}
}
function onPress() {
oParent.onTilePress(iY, iX);
}
var sTileType = "number";
var bReadonly = true;
var bSelected = false;
}
Symbol 319 MovieClip [__Packages.com.miniclip.sudoku.Symbol] Frame 0
class com.miniclip.sudoku.Symbol
{
var mcRoot, sTileType, mcSymbol;
function Symbol (mcRoot, sTileType) {
this.mcRoot = mcRoot;
this.sTileType = sTileType;
}
function setSymbol(iSymbol) {
this.iSymbol = iSymbol;
mcSymbol.removeMovieClip();
if (iSymbol > 0) {
mcSymbol = mcRoot.attachMovie("mcSymbol" + this.iSymbol, "mcSymbol" + mcRoot.getNextHighestDepth(), mcRoot.getNextHighestDepth());
setTileType(sTileType);
}
}
function setTileType(sTileType) {
this.sTileType = sTileType;
mcSymbol.gotoAndPlay(this.sTileType);
}
function remove() {
mcSymbol.removeMovieClip();
}
function getMc() {
return(mcSymbol);
}
function getSymbol() {
return(iSymbol);
}
var iSymbol = -1;
}
Symbol 320 MovieClip [__Packages.com.miniclip.sudoku.TileMenu] Frame 0
class com.miniclip.sudoku.TileMenu extends com.miniclip.sudoku.Tile
{
var mcTile, symbol, oParent, iX;
function TileMenu (mcRoot, oParent, iX, sTileType) {
super(mcRoot, oParent, iX, 0, sTileType);
}
function update() {
super.update();
mcTile._y = 320;
symbol.getMc()._alpha = 100;
}
function onPress() {
oParent.onTileMenuPress(iX);
}
function setSymbol(number) {
super.setSymbol(number);
}
}
Symbol 321 MovieClip [__Packages.com.miniclip.sudoku.Intro] Frame 0
class com.miniclip.sudoku.Intro
{
var mcRoot, aTiles, bDone, iFrame;
function Intro (mcRoot) {
this.mcRoot = mcRoot;
aTiles = new Array();
reset();
}
function reset() {
bDone = false;
iFrame = 0;
var _local6 = 9;
var _local4 = 0;
while (_local4 < aTiles.length) {
var _local3 = 0;
while (_local3 < aTiles[_local4].length) {
aTiles[_local4][_local3].removeMovieClip();
_local3++;
}
_local4++;
}
aTiles = new Array();
_local4 = 0;
while (_local4 < _local6) {
aTiles[_local4] = new Array();
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (aTiles[_local4][_local3] = mcRoot.attachMovie("mcTile", "mcTile" + mcRoot.getNextHighestDepth(), mcRoot.getNextHighestDepth() + 200));
_local2.mcTileError._visible = false;
var _local5 = ((Math.floor(_local4 / 3) % 2) ? 0 : 1);
if ((Math.floor(_local3 / 3) % 2) == _local5) {
_local2.mcTileBackground.gotoAndStop(1);
} else {
_local2.mcTileBackground.gotoAndStop(2);
}
_local2._x = Math.random() * Stage.width;
_local2._y = Math.random() * Stage.height;
_local2._xscale = 0;
_local2._yscale = 0;
_local2.destX = 233 + (_local3 * 33);
_local2.destY = 23 + (_local4 * 33);
_local3++;
}
_local4++;
}
}
function remove() {
var _local3 = 0;
while (_local3 < aTiles.length) {
var _local2 = 0;
while (_local2 < aTiles[_local3].length) {
aTiles[_local3][_local2].removeMovieClip();
_local2++;
}
_local3++;
}
}
function update() {
var _local4 = 0;
while (_local4 < aTiles.length) {
var _local3 = 0;
while (_local3 < aTiles[_local4].length) {
var _local2 = MovieClip(aTiles[_local4][_local3]);
_local2._x = _local2._x + ((_local2.destX - _local2._x) / 5);
_local2._y = _local2._y + ((_local2.destY - _local2._y) / 5);
_local2._xscale = _local2._xscale + ((100 - _local2._xscale) / 5);
_local2._yscale = _local2._yscale + ((100 - _local2._yscale) / 5);
_local3++;
}
_local4++;
}
mcRoot.mcBoundingBox._alpha = iFrame * 3.44827586206897;
if ((++iFrame) == 30) {
bDone = true;
}
}
}
Symbol 322 MovieClip [__Packages.com.miniclip.sudoku.Win] Frame 0
class com.miniclip.sudoku.Win
{
var aTiles, aTilesMenu, iAnimation;
function Win (aTiles, aTilesMenu) {
this.aTiles = aTiles;
this.aTilesMenu = aTilesMenu;
iAnimation = Math.round(Math.random());
var _local3 = 0;
while (_local3 < this.aTilesMenu.length) {
this.aTilesMenu[_local3].mcTile.velXscale = _local3 + 1;
_local3++;
}
var _local4 = 0;
while (_local4 < this.aTiles.length) {
_local3 = 0;
while (_local3 < this.aTiles[_local4].length) {
var _local2 = this.aTiles[_local4][_local3];
if (iAnimation == 0) {
_local2.mcTile.velY = (-Math.random()) * 3;
_local2.mcTile.velX = (Math.random() * 8) - 4;
_local2.mcTile.velRotation = (Math.random() * 20) - 10;
_local2.mcTile.velXscale = (Math.random() * 20) + 1;
_local2.mcTile.velYscale = (Math.random() * 20) + 1;
} else {
_local2.mcTile.velY = (-Math.random()) * 14;
_local2.mcTile.velX = (Math.random() * 12) - 6;
_local2.mcTile.velRotation = (Math.random() * 20) - 10;
_local2.mcTile.velXscale = (Math.random() * 20) + 1;
_local2.mcTile.velYscale = (Math.random() * 20) + 1;
}
_local3++;
}
_local4++;
}
}
function update() {
var _local3 = 0;
while (_local3 < aTilesMenu.length) {
aTilesMenu[_local3].mcTile._xscale = aTilesMenu[_local3].mcTile._xscale + ((-aTilesMenu[_local3].mcTile._xscale) / aTilesMenu[_local3].mcTile.velXscale);
_local3++;
}
var _local4 = 0;
while (_local4 < aTiles.length) {
_local3 = 0;
while (_local3 < aTiles[_local4].length) {
var _local2 = aTiles[_local4][_local3];
if (iAnimation == 0) {
_local2.mcTile.velY = _local2.mcTile.velY - 0.1;
_local2.mcTile.velX = _local2.mcTile.velX * 0.96;
_local2.mcTile._x = _local2.mcTile._x + _local2.mcTile.velX;
_local2.mcTile._y = _local2.mcTile._y + _local2.mcTile.velY;
_local2.mcTile._xscale = _local2.mcTile._xscale + ((10 - _local2.mcTile._xscale) / _local2.mcTile.velXscale);
_local2.mcTile._yscale = _local2.mcTile._yscale + ((10 - _local2.mcTile._yscale) / _local2.mcTile.velYscale);
_local2.mcTile._rotation = _local2.mcTile._rotation + _local2.mcTile.velRotation;
} else {
_local2.mcTile.velY = _local2.mcTile.velY + 0.6;
_local2.mcTile.velX = _local2.mcTile.velX * 0.98;
_local2.mcTile._x = _local2.mcTile._x + _local2.mcTile.velX;
_local2.mcTile._y = _local2.mcTile._y + _local2.mcTile.velY;
_local2.mcTile._xscale = _local2.mcTile._xscale + ((10 - _local2.mcTile._xscale) / _local2.mcTile.velXscale);
_local2.mcTile._yscale = _local2.mcTile._yscale + ((10 - _local2.mcTile._yscale) / _local2.mcTile.velYscale);
_local2.mcTile._rotation = _local2.mcTile._rotation + _local2.mcTile.velRotation;
}
_local3++;
}
_local4++;
}
}
}
Symbol 108 Button
on (release) {
_root.sudoku.soundSwitch();
}
Symbol 110 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 10
stop();
Symbol 120 Button
on (release) {
_root.sudoku.pause();
}
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut, dragOut) {
gotoAndPlay ("out");
}
Symbol 121 MovieClip Frame 1
stop();
Symbol 121 MovieClip Frame 15
stop();
Symbol 121 MovieClip Frame 25
gotoAndStop ("normal");
Symbol 124 Button
on (release) {
_root.sudoku.print();
}
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut, dragOut) {
gotoAndPlay ("out");
}
Symbol 125 MovieClip Frame 1
stop();
Symbol 125 MovieClip Frame 15
stop();
Symbol 125 MovieClip Frame 25
gotoAndStop ("normal");
Symbol 128 Button
on (release) {
_root.sudoku.resetOpen();
}
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut, dragOut) {
gotoAndPlay ("out");
}
Symbol 129 MovieClip Frame 1
stop();
Symbol 129 MovieClip Frame 15
stop();
Symbol 129 MovieClip Frame 25
gotoAndStop ("normal");
Symbol 137 Button
on (press) {
_root.sudoku.unpause();
}
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut) {
gotoAndPlay ("out");
}
Symbol 138 MovieClip Frame 1
stop();
Symbol 138 MovieClip Frame 15
stop();
Symbol 138 MovieClip Frame 25
gotoAndStop ("normal");
Symbol 140 MovieClip [mcPause] Frame 1
options_background_black.useHandCursor = false;
Symbol 140 MovieClip [mcPause] Frame 12
stop();
Symbol 140 MovieClip [mcPause] Frame 32
this.removeMovieClip();
Symbol 143 Button
on (release) {
this._parent.dialog.close();
}
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut, dragOut) {
gotoAndPlay ("out");
}
Symbol 144 MovieClip Frame 1
stop();
Symbol 144 MovieClip Frame 15
stop();
Symbol 144 MovieClip Frame 25
gotoAndStop ("normal");
Symbol 171 Button
on (release) {
gotoAndStop ("letters");
}
Symbol 186 Button
on (release) {
gotoAndStop ("off");
}
Symbol 187 Button
on (release) {
gotoAndStop ("on");
}
Symbol 188 MovieClip Frame 1
stop();
stop();
frameLabel = "on";
Symbol 188 MovieClip Frame 10
stop();
frameLabel = "off";
Symbol 193 Button
on (release) {
gotoAndStop ("numbers");
}
Symbol 194 MovieClip Frame 1
var tiletype = "numbers";
stop();
Symbol 194 MovieClip Frame 10
var tiletype = "letters";
stop();
Symbol 199 Button
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (press) {
_parent.nextLabel = targetLabel;
_parent.play();
}
Symbol 201 MovieClip Frame 1
stop();
Symbol 201 MovieClip Frame 15
stop();
Symbol 201 MovieClip Frame 25
gotoAndStop ("normal");
Symbol 205 Button
on (press) {
this._parent.dialog.close();
_root.sudoku.clear();
_root.mcHud.gotoAndPlay("menu");
}
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut, dragOut) {
gotoAndPlay ("out");
}
Symbol 206 MovieClip Frame 1
stop();
Symbol 206 MovieClip Frame 15
stop();
Symbol 206 MovieClip Frame 25
gotoAndStop ("normal");
Symbol 208 Button
on (press) {
this._parent.dialog.close();
}
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut, dragOut) {
gotoAndPlay ("out");
}
Symbol 209 MovieClip Frame 1
stop();
Symbol 209 MovieClip Frame 15
stop();
Symbol 209 MovieClip Frame 25
gotoAndStop ("normal");
Symbol 215 MovieClip [mcOptions] Frame 1
options_background_black.useHandCursor = false;
Instance of Symbol 197 MovieClip in Symbol 215 MovieClip [mcOptions] Frame 1
onClipEvent (load) {
tablabel = "OPTIONS";
}
Instance of Symbol 201 MovieClip in Symbol 215 MovieClip [mcOptions] Frame 1
onClipEvent (load) {
buttText = "STATS";
targetLabel = "stats";
}
Instance of Symbol 201 MovieClip in Symbol 215 MovieClip [mcOptions] Frame 1
onClipEvent (load) {
buttText = "HELP";
targetLabel = "help";
}
Symbol 215 MovieClip [mcOptions] Frame 6
stop();
Symbol 215 MovieClip [mcOptions] Frame 12
gotoAndPlay(nextLabel);
Instance of Symbol 201 MovieClip in Symbol 215 MovieClip [mcOptions] Frame 16
onClipEvent (load) {
buttText = "OPTIONS";
targetLabel = "options";
}
Instance of Symbol 197 MovieClip in Symbol 215 MovieClip [mcOptions] Frame 16
onClipEvent (load) {
tablabel = "HELP";
}
Symbol 215 MovieClip [mcOptions] Frame 21
stop();
Symbol 215 MovieClip [mcOptions] Frame 27
gotoAndPlay(nextLabel);
Instance of Symbol 197 MovieClip in Symbol 215 MovieClip [mcOptions] Frame 31
onClipEvent (load) {
tablabel = "STATS";
}
Instance of Symbol 201 MovieClip in Symbol 215 MovieClip [mcOptions] Frame 31
onClipEvent (load) {
buttText = "HELP";
targetLabel = "help";
}
Symbol 215 MovieClip [mcOptions] Frame 36
stop();
Symbol 215 MovieClip [mcOptions] Frame 42
gotoAndPlay(nextLabel);
Symbol 222 Button
on (release) {
this._parent.dialog.choseYes();
}
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut, dragOut) {
gotoAndPlay ("out");
}
Symbol 223 MovieClip Frame 1
stop();
Symbol 223 MovieClip Frame 15
stop();
Symbol 223 MovieClip Frame 25
gotoAndStop ("normal");
Symbol 226 Button
on (release) {
this._parent.dialog.choseNo();
}
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut, dragOut) {
gotoAndPlay ("out");
}
Symbol 227 MovieClip Frame 1
stop();
Symbol 227 MovieClip Frame 15
stop();
Symbol 227 MovieClip Frame 25
gotoAndStop ("normal");
Symbol 236 MovieClip [mcPrintHud] Frame 11
stop();
Symbol 239 Button
on (release) {
_root.sudoku.stopPrint();
}
Symbol 246 MovieClip Frame 1
stop();
Symbol 256 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 260 MovieClip Frame 20
stop();
Symbol 260 MovieClip Frame 50
stop();
Symbol 260 MovieClip Frame 73
stop();
Symbol 264 MovieClip Frame 1
stop();
Symbol 264 MovieClip Frame 6
show();
Symbol 264 MovieClip Frame 18
stop();
Symbol 267 MovieClip Frame 1
stop();
Symbol 267 MovieClip Frame 17
stop();
Symbol 275 MovieClip Frame 1
stop();
Symbol 275 MovieClip Frame 2
stop();
Symbol 275 MovieClip Frame 3
stop();
Symbol 276 MovieClip Frame 9
stop();
Symbol 276 MovieClip Frame 102
stop();
Symbol 279 Button
on (release) {
_root.sudoku.helpOpen();
}
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut, dragOut) {
gotoAndPlay ("out");
}
Symbol 280 MovieClip Frame 1
stop();
Symbol 280 MovieClip Frame 15
stop();
Symbol 280 MovieClip Frame 25
gotoAndStop ("normal");
Symbol 285 Button
on (release) {
_root.sudoku.optionsOpen();
}
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut, dragOut) {
gotoAndPlay ("out");
}
Symbol 286 MovieClip Frame 1
stop();
Symbol 286 MovieClip Frame 15
stop();
Symbol 286 MovieClip Frame 25
gotoAndStop ("normal");
Symbol 286 MovieClip Frame 30
stop();
Symbol 289 Button
on (release) {
_root.sudoku.statsOpen();
}
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut, dragOut) {
gotoAndPlay ("out");
}
Symbol 290 MovieClip Frame 1
stop();
Symbol 290 MovieClip Frame 15
stop();
Symbol 290 MovieClip Frame 25
gotoAndStop ("normal");
Symbol 290 MovieClip Frame 30
stop();
Symbol 293 Button
on (release) {
_parent.gotoAndPlay("difficulty");
}
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut, dragOut) {
gotoAndPlay ("out");
}
Symbol 294 MovieClip Frame 1
stop();
Symbol 294 MovieClip Frame 15
stop();
Symbol 294 MovieClip Frame 25
gotoAndStop ("normal");
Symbol 294 MovieClip Frame 30
stop();
Symbol 299 Button
on (release) {
_root.sudoku.setDifficulty("Hard");
_root.gotoAndPlay("menu_out");
}
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut, dragOut) {
gotoAndPlay ("out");
}
Symbol 300 MovieClip Frame 1
stop();
Symbol 300 MovieClip Frame 15
stop();
Symbol 300 MovieClip Frame 25
gotoAndStop ("normal");
Symbol 300 MovieClip Frame 30
stop();
Symbol 303 Button
on (release) {
_root.sudoku.setDifficulty("Medium");
_root.gotoAndPlay("menu_out");
}
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut, dragOut) {
gotoAndPlay ("out");
}
Symbol 304 MovieClip Frame 1
stop();
Symbol 304 MovieClip Frame 15
stop();
Symbol 304 MovieClip Frame 25
gotoAndStop ("normal");
Symbol 304 MovieClip Frame 30
stop();
Symbol 306 Button
on (release) {
_root.sudoku.setDifficulty("Easy");
_root.gotoAndPlay("menu_out");
}
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut, dragOut) {
gotoAndPlay ("out");
}
Symbol 307 MovieClip Frame 1
stop();
Symbol 307 MovieClip Frame 15
stop();
Symbol 307 MovieClip Frame 25
gotoAndStop ("normal");
Symbol 307 MovieClip Frame 30
stop();
Symbol 308 MovieClip Frame 24
stop();
Symbol 308 MovieClip Frame 54
stop();
Symbol 308 MovieClip Frame 79
stop();