Here's a piece of JavaScript I came across that will allow you to build a slideshow inside an HTML document. Just edit the image names to suit (works with GIF, JPEG and PNG) - place the images in the same directory as the HTML file. The crossfade effect is very nice. It's probably not compatible with version 4 or earlier browsers - just a word of warning there.
Use the HTML file you create inside AMS's Web Object for a snazzy slideshow. Still a workaround, sure, but it works!
----------------
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below
Pic[0] = 'choc_cream_cheese_cake.jpg'
Pic[1] = 'apple_pie.jpg'
Pic[2] = 'key_lime_pie.jpg'
Pic[3] = 'carolina_trifle.jpg'
// 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 > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}
// End -->
</script>
----------------------
Remember, of course, to put this script before your body tag, but after the opening head tag in your HTML file.
Use the HTML file you create inside AMS's Web Object for a snazzy slideshow. Still a workaround, sure, but it works!
----------------
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below
Pic[0] = 'choc_cream_cheese_cake.jpg'
Pic[1] = 'apple_pie.jpg'
Pic[2] = 'key_lime_pie.jpg'
Pic[3] = 'carolina_trifle.jpg'
// 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 > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}
// End -->
</script>
----------------------
Remember, of course, to put this script before your body tag, but after the opening head tag in your HTML file.
Comment