Visual Vision **User's** Forum (the fast) (https://www.easywebeditor.com/cgi-bin/forum/YaBB.pl)
Our Products >> HyperPublish >> JavaScript example for the Web
(Message started by: Support Staff on Sep 28th, 2002, 4:39am)

Title: JavaScript example for the Web
Post by Support Staff on Sep 28th, 2002, 4:39am
How can I insert this fading slide script?
[...omissis...]


Use Insert >HTML >At page start
In the window, copy this code.
Please NOTICE that *** means you should press the button "image" that's on the right of the dialog window, and you should visually select the image that will be placed inside the
slide show. So, instead *** (you have to delete the ***) you will see a graphic icon that means that the program will insert the actual file name of the image automatically.


<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  CodeLifter.com (support@codelifter.com) -->
<!-- Web Site:  http://www.codelifter.com -->

<!-- This script and many more are available free online at
-->
<!-- The JavaScript Source!! http://javascript.internet.com
-->

<!-- 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] = '***'  //please replace the *** with image ref
Pic[1] = '***'
Pic[2] = '***'
Pic[3] = '***'
Pic[4] = '***'

// 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>



Then press OK. Then, somewhere in the page, use "Insert >HTML >Within the page" and insert this code (where *** means, as above, that you should press the "image" button and insert a reference for the first image):

<SCRIPT LANGUAGE="JavaScript">
 runSlideShow()
</SCRIPT>
<img src="***" name='SlideShow' width=150 height=150>


By the way this script suppose you use all 150x150 pixel images.

:)



Visual Vision **User's** Forum (the fast) » Powered by YaBB 1 Gold - SP1!
YaBB © 2000-2001, XNull. All Rights Reserved.
This forum © 2001-2010 VisualVision and VisualVision Users