-
drag and drop game
Hello all!
I am developing a simple drag and drop game.
...except my draggable items are in a movie clip and my targets are also in a movie clip.
My draggable objects work fine, they drag and snap back into place when the mouse is let go, but... they dont snap to their targets.
They do snap to their targets when they are directly on the timeline, but inside another movie clip it doesnt work and i can't figure out why.
This is the code i have on my objects:
on (press) {
startDrag(this);
}
on (release) {
stopDrag();
if (eval(this._droptarget) == _root.visions_mc.snakevision_mc) {
this._x = _root.visions_mc.snakevision_mc._x;
this._y = _root.visions_mc.snakevision_mc._y;
}
else {
this._x = 829.7;
this._y = 876.6;
}
}
"_root.visions_mc.snakevision_mc" is the target which is inside a movie clip
how can i override this???
does anybody know??
-
i forgot to mention that im working with actionscript 2.0