2 Replies Latest reply on Apr 3, 2008 6:22 AM by Mr.Wallace

    Dragging & Dropping

      Well, here I am again...STUMPED, LOL!!!

      Basically, I'm trying to create something that will let me drag an object (object_A) onto a hit area (object_B) and give it the exact same x and y coordinates as object_B.

      I know object_A has to be a movie clip with a button inside of it and that the code has to go on the button, not the movie (because the 'drag' function only works with a handler like on_press for example).

      Anyways, this is the code that I have right now:

      on (press) {
      on (release) {
      if (eval(object_A._droptarget) == _root.object_B) {
      object_A._visible = false;
      } else {
      object_A._x = x_480;
      object_A._y = y_90;


      The other catch is...object_A needs to be able to be dropped onto several possible hit targets, not just object_B (eg. object_C and object_D).

      Not sure if it makes any sense to anybody but, if you have any ideas they would be greatly appreciated!