 							",videoWidth:" + _videoWidth +
 							",videoHeight:" + _videoHeight +							
 							"}";
-			
+
 			_element.sendEvent(eventName, values);			
 		}		
 	}
-}
-		
+}
			if (_bytesLoaded < _bytesTotal)
				sendEvent(HtmlMediaEvent.PROGRESS);			
		}
		
		// internal events
        private function netStatusHandler(event:NetStatusEvent):void {
			trace("netStatus", event.info.code);

			switch (event.info.code) {
				
				case "NetStream.Buffer.Empty":
                case "NetStream.Buffer.Full":
					_bytesLoaded = _stream.bytesLoaded;
					_bytesTotal = _stream.bytesTotal;
					
					sendEvent(HtmlMediaEvent.PROGRESS);	
                    break;


				}
				_timer.start();
				_isPaused = false;
				sendEvent(HtmlMediaEvent.PLAY);
				sendEvent(HtmlMediaEvent.PLAYING);
				_hasStartedPlaying = true;
			}

		}			

		public function pause():void {
			if (_stream == null)
				return;
				
			_stream.pause();
			_isPaused = true;
			_timer.stop();			

			_isPaused = true;
			sendEvent(HtmlMediaEvent.PAUSE);
		}		

		public function setCurrentTime(pos:Number):void {
			if (_stream == null)
				return;
				
			_stream.seek(pos);
			sendEvent(HtmlMediaEvent.SEEKED);
		}

		public function setVolume(volume:Number):void {
			if (_stream == null)
				return;
			
			_soundTransform = new SoundTransform(volume);
			_stream.soundTransform = _soundTransform;
			_volume = volume;

			_isMuted = (_volume == 0);

			sendEvent(HtmlMediaEvent.VOLUMECHANGE);
		}


		public function setMuted(muted:Boolean):void {			

			if (_isMuted == muted)
				return;

			if (muted) {
				_oldVolume = _stream.soundTransform.volume;
				setVolume(0);
			} else {
				setVolume(_oldVolume);
			}

			_isMuted = muted;
		}


		private function sendEvent(eventName:String) {

			// calculate this to mimic HTML5
			_bufferedTime = _bytesLoaded / _bytesTotal + _duration;			

			// build JSON
			var values:String = 
							"{duration:" + _duration + 
