Tweening scrollRect

Hi,
is it possible to tween scrollRect? Or do I need to tween a variable and use it in an onUpdate callback to create a new scrollRect at each frame?

I thought I could do something like this

Actuate.tween(gfx.scrollRect, 10, {x: 300});

but I was wrong…

you don’t need to create a new scrollRect at each frame but you do need to call the setter each frame for the effects to show

Actuate.tween(gfx.scrollRect, 10, {x: 300})
    .onUpdate(function (){ gfx.scrollRect = gfx.scrollRect; });
1 Like

Really? Wha… why exactly? Is it like reminding gfx about it?

It’s a getter/setter, it behaves this way in Flash also

Ok, I have never used the AS3 one, just the GSAP implementation.