|
||||||
|
||||||
Flash - Pop Up Windows

Free Flash Pop Up Tutorial
Step Two: Window Position
What you may have noticed is that in this list of variables above (address, winName, width etc.), there is no info on the position of the window. If what you wanted to do is place the Window so many pixels from the left of the screen and so many from the top you could have a variable here sending those numbers to the function. But I have not done this because JavaScript give the extra option of positioning the Window relative to the centre of the screen. Therefore I have left this setting in the JavaScript Function. If you look at line three: getURL... You will see towards the end of the line:
Left Button
top='+0+',
Zero pixels from the top of the screen.left='+150+'
150 pixels from the left of the screen.This is quite straight forward. But the next button is different:
Middle Button
top='+((screen.height/2)-("+h/2+"))+',
Here the JavaScript positions the Window in the centre of the screen: From top to bottom:
Pop Up Window is centred from top to bottom.Screen height divided by 2, minus half the height of the window.
Note: h is the height of the Window. See earlier in the line (height="+h+"). The reason for this h is so that the Screen height and Widow height do not get confused.
left='+((screen.width/2)-("+w/2+"))
This is the code that places the Window in the centre of the screen: From left to right.Right Button
top='+((screen.height/2)-("+h/2+"))+',
Same as above.left='+((screen.width/2)+100)
Positions the Window 100 pixels to the right of centre.
|
Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates
|
|
|
All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.
|