Question

I'm trying to play a simple beep sound in my playbook application when a countdown expires. I manage to get the countdown to work correctly and but I can't get my sound to work.

This is how i'm playing my sound.

[Embed(source="sounds/beep.mp3")] private var CustomSound:Class;
...
...
...
var sound : Sound = new CustomSound() as Sound;
sound.play();
Was it helpful?

Solution

If it is only a beep sound, you could do the following:

// play some sound
var fx:AudioEffectsManager = new AudioEffectsManager();
fx.play(AudioEffect.ALARM_BATTERY);

just replace the

AudioEffect.ALARM_BATTERY

by the sound of your choice.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top