I'm using Flex 4.6 and have a AIR application

I have a Panel with many labels on it. I need to access these labels from another class.
I don't want to pass all the labels objects. so I thought about passing the panel container in then access the labels through the getElementByName() method.

Here is my mark up:

```
<s:VGroup includeIn="SLA_textView" width="100%" height="100%"
paddingBottom="10" paddingRight="10">
<s:Panel id="SlaTextViewPanel" width="100%" height="100%"
 title="test View">
   <s:Label id="lbTotalBooks" name="test" x="82" y="62" />
</s:Panel>
</s:VGroup>

```

the actionscript code look like this:

```
getLabels(Container:Panel){
  var _Container:Panel = Container;

//var tempLabel:Label =  _Container.getChildByName("test") as Label;

var n:int = _Container.numChildren;
  for (var i:int = 0; i < n; i++) {
    var c:DisplayObject = _Container.getChildAt(i); 
    trace(c.name);
}

var tempLabel:Label =  _Container.getChildByName("test") as Label;

```

Why is `tempLabel` always `null`? 

So I tried to loop through the name of the object on the Panel and the test label don't even show up? so I have something wrong somewhere. 

Trace:

```
instance1333
PanelSkin1074

```