
You can also apply filters based on certain events, such as roll-
overs, to provide interactive effects. Example 4-22 shows a
button that glows when you roll your mouse pointer over it.
Example 4-22. Effect.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="horizontal">
<mx:Button label="Push me!">
<mx:rollOverEffect>
<mx:Glow blurXTo="5" blurYTo="5" color="#ff0000" />
</mx:rollOverEffect>
</mx:Button>
</mx:Application>
As I roll my mouse pointer over the button, the effect looks
similar to Figure 4-22.
Figure 4-22. A button that glows
These
kinds of effects can bring an interface to life for your
customers. It’s worth taking the time to learn how to use them
effectively so that you have a complete set of tools at your dis-
posal to make your applications grab people’s attention.
66 | Chapter 4: Flex Controls and Layout
Commenti su questo manuale