Determining supported device sound formats

The System.capabilities.audioMIMETypes property contains an array of audio MIME types that the device supports. You can use this information to determine what types of device audio your application can play. The array's indexes are the same as the supported MIME types, so you can easily check whether a device supports a specific type of audio.

For example, the following code first checks whether the device supports playback of MIDI audio before loading an external MIDI file:

if (System.capabilities.audioMIMETypes["audio/midi"]) {
    my_sound.loadSound("soundtrack.mid");
}

Flash CS3