Greetings to all!
In the tutorials of Actionscript 3.0, we saw what are Arrays and how much they can be important using Flash CS3.
Also, we saw in details the use of the method splice of the Array class.
Why would I want to remind you all of the above?
Everything seen first will be useful to explain how to create a grid of squares with Flash with every single square being selection able and not.
Basically, on click of the mouse on one of the square in the grid, the square itself, if not already selected, will be added to an Array. Otherwise, if already selected, it will be removed from the Array.
To do this, we will need the method indexOf of the Array class of Actionscript 3.0.
Let us look at a concrete example…






