User Guide

736 Form class (Flash Professional only)
This illustration shows the outline for a sample application called Employee Directory, which
consists of several forms. The form named entryForm (selected in the above illustration)
contains several user interface objects, including input text fields, labels, and a push button.
The developer can easily present this form to the user by toggling its visibility (using the
Form.visible property), while simultaneously toggling the visibility of other forms, as well.
Using the Behaviors panel you can also attach behaviors and controls to forms. For more
information about adding transitions and controls to screens, see “Creating controls and
transitions for screens with behaviors (Flash Professional only)” in Using Flash.
Because the Form class extends the Loader class, you can easily load external content (a SWF
or JPEG file) into a form. For example, the contents of a form could be a separate SWF file,
which itself might contain forms. In this way, you can make your form applications modular,
which makes maintaining the applications easier, and also reduces initial download time. For
more information, see “Loading external content into screens (Flash Professional only)”
on page 1072.
Form parameters
You can set the following authoring parameters for each Form instance in the Property
inspector or in the Component inspector:
autoload indicates whether the content specified by the contentPath parameter should load
automatically (
true), or wait to load until the Loader.load() method is called (false). The
default value is
true.
contentPath specifies the contents of the form. This can be the linkage identifier of a movie
clip or an absolute or relative URL for a SWF or JPEG file to load into the slide. By default,
loaded content is clipped to fit the slide.
visible specifies whether the form is visible (true) or not (false) when it first loads.
Form class (Flash Professional only)
Inheritance MovieClip > UIObject class > UIComponent class > View > Loader
component > Screen class (Flash Professional only) > Form
ActionScript Class Name mx.screens.Form
The Form class provides the runtime behavior of forms that you create in the Screen Outline
pane in Flash.