Not everything has to be done in code.  Flash has timelines and you
should use them.

Put the audio in a movieclip, set it to streaming and add frames until
you see the wave form end, and on the last frame put a stop action and
call a method that lets your app know the audio is done playing.

-Steven


BLITZ | Steven Sacks - 310-551-0200 x209

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Ian Thomas
> Sent: Friday, July 07, 2006 7:16 AM
> To: Flashcoders mailing list
> Subject: [Flashcoders] Detecting a Sound Card
> 
> Hi folks,
>   I have a situation where my app doesn't work on a PC with no sound
> card installed, because I depend on onSoundComplete for a couple of
> synchronised triggers and (guess what) onSoundComplete is never called
> if the machine doesn't have a sound card. Not unexpected, I guess.
> 
>   However, unfortunately System.capabilities.hasAudio doesn't report
> false. I assume it only returns false for builds of a player that
> doesn't have audio (for example, handhelds and so forth).
> 
>   I could really do with finding a way to detect the presence/absence
> of a sound card. Any ideas? The one that occurs is to, in app startup,
> fire off a short sound (say 500ms duration) and check whether the
> onSoundComplete has been called 1s later - if not, no soundcard - but
> obviously this slows down app startup and is a bit of a pain. I was
> wondering if there was anything simpler around..?
> 
> TIA,
>   Ian
.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
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