That's a very interesting question. What do you mean by snap together:
1) If the correct piece is near the right spot, it jumps to the right spot and doesn't move anymore?
2) If two pieces are touching each other they can be moved together as a group by dragging either one?
3) Pieces make a snapping sound when they touch each other?
Depending on what behavior you want the pieces to do, there may be a couple of ways to make it happen. But first you need to decide exactly what you are going to try and make the project do.
Offline
My son and I worked on a jigsaw puzzle project for a while, but finally gave up on it, as it seemed to require too many variables to be fun to write (arrays would have made things much easier). Maybe someday we'll have a bright idea for a better, simpler way to implement it and try again.
Offline
I once made a (Scratch-like) project about jigsaw puzzle pieces which can be snapped together:
http://scratch.mit.edu/projects/Jens/10220
But Kevin's right: It only has 3 pieces and is already *so* complicated that any 'real' puzzle just wouldn't be fun to code.
However, chalkmarrow did a really cool project about snapping sprites to a grid. Check out his project here:
http://scratch.mit.edu/projects/chalkmarrow/54925
By modifying his idea you could make a real puzzle way easier!
Offline