hi, am looking for flash to javascript function calling external interface using AS3

how can we call it? as i tried different ways but not working...

check link - here


Flash code i.e.

Actionscript Code:
import flash.external.ExternalInterface;
import flash.system.Security;


show_btn.addEventListener(MouseEvent.CLICK, popup);

function popup(event:MouseEvent):void {
        //trace(ExternalInterface.available);
        Security.allowDomain("*");
        //ExternalInterface.call("showlayer()");
        //ExternalInterface.call("alert", "hello world");
        ExternalInterface.call("setVisibility","sub3", "inline");
//getURL("javascript:showlayer('myName')");

}



hide_btn.addEventListener(MouseEvent.CLICK, myBtnClicked);
function myBtnClicked(event:MouseEvent):void {
//navigateToURL(new URLRequest("javascript:showlayer()"));
ExternalInterface.call("loadnext", 1, 2);
//navigateToURL(new URLRequest("javascript:showlayer('myName')"));
}


Html code i.e.
Actionscript Code:
<html>
<head>
<title></title>
<style type="text/css">
div {
position: absolute;
left: 100px;
top: 200px;
background-color: #f1f1f1;
width: 180px;
padding: 10px;
color: black;
border: #0000cc 2px dashed;
display: none;
}
</style>

<script language="JavaScript">
function setVisibility(id, visibility) {
document.getElementById(id).style.display = visibility;
}

function myfadeout(){
// alert("myfadeout is called");
$('#box1').delay(3000).fadeOut(500);

}

</script>


<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script language="javascript" src="show_layer.js"></script>
</head>
<body >

<input type=button name=type value='Show Layer' onClick="setVisibility('sub3', 'inline');";>
<input type=button name=type value='Hide Layer' onClick="setVisibility('sub3', 'none');";>

<div id="sub3">Message Box</div>

<p>
  <script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','250','height','100','src','lay','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','allowscriptaccess','always','movie','lay' ); //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,28,0" width="250" height="100">
   
    <param name="movie" value="lay.swf">
    <param name="quality" value="high">
    <param name="allowscriptaccess" value="always";>
   
    <embed src="lay.swf" width="250" height="100" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" allowscriptaccess="always"></embed>
  </object>
</noscript>
</p>

<div id="myName">Antonio</div>
<a href="#" onClick="javascript:showlayer('myName')">Show/Hide Layer</a>
</body>
</html>