initialize method
flite function initialize (resources:Object): void
This component interface method is invoked after the component is loaded, in order to initialize the component with some useful information. We recommend saving the various pieces of information to class variables so they could be used throughout the component. See our component example code for an example of how to do this.
Parameters
resources: Object |
An object containing several properties with information useful for this component. These are described under Resource Properties. |
Resource Properties
key: String |
The ID for the ad layer in which this component is found. Each layer in the ad has a unique ID. |
api: Object |
A reference to the Flite Ad API. Use this to access the various API methods and properties. |
config: Object |
This object contains all the configuration parameters that were set up for this component when it was created in Component Studio. See the config Object page for more on how to access these parameters. |
label: String |
The name of the ad layer where this component is found. |
width: Number |
The width of the component’s container. |
height: Number |
The height of the component’s container. |
state: String |
The component’s starting state. This is typically either api.state.ENABLED or api.state.DISABLED. |
children: Array |
An array of descriptions of the component’s children. |