Audio.Play Action - two clicks to start file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • CraigS
    Indigo Rose Customer
    • Apr 2005
    • 26

    Audio.Play Action - two clicks to start file

    I'm brand new to AMS and using the trial version. I'm having an issue with starting an audio file by clicking on a button. It takes two clicks to start the file playing.

    Have set these button actions:
    1 Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\The Woods (short).ogg", false, false);
    2 Audio.Play(CHANNEL_NARRATION);
    3 Audio.ToggleMute(CHANNEL_NARRATION);

    It works fine except that when Previewing, the first time the page is opened and the button is clicked it doesn't play the file. It takes a second click to start the audio file.

    Click again (the third click) and the file stops playing (as it should).
    Click again (fourth click) and the file plays - without having to click the button twice to get it started like the first time the button is clicked.

    After this it continues to behave properly, one click to start playing.

    It's as if the Audio.Load doesn't load the file until the second click. Then, once loaded, it works as it should, including when I go to another page and then return to the audio page...the button works on the first click.

    When I leave Preview and then open Preview again the problem returns and it takes 2 clicks to get the audio file to play the first time.

    Thank you!
    CraigS
  • rhosk
    Indigo Rose Customer
    • Aug 2003
    • 1698

    #2
    Try putting a sleep action in between 1 & 2 (say (500)). It may be that the actions are just happening too fast before the next action initiates.
    Regards,

    -Ron

    Music | Video | Pictures

    Comment

    • Ted Sullivan
      Indigo Rose Staff Member
      • Oct 2003
      • 963

      #3
      Why are you using the Audio.ToggleMute(CHANNEL_NARRATION); action?

      My guess is that it doesn't work the first time because you've muted the volume. The second click unmutes it.
      New Release: Setup Factory 9.6 adds Windows 11 compatibility and support for hardware token OV/EV Code Signing certificates.

      Comment

      • CraigS
        Indigo Rose Customer
        • Apr 2005
        • 26

        #4
        Thank you

        Rhosk and Ted...thank you for your help. I'm very pleased to learn that there is so much help from the forum. I'll be purchasing AMS soon to start putting together a textbook on CD, written by my wife. This product will be the first of many that we have in mind for her business. One project will be using video. Instead of having avideo playing at length on a DVD, I think I will use AMS to play the video in clips, with her narration and text to describe what is happening in each clip. This should be very user friendly, easy to go back and see the clip again, absorbing the learnings from the text and narration. I can also break up the video into logically named chapters and sections.

        I'm looking forward to learning and reaching the point where I can offer help to others also!

        I solved my problem using TogglePlay. Seems like I had previously used it and it didn't work. But now it does, so Great!
        How come ToggleMute doesn't work? It's described as "turning sound on or off".
        Thanks again. I'm looking forward to this learning curve. AMS is fun to use.
        craig

        Comment

        Working...
        X