Is it possible to override global enterframe, so it will depend on time passed (like Actuate.tween does)?
Sure : you will still need to listen for an enter_frame event somewhere, compute time passed since previous frame and use that
Take a look at Starling.nextFrame() for example : https://github.com/openfl/starling/blob/master/src/starling/core/Starling.hx#L457
You can organize your code in whatever way suits you, I like how Starling does it with Juggler class so I would probably copy it to something similar that fits my needs
I’ll use Starling in next project. Currently I’m playing animations from swf, and would like to know is it possible to play timeline time dependant, so in case of low fps animation duration will be constat
<window fps="60" /> or above is considered full-speed and
ENTER_FRAME will fire along with
requestAnimationFrame but lower we will still remain v-synced but will drop frames to try and match the requested value.
The default behavior for SWF timeline animations in OpenFL is to use the original FPS of the SWF and not to match the stage frame rate since the rate of the stage may be so much higher, otherwise you can use
-Dswf-parent-fps to disable this behavior
You don’t have to use Starling at all for this, I just link to it as an example of how to do it. It’s always the same logic : inside a function called by enter_frame event, look at how much time passed since previous frame and update everything that needs update with that “time elapsed” value.
Technically, playing movieclips time-based should be doable but I have no idea where to start and I guess it could involve a lot of changes, do you absolutely need swfs / movieclips ?
So how to get smooth display objects 2d transitions? I use assets from swf also.
fps="0" vsync="true" and
-Dswf-parent-fps to override swf frame rate?
-Dswf-parent-fps I think