Reply
Slideshow Opacity
Old 03-26-2005, 07:51 AM Slideshow Opacity
Novice Talker

Posts: 5
Hello

Can anybody help me, ive been trying to change a slideshow script so that it uses opacity enabling it to work in Netscape, but I cant get it to work.
Any help or advice would be brilliant as I am on the point of giving up.
Thank you

<HTML>
<Head>
<Script Language=JavaScript>

var slideShowSpeed1 = 4000;
var slideShowSpeed2 = 6000;

var currIMG1 = 0;
var currIMG2 = 0;

var Pic1 = new Array()
Pic1[0] = 'pic/bcn1.jpg'
Pic1[1] = 'pic/bcn2.jpg'
Pic1[2] = 'pic/bcn3.jpg'

var nPix1 = Pic1.length-1;
var preLoad1 = new Array()
for (i=0; i<nPix1+1; i++)
{
preLoad1[i] = new Image()
preLoad1[i].src = Pic1[i]
}

var Pic2 = new Array()
Pic2[0] = 'pic/bcn1.jpg'
Pic2[1] = 'pic/bcn2.jpg'
Pic2[2] = 'pic/bcn3.jpg'


var nPix2 = Pic2.length-1;
var preLoad2 = new Array()
for (n=0; n< nPix2+1; n++)
{
preLoad2[n] = new Image()
preLoad2[n].src = Pic2[n]
}

function runSlideShow1(){

SlideShow1.style.filter="blendTrans(duration=2)";
SlideShow1.filters.blendTrans.Apply();
SlideShow1.src = preLoad1[currIMG1].src;
SlideShow1.filters.blendTrans.Play();
currIMG1++
if (currIMG1 > (nPix1)){currIMG1=0}
setTimeout('runSlideShow1()',slideShowSpeed1);
}

function runSlideShow2(){

SlideShow2.style.filter="blendTrans(duration=5)";
SlideShow2.filters.blendTrans.Apply();
SlideShow2.src = preLoad2[currIMG2].src;
SlideShow2.filters.blendTrans.Play();
currIMG2++
if (currIMG2 > (nPix2)){currIMG2=0}
setTimeout('runSlideShow2()',slideShowSpeed2);
}

function init(){

runSlideShow1();
runSlideShow2();
}

window.onload=init;

</Script>
</Head>
<Body>
<img src="slideshow1_1.jpg" id='SlideShow1' width=330 height=220>
<img src="slideshow2_1.jpg" id='SlideShow2' width=330 height=220>
</Body>
</HTML>
jamie smith is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 03-26-2005, 05:42 PM
Rufo's Avatar
Extreme Talker

Posts: 173
You will need to create a function which decreases the opacity property of one image and increases the opacity of another, positioned over it. Use setTimeout to regulate the speed.
__________________
mp3blog.us
Rufo is offline
Reply With Quote
View Public Profile Visit Rufo's homepage!
 
Reply     « Reply to Slideshow Opacity
 

Thread Tools

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

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




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12950 seconds with 12 queries