Delete a SharedObject

Having problems removing SharedObjects from the users local computer? here are two easy to use methods that take the hassle out of clearing them permanently...

To delete a SharedObject from the local computer, you must firstly delete all of the properties contained inside the data object of the SharedObject instance and then you must flush the SharedObject instance, here are the methods that will do that for you. Inherited Method:

SharedObject.prototype.delete=function(){
for(var i in this.data){
delete this.data[i]
}
this.flush()
}

Usage:

so=SharedObject.getLocal("fg");
so.data.prop1="blah blah"; //add property
so.data.prop2="blah blah 2"; //add another property
so.flush() //now saved to a local .sol files
so.delete() //now delete them all again

Static Method:

SharedObject.delete=function(name){
var so=SharedObject.getLocal(name)
for(var i in so.data){
delete so.data[i]
}
so.flush()
}

Usage:

so=SharedObject.getLocal("fg");
so.data.prop1="blah blah"; //add property
so.data.prop2="blah blah 2"; //add another property
so.flush() //now saved to a local .sol files
SharedObject.delete("fg"); //delete them all again

image 1

Take your pick, whichever you find to be the most useful.


Close    To Top
  • Prev Article-Flash:
  • Next Article-Flash:
  • Now: Tutorial for Web and Software Design > Flash > Basic > Flash Content
    Photoshop Tutorial
     

    Special Effect

      3D Effect
      Photoshop Articles
    Programming Tutorial
     

    C/C++ Tutorial

      Visual Basic
      C# Tutorial
    Database Tutorial
     

    MySQL Tutorial

      MS SQL Tutorial
      Oracle Tutorial
    Geek Tutorial
     

    Blogging Tutorial

      RSS Tutorial
      Podcasting Tutorial
    Graphic Design Tutorial
      Coreldraw Tutorial
      Illustrator Tutorial
      3D Tutorials
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial/ Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial/ Articles
     

    XML Style

      AJAX Tutorial
      XML Mobile
    Flash Tutorial/ Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial/ Articles
      Linux Tutorial
      Symbian Tutorial
      MacOS Tutorial
    Personal Tech
      Hardware Tutorial
      Software Tutorial
      Online Auction