Flex only calls the
method.
For example, the ViewStack container uses the
performance. When you set the
doesn't update to a new page right away. Instead, it privately stores a
property. When it is time for Flash Player to update the screen, Flex calls the
commitProperties()
commitProperties()
pendingSelectedIndex
The motivation to use the
minute, so that Flash Player avoids doing computationally expensive, redundant work. For
example, if a script changes the
to minimize the number of times the display of the ViewStack container updates when the
selectedIndex
the
pendingSelectedIndex
This is most useful for properties that are computationally expensive to update. If setting a
property is inexpensive, you can avoid using the
Implementing the measure() method
Generally, the
measure()
component's container sets the initial size and Flex calculates the preferred minimum and
maximum sizes. You can use the
although Macromedia does not recommend doing this when developing components.
You can set the following properties in the
override them:
•
_measuredMinWidth
•
_measuredMaxWidth
•
_measuredMinHeight
•
_measuredMaxHeight
•
_measuredWidthFlex
•
_measuredHeightFlex
•
_measuredPreferredWidth
•
_measuredPreferredHeight
The Flex properties (those that end with the word Flex) define limits for when the object is
resized. These measured properties are used for layout in containers if your component doesn't
explicitly set a
preferredWidth
Controls calculate the values of these based on runtime properties. For example, the Button
control's
measure()
_measuredPreferredWidth
56
Chapter 3: Creating Advanced Components in Flash MX 2004
commitProperties()
ViewStack.selectedIndex
,
,
measure()
layoutChildren()
method, the ViewStack container checks to see whether the
property is set, and it updates the selected index at that time.
commitProperties()
ViewStack.selectedIndex
property changes. By using the
property 15 times, and then only do the rendering once.
method is only called once when the component is instantiated. The
measure()
or
preferredHeight
method examines how wide its label is in order to compute the value of the
property.
method after it calls the
commitProperties()
property, the ViewStack container
, and
draw()
method is to delay processing until the last
property 15 times, you would want
commitProperties()
commitProperties()
method to explicitly set the size of the component,
method. Flex calculates them, but you can
measure()
attribute.
invalidateProperties()
method to maximize
pendingSelectedIndex
methods. In the
method, you can update
method.
Need help?
Do you have a question about the FLEX - DEVELOPING COMPONENTS AND THEMES and is the answer not in the manual?