Packagecom.bourre.load.strategy
Classpublic class URLLoaderStrategy
ImplementsLoadStrategy

Player version: Flash Player 9.0
Language version: ActionScript 3.0

The URLLoaderStrategy class define a loading strategy using Lowra URL loader.



Public Methods
 MethodDefined by
  
URLLoaderStrategy(dataFormat:String = null)
Creates new URLLoaderStrategy instance.
URLLoaderStrategy
  
Returns current loaded bytes amount.
URLLoaderStrategy
  
Returns total bytes to load by this strategy.
URLLoaderStrategy
  
isValidDataFormat(dataFormat:String):Boolean
[static]
URLLoaderStrategy
  
load(request:URLRequest = null, context:LoaderContext = null):void
Loads content.
URLLoaderStrategy
  
release():void
Releases loading process.
URLLoaderStrategy
  
setDataFormat(dataFormat:String):void
Sets how the downloaded data is received.
URLLoaderStrategy
  
setOwner(owner:Loader):void
Sets the owner of this strategy.
URLLoaderStrategy
  
toString():String
Returns the string representation of this instance.
URLLoaderStrategy
Protected Methods
 MethodDefined by
  
_onComplete(e:Event):void
URLLoaderStrategy
  
_onHttpStatus(e:HTTPStatusEvent):void
URLLoaderStrategy
  
_onIOError(e:IOErrorEvent):void
URLLoaderStrategy
  
_onOpen(event:Event):void
URLLoaderStrategy
  
_onProgress(e:ProgressEvent):void
URLLoaderStrategy
  
_onSecurityError(e:SecurityErrorEvent):void
URLLoaderStrategy
Public Constants
 ConstantDefined by
  BINARY : String = "binary"
[static] Specifies that downloaded data is received as raw binary data.
URLLoaderStrategy
  TEXT : String = "text"
[static] Specifies that downloaded data is received as text.
URLLoaderStrategy
  VARIABLES : String = "variables"
[static] Specifies that downloaded data is received as URL-encoded variables.
URLLoaderStrategy
Constructor detail
URLLoaderStrategy()constructor
public function URLLoaderStrategy(dataFormat:String = null)

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Creates new URLLoaderStrategy instance.

Parameters
dataFormat:String (default = null) — (optional) Downloaded data format

See also

Method detail
_onComplete()method
protected function _onComplete(e:Event):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Parameters
e:Event
_onHttpStatus()method 
protected function _onHttpStatus(e:HTTPStatusEvent):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Parameters
e:HTTPStatusEvent
_onIOError()method 
protected function _onIOError(e:IOErrorEvent):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Parameters
e:IOErrorEvent
_onOpen()method 
protected function _onOpen(event:Event):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Parameters
event:Event
_onProgress()method 
protected function _onProgress(e:ProgressEvent):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Parameters
e:ProgressEvent
_onSecurityError()method 
protected function _onSecurityError(e:SecurityErrorEvent):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Parameters
e:SecurityErrorEvent
getBytesLoaded()method 
public function getBytesLoaded():uint

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns current loaded bytes amount.

Returns
uint
getBytesTotal()method 
public function getBytesTotal():uint

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns total bytes to load by this strategy.

Returns
uint
isValidDataFormat()method 
public static function isValidDataFormat(dataFormat:String):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Parameters
dataFormat:String

Returns
Boolean
load()method 
public function load(request:URLRequest = null, context:LoaderContext = null):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Loads content.

Parameters
request:URLRequest (default = null) — The absolute or relative URL of the content to load.
 
context:LoaderContext (default = null) — (optional) A LoaderContext object, which has properties that define the following:
  • Whether or not to check for the existence of a policy file upon loading the object
  • The ApplicationDomain for the loaded object
  • The SecurityDomain for the loaded object
  • /ul>

    For complete details, see the description of the properties in the LoaderContext class.

release()method 
public function release():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Releases loading process.

setDataFormat()method 
public function setDataFormat(dataFormat:String):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Sets how the downloaded data is received.

If the value of the dataFormat property is URLLoaderDataFormat.TEXT, the received data is a string containing the text of the loaded file.

If the value of the dataFormat property is URLLoaderDataFormat.BINARY, the received data is a ByteArray object containing the raw binary data.

If the value of the dataFormat property is URLLoaderDataFormat.VARIABLES, the received data is a URLVariables object containing the URL-encoded variables.

The default is URLLoaderStrategy.TEXT

Parameters
dataFormat:String — Downloaded data format
setOwner()method 
public function setOwner(owner:Loader):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Sets the owner of this strategy.

Parameters
owner:Loader — object who use this strategy
toString()method 
public function toString():String

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns the string representation of this instance.

Returns
String — the string representation of this instance
Constant detail
BINARYconstant
public static const BINARY:String = "binary"

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Specifies that downloaded data is received as raw binary data.

TEXTconstant 
public static const TEXT:String = "text"

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Specifies that downloaded data is received as text.

VARIABLESconstant 
public static const VARIABLES:String = "variables"

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Specifies that downloaded data is received as URL-encoded variables.