MACROMEDIA FLEX-GETTING STARTED WITH FLEX User Manual Page 81

  • Download
  • Add to my manuals
  • Print
  • Page
    / 148
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 80
Filters and Effects
Flex supports a wide variety of filters and effects that you can
apply to any user interface object. Take, for example, how easy
it is to add a drop shadow to an image. The code for two images,
one with a shadow and one without, appears in Example 4-21.
Example 4-21. Dropfilter.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="horizontal">
<mx:Image source="@Embed('megan.jpg')" />
<mx:Image source="@Embed('megan.jpg')">
<mx:filters>
<mx:DropShadowFilter />
</mx:filters>
</mx:Image>
</mx:Application>
It's almost as easy to apply filters and effects to text-based con-
trols, but in many cases you'll have to embed the font. The
result, when I look at it in the browser, looks like Figure 4-21.
Figure 4-21. The drop shadow filter applied to an image
Filters and Effects | 65
Page view 80
1 2 ... 76 77 78 79 80 81 82 83 84 85 86 ... 147 148

Comments to this Manuals

No comments