save and load a game

  • ticaleka
  • Born
  • Born
  • ticaleka
  • Posts: 2

Post 3+ Months Ago

is it possible to make an application in flash that has save and load, and how can it be done?
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Save and load to what? To a .txt file? to a "cookie" (called a Shared Object in Flash), to a database?

What kind of information are you trying to save?
  • ticaleka
  • Born
  • Born
  • ticaleka
  • Posts: 2

Post 3+ Months Ago

I'm making an application that draws some electrical loops, and I was wondering what is the best way to save all the parameters(hight, width, number of loops...), and how can I do it, and is it possible to load those parameters later, so the same picture could be drawn? Also, is it possible to save that as some kind of project on hard drive, so next time when user uses the application, he could load his work from his hard drive.
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

You may want to check out Shared Objects in Flash. I don't know too much about them, but they are basically cookies for Flash. You can save data to the object and then have Flash load that in later.

You can find more information about them in the AS Reference in Flash, macromedia.com, and i'm sure a good search will provide good results as well.

It sounds to me like this is the route you want to go.
  • stinger
  • Graduate
  • Graduate
  • stinger
  • Posts: 157
  • Loc: San Jose, CA

Post 3+ Months Ago

yes you can.

you can use a database, text file, or dynamic filing system to achieve this.

Try referencing the mx manuals or tutorials for a better idea of what you want to do.
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Using a database or a text file would be a bit inefficient since the information needed will be based on individual users input. This would require individual tables to be created in a database, or if using a text file the information will need to be seperated somehow per user.

However a Shared Object will store the information in it's own file on the local machine, and Flash can then check to see if that Shared Object exists on the machine, and if it does it can load the data and do what it needs to with it.

An excellent example of this would be the newly redesigned site of the actionscript god Keith Peters.... http://www.bit-101.com . He uses Shared Objects to store the information about window positions, sizes, which windows are opened, what color you have chosen, etc, etc. As you can see if you re-arrange anything on the site, close it out, and go back, it loads the information from the Shared Object on the viewers machine and puts things how they should be.

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 11 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.