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:
Here is also the files handling the loading of the images and making the animation:

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.