/    Sign up×
Community /Pin to ProfileBookmark

Java script for slideshow – problems with opera browser

Hi,

I have a slideshow on my webpage – the code is displayed below. The slideshow works perfectly in IE, Netscape and safari but I have problems when I display it in Opera and Mozilla.

The show doesn’t function in opera. Is there some additional code that I can add to enable it to function properly in an opera browser?

The slideshow runs ok in the Mozilla browser but the transitions (i.e the fade) don’t work. I tried some other scripts that allowed the transistions to fade in the Mozilla browser but the transition fade was very jumpy and wasn’t really a usable option. Is there some additional code I can add to the code below to help with the slide transitions in Mozilla?

Thanks for your help!
Bevis

// JavaScript Document

var slideShowSpeed = 5000
var crossFadeDuration = 3
var Photo = new Array()
Photo[0] = ‘images/slideshow/image1.jpg’
Photo[1] = ‘images/slideshow/image2.jpg’
Photo[2] = ‘images/slideshow/image3.jpg’
Photo[3] = ‘images/slideshow/image4.jpg’
var t
var j = 0
var p = Photo.length

var preLoad = new Array()
for (i = 0; i < p; i++){
preLoad[i] = new Image()
preLoad[i].src = Photo[i]
}

function runSlideShow(){
if (document.all){
document.images.SlideShow.style.filter=”blendTrans(duration=2)”
document.images.SlideShow.style.filter=”blendTrans(duration=crossFadeDuration)”
document.images.SlideShow.filters.blendTrans.Apply()

}
document.images.SlideShow.src = preLoad[j].src
if (document.all){
document.images.SlideShow.filters.blendTrans.Play()
}
j = j + 1
if (j > (p-1)) j=0
t = setTimeout(‘runSlideShow()’, slideShowSpeed)
}

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @Bevis spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...