best way to handle sounds in AS3
I'm currently doing some game development, targeting iOS and Android devices using Flash Pro and AS3. I'm doing my best to keep the code highly optomized and doing as much object pooling as possible. So far, I'm very pleased with how smooth everything is running on the devices.
I have noticed that when the actual 'game play' starts up, there is often a short hitch the when any particular sound effect is called up for the first time. After the first time its seems fine.
I can only assume that the hitch in game play is Air loading up the soud file into memory (which is why it's hitching only on the first call).
I'm a bit of a novice when it comes to audio, but I'm wondering if there is a best practices when it comes to managing the various sound fx and sound tracks so everything plays smoothly 'without a hitch'. har har. Currently the sounds reside in my Library as exentions of the Sound class, and i just crate an instance of those classes at run time and .play() when i want to call them.
Thanks ahead of time,
-dis