# Passing values from URL to Flash

**URL:** <https://forum.kirupa.com/t/passing-values-from-url-to-flash/239644>\
**Category:** flash\
**Created:** [September 24, 2007, 1:33pm UTC](https://forum.kirupa.com/t/passing-values-from-url-to-flash/239644 "2007-09-24T13:33:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hommer](https://avatars.discourse-cdn.com/v4/letter/h/a3d4f5/32.png) [@Hommer](https://forum.kirupa.com/u/Hommer)\
**Post date:** [September 24, 2007, 1:33pm UTC](https://forum.kirupa.com/t/passing-values-from-url-to-flash/239644/1 "2007-09-24T13:33:24Z")

</div>

I’m making a Flash invitation to a party, and I want to send it via e-mail.  
So I want to pass a variable to Flash in the URL like this:  
[www.mydomain.com/index.html?nameID=23](http://www.mydomain.com/index.html?nameID=23)

Flash contains a list of people invited to the party.  
So when Flash reads nameID = 23 it shows the name linked to # 23.  
E.g. “Dear Thomas, please come to my party bla bla bla…”

This way I only have to change the nameID in the e-mails I send.

I’ve found some sites on the web, that suggests to replace this line in the index.html:

```auto
<param name="movie" value="invitation.swf" />

```

With this:

```auto
<param name="movie" value="invitation.swf?nameID=23" />

```

But it is hard coded and I don’t know any javascript.  
Could anyone make a script, that takes the nameID from the URL and puts it behind the “invitation.swf” in the index.html file?

(index.html attached as index.txt)
