title: How can I drag an object with collision detection?
body: <p>I want to create a function in which I can drag a MovieClip which will bump into other MovieClips on the stage without overlapping them. (i.e. the object cannot be dragged over or through other MovieClips).</p>
  
  <pre><code>function dragHolder01(event:Event):void{
      if (mouseDownHolder01 == true) {
          for(var m:int = 0;m&lt;blockHolder.numChildren; m++){
              var hitBlock:DisplayObject = blockHolder.getChildAt(m);
              if(movaHolder01.hitTestObject(hitBlock)){
                  movaHolder01.x = movaHolder01x;
                  movaHolder01.y = movaHolder01y;
                  break;
              }
          }
          movaHolder01.startDrag();
          movaHolder01x = movaHolder01.x;
          movaHolder01y = movaHolder01.y;
      }
  }
  </code></pre>
  
  <hr>
  
  <p>I think I might have a conceptual solution but I need your help.
  I thought that maybe I can limit the "startDrag" to allow for dragging in accordance with the frames progression, i.e. the player will not be able to drag the object more than one pixel for each frame (and so cannot drag the object INTO another by more than one pixel).</p>
  
  <p>Any ideas on how to do that?</p>