We have a problem setting a global variable.
I have a Stage with a single Symbol. The Stage contains this action on compositionReady:
var varfoo = 'varbar';
sym.symfoo = 'symbar';
alert('After compositionReady, varfoo is '+varfoo+'.');
alert('After compositionReady, symfoo is '+sym.getComposition().getStage().symfoo+'.');
These alerts display the values of both variables just fine at the start of the animation.
However...
Inside the Symbol, the end of its Timeline contains this action:
alert('End of Symbol Timeline');
alert('varfoo is '+varfoo+'.');
alert('symfoo is '+sym.getComposition().getStage().symfoo+'.');
Only the first alert appears, which indicates that neither variable is global.
Why are they not global? I thought that the Stage.compositionReady event handler was the place to store functions and variables that are global to all symbols.