# \[FMX\] Difficulty with passing variable from HTML to SWF

**URL:** <https://forum.kirupa.com/t/fmx-difficulty-with-passing-variable-from-html-to-swf/104692>\
**Category:** Uncategorized\
**Created:** [March 18, 2004, 5:51pm UTC](https://forum.kirupa.com/t/fmx-difficulty-with-passing-variable-from-html-to-swf/104692 "2004-03-18T17:51:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![danhq](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@danhq](https://forum.kirupa.com/u/danhq)\
**Post date:** [March 18, 2004, 5:51pm UTC](https://forum.kirupa.com/t/fmx-difficulty-with-passing-variable-from-html-to-swf/104692/1 "2004-03-18T17:51:04Z")

</div>

hello,

i desperately need help with this…

i’ve been trying - with absolutely no success - to pass a variable from an SWF on an index page to an SWF on the next page (in this case home.asp).

i am using the following method:

in the index page when a menu button is clicked i pass the value in the string  
[AS]getURL(“home.asp?jumpTo=aboutus”, “\_top”, “GET”);[/AS]

then on home.asp i drop the value into the SWF link (both the object and embed tags):  
myswf.swf?jumpTo=\<%=request.querystring(“jumpTo”)%\>

in the SWF i then attempt to use the value of “jumpTo” like this:  
(this is on the first frame of the SWF)  
[AS]if(jumpTo==aboutus) {  
\_root.button4.gotoAndStop(10);  
\_root.header.attachMovie(“aboutID”, “attachedAbout”, 1);  
getURL (“aboutus.html”, “site”);  
}  
{[/AS]

there are 11 possible values for “jumpTo” and i have a similar “if” statement written for each one. i know the value is being passed from the original SWF to home.asp because when i request the querystring it gives me the correct value. it’s obvious that the SWF embedded in home.asp IS NOT receiving the value.

do i need to declare the variable first? should i use a global variable? is it possible to set up a dynamic variable in the flash movie? how do i do any of this? i’m still rather new to actionscript.

please let me know as soon as humanly possible.

thank you for your help in this matter,  
dan.
