You should nest each animation in a symbol, say pink, green, yellow. Each is instanciated on stage and given respectively the IDs
pink1, green1, yellow1.
Then your button has a click event handler with code
sym = the button's timeline
getComposition().getStage() = back to the stage's timeline
getSymbol("xxx") = select a symbol's instance with name "xxx"
Here is an example : https://www.box.com/s/h38s2oexqdumm46v4q7d
I didn't used any global variable : may be you have a good reason to use it ?
1 person found this helpful
finding it difficult to find good documentation
Here you'll learn how to control a timeline from other ones (nested or nesting) :
Thank you so much for that Gil - really useful.