You may pass another function handler to a class
For example
Class A {
public function A() {
addEventListener(SFSEvent.CONNECTION, MyMethod);
}
private function _handler:Function;
public function set handler(value:Function):void {
_handler = value;
}
private function MyMethod(e:SFSEvent):void {
if (_handler) {
_handler.apply(null, someParam);
}
}
}
Then pass the target handler to A instance
var a:A = new A();
var b:Myclass = new Myclass();
a.handler = b.someMethod;
If the function is a static function, You may just do it like this
addEventListener(SFSEvent.CONNECTION, SomeClass.aStaticFunction);