Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 music player problem
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Clayton




PostPosted: Fri Feb 10, 2006 6:37 pm   Post subject: music player problem

k im making a music player and i dont know how i would be able to take the mp3 file names and put them into a file to read so that u dont have to type in a new song name how could i do this plz if u know let me know
Sponsor
Sponsor
Sponsor
sponsor
shoobyman




PostPosted: Fri Feb 10, 2006 8:51 pm   Post subject: (No subject)

i am not sure if this would fully solve your problem but, what if you made a turing datafile with all of your mp3 song names in there for example:

music.mp3

then get turing to make that a string variable:

var music:string

and just place the variable in the place of the playmusicfile command like this:

Music.PlayFile (music)

I cannot be sure that this will work cuz i haven't tried putting string or any other variables in the playfile command.
Hope i helped
Very Happy[/code]
Cervantes




PostPosted: Fri Feb 10, 2006 9:06 pm   Post subject: Re: music player problem

SuperFreak82 wrote:
k im making a music player and i dont know how i would be able to take the mp3 file names and put them into a file to read so that u dont have to type in a new song name how could i do this plz if u know let me know

Use the Dir module to get the filenames, then put them into a file. Check the Turing Walkthrough for tutorials on writing to files. Check Turing Help for information on the Dir module.
Clayton




PostPosted: Wed Feb 15, 2006 6:57 pm   Post subject: (No subject)

thank you very much but now im having a problem so that someone can select a song from the list by clicking on it, how might i go about this, i could also do a cursor i guess operated by the arrow keys but who wants to do that any help would be greatly appreciated
codemage




PostPosted: Thu Feb 16, 2006 9:50 am   Post subject: (No subject)

You can use the GUI library if you want an actual drop-down list where you can select items, otherwise, creating a hilighted list (like you mentioned) wouldn't actually be that difficult.
Clayton




PostPosted: Thu Feb 16, 2006 7:26 pm   Post subject: (No subject)

Quote:

You can use the GUI library if you want an actual drop-down list where you can select items, otherwise, creating a hilighted list (like you mentioned) wouldn't actually be that difficult.

i didnt ask how difficult this would be i was asking how i would go about doing it
Cervantes




PostPosted: Thu Feb 16, 2006 8:44 pm   Post subject: (No subject)

He just gave you one option. Use a dropdown box.

It's hard to answer your question, however, because it is poorly posed. Do you mean, "How should my GUI allow for the user to select the song to play?" or "Once the user selects a new song, how do I stop the current song and play the new one?".

I'm going to assume it's the first one, in which case you've already got one possible solution. I offer a second: create your own GUI to store a large number of items, featuring a vertical (and possibly horizontal) scrollbar, with the ability to select items. This should be organized into a class.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: