Method Summary
Method Attributes Method Name and Description
 
animate(command, seconds, count, timeoutHandlersIndex)
Starts an animation, returns an animation handler It will run a code on every specified time until the code returns false or an amount of times is specified
 
Animate layers by displaying them one at a time
 
arc(radius, degrees, follow, counterclockwise)
Draws an arc
 
Defines the beginning of a shape definition
 
changeAxis(posx, posy, xScale, yScale)
Changes the axis of the whiteboard
 
clean(id)
Deletes all content in a layer
 
Defines the end of a shape definition
 
forward(pixels)
Moves the guide forward
 
Returns the layer's guide's position's angle Angle 0 is when the guide is looking horizontally right
 
getArccosine(angle)
Returns the arccosine of an angle
 
getArcsine(angle)
Returns the arcsine of an angle
 
Returns the arctangent of an angle
 
getCosine(angle)
Returns the cosine of an angle
 
Returns the current input position
 
Returns the height of the layer
 
Returns as a value the image visible in the specified layer
 
Returns the layer name
 
Returns if the specified layer is visible or hidden
 
Returns the width of the layer
 
Returns a random color
 
getRandomNumber(upperbound)
Returns a positive random integer number
 
getRGB(red, green, blue)
Returns a color from RGB components
 
getSine(angle)
Returns the sine of an angle
 
getSquareRoot(number)
Returns the square root of the number
 
getTangent(angle)
Returns the tangent of an angle
 
getX(id)
Returns the layer's guide's position's X coordinate
 
getY(id)
Returns the layer's guide's position's Y coordinate
 
goTo(posx, posy)
Moves the guide to a specific position
 
Moves the guide to the center of the whiteboard
 
Moves the guide to the lower-left of the whiteboard
 
Moves the guide to the lower-right of the whiteboard
 
Moves the guide to the upper-left corner of the whiteboard
 
Moves the guide to the upper-right corner of the whiteboard
 
hide(id, hide)
Hides a layer
 
image(src, posx, posy, centered, width, height, rotation, flipX, flipY)
Puts an image in the specified position of the whiteboard
 
input(type)
Reads from the input area
 
inputReset(position)
Sets the position of the input pointer to a fixed place.
 
line(destinationx, destinationy)
Draws a line from current guide position to a specified coodinate
 
lineAt(originx, originy, destinationx, destinationy)
Draws a line from a coordinate to another using user coordinates
 
output(text, newline)
Writes in the output area
 
pull(levels, id)
Pulls a layer up in the layers order Upper layers overlap lower layers
 
push(levels, id)
Pushes a layer down in the layers order Upper layers overlap lower layers
 
setBold(bold)
Sets the bold property in future text writes in the currently active layer
 
setColor(color)
Sets the color of the future draw lines and text in the currently active layer
 
setFont(font)
Sets the font to use in future text writes in the currently active layer
 
setItalic(italic)
Sets the italic property in future text writes in the currently active layer
 
setSize(size)
Sets the size of the future draw lines and text in the currently active layer
 
show(id, show)
Shows a layer
 
Creates a clone of the current layer in another layer, returns the layer name
 
stop()
Stops the execution of any future code
 
transparency(value, id)
Sets the layer transparency
 
turnLeft(angle)
Turns the guide left
 
turnReset(angle)
Turns the guide to it's original angle The original angle is the guide looking horizontally to the right
 
turnRight(angle)
Turns the guide right
 
unanimate(timeoutHandlersIndex)
Stops an animation
 
Unsets the bold property in future text writes in the currently active layer
 
Sets the draw color to be transparent in the currently active layer
 
Resets the font to use in future text writes in the currently active layer
 
Unsets the italic property in future text writes in the currently active layer
 
Resets the size of the future draw lines and text in the currently active layer
 
use(id)
Switches the currently active layer, returns the layer name
 
windowButtonCreate(windowId, id, text, posx, posy, width, height, action)
Creates an existing window button
 
