Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Image Rollovers: Creating Visual Changes on Web Pages with JavaScript and Dreamweaver - Pr, Study notes of Web Design and Development

An introduction to image rollovers, a visual change that takes place when a user moves the cursor over a designated area of a web page. Learn why rollovers are used, their common and less-effective treatments, and how to create rollovers using javascript and dreamweaver.

Typology: Study notes

Pre 2010

Uploaded on 08/18/2009

koofers-user-xt3-1
koofers-user-xt3-1 🇺🇸

5

(1)

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
VC 237 :: Week 06 1 of 2 05 November 2008
— Online Lecture —
week::six
Image Rollovers
Introduction to Image Rollovers
What is a Rollover?
o A visual change that takes place when a user moves the cursor over a
designated area of a web page.
The user action is called a Mouse Over, which is what triggers the rollover.
Rollovers are created using JavaScript (and sometimes CSS), not HTML.
Why use them?
o Provide visual cues that signal to users that an area has special
meaning or is a navigation link.
o Also allows for the changing of visual content without reloading the page.
Why not use them?
o Can add unneeded technical and visual complexity to a page.
o JavaScript can be difficult to write and manage (though Dreamweaver
handles this for us).
Common treatments
o Change of color
o Graphic indicators (arrows, boxes, icons)
o Addition of a shadow or outer glow
o Flip other images (larger images, graphic indicators)
o Motion (primarily using Flash)
Less-effective treatments
o Changes in the face, style or size of text
Avoid plain-to-bold rollovers
o Size and pixel shifting
Can be visually distracting
The Rules of Rollovers
o First Rule of Rollovers :: The off state and on state of your rollover
images MUST be the same size in terms of pixels.
Make sure the pixel width and height of your images are exactly the same.
Rollovers can only swap an image; it cannot resize it.
o Second Rule of Rollovers :: Given Rule One, make sure the imagery
in your off and on states line up perfectly, pixel for pixel.
If the two images are off even by one pixel, a noticeable visual shift occurs.
Naming
o It's best to use a common naming system for all of your navigation images.
o Naming convention examples:
about_por_1.gif (off state)
about_por_2.gif (on state)
about_por.gif (off state)
about_por_over.gif (on state)
about_por_a.gif (off state)
about_por_b.gif (on state)
about_por_off.gif (off state)
about_por_on.gif (on state)
pf2

Partial preview of the text

Download Image Rollovers: Creating Visual Changes on Web Pages with JavaScript and Dreamweaver - Pr and more Study notes Web Design and Development in PDF only on Docsity!

VC 237 :: Week 06 1 of 2 05 November 2008

— Online Lecture —

week::six

Image Rollovers

Introduction to Image Rollovers

What is a Rollover? o A visual change that takes place when a user moves the cursor over a designated area of a web page.  The user action is called a Mouse Over, which is what triggers the rollover.  Rollovers are created using JavaScript (and sometimes CSS), not HTML. Why use them? o Provide visual cues that signal to users that an area has special meaning or is a navigation link. o Also allows for the changing of visual content without reloading the page. Why not use them? o Can add unneeded technical and visual complexity to a page. o JavaScript can be difficult to write and manage (though Dreamweaver handles this for us). Common treatments o Change of color o Graphic indicators (arrows, boxes, icons) o Addition of a shadow or outer glow o Flip other images (larger images, graphic indicators) o Motion (primarily using Flash) Less-effective treatments o Changes in the face, style or size of text  Avoid plain-to-bold rollovers o Size and pixel shifting  Can be visually distracting The Rules of Rollovers o First Rule of Rollovers :: The o ff state and on state of your rollover images MUST be the same size in terms of pixels.  Make sure the pixel width and height of your images are exactly the same.  Rollovers can only swap an image; it cannot resize it. o Second Rule of Rollovers :: Given Rule One, make sure the imagery in your off and on states line up perfectly, pixel for pixel.  If the two images are off even by one pixel, a noticeable visual shift occurs. Naming o It's best to use a common naming system for all of your navigation images. o Naming convention examples:

about_por_1.gif (off state) about_por_2.gif (on state)

about_por.gif (off state) about_por_over.gif (on state)

about_por_a.gif (off state) about_por_b.gif (on state)

about_por_off.gif (off state) about_por_on.gif (on state)

VC 237 :: Week 06 2 of 2 05 November 2008

— Online Lecture —

Rollovers in Dreamweaver

Overview o Dreamweaver provides an easy way to add JavaScript-based rollovers to your pages. o Before adding your new rollover images, be sure to copy them to the appropriate folder within your local root folder.  Imagery folders are often named art or images , and live in the same directory as the HTML file that they will be place in to. Process o To insert a new rollover, insert your cursor into the place in the document, then select Insert > Image Objects > Rollover Image o Dreamweaver Insert Rollover Image dialog box:

Field Description

Image Name

JavaScript name of your image. You can either give a rollover a unique name (using our file naming conventions), or you can just use Dreamweaver's default name.

Original Image The image displayed normally (off state).

Rollover Image The image displayed when a user moves their cursor over the image (on state).

Preload Rollover Image This option speeds up the rollover action. Leave this checked.

Alternate Text Text that's displayed if an end-user does not load the image.

When Clicked, Go To URL The web page the user will go to when the image is clicked.

o Online tutorial from Adobe:  http://www.adobe.com/go/vid