Clear (Sharedobject.clear Method); Data (Sharedobject.data Property) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Availability: ActionScript 2.0; Flash Lite 2.0
Parameters
objectName:String
notifyFunction:Function
application that the
getLocal()

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 Lite 2.0
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():");
for (var prop in my_so.data) {
trace("\t"+prop);
}
This ActionScript displays the following message in the Output panel:
before my_so.clear():
name
after my_so.clear():

data (SharedObject.data property)

public data :
Object
The collection of attributes assigned to the
an object of any basic ActionScript or JavaScript type—Array, Number, Boolean, and so on.
For example, the following lines assign values to various aspects of a shared object.
- A string that represents the name of the shared object.
- The name of a function the player calls to notify the
method has executed and the data is finished loading.
my_so
is now empty.
property of the object. Each attribute can be
data
SharedObject
587

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Questions and answers

Table of Contents