Page 1 of 1

[SOLVED] Browser white flash before initialize

Posted: Sun Jul 15, 2012 8:52 pm
by JosepM
Hi,

I have a strange white "flash" before the browser control load the url. Any idea how avoid it? I try setting the background color but still the same effect.

Any idea?

This is my code:

Code: Select all

 iphoneControlCreate "browser"
   put the result into mScrollerId
   iphoneControlSet mScrollerId, "visible", "true"
   iphoneControlSet mScrollerId, "canBounce", "true"
   iphoneControlSet mScrollerId, "autoFit", true  
   iphoneControlSet mScrollerId, "delayRequests", "true"
   iphoneControlSet mScrollerId, "rect", (the left of image "pagina" , the top of image "pagina", the right of image "pagina" , the bottom of image "pagina" )
   put "file://" & specialFolderPath("engine")&"default.html"  into  localURL
   replace " " with "%20" in localURL
   iphoneControlSet mScrollerId, "url", localURL 
Salut,
Josep M

Re: Browser white flash before initialize

Posted: Sun Jul 15, 2012 9:07 pm
by Dixie
Joseph...

When you are building your browser, say in the preOpenCard handler, set its visible to false..

Code: Select all

iphoneControlSet browserID, "visible", "false"
Then set the visible to true after the URL has finished loading...

Code: Select all

on browserFinishedLoading url
   iphoneControlSet browserID, "visible", "true"
end browserFinishedLoading
be well

Dixie

Re: Browser white flash before initialize

Posted: Sun Jul 15, 2012 9:25 pm
by JosepM
Hi Dixie,

Thanks! works like a champ! :)

Salut,
Josep M