Computer Science Canada

Play Select Track?

Author:  Canadian1911 [ Thu Mar 16, 2017 12:44 am ]
Post subject:  Play Select Track?

Hello,

I am using Turing 4.05 and I cannot figure out how to make it possible for the user to enter which track they want to play.

I am aware that you do Music.PlayFile ("cd:x") if X is the track number the programmer puts in, If I was going to insert "Marilyn Manson - Holy Wood (In the Shadow of the Valley of Death)", and I wanted to play the third track "The Fight Song", I'd put in code: Music.PlayFile ("cd:3").

However I want the user of my program to be able to select while track they want to play, I have tried a couple things, but I can't seem to succeed.

Author:  Insectoid [ Thu Mar 16, 2017 6:47 pm ]
Post subject:  RE:Play Select Track?

"cd:x" is a string. Turing has lots of ways to modify strings. Create a string with the number you want based on the user input, and then pass that to Music.PlayFile(). You may find the command intstr() useful.

Author:  pttptppt [ Fri Mar 17, 2017 11:15 am ]
Post subject:  Re: RE:Play Select Track?

Insectoid @ Thu Mar 16, 2017 6:47 pm wrote:
"cd:x" is a string. Turing has lots of ways to modify strings. Create a string with the number you want based on the user input, and then pass that to Music.PlayFile(). You may find the command intstr() useful.


Can you please check my thread and help???


: