ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
org.osmf.net 

NetConnectionFactoryBase  - AS3 OSMF

Packageorg.osmf.net
Classpublic class NetConnectionFactoryBase
InheritanceNetConnectionFactoryBase Inheritance EventDispatcher Inheritance Object
Subclasses NetConnectionFactory

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

The NetConnectionFactoryBase is a base class for objects that need to create and connect a NetConnection.



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
Public Methods
 MethodDefined By
  
Constructor.
NetConnectionFactoryBase
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
EventDispatcher
  
Closes the given NetConnection.
NetConnectionFactoryBase
  
Begins the process of creating a new NetConnection and establishing the connection.
NetConnectionFactoryBase
 Inherited
Dispatches an event into the event flow.
EventDispatcher
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
EventDispatcher
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
EventDispatcher
Events
 Event Summary Defined By
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active.EventDispatcher
  Dispatched when the factory has successfully created and connected a NetConnection.NetConnectionFactoryBase
  Dispatched when the factory has failed to create and connect a NetConnection.NetConnectionFactoryBase
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive.EventDispatcher
Constructor Detail

NetConnectionFactoryBase

()Constructor
public function NetConnectionFactoryBase()

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

Constructor.

Method Detail

closeNetConnection

()method
public function closeNetConnection(netConnection:NetConnection):void

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

Closes the given NetConnection. The client of a NetConnectionFactoryBase should use this method to close NetConnections (as opposed to NetConnection.close) because some NetConnectionFactoryBase subclasses might want fine-grained control over the lifetime of the NetConnections they create.

Parameters

netConnection:NetConnection — The NetConnection to close.

create

()method 
public function create(resource:URLResource):void

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

Begins the process of creating a new NetConnection and establishing the connection. Because the connection process may be asynchronous, this method does not return a result. Instead, once the NetConnection is created and the connection either succeeds or fails, a NetConnectionFactoryEvent will be dispatched.

Subclasses must override this method.

Parameters

resource:URLResource — The URLResource that requires the NetConnection.
Event Detail

creationComplete

Event
Event Object Type: org.osmf.events.NetConnectionFactoryEvent
property NetConnectionFactoryEvent.type = org.osmf.events.NetConnectionFactoryEvent.CREATION_COMPLETE

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

Dispatched when the factory has successfully created and connected a NetConnection.

The NetConnectionFactoryEvent.CREATION_COMPLETE constant defines the value of the type property of the event object for a NetConnectionFactoryEvent when the the class has succeeded in establishing a connected NetConnection.

creationError

Event  
Event Object Type: org.osmf.events.NetConnectionFactoryEvent
property NetConnectionFactoryEvent.type = org.osmf.events.NetConnectionFactoryEvent.CREATION_ERROR

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

Dispatched when the factory has failed to create and connect a NetConnection.

The NetConnectionFactoryEvent.CREATION_ERROR constant defines the value of the type property of the event object for a NetConnectionFactoryEvent when the the class has failed at establishing a connected NetConnection.