Thanks for replying, everything is much clearer now!
My next game will sure be thinked differently, but for Healer's Quest it's not possible to have all the object at start of layout. I have only one "game" layout and all backgrounds and enemies in the game are created on it. I'll see if it's still possible to do otherwise but it seems like a lot of work considering the "lag" time for what needs to be created is less than one second.
I just have a last point on which I'd like to have more detailed explanations: what do you mean by "Otherwise you will probably have to preload both before and after the layout starts."?
It's possible to preload something before the start of the layout? On the previous layout actually? I thought from your post that this was useless because it would get erased from memory, so I'm probably missing something here.
Thanks for your help !
What I meant is that you can combine a Layout transition and layout initialization preloaders.
So it works as folows:
1. On the previous layout you start a Layout transition preloader (this willl load anything that is on the target layout at start).
2. Once it completes, then you move to the target layout.
3. On this layout you start the layout initialization preloader immediately (the preloader layer is visible by default). This one preloads elements that you want to spawn at the beginning.
So one preloader starts at the end of previous layout and second on the start of current. From user perspective it looks like one preloader and it covers preloading of both initial layout objects and objects that you plan to spawn at start.
And just to make the % of loading smooth and combined, the first preloading you display as 0-50% and second as 50-100%.
Just in case if it is still confusing I made a simple capx to show how to use combined preloading (this is the solution that will work for you): MM_Preloader example (layout transition + init layout preloading)
Hope that helps! Again if you have further question, do not hesitate to ask