# Open new browser window in Flash

**URL:** https://forum.kirupa.com/t/open-new-browser-window-in-flash/61209
**Category:** flash
**Created:** [August 17, 2004, 12:36am UTC](https://forum.kirupa.com/t/open-new-browser-window-in-flash/61209 "2004-08-17T00:36:56Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Inigo\_Montoya](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/inigo_montoya/32/695_2.png) [@Inigo\_Montoya](https://forum.kirupa.com/u/Inigo_Montoya)
#### Post date: [August 17, 2004, 12:36am UTC](https://forum.kirupa.com/t/open-new-browser-window-in-flash/61209/1 "2004-08-17T00:36:56Z")

</div>

Hi, newbie here. I have created a webpage completely in Flash. I have also looked at your tutorial on opening new browser windows from Flash. I have had success with the tutorial but I have a question.

The website I created was for an architecture firm. There are several thumbnails of past projects. What I would like to do is have an image open in a new window when you click on a corresponding thumbnail. What is the best way to go about this task? I have several images I would like this to work with. Is this the best way to go:

> \<SCRIPT LANGUAGE=“JavaScript”\>  
> \<!-- Begin  
> function Launch(page) {  
> OpenWin = this.open(page, “CtrlWindow”, “toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,width=550,height=250”);  
> }  
> // End –\>  
> \</SCRIPT\>  
> If so, how do you set this up so that if you want one image to appear in a 600X600 window then the next to be in a 300X300?

I guess my question is how best to do this??

Thanks

---

<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: [August 21, 2004, 12:44pm UTC](https://forum.kirupa.com/t/open-new-browser-window-in-flash/61209/2 "2004-08-21T12:44:52Z")

</div>

> [@Inigo Montoya](#):
>
> Hi, newbie here. I have created a webpage completely in Flash. I have also looked at your tutorial on opening new browser windows from Flash. I have had success with the tutorial but I have a question.
> 
> The website I created was for an architecture firm. There are several thumbnails of past projects. What I would like to do is have an image open in a new window when you click on a corresponding thumbnail. What is the best way to go about this task? I have several images I would like this to work with. Is this the best way to go:
> 
> If so, how do you set this up so that if you want one image to appear in a 600X600 window then the next to be in a 300X300?
> 
> I guess my question is how best to do this??
> 
> Thanks

if those thumbnails are buttons, you could assign them with the corresponding url-s, using the “\_blank” window property. they will open in new window. the size and the other properties (scrollbars., location, etc) are not a flash question. use this kind of script inside the document (.html) used as an url :

\<script\>  
window.open(“URL”, “windowName”, [“windowFeatures”])  
\</script\>

where features are:

toolbar, location,directories,status,menubar,scrollbars,resizable,width,height.

good luck!

---

<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: [August 21, 2004, 1:41pm UTC](https://forum.kirupa.com/t/open-new-browser-window-in-flash/61209/3 "2004-08-21T13:41:04Z")

</div>

or try this:

[http://www.kirupa.com/developer/flash5/newwindow.htm](http://www.kirupa.com/developer/flash5/newwindow.htm)

---

<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: [August 24, 2004, 5:15pm UTC](https://forum.kirupa.com/t/open-new-browser-window-in-flash/61209/4 "2004-08-24T17:15:15Z")

</div>

Can you just use the target feature? \_blank

---

<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: [August 25, 2004, 1:14am UTC](https://forum.kirupa.com/t/open-new-browser-window-in-flash/61209/5 "2004-08-25T01:14:11Z")

</div>

> [@yurumi](#):
>
> or try this:
> 
> [http://www.kirupa.com/developer/flash5/newwindow.htm](http://www.kirupa.com/developer/flash5/newwindow.htm)

[color=black]Sorry I’m a real noob at all of this…[/color]

If I use this method, how do use it with a series of thumbnails opening a series of windows…for example…

Let’s say I have an thumbnail image of an apple, I make that thumbnail of the apple a button. In the ACTIONS I would have:

[font=Courier New][color=#0000ff]javascript:Launch(‘[http://www.website.com/apple.htm](http://www.website.com/apple.htm)’)[/color][/font]

[font=Courier New][color=black]Upon publishing the animation I would insert this into the html document between the body tags:[/color][/font]

[color=blue]\<SCRIPT LANGUAGE=“JavaScript”\>  
\<!-- Begin  
function Launch(page) {  
OpenWin = this.open(page, “CtrlWindow”, “toolbar=no,menubar=no,location=no,scrollbars=no,resizable=yes,width=550,height=250”);  
}  
// End –\>  
\</SCRIPT\>[/color]

[font=Courier New][color=black]So now what do I do if now I want another thumbnail, let’s say Orange, to open a new window with an enlarged pic of an Orange? Doesn’t the above text also affect the Orange window? How do I get the Orange window to have its own properties? Any help would be great.[/color][/font]

---

<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: [August 27, 2004, 12:14am UTC](https://forum.kirupa.com/t/open-new-browser-window-in-flash/61209/6 "2004-08-27T00:14:21Z")

</div>

javascript:Launch(‘[http://www.website.com/orange.htm](http://www.website.com/orange.htm)’)  
ought to work, if you want it the windows to be in different sizes:

\<SCRIPT LANGUAGE=“JavaScript”\>  
\<!-- Begin  
function Launch(page, width, height) {  
OpenWin = this.open(page, “CtrlWindow”, “toolbar=no,menubar=no,location=no,scrollbars=no,re sizable=yes,width=”+width+",height="+height);  
}  
// End --\>  
\</SCRIPT\>  
So, for opening up a popup with that script:  
javascript:Launch(‘[http://www.website.com/orange.htm](http://www.website.com/orange.htm)’, 300, 200)

---

<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: [August 30, 2004, 2:15am UTC](https://forum.kirupa.com/t/open-new-browser-window-in-flash/61209/7 "2004-08-30T02:15:06Z")

</div>

Wow, thanks it worked. Now maybe an advanced question…

If you click on a button and have a new window popup with a certain size, how can you make it close by clicking in the parent window? Is that possible?

Or another alternative, if you click a button and have a new window popup with a certain size, how can you have that new window resize for a another image and have it appear over the parent window?

Your choice to answer on either!!! Thanks for all the help, its been invaluable.

---

<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: [September 2, 2004, 6:08pm UTC](https://forum.kirupa.com/t/open-new-browser-window-in-flash/61209/8 "2004-09-02T18:08:57Z")

</div>

To close a page:

\<SCRIPT LANGUAGE=“JavaScript”\>  
\<!-- Begin  
function closePage(pageName) {  
pageName.close();  
// End --\>  
\</SCRIPT\>  
Assuming you use my code exactly, to close a page opened with it you would use:

javascript:closePage(OpenWin);

To resize a popup:  
\<SCRIPT LANGUAGE=“JavaScript”\>  
\<!-- Begin  
function resizePage(pageName, width, height) {  
pageName.resizeTo(width, height);  
// End --\>  
\</SCRIPT\>

You would use this with something like this:

javascript:resizePage(OpenWin, 200, 300);

I haven’t actually tested either of these, but they ought to work in theory. I’ve adapted these from [http://www.webreference.com/js/tutorial1/reference.html and also [url=“http://www.webreference.com/js/tutorial1/manipulate.html”]http://www.webreference.com/js/tutorial1/manipulate.html](http://www.webreference.com/js/tutorial1/reference.html) .
