Utility Script Reference

Main Page  |  Script DemosTest Page

Layer Methods
insertCoverLayer
(z-index,width,height)
Creates and inserts a transparent layer into a layer.
It can be accessed by the coverLayer property of the layer.

z-index sets z-index value of the cover layer(default is 0).
width and height sets the dimensions of the cover layer.
The default width and height is the entire content area of the layer.
Returns the calling layer.
Note:This is also a method of the window.

moveToFront(integer)
Sets a layer's z-index property higher then any other layer.
The parameter can be used to set the number of z-index slots between the layer and the layer beneath it.
Returns the calling layer.
swapPosition(layerRef)
Exchanges position with the layer specified in the parameter.
Returns the calling layer.
setDrag(cancel)

Makes a layer dragable.
cancel a boolean value,if true,cancels the drag effect.
Returns the calling layer.

moveNextTo(layerRef,"edge",offsetX,offsetY)

Positions a layer next to another layer.

layerRef is the layer to be moved next to (the layer's previousLayer is the default).
edge sets which edge of the layer to move next to.
This can be "top","right","bottom" or "left" (default is "right").
offsetX and offsetY are integers which can be used to offset this position.
Returns the calling layer.

allLayers & cssLayers Array Methods
runBatch("method","include substring","exclude substring",delay,"next function")

This function allows a method to be executed for multiple layers in an array.

method is the method to be executed for each layer.
The next two parameters are common substrings in the IDs of layers .
The first is of layers to be included,the second is of layers to be excluded.
delay is the time between executions in milliseconds (default is 100).
next function is a function to be run on completion.
All parameters except method are optional.