2 Replies Latest reply on May 18, 2008 10:21 AM by clbeech

    dragOver problem

      I have a set of 'targets' (target_mc) which are movie clips and I want to get an action to occur (red frame to appear around the target) when another movie clip with a label in it (label_mc) is dragged over it.
      I can get the onRollOver to do it but that's not what I want. I want the red frame to appear when label_mc is dragged over it.
      How is it best to do this?
        • 1. dragOver problem
          Ned Murphy Adobe Community Professional & MVP
          Try Googling "Flash collision detect" and you may find some step by step help you can utilize. Here's one result from that search:

          • 2. Re: dragOver problem
            clbeech Level 3
            yes this is a 'bounds' based hitTest method - the reason that they are using a 'square' shape here is that it will fill the entire bounding area of the clip. This is one of the native hitTest methods in Flash - you can also use a limited 'shape' based method as well native to Flash but it will use only a single coordinate position - more information is a available HERE

            However, it seems as though you also are wanting to check a 'series' of clips on the Stage right? so you will also need to loop through the available target clips - best way to do so is to store them in an array and use a FOR loop hitTesting against each instance within the array.