windowButtonEdit(id, text, posx, posy, width, height, action)
Edits an existing window button
 
Hides a window button
 
Deletes a window button
 
Shows a window button if it was hidden
 
Removes all elements in a window
 
Hides the current window
 
windowImageCreate(windowId, id, canvasId, posx, posy, width, height, onclick, onmouseover, onmouseout)
Creates a window embedded image
 
windowImageEdit(id, canvasId, posx, posy, width, height, onclick, onmouseover, onmouseout)
Edits an existing window embedded image
 
Hides a window image
 
Deletes a window image
 
Shows a window image if it was hidden
 
windowInputCreate(windowId, id, posx, posy, width, height, type)
Creates a window input box
 
windowInputEdit(id, posx, posy, width, height, type)
Edits an existing window input box
 
Returns the value in the window input box
 
Hides a window input box
 
Deletes a window input box
 
windowInputSet(id, value)
Edits an existing window input box
 
Shows a window input box if it was hidden
 
Shows the current window
 
windowTextCreate(windowId, id, text, posx, posy, width, bold, italic, size, color, family)
Creates a window static text
 
windowTextEdit(id, text, posx, posy, width, bold, italic, size, color, family)
Edits an existing window static text
 
Returns the text in the window static text
 
Hides a window static text
 
Deletes a window static text
 
Shows a window static text if it was hidden
 
Changes the active window
 
write(text)
Writes text at guide's position
 
writeAt(text, posx, posy, angle)
Writes text at a specific position
Field Detail
array
Allows to declare a variable containing several values
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
array thisIsAnArray
Since:
1.0

function
Allows to encapsulate groups of instructions
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
function test(parameter) { if (parameter=="test") write("correct!"); }
Since:
1.0

if
Allows to branch the code
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
if(isWrong) { write("Wrong answer!"); }
Since:
1.0

repeat
Allows to iterate a specific amount of times It updates a variable repeatCount which starts at 0 and increments on every iteration
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
repeat(4) { forward(100); turnLeft(90); }
Since:
1.0

var
Allows to declare a variable
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
var thisIsAVariable
Since:
1.0

while
Allows to iterate based on a condition
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
while(a < 4) { write(a); a = a+1; }
Since:
1.0
Method Detail
{Number} animate(command, seconds, count, timeoutHandlersIndex)
Starts an animation, returns an animation handler It will run a code on every specified time until the code returns false or an amount of times is specified
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
animate("stepForward()", 0.25)
Parameters:
{String} command
Code to run on every
{Number} seconds Optional, Default: 0.5
Seconds between each code run
{Number} count Optional
Maximum amount of times to run the animation
{Number} timeoutHandlersIndex Optional
Animation handler to use
Since:
2.0
Throws:
Code execution exception
Returns:
{Number} Animation handler or false if the animation stopped

animateLayers(delay)
Animate layers by displaying them one at a time
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
animateLayers(0.1)
Parameters:
{Number} delay Optional, Default: 0.5
Since:
2.1

arc(radius, degrees, follow, counterclockwise)
Draws an arc
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
arc(50, 270)
Parameters:
{Number} radius
Radius of the arc
{Number} degrees
Amount of degrees to arc
{Boolean} follow Optional, Default: false
false = arc around the guide, true = arc following the guide's position and angle and move the guide to the end of the arc
{Boolean} counterclockwise Optional, Default: false
Move clockwise or counterclockwise
Since:
1.0

beginShape()
Defines the beginning of a shape definition
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
beginShape()
Since:
1.0

changeAxis(posx, posy, xScale, yScale)
Changes the axis of the whiteboard
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
changeAxis(200, 200)
Parameters:
{Number} posx Optional, Default: 0
X position of the vertical axis, origin us upperleft corner
{Number} posy Optional, Default: 0
Y position of the horizontal axis, origin us upperleft corner
{Number} xScale Optional, Default: 1
Scale by which to multiply the x coordinates, originaly increasing from left to right
{Number} yScale Optional, Default: 1
Scale by which to multiply the y coordinates, originaly increasing downwards
Since:
2.1

