Audio.stop
Douglas Lacerda edited this page Nov 25, 2018
·
2 revisions
Audio.stop()
Stop the audio.
You can test this snippet of code here.
let symphony5 = new Ramu.Audio("https://upload.wikimedia.org/wikipedia/commons/a/ae/Wolfgang_Amadeus_Mozart_-_Klarinettenkonzert_A-Dur_-_3._Rondo_%28Allegro%29.ogg");
symphony5.play();
new GameObj().update = function(){
if(keyCode.s in Ramu.pressedKeys){
symphony5.stop();
}
};
See also Audio.pause, Audio.resume and Audio.play.