Initial call for a Function

Hi,

I have the following code:


for(var i:int = 0; i<buttons.length; i++){
  buttons*.addEventListener(MouseEvent.CLICK, myFunction);
}

function myFunction(e:MouseEvent):void{
 if(e.target.parent == btnContainerArray*)){
  trace("does something");
 }
}

I would like to add a code that would add an initial call to the function myFunction, but because it is listening for a MouseEvent, it has to wait until a MouseEvent happens (CLICK)

I thought that I could add a parameter to a function call like this:


myFunction(e:Event, buttons[0]);

but that did not work.

Could you please share some advice? Thanks