11.16. Making a Multipage Form
You want to create a form that spans multiple “pages” rather than being all on one screen.
Create a custom
You can create multipage forms in Flash without having to create a custom class. However, there are several drawbacks to this approach:
The most convenient way to do it is to create a form that spans multiple frames. Flash does not automatically remember the values the user selected for form elements across frames. Therefore, you have to programmatically store and repopulate the user’s selections for the form pages when they click back and forth.
The process requires a lot of custom coding each time you want to create a new multipage form rather than relying on an existing infrastructure. Basically, it means a lot of duplicated effort and code.
It is possible, but not very easy, to leverage the functionality of the
For these reasons, it is far superior to create a class that handles
all the details of working with a multipage form. By creating a
MultiPageForm class, you can use and reuse the
MultiPageForm class has the following
The class has an array property that contains
Formobjects. A multipage form is composed, therefore, of multiple forms that are stored in an array property.
The class has methods that set the current visible page of the form by making the other pages invisible. All forms are created on the same frame.
Here is the next enhancement ...