# Passing querystring to flash \[F5\]

**URL:** <https://forum.kirupa.com/t/passing-querystring-to-flash-f5/22041>\
**Category:** Uncategorized\
**Created:** [May 29, 2003, 1:53pm UTC](https://forum.kirupa.com/t/passing-querystring-to-flash-f5/22041 "2003-05-29T13:53:58Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![dshallenberger](https://avatars.discourse-cdn.com/v4/letter/d/ecccb3/32.png) [@dshallenberger](https://forum.kirupa.com/u/dshallenberger)\
**Post date:** [May 29, 2003, 1:53pm UTC](https://forum.kirupa.com/t/passing-querystring-to-flash-f5/22041/1 "2003-05-29T13:53:58Z")

</div>

I am new to this kind of actionscript, and someone on the 5th floor has the flash books, and I can’t locate them. If anyone could help, I would greatly appreciate it.

I have a client that needs a flash intro that will be accessed through a link in an email campaign. When the user clicks the link in their email, it sends them to this flash intro, but also sends a querystring with it. I need the flash file (v5) to read the querystring, use it during the movie, and then pass it on to an asp page when the intro is done playing.

What is the best method to do this?

Thanks,  
Dan

---

<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 29, 2003, 7:14pm UTC](https://forum.kirupa.com/t/passing-querystring-to-flash-f5/22041/2 "2003-05-29T19:14:12Z")

</div>

Here’s a solution I got help with from a distant friend:

Put the querystring values dynamically into the \<param…\> and \<embed…\> tags, after the name of the flash file. Then, the flash movie stores those values, and when I redirect at the end of the movie, just redirect with GET to an ASP page that can then capture those values passed.

Just wanted to share this with everyone in case someone had the same problem in the future. If my description is confusing and your interested more, I can supply a .fla and .asp sample.

Dan

---

<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 30, 2003, 1:55pm UTC](https://forum.kirupa.com/t/passing-querystring-to-flash-f5/22041/3 "2003-05-30T13:55:15Z")

</div>

heyyy im trying to do that… can u post an .fla so i can see what you mean by that exactly 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 30, 2003, 2:45pm UTC](https://forum.kirupa.com/t/passing-querystring-to-flash-f5/22041/4 "2003-05-30T14:45:08Z")

</div>

yeah not many people seem to know about the query string option in the object and embed tags. When you generate the page the flash movie is in, just put the query string after the .swf in the object and embed tags to add those variables to \_root (note this may not function correctly testing locally; theres a technote about this over at MM’s site).

sending out info from Flash is common and examples are all over the place. Im sure dshallenberger will post his 🙂

---

<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 30, 2003, 4:03pm UTC](https://forum.kirupa.com/t/passing-querystring-to-flash-f5/22041/5 "2003-05-30T16:03:23Z")

</div>

i know but what i wanna know is how to pass a querystring from the html url?? not from html page… if i can pass variable from html url i can pass different values for the variables… thats what i wanna do

---

<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 30, 2003, 4:20pm UTC](https://forum.kirupa.com/t/passing-querystring-to-flash-f5/22041/6 "2003-05-30T16:20:13Z")

</div>

youd be doing that through your asp page generating the content of the page (passing the query string to the flash embed) dynamically

---

<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 30, 2003, 4:29pm UTC](https://forum.kirupa.com/t/passing-querystring-to-flash-f5/22041/7 "2003-05-30T16:29:03Z")

</div>

woahhhhhhhhh thanks man… you answered my question :)… thanks… 😃 can i get some help with a asp or php page?? please… to pass variable from the url to the flash parameters???

what i wanan basically do it make my website which is in flash is… give direct links to specific pages in flash…

---

<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 30, 2003, 5:38pm UTC](https://forum.kirupa.com/t/passing-querystring-to-flash-f5/22041/8 "2003-05-30T17:38:07Z")

</div>

well tested it … it worked out… thanks for all ur help 🙂

---

<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 30, 2003, 9:18pm UTC](https://forum.kirupa.com/t/passing-querystring-to-flash-f5/22041/9 "2003-05-30T21:18:45Z")

</div>

Sorry I disappeared for a bit trying to get this project done. Then, the site and flash posted live today, and the client has MAJOR changes, last minute, and the mailing promoting the site mailed this morning! AAARRGHH!

Anyhow, I’ve attached my asp page, not the .fla. The .fla file only has a getURL with GET statement at the end of the movie. The work of passing the variable values is done in this .asp page.

If you need anything else I can help with, let me know.

Dan

---

<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:** [June 4, 2003, 8:24am UTC](https://forum.kirupa.com/t/passing-querystring-to-flash-f5/22041/10 "2003-06-04T08:24:28Z")

</div>

Thanks for the Text File on that last post… but that part I already knew how to take care of. The part I don’t know, is how do I grab those variables within the Flash file?

Please can you show me the exact command to grab a variable called ‘ID’ which contains an integer.

From what I can tell it appears to be something along the lines of

MyID = \_root.ID

Help on this matter would be greatly appreciated.
