A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Dragging 2 objects at once? how?

  1. #1
    Member
    Join Date
    Mar 2001
    Posts
    67
    Hey there.

    I am currently designing an interactive map and there is a vertical linear element which is draggable. Easy enough, but the part I am having trouble with is that I want to simultaneously drag a mask which reveals what is beneath it while dragging. Is there a simple way to do this?

    Any help appreciated! thanks!


    S

  2. #2
    you cannot 'drag' two movieclips at one time.

    what you need to do is make a 'faux drag' as follows:

    have two movieclips, one to control, one to be dragged.
    put this code on the control clip:

    onClipEvent(mouseMove){
    //30 and 10 are your offsets, to put the clip down and to the right of the mouse cursor
    _root.clipToBeDragged._x=_root._xmouse+30;
    _root.clipToBeDragged._y=_root._ymouse+10;
    }

    and that's it.

    hope this helps

    George

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