# Passing variable swf to swf

**URL:** <https://forum.kirupa.com/t/passing-variable-swf-to-swf/284805>\
**Category:** Uncategorized\
**Created:** [March 23, 2009, 8:50pm UTC](https://forum.kirupa.com/t/passing-variable-swf-to-swf/284805 "2009-03-23T20:50:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shayna](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/shayna/32/1187_2.png) [@Shayna](https://forum.kirupa.com/u/Shayna)\
**Post date:** [March 23, 2009, 8:50pm UTC](https://forum.kirupa.com/t/passing-variable-swf-to-swf/284805/1 "2009-03-23T20:50:33Z")

</div>

Hi-

I am able to pass a variable from an html link that loads a separate html file and instructs the embedded file to go to a specific frame.  
But - I now need a link within an swf file on one page to open a new page and tell that swf to start on a specific frame and it is not working. Here is the code I use for the first example - works like a champ:

html file 1

```auto
<a href="fullpage.html?stateVar=19">Go here</a>

```

html file 2 swf embed code with variable info:

```auto
    <script type="text/javascript">
        // <![CDATA[
        
        var so = new SWFObject("yourSWF.swf", "sotester", "500", "500", "8", "#FF6600");
        so.addVariable("stateVar", getQueryParamValue("stateVar"));
        so.addParam("scale", "noscale");
        so.write("flashcontent");
        
        // ]]>
    </script>

```

code in my swf that helps it get to that specific frame that was passed in:

```auto
trace(stateVar); gotoAndStop(stateVar); // etc... 

```

all works - BUT when I try to use a link from an embedded swf on page 1 instead of a html link - it does not work. Here is the code on my button in that swf:

```auto

on (release) {
        
        getURL("fullpage.html?stateVar=19");

}

```

any help so appreciated!  
Shawna
