Current location: Hot Scripts Forums » General Web Coding » JavaScript » Anyone know how to edit this rotating image script?


Anyone know how to edit this rotating image script?

Reply
  #1 (permalink)  
Old 10-19-05, 09:52 AM
likegluelikecrew likegluelikecrew is offline
New Member
 
Join Date: Oct 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Anyone know how to edit this rotating image script?

I found this "fading/rotating image with individual links" script on the internet, but I want to make the individual images stay a little longer on the page before fading into the next one. Anyone know how to do this? Which #'s would I change and what would I change them to? Thanks...

The code...

<script type="text/javascript">
var Pic=new Array("../images/withrequestnav/house.gif","../images/withrequestnav/world.gif","../images/withrequestnav/ipod.gif", "../images/withrequestnav/dvd.gif")
var picUrl=new Array("../lifestyles/anywherehouse.asp","../lifestyles/anywhereworld.asp","../lifestyles/ongo.asp","../lifestyles/accessmovie.asp")
var slideShowSpeed = 5000;
var t;
var r;
var f;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
var globalOpacity = 0;
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}
function runSlideShow() {
document.images.SlideShow.src = preLoad[j].src;
if(document.getElementById){
ael=document.getElementById('SlideURL');
ael.setAttribute('href',picUrl[j]);
}
setalpha(0,"SlideShow");
r=window.setTimeout("reveal('0')", 100);
j = j + 1;
if (j > (p - 1)) j = 0;
t = window.setTimeout('runSlideShow()', slideShowSpeed);
}
function reveal(opacity) {
if (opacity <= 100 ){
setalpha(opacity,"SlideShow");
opacity += 5;
globalOpacity = opacity;
r = window.setTimeout("reveal("+opacity+")", 100);
}
else {
f=window.setTimeout("fade('100')",1000);
}
}
function fade(opacity) {
if (opacity >= 0 ){
setalpha(opacity,"SlideShow");
opacity -= 5;
globalOpacity = opacity;
r = window.setTimeout("fade("+opacity+")", 50);
}
}
function setalpha(opacity,t) {
var target=document.getElementById(t);
if (document.getElementById ) {
if (target.style.MozOpacity!=null) {
target.style.MozOpacity = (opacity/100) - 0.001; //patrick h. lauke (http://www.splintered.co.uk/) workaround for Mozilla 'flash' bug - I never would have caught that
} else if (target.style.opacity!=null) {
target.style.opacity = opacity/100;
} else if (target.style.filter!=null) {
target.style.filter = "alpha(opacity=" + opacity + ")";
} else if (target.style.KhtmlOpacity!=null) {
target.style.KhtmlOpacity = opacity/100;
}
}
}
window.onload = runSlideShow;
</script>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 10-21-05, 05:18 PM
ben.periton ben.periton is offline
Wannabe Coder
 
Join Date: Oct 2004
Posts: 183
Thanks: 0
Thanked 0 Times in 0 Posts
Guessing it would be
var slideShowSpeed = 5000;

Change to what speed you want, 5000 = 5 seconds so 8 secinds would be 8000
__________________
Ben Periton
http://ben.periton.co.uk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Raffle/Lottery Script (Very profitable!), Coded it myself. Voltaire General Advertisements 6 03-16-09 08:15 AM
2 profitable script sites for sale cms-master.com General Advertisements 3 07-03-07 11:17 AM
Image Hosting Script, Willing To Pay $$$ ObliviatorKK Job Offers & Assistance 0 01-01-05 06:04 PM
Free Image Hosting / Script Sale 4n7hr4x Job Offers & Assistance 9 10-29-04 09:13 PM
small image script needed. graham barnes Script Requests 0 06-18-04 04:06 AM


All times are GMT -5. The time now is 01:47 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.