# Animation

<div align="left"><img src="https://963067965-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MIJW5nbmYRaSNWePAac%2F-MIxu2KP4MClY9gv_q2W%2F-MIxukRTI1Or_n_cluw-%2FProperty-Animation.png?alt=media&#x26;token=bb2fc2d1-8f92-4614-9a55-5abef64b32ab" alt=""></div>

| Property   | Function                                                                                                                                                                                                | Type                                                                                                                                                                                                                                                           |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Fill mode  | <p>Image fill mode<br><br><strong>Actions editor:</strong><br><code>Property > Animation > Fill mode</code><br><strong>Code:</strong><br><code>widget.content.fillMode</code></p>                       | <p><code>enum</code><br><br><strong>Values:</strong><br><code>Stretch</code><br><code>PreserveAspectFit</code><br><code>PreserveAspectCrop</code><br><code>Tile</code><br><code>TileVertically</code><br><code>TileHorizontally</code><br><code>Pad</code></p> |
| Frame rate | <p>Playback speed in frames per second<br><br><strong>Actions editor:</strong><br><code>Property > Animation > Frame rate</code><br><strong>Code:</strong><br><code>widget.content.frameRate</code></p> | `double`                                                                                                                                                                                                                                                       |
| Autoplay   | <p>Start playback automatically<br><br><strong>Actions editor:</strong><br><code>Property > Animation > Autoplay</code><br><strong>Code:</strong><br><code>widget.content.autoplay</code></p>           | `bool`                                                                                                                                                                                                                                                         |
| Loop       | <p>Looping the playback<br><br><strong>Actions editor:</strong><br><code>Property > Animation > Loop</code><br><strong>Code:</strong><br><code>widget.content.loop</code></p>                           | `bool`                                                                                                                                                                                                                                                         |
| Inverted   | <p>Reverse playback<br><br><strong>Actions editor:</strong><br><code>Property > Animation > Inverted</code><br><strong>Code:</strong><br><code>widget.content.inverted</code></p>                       | `bool`                                                                                                                                                                                                                                                         |
| Images     | <p>List of the images<br><br><strong>Actions editor:</strong><br><code>Property > Animation > Images</code><br><strong>Code:</strong><br><code>widget.content.imagesList</code></p>                     | `string`                                                                                                                                                                                                                                                       |

## Actions

| Property       | Function                                                                                                                                                                                       |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Play           | <p><strong>Actions editor:</strong><br><code>Actions > Common > Play</code><br><strong>Code:</strong><br><code>widget.content.script.actionPlay()</code></p>                                   |
| Stop           | <p><strong>Actions editor:</strong><br><code>Actions > Common > Stop</code><br><strong>Code:</strong><br><code>widget.content.script.actionStop()</code></p>                                   |
| Frame up       | <p>Show next frame<br><br><strong>Actions editor:</strong><br><code>Actions > Common > Frame up</code><br><strong>Code:</strong><br><code>widget.content.script.actionFrameUp()</code></p>     |
| Frame down     | <p>Show prev frame<br><br><strong>Actions editor:</strong><br><code>Actions > Common > Frame down</code><br><strong>Code:</strong><br><code>widget.content.script.actionFrameDown()</code></p> |
| Set frame rate | <p><strong>Actions editor:</strong><br><code>Actions > Common > Set frame rate</code><br><strong>Code:</strong><br><code>widget.content.script.actionSetFrameRate(int fps)</code></p>          |

## Events

| Property   | Function                                                                                                                                                                                          |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Play       | <p>Event when playing started<br><br><strong>Actions editor:</strong><br><code>Event > Play</code><br><strong>Code:</strong><br><code>widget.content.script.eventPlay()</code></p>                |
| Stop       | <p>Event when playing stopped<br><br><strong>Actions editor:</strong><br><code>Event > Stop</code><br><strong>Code:</strong><br><code>widget.content.script.eventStop()</code></p>                |
| Frame up   | <p>Event when next frame is shown<br><br><strong>Actions editor:</strong><br><code>Event > Frame up</code><br><strong>Code:</strong><br><code>widget.content.script.eventFrameUp()</code></p>     |
| Frame down | <p>Event when prev frame is shown<br><br><strong>Actions editor:</strong><br><code>Event > Frame down</code><br><strong>Code:</strong><br><code>widget.content.script.eventFrameDown()</code></p> |
