Estoy tratando de llamar a una funcion en AS desde Javascript haciendo uso de externalInterface pero... no me sale..
aqui mi codigo AS [ As2 ]
Código :
function callMeFromJavascript() {
mensaje_txt.text = "El mensaje que vino de Javascript";
}Codigo HTML
Código :
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>movie</title>
<script type="text/javascript" src="swfobject.js"></script>
</head>
<body bgcolor="#ffffff">
<div id="flashcontent">
<strong>You need to upgrade your Flash Player</strong>
This is replaced by the Flash content.
Place your alternate content here and users without the Flash plugin or with
Javascript turned off will see this. Content here allows you to leave out <code>noscript</code>
tags. Include a link to <a href="swfobject.html?detectflash=false">bypass the detection</a> if you wish.
</div>
<script language="javascript">
var so = new SWFObject("movie.swf", "flashId", "600", "500", "8", "#336699");
so.addParam("allowScriptAccess", "always");
so.addParam("wmode", "transparent");
so.write("flashcontent");
function a()
{
var myFlashMovie = document.getElementById("flashId");
myFlashMovie.myFunctionId();
}
</script>
<input type="button" value="Llmar" onClick="javascript:a()" />
</body>
</html>var connection = ExternalInterface.addCallback("myFunctionId", null, callMeFromJavascript);
salu2
