
216
Chapter 9: Using Flash, Flash Components, and Other Interactive Media Types
List component
The List component is a scrollable single- or multiple-selection list box. A list can also display
graphics, including other components.
The List component uses a zero-based index, where the item with index 0 is the top item
displayed. When adding, removing, or replacing list items using the List class methods and
properties, you may need to specify the index of the list item.
You can set up a list so that users can make either single or multiple selections. For example, a user
visiting an e-commerce website needs to select which item to buy. There are 30 items, and the
user scrolls through a list and selects one by clicking it.
You can also design a list that uses custom movie clips as rows so you can display more
information to the user. For example, in an e-mail application, each mailbox could be a List
component and each row could have icons to indicate priority and status.
List component parameters
The following are authoring parameters that you can set for each List component instance in the
Property inspector or in the Component Inspector panel:
data
An array of values that populate the data of the list. The default value is [] (an empty
array). There is no equivalent runtime property.
labels
An array of text values that populate the label values of list. The default value is [] (an
empty array). There is no equivalent runtime property.
multipleSelection
A Boolean value that indicates whether you can select multiple values (true)
or not (false). The default value is false.
rowHeight
indicates the height, in pixels, of each row. The default value is 20. Setting a font does
not change the height of a row.
You can write scripts to set additional options for List instances using its methods, properties, and
events. For more information, see “List class” in the Flash documentation.
Customizing the List component
You can transform a List component horizontally and vertically both while authoring and
at runtime.
When a list is resized, the rows of the list shrink horizontally, clipping any text within them.
Vertically, the list adds or removes rows as needed. Scroll bars position themselves automatically.
Using styles with the List component
You can set style properties to change the appearance of a List component.
Summary of Contents for DIRECTOR MX 2004-USING DIRECTOR
Page 1: ...DIRECTOR MX 2004 Using Director...
Page 16: ...16 Chapter 1 Introduction...
Page 82: ...82 Chapter 3 Sprites...
Page 98: ...98 Chapter 4 Animation...
Page 134: ...134 Chapter 5 Bitmaps...
Page 242: ...242 Chapter 10 Sound and Synchronization...
Page 274: ...274 Chapter 11 Using Digital Video...
Page 290: ...290 Chapter 12 Behaviors...
Page 302: ...302 Chapter 13 Navigation and User Interaction...
Page 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Page 392: ...392 Chapter 16 Working with Models and Model Resources...
Page 418: ...418 Chapter 18 Movies in a Window...
Page 446: ...446 Chapter 22 Managing and Testing Director Projects...