Adding 'pause' function

Greeting to all! I'm trying to setup a 'pause' feature in my course that allows users to press the spacebar key to pause the timeline, and simply press the spacebar again to resume their place within the timeline. These are the steps that I followed:

  1. Create a new layer called 'Paused Layer'. I did select the "Pause the timeline of the base layer" in the layer properties.
  2. I added a trigger that shows the 'Paused Layer' layer when the user presses the spacebar.
  3. I then added another trigger to 'Paused Layer' that hides the layer when the user presses the spacebar. 

After doing this, it doesn't seem to work. I'm able to pause the timeline and get to the 'Paused Layer' (steps 1-2), but when clicking the space bar again to resume (step 3) nothing happens. The timeline remains paused and I remain on the layer 'Paused Layer'. Any idea what I'm doing wrong here?

4 Replies
Ned Whiteley

Hi Rassiel,

I am sure there maybe a neater way to do this, but the solution I have come up with does at least work.

What I have done is to create a variable called Pause, which is initially set to False. When the Space Bar is pressed, the Pause Layer is displayed and the Pause variable changes to True. At the same time, the timeline on the base layer is paused.

When the Space Bar is pressed again, the Pause Layer is hidden and the timeline on the base layer is resumed if the Pause variable is set to True.

You will see that there is a small blue box just off the bottom left of the slide. This has an animation that follows a very short straight line motion path every 0.25 seconds. The purpose of this is to enable the Pause variable to be reset to False whenever the animation completes. This will occur within 0.25 seconds once the timeline has been resumed. This then enables the whole process to be repeated.

The yellow bouncing ball is simply there to show that the timeline has been paused and then resumed. I have also left the Pause variable at the bottom of the slide so that you can see when it changes. This should be removed in your slide as it is only for testing purposes.

Hope this helps.

Ned Whiteley

Hi Rassiel,

I agree with Michael. I left your Pause layer in because I thought you wanted to display additional information when the user paused the timeline. However, if you don't wish to do so, there is no need to have a Pause layer as it serves no purpose at all. The end result is much neater without it.