Its built in, just not easily found in the manual.
Looking at your code you want to 'share' the funtion "create_entity1"
Do so like this. (NO changes required in panel definition)
Code:
function create_entity1(var button_number)
{
   // "button_number" now contains the button number that was pressed,
   // starting with 1. In this case "1" would be the horse button.
   ...
}




"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial