# Loading swf with variable name

**URL:** https://forum.kirupa.com/t/loading-swf-with-variable-name/21660
**Category:** Uncategorized
**Created:** [May 24, 2003, 5:08pm UTC](https://forum.kirupa.com/t/loading-swf-with-variable-name/21660 "2003-05-24T17:08:59Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hihabyte](https://avatars.discourse-cdn.com/v4/letter/h/4491bb/32.png) [@hihabyte](https://forum.kirupa.com/u/hihabyte)
#### Post date: [May 24, 2003, 5:08pm UTC](https://forum.kirupa.com/t/loading-swf-with-variable-name/21660/1 "2003-05-24T17:08:59Z")

</div>

Hello!  
This is what I have: I have a variable called “Tag01”  
This is what I would like to do, but again, I don’t know how:  
I want to load an swf called “Tag01.swf” but because tag01 is a variable, a different movie should be loaded for every different value of “tag01”  
I’ll give an example:

If the value of “tag01” is set to “homepage”, “homepage.swf” should be loaded when loadmovie(tag01.swf) is executed.  
But if the value of “tag01” is changed and is set to “guitarpage”, the next time loadmovie(tag01.swf) is executed, “guitarpage.swf” should be loaded in my movieclip.

I hope you understand?  
How can I do this?

Thanks!!

---

<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: [May 24, 2003, 5:24pm UTC](https://forum.kirupa.com/t/loading-swf-with-variable-name/21660/2 "2003-05-24T17:24:35Z")

</div>

it should be

```auto
tag01 = "homepage";
loadMovie(tag01+".swf");

```

🙂

---

<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: [May 24, 2003, 5:40pm UTC](https://forum.kirupa.com/t/loading-swf-with-variable-name/21660/3 "2003-05-24T17:40:42Z")

</div>

thanks ahmed!  
I think my problem must be elsewhere, because I already tried the tip you just gave me, and it didn’t work. But others gave me the same tip, so I’ll have to check the script line by line to find the bug.

bye!
