Package | spark.core |
Class | public class ContentRequest |
Inheritance | ContentRequest EventDispatcher Object |
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4.5 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
load()
method.
Property | Defined By | ||
---|---|---|---|
complete : Boolean [read-only]
Contains true if content is
considered fully loaded and accessible. | ContentRequest | ||
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
content : Object
A reference to contained content. | ContentRequest |
Method | Defined By | ||
---|---|---|---|
ContentRequest(contentLoader:IContentLoader, content:*, shared:Boolean = false, complete:Boolean = false)
Constructor. | ContentRequest | ||
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 | ||
Dispatches an event into the event flow. | EventDispatcher | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Removes a listener from the EventDispatcher object. | EventDispatcher | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher |
Event | Summary | Defined By | ||
---|---|---|---|---|
[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher | |||
Dispatched when content loading is complete. | ContentRequest | |||
[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher | |||
Dispatched when a network request is made over HTTP and Flash Player or AIR can detect the HTTP status code. | ContentRequest | |||
Dispatched when an input/output error occurs. | ContentRequest | |||
Dispatched when content is loading. | ContentRequest | |||
Dispatched when a security error occurs. | ContentRequest |
complete | property |
content | property |
content:Object
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4.5 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
A reference to contained content. This can be (among many things), a LoaderInfo instance, BitmapData, or any other generic content. When the complete event has fired and/or complete() returns true, the content is considered valid.
Implementation
public function get content():Object
public function set content(value:Object):void
ContentRequest | () | Constructor |
public function ContentRequest(contentLoader:IContentLoader, content:*, shared:Boolean = false, complete:Boolean = false)
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4.5 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Constructor.
ParameterscontentLoader:IContentLoader — The IContentLoader object.
| |
content:* — A reference to contained content.
| |
shared:Boolean (default = false ) — true indicates that this request is currently
being shared by other previous requests
| |
complete:Boolean (default = false ) — true indicates that someone has called load on a cache,
and the cache has returned immediately with a fully loaded result
|
complete | Event |
flash.events.Event
property Event.type =
flash.events.Event.COMPLETE
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4.5 |
Runtime Versions: | Flash Player 10, AIR 2.0 |
Dispatched when content loading is complete.
TheEvent.COMPLETE
constant defines the value of the type
property of a complete
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
target | The network object that has completed loading. |
httpStatus | Event |
flash.events.HTTPStatusEvent
property HTTPStatusEvent.type =
flash.events.HTTPStatusEvent.HTTP_STATUS
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4.5 |
Runtime Versions: | Flash Player 10, AIR 2.0 |
Dispatched when a network request is made over HTTP and Flash Player or AIR can detect the HTTP status code.
TheHTTPStatusEvent.HTTP_STATUS
constant defines the value of the
type
property of a httpStatus
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
status | The HTTP status code returned by the server. |
target | The network object receiving an HTTP status code. |
ioError | Event |
flash.events.IOErrorEvent
property IOErrorEvent.type =
flash.events.IOErrorEvent.IO_ERROR
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4.5 |
Runtime Versions: | Flash Player 10, AIR 2.0 |
Dispatched when an input/output error occurs.
Defines the value of thetype
property of an ioError
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
errorID | A reference number associated with the specific error (AIR only). |
target | The network object experiencing the input/output error. |
text | Text to be displayed as an error message. |
Related API Elements
progress | Event |
flash.events.ProgressEvent
property ProgressEvent.type =
flash.events.ProgressEvent.PROGRESS
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4.5 |
Runtime Versions: | Flash Player 10, AIR 2.0 |
Dispatched when content is loading.
Note:
The progress
event is not guaranteed to be dispatched.
The complete
event may be received, without any
progress
events being dispatched.
This can happen when the loaded content is a local file.
type
property of a progress
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
bytesLoaded | The number of items or bytes loaded at the time the listener processes the event. |
bytesTotal | The total number of items or bytes that ultimately will be loaded if the loading process succeeds. |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
target | The object reporting progress. |
securityError | Event |
flash.events.SecurityErrorEvent
property SecurityErrorEvent.type =
flash.events.SecurityErrorEvent.SECURITY_ERROR
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4.5 |
Runtime Versions: | Flash Player 10, AIR 2.0 |
Dispatched when a security error occurs.
TheSecurityErrorEvent.SECURITY_ERROR
constant defines the value of the type
property of a securityError
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
target | The network object reporting the security error. |
text | Text to be displayed as an error message. |
Related API Elements
Thu Dec 6 2018, 01:12 PM -08:00