User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 29

Thread: Problems loading INI files in HTML5

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    May 2012
    Location
    NSW, Australia
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problems loading INI files in HTML5

    After seeing the FGL offer, i decided i'd try and port and Android project over to HTML5.
    I'm using a single frame to load the levels from INI files, however i can't seem to get the loading to work in HTML5.

    I've tried putting the INI files in the root directory of the HTML5 project (e.g. src, resources, game.html, 1.ini, 2.ini, 3.ini etc) and attempting to load the INI files using "1.ini"

    Also tried having the INI files as part of the binary data, and attempting to load them using their path in the data elements tab e.g. load ini "C:\users\me\game\levels\1.ini"

    Having no luck with either, i'm testing on localhost (using build & run) and not on an actual web server whether that makes a difference.

    Any help with loading external files for use in HTML5 would be greatly appreciated!

    Also, i've found my project doesn't load at all in chrome (running latest beta), but loads in firefox, anyone having issues with Chrome?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    May 2012
    Location
    NSW, Australia
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anybody know how to load from an INI for HTML5?

  3. #3
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,421
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    it's working for me in Chrome, and not in IE.
    Both companies keep updating their browsers... it's driving me nuts.
    70% doesn't work for me in IE anymore, (incl. other sites) so I am using Chrome for 99% of the time

    Anyways.. for the Ini
    Check in the properties from the INI object, and you might have a checkmark checked for putting it in the user folder instead of you own custom folder.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    May 2012
    Location
    NSW, Australia
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, i looked and "create INI in App data folder" is unchecked, and am yet to be successful in loading an INI file in HTML5
    I have no problem loading INI on Android/Windows.

    I've tried reading an INI using the following methods:
    1) set current file to "1.ini" (having 1.ini in the same directory as the HTML file ASWELL as same directory as resources folder)
    2) set current file to appdir$+"1.ini"
    3) Adding the file to Data Elements tab and referencing the complete path: e.g. set current file to "C:\users\me\game\1.ini"

    Does it need to be on a webhost to work? final development build? I seem to be missing something as i'm doing nothing different then how i'd load external files or binary data elements in other runtimes?

    Perry: How do you personally load INI's with the HTML5 module?

  5. #5
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,421
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    I am using apppath$ and my programs seems to be working fine. Make sure the the folder exists though.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I think there may be a bug related to embedded INI files: http://bugbox.clickteam.com/issues/2128

    It seems to apply to multiple runtimes. It could just be me doing it wrong, though.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    May 2012
    Location
    NSW, Australia
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm tried apppath$ and still nothing, it returns nothing for me testing in HTML5 anyway (build & run and on webhost).
    I've tried every way i can think of to load an INI and simply can't get it to work, whilst i have no problem in Android or Windows run times.

    If anybody has loading INI file working for HTML5, if you have a simple example MFA showing how you do it that would be greatly appreciated!
    Would love to get some insight from Francois on the correct way to load INI's in HTML5, if there are any restrictions or ideas on why this isn't working for some?

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DracisLooby's Avatar
    Join Date
    Jun 2008
    Location
    Washington, United States
    Posts
    169
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll look into it asap, should be a simple fix.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    May 2012
    Location
    NSW, Australia
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Dracis!
    I also tried loading Arrays (to eliminate the possibility that it was just INI files) and they also didn't work.
    Tried having the array file in the same folder as the HTML file, adding it to Binary (data elements tab) and reffering to it to load in code (using the full path in data elements, aswell as just the filename) etc. and none worked, they did however work in Windows, just not when exporting to HTML5 (on webserver and locally using Build & run).

  10. #10
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    I am quite sure that INI file works in HTML5 as binary files in your application.
    - Under Windows, create your application with the INI file beside your mfa (the INI object should have the complete path to the INI and not just the name)
    - Include it in the binary files of your application
    - Nothing to change in the INI object, the HTML5 runtime removes the path
    Please note that the HTML5 version of the INI object saves the data in the browser's data folder. It loads the data contained in the binary files when the application is ran for the first time. The next times, if the data exists in the browser's data folder, it loads these ones and not the ones of the binary files. You might need to clear the browser's data zone to reset the object...

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. Loading an object from array when needed (loading an array in chunks)
    By fishrod in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 20th March 2014, 06:01 PM
  2. SWF Loading
    By ColdFire in forum SWF/Flash Export Module Version 2.0
    Replies: 2
    Last Post: 31st July 2011, 08:55 AM
  3. Loading & SAVE'D
    By Lyrikz in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 25th October 2007, 03:14 PM
  4. INI Loading Example
    By DavidN in forum File Archive
    Replies: 0
    Last Post: 1st December 2006, 12:59 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
  •