Clear (Sharedobject.clear Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Method summary
Modifiers
Signature
clear() : Void
flush([minDiskSpace:
Number]) : Object
static
getLocal(name:String
,
[localPath:String],
[secure:Boolean]) :
SharedObject
getSize() : Number
Methods inherited from class Object
addProperty (Object.addProperty
(Object.hasOwnProperty
(Object.isPropertyEnumerable
method),
registerClass (Object.registerClass
(Object.toString
(Object.valueOf
method),

clear (SharedObject.clear method)

public clear() : Void
Purges all the data from the shared object and deletes the shared object from the disk. The
reference to
is still active, and
my_so
Availability: ActionScript 1.0; Flash Player 7
Example
The following example sets data in the shared object, and then empties all of the data from the
shared object.
var my_so:SharedObject = SharedObject.getLocal("superfoo");
my_so.data.name = "Hector";
trace("before my_so.clear():");
for (var prop in my_so.data) {
trace("\t"+prop);
}
trace("");
my_so.clear();
trace("after my_so.clear():");
Description
Purges all the data from the shared object and deletes
the shared object from the disk.
Immediately writes a locally persistent shared object
to a local file.
Returns a reference to a locally persistent shared
object that is available only to the current client.
Gets the current size of the shared object, in bytes.
method),
method),
isPropertyEnumerable
method),
method),
unwatch (Object.unwatch
watch (Object.watch method)
my_so
hasOwnProperty
isPrototypeOf (Object.isPrototypeOf
method),
method),
is now empty.
toString
valueOf
SharedObject
1083

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents