A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: [Last Try] Highscore XML - Nearly there but...

Threaded View

  1. #1
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167

    [Last Try] Highscore XML - Nearly there but...

    INTRO

    Hey everyone

    Ok, so I have this game (well Ostil and I) that is completed and have also posted up here in the FK game section

    Though it isnt all that great, its still quite the achievement for two new Flash Game makers. The final step is to make and complete a highscore system

    BUT WAIT!

    Before you go, Im not asking you to do it for me, because most of it is already done *phew* .. hopefully your still here

    There is only one small (I hope) problem, which I have posted here in the Games and XML forum in the past and have yet to figure it out. I have also tried other forums without any success

    So in one last desperate cry for help , I have resulted in posting up the single player .fla as well as the XML and ASP files and I really really hope someone here could help me. With this help, I can do endless things with xml , so I really would like to learn my mistakes



    PROBLEM

    The problem is this:
    WHAT WORKS:
    - I have an xml file that contains the player name and score of the top 10 highscores

    - When you play single mode and 'die', it checks to see if you made at least the bottom of the highscores and then sends you to the highscore screen where you can input your name

    - After entering your name and clicking the 'submit' button, it takes you back to the game over screen where you can choose to play again or go back to the menu

    - If you check the xml file after this (or the highscore listings), the name successfully changes to the users name in the spot where he/she is now in the highscore

    WHAT DOES *NOT* WORK:
    - The score the player earned for some unknown reason does not change along with the player name.

    For example:
    Highscore 7 contains the name Matt with a score 8
    Another user beats this highscore with 10 and inputs his name Bob , but the xml file only changed "matt" to "bob" and not the numbers

    I have tried reading, forums, tutorials and I cannot find out whats wrong!, anyways, your my last hope folks ... so please help out


    Thanks everyone! *attaches*



    CODE

    Ok now where to look and find things:
    1) .Fla the actual game
    2) info.txt is the xml file, just save it as an xml since I cannot attach an xml file here
    3) asp.txt is the asp file, just save that in dreamweaver or whatever as the asp file since I cannot attach asp files


    Where the code is:
    In the .fla the code lies on the very last frame of the time line on the 'submit score' button. It basically:
    1) Creates an XML object that loads the xml file.
    2) Has two arrays 'topScore' , 'name' which contains the name and score in the top list
    3) It finally checks to see where the player should be and replaces the name and score (but the score doesnt work)


    CONCLUSION

    Well, I know this has been an extremely lengthly thread and one that most of you wont end up reading , so why am I addressing you ... haha

    But I would appreciate ... no REALLY appreciate it if someone even looked into the problem. This has been bugging me for SO long and I just want it to end

    Many thanks FK
    Last edited by Osteel; 05-01-2009 at 02:39 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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center