views:

325

answers:

2

I have a program with a save feature - the user clicks a button, and everything is saved to a local Shared Object with the flush(); command.

My problem is that Flash .swf files automatically save to the local Shared Object when the movie is closed, overwriting their previous, manual save.

Is there anyway to prevent flash from saving to the shared object as the movie closes?

+1  A: 

Here's something that could solve your problem but not answer your question. Take the properties of your shared object and duplicate them. If you have "foo", "bar" and "baz" then create "saveFoo", "saveBar" and "saveBaz".

When the movie starts, copy the "save" versions into the run-time variants. "foo = saveFoo; bar = saveBar;" and so on.

To save, copy the run-time versions into the "save" variants and flush.

Now the auto-save at the end won't change anything as the "save" variants are the only ones that really matter.

Season to taste.

George Phillips
A: 

no, you cannot prevent flash from saving shared objects ...

also, i think, you should not use shared objects to maintain your applications state, unless you want to use that exact effect ...

when you read that object, copy it, and on save, write the copy into the original ...

back2dos