
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Functions as Objects
|
209
By understanding certain Actions as functions, you’ll have an easier time remember-
ing and using their syntax. For example, to load a movie into the Flash Player we
need to know that a loadMovie() function exists and what parameters it expects.
After a quick jaunt over to the Language Reference, we find the info and can easily
put together a statement like this:
loadMovie("myMovie.swf", "_level1");
This will be easy stuff once you’ve become comfortable with using functions.
ActionScript’s built-in functions are many and varied. They give us control over the
elements of a movie, empowering us to examine and change everything from the vol-
ume of a sound to the amount of text selected in an editable text field. For a thor-
ough description of ActionScript’s built-in functions, consult the Language
Reference. Skim it periodically to familiarize yourself with the type of functions that
are available, although there is no need to memorize their specific syntax. In addi-
tion to the built-in functions that are a native part of the ActionScript language, Mac-
romedia and third parties offer libraries of custom functions that can be incorporated
into your movies and used exactly like built-in functions. For more information on
extending Flash, see the resources in Appendix ...