Copy link to clipboard
Copied
Hello,
I want to create an animated header that gets smaller as you scroll down. I have been searching various websites with no result as to how to stop the looping action in Muse. I know I can’t make it stop in Muse, but in Animate CC. I have turned off Loop Timeline under Publish Settings. It is extremely infuriating to see my header continue to become bigger and smaller and vice versa as I scroll.
—Mads
Copy link to clipboard
Copied
When an OAM thing is in a Muse page, the actual window is seen as window.parent. You should be able to figure out the window's scroll by checking window.parent instead of window. Then you would send your Animate timeline to the frame that matches the scroll of the main window, and not the OAM level.
Copy link to clipboard
Copied
I don’t understand what you want me to do. What’s a window.parent?
Copy link to clipboard
Copied
If you read discussions like this:
JavaScript get window X/Y position for scroll - Stack Overflow
you'll see how people read the scroll of the window, and in your case you would use that to make your header be bigger or smaller.
But, in Muse when using an OAM, the OAM content (your Animate files), is one level down from the window. So, if you understand the stackoverflow article enough to read the page scroll values, where they talk about:
window.pageYOffset
you would need to use:
window.parent.pageYOffset
instead.