clean(id)
Deletes all content in a layer
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
clean()
Parameters:
{Number} id Optional
Layer id. If missing, currently active layer
Since:
1.0

endShape()
Defines the end of a shape definition
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
endShape()
Since:
1.0

forward(pixels)
Moves the guide forward
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
forward(50)
Parameters:
{Number} pixels
Amount of pixels to move forward
Since:
1.0

{Number} getAngle(id)
Returns the layer's guide's position's angle Angle 0 is when the guide is looking horizontally right
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getAngle()
Parameters:
{Number} id Optional
Layer id
Since:
1.0
Returns:
{Number} The layer's guide's position's angle

{Number} getArccosine(angle)
Returns the arccosine of an angle
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getArccosine(90)
Parameters:
{Number} angle
Angle
Since:
1.0
Returns:
{Number} Arccosine of an angle

{Number} getArcsine(angle)
Returns the arcsine of an angle
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getArcsine(90)
Parameters:
{Number} angle
Angle
Since:
1.0
Returns:
{Number} Arcsine of an angle

{Number} getArctangent(angle)
Returns the arctangent of an angle
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getArctangent(90)
Parameters:
{Number} angle
Angle
Since:
1.0
Returns:
{Number} Arctangent of an angle

{Number} getCosine(angle)
Returns the cosine of an angle
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getCosine(90)
Parameters:
{Number} angle
Angle
Since:
1.0
Returns:
{Number}

{Number} getInputPosition()
Returns the current input position
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getInputPosition()
Since:
2.3
Returns:
{Number} The index position of the input chain

{Number} getLayerHeight()
Returns the height of the layer
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getLayerHeight()
Since:
1.0
Returns:
{Number} Height of the layer

{String} getLayerImage(id)
Returns as a value the image visible in the specified layer
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getLayerImage(2)
Parameters:
{Number} id Optional
Layer id
Since:
1.0
Returns:
{String} Image in the specified layer

{String} getLayerName(id)
Returns the layer name
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getLayerName(2)
Parameters:
{Number} id Optional
Layer id
Since:
1.0
Returns:
{String} Layer name

{Boolean} getLayerVisibility(id)
Returns if the specified layer is visible or hidden
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getLayerVisibility(2)
Parameters:
{Number} id Optional
Layer id
Since:
1.0
Returns:
{Boolean} Whether the specified layer is visible or hidden

{Number} getLayerWidth()
Returns the width of the layer
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getLayerWidth()
Since:
1.0
Returns:
{Number} Width of the layer

{String} getRandomColor()
Returns a random color
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getRandomColor()
Since:
1.0
Returns:
{String} A random color

{Number} getRandomNumber(upperbound)
Returns a positive random integer number
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getRandomNumber(100)
Parameters:
{Number} upperbound Optional
The highest number desired, excluding this number
Since:
1.0
Throws:
codeError
Returns:
{Number} A positive random integer number [0,upperbound-1]

{String} getRGB(red, green, blue)
Returns a color from RGB components
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getRGB(0,128,256)
Parameters:
{Number} red
Red component in the range [0,255]
{Number} green
Green component in the range [0,255]
{Number} blue
Blue component in the range [0,255]
Since:
1.0
Returns:
{String} Color

{Number} getSine(angle)
Returns the sine of an angle
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getSine(90)
Parameters:
{Number} angle
Angle
Since:
1.0
Returns:
{Number} Sine of an angle

{Number} getSquareRoot(number)
Returns the square root of the number
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getSquareRoot(9)
Parameters:
{Number} number
Number
Since:
1.0
Returns:
{Number} Square root of the number

{Number} getTangent(angle)
Returns the tangent of an angle
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getTangent(90)
Parameters:
{Number} angle
Angle
Since:
1.0
Returns:
{Number} Tangent of an angle

