User Tag List

Results 1 to 5 of 5

Thread: How to change the html5 background?

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,156
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Question How to change the html5 background?

    I have been digging around in the html file that is created for the html5 game to try to change the browser background, but I don't seem to be able to do it for some reason. Do anyone know what part to edit to change the colour of the browser background?

  2. #2
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleMac Export Module
    Sloxone's Avatar
    Join Date
    Nov 2011
    Location
    France
    Posts
    499
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is very simple

    Play with those lines in generated html source code
    .
    .
    .

    body {
    background-repeat: no-repeat;
    background-attachment: fixed;
    height: 100%;
    min-height: 100%;
    margin: 0;

    background: rgb(238,238,238); /* Old browsers */

    background: -moz-linear-gradient(top, rgba(238,238,238,1) 0%, rgba(204,204,204,1) 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(238,238,238,1)), color-stop(100%,rgba(204,204,204,1))); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, rgba(238,238,238,1) 0%,rgba(204,204,204,1) 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, rgba(238,238,238,1) 0%,rgba(204,204,204,1) 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, rgba(238,238,238,1) 0%,rgba(204,204,204,1) 100%); /* IE10+ */
    background: linear-gradient(to bottom, rgba(238,238,238,1) 0%,rgba(204,204,204,1) 100%); /* W3C */

    }
    To obtain Black color modify one of upper lines like this : background: -ms-linear-gradient(top, rgba(0,0,0,1) 0%,rgba(0,0,0,1) 0%); /* IE10+ */

    Good luck

  3. #3
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleInstall Creator Pro

    Join Date
    Dec 2010
    Location
    United Kingdom
    Posts
    960
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Like Sloxone says, the generated HTML contains the code you're looking for.

    This useful tool on the internet may help you convert colours to RGB: http://html-color-codes.info/

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,156
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Thanks!

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Things I have in mind for future implementation in the HTML5 runtime : having a choice of templates of the default html file used to construct the game. Like "Dark", "Playfull" etc. In a simple combo box in the HTML5 property page. A simple folder on the machine, a new property in the editor, and some documentation on how to create a html template.
    It would open a lot of possibilities, anyone could create nice templates and even sell them on the future Clickstore. It seems that programming in html is not everyone's cup-of-tea.

Similar Threads

  1. [HTML5] Clearing the background to Transparent
    By DracisLooby in forum HTML5 Export Module 2.5
    Replies: 6
    Last Post: 22nd March 2017, 05:07 PM
  2. Background system box object breaks HTML5 builds
    By dustingunn in forum HTML5 Export Module 2.5
    Replies: 1
    Last Post: 7th February 2014, 08:18 PM
  3. Question: html5 application change to size in mobile browser?
    By fernandolt in forum HTML5 Export Module 2.5
    Replies: 1
    Last Post: 2nd April 2013, 06:03 AM
  4. Change Background color of string at runtime.
    By Earl in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th June 2012, 09:23 AM
  5. Gradient Background - that can change at runtime?
    By RickyRombo in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 29th May 2009, 04:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •