2 Replies Latest reply on Jul 18, 2006 9:16 PM by twistedpancreas

    Whats wrong with my muliple drag and drop code?

    twistedpancreas
      I've got ParaA, ParaB, and ParaC ( http://img.photobucket.com/albums/v292/pancreasboy/misc/para.gif ) which are dragable mc's (ie they have buttons inside them with the code below), they can be dropped onto any of the mc's Para1, Para2, and Para3.

      Here's the code for ParaA button:

      on (press) {

      startDrag(this, true);

      this.ox = this._x;
      this.oy = this._y;
      }

      on (release) {

      stopDrag();

      {
      if (this._droptarget == "/Para1")

      {
      _root.Para1.gotoAndStop(2);
      }

      if (this._droptarget == "/Para2")

      {
      _root.Para2.gotoAndStop(2);
      }

      if (this._droptarget == "/Para3")

      {
      _root.Para3.gotoAndStop(2);
      }

      else

      {

      this._x = this.ox;
      this._y = this.oy;

      }

      }

      stopDrag ();
      }

      When you drag ParaA to any of the mc's Para1, Para2, or Para3, it executes the relative _root.Para#.gotoAndStop(2); but only snaps to Para3. Have I missed something?

      Thanks in advance.