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 …

youtube.settings.once

getYoutube(id).settings.once() (since beta 0.3) Will disable the Youtube video after it has finished playing. Example: [js highlight=”2″ try=”true”]newYoutube(“myYoutube”, “aFPtc8BVdJk”) .settings.once() .print() .play() .wait() , newButton(“validate”, “Validate”) .print() .wait() [/js] Shows a video on the page and starts playing it. Playback will become disabled after it has finished.

youtube.settings.log

log getYoutube(id).settings.log() (since beta 0.3) or getYoutube(id).settings.log(“play”) (since beta 0.4) or getYoutube(id).settings.log(“end”) (since beta 0.4) or getYoutube(id).settings.log(“pause”) (since beta 0.4) or getYoutube(id).settings.log(“buffer”) (since beta 0.4) or getYoutube(id).settings.log(“play”, “buffer”, …) (since beta 0.4) or getYoutube(id).settings.log(“all”) (since beta 0.3) Note: since beta 0.4, blank parentheses default back “play”. In beta 0.3, they default back to “all”. Will …

voicerecorder.settings.once

The VoiceRecorder element is deprecated since PennController 1.8. See instead. getVoiceRecorder(id).settings.once() Disables the button to record after the first recording. You can still record using the action command record. Example: [js highlight=”5″ try=”data”]InitiateRecorder(“https://myserver/upload.php”); newTrial( newVoiceRecorder(“recorder”) .settings.once() .print() .wait() .play() .wait(“playback”) );[/js] Adds a recording and a playback button to the page, and when the recording …

voicerecorder.settings.log

The VoiceRecorder element is deprecated since PennController 1.8. See instead. getVoiceRecorder(id).settings.log() Will add a line whenever a recording starts and whenever it stops. Note that a line with the filename of the recorded sample is always logged anyway even if you do not call .settings.log(), so you can identify it in the output archive. [js …