Im tryin to do a thing for a kids game where you have six dropzones and 12 dragable items. Im wanting to know how to drop the dragables onto any dropzone
heres the code I have on my dragables
onClipEvent (load) {
origx = this._x;
origy = this._y;
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startdrag();
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.stopDrag();
if (_parent.dropzone1.hitTest(this._x, this._y, true)) {
this._x = _parent.dropzone1._x;
this._y = _parent.dropzone1._y;
}
}
}
I would be really greatfull if someone could help cuz im running out of time on this one! wasted loadsa time tryin to sort it!
Thanks
Neil.
heres the code I have on my dragables
onClipEvent (load) {
origx = this._x;
origy = this._y;
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startdrag();
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.stopDrag();
if (_parent.dropzone1.hitTest(this._x, this._y, true)) {
this._x = _parent.dropzone1._x;
this._y = _parent.dropzone1._y;
}
}
}
I would be really greatfull if someone could help cuz im running out of time on this one! wasted loadsa time tryin to sort it!
Thanks
Neil.