Hi,
I have been having some problems passing information from JS to a SWF
What i want to so is when i press a BTN in my HTML Page that it calles a JS Funcrion and calls a function inside flash.

any ideas how to do this?

my SWF is really simple i just have 1 text field called myText and on the action leyer i have

code:


pickTest = function(){
myText.text = "123"
}





HTML HEADER



HTML Code:
<script language="javascript" type="text/javascript">
 function getText(returnText){
            alert(returnText)
            
            if (navigator.appName.indexOf("Microsoft") != -1){
                window["spell_check"].pickTest();
            }else {
                document["spell_check"].pickTest();
            }
        }
    </script>


BODY


HTML Code:
 <script language="javascript">
	if (AC_FL_RunContent == 0) {
		alert("This page requires AC_RunActiveContent.js.");
	} else {
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
			'width', '550',
			'height', '400',
			'src', 'spell_check',
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'window',
			'devicefont', 'false',
			'id', 'spell_check',
			'bgcolor', '#ffffff',
			'name', 'spell_check',
			'menu', 'true',
			'allowFullScreen', 'false',
			'allowScriptAccess','sameDomain',
			'movie', 'spell_check',
			'salign', ''
			); //end AC code
	}
</script>
<noscript>
	<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="550" height="400" id="spell_check" align="middle">
	<param name="allowScriptAccess" value="sameDomain" />
	<param name="allowFullScreen" value="false" />
	<param name="movie" value="spell_check.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />	<embed src="spell_check.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="spell_check" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
	</object>
</noscript>
    
    
    <input type="button" value="OpenNewWindow" onclick="getText(123)" />

Thanks for all the help