# Get the URL of the .swf-file

**URL:** https://forum.kirupa.com/t/get-the-url-of-the-swf-file/264516
**Category:** Uncategorized
**Created:** [June 26, 2008, 7:35pm UTC](https://forum.kirupa.com/t/get-the-url-of-the-swf-file/264516 "2008-06-26T19:35:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Wampiro\_UHA](https://avatars.discourse-cdn.com/v4/letter/w/eb9ed0/32.png) [@Wampiro\_UHA](https://forum.kirupa.com/u/Wampiro_UHA)
#### Post date: [June 26, 2008, 7:35pm UTC](https://forum.kirupa.com/t/get-the-url-of-the-swf-file/264516/1 "2008-06-26T19:35:44Z")

</div>

I want to check what the name of the file containing my .swf-file is.

I’ve tried something like:

createObjectFromURLEncoded();

function createObjectFromURLEncoded() {  
var query:String = flash.external.ExternalInterface.call(“function get\_url() { return window.location.toString(); }”).split("?")[0];  
\_root.testtxt.text = query;  
}

where my dynamic text-field should display the name of the file (for example index.php). But it doesn’t work. Any ideas?

---

<div class="post-metadata">

### Author: ![glosrfc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/glosrfc/32/8334_2.png) [@glosrfc](https://forum.kirupa.com/u/glosrfc)
#### Post date: [June 26, 2008, 8:26pm UTC](https://forum.kirupa.com/t/get-the-url-of-the-swf-file/264516/2 "2008-06-26T20:26:29Z")

</div>

> **[retrieving file path](https://www.kirupa.com/forum/showthread.php?291397-retrieving-file-path&s=eb1d0955cc701c3ccc57ae2ffa24270d&p=2296745#post2296745)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!
