Restricting the "Next" button on Inspire 17

smunafo9558
smunafo9558 Community Member Posts: 2
Hello everyone,

I'm a newbie and this is all new to me, so please be patient.  I've created a presentation with audio and text on each page. I have included events on each page (text and images appearing synced to audio). I  have the speaker icon on the page which pauses all action. I have also set up an event to disable the next button at 0, and then enable it just prior to the audio's completion. All seems to work when I publish to review link. Once the learner selects next, then back, they have to listen to the audio again before the next button appears. I would like the next button to perform two tasks;
  1. Be disabled until the audio is done being played on the page  (Did I use the correct method by syncing the audio to the next button).
  2. Be permanently enabled once audio is complete so that the learner can review previously viewed pages.
Thanks in advance,

Sal

Comments

  • smiller7502
    smiller7502 Community Member Posts: 181
    Welcome, Sal! I hope you find the community as helpful as it has been for me.

    I don't know that there's a "correct" method for disabling a Next button until audio has finished; certainly your method works. Here's what I do, mostly because it's easier to see what's happening in the Title Explorer this way:
    • Set an On Show > Set State action on the page to set the button state to Disabled.
    • Set an On Done Playing > Set State action on the audio to set the button state to Enabled.
     To allow the button to be enabled without waiting through the audio if the user returns to the page, here's what I would do:
    1. Create a variable called something like "Pg2AudioDone", initial value False, retain value between sessions.
    2. Add an On Done Playing > Modify Variable action on the audio to set the variable to True.
    3. Add a condition on the On Show > Set State action I mentioned above so that it disables the button only if the variable is False.
    Hope that helps!
  • timk
    timk Community Member Posts: 1,197 ♦ Idol ♦
    Hi Sal,

    welcome to the community.

    Using events is a good way to run actions synched with the audio, although for your purpose I'd advise to use another way (only with regard to the Next button).

    To disable the next button when the page is loaded, add an action to the page:

    On: Show
    Action: Set state
    Target: Next
    State: Disable

    To enable the button you can add an action to the audio object:

    On: Done playing
    Action: Set state
    Target: Next
    State: Enable

    Now you need something to remember whether the audio has been completed before: a variable.

    Add a second action to the audio object:

    On: Done playing
    Action: Modify variable

    Target: New variable... (Give the variable a name e.g. "audio_done", initial value "0") (use only the text no quotes) Click OK and the target field will be updated to contain the newly created variable.

    Target: audio_done
    Type: Set equal to
    Value: 1

    By using the variable you'll know whether the audio has been completed, as audio_done will be 1 if the audio has been "Done playing". It will be 0 if not. Variable values are saved throughout the session, so it will still be 1 if the user returns to the page.

    Go back to the action on page level that disables the next button. Click on "Always" in the "Conditions" group to open the conditions panel.

    Select "audio_done" from the left menu "Variable".
    Select "Equal to" from the "Relationship" menu.
    Enter 0 into the Value field

    By adding the condition the next button will only be disabled if the variable value is equal to "0" and as it will be equal to "1" if the audio has been Done playing the button won't be disabled.
  • smunafo9558
    smunafo9558 Community Member Posts: 2
    Thank you very much, I'm just starting to get used to variables.