# Getting a Flash movie name

**URL:** <https://forum.kirupa.com/t/getting-a-flash-movie-name/102251>\
**Category:** Uncategorized\
**Created:** [February 21, 2004, 9:53am UTC](https://forum.kirupa.com/t/getting-a-flash-movie-name/102251 "2004-02-21T09:53:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HTuttle](https://avatars.discourse-cdn.com/v4/letter/h/ba9def/32.png) [@HTuttle](https://forum.kirupa.com/u/HTuttle)\
**Post date:** [February 21, 2004, 9:53am UTC](https://forum.kirupa.com/t/getting-a-flash-movie-name/102251/1 "2004-02-21T09:53:34Z")

</div>

(Okay, the response was so quick and helpful with my last question I thought I’d post another)

Is there an efficient way to get the name of the Flash file you are in via actionscript? i.e. from within ‘My\_Flash.swf’ I want to get THAT name. (Something like ‘myName = the movieName’ in Director)

All I could find so far was the \_url property which holds the entire path string and also requires the extra code to check for and clean up any odd character replacements. (i.e. My\_Flash\_Fancy\_Thing.swf becomes My%5FFlash%5FFancy%5FThing.swf in a url)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 21, 2004, 10:46am UTC](https://forum.kirupa.com/t/getting-a-flash-movie-name/102251/2 "2004-02-21T10:46:58Z")

</div>

```auto
var movieName = unescape(this._url).split("/").reverse()[0];

```

…If you find something easier than that, let me know. 😛

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 23, 2004, 3:37pm UTC](https://forum.kirupa.com/t/getting-a-flash-movie-name/102251/3 "2004-02-23T15:37:02Z")

</div>

RE: var movieName = unescape(this.\_url).split("/").reverse()[0];

Thank you kobe, that does the trick.  
(I hadn’t discovered the ‘escape-unescape’ functions yet. )

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 23, 2004, 3:38pm UTC](https://forum.kirupa.com/t/getting-a-flash-movie-name/102251/4 "2004-02-23T15:38:46Z")

</div>

Sorry, make that ‘Thank you \<b\>kode\</b\>!’
