Game Development Reference
In-Depth Information
Figure 12-6. The soundHolder clip
The soundHolder clip contains ten frames, but only two of them are absolutely necessary. The
extra frames are for visual purposes only. We also have five layers. Frame 1 of layer one (the
code layer) contains just a stop command in the actions panel. Frame 1 of layer 2 (the look layer)
can contain anything you want. We have placed a gray box with red text that says sounds. We
have only done this so we will have a visual for the holder when it is placed on the screen. All of
the assets in the holder will start on frame 2, so frame 1 will be a blank clip unless you add
something into the look layer.
All of the sound assets are placed on frame 2, each in its own layer. This is a necessity for
sounds as only a single sound can be on each layer of a MovieClip timeline. The sounds all begin
on frame 2 for a very important reason. If they were all on frame 1, you would hear them all play
as the play head on the main timeline passed over frame 2. If we were to have visual assets to
preload, each asset could be placed on a single layer, but it is better organizationally to have a
layer for each like the sounds. This structure makes it much easier to add and delete assets as
needed.
Placing the asset holder on the main time line
The final thing we need to do to set up our FLA file for preloading is to place the soundHolder clip
on (or off) the stage on frame 2 of the main time line, in the assets layer; see Figure 12-7.
Search WWH ::




Custom Search