Forum Replies Created
-
AuthorPosts
-
pabulum
Member😎 Thanks Jeremy. I was very sad to see such a big advertisment area. Also thanks joolz to inspire me about the use of that area. Now I change that box to a small slide show just like a photo gallery.
1. Replace the original climage.html by the following HTML:
// how long an image is shown, any transition time for IE is added
var delay = 6000;
// IE transition duration, specify as floating point in seconds
var transDuration = 2.0;
var transType = 23; // random change as needed
var images = new Array();
preloadImages( // use your images here
‘image1.gif’,
‘image2.jpg’,
‘image3.jpg’
);
/* or do a loop for indexed images
for (var i = 0; i < 7; i++)
preloadImages (‘img’ + (i + 1) + ‘.gif’);
*/
var cnt = 0;
function preloadImages() {
for (var i = 0; i < arguments.length; i++) {
images[images.length] = new Image();
images[images.length – 1].src = arguments;
}
}
var imgTag = ”;
imgTag += ‘<IMG NAME="theImage" ';
imgTag += document.all ?
‘ STYLE=”filter: revealTrans(duration=’
+ transDuration + ‘,transition=’ + transType + ‘);” ‘ :
”;
imgTag += ‘ SRC=”‘ + images[0].src + ‘”‘;
imgTag += ‘>’;
function nextImage () {
cnt = ++cnt % images.length;
var img = document.theImage;
if (img.filters && transType == 23) // get random type
img.filters.revealTrans.transition =
Math.floor(Math.random() * 23);
if (img.filters)
img.filters.revealTrans.apply();
img.src = images[cnt].src;
if (img.filters)
img.filters.revealTrans.play();
setTimeout(‘nextImage()’,
delay + (img.filters ? Math.round(transDuration * 1000) : 0));
}document.write(imgTag);
2. save the file and change the attribute to “read-only”, “hidden” and “Archieve”. It is necessary otherwise the html file will be restored by the original one when you start ICQLite.
I tried jpg file also and it works. remember to cut all images to right side that is 120×90 pixels. Have fun!
Polly – Hong Kong
-
AuthorPosts