User's Manual
MediaScript Objects and Methods 85
•
•
•
•
•
Parameters
layer number - specifies the desired layer of the Media object.
Example
var image = new Media();
var newimage = new Media();
newimage = image.getLayer(2);
getLayerBlend()
Returns the blending mode of the media layer with the specified layer index (if available).
Syntax
<object name>.getLayerBlend(
<layer index>
);
Parameters
layer index - specifies the desired layer index (starting from 0).
The blend modes are: “Normal”, “Darken”, “Lighten”, “Hue”, “Saturation”, “Color”,
“Luminosity”, “Multiply”, “Screen”, “Dissolve”, “Overlay,” “HardLight”, “SoftLight”,
“Difference”, “Exclusion”, “Dodge”, “ColorBurn”, “Under”, and “Colorize”.
NOTE: “Burn” has been deprecated. “ColorBurn” results in the same blend.
Example
var image = new Media();
image.load(name @ "peppers.psd");
if(image.getLayerBlend(0) == "Saturation")
{...
getLayerCount()
Returns the total number of layers for the media.
Syntax
<object name>.getLayerCount();
Parameters
This function has no parameters.
Example
for(x = 0;x < image.getLayerCount();x++)
{...
Layer = image.getLayer(x);
...}










