
LoadVars.getBytesTotal() Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
580
|
ActionScript Language Reference
Bugs
Macromedia’s documentation for Flash MX claims that getBytesLoaded( ) returns undefined
when no load operation is in progress. In Flash Player 6, it actually returns the total bytes
transferred in the most recent load, even after that load has finished.
See Also
LoadVars.getBytesTotal( ), LoadVars.load( ), LoadVars.sendAndLoad( ), setInterval( ), the
TextField class
LoadVars.getBytesTotal() Method
check the expected total byte size of loading variables
Flash 6
loadVarsObject.getBytesTotal()
Returns
The total number of bytes being transferred as a result of a load( ) or sendAndLoad( ) call, or
undefined before the number of bytes is determined.
Description
The getBytesTotal( ) method tells us the expected total byte size of the current variable
transfer. For a new LoadVars object, getBytesTotal( ) returns
undefined. Immediately after
load( ) or sendAndLoad( ) are called, getBytesTotal( ) continues to return
undefined until the
size of the variables being loaded is determined (normally within a second). It then returns
the total byte size of the loading variables until the next call to load( ) or sendAndLoad( ).If
the total byte size cannot be determined (for example, due to a missing Content-Length in
// Request variables ...