Actionscript! ?
Ok so I'm getting my hands a little dirty here. Couple questions off the bat (codepen below):
1) In a master timeline structure, if we're pinning the lottie element at the start how do we go about unpinning it momentarily so that it can transition from center of viewport to top of viewport before being pinned again?
2) More broadly, when building animations on a long scroll page like this where one element interacts with multiple sections of the page is the timing of that just down to adjusting the duration? Or is there a way to use triggers hooked on the section divs to establish the timing. I'm wondering about responsive breakpoints / mobile considerations.
3) Creating playhead animations frame-to-frame for the lottie: I haven't found a good source for how this is done. I saw that LottieFiles has Interactivity docs that demonstrate how you can chain parts of the lottie timeline together but would I then need to import their lottie-interactivity plugin just for this? (https://docs.lottiefiles.com/lottie-interactivity/configuration-and-usage)
// single section:
LottieInteractivity.create({
player: '#firstLottie',
mode: 'scroll',
actions: [
{
visibility[0,1],
type: 'seek',
frames: [0, 300],
},
]
});
// or chaining multiple:
LottieInteractivity.create({
player:'#lottie-target',
mode:"chain",
actions: [
{
state: 'none',
transition: 'none',
frames: [48, 110]
},
{
state: 'none',
transition: 'none',
frames: [110, 198]
},
{
state: 'none',
transition: 'none',
frames: [198, 110],
//reset: true
}
]
});
I also found another forum user that was using a function somewhat like this but it didn't appear to be complete:
proxy.onLoaded(init);
function init() {
.fromTo(proxy, {
frame: 48
}, {
frame: 110
}, 0)
Anyway, having fun here. Appreciate you all.
https://codepen.io/mattCampy/pen/GRYrjqN