Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Refrencing All Music

Author
Message
Ninjateck
16
Years of Service
User Offline
Joined: 27th Feb 2008
Location:
Posted: 4th May 2010 02:05 Edited at: 4th May 2010 03:59
Is there anyway to perform commands to all the music you have loaded ?
i want to check if ANY music is playing, and then if the user tries to play other music i want to stop the currently playing music, no matter what is. im also trying to check if any music is playing and then get the ID of that music is this possible ?
Ultimate_H
15
Years of Service
User Offline
Joined: 11th Mar 2009
Location: A place that is neither here nor there
Posted: 4th May 2010 04:28
I don't know if there are any built-in commands to do this, but you can create your own. I do something similar when trying to find an open object, but here's something adapted to what I think your talking about:



where TopTrack is the last song you want to check. basically, it runs through all the songs, see's if it's playing, and if it is, it returns the identifier for that song.

hope that helps
-H

Ninjateck
16
Years of Service
User Offline
Joined: 27th Feb 2008
Location:
Posted: 4th May 2010 18:03 Edited at: 4th May 2010 18:05
ok, thanks for the code it works great, but i have one other question
i am trying to create a music player in which the user can select which music to play from a list
the problem is that sometimes two songs play at the same time
and sometimes no songs play at all
can someone look at this code and see whats wrong with it ?

Login to post a reply

Server time is: 2024-11-19 23:44:01
Your offset time is: 2024-11-19 23:44:01