How can I play an animation in reverse only if the symbol that contains the animation is visible? if the symbol is not visible have the trigger no longer target that symbol?

10-11  Source: Network gathering  Views:3 

I have a button the does two functions at the same time. it plays a symbol's animation in reverse (in order to hide it) and it slides an element. the symbols animation is triggered by another button (which is not relevant) . So my problem is that if the animation has been triggered first than when the button is pushed the animation plays in reverse, the symbol hides and everything is fine, but if a push the button before that the animation will flash in reverse. SO how can I tell it to only play in reverse when the symbol's animation has run. I know it's an if / else statement but i have no idea how to do it.
Here is a case close to your issue:
if ( sym.getSymbol("Symbol1").$("Text").is(":visible") ) { sym.getSymbol("Symbol1").playReverse(); }
else { sym.getSymbol("Symbol1").play(); }
Demo files ==> - Box
Related articles