User Guide
44 Chapter 1: ActionScript Basics
Calling a user-defined function
To call a function, enter the target path to the name of the function, if necessary, and pass any
required parameters inside parentheses. For example, the following statement invokes the
function
sqr() in the object mathLib, passes the parameter 3 to it, and stores the result in the
variable
temp:
var temp:Number = mathLib.sqr(3);
The following example uses an path to call the initialize() function that requires no
parameters:
initialize();