Images load at different times to the screen

Hello everybody!

I’m new to Heaps and Haxe in general and I don’t know if this is something that’s pretty obvious and I have missed it somehow, but here goes! :grinning:

I’m trying to make a fairly simple 2D test scene consisting of two animated pictures. I have a aseprite exported spritesheet and it’s json data file. I’m loading the image using the hxd.Res.imagename -method and then chopping it up in to slices or frames (using the h2d.Tile.sub -method) according to the aseprite json data.

Now my problem is that when you load the scene, it first loads the smaller image (even tho I’m instantiating the load of the bigger image first) and then the bigger image.

Here is a video of the thing happening: https://www.dropbox.com/s/6nmwlmb0rpiwka9/itsaproblem.mp4?dl=0
Here is also the files handling the loading of the images and making the animation: https://gist.github.com/muchitto/18fa0acf157441a0fa42090cd1ec1f30

Sorry in advance if this is something obvious and I just didn’t read the manual correctly or something. :grinning:

Not sure if that’s related, but avoid using haxe.Timer, instead override the sync method that will allow you to update your internal time everytime before we render the view.