flash on 2012-2-26
♥0 |
Line 24 |
Modified 2012-02-26 02:59:42 |
MIT License
archived:2017-03-20 01:32:45
ActionScript3 source code
/**
* Copyright dimitris.1972g ( http://wonderfl.net/user/dimitris.1972g )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/w7D8
*/
package {
import flash.display.Sprite;
import flash.events.*;
import flash.media.Microphone;
import flash.system.Security;
public class MicrophoneExample extends Sprite {
public function MicrophoneExample() {
var mic:Microphone = Microphone.getMicrophone();
Security.showSettings("2");
mic.setLoopBack(true);
if (mic != null) {
mic.setUseEchoSuppression(true);
mic.addEventListener(ActivityEvent.ACTIVITY, activityHandler);
mic.addEventListener(StatusEvent.STATUS, statusHandler);
}
}
private function activityHandler(event:ActivityEvent):void {
trace("activityHandler: " + event);
}
private function statusHandler(event:StatusEvent):void {
trace("statusHandler: " + event);
}
}
}