Javascript
<embed src= "http://www.webjx.com/htmldata/2005-04-09/javascript_to_flash.swf" Quality=high
width=366 height=142
Type= "Application/x-shockwave-flash"
Pluginspage= "http://www.macromedia.com/shockwave/download/index.cgi?"
P1_prod_version=shockwaveflash "Name=" Myflash "swliveconnect=" true ">
</embed>
2. Insert the following JavaScript into the <Body> tags:
<script Language=javascript>
<!--
var InternetExplorer = Navigator.appName.indexOf ("Microsoft")!=-1;
Function Myflash_dofscommand (command, args) {
var myflashobj = InternetExplorer? myFlash:document.myFlash;
alert (args);
}
if (navigator.appname && navigator.appName.indexOf ("Microsoft")!=-1 &&
Navigator.userAgent.indexOf ("Windows")!=-1 && navigator.userAgent.indexOf ("Windows 3.1") = = 1) {
document.write (' <script language=vbscript\> \ n ');
document.write (' On Error Resume Next \ n ');
document.write (' Sub myflash_fscommand (ByVal command, ByVal args) \ n ');
document.write (' Call Myflash_dofscommand (command, args) \ n ');
document.write (' End sub\n ');
document.write (' </SCRIPT\> \ n ');
}
//-->
</script>
Flash and Flash Communication
With the blending of the two methods above, two or more flash in the same HTML can send messages to each other directly. Send messages to JavaScript from a flash using Fscommand, use flash JavaScript methods to pass messages to another flash
A detailed look here:A communication example between Flash movies
Starting with Flash MX, the local connection object can be used to send messages between flash. This allows two flash movies in the same HTML or in two browser windows to send messages to each other without having to use JavaScript or Fscommand
See here in detail: using the local connection object in Flash MX (English)