The flash.system.Capabilities.hasAudio property returns true if the user's system has audio capabilities and false otherwise. : system.Capabilities « Development « Flash / Flex / ActionScript
The flash.system.Capabilities.hasAudio property returns true if the user's system has audio capabilities and false otherwise.
package{
import flash.display.Sprite;
import flash.system.Capabilities;
publicclass Main extends Sprite{
public function Main(){
// Load a .swf containing sound only if the Player can play audio
var content:String;
if (flash.system.Capabilities.hasAudio) {
content = "sound.swf";
} else {
content = "silent.swf";
}
}
}
}