[ Tin nhắn mới · Thành viên · Quy tắc diễn đàn · Tìm kiếm · RSS]
THỐNG KÊ DIỄN ĐÀN
BÀI VIẾT MỚICHỦ ĐỀ SÔI ĐỘNGTHÀNH VIÊN TÍCH CỰCTHÀNH VIÊN MỚI
  • Chồng Nhâm Thâ... (1)
  • Bộ sách về tử ... (1)
  • Thuốc chữa bện... (1)
  • Bệnh nhiệt miệ... (0)
  • Tạo màng ngăn ... (0)
  • Tổng Hợp về YA... (13)
  • Tăng font chữ ... (13)
  • Tử vi năm Nhâm... (11)
  • Phong thủy cho... (10)
  • Thái cực quyền... (8)
  • TieuBao
  • kcdl
  • havanchan55
  • minzjkute
  • 12a3
  • huyenntn17fsoft
  • trininh0610
  • linhphuongcva
  • xedayinoxaht
  • matkinhauviet11
    • Page 1 of 1
    • 1
    DIỄN ĐÀN_VNTAMTAY » THƯ VIỆN WEBSITE » CODE CHO WEBSITE - FORUM » Chuỗi các ngôi sao bay theo Mouse (Chuỗi các ngôi sao bay theo Mouse)
    Chuỗi các ngôi sao bay theo Mouse
    TieuBaoNgày: Thứ 7, 09-Mar-13, 22:33:11 | Bài viết # 1


    Nhóm: Administrator
    Số bài viết: 3090
    Khen thưởng: 3
    Được cảm ơn: 10001
    Trạng thái: Offline
    Quote
    <HTML> <HEAD> <TITLE>Hieu u'ng JavaScript - Le Quang Anh Hu'ng</TITLE> <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=x-user-defined"> <META content="Microsoft FrontPage 4.0" name=GENERATOR> <META content="Le Quang Anh Hu'ng Homepage" name=Author> <script language=JavaScript> <!--Che dấu những trình duyệt mà không biết JavaScript (ở đây sử dụng câu lệnh If và else if) var version = 0; if (navigator.userAgent.indexOf("MSIE 4") != -1) version = 5; else if (navigator.userAgent.indexOf("MSIE 3") != -1) version = 1; else if (navigator.userAgent.indexOf("Mozilla/4") != -1) version = 4; else if (navigator.userAgent.indexOf("Mozilla/4.5") != -1) version = 7; else if (navigator.userAgent.indexOf("Mozilla/3") != -1) version = 3; else if (navigator.userAgent.indexOf("Mozilla/2") != -1) version = 2; else if (navigator.userAgent.indexOf("MSIE 4.5") != -1) version = 6; else version = 8; // --> </SCRIPT> <STYLE> <!-- Nơi đây dùng để tạo mẫu kích thước, vị trí cho Images(6 ngôi sao)--> #trailsprite1 { HEIGHT: 10px; LEFT: 0px; POSITION: absolute; TOP: 1px; VISIBILITY: visible; WIDTH: 10px; Z-INDEX: 100 } #trailsprite2 { HEIGHT: 10px; LEFT: 0px; POSITION: absolute; TOP: 0px; VISIBILITY: visible; WIDTH: 10px; Z-INDEX: 10 } #trailsprite3 { HEIGHT: 10px; LEFT: 0px; POSITION: absolute; TOP: 0px; VISIBILITY: visible; WIDTH: 10px; Z-INDEX: 10 } #trailsprite4 { HEIGHT: 10px; LEFT: 0px; POSITION: absolute; TOP: 0px; VISIBILITY: visible; WIDTH: 10px; Z-INDEX: 10 } #trailsprite5 { HEIGHT: 10px; LEFT: 0px; POSITION: absolute; TOP: 0px; VISIBILITY: visible; WIDTH: 10px; Z-INDEX: 10 } #trailsprite6 { HEIGHT: 10px; LEFT: 0px; POSITION: absolute; TOP: 0px; VISIBILITY: visible; WIDTH: 10px; Z-INDEX: 10 } </STYLE> </HEAD> <BODY bgColor=#000000> <!-- chỉ màu nền background color --> <script language=JavaScript1.1> if (version > 3) <!-- Nếu ver > 3 (JavaScript) khi đó sẽ xuất ra màn hình bức ảnh thứ 1 và thứ tự tiếp theo ứng với mỗi images bao gồm chiều cao, viền, tên, Id --> document.write('<div id="trailSprite1"><img src="http://www.vn-zoom.com/images/trailgif1.gif"height="10"width="10"border="0"name= "trailSprite1img"></div><div id="trailSprite2"><img src="http://www.vn-zoom.com/images/trailgif2.gif"height="10"width="10"border="0"name= "trailSprite2img"></div><div id="trailSprite3"><img src="http://www.vn-zoom.com/images/trailgif3.gif"height="10"width="10"border="0"name= "trailSprite3img"></div><div id="trailSprite4"><img src="http://www.vn-zoom.com/images/trailgif4.gif"height="10"width="10"border="0"name= "trailSprite4img"></div><div id="trailSprite5"><img src="http://www.vn-zoom.com/images/trailgif5.gif"height="10"width="10"border="0"name= "trailSprite5img"></div><div id="trailSprite6"><img src="http://www.vn-zoom.com/images/trailgif6.gif"height="10"width="10"border="0"name= "trailSprite6img"></div>') </SCRIPT> <script language=JavaScript> <!-- Nơi dòng lệnh này hỗ trợ cho trình duyệt Netscape không có cũng chẳng sao --> <!-- NS4 = (("Netscape"==navigator.appName) && ("4"<=parseInt(navigator.appVersion))) window.name = "right" <!-- Bạn phải cẩn thận ngay chổ chữ "right" đây là chỗ nguy hiểm chết người nếu bạn không để ý frames của bạn sẽ sổ tầm bậy liền đó, chính vì vậy bạn ấn định để sổ frames tên gì thì phải đặt tên đó à nghe! --> // --> </SCRIPT> <script language=Javascript1.1> <!-- var isNS = (navigator.appName == "Netscape"); layerRef = (isNS) ? "document" : "document.all"; styleRef = (isNS) ? "" : ".style"; var queue = new Array();var NUM_OF_TRAIL_PARTS = 6 for (x=1; x < 7; x++) { ///////////////Image Preload eval("trailSpriteFrame" + x + "=new Image(10,10);"); eval("trailSpriteFrame" + x + ".src='images/trailgif"+x+".gif';"); }////////////////////////////////////////////////Đối tượng vệt ngôi sao chạy theo mouse function trailSpriteObj(anID) { this.trailSpriteID = "trailSprite" + anID; //Tùy đằng trước this.imgRef = "trailSprite" + anID + "img"; //Chuyển tới tên những ngôi sau this.currentFrame = 1; //nhìn thấy khung this.animateTrailSprite = animateTrailSprite; //Khai báo phương pháp vòng lặp đối tượng } function animateTrailSprite() { if (this.currentFrame <7) {// Nếu có hoạt cảnh (mà) những khung rời bỏ, thay đổi những ngôi sao kết cấu hiện thời if (isNS) { //Phát hiện ra bộ duyệt và thực hiện sự chuyển đổi hình ảnh eval("document['"+this.imgRef+"'].src=trailSpriteFrame" + this.currentFrame + ".src"); } else { eval("document['"+this.imgRef+"'].src=trailSpriteFrame" + this.currentFrame + ".src"); } this.currentFrame ++; //và tăng thêm hiện thời những đối tượng hình ảnh } else { //Khung hiện hành như vậy đạt đến giới hạn nó che dấu ngôi sao eval(layerRef + '.' + this.trailSpriteID + styleRef + '.visibility="hidden"'); } }///////////////////////////////////////////////////////////////// function processAnim() { for(x=0; x < NUM_OF_TRAIL_PARTS; x++) queue[x].animateTrailSprite(); } function processMouse(e) { currentObj = shuffleQueue(); if (isNS) { eval("document." + currentObj + ".left=e.pageX-0;"); eval("document." + currentObj + ".top=e.pageY+5;"); } else { eval("document.all." + currentObj + ".style.pixelLeft=event.clientX+document.body.scro llLeft-0;"); eval("document.all." + currentObj + ".style.pixelTop=event.clientY+document.body.scrol lTop+5;"); } } function shuffleQueue() { lastItemPos = queue.length - 1; lastItem = queue[lastItemPos]; for (i = lastItemPos; i>0; i--) queue[i] = queue[i-1]; queue[0] = lastItem; queue[0].currentFrame = 1; //sự sắp đặt lại số thứ tự hình ảnh của những đối tượng & làm cho ngôi sao rõ ràng thêm eval(layerRef + '.' + queue[0].trailSpriteID + styleRef + '.visibility="visible"'); return queue[0].trailSpriteID; } function init() { for(x=0; x<NUM_OF_TRAIL_PARTS; x++) //Sắp hàng đầy đủ vệt dài của đối tượng queue[x] = new trailSpriteObj(x+1); if (isNS) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = processMouse; setInterval("processAnim();",25); } if (version > 3) window.onload = init; // --> </SCRIPT> </body> </html>


    TRẺ DÙNG SỨC KHỎE KIẾM TIỀN-GIÁ DÙNG TIỀN MUA SỨC KHỎE

    NHỮNG GÌ CON NGƯỜI KHÔNG NGHĨ TỚI LẠI XẢY RA TRONG ĐỜI
     
    DIỄN ĐÀN_VNTAMTAY » THƯ VIỆN WEBSITE » CODE CHO WEBSITE - FORUM » Chuỗi các ngôi sao bay theo Mouse (Chuỗi các ngôi sao bay theo Mouse)
    • Page 1 of 1
    • 1
    Search:

    click ủng hộ vntamtay
    Chát với Tôi
    300
    Liên kết quảng cáo
    Buôn bán phụ tùng!
    Đang truy cập
    Khu đăng nhập
    Video Clip
    00:30:34

    DTN _Ky thuat sua chua xe may

    • Views:
    • Total comments: 0
    • Rating: 0.0
    Tỷ giá tiền tệ