External Interface> local = ok server = nope

Hi, guys!

A interesting problem:

I have a function on my fla that executes many things. All these things depends of a number parameter.

Ok. No problem with this. But now I must call this function through a html link at the same flash´s page.

So, my way is the External Interface class.

When I try it at my local pc, everything is great. But when I upload it, it stops working!

The flash code:

// importing the flash external interface:
import flash.external.ExternalInterface;
// the function:
function pedirAnunciante(codigoAnunciante) {
// many codes here…
}
// the addCallBack method:
ExternalInterface.addCallback(“pedirAnunciante”, this, pedirAnunciante);

The HTML code:

<html xmlns=“XHTML namespace” xml:lang=“en” lang=“en”>
<head>
<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1” />
<title>interna_javascript</title>
<script language=“JavaScript”>
var flash;
//
window.onload = function() {
if(navigator.appName.indexOf(“Microsoft”) != -1) {
flash = window.vitrine;
}else {
flash = window.document.[COLOR=Red]vitrine; [/COLOR]
}
}
//
//
function comandaFlash(num) {
flash.pedirAnunciante(num);
//alert(num);
}
//
</script>
</head>
<body bgcolor=“#ffffff”>
<object classid=“clsid:d27cdb6e-ae6d-11cf-96b8-444553540000” codebase=“http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0” width=“775” height=“630” [COLOR=Red]id=“vitrine”[/COLOR] align=“middle”>
<param name=“allowScriptAccess” value=“sameDomain” />
<param name=“movie” value=“interna_javascript.swf” />
<param name=“quality” value=“high” />
<param name=“bgcolor” value=“#ffffff” />
<embed src=“interna_javascript.swf” [COLOR=Red]id=“vitrine” [/COLOR]quality=“high” bgcolor=“#ffffff” width=“775” height=“630” name=“interna_javascript” align=“middle” allowScriptAccess=“sameDomain” type=“application/x-shockwave-flash” pluginspage=“http://www.macromedia.com/go/getflashplayer” />
</object>
<br>
<input type=“Button” value=“Anunciante 508” name=“flashInfoButton” [COLOR=Red]onClick=“javascript:comandaFlash(508);”[/COLOR] style=“width:100px;” />
<br>
<input type=“Button” value=“Anunciante 49” name=“flashInfoButton” [COLOR=Red]onClick=“javascript:comandaFlash(49);”[/COLOR] style=“width:100px;” />
<br>
<input type=“Button” value=“Anunciante 427” name=“flashInfoButton” [COLOR=Red]onClick=“javascript:comandaFlash(427);” [/COLOR]style=“width:100px;” />
<br>
</html>