Hello,
First time posting here, but already learned a lot of great things on this forum. Thank you community!
I am having a problem with playing timeline from a certain point (label).
I have one master timeline, which is holding a lot of smaller timelines, functions etc. And I have main navigation (regular buttons), that should control navigating through the main (master) timeline.
const master = new TimelineMax();
master.add( preload )
.add( audio_togle, '+=13' )
.add( particles )
.add( navigation_show )
.add( videoSize, 'particles+=2' )
.add(function () { videoPlay('intro') })
.add( parallax )
.add( scene_first_show, 'scene1show' )
.add( pause )
.add( scene_first_hide, 'scene1hide' )
.add( pause )
.add(function () { scene(text[0]) }, 'home' )
.add( pause )
.add(function () { scene(text[1]) }, 'about')
.add(pause)
.add(function () { scene(text[2]) }, 'contact')
.add(pause)
.add(function () { scene(text[3]) }, 'portfolio')
.add(pause)
.add(function () { videoPlay('outro')})
.add( scene_final, 'finalLogo')
.add(pause)
function pause() {
master.pause();
masterIsPaused = master.paused();
console.log('Master is paused');
}
And I have that main navigation button, where on click, I check it's `data-show` attribute, and use it as a label name.
mainNavItem.on('click', function () {
$self.addClass('is-active');
mainNav_hide();
var whatToShow = $self.data('show');
master.seek(whatToShow);
});
But `master.seek(whatToShow);` doesn't work at all.
How can I jump to certain label and play from there?
Thank you,
Mo