Using the examples/shared/examples.js
sample, it does slideIn then fade out with ghost:

m.slideIn('t').ghost("t", { delay: 1000, remove: true });
I'd like to add a function as a param and call it when the ghost event is finished.
Is there a way to add an afteranimate event to the ghost function?

I've managed to add a afteranimate event, but with Ext.fx.Anim:

new Ext.fx.Anim({
    target: m,
    duration: 2000,
    from: {
    to: {
        width: 600, //end width 300
        height: 600 // end width 300
}).on('afteranimate', function() {