A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: rollOver when dragging

  1. #1
    Junior Member
    Join Date
    Aug 2001
    Posts
    2
    I am trying to figure out how to detect when a movie is dragged over an object so that I can change the color of the movie/object that the dragged clip is over.

    For example:
    I have two draggable clips, clipA and clipB

    ------------
    ------------
    ---clipA----
    ------------
    ------------


    ------------
    ------------
    ---clipB----
    ------------
    ------------

    I want to change the color of clipA when I drag clipB over it (not when I release it). Is there a way to detect the _dropTarget when I mouseOver a clip...not just on the release clip event?

    Can anyone help me?

  2. #2
    Senior Member
    Join Date
    Dec 2000
    Posts
    142
    Well i wouldnt use _dropTarget i would use hitTest. If your dragging MCs you obviously know how to use hitTest. I would do something similar to the following

    <CODE>
    code for ClipA

    on clipEvent(mouseDown) {
    if (this.hitTest(_root.mymouse)) {
    // dragging clipA

    if (this.hitTest(ClipB)) {
    change color
    }

    }
    }
    </CODE>

    hope this helps

  3. #3
    Junior Member
    Join Date
    Aug 2001
    Posts
    2
    thanks...I should have though of hitTest.....doh

    I am trying it right now

  4. #4
    Senior Member
    Join Date
    Dec 2000
    Posts
    142
    no problem

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