var file:FileReference = new FileReference();
stage.addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
function onClick(evt:MouseEvent):void {
file.save("some text.\nsome more text", "actionsnippet.txt");
}


function showMsg(msg:String):void {
trace(msg);
}
showMsg("Claire");

stage.addEventListener(MouseEvent.CLICK, showMsg, false, 0, true);
function showMsg(evt:MouseEvent):void {
trace("hello");
}


Example of two-person games; Tank Trouble

stage.addEventListener(MouseEvent.CLICK, showMsg, "hello",
false, 0, true);
function showMsg(evt:MouseEvent, msg:String):void {
trace(msg);
}

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/dM4ZcxsfMZU/13361