I'm not asking to make my project.
I'm just trying to understand how to execute this code
tl.
to(".container", {
x: 200
})
and then this
for (var i = 0; i < spriteSheet.total; i++) {
tl.set(".frames", {
x: (i % spriteSheet.cols) * -spriteSheet.width,
y: Math.floor(i / spriteSheet.cols) * -spriteSheet.height
}, i / (spriteSheet.total - 1) * spriteSheet.duration);
}
Now it's executing at the same time (container and the image).
I'm trying to do something like this.
tl.
to(".container", {
x: 200
})
.to(".container", {
y: -100
})
It's moving one after another