• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. More Fun with Images > Creating Cycling Banners

Creating Cycling Banners

When you surf the Web, it's common to see advertising banners that periodically switch between images. Most of these are animated GIF files, which are GIF files that contain a number of frames that play in succession. If you want to have a page that cycles through a number of GIFs (either animated or not), you can use JavaScript to do the job, as in Script 5.1. This example uses three GIFs and cycles repeatedly through them, as shown in Figures 5.1, 5.2, and 5.3.

Script 5.1. You can use JavaScript to cycle between images in a banner.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint