Tween Scale?

395 views
Skip to first unread message

BlueSystem

unread,
Mar 26, 2014, 10:54:37 AM3/26/14
to haxef...@googlegroups.com
Hi all, I'm trying to scale a sprite in certain period of time using tweens. The problem is that the console says that the property is not numeric.

This is the code:
FlxTween.multiVar(this, {scale.x: 50, scale.y: 50}, 3, {type: FlxTween.ONESHOT});

Also try using a singleVar:
FlxTween.singleVar (this, "scale.x", 50, 2.0, {type: FlxTween.ONESHOT});

Any help?

Gama11

unread,
Mar 26, 2014, 12:20:40 PM3/26/14
to haxef...@googlegroups.com
The problem is that scale is a FlxPoint. So the object you're tweening is technically not "this", but "scale":

FlxTween.multiVar(scale, { x: 50, y: 50 }, 3, { type: FlxTween.ONESHOT } );

BlueSystem

unread,
Mar 26, 2014, 9:18:27 PM3/26/14
to
Thanks man, precise and short answer, it works :)
Reply all
Reply to author
Forward
0 new messages