             if(mode == RECORD){
             }else if(mode == STREAM){
                 log('started');
+
                 mic.addEventListener(SampleDataEvent.SAMPLE_DATA,streamHandler);
             }
         }

    			ExternalInterface.addCallback("stop", stop);
    			
            }else if(Microphone.isSupported === false){
                error(1,"Microphone usage is not supported.");
                log("Microphone usage is not supported.");
            }else{
                error(2,"No microphone detected.");
                log("No microphone detected.");
            }
            
            ExternalInterface.call(JSObject + '.loaded',id);
        }
        

            
                mic.addEventListener(StatusEvent.STATUS,statusHandler);
                mic.addEventListener(ActivityEvent.ACTIVITY,activityHandler);
                mic.codec = SoundCodec.SPEEX;
                mic.enableVAD = true;
                mic.setSilenceLevel(1, 1000);
                mic.setUseEchoSuppression(true); 
                mic.setLoopBack(true);
                mic.gain = 50;
                
           		ExternalInterface.addCallback("setMic", setMic);
    			ExternalInterface.addCallback("getMicrophoneList", getMicrophoneList);
