Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Scrolling on Game Page

A topic by tetrogem created Aug 30, 2018 Views: 971 Replies: 1
Viewing posts 1 to 2

My game is HTML5 and uses the Mouse Wheel to scroll through menus in the game. The problem is, it also scrolls the web page, causing the game to go off screen. Just was wondering if there was a way around this.

Admin

You have two options:

  • encourage people to play in fullscreen, so there is no way to scroll anything else
  • add a scroll event listener and prevent it from propagating. (You can detect when they are scrolled to the bottom of your scrollable area and then stop the event entirely)
This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.