User Tag List

Results 1 to 10 of 10

Thread: HTML5 fails when in local storage

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jul 2010
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTML5 fails when in local storage

    Hi all,
    In my understanding, HTML5 exported games are only supposed to be served by a webserver.
    However, this is very annoying when dealing with bundled HTML5 applications.

    I am trying to build a HTML5 widget for inserting in an iBook, with NO internet access.
    All the html, js, cch, images files are stored in a kind of bundle (sandbox) and must be run locally.

    With MMF export, The exported animation does not launch, because the runtime.js tries to load the game resource through an XmlHttprequest, wich is not allowed in a local storage.
    The only solution I see would be having all the resources embeded in a .js file (in base64 encoded format eg) and then called (instead of being downloaded) by runtime.js


    Is there any work in progress concerning sandboxed html5 apps ?
    Thank you for any suggestion.

    BR
    Samir

  2. #2
    Clickteam Clickteam
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,647
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    Can you confirm what you mean by "sandbox" in this context, and also "bundle"?

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jul 2010
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Simon ,
    To simplify, just think of an html5 game delivered on an usb stick.
    User would start the game with no internet access, just browsing to index.html on the usb storage.
    Mmf html5 export does not allow that because it requires a web server.
    Any idea to allow this ?
    Thanks
    Samir

  4. #4
    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)
    Well, as you know, a web server of some kind if required to run HTML5 applications and games. You'll need some sort of lightweight web server to run without internet access.

    Good news is that Python with the SimpleHTTPServer module can do the trick, either with it installed locally on the system, or a portable version (dependent on OS)

    In a terminal / command prompt, set the working directory to the root of the project, and execute this:
    Code:
    python -m SimpleHTTPServer 8080
    This hosts a simple web server on port 8080, which will run the project locally on the system, without the need of a dedicated web server. It simply requires Python and the SimpleHTTPServer module (I think is included with Python by default)

    As far as making this easier for the user, you can write a shell script (.sh) for Unix-like (Mac/Linux) or a batch script (.bat) for Windows that would only require a double click.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jul 2010
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello lh37,
    Thank you for your suggestion.
    However, my purpose is to deliver HTML5 animations embedded in a an ePub or iBook document (cf epub and iBook specifications).
    I have no mean to call a webserver.
    ePub version 3 allows now to add html5 contents in a book page, it's a great feature I wished to perform using CTFusion.
    Unfortunately, it seems impossible.
    However, I know the path is correct, because a canvas animation exported from a flash animation (using adobe tool) works perfectly in an ePub doc.
    The problem with CTFusion is that it requires the loading of an external resource to work (.cch or cc1).
    If these resources where stored in plain javascript (or integrated json array) , there would be no problem to play a game without the need of any webserver...
    Loading from vars instead of loading from files...I even guess this solution has been thought (according to what I see in the getFile method of runtime.js...)

  6. #6
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,336
    Mentioned
    156 Post(s)
    Tagged
    2 Thread(s)
    Ben has been experimenting a solution for this recently but it was just a simple try, not with real applications, so we are not 100% sure it can work. I've to check with him if we can turn this into an export option and if so, if this can work with any application and when.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jul 2010
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you Yves for the info.
    I suppose the solution could face app size issues. But happy to know it's being worked on !

  8. #8
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    Christian_Wheel's Avatar
    Join Date
    Mar 2010
    Location
    Los Angeles
    Posts
    348
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry to resurrect a 3 year old thread but I was wondering if there was any progress on this possibility.

  9. #9
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,336
    Mentioned
    156 Post(s)
    Tagged
    2 Thread(s)
    Nope, I don't remember very well what didn't work with the solutions experimented by Ben. IIRC the last one semi worked but there were problems. I'll make some tests again when I can find some time.

  10. #10

Similar Threads

  1. HTML5 Data Storage
    By coreyschroeder in forum HTML5 Export Module 2.5
    Replies: 3
    Last Post: 20th April 2014, 02:26 AM
  2. HTML5's new build and run on local network
    By iOSC in forum Fusion 2.5
    Replies: 12
    Last Post: 2nd December 2013, 07:30 AM
  3. Browse local network LAN computers / Trouver et explorer les machines du réseau local
    By duwayy in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 23rd October 2013, 10:28 AM
  4. iOS - download image to local storage
    By buckeroo in forum iOS Export Module Version 2.0
    Replies: 6
    Last Post: 23rd September 2011, 06:45 PM
  5. Roll & Yaw = local, Pitch = not local????
    By Gibbon in forum OpenGL
    Replies: 1
    Last Post: 19th August 2010, 03:05 AM

Posting Permissions

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