1 Reply Latest reply: Jul 25, 2011 10:50 AM by kglad RSS

    How to restrict boundary on drag and drop

    Kirubakaran Srinivasan Community Member

      Hi all

       

      I am facing one problem that i want to restrict my boundary while my object is moving around a area.

       

       

      So i want to move my black color ball only one position left/right/bottom or top.

       

      Eventhoung if my ball presents in the left side edge it should move left side. same thing for upper side, bottom side and right side.

       

      How can i achieve?

       

       

      right now

      i m using Mouse Down for Drag

      MouseUP for Drop

      Inbetween MouseMove for finding its co-ordinates

       

      so give me some ideas to achieve this.

       

      (This Bejeweled game concept)

      DragMove.png