by Vivienne Trulock
Created and designed by Vivienne Trulock for ilikecake, 2005
see final jigsaw movie.
Set the movie width and height to 700 * 400.
Import jigsaw images,
create a 'play again' button, and arrange as in the image.
To make each jigsaw sprite moveable, select it and click on the 'moveable sprite' icon in the sprite properties window.

The sprite script attached to each jigsaw-piece sprite looks something like this. The code tests whether the sprite has been placed within 40 pixels of its correct position. If it has, it sets the sprite to that position, and makes it immovable. LocV is the vertical location, locH is the horizontal location.
The numbers differ depending on the position of the piece in the jigsaw. To find the x,y coordinates of a piece of jigsaw, just place it in the correct position in the grid on-stage, and look up the sprites properties.
The sprite script attached to the play-again button looks like this. The sprites location is reset to a position on the right of the stage and the sprites are once again moveable.
Loop the movie on the final frame.
on exitFrame me
go to the frame
end
This script rotates the jigsaw piece by 90 degrees on a right click if it is not in its correct position
on mouseUp me
if sprite(3).locV<(70) then
if sprite (3).locV>(30) then
if sprite(3).locH<(70) then
if sprite(3).locH>(30) then
sprite(3).loc = point (50,50)
sprite(3).moveableSprite = FALSE
sprite(3).rotation = 0
end if
end if
end if
end if
end
on rightmouseDown me
if sprite(3).loc = point (50,50)then
sprite(3).rotation = 0
else sprite(3).rotation = integer(sprite(2).rotation + 90) mod 360
end
This script plays the sound of the ding.wav file from the cast on mouse down, in sound channel 2. Simply attach it to the desired sprite.
on mousedown me
puppetsound "ding" 2
end