Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Clicking inside a moving circle

Author
Message
Kingy
19
Years of Service
User Offline
Joined: 25th Oct 2004
Location:
Posted: 26th Oct 2004 06:43
Basically i wanna know how you can click a moving circle to cause a program to stop. Ideally anywhere inside the circle. Cheers
Errie
21
Years of Service
User Offline
Joined: 6th Nov 2002
Location: NW England
Posted: 26th Oct 2004 08:02
Presuming you know the co-ordinates of the center of the circle I'd do something like this:

If Sqrt(((MouseX() - [Center of circle (x)])^2) + ((MouseY() - [Center of circle (y)])^2)) <= [Radius of circle] then ...etc...

We rode on the winds of the rising storm, we ran to the sounds of the thunder.
We danced among the ligtning bolts, and tore the world asunder.
Kingy
19
Years of Service
User Offline
Joined: 25th Oct 2004
Location:
Posted: 30th Oct 2004 02:09
Cheers for that, it works a treat. But what does the ^ do? I've never used or seen it been used before.

Login to post a reply

Server time is: 2024-09-23 03:28:08
Your offset time is: 2024-09-23 03:28:08