The Crifano Puzzle Component is able to load external images or image from the library
You can set a grid virtually infinite; it gives a loop error only up of 2500 pieces (anyway if you skip it, the puzzle works fine!)
It takes only 16 Kb on your swf file!
This component is a standard extension for Macromedia Flash 8. You simply install the MXP file, then drag & drop the extension from the Components' panel onto the scene of your movie.
With the Control Panel you can manage all parameters very easily.
piecesOrizzontal A number indicating the number of the pieces will split your image orizzontally.
piecesVertical A number indicating the number of the pieces will split your image vertically.
imgName A string indicating the image you want to use.
typeOfSource A string indicating the kind of image you load...
Acceptable values are "bitmapOnLibrary", "mcOnStage", "externalLink"
if you set "bitmapOnLibrary" you have to define a linkage to a bitmap image of library (be careful, not to a movieclip). If you set "mcOnStage" you need to define an instance name of a movieclip on stage. if you set "externalLink" your image will be loaded from the harDisck or from the net.
DeleteGame myIstanceNamePuzzle.deleteGame();
It deletes all puzzle's pieces!
Draw Solution myIstanceNamePuzzle.drawSolution();
this method puts all pieces in the right position (but does not merge them)!
Set BgVisibility myIstanceNamePuzzle.setBgVisibility(visiblility);
It sets the a visible or transparent background
visiblility A Boolean value indicating the visibility of background
Set BgColor myIstanceNamePuzzle.setBgColor(color);
set the color of background
color A Color value indicating the visibility of background (0x00FF33)
Set OutLine myIstanceNamePuzzle.setOutLine(visibility, color);
visibility A Boolean value to show or hide the outline. The default value is true
color the outline color of pieces when they are clicked
Set Sounds myIstanceNamePuzzle.setSounds(soundMergPieces, soundWinner);
soundMergPieces A library linkage of a sound. It will be used everytime you merge some pieces!
soundWinner A library linkage of a sound. It will be used when you win!
Set Volume myIstanceNamePuzzle.setVolume(number);
number A number from 0 to 100 indicating the volume of all sound of myIstancePuzzle
Size myIstanceNamePuzzle.size(width, heigth);
this function resizes the background area!
if the image you load is bigger, it will not resize.
width A number
heigth A number
onComplete myIstanceNamePuzzle.onComplete = function(){
trace("Good Your Puzzle is finish!!!!")
}
this event is called when all pieces are to be merged!