| Package | qnx.events |
| Class | public class NetworkResourceRequestedEvent |
| Inheritance | NetworkResourceRequestedEvent flash.events.Event |
NetworkResourceRequestedEvent object when
a network resource is being requested. The URL of the resource is
in the url property of the event.
There is only one type of NetworkResourceRequestedEvent:
NetworkResourceRequestedEvent.NETWORK_RESOURCE_REQUESTED: dispatched when a resource is about to be loaded. Can be cancelled.See also
| Property | Defined By | ||
|---|---|---|---|
| action : String
Determines the url of the resource to be loaded. | NetworkResourceRequestedEvent | ||
| streamId : int
Determines the ID of the resource to be loaded. | NetworkResourceRequestedEvent | ||
| targetType : String
Determines the target of the resource to be loaded. | NetworkResourceRequestedEvent | ||
| url : String
Determines the url of the resource to be loaded. | NetworkResourceRequestedEvent | ||
| Method | Defined By | ||
|---|---|---|---|
NetworkResourceRequestedEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = true, streamId:int = 0, url:String = null, action:String, targetType:String)
Creates a NetworkResourceRequestedEvent object. | NetworkResourceRequestedEvent | ||
clone():Event [override]
Duplicates an instance of an Event subclass. | NetworkResourceRequestedEvent | ||
toString():String [override]
Returns a String that contains all the properties of the NetworkResourceRequestedEvent object. | NetworkResourceRequestedEvent | ||
| Constant | Defined By | ||
|---|---|---|---|
| ACTION_ACCEPT : String = accept [static] | NetworkResourceRequestedEvent | ||
| ACTION_DENY : String = deny [static] | NetworkResourceRequestedEvent | ||
| ACTION_FILTER : String = filter [static] | NetworkResourceRequestedEvent | ||
| ACTION_SUBSTITUTE : String = substitute [static] | NetworkResourceRequestedEvent | ||
| NETWORK_RESOURCE_REQUESTED : String = networkResourceRequested [static]
Dispatched when a network resource is requested. | NetworkResourceRequestedEvent | ||
| TARGET_IS_FONT_RESOURCE : String = targetIsFontResource [static] | NetworkResourceRequestedEvent | ||
| TARGET_IS_IMAGE : String = targetIsImage [static] | NetworkResourceRequestedEvent | ||
| TARGET_IS_MAIN_FRAME : String = targetIsMainFrame [static] | NetworkResourceRequestedEvent | ||
| TARGET_IS_MEDIA : String = targetIsMedia [static] | NetworkResourceRequestedEvent | ||
| TARGET_IS_OBJECT : String = targetIsObject [static] | NetworkResourceRequestedEvent | ||
| TARGET_IS_SCRIPT : String = targetIsScript [static] | NetworkResourceRequestedEvent | ||
| TARGET_IS_SHARED_WORKER : String = targetIsSharedWorker [static] | NetworkResourceRequestedEvent | ||
| TARGET_IS_STYLE_SHEET : String = targetIsStyleSheet [static] | NetworkResourceRequestedEvent | ||
| TARGET_IS_SUBFRAME : String = targetIsSubframe [static] | NetworkResourceRequestedEvent | ||
| TARGET_IS_SUBRESOURCE : String = targetIsSubresource [static] | NetworkResourceRequestedEvent | ||
| TARGET_IS_UNKNOWN : String = targetIsUnknown [static] | NetworkResourceRequestedEvent | ||
| TARGET_IS_WORKER : String = targetIsWorker [static] | NetworkResourceRequestedEvent | ||
| TARGET_IS_XML_HTTP_REQUEST : String = targetIsXMLHTTPRequest [static] | NetworkResourceRequestedEvent | ||
| action | property |
action:StringDetermines the url of the resource to be loaded.
public function get action():String public function set action(value:String):void| streamId | property |
streamId:intDetermines the ID of the resource to be loaded.
public function get streamId():int public function set streamId(value:int):void| targetType | property |
targetType:StringDetermines the target of the resource to be loaded.
public function get targetType():String public function set targetType(value:String):void| url | property |
url:StringDetermines the url of the resource to be loaded.
public function get url():String public function set url(value:String):void| NetworkResourceRequestedEvent | () | Constructor |
public function NetworkResourceRequestedEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = true, streamId:int = 0, url:String = null, action:String, targetType:String)
Creates a NetworkResourceRequestedEvent object.
type:String | |
bubbles:Boolean (default = false) | |
cancelable:Boolean (default = true) | |
streamId:int (default = 0) | |
url:String (default = null) | |
action:String (default = NaN) | |
targetType:String (default = NaN) |
| clone | () | method |
override public function clone():EventDuplicates an instance of an Event subclass.
Returns a new Event object that is a copy of the original instance of the Event object.
You do not normally call clone(); the EventDispatcher class calls it automatically
when you redispatch an event—that is, when you call dispatchEvent(event) from a handler
that is handling event.
The new Event object includes all the properties of the original.
When creating your own custom Event class, you must override the
inherited Event.clone() method in order for it to duplicate the
properties of your custom class. If you do not set all the properties that you add
in your event subclass, those properties will not have the correct values when listeners
handle the redispatched event.
Event |
| toString | () | method |
override public function toString():String
Returns a String that contains all the properties of the NetworkResourceRequestedEvent object.
The string is in the following format:
[NetworkResourceRequestedEvent type=value bubbles=value
cancelable=value eventPhase=value streamId=value url=value action=value targetType=value]
String |
| ACTION_ACCEPT | Constant |
public static const ACTION_ACCEPT:String = accept| ACTION_DENY | Constant |
public static const ACTION_DENY:String = deny| ACTION_FILTER | Constant |
public static const ACTION_FILTER:String = filter| ACTION_SUBSTITUTE | Constant |
public static const ACTION_SUBSTITUTE:String = substitute| NETWORK_RESOURCE_REQUESTED | Constant |
public static const NETWORK_RESOURCE_REQUESTED:String = networkResourceRequested
Dispatched when a network resource is requested. The URL of the resource is contained
in the url property of the event.
Specify the action you wish to take for this resource:
NetworkResourceRequestedEvent.ACTION_ACCEPT: (Default) Load the resource.NetworkResourceRequestedEvent.ACTION_DENY: Abort loading this resource.NetworkResourceRequestedEvent.ACTION_FILTER: Filter the resource loading, further events will be received for each stage of the open and data can be substited or monitored at that time.NetworkResourceRequestedEvent.ACTION_SUBSTITUTE: Substitute the entire load with your own data. Must call NetworkResourceOpened, NetworkResourceDone, NetworkResourceHeaderReceived and NetworkResourceDataReceived with the m_streamId in this event.| TARGET_IS_FONT_RESOURCE | Constant |
public static const TARGET_IS_FONT_RESOURCE:String = targetIsFontResource| TARGET_IS_IMAGE | Constant |
public static const TARGET_IS_IMAGE:String = targetIsImage| TARGET_IS_MAIN_FRAME | Constant |
public static const TARGET_IS_MAIN_FRAME:String = targetIsMainFrame| TARGET_IS_MEDIA | Constant |
public static const TARGET_IS_MEDIA:String = targetIsMedia| TARGET_IS_OBJECT | Constant |
public static const TARGET_IS_OBJECT:String = targetIsObject| TARGET_IS_SCRIPT | Constant |
public static const TARGET_IS_SCRIPT:String = targetIsScript| TARGET_IS_SHARED_WORKER | Constant |
public static const TARGET_IS_SHARED_WORKER:String = targetIsSharedWorker| TARGET_IS_STYLE_SHEET | Constant |
public static const TARGET_IS_STYLE_SHEET:String = targetIsStyleSheet| TARGET_IS_SUBFRAME | Constant |
public static const TARGET_IS_SUBFRAME:String = targetIsSubframe| TARGET_IS_SUBRESOURCE | Constant |
public static const TARGET_IS_SUBRESOURCE:String = targetIsSubresource| TARGET_IS_UNKNOWN | Constant |
public static const TARGET_IS_UNKNOWN:String = targetIsUnknown| TARGET_IS_WORKER | Constant |
public static const TARGET_IS_WORKER:String = targetIsWorker| TARGET_IS_XML_HTTP_REQUEST | Constant |
public static const TARGET_IS_XML_HTTP_REQUEST:String = targetIsXMLHTTPRequest