|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Jigsaw with Flash
I am trying to make an e-jigsaw with Maromedia Flash 2004 Pro and am using the following actionscript to enable click and drag capabilities to each piece, which is a Movie Clip:
on (press) { startDrag (""); } on (release) { stopDrag(); } However, what I really want is for the pieces to jump to the correct place when it gets within say 8 pixels. I'm sure this is possible as I've seen similar effects before but being the Flash novice that I am I don't know how to do it! Can anyone advise me how this can be done? Joe |
|
#2
|
|||
|
|||
|
Hi, it kind of depends on how all your spaces are set up. If it's just a blank space the following wont work. If each space is it's own movie clip then try this out:
Code:
on (release)
{
if(this.hitTest(_root.space10)
{
this._x = _root.space10._x;
this._y = _root.space10._y;
}
stopDrag();
}
That's assuming this particluar pieces match is on the main stage and it's instance name is space10. |
|
#3
|
|||
|
|||
|
Thanks Tann.
However, that was a little too technical for me ![]() How do I make spaces and what are they? Thanks again Joe |
|
#4
|
|||
|
|||
|
Hi, I just meant the blank area where you would drop the jigsaw piece. You said something like "when it gets to within 8 pixels..." well I meant the thing that it would be 8 pixels near....
|
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Jigsaw with Flash |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|