A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: whats up with the onDragOver event?

  1. #1
    i have a bunch of mc's with an onPress event assigned to each. what i would like to be able to do is click once and while the mouse button is down, move the cursor to any of these mc's and trigger its action.

    i thought a drag over seemed like a reasonable way of doing this, but the onDragOver event seems to only get called if you click on the mc, drag out of it, and then back on, as opposed to clicking outside of the mc and draging onto it.

    this seems like a poorly designed event unless i am using it incorrectly (although the reference guide seems to confirm my finding).

    question 1: what possible use could this event serve?
    question 2: does anyone know of another way to trigger events while the mouse is down?

    thanks,
    ryan

  2. #2
    Senior Member
    Join Date
    Jan 2002
    Posts
    213
    well, you use

    onClipEvent (mouseDown) {
    if (hitTest(_root._xmouse, _root._ymouse, true)) {
    trace("works!");
    }
    }


    this may work for you?

    i think it's what your mean.

    howard.

  3. #3
    Senior Member
    Join Date
    Sep 2001
    Posts
    178
    Hi,
    Try This:

    Code:
    onClipEvent (mouseDown) {
        mousepressed = true;
    }
    onClipEvent (mouseUp) {
        mousepressed = false;
    }
    onClipEvent (enterFrame) {
        if (mousepressed) {
            // Triggered Actions Go Here
        }
    }

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