EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Page 1093

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SharedObject 1093
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 object instance to write to the disk.
var message_str:String;
this.createTextField("message_txt", this.getNextHighestDepth(), 0, 0, 300,
22);
message_txt.html = true;
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>";

Table of Contents

Related product manuals