A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Single spawning jigsaw piece

  1. #1
    Junior Member
    Join Date
    Dec 2009

    Single spawning jigsaw piece

    Hello there, i'm quite a newbie to designing games in flash.

    I know how to make a basic jigsaw but at the moment i'm trying to create a map of europe jigsaw. Unfortunately with the map taking up the majority of the room there's no space to have all the pieces on screen at once.

    I had a look for solutions and i found this...


    How would i go about making it so that only 1 piece appears on screen until you have placed it?

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Here, no there
    I can't see the link from here, but just thinking about the problem and possible solutions this is what I would do.

    Not sure of which version of actionscript you are using, but I would store the various puzzle pieces in the library, no need to place them on the stage until I need them. I would also have an array that contains the name of each piece, along with a column for a boolean value (piece placed or not) and the position of the piece if placed. As the user adds a piece of the puzzle, I would loop through this array and pull up the next available piece until it is all complete. If a piece is available, then I would add it to the stage for the use to move about.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center