Jigsaw Puzzle AS3 Help
Help documentation and instructions about installing and using the Jigsaw Puzzle AS3 Component for Flash CS4 developed by someFrogs.
Flash Jigsaw Puzzle AS3 Class
Jigsaw Puzzle AS3 Component Class Properties, Methods and Events
Package: com.someFrogs
Class: public class JigsawPuzzle
Inheritance: JigsawPuzzle > FrogUI > UIComponent
Implements: IFocusManagerComponent
Properties, Methods and Events supported by Jigsaw Puzzle AS3 Component Class for Flash.
- Properties
- Load Properties
- bytesLoaded:
Number [read-only]property
Gets the count of bytes of content that have been loaded. - bytesTotal:
Number [read-only]property
Gets the count of bytes of content to be loaded. - content:
DisplayObject [read-only]property
Gets a reference to the content loaded into the Jigsaw Puzzle component. - percentLoaded:
Number [read-only]property
Gets a number between 0 and 100 indicating what percentage of the content is loaded. - source:
Objectproperty
Gets or sets an absolute or relative URL that identifies the location of the SWF or image file to load, the class name of a movie clip in the library, a reference to a display object, or a instance name of a movie clip on the same level as the component.
- bytesLoaded:
- Puzzle Properties
- mixAnimation:
Stringproperty
Gets or sets a value that indicates the animation to be applied while mixing pieces. Available options are: "full", "short" and "none". "short" by default. - puzzleXML:
XMLproperty
Gets or sets an XML Object containing the current puzzle setings and piece positions, can be used to save puzzles to be solved later. The puzzle can be restored by passing the XML object got before, to the puzzleXML property. - rotatePieces:
Booleanproperty
Gets or sets a value that indicates whether the puzzle pieces can be rotated using the spacebar, arrow keys and mouse wheel. Don't forget to put a notice to your application about functionality of the keys. - scrollContent:
Booleanproperty
Gets or sets a value that indicates whether the picture will be resized to fit the work area, or scrolling will occur to obtain the necessary work area if the picture is bigger than 90% of the work area. - sourceRenderAs:
Stringproperty
Gets or sets the way the source will be rendered. Available options are "Bitmap" and "MovieClip". Prefer "Bitmap", for better performance, if you're not about to render an animation movie. - startAfterLoad:
Booleanproperty
Gets or sets a value that indicates whether the puzzle shall start immediately after the content is redy (loaded or initialized). If it's set to false, astart()command is expected to trigger the puzzle. - splitHorizontal:
Numberproperty
Gets or sets the value indicating the horizontal number that the puzzle will be split to. This number may occur as the vertical division number (after silent swap with splitVertical), in order to obtain more square-like pices. Available values are 2 to 36. - splitVertical:
Numberproperty
Gets or sets the value indicating the horizontal number that the puzzle will be split to. This number may occur as the vertical division number (after silent swap with splitHorizontal), in order to obtain more square-like pices. Available values are 2 to 36. - shapeStyle:
Stringproperty
Gets or sets the shape style of the jigsaw puzzle pieces. Available options are "classic", "oval", "sqare", "triangle" and "mixed".
- mixAnimation:
- Load Properties
- Methods
- Load Methods
- load:
load(request:URLRequest, context:LoaderContext = null):voidmethod
The request parameter of this method accepts only a URLRequest object whose source property contains a string, a class, or a URLRequest object.
- load:
- Puzzle Methods
- rotateActivePiece:
rotateActivePiece(dir:int):voidmethod
Rotates the active piece (last clicked), 90 degrees, clockwise if dir>0, and counterclockwise if dir<=0. - start:
start():voidmethod
Starts or restarts the puzzle with the current settings. If the content is not redy when command occurs, then a flag is set to start the puzzle after content load. Also the command is auto-generated, after content is ready, ifstartAfterLoadis set totrue. - showHint:
showHint(blinkCount:uint = 5):voidmethod
Shows a hint to solve the puzzle by blinking two neighbour pieces. - solve:
solve():voidmethod
Strats the animated solving procedure. - solveStop:
solveStop():voidmethod
Stops animated solving procedure started withsolve().
- rotateActivePiece:
- Load Methods
- Events
- Load Events
- complete:
flash.events.Event.COMPLETE
Dispatched when content has finished loading. - init:
flash.events.Event.INIT
Dispatched when the properties and methods of a loaded SWF file are accessible. - ioError:
flash.events.IOErrorEvent.IO_ERROR
Dispatched after an input or output error occurs. - open:
flash.events.Event.OPEN
Dispatched after a network operation starts. - progress:
flash.events.Event.PROGRESS
Dispatched while content is loading. - securityError:
flash.events.SecurityErrorEvent.SECURITY_ERROR
Dispatched after a security error occurs while content is loading.
- complete:
- Puzzle Events
- contentReady:
com.someFrogs.puzzle.PuzzleEvent.CONTENT_READY
Dispatched when content is ready - has finished loading or initialized from an internal class. - pieceDown:
com.someFrogs.puzzle.PuzzleEvent.PIECE_DOWN
Dispatched when a puzzle piece is clicked. - pieceMatch:
com.someFrogs.puzzle.PuzzleEvent.PIECE_MATCH
Dispatched when a puzzle piece matches an other. - pieceRotate:
com.someFrogs.puzzle.PuzzleEvent.PIECE_ROTATE
Dispatched when a puzzle piece is rotated. - pieceUp:
com.someFrogs.puzzle.PuzzleEvent.PIECE_UP
Dispatched when a puzzle piece is released after down. - puzzleStart:
com.someFrogs.puzzle.PuzzleEvent.PUZZLE_START
Dispatched when the puzzle is started. - puzzleDone:
com.someFrogs.puzzle.PuzzleEvent.PUZZLE_DONE
Dispatched when the puzzle is done.
- contentReady:
- Load Events








