Old Articles - 6 years, 6 months ago - 0 Comments
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
Take your pick, whichever you find to be the most useful.
Note: This is an old article!
Please be aware that the content of this article may no longer be accurate and the links contained within could be broken.
Update Notifications
You can add our RSS feed to your favorite feed reader or recieve an email when a new article is posted by entering your email address below.
FLASH EXPERTS
- Andre Michelle
- Aral Balkan
- Big Spaceship
- Chafic Kazoun
- Colin Moock
- Craig Swann
- Erik Natzke
- Grant Skinner
- Jesse Warden
- John Grden
- Keith Peters
- Lee Brimelow
- Lord Alex
- Mario Kingemann
- Matt Voermn
- Ralph Hauwert
- Richard Leggett
- Trevor McCauley
FLASH COMPONENTS
- AFComponents
- Components Network
- Extend Studio
- Flash Relief
- Flash Store
- Flashden
- Flashloaded
- Ghostwire
- Image Vue
- Jumpeye
- Page Flip Component
- Slideshowpro
FLASH VIDEO
- Akamai
- FFMPEG
- FlashComGuru
- Flashstreamworks
- FLV Player
- FLVMDI
- flvPlayerPro
- FLVTool2
- Influxis
- JW FLV Player
- Vital Stream
FLASH RESOURCES
- Actionscript.org
- Adobe Labs
- Developer Center
- Flash Interface
- Flash Player Statistics
- Flashkit
- Kirupa
- MDM Zinc
- OSFlash
- PaperVision3D
- SWXFormat
- Tweener
SPONSORS
More In Actionscript
- Adobe MAKE SOME NOISE
- Undocumented Actionscript 3
- BitmapData.loadBitmap gone in AS3
- Actionscript 3 - New Capabilities
- Flash 8 - setTimeout

