Packagecom.bourre.load
Classpublic class GraphicLoaderLocator
InheritanceGraphicLoaderLocator Inheritance AbstractLocator

Player version: Flash Player 9.0
Language version: ActionScript 3.0

The GraphicLoaderLoacator store and register GraphicLoader objects.


Example
  
  public function loadFile( ) : void
  {
   var loader : GraphicLoader = new GraphicLoader( );
   loader.setName( "MyLogo" );
   loader.load( new URLRequest( "logo.jpg" );
  }
  
  public function anotherFunction( ) :void
  {
   var logo : DisplayObject = GraphicLoaderLocator.getInstance().getGraphicLoader( "MyLogo" ).getView();
  }
  

See also

GraphicLoader


Protected Properties
 PropertyDefined by
 Inherited_m : HashMap
Map storing String keys associated with Object values.
AbstractLocator
Public Methods
 MethodDefined by
  
GraphicLoaderLocator(access:ConstructorAccess)
private
GraphicLoaderLocator
 Inherited
add(d:Dictionary):void
Adds all ressources contained in the passed-in dictionnary into this locator instance.
AbstractLocator
 Inherited
addEventListener(type:String, listener:Object, ... rest):Boolean
Adds an event listener for the specified event type.
AbstractLocator
  
addListener(listener:Object):Boolean
Adds the passed-in listener as listener for all events dispatched by this event broadcaster.
GraphicLoaderLocator
 Inherited
callMethodOnAllValues(methodName:String, ... args):void
Takes all values of a Locator and call on each value the method name passed as 1st argument.
AbstractLocator
  
getApplicationDomain(name:String):ApplicationDomain
Returns the applicationDomain of loaded display object.
GraphicLoaderLocator
  
Returns GraphicLoader object registered with passed-in name identifier.
GraphicLoaderLocator
  
[static] Returns unique GraphicLoaderLocator.
GraphicLoaderLocator
 Inherited
getKeys():Array
Returns an Array view of the keys contained in this locator.
AbstractLocator
 Inherited
Returns the exclusive logger object owned by this locator.
AbstractLocator
 Inherited
getType():Class
Return the class type of elements in this container.
AbstractLocator
 Inherited
getValues():Array
Returns an Array view of the values contained in this locator.
AbstractLocator
 Inherited
isRegistered(name:String):Boolean
Returns true is there is a ressource associated with the passed-in key.
AbstractLocator
 Inherited
isTyped():Boolean
Returns true if this container perform a verification of the type of elements.
AbstractLocator
 Inherited
locate(name:String):Object
Returns the ressource associated with the passed-in key.
AbstractLocator
 Inherited
matchType(o:*):Boolean
Verify that the passed-in object type match the current container element's type.
AbstractLocator
 Inherited
processOnAllValues(f:Function, ... args):void
Takes all values of a Locator and pass them one by one as arguments to a method of an object.
AbstractLocator
 Inherited
register(name:String, o:Object):Boolean
Registers passed-in object with identifier name to this locator.
AbstractLocator
  
release():void
[static] Releases instance.
GraphicLoaderLocator
 Inherited
removeEventListener(type:String, listener:Object):Boolean
Removes the passed-in listener for listening the specified event.
AbstractLocator
  
removeListener(listener:Object):Boolean
Removes the passed-in listener object from this event broadcaster.
GraphicLoaderLocator
 Inherited
toString():String
Returns the string representation of this instance.
AbstractLocator
 Inherited
unregister(name:String):Boolean
Unregisters object registered with identifier name.
AbstractLocator
Protected Methods
 MethodDefined by
 Inherited
broadcastEvent(e:Event):void
Broadcast the passed-in event object to listeners according to the event's type.
AbstractLocator
 Inherited
Returns event Broadcaster owned by this locator.
AbstractLocator
  
onRegister(name:String = null, o:Object = null):void
Dispatches GraphicLoaderLocatorEvent event using passed-in arguments as event properties when a GraphicLoader is registered in locator.
GraphicLoaderLocator
  
onUnregister(name:String = null):void
Dispatches GraphicLoaderLocatorEvent event using passed-in arguments as event properties when a GraphicLoader is unregistered from locator.
GraphicLoaderLocator
Events
 EventSummaryDefined by
   Dispatched when graphic loader is registered in GraphicLoaderLocator locator.GraphicLoaderLocator
   Dispatched when graphic loader is unregistered from GraphicLoaderLocator locator.GraphicLoaderLocator
Constructor detail
GraphicLoaderLocator()constructor
public function GraphicLoaderLocator(access:ConstructorAccess)

Player version: Flash Player 9.0
Language version: ActionScript 3.0

private

Parameters
access:ConstructorAccess
Method detail
addListener()method
public function addListener(listener:Object):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Adds the passed-in listener as listener for all events dispatched by this event broadcaster. The function returns true if the listener have been added at the end of the call. If the listener is already registered in this event broadcaster the function returns false.

Note : The addListener function doesn't accept functions as listener, functions could only register for a single event.

Parameters
listener:Object — the listener object to add as global listener

Returns
Booleantrue if the listener have been added during this call
getApplicationDomain()method 
public function getApplicationDomain(name:String):ApplicationDomain

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns the applicationDomain of loaded display object.

Parameters
name:String

Returns
ApplicationDomain — The applicationDomain of loaded display object.
getGraphicLoader()method 
public function getGraphicLoader(name:String):GraphicLoader

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns GraphicLoader object registered with passed-in name identifier.

Parameters
name:String

Returns
GraphicLoaderGraphicLoader object registered with passed-in name identifier.

Throws
Error — name is not registered in current locator
getInstance()method 
public static function getInstance():GraphicLoaderLocator

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns unique GraphicLoaderLocator.

Returns
GraphicLoaderLocator — the unique GraphicLoaderLocator.
onRegister()method 
protected override function onRegister(name:String = null, o:Object = null):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Dispatches GraphicLoaderLocatorEvent event using passed-in arguments as event properties when a GraphicLoader is registered in locator.

Event type is GraphicLoaderLocatorEvent.onRegisterGraphicLoaderEVENT

Parameters
name:String (default = null) — Name of the registered GraphicLoader
 
o:Object (default = null) — The registered GraphicLoader

See also

onUnregister()method 
protected override function onUnregister(name:String = null):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Dispatches GraphicLoaderLocatorEvent event using passed-in arguments as event properties when a GraphicLoader is unregistered from locator.

Event type is GraphicLoaderLocatorEvent.onUnregisterGraphicLoaderEVENT

Parameters
name:String (default = null) — Name of the registredred GraphicLoader

See also

release()method 
public static function release():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Releases instance.

removeListener()method 
public function removeListener(listener:Object):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Removes the passed-in listener object from this event broadcaster. The object is removed as listener for all events the broadcaster may dispatch.

Parameters
listener:Object — the listener object to remove from this event broadcaster object

Returns
Booleantrue if the object have been successfully removed from this event broadcaster
Event detail
onRegisterGraphicLoaderevent 
Event object type: com.bourre.load.GraphicLoaderLocatorEvent
GraphicLoaderLocatorEvent.type property = com.bourre.load.GraphicLoaderLocatorEvent.onRegisterGraphicLoaderEVENT

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Dispatched when graphic loader is registered in GraphicLoaderLocator locator.

Defines the value of the type property of the event object for a onRegisterGraphicLoader event.

The properties of the event object have the following values:

PropertyValue
type Dispatched event type
MethodValue
getName() The registration key
getGraphicLib() The Graphic loader object
onUnregisterGraphicLoaderevent  
Event object type: com.bourre.load.GraphicLoaderLocatorEvent
GraphicLoaderLocatorEvent.type property = com.bourre.load.GraphicLoaderLocatorEvent.onUnregisterGraphicLoaderEVENT

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Dispatched when graphic loader is unregistered from GraphicLoaderLocator locator.

Defines the value of the type property of the event object for a onUnregisterGraphicLoader event.

The properties of the event object have the following values:

PropertyValue
type Dispatched event type
MethodValue
getName() The registration key
getGraphicLib() The Graphic loader object