Open links in main browser window from swf pop-up

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…


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

To see my test site go to this link and click on the small map.
http://www.dangrossmanmedia.com/test_site/

Thank you very much