Prevent scrolling Website with Arrow Keys

Discussion in 'HTML & Website Design' started by Azzaboi, Feb 12, 2010.

  1. #1
    Prevent scrolling Website with Arrow Keys

    I have an issue with the keyboard arrow keys and my website. You see some of the flash games I have use the arrow keys to move around in the game, which is fine except that some web-browsers also use the arrow keys to scroll the page up and down. It can get really annoying in the middle of a game and the screen scrolls to the bottom of the page.

    Dance Planet is a good example of this: http://azzaboi.weebly.com/danceplanet.html
    Where you use the arrow keys and space bar to dance, the up and down arrows are also scroll the page while trying to play in IE.

    Any ideas how to prevent this?
     
    Azzaboi, Feb 12, 2010 IP
  2. nqueb

    nqueb Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    dont click off of the game and the browsers focus will remain the flash
     
    nqueb, Feb 13, 2010 IP
  3. krsix

    krsix Peon

    Messages:
    435
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    flash takes control of everything by default, just click once in the swf
     
    krsix, Feb 13, 2010 IP
  4. Azzaboi

    Azzaboi Peon

    Messages:
    90
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hmm maybe it's just that game, doesn't seem to keep focus. I click on the game and the up/down arrows still scroll the website. Is it just me?
     
    Azzaboi, Feb 15, 2010 IP