Scroll Object [Properties and Methods Summary]

Methods:

activate()
starts the scroll mechanism by applying DynLayers and events to the layers that make up the scroll
back()
loads the previous page in the history
build()
generates the necessary CSS and DIV tags to display the scroll
forward()
loads the next page in the history
jumpTo(y)
jumps the scrollbar to a specific coordinate (integer), you can also use 'top' or 'bottom' to jump to those spots
lyr
a property which is defined as a DynLayer for the entire scroll window, all methods of the DynLayer can be applied to the lyr property
load(url)
loads a new HTML page into the scroll
reload()
reloads the current page
setColors(bg,border,bar,arrow,box)
changes the colors of various parts of the scroll
setDimensions(barX,barY,barW,barH,arrowuH,arrowdH,boxH,border)
defines the dimensions of the scrollbar
setHeight(height)
defines a new height of the content layer, this is necessary when the scroll window contains only layers because the height of the document cannot be found by the scroll object
setImages(box0,box1,up0,up1,dn0,dn1,bar)
applies images to the scrollbar
setMargins(l,r,t,b)
sets the margins of the content page
writeContent(doc)
writes the necessary CSS to the content pages when using the non-buffered scroll, see the advanced section for an example

The Scroll Object initializes itself as a DynLayer so all the methods of the DynLayer can be used on it by calling it as objectName.lyr.show() etc.

Properties:

clipImages
determines whether the layers that contain the scroll images will be clipped or not
contentRef
returns the correct nestref to be used when defining DynLayers for layers within the scroll object
obj
string reference to the object
slideInc
sets the number of pixels the content will scroll each increment
slideSpeed
sets the repetition speed of the scroll when you press the up-down arrows
url
returns the current url of the page displayed
usebuffer
determines how IFRAME will be used in the scroll, true to use IFRAME as a buffer, false to use IFRAME directly
visibility
sets the visibility of the generated scroll window to be "hidden", "visible", or "inherited"
zIndex
sets the zIndex of the generated scroll window (integer)

Accompanying Functions/Objects

Object: DynLayer(id,nestref)
the API used to work with the layers and events
Object: ScrollDynLayer(id,nestref,iframe)
an addition to the standard DynLayer that has the addtion of an iframe parameter so that the DynLayer can control layers that are inside an IFRAME, this version also omits the event property due to a Netscape conflict with the .lyr DynLayer sub-object
Function: css(id,left,top,width,height,color,vis,z)
used to generate all the CSS for the layers in the scroll window, it returns the CSS syntax with the given parameters

Note: There are many other properties and methods that are used internally by the Scroll Object. However the ones listed here are the ones that you will ever really have to deal with.

Scroll Object:

Home Next Lesson: Creating and Destroying Layers