Skip to main content
Participating Frequently
September 5, 2017
Question

Browser fill with HTML5 canvas

  • September 5, 2017
  • 2 replies
  • 1006 views

Can someone explain how to set the browser fill when exporting as an HTML5 document? There used to be an option for this in the publish settings when it was still Flash.

Thanks.

    This topic has been closed for replies.

    2 replies

    New Participant
    December 16, 2021

    I have this question also. how do you change the color outside of the stage? I don't know what that area is called. The area beyond your document size...

    JoãoCésar17023019
    Community Expert
    December 16, 2021

    Hi.

     

    It's the document's body.

     

    There are several ways of changing its color. Some are described below.

     

    1 - Use JavaScript in the main timeline to match the stage/canvas color like this:

     

    document.body.style.backgroundColor = lib.properties.color;

     

     

    2 - Use JavaScript in the main timeline to assign a custom color:

     

    document.body.style.backgroundColor = "green"; // any valid CSS color value

     

     

    Both ways work but they will only change the background color when your content is fully loaded.

     

    3 - If you wish to change the background color immediately, you can edit the publish template and change the color in there using CSS.

     

    I hope this helps.

     

    Regards,

    JC

     

     

    New Participant
    December 16, 2021

    Thank you! This definitly helps. You're a ninja.
    Jeff

    Brainiac
    September 5, 2017

    "Browser fill"?

    Participating Frequently
    September 6, 2017

    The background color of the browser. I would like it to match the canvas background so that it will look consistent no matter the size of the window. It seems to default to white.

    Inspiring
    September 6, 2017

    If you don't have anything selected and have are using the default selection tool, and open the properties, you should see the option to change the stage color.