Hi All,
A bit difficult to explain this one...
I want to include a script within the index.html file that looks at a variable that C2 has saved to my localStorage and then plays a music file if the variable=1. Does anyone know how to do this?
I need to play the music file separate from the game and the runtime javascript. I hope someone can help...
The audio file absolutely needs to play outside the c2runtime.js file.
If the variable is called MyVar, I guess it's going to be something like:
<script>
if localStorage.MyVar=1
then play musicfile.ogg
</script>
...but evidently my expertise does not stretch this far - can anyone with programming skills help???
Thanks in advance!!