title: In AS3, how can you store, retrieve and reuse arguments provided by an ellipsis (...) parameter?
body: <p>I have a class that inherits from NetConnection, with the following function:</p>
  
  <pre><code>override public function connect(command:String, ... arguments):void
  {
      addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
      super.connect(command, arguments);
  }
  </code></pre>
  
  <p>What I want to do is effectively this:</p>
  
  <pre><code>override public function connect(command:String, ... arguments):void
  {
      m_iTries = 0;
      m_strCommand = command;
      m_arguments = arguments;
      addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
      super.connect(command, arguments);
  }
  
  private function onNetStatus(pEvent:NetStatusEvent):void
  {
      if (/* some logic involving the code and the value of m_iTries */)
      {
          super.connect(m_strCommand, m_arguments);
      }
      else
      {
          // do something different
      }
  }
  </code></pre>
  
  <p>Is this possible in AS3?  If so, how?  How would I declare the variable, set it, pass it into the function, etc.?  Thanks!</p>