# Extracting the name of the swf file invoking an action script

**URL:** <https://forum.kirupa.com/t/extracting-the-name-of-the-swf-file-invoking-an-action-script/234079>\
**Category:** flash\
**Created:** [July 30, 2007, 1:03pm UTC](https://forum.kirupa.com/t/extracting-the-name-of-the-swf-file-invoking-an-action-script/234079 "2007-07-30T13:03:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajayv](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@ajayv](https://forum.kirupa.com/u/ajayv)\
**Post date:** [July 30, 2007, 1:03pm UTC](https://forum.kirupa.com/t/extracting-the-name-of-the-swf-file-invoking-an-action-script/234079/1 "2007-07-30T13:03:04Z")

</div>

Hi all,  
I am building an application where a single action script code is compiled and stored in different names, and based on the name of the swf file invoking the script the script has to do different actions. I need to know is there a way to do this? I mean extracting the name of the swf file invoking the script and inherently use it in the script too, i.e. during run time…  
Please help… this is a big priority for me…

PS: My problem is swfs compiled using the same action script code needs to read different xml files based on the name of the swf file. If u can think of a way to achieve this my problem is solved.

Thanks in advance for all, and please help.  
Ajay V
