Shayton Equilibrium Kitchen Utensil 2003 User Manual

Page of 194
MediaScript Objects and Methods 89 
• 
• 
• 
g e t L a y e r Y ( )  
Returns the Y offset of the media layer with the specified index (if available).
NOTE: 
X and Y layer offsets determine relative positions of layers to each, and are used by the 
Syntax
<object name>.getLayerY(
<layer index>
);
Parameters
layer index
 - specifies the desired layer index (starting from 0). 
Example
var image = new Media();
image.load(name @ "peppers.psd");
if(image.getLayerY(2) == 25)
{...
g e t M e t a D a t a ( )  
Returns a metadata string of the specified format associated with a Media object. 
MediaRich allows users to assign arbitrary key/value pairs to any Media object using the 
setMetaData()
 function. The getMetaData() function returns the value as a string.
Syntax
var xmlDoc = <object name>.getMetadata(<"format">);
Parameters
The specified format is the key of the key/value pair. Valid values are “Exif”, “IPTC”, or 
“XMP”.
Example
var image = new Media();
image.load(name @ "peppers.psd");
image.getMetaData("Exif");
{...
g e t P a l e t t e ( )
Returns an array of integers containing the colors in the palette or null if the image does 
not have a palette. The RGB components of these colors can be obtained using the 
RGBColor object defined in sys/color.ms. If the image has no palette the array is empty.
Syntax
palColors = <object name>.getPalette();
Parameters
This function has no parameters.