You can add functions to pages by adding touch areas.

Add a new function

Toolbox > “Hotspot” to add a new touch area. Make it small and put it somewhere not normally touched.

For example, say we have added a touch area called “m0”.

Trigger the function from an object

You can call this from any other object on the page using this code, for instance in a picture object you are using as a button or graphical checkbox “Touch Release Event”:

co.val=13		//Set a value we want to pass to the m0 event, e.g. to provide the "id" of the object that has been touched.  "co" needs to be a variable that has been added to the page
click m0,1	//0=trigger 'Touch Release Event', 1=trigger 'Touch Press Event'
Add the function code

Uncheck “send component id” to stop the object event being sent out of the UART.

You can add code to both the ‘Touch Press Event’ and ‘Touch Release Event’ and call each separately.

We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.


Your email address will not be published.