I've been using this code to get a button to play and play in reverse a symbol and it works really well, but if the animation is not in autoplay from the get go, I have to click the button twice to get the animation going. What is the change I need to make in this code?
if (sym.getSymbol("button").isPlaying()) {
sym.getSymbol("button").stop();
} else {
if(sym.getSymbol("button").isPlayDirectionReverse()) {
sym.getSymbol("button").play();
}
else
{
sym.getSymbol("button").playReverse();
}
}
Thanks!