SWFAddress and Data Persistence
I'm creating a Flash site with a dynamic inventory search feature where a bunch of checkboxes toggle different types of clothing items to appear in a gallery. For example, users may check "Shirts" "Jeans" and "Bags" from the list and a dynamic array of images will be loaded in the gallery corresponding to their selections.
My problem is finding a way to save the state of the user's selections when they leave and return to the page.
If the site had a SUBMIT button for the user data, I would codify this into the URL with SWFAddress when the button was pressed (ie mysite.com/#/shirts-jeans-bags/) but since the client demands the checkboxes to show immediate results, I need a different approach. (Otherwise, every checkbox click would add to the user's SWFAddress history).
I want the site to preserve their data if the user were to navigate away from the page and then push the browser's Back Button.
Is this something I can do with SWFAddress? Better to use FlashVars? What's the best method to preserve the data?
If you don´t like so many addresses in the SWFAddress history (let´s 5 different URLs after using the gallery filter 5 times) and you´d like the back button to go to a different section instead, you can always handle that in your SWF keeping track of the navigation (go to the previous page in history that is not the gallery).
I hope I helped.
Your best bet here is probably the SharedObject class. This is flash's version of cookies and lets you store data on the user's machine.
Other options are updating the url in response to any changes in the checkboxes, as you mention, or storing the state on the server for each user and updating when they make changes, but I think SharedObject is simpler and more appropriate.