6 Replies Latest reply on Apr 19, 2010 10:34 PM by riteshnewal

    Popup HTML Window

    athomas32

      Im struggling with the javascript to open a popup from flash.

       

      I have a swf (swf1) with a container that loads in an external .swf (swf2) file.

       

      swf2 has a button that i would like to open a popup window. I have put the following javascript code in the actionscript for the button

       

      on (release) {
      getURL("javascript:openNewWindow('http://www.macromedia.com','thewin','height=400,width=400,toolbar=no,scrollbars=yes') ");
      }

       

      I have put the following code in the html file that loads the swf file....

       

      <SCRIPT LANGUAGE=JavaScript>
      function openNewWindow(URLtoOpen, windowName, windowFeatures) {
        newWindow=window.open(URLtoOpen, windowName, windowFeatures);
      }
      </SCRIPT>

       

      Here is the code that embeds the swf1 (with the container) on the html page....

       

      <A HREF=javascript:openNewWindow('http://www.google.com','thewin','height=400,width=400,toolbar=no,scrollbars=yes') ></A> <!-- text used in the movie-->
          <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="890" height="360">
            <param name="movie" value="homepageFlash.swf" />
            <param name="quality" value="high" />
            <param name="wmode" value="transparent" />
            <embed src="homepageFlash.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="890" height="360"></embed>
          </object>

       

      Am i missing something. I have read numerous tutorials and did them step for step and cant get them to work on my project....

       

      Thank you in advance for any replys and help on this matter!!!!