RE: [Flashcoders] Drag on a specific angle

2007-01-05 Thread Merrill, Jason
We investigated this recently. We found the easiest thing to do was create the drag interaction on a clip which has the standard horizontal orientation, and then rotate that clip. Constraining it to a sloped line was possible, but very tough to get smooth. Jason Merrill Bank of America

RE: [Flashcoders] Drag on a specific angle

2007-01-05 Thread Mike Mountain
So y=mx+c doesn't give good results? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: 05 January 2007 15:42 To: Flashcoders mailing list Subject: RE: [Flashcoders] Drag on a specific angle We investigated this recently

RE: [Flashcoders] Drag on a specific angle

2007-01-05 Thread Merrill, Jason
list Subject: RE: [Flashcoders] Drag on a specific angle So y=mx+c doesn't give good results? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: 05 January 2007 15:42 To: Flashcoders mailing list Subject: RE: [Flashcoders] Drag

Re: [Flashcoders] Drag on a specific angle

2007-01-05 Thread eric dolecki
: [Flashcoders] Drag on a specific angle We investigated this recently. We found the easiest thing to do was create the drag interaction on a clip which has the standard horizontal orientation, and then rotate that clip. Constraining it to a sloped line was possible, but very tough to get

Re: [Flashcoders] Drag on a specific angle

2007-01-05 Thread orangeflower
To: Flashcoders mailing list Subject: RE: [Flashcoders] Drag on a specific angle So y=mx+c doesn't give good results? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: 05 January 2007 15:42 To: Flashcoders mailing list Subject: RE: [Flashcoders] Drag

Re: [Flashcoders] Drag on a specific angle

2007-01-05 Thread Mark Winterhalder
To: Flashcoders mailing list Subject: RE: [Flashcoders] Drag on a specific angle We investigated this recently. We found the easiest thing to do was create the drag interaction on a clip which has the standard horizontal orientation, and then rotate that clip. Constraining

RE: [Flashcoders] Drag on a specific angle

2007-01-05 Thread Merrill, Jason
] On Behalf Of [EMAIL PROTECTED] Sent: Friday, January 05, 2007 11:16 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Drag on a specific angle Much like y = mx + b when determining the slope of a line. I think that was algebra... :) - Original Message - From: Merrill, Jason

RE: [Flashcoders] Drag on a specific angle

2007-01-05 Thread Mike Mountain
Much like y = mx + b when determining the slope of a line. I think that was algebra... :) Exactly - except we always did mx+c at school To put it in laymens terms on a standard graph the eqn for a slope of line is: y=mx+c where y=y value m=gradient of line x=x value c=intersect of line on

Re: [Flashcoders] Drag on a specific angle

2007-01-05 Thread orangeflower
Sent: 05 January 2007 15:42 To: Flashcoders mailing list Subject: RE: [Flashcoders] Drag on a specific angle We investigated this recently. We found the easiest thing to do was create the drag interaction on a clip which has the standard horizontal orientation, and then rotate that clip

RE: [Flashcoders] Drag on a specific angle

2007-01-05 Thread Mike Mountain
OK this is untested but: [as] function limitToSlope(mc, grad, start, end) { if(_xmousestart.x _xmouseend.x){ mc._y = grad*_xmouse+start.y; mc._x=_xmouse } } function drag(){ start=new Object() start.x=point1._x start.y=point1._y;

RE: [Flashcoders] Drag on a specific angle

2007-01-05 Thread Merrill, Jason
AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Drag on a specific angle You can project a perpendicular line from the mouse to the target line and then find the intersection. Stick the movieclip there. bingo. Merrill, Jason wrote: But he's talking about constraining a movie clip

RE: [Flashcoders] Drag on a specific angle

2007-01-05 Thread Mike Mountain
Tested, slight change: [as] function limitToSlope(mc, grad, start, end) { if(_xmousestart.x _xmouseend.x){ mc._y = (grad*(_xmouse-start.x))+start.y; mc._x=_xmouse } } function drag(){ start=new Object() start.x=point1._x start.y=point1._y;

Re: [Flashcoders] Drag on a specific angle

2007-01-05 Thread Martin Wood-Mitrovski
Merrill, Jason wrote: You can project a perpendicular line from the mouse to the target line and then find the intersection. uh huh. Still waiting for someone to explain how to do the constrain part. Mike did say, Using this basic principle you could limit an MC to a slope based on the

RE: [Flashcoders] Drag on a specific angle

2007-01-05 Thread Steven Sacks | BLITZ
I did something similar awhile back for a site with a diagonal scrollbar. First, I tried the clip rotation and then rotating a container clip to the inverse rotation method. This created some pretty ugly jaggies which were unacceptable. Second, I did some Flash trickery and created an invisible