5 Replies Latest reply on Jun 15, 2007 2:49 AM by

    executing javascript

      Ever since all the security settings came up with Flash I'm having problems with executing javascipts from my flash movie.
      I used to work around this by loading a lower flashversion swf into a new layer and execute function from there but now even that seems to fail.

      In my HTML I have the following code:

      function openWindow(width,height,bestand,naam)
      {
      var base = "";

      x = (800 - width)/2, y = (600 - height)/2;
      if (screen) {y = (screen.availHeight - height)/2; x = (screen.availWidth - width)/2;}
      newwindow=window.open('',naam,'width='+width+',height='+height+',screenX='+x+',screenY='+ y+',top='+y+',left='+x+',scrollbars=auto,resizable=yes,menubar=yes');

      newwindow.location.href = base + bestand;

      if (window.focus) {newwindow.focus()}
      }

      This will nicely open a new window in the center of your screen no matter what resolution you're using.

      Now in my Flash I have this action to execute it.

      on(release){
      getURL("javascript:openWindow(800,600,' http://www.somedomain.com','popup'");
      }

      Now I can't find any flaw in there and it used to work no problem but now it doesn't work anymore.