Copy link to clipboard
Copied
Hi there, I'm having trouble with my Pause/Play button and wondered if anyone has a solution? I've built it with a conditional advanced action: If cpCmndPause is equal to 0, Pause and Change State of PausePlay5 to Play (and resetting this in the Else action). Sometimes this button works perfectly, activating the first time it's clicked, and other times this button requires two clicks before it will work. When I test on mobile, the button sometimes does not work at all. Any advice on settings to change/check?
Due to this dumb new platform all images are very tiny, it is very difficult to see details on your screenshot. However I do see that you didn't take out the pausing point of the Play/Pause button. Missed it in the blog?
Moreover my blog was for a non-responsive project.
Copy link to clipboard
Copied
I suspect a logical flaw in your script, but you didn't insert is as screenshot.
Did you see this blog post:
http://blog.lilybiri.com/custom-play-slash-pause-button-version-cp2019
Or if you prefer an interactive video:
Beware: some items are not paused ... have a look at:
Copy link to clipboard
Copied
Hi Lilybiri, thanks for your comment. I did base this on your blog post. Are you aware of any reason why the button may not respond to an initial click, or not respond at all on mobile? Here is a screenshot of my responsive project:
Copy link to clipboard
Copied
Due to this dumb new platform all images are very tiny, it is very difficult to see details on your screenshot. However I do see that you didn't take out the pausing point of the Play/Pause button. Missed it in the blog?
Moreover my blog was for a non-responsive project.
Copy link to clipboard
Copied
Hi Lilybiri, thanks for your help, I've been experimenting with removing the pausing point and so far it looks like that will work. I must have missed that part of your blog. Thanks again!
Copy link to clipboard
Copied
You're welcome. Do not forget my warning about fluid boxes! I was able to have an object timed for the rest of the project (maybe need to post that trick) by using always the same master slide with a dedicated fluid box for that object.
Copy link to clipboard
Copied
The issue you are most likely running in to is that the value of cpCmndPause does not aleways change depending on how the lesson was paused, whether it's because of an intraction pause point, end of slide, or if you uncheck continue playing project on a simple action.
I always use external JavaScript and crate a new variable call isPaused. There are events for (CPAPI_MOVIEPAUSE) for determining how the slide was paused and you can set your variable and change the state of your object accordingly.
I think that technically the cpCmndPause is a command, not really a variable, although it can act like one and is listed under variables.
Copy link to clipboard
Copied
David, most system variables in Captivate are read only and act as real variables, and they are read only. The only exception is the category 'Movie control' where you can edit (often toggle a Boolean) the value of a variable, and that way have something happen. Soem boolean variables like cpCmndMute, cpCmndCC... are easy to understand. But the cpCmndPause and its opposite cpCmndResume are bit more complicated.
I pointed to the blogs I wrote about using them for a custom Play/Pause button, but it cannot be used togehter with the play/pause button on the default playbar, it has to be a replacement.
The pausing point of an interactive object or a slide has a different functionality than the Pause command. Example: it will pause an effect, but not an animation, will never pause audio which is slide audio.... For that reason I pointed to the blog about pausing the timeline, because a lot of users are not aware of the difference between a a pausing point and the Pause button.
Copy link to clipboard
Copied
I have found that Captivate is unreliable when images are used as a button to initiate pause. This method is easy, bullet proof, and carries the side benefit of pausing audio and timeline.
Need to Create: One 2 state image, one Click box, one user variable
Create an image with 2 states: Normal (shows Pause icon) and PlayResume (shows Play icon)
REMOVE the states Rollover and Down from the set of states using the special Trashcan on States.
I couple that with a Click Box, with on successs Execute Advanced Actions (see below) and copy as a group to slides that need it. (The group retains association, so no need to edit every slide.)
Create a user variable, such as PauseGo
Set value to 0
On a slide before the variable is used, set slide "on entry" action to "Assign" <yourVariable> with 0
(That may not be necessary, but uninitialized variables are the source of MANY bugs...)
Conditional action
If any of the conditions true
PauseGo = 0
Actions
Change state of Imagexxxx to PlayResume
Toggle PauseGo
Pause
Else
Change state of Imagexxxx to Normal
Toggle PauseGo
Continue