i'm a novice programmer new to rev. I want to create an audio file player that functions as a playlist where once one audio file has ended the next one plays.
I do not know how to make the player wait until the file has finished before starting the next one. I know about the playstopped message but do not know how to implement it...meaning I can have the player "wait x seconds with messages" (which is inadequate because the audio files are all different durations), but i cannot seem to have the player "wait until playstopped then play next audiofile" (it never plays the next file).
here's my code for the "play" button:
Code: Select all
on mouseUp
//audio files are already loaded into a table field. I want to cycle through the files in that field and play the entire file
repeat for each line tFile in filteredFiles()
if the filename of player 1 is " " then exit mouseUp
set the filename of player 1 to tFile
start player 1
//is it possible to use a "wait until" line here? it has not worked for me.
wait 2 seconds with messages
end repeat
end mouseUp