Research and Development 1/^Archief/2009-2010/01/Flash/Code
Uit Werkplaats
< Research and Development 1 | ^Archief | 2009-2010 | 01 | Flash
Code
Hier gooi ik de source code in van het flash programmaatje van de microfoon.
package { import flash.display.Sprite; import flash.events.*; import flash.media.Microphone; import flash.system.Security; import flash.system.SecurityPanel; public class Record extends Sprite { public function Record() { var mic:Microphone = Microphone.getMicrophone(); //Vraagt toestemming om gebruik te mogen maken van je mic Security.showSettings(SecurityPanel.MICROPHONE); //Laat je jezelf horen 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); } } }