Q: Event or nothing in the parameters of function. How to? I trying to write event listener, which could be called by event or manually. In case when it called by event we have to delete event listeners. In other case - just do something. I'm using (... args) construction to determine number of parameters. But when function called by Event, it looks like type of args was changed to Object, so I couldn't get args.target and args.type fields. But when I using (args:Event) everything fine.
private function smartErrListener(... args) {
    // when function called by event
    // args.length == 1 
    // args instanceof Event == false
    // args is Event == false
    // typeof(args) == 'object'

    if (args.length == 1 && args instanceof Event) {
        args.target.removeEventListener(Event.COMPLETE, OkListener);
        args.target.removeEventListener(IOErrorEvent.IO_ERROR, smartErrListener);
    }

    trace("We've got an errors!");
}

Any ideas?
ps: ofcourse it is possible to do something like
private function smartErrListener(e:Event) {
    e.target.removeEventListener(Event.COMPLETE, OkListener);
    e.target.removeEventListener(IOErrorEvent.IO_ERROR, smartErrListener);

    this.errCallback();
}

private function errCallback() {
    trace("We've got an errors!");
}

But it's one more function...

A: I do something like this:
protected functiom onStageResize(e:Event = null):void
{}

then I can use it with event listener and alone:
onStageResize();

e.g. to force execution before event is triggered,
if you want to have the same method called by event listener and manually with different arguments than make sure that the argument is an Event you could have custom event to wrap custom arguments then you can test:
if( e is MyCustomEvent )
{
    //called manually
}

but there is nothing wrong with the second method approach:)
best regards
