Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-11-2004, 09:32 AM   #1
eggnogg
there's 8 pixels missing!
 
eggnogg's Avatar
 
Join Date: Apr 2003
Location: Portugal
Posts: 784
Default centering the pop up

hi guys. does any one know the right way to make a popup that opens, centered to the screen?

i have a swf with a button that open a html popup with javascript:
ActionScript Code:
cozinha.onPress = function () {     getURL("javascript:spawnWindow('cozinha.html','myWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=500,height=315,left = 212,top = 184')"); }

is there a way to make an exact center, according the the screen's width and height?

please help
my thanx to who does

Last edited by eggnogg; 02-11-2004 at 10:20 AM.
eggnogg is offline   Reply With Quote
Old 02-11-2004, 10:21 AM   #2
Ruben
Me
 
Ruben's Avatar
 
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 3,512
Send a message via MSN to Ruben Send a message via Skype™ to Ruben
Default

Don't really know, but I guess this is more a javascript-question then a actionscript-question...

I think you'll have more luck if you'd post this question somewhere on a forum on javascript...

- Ruben
__________________
.
Originally Posted by MichaelxxOA
"He sounded like he knew which words he was going to use before he knew what he was going to say. I hate that shit."
Ruben is offline   Reply With Quote
Old 02-11-2004, 10:54 AM   #3
eggnogg
there's 8 pixels missing!
 
eggnogg's Avatar
 
Join Date: Apr 2003
Location: Portugal
Posts: 784
Default

right!
cheers )

Last edited by eggnogg; 02-11-2004 at 10:57 AM.
eggnogg is offline   Reply With Quote
Old 02-11-2004, 05:07 PM   #4
boyzdynasty
Senior Member
 
boyzdynasty's Avatar
 
Join Date: Aug 2002
Location: Philly
Posts: 2,583
Default

so you solve the problem? ....


in js you will need to use

screen.availWidth and screen.availHeight
__________________
I need a new signature!
boyzdynasty is offline   Reply With Quote
Old 02-11-2004, 05:33 PM   #5
eggnogg
there's 8 pixels missing!
 
eggnogg's Avatar
 
Join Date: Apr 2003
Location: Portugal
Posts: 784
Default

mhm...and how do i use that?

but..i dont know how to add a js function in flash though.

i have
ActionScript Code:
getURL("javascript:spawnWindow..etc...")

how do i add an if statement (for example) in that code??
eggnogg is offline   Reply With Quote
Old 02-11-2004, 06:27 PM   #6
boyzdynasty
Senior Member
 
boyzdynasty's Avatar
 
Join Date: Aug 2002
Location: Philly
Posts: 2,583
Default

you can do if statements the same way you do in A.S.

just add the j.s. stuff in the html file where the movie is embeded.

create a j.s function. And just call it in flash ...

do you want me to create an example? If it is still not clear...i'll create an example for you.
__________________
I need a new signature!
boyzdynasty is offline   Reply With Quote
Old 02-11-2004, 06:52 PM   #7
eggnogg
there's 8 pixels missing!
 
eggnogg's Avatar
 
Join Date: Apr 2003
Location: Portugal
Posts: 784
Default revisited

hey

hm, i think i get it but still a doubt. i think the code has to go inside flash, not the html page, beacuse i create the popup FROM flash, not from the html i open...

please do an example!
thx!
eggnogg is offline   Reply With Quote
Old 02-11-2004, 07:04 PM   #8
boyzdynasty
Senior Member
 
boyzdynasty's Avatar
 
Join Date: Aug 2002
Location: Philly
Posts: 2,583
Default

enjoy.

the js code in html file.
Attached Files
File Type: zip popup.zip (72.6 KB, 273 views)
__________________
I need a new signature!
boyzdynasty is offline   Reply With Quote
Old 02-11-2004, 07:08 PM   #9
boyzdynasty
Senior Member
 
boyzdynasty's Avatar
 
Join Date: Aug 2002
Location: Philly
Posts: 2,583
Default FLASH MX version

the previous fla was in mx 2004 prof....

here is the zip w/ MX version
Attached Files
File Type: zip popup.zip (75.7 KB, 248 views)
__________________
I need a new signature!
boyzdynasty is offline   Reply With Quote
Old 02-11-2004, 07:32 PM   #10
eggnogg
there's 8 pixels missing!
 
eggnogg's Avatar
 
Join Date: Apr 2003
Location: Portugal
Posts: 784
Default

thx dude! ill be able to work with that and get what i want!
thx again
eggnogg 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 Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:31 PM.

///
Follow actionscriptorg on Twitter

 


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