Does not work to stop a specific audio

Bugs will be moved here once resolved.

Post » Sat Sep 15, 2012 7:08 pm

Hello,

When I want to stop from playing a specific audio file (for example: audio -> stop with a tag "anysound" with anysound.ogg & m4a in the library), I think that it does not work. If I use the general stop command without any tag it works, however I would like to be able to choose which sound to stop if more than 1 sound is playing.

Is there something that I miss, or it is just a bug ;)

Thanks!
B
6
G
2
Posts: 7
Reputation: 1,358

Post » Sat Sep 15, 2012 10:42 pm

Please see how to report bugs. Can you share a .capx?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Tue Sep 18, 2012 1:27 pm

Yes, of course

Here is it:

TestSound.capx

Actually the problem is on the 3-rd line of the event sheet.

When the command is Audio -> Stop "do2" the sound just does not stop.

However if there is no tag for the specific audio it works.

Thank you in advance!

B
6
G
2
Posts: 7
Reputation: 1,358

Post » Tue Sep 18, 2012 5:39 pm

It's not a bug. You play the audio with an empty tag (""), then try to stop the tag "do2", and no audio is playing with that tag. (Remember to use tag names, not audio filenames). It works in Firefox and Chrome if you change the tag to "do2" in both places.Ashley2012-09-18 17:39:40
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Sep 19, 2012 7:33 pm

Wow, I tried this, but first it did not work, however it works when we both use audio file name like a tag and the optional tag below.

Thank you very much for your time explaining this! :)
B
6
G
2
Posts: 7
Reputation: 1,358

Post » Sun Jan 25, 2015 3:30 pm

I think it should be mentioned that sound tags should NOT match the filename of the sound in your project folder. This is important when you want to run conditions of stopping and starting a sound with a single sprite/button/touch. I spent 2 hours to discover this after painstaking going through all the methods. If you change the tag to something other then the filename, it works fine.

Andrew.
B
7
S
1
Posts: 2
Reputation: 391


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests