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.
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.
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).
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.