MACROMEDIA FLEX-GETTING STARTED WITH FLEX Getting Started page 69

Table of Contents

Advertisement

You could replace the previous layout with the following layout to achieve the same effect:
<mx:VBox>
<mx:Button label="Visa"/>
<mx:Button label="MasterCard"/>
<mx:Button label="Diner's Club"/>
<mx:Button label="AmEx"/>
</mx:VBox>
Improving effect performance
If animations in an application do not play smoothly, background processing might be interfering
with the animation. Effects have a public property called
When this property is
including measurement and layout and data service response. The default value is
should be careful when you set this property to
uninterruptible while playing.
Large-scale transition effects applied to complex views can affect how quickly the player can
redraw the view. When this happens, you will notice the effect does not play smoothly. The
following tips describe ways to modify an application to make effects play more evenly:
Increase the duration of an effect to spread out the distinct, jerky stages over a longer period of
time, which allows the eye to fill in the differences.
Hide part of the application that is playing an effect to make the effect play more smoothly,
because there is less for Flash Player to redraw. To do this, you use the
events to control what is visible before and after the effect. For example, if you
effectEnd
apply a Fade effect to a Form with many controls, you can use the
some of the less important controls invisible, have the Form container play the Fade effect, and
then use the
effectEnd
Use a solid
backgroundColor
instead of a solid color, use a
bitmap image. Using bitmap images in backgrounds can slow down effects. Designers often
give their views a
Using a wait state animation
When the child containers of navigator containers are heavily populated, users experience a wait
period when they navigate to a new view. You can create an animation to indicate this fact. The
extras directory of the flex.war file includes a sample application with a TabNavigator container
that displays a precompiled SWF animation during wait states. View the source of the app.mxml
file in the extras/NavigatorWaitState directory of your Flex installation to see how the
TabNavigator container catches the
symbol. When the child views broadcast their
their contents, the TabNavigator container destroys the wait symbol.
, it blocks all background processing while the effect is playing,
true
event to make the controls visible again.
to improve an effect's performance. If you want a slight gradient
backgroundImage
that is a solid colors with gradients or patterns.
backgroundImage
change
suspendBackgroundProcessing
because it makes an effect completely
true
that is a SWF file or an SVG file instead of a
event and displays the embedded SWF file as a wait
events, indicating they have finished drawing
draw
Improving application start-up time and performance
. You
false
and
effectStart
event to make
effectStart
.
69

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex

Table of Contents