Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Supporting Technologies > HTML and JavaScript

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-20-2004, 12:25 AM   #1
cris.r
Registered User
 
Join Date: Nov 2004
Posts: 4
Default popup window centered in the browser window?

hi > what do i have to add to the following code to make my popup window pop up centered in the browser window????


this is from a tutorial by Jesse

1. Insert the base Javascript code into your HTML code between the HEAD tags (<head> Script goes here </head>). Copy and paste the script below:

<script language="JavaScript">
<!--
function spawnWindow(URL,Name,features) {
window.open(URL,Name,features);
}
//-->
</script>


2. Add code to your flash button in the following form:

on (release) {
getURL ("javascript:
spawnWindow('xxx.swf','name','toolbar=no,location= yes,status=no,menubar=no,scrollbars=no,resizable=n o,width=300,height=200')


thank you for any hint

cris
cris.r is offline   Reply With Quote
Old 11-20-2004, 04:32 AM   #2
Cota
Super Moderator
 
Cota's Avatar
 
Join Date: Jul 2001
Location: NYC
Posts: 10,026
Default

In your features area, just add this

screenX=400,screenY=400,top=400,left=400

Obviously change the numbers depending on where you need it.

*edit*
Note that ScreenX and ScreenY are for Netscape and Top and Left are for IE.
__________________
Color Wars™ | (kul′ər wôrs) n. - Open conflict between factions. www.theColorWars.com

cota - www.chadworkman.com | http://shavedplatypus.com
occupation: designer | flash developer | server-side developer (php, asp, mssql, mysql)

Last edited by Cota; 11-20-2004 at 04:34 AM..
Cota is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:52 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.