I was following the tutorial to launch a centered pop up window…
I combined it with another movie i made. So basicaly in the Button the code is:
on (release) {
//customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = “kirupa.com - Updates”;
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);
}
And then I created an other empty layer, and in that layer I put the code:
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);”);
};
Okay now the proble, it launches a regular window instead of a popup window, and its also completle blank…
with this written in the URL bar(instead of adress):
javascript:var%20myWin;%20if(!myWin%20||%20myWin.closed){myWin%20=%20window.open(‘http://www.kirupa.com/modular/pop-up.htm’,‘kirupa’,‘width=400,height=300,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,top=’+((screen.height/2)-(150))+‘,left=’+((screen.width/2)-(200))+'’)}else{myWin.focus();};void(0);