# Popups

**URL:** https://forum.kirupa.com/t/popups/19566
**Category:** flash
**Created:** [April 29, 2003, 11:04am UTC](https://forum.kirupa.com/t/popups/19566 "2003-04-29T11:04:21Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sameerramji](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@sameerramji](https://forum.kirupa.com/u/sameerramji)
#### Post date: [April 29, 2003, 11:04am UTC](https://forum.kirupa.com/t/popups/19566/1 "2003-04-29T11:04:21Z")

</div>

Hi Guys,  
Can someone help me with the following problem.  
I want a user to open multiple windows when they click on links from a flash movie.

What i mean is that when someone clicks on a button it opens one window, then they keep that open and click on another button which opens another window so it allows to compare the two movies. This must happen for around 5 windows.

This is what i have done so far:

Added this to the buttons:

on (release) {  
//customize the window that gets opened  
// 0 equals NO.  
// 1 equals YES.  
address = “thameshighres.html”;  
target\_winName = “test”;  
width = 440;  
height = 364;  
toolbar = 0;  
location = 0;  
directories = 0;  
status = 0;  
menubar = 0;  
scrollbars = 0;  
resizable = 0;  
//sends data back to the function  
openWinCentre(address, target\_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);  
}

Then i put the following code in the actions layer in the first key frame

Movieclip.prototype.openWinCentre = function  
(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {  
getURL (“javascript:var myWin; if(!myWin || myWin.closed){myWin = window.open(’” + url + “’,’” + winName + “’,’” + “width=” + w + “,height=” + h + “,toolbar=” + toolbar + “,location=” + location + “,directories=” + directories + “,status=” + status + “,menubar=” + menubar + “,scrollbars=” + scrollbars + “,resizable=” + resizable + “,top=’+((screen.height/2)-(” + h/2 + “))+’,left=’+((screen.width/2)-(” + w/2 + “))+’” + “’)}else{myWin.focus();};void(0);”);  
}

Please help!  
Thanks!  
Sameer.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 29, 2003, 11:45am UTC](https://forum.kirupa.com/t/popups/19566/2 "2003-04-29T11:45:50Z")

</div>

Make sure that in your actions, you target a \_blank window. This will open in a new browser. 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 29, 2003, 5:46pm UTC](https://forum.kirupa.com/t/popups/19566/3 "2003-04-29T17:46:14Z")

</div>

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=20985](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=20985)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 30, 2003, 3:50pm UTC](https://forum.kirupa.com/t/popups/19566/4 "2003-04-30T15:50:35Z")

</div>

Hi Kax,  
It changes the things within the window itself. It does not open a different window.  
I’m using to quicktime movies one large and one small.  
When i click on the button for the large one first, it ones the window fine, but then when i click on the button to open the small movie it opens it within the same window as the large one.

Thanks  
Sameer.
