# Event statements

**URL:** <https://forum.kirupa.com/t/event-statements/238722>\
**Category:** Uncategorized\
**Created:** [September 14, 2007, 8:50am UTC](https://forum.kirupa.com/t/event-statements/238722 "2007-09-14T08:50:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flip](https://avatars.discourse-cdn.com/v4/letter/f/53a042/32.png) [@flip](https://forum.kirupa.com/u/flip)\
**Post date:** [September 14, 2007, 8:50am UTC](https://forum.kirupa.com/t/event-statements/238722/1 "2007-09-14T08:50:29Z")

</div>

The way I’ve learned (and “learned” is stretching it a bit) to write an event listener is -

myButton.addEventListener(MouseEvent.CLICK, onClick);

function onClick(event:MouseEvent):void;  
{

}

I keep seeing what seems to be the same thing written in the following way -

myButton.addEventListener(MouseEvent.CLICK,  
function(evt:MouseEvent):void  
{

}  
);

Are these equivalent ways of doing the same thing and could “evt” be replaced by any name for your function?  
If so, what’s the advantage of one over the other?
