one I used recently... I was setting up some date actionscript on a website. The only problem was the months in Flash are listed as 1,2,3,4,5,6,7,8,9,10,11,12... I wanted January, February, etc. you get the idea.
I simply created an array that listed the names of all 12 months and when it pulled the month number off of the system clock it would know what the name was by the position.
Arrays will actually count positions.... it knows position 6 would be June, position 7 would be July etc.
This was just a quick one i did... as you can see the possibilities are endless.
I also converted the 24 hour clock to a 12 hour clock this way.
Flash pulls the hours 1-24 off of the system clock... a total of 24 positions. I simply created an array which listed the hours 12-11am and 12-11pm.
Go to
and you will see the time and date at the bottom. This is the result of 3 different arrays.
The greeting at the top left looks at the hours of the day to determine whether it should greet you with "Good Morning", "Good Afternoon", or "Good Evening". Those are just basic if statements.
Ya' Gotta Love It!