Chapter 4. Spark containers, view states, effects, and styling
In this chapter, we’ll dive deeper into Spark and into Flex 4 in general. You’ll learn how to use Spark containers and layouts—we’ve already seen them throughout the book, but it will be good to spend a bit of time discussing them. Then, we’ll talk about view states, which are much improved in Flex 4—and which are much more necessary, since there’s no Spark equivalent of the Halo navigator containers, as you’ll see in the next chapter. Next we’ll explore basic effects and CSS styling, and conclude the chapter by peeking behind the MXML curtain to view the code Flex generates for us and some of the events dispatched in the Spark component lifecycle.

Note that in a longer book, each of these topics would have its own 20–30-page chapter. We’re going to see what you can absorb in about 30 pages. Because of this, there won’t be an example of adding to a Button a custom skin that looks like a pizza, for example. And I’m even not going to show you the now seemingly obligatory “custom ScrollBar with something cheesy (like, say, a pizza) as a thumbIcon” example.
So, let’s get started.