03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The following events notify you when certain SharedObject activities occur:<br />

Code property Level property Meaning<br />

SharedObject.Flush.Fai<br />

led<br />

SharedObject.Flush.Suc<br />

cess<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 6<br />

Error SharedObject.flush() comm<strong>and</strong> that<br />

returned "pending" has failed (the user<br />

did not allot additional disk space for<br />

the shared object when Flash Player<br />

showed the Local Storage Settings<br />

dialog box).<br />

Status SharedObject.flush() comm<strong>and</strong> that<br />

returned "pending" has been<br />

successfully completed (the user<br />

allotted additional disk space for the<br />

shared object).<br />

Parameters<br />

infoObject:Object - A parameter defined according to the status message.<br />

Example<br />

The following example displays different messages based on whether the user chooses to allow<br />

or deny the SharedObject object instance to write to the disk.<br />

var message_str:String;<br />

this.createTextField("message_txt", this.getNextHighestDepth(), 0, 0, 300,<br />

22);<br />

message_txt.html = true;<br />

this.createTextField("status_txt", this.getNextHighestDepth(), 10, 30, 300,<br />

100);<br />

status_txt.multiline = true;<br />

status_txt.html = true;<br />

var items_array:Array = new Array(101, 346, 483);<br />

var currentUserIsAdmin:Boolean = true;<br />

var currentUserName:String = "Ramona";<br />

var my_so:SharedObject = SharedObject.getLocal("superfoo");<br />

my_so.data.itemNumbers = items_array;<br />

my_so.data.adminPrivileges = currentUserIsAdmin;<br />

my_so.data.userName = currentUserName;<br />

my_so.onStatus = function(infoObject:Object) {<br />

status_txt.htmlText = "";<br />

for (var i in infoObject) {<br />

status_txt.htmlText += ""+i+""+"\t"+infoObject[i];<br />

}<br />

SharedObject 1107

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!