การทำ open new window จาก flash มีหลายวิธี
วิธีแรกใส่ script ตามนี้เลยจ้า…
[ใส่ script ที่ปุ่ม]
on(release){
getURL(“javascript:popupwindow(‘aaa.html’,'game’,'height=500,width=300,top=0,left=0,resizable=no,scrollbar=no’)”);
}
วิธีที่ 2 (คล้ายๆ กับวิธีแรก)
[ใส่ script ที่ปุ่ม]
on(release){
getURL(“javascript:window.open (‘aaa.html’,'thewin’,'fullscreen=yes,toolbar=no,scrollbar=no’)”);
}
วิธีที่ 3 ได้ผลมากที่สุด (มากกว่า 2 วิธีแรก แต่เอามาบอกตอนท้าย งิงิ)
[ใส่ script ที่เฟรม]
btn.onRelease = function(){
getURL(“javascript:openwin(‘aaa.html’,'640′,’400′)”);
}
และใส่ code ต่อที่ html
<head>
<script language=”Javascript”>
function openwin(url,w,h){
var winprop = “width=”+w+”,height=”+h;
openwin = window.open(url,”winprop”);
}
</script>
</head>
ป้ายกำกับ: open new window