Functions
are used to group blocks of code so that
they can be called with a simple statement
and reused when nessecary.
To use a custom function it must first
be defined. The term new function tell
flash that a new function is being created.
function
function_name () :datatype{
statements
} |
- "function_name" is
the name given to the function. This
is used to call the function later. Function
should be named using names that describe
what the function does. This makes it
easyer to work with code
- "datatype" is
the type of data that you want the function
to return. For example: "number" returns
a result of the function in the form
of a number or .....
- "statements" are
the actionscript statements that desacribe
the actions that you want the function
to perform.
Example I:
This function "sshow_text_
Parameters
Passing Parameters
Returning A Value From A Function