www.webdeveloper.com
Results 1 to 5 of 5

Thread: Checking to see if clicked?!?!?!

  1. #1
    Join Date
    Jan 2005
    Posts
    3,067

    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

  2. #2
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    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.

  3. #3
    Join Date
    Jan 2005
    Posts
    3,067
    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.
    Last edited by konithomimo; 01-17-2005 at 04:46 PM.

  4. #4
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    You would probably be best served with flash.

  5. #5
    Join Date
    Jan 2005
    Posts
    3,067
    I cant do it in flash...it is supposed to be done in html.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles