Prev | Current Page 28 | Next

LordAlex Leon, Greg Goralski

"Foundation Flex for Designers"


19. Place the Button next to the TextInput on the controlBar, in the same manner as before, as
shown in Figure 1-20.
20. Give this button a label of Load Feed. Although it is not absolutely necessary to give an ID to
this button, it is good practice to always provide an ID. Enter loadButton as the ID.
21. The property that tells us what the button will do when it is clicked is rather logically called On
click. Enter feed.send() for its value (note this in the Properties panel in Figure 1-20.) This will
send the URL in the inputText as the location of our feed. This allows us to change that URL at
any point within the website.
Now we just need to create the feed. Normally this would require quite a bit of coding, but we will use
a very direct simple method to bring in the feed called the HTTPService tag.
16
CHAPTER 1
Figure 1-20. The Button component
22. Jump over to the Source view, as you??™ll need to type this code in. Take a moment to see what
the MXML code looks like for our project so far??”see Figure 1-21.
Figure 1-21. The source MXML
You can see that each of our components is represented here as tag similar to XML. These tags carry
the same information that we set for our components in the Design view, and each of these properties
can be modified here. We will be adding the line of code shown in Figure 1-22 before line 3.
Figure 1-22. The HTTPService tag
17
INTRODUCING FLEX AND FLEX BUILDER 3
Let??™s break this line up so that we can see what it does.


Pages:
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40