A Flash Developer Resource Site

Results 1 to 19 of 19

Thread: [DISC] Is It Possable??

  1. #1
    Senior Member Gloo pot's Avatar
    Join Date
    Aug 2005
    Location
    Australia Mate!
    Posts
    874

    [DISC] Is It Possable??

    I was just wondering about high scores... i know for publushing games ova d anet and u want high scores u need all da PHP stuff and what not but...

    I wana know is it possable to make a high score system on my computer or better yet in flash... (Some games i dont plan on publishing on the WWW cose the code isnt 100% mine and i dont wana get in trouble)

    so that me and ma sister and friends and stuff can it on ma computer and the high scores are stored in the .fls file or in a seperate file????

    thx peepz
    peace out

  2. #2
    _One of a Kind_ j.manfogle's Avatar
    Join Date
    Aug 2005
    Location
    Philippines/usa
    Posts
    198
    i dont have an answer but i want to know too!!
    Good Q!!
    Fogle

  3. #3
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,139
    I gues you could use XML, i'm pretty sure that can write to the HDD through flash, The only problem would be that anyone could edit scores in the file.
    lather yourself up with soap - soap arcade

  4. #4
    Untitled-1.fla strille's Avatar
    Join Date
    Mar 2001
    Location
    Sweden
    Posts
    1,626
    U cant write to da harddrive from a Flash movie unfortnatley, but u can use this cool thing called SharedObject to store stuff on the local computer. Check out this link, yo:

    http://www.macromedia.com/cfusion/kn...fm?id=tn_16194


    :-)

  5. #5
    Script kiddie VENGEANCE MX's Avatar
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,590
    Strille, that was cruel. But not uncalled for.
    http://www.birchlabs.co.uk/
    You know you want to.

  6. #6
    Senior Member Gloo pot's Avatar
    Join Date
    Aug 2005
    Location
    Australia Mate!
    Posts
    874
    kewl i check that site out now... i dun care if u can edit the high scores none of ma friends now how to use flash and if they do none of them would know u could edit the high scores.. (or maby thats just cose i dont know how 2)

    peace out

  7. #7
    Senior Member Gloo pot's Avatar
    Join Date
    Aug 2005
    Location
    Australia Mate!
    Posts
    874
    that shared object thing is prety kewl... do u know of n e 1 with a good tut about it or some were i can get a couple of sample codes for a sharded object high score system that i can learn from?

  8. #8
    A very senior man mrpauly99's Avatar
    Join Date
    Feb 2002
    Location
    Cool Britania
    Posts
    429
    er say what...?

  9. #9
    Senior Member Gloo pot's Avatar
    Join Date
    Aug 2005
    Location
    Australia Mate!
    Posts
    874
    er say what...?
    i dont get it... what were u refering 2, you should have used a quote

  10. #10
    avatar free
    Join Date
    Jul 2002
    Location
    UK
    Posts
    835
    mrpauly99 can't understand a word you're typing, is what he means

    Do you access this site through your mobile phone? If not, then don't type like you are. It's annoying and hard to read, and most people will just ignore it. See the README guide at the top of this forum for other tasty tips.

    As for tutorials, I don't know of anystandard ones people give, so just do a quick google search for some. Don't be put off though, it looks hard to do at first, but SharedObjects are not that bad.

    Cheers.
    jonmack
    flash racer blog - advanced arcade racer development blog

  11. #11
    Senior Member Gloo pot's Avatar
    Join Date
    Aug 2005
    Location
    Australia Mate!
    Posts
    874
    cheers m8...

    sry about dat post... i didnt realise i had done that, ill be better in da future

  12. #12
    Script kiddie VENGEANCE MX's Avatar
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,590
    Put this on the very first frame of your movie, before anything else:

    _root.saveData = SharedObject.getLocal("userSave");
    _root.save = _root.saveData.data;

    That script makes it so that _root.save is the object you save variables into. For example:

    _root.save.gold = 1000;

    Now, when you re-open the file, you can use this script to set _root.gold to the variable you saved:

    _root.gold = _root.save.gold;

    Of course, the user might not have a save file, so this is a better method, which will set _root.gold to 0 if no gold variable is found in the save file:

    if (_root.save.gold == undefined) {
    _root.save.gold=_root.gold=0;
    } else {
    _root.gold = _root.save.gold;
    }

    (I know it could've been made shorter with a ?: conditional operator, but I'm just keeping it simple).

    By default, Shared Object files only save when you close the program that the game is in. This way you can force it to save whenever you want:

    _root.saveData.flush();

    Any questions?

    And Gloo pot, mrpauly99 didn't need to use a quote. He was replying to post #6, because what you said made no sense, and he couldn't have been replying to post #7, because it was posted in exactly the same minute as his post.

    And for the love of all that's holy, please speak normally. This is a forum, not an IM client, and you don't have to use short, mis-spelled words wherever possible.
    http://www.birchlabs.co.uk/
    You know you want to.

  13. #13
    Senior Member Gloo pot's Avatar
    Join Date
    Aug 2005
    Location
    Australia Mate!
    Posts
    874
    Oh my bad, ill type proper english from now on...

    For that code you posted, do i use a dynamic text box and put sumthing like
    in box 1
    show._root.gold = _root.save1.gold;
    in box 2
    show._root.gold = _root.save2.gold;

    to show in a little box what i saved???

    and if i were to make a high scores table would i just have

    _root.save1Data = SharedObject.getLocal("userSave");
    _root.save = _root.save1Data.data;
    _root.save2Data = SharedObject.getLocal("userSave");
    _root.save = _root.save2Data.data;

    and add some if statments saying

    if _root.save2 is greater than _root.save1
    save in _root.save1 instead of 2
    else
    save _root.save2

    (sry about the incorect code there im only learning and dont know the exact statments to use, but i hope u get the picture)

  14. #14
    curiouser and curiouser LittleRed's Avatar
    Join Date
    Mar 2004
    Location
    Nottingham
    Posts
    335
    this might be helpful

  15. #15
    Senior Member Gloo pot's Avatar
    Join Date
    Aug 2005
    Location
    Australia Mate!
    Posts
    874
    Thanks for the site...

    LittleRed what is your Avitar picture of??? my computer screen is EXTEAMLY OLD and is darker than useal...

  16. #16
    curiouser and curiouser LittleRed's Avatar
    Join Date
    Mar 2004
    Location
    Nottingham
    Posts
    335
    it's some rusty cogs - but yeah, it's perhaps a little *too* dark

  17. #17
    Script kiddie VENGEANCE MX's Avatar
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,590
    Gloo Pot, turn up the Brightness and Contrast. If you can't make out that picture, then your monitor seriously needs adjusting.
    http://www.birchlabs.co.uk/
    You know you want to.

  18. #18
    Senior Member Gloo pot's Avatar
    Join Date
    Aug 2005
    Location
    Australia Mate!
    Posts
    874
    Lol, u dont thing i already tryed that... i also run a grafix display program that turns them up even more and still its darker than useal... with out this prog the orange background (it looks orange) of this forum would look like a brown, so i think ill get a new screen...

    and I supose i should just buy a new computer... this one is fair old and falling to pices.

  19. #19
    Who needs pants? hooligan2001's Avatar
    Join Date
    Apr 2001
    Location
    Somewhere
    Posts
    1,976
    You could put the swf in a vb form and then send the high scores to the vb form and then get vb to write it to a txt document. That would work and easy to do.

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