Forum Discussion
Creating a stopwatch event to test reaction time
I experimented with it a bit and managed to display a picture at different points on the timeline each time the Timer button was clicked and the timer started. Then, I used JavaScript to record the time difference between when a picture appeared and when the timer was stopped. The timer can only be stopped after the picture appears. Additionally, I set up triggers in Storyline to reset a few variables and object states, allowing the interaction to restart from the beginning with the timer resetting as well.
Result:
Hi Nedim. this is exactly what I am trying to recreate on an ecourse. is there any way you can share the storyline file or at least the javascript for the timer? Thanks in advance
- Nedim8 months agoCommunity Member
Send me an email to mailto:nedim.ramic@gmail.com. I'll send you the .story file.
- KevinPark-7e11d8 months agoCommunity Member
morning Nedim,
I emailed you just now. Thank you for your help. I did attach my storyline that i was working on. It would work but it starts counting the time when start it clicked and not when the picture/sound shows up.
- Nedim8 months agoCommunity Member
Hi Kevin,
I’ve sent you my .story file. I also made some adjustments to your version by adding a few triggers, two additional variables, and custom JavaScript to record the time difference between when the picture appears and when the timer is stopped.
The main script runs when the timeline starts. You can start and stop the timer using the startTimer() and stopTimer() functions, which are triggered by the Start and Stop buttons. The logic for recording the time difference is included within the main script.
Related Content
- 5 months ago
- 5 months ago