User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: Custom highscore not working in html5?

  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 Custom highscore not working in html5?

    I am using a highscore system based on Jeffs guide: http://community.clickteam.com/threads/84503-A-Guide-to-saving-high-scores-online
    It have worked for me so far in all runtimes, but it does not work when I am trying to use it for Html5 (even though it say on the post it should work on html5)
    Do I need to do something to make it work on Html5? I have built a flash version and a html5 version for testing below:

    Flash: http://www.varagtp.com/SwfTests/ad.swf

    Html5: http://www.varagtp.com/Html5Host/wa/wa.html
    Attached files Attached files

  2. #2
    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)
    Are you acessing the same domain where the scores area saved? The get object only works if it is present in a page on the same domain. You'l have to upload the game on the server for the system to work.

  3. #3
    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)
    Hmm i did not fully get that, the builds are identical, I just change the build type from flash to html5. Since the flash one works do I need to do anything else on the html5 one?

  4. #4
    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)
    CORS is usually disabled by default in most web servers,
    Meaning you cannot use the GET object in the HTML5 Runtime to GET/POST a page that is not under the current domain (www.whatever.com/mygame can only call things under whatever.com/*).

    It's a security precaution to prevent web vs web attacks or exploits through a browser, but it can be enabled on the Server Side,
    Though its definitely not recommended if you don't know about online or web security, and server administration.

    You can look into enabling CORS (Cross Origin Resource Sharing) Here.
    Really named Ben Otter, but oh well, eh?

  5. #5
    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)
    I know I did something like this to make the flash version work on every server. But are you saying i need to do some other kind of thing to make the html5 version work?

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    S.East England
    Posts
    744
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey outcast, do you keep with the standard 10 scores on jeffs online score system or have you got more than 10 working? Also, on android (at least) do you have problems inputting more than one name (ie John instead of John Smith)

  7. #7
    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)
    Just upload your app on the same server as the one you store the scores. And in your browser, run the game from there.

  8. #8
    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)
    Redsquirrel: I have 10 scores, hmm I have not seen this problem but it is possible..

    Francois: Both examples I uploaded are stored on the same server, but the html5 does not work and the flash one works:

    Flash: http://www.varagtp.com/SwfTests/ad.swf

    Html5: http://www.varagtp.com/Html5Host/wa/wa.html

  9. #9
    Clickteam Clickteam
    Olivier's Avatar
    Join Date
    Jun 2006
    Posts
    2,996
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)
    Outcast, what Francois means is that you have to make sure that the game, the .php script page and the database are all hosted on the same server. I have quickly checked your HTML5 test app and it seems to try to send the scores data to the .php script page from Jeff's which is flyinvinteractive.com. Since his domain is different than yours, it doesn't work.

  10. #10
    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)
    Oliver: Oh ok thanks! Does this mean though that if I someone else would host my html5 game they would not be able to show the highscores? I know I had this problem in Flash also, like uploading the game to Newground and it would not show any scores, but I fixed this with adding some php script. So you need some other script to do this for html5 also?

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Hi-score object in HTML5 not working
    By cmpessoa in forum HTML5 Export Module 2.5
    Replies: 13
    Last Post: 7th April 2015, 03:29 PM
  2. Strings not working on HTML5 canvas
    By Chrisual in forum HTML5 Export Module 2.5
    Replies: 3
    Last Post: 19th February 2014, 07:56 AM
  3. Custom Highscore and Firewall?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 31st May 2013, 05:48 PM
  4. Custom made highscore in flash?
    By Outcast in forum SWF/Flash Export Module Version 2.0
    Replies: 7
    Last Post: 18th May 2013, 02:09 PM
  5. Working HTML5 applications
    By DavidN in forum HTML5 Export Module 2.5
    Replies: 10
    Last Post: 20th December 2012, 02:11 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
  •