Message :
Signature :
Background :
Share | 
 

 Code Hallowen

Xem chủ đề cũ hơn Xem chủ đề mới hơn Go down 
Tác giảThông điệp
Admin

Admin

Quản lý diễn đàn

Huy chương : >>Code Hallowen Th_1010<<
Tổng số bài gửi : 1659
Điểm : 3444
Được cảm ơn : 800
Ngày tham gia : 24/08/2010
Cơ quan (Trường, lớp) : diachatthuyvan.net

Code Hallowen Empty
Bài gửi Code Hallowen EmptyCode Hallowen   Code Hallowen I_icon_minitimeTue Oct 26, 2010 10:27 pm Bài viết số 1





var num_flakes = 1;

var snowflakes = new Array("http://ca5.upanh.com/14.626.18859456.UdT0/ma.png");

var aDOM = 0, ieDOM = 0, nsDOM = 0; var stdDOM = document.getElementById;

if (stdDOM) aDOM = 1; else {ieDOM = document.all; if (ieDOM) aDOM = 1; else {

var nsDOM = ((navigator.appName.indexOf('Netscape') != -1)

&& (parseInt(navigator.appVersion) ==4)); if (nsDOM) aDOM = 1;}}

function findDOM(objectId, wS) {

if (stdDOM) return wS ? document.getElementById(objectId).style:

document.getElementById(objectId);

if (ieDOM) return wS ? document.all[objectId].style: document.all[objectId];

if (nsDOM) return document.layers[objectId];

}



function findLivePageWidth() {return window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body != null ? document.body.clientWidth :700;}function findLivePageHeight() {return window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body != null? document.body.clientHeight :500;}

function posX() {return typeof window.pageXOffset != 'undefined' ? window.pageXOffset:document.documentElement.scrollLeft? document.documentElement.scrollLeft:document.body.scrollLeft? document.body.scrollLeft:0;}

function posY() {return typeof window.pageYOffset != 'undefined' ? window.pageYOffset:document.documentElement.scrollTop? document.documentElement.scrollTop: document.body.scrollTop?document.body.scrollTop:0;}



var speed = 30;var movw = new Array();var movh = new Array();var move = new Array();var stepw = new Array();var steph = new Array();var posw = new Array();var posh = new Array();var dir = new Array();var winWidth;var winHeight;

function startSnow() {winWidth = findLivePageWidth()-50;winHeight = findLivePageHeight()-50;

for (var i = 0; i < num_flakes; i++){move[i] = 0;movh[i] = 12+ Math.random()*2;movw[i] = 11+ Math.random()*4;posw[i] = Math.random()*(winWidth-35)+12;posh[i] = Math.random()*winHeight; stepw[i] = 0.02 + Math.random()/10;steph[i] = 0.7 + Math.random();dir[i] = (Math.random()>0.5)?1:-1;document.write('');}setTimeout("moreSnow()", speed);}

function moreSnow() {for (var i = 0; i < num_flakes; i++) {if (posh[i] > winHeight-50) {posw[i] = 10+ Math.random()*(winWidth-movw[i]-30);posh[i] = 0;dir[i]=(Math.random()<0.5)?1:-1;stepw[i] = 0.02 + Math.random()/9;steph[i] = 1.3 + Math.random();} move[i] += stepw[i] *dir[i]; if (Math.abs(move[i]) > 3) {dir[i]=-dir[i]; posh[i]+=Math.abs(movh[i]*move[i]);posw[i]+=movw[i]*move[i]; move[i]=0;} objstyle = findDOM('snow'+i,1); objstyle.left = (posX()+posw[i] + movw[i]*move[i])+'px'; objstyle.top = (posY()+posh[i] + movh[i]*(Math.abs(Math.cos(move[i])+move[i])))+'px';objstyle.visibility = 'visible';} setTimeout("moreSnow()", speed);}

startSnow();



Về Đầu Trang Go down
http://www.diachatthuyvan.net
ngtuanlong

avatar

Điều hành diễn đàn

Huy chương : Code Hallowen Th_310Code Hallowen Medal112
Tổng số bài gửi : 123
Điểm : 198
Được cảm ơn : 19
Ngày tham gia : 14/09/2010

Code Hallowen Empty
Bài gửi Code Hallowen EmptyRe: Code Hallowen   Code Hallowen I_icon_minitimeFri Oct 29, 2010 12:16 pm Bài viết số 2

không có ảnh demo hả anh? với lại không có hướng dẫn hay chỉ dẫn dùng như thế nào và copy vào đâu? anh bổ xung thêm thông tin đi!
Về Đầu Trang Go down
Ma_Quyen

Ma_Quyen

Quản lý diễn đàn

Huy chương : Code Hallowen Th_310Code Hallowen Medal111
Tổng số bài gửi : 765
Điểm : 1081
Được cảm ơn : 90
Ngày tham gia : 14/10/2010

Code Hallowen Empty
Bài gửi Code Hallowen EmptyRe: Code Hallowen   Code Hallowen I_icon_minitimeFri Oct 29, 2010 1:50 pm Bài viết số 3

đúng là phai bo sung
nhin ko ai \hieu
Về Đầu Trang Go down
Sponsored content





Code Hallowen Empty
Bài gửi Code Hallowen EmptyRe: Code Hallowen   Code Hallowen I_icon_minitime Bài viết số 4

Về Đầu Trang Go down
 

Code Hallowen

Xem chủ đề cũ hơn Xem chủ đề mới hơn Về Đầu Trang 

 Xem thêm các bài viết khác cùng chuyên mục

-
Trang 1 trong tổng số 1 trang

Permissions in this forum:Bạn không có quyền trả lời bài viết
diachatthuyvan.net™ :: KIẾN THỨC TIN HỌC VÀ INTERNET :: Forumotion-
Chuyển đến 
Powered by: phpBB2
Copyright ©2010 - 2015, GNU General Public License.
Skin vBulletin 4.0 Rip By Ligerv
Múi giờ hiện tại GMT. Hôm nay: Fri May 03, 2024 4:03 am.
Liên hệ: diachatthuyvan.com@gmail.com | Hiển thị tốt nhất trên trình duyệt Firefox và độ phân giải 1024x768 trở lên.

Website liên hệ-Trung tâm thông tin lưu trữ địa chất - Cục địa chất Việt NamCục quản lý tài nguyên nướcHội ĐCTV VNTrường ĐH Mỏ - Địa chất Hà NộiHợp tác đào tạo nước ngoài ĐH Mỏ - Địa chất Hà NộiKhoa địa chất và dầu khí ĐH Bách Khoa Tp HCMDiễn đàn diachatvietnam.netLiên đoàn QH và ĐT TNN miền NamCông ty Cổ Phần Phát triển bền vững Việt NamCông ty Cổ phần TV ĐT PT CNMT Việt NamCông ty Cổ phần Địa kỹ thuật Đông DươngCông ty VietDeltaCông ty tài nguyên và môi trườngDiễn đàn lớp địa chất B K55Diễn đàn tình thương
Chat ( )
Free forum | ©phpBB | Free forum support | Báo cáo lạm dụng | Thảo luận mới nhất