mentaleruptions
04-30-2002, 10:48 AM
Ok i got a button in my flash movie that im wanting to open a java popup 720 x 420 Im using the toll thats on flash-db to generate the code i need. Now the prob is i want to have the window centre on the screen and cant get it to work. Here is the code i have for the button.
on (release) {
getURL ("javascript:NewWindow=window.open('http://www.mysite.com','newWin','width=720,height=420,lef t=0,top=0,toolbar=No,location=No,scrollbars=No,sta tus=No,resizable=No,fullscreen=No'); NewWindow.focus(); screen_height = window.screen.availHeight; screen_width = window.screen.availWidth; left_point = parseInt(screen_width/2)-(720/2); top_point = parseInt(screen_height/2)-(420/2); setTimeout('NewWindow.moveTo(left_point,top_point) ',100); void(0);");
}
Whats wrong with it anyone no ?? According to the tool on flash-db i have it set to the size off 720 x 420 and it should position to the centre but it doesnt do this it just stays at the top right left corner. Any help would be most apreciated.
Mental
on (release) {
getURL ("javascript:NewWindow=window.open('http://www.mysite.com','newWin','width=720,height=420,lef t=0,top=0,toolbar=No,location=No,scrollbars=No,sta tus=No,resizable=No,fullscreen=No'); NewWindow.focus(); screen_height = window.screen.availHeight; screen_width = window.screen.availWidth; left_point = parseInt(screen_width/2)-(720/2); top_point = parseInt(screen_height/2)-(420/2); setTimeout('NewWindow.moveTo(left_point,top_point) ',100); void(0);");
}
Whats wrong with it anyone no ?? According to the tool on flash-db i have it set to the size off 720 x 420 and it should position to the centre but it doesnt do this it just stays at the top right left corner. Any help would be most apreciated.
Mental