Timer on cpp target

92 views
Skip to first unread message

Roel Hacking

unread,
Apr 27, 2017, 10:49:12 AM4/27/17
to Haxe
I'm trying to use the Actuate tweening library for animation on the cpp target, however it seems the tweens aren't actually updating. I believe this might be because the Timer class isn't working on the cpp target, but according to the official documentation (http://api.haxe.org/haxe/Timer.html), the timer class should work on all platforms. Is the documentation simply incorrect or should the timer class really be working?

JLM

unread,
Apr 27, 2017, 11:34:58 AM4/27/17
to Haxe
Roel

Have you run the Actuate tween tests they clearly have a Cpp target test
https://github.com/openfl/actuate/blob/master/tests/test.hxml

If in doubt you could try installing it from git

haxelib git Actuate https://github.com/openfl/actuate.git

what version of Haxe are you using, what library versions are you running try these commands from terminal.
haxe
haxelib list

Often new haxe users on linux end up installing old version via package managers are you on recent version of all libraries and Haxe?

Roel Hacking

unread,
Apr 27, 2017, 12:18:21 PM4/27/17
to Haxe
I tried the tests and every test passes except UpdateTest.testClass, though as far as I can see these tests don't actually test the timer. 

I tried the git version, no change. 

I am using Kha, which comes bundled with haxe (https://github.com/Kode/haxe_bin)

Robert Konrad

unread,
Apr 27, 2017, 3:39:45 PM4/27/17
to Haxe
Hey, might very well be that I have to do something in Kha to make that Timer class work. Will have a look during the weekend.

Roel Hacking

unread,
Apr 27, 2017, 3:53:47 PM4/27/17
to Haxe
For now I've just modified actuate to use kha's Scheduler for it's timing (which is probably better anyway). 

Hugh

unread,
Apr 27, 2017, 9:35:46 PM4/27/17
to Haxe
Yeah, nme replaces the haxe.Timer class to make this work.  Should be easy enough to do this in Kha.
Theoretically, the haxe MainLoop stuff should provide a consistent Api over all frameworks, but this requires that the frameworks implement this.

Hugh

Robert Konrad

unread,
Jun 1, 2017, 8:19:50 AM6/1/17
to Haxe
Fixed it (also just replaced Timer for now).
Reply all
Reply to author
Forward
0 new messages