задача следующего плана... скрипт рабочий, но не могу добавить эффект затухания при прокрутке. Сам в этом не разбираюсь. Заранее благодарен за помощь. А вот и он:
<html><head>
<title></title>
<center><br><br>
<style type="text/css"><!--
td {font-family: Verdana, Arial, sans-serif, Helvetica; font-size: 12px; color: #F0F0F0;}
a {font-family: Verdana, Arial, sans-serif, Helvetica; font-size: 12px; color: #F0F0F0; text-decoration: none}
#btnStyle {font-family: Verdana, Arial, sans-serif, Helvetica; font-size: 12px; background-color: #C0C020; border-top: 0px solid; border-bottom: 0px solid; border-left: 0px solid; border-right: 0px solid;}
//--></style>
<script language="JavaScript" type="text/JavaScript"><!--
//declaring necessary local variables
var img = new Array(10); //array to hold the images
var start = null; //start pointer
var counter = 1; //counts the image sequences
var delayTime = null; //user defined
if(document.images) //pre-load all the images
{
for(i = 1; i <= 25; i++)
{
img[i] = new Image();
img[i].src = "http://javascript.ru/forum/images/dim" + i + ".jpg";
}
}
//function for getting the user defined delay time
function getDelayTime(dlTime)
{
var temp = parseInt(dlTime);
if(temp != NaN)
delayTime = temp * 1000;
else
delayTime = 4000;
}
//function for changing the images
function anim()
{
counter++;
document.images[0].src = img[counter].src;
if(counter == 25)
counter = 0; //sets the counter value to 0
}
// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = images[0].src();
preLoad[i].src = Pic[i];
//function for starting the slide show
function slide()
{
getDelayTime(document.form1.delay.value);
with(document.form1)
{
start = setInterval("anim()", delayTime);
stShow.disabled = true;
spShow.disabled = false;
}
}
//function to stop the slide show
function stopSlide()
{
clearInterval(start);
document.form1.stShow.disabled = false;
document.form1.spShow.disabled = true;
}
//--></script>
</head>
<body bgcolor="6c6767" topmargin=0 bottommargin=0 leftmargin=0 rightmargin=0>
<tr><td valign=top align=center>
<img src="http://javascript.ru/forum/images/dim1.jpg" border=0 height="75%"><br>
<form name="form1">
скорость показа, сек?:
<input type=text size=2 value="4" name=delay><br>
<input type=button value="Старт" name=stShow onClick="slide();" id=btnStyle>
<input type=button value="Стоп" name=spShow onClick="stopSlide();" id=btnStyle DISABLED><br>
</form>
</body></html>