ofxTween on ofImage


I’ve just started learning OF with the book “programming interactivity…”. I just read the chapter about tweens and I’ve downloaded the ofxTween addon. I understand how to use it on shapes. But how would you use it on an ofImage for example?


this works
but doing the same with an ofImage

image.draw(50, tweenback.update());  

doesn’t do anything. it simply places the image at the endpoint without animation.

Any help would be much appreciated.

I did some more messing around and assigning the tween to a variable first makes the tween work.
Is this the correct way of using ofxTween?

float x = tween.update();  
image.draw(x, 50);