Home page Home page

This is our First post for anyone who wann to attain good knowledge of Array used in Flash

Step1: We will tell you how the Arrays work in Flash Scripting First you have to create a object of Class Array

var student = new Array();

Step 2:  Adding a Element to Array

student.push({name : “yogesh”, age : 22, marks : 125})

Step 3:  Reading the Element in Array

for(i=0; i<student.length; i++)
{
trace(student[i].name + “,” + student[i].age + “,” + student[i].marks);
//trace(“\r”);
}

Step 4: Sorting  Array

student.sortOn(“marks”,Array.NUMERIC);

this is used to sort the array for a numeric Value

if you wann to sort for String

student.sortOn(“name”);

If you any Queries please Respond back

We will post the latest updates ASAP

With Regards

Vikas Solanki

vikas@doomshell.com

2 comments »

  1. Chakrapani Dubey said,

    August 18, 2009 @ 6:04 am

    This is a Tutorial which allowed me to understand the working of arrays with well defined description waiting for some more tutorials to get available.

    Highly Recommended

  2. chakrapani said,

    September 25, 2009 @ 7:05 am

    good

RSS feed for comments on this post · TrackBack URI

Leave a Comment