componentsPanel object

 < Day Day Up > 

Availability

Flash MX 2004.

Description

The componentsPanel object, which represents the Components panel, is a property of the flash object (fl) and can be accessed by fl.componentsPanel. (See flash object (fl).)

Method summary for the componentsPanel object

You can use the following methods with the componentsPanel object:

Method

Description

componentsPanel.addItemToDocument()

Adds the specified component to the document at the specified position.

componentsPanel.reload()

Refreshes the Components panel's list of components.


componentsPanel.addItemToDocument()

Availability

Flash MX 2004.

Usage

componentsPanel.addItemToDocument(position, categoryName, componentName)

Parameters

position A point (for example, {x:0, y:100}) that specifies the location at which to add the component. Specify position relative to the center point of the component not the component's registration point.

categoryName A string that specifies the name of the component category (for example, "Data"). The valid category names are listed in the Components panel.

componentName A string that specifies the name of the component in the specified category (for example, "WebServiceConnector"). The valid component names are listed in the Components panel.

Returns

Nothing.

Description

Adds the specified component to the document at the specified position.

Examples

The following examples illustrate some ways to use this method:

fl.componentsPanel.addItemToDocument({x:0, y:0}, "User Interface",   "CheckBox"); fl.componentsPanel.addItemToDocument({x:0, y:100}, "Data",   "WebServiceConnector"); fl.componentsPanel.addItemToDocument({x:0, y:200}, "User Interface",   "Button");

componentsPanel.reload()

Availability

Flash 8.

Usage

componentsPanel.reload()

Parameters

None.

Returns

A Boolean value of true if the Component panel list is refreshed, false otherwise.

Description

Method; refreshes the Components panel's list of components.

Example

The following example refreshes the Components panel:

fl.componentsPanel.reload();

     < Day Day Up > 


    Developing Extensions for Macromedia Flash 8
    Developing Extensions for Macromedia Flash 8
    ISBN: 032139416X
    EAN: 2147483647
    Year: 2005
    Pages: 81

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net