A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: dragging on a clip event

  1. #1
    "way too many questions"
    Join Date
    Feb 2001
    Posts
    312
    I had a problem a few weeks ago and it's still not solved

    On the mouse move over a movieclip ( which i made invisible)
    some thing needs to be dragged.
    When i am out of the movieclip the drag should be over

    onClipEvent (mouseMove) {
    startDrag ("_root.selecter", true);
    }


    As you can see... my knowledge is poor...I understand most of the actionscript now but making it for my self is HARD

    can anyone give me help

    I played around with the HitTest but i can't really figure that one out...


    H E L P


    Joris

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Posts
    1,180
    Hi..
    Place the following code on the MC you wish to drag:

    onClipEvent (mouseDown) {
    if (this.hitTest(_root._xmouse,_root._ymouse,true)) {
    startDrag (this);
    updateAfterEvent();
    }
    }
    onClipEvent (mouseUp) {
    stopDrag ();
    }

    Hope this helps.

  3. #3
    "way too many questions"
    Join Date
    Feb 2001
    Posts
    312
    Yes , this is a good start ( i understand the hit test now...that's easy hahaha i putted the code on the timelne instead of the MC)

    thank you!

    Iam trying to fix the drag thing now...

    Joris

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