Hi all,
I’m having a problem with rotating individual jigsaw pieces. When I click on a piece (movie clip) and try to rotate it using the space bar another piece rotates instead. Here is the script that I’m using:
on(press){
startDrag(this);
this.swapDepths(100);
}
on (keyPress “<Space>”){
this._rotation +=90
}
on (release){
stopDrag();
if
(this._droptarget=="/target1")
{
setProperty(this,_x,322.9);
setProperty(this,_y,89.7);
}else{
setProperty(this,_x,141.2);
setProperty(this,_y,91.3);
}
}
It seems that I need to specify the instance name of each piece in the respective scripts. The instance name of the ‘jigsaw piece’ above is ‘piece 1’. Could someone please help in correcting this script.
Thanks