guitz
01-14-2004, 07:35 AM
Hello...
I have a JavaScript code wich allows me to detect the language of a Browser... There is a variable called "code" wich gives me this info when I do an Alert function... (in RED in the code)
I just want to transfer the value of this variable to Flash...
So I have tried with the green line in the code... But it transfer the text "code" to my flash and not the value...
Does anybody knows how to do that ???
:confused:
Here is my HTML code :
<HTML>
<HEAD>
<TITLE>TEST</TITLE>
<SCRIPT LANGUAGE="JavaScript1.2">
<!--
if (navigator.appName == 'Netscape') var language = navigator.language;
else var language = navigator.browserLanguage;
var code = language.substring(0,2);
alert(code);
//-->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#ffffff">
<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
CODEBASE="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
ID="vague" WIDTH="465" HEIGHT="100">
<PARAM NAME=movie VALUE="root.swf?codeTxt=code" >
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#ffffff>
<EMBED SRC="root.swf" QUALITY=high BGCOLOR=#ffffff WIDTH="465" HEIGHT="100"
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
</BODY>
</HTML>
CodeTxt is the name of my dynamic txt field in Flash
I have a JavaScript code wich allows me to detect the language of a Browser... There is a variable called "code" wich gives me this info when I do an Alert function... (in RED in the code)
I just want to transfer the value of this variable to Flash...
So I have tried with the green line in the code... But it transfer the text "code" to my flash and not the value...
Does anybody knows how to do that ???
:confused:
Here is my HTML code :
<HTML>
<HEAD>
<TITLE>TEST</TITLE>
<SCRIPT LANGUAGE="JavaScript1.2">
<!--
if (navigator.appName == 'Netscape') var language = navigator.language;
else var language = navigator.browserLanguage;
var code = language.substring(0,2);
alert(code);
//-->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#ffffff">
<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
CODEBASE="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
ID="vague" WIDTH="465" HEIGHT="100">
<PARAM NAME=movie VALUE="root.swf?codeTxt=code" >
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#ffffff>
<EMBED SRC="root.swf" QUALITY=high BGCOLOR=#ffffff WIDTH="465" HEIGHT="100"
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
</BODY>
</HTML>
CodeTxt is the name of my dynamic txt field in Flash