Copy link to clipboard
Copied
Details:
I created a timed game in Captivate. Its a timed trial, essentially.
A "set start" action is set as the "on exit" action of a slide.
A "set end" action is set on clicking of a later slide. On the same slide, the action of "final result" is set "on exit" of the slide. If it took the learner <10 minutes, they are taken to slide X, between 10-12:59, slide Y, and >13, slide Z.
What happens - I am taken to the correct slide based on how long it took me to complete the game, but I also have variables listed on the slide to display the learner's final time (in minutes and seconds) and yet nothing displays. This file was upgrade from CP6 > CP8...could that be the problem? Do I have to rebuild the variables/actions? Any help would be much appreciated.
Copy link to clipboard
Copied
On exit event is not a good choice for any action. Just a comment.
If you want help, please most some screen shots of the advanced actions. Upgrading can cause issues indeed. Do you track the variables while debugging?
Copy link to clipboard
Copied
Thanks for responding. Here's the screenshot of the set start on exit. It worked like a charm in the previous version, but is the new version buggy w/"on exit"?
Here is the set end action:
And then here is the expression on the slide their final time should display.
Also, I don't kow what debugging means with relation to upgrading to CP8 - so I likely didn't do that. Any pointers there?
Copy link to clipboard
Copied
Where is the calculation of v_min, v_sec ? I don't see that in your advanced actions at all. Something like I described here:
Display Time information - Captivate blog
On which slide is Animation_7?
On Exit has never been a trustworthy event, it is executed really after the last frame of the slide, which means on the first frame of the next slide. If the last frame of a slide is not visited (which happens often when you have a navigation button, or the user clicks on the Next button on the playbar), that action will never be executed.
Copy link to clipboard
Copied
It's the expression line of the set end action - is that built incorrectly? I am very shakey w/my expressions and actions, so I don't fully understand it all.
Copy link to clipboard
Copied
That will give you the time elapsed....in milliseconds. Did you look at my blog post, you'll find the necessary calculations there.
Copy link to clipboard
Copied
Thanks for spending time helping me with this - it does give it to me in milliseconds, but then the conditional action I have set up on each page divides the time appropriately to show in minutes and seconds. In reading your page, it seems like those are the lengths of the presentation, rather than the time it took for certain slides - Again, I barely understand this stuff so I'm kind of hanging on by a thread. Would you be willing to chat offline to talk me through it?
Copy link to clipboard
Copied
I am not working for Adobe, just trying to help you in my free time.
Which event is triggering that 'conditional' action? You already talked about an On Enter and an On Exit event, which are you using to calculate the time in seconds and minutes? Can you post a screenshot of that action, because I don't understand why it should be 'conditional' at all? It has to be triggered after the calculation of v_comprehensive_total, should best be done in the same action.
BTW: in that blog post I show both the editor's and the real time, and explained the difference between them.
Copy link to clipboard
Copied
I know you don't work for Adobe, and I do appreciate the help. I found the slide that has the equations you were asking about before. Here's an image of the build. I am in the process of re-building all of the variables and advanced actions to see if this solves my problem. If you have any other words of wisdom or are open to helping me troubleshoot when something inevitably goes wrong, I would appreciate it.
Copy link to clipboard
Copied
This is JS, I solved it with advanced actions, am not that proficient with JS. Do you know where this script is originated? Because with CP8 JS API has changed. Which event is triggering this script? It looks like a button somewhere?
Copy link to clipboard
Copied
Unfortunately, I don't know where the script originated from. A co-worker of mine, who no longer works here, built in all of the script stuff - and that's why I'm struggling to pick up where she left off w/CP8. I didn't know that the API changed w/8 - so that might be the root of my problem. It is an action affiliated w/a click box. Even after rebuilding all the variables and actions, this stuff isn't working for me.
Copy link to clipboard
Copied
Why don't you try my solution by including that calculation in the Advanced action itself as I show in the blog post I was referring to?
It would mean too much time for me to find out what is wrong with that script, maybe someone else, a JS expert will pop in. If you look at this page: Common JS interface you see that the function to get a variable from Captivate is now 'getVariableValue' and to return it 'setVariableValue'. That means indeed that your script was created for an older version.