Ok, this one's A BIT tricky...

Jul 14, 2013

Hello all,

I have been banging my head against the wall for the past 3 days trying to find a way to do the following.

The requirement
I need to implement a timer function (both count-up & count-down) and also save the count-up timer to resume from where it left of if a question slide is revisited.

The problem
The current count-up timer variable values do not reset to zero (although the triggers are right there in the base layer of the master slide). As a result, when visiting question 2, the count-up timer resumes from where it left off from question 1, instead of inheriting the values of question 2. Same thing happens when going back to Q1 (count-up starts from Q2 value instead of Q1).

Since this is for a client, I have sanitized it to the point where some workarounds may not even apply to my case, however PLEASE DO give the attached story a try.

Variables included :
CUpM1, the current count-up timers minute value
CUpS1 & S2, the current count-up timers seconds values

CDnM1, the current count-down timer minute value
CDnS1 & S2, the current count-down timer seconds values

Q001M1, the saved minute value for count-up timer - Question 1
Q001S1, S2 the saved seconds values for count-up timer - Question 1

Q002M1, the saved minute value for count-up timer - Question 2

Q002S1, S2 the saved seconds values for count-up timer - Question2

curQ : The current question variable


Any suggestions are very very welcome.

Cheers,
Alex

5 Replies
Marc Lee

Alex, Julie,

See what you think of the attached .story file.  The lost second in the countdown counter seemed like it was caused by the master slide being fired off twice whenever the slide changed.

So I put the CDnS1 trigger on a separate object in the S1 layer of the master offset by 20 milliseconds from the start of that layer's timeline.  That seemed to alleviate two seconds being deducted each time the slide changed.

I found some conflicts between the CDnS1  and S2 and therefore made the countdown seconds start at 60 and count down (eliminating the need for S2).  To add a leading zero when needed for S1 I added a text variable tensPlace that when from blank to 0 when S1 was less than ten.

Very clever counter, Alex!

-Marc Lee

Rod Peters

I found this to be a neat approach. However, putting code on different layers and switching between them causes problems with my project. My layers keep closing and by turning off the "Hide other layers" on the master broke the time.

My favorite way of keeping time has been to create a small animation that just moves a shape back and forth with each movement having one-half of the desired time interval. By placing this and all the code on the base layer of the master slide, I have a clock that works between slides and doesn't close all my other layers.

As a bonus, I can do things on the other half of the animation so I get 2 opportunities in each unit of time to trigger events. Effectively a 1 time unit clock and a half time unit clock.