# Getting a JavaScript Variable into Flash

**URL:** <https://forum.kirupa.com/t/getting-a-javascript-variable-into-flash/252104>\
**Category:** flash\
**Created:** [February 15, 2008, 11:51pm UTC](https://forum.kirupa.com/t/getting-a-javascript-variable-into-flash/252104 "2008-02-15T23:51:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![madhat](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@madhat](https://forum.kirupa.com/u/madhat)\
**Post date:** [February 15, 2008, 11:51pm UTC](https://forum.kirupa.com/t/getting-a-javascript-variable-into-flash/252104/1 "2008-02-15T23:51:56Z")

</div>

[FONT=Arial]Greetings All,  
I am a longtime lurker of [Kirupa.com](http://Kirupa.com) and have learned so much here over the last several years. What a great resource!

I am having trouble finding information about passing a JavaScript variable into my flash movie. I am using flash CS3 and actionscript 2.0. I have developed a flash menu for a website. When a page of the site loads, I would like to tell my flash movie to GoToAndStop on a certain frame of my menu. The frame number would be a variable defined in javascript at the top of my page. I can’t seem to find a straightforward explanation about how to make this happen.

Has anyone tried this, or know of any good resources/tutorials to learn more about this? Any help is greatly appreciated!  
Thanks!  
[/FONT]
