Packagecom.pblabs.engine.mxml
Classpublic class ResourceBinding
InheritanceResourceBinding Inheritance Object
Implements mx.core.IMXMLObject, flash.events.IEventDispatcher

The ResourceBinding class is meant to be used as an MXML tag to embed resources in the project's resulting .swf file. Embedded resources provide several benefits, the most useful of which is that the loading time of the swf will be less due to a decreased download time.

Embedded resources can be accessed just like any other resource with the resource manager's Load method. The only difference is that a reference to embedded resources will always exist, and therefore they will never be unloaded.

See also

com.pblabs.engine.core.ResourceManager
Embedding Resources


Public Properties
 PropertyDefined By
  filename : String
The string by which the resource can be looked up in the resource manager.
ResourceBinding
  resourceClass : Class
The embed statement for the asset that is to be embedded.
ResourceBinding
  resourceType : Class
The Resource subclass that should be created for this asset.
ResourceBinding
Public Methods
 MethodDefined By
  
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, weakRef:Boolean = false):void
ResourceBinding
  
dispatchEvent(event:Event):Boolean
ResourceBinding
  
hasEventListener(type:String):Boolean
ResourceBinding
  
initialized(document:Object, id:String):void
ResourceBinding
  
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
ResourceBinding
  
willTrigger(type:String):Boolean
ResourceBinding
Property Detail
filenameproperty
filename:String

The string by which the resource can be looked up in the resource manager. It should usually match the filename of the asset for clarity.

This property can be used as the source for data binding.


Implementation
    public function get filename():String
    public function set filename(value:String):void
resourceClassproperty 
resourceClass:Class

The embed statement for the asset that is to be embedded.

This property can be used as the source for data binding.


Implementation
    public function get resourceClass():Class
    public function set resourceClass(value:Class):void
resourceTypeproperty 
resourceType:Class

The Resource subclass that should be created for this asset.

This property can be used as the source for data binding.


Implementation
    public function get resourceType():Class
    public function set resourceType(value:Class):void

See also

com.pblabs.engine.core.Resource
Method Detail
addEventListener()method
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, weakRef:Boolean = false):void

Parameters

type:String
 
listener:Function
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
weakRef:Boolean (default = false)

dispatchEvent()method 
public function dispatchEvent(event:Event):Boolean

Parameters

event:Event

Returns
Boolean
hasEventListener()method 
public function hasEventListener(type:String):Boolean

Parameters

type:String

Returns
Boolean
initialized()method 
public function initialized(document:Object, id:String):void

Parameters

document:Object
 
id:String

removeEventListener()method 
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void

Parameters

type:String
 
listener:Function
 
useCapture:Boolean (default = false)

willTrigger()method 
public function willTrigger(type:String):Boolean

Parameters

type:String

Returns
Boolean