Highlighted

Play/Pause buttons with memory

New Here ,
May 19, 2020

Copy link to clipboard

Copied

Alright last one (hopefully), this time I'm looking for some advice on how to handle play/pause buttons:

 

The goal is to have some slides act as a slideshow that the user can pause and click through manually with back and forth buttons, otherwise, it will play automatically.

 

My idea was to have a set of four buttons, the back and forth buttons being a simple, go to previous/next slide. For the pause/play buttons I tried a simple Pause and Continue action. With the problem that if I pause on slide A and jump to slide B with the next button, the system will not remember that it's supposed to be paused and continue playing. So I tried using the system variable cpCmndPause with a toggle between 1 and 0. However, this doesn't seem to do anything.

 

There must be a simple way to do this, I just can't find anything.

Most Valuable Participant
Correct answer by Lilybiri | Most Valuable Participant

Play/Pause button is a lot more complicated than Back and Next. Have a look at this possible workflow. you can read the post or watch the interactive video:

http://blog.lilybiri.com/custom-play-slash-pause-button-version-cp2019

Views

88

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Play/Pause buttons with memory

New Here ,
May 19, 2020

Copy link to clipboard

Copied

Alright last one (hopefully), this time I'm looking for some advice on how to handle play/pause buttons:

 

The goal is to have some slides act as a slideshow that the user can pause and click through manually with back and forth buttons, otherwise, it will play automatically.

 

My idea was to have a set of four buttons, the back and forth buttons being a simple, go to previous/next slide. For the pause/play buttons I tried a simple Pause and Continue action. With the problem that if I pause on slide A and jump to slide B with the next button, the system will not remember that it's supposed to be paused and continue playing. So I tried using the system variable cpCmndPause with a toggle between 1 and 0. However, this doesn't seem to do anything.

 

There must be a simple way to do this, I just can't find anything.

Most Valuable Participant
Correct answer by Lilybiri | Most Valuable Participant

Play/Pause button is a lot more complicated than Back and Next. Have a look at this possible workflow. you can read the post or watch the interactive video:

http://blog.lilybiri.com/custom-play-slash-pause-button-version-cp2019

Views

89

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 19, 2020 0
Most Valuable Participant ,
May 19, 2020

Copy link to clipboard

Copied

Play/Pause button is a lot more complicated than Back and Next. Have a look at this possible workflow. you can read the post or watch the interactive video:

http://blog.lilybiri.com/custom-play-slash-pause-button-version-cp2019

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 19, 2020 0
New Here ,
May 20, 2020

Copy link to clipboard

Copied

Thanks I did have something very similar.

 

From your guide:

"In that situation I will use the command ‘Pause’ (‘Pause’ is exactly the same as ‘Assign cpCmndPause with 1) and change the state of the button SB_PausePlay to the Play state."

 

I tried Assign cpCmndPause = 1 before with no success, however, I did get it to work with the simple "Pause" "Continue" in an onLoad script.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 20, 2020 0
Most Valuable Participant ,
May 20, 2020

Copy link to clipboard

Copied

You have to see the context, it is exactly the same but will not work if you do not test the status of that system varaible.  You cannot solve this with a simple action, you need a conditional action all the time.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 20, 2020 0
hdwP LATEST
New Here ,
May 20, 2020

Copy link to clipboard

Copied

Well of course, that's what I had from the beginning. But chacking just for the system variable and reassigning it worked for displaying my play/pause button respectively but did nothing for playing/pausing the training. Now it does work, even if it's supposedly the same thing.

 

Either way I am happy it works now. Thanks for your help!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 20, 2020 0