Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
can this script be "fixed"?
Old 02-25-2006, 09:04 PM can this script be "fixed"?
Average Talker

Posts: 23
Trades: 0
Below is a script I have for a simple cross fade slideshow, however, I would like it to play only one time. I also would like to have the cross fade effect viewable in all browsers. Also...I would like the second image to be an image map. My questions: How/where do I make the change to make it play one time? How can I change it to make the fade viewable in all browsers? Is it possible to have the second image an image map, and if so, is it as simple as attaching the "use map..." line of code ?

Thank you!

<head>

<script>

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 2000

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

// 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] = 'fireanimation.gif'
Pic[1] = 'home.gif'


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 > (p-1)) j=0
t = setTimeout('runSlideShow()', slideShowSpeed)
}
</script>

</head>

<body onload="runSlideShow()">

<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="VU" height=450 width=304>
<img src="fireanimation.gif" name='SlideShow' width=450 height=304></td>
</tr>
</table>

</body>
kalew is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to can this script be "fixed"?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.08934 seconds with 12 queries