A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: destroying SharedObject.getLocal when the page is closed?

  1. #1
    Member
    Join Date
    Jun 2003
    Posts
    57

    destroying SharedObject.getLocal when the page is closed?

    Is there a way to destroy SharedObject.getLocal when the page is closed?

    Oh, also I want to say that destroying the object when the swf is loaded and it is finished reading SharedObject.getLocal will cause other problems.
    Last edited by Érico Lopez; 01-24-2009 at 11:43 AM.

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    can you not use 2 SharedObjects, 1 to hold permanent variables and 1 for temporary, and destroy the temporary on load with something like -
    Code:
    SharedObject.delete=function(name){
    var so=SharedObject.getLocal(name);
    for(var i in so.data){
    delete so.data[i];
    }
    so.flush();
    }
    
    so=SharedObject.getLocal("fig");
    so.flush();
    SharedObject.delete("fig");

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center