views:

22

answers:

1

Hi

I need to override the call method from NetConnection class, the signature of the method is:

public function call(command:String, responder:Responder, ...parameters):void

How do I override that method?

The following lines didn't work for me.

override public function call(command:String, responder:Responder, ...parameters):void
{
    super.call (command, responder, ...parameters);
}

override public function call(command:String, responder:Responder, ...parameters):void
{
    super.call (command, responder, parameters);
}

Any clue?

Thanks in advance

A: 

parameters is an optional array, so you need to check if they exist.

if(parameters.length > 0) {
  super.call(command, responder, parameters);
}
else {
  super.call(command, responder);
}
hellslam