{"identifier":26982,"topic":"Keywords","name":"on","text":"<code>on <i>messageName<\/i> <\/code>[<i><code>parameterList<\/i><\/code> ]     <i><code>statements<\/i> end <i>messageName<\/i> <\/code> The<code> on <\/code>keyword defines a new message handler of the specified name. <br><br>\n\n The optional<code> <i>parameterList<\/i> <\/code>lets the handler receive values sent along with a message. HyperCard assigns each value to a parameter variable in the<code> <i>parameterList<\/i><\/code>. <br>\n","related":{"25835":"exit","6658":"Handling messages","61134":"param","61390":"paramCount","61645":"params","27256":"pass","62431":"result","28715":"return","29297":"send","65969":"target","8578":"The message-passing order","10721":"Using parameter variables","5306":"What are messages?","9950":"Writing message handlers"},"examples":"","demo":"<b>on<\/b> mouseUp\n   flashTheButton \"bkgnd btn id 57\",2\n <b>end<\/b> mouseUp\n <br><br>\n\n <b>on<\/b> flashTheButton whichBtn, howMany\n   repeat for (howMany * 2) times\n     set the hilite of whichBtn to not the hilite of whichBtn\n   end repeat\n <b>end<\/b> flashTheButton\n ","debug":{"9":["on messageName [para"]}}