URLLoader
The URLLoader object downloads data from a URL as text, binary data, or URL-encoded variables. It is useful for downloading text files, XML, or other information to be used in a dynamic, data-driven application.
A URLLoader object downloads all of the data from a URL before making it available to code in the applications. It sends out notifications about the progress of the download, which you can monitor through the bytesLoaded and bytesTotal properties, as well as through dispatched events.
Inherited from EventDispatcher
Can be created using method new:
Lib.Media.Net.URLLoader.new(request) |
Creates a URLLoader object. |
request - (default = nil) - A URLRequest object specifying the URL to download. If this parameter is omitted, no load operation begins. If specified, the load operation begins immediately (see the load entry for more information). |
Created URLLoader has properties:
bytesLoaded |
Indicates the number of bytes that have been loaded thus far during the load operation. |
bytesTotal |
Indicates the total number of bytes in the downloaded data. |
data |
The data received from the load operation. |
dataFormat |
Controls whether the downloaded data is received as text (URLLoaderDataFormat.TEXT), raw binary data (URLLoaderDataFormat.BINARY), or URL-encoded variables (URLLoaderDataFormat.VARIABLES). |
methods:
load(request) |
Sends and loads data from the specified URL. |
request - A URLRequest object specifying the URL to download. |
close() |
Closes the load operation in progress. (not implemented) |
|
events:
Lib.Media.Events.Event.COMPLETE
Lib.Media.Events.Event.OPEN
Lib.Media.Events.ProgressEvent.PROGRESS
Lib.Media.Events.IOErrorEvent.IO_ERROR
Lib.Media.Events.HTTPStatusEvent.HTTP_STATUS
Created with the Personal Edition of HelpNDoc: Free EPub producer