August 1999
Intermediate to advanced
1488 pages
72h 53m
English
Layer.moveTo(x,y)
The moveTo() method of the Layer object moves the top-left corner of the layer object to the specified screen coordinates. The x parameter refers to an integer representing the top edge of the window in screen coordinates. The y parameter refers to an integer representing the left edge of the window in screen coordinates.
Listing 7.337 shows how the moveTo() method is used. Two layers are created using the <layer> tag. When the button is clicked, the onClick event handler for layer2 invokes the moveTo method, which moves the layer to the screen coordinates 100,200.
<html> <head> <title> Using the moveTo ... |
Read now
Unlock full access