- 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