Pause/Play button question?

May 03, 2012

I'm full of questions today.

Does anyone have the code to add to a button to make it emulate the Play/Pause button in Articulate.

I have been able to stop the audio, but would like to make a universal button that would stop and start the entire timeline.

42 Replies
Steve Flowers

Hi David, 

This is pretty easy. Take a look at this story file and this demo of the same story file.

This leverages a flagged property of a layer that "pauses the base layer when shown". In this case I setup a variable listener on the master slide which shows a layer whenever a variable is set to a specific value.

You can do this a bit more simply using a layer on your slide (open up your layer properties to find the "pause" checkbox) and controlling that layer with a trigger.

Steve Flowers

And this is a better illustration of the "Master Variable Listener" I referred to above:

This one is two slides. On the first, it shows how the master slide controls the base timeline. On the second, stuff is on the master and the base slide. The second one illustrates how they are in sync and both control the pause / play.

Paul Zamora

Very Lectora-esque, same coding.  I'll have to crack them open and see how many I can cross-use.  I saw your above post but was hoping for a single timeline trigger (start/stop)
Have you tried the Captivate controls yet from

this guy is a genius.

Thank you for your reply!


Hollie White

I got the play/pause to work on the mast slide and it's awesome! I did run into one problem though and wanted to know if anyone has found the solution to it yet...

I have a slide where I have audio on the timeline. Play/pause works perfectly fine.

One that same slide, I have multiple buttons that each show it's own layer. On each layer is an audio file as well. On each button it's triggered not only to show the layer, but to also pause the audio on the main timeline of the slide. Then the audio files will not overlap.

The problem is that the play/pause does not work for the audio on each of the layers. Does anyone know how to fix it that the play/pause on the master also work for audio on layers?

David Anderson

Hi Hollie - 

When you say the play/pause isn't working, what specifically isn't working?

Sometimes audio clips have extended silence to them that causes them to silently play which can appear as if the buttons aren't working.

Another thing to look at is how you set up your slide layer properties. Is it set to Automatically decide? resume? reset?

Hollie White

@David - I have it set to automatically decide in both instances. I played around with them but am not seeing any difference in  the setting being changed. Do you know which is best?

Specifically the audio isn't pausing on the layer. The "PauseLayer" does show (meaning it toggles my buttons. So it's just the audio.

@Steve - Thanks for the clarification. I don't want to hide the layer because there is content on it as well as the audio. I will try possibly putting the audio on a separate layer as the content and see what I can come up with there.

If anyone comes up with a good solution let me know!

Hollie White

Unfortunately the example I have is not allowed to be shown because it's for a client. (If I wasn't able to get it working I would have taken away the logos and actual text.

But I found a work around. If it's not explained good enough and I need to attach a file, I can for those who need it....

In my layer I added a new pause button in the same location as the pause button in my master (so it looks seamless). On click of the pause button I have 2 triggers. 1) Pauses the media on click 2) changes state of button to hidden.

On the timeline I also have my play button underneath my pause button. So when the pause button is hidden the play button shows. The play button also has two triggers. 1) play media on click 2) change state of pause button to normal.

This all works great and when the layers are hidden, then the play/pause buttons from my master work as needed.

Mark Kizilos

These examples look great, but for some reason when I download and run the story file, they don't work. Clicking on pause restarts the timeline, as does clicking on play....

In fact, I see some strange behavior. namely, While I can see the image of the buttons for pause and play on the main slide, there are no buttons in the trigger list. And, I can't click on the buttons in the slide workspace. 

Not sure if anyone else is having this problem. I want to show the seekbar and pause the timeline progression of a layer. Not sure if this will enable me to do that. If not, then I will need to create a progress bar of my own... I only really want the pause and the progress bar functionality of the seekbard.

Steve Flowers

Hi, Toni - 

Are you playing the audio within the iOS player or within the browser as HTML5? In either case, I've gotten into the habit of spacing my audio away from the very start of the timeline. I usually provide a half a second of space before starting audio gives me more reliable results than butting the audio against the start of the timeline.

Toni Lampros

I am viewing with HTML5 through Safari - this course will ultimately be viewed through an LMS so I can not use the mobile app. I will try to move the audio in a few seconds on the timeline - is the theory behind this that you are allowing the audio a few seconds to load so if the timeline is paused the audio will already have loaded for that slide?

Randall Sauchuck

I have found that the Slide Layers cause too many problems when it comes to HTML5 audio and syncing. If I absolutely MUST have an interactiion where slide layers are supposed to contain audio I do the following. (This is ONLY for course that I know will be delivered as HTML5)

First I make sure the links (buttons,hotspots etc) to show the "slide layers" are only active AFTER any media on the main timeline is complete. There are too many issues with the media not resuming at the correct place to do it otherwise.

Then I create a new scene and build new slides that have the appearance of the old slide (the "launch" slide) with the content that would have been on the slide layer showing. I make one slide for each of the slide layers I would have used.

Closing this fake slide layer sends the user to a copy of the "launch" slide that shows it as it appeared in its final state. This prevents the user from having to sit through the entire "launch" slide again. The user can open any other fake slide layer slides from here and will be returned to this slide when the user closes each of them.

I make sure the Prev and Next buttons for all these slides point to the slides that would have been accessed from original "launch" slide.  So it my launch slide was slide 7 then all the fake slide layer slides will have the Prev button set to slide 6 and the Next set to slide 8.

This is a PAIN to maintain but it is the only way I have found to get consistent behavior out of the SL player when it comes to "slide layers" or "pop ups" or "dialog boxes" that contain audio when you want to use HTML5.

Sherri Sagers

I'm having trouble getting the above solution to work with slides that are showing screen recordings. I tried adding a pause/play button to the master layouts using the "listener" variables, but when I change the screen recording slide's layout, none of the controls will show up when I play the presentation.

Does anyone know if there's an issue adding this play/pause button solution to screen recording slides?

This discussion is closed. You can start a new discussion or contact Articulate Support.