Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Scrolling on Game Page

A topic by TetroGem created Aug 30, 2018 Views: 910 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.