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

Change speed of animation using code

$
0
0
  • Created an animation for a rectangle that either goes up or down.
  • Is it possible to change the speed of the rectangle only when it is going up by using code?
  • Below, is the code for the button:

 

 

if(sym.getComposition().getStage().getSymbol("rect").upDown == 0){

sym.getComposition().getStage().getSymbol("rect").upDown = 1;

sym.getComposition().getStage().getSymbol("rect").playReverse();

}

else{

sym.getComposition().getStage().getSymbol("rect").upDown = 0;

sym.getComposition().getStage().getSymbol("rect").play();

}

 

 

 

Thanks,

Eddie


Viewing all articles
Browse latest Browse all 9897

Trending Articles



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