Dan's Layers Tutorial
1.4  Clipping Layers

There is a ton of different ways you can clip layers. To show how clipping effects each edge (top, bottom, left, right) I have created a function to clip each edge both ways.

function TopEdgeUp() {
	document.layers["mylayer"].clip.top -= 20;
}

function TopEdgeDown() {
	document.layers["mylayer"].clip.top += 20;
}

function BottomEdgeUp() {
	document.layers["mylayer"].clip.bottom -= 20;
}

function BottomEdgeDown() {
	document.layers["mylayer"].clip.bottom += 20;
}

function LeftEdgeLeft() {
	document.layers["mylayer"].clip.left -= 20;
}

function LeftEdgeRight() {
	document.layers["mylayer"].clip.left += 20;
}

function RightEdgeLeft() {
	document.layers["mylayer"].clip.right -= 20;
}

function RightEdgeRight() {
	document.layers["mylayer"].clip.right += 20;
}

Dan's Layers Tutorial
1.1 Introduction
1.2 Overlapping
1.3 Nesting
1.4 Using JavaScript
2.1 Sliding Layers
2.2 Pre-Built Functions
2.3 Clipping Layers
2.4 Looping Animations
2.5 Changing Images
3.1 Mouse-Click Animation
3.2 Capturing Keystrokes
3.3 Drag and Drop
4.1 Making Demos
4.4 Problems
4.5 Screen Sizes


Copyright © 1997 Dan Steinman. All rights reserved.