Re: mouse within oval filled area

2011-11-13 Thread BNig
a simplifyed version of the hack to get at the boundaries of a oval with startangle and arcangle set. Again to get the area of a oval graphic with a startangle and an arcangle set and opaque = true you could use the new 5.0 intersect(object,object,pixels) syntax. You would have to cheat though

Re: mouse within oval filled area

2011-11-13 Thread Mike Bonner
This is probably a silly idea, but.. if you have AE 5 with its collision detection, maybe you can drag a hidden pixel around at the mouseloc and set your ovals up to detect collisions. At which point a message is sent with all the ___ use-livecode

Re: mouse within oval filled area

2011-11-13 Thread Mike Bonner
oops. accidental send on that last one. Clumsy day for me! As I was saying, if you use AE5 and drag around a pixel at the mouseloc the collision detection stuff in AE5 should make this a piece of cake. On Sun, Nov 13, 2011 at 6:51 AM, Mike Bonner bonnm...@gmail.com wrote: This is probably a

Re: mouse within oval filled area

2011-11-13 Thread James Hurley
Jacque, BOL! (Burst out laughing) This may be more recognizable, the equation for the ellipse in rectangular coordinates: x^2 + y^2 - - = 1 a^2 b^2 Just replace x by r*cos(theta) and y by r*sin(theta) and solve for r. Voila. Well maybe not. Foreign languages are not

Re: mouse within oval filled area

2011-11-13 Thread James Hurley
By the way, to see how different the startAngle is from the polar angle, make a very wide oval with a very small height. Set the startangle to 45 degrees and the arcangle to say 250. The start angle appears to be about 10 degrees. ___ use-livecode

Re: mouse within oval filled area

2011-11-13 Thread Mike Bonner
Just tried doing the detection using AE5 and it works like a champ. With the collisionListernerDemo, a couple really simple changes gets the job done. in the card script I added the following: command startMove if tMoving is empty then put false into tMoving --put false into tMoving

Re: mouse within oval filled area

2011-11-13 Thread Mike Bonner
Oh, forgot to mention. The really cool thing about the collision listener is if you have overlapping graphics, it will list all of them as collisions. AE5 is just too cool. On Sun, Nov 13, 2011 at 8:43 AM, Mike Bonner bonnm...@gmail.com wrote: Just tried doing the detection using AE5 and it

Re: mouse within oval filled area

2011-11-13 Thread J. Landman Gay
On 11/13/11 8:47 AM, James Hurley wrote: Jacque, BOL! (Burst out laughing) This may be more recognizable, the equation for the ellipse in rectangular coordinates: x^2 + y^2 - - = 1 a^2 b^2 Just replace x by r*cos(theta) and y by r*sin(theta) and solve for r. Voila.

Re: mouse within oval filled area: A solution using geometry

2011-11-13 Thread FlexibleLearning
For those who do not have LC5 or AE (ideas already suggested), here is a solution to detect whether a point is within the filled area of an oval graphic using polar geometry. It is offered as a starting point for a more compact solution. on mouseUp --| Syntax: isWithinSegment(long ID,point)

RE: mouse within oval filled area

2011-11-12 Thread John Dixon
Use the mouseColor ? From: ad...@flexiblelearning.com To: use-livecode@lists.runrev.com Subject: mouse within oval filled area Date: Sat, 12 Nov 2011 11:59:33 + Has anyone worked out how to test if the mouseLoc is within the filled area of an oval graphic (defined by startAngle and

Re: mouse within oval filled area

2011-11-12 Thread Randy Hengst
Hi Hugh, I haven't done exactly as you describe, but have made things where I only wanted a response when the user clicked the filled area of a graphic. I used the function version of within…. This script in the graphic…. on mouseUp if within(graphic myGraphic,the mouseLoc) then beep

Re: mouse within oval filled area

2011-11-12 Thread Randy Hengst
Sorry to flood the list.. but nevermind… I double-checked and that idea doesn't help you…. On Nov 12, 2011, at 9:56 AM, Randy Hengst wrote: Hi Hugh, I haven't done exactly as you describe, but have made things where I only wanted a response when the user clicked the filled area of a

RE: mouse within oval filled area

2011-11-12 Thread FlexibleLearning
Indeed, John, but not a unique object identifier if more than one grc uses the same color. I think I am back to polar coordinates (unfortunately). The current engine behaviour is painfully inconsistent with other controls whose transparency is immune from mouse events. Hugh Senior FLCo John

RE: mouse within oval filled area

2011-11-12 Thread John Dixon
Subject: RE: mouse within oval filled area Date: Sat, 12 Nov 2011 19:25:16 + Indeed, John, but not a unique object identifier if more than one grc uses the same color. I think I am back to polar coordinates (unfortunately). The current engine behaviour is painfully inconsistent with other

Re: mouse within oval filled area

2011-11-12 Thread Glen Bojsza
the coloured bit of control ID no the short id of me end if end mouseWithin From: ad...@flexiblelearning.com To: use-livecode@lists.runrev.com Subject: RE: mouse within oval filled area Date: Sat, 12 Nov 2011 19:25:16 + Indeed, John, but not a unique object identifier if more than

RE: mouse within oval filled area

2011-11-12 Thread John Dixon
Yes, it would... but a gradient wasn't mentioned... we could throw spanners into the works all night! From: gboj...@gmail.com Date: Sat, 12 Nov 2011 13:34:32 -0700 Subject: Re: mouse within oval filled area To: use-livecode@lists.runrev.com This would be very difficult to implement

Re: mouse within oval filled area

2011-11-12 Thread BNig
Hi Hugh, to get the area of a oval graphic with a startangle and an acrangle set and opaque to true you could use the new 5.0 intersect(object,object,pixel) syntax. You would have to cheat though in that you create a hidden polygon graphic hidden and call your start/arcangle graphic halfCircle

Re: mouse within oval filled area

2011-11-12 Thread James Hurley
Hugh, Would this help? The script below will draw a polygon that looks like an ellipse with a start and stop angle. The trouble with the start angle and the arcangle in RR is that they are not polar angles but are related in a complex way: arcAngle = arctangent( b/a * tangent(polarangle)