# Fx - Problem accessing stage - property undefined

**URL:** <https://forum.kirupa.com/t/fx-problem-accessing-stage-property-undefined/259622>\
**Category:** flash\
**Created:** [May 7, 2008, 8:42am UTC](https://forum.kirupa.com/t/fx-problem-accessing-stage-property-undefined/259622 "2008-05-07T08:42:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![beyond\_cool](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@beyond\_cool](https://forum.kirupa.com/u/beyond_cool)\
**Post date:** [May 7, 2008, 8:42am UTC](https://forum.kirupa.com/t/fx-problem-accessing-stage-property-undefined/259622/1 "2008-05-07T08:42:10Z")

</div>

What am I doing wrong in the code below? I just want to stick a label to the stage.

I know I can \<mx:label text=“hello world”\> but I want/need to use this method because I have an AS class that needs a stage reference.

```auto

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    
    <mx:Script>
        <![CDATA[
            import mx.controls.Label;
            
            private static var labeltje:Label = new Label();
            labeltje.text = "Hello World";
            
            stage.addChild(labeltje);
            
        ]]>
    </mx:Script>
    
</mx:Application>

```

1120: Access of undefined property stage
