-
1. Re: Is it possible to toggle Play/Play Reverse?
heathrowe Sep 17, 2014 10:58 AM (in response to jamesfootight)Try this - the addition is in bold below
if (sym.getSymbol("button1Copy").isPlaying()) {
sym.getSymbol("button1Copy").stop();
sym.getSymbol("button1Copy").playReverse();
} else {
sym.getSymbol("button1Copy").play();
}
-
2. Re: Is it possible to toggle Play/Play Reverse?
Bharadwaj Sep 18, 2014 12:14 AM (in response to jamesfootight)Try this, while changing the direction we need to check the current direction
if (sym.getSymbol("button1Copy").isPlaying()) {
if (sym.getSymbol("button1Copy").isPlayDirectionReverse()) {
sym.getSymbol("button1Copy").play();
}
else {
sym.getSymbol("button1Copy").playReverse();
}
} else {
sym.getSymbol("button1Copy").play();
}
-
3. Re: Is it possible to toggle Play/Play Reverse?
jamesfootight Sep 18, 2014 1:28 AM (in response to Bharadwaj)Hi I'm afraid none of these suggestions work and instead the animated object just plays again or goes back to starting position when clicked rather than animating in reverse to its original position ?
-
4. Re: Is it possible to toggle Play/Play Reverse?
Bharadwaj Sep 18, 2014 1:38 AM (in response to jamesfootight)James,
can you share your composition. It is working fine for me.
-
5. Re: Is it possible to toggle Play/Play Reverse?
jamesfootight Sep 18, 2014 1:43 AM (in response to Bharadwaj)Hi,
I have realised the problem, it does play reverse whilst playing, but I need the animation to come to a stop and then when clicked again, plays the reverse....
I can still share the composition if you like?
-
6. Re: Is it possible to toggle Play/Play Reverse?
jamesfootight Sep 18, 2014 1:54 AM (in response to Bharadwaj) -
7. Re: Is it possible to toggle Play/Play Reverse?
Bharadwaj Sep 18, 2014 1:55 AM (in response to jamesfootight)This should work for you. Stop, if it is already playing. Play in the opposite direction if it is not playing.
if (sym.getSymbol("button1Copy").isPlaying()) {
sym.getSymbol("button1Copy").stop();
} else {
if(sym.getSymbol("button1Copy").isPlayDirectionReverse()) {
sym.getSymbol("button1Copy").play();
}
else
{
sym.getSymbol("button1Copy").playReverse();
}
}
-
8. Re: Is it possible to toggle Play/Play Reverse?
jamesfootight Sep 18, 2014 1:59 AM (in response to Bharadwaj)Excellent! thank you! It works!
-
9. Re: Is it possible to toggle Play/Play Reverse?
jamesfootight Sep 18, 2014 3:06 AM (in response to Bharadwaj)Final question, how would i refresh the timeline so the animations go back to their original position when going to and from the page? ie i go to page 2 come back to page 1and the buttons are wherever i left them (open or back to original position)
thanks



