Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Turning window scrolling back on

edited August 2015 in Help! with 1.x
On one particular screen for an animation effect I want to disable the scroll bar (animation goes out of bounds so I just want it to go out of bounds rather than resize the screen).

The simplest way I've found to do this is the following JavaScript in the passage:
document.body.scroll = "no";
document.body.style.overflow = 'hidden';
document.height = window.innerHeight;

What I need help with is what's the opposite of these values to turn scrolling back on once the player leaves the cutscene and gets back to a text screen? I'm guessing "yes", "visible", but the third is...?

EDIT: Though I guess I could alternatively just add overflow: hidden; to my html and body with <<addclass>> and use <<removeclass>> afterwards. No JavaScript required then.

Or even with a tag on that passage could be the easiest way...

Comments

  • edited August 2015
    EDIT: nevermind this post. But all is well and I used the tag method of tagging the passage noscroll and using this css
    html.noscroll { overflow: hidden; }
    body.noscroll {overflow: hidden;}
    

    Seems to work OK with just the body css, but I won't take chances.
Sign In or Register to comment.