/    Sign up×
Community /Pin to ProfileBookmark

Checking to see if clicked?!?!?!

Is there a way to check and see if someone clicks in the center of the screen, or within a certain area around the center of the screen??

I figure that if you take in the persons screen resolution, find the middle, and then make the area based on the center that you could. Im just not sure about how to see if someone clicks in the center of the screen.

If you could, please post some code that would find the persons resolution, then find the center of the screen, then designate a box around the center point, and then check to see if the person clicks inside of that box. I could do it in C++, Scheme, or a few other languages, but Im not that sure about HTML or javascript.

Thanks in advance

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@PeOfEoJan 17.2005 — Why do you need this, what are you trying to accomplish? Maybe there is a better way.

You can put an element in the center of the screen and then use onclick() for it.
Copy linkTweet thisAlerts:
@konithomimoauthorJan 17.2005 — I know that it sounds kinda strange, but it serves a purpose. I'm not too sure that an element would work though. My purpose is kinda for a game. Someone has to click in the center of the screen. the closer they get, the bigger a button gets. If they click too far away, then nothing nhappens, or the button gets smaller. Once they have clicked close enough a few times the button is large enough for them to see....since it is hidden, and random each time. This is to see how good someones eye-to-mouse coordination is. I know that it sounds bad, but it is something that I am helping someone with. I know other languages, but I'm not much help with online stuff. I know that you could do that with an element, but I kinda want it to be that the button grows without them seeing it, and each time that they click inside the buton it grows. Then when it is big enough it sends them to a new page. Its a kind of game.
Copy linkTweet thisAlerts:
@PeOfEoJan 17.2005 — You would probably be best served with flash.
Copy linkTweet thisAlerts:
@konithomimoauthorJan 17.2005 — I cant do it in flash...it is supposed to be done in html.
×

Success!

Help @konithomimo spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...