
LoadVars.load() Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
581
an HTTP response header), getBytesTotal( ) continues to return undefined. To convert
bytes to kilobytes (KB), divide by 1024.
For an example that uses getBytesTotal( ) to create a variable preloader, see Example R-1
under LoadVars.getBytesLoaded( ).
Usage
Be careful not to divide by getBytesTotal( ) until it returns some positive integer.
See Also
LoadVars.getBytesLoaded( ), LoadVars.load( ), LoadVars.sendAndLoad( )
LoadVars.load() Method
import URL-encoded variables from a text file or server-side application
Flash 6
loadVarsObject.load(url)
Arguments
url A string specifying the path to a variable source—either a server-side script
that returns variables or a text file containing variables.
Returns
A Boolean indicating whether the method executed successfully. Note that the return value
is less useful than it appears. The load( ) method returns
false only if it is invoked with no
arguments. Because loading is asynchronous, load( )’s return value indicates only whether
the load was initiated successfully; it will return
true even if the load operation eventually
fails, in which case onLoad( ) is called with a
false status.
Description
The load( ) method initiates the download of URL-encoded variables from url, which can
be a local or remote ...