# Getting filename of externally loaded swf

**URL:** <https://forum.kirupa.com/t/getting-filename-of-externally-loaded-swf/316137>\
**Category:** flash\
**Created:** [November 13, 2010, 8:03pm UTC](https://forum.kirupa.com/t/getting-filename-of-externally-loaded-swf/316137 "2010-11-13T20:03:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aspect\_eleven](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@aspect\_eleven](https://forum.kirupa.com/u/aspect_eleven)\
**Post date:** [November 13, 2010, 8:03pm UTC](https://forum.kirupa.com/t/getting-filename-of-externally-loaded-swf/316137/1 "2010-11-13T20:03:22Z")

</div>

Hi, all, I am trying to figure out how to get the actual filename of an external .swf when loaded into another movie clip.

```auto
var toTrace:String = getChildAt(0).name;
trace(toTrace);

```

That is what I have. It gives me the instance name, which does me no good, because it is a relative instance name. My situation is that I have a few buttons, when clicked they load external .swf into the stage at index 0. I need to know how to reference the currently loaded external file.

-ae
