03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

silenceLevel_pb.label = "Activity level: %3";<br />

} else {<br />

silenceLevel_pb.indeterminate = true;<br />

silenceLevel_pb.setStyle("themeColor", "0xFF0000");<br />

silenceLevel_pb.label = "Activity level: (inactive)";<br />

}<br />

};<br />

The MovieClip.getNextHighestDepth() method used in this example requires Flash Player<br />

7 or later. If your SWF file includes a version 2 component, use the version 2 components'<br />

DepthManager class instead of the MovieClip.getNextHighestDepth() method.<br />

See also<br />

setSilenceLevel (Microphone.setSilenceLevel method)<br />

useEchoSuppression<br />

(Microphone.useEchoSuppression property)<br />

public useEchoSuppression : Boolean [read-only]<br />

Property (read-only); a Boolean value of true if echo suppression is enabled, false otherwise.<br />

The default value is false unless the user has selected Reduce Echo in the Flash Player<br />

Microphone Settings panel.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 6<br />

Example<br />

The following example turns on echo suppression if the user selects a CheckBox instance<br />

called useEchoSuppression_ch. The ProgressBar instance called activityLevel_pb<br />

displays the current activity level of the audio stream.<br />

var useEchoSuppression_ch:mx.controls.CheckBox;<br />

var activityLevel_pb:mx.controls.ProgressBar;<br />

this.createEmptyMovieClip("sound_mc", this.getNextHighestDepth());<br />

var active_mic:Microphone = Microphone.get();<br />

sound_mc.attachAudio(active_mic);<br />

activityLevel_pb.mode = "manual";<br />

activityLevel_pb.label = "Activity Level: %3";<br />

useEchoSuppression_ch.selected = active_mic.useEchoSuppression;<br />

this.onEnterFrame = function() {<br />

activityLevel_pb.setProgress(active_mic.activityLevel, 100);<br />

};<br />

var chListener:Object = new Object();<br />

chListener.click = function(evt:Object) {<br />

active_mic.setUseEchoSuppression(evt.target.selected);<br />

Microphone 815

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!