Loading And Unloading Additional Swf Files - MACROMEDIA FLASH MX 2004-USING ACTIONSCRIPT IN FLASH Use Manual

Using actionscript in flash
Hide thumbs Also See for FLASH MX 2004-USING ACTIONSCRIPT IN FLASH:
Table of Contents

Advertisement

The
statement takes a movie clip as a parameter. The object you specify is added to the end
with
of the current target path. All actions nested inside a
new target path, or scope. For example, in the following script, the
object
donut.hole
with (donut.hole){
_alpha = 20;
_xscale = 150;
_yscale = 150;
}
The script behaves as if the statements inside the
the
instance. The previous code is equivalent to the following example:
hole
donut.hole._alpha = 20;
donut.hole._xscale = 150;
donut.hole._yscale = 150;
The previous code is also equivalent to the following example:
with (donut){
hole._alpha = 20;
hole._xscale = 150;
hole._yscale = 150;
}

Loading and unloading additional SWF files

To play additional SWF files without closing Flash Player, or to switch SWF files without loading
another HTML page, you can use one of the following options:
The global
loadMovie()
The
loadClip()
MovieClipLoader class, see the
Reference.
You can also use
CGI output. For example, you might use this to load dynamic SWF or JPEG files based on
specified variables within a movie clip. When you load a SWF file, you can specify a level or
movie clip target into which the SWF file will load. If you load a SWF file into a target, the
loaded SWF file inherits the properties of the targeted movie clip. After the movie is loaded, you
can change those properties.
The
unloadMovie()
unloading SWF files with
can decrease the memory required by Flash Player. It can be more efficient in some situations to
set the movie clip's
the clip at a later time, set the
Use
loadMovie()
Play a sequence of banner ads that are SWF files by placing a
container SWF file that sequentially loads and unloads SWF banner files.
to change the properties of
function or
method of the MovieClipLoader class. For more information on the
MovieClipLoader class
to send variables to a CGI script, which generates a SWF file as its
loadMovie()
method removes a SWF file previously loaded by
unloadMovie()
property to
_visible
_visible
to do any of the following:
statement are carried out inside the
with
:
hole
statement were called from the Timeline of
with
method of the MovieClip class.
loadMovie()
in Flash ActionScript Language
ensures a smooth transition between SWF files and
instead of unloading the clip. If you might reuse
false
property to
and then set to
false
Loading and unloading additional SWF files
statement is passed the
with
. Explicitly
loadMovie()
when necessary.
true
function in a
loadMovie()
207

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING ACTIONSCRIPT IN FLASH and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents