Flash ActionScript 3 Functions Tutorials
Basically, functions are simply a block of codes that will be executed when run or called. This can easily be explained with the following diagram:
Basic Syntax of a Function
The following diagram shows a basic syntax of function. We will discuss the structure in more details in next tutorials.
Return Data Type
A function is usually used to process variables and then output that value. Therefore you should specify the type of value the function is supposed to return.
The most common data type of value that will be returned by function are:
If a function does not return a value, then its return type should be void.