up Inquisit Language Reference

onanimate attribute

The onanimate attribute allows custom stimulus animations to be programmed.

Member of

<button> <clock> <html> <picture> <port> <shape> <sound> <text> <video> <xid>


/ onanimate = [expression; expression; expression; ...]


expression One or more expressions, delimited by semi-colons. See help with expression syntax for more information.


This parameter executes the enclosed custom expressions prior to presenting a stimulus animation frame. The script can change properties on a given stimulus such as size, position, or color according to custom logic in order to implement complex animations. The animation parameter must be set to "dynamic" in order for this code to executed.


The following shape includes a custom animation that alternates between to screen positions:

<shape example>
/ shape = rectangle
/ color = red
/ size = (50%, 50%)
/ position = (50%, 50%)
/ animation = dynamic(500, -1)
/ onanimate = [
shape.redsquare.hposition = 75%;
shape.redsquare.hposition = 50%;
values.toggle = !values.toggle;

Send comments on this topic:
Copyright Millisecond Software, LLC. All rights reserved.