Sudoku flash game component 1.2
he Crifano Sudoku Flash Component is the classic game of sudoku.
Pencil mark, real time check error and logic error are available.
You can also add the timer and implement buttons in order to get the solution or pause the game.
Double click on the component lets you edit the graphic objects and personalize it.
We have also the Crifano Sudoku Generator, it is a stand alone application.
Fist it builds the grid of sudoku searching approximately random numbers, than remove as many numbers as you want. You can choose also to use the manual modality, on this way you can set/or delete all the numbers manually and then generate the xml. For much information about it visit the site www.crifano.com
The component can be used without any scripting. The code hereunder is only for advanced users that need specific actions.
--API--
xmlFile
mySudoku.xmlFile="xml/sudoku.xml"
This property lets you assign an xml source document by code instead to use the "properties panel".
restartMe
mySudoku.restartMe();
This method restarts (or start) the game.
setTimeFiled
mySudoku.setTimeFiled(txtTimer:TextField);
This method assigns a text field to the component; it will be used to show the time.
checkComplete
mySudoku.checkComplete();
This method returns a boolean value indicating if all the numbers are correct or not.
solveMe
mySudoku.solveMe(value:Boolean);
This method shows or hides the solution of the game.
pauseMe
mySudoku.pauseMe(value:Boolean);
This method puts the game (and the timer) on pause or restarts it.
If the game goes in pause, a movieClip will cover the game.
setMark
mySudoku.setMark(value:Boolean);
This method shows or hides the pencil marks (notes)
setError
mySudoku.setError(value:Boolean);
This method shows or hides the errors
on_Complete
mySudoku.addEventListener("on_Complete",onComplete);
function onComplete(e):void {
var correct = mySudoku.checkComplete();
}
This event is called when all the numbers are correctly written in the boxes.