Skip to main content
Known Participant
December 29, 2015
Answered

How to unmute based on smart shape button visible

  • December 29, 2015
  • 1 reply
  • 445 views


Hi,

I have a project with mute and unmute buttons across a project. The buttons (smart shapes) are shared across the project and seem to be working fine (if mute is active, the unmute button is visible and enabled).

The issue is that we have embedded video that we want the user to see and hear. If the user has audio turned off, I can make the audio to play on the video slide by executing an advanced action (assign cpCmndMute with 0). Now when the video is done, we want the original state to be set (if they were on mute before the video, we want to have the mute reinstated).

Right now we have the "unmute" button (the instance name in properties) visible so we are looking to see if this is possible:

If the "unmute" button is visble (it is on the stage behind the video - meaning that the volume was turned off in the previous slide), then can we set cpCmndMute with 1 (meaning we are back in a mute mode) at the end of the slide?

Is this possible with using conditional actions?

Thanks.

This topic has been closed for replies.
Correct answer Lilybiri

You are probably aware of the fact that you need an event to trigger an action. Is it correct that you'll use the On Enter event of the next slide?

Since cpCmndMute is a system variable of the Movie Control category, I would add a user variable to track if the user had set it to be muted. I suppose you have two shape buttons, will label them for the moment SB_Mute and SB_Unmute. The default situation is that cpCmndMute set to 0. Create a user variable v_mute with a default value of 0. Add this command to the actions triggered by the shape buttons, but NOT to the action that unmutes for the video slide (hope this is clear?):

   Assign v_mute with cpCmndMute

For the On enter action on the slide following the video slide, you'll need a conditional advanced action:

  IF v_mute is equal to 1

      Assign cpCmndMute with 0
      Assign v_mute with cpCmndMute

     Disable SB_Unmute

     Hide SB_Unmute

     Show SB_Mute

     Enable SB_Mute

ELSE

     Assign cpCmndMute with 1
      Assign v_mute with cpCmndMute

     Disable SB_Mute

     Hide SB_Mute

     Show SB_Unmute

     Enable SB_Unmute

This would restore the situation from the slide before the video slide.

1 reply

Lilybiri
LilybiriCorrect answer
Legend
December 29, 2015

You are probably aware of the fact that you need an event to trigger an action. Is it correct that you'll use the On Enter event of the next slide?

Since cpCmndMute is a system variable of the Movie Control category, I would add a user variable to track if the user had set it to be muted. I suppose you have two shape buttons, will label them for the moment SB_Mute and SB_Unmute. The default situation is that cpCmndMute set to 0. Create a user variable v_mute with a default value of 0. Add this command to the actions triggered by the shape buttons, but NOT to the action that unmutes for the video slide (hope this is clear?):

   Assign v_mute with cpCmndMute

For the On enter action on the slide following the video slide, you'll need a conditional advanced action:

  IF v_mute is equal to 1

      Assign cpCmndMute with 0
      Assign v_mute with cpCmndMute

     Disable SB_Unmute

     Hide SB_Unmute

     Show SB_Mute

     Enable SB_Mute

ELSE

     Assign cpCmndMute with 1
      Assign v_mute with cpCmndMute

     Disable SB_Mute

     Hide SB_Mute

     Show SB_Unmute

     Enable SB_Unmute

This would restore the situation from the slide before the video slide.

Known Participant
December 29, 2015

Hello there,

Thaks for the information.

For the actions, could this be placed on the "on exit" of the video slide and not "on enter" of the next slide? Is it better to run this on the next slide?

Thank you!