Just as it says on the tin. I want to create a class which will do its work, and when it's done, generate an event back to my movie.

I want to use my custom class like this :

var test:Main = new Main()
test.onDone = function() {
// blah blah
}

Is there any sample classes which do this?

Im tearing my hair out over this!