I need help with an issue !'m seeing with a locally shared object that appears to be saving itself.
I have an email address book class as a simple two element array collection that contains name and email address, which is stored in a LSO.
I have a edit window that binds this array collection into a two column data grid where a user may edit the name and or email address.
There is a save button which saves the edit array collection back to the LSO, a revert button which re-loads the array collection and stomps on any pending edits.
However, it appears to be that soon as the data grids edits finish the array collection is saving to the LSO. I have one save routine I placed an alert in that routine so I can see when it is called. I'm not calling it, no alerts nothing. Yet when I reload the swf in the browsers the edits have stuck.?
Totally confused, how can they be saved to the LSO if I don't call flush?
When the SWF is closed, the Flash Player will flush the data to disk all by itself. Create your own method(s) to update the data in the LSO, and then flush it only when necessary.
Thanks for the info but I don't think that is the issue.
I have a private method when called assigns the array to the LSO and calls the flush.
On load I call the LSO and if it exists then I assign to the array collection.
Out side of these two methods the LSO does not exists (out of scope), so nothing to flush.
Also Once the edit is finished in the grid the LSO is saved no unload of the swf take place.
Hard to say without seeing your code. Is the data bound to your shared object
? If so, it may be updating itself. remember, flush() does not have to *always* be called to save the LSO.