# Stage is null problem

**URL:** <https://forum.kirupa.com/t/stage-is-null-problem/286917>\
**Category:** Uncategorized\
**Created:** [April 22, 2009, 8:28pm UTC](https://forum.kirupa.com/t/stage-is-null-problem/286917 "2009-04-22T20:28:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CoreyC](https://avatars.discourse-cdn.com/v4/letter/c/e0b2c6/32.png) [@CoreyC](https://forum.kirupa.com/u/CoreyC)\
**Post date:** [April 22, 2009, 8:28pm UTC](https://forum.kirupa.com/t/stage-is-null-problem/286917/1 "2009-04-22T20:28:57Z")

</div>

TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at QuizApp/createStatusBox()  
at QuizApp()

Thats the error messege i get when it tries to play. What I have is an swf that loads another when its done, the new swf is blank but has a document class to an AS file.  
It seems the problem lies when a function is not properly being added to the stage.  
Any help would be greatly appreciated.

The function is added like this…

```auto

package{
   public class QuizApp extends Sprite{
       public function QuizApp(){
           createButtons();
...
private function createButtons() {  
   if (this.stage == null) { 
   trace("STAGE IS NULL!!!");
   }
   var yPosition:Number;
   addEventListener(Event.ADDED_TO_STAGE, addedToStage);
...

```
