Flash Media Server |
|||
| Client-Side ActionScript Language Reference for Flash Media Server 2 > Client-Side ActionScript Language Reference > Microphone class > Microphone.onActivity | |||
public onActivity = function(active:Boolean) {}
active A Boolean value set to true when the microphone starts detecting sound, false when it stops.
Nothing.
Event handler; invoked when the microphone starts or stops detecting sound. If you want to respond to this event handler, you must create a function to process its active value.
To specify the amount of sound required to invoke Microphone.onActivity(true), and the amount of time that must elapse without sound before Microphone.onActivity(false) is invoked, use Microphone.setSilenceLevel().
The following example displays true or false in the Output panel when the microphone starts or stops detecting sound.
var active_mic:Microphone = Microphone.get();
_root.attachAudio(active_mic);
active_mic.onActivity = function(mode){
trace(mode);
}
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/fms/2/docs/00000558.html