dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Jigsaw

  1. #1
    Convicted Flasher
    Join Date
    May 2003
    Location
    Leeds, UK
    Posts
    40

    Jigsaw

    I want to design a dynamic jigsaw so that different pictures can be uploaded and used simply by putting the correct sized jpegs into the same folder. The jpegs will then be dynamically loaded into a movie clip.

    What i would like to know is:

    - is there a way of making a movie clip that is made of of other movie clips to make the pieces?

    So that when a new picture is uploaded it as automatically cut into pieces?

    Tim

  2. #2
    Resident Shostakovich Scholar
    Join Date
    May 2003
    Location
    Nottingham, UK.
    Posts
    299
    Whoa... that's an amitious project. I can't see it being possible, since I'm not aware of a facility whereby you can take inputted images and cut them up into several images with a predefined function. And that's before you program Flash to understand the jigsaw game and tell it to understand the different shapes which will form together.

    As far as I can see the only way you could get near that is to use the entire picture for each piece, but just have each piece as a kind of window whereby only a certain part of it can be seen, giving the effect of it just being part of the picture, not all of it. Exactly how to do that, I don't know.

    Perhaps someone else has a better method...

  3. #3
    Convicted Flasher
    Join Date
    May 2003
    Location
    Leeds, UK
    Posts
    40
    I've kinda had an idea how to do it now, along the same lines at what you suggested. It is quite a difficult project, i think i might have to post a tutorial when i finish it!

  4. #4
    Senior Member
    Join Date
    Sep 2001
    Posts
    443
    There is quite a bit to do with a jigsaw project. The main point is to have the "pieces" as masks over the picture you want, and each mask being an mc that has a specific position (that can be tested to see if its returned to the right place). The pieces can be made random - though I started from a random piece in the top left hand corner then the next piece to the right has two sides that aren't random, i.e. the top flat edge and the right bit to fit into the first piece (if you see what I mean).

    Whether you make the number of pieces, mc's, masks change is up to you - but I did find that there was no way of speeding up the mouse movement if you have greater than 100 pieces (10x10) - that's just FLASH for you (JAVA would be better)

    http://194.131.128.207/flash/examplesmenu/jigsaw.swf

    Have a look at the speed difference between 2x2 and 10x10 in the above example. Also check the lugs on the pieces for different games(same picture) they are random, honest. Don't even think of random shapes for the lugs - way too complex.

    By the way the left and right arrows rotate the pieces (also randomly placed and rotated)

    swills

  5. #5
    Convicted Flasher
    Join Date
    May 2003
    Location
    Leeds, UK
    Posts
    40
    Thats brilliant cheers, thats kind of what i was thinking and ive started doing it like that, ive made it so the jigsaw draws random pics from a file and then the pics get made up from this speed. Its only for children so they wont need to be as big as 10x10 also its going to be run from a cd not off the net so filesize isnt relly an issue. Thanks for your help, at least i know ive got the right idea!

    Tim

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