title: Actionascript Timer Errors
body: <p>Been working on a game called ChemoBlue for a while now and cannot seem to get rid of this error:</p>
  
  <p><strong>EDIT: I changed a few lines of code and the error is now this:</strong></p>
  
  <pre><code>TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at ChemoBlueSetup/levelUp()[/Users/raphaelhennessy/Desktop/STS/Gold Cinema ChemoBlue/ChemoBlueSetup.as:71]
  </code></pre>
  
  <p>I used to have a lot more errors thrown at me but now this is the only one. Heres the code that creates the error.
  <strong>EDIT: I did some debugging and it seems the error comes from here:</strong></p>
  
  <pre><code>public function levelUp(evt:MouseEvent):void
          {
              if (level == 1)
              {
                  elementName.text = ("water");
                  gotoAndPlay(1, "Level");
              }
                  else if (level == 2)
              {
                  elementName.text = ("sand");
                  gotoAndPlay(1, "Level");
              }
              else if (level == 3)
              {
                  elementName.text = ("???");
                  gotoAndPlay(1, "Level");
              }
              }
  </code></pre>
  
  <p>Thanks in advance,
  -Raph</p>