Tweening alpha with Actuate has no visual effect

149 views
Skip to first unread message

goshki

unread,
Jan 17, 2014, 3:34:43 AM1/17/14
to haxef...@googlegroups.com
After upgrading to latest dev HaxeFlixel and Haxe 3/OpenFL, tweening alpha of a FlxSprite using Actuate has no visual effect. I can see the alpha value tweening in the Watch window but visually nothing happens.

Gama11

unread,
Jan 17, 2014, 3:49:44 AM1/17/14
to haxef...@googlegroups.com
On Friday, January 17, 2014 9:34:43 AM UTC+1, goshki wrote:
> After upgrading to latest dev HaxeFlixel and Haxe 3/OpenFL, tweening alpha of a FlxSprite using Actuate has no visual effect. I can see the alpha value tweening in the Watch window but visually nothing happens.

Have you tried with FlxTween? Could you provide a code sample? What Actuate version?

goshki

unread,
Jan 17, 2014, 5:58:00 AM1/17/14
to
W dniu piątek, 17 stycznia 2014 09:49:44 UTC+1 użytkownik Gama11 napisał:

Have you tried with FlxTween? Could you provide a code sample? What Actuate version?


Latest Actuate version from haxelib (1.7.2). With FlxTween it works allright but I prefer Actuate for the delay option, until this option is available in HaxeFlixel (I've seen it added yesterday).

The code goes like this:

package test;

import flixel.FlxState;
import motion.Actuate;
import motion.easing.Sine;

class TestState extends FlxState {
   
override public function create():Void {
       
var sprite:FlxSprite = new FlxSprite( 0, 0 );
        sprite
.makeGraphic( 100, 100, 0xFF0000 );
        sprite
.alpha = 0;
        add
( sprite );
       
Actuate.tween( sprite, 2, { alpha: 1 } ).ease( Sine.easeOut ).delay( 2 );
   
}
}



Gama11

unread,
Jan 17, 2014, 8:11:37 AM1/17/14
to haxef...@googlegroups.com
Funny that you mention that feature, just added it yesterday because someone asked about it. It was trivial to add, but you have to know it's requested in the first place. If you have any more ideas about how to improve FlxTween (or any other part of the engine really), we would love to hear about it. :)

So you've been using Haxe 2.10 until recently? There has been a bug in Actuate for tweening properties (alpha is one, as opposed to a regular var) for months (see this, this and this issue). Joshua is obviously a busy man though, and I think it makes sense for him to focus on OpenFL instead. But I suggest you switch to using FlxTween instead.


On Friday, January 17, 2014 11:56:32 AM UTC+1, goshki wrote:
W dniu piątek, 17 stycznia 2014 09:49:44 UTC+1 użytkownik Gama11 napisał:

Have you tried with FlxTween? Could you provide a code sample? What Actuate version?

goshki

unread,
Jan 17, 2014, 12:02:41 PM1/17/14
to haxef...@googlegroups.com
W dniu piątek, 17 stycznia 2014 14:11:37 UTC+1 użytkownik Gama11 napisał:
Funny that you mention that feature, just added it yesterday because someone asked about it. It was trivial to add, but you have to know it's requested in the first place. If you have any more ideas about how to improve FlxTween (or any other part of the engine really), we would love to hear about it. :)

So you've been using Haxe 2.10 until recently? There has been a bug in Actuate for tweening properties (alpha is one, as opposed to a regular var) for months (see this, this and this issue). Joshua is obviously a busy man though, and I think it makes sense for him to focus on OpenFL instead. But I suggest you switch to using FlxTween instead


Yes, I've updated just recently. :-) For me it was convenient to use Actuate but now that FlxTween also has the "delay" option, there are no other features that would hold me back from switching to FlxTween. Thanks!
Reply all
Reply to author
Forward
0 new messages