Hi List,

I'm dipping my toe into AS3 and thought I'd play around with sound by making
a little "piano keyboard" which is played by pressing keys on the computer
keyboard.

It works - the appropriate sounds play on KeyboardEvent.KEY_DOWN - however,
I've noticed that there is often a lag between the keyboard event and the
actual sound playing. The occurrence of the lag seems pretty random.

The sounds are MP3s which are load()ed into Sound objects on init(). On
KeyboardEvent.KEY_DOWN, the appropriate Sound is play()ed.

I've checked all the MP3s, and they don't have extra silence at the
beginning. I don't think it has to do with the number of MP3s involved (14),
because I noticed the lag even when I was testing it out with 2 sounds.

Has anyone dealt with this before, and know what the problem might be? You
can see (or rather, hear) the lag for yourself here:
http://snipurl.com/7ndr2-meep

Thanks!

In hope,
CB.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to