removed music

This commit is contained in:
lengstrom 2014-07-16 00:06:23 -04:00
parent 3e64d5633c
commit 401c0873af
4 changed files with 2 additions and 42 deletions

View file

@ -65,15 +65,8 @@
</p>
</div>
<div onClick="showHelp()" id="openSideBar"><i class="fa fa-info-circle fa-lg"></i><span id ='helpText'> <i class="fa fa-arrow-left"><b> Help</b></i></span></div>
<audio id="intro">
<source src="sounds/intro.ogg" type="audio/ogg">
</audio >
<audio id="loop" >
<source src="sounds/loop.ogg" type="audio/ogg">
</audio>
<div id="overlay" class="faded"></div>
<div id = 'pauseBtn'><i class="fa fa-pause fa-2x"></i></div>
<div id = 'volumeBtn'><i class="fa fa-volume-up fa-2x"></i></div>
<div id = 'restartBtn'><i class="fa fa-refresh fa-2x"></i></div>
</body>
</html>

View file

@ -104,15 +104,7 @@ $(document).ready(function(){
return false;
});
$("#volumeBtn").on('touchstart mousedown', function() {
if (toggleAudio()) {
$("#volumeBtn").html('<i class="fa fa-volume-off fa-2x"></i>');
} else {
$("#volumeBtn").html('<i class="fa fa-volume-up fa-2x"></i>');
}
return false;
});
$("#restartBtn").on('touchstart mousedown', function() {
if (gameState==2 || gameState==1 || importing == 1) {
init(1);

View file

@ -173,24 +173,6 @@ function hideUIElements() {
$('#restartBtn').hide();
$('#startBtn').hide();
}
function loadListeners(){
document.getElementById('intro').play();
document.getElementById('intro').addEventListener('ended', function(){
this.pause();
toggleAudio();
}, false);
document.getElementById('loop').addEventListener('ended', function(){
this.currentTime = 0;
this.play();
}, false);
}
function toggleAudio(){
var loopAudio = document.getElementById("loop");
if(loopAudio.paused) loopAudio.play();
else loopAudio.pause()
return loopAudio.paused
}
function init(b) {
if (b) {

View file

@ -59,14 +59,7 @@ button:focus {
color:#000;
cursor:pointer;
}
#volumeBtn {
position: absolute;
top: 2px;
right: 4px;
z-index: 3000;
color:#000;
cursor:pointer;
}
#pauseBtn {
position: absolute;
margin-bottom: 3px;