SharedObject.getSize( ) Method

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
SharedObject.getSize( ) Method Flash 6

returns the size of the SharedObject, in bytes
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( )



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net