Log in
Please log in or register.
Pages: 1 [2]
  Print  
Author Topic: How-To: Adding a save feature to Flixel (and how to use it)  (Read 2929 times)
nitram_cero (2bam)
Sr. Member
****
Posts: 473



View Profile WWW
« Reply #15 on: Fri, Nov 20, 2009 »

Yes, I later found out that everything that is not a primitive, it's downcasted to an "Object"

I tried doing a recursive object setting (using for..in on each object and it's properties), but it didn't went well (tried doing a sort of "save all the frikin' state" like emulators do  Grin)

So... saving objects isn't that straightforward.

Regards
Logged

2BAM
I Hate Islands, SpaceCoffee, Finding Her, Caverns, Explosive Cats, The Duke, Run, A View on Relationships, RabbitClock's Quest
xraven13
Full Member
***
Posts: 152


View Profile
« Reply #16 on: Sat, Nov 21, 2009 »

Is there any way to get all the data saved at  once without naming variables?? I mean something like array.. Its clumsy if i need to check every variable in save file is it null or not etc.
Logged
nitram_cero (2bam)
Sr. Member
****
Posts: 473



View Profile WWW
« Reply #17 on: Sat, Nov 21, 2009 »

sure

Code:
sharedobject.data["array"] = myArray;
myArray = sharedobject.data["array"];
but you should keep it ordered anyways. Having names will make your code more readable.
Logged

2BAM
I Hate Islands, SpaceCoffee, Finding Her, Caverns, Explosive Cats, The Duke, Run, A View on Relationships, RabbitClock's Quest
Pages: 1 [2]
  Print  
 
Jump to: