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)
you can use rectangle parameter in your startDrag() method to limit movement to the 3square x 3square rectangle centered on your dragged object and have your object snap to the nearest allowable grid position on stopDrag().