Vanuit Flash:
code:
1
| getURL("javascript:openWin('http://someurl.com', 600, 500)"); |
In de html-pagina waarin de Flash staat wordt een stukje Javascript erbij gehaald, waarin deze functie staat:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| // Opens a popup window width provided width and height or
// fullscreen if no dimensions are provided.
// Also optionally adds the menu and toolbars
function openWin(url, width, height, menus) {
var awidth = screen.availWidth;
var aheight = screen.availHeight;
if (width != null && height != null) {
var scrleft = (awidth > width)?((awidth-width)/2):0;
var scrtop = (aheight > height)?((aheight-height)/2):0;
var scrwidth = (awidth > width)?width:awidth;
var scrheight = (aheight > height)?height:aheight;
var features = 'width='+scrwidth+',height='+scrheight+',resize=no,top='+scrtop+',left='+scrleft;
} else {
if (navigator.userAgent.match(/msie/i)) {
var features = 'fullscreen';
} else {
var scrwidth = awidth;
var scrheight = aheight;
var features = 'width='+scrwidth+',height='+scrheight+',resize=no,top=0,left=0';
}
}
var strmenu = menus?",menubar=1,toolbar=1":"";
window.open(url,'newwin'+Math.round(Math.random()*100),features+',scrollbars=1'+strmenu);
} |
(excuus voor vernaggelen vd. layout)
[
Voor 9% gewijzigd door
Explore op 11-12-2003 19:15
]