title: AS3: How do I check and reset variable on the main timeline from inside a movieclip
body: <p>I'm converting an old AS2 file into AS3 (and trying to learn AS3 at the same time).
  A movie clip contains a number of different animated sequences and buttons within the application trigger these different sequences.
  The buttons are functional only when an animation has completed playing.</p>
  
  <p>In AS2, I achieved this with a var called _root.animating which was initially set to "false" and switched to true when the animation played and switched back to false at the end of the anim sequence. The buttons checked this var when clicked. Here is some of the AS2...  </p>
  
  <pre><code>_root.animating = false;    //MC code to reset var at end of each sequence:
  if (animating == false)...  //btn code to check var
  </code></pre>
  
  <p>I dont like putting code inside mc's but this worked reliably and got me past the deadline. Now I want to rework the file in AS3 and I think this strategy has come back to bite me.</p>
  
  <p>Tried simply changing _root to root or stage -- ooh, if it was that easy.
  I read something about global classes and Singletons etc but this seems overkill for this sort of thing.</p>
  
  <p>Any suggestions?? </p>