หน้าแรก > Flash > open new window ใน flash

open new window ใน flash

มิถุนายน 2, 2008 ใส่ความเห็น Go to comments

การทำ 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>

Categories: Flash ป้ายกำกับ:
  1. ยังไม่มีความเห็น
  1. No trackbacks yet.

ใส่ความเห็น

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / เปลี่ยนแปลง )

Twitter picture

You are commenting using your Twitter account. Log Out / เปลี่ยนแปลง )

Facebook photo

You are commenting using your Facebook account. Log Out / เปลี่ยนแปลง )

Connecting to %s

Follow

Get every new post delivered to your Inbox.