Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

How do I stop a looping music file from playing in crafty.js? I want the music to stop playing once a gameover condition has been reached.

share|improve this question
    
possible duplicate of Gameover scene transition –  Anko Apr 19 '13 at 10:45
    
I think the duplicate is the other way around. –  Byte56 Apr 19 '13 at 16:20

1 Answer 1

up vote 2 down vote accepted

According to this issue page: Crafty.audio.stop("soundname"); or Crafty.audio.stop() to stop all sounds. Apparently the documentation is very out of date. The issue linked is from 10 months ago, and the documentation is still out of date.

However, you can always check the source code to see what's available to you.

share|improve this answer
    
I agree that the documentation is out of date. I'll start using the source code as documentation from now on. I'll probably ask fewer questions too. –  gnerkus Apr 17 '13 at 19:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.