So although I have never used the director class, I’m aware of it as an option. But in my case I chose not to have any screen changes occur because I need the main screen to retain the information the user inputed. What I’m trying to do instead is have a backdrop lay across the surface of my main screen and give the impressions of a new screen. Doing it this way, I’ve noticed two problems.
First of all, it takes almost 3 seconds for my backdrop to appear on the screen. I do have a lot of lines of coding but I placed the event listener and the function literally on top of one another on the very last few lines of my project. When I noticed the 3 second delay, I moved the function event to the top of my coding but the 3 second time gap still remained and so I moved the function back to the bottom of my coding. The strange thing is that immediately above this function is another event listener and function but it doesn’t have any noticeable delay.
Secondly, once the backdrop successfully appears over the main screen, all of the native.newTextFields present in the main screen are not covered by the backdrop.
Any ideas on how to fix these problems? Or is there an easier way altogether that you know of?
Here is my last lines of code referring to the function and eventlistener:
[lua]local function infoButtonFunction (e)
if (e.phase == “began”) then
local infoBackdrop = display.newImageRect (“infoBackdrop.png”, display.contentWidth*2, display.contentHeight*2)
end
end
infoButton:addEventListener (“touch”, infoButtonFunction)[/lua]