Centered Pop-up Window

Hello,

I did the “Centered Pop-Up” window tutorial from this website. I got it to work, which is great. However, the pop-up window will only let me open an already published webpage. If I try to put a file that I have created in html in the “address” variable (for example a file named “contact.htm”, it won’t work. Does anyone know how to get this pop-up window to open a file you created in htm, that is located in the same folder as your flash file?

I would appreciate any help I can get.

Thanks.

What is the code you are using exactly?

Here is the action that is applied to the button that opens the pop-up window. Where it says “address” is the name of the file I want opened. Everytime I preview my flash file it says the file can’t be found and it opens up an external netscape file.

[COLOR=Sienna]on (release) {
//customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = “contact.htm”;
target_winName = “kirupa”;
width = 400;
height = 300;
toolbar = 0;
location = 0;
directories = 0;
status = 0;
menubar = 0;
scrollbars = 1;
resizable = 0;
//sends data back to the function
openWinCentre(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);
}
[/COLOR]

Here is the javascript action that I have to apply to the first frame of the movie:

[COLOR=Sienna]Movieclip.prototype.openWinCentre = function (url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {
getURL (“javascript:var myWin; if(!myWin || myWin.closed){myWin = window.open(’” + url + “’,’” + winName + “’,’” + “width=” + w + “,height=” + h + “,toolbar=” + toolbar + “,location=” + location + “,directories=” + directories + “,status=” + status + “,menubar=” + menubar + “,scrollbars=” + scrollbars + “,resizable=” + resizable + “,top=’+((screen.height/2)-(” + h/2 + “))+’,left=’+((screen.width/2)-(” + w/2 + “))+’” + “’)}else{myWin.focus();};void(0);”);
}
[/COLOR]

Thanks.

Since the page is an htm page that is sitting in your same directory I think (don’t quote me but try it anyway :wink: ) that you should try using the whole shebang web address. Flash is sometimes picky about things like that. Try http://www.yoursite.com/contact.htm and see if that works. Make sure for this experiment that you include the http:// and the www.

:hr:

The only problem is that the page isn’t published yet. You wouldn’t know if there is a way I can test it to see if it looks okay?

If not I guess I have to do what I have to do :pa:. Thanks for helping out, I really appreciate it.