# Accessing loaded swf-s dynamic text field

**URL:** <https://forum.kirupa.com/t/accessing-loaded-swf-s-dynamic-text-field/306120>\
**Category:** Uncategorized\
**Created:** [March 10, 2010, 12:53am UTC](https://forum.kirupa.com/t/accessing-loaded-swf-s-dynamic-text-field/306120 "2010-03-10T00:53:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luka66\_6](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@luka66\_6](https://forum.kirupa.com/u/luka66_6)\
**Post date:** [March 10, 2010, 12:53am UTC](https://forum.kirupa.com/t/accessing-loaded-swf-s-dynamic-text-field/306120/1 "2010-03-10T00:53:52Z")

</div>

Hi

I have a strange problem that i can not solve. I googled i checked this forum and [actionscript.org](http://actionscript.org) but i can not find solution to my problem. Here it is:  
I my main swf i load preloader swf that contains two layers on time line. First layer is gradient shape and second layer is dynamic text field with instance name preloaderTxt that i am trying to access. Well i load it with sucess and in event complete i have this code:

```auto
    preloader = new Sprite();
    preloader = Sprite(loader.content);
    preloaderHolder = new Sprite();
    stage.addChild(preloaderHolder);
    preloaderHolder.addChild(preloader);

```

I tryed this:

```auto
trace(preloader.getChildAt(1));
    trace(preloader.getChildAt(1).name);

```

First trace is: [object TextField]  
Second trace is: preloaderTxt

But when i try to set its text property like this:

```auto
preloader.getChildAt(1).text = "test"

```

i get this error: 1119: Access of possibly undefined property text through a reference with static type

```auto
flash.display:DisplayObject.

```

What am i doing wrong?

Tnx  
Luka
