Apache Flex 4.16.1 API Reference | All Packages | All Classes | Index | Frames No Frames |
ContentRequest

Package | spark.core
Class | public class ContentRequest
Inheritance | ContentRequest flash.events.EventDispatcher

Language Version : | ActionScript 3.0

Product Version : | Flex 4.5

Runtime Versions : | Flash Player 10, AIR 1.5

Represents an IContentLoader content request instance returned from IContentLoader's `load()` method.

Public Properties

| Property | Defined By
--- | --- | ---
|  | complete : Boolean [read-only] Contains true if content is considered fully loaded and accessible. | ContentRequest
|  | content : Object A reference to contained content. | ContentRequest

Public Methods

| Method | Defined By
--- | --- | ---
|  | ContentRequest(contentLoader:IContentLoader, content:*, shared:Boolean = false, complete:Boolean = false) Constructor. | ContentRequest

Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | complete | Dispatched when content loading is complete. | ContentRequest
|  | httpStatus | Dispatched when a network request is made over HTTP and Flash Player or AIR can detect the HTTP status code. | ContentRequest
|  | ioError | Dispatched when an input/output error occurs. | ContentRequest
|  | progress | Dispatched when content is loading. | ContentRequest
|  | securityError | Dispatched when a security error occurs. | ContentRequest

Property Detail

complete | property

`complete:Boolean` [read-only]

Language Version : | ActionScript 3.0

Product Version : | Flex 4.5

Runtime Versions : | Flash Player 10, AIR 2.5

Contains `true` if content is considered fully loaded and accessible.

The default value is `false`.

Implementation
`public function get complete():Boolean`

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`
Constructor Detail

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.

Parameters

| `contentLoader: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

Event Detail

complete | Event

Event Object Type: `flash.events.Event`
Event.type property = `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.

httpStatus | Event |

Event Object Type: `flash.events.HTTPStatusEvent`
HTTPStatusEvent.type property = `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.

ioError | Event |

Event Object Type: `flash.events.IOErrorEvent`
IOErrorEvent.type property = `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.

See also

flash.events.IOErrorEvent

progress | Event |

Event Object Type: `flash.events.ProgressEvent`
ProgressEvent.type property = `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.

securityError | Event |

Event Object Type: `flash.events.SecurityErrorEvent`
SecurityErrorEvent.type property = `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.

See also

flash.events.SecurityErrorEvent

Wed Nov 15 2017, 09:50 AM +01:00