List Component - MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

Using the List component
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.
Understanding the design of the List component
When you design an application with the List component, or any component that extends the
List class, it is helpful to understand how the list was designed. The following are some
fundamental assumptions and requirements that Macromedia used when developing the List
class:
Keep it small, fast, and simple.
Don't make something more complicated than absolutely necessary. This was the prime design
directive. Most of the requirements listed below are based on this directive.
Lists have uniform row heights.
Every row must be the same height; the height can be set during authoring or at runtime.
Lists must scale to thousands of records.
Lists don't measure text.
This restriction has the most potential ramifications. Because a list must scale to thousands of
records, any one of which could contain an unusually long string, it shouldn't grow to fit the
largest string of text within it, or add a horizontal scroll bar in "auto" mode. Also, measuring
thousands of strings would be too intensive. The compromise is the
which, when
If you know you're likely to deal with long strings, turn
200-pixel
maxHPosition
guaranteed to be able to scroll to see everything. The DataGrid component, however, does
support
"auto"
width per item), not text.
The fact that lists don't measure text also explains why lists have uniform row heights. Sizing
individual rows to fit text would require intensive measuring. For example, if you wanted to
accurately show the scroll bars on a list with nonuniform row height, you'd need to premeasure
every row.
Lists perform worse as a function of their visible rows.
Although lists can display 5000 records, they can't render 5000 records at once. The more
visible rows (specified by the
must to do to render. Limiting the number of visible rows, if at all possible, is the best solution.
is set to
vScrollPolicy
value to your List or Tree component. A user is more or less
as an
hScrollPolicy
rowCount
, gives the list extra buffer space for scrolling.
"on"
hScrollPolicy
value, because it measures columns (which are the same
property) you have on the Stage, the more work the list
property,
maxHPosition
to
, and add a
"on"

List component

451

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents