2008-08-10 12:55:46

cahbagus_dw
» FTalkWhiz
FTalk Level: zero
2927
0
1969-12-31

Re: [align=justify][b]bagi member yang ingin bertanya seputar tweaking FS, silahkan bertanya dan posting disini, tapi jangan lupa,,sebelum itu tolong [url=http://theftalk.com/t2744-%5BImportant%5D-

[quote=rusak]bro bg linkernya dong??[/quote] pan udah di pm bro saia tunggu laporannya [quote=planetoheaven]diprymary foto kita bisa berubah˛[/quote] ini bro buat kamu langsung copas ajah deh [spoiler]//Animated Primary Photo if (!attachOnLoadHandler(function() { randImage();})) window.onload = function() { randImage();}; function randImage() { RANDOMIMG.init(); } if (typeof RANDOMIMG == "undefined") { RANDOMIMG = {}; } RANDOMIMG = { image: [], sibling: [], randimage: [], init: function() { var preload = []; for (var n=0;n<this.randimage.length;n++) { preload[n] = []; preload[n].setAttribute("src",""+this.randimage[n]+""); } this.randimage[0] = "URL PHOTO1"; this.randimage[1] = "URL PHOTO2"; this.randimage[2] = "URL PHOTO2"; this.randimage[3] = "URL PHOTO4"; this.randimage[4] = "URL PHOTO5"; this.randimage[5] = "URL PHOTO6"; this.image = document.createElement("DIV"); this.image.setAttribute("class","randImg"); this.image.innerHTML = "<img name=\"defaultimage\" width=\"200\" height=\"250\" src=\""+this.randimage[Math.floor(Math.random()*(this.randimage.length))]+"\">"; this.sibling = this.getModuleByClassName(/imgblock200/i)[0]; this.sibling.parentNode.replaceChild(this.image,this.sibling); setInterval("RANDOMIMG.rotateimage()", 2*1000); }, rotateimage: function() { var ind = 0; if (ind == (temp = Math.floor(Math.random()*(this.randimage.length)))) { ind = (ind == 0) ? 1 : ind - 1; }else { ind = temp; } document.images.defaultimage.setAttribute("src",""+this.randimage[ind]+""); }, getModuleByClassName: function(sClass) { var elm = []; var els = document.getElementsByTagName("*") || document.all; for (var j=0,k=els.length;j<k;j++) { if (new RegExp(sClass).test(els[j].className))elm.push(els[j]); } return elm; } };[/spoiler] taruh kode itu di bagian paling bawah dari js kamu Ganti URL PHOTO 1 - URL PHOTO 6 dengan url photo yg mo dipake =)

Last edited by cahbagus_dw (2008-08-10 13:03:18)

Board footer

© 2024 F Talk

Current time is 20:56

[ 12 queries - 0.619 second ]
Privacy Policy