title: How to define global variables in flash cs5.5?
body: <p>I can't find if there is a way to define a variable which can be accessed from anywhere in the project in Actionscript 3.0 using Flash CS5.5.</p>
  
  <p>I tried this:</p>
  
  <pre><code>_global.myScore = 0;
  </code></pre>
  
  <p>which i got from <a href="http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00000052.html" rel="nofollow">adobe_website</a> but it didn't work.</p>
  
  <p>Can anyone help or give any clue?  </p>
  
  <p>EDIT: I just tried the most easiest way and it looks like it's working but i'm not sure. I just created a new layer and i defined the variable in the first frame:</p>
  
  <pre><code>var myvar:int=0;
  </code></pre>
  
  <p>Is this way correct?</p>