ตัวอย่างนี้อธิบายถึงรหัสเอฟเฟกต์การสลับกราฟแบนเนอร์ที่ใช้โดยเว็บไซต์ตาม Flash ฟังก์ชั่นการสลับหลักของตัวอย่างนี้เสร็จสมบูรณ์โดย Flash แบ่งปันสำหรับการอ้างอิงของคุณ
รหัสการใช้งานเฉพาะมีดังนี้:
คัดลอกรหัสดังนี้: <! Doctype html public "-// w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "content-type" content = "text /html; charset = utf-8" />
<title> เอฟเฟกต์การสลับภาพแบนเนอร์เว็บไซต์ (Flash) </title>
</head>
<body>
<script type = "text/javascript" src = "js/swfppt.js"> </script>
<script type = "text/javascript">
// <! cdata [[[
loadswfppt ({width: 400, ความสูง: 450, text_height: 0,
Pic: [
{img: 'images/banner1.jpg', ข้อความ: '01', ลิงค์: 'img3.html'},
{img: 'images/banner2.jpg', ข้อความ: '02', ลิงค์: 'img4.html'},
{img: 'images/banner3.jpg', ข้อความ: '03', ลิงค์: 'img5.html'}
-
-
</script>
</body>
</html>
เอฟเฟกต์การดำเนินการแสดงในรูปด้านล่าง:
คลิกที่นี่เพื่อดาวน์โหลดรหัสตัวอย่างที่สมบูรณ์
ฉันหวังว่าบทความนี้จะเป็นประโยชน์กับการเขียนโปรแกรมเว็บของทุกคน