9 Replies Latest reply on Mar 10, 2013 2:55 PM by Siderz95

    How do you drag and drop to multiple targets?


      I know this has been asked a lot, but all the threads I've looked at seem to make it too complicated/are for AS3.


      I'm making a drag and drop game which involves mixing and matching, so I want it so you can drag one object and decide on which side that object should go on. I've also added simple click sounds for when you drag and drop. Here's the code I've got:


      on(press) {




      on(release) {


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


      this._x = _root. target._x;

      this._y = _root. target._y;





      this._x = 423.95;

      this._y = 109.45;








      I was hoping that I could simply copy and paste "if (this._droptarget == "/target") {" below the "  _root.mySound.start(0,0);" and just replace 'target' with 'target2', but this doesn't work.


      I'd rather modify the code I've got rather than introduce a new string (Is 'string' a correct term?), but if someone can get me a simple to read string which includes sound as well, I will be happy to use it.