A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: drag and drop game

  1. #1
    Senior Member
    Join Date
    Jan 2006
    Posts
    102

    Unhappy 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??

  2. #2
    Senior Member
    Join Date
    Jan 2006
    Posts
    102
    i forgot to mention that im working with actionscript 2.0

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center