User Guide

594 ActionScript classes
The following events notify you when certain SharedObject activities occur:
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
infoObject:Object - A parameter defined according to the status message.
Example
The following example displays different messages based on whether the user chooses to allow
or deny the SharedObject instance to write to the disk.
this.createTextField("message_txt", this.getNextHighestDepth(), 0, 30, 120,
50);
this.message_txt.wordWrap = true;
this.createTextField("status_txt", this.getNextHighestDepth(), 0, 90, 120,
100);
this.status_txt.wordWrap = true;
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;
my_so.onStatus = function(infoObject:Object) {
for (var i in infoObject) {
status_txt.text += i+"-"+infoObject[i] +"\n";
}
};
Code property Level property Meaning
SharedObject.Flush.Failed Error SharedObject.flush() method that
returned
"pending" has failed (the
user did not allot additional disk
space for the shared object when
Flash Player showed the Local
Storage Settings dialog box).
SharedObject.Flush.Success Status SharedObject.flush() method that
returned
"pending" was successfully
completed (the user allotted
additional disk space for the shared
object).