this.createTextField("status_txt", this.getNextHighestDepth(), 10, 30, 300,
100);
status_txt.multiline = true;
status_txt.html = 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) {
status_txt.htmlText = "<textformat tabStops='[50]'>";
for (var i in infoObject) {
status_txt.htmlText += "<b>"+i+"</b>"+"\t"+infoObject[i];
}
status_txt.htmlText += "</textformat>";
};
var flushResult = my_so.flush(1000001);
switch (flushResult) {
case 'pending' :
message_str = "flush is pending, waiting on user interaction.";
break;
case true :
message_str = "flush was successful. Requested storage space approved.";
break;
case false :
message_str = "flush failed. User denied request for additional storage.";
break;
}
message_txt.htmlText = "<a
href=\"asfunction:System.showSettings,1\"><u>"+message_str+"</u></a>";
See also
SharedObject.getLocal(),
System.onStatus
SharedObject.onStatus
747
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers