User Tag List

Results 1 to 9 of 9

Thread: Online High Scores Tutorial

  1. #1
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    scottige's Avatar
    Join Date
    Jul 2006
    Location
    Scotland
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Online High Scores Tutorial

    I'm following the rather good online scores tutorial and have hit a bit of a stumbling block.

    I have my database set up with some dummy scores and can add scores to the database with direct entry into the web browser link bar.

    The scores are displaying and ordering ( all be it with a few php errors but that's not a worry at the moment ).

    I'm at the stage where I'm submitting the score from MMF2 itself.

    When I hit the submit button, the string changes to submitting score and the button deactivates as expected but after that nothing happens.

    I think I'm entering my site details incorrectly as I'm quite new to this aspect.

    Can someone who's used to working with this sort of thing look at the below please ?

    My site is http://www.auld-games.co.uk

    The score links are :


    • http://www.auld-games.co.uk/scoretest.php
    • http://www.auld-games.co.uk/submitscore.php


    What would I put in "youraddresshere" section in the below code ?
    Thee tut says to omit the http:// so would it just be www.auld-games.co.uk ?

    -> Submit button: Disable
    -> Status string: Set alterable string to "Connecting to high score table"
    -> MooSock object: Connect to "youraddresshere" on port 80

    The same for below.
    What would I put in the address bit on the next part as I think this is where it's failing.

    -> Status string: Set alterable string to "Submitting score"
    -> MooSock object: Send text line "GET http://[youraddresshere]/submitscore.php?name="+Edittext$( "Edit Box" )+"&score="+Str$(value( "Counter" ))
    -> MooSock object: Send text line "From: clicktutorial@nowhere.com"
    -> MooSock object: Send text line "User-Agent: HTTP-Tool/1.0"
    -> MooSock object: Send text line "" (i.e. an empty string)
    -> MooSock object: Listen on port 80

    I currently have this in the second line....."GET http://www.auld-games.co.uk/submitscores.php?name="+Edittext$( "Edit Box" )+"&score="+Str$(value( "Counter" ))

    Does that look correct ?

    Any help would be greatly appreciated.

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online High Scores Tutorial

    You have the address part in the Send Text Line action correct at the moment according to the addresses that you mentioned (after I noticed that it was "submitscores.php" rather than "submitscore.php").

    Where the tutorial mentioned omitting "http://" it means on the "Connect to" line in the Moosock object - yours would be "www.auld-games.co.uk" here. Hopefully, that'll work.

    I tried submitting a score from the browser, and while it did work, you seem to be missing the "datesubmitted" line from your database - double-check its name, because that may cause problems later on.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online High Scores Tutorial

    The thing is that Jam's Live Receiver object can do both the posting and the receiving of the php output automatically. You might want to use that instead, if you're just going to communicate with php scripts.

  4. #4
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    scottige's Avatar
    Join Date
    Jul 2006
    Location
    Scotland
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online High Scores Tutorial

    Thanks for the quick replies.

    I've uploaded the file to http://www.auld-games.co.uk/scoretest.mfa if someone would be kind enough to have a look.

    I'm probably doing something silly wrong.

    I have absolutely no knowledge about php and databases.

    Not tried live receiver object yet although I do have it installed.

  5. #5
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    scottige's Avatar
    Join Date
    Jul 2006
    Location
    Scotland
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online High Scores Tutorial

    I couldn't see what I was doing wrong so I coppied the events from the actual tutorial file and pasted them in and it works a treat now .

    Now to go and try add secure mode .

  6. #6
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online High Scores Tutorial

    The Live Receiver object is actually very good - it makes this whole thing quite a lot easier without wondering what little thing's gone wrong with Moosock (though the theory is much the same). Definitely try swapping to it when you get it working.

  7. #7
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    scottige's Avatar
    Join Date
    Jul 2006
    Location
    Scotland
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online High Scores Tutorial

    I've got the scores working with security now ( and fixed my dates ).

    Thanks for the support and the great tutorial.

    Just out of curiosity, would there be any benefits on switching to a Live Receiver version of the routine ?

    If so, would a small example be possible ?

    I assume it would use the same database and web page setup of the MooSock tutorial.

  8. #8
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online High Scores Tutorial

    The database and webpage setup would be exactly the same - the only difference would be that instead of all those MooSock lines above, all you'd need to do is:

    Live Receiver -> Get page "http://www.auld-games.co.uk/submitscore.php" with POST string "?name="+Edittext$( "Edit Box" )+"&score="+Str$(value( "Counter" ))"

    (Or something along those lines).

    By the way, thanks for the good words about the tutorial - good to see it's helping

  9. #9
    Clicker Fusion 2.5 DeveloperSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,739
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Online High Scores Tutorial

    Hey, DavidN.
    I just wanted to say that the post string doesn't work for me.
    I tried this a couple of weeks ago... with a PHP script like:
    <?php
    echo $_POST['t'];
    ?>

    Then I used live receiver with the post string "?t=test", no output. Well maybe it was a bug or it was me. I'll try to redo the test, maybe I did something wrong when I tested it.

Similar Threads

  1. Is there a tutorial/example about doing high scores in flash?
    By dascribe in forum SWF/Flash Export Module Version 2.0
    Replies: 1
    Last Post: 12th December 2011, 02:01 AM
  2. Online high scores
    By MJK in forum iOS Export Module Version 2.0
    Replies: 12
    Last Post: 23rd August 2011, 05:46 PM
  3. Having trouble with the online high scores tut
    By Apex in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 7th May 2011, 09:26 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
  •