Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Play/Reverse toggle double clicking problem

$
0
0

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!


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>