Here's a piece of dodgy looking code - but it works!?
I've got a class called "ServiceLoader" which contains many service calls, I also have buttons which correspond to these service calls. I've named the buttons as the ServiceLoader function names e.g. "getRecord" button corresponds to the "getRecord" function in my ServiceLoader class.
So I can grab the button name, which is a String and then call a function within the ServiceLoader class using associative array syntax:
var func:String = activeButton._name;
I'm not sure how "correct" this is, but it works. Any thoughts?