1 Reply Latest reply on Nov 6, 2007 11:33 PM by takizabc

    javascript error when using ExternalInterface.addCallback  with crossdomain swf file

    takizabc
      how can i use ExternalInterface.addCallback when using javascript access from Server A (html) to Server B (swf) ? coz it showing error?

      Server A
      192.168.0.10/XXX/example.html
      ===========
      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
      id="MGSInsurances1" width="960" height="600"
      codebase=" http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
      <param name="movie" value=" http://192.168.0.22/MGS/flex/MGSInsurances1.swf" />
      <param name="quality" value="high" />
      <param name="bgcolor" value="#869ca7" />
      <param name="allowScriptAccess" value="always" />
      <embed src=" http://192.168.0.22/MGS/flex/MGSInsurances1.swf" quality="high" bgcolor="#869ca7"
      width="960" height="600" name="MGSInsurances1" align="middle"
      play="true"
      loop="false"
      quality="high"
      allowScriptAccess="always"
      type="application/x-shockwave-flash"
      pluginspage=" http://www.adobe.com/go/getflashplayer">
      </embed>
      </object>
      <script language="javascript">
      window.MGSInsurances1 = document.getElementById('MGSInsurances1');
      </script>

      Server B
      192.168.0.22/MGS/flex/MGSInsurances1.swf
      ==================

      Security.allowDomain("*");

      if(ExternalInterface.available)
      {
      ExternalInterface.addCallback("onchange",onchange);
      ExternalInterface.addCallback("datachange",datachange);
      }

      but javascript Error is showing "Unknown name", how can i fix it? urgent! somebody know this?