You can find samples of photo gallery applications on your hard disk.These files provide
examples of how to use ActionScript to control movie clips dynamically while loading image
files into a SWF file. You can find the sample source files, gallery_tree.fla and
gallery_tween.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript\Galleries.
On the Macintosh, browse to Macintosh HD/Applications/Macromedia Flash 8/Samples
and Tutorials/Samples/ActionScript/Galleries.
About loading SWF files and the root timeline
The ActionScript property,
SWF file. If you load a SWF file into a movie clip in another SWF file, any references to
in the loaded SWF file resolve to the root timeline in the host SWF file, not to that of
_root
the loaded SWF file. This action can sometimes cause unexpected behavior at runtime (for
example, if the host SWF file and the loaded SWF file both use
In Flash Player 7 and later, you can use the
property to force references to
property)
timeline rather than to the timeline of the SWF file that contains that movie clip. For more
information, see
"Specifying a root timeline for loaded SWF files" on page
information about using
Conventions for ActionScript 2.0," on page
One SWF file can load another SWF file from any location on the Internet. However, for a
SWF file to access data (variables, methods, and so forth) defined in another SWF file, the
two files must originate from the same domain. In Flash Player 7 and later, cross-domain
scripting is prohibited unless the loaded SWF file specifies otherwise by calling
System.security.allowDomain()
For more information on System.security.allowDomain, see
(security.allowDomain method)
domains, cross-domain security, and SWF files" on page
, specifies or returns a reference to the root timeline of a
_root
_lockroot (MovieClip._lockroot
_root
and
_root
_lockroot
731.
.
in the ActionScript 2.0 Language Reference and
_root
made by a movie clip to resolve to its own
, see
Chapter 19, "Best Practices and Coding
allowDomain
694.
Loading external SWF and image files
to specify a variable).
356. For more
"About
597
Need help?
Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?