5 Replies Latest reply on Sep 1, 2006 3:51 AM by paqui71

    pop-ups blocked in XP

    paqui71
      Hi,
      I made sometime ago a project in flash/html which uses pop-up windows from a flash page (script) to load html/flash windows.

      It was working fine with the first releases of windows XP but I've tried it recently and the pop-up windows are not loaded anymore.
      It works fine on a mac/safari.

      The pop up blockers are disabled, no firewall, antivrus or other 3rd party blockers are installed.

      Because the script to pop-up the pages is embeded in a swf I don't think it's a problem of the blockers, even if I'm not sure because the poped-up page is an swf embeded in an html.

      In IE the javascript is enable.

      Should I review the actionscript or check the system?

      Please help
      thanks
      www.paquiito.it
        • 1. Re: pop-ups blocked in XP
          abeall Level 3
          Show us the ActionScript.

          JavaScript popups will be blocked. getURL() calls outside of an on(release) or on(press) event will also fail.
          • 2. pop-ups blocked in XP
            paqui71 Level 1
            Thanks for your reply.
            Here is the actionscript:


            on (press) {
            getURL(apriPopupCentrata('CVDK_01.html', 'FLASH', 440, 390, 'status=no, toolbar=no, scrollbars=no, resize=no'));
            }

            ********************
            MovieClip.prototype.apriPopupCentrata = function (nome, titolo, lar, alt, feat)
            {
            var w = System.capabilities.screenResolutionX/2;
            var h = System.capabilities.screenResolutionY/2;
            var x = Math.round(w - (lar / 2));
            var y = Math.round(h - (alt / 2));
            getURL("javascript:window.open('"+ nome + "','" + titolo + "','width=" + lar + ",height=" + alt + ",screenX=" + x + ",left=" + x + ",screenY=" + y + ",top=" + y + "," + feat + "');void(0);");
            };


            Thanks
            paolo
            • 3. Re: pop-ups blocked in XP
              abeall Level 3
              I see three problems:

              1) You are calling getURL(aprilPopupCentrata(...)), but then if you look at aprilPopupCentrata it is calling getURL in itself. So you are calling getURL twice... that might cause problems, and certainly the first getURL would fail because aprilPopupCentrata is return nothing, so the getURL is getting nothing. You could rewrite that bit of code and just take out the getURL part and simply call aprilPopupCentrata() directly.

              2) However, by calling aprilPopupCentrata() you are executing a getURL that is not directly in the on(press) event, so some blockers will see this as malicious. It's a pain, but you will *have* to place the getURL *directly* in the on(press) event if you want best compatibility.

              3) You are using javascript to popup a new window. In general, this will blocked.
              • 4. Re: pop-ups blocked in XP
                abeall Level 3
                To follow up on 1), you might actually try returning a string to the original getURL. I've never tried that, but that might actually work:

                on (press) {
                getURL(apriPopupCentrata('CVDK_01.html', 'FLASH', 440, 390, 'status=no, toolbar=no, scrollbars=no, resize=no'));
                }
                ********************
                MovieClip.prototype.apriPopupCentrata = function (nome, titolo, lar, alt, feat)
                {
                var w = System.capabilities.screenResolutionX/2;
                var h = System.capabilities.screenResolutionY/2;
                var x = Math.round(w - (lar / 2));
                var y = Math.round(h - (alt / 2));
                var popup = "javascript:window.open('"+ nome + "','" + titolo + "','width=" + lar + ",height=" + alt + ",screenX=" + x + ",left=" + x + ",screenY=" + y + ",top=" + y + "," + feat + "');void(0);";
                return popup;
                };

                BTW, I can't tell why you are using a prototype instead of a regular function, or _global function?
                • 5. Re: pop-ups blocked in XP
                  paqui71 Level 1
                  Hi,
                  Thanks a lot for your help.

                  Your points on the script look very good, I'll review it according to your suggestions.

                  I found out that it's a problem of security. The project has been originally produced with a previous version of flash. This means that the new player8 is suppose to ask the user to confirm the will of playback contents which are considered 'suspicious' just because published by a previous version of flash and therefore not aligned with the new security standards of the os (this shouldn't happen with movies published with the new flash player 8 settings).

                  In all platforms with all browsers (opera, firefox, safari in both pc and mac) when this happens the browser warns you with a message that leads you to this page: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.ht ml where you can set a different level of security in the player itself.
                  Simply clicking ALWAYS ALLOW the cd rom works fine!

                  The problem is that in windows xp sp2 running IE the browser simply doesn't do the action once you click on the link to pop up the window and, worst of all, it doesn't tell you anything, leaving the user totally unaware of the possibility of switching that ALWAYS ALLOW to run flash contents.

                  I might be able to bypass the pain for each user to switch this panel re-publishing all the files of the project with the latest version of flash for the flash player 8.

                  Hope this make sense and it is gonna help others with similar problems.

                  cheers
                  www.paquito.it