
SharedObject.getSize() Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
768
|
ActionScript Language Reference
See Also
SharedObject.getSize(), System.showSettings()
SharedObject.getSize() Method
returns the size of the SharedObject, in bytes
Flash 6
theSharedObj.getSize()
Returns
The integer size of theSharedObj, in bytes.
Description
The getSize() method returns the total byte size of all the properties of theSharedObj.data.
When requesting an increase in the local storage setting for a domain, the getSize() method
can be used to tell the user exactly how much space is required by a movie (see the
Example for SharedObject.flush()). To convert bytes to kilobytes (KB), divide by 1024:
soKB = Math.floor(theSharedObj.getSize() / 1024);
The more properties theSharedObj.data has, the longer getSize() takes to execute.
See Also
SharedObject.flush()
SharedObject.onStatus() Event Handler
invoked when a SharedObject generates a status message (error, information, warning)
Flash 6
theSharedObj.onStatus(infoObject)
Arguments
infoObject An object whose code and level properties contain the status message.
Description
For local SharedObjects, the onStatus() event occurs only when flush() is invoked and the
local storage limit for the domain is too low to save the SharedObject to disk. When the
limit is too low, Flash displays a Settings dialog box asking ...