Code: Select all
on mouseUp
answer folder "Choose the folder containing the sound files?"
if the result is not cancel then
set the cSoundFilesFolder of this card to it
set the defaultFolder to it
put the files into tFiles
put return before line 1 of field "playlist"
put the files into line 1 of field "playlist"
filter lines of field "playlist" with regex pattern "(?i)\.(wav|aif|wmv|mp3|wma)$"
put the longFilePath of tFiles into fld "URL"
end if
end mouseUp
Code: Select all
on mouseUp
put the selectedText of me into tFile
set the filename of player "P2" to tFile
set the filename of player "P2" to (the cSoundFilesFolder of this card & "/"& tFile)
put the cUserDefinedName of me into tUserDefindName
start player P2
end mouseUp