# Looking up a document class name at runtime

**URL:** <https://forum.kirupa.com/t/looking-up-a-document-class-name-at-runtime/247066>\
**Category:** flash\
**Created:** [December 18, 2007, 4:57am UTC](https://forum.kirupa.com/t/looking-up-a-document-class-name-at-runtime/247066 "2007-12-18T04:57:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmintmier](https://avatars.discourse-cdn.com/v4/letter/k/a88e57/32.png) [@kmintmier](https://forum.kirupa.com/u/kmintmier)\
**Post date:** [December 18, 2007, 4:57am UTC](https://forum.kirupa.com/t/looking-up-a-document-class-name-at-runtime/247066/1 "2007-12-18T04:57:28Z")

</div>

I’m trying to find a way to look up a document class name. I haven’t found anything obvious and Google isn’t turning up anything, so I figured it was time to ask the experts. (I also did a quick search of these forums.) So far, my preferred solution seems to be to have an AppInfo class that contains a static String called “documentClassName”. I can’t help but think there must be a native way to look up the name at runtime. Does anyone have any clever tricks to share?

Sub-Question 1: I realize this gets a bit muddy when you load an external SWF. Is there a way to look up and/or differentiate between the document class names of the “top level” SWF and any loaded SWF?

Sub-Question 2: Would this type of reflection pose a security risk?

Thanks in advance, even if the answer is a simple “no”.
