View Full Version : Saving Game?
Sythius
04-24-2009, 09:52 PM
I want it so people will be able to save ton my game. As it'll be quite big.
I want it to be saved to cookies on their computer.
I pretty much want the frame (which is in a Movie Clip) and all the variables for HP, Gold, etc, saved to the same file. They will only have 1 save file.
Any help will be appreciated and credit'd within my game.
bluemagica
04-25-2009, 05:26 AM
err, the HDD weighs around 300g so i don't think you can store a "ton" on it! <jk>
Anyway, normally for flash, we don't use cookies....we have access to something even better, SharedObjects, you can think of these as cookies for flash made by flash! Normally you can store about 100kb of info in a SO, but the user can allow you to store more!
I can't write a tutorial about it here, but you can find lots of help if you google a bit!
PS:- if you are learning by doing, why don't you move to as3? as3 will make your life easier and better!
kkbbcute
04-25-2009, 06:16 AM
Check this out if you are lazy to Google.
http://www.mikechambers.com/blog/2008/08/20/reading-and-writing-local-files-in-flash-player-10/
http://www.permadi.com/tutorial/flashSharedObject/index.html
bluemagica
04-25-2009, 06:37 AM
the second link is pretty good, and does all the explaining clearly....but err, whats the use of the first one? he is still using as2....
oh well, if you still have trouble understanding( which i don't think will happen), try pming pradvan, i asked him to write a tut on this last week, and he might be willing to explain things in detail to you!
kkbbcute
04-25-2009, 07:13 AM
The first link is there just in case he wants to take your advice to switch to AS3. ;)
Sythius
04-25-2009, 10:04 AM
I would switch to AS3 but can't as I'm on Flash 8 XD
I'm gunna look at that link now =)
bluemagica
04-25-2009, 11:32 AM
You can use Flashdevelop which is free, and a perfect coding environment for as3! You can also try "flex builder", which is also free but a bit big to download!
kkbbcute
04-25-2009, 03:09 PM
Although its quite pointless if yourr version of Flash doesn't support AS3 inn the first place :p
bluemagica
04-25-2009, 03:21 PM
huh? why? those two are alternates to flash, so he can just download those and use as3... sorry, i don't quite understand what you mean!
kkbbcute
04-25-2009, 03:48 PM
What I meant was, since he couldn't publish a AS3 file in Flash, what's the point of writing AS3 classes and all that. True, you can use FlashDevelop for AS2 as well, I'm just saying that your recommendation for him to use FlashDevelop to code in AS3 was pointless since he couldn't publish a AS3 Flash file.
bluemagica
04-25-2009, 04:24 PM
errm.....you can write a complete game from start to finish and publish it with just Flashdevelop and nothing else! Well for compiling he will be using the flex SDk, but that dosen't make any difference!
kkbbcute
04-25-2009, 04:36 PM
But won't he have to create his game from the start again then? Seeing that all he wants is a saving system, I don't suppose you want him to recode all his old classes from scratch just for this, would you?
bluemagica
04-25-2009, 04:54 PM
actually he doesn't have a "class" to begin with, all his code is on timeline and on movieclips! And i am not asking him to recode it right now either(well, if he plans to change this to as3, then that will need recoding from scratch).......I suggested FD for when he decides to get started with as3 in future!
kkbbcute
04-25-2009, 05:05 PM
I finally agree with that "in the future" part. :p
Sythius: Actually I would recommend that you write all your code into an AS file now and then duplicate it and write an AS3 version for it too, so when you decide to swap to AS3, it would be a simpler prrocess instead of a scramble to find AS3 code ;)
Sythius
04-25-2009, 06:49 PM
Haha.. Maybe...
Seems a lot of bother though o.o
... I'm gunna make this game totally in AS2 though..
I might do AS3 for if/when there's a sequel! xD
... Or for future projects..
kkbbcute
04-26-2009, 03:06 AM
So how was the link?
Did you figure it out or do you need some source code to reference from?
Sythius
04-27-2009, 08:17 AM
Oh I've had a few set backs, so won't be able to try it for awhile o.o
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.