I am working on a project and a small part of that project is creating a counter increases by one everytime a button is clicked. For example I have incuded a picture of a much simpler version of what I am doing. For some reason I can not get the code right so that every time you click the grey rectangle the text increases to one and then two and so on.
Get this code in your composition
In Compostion ready event :
In the click event of the Rectangle have this code :
var counter = sym.getVariable("counter");
In the above snippets the text field is reset to 0 whenever you refresh or reopen the page.
Hope this helps you
Thank you so much!