Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

non-scrolling game container

A topic by napalmz created 86 days ago Views: 86
Viewing posts 1 to 1

I noticed on this website, the game container scrolls up/down when using the arrow keys for game controls.

For my Arcade I fixed this by disabling scrolling when the mouse is pointed anywhere on the game container.

You won't be able to do it by attempting to disable it for the screen without this method.

You can try but my own tests failed trying to do it that way.

"gamecontainer" is your container id for this example.

Here is the necessary javascript code:

if (window.addEventListener)
   window.addEventListener("load", function (){
   window.attachEvent("onload", function (){
function ArcadeFunc() {
   var gameObject = document.getElementById("gamecontainer");
   gameObject.onmouseenter = function (){"hidden";
   gameObject.onmouseleave = function (){"auto";