Flash Script – Open Browser in Flash

Tweet

1. First we need JavaScript. If you’re not familiar with JavaScript, see our Javascript section.

 <SCRIPT language=JavaScript> 
var newwin;  
function launchwin(winurl,winname,winfeatures)  
{  
//This launches a new window  
newwin = window.open(winurl,winname,winfeatures);
}
</SCRIPT>

2. Insert the above code into the tags of your HTML document.

3. Now, assign the parameters of this new window to your Flash button. Here’s the code:

On (Release)  

Get URL ("javascript:launchwin('http://www.flashcircle.com'  
, 'newwindow' , 'height=800,width=800')")  

End On

4. That’s all you need to do. Press ctrl+enter to check the movie.

Free JavaScript: Novice to Ninja Sample

Get a free 32-page chapter of JavaScript: Novice to Ninja and receive updates on exclusive offers from SitePoint.

No Reader comments