     private function onConnectionStatus(event:NetStatusEvent):void {
       if ('NetConnection.Connect.Closed' === event.info.code) {
         dispatchEvent(new ClientEvent(ClientEvent.STOPPED));
+        this.currentState = "stopped";
       }
     }
 
     private function onNetStatus(event:NetStatusEvent):void {
       if ('NetStream.Play.Start' === event.info.code || 'NetStream.Unpause.Notify' === event.info.code) {
         dispatchEvent(new ClientEvent(ClientEvent.START_PLAY));
+        this.currentState = "playing";
         return;
       }
 

package com.axis.httpclient {
  import com.axis.ClientEvent;
  import com.axis.IClient;
  import com.axis.Logger;


    public function stop():Boolean {
      ns.dispose();
      nc.close();
      this.currentState = "stopped";
      return true;
    }

    public function pause():Boolean {
      if (this.currentState !== 'playing') {
        ErrorManager.dispatchError(800);
        return false;
      }
      ns.pause();
      this.currentState = "paused";
      return true;
    }

    public function resume():Boolean {
      if (this.currentState !== 'paused') {
        ErrorManager.dispatchError(801);
        return false;
      }
      ns.resume();
      return true;
    }
