Forum Discussion
Timing how long an interaction takes.
So my courses have to be timed for credit. I have an interaction which include several slides and pathways. I want to be able to make sure that the participants spend a certain amount of time going through the interaction or repeating the interaction to see different results. Is there a way to make sure an interaction takes a desired amount of time?
- Bernovan-SoestCommunity Member
Steve,
The global functions idea is great.
I've placed my Javascript in a seperate .js file.
It allows you to experiment / test the JS code after publishing. Just alter the code and refresh your browser.
Saves a lot of time compared to publishing after every code change.
And you could edit the code in a JS savvy editor.
You have to alter your story.html file and perform some post-publish copy actions
in the story.html find the place where other JS code is included:
and add your own:
After each publish copy the altered story.html over the newly published one and copy your .js file to the story_content folder.
Have a nice weekend!
- SteveFlowersCommunity Member
All of the trigger JavaScript is saved into a file called user.js. I'll crack this and save tinkers when testing. You're right, publishing every time isn't fun
- Bernovan-SoestCommunity Member
Didn't know that. Great tip!
- RebeccaFleischCCommunity Member
Steve, this is great! Thanks so much. Definitely s/b a verified answer IMHO.
I did change the Set function to when the timeline starts, and put it on the slide master. And the buttons are working. I'm contemplating making a Screenr on this at some point, with your permission, and of course referencing this thread and you, since all I did was copy and paste. But I'm thinking others might like to have this. It's beautiful! So clean. And cool that it will run between slides. Haven't looked at that part yet.
Sam, I haven't had a chance to look at yours yet. Tx for contributing.
Yeah!
- SteveFlowersCommunity Member
Sure, thing Rebecca. I'm not sure how initializing the functions on each slide (declaring, really) will affect the slide to slide timer. Should be OK (since I think it's just declaring the functions) but I haven't tested it. If it mucks up, let me know. I'll make an adjustment that'll help.
- RebeccaFleischCCommunity Member
"...If it mucks up, let me know..." Guess I'd best get my dibs in before SL911 begins . Tx again. Will post here if I ever get to this particular Screenr. Don't hold your breath.
- SheriNelson1Community Member
Hi,
I tried the solution and I noticed the Timer Tics falls behind the Elapsed Seconds. Anyone else had this happen?
Thanks!
Hi Sheri,
This thread is from January 2013 (hard to believe, we're in 2014!) so I'm not certain that they're still subscribed. You may want to try try sending them a PM regarding this specific solution shared, or start a new thread and share your .story file and if you modified any portions of the Javascript.
Greetings, Laura!
I'm not sure if Berno is still subscribed to this discussion, but you could always use the Contact Me button on an ELH users' profile to reach out to them directly about the shared setup.
Wishing you success with your project, and we're here if you need anything else!
- DavidFoster-3a7Community Member
Yet again a historical answer has risen up to correct a current shortcoming of Storyline. I'm so glad this was here! Cross-linked to this thread.