Sliding Puzzle AS3 Class

Sliding Puzzle AS3 HelpSliding Puzzle AS3 Help

Help documentation and instructions about installing and using the Sliding Puzzle AS3 Component for Flash CS4 developed by someFrogs. 

Flash Sliding Puzzle AS3 Class

Sliding Puzzle AS3 Component Class Methods, Properties and Events

Package com.someFrogs
Class: public class SlidingPuzzle
Inheritance: SlidingPuzzle > FrogUI > UIComponent
Implements: IFocusManagerComponent

Properties, Methods and Events supported by Sliding Puzzle AS3 Component Class for Flash CS4.

  • 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
      • emptyCorner: String property
        Indicates the piece that will be hiden. The possible values are: "LT" for left-top, "RT" for right-bottom, "LB" for left-bottom, and "RB" for right-bottom. The default value is "RB".
      • finishMixAt: String property
        Indicates the corner that the mix will be finished at. The possible values are: "LT" for left-top, "RT" for right-bottom, "CC" for the center, "LB" for left-bottom, and "RB" for right-bottom. The default value is "LT".
      • gridSpacing: Number property
        Indicates the space in pixels, that will be set between the pieces. The possible values are 0-10. The default value is 1.
      • hintStyle: String property
        Indicates the style of the hint numbers. The possible values are: "none", "count" and "matrix". "none" by default.
      • 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.
      • 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.
  • 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
      • SlidingPuzzle: Constructor method
        Creates a new SlidingPuzzle component instance.
      • 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.
  • 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.
      • pieceMove: com.someFrogs.puzzle.PuzzleEvent.PIECE_MOVE
        Dispatched when a puzzle piece is moved.
      • 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 Sliding Puzzle AS3