XML.getBytesTotal( ) Method

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

the physical disk size of an external XML file, in bytes
xmlDoc.getBytesTotal()

Returns

An integer representing the size of the XML 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 xmlDoc via XML.load( ) or XML.sendAndLoad( ). The specified xmlDoc must be the top-level node in an XML object hierarchy (i.e., an instance of the XML class, not the XMLnode class).

For a new XML object, getBytesTotal( ) returns undefined. Immediately after load( ) or sendAndLoad( ) is called, getBytesTotal( ) returns 0 until the size of the XML file being loaded is determined. It then returns the total byte size of the loading file until the next call to load( ) or sendAndLoad( ).

The getBytesTotal( ) and getBytesLoaded( ) methods are used together to determine (and, normally, display) the load progress of a downloading XML file. See getBytesLoaded( ) for details and example code.

See Also

XML.getBytesLoaded( ), XML.onLoad( ), XML.load( ), XML.sendAndLoad( )



    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