Drag & Drop Issue (locking to target object)
Hi,
I've been working with an interactive game and I've set up my objects (to drag) in one layer with their object targets in another. Export settings Flash 8 AS2 (requirement for the site it's being uploaded to).
My objects have to snap back to their original position if they don't land on their target, and I have that working. What I can't get to work is for the object to snap into the box I've created.
Both the object and the target have been converted to movie clips and the taget has been given an instance name (targetone) I've used that instance name in the action script that's been put on the object. Both target and object have their anchor points centred for X,Y purposes.
Here is my actionscript:
on (press)
{
startDrag(this);
}
on (release)
{
stopDrag();
if(this._droptarget =="/targetone")
{
this._x=_/targetone._x;
this._y=_/targetone._y;
}
else{
this._x = 319.95;
this._y = 138.75;
}
}
It just won't snap into the box. The object is text converted to paths (large text) and the box is also large. I tried increasing it as I thought it may be having issues with locking in but to no avail
Any help would be greatly appreciated!
Stu
