XML.getBytesTotal( ) Method | Flash 6 |
the physical disk size of an external XML file, in bytes |
An integer representing the size of the XML file, in bytes. Divide by 1024 to convert bytes to kilobytes (KB).
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.
XML.getBytesLoaded( ), XML.onLoad( ), XML.load( ), XML.sendAndLoad( )