Ok, I finished Slugs and Bugs, (thanks again to grayelf and TheMadExile)and everyone loved it, so I am working on a new story. I made sound effects for it, and what I have noticed is that if a person goes back a menu or more, then when they return to the first screen, the animation of the gif no longer lines up with the sound. Example:
Go to table of contents
Then when you click that, you show up at the ToC with a lightning strike and thunder perfectly aligned.
[[Go back to Title Screen[[
If you click this, you leave the ToC and end up at the first screen again (I have no animation synced with sound)
Go to table of contents
Now when we go here, the lightning flashes on my gif are way off with the sound effects.
Basically is there a way to auto make it refresh on the few screens that have animations with sound?
Comments
Assuming you're using SugarCube, why not just put the GIF in a separate CSS layer, unload it with SugarCube's <<removeclass>> macro when you exit the contents screen, and reload it with <<addclass>> when you visit the screen again in time with the music.
You can add and remove classes with Javascript or GSAP if not using SugarCube.
However, I want to thank both of you very much for mentioning these. I need a fix that a chimp could do. I'll just leave it as is and release my preview tomorrow night. Thank you though.
You can change this to two separate html entries in the css where you split the background image into a separate selector:
Selectors are basically "add on" code that you can tell to be added at certain points. To do this, on the page where you want the lighting to appear, use the macro:
<<addclass "html" "lightning">>
When you navigate away write <<removeclass "html" "lightning">> to remove it (for example, put this on the title screen).
That way, you're reloading the html.gif selector every time you visit the contents.
<div align="center">[img[Pictures/ToC.gif]]</div>
<<stopallaudio>>
<<audio "toc" volume 0.5 loop play>>
<<audio "thunder" volume 0.5 loop play>>
The Book of Shadows - Bware, reader!
Preview - I'm coming for you...
Start - Return to the Title Screen
Can you fill this in exactly how I need to please? I know I probably seem dumb but, I just don't understand!