Figure 3-40. Our styled personal page
Summary
In this chapter, we explored how to use states to show different information. States are useful because
they let you create the illusion of multiple pages without the need for a page refresh. Numerous states
can be created in one page by defining a state and changing the components that are presented in
that state. Moving between states is done through an event of some sort, often a button click.
We also looked at how to style different instances of a component in different ways using CSS. This
allows you to set a different look for a component, for example a Panel, depending on where it is
being used. Associating different CSS tags with different instances of a component is done by creating
a substyle. You then connect the substyle to a particular instance of a component through the style
property.
In the next chapter we will start looking at how Flex interacts with other programs. Specifically we use
Fireworks to create a Flex layout.
68
CHAPTER 3
71
FLEX AND FIREWORKS
Chapter 4
What we??™ll cover in this chapter:
Scaling components in Fireworks
Matching size or images and components
Alignment
Exporting layouts to Flex Builder
Files used in this chapter:
background.jpg
fish.png
KyotoTemple.jpg
wedding.jpg
We mentioned in the first chapter that Flex plays well with graphics programs??”in
the case of Fireworks CS3, it is more like they are so close, they finish each other??™s
sentences.
Pages:
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69