Another aspect of the game I need to deal with is the sound effects.

Previously to play sounds in my games I simply imported the sound files into
the library, gave them a linkage name them put the following code on the
first frame of my movie for each sound effect.

cheer_Sound = new Sound();
cheer_Sound.attachSound("cheer_sfx");

Play_Cheer_Sound = function() {
        cheer_Sound.start();    
}

As I am using this game as a learning exercise to write a game using OOP, I
wondered if there is a better way to deal with all the sound effects.
Basically there are about 12 different sound effects, and I basically just
need to be able to make a call to play a particular sfx when required. The
various objects need to be able to call the sfx. For example the
WeatherManager class may want to play a wind sfx when the wind speed changes
to a higher speed. 

Is this something I should write a separate class for or is the above the
way to do it still?

Many thanks

Paul

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to