standard.selector

description

Since beta 0.3, Selector adds a .selector command to all elements as another method for adding them to a selector.

syntax

getX(ELEMENT_NAME).selector(selectorName)

What does getX() mean?

  • selectorName :

alternate(s)

  • getX(ELEMENT_NAME).selector( getSelector(selectorName) )


example(s)


@newSelector("shapes")
@,
@newImage("square", "square.png")
$    .selector("shapes")
@,
@newImage("triangle", "triangle.png")
$    .selector("shapes")
@,
@newCanvas("shapes canvas", 825, 400)
@    .add(  0, 0, getImage("square") )
@    .add(425, 0, getImage("triangle") )
@    .print()
@,
@getSelector("shapes")
@    .wait()
  • Adds two images side by side and waits for a click on either one of them.