simple animation - best practice?

Greetings.

Concerning my project, I have a background and a foreground that randomly changes every 5 seconds. I’m trying to animate the foreground from the bottom right side of the screen to the upper left side over a period of a few seconds. Right now, I have every few seconds a new background and new foreground appearing randomly…Every time a new background appears, I am trying to get the foreground to then move from (like I said above), the bottom right to the top left over a period of a few seconds. I hope all that makes sense…

Can anyone suggest a good method to use to make this happen? Thanks.

You can use a runtime event listener and change the coordinates of the foreground until you get the animation right. 

Or you can use a timer and a transition function to move the foreground.  

You can use a runtime event listener and change the coordinates of the foreground until you get the animation right. 

Or you can use a timer and a transition function to move the foreground.