Actuate.timer not starting in HTML5

Hi,
I have a simple Actuate.timer(2).onComplete(xxx); delayed call to a function:

  • targeting Flash the delay works correctly and the function is called after 2 seconds
  • targeting HTML5 the onComplete event is never triggered

May it be a problem with event listeners in HTML5? If so, it is a very serious problem, I have found 3 errors of this kind in a few hours, and I don’t know how to bypass the problem.

Have you tried using the haxe.Timer class with the delay() method instead of Actuate ?

(It seems tyou can’t stop an Actuate.timer() - or I didn’t find how to :))

Yes! Using Timer it works, but… what’s the problem with Actuate?

I’m not sure what’s going on, Actuate has been working for me here in HTML5, including Timer and onComplete events

Are you using the latest Haxe, Lime, OpenFL and Actuate?

I think I reinstalled everything about 2-max3 weeks ago

Thanks for sending me your source,

This is now resolved in OpenFL. The issue is that the Event.ENTER_FRAME was dispatching in a slightly different order, between Flash and other targets. In your project, you added event.stopPropagation () in your listener, which was canceling the ENTER_FRAME from reaching Actuate.

Thanks again :slight_smile:

Thanks to you! :smiley:
How do I update the libs?

hang tight, release incoming

Updated: now Actuate works but ENTER_FRAME is ignored in HTML5 (even if I removed the unnecessary event.stopPropagation, I don’t have to stop ENTER_FRAME propagation ;))

Try haxelib upgrade again, there was a little regression I patched last night

Ah! 3.0.6!
Upgrading…

I also just updated Actuate with a fix for your sample, one of the values you passed was null (because it was not an initialized variable), so now the initialization in SimpleActuator should replace null with 0 when targeting JS or Neko

Thank you!
But… was it my error or was it an error of Neko and JS?
I think the biggest problem here is that AS3 and Haxe have different requirements for initializations: AS3 sets int to 0 and Numbers to null by default (an incongruence for me), while Haxe sets both to null.

It’s platform specific

It was your error, in a sense, but I’d rather Actuate “do the right thing” and not push too many things off to the user unless there’s a good reason. We all know what you meant, so why not have it work that way? :wink:

Exactly, I think the obvious default values for int/Int and Number/Float should be 0, but it is just my point of view.
Call this fix “the GiG one” :laughing:

Verified, now it works like a charm! Thank you!