3 Replies Latest reply on Jul 7, 2006 11:52 AM by derobinson

    Pop up windows

    jasper24
      I've got a button in my flash movie with a script attached to open a new flash movie in a pop-up window.

      Is it possible to have the script just launch the new flash movie without it being embedded in an HTML file? My issue is that I'm trying to have this pop-up window sized exactly to my flash movie, but on different browsers/platforms, scrollbars sometimes appear (I don't know if IE automatically inserts padding, for example). Also would be nice to not have the title bar (had no problems getting rid of address bar, etc) or resize handles.

      Any help would be appreciated. Thanks!
        • 1. Re: Pop up windows
          derobinson Level 1
          It's usually not recommended to do that, but all you have to do is point your URL directly to the SWF and not to an HTML file.

          That being said, you may be able to address some of your problems in the HTML that you won't be able to address loading the SWF directly. For starters, add this to your BODY tag to get rid of browser padding:

          leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"

          You can also do this with CSS.

          Hope that helps!
          • 2. Re: Pop up windows
            jasper24 Level 1
            I think I'm getting closer... keep in mind I'm a complete newbie.

            So right now, if I open the swf of my main movie and click the appropriate button, the pop-up window opens, but I get a message "IE doesn't know how to handle this type of file", and gives me the option of downloading. Despite the fact that the pop-up SWF loaded correctly and functions.

            If I bring the main swf into my index page and preview it in the browser, the pop-up window doesn't open at all. I assume I'm missing the appropriate javascipt in my index page?

            This is the script I've attached to the button in the main movie:

            on (release) {
            getURL ("portfolio/ad.swf");
            }

            Help! Thanks!
            • 3. Re: Pop up windows
              derobinson Level 1
              Actually, at the moment, you have no Javascript at all. Really, in the first instance (when you are running the SWF file locally), you're viewing your Flash movie in the stand alone player. when you click your button, your OS is looking for the application needed to open a SWF file (which is usually registered as your browser). It opens this application, thus spawning a new window, but this has little to do with your code.

              To get a true browser pop-up window (a new browser window spawned from another browser window), you will need to use some Javascript. One sulotion is here:

              http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=288&threadid=1150247&hi ghlight_key=y&keyword1=popup%20window

              You can search the forums for "popup window" and get half a dozen different ways of doing it.

              Good luck!