User Guide
959
APPENDIX
Collection Properties
This appendix explains how to create a collection property in a component.
The Collection class is a helper class used to manage a group of zero or more related objects,
called collection items. If you define a property of your component as a collection and make it
available to users through the Component inspector, they can add, delete, and modify collection
items in the Values dialog box while authoring.
You define collections and collection items as follows:
• Define a collection property using the Collection metadata tag in a component’s ActionScript
file. For more information, see “About the Collection tag” on page 942.
• Define a collection item as a class in a separate ActionScript file that contains its own
inspectable properties.
Collections make it easier for you to manage groups of related items programmatically. (In
previous versions of Flash, component authors managed groups of related items through multiple
programmatically synchronized arrays).
In addition to the Values dialog box, Flash provides the Collection and Iterator interfaces to
manage Collection instances and values programmatically. See “Collection interface (Flash
Professional only)” on page 169 and “Iterator interface (Flash Professional only)” on page 441.