# Open multiple frames with 1 button

**URL:** <https://forum.kirupa.com/t/open-multiple-frames-with-1-button/27789>\
**Category:** Uncategorized\
**Created:** [August 6, 2003, 5:14pm UTC](https://forum.kirupa.com/t/open-multiple-frames-with-1-button/27789 "2003-08-06T17:14:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uli](https://avatars.discourse-cdn.com/v4/letter/u/ccd318/32.png) [@Uli](https://forum.kirupa.com/u/Uli)\
**Post date:** [August 6, 2003, 5:14pm UTC](https://forum.kirupa.com/t/open-multiple-frames-with-1-button/27789/1 "2003-08-06T17:14:31Z")

</div>

HI there,

here s my problem: i want to have a button that will be displayed into an email. When i click that button, i want it to open into a new frame my site but also open another URL into a specific location like mainFrame. The thing is, i dont know how to tell flash to open the 2nd url into the mainFrame of the new window it just opened…

TiA

---

<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 6, 2003, 8:06pm UTC](https://forum.kirupa.com/t/open-multiple-frames-with-1-button/27789/2 "2003-08-06T20:06:54Z")

</div>

I’m not really understanding this. So you’re trying to open two new windows by one button click?

---

<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 7, 2003, 1:39am UTC](https://forum.kirupa.com/t/open-multiple-frames-with-1-button/27789/3 "2003-08-07T01:39:44Z")

</div>

I believe that is the case.

Uli, you can do this by adding the following code:

* * *

## // enter your email address on (release) { getURL("mailto:youremail@hotmail.com", “\_blank”); } // go to frame 1. Enter the frame number (in this case 1), or // the frame label (you wish to use mainFrame.) on (press) { gotoAndPlay(1); }

If this starts playing through your frames, then try using gotoAndStop() instead of gotoAndPlay().

Did this help?

---

<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 7, 2003, 2:49am UTC](https://forum.kirupa.com/t/open-multiple-frames-with-1-button/27789/4 "2003-08-07T02:49:23Z")

</div>

I think Uli means to say ‘window’ instead of ‘frame’…I think…

I’m confused too, but, if you have two URLs that you want opened with one button, just put two getURL commands:

```auto

on(press){
getURL("mailto:youremail@hotmail.com","_blank");
getURL("http://www.your2ndURL.com","_blank");
}

```

Is that what you wanted?

---

<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 7, 2003, 7:40am UTC](https://forum.kirupa.com/t/open-multiple-frames-with-1-button/27789/5 "2003-08-07T07:40:45Z")

</div>

If you mean actually controlling seperate html frames, just use html to name the frames in your html frameset file. Then use multiple getURL with different targets on your button…

on (release) {  
getURL(“[http://www.etc.com/new-window.html](http://www.etc.com/new-window.html)”, “mainFrame”);  
getURL(“[http://www.etc.com/frame.html](http://www.etc.com/frame.html)”, “2ndframe”);  
}

Remember though, if this is being directed from an email, you will need to use absolute url references with the whole URL, like [http://www.etc.com/etc.html](http://www.etc.com/etc.html) rather than just the file name like etc.html

Hope that helps, maybe…

Cheers!

FW

(ps) 3 different answers (so far), & all could be right… See how important it can be to phrase your question with as much detail as possible to make sure we understand what you mean…
