• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Play/Pause buttons with memory

Community Beginner ,
May 19, 2020 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.

Views

306

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
community guidelines

correct answers 1 Correct answer

Community Expert , May 19, 2020 May 19, 2020

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

Votes

Translate

Translate
Community Expert ,
May 19, 2020 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

Votes

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
community guidelines
Community Beginner ,
May 20, 2020 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.

Votes

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
community guidelines
Community Expert ,
May 20, 2020 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.

Votes

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
community guidelines
Community Beginner ,
May 20, 2020 May 20, 2020

Copy link to clipboard

Copied

LATEST

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!

Votes

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
community guidelines
Resources
Help resources