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, which includes scripted animation. 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.
Calling multiple methods on a single
movie clip
You can use the
with
methods on that clip. The
Array, Color, and Sound)—not only movie clips.
The
statement takes a movie clip as a parameter. The object you specify is added to the
with
end of the current target path. All actions nested inside a
the new target path, or scope. For example, in the following script, the
passes to the
statement to change the properties of
with
with (donut.hole) {
_alpha = 20;
_xscale = 150;
_yscale = 150;
}
The script behaves as if the statements inside the
of the
instance. The preceding code is equivalent to the following example:
hole
donut.hole._alpha = 20;
donut.hole._xscale = 150;
donut.hole._yscale = 150;
The preceding code is also equivalent to the following example:
with (donut) {
hole._alpha = 20;
hole._xscale = 150;
hole._yscale = 150;
}
354
Working with Movie Clips
statement to address a movie clip once and then execute a series of
statement works on all ActionScript objects (for example,
with
statement are carried out inside
with
:
hole
statement were called from the timeline
with
object
donut.hole
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?