Hi everybody,
I have a CD with a html page with a Flash button in it. I would like to open a new window (specific size) when I click the Flash button in the original window. These are not html pages online, they are inside a CD.
I have this code in the actions layer, I think the code is from one the tutorials in kirupa.com:
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);");
}
And the Flash button has this code on it:
on (release) {
//customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = "hepatitis.html";
target_winName = "Hepatitis_case1";
width = 800; //600;//1000;//500;
height = 672; //504;//840;//420;
toolbar = 0;
location = 0;
directories = 1;
status = 0;
menubar = 0;
scrollbars = 1;
resizable = 1;
//sends data back to the function
openWinCentre(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);
}
Both html files and the swf files are in the root of the CD
The button in my first html page does not open the second window. What am I doing wrong?
Thanks in advance,