Page 1 of 1

stop sound

PostPosted: Tue Aug 21, 2007 11:06 am
by Wolly08
hi im making a music player and i was just wondering if anybody had any usefull codes or ideas :) :) :) (+1 point for any ideas/codes i use :) )PS a code to stop the music would be FAB

PostPosted: Tue Aug 21, 2007 12:59 pm
by 98700
how bout u do a background thing like on windows media player? and make it so u can change.

PostPosted: Wed Aug 22, 2007 2:08 am
by cyber ruler
to stop music you need a short (as short as possible) sound file. when you want the music to stop, you play the short sound file on the lowest possible volume. It will be so queit, nobody can hear it, and it will stop all other sounds.

it won't work for stopping sounds, but it will stop music, but you need to be sure you have the sound under playmusic in stead of playsound. It has always worked for me.

PostPosted: Wed Aug 22, 2007 2:04 pm
by Jay S.
Perhaps you could also have a part to adjust the volume. Say if you're playing music, you could create an event to change the musicvol (short for music volume) variable.

cyber ruler wrote:it won't work for stopping sounds, but it will stop music, but you need to be sure you have the sound under playmusic in stead of playsound. It has always worked for me.

In case you need it Wolly, you can stop sounds using the stopSound function:
Code: Select all
stopSound(channel);

where channel is the channel number of the sound currently playing. :)

PostPosted: Thu Aug 23, 2007 12:34 am
by cyber ruler
hmm... I never noticed that function :?