Hızlı Konu Açma

Hızlı Konu Açmak için tıklayınız.

Son Mesajlar

Konulardaki Son Mesajlar

Reklam

Forumda Reklam Vermek İçin Bize Ulaşın

Birleşen parçalar

BlackKey

Üye
Fenerbahçe
Kayıtlı Üye
Katılım
12 Eylül 2014
Mesajlar
167
Tepkime puanı
0
Puanları
0
Birleşen parçalar

Bu javascriptle slideshowlarınıza ayrı bir görünüm kazandırın. Bu slide showa istediğiniz kadar resim koyabilirsiniz.

Aşağıdaki kodu sayfanıza kopyalayıp, Türkçe açıklamalarına göre gereken değişiklikleri yapınız.

Kod:
[/B][B]**********
<!-- Beginning of JavaScript -

////////////////////////////////////////////////////////////////////////////
// Buradan Asagisini degistirin 
////////////////////////////////////////////////////////////////////////////

// Resimlerinizin URLleri, dilediginiz kadar resim koyabilirsiniz.
var imgurl=new Array("pic1.jpg", "pic2.jpg", "pic3.jpg")

// Slideshowun Pencerenin sol marjinine uzaklığı
var x_finalpos=10

// Slideshowun pencerenin üst marjinine uzaklığı
var y_finalpos=140

// resimlerin ne süre sabit kalacağı (saniye)
var standstill=3

////////////////////////////////////////////////////////////////////////////
// Degisicek kisim sonu
////////////////////////////////////////////////////////////////////////////


// buradan asagisina dokunmayin
var x_slices=6
var y_slices=4
var imgpreload=new Array()
for (i=0;i<=imgurl.length-1;i++) {
	imgpreload[i]=new Image()
	imgpreload[i].src=imgurl[i]
}
var imgheight
var imgwidth
var screenheight
var screenwidth
var x_step=new Array()
var y_step=new Array()
var x_randompos=0
var y_randompos=0
var i_loop=0
var max_loop=20
var i_image=0
var width_slice
var height_slice
var cliptop=0
var clipbottom=height_slice
var clipleft=0
var clipright=width_slice
var spancounter=0
var pause=10
standstill=1000*standstill

function initiate() {
	screenheight=********.body.clientHeight-imgheight-30
	screenwidth=********.body.clientWidth-imgwidth-30
	width_slice=Math.floor(imgwidth/x_slices)
	height_slice=Math.floor(imgheight/y_slices)
	cliptop=0
	clipbottom=height_slice
	clipleft=0
	clipright=width_slice
	i_loop=0
	spancounter=0
    if (********.all) {
 	    for (i=0;i<=y_slices-1;i++) {
			for (ii=0;ii<=x_slices-1;ii++) {
				var thisspan=eval("********.all.span"+spancounter+".style")
				x_randompos=Math.ceil(screenwidth*Math.random())
				y_randompos=Math.ceil(screenheight*Math.random())
				thisspan.posLeft=x_randompos
				thisspan.posTop=y_randompos
                thisspan.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
				clipleft+=width_slice
		        clipright+=width_slice
		        spancounter++
			}
        	clipleft=0
	        clipright=width_slice
	        cliptop+=height_slice
	        clipbottom+=height_slice
		}
   }
   explode_IE()
}

function changeimage() {
	spancounter=0
	for (i=0;i<=y_slices-1;i++) {
		for (ii=0;ii<=x_slices-1;ii++) {
			var thisspan=eval("********.all.span"+spancounter+".style")		
			thisspan.posLeft=-5000
			thisspan.posTop=-5000
			spancounter++
		}
	}
	spancounter=0
	if (i_image>imgurl.length-1) {i_image=0}
	for (i=0;i<=y_slices-1;i++) {
		for (ii=0;ii<=x_slices-1;ii++) {
			var thisinnerspan=eval("span"+spancounter)
    		thisinnerspan.innerHTML="<img src='"+imgurl[i_image]+"'>"
			spancounter++
		}
	}
	imgwidth=********.all.span0.offsetWidth
	imgheight=********.all.span0.offsetHeight
	i_image++
	initiate()
}

function explode_IE() {
	spancounter=0
	if (i_loop<=max_loop-1) {
		for (i=0;i<=y_slices-1;i++) {
			for (ii=0;ii<=x_slices-1;ii++) {
				var thisspan=eval("********.all.span"+spancounter+".style")
				x_step[spancounter]=(x_finalpos-thisspan.posLeft)/(max_loop-i_loop)
				y_step[spancounter]=(y_finalpos-thisspan.posTop)/(max_loop-i_loop)		
				thisspan.posLeft+=x_step[spancounter]
				thisspan.posTop+=y_step[spancounter]
				spancounter++
			}
		}
		i_loop++
		var timer=setTimeout("explode_IE()",pause)
	}
	else {
		spancounter=0
		clearTimeout(timer)
		var timer=setTimeout("changeimage()",standstill)
	}
}

if (********.all) {
	for (i=0;i<=y_slices-1;i++) {
		for (ii=0;ii<=x_slices-1;ii++) {
    		********.write("<span id='span"+spancounter+"' style='position:absolute;left:-5000px'></span>")
			spancounter++
		}
	}
	spancounter=0
}

if (********.all) {window.onload=changeimage}
// - End of JavaScript - --> 
[/B][B]</script>
[/B][B]
 

Users Who Are Viewing This Konu (Users: 0, Guests: 1)

Üst