Après avoir beaucoup cherché pour une réponse à ma question, je ne l'ai pas trouvé.Passer un rappel à GreenSock lorsque vous avez terminé d'animer
Alors, ma question est:
Je fais un site Web et dans la première page, j'avoir une image « main » de passer à « logo » de l'entreprise. Après cela, l'image du logo de la société se déplace, mais seulement après le premier mouvement est terminé.
Mon code est:
function hand() {
var hand = TweenMax.fromTo(".start .hand", 2.5,
{top: -300, left: -400, rotation: 10},
{top: -300, rotation: 40, left: -300});
}
Ici la main aller à cette position en utilisant la bibliothèque TweenMax.
L'autre fonction est:
function bolas(){
$('.bolinhas').css({display:'block'});
var bolinha1 = TweenMax.fromTo(".start .bolinha1", 5.5,
{top: 150, left: -100},
{top: 650, left: 100});
var bolinha2 = TweenMax.fromTo(".start .bolinha2", 5.5,
{top: 150, left: -50},
{top: 680, left: -200});
var bolinha3 = TweenMax.fromTo(".start .bolinha3", 5.5,
{top: 100, left: -80},
{top: 680, left: 290});
var bolinha4 = TweenMax.fromTo(".start .bolinha4", 5.5,
{top: 80, left: -110},
{top: 680, left: -250});
var bolinha5 = TweenMax.fromTo(".start .bolinha5", 5.5,
{top: 100, left: -15,},
{top: 650, left: -70});
var bolinha6 = TweenMax.fromTo(".start .bolinha6", 5.5,
{top: 150, left: -20},
{top: 680, left: 250});
var bolinha7 = TweenMax.fromTo(".start .bolinha7", 5.5,
{top: -50, left: -10},
{top: 650, left: -70});
var bolinha8 = TweenMax.fromTo(".start .bolinha8", 5.5,
{top: -150, left: -160},
{top: 680, left: -350});
var bolinha9 = TweenMax.fromTo(".start .bolinha9", 5.5,
{top: -150, left: 10},
{top: 680, left: 70});
}
En utilisant la même bibliothèque, ils font ce mouvement, mais en même temps.
Comment puis-je rappeler la deuxième fonction dans la première?
@Jamiec https://greensock.com/tweenmax – Roberrrt