# Open a .swf in a new window from another .swf

**URL:** https://forum.kirupa.com/t/open-a-swf-in-a-new-window-from-another-swf/11937
**Category:** flash
**Created:** [January 24, 2003, 3:37am UTC](https://forum.kirupa.com/t/open-a-swf-in-a-new-window-from-another-swf/11937 "2003-01-24T03:37:32Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![artevital](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@artevital](https://forum.kirupa.com/u/artevital)
#### Post date: [January 24, 2003, 3:37am UTC](https://forum.kirupa.com/t/open-a-swf-in-a-new-window-from-another-swf/11937/1 "2003-01-24T03:37:32Z")

</div>

Hello  
I need to open a .swf in a new window from a botton of another .swf, and I want to keep open the 2 windows. But I do not want to use html, only flash.  
Is it posible?  
I really need help. I already visit all net and I did not find it.  
Thanks.  
Mariela:sigh:

---

<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: [January 24, 2003, 7:20am UTC](https://forum.kirupa.com/t/open-a-swf-in-a-new-window-from-another-swf/11937/2 "2003-01-24T07:20:23Z")

</div>

Well first thing is first… you should always embed your .swf file in a .html file. You can do that simply by going to File/Publish Settings and then make sure the HTML checkbox is checked, then hit Publish.

Next thing is next… there are 2 tutorials here on [kirupa.com](http://kirupa.com) for pop up windows…

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

[http://www.kirupa.com/developer/mx/centered\_popup.asp](http://www.kirupa.com/developer/mx/centered_popup.asp)

---

<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: [January 24, 2003, 4:38pm UTC](https://forum.kirupa.com/t/open-a-swf-in-a-new-window-from-another-swf/11937/3 "2003-01-24T16:38:12Z")

</div>

I thought I could be another way to do it.  
I will try with this tutorials to see if it works.  
Thanks a lot.  
Mariela:sigh:

---

<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: [January 24, 2003, 5:16pm UTC](https://forum.kirupa.com/t/open-a-swf-in-a-new-window-from-another-swf/11937/4 "2003-01-24T17:16:04Z")

</div>

The second link there involves no javascript code inside an html page. All the code is contained in the .fla file.

A lot of people have difficulties using this for more than 1 window though.

---

<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: [January 24, 2003, 6:52pm UTC](https://forum.kirupa.com/t/open-a-swf-in-a-new-window-from-another-swf/11937/5 "2003-01-24T18:52:28Z")

</div>

Hi. Well!!! I have problems. I used the tutorial Centered Open Window, but in my proyect It does not work.  
Mi address is:  
address = “04tours/01frecuentes/03autanamapa.html”;  
I publised already the .html, but the window is not open when I called it from the boton of myfile.swf  
I have to open those maps in each link. And I need to open those maps in a new window as clean and centered as that you have in the tutorial.  
What is it happend?

---

<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: [January 24, 2003, 8:20pm UTC](https://forum.kirupa.com/t/open-a-swf-in-a-new-window-from-another-swf/11937/6 "2003-01-24T20:20:39Z")

</div>

Well you can do centered pop ups in Javascript and call them in Flash. Check my attached .txt file if you want to look at it.

Since you want to call multiple centered windows I really don’t think it works with that centered pop up tutorial at [kirupa.com](http://kirupa.com).

---

<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: [January 28, 2003, 10:23pm UTC](https://forum.kirupa.com/t/open-a-swf-in-a-new-window-from-another-swf/11937/7 "2003-01-28T22:23:01Z")

</div>

Thanks a lot., lostinbeta  
The tutorial centered window from kipura already worked it.  
I was writing a name with 2 words separately, so flash did not work it.  
Sometimes, the error is just there.

Now, I have another question.  
I have a file with my principal menu and in a content I loading with target other files.  
When I press a boton from my principal menu, this calls its file. So where do I put the loading?  
Do you have a simplest loading?  
Thanks.  
Mariela:bounce:

---

<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: [January 28, 2003, 10:33pm UTC](https://forum.kirupa.com/t/open-a-swf-in-a-new-window-from-another-swf/11937/8 "2003-01-28T22:33:41Z")

</div>

So if I have this right… you are using loadMovie() to call in a seperate .swf file and you want to know where to put the preloader?

If that is the case, you put your preloader on each of your external .swf files.

---

<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: [January 28, 2003, 10:57pm UTC](https://forum.kirupa.com/t/open-a-swf-in-a-new-window-from-another-swf/11937/9 "2003-01-28T22:57:02Z")

</div>

Ok. But I have in my principal menu, a movie called “content”. This movie closes theirs doors when I call a new swf. Then when that file is loaded, the doors open.  
I am not sure, but the loader not should be there, insite the movie with the doors?

---

<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: [January 28, 2003, 11:47pm UTC](https://forum.kirupa.com/t/open-a-swf-in-a-new-window-from-another-swf/11937/10 "2003-01-28T23:47:54Z")

</div>

Well you could just have a loading animation play at the end of the doors animation (when they close), then have a basic preloader working in the loaded movie.

Or you could do the doors closing animation, then load your movie, but your movie will have the closed doors in the preloader frames. This will involve you not loading it above the animation.

Or you can do the door closing animation on the loaded file, then put the preloader code at the end of thsoe frames. As long as the tween isn’t too much to load you should be alright with this method.
