Sound.getBytesTotal( ) Method

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

the physical disk size of an external sound file, in bytes
soundObject.getBytesTotal()

Returns

An integer representing the size of the sound file, in bytes. Divide by 1024 to convert bytes to kilobytes (KB).

Description

The getBytesTotal( ) method tells us the byte size of an external file being loaded into soundObject via loadSound( ). For a new Sound object, getBytesTotal( ) returns undefined. Immediately after each call to loadSound( ), getBytesTotal( ) also returns undefined until the size of the sound file being loaded is determined. After that, it returns the total byte size of the loading sound until the next call to loadSound( ).

For Sound objects, getBytesTotal( ) is used together with getBytesLoaded( ) to determine (and display, normally) the load progress of a downloading sound file. See Sound.getBytesLoaded( ) for details and example code.

See Also

Sound.getBytesLoaded( ), Sound.onLoad( )



    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