0

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

Felipe
  • 161
  • 2
  • 7

1 Answers1

1

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
  • 1,550
  • 11
  • 17