{Number} getX(id)
Returns the layer's guide's position's X coordinate
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getX()
Parameters:
{Number} id Optional
Layer id
Since:
1.0
Returns:
{Number} The layer's guide's position's X coordinate

{Number} getY(id)
Returns the layer's guide's position's Y coordinate
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
getY()
Parameters:
{Number} id Optional
Layer id
Since:
1.0
Returns:
{Number} The layer's guide's position's Y coordinate

goTo(posx, posy)
Moves the guide to a specific position
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
goTo(50, 50)
Parameters:
{Number} posx
X coordinate where the guide will be moved
{Number} posy
Y coordinate where the guide will be moved
Since:
1.0

goToCenter()
Moves the guide to the center of the whiteboard
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
goToCenter()
Since:
1.0

goToLowLeft()
Moves the guide to the lower-left of the whiteboard
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
goToLowLeft()
Since:
1.0

goToLowRight()
Moves the guide to the lower-right of the whiteboard
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
goToLowRight()
Since:
1.0

goToUpLeft()
Moves the guide to the upper-left corner of the whiteboard
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
goToUpLeft()
Since:
1.0

goToUpRight()
Moves the guide to the upper-right corner of the whiteboard
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
goToUpRight()
Since:
1.0

hide(id, hide)
Hides a layer
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
hide(2)
Parameters:
{Number} id
Layer id
{Boolean} hide Optional, Default: true
Whether to hide the layer or not
Since:
1.0

image(src, posx, posy, centered, width, height, rotation, flipX, flipY)
Puts an image in the specified position of the whiteboard
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
image(getLayerImage(3), 50, 50, true, 200, 150)
Parameters:
{String} src
image source. Can be an external http:// image or an image from getLayerImage()
{Number} posx
X coordinate where the image will be placed
{Number} posy
Y coordinate where the image will be placed
{Boolean} centered Optional
Whether or not the image should be centered in the given position
{Number} width Optional
Image width
{Number} height Optional
Image height
{Number} rotation Optional
Degrees to rotate the image
{Boolean} flipX Optional
Flip the image horizontally
{Boolean} flipY Optional
Flip the image vertically
Since:
1.0
Throws:
codeError

input(type)
Reads from the input area
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
input("line")
Parameters:
{String} type Optional, Default: "guess"
How to read the input. Possible values: "char", "word", "number", "line", "guess"
Since:
2.3
Throws:
codeError

inputReset(position)
Sets the position of the input pointer to a fixed place.
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
inputReset(10)
Parameters:
{Number} position Optional, Default: 0
Position to go to
Since:
2.3

line(destinationx, destinationy)
Draws a line from current guide position to a specified coodinate
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
line(50, 50)
Parameters:
{Number} destinationx
X coordinate where the line ends
{Number} destinationy
Y coordinate where the line ends
Since:
1.0

lineAt(originx, originy, destinationx, destinationy)
Draws a line from a coordinate to another using user coordinates
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
lineAt(200, 200, 50, 50)
Parameters:
{Number} originx
X coordinate where the line starts
{Number} originy
Y coordinate where the line starts
{Number} destinationx
X coordinate where the line ends
{Number} destinationy
Y coordinate where the line ends
Since:
1.0

output(text, newline)
Writes in the output area
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
output("Hello")
Parameters:
{String} text Optional, Default: ""
Static text that will be shown in the output section
{Boolean} newline Optional, Default: true
Whether or not there should be a carriage return
Since:
2.3

pull(levels, id)
Pulls a layer up in the layers order Upper layers overlap lower layers
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
pull(3)
Parameters:
{Number} levels Optional, Default: 1
Amount of steps to pull the layer up
{Number} id Optional
Id of the layer to affect
Since:
1.0
Throws:
codeError

