Chapter 11. Using Effects and Transitions

Flex applications always consist of one or more user interface and/or container components. At a minimum, a Flex application has an application container, but usually it has many additional components. Although the default behavior for components is fairly static, you can liven up an application with the use of effects. An effect is an action that takes place, such as moving, fading, or zooming into or out of a component. An effect can even be a nonvisual behavior, such as playing a sound. Using effects, you can create applications that are more visually (and audibly) interesting. Perhaps more importantly, you can use effects to direct focus and help users better understand how to use applications.

Another way in which you can use effects is to create transitions between states. In Chapter 10, you learned about creating state views. However, so far in the book you’ve learned how to create only sudden state changes. Using effects as transitions, you can create more interesting and seamless changes between states. For example, rather than an added component suddenly appearing, it can fade in. Not only does this generally create a more visually engaging user experience, but also effects can be used to show emphasis and to highlight change.

In this chapter, we’ll look at how to work with effects and transitions. We’ll discuss how to trigger effects, how to programmatically control effects, and even how to create custom effects. We’ll also discuss ...

Get Programming Flex 2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.