Skip to Main Content
Flash® Catalyst™ CS5 Bible
book

Flash® Catalyst™ CS5 Bible

by Rob Huddleston
May 2010
Intermediate to advanced content levelIntermediate to advanced
528 pages
11h 27m
English
Wiley
Content preview from Flash® Catalyst™ CS5 Bible

Chapter 23. Create View States in Your Project

IN THIS CHAPTER

  • Create view states in the main application

  • Modify a state's contents

  • Create view states within components

  • Work with components with default view states

  • Trigger view state changes with buttons

  • Animate transitions between view states

View states in a Flex application are roughly equivalent to pages in a traditional Web application. Anytime you need to change the appearance of either your entire application, or just a portion of it, you can use view states. Setting up view states in the application requires nothing more than creating a new state and then modifying its contents.

Components can contain states as well; custom components have states created in the same manner as the application, while many user interface components come with a set of pre-defined view states.

Creating States in the Main Application

The Pages/States panel in Catalyst allows you to create and manage view states. A new application will have a single state, but the panel allows you to create as many additional states as you want. States can either be created as duplicates of an existing state or as new blank states.

Catalyst gives each state a default name of Page1, Page2, and so forth. You should give each state a logical name descriptive of its contents or purpose in the application. State names can contain only letters, numbers and underscores; you cannot use spaces.

Note

The exercises in this chapter build on the application as of the end of Chapter 22

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Photoshop Elements 12: The Missing Manual

Photoshop Elements 12: The Missing Manual

Barbara Brundage

Publisher Resources

ISBN: 9780470568156Purchase book