User Guide
52 Chapter 3: Working with Components
Components in Live Preview
The Live Preview feature, enabled by default, lets you view components on the Stage as they will
appear in the published Flash content; the components appear at their approximate size. The live
preview reflects different parameters for different components. For information about which
component parameters are reflected in the live preview, see each component entry in Chapter 6,
“Components Dictionary,” on page 91.
A Button component with Live Preview enabled
A Button component with Live Preview disabled
Components in Live Preview are not functional. To test component functionality, you can use the
Control > Test Movie command.
To turn Live Preview on or off:
• Select Control > Enable Live Preview. A check mark next to the option indicates that it
is enabled.
About using a preloader with components
Components are set to Export in First Frame by default. This causes the components to
load before the first frame of an application is rendered. If you want to create a preloader for
an application, deselect Export in First Frame for any compiled clip symbols in your library.
Note: If you’re using the ProgressBar component to display loading progress, leave Export in First
Frame selected for the progress bar.
About loading components
If you load version 2 components into a SWF or into the Loader component, the components
may not work correctly. These components include the following: Alert, ComboBox, DateField,
Menu, MenuBar, and Window.
Use the
_lockroot property when calling loadMovie() or loading into the Loader component.
If you’re using the Loader component, add the following code:
myLoaderComponent.content._lockroot = true;
If you’re using a movie clip with a call to loadMovie(), add the following code:
myMovieClip._lockroot = true;
If you don’t set _lockroot to true in the loader movie, the loader only has access to its own
library, but not the library in the loaded movie.
The
_lockroot property is supported by Flash Player 7. For information about this property, see
MovieClip._lockroot in Flash ActionScript Language Reference.