// FLASHMEDIUM / Developer Home / Code / Pop-up Wndow  
  > > Opening a Pop-up Window from Flash
 
The code that makes this possible is composed of two parts
 
ActionScript
 


on (release) {
getURL( "JavaScript:popUp( );" );
}


1. Create a button in flash

2. Select the button and insert the code above in the Actions Panel.

* The code above calls on a Javascript function via getURL( )

 
JavaScript


<script language="JavaScript" type="text/JavaScript">
<!--

function popUp( ){
window.open("popup.html","","height=350,width=400,left=0,top=0");
}

//-->
</script>



1. Place the code above between the <head> tags of the html document that the flash movie is in. ( Right after the <title> and <meta> tags is fine. )

2. Change the height and width in pixels to reflect the dimensions you want to achieve.

window.open("popup.html","","height=350,width=400,left=0,top=0");

3. Make sure that the first arguement is the name of the html document that is going to show in the Pop-up Window, in this case I called it popup.html

window.open("yourPageName.html","","height=350,width=400,left=0,top=0");

Note: Specify path to page if it's not in the same directory.

 

 

  // ?  
(fm) Home | Dev Home | Help
Tutorials | Sound FX | Sound Loops | 3-D | Code | Images | Submit