# Pulling swf file name into variable

**URL:** <https://forum.kirupa.com/t/pulling-swf-file-name-into-variable/203017>\
**Category:** open source\
**Created:** [October 6, 2006, 4:11pm UTC](https://forum.kirupa.com/t/pulling-swf-file-name-into-variable/203017 "2006-10-06T16:11:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tampa1adam](https://avatars.discourse-cdn.com/v4/letter/t/4bbf92/32.png) [@Tampa1adam](https://forum.kirupa.com/u/Tampa1adam)\
**Post date:** [October 6, 2006, 4:11pm UTC](https://forum.kirupa.com/t/pulling-swf-file-name-into-variable/203017/1 "2006-10-06T16:11:21Z")

</div>

Question: Is there a method to pull the value of the current swf file’s name? For instance, if I have a movie called 1.swf open is there something I can do like myMovie.name and have the return value be 1.swf?

Problem: I have 24 flash movies. Each movie has different text that needs to be displayed, so what I did was created an HTML file with vars on it like &1=Hello &2=World. Now in my flash movies I load that HTML file, and have a dynamic text box that pulls in the values. This all works, but as it stands I have to change the var the text boxes pull in, and recompile, so instead I was wanting to set the variable to pull in based on the .swf file name, like 1.swf, pulls in the var &1 and 2.swf pulls in the var &2, this way I don’t have to keep recompiling, I could just copy the movie 24 times and rename the movies accordingly.

Any other suggestions here would be appreciated, thanks in advance!
