Setting a counter to zero

Jan 15, 2014

Hi,

I have a variable on a number of slides that adds "1" every time it is visited and then a reference to this variable on one slide that shows how much it has added up to.

I would like this counter to go back to zero when I click a "Continue" button but it soesn't work. If I choose to go back to zero when I change state of the button it works but not when I use "click" the button.

What is the reason for this and how can I fix this so that the counter goes back to zero when I click the button?

Thanks

Henrik

3 Replies
Michael Hinze

See attached sample. This probably doesn't reflect your setup, but it may give you some ideas. The file has four slides. At the beginning of each slide's timeline, a counter variable is increased by +1. On the last slide, there is a button that sets the variable back to 0 when the button is clicked.

Since you are using a button labelled 'Continue', I assume there are two triggers on your button; one that set the variable and another that jumps to the next slide. In this case, make sure that the trigger that sets the variable is executed BEFORE the jumpto trigger. Hope that helps. You can always post your file here, so that we can see what's going on.

This discussion is closed. You can start a new discussion or contact Articulate Support.