No announcement yet.

Help with listbox and mp3 player

  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with listbox and mp3 player

    Basically I click on 1st album cover on the front page it jumps to 1st page with playlist1 which loads the tracks to play
    when the page shows.
    The Ams mp3 player on song end event moves to the next track and plays it and so on 'till all tracks have played in listbox1.
    If I jump to say page 4 listbox4 will load with different tracks for that page,so far so good.
    The problem...the Ams mp3 player is looking for listbox1 to continue on to next track but comes up error because listbox4 is loaded,so it cant continue and plays the same track again.
    Is there a way for the player to recognise when a different listbox has loaded without having to go into mp3 player properties and manually change action properties on song end from the listbox that was loaded to the new listbox.
    Hope I've explained my prob and any help or advice always appreciated. Is there a better way of achieving what I'm trying to do??

  • #2
    Re: Help with listbox and mp3 player

    Would I be able to put all my albums into one playlist then select the tracks to load when a certain page opens? Eg page one shows, loads the selected tracks from the playlist and plays them. When page two shows it loads the next selected tracks and plays them, and so on, so each page has an album on it from the one playlist. Would the mp3 player recognise that only some of the tracks from the playlist has been selected to play on the page? If possible, plz plz plz help I'm ready to pack project in.


    • #3
      Re: Help with listbox and mp3 player

      I can use the same numbered listbox for each page eg listbox1 with the tracks from album 1 on page one, listbox1 with the tracks from album 2 on page two and so on, so the mp3 player will always play the tracks one after the other just on that page and I don't have to change listbox numbers in mp3 properties for each page...Am I right? I hope so. Let me know plz


      • #4
        Re: Help with listbox and mp3 player

        Did you check the knowledgebase about mp3 playlists?
        It might give you some ideas how to resolve your issue.


        • #5
          Re: Help with listbox and mp3 player

          This got me thinking. You should be able to load the songs from a play list (.m3u). In looking at the file, it appears to be a text file with one song per line in the file. You could count the number of lines in the .m3u and then read each line into a list box when it is selected. You will probably want to do some parsing first so you can correctly store the information into the listbox with the data.

          Grab the line 0 from the file and save it to a variable %FilenameWExt%
          Then you parse that variable so you only have the song title and save that to a variable %Filename%.
          Then you add a line to your list box where you enter the data as %Filename%::%SrcDir%/%FilenameWExt%
          Then you move on to the next line.

          You may want to have it clear the list box when you select a new album so you don't end up with duplicate entries. If the %Filename% is not the actual song name you may want to use the MP3.Property function to look up the title from the ID3 info tag and use that as the item listed in the list box.

          I hope that helps.
          "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
          "Draco dormiens nunquam titillandus."
          Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine


          • #6
            Re: Help with listbox and mp3 player

            Thanks for the replies guys got my project up and running.

            Used your idea TJ and it all came together...Cheers:-)