push(levels, id)
Pushes a layer down in the layers order Upper layers overlap lower layers
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
push(3)
Parameters:
{Number} levels Optional, Default: 1
Amount of steps to push the layer down
{Number} id Optional
Id of the layer to affect
Since:
1.0
Throws:
codeError

setBold(bold)
Sets the bold property in future text writes in the currently active layer
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
setBold(true)
Parameters:
{Boolean} bold Optional, Default: true
Whether to use bold text
Since:
1.0

setColor(color)
Sets the color of the future draw lines and text in the currently active layer
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
setColor("#FF0000")
Parameters:
{String} color
Color to use
Since:
1.0

setFont(font)
Sets the font to use in future text writes in the currently active layer
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
setFont("Arial")
Parameters:
{String} font
Font to use
Since:
1.0

setItalic(italic)
Sets the italic property in future text writes in the currently active layer
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
setItalic(true)
Parameters:
{Boolean} italic Optional, Default: true
Whether to use italic text
Since:
1.0

setSize(size)
Sets the size of the future draw lines and text in the currently active layer
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
setSize(2)
Parameters:
{Number} size
Size in pixels
Since:
1.0

show(id, show)
Shows a layer
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
show(2)
Parameters:
{Number} id Optional
Layer id
{Boolean} show Optional, Default: true
Whether to show the layer or not
Since:
1.0

{Number} snapshot(id)
Creates a clone of the current layer in another layer, returns the layer name
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
snapshot()
Parameters:
{Number} id Optional
Layer id. If unset it creates it in a new layer
Since:
2.1
Throws:
codeError
Returns:
{Number} Layer name

stop()
Stops the execution of any future code
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
stop()
Since:
1.0

transparency(value, id)
Sets the layer transparency
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
transparency(0.5)
Parameters:
{Number} value
Transparency value in the range [0,1]
{Number} id Optional
Id of the layer to affect
Since:
2.2
Throws:
codeError

turnLeft(angle)
Turns the guide left
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
turnLeft(90)
Parameters:
{Number} angle
Angle
Since:
1.0

turnReset(angle)
Turns the guide to it's original angle The original angle is the guide looking horizontally to the right
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
turnReset(90)
Parameters:
{Number} angle Optional, Default: 0
Angle to set to
Since:
2.1

turnRight(angle)
Turns the guide right
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
turnRight(90)
Parameters:
{Number} angle
Angle
Since:
1.0

unanimate(timeoutHandlersIndex)
Stops an animation
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
unanimate(2)
Parameters:
{Number} timeoutHandlersIndex Optional
Animation handler to stop
Since:
2.0

unsetBold()
Unsets the bold property in future text writes in the currently active layer
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
unsetBold()
Since:
1.0

unsetColor()
Sets the draw color to be transparent in the currently active layer
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
unsetColor()
Since:
1.0

unsetFont()
Resets the font to use in future text writes in the currently active layer
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
unsetFont()
Since:
1.0

unsetItalic()
Unsets the italic property in future text writes in the currently active layer
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
unsetItalic()
Since:
1.0

unsetSize()
Resets the size of the future draw lines and text in the currently active layer
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
unsetSize()
Since:
1.0

{Number} use(id)
Switches the currently active layer, returns the layer name
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
use()
Parameters:
{Number} id Optional
Layer id. If unset it switches to a new layer
Since:
1.0
Returns:
{Number} Layer name

windowButtonCreate(windowId, id, text, posx, posy, width, height, action)
Creates an existing window button
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowButtonCreate(1, "b2", "turn", 170, 90, "turnRight(15)")
Parameters:
{Number} windowId
Window id
{String} id
Button id
{String} text Optional
Text to show in the button
{Number} posx Optional
X coordinate to place the button in the window
{Number} posy Optional
Y coordinate to place the button in the window
{Number} width Optional
Width of the button
{Number} height Optional
Height of the button
{String} action Optional
Code to run on button click
Since:
1.0

