
SharedObject.getLocal() Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
765
// Just to make our point, open the local storage settings dialog box
// where the user can reenable storage by unchecking the Never option.
System.showSettings(1);
}
}
// Callback invoked after a flush() overflow precipitated a
// "pending" condition. User has been prompted and either increased
// the domain's disk space limit or denied the request.
gameData_so.onStatus = function (infoObject) {
// The infoObject.code property tells us what happened.
if (infoObject.code = = "SharedObject.Flush.Success") {
// Yay! They gave us space!
output_txt.text += "Required disk space added. Game saved.";
} else if (infoObject.code = = "SharedObject.Flush.Failed") {
// Oh well. No space granted. We can't save the game.
output_txt.text += "Insufficient disk space. Save failed.";
}
}
See Also
SharedObject.getSize(), SharedObject.onStatus(), System.showSettings()
SharedObject.getLocal() Method
returns a reference to a specified SharedObject instance
Flash 6
theSharedObj.getLocal(objectName)
theSharedObj.getLocal(objectName, localPath);
Arguments
objectName The string name of the local SharedObject. Can contain a forward slash (/).
Cannot contain the following characters: ~ % & \ ; : " ' , < > ? #
localPath An optional string specifying ...