3
I use Adobe Edge Animate for simple animations at work. I couldn’t get one of them to work and I did a trick. Now I want to know how to do it right.
I have a button. When clicked, it should play on the timeline from start to finish. If clicked again, it should play backwards, from end to start.
I tried that:
var x=0;
if (x==0){
sym.getSymbol("timeline").play('start');
x=1;
} else {
sym.getSymbol("timeline").playReverse('finish');
x=0 ;
}
It doesn’t work. I don’t know where I went wrong. I ended up doing the following:
I created two Ivs, Symbol1
and Symbol2
. They stand on top of each other. When the first one was clicked, it played on Timeline and disappeared (showing the lower div), so that the second symbol was clicked, giving play Reverse. After that the Symbol1
reappeared, restarting the process.
Code:
// Symbol2:
sym.getSymbol("timeline").play('start');
sym.$("symbol2").hide();
// Symbol1:
sym.getSymbol("timeline").playReverse('finish');
sym.$("symbol2").show();
How do you make it work? The second mode works but is double work (do this for a button is easy, I want to see do for twenty, which would turn 40, since there are two buttons for each part).