Flash AS3 Tutorials Center | Interesting Flash Animation Tutorials | Valuing Flash Animation Tutorials | Flash ActionScript and Animation Home

AS3 Beginner Tutorials | AS3 Basic Lessons | AS3 Valuing Courses | AS3 Components Tutorials | AS3 and PHP Interaction Tutorials
AS3 Practical Tutorials | AS3 Animation Techniques | AS3 Transition Effects Tutorials | AS3 Download Upload Files | AS3 Particle Systems
Communication Between Flash Movies with AS3 | AS3 and JavaScript interaction | AS3 Matrix Transformation | AS3 Physics Simulation Tutorials

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:

ActionScript function

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.

ActionScript function syntax

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:

  • Number
  • String
  • int
  • Boolean
  • Null
  • void

If a function does not return a value, then its return type should be void.

flash actionscript function tutorial, Adobe flash animation tutorial