PHP Classes

File: README_EN

Recommend this page to a friend!
  Classes of Carlos Falo Hervás  >  rollover  >  README_EN  >  Download  
File: README_EN
Role: Documentation
Content type: text/plain
Description: Documentation
Class: rollover
Basic rollover images
Author: By
Last change: set the roles
Date: 20 years ago
Size: 2,242 bytes
 

Contents

Class file image Download
===== BASIC DOCUMENTATION FOR rollover class ===== 0.- INTRODUCTION The class handles generation of a rollover image (that means an image that changes whenever the mouse is over it or not). Javascript interface is based on old dynlayer api and works well on all 3 major browsers (IE 5.x, NS 4.x, NS 5+) and has been tested up to 1 layer depth (i.e. <div ....><img ...></div>) but will possibly fail on a more intrincated layer structure (almost for sure... at least on NS browsers) 1.- INTERFACE The public interface for the class is formed by: rollover($dirapp,$layer,$imgname,$baseimg,$selimg,$alt="",$link="#") CONSTRUCTOR: initializes all data $dirapp -> root directory for the web to path generation operations $layer -> name for the layer where the img is places $imgname -> name for the image (<img name='XXXX'...) $baseimg -> src for the not selected image $selimg ->src for the selected image $alt -> alt text for the image $link -> where to link from the image (as onMouseOver/Out is on an <a> element preload() PRELOADER: Generates the extra img objects used by the JavaScript NOTE: must be called within an existing <script> tag image() GENERATOR: puts the image and the event handling on screen The Javascript interface works in 2 functions (placed in the images.js file) that must be included in the page (i.e. <script language=javascript src=images.js></script>) preload(imgobj,srcimg) imgobj -> string: name for the img object srcimg -> string: path & filename for the image to preload changeImage(layer,image,imgobj) layer -> string: name for the layer where the img is placed image -> string: name for the image that does 'roll' imgobj-> string: name for the imgobject with the new image 2.- Future releases and WIP This class will not have many revisions as it is fully functional for it's intended use. For further developement any suggestions appreciated 3.- Contact information Carlos Falo Hervás carles@bisinteractive.net http://www.bisinteractive.net C/Manila 54-56 Esc. A Ent. 4ª 08034 Barcelona Spain Phone: +34 9 3 2063652 Fax: +34 9 3 2063689