 
     private function announceMicrophoneInaccessibility():void {
       if (isMicrophoneConnected()) {
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.MICROPHONE_USER_REQUEST);
-      } else {
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.NO_MICROPHONE_FOUND);
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.MICROPHONE_USER_REQUEST);
+      } else {
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.NO_MICROPHONE_FOUND);
       }
     }
 
     public function requestMicrophoneAccess():void {
-      this.recorder.mic.addEventListener(StatusEvent.STATUS, onMicrophoneStatus);
-      this.recorder.mic.setLoopBack(true);
+      recorder.mic.addEventListener(StatusEvent.STATUS, onMicrophoneStatus);
+      recorder.mic.setLoopBack(true);
     }
 
     private function onMicrophoneStatus(event:StatusEvent):void {
-      this.recorder.mic.setLoopBack(false);
+      recorder.mic.setLoopBack(false);
       if(event.code == "Microphone.Unmuted") {
-        this.configureMicrophone();
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.MICROPHONE_CONNECTED, this.recorder.mic);
-      } else {
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.MICROPHONE_NOT_CONNECTED);
+        configureMicrophone();
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.MICROPHONE_CONNECTED, recorder.mic);
+      } else {
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.MICROPHONE_NOT_CONNECTED);
       } 
     }
 
     public function configureMicrophone(rate:int=22, gain:int=100, silenceLevel:Number=0, silenceTimeout:int=4000):void {
-      this.recorder.mic.setRate(rate);
-      this.recorder.mic.setGain(gain);
-      this.recorder.mic.setSilenceLevel(silenceLevel, silenceTimeout);
+      recorder.mic.setRate(rate);
+      recorder.mic.setGain(gain);
+      recorder.mic.setSilenceLevel(silenceLevel, silenceTimeout);
     }
 
     public function setUseEchoSuppression(useEchoSuppression:Boolean):void {
-      this.recorder.mic.setUseEchoSuppression(useEchoSuppression);
+      recorder.mic.setUseEchoSuppression(useEchoSuppression);
     }
 
     public function setLoopBack(state:Boolean):void {
-      this.recorder.mic.setLoopBack(state);
+      recorder.mic.setLoopBack(state);
     }
 
     public function record(name:String, filename:String=null):Boolean {
-      if (this.isMicrophoneAccessible()) {
-        if(this.recorder.recording) {
-          this.recorder.stop();
-          ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.RECORDING_STOPPED, this.recorder.currentSoundName, this.recorder.duration());
+      if (isMicrophoneAccessible()) {
+        if(recorder.recording) {
+          recorder.stop();
+          ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.RECORDING_STOPPED, recorder.currentSoundName, recorder.duration());
         } else {
-          this.recorder.record(name, filename);
-          ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.RECORDING, this.recorder.currentSoundName);
+          recorder.record(name, filename);
+          ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.RECORDING, recorder.currentSoundName);
         }
-        return this.recorder.recording;
+        return recorder.recording;
       } else {
         announceMicrophoneInaccessibility();
         return false;

    }

    private function playbackStarted(event:Event):void {
      ExternalInterface.call(this.EVENT_HANDLER, MicrophoneRecorder.PLAYBACK_STARTED, this.recorder.currentSoundName, this.recorder.latency);
    }

    private function playComplete(event:Event):void {
      ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.STOPPED, this.recorder.currentSoundName);
    }

    private function microphoneActivity(event:Event):void {
      ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.MICROPHONE_ACTIVITY, this.recorder.mic.getActivityLevel());
    }

    private function microphoneLevel(event:MicrophoneLevelEvent):void {
      ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.MICROPHONE_LEVEL, event.levelValue);
    }

    private function microphoneSamples(event:MicrophoneSamplesEvent):void {
      ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.MICROPHONE_SAMPLES, event.samples);
    }

    public function init(url:String=null, fieldName:String=null, formData:Array=null):void {
      this.uploadUrl = url;
      this.uploadFieldName = fieldName;
      this.update(formData);
    }

    public function update(formData:Array=null):void {
      this.uploadFormData = [];
      if(formData) {
        for(var i:int=0; i<formData.length; i++) {
          var data:Object = formData[i];
          this.uploadFormData.push(MultiPartFormUtil.nameValuePair(data.name, data.value));
        }
      }
    }

    public function isMicrophoneAccessible():Boolean {
      return isMicrophoneConnected() && !this.recorder.mic.isMuted();
    }

    private function isMicrophoneConnected():Boolean {

    public var saveButton:DisplayObject;

    public function RecorderJSInterface() {
      recorder = new MicrophoneRecorder();
      if(ExternalInterface.available && ExternalInterface.objectID) {
        ExternalInterface.addCallback("record", record);
        ExternalInterface.addCallback("observeLevel", observeLevel);
