---
name: "BIS_fnc_animatePicture"
type: function
status: ok
groups: ["Systems"]
arma3_since: "1.78"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_animatePicture
revid: 336173
updated: 2022-12-13T16:43:33Z
---

# BIS_fnc_animatePicture

*Function · Systems · Arma 3 v1.78*

## Description

Translates (relative or absolute), scales (relative or absolute), and sets the alpha over time on the provided control.

## Syntax

```sqf
[control, durationOrSpeed, [translationPosition, isRelativeTranslation, useDuration], [scalePosition, isRelativeScale, scalePivot], alpha] call BIS_fnc_animatePicture
```

**Parameters:**

- `control`: [Control](../topics/Control.md) - the control to be moved
- `durationOrSpeed`: [Number](../topics/Number.md) - (Optional, default 2) transition duration *or* movement speed, depending on *useDuration*
- `translationPosition`: [Array](../topics/Array.md) format [Position2D](../topics/Position.md#position2d) - (Optional, default [0,0])
- `isRelativeTranslation` - [Boolean](../topics/Boolean.md) - (Optional, default [true](../commands/true.md)) is *translationPosition* relative to the original *control*'s position
- `useDuration`: [Boolean](../topics/Boolean.md) - (Optional, default [true](../commands/true.md)) if set to [false](../commands/false.md), *durationOrSpeed* will be used as *control* speed (and effect duration will be recalculated from it)
- `scalePosition`: [Number](../topics/Number.md) or [Array](../topics/Array.md) of [Number](../topics/Number.md)s - (Optional, default 1) define X and Y scale value
- `isRelativeScale`: [Boolean](../topics/Boolean.md) - (Optional, default [true](../commands/true.md)) is *scalePosition* relative to the original *control*'s scale
- `scalePivot`: [String](../topics/String.md) - (Optional, default "center") case-**in**sensitive. Possible values:

  - "topLeft"
  - "topCenter"
  - "topRight"
  - "centerLeft"
  - "center" - fallback value
  - "centerRight"
  - "bottomLeft"
  - "bottomCenter"
  - "bottomRight"
- `alpha`: [Number](../topics/Number.md) - (Optional, default 0) *control*'s final opacity

**Returns:** [Number](../topics/Number.md) - animation's duration

## Examples

### Example 1

```sqf
private _t =
[
    _controlFront,
    1,
    [[0.5, 0.5], true, false],
    [],
    0.5
] 
call BIS_fnc_animatePicture;
```

<sub>Source: [BI Community Wiki — BIS fnc animatePicture](https://community.bistudio.com/wiki/BIS_fnc_animatePicture) (revision 336173).</sub>
