Does Actuate call setters at all? I’ve tried having a getter and setter as mentioned here but the setter still isn’t being called.
It might work only with getter/setter properties or standard properties, have you tried making it a get
and set
property, and see if that works?
That’s what the article suggested so I tried that but it still doesn’t call the setter.
Hmm, perhaps try different targets, and see if this is Flash or Neko or C++ specific
also, if the setter is inline, or the object is abstract, I don’t think it will work dynamically (which Actuate uses ATM)
The setter is not inline and the class is not abstract. I’ve just realised if I add an onUpdate function it is not being called either. If using Actuate outside of OpenFL (still using Lime) do I need to call an update function to progress the tweens?
Same behaviour on Neko and C++. Can’t test flash as my app is using OpenGL.
Are any tweens working?
I thought I added Lime support to Actuate, though
On closer inspection no tweens are working. I’m using the latest actuate on haxelib 3.1.3. Should I be manually calling an update function?
It’s working here, I created a new Lime template project and am using this code (after adding <haxelib name="actuate" />
)
package;
import lime.app.Application;
import motion.Actuate;
class Main extends Application {
private var y:Float;
public function new () {
super ();
y = 0;
Actuate.tween (this, 4, { y: 2 } ).onUpdate (function () trace (y)).onComplete (function () trace ("complete"));
}
}
I found the problem. In SimpleActuator the tween duration was being set in milliseconds while in update it is comparing to seconds. I changed it so the duration is set in seconds and it seems to work now
Is this a bug in Actuate, or something in how it was used?
I’ve sent a pull request for Actuate to save things getting lost in translation.