Pure Software code
 

      Read me ...
 

    

Free Training Programming Courses On Line  -  www.puresoftwarecode.com
 
www.puresoftwarecode.com        
 
           Animation Pictures - SlideShow (collection of pictures stored at folder: ainimation_pictures-slideshow_files ) - speed = 5000 milliseconds
 
 
    Add the following points to web page

Notes    

1.  at Normal Source of  web page add  one picture in the specific cell

after added picture at previous point,  at HTML Source appears the following HTML text
<IMG height=191
src="ainimation_pictures-slideshow_files/liveofchrist0.jpg" width=147
border=0>
 
2.  at HTML Source  of  web page add this Javascript text

<SCRIPT language=JavaScript type=text/JavaScript>
// animation pictures,  slideShow

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000
// Agent sniffer shamelessly 'stolen' from the excellent X library from cross-browser.com
var xOp7=false,xOp5or6=false,xIE4Up=false,xNN4=false,xUA=navigator.userAgent.toLowerCase();
if(window.opera){
xOp7=(xUA.indexOf('opera 7')!=-1 || xUA.indexOf('opera/7')!=-1);
if (!xOp7) xOp5or6=(xUA.indexOf('opera 5')!=-1 || xUA.indexOf('opera/5')!=-1 || xUA.indexOf('opera 6')!=-1 || xUA.indexOf('opera/6')!=-1);
}
else if(document.layers) xNN4=true;
else {xIE4Up=document.all && xUA.indexOf('msie')!=-1 && parseInt(navigator.appVersion)>=4;}

// Duration of crossfade (seconds)
var crossFadeDuration = 3

// 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] = 'ainimation_pictures-slideshow_files/liveofchrist0.jpg'
Pic[1] = 'ainimation_pictures-slideshow_files/liveofchrist1.jpg'
Pic[2] = 'ainimation_pictures-slideshow_files/liveofchrist2.jpg'
Pic[3] = 'ainimation_pictures-slideshow_files/liveofchrist3.jpg'
Pic[4] = 'ainimation_pictures-slideshow_files/liveofchrist4.jpg'
Pic[5] = 'ainimation_pictures-slideshow_files/liveofchrist5.jpg'
Pic[6] = 'ainimation_pictures-slideshow_files/liveofchrist6.jpg'
Pic[7] = 'ainimation_pictures-slideshow_files/liveofchrist7.jpg'
Pic[8] = 'ainimation_pictures-slideshow_files/liveofchrist8.jpg'
Pic[9] = 'ainimation_pictures-slideshow_files/liveofchrist9.jpg'
Pic[10] = 'ainimation_pictures-slideshow_files/liveofchrist10.jpg'
Pic[11] = 'ainimation_pictures-slideshow_files/liveofchrist11.jpg'
Pic[12] = 'ainimation_pictures-slideshow_files/liveofchrist12.jpg'
Pic[13] = 'ainimation_pictures-slideshow_files/liveofchrist13.jpg'
Pic[14] = 'ainimation_pictures-slideshow_files/liveofchrist14.jpg'
Pic[15] = 'ainimation_pictures-slideshow_files/liveofchrist15.jpg'
Pic[16] = 'ainimation_pictures-slideshow_files/liveofchrist16.jpg'
Pic[17] = 'ainimation_pictures-slideshow_files/liveofchrist17.jpg'
Pic[18] = 'ainimation_pictures-slideshow_files/liveofchrist18.jpg'
Pic[19] = 'ainimation_pictures-slideshow_files/liveofchrist19.jpg'
var t
var j = 2
var p = Pic.length
var pos = j

var preLoad = new Array()

function preLoadPic(index)
{
if (Pic[index] != ''){
window.status='Loading : '+Pic[index]
preLoad[index] = new Image()
preLoad[index].src = Pic[index]
Pic[index] = ''
window.status=''
}
}

function runSlideShow(){
if (xIE4Up){
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 (xIE4Up){
document.images.SlideShow.filters.blendTrans.Play()
}

pos = j

j = j + 1
if (j > (p-1)) j=0
t = setTimeout('runSlideShow()', slideShowSpeed)
preLoadPic(j)
}

function endSlideShow(){
self.document.location = 'displayimage.php?album=8&pos='+pos
}

preLoadPic(j)

</SCRIPT>

 

3.  at HTML Source  of  web page, replace the previous HTML text of Point 1 - (<IMG height=191 src="ainimation_pictures-slideshow_files/liveofchrist0.jpg" width=147 border=0>)  by the following text (color of old text - red, color of new text - black)
<IMG height=191
src="ainimation_pictures-slideshow_files/liveofchrist0.jpg"
  name=SlideShow  width=147
border=0>

<SCRIPT language=JavaScript
type=text/JavaScript>runSlideShow()</SCRIPT>

 

 
 
  Call  web page example - Animation Pictures, SlideShow

  
Notes:
         Use Microsoft FrontPage software to read or write JavaScript text
, to HTML Source
 
   
 
Author.
       Chucri Simon Zouein , Beirut - Lebanon - Computer engineer
       Tel :         961-01-691436

      
Web:       http://www.puresoftwarecode.com/
       E-mail: 
   info@puresoftwarecode.com