| Package | flare.data |
| Class | public class DataSource |
Once a DataSource has been created, use the load method to initiate data loading. This method returns a URLLoader instance. Add a listener to the URLLoader's COMPLETE event to be notified when loading and parsing has been completed. When a COMPLETE event is issued, the URLLoader's data property will contain the loaded and parsed data set.
| Property | Defined by | ||
|---|---|---|---|
| format : String [read-only] The format of the remote data set (e.g., "tab" or "json").
| DataSource | ||
| schema : DataSchema
[read-only] A schema describing the attributes of the data set.
| DataSource | ||
| url : String [read-only] The URL of the remote data set.
| DataSource | ||
| Method | Defined by | ||
|---|---|---|---|
|
DataSource(url:String, format:String, schema:DataSchema = null)
Creates a new DataSource.
| DataSource | ||
|
load():URLLoader
Initiates loading of the data set.
| DataSource | ||
| format | property |
format:String [read-only]The format of the remote data set (e.g., "tab" or "json").
Implementation public function get format():String
| schema | property |
schema:DataSchema [read-only]A schema describing the attributes of the data set.
Implementation public function get schema():DataSchema
| url | property |
url:String [read-only]The URL of the remote data set.
Implementation public function get url():String
| DataSource | () | constructor |
public function DataSource(url:String, format:String, schema:DataSchema = null)Creates a new DataSource.
Parametersurl:String — the URL of the remote data set
|
|
format:String — the format of the remote data set (e.g., "tab" or
"json")
|
|
schema:DataSchema (default = null) — an optional schema describing the attibutes of the
data set
|
| load | () | method |
public function load():URLLoader
Initiates loading of the data set. When the load completes, a data
converter instance is used to convert the retrieved data set into
ActionScript objects. The parsed data is then available through the
data property of the returned URLLoader.
URLLoader — a URLLoader instance responsible for loading the data set.
Add an event listener for the COMPLETE event to be
notified when data loading has completed.
|