ARTDM 170 Week 3: Rollovers

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Notes on slide 1

    Let's take a look at the Photoshop mockup.

    Favorites, Groups & Events

    ARTDM 170 Week 3: Rollovers - Presentation Transcript

    1. ARTDM 170, Week 3: JavaScript + GIF Gilbert Guerrero, gguerrero@dvc.edu gilbertguerrero.com/blog/artdm-170/
    2. Turn in Homework Two GIF Animations
    3. Put your files in my dropbox • Two GIF animations • Put them in a folder with your lastname and first initial • Example:        smith-h anim1.gif anim2.gif
    4. GIF animations  
    5. JavaScript Rollovers
    6. Rollover Images • When a user puts the mouse over an image a new image can be shown • Uses JavaScript and the DOM (Document Object Model) • DOM allows us to identify and manipulate any element on a Web page
    7. Triggering Events <html> <head> <script type="text/javascript"> <!--     function testRoll() {         alert('how are you?');     } //--> </script> </head> <body> <a href="#" onmouseover="testRoll();">Hello</ a> </body> </html>
    8. The JavaScript <head> <script type="text/javascript"> <!-- function testRoll() {     alert('how are you?'); } //--> </script> </head>
    9. The Image <body> <a href="#" onmouseover="testRoll();">Hello </a> </body>
    10. JavaScript Image Rollover <html> <head> <script type="text/javascript"> <!--     function swapImage(id, theImage) {         document.getElementById(id).src = theImage;     } //--> </script> </head> <body> <a href="#" onmouseover="swapImage('image1','images/ pic1-over.jpg');return false;"><img src="images/ pic1-out.jpg" id="image1" /></a> </body> </html>
    11. The JavaScript <head> <script type="text/javascript"> <!-- function swapImage(id, theImage) {     document.getElementById(id).src = theImage; } //--> </script> </head>
    12. The Image <body> <a href="#" onmouseover="swapImage('image1', 'images/pic1-over.jpg');return false;"> <img src="images/pic1-out.jpg" id="image1" /> </a> </body>
    13. Combine Animated GIFs with JavaScript Rollovers
    14. Button States • Up – Appears when the page first loads, the default image • Over – Appears when the mouse moves over the image • Down – Appears after the image has been clicked, a “pressed” state • Over While Down – Appears when the mouse moves over the image in the Down state
    15. Using Animated Rollovers for Navigation
    16. Homework, due Sept 9 • Devise a navigation scheme for a website • Use animated rollovers • Use all of the 4 states:  Up  Over  Down  Over While Down • Create one page per navigation item (at least 3 pages) to demonstrate how it works
    SlideShare Zeitgeist 2009

    + Gilbert GuerreroGilbert Guerrero Nominate

    custom

    144 views, 0 favs, 1 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 144
      • 113 on SlideShare
      • 31 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 0
    Most viewed embeds
    • 31 views on http://www.gilbertguerrero.com

    more

    All embeds
    • 31 views on http://www.gilbertguerrero.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories