респект sandwarrior с внешним скриптом это всё правильно,
добавлю:
function popWindow(URL,winName,h,w)
{
console=window.open(URL,winName,'width='+w +',height='+h+', scrollbars=1, left=0,top=0,directories=0,location=0,menubar=0,st atus=0,toolbar=0,resizable=0,l
eft=280, top=150'
console.focus();
}
во флашь:
on (release)
{
getURL('java script: popWindow("some.htm","Whattta some",500,500);'
}
имеем окошечко попапное some.htm без элементов окна(меню, статус бара и тд), кроме скролов и титула "Whattta some" в координатах экрана 280х150, размеро 500х500
а вот Ашшо вариант функции которая выводит окошечко по адресу и размерам картинки:
function photo_win(img_path,img_w,img_h,img_alt)
{
var str, StrBody;
str = 'resizable=no,scrollbars=no,status=yes,width=& #39;+img_w+',height='+img_h+',screenX= 0,screenY=0,left=0,top=0';
if (document.all){
StrBody = '<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="White" onresize="self.window.location.reload();">';
} else {
StrBody = '<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="White" >';
}
var win_op = window.open('','show', str);
win_op.document.open();
win_op.document.writeln('<html>'
win_op.document.writeln('<head>'
win_op.document.writeln('<title>' + img_alt + '</title>'
win_op.document.writeln('<script>'
win_op.document.writeln('function resize_img() {'
win_op.document.writeln('var width = document.image.width;'
win_op.document.writeln('var height = document.image.height;'
win_op.document.writeln('if (!(document.all)){ self.resizeTo(width,height); } else { self.resizeTo((width+12),(height + 31));'
win_op.document.writeln(' }'
win_op.document.writeln('}'
win_op.document.writeln('</script>'
win_op.document.writeln('</head>'
win_op.document.writeln(StrBody);
win_op.document.writeln('<img name="image" src='+ img_path + ' border=0 alt="'+img_alt+'" onload="resize_img();">'
win_op.document.writeln('</body>'
win_op.document.writeln('</html>'
win_op.document.close();
}
во флашь:
on (release)
{
getURL('java script: photo_win("images/som.jpg",300,300,"som");'
}
имеем окошечко 300 х 300 c альтом som картинки по адресу images/som.jpg