View Full Version : JavaScript variable to flash

06-02-2006, 01:26 PM
I have got this JavaScript variable, that contain a value, I need to pass on to my flash movie. The variable (GermanChngLanguage) is a slight modification of the courent URL. This is how it is made:

<script language="JavaScript">
var ChngLanguage = self.location.href
var GermanChngLanguage = ChngLanguage.replace("-us.asp", "-d.asp")

For sending it to the flash movie, it needs somehow to be inserted in the following code:

<script type="text/javascript" src="/includes/structure/swfobject.js"></script>
<div id="flashcontent_menu">
Text replaced by flash movie
<script type="text/javascript">
var menu = new SWFObject("/includes/menu/menu-us.swf", "menu-us.swf", "985", "66", "7", "#999999");
menu.addVariable("variabel", "***");

How do I get the value of that variable placed in the third codeline from the bottom? In the place marked with ***?

Thanks in advance.