If I can trouble you one more time and I think I'm on the home stretch...
I have created 3 functions and a master timeline below.
The second function in the attached code is nearly identical to the other two.
I have added them into the master timeline but for some reason the second function wants to start running right away instead of in sequence after the first.
The third acts properly as expected in sequence.
I know I can add a delay, but that seems like a workaround to me and one more thing I need to update as values change.
images = document.getElementsByClassName("gest06")
stand01 = document.getElementsByClassName("gest06stand");
durtalk = .08
dur = .03
function armUp(){
var tl01 = new TimelineMax({});
tl01.staggerTo(images,0,{visibility:'visible'},dur)
.staggerTo(images,0,{visibility:'hidden',immediateRender:false},dur,dur);
return tl01;
}
function stand(){
var tl015 = new TimelineMax({repeat:20,yoyo:true});
tl015.staggerTo(stand01,0,{visibility:'visible'},durtalk)
tl015.staggerTo(stand01,0,{visibility:'hidden',immediateRender:false},durtalk,durtalk);
return tl015;
}
function armDown(del){
var tl02 = new TimelineMax({});
tl02.staggerTo(images,0,{delay:del,visibility:'visible'},-dur)
.staggerTo(images,0,{delay:del,visibility:'hidden',immediateRender:false},-dur,dur)
return tl02;
}
master = new TimelineMax();
master
.add(armUp())
.add(stand())
.add(armDown(),"-=.05")