3 Replies Latest reply on Apr 24, 2007 11:07 AM by cadflash2

    ExternalInterface.addCallback with IE7.0

    cadflash2 Level 1
      I have an object identifier error with ExternalInterface.addCallback on IE7.0. This works fine with IE 6.0 and firefox 1.5. Following is the flash code and html code. Please tell me how should I address this?

      import flash.external.*;
      var flashFunction:String = "callPlayTest";
      var instance:Object = null;
      var realFunction:Function = playTest;
      ExternalInterface.addCallback(flashFunction, null, realFunction);
      function playTest(tgX:Number, tgY:Number, spd:Number):Void {
      text_txt.text ="Testing External Interface";

      <html xmlns=" http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

      <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="550" height="400" id="myMovie2" align="middle" VIEWASTEXT>
      <param name="allowScriptAccess" value="always" />
      <param name="movie" value="myMovie2.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="myMovie2.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="myMovie2" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage=" http://www.macromedia.com/go/getflashplayer" />
      <form ID="Form1">
      <input type="button" onClick="callExternalInterface()" value="Call Flash Function" />
      <form name="inputValue">
      Positon X <input type="text" name="x" size="10" >
      Position Y <input type="text" name="y" size="10" >
      Speed <input type="text" name="spd" size="10" >
      <script language="JavaScript">
      function callExternalInterface() {
      getMovieName("myMovie2").callPlayTest(inputValue.x.value, inputValue.y.value, inputValue.spd.value);
      function getMovieName(movieName) {
      if (navigator.appName.indexOf("Microsoft") != -1) {
      return window[movieName]
      else {
      return document[movieName]