# Creating a pop up window

**URL:** https://forum.kirupa.com/t/creating-a-pop-up-window/83944
**Category:** Uncategorized
**Created:** [March 23, 2005, 11:59am UTC](https://forum.kirupa.com/t/creating-a-pop-up-window/83944 "2005-03-23T11:59:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jammmmmm](https://avatars.discourse-cdn.com/v4/letter/j/df705f/32.png) [@jammmmmm](https://forum.kirupa.com/u/jammmmmm)
#### Post date: [March 23, 2005, 11:59am UTC](https://forum.kirupa.com/t/creating-a-pop-up-window/83944/1 "2005-03-23T11:59:10Z")

</div>

hello all,

I wanna make something like an pop up advert when the movie starts. I’m currently using a script some like this:

openWin1 = function(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {  
getURL(“javascript:window.open(’” add url add “’,’” add winName add “’,'width=” add w add “,height=” add h add “,top=” add winTop add “,left=” add winLeft add “,toolbar=” add toolbar add “,scrollbars=” add scrollbars add “,resizable=” add resizable add “,menubar=” add menubar add “,status=” add status add “,directories=” add directories add “,location=” add location add “’); void(0);”);  
};  
onEnterFrame = function() {  
address = “/src.swf”;  
winName = “win1”;  
width = 450;  
height = 270;  
toolbar = 0;  
location = 0;  
directories = 0;  
status = 0;  
menubar = 0;  
scrollbars = 0;  
resizable = 0;  
openWin1(address, winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);  
};

but whenever I play the movie it opens a thousand new windows and crashes the pc. How do I fix this?
