Packageorg.springextensions.actionscript.core.io.support
SVN browsingLoadURLOperation.as
FisheyeLoadURLOperation.as
Classpublic class LoadURLOperation
InheritanceLoadURLOperation Inheritance AbstractProgressOperation Inheritance AbstractOperation Inheritance flash.events.EventDispatcher

An IOperation implementation that can load arbitrary data from a specified URL.



Documentation reference: operations


Public Properties
 PropertyDefined by
 Inheritederror : *
The error of this operation or null if no error occurred during this operation.
AbstractOperation
 Inheritedprogress : uint
The progress of this operation.
AbstractProgressOperation
 Inheritedresult : *
The result of this operation or null if the operation does not have a result.
AbstractOperation
 Inheritedtimeout : int
The timeout in milliseconds.
AbstractOperation
 Inheritedtotal : uint
The total amount of progress this operation should make before being done.
AbstractProgressOperation
Protected Properties
 PropertyDefined by
  urlLoader : URLLoader
Internal URLLoader instance that is used to do the actual loading of the data.
LoadURLOperation
Public Methods
 MethodDefined by
  
LoadURLOperation(url:String, dataFormat:String = null)
Creates a new LoadURLOperation instance.
LoadURLOperation
 Inherited
addCompleteListener(listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Convenience method for adding a listener to the OperationEvent.COMPLETE event.
AbstractOperation
 Inherited
addErrorListener(listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Convenience method for adding a listener to the OperationEvent.ERROR event.
AbstractOperation
 Inherited
addProgressListener(listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Convenience method for adding a listener to the OperationEvent.PROGRESS event.
AbstractProgressOperation
 Inherited
addTimeoutListener(listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Convenience method for adding a listener to the OperationEvent.TIMEOUT event.
AbstractOperation
 Inherited
dispatchCompleteEvent(result:* = null):Boolean
Convenience method for dispatching a OperationEvent.COMPLETE event.
AbstractOperation
 Inherited
dispatchErrorEvent(error:* = null):Boolean
Convenience method for dispatching a OperationEvent.ERROR event.
AbstractOperation
 Inherited
Convenience method for dispatching a OperationEvent.TIMEOUT event.
AbstractOperation
 Inherited
removeCompleteListener(listener:Function, useCapture:Boolean = false):void
Convenience method for removing a listener from the OperationEvent.COMPLETE event.
AbstractOperation
 Inherited
removeErrorListener(listener:Function, useCapture:Boolean = false):void
Convenience method for removing a listener from the OperationEvent.ERROR event.
AbstractOperation
 Inherited
removeProgressListener(listener:Function, useCapture:Boolean = false):void
Convenience method for removing a listener from the OperationEvent.PROGRESS event.
AbstractProgressOperation
 Inherited
removeTimeoutListener(listener:Function, useCapture:Boolean = false):void
Convenience method for removing a listener from the OperationEvent.TIMEOUT event.
AbstractOperation
Protected Methods
 MethodDefined by
  
completeHandler(event:Event):void
Handles the Event.COMPLETE event of the internally created URLLoader.
LoadURLOperation
 Inherited
Convenience method for dispatching a OperationEvent.PROGRESS event.
AbstractProgressOperation
  
errorHandler(event:Event):void
Handles the SecurityErrorEvent.SECURITY_ERROR and IOErrorEvent.IO_ERROR events of the internally created URLLoader.
LoadURLOperation
  
init(url:String, dataFormat:String = "text"):void
Initializes the LoadURLOperation instance.
LoadURLOperation
  
progressHandler(event:ProgressEvent):void
Handles the ProgressEvent.PROGRESS event of the internally created URLLoader.
LoadURLOperation
  
Removes all the registered event handlers from the internally created URLLoader and sets itr to null afterwards.
LoadURLOperation
 Inherited
startTimeout():void
AbstractOperation
Events
 EventSummaryDefined by
 Inherited Dispatched when the current AbstractOperation has new progress information to report.AbstractProgressOperation
 Inherited Dispatched when the current AbstractOperation has completed its functionality successfully.AbstractOperation
 Inherited Dispatched when the current AbstractOperation encountered an error.AbstractOperation
 Inherited Dispatched when the current AbstractOperation timed out.AbstractOperation
Property detail
urlLoaderproperty
protected var urlLoader:URLLoader

Internal URLLoader instance that is used to do the actual loading of the data.

Constructor detail
LoadURLOperation()constructor
public function LoadURLOperation(url:String, dataFormat:String = null)

Creates a new LoadURLOperation instance.

Parameters
url:String — The specified URL from which the data will be loaded.
 
dataFormat:String (default = null) — Optional argument that specifies the data format of the expected data. Use the flash.net.URLLoaderDataFormat enumeration for this.

See also

flash.net.URLLoaderDataFormat
Method detail
completeHandler()method
protected function completeHandler(event:Event):void

Handles the Event.COMPLETE event of the internally created URLLoader.

Parameters
event:Event — The specified Event.COMPLETE event.
errorHandler()method 
protected function errorHandler(event:Event):void

Handles the SecurityErrorEvent.SECURITY_ERROR and IOErrorEvent.IO_ERROR events of the internally created URLLoader.

Parameters
event:Event — The specified ProgressEvent.PROGRESS or IOErrorEvent.IO_ERROR event.
init()method 
protected function init(url:String, dataFormat:String = "text"):void

Initializes the LoadURLOperation instance.

Parameters
url:String — The specified URL from which the data will be loaded.
 
dataFormat:String (default = "text") — Optional argument that specifies the data format of the expected data. Use the flash.net.URLLoaderDataFormat enumeration for this. Default is "text".

See also

flash.net.URLLoaderDataFormat
progressHandler()method 
protected function progressHandler(event:ProgressEvent):void

Handles the ProgressEvent.PROGRESS event of the internally created URLLoader.

Parameters
event:ProgressEvent — The specified ProgressEvent.PROGRESS event.
removeEventListeners()method 
protected function removeEventListeners():void

Removes all the registered event handlers from the internally created URLLoader and sets itr to null afterwards.