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 Tutorial: Array at First Glance

This Flash ActionScript tutorial series show how to use Array with ActionScript 3. The first three tutorials show how to create new Arrays and how to assign values to Arrays with different methods. The fouth to sixth tutorials show how to access or retrieve values from Arrays. The last tutorial show how to load an external text file to Array and how to manipulate the Array.

Please update flash player to view this Flash ActionScript tutorial!

Flash Tutorial Content:

While a single variable holds a single value, Array can hold a list of values. This Flash ActionScript tutorial show show how to create a new Array with ActionScript..

Flash ActionScript Codes:

//Create an empty Array with the name trayArray
//The size of this Array is 5
//Actually you may imagine an Array like a DIY ice cube tray
//The number of cavity (elements) decide the size of the ice cube tray
//Each cavity of the ice cube tray can contain or hold a thing (value)
var trayArray:Array = new Array(5);

 

//Although the Array was created, we did not assign values to any
//elements up to now.

 

//Check the size of testArray
//AS use length to define the size of an array
//The size of this Array is trayArray.length
//For easier memory, you can also imagine:
//If the length is longer, there are more cavities (elements)
//If the length is shorter, there are less cavities (elements)
output_txt.text = "The number of elements of trayArray are: " + trayArray.length;

Download Flash Source File:

Flash Source File array-1.fla

Remarks:

This Flash ActionScript tutorial shows how to create a new Array.