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.
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.
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 ;))
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 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?