538
OPUS Projektor Manual
JavaScript
All objects except
pages and virtual
keyboards
All objects except
pages and virtual
keyboards
Always relative to its direct
parent
*Use the function moveDDO
All objects except
pages and virtual
keyboards
Always relative to its direct
parent
*Use the function moveDDO
Examples for getProperty:
var DDOID = 42;
var myID = getProperty(DDOID, "ID");
print("ID of DDO no. " + DDOID + ": " + myID);
var myColor = new Array(4);
myColor = getProperty(DDOID, "Background Color");
// Now the array contains the Red, Green, Blue and Alpha
components
print("The background color is: R: " + myColor[0] + " G: " my
Color[1] + " B: " + myColor[2] + " A: " + myColor[3]);
var imagePath = getProperty(DDOID, "Background Image");
print("The image path is: " imagePath);
setProperty - change the property value of a DDO
Setting properties is as easy as getting them. The setProperty function can be used for that.
Prototypes:
var result = setProperty(number DDO-ID, string propertyName,
integer value);
var result = setProperty(number DDO-ID, string propertyName,
double value);
var result = setProperty(number DDO-ID, string propertyName,
bool value);
var result = setProperty(number DDO-ID, string propertyName,
string value);
var result = setProperty(number DDO-ID, string propertyName,
Array array);
Examples:
var DDOID = 42;
var myColor = new Array(4);
// Define a full red color
myColor[0] = 255;
myColor[1] = 0;
myColor[2] = 0;
myColor[3] = 255; //Alpha channel: completely opaque
542
542