Jigsaw Puzzle AS3 Class

Jigsaw Puzzle AS3 HelpJigsaw 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: Object property
        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.
    • Puzzle Properties
      • mixAnimation: String property
        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: XML property
        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: Boolean property
        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: Boolean property
        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: String property
        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: Boolean property
        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, a start() command is expected to trigger the puzzle.
      • splitHorizontal: Number property
        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: Number property
        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: String property
        Gets or sets the shape style of the jigsaw puzzle pieces. Available options are "classic", "oval", "sqare", "triangle" and "mixed".
  • Methods
    • Load Methods
      • load: load(request:URLRequest, context:LoaderContext = null):void method
        The request parameter of this method accepts only a URLRequest object whose source property contains a string, a class, or a URLRequest object.
    • Puzzle Methods
      • rotateActivePiece: rotateActivePiece(dir:int):void method
        Rotates the active piece (last clicked), 90 degrees, clockwise if dir>0, and counterclockwise if dir<=0.
      • start: start():void method
        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, if startAfterLoad is set to true.
      • showHint: showHint(blinkCount:uint = 5):void method
        Shows a hint to solve the puzzle by blinking two neighbour pieces.
      • solve: solve():void method
        Strats the animated solving procedure.
      • solveStop: solveStop():void method
        Stops animated solving procedure started with solve().
  • 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.
    • 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.
Using Jigsaw Puzzle AS3