0

I'm working on a Flash website and would like to delete all localSharedObjects (aka Flash cookies) that got created from that SWF domain space. (basically it's the user session) I found mySharedObject.clear();, but that function only deletes one localSharedObject and not all of the assigned domain. How to delete them all?

Tom
  • 5,588
  • 20
  • 77
  • 129

1 Answers1

2

You got to read all sharedObjects and then delete them.

sharedObject1 = SharedObject.getLocal("mySharedObject1");
sharedObject2 = SharedObject.getLocal("mySharedObject2");
...
sharedObject1.clear();
sharedObject2.clear();
...

I don't think that it is possible in any other way in flash.

Zhafur
  • 1,626
  • 1
  • 13
  • 31
  • Thanks for your feedback. The SharedObjects are bound to the domain where they got created. I thought there would be a way to clear/delete that domain.sol file. – Tom Apr 11 '14 at 21:41
  • 1
    @Tom Each shared object is stored in its own file, and `clear()` drops that file or its contents. So, if the domain has more than a single object defined in it, you have to read and clear them all, one by one. – Vesper Apr 12 '14 at 05:47