August 1999
Intermediate to advanced
1488 pages
72h 53m
English
layer.moveBy(x,y)
The moveBy() method of the Layer object moves the layer object to the right and down from its current position. The method takes two parameters, x and y. The x parameter refers to the number of pixels the layer is moved to the right. The y parameter refers to the number of pixels the layer is moved down.
Listing 7.336 shows how the moveBy() method is used. When the button is clicked, the onClick event handler uses the moveBy method to move layer2 50 pixels to the right and 30 pixels down.
<html> <head> <title> Using the moveBy method of the Layer object</title> </head> <body> <layer id="layer1" width=200 ... |
Read now
Unlock full access