So I created this simple function
function emailTo(address):Void {
var address:String;
getURL("mailto:"+address);
}
Now I know this works
mail_btn.onRelease = function () {
this.address = "test@domain.com";
emailTo(this.address);
}
But I want it to be in this format
mail_btn2.onRelease = emailTo("test@domain.com");
But now it opens up my email program as soon as I test the flash file, so not on click
Any ideas??