I have a menu that requires me to build a number of TextField objects before displaying it. Displaying the menu consists of an animated transition from the previous menu to the new one.
Here's the problem. TextField takes a second or so to build everything, which is understandable, but it appears to be building the sprites asynchronously as it pertains to the engine logic while blocking the rendering pipeline. The result being, instead of seeing the animated transitions, I simply see a pause followed by a sudden snap to the new menu with no noticeable transition.
There doesn't seem to be any way to force the engine to wait until TextField is actually done doing its thing. Any ideas?
Edit: I should add that I'm also rendering the TextField objects to RenderTargets before displaying them, but the time it takes to do that is negligible compared to rasterizing the fonts.
Comments
about the speed issue -if I understood correctly I had a similar "lag" - I would try to use some timers, to call textfields one after another. Maybe just 100 ms of delay between each call is enough.
Create TextFields.
setVisible to false.
add to stage.
whenever you need setVisible to true
start transition or animation or something else.