<script src="http://spelprogrammering.nu/simple.js"> function start() { music = "http://spelprogrammering.nu/ljud/musik/Last_Ninja_2_01"; gun = "http://spelprogrammering.nu/ljud/effekter/laser_gun_2"; loopSound(music); ammo = 5; } function update() { if (keyboard.space) { ammo--; if (ammo > 0) { playSound(gun, 0.5); } else { stopSound(music); stopUpdate(); } } } </script>