C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |



My Profile

Gifts

Active Members
TodayLast 7 Days more...







Slide Show of Statically Saved Images Using HTML Code


Posted Date: 01 Jul 2008    Resource Type: Code Snippets    Category: Javascript

Posted By: Rumpa M       Member Level: Gold
Rating:     Points: 10



Below sample shows a script that enables a slide show of saved images.


<script language="javascript" &RT;
// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 1000

// Duration of crossfade (seconds)
var crossFadeDuration = .0001

// 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] = "fadeimage/1.jpg";
Pic[1] = "fadeimage/2.bmp";
Pic[2] = "fadeimage/3.jpg";
Pic[3] = "fadeimage/4.gif";
Pic[4] = "fadeimage/5.jgp";

// =======================================
// do not edit anything below this line
// =======================================

var t
var j = 0
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++){
preLoad[i] = new Image()
preLoad[i].src = Pic[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 &RT; (p-1)) j=0
t = setTimeout('runSlideShow()', slideShowSpeed)
}
</script&RT;


The code below is an example of how to invoke the script


<img src="fadeimage/1.jpg" width="100" height="100" name="SlideShow" runat="server" />




Responses

Author: ravi    24 Jul 2008Member Level: Gold   Points : 0
good stuff can u send this code to my mail?


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Slideshow  .  Javascript  .  Image manipulation  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Add website to the favorites of Internet explorer
Previous Resource: Disable back button in browser
Return to Discussion Resource Index
Post New Resource
Category: Javascript


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

doors in nj

Contact Us    Privacy Policy    Terms Of Use