# Open links in main browser window from swf pop-up

**URL:** <https://forum.kirupa.com/t/open-links-in-main-browser-window-from-swf-pop-up/274579>\
**Category:** flash\
**Created:** [October 31, 2008, 5:17pm UTC](https://forum.kirupa.com/t/open-links-in-main-browser-window-from-swf-pop-up/274579 "2008-10-31T17:17:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![goyo1](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@goyo1](https://forum.kirupa.com/u/goyo1)\
**Post date:** [October 31, 2008, 5:17pm UTC](https://forum.kirupa.com/t/open-links-in-main-browser-window-from-swf-pop-up/274579/1 "2008-10-31T17:17:14Z")

</div>

acs3  
Actionscript 2

Hi there, I am building a Flash interactive map that opens in a pop-up window from several pages on the site. This flash doc has buttons that suppose to open pages back in the window that the flash pop-up came from.

I tried all I could think of and search for days for a solution, I am, well… kind of desperate please help.

It seams that to achieve the above, I need to use javasript and I don’t have much experience with either Flash or Javascrip.

The latest thing I found looks promising but I don’t know where to put the javascript Flash doc portion. See below…

```auto

in javascript on your html/php page:

function loadParent (file,target) {
if (target != '') target.window.location.href = file;
else window.location.href = file;
}

in flash:

// the function
getPage = function (url) {
getURL ("javascript:loadParent ('" + url + "',top.opener)");
}

// on your button
on (release) {
_root.getPage ("http://user:pass@www.bigjolt.com/lab") ;

}

```

(link to the source of this code)  
[http://board.flashkit.com/board/arch.../t-338419.html](http://board.flashkit.com/board/arch.../t-338419.html)

To see my test site go to this link and click on the small map.  
[http://www.dangrossmanmedia.com/test\_site/](http://www.dangrossmanmedia.com/test_site/)

Thank you very much