windowButtonEdit(id, text, posx, posy, width, height, action)
Edits an existing window button
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowButtonEdit("b2", "turn", 170, 90, "turnRight(15)")
Parameters:
{String} id
Button id
{String} text Optional
Text to show in the button
{Number} posx Optional
X coordinate to place the button in the window
{Number} posy Optional
Y coordinate to place the button in the window
{Number} width Optional
Width of the button
{Number} height Optional
Height of the button
{String} action Optional
Code to run on button click
Since:
1.0

windowButtonHide(id)
Hides a window button
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowButtonHide("b1")
Parameters:
{String} id
Button id
Since:
1.0

windowButtonRemove(id)
Deletes a window button
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowButtonRemove("b1")
Parameters:
{String} id
Button id
Since:
1.0

windowButtonShow(id)
Shows a window button if it was hidden
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowButtonShow("b1")
Parameters:
{String} id
Button id
Since:
1.0

windowClean(id)
Removes all elements in a window
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowClean(2)
Parameters:
{Number} id
Window id
Since:
2.2

windowHide(id)
Hides the current window
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowHide(id)
Parameters:
{Number} id Optional
Window id
Since:
1.0

windowImageCreate(windowId, id, canvasId, posx, posy, width, height, onclick, onmouseover, onmouseout)
Creates a window embedded image
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowImageCreate(1, "img1", "3", 100, 100, 60, 15)
Parameters:
{Number} windowId
Window id
{String} id
Image id
{String} canvasId
Layer id that will be used as image
{Number} posx Optional
X coordinate to place the image in the window
{Number} posy Optional
Y coordinate to place the image in the window
{Number} width Optional
Width to resize the image to
{Number} height Optional
height to resize the image to
{String} onclick Optional
Code to run when the image is clicked
{String} onmouseover Optional
Code to run when the mouse is over the image
{String} onmouseout Optional
Code to run when the mouse is moved away from being over the image
Since:
1.0

windowImageEdit(id, canvasId, posx, posy, width, height, onclick, onmouseover, onmouseout)
Edits an existing window embedded image
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowImageEdit("img1", "3", 100, 100, 60, 15)
Parameters:
{String} id
Image id
{String} canvasId
Layer id that will be used as image
{Number} posx Optional
X coordinate to place the image in the window
{Number} posy Optional
Y coordinate to place the image in the window
{Number} width Optional
Width to resize the image to
{Number} height Optional
height to resize the image to
{String} onclick Optional
Code to run when the image is clicked
{String} onmouseover Optional
Code to run when the mouse is over the image
{String} onmouseout Optional
Code to run when the mouse is moved away from being over the image
Since:
1.0

windowImageHide(id)
Hides a window image
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowImageHide("img1")
Parameters:
{String} id
Image id
Since:
1.0

windowImageRemove(id)
Deletes a window image
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowImageRemove("b1")
Parameters:
{String} id
Image id
Since:
1.0

windowImageShow(id)
Shows a window image if it was hidden
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowImageShow("img1")
Parameters:
{String} id
Image id
Since:
1.0

windowInputCreate(windowId, id, posx, posy, width, height, type)
Creates a window input box
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowInputCreate(1, "i1", 70, 75, 90, 15, "color")
Parameters:
{Number} windowId
Window id
{String} id
Input box id
{Number} posx Optional
X coordinate to place the input box in the window
{Number} posy Optional
Y coordinate to place the input box in the window
{Number} width Optional
Width of th input box (in pixels)
{Number} height Optional
Height of th input box (in pixels)
{String} type Optional
Type of input box (see HTML5 reference)
Since:
1.0

windowInputEdit(id, posx, posy, width, height, type)
Edits an existing window input box
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowInputEdit("i1", 70, 75, 90, 15, "color")
Parameters:
{String} id
Input box id
{Number} posx Optional
X coordinate to place the input box in the window
{Number} posy Optional
Y coordinate to place the input box in the window
{Number} width Optional
Width of th input box (in pixels)
{Number} height Optional
Height of th input box (in pixels)
{String} type Optional
Type of input box (see HTML5 reference)
Since:
1.0

