Floating Transparent Slideshow

Any problem with javascript can be discussed here.
Post Reply
Challenged
Posts: 20
Joined: Sun Dec 26, 2004 2:20 pm

Floating Transparent Slideshow

Post by Challenged »

The Picture transparently moves down the page as you scroll down.. works in all browsers..


=============================================================
Script: Floating Transparent Slide Show
Functions: Displays a floating layer that moves with the
page, in which is contained an image slide show.
If transparent .gif images are used, the slide
show will be transparent over the page. Image
fade transitions are also included for IE.
Browsers: NS4-7, IE all
Author: etLux
Directions: Insert the entire block of code below just before
the page </body> tag. See the instructions in
the script for additional setup information.
=============================================================





<div id="FloatSlideShow" style="position:absolute;z-index:1000000">
<a href="http://www.myweb.com" target=_new>
[img]image_1.gif[/img]</a>
</div>


<script>

/* Floating Slide Show Script C.2004 by CodeLifter.com */

// You *must* add onload="runSlideShow()" to the <body> tag
// of the page.

// In the section marked Edit the HTML, above, remember to
// set the path and size for the first image.

// =======================================
// Set the following variables
// =======================================

// Set slideShowSpeed (milliseconds):
var slideShowSpeed = 3000

// Duration of crossfade (seconds) for IE:
var crossFadeDuration = 3

// Set the positioning variables, below:
// Negative numbers are relative to right (whereX) or bottom (whereY)
// Positive numbers are relative to left (whereX) or (whereY) top
// Experiment with values to get positioning exact, and allow
// for the dimensions of the image in the positioning

var whereX = 40;
var whereY = -233;

// Specify the image files:
var Pic = new Array() // don't touch this!
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = 'image_1.gif'
Pic[1] = 'image_2.gif'
Pic[2] = 'image_3.gif'
Pic[3] = 'image_4.gif'
Pic[4] = 'image_5.gif'

// =======================================
// Do not edit *anything* below this line!
// =======================================

var nn=(navigator.appName.indexOf("Netscape")!=-1);
var t;var j=0;var p=Pic.length;var preLoad=new Array();
for (i=0;i<p;i++){preLoad=new Image();preLoad.src = Pic;}
function runSlideShow(){
if (****.all){
****.images.SlideShow.style.filter="blendTrans(duration=2)";
****.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
****.images.SlideShow.filters.blendTrans.Apply();}
if (****.all || ****.getElementById){****.images.SlideShow.src = preLoad[j].src;}else{
****.FloatSlideShow.****.images["SlideShow"].src = preLoad[j].src;}
if (****.all){****.images.SlideShow.filters.blendTrans.Play();}
j=j+1;if (j>(p-1))j=0;t=setTimeout('runSlideShow()', slideShowSpeed);}
var dD=****,dH=dD.html,dB=dD.body,px=dD.layers?'':'px';
function floatSS(iX,iY,id){
var L=dD.getElementById?dD.getElementById(id):dD.all?dD.all[id]:dD.layers[id];
this[id+'O']=L;if(dD.layers)L.style=L;L.nX=L.iX=iX;L.nY=L.iY=iY;
L.P=function(x,y){this.style.left=x+px;this.style.top=y+px;};L.Fss=function(){var pX, pY;
pX=(this.iX >=0)?0:nn?innerWidth:nn&&dH.clientWidth?dH.clientWidth:dB.clientWidth;
pY=nn?pageYOffset:nn&&dH.scrollTop?dH.scrollTop:dB.scrollTop;
if(this.iY<0)pY+=nn?innerHeight:nn&&dH.clientHeight?dH.clientHeight:dB.clientHeight;
this.nX+=.1*(pX+this.iX-this.nX);this.nY+=.1*(pY+this.iY-this.nY);this.P(this.nX,this.nY);
setTimeout(this.id+'O.Fss()',33);};return L;}
floatSS(whereX,whereY,'FloatSlideShow').Fss();
</script>





============================================================


kaos_frack
Posts: 504
Joined: Sat May 07, 2005 8:03 am
Contact:

Post by kaos_frack »

i had an error
Error: Expected ;

what's wrong?
Post Reply