It looks like you're new here. If you want to get involved, click one of these buttons!
<nobr> Insert text </nobr>
As well as:
(nobr:) [Insert text]
The first one seems to do nothing whereas the second one comes back with an error saying that the macro nobr does not exist.<img src="images/grunge-background_c.png" width="1366" height="768" border="0" class="bgimg"/>
<div style="display: none;"><img src="!@#$" onerror="$('#nowplayingbirds').animate({volume: 0}, 0);" /></div>
<div style="display: none;"><img src="!@#$" onerror="$('#nowplayinglaughing').animate({volume: 0}, 0);"/></div>
<div style="display: none;"><img src="!@#$" onerror="$('#nowplayingdripping').animate({volume: 0}, 0);" /></div>
<div style="display: none;"><img src="!@#$" onerror="$('#nowplayingviolin').animate({volume: 0}, 0);" /></div>
<div style="display: none;"><img src="!@#$" onerror="$('#nowplayingcrying').animate({volume: 0}, 0);" /></div>
<div style="display: none;"><img src="!@#$" onerror="$('#nowplayingnight').animate({volume: 0}, 0);" /></div>
I know. It's a mess. The first line creates the background image. The rest control the volumes for the various sounds that I use throughout the story. I have all the sounds on loop in Javascript. I use these lines to silence, start, fade in, and fade out the sounds depending on the passage. If there's a simpler way of doing all of this, I'd appreciate hearing about it. Thank you!
Comments
Just put all of your code inside curly braces. As for the sounds, it might be easier to have a single "play sounds" function which you can pass variables with the img hack, and those variables tell the function which sounds to start playing? I'm not sure, but it seems worth a try and would reduce that to just two lines.
If you can help, how would I go about setting up this "play sounds" function? :-[
I'm assuming you know how to make JS functions but I realize this may be a false assumption. Unfortunately I can't help with that...
Regarding the curly braces: I tried it and got the same result as you, which is weird. But getting rid of the spaces and line breaks between the lines of code works.
p.s. I found this thread from before and that Music object code looks like a great place to start.
Getting rid of the spaces and line breaks seemed to help. Now I have to go through and edit all my passages to remove the spaces and line breaks in the coding.
Ooo, thank you! I'll check out that thread in a jiffy! ;D