# Animation of an object with a timer from right to left

**URL:** <https://forum.inductiveautomation.com/t/animation-of-an-object-with-a-timer-from-right-to-left/16175>\
**Category:** General Discussion\
**Created:** [November 30, 2017, 3:00pm UTC](https://forum.inductiveautomation.com/t/animation-of-an-object-with-a-timer-from-right-to-left/16175 "2017-11-30T15:00:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![juliorosales](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@juliorosales](https://forum.inductiveautomation.com/u/juliorosales)\
**Post date:** [November 30, 2017, 3:00pm UTC](https://forum.inductiveautomation.com/t/animation-of-an-object-with-a-timer-from-right-to-left/16175/1 "2017-11-30T15:00:29Z")

</div>

Does anybody have an idea of how to animate an object using a timer from right to left on my screen?

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [November 30, 2017, 3:23pm UTC](https://forum.inductiveautomation.com/t/animation-of-an-object-with-a-timer-from-right-to-left/16175/2 "2017-11-30T15:23:32Z")

</div>

Use system.gui.transform

---

<div class="post-metadata">

**Author:** ![juliorosales](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@juliorosales](https://forum.inductiveautomation.com/u/juliorosales)\
**Post date:** [December 1, 2017, 5:47pm UTC](https://forum.inductiveautomation.com/t/animation-of-an-object-with-a-timer-from-right-to-left/16175/3 "2017-12-01T17:47:58Z")

</div>

[quote=“jpark, post:2, topic:16175”]  
system.gui.transform

how do I need to do that?

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [December 1, 2017, 6:42pm UTC](https://forum.inductiveautomation.com/t/animation-of-an-object-with-a-timer-from-right-to-left/16175/4 "2017-12-01T18:42:07Z")

</div>

Look at the example here.

[https://docs.inductiveautomation.com:8443/display/DOC79/system.gui.transform](https://docs.inductiveautomation.com:8443/display/DOC79/system.gui.transform)

---

<div class="post-metadata">

**Author:** ![Paul.Scott](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.scott/32/4578_2.png) [@Paul.Scott](https://forum.inductiveautomation.com/u/Paul.Scott)\
**Post date:** [December 1, 2017, 11:03pm UTC](https://forum.inductiveautomation.com/t/animation-of-an-object-with-a-timer-from-right-to-left/16175/5 "2017-12-01T23:03:58Z")

</div>

I’m assuming you’re using a Timer component (since the Left to Right part of animation is easy enough to do), as well as a component with an X property. In that case you simply need to do a little math.

Place an Expression Binding on the X property that converts left-to-right movement to right-to-left:  
`maxPossibleXPosition - currentTimerValue`

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/7f685320d66ef6e704cef5c536e5cad8dec0b744.PNG)

Regardless if my assumptions are correct or not, jpark’s suggestion of system.gui.transform will also work.

---

<div class="post-metadata">

**Author:** ![juliorosales](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@juliorosales](https://forum.inductiveautomation.com/u/juliorosales)\
**Post date:** [December 4, 2017, 12:30pm UTC](https://forum.inductiveautomation.com/t/animation-of-an-object-with-a-timer-from-right-to-left/16175/6 "2017-12-04T12:30:34Z")

</div>

Thanks, guys that worked!

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [December 4, 2017, 7:52pm UTC](https://forum.inductiveautomation.com/t/animation-of-an-object-with-a-timer-from-right-to-left/16175/7 "2017-12-04T19:52:37Z")

</div>

So this means system.gui.moveComponent() is deprecated?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 4, 2017, 9:37pm UTC](https://forum.inductiveautomation.com/t/animation-of-an-object-with-a-timer-from-right-to-left/16175/8 "2017-12-04T21:37:51Z")

</div>

That’s correct - although we almost always maintain backwards compatibility; so the function isn’t going to stop working, it just won’t be visible in the manual or intellihints.
