Hi.

I've made a platform game in Flash using AS3.
Game was fine, no lag, everything worked great.

I imported some small .wav files for sound effects and added them using code like this:

var s5:S5_enemy = new S5_enemy();
var channel2:SoundChannel = s5.play();

Sound effects occur on picking up items, jumping, killing an enemy, dieing, completeing a level etc.

Now when playing the game I get lag (mostly in the screen scrolling) when a sound effect plays (like jumping for example) that I didn't get before.

Does anyone know why this is, and if there is a way to fix it?

Thanks.