I recently posted one way to do something similar on my blog:

--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui



On 2/8/10 1:00 PM, "lilolbear" <lilolb...@yahoo.com> wrote:






Greetings everyone!

I have been working on a drawing application in AS3 and have come to the 
determination that the dragging of items around on a canvas is best left to the 
drag manager. There are many things that the drag manager validates and handles 
for you that make the presentation smooth and happy.

What I am trying to accomplish is to constrain movement to 45 degree angle from 
a provided point. So that it can only be dropped on one of the cardinal points. 
If you have pressed shift while drawing a line in most drawing applications 
then you have most likely run into this.

My thought was to extend the DragManager class to add in a point to its 
parameters that drag movement would be constrained to.

Has anyone done or come across something like this? Have suggestions?






--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui

Reply via email to