Yes you can define a function, and then pass it as the 'FunctionClick' parameter in your button defintion.

If you want to suspend the game from running until the button is pressed, you can use a simple variable and a while loop in the main function...
Code:
var start_game = 0;

function main()
{
while(start_game==0){wait(1);}
...
// start game bla bla
}


Then your function attached to the button will simply set this variable to 1.

Last edited by DJBMASTER; 03/27/10 16:21.