Announcement

Collapse
No announcement yet.

stopping an MP3 at a certain time

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • stopping an MP3 at a certain time

    I'd like to have an MP3 stop playing at a specified time. I know that I will need to use a get progress variable to find the time and then set the player to stop when it gets to the right time.

    However I'm a little unclear on where I would set APM to look for the progress of the MP3. I think i would put it on the same button that starts playing the MP3 and create a loop to make it keep checking but I'm not really sure how I would do this.
    Any help would be super-duper appreciated.

  • #2
    Re: stopping an MP3 at a certain time

    MP3 in the MP3 Objects On Progress event.

    Comment


    • #3
      Re: stopping an MP3 at a certain time

      crap i didn't even think about looking at the mp3 player properties. thanks

      Comment


      • #4
        Re: stopping an MP3 at a certain time

        Sorry, meant to say check the Progress in the MP3 Objects On Progress event.

        Comment


        • #5
          Re: stopping an MP3 at a certain time

          no worries. I figured it out.

          Comment


          • #6
            Re: stopping an MP3 at a certain time

            on this same topic. I'm having a little trouble stoping and starting the mp3 at the right time. When the stop button is clicked it sets the progress variable. However it does this in the hh:mm:ss format whereas the seek function only recognizes seconds. Is there a simple expression i can use to reformat the variable to seconds?

            Comment


            • #7
              Re: stopping an MP3 at a certain time

              I don't know about simple, but something like this maybe:

              %Hours% = String.GetDelimitedString ("%Progress%", "::", 0)
              %Hours% = Evaluate (%Hour% * 3600)
              %Minutes% = String.GetDelimitedString ("%Progress%", "::", 1)
              %Minutes% = Evaluate (%Minutes% * 60)
              %Seconds% = String.GetDelimitedString ("%Progress%", "::", 2)
              %Seconds% = Evaluate (%Seconds% + %Minutes% + %Hours%)

              Comment


              • #8
                Re: stopping an MP3 at a certain time

                worked great after adding a -1 (i guess ittakes a second to stop the mp3 somewhere internally.) Thanks for the help. I hadn't really used strings before but that was well explained.

                Comment

                Working...
                X