I am currently working on Drag-Drop interface. I need some help on a piece of action script:
I am trying to make my draggble object return to its original position if the object is not placed on the target, to add to this piece of code
code:
on (press) {
this.startDrag(false);
}
on (release) {
this.stopDrag();
if (this.hitTest (_root.target)) {
this.stopDrag();
this._visible = false;
_root.target.nextFrame();
}
}
At the moment the object just stays where you last had it.
here is the example at the moment:
If any one could help on this I'd be most grateful.
There's more in heaven and Earth than dreamed of in our philosophy!
I am trying to make my draggble object return to its original position if the object is not placed on the target, to add to this piece of code
code:
on (press) {
this.startDrag(false);
}
on (release) {
this.stopDrag();
if (this.hitTest (_root.target)) {
this.stopDrag();
this._visible = false;
_root.target.nextFrame();
}
}
At the moment the object just stays where you last had it.
here is the example at the moment:
If any one could help on this I'd be most grateful.
There's more in heaven and Earth than dreamed of in our philosophy!