View Full Version : jigsaw puzzle game
kellie
08-26-2002, 03:58 AM
I would like some help with jigsaw scripting.
I want the pieces to snap into place and then and merge into a smooth finished picture when it is done and then play a animation.
Please help I cant get the pieces to snap into place and then merge the puzzle has completed. Does anyone have some cool code for this
cheers kellie
farafiro
08-26-2002, 09:24 AM
for snaping u just make the hitTest() absolute, likeonClipEvent(enterFrame){
if(this.hitTest(piece1._x,piece1._y,true){
this._x = piece1._x
this._y = piece1._y
}
}and if u r doing the drag thing on the mc, u could stop the drag then
kellie
08-26-2002, 10:35 PM
thanks farafiro
Please be patient with me, in the code where you have
piece1 I am guessing that that is the instance name that you have given your piece and then for the x and y values does this mean that Each piece has a registration point that lines up with the dead centre of the stage?
k:confused:
farafiro
08-27-2002, 07:25 AM
yes, u make all of your pieces movie clips. So the all have a registration pont (_x/_y).
Then, we also make our board into pieces as holders for the puzzles, and attach the code that I gave u to it
drumn4life0789
02-19-2007, 10:29 PM
I am doin a jigsaw puzzle as just a fun project to do.
I have made everything work the way i want except for two things.
I have a timer which I want to start when a certain button is pressed. Right now it starts cound as soon as you open the file, but only appears when you press the button.
Also the way i have my pieces set up is each actuall piece is piece#_mc, and it snaps into place when it has the same x/y coordinates as target#_mc.
I was wandering if anyone knew of how to make it where once all the pieces have attached to there target (puzzle is finished). it goes to another frame/scene.
thanx in advance
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.