Skip to main content
Inspiring
March 22, 2021
Answered

full screen for createjs file

  • March 22, 2021
  • 1 reply
  • 876 views

Hi.

I am creating HTML5 apps for classroom digital boards.

I would like to make them full screen. At the moment, you can see white around the edges ie: they are not filling the whole window. If I make the background wider at design time, it still doesn't fill it.

I know there is probably a very simple answer but I can't find it.

Any help would be appreciated.

    This topic has been closed for replies.
    Correct answer kglad

    full browser:  file>publish settings>enable make responsive - both>enable scale to fill and pick one of the options:

     

     

     

    for fullscreen do the same plus add:

    // put something on stage so "this" can respond to a click

    this.addEventListener("click", f);


    var element = document.getElementById("animation_container");

    function f(){
    element.requestFullscreen()
    .then(function() {
    // fs success
    })
    .catch(function(error) {
    console.log(error.message);
    });
    }

     

    1 reply

    kglad
    Community Expert
    Community Expert
    March 22, 2021

    you want fullscreen (requires user interaction) or full browser (fills the browser display window)?

    Inspiring
    March 22, 2021

    Both methods would be interesting to know about because we are going to have different scenarios. Teachers in a classroom would want to go full screen - kids at home would probably prefer to keep the browser visible - or maybe not. Until we test we don't know. 

    Inspiring
    March 22, 2021

    I've just come across a setting in publish settings - stretch to fit which remedies the white spaces. It was that easy so I feel a little dumb, anyway,

    It would also be nice to know -  "fullscreen (requires user interaction)"