Re: [Flashcoders] Detecting if line crosses movie clip

2011-06-16 Thread Henrik Andersson
Glen Pike skriver: Hi, Can you measure the vector distance between the centre of the polygon and the centre of the ball? If that is 0,0, and the diameter of the circle is less than the smallest of width / height of the box, then you are inside. Glen Not in all cases: http://img694.imageshack

RE: [Flashcoders] Detecting if line crosses movie clip

2011-06-16 Thread Paul Steven
m] On Behalf Of Glen Pike Sent: 16 June 2011 15:26 To: Flash Coders List Subject: Re: [Flashcoders] Detecting if line crosses movie clip I am not sure - do you mean "single line" like a circle, or a single line as in straight one? My idea was to test if a circle was inside a rectangle,

Re: [Flashcoders] Detecting if line crosses movie clip

2011-06-16 Thread Glen Pike
t: 16 June 2011 14:48 To: Flash Coders List Subject: Re: [Flashcoders] Detecting if line crosses movie clip Hi, Can you measure the vector distance between the centre of the polygon and the centre of the ball? If that is 0,0, and the diameter of the circle is less than the smallest of width /

RE: [Flashcoders] Detecting if line crosses movie clip

2011-06-16 Thread Paul Steven
: Flash Coders List Subject: Re: [Flashcoders] Detecting if line crosses movie clip Hi, Can you measure the vector distance between the centre of the polygon and the centre of the ball? If that is 0,0, and the diameter of the circle is less than the smallest of width / height of the box, then

RE: [Flashcoders] Detecting if line crosses movie clip

2011-06-16 Thread Paul Steven
Thanks Paul - that looks awesome and just what I need -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews Sent: 16 June 2011 14:48 To: Flash Coders List Subject: Re: [Flashcoders] Detecting if line

Re: [Flashcoders] Detecting if line crosses movie clip

2011-06-16 Thread Glen Pike
Hi, Can you measure the vector distance between the centre of the polygon and the centre of the ball? If that is 0,0, and the diameter of the circle is less than the smallest of width / height of the box, then you are inside. Glen On 16/06/2011 13:58, Paul Steven wrote: Working on

Re: [Flashcoders] Detecting if line crosses movie clip

2011-06-16 Thread Paul Andrews
On 16/06/2011 13:58, Paul Steven wrote: Working on a game where the player must draw around some colored balls on screen by dragging the mouse to create the polygon that surrounds the objects. The polygon is created by drawing a series of lines every time the mouse moves. If one of these lines i

[Flashcoders] Detecting if line crosses movie clip

2011-06-16 Thread Paul Steven
Working on a game where the player must draw around some colored balls on screen by dragging the mouse to create the polygon that surrounds the objects. The polygon is created by drawing a series of lines every time the mouse moves. If one of these lines intersects one of the balls (movie clip) I