Page 251 - DCAP303_MULTIMEDIA_SYSTEMS
P. 251

Unit 14: Designing for World Wide Web (WWW)



            It is possible to include an animated GIF on your page and give the user some control over its   notes
            display. If you can use the animation in a link, control it with a JavaScript rollover. The image
            only displays when the visitor moves the mouse over the graphic.













            Preload your images in the HEAD tag:
            <HEAD>
            <script language = JAVASCRIPT>
            <!-- Hide script from old browsers
            if (document.images)
            {
               redChile = new Image
               danceChile = new Image
               redChile.src = “chilePepper_lg.gif”
               danceChile.src = “dancingChile.gif”
            }
            // Stop hiding script from older browsers -->
            </SCRIPT>
            Next, include the rollover inside the <A> tag in the BODY section:
            <A  HREF=”/news/vol3/design_no10.htm”  onMouseover  =  “document.Chile.
            src=danceChile.src” onMouseout = “document.Chile.src=redChile.src”><IMG
            BORDER=”0” SRC=”chilePepper_lg.gif” ALT=”Red Chile graphic” NAME=”Chile”
            WIDTH=”89” HEIGHT=”124”></A>
            When your visitor moves the mouse over the chile pepper image, it begins to dance. The animation
            continues as long as the mouse stays over it. All a visitor has to do to stop the animation is move
            the mouse.
            14.5.4 Uses of animation on a Web page
            Animation on a Web page is any form of movement of objects or images. Animations are usually
            done in Adobe Flash, although Java and GIF animations are also used in many Websites. Streaming
            video in Flash is becoming increasingly popular.
            Reasons to have motion on a Web page are to draw attention to something, to provide a
            demonstration or to entertain. The need for movement on a page depends on the purpose and
            content of the page. A financial institute would not really need animations on their pages, while
            an entertainment site obviously would have such movement.
            Questions you may have include:
               •  How does animation draw attention?
               •  When is a demonstration needed?
               •  How is entertainment used?



                                             LoveLy professionaL University                                   245
   246   247   248   249   250   251   252   253   254   255   256