MACROMEDIA FLEX-GETTING STARTED WITH FLEX User Manual Page 125

  • Download
  • Add to my manuals
  • Print
  • Page
    / 148
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 124
CHAPTER 8
Flex for Widgets
Flex 1 was primarily a server-based technology. Flex 2 allowed
us
to compile SWFs in Flex Builder and then deploy them. Flex
3 gives us a new feature called “runtime shared libraries”
(RSLs), which means that the generated SWFs can be much
smaller than in Flex 2—so small and self-contained that we can
now use Flex Builder to create real widgets for websites. These
RSLs contain the code for the Flex framework and are down-
loaded once to the client and then cached so that they don’t
have to be downloaded each time with the Flex application.
In this chapter, I’ll walk you through creating a selection of
widgets that you can use as templates for your own develop-
ment.
Slide Show Widget
The first widget I’ll build is a small slide show widget that reads
an RSS feed from Flickr and displays the images one by one,
switching out the image every two seconds. Example 8-1 shows
the code for this application.
Example 8-1. Slideshow.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
paddingBottom="0" paddingLeft="0" paddingRight="0"
109
Page view 124
1 2 ... 120 121 122 123 124 125 126 127 128 129 130 ... 147 148

Comments to this Manuals

No comments