A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: XML Highscore Table?

  1. #1
    President PhobiK's Avatar
    Join Date
    Jan 2005
    Location
    Guatemala
    Posts
    918

    XML Highscore Table?

    Hi, I'm making a game that needs a highscore table. I know it can be done with php, but I don't have a site that allows php so I thought about making it using xml but i've never used it either. So I have some questions about it
    1) How can it be done, do you know of any tutorial?
    2) Can it be done only using flash or do I need some other program?
    3) Can I test the game in my pc or do I need to upload it to a server? (I also have this doubt about php, can I test it in my pc?)

    Thanx in advance
    This is MC. His _parents sent him to stop() by the super market to buy some _root beer if he wanted to gotoAndPlay() with his friends at the park later.

    This is my Blog!... The gaming Process
    Please check out my site: Giddel Creations

  2. #2
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    Flash itself cant save any kind of file, even xml. You can create xml highscore table, but you still need php (or similar) to save the data received from Flash.

    You can install php in your pc too and it works, but I think you need something more with it (Windows World Wide Web Service?). Basically you need to set up your pc as server or something (not too sure how exactly).

  3. #3
    Lurker at Heart EgoAnt's Avatar
    Join Date
    Apr 2004
    Location
    The basement
    Posts
    314
    One way or the other you will need something that handles xml on the server side. There is a way to do a local high score table, but that would be exclusive to one user.

    With that being said, if you need a high score system, you might want to consider pnFlashGames, they have a pre-built high score system you can use.

    If you are using php for a high score system you will have to either upload the page to the server to test it, or hard code the location of the php page (i.e. Call the page using "http://www.yoursite.com/addscore.php" instead of just "addscore.php"
    Speed up your development time with well documented and easy to implement Flash components.
    That's what I do, I save people.... Save them from work. I'm like a slacker superhero, standing for truth, justice, and the consumption of sugary pastries.

  4. #4
    Who needs pants? hooligan2001's Avatar
    Join Date
    Apr 2001
    Location
    Somewhere
    Posts
    1,976
    If you wanted it to be one players top scores though you could store the scores in the users shared objects. But to have an online storage you would need php, to txt file or php, to MySQL database.

  5. #5
    sophisticated
    Join Date
    Sep 2004
    Posts
    288
    Quote Originally Posted by tonypa
    Flash itself cant save any kind of file, even xml.
    dough!
    Last edited by MechaPiano; 06-05-2005 at 10:23 AM.

  6. #6
    383,890,620 polygons nGFX's Avatar
    Join Date
    Oct 2002
    Location
    Germany / Ruhrgebiet
    Posts
    902
    Originally Posted by tonypa
    Flash itself cant save any kind of file, even xml.
    as long as you're online flash can only save shared objects (which are kindy useless for an hs-table) or through a serverside script (php, asp.net ...), flash 5 had an undocumentes fs command for the projector which allowed you to save a textfile (offline, though). but for the newer flash versions you'll need some kind of 3rd party tool ...

    i wrote a "socket-saver" some time ago which used sockets to save data to a file, or you write a wrapper app (in vb, for instance) or use something like zinc...

    (last parts all offline, although you could use the socket-saver from a browser, too)

    nGFX

  7. #7
    President PhobiK's Avatar
    Join Date
    Jan 2005
    Location
    Guatemala
    Posts
    918
    Thanx guys, you've been of much help.

    I think I'll have to use php with something like that Tonypa said to set my pc as a server. But now i've been looking for tutorials on how to do that highscore table to store the variables in a .txt file but what I've got doesn't fit my needs, I want something the simplest way it could be, the only thing I need is that flash sends the variables of the scores, then php gets that variables (which I still don't know how to do), saves them into a txt file this way: score1=x&score2=x&score3=x&name1=x&name2=x.... so then I can use loadVariables in flash to read them from the .txt file.

    I'm posting a .fla file of the score table I took from the game i've done. It saves the scores but only in your pc (that isn't really cool for a web game is it?).
    Could someone please tell me how to do that the simplest way (the code in flash and in php) if it's not too much to ask?

    Thanx in advance again.
    Attached Files Attached Files
    This is MC. His _parents sent him to stop() by the super market to buy some _root beer if he wanted to gotoAndPlay() with his friends at the park later.

    This is my Blog!... The gaming Process
    Please check out my site: Giddel Creations

  8. #8
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    Here is tutorial for you:
    http://www.flashkit.com/tutorials/Ga...-657/index.php
    Its one of simplest highscore systems I know.

  9. #9
    Registered User
    Join Date
    Sep 2010
    Posts
    2
    Hello guys I would like to ask if is it possible to make a "top score or hall of fame features" on a flash mobile game without using PHP/MySQL/XML etc.?

    we got a project on school that needs to have a hall of fame features on a flash mobile game, but I don't have an idea on how to do it, could you guys help me, kindly give me some sample codes or source code on how to do it on flash (mobile game)?

    Thanks

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center