Hi there,
i have a - i guess quite exotic - problem or request - and i'm a noob in javascript, so maybe this question is kind of silly to pros ...
I build a timeline which the user navigates forwards an backwards with swipe-gestures. This timeline combines text, video an grafic-animations wich are synchronised. the animations are in a different timline (called "grafik_kap_1") which is controlled with triggers. i decided to build this structure, so this project is less comoplicated and my teammates are able to edit the content. So far so good.
I want the timeline "grafik_kap_1" to be played from different labels - depending the default-timeline is played forward or backwards:
- If the trigger is played forward it should play the timeline "grafik_kap_1" from the label "grafik_kap_1_1".
- If its played backwards it should play the timeline "grafik_kap_1" backwards from the label "grafik_kap_1_1_back".
My solution is the following: i got the javascript to ask for the position on the timeline "grafik_kap_1" and decide to play it in the way i intended. This is the code i found in here (Edge Animate, create "Next" and "Back" buttons that play from current position, thx to @obliviousjd) and which i edited to work in my project:
var pos = sym.getSymbol("grafik_kap_1").getPosition()
if (pos <= 0010){
sym.getSymbol("grafik_kap_1").play("grafik_kap_1_1");
}
else if (pos >= 0520){
sym.getSymbol("grafik_kap_1").playReverse("grafik_kap_1_1_back");
}
It works fine, but to edit the positions on each trigger (there gonna be some in the final project) is kind of complicated to my teammates, because they have a low skills-level in edge.
My qeuestion is: is there a way to detect the playing-diection of the default-timeline (sym.play or sym.playReverse) instead of the position?
This would be a more general solution and my teamates just had to change the labels....
It would be awesome, if somone would have a solution...!
Thanx a lot!
BeBo