Pause button to stop current action delays

goldmundig
goldmundig Community Member Posts: 4
Hi everyone,



my current course features a lot of actions happening on the screen. Every page has audio and sometimes even video. Both are not a problem to control, pause and play buttons works like a charm. My problem is that I just recently really started using action delays to subsequently blend in text captions when needed. This happens a lot over the course but so far I cannot control it. When I click the pause button the audio and video stop and resumes with a click on play but the text continues to blend in. Let´s say I have 10 different text delays on a page, whenever I click the pause button, I want that the following delays to stop and resume when clicking the play button again. I probably have to work with a timer somehow but I don´t really have an idea how that could work. Has anyone done this before?

Any help is greatly appreciated.



Thanks,

Nadja

Comments

  • timk
    timk Community Member Posts: 1,205 ♦ Idol ♦
    You shouldn't use delays for synchronizing actions with audio or video. Use events via the Events tab of the Audio / Video object. The problems you've described will be solved.



    Tim
  • goldmundig
    goldmundig Community Member Posts: 4
    @timk 49538 wrote:
    You shouldn't use delays for synchronizing actions with audio or video. Use events via the Events tab of the Audio / Video object. The problems you've described will be solved.



    Tim


    Hi Tim,



    I don´t have problems with my audio or video. I want to handle (play and pause) text captions that appear with delays.

    The timer obviously starts once a page is called up; if I press a pause button now, I want that timer to stop running which should help me to stop the text captions to appear. Once I resume playing, the remaining text caption should appear according their delay. Do you know if there is a way to stop/resume the timer?



    Thanks.
  • timk
    timk Community Member Posts: 1,205 ♦ Idol ♦
    With events you can use the audio as a timeline to make things happen on your page, e.g. showing captions synchronized with the audio. When the audio / timeline is paused, later events will not be executed until the audio is resumed.



    I don't think it's possible to interrupt delays.



    Tim
  • goldmundig
    goldmundig Community Member Posts: 4
    I´m just thinking that there must be some kind of counter/timer that´s initialized by the program for each page. I guess the simplest solution to my problem would be to know how to access that counter/timer. Does anyone know if there is a system variable that can be accessed? Then I would just simply have to add an action to my play and pause buttons to pause the counter/timer and resume it on clicking play. That would stop my delays from happening to early as the incremention paused.
  • dfleary
    dfleary Community Member Posts: 82 ☆ Roadie ☆
    Tim's response is correct; adding events to an audio/video file will cause everything to pause when the media is paused. Of course, this only works if you have an audio or video on the page.



    Lectora is not "time-line" based so there is not a system variable that "plays" or counts with each page entry. Objects (text blocks, images, etc.) are shown and hidden based on actions, not time. (Except for the "Delay".) However, there are a couple ways you can accomplish what you want to do, if you want to force it to be "player-like":



    1) Create a blank (silent) audio file with synced event placeholders every few seconds. (I created one 90 seconds long to allow for plenty of actions.) Add that file to each page, and sync the appropriate show/hide actions for your text blocks to it at the appropriate times (unique for every page). Auto-start the silent file. Then use your play/pause button to allow student to control things.



    2) Use the new Timer object. Add a timer on the page for each text block. Set each timer as Initially Hidden. For each timer, add actions to:

    - On Done Playing, Show, the appropriate text block

    - On Done Playing, Play, the next timer

    - On Done Playing, Show, the next timer's play/pause button



    Have a play/pause button for each timer. (They can look the same and be in same place so the student won't know the difference.) In this way, if a timer is paused, nothing will happen until they play it again.



    Daryl
  • amwdmw
    amwdmw Community Member Posts: 97
    Was reading your response, DFleary, and found the option with a silent audio interesting - but I am not familiar with "Events". What are events in lectora? How would I indicate an event occuring with an audio file?



    I had a similar problem, but cheated since it was all timed actions (no audio/video) - but this way might be good to have in my back pocket.



    Any help would be appreciated!
  • ssneg
    ssneg Community Member Posts: 1,466 ☆ Roadie ☆
    @amwdmw 50134 wrote:
    I am not familiar with "Events". What are events in lectora? How would I indicate an event occuring with an audio file?


    Launch Lectora, hit F1, search for "Adding events in an audio object", there's a very detailed guide on this topic.
  • goldmundig
    goldmundig Community Member Posts: 4
    @dfleary 49581 wrote:
    Tim's response is correct; adding events to an audio/video file will cause everything to pause when the media is paused. Of course, this only works if you have an audio or video on the page.



    Lectora is not "time-line" based so there is not a system variable that "plays" or counts with each page entry. Objects (text blocks, images, etc.) are shown and hidden based on actions, not time. (Except for the "Delay".) However, there are a couple ways you can accomplish what you want to do, if you want to force it to be "player-like":



    1) Create a blank (silent) audio file with synced event placeholders every few seconds. (I created one 90 seconds long to allow for plenty of actions.) Add that file to each page, and sync the appropriate show/hide actions for your text blocks to it at the appropriate times (unique for every page). Auto-start the silent file. Then use your play/pause button to allow student to control things.



    2) Use the new Timer object. Add a timer on the page for each text block. Set each timer as Initially Hidden. For each timer, add actions to:

    - On Done Playing, Show, the appropriate text block

    - On Done Playing, Play, the next timer

    - On Done Playing, Show, the next timer's play/pause button



    Have a play/pause button for each timer. (They can look the same and be in same place so the student won't know the difference.) In this way, if a timer is paused, nothing will happen until they play it again.



    Daryl




    That´s sounds like an interesting idea. I´m still using Lectora10 for this particular project, so I´m not sure if that can be achieved in it as well. I´m working on a totally different solutions now. I´ve started chopping up my audio in to pieces and I´m using the "on done play" option. That way, when pressed the pause button I just have to look for theu audio that´s currently played. It´s a bit of a time consuming work but hopfully my next projects with Lectora 11 will give me more possibilities.