Inheritance and Function Identifiers

Hi again :to:,
I know I ask too many questions but its fun typing all of this to people I don’t know. Ok so here goes;
I have all my button instances created from 1, generic class. I can easily get the class to register a MOUSE_DOWN event listener when clicked. However, I want the container of the buttons to register/process the clicks and Im not sure how to do this;

  • either parse a link to each button of the function I want them to trigger and parse a unique identifier. But I do not know how to tell the button which function to trigger eg.

//Container Class
var myButton = new ButtonCreate("text",width,<function identifier>, <unique ID>);
// ButtonCreate Class
function onClickMe(e:Event){
<function identifier>(<unique ID>);
}

  • OR - I use Inheritance so each different group of buttons inherit a different function when clicked, but I do not know where to start with this, let alone how to it efficiently.

Thanks for the awsem help, :moustache
Dan