View Full Version : load picture into Jiggsaw puzzel
Chris_S
03-24-2005, 09:24 AM
I try to make an jiggsaw puzzle that you can load your one picture into.
I use a mask around the hole picture to make the pices. It works, the problem is that I see all the pices, but when I try to lift them, the size is not only the maskt area, its the hole picture, so I select wrong pices, they overlapp.
Hope some of you anderstand my English and the problem I have.
/ Chris
Chris_S
03-25-2005, 10:52 AM
I wonder if I can I make the maskt part of an picture to be an signle pices?
So the reel sizs of the pices is not the hole picture. Can I save the maskt part to a new picture (imageclip) ?
/ Chris
jjbilly
03-25-2005, 12:09 PM
I think what you already have is right (or at least, the same as what I've done!)
You have: each piece is a movie clip which consists of the whole picture on one layer, and a mask above that which is a solid shape of your jigsaw piece.
So, let's call one piece piece1_mc; it's got two subclips, one which is the whole picture (image_mc), and one which is the mask (mask_mc).
What you need to do is to make sure that you refer to the mask when you are detecting your mouse events - I suspect you are doing something like
piece1_mc.onPress=function(){
this.startDrag()
}
instead, try
piece1_mc.mask_mc.onPress=function()
this._parent.startDrag()
}
If you're using an authortime mask on a layer above the picture, you'll need to make it a movieclip with an instance name.
Hope this helps.
j
Chris_S
03-25-2005, 02:12 PM
Thanks! Its exactly my problem. I refer to the hole MC. Now I think I can fix it.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.