1 Reply Latest reply on Oct 23, 2007 7:10 PM by dozhang

    ExternalInterface.call() throws ScriptTimeoutError, which can't be caught

    dozhang
      Hi,

      In my flex code, I invoke ExternalInterface.call() to call a c++ function. In this c++ function, a modal dialog will popup. If this modal dialog is open for a long time, a warning dialog will show saying that a function has executed more than 15 seconds. I wanted to catch this error(which should be ScriptTimeoutError) to repress this warning dialog. But I failed.


      In the following code, flex's timeout warning dialog will show, my words won't show:

      try
      {
      ExternalInterface.call("popUpModalDialog");
      }catch(e:Error)
      {
      Alert.show('please don't show timeout dialog');
      }


      But, if I change the code a little bit, flex's timeout warning dialog won't show, my words will show:

      try
      {
      while(true){}
      }catch(e:Error)
      {
      Alert.show('please don't show timeout dialog');
      }


      The examples show that ExternalInterface.call() throws an error which can't be caught.
      Is there a way I can repress this warning dialog?

      Thanks!