{String} windowInputGet(id)
Returns the value in the window input box
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowInputGet("i1")
Parameters:
{String} id
Input box id
Since:
1.0
Returns:
{String} Value in the window input box

windowInputHide(id)
Hides a window input box
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowInputHide("i1")
Parameters:
{String} id
Input box id
Since:
1.0

windowInputRemove(id)
Deletes a window input box
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowInputRemove("b1")
Parameters:
{String} id
Input box id
Since:
1.0

windowInputSet(id, value)
Edits an existing window input box
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowInputSet("secret", "")
Parameters:
{String} id
Input box id
{String} value
Value to set in the input box
Since:
1.0

windowInputShow(id)
Shows a window input box if it was hidden
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowInputShow("i1")
Parameters:
{String} id
Input box id
Since:
1.0

windowShow(id)
Shows the current window
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowShow()
Parameters:
{Number} id Optional
Window id
Since:
1.0

windowTextCreate(windowId, id, text, posx, posy, width, bold, italic, size, color, family)
Creates a window static text
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowTextCreate(1, "t2", "Repeticions:", 10, 100, undefined, true)
Parameters:
{Number} windowId
Window id
{String} id
Static text id
{String} text Optional
Text to show
{Number} posx Optional
X coordinate to place the static text in the window
{Number} posy Optional
Y coordinate to place the static text in the window
{Number} width Optional
Maximum width of the static text (will wrap below if it doesn't fit)
{Boolean} bold Optional
Set bold shape to the static text font
{Boolean} italic Optional
Set italic shape to the static text font
{Number} size Optional
Size of the font to apply to the static text
{String} color Optional
Color to apply to the static text
{String} family Optional
Font family to apply to the static text
Since:
1.0

windowTextEdit(id, text, posx, posy, width, bold, italic, size, color, family)
Edits an existing window static text
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowTextCreate("t2", "Repeticions:", 10, 100, undefined, true)
Parameters:
{String} id
Static text id
{String} text Optional
Text to show
{Number} posx Optional
X coordinate to place the static text in the window
{Number} posy Optional
Y coordinate to place the static text in the window
{Number} width Optional
Maximum width of the static text (will wrap below if it doesn't fit)
{Boolean} bold Optional
Set bold shape to the static text font
{Boolean} italic Optional
Set italic shape to the static text font
{Number} size Optional
Size of the font to apply to the static text
{String} color Optional
Color to apply to the static text
{String} family Optional
Font family to apply to the static text
Since:
1.0

{String} windowTextGet(id)
Returns the text in the window static text
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowTextGet("t2")
Parameters:
{String} id
Static text id
Since:
1.0
Returns:
{String} Text in the window static text

windowTextHide(id)
Hides a window static text
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowTextHide("t1")
Parameters:
{String} id
Static text id
Since:
1.0

windowTextRemove(id)
Deletes a window static text
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowTextRemove("b1")
Parameters:
{String} id
Static text id
Since:
1.0

windowTextShow(id)
Shows a window static text if it was hidden
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowTextShow("t1")
Parameters:
{String} id
Static text id
Since:
1.0

windowUse(id)
Changes the active window
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
windowUse(2)
Parameters:
{Number} id Optional
Window id
Since:
1.0

write(text)
Writes text at guide's position
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
write("Hello!")
Parameters:
{String} text
Text to write
Since:
1.0

writeAt(text, posx, posy, angle)
Writes text at a specific position
Defined in: </home/ubuntu/workspace/js/instructions/implementation.js>.
writeAt("Hello!", 200, 200, 90)
Parameters:
{String} text
Text to write
{Number} posx
X coordinate to start writing
{Number} posy
Y coordinate to start writing
{Number} angle Optional, Default: 0
Angle in which to write
Since:
1.0