The following code, when placed in a symbol, will make it draggable:
on (press) {
startDrag (this);
}
The following code will make a symbol
droppable:
on (release) {
stopDrag ();
}
The following conditional code determines
the snap location of the symbol once it is dropped:
on (release) {
stopDrag ();
if (this.hitTest(_parent.potatoclip)) {
setProperty (this, _x, "265"); //set to correct position on potato
setProperty (this, _y, "115");
}
else {
setProperty (this, _x, "59.4"); //reset to start position
setProperty (this, _y, "175");
}
}