Comments for AS2 Tutorial: Saving User's Game Progress in Flash

avatar for DrYoshiyahu
DrYoshiyahu

Oct. 1, 2011

Under rating threshold (show) Just a note to anyone who wants to just copy and paste this code and change the variable names. Check the left hand side of your code, make sure that you don't have a whole lot of spaces but actually a tab. You'll know if you get a syntax error.

+ - !

(2)

avatar for DrYoshiyahu
DrYoshiyahu

Jul. 4, 2011

Under rating threshold (show) I waws wondering this for a long time and then I saw this on your profile. Bookmarked. ;)

+ - !

(1)

avatar for DPbrad
DPbrad

Feb. 11, 2010

Under rating threshold (show) Well, I still use AS2 because Im still running on Flash MX 2004. I did have Flash CS4, but my computers in for repair so the old MX 2004 it is for a few months :)

+ - !

(1)

avatar for nymall
nymall

Feb. 25, 2010

Under rating threshold (show) AS2 is "technically" obsolete, but if you're anything other then a mainstream programming guru, it's easier to use AS2 then AS3. They're both Object Oriented, but AS2 is more natural.(Personal Opinion)

+ - !

(1)

avatar for BarbarianBabez
BarbarianBabez

Oct. 26, 2013

Under rating threshold (show) the code works fine but how do you tell it WHEN to write to the file? changing cash variable, closing the game, and restarting the game shows no data saved.

+ - !

(0)

avatar for BarbarianBabez
BarbarianBabez

Oct. 26, 2013

Under rating threshold (show) That code does not work in Flash AS2. copy paste brings syntax errors on line 2 and 3

+ - !

(0)

avatar for Mond
Mond

Nov. 26, 2010

Under rating threshold (show) YES!......the top of the High Scores list...who's the man! Good job DP.

+ - !

(0)

avatar for BadEgg
BadEgg

Feb. 11, 2010

Under rating threshold (show) it's not bad, correct me if im wrong, but isnt AS2 almost obsolete now?

+ - !

(-1)

avatar for artwich
artwich

Feb. 12, 2010

Under rating threshold (show) And just as a side note: The Shared object code didn't really change from as 2 to as 3 ;-) ~Art

+ - !

(0)

avatar for artwich
artwich

Feb. 11, 2010

Under rating threshold (show) Ah okay. And just for reference, I didn't know about it until I read your approach and though "hell, there has to be an easier way!" and did a bit of research ;-) ~Art

+ - !

(0)

avatar for DPbrad
DPbrad

Feb. 11, 2010

Under rating threshold (show) Meh, found this hard for myself when I tried to do this, so was unaware of the getSize() method. I will hopefully have more time tomorrow to finish off commenting the code. So I will update it hopefully.

+ - !

(0)

avatar for artwich
artwich

Feb. 11, 2010

Under rating threshold (show) Hm. Perhaps a bit of commenting in the actual source code? For example why the .flush() function is necessary. Also, correct me if I'm wrong, but isn't the exists variable useless? I mean, to check if an object exists you could just use if(!saveData.getSize()). The size would return 0, which is equivalent to false, which gets negated to true, supplying the exact test you need. A good tutorial, but a bit more explaining of what is actually going on might help. ~Art

+ - !

(0)

  • add a comment
  • « First
  • 1 - 12
  • Last »