Example
The following example gets the size of the shared object
var items_array:Array = new Array(101, 346, 483);
var currentUserIsAdmin:Boolean = true;
var currentUserName:String = "Ramona";
var my_so:SharedObject = SharedObject.getLocal("superfoo");
my_so.data.itemNumbers = items_array;
my_so.data.adminPrivileges = currentUserIsAdmin;
my_so.data.userName = currentUserName;
var soSize:Number = my_so.getSize();
trace(soSize);
onStatus (SharedObject.onStatus handler)
onStatus = function(infoObject:Object) {}
Invoked every time an error, warning, or informational note is posted for a shared object. If
you want to respond to this event handler, you must create a function to process the
information object that is generated by the shared object.
The information object has a code property containing a string that describes the result of the
handler, and a
onStatus
.
"Error"
In addition to this
onStatus
. If
System.onStatus
to respond to it, Flash processes a function assigned to
The following events notify you when certain
Code property
SharedObject.Flush.Fa
iled
SharedObject.Flush.Su
ccess
Availability: ActionScript 1.0; Flash Player 6
1092 ActionScript classes
property containing a string that is either
level
handler, Flash also provides a super function called
is invoked for a particular object and no function is assigned
onStatus
Level property
Error
Status
:
my_so
System.onStatus
activities occur:
SharedObject
Meaning
SharedObject.flush()
returned
"pending"
not allot additional disk space for the shared
object when Flash Player showed the Local
Storage Settings dialog box).
SharedObject.flush()
returned
"pending"
completed (the user allotted additional disk
space for the shared object).
or
"Status"
, if it exists.
command that
has failed (the user did
command that
has been successfully
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?