5 Replies Latest reply on Aug 3, 2009 8:41 PM by haibin_sh

    ExternalInterface.call returns null in IE even when the function is available




      I have a question here about ExternalInterface.


      In MXML, I have





      var result1:String = ExternalInterface.call("isValidRegExp1", string);







      if (result1 == null) {


           trace("result1 is null");


           throw new Error("isValidRegExp1 error");

      } else {


           trace("result1: " + result1);



      In HTML, I have



           function isValidRegExp1(regexpString)



                return "haibin"




      I test it in FireFox and see the alert window and "result1: haibin" in log file. But in IE, I see the alert window and "result1 is null" in log file.


      The document says "If the function is not available, the call returns null" Any idea why IE returns null even when the function is called?