|
-
Senior Member
[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
-
_One of a Kind_
i dont have an answer but i want to know too!!
Good Q!!
Fogle 
-
M.D.
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.
-
Untitled-1.fla
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
:-)
-
Script kiddie
Strille, that was cruel. But not uncalled for.
-
Senior Member
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
-
Senior Member
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?
-
A very senior man
-
Senior Member
i dont get it... what were u refering 2, you should have used a quote
-
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.
-
Senior Member
cheers m8...
sry about dat post... i didnt realise i had done that, ill be better in da future
-
Script kiddie
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.
-
Senior Member
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)
-
curiouser and curiouser
-
Senior Member
Thanks for the site...
LittleRed what is your Avitar picture of??? my computer screen is EXTEAMLY OLD and is darker than useal...
-
curiouser and curiouser
it's some rusty cogs - but yeah, it's perhaps a little *too* dark
-
Script kiddie
Gloo Pot, turn up the Brightness and Contrast. If you can't make out that picture, then your monitor seriously needs adjusting.
-
Senior Member
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.
-
Who needs pants?
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|