[Javascript] Slideshow Triggered on MouseOver

Shawn Milo shawn.milo at gmail.com
Sat Apr 23 14:28:51 CDT 2005


Well, since this is a Javascript list, and I think that using a
commonly supported scripting
language is a far superior solution to creating a GIF with proprietary
software, and will
also result in re-usable code, I'm going to attempt to answer the OP.

This is all untested, but if you create it, I'll be glad to help with
refining:

1. An array of image URLs.
2. A numeric variable outside of any functions.
3. An <img> object on the page.

var iCount = 0;

var aImages = new Array();
aImages[aImages.length] = './images/pic1.jpg';
aImages[aImages.length] = './images/pic2.jpg';
aImages[aImages.length] = './images/pic3.jpg';
aImages[aImages.length] = './images/pic4.jpg';

function slideShow(){
   document.slideShowImage.src = aImages[iCount];
  
   iCount ++;

  if (iCount >= aImages.length){
      iCount = 0;
   }else{
      setTimeout('slideShow()', 2000);
   }


}

On 4/23/05, Troy III Ajnej <trojani2000 at hotmail.com> wrote:
> I think you don't need script etc, to make this work,
> try fome gif construcor app, I used to know some names of progs that could
> do just that, but that was during past millenia, try search google with 'gif
> cons' words. You may end up with something usefull.
> If you find something like I used to have sometime beetween 96-97, you will
> easy find the way to construct a gif image that will play your slides and
> stop, also speciffy the mouseover trigger for it to start replay.
> salute
> 
> >From: "Harvey A. Ramer" <harvey.ramer at designdelineations.com>
> >Reply-To: "[JavaScript List]" <javascript at LaTech.edu>
> >To: <javascript at LaTech.edu>
> >Subject: [Javascript] Slideshow Triggered on MouseOver
> >Date: Wed, 20 Apr 2005 17:44:04 -0400
> >
> >I want to create a slideshow that plays once at window.Onload and whenever
> >a
> >mouseOver event occurs.
> >
> >What advice do you have to give? Places to find a script to modify?
> >
> >Thanks in advance,
> >
> >Harvey Ramer
> >
> >  <http://www.designdelineations.com/> http://www.designdelineations.com
> >Quality Web Design & Hosting. Personal Service.
> >
> >
> >
> >_______________________________________________
> >Javascript mailing list
> >Javascript at LaTech.edu
> >https://lists.LaTech.edu/mailman/listinfo/javascript
> 
> _________________________________________________________________
> Don't just search. Find. Check out the new MSN Search!
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
> 


-- 
Voicemail any time at:
206-666-MILO



More information about the Javascript mailing list