Music listings

For questions about using Classic.

Post » Fri Feb 29, 2008 6:00 pm

I'm having a problem trying to creat a list of songs for my game does anyone have some pointers?
B
2
G
4
Posts: 69
Reputation: 1,188

Post » Fri Feb 29, 2008 11:32 pm

Here's a list of songs you could use:

1. Talking Heads - Once In A Lifetime
2. Devo - Whip It
3. Dead or Alive - You Spin Me Right Round
4. A-Ha - Take On Me

Heh, just kidding :)

Seriously, what do you mean by a "list" of songs? What specifically are you trying to do?
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Mar 01, 2008 1:26 pm

It's fore my game you can choose what sony to play, I would like it to read from the folder "music" and show all the songs that are in it.

Think windows media player, you choose the songs.
B
2
G
4
Posts: 69
Reputation: 1,188

Post » Sat Mar 01, 2008 4:32 pm

The File object can return lists of files.

Insert a ListBox and File object and then do:

Add line: File.FileList("C:\")

Add line can take either a string, or an array of strings such as the returned value of FileList.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sat Mar 01, 2008 9:03 pm

Ok that worked! Thank you for helping.
B
2
G
4
Posts: 69
Reputation: 1,188

Post » Mon Mar 03, 2008 7:49 pm

When I try to play the selected song Itdoes not play.
B
2
G
4
Posts: 69
Reputation: 1,188

Post » Fri Mar 07, 2008 8:53 pm

Buump
B
2
G
4
Posts: 69
Reputation: 1,188

Post » Fri Mar 07, 2008 8:57 pm

What events are you using to play the selected song?
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Sat Mar 08, 2008 1:16 pm

Play: On Button Play clicked
> Directsound: Play music "/Music/" & ListBox .LineText(1)
B
2
G
4
Posts: 69
Reputation: 1,188

Post » Sat Mar 08, 2008 3:32 pm

Does it work if you use a full path? Try:

AppPath & "Music\" & ListBox.LineText(1)

Remember to use backslashes for local paths.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests