Jonathan -
Thanks for your quick reply!
My apologies for not explaining clearly enough - the code I posted IS the secondary timeline. The "main" timeline looks like this:
<script>
var timerOne = setTimeout(firstMove, 1500);
function firstMove(){
TweenLite.to("#woman", 1.5, {left:-80, ease:Quad.easeOut});
TweenLite.to("#Text01", 1, {autoAlpha:1, delay:1.2});
TweenLite.to("#studyMask", 1, {autoAlpha:1, delay:1.2});
TweenLite.to("#closeButton", 1, {autoAlpha:1, delay:1.2});
TweenLite.to("#openButton", 1, {autoAlpha:1, delay:1.2});
}
var timerTwo = setTimeout(secondAnimation, 6000);
function secondAnimation(){
TweenLite.to("#woman", 1.2, {autoAlpha:0});
TweenLite.to("#Text01", 1.2, {autoAlpha:0});
TweenLite.to("#Text02", 1.2, {autoAlpha:1, delay: 1.2});
}
etc.
etc.
</script>
So, I have a series of timers, each of which launches a block of animations. These timers drive the primary animation of the banner.
The secondary timeline ("tl" in the code I posted above) allows the viwer to open (and close) a sliding "drawer" that provides additional information. As is stands, the timeline works correctly, and the "drawer" slides up and down as intended.
The problem is that the main animation conintues in the background, which is both distracting, and since the banner does not loop, it means the viewer will miss some of the content. So I want to pause the main animation whenever the drawer is open.
I tried adding a line to my function slideStudyUp, so that it reads:
function slideStudyUp(){
tl.play();
timeline.pause();
}
It looks correct to me in terms of syntax, but it doesn't work.
Could the problem be that I don't really HAVE a "main" timeline? I didn't create one using TimelineLite, I just created a series of JavaScript timers to launch my animation functions. Would this work better if I wrap the main animation in it's own timeline?
Thanks so much for any help!