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>

Syntax

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

Parameters

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

Remarks

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.

Examples

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 = [
if(values.toggle)
{
shape.redsquare.hposition = 75%;
}
else
{
shape.redsquare.hposition = 50%;
}
values.toggle = !values.toggle;
]
</shape>

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