Prev | Current Page 32 | Next

LordAlex Leon, Greg Goralski

"Foundation Flex for Designers"

The text in these two variables then get stitched
together and placed into the variable currPost. When we are stitching them together, we add
tags around the title to make the title bold, and \n\n tags to give us line breaks between the
title and summary. The next piece adds the recently stitched post to any previous posts that have
already been stitched. The final bit of code places the final long piece of text into our display text area
as HTML text.
20
CHAPTER 1
Figure 1-25. The formatting script
21
INTRODUCING FLEX AND FLEX BUILDER 3
We also see the creation of a function here called onResult. We will be looking at functions when we
explore ActionScript 3.0 in Chapter 7. For now, though, we need to know that a function has to be
called in order to work. We call this function in our HTTPService, so that our HTTPService now looks
like Figure 1-26.
Figure 1-26. The changed HTTPService tag
26. Make this change to the HTTPService tag now.
27. Try running the example again. Our RSS output now looks like Figure 1-27.
With that, we have created our first Flex application. With the exception of the code that parsed the
XML, this project consisted mostly of pulling together the prebuilt components and connecting them
to each other. Hold on to this file??”in the next chapter, we will be using Cascading Style Sheets (CSS)
to customize the visuals for our Atom Reader.
Figure 1-27. Formatted Atom Reader in the browser
22
CHAPTER 1
Summary
With this example, you have started to look at building Flex applications and have become familiar
with the Flex Builder interface.


Pages:
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44