Prev | Current Page 27 | Next

LordAlex Leon, Greg Goralski

"Foundation Flex for Designers"


Figure 1-18. Add a ControlBar component.
Pulling in web feeds to Flex
Now we??™ll load and display the contents of a web feed in our Flex application??”we??™re talking about the
kinds of feed you see on blogs, news sites, and so forth. We will be using an Atom feed, located at
http://www.lordalex.org/atom.xml, for the default feed to display. Atom is the format that is used
by Blogger.com, and is in competition with other formats such as RSS 1.1 and RSS 2.0. Each of the formats
is just a different way of representing the XML that has the text of the web feed. Since each format
structures the XML in a different way, each would need to be processed differently, which would
require a good deal of ActionScript. To keep this exercise focused on what is important to designers,
working with components to lay out an application, we have decided to stick to just this one format.
17. Place the URL of the feed in the text property of the TextInput component. We will be able to
change this directly within the site to pull in different feeds during runtime. We also need to
put in an ID for this component to allow us to manipulate it later with code.
18. Give the TextInput an ID of urlFeed, and enter http://www.lordalex.org/atom.xml as the Text.
The TextInput will adjust its size to suit the text, or you can stretch it to a size you prefer (see
Figure 1-19).
15
INTRODUCING FLEX AND FLEX BUILDER 3
Figure 1-19. The TextArea component
Now we need a Button to trigger things; it is the first of the components in the Controls folder.


Pages:
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
Mietek Szcześniak baseny ogrodowe Timo Maas badania kierowców Patrycja Markowska