Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #279723 Score: 0
    Profile photo of ecunia
    ecunia
    Member
    beginner
    intermediate
    @ecunia

    I want to create a button that allows the user to “replay” a page, i.e. the audio is reset and plays again. What attribute to I give to the button? thanks in advance.

    #284465 Score: 0
    Profile photo of
    Anonymous @

    @davids 40414 wrote:

    What I have found works for me is to create a page in a separate chapter. The only thing on this page is an action for On: Show, Go To: Back. Then, whenever this page is accessed, it immediately goes back to the previous page that the learner was viewing.

    To make this work, on your Replay button you would Go To the ‘replay’ page. The user clicks the button, the ‘replay’ page is accessed, and the replay page automatically goes back to the previous page which is the one that you wanted to restart from the beginning. This all happens in less than a second depending on the size of your page, network speed, etc..

    Note that if you have any variables or form objects on the page that you want reset as well, then on the page with these elements you will want to have actions to reset these variables/objects when the page is shown.

    This is a very easy solution to reset all of your show/hides, animations, etc., at once.

    If, however, you only want to restart the audio and nothing else, then you could either display the audio controller which has a Play button built in. Or, build your own play button with the action to Play the file. (If necessary, put a Stop action before the Play action as this will in essence rewind the audio to the beginning.)

    I have found that while this works for the preview mode in Lectora, it does not work for IE. I am having this issue as well and have not found a resolution to this issue. I am not strong at coding so I was hoping to find an easier method.

    #284464 Score: 0
    Profile photo of Ben Pitman
    Ben Pitman
    Member
    4 pts
    @benpitman

    I have not tried this but you should be able to put two actions on the button. Stop and Play. You might have to put a .5 sec delay on the play. Preview in Browser.

    #350323 Score: 0
    Profile photo of switalba Switalski
    switalba Switalski
    Member
    beginner
    intermediate
    advanced
    contributor
    profile
    picture perfect
    Group Member
    curious george
    wise owl
    friend finder
    2 pts
    @switalba

    This worked great. A new trick, quick and simple.  Thanks!

    #398580 Score: 0
    Profile photo of Dennis Peteranderl
    Dennis Peteranderl
    Member
    beginner
    intermediate
    friend finder
    wise owl
    profile
    contributor
    curious george
    @dpeteranderl9908

    However, for this solution you have to put one replay button on each page and have to link it the “stop” and “play” actions to the audiofile on each page. Isn’t there a way to create a global replay button?

    #398793 Score: 1
    Profile photo of Jason Dalrymple
    Jason Dalrymple
    Member
    beginner
    intermediate
    profile
    wise owl
    curious george
    contributor
    friend finder
    advanced
    picture perfect
    45 pts
    @JasonADal

    If you’re looking for just the audio to replay, here’s a way to do it without having to reload the entire page. The buttons can be placed at the title level, chapter level, etc. You will have to remember to add the class to the audio file in the Properties -> Appearance for the file.

    I also added a button that will reload the page instead of a “Go To” for a replay page. This button uses the JavaScript function

    location.reload();

     

    This post has received 1 vote up.
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.