From the author of

From the author of

Adding Sounds

Now that the grid is generated, you can attach the sounds (all 20 of them)
from the Library to each box. Before you start writing the code, you need to
reference each sound by assigning a Linkage ID to it.

Each time through the loop, an instance of the boxMC movie clip (located in
the movie's Library) will be placed on the Stage and given an instance name
and level based on its row and column. After this instance is on the Stage, you
can create a new sound object, and by using the attachSound()
method, you can attach one of the Library's sounds to it. (These will be
named sound0sound19 in this movie.)

By using sound objects, you don't have to drag the sound
from the Library onto the Stage, and you can use the methods and properties of
the sound object to manipulate your sounds. See Figure 8.