1 Reply Latest reply on Oct 21, 2009 10:43 AM by kglad

    callExternalInterface perfect in Firefox , but not working in Safari?

    razznov

      I finally figured out how to implement the callExternalInterface code. All works perfect in Firefox, but when I test in Safari, I get nothing. Any ideas at all would be helpful. Below is the code...

       

      callExternalInterface(movieVars)

      //appended url might be something like....

      //index.htm?movieVars=deepLink&movieVars1=residential&movieVars2=theRest&movieVars3=anders on"
      function callExternalInterface(movieVars, movieVars1, movieVars2, movieVars3) {
          getMovieName("myMovie").callPlayBall(movieVars, movieVars1, movieVars2, movieVars3);
      }

       

      function getMovieName(movieName) {
          if (navigator.appName.indexOf("Microsoft") != -1) {
              return window[movieName]
         }
         else {
             return document[movieName]
         }
      }
      </script>
      <script>
          function getQueryVariable(foo, foo1, foo2, foo3) {
            var query = window.location.search.substring(1);
            var arrayHere = query.split("&");
            var param0 = ""
            var param1 = ""
            var param2 = ""
            var param3 = ""
            for (var i=0;i<arrayHere.length;i++) {
              var pair = arrayHere[i].split("=");
              if (pair[0] == foo) {         
                  param0 = pair[1];     
              }
              else if (pair[0] == foo1) {           
                  param1 = pair[1];
              }
              else if (pair[0] == foo2) {           
                  param2 = pair[1];
              }
              else if (pair[0] == foo3) {

       

                  param3 = pair[1];
              }
            } //-- end of for loop
           
          //alert("p0: " + param0 + ", p1: " + param1 + ", p2: " + param2+", p3: " + param3)
            callExternalInterface(param0, param1, param2, param3)
           
          }
      </script>

       

       

       

       

      KIM

       

      updated: code posted incorrectly

       

      updated: code posted incorrectly