Jump to content
Search Community

jorool

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by jorool

  1. Hi guys!

     

    I'm developing a mobile app with computer network animations, using GSAP.

    My intent is to show multiple messages to user using tl.call() function of TimelineMax, with $ionicPopup, before the animation starts.

    See the code:

        function($scope, $stateParams, $ionicPopup) {
            TweenLite.defaultEase = Power1.easeInOut;
    
            var tl = new TimelineMax();
            tl.call(function() {
                tl.pause();
                $ionicPopup.alert({
                    title: "Informação",
                    template: "{{'SEQUENCE_NUMBER_PRESENTATION_1' | translate }}"
                }).then(function() {
                    tl.resume();
                });
            });
    
            //"dummy" here
    
            tl.call(function() {
                tl.pause();
                $ionicPopup.alert({
                    title: "Informação",
                    template: "{{'SEQUENCE_NUMBER_PRESENTATION_1' | translate }}"
                }).then(function() {
                    tl.resume();
                });
            });
            
            //more code
        }
    

    The problem occurs when I call tl.call() like that, one just after other, the second does not work!

    If I insert a kind of "dummy" statement between the two "calls", like "tl.to('.animationFrame', 0.5, {x: 0});", it works fine.

    Can you say what is wrong in my code, or if it is a bug in GSAP?

     

    Thanks.

×
×
  • Create New...