Something wrong with this Tween

34 views
Skip to first unread message

Andy Ma

unread,
Mar 8, 2015, 11:57:40 PM3/8/15
to haxef...@googlegroups.com
FlxRandom.floatRanged(1, 2), { startDelay: FlxRandom.float(), onComplete: function(Timer:FlxTimer) {
   
if (autoHide) hideLetter(letter);
   
}, ease: FlxEase.quadOut });

This says that the
onComplete: function(Timer:FlxTimer) {
    if (autoHide) hideLetter(letter);
   }, ease: FlxEase.quadOut


has an error:
source/CinematicText.hx:58: lines 58-61 : { startDelay : Float, onComplete : Timer : flixel.util.FlxTimer -> Void, ease : t : Float -> Float } has extra field onComplete


Whats wrong with the onComplete?

Sam Bellman

unread,
Mar 9, 2015, 4:47:14 AM3/9/15
to haxef...@googlegroups.com
The onComplete function needs to have FlxTween as it's parameter, not FlxTimer.

Gama11

unread,
Mar 12, 2015, 9:02:37 AM3/12/15
to haxef...@googlegroups.com
Sam is correct. Also, you might as well ignore the argument entirely if you're not using it:

function(_) {
   
// onComplete code
}
Reply all
Reply to author
Forward
0 new messages