4 Replies Latest reply on Feb 15, 2016 6:27 PM by redka

    playReverse on symbol that has nested symbols in sequence

    redka

      Dropbox - AE - TEST 3

       

      Hi,

       

      Having problem with the playReverse method. Basically I would like to know if you can playReverse a Symbol animation that has nested symbol/animations?

       

      Above dropbox link is the project file.

       

      In the attached project Test 3, I have symbol called "animation-4-master". Within this sits 2 symbols, "animation-4-start" and "animation-4" which play in that order sequentially.

       

      In the project I have two basic text buttons "FORWARD" and "REVERSE".

       

      What should happen is when the forward button is pressed, the parent symbol/animation plays forward, playing the nested animations in sequence, which is does fine.

       

      When I do the opposite i.e. playReverse, the parent timeline goes to the end where it should, but then only plays the 2nd animation (animation-4) and plays it forward, not even backwards. The first nested animation (animation-4-start) does not even get played.

       

      I have inserted console.log markers to report the 3 position points for both forward and reverse, so this is how I know what the timeline is doing.

       

      I can easily play each nested animation by itself from the Reverse button, but I want to play the parent animation, so as to play both nested animations in reverse sequence.

       

      There are no triggers that are moving the position of the playhead, they are just producing console.logs to try and solve this problem.

       

      Any help would be great.

      Mick

        • 1. Re: playReverse on symbol that has nested symbols in sequence
          joel_pau Level 5

          Hi,

           

          Mick,

           

          Here is your composition playing forward and reverse ==> nestedSymbols Repaired.zip - Box

          • 2. Re: playReverse on symbol that has nested symbols in sequence
            redka Level 1

            Hi Joel,

             

            Thanks for taking a crack at this. I'm still not seeing expected procedure on this.

             

            Basically the forward animation of both nested animations including timings, should be the exact opposite in reverse. Going Forward, animation-4-start plays till end, and only then does the animation-4 play. But in reverse, I'm only seeing half of the second nested animation (animation-4), and it also has a pause before it starts. I'm also seeing in reverse both animations overlapping, which they shouldn't.

             

            I'm wondering if there is a bug in An?

             

            From the console.log, if you press the Forward button after initial I'm seeing the following good sequence of timeline markers. Pressing forward a second time before reverse removes some of these markers, but I guess that is because the sequence is getting out of order.

             

            Starting playing

            animation-4-start trig_18 0 isReverse?  false

            animation-4-master trig_11 0 isReverse?  false

            animation-4-start trig_20 10 isReverse?  false

            animation-4-start complete 833 isReverse?  false

            animation-4 trig_8 0 isReverse?  false

            animation-4 trig_6 250 isReverse?  false

            animation-4 trig_4 1000 isReverse?  false

            animation-4-master trig_14 2291 isReverse?  false

             

            I see that you added a stopAll() trigger at 2291 in the master timeline plus added duplicate animation-4 and animation-4-start to the master. Was this to try and overcome the reverse problem?

             

            When I press Reverse after Load then Forward, I would expect to see the reverse order. But all I'm seeing is:

            Starting reverse at:  4582

            animation-4-master trig_16 3124 isReverse?  true

            animation-4 trig_4 1000 isReverse?  true

            animation-4-start trig_20 10 isReverse?  true

            animation-4-master trig_14 2291 isReverse?  true

             

            What's missing from this is

            • animation-4 trig_6 250 true, followed by
            • animation-4 trig_8 0 isReverse?  true

            So from this reverse sequence it is going to the master timeline to start (pos 4582), going to the start of Animation-4 (pos 3124) skipping the above triggers (causing a pause in the reverse animation where there should not be), then goes to end of Animation-4, plays reverse now hitting animation-4 trig_4 1000 isReverse?  true, but does not play the 250 and 0 which should follow on. It then continues onto animation-4-start and plays that correctly in reverse.

             

            Look forward to your thoughts, and thanks again for your help on this tricky one.

             

            Mick

            • 3. Re: playReverse on symbol that has nested symbols in sequence
              joel_pau Level 5

              Another version: displaying timelines.zip - Box

              I displayed all timelines. You have four timelines.

              • 4. Re: playReverse on symbol that has nested symbols in sequence
                redka Level 1

                Hi Joel,

                 

                Thanks again for taking a look at this. It's good to see your scripting and getting ideas of how to overcome this problem. What I've done is taken your script approaches and applied to them just the 2 timelines instead of duplicating and having 4 (2 for forward and 2 for reverse).

                 

                Dropbox - test-4.zip

                 

                Couple of things I did find out about Edge An which were contributing to the problem.

                • That you have to rebuild the project everytime you do a change. I was stupid enough to be just doing a reload on the html and no seeing changes (of course not, no change to the js files).
                • An just doesn't work sometimes correctly. Even when I did a rebuild and knew the changes were correct I wasn't getting correct results. I closed the An file and restarted An, and then and only then did the project work correctly. So software bugs are a factor.
                • Frame 0 in playReverse() causes all sorts of nightmares. I had the 2nd sub animation(animation-4) play first in reverse, then when it reached frame 0, where I had a isPlayDirectionReverse() function in play, it would not play reverse the 1st sub animation (animation-4-start). When moved to frame 1, all worked.

                Anyway all seems to be working now, but still I think it should have been able to playReverse from the parent master animation (animation-4-master).


                I see that this project won't play in the new Animate So I guess all new projects from now need to be in Animate and not Edge Animate.

                Mick