for statement to turn down sound volume
Hi all,
I used this (snippet)
PHP Code:
for (a=0, a>100, a++); or
for (a=100. a<1. a--);
setVol(a)
to increase/decrease volume of a sound file by clicking on a button.
It is working in the debug screen and it is working with the actual sound file. But instead of fading in or out, it just goes straight from 0-100 or 100-0 instantly. Is there a way to put a time delay between the counts?
1 Attachment(s)
Sound fade in and out with 1 button
Hi browndrake,
Thanks for your help - much appreciated. I couldn't get yours to work and so modified it a bit and it is working great now.
Thanks again!!
You can just add a longer audio file to it as I had to remove the original audio file to be less than 300kb.