title: Getting an Int in another frame ActionScript 3.0
body: <p>I am currently working on a casino game (for my school) but I am encountering a problem:</p>
  
  <pre><code>var a:int //this part is in frame 1
  
  a = 10000
  money.text = ""+a //this part is working
  
  
  //this part is in another frame
  lost_BTN.addEventListener(MouseEvent.CLICK, lost)
  
  function lost (e:MouseEvent)
  {
  cash.text = ""+a -=50 //*1 (please see below)
  }
  </code></pre>
  
  
  
  <pre><code>*1) Scene 1, Layer 'Layer 1', Frame 6, Line 36  1050: Cannot assign to a non-reference value.
  
  *1) Scene 1, Layer 'Layer 1', Frame 6, Line 36  1067: Implicit coercion of a value of type String to an unrelated type Number.
  
  *1) Scene 1, Layer 'Layer 1', Frame 6, Line 36  1067: Implicit coercion of a value of type Number to an unrelated type String.
  </code></pre>
  
  <p>I cant seem to get the information out of 'a' in another frame.</p>