Hello everybody, I would like to create a short loading screen to hide the map while it’s loading.
You can see the map loading on this video, just after the 1-3 screen, and it’s really ugly.
https://www.youtube.com/watch?v=hepPxdS1YPA
That’s why I would like to put a black rectangle to hide the entire screen.
What I did :
loadingBackground = display.newRect(0, 0, display.contentWidth, display.contentHeight) loadingBackground.x = display.contentWidth/2 loadingBackground.y = display.contentHeight/2 loadingBackground:setFillColor(0, 0, 0) mte.loadMap(mappath.."level"..levelNum..".tmx") -- load our map loadingBackground:toFront() mte.setCamera({cullingMargin = {96,16,96,16}}) loadingBackground:toFront() mte.constrainCamera({}) -- limit the camera movement to map's bounds loadingBackground:toFront() mte.zoom(3,1) loadingBackground.isVisible = false
But the rectangle doesn’t even show, like it never existed.
Any ideas ? Thank you in advance.