standard.settings.enable

getElement(id).settings.enable() Enables any interactive feature of the element that was previously disabled. Example: [js highlight=”8″ try=”true”] newAudio(“sentence”, “test.mp3”) .settings.once() .print() , newKey(“secret key”, “R”) .wait() , getAudio(“sentence”) .settings.enable() [/js] Prints buttons to play/pause the audio file test_sentence.ogg, and disables those buttons when the file has played through (see ).

standard.settings.disable

getElement(id).settings.disable() Disables any interactive feature of the element. Note: this does not prevent an element that is part of a from being selected. Example: [js highlight=”6″ try=”true”] newAudio(“sentence”, “test.mp3”) .print() .wait() , getAudio(“sentence”) .settings.disable() [/js] Prints buttons to play/pause the audio file test_sentence.ogg, and disables those buttons when the file has played through.

standard.settings.css

getElement(id).settings.css(“styleName”, “style”) or getElement(id).settings.css({“style name 1”: “style 1”, “style name 2”: “style 2″}) Applies the CSS style(s) to the element. Example: [js highlight=”2″ try=”true”] newText(“frame”, “framed”) .settings.css(“border”, “solid 1px black”) , newText(“sentence”, “The last word of this sentence is “) .settings.after( getText(“frame”) ) .print() [/js] Prints a text reading The last word of this sentence …

standard.settings.color

getElement(id).settings.color(“color”) Makes any text in the element appear in the specified color. The “color” string follows CSS conventions (most common names such as “red”, “blue”, … are valid) Note: if you want to change the background color of an element (say, a ) use [js].settings.css(“background”, color)[/js] where color is the name of a color (e.g. …

standard.settings.center

getElement(id).settings.center() Makes the element appear centered on the horizontal axis. Example: [js highlight=”2″ try=”true”] newText(“helloworld”, “Hello world”) .settings.center() .print() [/js] Prints Hello world onto the screen, horizontally centered.

standard.settings.bold

getElement(id).settings.bold() Makes any text in the element appear boldfaced. Example: [js highlight=”2″ try=”true”] newText(“warnning”, “NOTE: this text is a warning!”) .settings.bold() .settings.italic() .settings.color(“red”) .print() [/js] Prints a text in boldface, italic and red.

standard.settings.before

or getElement(id).settings.before( getElement(id) ) Adds some content to the left of the element. Example: [js highlight=”6,12″ try=”true”] newImage(“bad”, “no.png”) , newImage(“good”, “ya.png”) , newText(“left label”, “Bad”) .settings.before( getImage(“bad”) ) , newText(“right label”, “Good”) .settings.after( getImage(“good”) ) , newScale(“judgment”, 5) .settings.before( getText(“left label”) ) .settings.after( getText(“right label”) ) .print() .wait() [/js] Creates two image and two …

standard.settings.after

getElement(id).settings.after( getElement(id) ) Adds some content to the right of the element. Example: [js highlight=”9,13″ try=”true”] newImage(“bad”, “no.png”) , newImage(“good”, “ya.png”) , newText(“left label”, “Bad”) .settings.before( getImage(“bad”) ) , newText(“right label”, “Good”) .settings.after( getImage(“good”) ) , newScale(“judgment”, 5) .settings.before( getText(“left label”) ) .settings.after( getText(“right label”) ) .print() .wait() [/js] Creates two image and two text …

standard.print

getElement(id).print() or getElement(id).print(x,y) (limited support in PennController 1.3, general since 1.4) or getElement(id).print(x,y,canvas) (limited support in PennController 1.3, general since 1.4) Adds the content of the element to the screen. This has no effect for non-visual elements such as the purely interactive . Since PennController 1.3, you can pass x and y values to print …

youtube.test.playing

getYoutube(id).test.playing() (since beta 0.3) Tests whether the video is currently playing.