Symbol 20 MovieClip [BlinkAnim] Frame 1
#initclip 41
Object.registerClass("BlinkAnim", com.midasplayer.sudoku.BlinkAnim);
#endinitclip
Symbol 20 MovieClip [BlinkAnim] Frame 27
gotoAndStop (1);
Symbol 22 MovieClip [Digit_Eight] Frame 1
#initclip 28
Object.registerClass("Digit_Eight", com.midasplayer.sudoku.Digit_Eight);
#endinitclip
stop();
Symbol 25 MovieClip [Digit_Six] Frame 1
#initclip 29
Object.registerClass("Digit_Six", com.midasplayer.sudoku.Digit_Six);
#endinitclip
stop();
Symbol 38 MovieClip [Note] Frame 1
#initclip 30
Object.registerClass("Note", com.midasplayer.sudoku.Note);
#endinitclip
Symbol 60 MovieClip [GridSquare] Frame 1
#initclip 31
Object.registerClass("GridSquare", com.midasplayer.sudoku.GridSquare);
#endinitclip
Symbol 81 MovieClip [NoteNumbers] Frame 1
#initclip 32
Object.registerClass("NoteNumbers", com.midasplayer.sudoku.NoteNumbers);
#endinitclip
Symbol 82 MovieClip [Numbers] Frame 1
#initclip 33
Object.registerClass("Numbers", com.midasplayer.sudoku.Numbers);
#endinitclip
Symbol 95 MovieClip Frame 1
play();
Symbol 95 MovieClip Frame 50
play();
Symbol 95 MovieClip Frame 466
gotoAndPlay ("loop");
Symbol 98 MovieClip Frame 1
stop();
Symbol 98 MovieClip Frame 5
stop();
Symbol 102 MovieClip Frame 1
stop();
Symbol 102 MovieClip Frame 2
play();
Symbol 102 MovieClip Frame 22
gotoAndPlay ("anim");
Symbol 110 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 2
play();
Symbol 110 MovieClip Frame 16
gotoAndPlay ("anim");
Symbol 113 MovieClip Frame 1
stop();
Symbol 113 MovieClip Frame 2
play();
Symbol 113 MovieClip Frame 19
gotoAndPlay ("anim");
Symbol 125 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 2
stop();
Symbol 141 MovieClip Frame 1
play();
Symbol 141 MovieClip Frame 50
gotoAndPlay (1);
Symbol 141 MovieClip Frame 51
play();
Symbol 141 MovieClip Frame 64
stop();
Symbol 142 MovieClip [InfoPanel] Frame 1
#initclip 34
Object.registerClass("InfoPanel", com.midasplayer.sudoku.InfoPanel);
#endinitclip
Symbol 144 MovieClip [NotePad] Frame 1
#initclip 35
Object.registerClass("NotePad", com.midasplayer.sudoku.NotePad);
#endinitclip
Symbol 146 MovieClip [NumberPad] Frame 1
#initclip 36
Object.registerClass("NumberPad", com.midasplayer.sudoku.NumberPad);
#endinitclip
Symbol 147 MovieClip [BackGround] Frame 1
#initclip 37
Object.registerClass("BackGround", com.midasplayer.sudoku.BackGround);
#endinitclip
Symbol 150 MovieClip Frame 1
stop();
Symbol 150 MovieClip Frame 10
stop();
Symbol 150 MovieClip Frame 20
stop();
Symbol 151 MovieClip [Board] Frame 1
#initclip 38
Object.registerClass("Board", com.midasplayer.sudoku.Board);
#endinitclip
Symbol 155 MovieClip [Frames] Frame 1
#initclip 39
Object.registerClass("Frames", com.midasplayer.sudoku.Frames);
#endinitclip
Symbol 160 MovieClip Frame 1
stop();
Symbol 160 MovieClip Frame 5
stop();
Symbol 163 MovieClip Frame 1
stop();
Symbol 165 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 1
stop();
Symbol 168 MovieClip Frame 1
stop();
Symbol 189 MovieClip Frame 1
stop();
Symbol 189 MovieClip Frame 5
stop();
Symbol 195 MovieClip [SudukoMain] Frame 1
#initclip 40
Object.registerClass("SudukoMain", com.midasplayer.sudoku.SudukoMain);
#endinitclip
Symbol 196 MovieClip [__Packages.com.midasplayer.sudoku.Digit_Eight] Frame 0
class com.midasplayer.sudoku.Digit_Eight extends MovieClip
{
var _y, _x, gotoAndPlay;
function Digit_Eight () {
super();
_y = 240;
_x = 200;
}
function onEnterFrame() {
i++;
if ((i > 100) && (moving == true)) {
moving = false;
}
if (moving == false) {
var _local2 = Math.random();
if (_local2 > 0.99) {
_x = Math.floor((Math.random() * 251) + 100);
(gotoAndPlay(2));// not popped
i = 0;
moving = true;
}
}
}
var moving = false;
var i = 0;
}
Symbol 197 MovieClip [__Packages.com.midasplayer.sudoku.Digit_Six] Frame 0
class com.midasplayer.sudoku.Digit_Six extends MovieClip
{
var _y, _x, gotoAndPlay;
function Digit_Six () {
super();
_y = 200;
_x = 240;
}
function onEnterFrame() {
i++;
if ((i > 100) && (moving == true)) {
moving = false;
}
if (moving == false) {
var _local2 = Math.random();
if (_local2 > 0.99) {
_y = Math.floor((Math.random() * 276) + 75);
(gotoAndPlay(2));// not popped
i = 0;
moving = true;
}
}
}
var moving = false;
var i = 0;
}
Symbol 198 MovieClip [__Packages.com.midasplayer.sudoku.Note] Frame 0
class com.midasplayer.sudoku.Note extends MovieClip
{
var onDragOut, onDragOver, _parent, rootMc;
function Note () {
super();
onDragOut = mx.utils.Delegate.create(this, onRollOut);
onDragOver = mx.utils.Delegate.create(this, onRollOver);
}
function pri() {
trace("PRINT");
}
function onRollOver() {
_parent.showNewNoteSquare();
}
function onRollOut() {
_parent.hideNewNoteSquare();
}
function onPress() {
rootMc.clickNoteSquare(this, _parent);
}
}
Symbol 199 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 200 MovieClip [__Packages.com.midasplayer.sudoku.GridSquare] Frame 0
class com.midasplayer.sudoku.GridSquare extends MovieClip
{
var mcGridSquare_Button, activeChild, mcNote1, mcNote2, mcNote3, mcNote4, mcNote5, mcNote6, mcNote7, mcNote8, rootMc, x, y, visibleAtStart, val, gotoAndStop, mcMarked, _y, _x;
function GridSquare () {
super();
mcGridSquare_Button.onPress = function () {
if (this._parent.visibleAtStart != 1) {
this._parent.rootMc.clickGridSquare(this._parent);
}
};
mcGridSquare_Button.onRollOver = function () {
this._parent.showNewNoteSquare();
};
mcGridSquare_Button.onRollOut = function () {
this._parent.hideNewNoteSquare();
};
mcGridSquare_Button.onDragOver = function () {
this._parent.showNewNoteSquare();
};
mcGridSquare_Button.onDragOut = function () {
this._parent.hideNewNoteSquare();
};
}
function init(rootMc, x, y, shown, gameGridValue, correctValue, savedNum, savedNotes) {
activeChild = 0;
noteArr = new Array(mcNote1, mcNote2, mcNote3, mcNote4, mcNote5, mcNote6, mcNote7, mcNote8);
this.rootMc = rootMc;
this.x = x;
this.y = y;
visibleAtStart = shown;
var _local2 = 0;
while (_local2 < noteArr.length) {
noteArr[_local2].rootMc = rootMc;
noteArr[_local2].gotoAndStop(10);
noteArr[_local2].val = 10;
noteArr[_local2]._visible = false;
_local2++;
}
if (visibleAtStart == 1) {
gameGridValue[y][x] = correctValue;
val = correctValue;
(gotoAndStop(correctValue));// not popped
mcMarked.gotoAndStop(correctValue);
mcMarked._alpha = 100;
mcGridSquare_Button.useHandCursor = false;
} else if (savedNum != 0) {
(gotoAndStop(savedNum));// not popped
mcMarked._alpha = 0;
val = savedNum;
gameGridValue[y][x] = savedNum;
activeChild = 10;
} else {
(gotoAndStop(10));// not popped
mcMarked._alpha = 0;
val = 10;
gameGridValue[y][x] = 10;
}
if (savedNotes != "") {
var _local3 = rootMc.gameGridNotesSaved[y][x].split("");
_local2 = 0;
while (_local2 < _local3.length) {
noteArr[_local2].val = _local3[_local2];
noteArr[_local2].gotoAndStop(_local3[_local2]);
noteArr[_local2]._visible = true;
activeChild = _local3.length;
_local2++;
}
}
updatePos();
}
function updatePos() {
_y = (y * squareSize) + yBorder;
_x = (x * squareSize) + xBorder;
}
function showNewNoteSquare() {
if ((visibleAtStart != 1) && (rootMc.pencil == true)) {
noteArr[activeChild]._visible = true;
}
}
function hideNewNoteSquare() {
noteArr[activeChild]._visible = false;
}
function setNumber(num) {
val = num;
(gotoAndStop(num));// not popped
}
var squareSize = 40;
var yBorder = 75;
var xBorder = 83;
var noteArr = new Array();
}
Symbol 201 MovieClip [__Packages.com.midasplayer.sudoku.NoteNumbers] Frame 0
class com.midasplayer.sudoku.NoteNumbers extends MovieClip
{
var rootMc, _width, _height, x, y, gotoAndStop, val, enabled, mcHider, _x, _y;
function NoteNumbers () {
super();
}
function init(rootMc, x, y, num) {
this.rootMc = rootMc;
_width = 15;
_height = 15;
this.x = x;
this.y = y;
gotoAndStop(num);
val = num;
enabled = 1;
mcHider._alpha = 0;
updatePos();
}
function updatePos() {
_x = -25 + ((x * squareSize) + (Math.ceil((x + 1) / 3) * 1));
_y = -30 + ((y * squareSize) + (Math.ceil((y + 1) / 3) * 1));
}
function onPress() {
if (enabled == 1) {
rootMc.clickNoteNumber(this);
}
}
var squareSize = 16;
}
Symbol 202 MovieClip [__Packages.com.midasplayer.sudoku.Numbers] Frame 0
class com.midasplayer.sudoku.Numbers extends MovieClip
{
var rootMc, x, y, gotoAndStop, val, enabled, mcHider, _x, _y;
function Numbers () {
super();
}
function init(rootMc, x, y, num) {
this.rootMc = rootMc;
this.x = x;
this.y = y;
gotoAndStop(num);
val = num;
enabled = 1;
mcHider._alpha = 0;
updatePos();
}
function updatePos() {
_x = -34.5 + ((x * squareSize) + (Math.ceil((x + 1) / 3) * 1));
_y = -42 + ((y * squareSize) + (Math.ceil((y + 1) / 3) * 1));
}
function onPress() {
if (enabled == 1) {
rootMc.clickNumber(this);
}
}
var squareSize = 22;
}
Symbol 203 MovieClip [__Packages.com.midasplayer.sudoku.InfoPanel] Frame 0
class com.midasplayer.sudoku.InfoPanel extends MovieClip
{
var introState, timeLeft, startTimer, lastTime, volume, _y, _x, mcLevelChoser, mcLoadGame, mcInfoBubble, loadGameText, mcInfoPanel_fillOut, header, text, timeMeter, savedSudokuGameData;
function InfoPanel () {
super();
}
function startIntro() {
com.midasplayer.sudoku.SoundHolder.get("intro").play();
introState = INTRO;
timeLeft = 10000;
startTimer = getTimer();
lastTime = 0;
volume = 100;
_y = 7;
_x = 15;
mcLevelChoser._visible = false;
mcLevelChoser.mcEasyBtn.onPress = function () {
com.midasplayer.sudoku.SoundHolder.get("levelChoise").play();
_root.mcInfoPanel.fadeIntroMusic();
_root.mcSudukoMain.clickPanel("easy");
};
mcLevelChoser.mcEasyBtn.onRollOver = function () {
(this.gotoAndStop("over"));// not popped
this._parent.no1.gotoAndPlay("anim");
this._parent.no1Tint.gotoAndPlay("anim");
};
mcLevelChoser.mcEasyBtn.onRollOut = function () {
(this.gotoAndStop("up"));// not popped
this._parent.no1.gotoAndStop(1);
this._parent.no1Tint.gotoAndStop(1);
};
mcLevelChoser.mcMediumBtn.onPress = function () {
com.midasplayer.sudoku.SoundHolder.get("levelChoise").play();
_root.mcInfoPanel.fadeIntroMusic();
_root.mcSudukoMain.clickPanel("medium");
};
mcLevelChoser.mcMediumBtn.onRollOver = function () {
(this.gotoAndStop("over"));// not popped
this._parent.no2.gotoAndPlay("anim");
this._parent.no2Tint.gotoAndPlay("anim");
};
mcLevelChoser.mcMediumBtn.onRollOut = function () {
(this.gotoAndStop("up"));// not popped
this._parent.no2.gotoAndStop(1);
this._parent.no2Tint.gotoAndStop(1);
};
mcLevelChoser.mcExpertBtn.onPress = function () {
com.midasplayer.sudoku.SoundHolder.get("levelChoise").play();
_root.mcInfoPanel.fadeIntroMusic();
_root.mcSudukoMain.clickPanel("expert");
};
mcLevelChoser.mcExpertBtn.onRollOver = function () {
(this.gotoAndStop("over"));// not popped
this._parent.no3.gotoAndPlay("anim");
this._parent.no3Tint.gotoAndPlay("anim");
};
mcLevelChoser.mcExpertBtn.onRollOut = function () {
(this.gotoAndStop("up"));// not popped
this._parent.no3.gotoAndStop(1);
this._parent.no3Tint.gotoAndStop(1);
};
mcLoadGame.onPress = function () {
this.savedSudokuGameData = SharedObject.getLocal("savedSudokuGameData");
_root.mcSudukoMain.loadSavedGame = true;
_root.mcSudukoMain.clickPanel(this.savedSudokuGameData.data.Difficulty);
};
mcLoadGame.onRollOver = function () {
this._height = this._height + 7;
this._width = this._width + 7;
};
mcLoadGame.onRollOut = function () {
this._height = this._height - 7;
this._width = this._width - 7;
};
mcLoadGame.onDragOut = function () {
this._height = this._height - 7;
this._width = this._width - 7;
};
mcInfoBubble.mcCloseBubble.onPress = function () {
com.midasplayer.sudoku.SoundHolder.get("bubbleDown").play();
this._parent._visible = false;
};
mcInfoBubble.mcCloseBubble.onRollOver = function () {
(this.gotoAndStop(2));// not popped
};
mcInfoBubble.mcCloseBubble.onRollOut = function () {
(this.gotoAndStop(1));// not popped
};
mcLoadGame._visible = false;
mcInfoBubble._visible = false;
loadGameText._visible = false;
mcInfoPanel_fillOut.onPress = function () {
if (this._parent.introState == com.midasplayer.sudoku.InfoPanel.INTRO) {
this._parent.timeLeft = 0;
}
};
}
function onEnterFrame() {
var _local4 = getTimer() - startTimer;
timeLeft = timeLeft - (_local4 - lastTime);
lastTime = _local4;
switch (introState) {
case INTRO :
var _local5 = Math.floor(timeLeft / 1000);
_root.mcInfoPanel.mcStartAnim.mcBubbleStart.timeMeter.text = _global.textMappings.time_to_start.split("{0}").join("" + (_local5 + 1));
if (timeLeft < 0) {
_root.mcInfoPanel.mcStartAnim.gotoAndPlay("anim");
gameSelect();
introState = GAME_SELECT;
}
break;
case GAME_SELECT :
break;
case END_INTRO :
volume = volume - 2;
com.midasplayer.sudoku.SoundHolder.get("intro").setVolume(volume);
if (volume != 0) {
break;
}
com.midasplayer.sudoku.SoundHolder.get("intro").stop();
}
}
function fadeIntroMusic() {
introState = END_INTRO;
}
function gameSelect() {
header._visible = false;
text._visible = false;
timeMeter._visible = false;
mcLevelChoser._visible = true;
mcInfoPanel_fillOut._visible = false;
savedSudokuGameData = SharedObject.getLocal("savedSudokuGameData");
com.midasplayer.sudoku.SoundHolder.get("levelChoiseIn").play();
var _local3 = new mx.transitions.Tween(mcLevelChoser, "_x", mx.transitions.easing.Strong.easeInOut, 410, 275, 1, true);
if (savedSudokuGameData.data.GridValues != undefined) {
_local3.onMotionFinished = function () {
_root.mcInfoPanel.mcLoadGame._visible = true;
_root.mcInfoPanel.mcInfoBubble._visible = true;
_root.mcInfoPanel.loadGameText._visible = true;
com.midasplayer.sudoku.SoundHolder.get("bubbleUp").play();
};
}
}
function getPos(numObj) {
numObj.yOldSquare = numObj.ySquare;
numObj.xOldSquare = numObj.xSquare;
numObj.ySquare = Math.floor(Math.random() * 9);
numObj.xSquare = Math.floor(Math.random() * 5);
}
static var INTRO = 0;
static var GAME_SELECT = 1;
static var END_INTRO = 2;
var ts = 0;
var numArr = new Array();
var counter = 0;
static var movement = false;
}
Symbol 204 MovieClip [__Packages.com.midasplayer.sudoku.SoundHolder] Frame 0
class com.midasplayer.sudoku.SoundHolder
{
static var globalSound;
var soundMc, sound;
function SoundHolder (ownerMc, soundName) {
var _local2 = ownerMc.getNextHighestDepth();
soundMc = ownerMc.createEmptyMovieClip("soundMcc" + _local2, _local2);
sound = new Sound(soundMc);
sound.attachSound(soundName);
}
static function get(resourceName) {
var _local2 = soundMap[resourceName];
if ((_local2 == undefined) || (_local2 == null)) {
_local2 = new com.midasplayer.sudoku.SoundHolder(_root, resourceName);
soundMap[resourceName] = _local2;
}
return(_local2);
}
static function toggleSound() {
if (globalSound == undefined) {
globalSound = new Sound(_root);
}
soundOn = !soundOn;
globalSound.setVolume((soundOn ? 100 : 0));
}
function setVolume(volume) {
sound.setVolume(volume);
}
function playLooping() {
sound.start(0, 9999999);
}
function stopAndPlayOffs(offs) {
sound.stop();
sound.start(offs, 0);
}
function stopAndPlay() {
sound.stop();
sound.start(0);
}
function playOffs(offs) {
sound.start(offs, 0);
}
function play() {
sound.start(0);
}
function stop() {
sound.stop();
}
static var soundMap = new Object();
static var soundOn = true;
}
Symbol 205 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 206 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 207 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 208 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 209 MovieClip [__Packages.com.midasplayer.sudoku.NotePad] Frame 0
class com.midasplayer.sudoku.NotePad extends MovieClip
{
var attachMovie, getNextHighestDepth, _visible, _y, _x;
function NotePad () {
super();
}
function NumberPad() {
fadeOut();
}
function setPad(rootMc) {
var _local3 = 0;
while (_local3 < 3) {
var _local2 = 0;
while (_local2 < 3) {
var _local5 = attachMovie("NoteNumbers", (("number_" + (_local3 * 3)) + _local2) + 1, getNextHighestDepth());
_local5.init(rootMc, _local2, _local3, ((_local3 * 3) + _local2) + 1);
NumbersArr.push(_local5);
_local2++;
}
_local3++;
}
var _local5 = attachMovie("NoteNumbers", "number_10", getNextHighestDepth());
_local5.init(rootMc, 1, 3, 10);
NumbersArr.push(_local5);
}
function fadeOut() {
mx.transitions.TransitionManager.start(this, {type:mx.transitions.Fade, direction:mx.transitions.Transition.OUT, duration:0.1, easing:mx.transitions.easing.None.easeNone});
}
function fadeIn() {
_visible = true;
mx.transitions.TransitionManager.start(this, {type:mx.transitions.Fade, direction:mx.transitions.Transition.IN, duration:0.1, easing:mx.transitions.easing.None.easeNone});
}
function updatePos(gridSquare) {
_y = gridSquare._y + 10;
_x = gridSquare._x;
}
function enableAllNumbers() {
var _local2 = 0;
while (_local2 < 9) {
enableNumber(NumbersArr[_local2]);
_local2++;
}
}
function disableNumber(num) {
num._alpha = 40;
num.enabled = 0;
}
function enableNumber(num) {
num._alpha = 100;
num.enabled = 1;
}
function checkForDisables(gridSquare, gameGridValue, noOfGrids) {
var _local2 = 0;
while (_local2 < noOfGrids) {
var _local6 = 0;
while (_local6 < noOfGrids) {
if (Number(gameGridValue[_local6][gridSquare.x]) == (_local2 + 1)) {
disableNumber(NumbersArr[_local2]);
}
_local6++;
}
var _local7 = 0;
while (_local7 < noOfGrids) {
if (Number(gameGridValue[gridSquare.y][_local7]) == (_local2 + 1)) {
disableNumber(NumbersArr[_local2]);
}
_local7++;
}
var _local4 = 0;
while (_local4 < 3) {
var _local3 = 0;
while (_local3 < 3) {
if (Number(gameGridValue[((Math.ceil((gridSquare.y + 1) / 3) - 1) * 3) + _local4][((Math.ceil((gridSquare.x + 1) / 3) - 1) * 3) + _local3]) == (_local2 + 1)) {
disableNumber(NumbersArr[_local2]);
}
_local3++;
}
_local4++;
}
_local2++;
}
}
var NumbersArr = new Array();
}
Symbol 210 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 211 MovieClip [__Packages.mx.transitions.TransitionManager] Frame 0
class mx.transitions.TransitionManager
{
var _transitions, removeEventListener, _content, addEventListener, _contentAppearance, _innerBounds, _outerBounds, _width, _height, _triggerEvent, dispatchEvent;
function TransitionManager (content) {
this.content = (content);
_transitions = {};
}
function set content(c) {
removeEventListener("allTransitionsInDone", _content);
removeEventListener("allTransitionsOutDone", _content);
_content = c;
saveContentAppearance();
addEventListener("allTransitionsInDone", _content);
addEventListener("allTransitionsOutDone", _content);
//return(content);
}
function get content() {
return(_content);
}
function get transitionsList() {
return(_transitions);
}
function get numTransitions() {
var _local2 = 0;
for (var _local3 in _transitions) {
_local2++;
}
return(_local2);
}
function get numInTransitions() {
var _local3 = 0;
var _local2 = _transitions;
for (var _local4 in _local2) {
if (!_local2[_local4].direction) {
_local3++;
}
}
return(_local3);
}
function get numOutTransitions() {
var _local3 = 0;
var _local2 = _transitions;
for (var _local4 in _local2) {
if (_local2[_local4].direction) {
_local3++;
}
}
return(_local3);
}
function get contentAppearance() {
return(_contentAppearance);
}
static function start(content, transParams) {
if (content.__transitionManager == undefined) {
content.__transitionManager = new mx.transitions.TransitionManager(content);
}
if (transParams.direction == 1) {
content.__transitionManager._triggerEvent = "hide";
} else {
content.__transitionManager._triggerEvent = "reveal";
}
return(content.__transitionManager.startTransition(transParams));
}
function startTransition(transParams) {
removeTransition(findTransition(transParams));
var _local3 = transParams.type;
var _local2 = new _local3[undefined](_content, transParams, this);
addTransition(_local2);
_local2.start();
return(_local2);
}
function addTransition(trans) {
trans.ID = ++IDCount;
_transitions[trans.ID] = trans;
return(trans);
}
function removeTransition(trans) {
if (_transitions[trans.ID] == undefined) {
return(false);
}
trans.cleanUp();
return(delete _transitions[trans.ID]);
}
function findTransition(transParams) {
var _local2;
for (var _local4 in _transitions) {
_local2 = _transitions[_local4];
if (_local2.type == transParams.type) {
return(_local2);
}
}
return(undefined);
}
function removeAllTransitions() {
for (var _local2 in _transitions) {
_transitions[_local2].cleanUp();
removeTransition(_transitions[_local2]);
}
}
function saveContentAppearance() {
var _local2 = _content;
if (_contentAppearance == undefined) {
var _local3 = (_contentAppearance = {});
for (var _local4 in _visualPropList) {
_local3[_local4] = _local2[_local4];
}
_local3.colorTransform = new Color(_local2).getTransform();
}
_innerBounds = _local2.getBounds(targetPath(_local2));
_outerBounds = _local2.getBounds(targetPath(_local2._parent));
_width = _local2._width;
_height = _local2._height;
}
function restoreContentAppearance() {
var _local2 = _content;
var _local3 = _contentAppearance;
for (var _local4 in _visualPropList) {
_local2[_local4] = _local3[_local4];
}
new Color(_local2).setTransform(_local3.colorTransform);
}
function transitionInDone(e) {
removeTransition(e.target);
if (numInTransitions == 0) {
var _local2;
_local2 = _content._visible;
if ((_triggerEvent == "hide") || (_triggerEvent == "hideChild")) {
_content._visible = false;
}
if (_local2) {
dispatchEvent({type:"allTransitionsInDone", target:this});
}
}
}
function transitionOutDone(e) {
removeTransition(e.target);
if (numOutTransitions == 0) {
restoreContentAppearance();
var _local2;
_local2 = _content._visible;
if (_local2 && ((_triggerEvent == "hide") || (_triggerEvent == "hideChild"))) {
_content._visible = false;
}
updateAfterEvent();
if (_local2) {
dispatchEvent({type:"allTransitionsOutDone", target:this});
}
}
}
function toString() {
return("[TransitionManager]");
}
static var version = "1.1.0.52";
static var IDCount = 0;
var type = mx.transitions.TransitionManager;
var className = "TransitionManager";
var _visualPropList = {_x:null, _y:null, _xscale:null, _yscale:null, _alpha:null, _rotation:null};
static var __mixinFED = mx.events.EventDispatcher.initialize(mx.transitions.TransitionManager.prototype);
}
Symbol 212 MovieClip [__Packages.mx.transitions.Transition] Frame 0
class mx.transitions.Transition
{
var _manager, removeEventListener, addEventListener, _content, _twn, _easing, _progress, dispatchEvent, _innerBounds, _outerBounds, _width, _height;
function Transition (content, transParams, manager) {
if (!arguments.length) {
return;
}
init(content, transParams, manager);
}
function set manager(mgr) {
if (_manager != undefined) {
removeEventListener("transitionInDone", _manager);
removeEventListener("transitionOutDone", _manager);
removeEventListener("transitionProgress", _manager);
}
_manager = mgr;
addEventListener("transitionInDone", _manager);
addEventListener("transitionOutDone", _manager);
addEventListener("transitionProgress", _manager);
//return(manager);
}
function get manager() {
return(_manager);
}
function set content(c) {
if (typeof(c) == "movieclip") {
_content = c;
_twn.obj = c;
}
//return(content);
}
function get content() {
return(_content);
}
function set direction(direction) {
_direction = (direction ? 1 : 0);
//return(this.direction);
}
function get direction() {
return(_direction);
}
function set duration(d) {
if (d) {
_duration = d;
_twn.duration = d;
}
//return(duration);
}
function get duration() {
return(_duration);
}
function set easing(e) {
if (typeof(e) == "string") {
e = eval (e);
} else if (e == undefined) {
e = _noEase;
}
_easing = e;
_twn.easing = e;
//return(easing);
}
function get easing() {
return(_easing);
}
function set progress(p) {
if (_progress == p) {
return;
}
_progress = p;
if (_direction) {
_render(1 - p);
} else {
_render(p);
}
dispatchEvent({type:"transitionProgress", target:this, progress:p});
//return(progress);
}
function get progress() {
return(_progress);
}
function init(content, transParams, manager) {
this.content = (content);
direction = (transParams.direction);
duration = (transParams.duration);
easing = (transParams.easing);
this.manager = (manager);
_innerBounds = this.manager._innerBounds;
_outerBounds = this.manager._outerBounds;
_width = this.manager._width;
_height = this.manager._height;
_resetTween();
}
function toString() {
return(("[Transition " + className) + "]");
}
function start() {
content._visible = true;
_twn.start();
}
function stop() {
_twn.fforward();
_twn.stop();
}
function cleanUp() {
removeEventListener("transitionInDone", _manager);
removeEventListener("transitionOutDone", _manager);
removeEventListener("transitionProgress", _manager);
stop();
}
function getNextHighestDepthMC(mc) {
var _local4 = mc.getNextHighestDepth();
if (_local4 != undefined) {
return(_local4);
}
_local4 = -1;
var _local3;
var _local1;
for (var _local5 in mc) {
_local1 = mc[_local5];
if ((typeof(_local1) == "movieclip") && (_local1._parent == mc)) {
_local3 = _local1.getDepth();
if (_local3 > _local4) {
_local4 = _local3;
}
}
}
return(_local4 + 1);
}
function drawBox(mc, x, y, w, h) {
mc.moveTo(x, y);
mc.lineTo(x + w, y);
mc.lineTo(x + w, y + h);
mc.lineTo(x, y + h);
mc.lineTo(x, y);
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function _render(p) {
}
function _resetTween() {
_twn.stop();
_twn.removeListener(this);
_twn = new mx.transitions.Tween(this, null, easing, 0, 1, duration, true);
_twn.stop();
_twn.prop = "progress";
_twn.addListener(this);
}
function _noEase(t, b, c, d) {
return(((c * t) / d) + b);
}
function onMotionFinished(src) {
if (direction) {
dispatchEvent({type:"transitionOutDone", target:this});
} else {
dispatchEvent({type:"transitionInDone", target:this});
}
}
static var version = "1.1.0.52";
static var IN = 0;
static var OUT = 1;
var type = mx.transitions.Transition;
var className = "Transition";
var _direction = 0;
var _duration = 2;
static var __mixinFED = mx.events.EventDispatcher.initialize(mx.transitions.Transition.prototype);
}
Symbol 213 MovieClip [__Packages.mx.transitions.Fade] Frame 0
class mx.transitions.Fade extends mx.transitions.Transition
{
var _alphaFinal, __get__manager, _content;
function Fade (content, transParams, manager) {
super();
init(content, transParams, manager);
}
function init(content, transParams, manager) {
super.init(content, transParams, manager);
_alphaFinal = __get__manager().__get__contentAppearance()._alpha;
}
function _render(p) {
_content._alpha = _alphaFinal * p;
}
static var version = "1.1.0.52";
var type = mx.transitions.Fade;
var className = "Fade";
}
Symbol 214 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 215 MovieClip [__Packages.com.midasplayer.sudoku.NumberPad] Frame 0
class com.midasplayer.sudoku.NumberPad extends MovieClip
{
var attachMovie, getNextHighestDepth, _visible, _y, _x;
function NumberPad () {
super();
fadeOut();
}
function setPad(rootMc) {
var _local3 = 0;
while (_local3 < 3) {
var _local2 = 0;
while (_local2 < 3) {
var _local5 = attachMovie("Numbers", (("number_" + (_local3 * 3)) + _local2) + 1, getNextHighestDepth());
_local5.init(rootMc, _local2, _local3, ((_local3 * 3) + _local2) + 1);
NumbersArr.push(_local5);
_local2++;
}
_local3++;
}
var _local5 = attachMovie("Numbers", "number_10", getNextHighestDepth());
_local5.init(rootMc, 1, 3, 10);
NumbersArr.push(_local5);
}
function fadeOut() {
mx.transitions.TransitionManager.start(this, {type:mx.transitions.Fade, direction:mx.transitions.Transition.OUT, duration:0.1, easing:mx.transitions.easing.None.easeNone});
}
function fadeIn() {
_visible = true;
mx.transitions.TransitionManager.start(this, {type:mx.transitions.Fade, direction:mx.transitions.Transition.IN, duration:0.1, easing:mx.transitions.easing.None.easeNone});
}
function updatePos(gridSquare) {
_y = gridSquare._y + 10;
_x = gridSquare._x;
}
function enableAllNumbers() {
var _local2 = 0;
while (_local2 < 9) {
enableNumber(NumbersArr[_local2]);
_local2++;
}
}
function disableNumber(num) {
num._alpha = 40;
num.enabled = 0;
}
function enableNumber(num) {
num._alpha = 100;
num.enabled = 1;
}
function checkForDisables(gridSquare, gameGridValue, noOfGrids) {
var _local2 = 0;
while (_local2 < noOfGrids) {
var _local6 = 0;
while (_local6 < noOfGrids) {
if (Number(gameGridValue[_local6][gridSquare.x]) == (_local2 + 1)) {
disableNumber(NumbersArr[_local2]);
}
_local6++;
}
var _local7 = 0;
while (_local7 < noOfGrids) {
if (Number(gameGridValue[gridSquare.y][_local7]) == (_local2 + 1)) {
disableNumber(NumbersArr[_local2]);
}
_local7++;
}
var _local4 = 0;
while (_local4 < 3) {
var _local3 = 0;
while (_local3 < 3) {
if (Number(gameGridValue[((Math.ceil((gridSquare.y + 1) / 3) - 1) * 3) + _local4][((Math.ceil((gridSquare.x + 1) / 3) - 1) * 3) + _local3]) == (_local2 + 1)) {
disableNumber(NumbersArr[_local2]);
}
_local3++;
}
_local4++;
}
_local2++;
}
}
var NumbersArr = new Array();
}
Symbol 216 MovieClip [__Packages.com.midasplayer.sudoku.BackGround] Frame 0
class com.midasplayer.sudoku.BackGround extends MovieClip
{
var rootMc, _parent, mcBackGround_fillOut;
function BackGround () {
super();
rootMc = _parent;
mcBackGround_fillOut._visible = false;
mcBackGround_fillOut.onPress = function () {
com.midasplayer.sudoku.SoundHolder.get("dialerDown").play();
this._parent.rootMc.mcFrames.fadeOut();
this._parent.rootMc.mcNumberPad.fadeOut();
this._parent.rootMc.mcNotePad.fadeOut();
this._visible = false;
};
}
function fadeIn() {
mcBackGround_fillOut._visible = true;
}
function fadeOut() {
mcBackGround_fillOut._visible = false;
}
}
Symbol 217 MovieClip [__Packages.com.midasplayer.sudoku.Board] Frame 0
class com.midasplayer.sudoku.Board extends MovieClip
{
var _y, _x, attachMovie, getNextHighestDepth, _parent;
function Board () {
super();
_y = 0;
_x = 0;
}
function setBoard(gameGrid, gameGridValue, gameGridShown, gameGridCorrectValue, noOfGrids, rootMc, gameGridSaved, gameGridNotesSaved) {
var _local3 = 0;
while (_local3 < noOfGrids) {
var _local5 = new Array();
var _local2 = 0;
while (_local2 < noOfGrids) {
var _local4 = attachMovie("GridSquare", (("gridSquare_" + _local3) + "_") + _local2, getNextHighestDepth());
_local5[_local2] = _local4;
_local4.init(rootMc, _local2, _local3, gameGridShown[_local3][_local2], gameGridValue, gameGridCorrectValue[_local3][_local2], gameGridSaved[_local3][_local2], gameGridNotesSaved[_local3][_local2]);
_local2++;
}
gameGrid[_local3] = _local5;
_local3++;
}
}
function resetBoard(gameGridValue, gameGridShown, gameGridCorrectValue, noOfGrids, rootMc) {
var _local3 = 0;
while (_local3 < noOfGrids) {
var _local2 = 0;
while (_local2 < noOfGrids) {
_parent.gameGrid[_local3][_local2].init(rootMc, _local2, _local3, gameGridShown[_local3][_local2], gameGridValue, gameGridCorrectValue[_local3][_local2], 0, "");
_local2++;
}
_local3++;
}
}
function solveBoard(gameGridValue, gameGridCorrectValue, noOfGrids, rootMc) {
var _local5 = 0;
while (_local5 < noOfGrids) {
var _local4 = 0;
while (_local4 < noOfGrids) {
_parent.gameGrid[_local5][_local4].init(rootMc, _local4, _local5, 1, gameGridValue, gameGridCorrectValue[_local5][_local4], 0, "");
_local4++;
}
_local5++;
}
_parent.clearGame();
_parent.txtPrint._visible = true;
_parent.mcPrintButton._visible = true;
_root.mcSudukoMain.mcBubbleEnd.congratulationText.text = _global.textMappings.solutionbubble;
}
}
Symbol 218 MovieClip [__Packages.com.midasplayer.sudoku.Frames] Frame 0
class com.midasplayer.sudoku.Frames extends MovieClip
{
var _y, _x, _parent, _visible, mcFrameH, mcFrameV, mcFrameC;
function Frames () {
super();
_y = 0;
_x = 0;
fadeOut();
}
function fadeIn() {
if (_parent.highLight == true) {
_visible = true;
mx.transitions.TransitionManager.start(this, {type:mx.transitions.Fade, direction:mx.transitions.Transition.IN, duration:0.1, easing:mx.transitions.easing.None.easeNone});
}
}
function fadeOut() {
if (_visible == true) {
mx.transitions.TransitionManager.start(this, {type:mx.transitions.Fade, direction:mx.transitions.Transition.OUT, duration:0.1, easing:mx.transitions.easing.None.easeNone});
}
}
function updatePos(gridSquare, gameGrid) {
mcFrameH._y = gridSquare._y - (squareSize / 2);
mcFrameH._x = xBorder - (squareSize / 2);
mcFrameV._y = yBorder - (squareSize / 2);
mcFrameV._x = gridSquare._x - (squareSize / 2);
mcFrameC._y = gameGrid[(Math.ceil((gridSquare.y + 1) / 3) - 1) * 3][(Math.ceil((gridSquare.x + 1) / 3) - 1) * 3]._y - (squareSize / 2);
mcFrameC._x = gameGrid[(Math.ceil((gridSquare.y + 1) / 3) - 1) * 3][(Math.ceil((gridSquare.x + 1) / 3) - 1) * 3]._x - (squareSize / 2);
}
var yBorder = 73;
var xBorder = 82;
var squareSize = 40;
}
Symbol 219 MovieClip [__Packages.com.midasplayer.sudoku.SudukoMain] Frame 0
class com.midasplayer.sudoku.SudukoMain extends MovieClip
{
var _x, _y, sound, gameGrid, gameGridValue, gameGridCorrectValue, gameGridShown, gameGridSaved, gameGridNotesSaved, communicator, delay, mcBubbleEnd, lastTime, gameState, mcSoundButton, mcQuitButton, mcResetButton, mcSaveExitButton, mcPrintButton, mcSolveButton, highLight, mcHighlightOff, mcHighlightOn, mcPencilOn, pencil, mcPencilOff, mcBubbleWrongSolv, now, timeLeft, txtOn, txtOff, txtHighlight, txtPencilMarks, txtTime, txtMembersOnly, txtPrint, txtReset, txtSaveGame, txtSolution, mcBoard, soundText, quitText, addTime, startTime, timeText, endStartTime, quitTimerLeft, quitTimerLast, difficultyLevel, gameTotalTime, savedSudokuGameData, txtDifficulty, mcLevel, mcDiffText, mcNumberPad, mcNotePad, saveGame_GridValue, saveGame_GridClues, saveGame_UserGrid, saveGame_UserNotes, mcBackGround, markedSquare, mcFrames, markedNoteSquare, onPress;
function SudukoMain () {
super();
_x = border;
_y = border;
sound = true;
gameGrid = new Array();
gameGridValue = new Array();
gameGridCorrectValue = new Array();
gameGridShown = new Array();
gameGridSaved = new Array();
gameGridNotesSaved = new Array();
communicator = new com.midasplayer.sudoku.Communicator();
delay = new com.midasplayer.util.Delay();
mcBubbleEnd._visible = false;
lastTime = getTimer();
gameState = STATE_WAIT_FOR_GAMEDATA;
mcSoundButton.onPress = function () {
com.midasplayer.sudoku.SoundHolder.toggleSound();
if (this._parent.sound == true) {
this.soundText.text = _global.textMappings.sound_off;
this._parent.sound = false;
(this.gotoAndStop("off"));// not popped
} else {
this.soundText.text = _global.textMappings.sound_on;
this._parent.sound = true;
(this.gotoAndStop("on"));// not popped
}
};
mcSoundButton.onRollOver = function () {
if (Number(_global.userType["0"]) == 1) {
this._height = this._height + 4;
this._width = this._width + 4;
}
};
mcSoundButton.onRollOut = function () {
if (Number(_global.userType["0"]) == 1) {
this._height = this._height - 4;
this._width = this._width - 4;
}
};
mcSoundButton.onDragOut = function () {
if (Number(_global.userType["0"]) == 1) {
this._height = this._height - 4;
this._width = this._width - 4;
}
};
mcQuitButton.onPress = function () {
this._parent.quitGame();
};
mcQuitButton.onRollOver = function () {
if (Number(_global.userType["0"]) == 1) {
this._height = this._height + 4;
this._width = this._width + 4;
}
};
mcQuitButton.onRollOut = function () {
if (Number(_global.userType["0"]) == 1) {
this._height = this._height - 4;
this._width = this._width - 4;
}
};
mcQuitButton.onDragOut = function () {
if (Number(_global.userType["0"]) == 1) {
this._height = this._height - 4;
this._width = this._width - 4;
}
};
mcResetButton.onPress = function () {
if (Number(_global.userType["0"]) == 1) {
com.midasplayer.sudoku.SoundHolder.get("levelChoise").play();
this._parent.mcNumberPad.fadeOut();
this._parent.mcFrames.fadeOut();
this._parent.clearNotes();
this._parent.mcBoard.resetBoard(this._parent.gameGridValue, this._parent.gameGridShown, this._parent.gameGridCorrectValue, com.midasplayer.sudoku.SudukoMain.NO_OF_GRIDS, this._parent);
}
};
mcResetButton.onRollOver = function () {
if (Number(_global.userType["0"]) == 1) {
this._height = this._height + 4;
this._width = this._width + 4;
}
};
mcResetButton.onRollOut = function () {
if (Number(_global.userType["0"]) == 1) {
this._height = this._height - 4;
this._width = this._width - 4;
}
};
mcResetButton.onDragOut = function () {
if (Number(_global.userType["0"]) == 1) {
this._height = this._height - 4;
this._width = this._width - 4;
}
};
mcSaveExitButton.onPress = function () {
if (Number(_global.userType["0"]) == 1) {
com.midasplayer.sudoku.SoundHolder.get("levelChoise").play();
this._parent.saveGame();
}
};
mcSaveExitButton.onRollOver = function () {
if (Number(_global.userType["0"]) == 1) {
this._height = this._height + 4;
this._width = this._width + 4;
}
};
mcSaveExitButton.onRollOut = function () {
if (Number(_global.userType["0"]) == 1) {
this._height = this._height - 4;
this._width = this._width - 4;
}
};
mcSaveExitButton.onDragOut = function () {
if (Number(_global.userType["0"]) == 1) {
this._height = this._height - 4;
this._width = this._width - 4;
}
};
mcPrintButton.onPress = function () {
if (Number(_global.userType["0"]) == 1) {
com.midasplayer.sudoku.SoundHolder.get("levelChoise").play();
print (this._parent.mcBoard, "bframe");
}
};
mcPrintButton.onRollOver = function () {
if (Number(_global.userType["0"]) == 1) {
this._height = this._height + 4;
this._width = this._width + 4;
}
};
mcPrintButton.onRollOut = function () {
if (Number(_global.userType["0"]) == 1) {
this._height = this._height - 4;
this._width = this._width - 4;
}
};
mcPrintButton.onDragOut = function () {
if (Number(_global.userType["0"]) == 1) {
this._height = this._height - 4;
this._width = this._width - 4;
}
};
mcSolveButton.onPress = function () {
if (Number(_global.userType["0"]) == 1) {
com.midasplayer.sudoku.SoundHolder.get("showSolution").play();
this._parent.solvPress = true;
this._parent.mcNumberPad.fadeOut();
this._parent.mcFrames.fadeOut();
this._parent.clearNotes();
this._parent.clearSavedGame();
this._parent.mcBoard.solveBoard(this._parent.gameGridValue, this._parent.gameGridCorrectValue, com.midasplayer.sudoku.SudukoMain.NO_OF_GRIDS, this._parent);
}
};
mcSolveButton.onRollOver = function () {
if (Number(_global.userType["0"]) == 1) {
this._height = this._height + 4;
this._width = this._width + 4;
}
};
mcSolveButton.onRollOut = function () {
if (Number(_global.userType["0"]) == 1) {
this._height = this._height - 4;
this._width = this._width - 4;
}
};
mcSolveButton.onDragOut = function () {
if (Number(_global.userType["0"]) == 1) {
this._height = this._height - 4;
this._width = this._width - 4;
}
};
highLight = true;
mcHighlightOff.gotoAndStop("off");
mcHighlightOn.onPress = function () {
com.midasplayer.sudoku.SoundHolder.get("levelChoise").play();
if (this._parent.highLight == false) {
this._parent.highLight = true;
this._parent.mcHighlightOff.gotoAndStop("off");
this.gotoAndStop("on");
}
};
mcHighlightOff.onPress = function () {
com.midasplayer.sudoku.SoundHolder.get("levelChoise").play();
if (this._parent.highLight == true) {
this._parent.highLight = false;
this.gotoAndStop("on");
this._parent.mcHighlightOn.gotoAndStop("off");
}
};
mcPencilOn.gotoAndStop("off");
pencil = false;
mcPencilOn.onPress = function () {
com.midasplayer.sudoku.SoundHolder.get("levelChoise").play();
if (this._parent.pencil == false) {
this._parent.pencil = true;
this._parent.mcPencilOff.gotoAndStop("off");
this.gotoAndStop("on");
var _local4 = 0;
while (_local4 < 9) {
var _local2 = 0;
while (_local2 < 9) {
var _local3 = 0;
while (_local3 < this._parent.gameGrid[_local4][_local2].activeChild) {
if (this._parent.gameGrid[_local4][_local2].val == "10") {
this._parent.gameGrid[_local4][_local2].noteArr[_local3]._visible = true;
}
_local3++;
}
_local2++;
}
_local4++;
}
}
};
mcPencilOff.onPress = function () {
com.midasplayer.sudoku.SoundHolder.get("levelChoise").play();
if (this._parent.pencil == true) {
this._parent.pencil = false;
this.gotoAndStop("on");
this._parent.mcPencilOn.gotoAndStop("off");
var _local4 = 0;
while (_local4 < 9) {
var _local3 = 0;
while (_local3 < 9) {
var _local2 = 0;
while (_local2 < this._parent.gameGrid[_local4][_local3].activeChild) {
this._parent.gameGrid[_local4][_local3].noteArr[_local2]._visible = false;
_local2++;
}
_local3++;
}
_local4++;
}
}
};
mcBubbleWrongSolv._visible = false;
}
function onEnterFrame() {
now = getTimer();
timeLeft = timeLeft - (now - lastTime);
lastTime = now;
switch (gameState) {
case STATE_WAIT_FOR_GAMEDATA :
if (DEBUG_MODE) {
_root.gameData = DEBUG_GAME_DATA;
}
if (_root.gameData != undefined) {
communicator.gameStarted();
communicator.parseGameData(_root.gameData);
_global.textMappings.time_to_start = _global.textMappings.time_to_start.split("''").join("'");
_global.textMappings.time_to_end = _global.textMappings.time_to_end.split("''").join("'");
txtOn.text = _global.textMappings.on;
txtOff.text = _global.textMappings.off;
txtHighlight.text = _global.textMappings.highlight;
txtPencilMarks.text = _global.textMappings.pencilmarks;
txtTime.text = _global.textMappings.time;
txtMembersOnly.text = _global.textMappings.membersonly;
txtPrint.text = _global.textMappings.print;
txtReset.text = _global.textMappings.reset;
txtSaveGame.text = _global.textMappings.savegame;
txtSolution.text = _global.textMappings.solution;
mcBubbleEnd.congratulationText.text = _global.textMappings.congratulations;
mcBubbleWrongSolv.wrongSolvText.text = _global.textMappings.wrongsolv;
mcBoard.txtEasy.text = _global.textMappings.easy;
mcBoard.txtMedium.text = _global.textMappings.medium;
mcBoard.txtExpert.text = _global.textMappings.expert;
soundText.text = _global.textMappings.sound_on;
quitText.text = _global.textMappings.exit;
_root.mcInfoPanel.header.text = _global.textMappings.game_instructions_header;
_root.mcInfoPanel.text.text = _global.textMappings.game_instructions_text;
_root.mcInfoPanel.mcInfoBubble.text.text = _global.textMappings.loadgametext;
_root.mcInfoPanel.loadGameText.text = _global.textMappings.loadgame;
_root.mcInfoPanel.mcLevelChoser.txtChooseLevel.text = _global.textMappings.chooselevel;
_root.mcInfoPanel.mcLevelChoser.txtEasy.text = _global.textMappings.easy;
_root.mcInfoPanel.mcLevelChoser.txtMedium.text = _global.textMappings.medium;
_root.mcInfoPanel.mcLevelChoser.txtExpert.text = _global.textMappings.expert;
_root.mcInfoPanel.startIntro();
timeLeft = 10000;
gameState = STATE_SHOW_INTRO_SCREEN;
if (Number(_global.userType["0"]) != 1) {
mcResetButton.gotoAndStop(2);
mcSolveButton.gotoAndStop(2);
mcPrintButton.gotoAndStop(2);
mcSaveExitButton.gotoAndStop(2);
var _local5 = new TextFormat();
_local5.color = 16737945 /* 0xFF6699 */;
txtPrint.setTextFormat(_local5);
txtReset.setTextFormat(_local5);
txtSaveGame.setTextFormat(_local5);
txtSolution.setTextFormat(_local5);
}
}
break;
case STATE_SHOW_INTRO_SCREEN :
break;
case STATE_PLAY_GAME :
now = (getTimer() - startTime) + addTime;
fiveMin = getTimer() - fiveCounter;
if (fiveMin >= 300000) {
fiveMin = 0;
fiveCounter = getTimer();
communicator.playData();
}
var _local6 = Math.floor(((now / 1000) / 60) / 60);
var _local7 = Math.floor(((now / 1000) / 60) - (_local6 * 60));
var _local8 = Math.floor((now / 1000) - ((_local7 * 60) + ((_local6 * 60) * 60)));
var _local4 = "";
if (_local6 < 10) {
_local4 = "0";
}
_local4 = (_local4 + Math.floor(_local6)) + ":";
if (_local7 < 10) {
_local4 = _local4 + "0";
}
_local4 = (_local4 + Math.floor(_local7)) + ":";
if (_local8 < 10) {
_local4 = _local4 + "0";
}
_local4 = _local4 + Math.floor(_local8);
if (runTimer == true) {
timeText.text = _local4;
}
if (runQuitTimer != true) {
break;
}
var _local9 = getTimer() - endStartTime;
quitTimerLeft = quitTimerLeft - ((_local9 - quitTimerLast) / 1000);
quitTimerLast = _local9;
var _local10 = Math.floor(quitTimerLeft);
_root.mcSudukoMain.quitTimeMeter.text = _global.textMappings.time_to_end.split("{0}").join("" + _local10);
if (_local10 >= 1) {
break;
}
quitGame();
case STATE_GAME_OVER :
}
}
function quitGame() {
var _local3 = 0;
switch (difficultyLevel) {
case "easy" :
_local3 = 1;
break;
case "medium" :
_local3 = 2;
break;
case "expert" :
_local3 = 3;
}
var _local2 = (3600 * _local3) - (gameTotalTime / 1000);
if ((_local2 < 0) || (solvPress == true)) {
_local2 = 0;
}
if (gameTotalTime == undefined) {
_local2 = 0;
}
trace(_local2);
com.midasplayer.sudoku.SoundHolder.toggleSound();
gameState = STATE_GAME_OVER;
trace("gameEnd");
communicator.gameEnd(Math.round(_local2));
com.midasplayer.util.Delay.oneShot(this, gameQuit, 1500);
}
function gameQuit() {
trace("gameQuit");
communicator.gameQuit();
}
function parseLevelData() {
var _local3 = 0;
savedSudokuGameData = SharedObject.getLocal("savedSudokuGameData");
if (loadSavedGame == false) {
addTime = 0;
switch (difficultyLevel) {
case "easy" :
var _local10 = communicator.levelDatas[0].split("");
var _local13 = communicator.levelDatas[1].split("");
break;
case "medium" :
_local10 = communicator.levelDatas[2].split("");
_local13 = communicator.levelDatas[3].split("");
break;
case "expert" :
_local10 = communicator.levelDatas[4].split("");
_local13 = communicator.levelDatas[5].split("");
}
var _local11 = communicator.levelDatas[6].split("");
var _local12 = communicator.levelDatas[7].split(".");
} else {
addTime = savedSudokuGameData.data.Time;
var _local10 = savedSudokuGameData.data.GridValues.split("");
var _local13 = savedSudokuGameData.data.GridClues.split("");
var _local11 = savedSudokuGameData.data.GridSavedValue.split("");
var _local12 = savedSudokuGameData.data.GridNotesSavedValue.split(".");
}
var _local4 = 0;
while (_local4 < NO_OF_GRIDS) {
var _local6 = new Array();
var _local8 = new Array();
var _local9 = new Array();
var _local7 = new Array();
var _local5 = new Array();
var _local2 = 0;
while (_local2 < NO_OF_GRIDS) {
_local6[_local2] = _local10[_local3];
_local8[_local2] = _local13[_local3];
_local9[_local2] = 10;
_local7[_local2] = _local11[_local3];
_local5[_local2] = _local12[_local3];
_local3++;
_local2++;
}
gameGridCorrectValue[_local4] = _local6;
gameGridShown[_local4] = _local8;
gameGridValue[_local4] = _local9;
gameGridSaved[_local4] = _local7;
gameGridNotesSaved[_local4] = _local5;
_local4++;
}
}
function clickPanel(difficulty) {
_root.mcInfoPanel.startAnim.gotoAndStop(2);
difficultyLevel = difficulty;
txtDifficulty.text = _global.textMappings[difficultyLevel];
if ((gameState == STATE_SHOW_INTRO_SCREEN) && (timeLeft < 9500)) {
timeLeft = 0;
mcLevel.gotoAndStop(difficultyLevel);
mcDiffText.gotoAndStop(difficultyLevel);
mcBoard.mcLevel.gotoAndStop(difficultyLevel);
startRound();
}
}
function startRound() {
parseLevelData();
mcBoard.setBoard(gameGrid, gameGridValue, gameGridShown, gameGridCorrectValue, NO_OF_GRIDS, this, gameGridSaved, gameGridNotesSaved);
mcNumberPad.setPad(this);
mcNotePad.setPad(this);
_root.mcInfoPanel._visible = false;
startTime = getTimer();
gameState = STATE_PLAY_GAME;
}
function clearSavedGame() {
savedSudokuGameData = SharedObject.getLocal("savedSudokuGameData");
savedSudokuGameData.clear();
}
function saveGame() {
saveGame_GridValue = "";
saveGame_GridClues = "";
saveGame_UserGrid = "";
saveGame_UserNotes = "";
var _local3 = 0;
while (_local3 < 9) {
var _local2 = 0;
while (_local2 < 9) {
saveGame_GridValue = saveGame_GridValue + gameGridCorrectValue[_local3][_local2];
saveGame_GridClues = saveGame_GridClues + gameGridShown[_local3][_local2];
if (gameGrid[_local3][_local2].val == 10) {
saveGame_UserGrid = saveGame_UserGrid + "0";
} else {
saveGame_UserGrid = saveGame_UserGrid + String(gameGrid[_local3][_local2].val);
}
var _local4 = 0;
while (_local4 < gameGrid[_local3][_local2].activeChild) {
if (((gameGrid[_local3][_local2].noteArr[_local4].val != 10) && (gameGrid[_local3][_local2].noteArr[_local4].val != undefined)) && (gameGrid[_local3][_local2].activeChild != 10)) {
saveGame_UserNotes = saveGame_UserNotes + String(gameGrid[_local3][_local2].noteArr[_local4].val);
}
_local4++;
}
if ((_local3 + _local2) < 16) {
saveGame_UserNotes = saveGame_UserNotes + ".";
}
_local2++;
}
_local3++;
}
savedSudokuGameData = SharedObject.getLocal("savedSudokuGameData");
savedSudokuGameData.data.GridValues = saveGame_GridValue;
savedSudokuGameData.data.GridClues = saveGame_GridClues;
savedSudokuGameData.data.GridSavedValue = saveGame_UserGrid;
savedSudokuGameData.data.GridNotesSavedValue = saveGame_UserNotes;
savedSudokuGameData.data.Time = getTimer() - startTime;
savedSudokuGameData.data.Difficulty = difficultyLevel;
savedSudokuGameData.flush();
trace(savedSudokuGameData.data.GridValues);
trace(savedSudokuGameData.data.GridClues);
trace(savedSudokuGameData.data.GridSavedValue);
trace(savedSudokuGameData.data.GridNotesSavedValue);
trace(savedSudokuGameData.data.Difficulty);
}
function clickNumber(mcNum) {
mcBackGround.fadeOut();
if ((mcNum.val != 10) || (markedSquare.val != 10)) {
markedSquare.activeChild = 10;
if ((markedSquare.val != 10) && (mcNum.val == 10)) {
markedSquare.activeChild = 0;
com.midasplayer.sudoku.SoundHolder.get("numberRemove").play();
} else {
com.midasplayer.sudoku.SoundHolder.get("numberAdd").play();
}
gameGrid[markedSquare.y][markedSquare.x].setNumber(mcNum.val);
gameGridValue[markedSquare.y][markedSquare.x] = mcNum.val;
var _local2 = 0;
while (_local2 < 9) {
markedSquare.noteArr[_local2].gotoAndStop(10);
markedSquare.noteArr[_local2]._visible = false;
_local2++;
}
} else {
com.midasplayer.sudoku.SoundHolder.get("dialerDown").play();
}
if (mcBubbleWrongSolv._visible == true) {
mcBubbleWrongSolv._visible = false;
}
mcNumberPad.fadeOut();
mcFrames.fadeOut();
correctGame();
markedSquare = "";
}
function clickGridSquare(gridSquare) {
com.midasplayer.sudoku.SoundHolder.get("dialerDown").play();
mcBackGround.fadeIn();
markedSquare = gridSquare;
mcNumberPad.updatePos(gridSquare);
mcNumberPad.fadeIn();
mcFrames.updatePos(gridSquare, gameGrid);
mcFrames.fadeIn();
if (difficultyLevel == "easy") {
mcNumberPad.enableAllNumbers();
mcNumberPad.checkForDisables(gridSquare, gameGridValue, NO_OF_GRIDS);
}
if (mcNotePad._visible == true) {
mcNotePad.fadeOut();
}
}
function clickNoteNumber(mcNoteNum) {
mcBackGround.fadeOut();
markedNoteSquare.gotoAndStop(mcNoteNum.val);
markedNoteSquare.val = mcNoteNum.val;
markedNoteSquare._visible = true;
if ((markedNoteSquare == markedSquare.noteArr[markedSquare.activeChild]) && (mcNoteNum.val != 10)) {
markedSquare.activeChild++;
}
if ((mcNoteNum.val == 10) && (markedNoteSquare != markedSquare.noteArr[markedSquare.activeChild])) {
com.midasplayer.sudoku.SoundHolder.get("numberRemove").play();
var _local2 = 0;
while (_local2 < markedSquare.activeChild) {
if (markedSquare.noteArr[_local2].val == 10) {
markedSquare.noteArr[_local2].val = markedSquare.noteArr[_local2 + 1].val;
markedSquare.noteArr[_local2].gotoAndStop(markedSquare.noteArr[_local2].val);
markedSquare.noteArr[_local2 + 1].gotoAndStop(10);
markedSquare.noteArr[_local2 + 1].val = 10;
}
_local2++;
}
markedSquare.activeChild--;
markedSquare.noteArr[markedSquare.activeChild]._visible = false;
} else {
com.midasplayer.sudoku.SoundHolder.get("pencilDown").play();
}
mcNotePad.fadeOut();
markedNoteSquare = "";
}
function clickNoteSquare(noteSquare, gridSquare) {
com.midasplayer.sudoku.SoundHolder.get("pencilUp").play();
mcBackGround.fadeIn();
markedSquare = gridSquare;
markedNoteSquare = noteSquare;
mcNotePad.updatePos(gridSquare);
mcNotePad.fadeIn();
if (mcNumberPad._visible == true) {
mcNumberPad.fadeOut();
mcFrames.fadeOut();
}
}
function correctGame() {
var _local5 = true;
var _local6 = true;
var _local3 = 0;
while (_local3 < NO_OF_GRIDS) {
var _local2 = 0;
while (_local2 < NO_OF_GRIDS) {
if (gameGridValue[_local3][_local2] != gameGridCorrectValue[_local3][_local2]) {
_local5 = false;
}
if (gameGridValue[_local3][_local2] == 10) {
_local6 = false;
}
_local2++;
}
_local3++;
}
if (_local5 == true) {
com.midasplayer.sudoku.SoundHolder.get("solved").play();
clearGame();
var _local4 = 9;
_local3 = 0;
while (_local3 < _local4) {
var _local2 = 0;
while (_local2 < _local4) {
gameGrid[_local3][_local2].mcGridSquare_Button._visible = false;
_local2++;
}
_local3++;
}
}
if ((_local5 == false) && (_local6 == true)) {
com.midasplayer.sudoku.SoundHolder.get("wrongSolved").play();
mcBubbleWrongSolv._visible = true;
}
}
function clearGame() {
runTimer = false;
quitTimerLast = 0;
quitTimerLeft = 10;
runQuitTimer = true;
endStartTime = getTimer();
gameTotalTime = (getTimer() - startTime) + addTime;
mcSolveButton._visible = false;
mcPrintButton._visible = false;
mcSaveExitButton._visible = false;
mcResetButton._visible = false;
mcHighlightOn._visible = false;
mcHighlightOff._visible = false;
mcPencilOn._visible = false;
mcPencilOff._visible = false;
txtPrint._visible = false;
txtReset._visible = false;
txtSolution._visible = false;
txtSaveGame._visible = false;
txtMembersOnly._visible = false;
txtTime._visible = false;
txtOn._visible = false;
txtOff._visible = false;
txtHighlight._visible = false;
txtPencilMarks._visible = false;
mcLevel.mcOne.gotoAndPlay("anim");
mcLevel.mcOneShadow.gotoAndPlay("anim");
mcLevel.mcTwo.gotoAndPlay("anim");
mcLevel.mcTwoShadow.gotoAndPlay("anim");
mcLevel.mcThree.gotoAndPlay("anim");
mcLevel.mcThreeShadow.gotoAndPlay("anim");
_root.mcSudukoMain.mcBubbleEnd._visible = true;
com.midasplayer.sudoku.SoundHolder.get("outro").play();
onPress = function () {
this.quitGame();
};
}
function clearNotes() {
var _local4 = 0;
while (_local4 < 9) {
var _local3 = 0;
while (_local3 < 9) {
var _local2 = 0;
while (_local2 < gameGrid[_local4][_local3].activeChild) {
gameGrid[_local4][_local3].noteArr[_local2]._visible = false;
gameGrid[_local4][_local3].noteArr[_local2].val = 10;
gameGrid[_local4][_local3].noteArr[_local2].gotoAndStop(10);
_local2++;
}
_local3++;
}
_local4++;
}
}
static var STATE_WAIT_FOR_GAMEDATA = 0;
static var STATE_SHOW_INTRO_SCREEN = 1;
static var STATE_PLAY_GAME = 2;
static var STATE_SHOW_NEXT_LEVEL_SCREEN = 3;
static var STATE_SHOW_GAME_OVER_SCREEN = 4;
static var STATE_GAME_OVER = 5;
static var NO_OF_GRIDS = 9;
var loadSavedGame = false;
var solvPress = false;
var fiveMin = 0;
var fiveCounter = 0;
var border = 0;
var runTimer = true;
var runQuitTimer = false;
static var DEBUG_MODE = false;
static var DEBUG_GAME_DATA = ((((((((((((((((((((((((("<gamedata randomseed=\"142752034\" timelimit=\"9999999999999\"><level id=\"0\">915276384624938751738514692581763249297485136463192875849321567352647918176859423</level><level id=\"1\">001101010110010110111001010001100000011101110000001100010100111011010011010101100</level><level id=\"2\">364752891821439576795618324536871942217945638489326157673194285958267413142583769</level><level id=\"3\">111111111111111111111111111111111111111111111111111111111111111111111111111111100</level><level id=\"4\">957612438364798152281435796479251863135846279628973514743589621596124387812367945</level><level id=\"5\">000100000010001110010010111000001000100111001000100000111010010011100010000001000</level><level id=\"6\">000000000000000000000000000000000000000000000000000000000000000000000000000000000</level><level id=\"7\">................................................................................</level><text id=\"game_instructions_header\">Sudoku</text><text id=\"game_instructions_text\">This is how you play sudoku. Lorum ipsum dolar amet..</text>" + "<text id=\"time_to_start\">TIME TO START: {0}</text>") + "<text id=\"time_to_end\">Time to end: {0}</text>") + "<text id=\"on\">On</text>") + "<text id=\"off\">Off</text>") + "<text id=\"highlight\">Show highlight</text>") + "<text id=\"pencilmarks\">Show pencil marks</text>") + "<text id=\"time\">Time</text>") + "<text id=\"membersonly\">Members Only</text>") + "<text id=\"print\">Print</text>") + "<text id=\"reset\">Reset Board</text>") + "<text id=\"savegame\">Save game</text>") + "<text id=\"solution\">Show Solution</text>") + "<text id=\"chooselevel\">Choose Level</text>") + "<text id=\"easy\">Easy</text>") + "<text id=\"medium\">Normal</text>") + "<text id=\"expert\">Hard</text>") + "<text id=\"loadgame\">Load game</text>") + "<text id=\"loadgametext\">Click here to load game</text>") + "<text id=\"congratulations\">Congratulations!!</text>") + "<text id=\"solutionbubble\">You pressed solution... looser..</text>") + "<text id=\"wrongsolv\">Wrong solution</text>") + "<text id=\"sound_on\">SOUND ON</text>") + "<text id=\"sound_off\">SOUND OFF</text>") + "<text id=\"exit\">EXIT</text>") + "<userType id=\"0\">1</userType>") + "</gamedata>";
}
Symbol 220 MovieClip [__Packages.com.midasplayer.sudoku.Communicator] Frame 0
class com.midasplayer.sudoku.Communicator
{
var levelDatas;
function Communicator () {
levelDatas = new Array();
}
function playData() {
fscommand ("playData", "200=0");
}
function gameStarted() {
fscommand ("gameStart");
fscommand ("playData", "200=0");
}
function gameQuit() {
if (!hasSentGameOver) {
hasSentGameOver = true;
fscommand ("gameQuit");
}
}
function gameEnd(score) {
if (!hasSentGameEnd) {
hasSentGameEnd = true;
fscommand ("gameEnd", score);
}
}
function parseGameData(gameData) {
var _local6 = new XML(_root.gameData);
_global.textMappings = new Object();
_global.userType = new Object();
var _local5 = _local6.childNodes[0].childNodes;
var _local4 = 0;
while (_local4 < _local5.length) {
_root.debugText.text = _root.debugText.text + ("\r" + _local5[_local4].nodeName);
if (_local5[_local4].nodeName == "text") {
_global.textMappings[_local5[_local4].attributes.id] = new String(_local5[_local4].firstChild.nodeValue);
}
if (_local5[_local4].nodeName == "level") {
levelDatas[_local5[_local4].attributes.id] = new String(_local5[_local4].firstChild.nodeValue);
}
if (_local5[_local4].nodeName == "userType") {
_global.userType[_local5[_local4].attributes.id] = new String(_local5[_local4].firstChild.nodeValue);
}
_local4++;
}
}
var hasSentGameEnd = false;
var hasSentGameOver = false;
}
Symbol 221 MovieClip [__Packages.com.midasplayer.util.Delay] Frame 0
class com.midasplayer.util.Delay
{
var m_fn, m_param, m_context, m_delay, m_started, m_timerId;
function Delay (context, fn, delay) {
m_fn = fn;
m_param = new Array();
var _local3 = 3;
while (_local3 < arguments.length) {
m_param.push(arguments[_local3]);
_local3++;
}
m_context = context;
m_delay = delay;
m_started = getTimer();
m_timerId = setInterval(mx.utils.Delegate.create(this, onEvent), delay);
}
function onEvent() {
if (getTimer() >= (m_delay + m_started)) {
clearInterval(m_timerId);
m_fn.apply(m_context, m_param);
m_fn = undefined;
m_param = undefined;
}
}
static function oneShot(context, fn, delay) {
var _local3 = new com.midasplayer.util.Delay(context, fn, delay);
_local3.m_param = new Array();
var _local2 = 3;
while (_local2 < arguments.length) {
_local3.m_param.push(arguments[_local2]);
_local2++;
}
}
}
Symbol 222 MovieClip [__Packages.com.midasplayer.sudoku.BlinkAnim] Frame 0
class com.midasplayer.sudoku.BlinkAnim extends MovieClip
{
var gotoAndStop, gotoAndPlay;
function BlinkAnim () {
super();
(gotoAndStop(1));// not popped
}
function onEnterFrame() {
i++;
if ((i > 100) && (moving == true)) {
moving = false;
}
if (moving == false) {
var _local2 = Math.random();
if (_local2 > 0.99) {
(gotoAndPlay(2));// not popped
i = 0;
moving = true;
}
}
}
var moving = false;
var i = 0;
}