 			Security.showSettings("2");
 		}
 		
+		private function addEventListeners():void {
+			addEventListener(Event.ENTER_FRAME, onEnterFrame);
+			mic.addEventListener(StatusEvent.STATUS, onMicStatus, false, 0, true);
+			micRecorder.addEventListener(RecordingEvent.RECORDING, onRecording);
+			micRecorder.addEventListener(Event.COMPLETE, onComplete);			
+		}
+		
 		// Methods
 		public function isMuted():Boolean {
 			return muted;
 		}
 		
-		public function getActivityLevel():Number {
+		public function getActivityLevel():int {
 			return mic.activityLevel;
+		}
+		
+		public function getTime():int {
+			return this.time;
+		}
+		
+		public function getDuration():int {
+			return this.duration;
 		}
 		
 		public function getDataURL():String {

		}
		
		// Event Handlers
		private function onRecording(e:RecordingEvent):void {
			dispatchEvent(new Event('Recorder.recording', true));
		}
		
		private function onComplete(e:Event):void {
			dispatchEvent(new Event('Recorder.complete', true));
		}
		
		private function onMicStatus(e:StatusEvent):void {
			if (e.code == "Microphone.Unmuted"){
				muted = false;
				mic.removeEventListener(StatusEvent.STATUS, onMicStatus);
				dispatchEvent(new Event('Recorder.enabled', true));
			} else if (e.code == "Microphone.Muted") {
				muted = true;
				mic.removeEventListener(StatusEvent.STATUS, onMicStatus);
				dispatchEvent(new Event('Recorder.disabled', true));
			}
		}
		

    import flash.media.Microphone;
	
	import Base64;
	import RecorderEvent;
	
	public class Recorder extends Sprite {
		
		private var muted:Boolean = true;
		private var recording:Boolean = false;
		private var time:int = 0;
		private var duration:int = 0;
		
		private var mic:Microphone;
		private var wavEncoder:WaveEncoder = new WaveEncoder();
		private var micRecorder:MicRecorder = new MicRecorder(wavEncoder);
