Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2003
    Posts
    51

    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. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959

    Re: stopping an MP3 at a certain time

    MP3 in the MP3 Objects On Progress event.

  3. #3
    Join Date
    Jun 2003
    Posts
    51

    Re: stopping an MP3 at a certain time

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

  4. #4
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959

    Re: stopping an MP3 at a certain time

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

  5. #5
    Join Date
    Jun 2003
    Posts
    51

    Re: stopping an MP3 at a certain time

    no worries. I figured it out.

  6. #6
    Join Date
    Jun 2003
    Posts
    51

    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?

  7. #7
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959

    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%)

  8. #8
    Join Date
    Jun 2003
    Posts
    51

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts