2 Replies Latest reply on Sep 1, 2011 10:36 AM by mihksoft

    External Interface

    mihksoft Level 1


      Any answer to this problem?
      I have an application with a button and on the click handler I have
      var s:String;
      if (ExternalInterface.available) {
         var wrapperFunction:String = "getString";
         s = ExternalInterface.call(wrapperFunction);
      } else {
         s = "Wrapper not available";

      If I run the application from Flash Builder I get the string from "getString"
      java script function.
      If I change the string and I run the application outside of IDE the string is
      not changed, remain the same with the one from run of the IDE.

      Best Regards,

        • 1. Re: External Interface
          Flex harUI Adobe Employee

          What browser and URL are you using to run outside of the IDE?  Could be a

          security issue.  If you run the HTML/SWF from the same place the IDE puts

          it, it should work, but if you move it, there might be different security


          1 person found this helpful
          • 2. Re: External Interface
            mihksoft Level 1

            I have the same path like when I run it from IDE.

            I used Chrome 13.0...

            IE 8 fails to load show the swf.

            Firefox 6.0


            Here is the HTML file:

            <html lang="en">


            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


            <script language="JavaScript" type="text/javascript">



            <body scroll="no">

            <script language="JavaScript" type="text/javascript">

                function getString() {

                    return "dasdsa dad23 323 ";



              <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

            id="CopyButton" width="100%" height="100%"


            <param name="movie" value="CopyButton.swf" />

            <param name="quality" value="high" />

            <param name="bgcolor" value="#869ca7" />

            <param name="allowScriptAccess" value="sameDomain" />

            <embed src="CopyButton.swf" quality="high" bgcolor="#869ca7"

            width="100%" height="100%" name="CopyButton" align="middle"