how i can move object by draggable behavior up and down only … within a certain distance in pixels?
Is something like this what you’re looking for?
Obviously, you can use your own limits and values, I just used these for an example. If you need me to explain what’s going on, or if this isn’t what you are looking for, please let me know.****
****If you wanted limits horizontally (X-Axis), then you can use the same code as above, just change them from Y-Positions to X-Positions
very Wonderful … big thanks for you … yeah i understand of your explain how to change to X position … well let me ask you how to drag also angular direction within a certain distance in pixels up and down … thanks again
In this case, just get rid of the line where you set the X position (see below).
If you still want limits on X axis, just use the same code from the up/down limits but with X position events.
Also just thought of this, but you can also use the
Stay on Screen extension to set limits (or no limits) in certain directions. Below is some help:
Stay On Screen
Download it from the extension library and add the behavior to the object. You can set those limits then. This method only works if you want the object to stay on the screen. If your limits have nothing to do with staying on screen or you want to be able to change limits, keep the code I showed earlier.
that’s very well… but in my last question … I want it in a straight line in the direction of the corner … like up and down in your first answer … thanks
thanks for the extension I will download it >>>