My app launches a web popup when it first loads, and for a while I was banging my head against the wall trying to figure out how to get the local files in the web popup to load faster.
Then I realized that, if I change the device’s orientation right as the app is loading, the web popup loads almost instantly. It’s as though the initial showWebPopup gets stuck, but the one generated by an orientation change works.
Anyone have any ideas why this might be? Here’s the code:
[code]
– loadText function –
function loadText()
– create web popup
native.cancelWebPopup()
native.showWebPopup( url, 0, display.contentWidth, display.contentHeight, url, { hasBackground = true, baseUrl = system.ResourceDirectory, urlRequest = htmlData } )
end
– orientation change –
local function orientationChange()
loadText()
end
Runtime:addEventListener( “orientation”, orientationChange )
[/code] [import]uid: 61256 topic_id: 18159 reply_id: 318159[/import]