Here is a function showing a roscreen, basically the scroll demo in the SDK. Its reading the image out of tmp:/. The sleep() here is to allow a "loading.." message to show for a second after the function is called (and allow more downloading time) and is not an issue. Assuming the image is completely downloaded and sitting in tmp/ once the code after the sleep() starts executing, the screen goes black instantly, stays black for about 1.5 seconds (roku2XS) and then the roscreen draws nicely, not a fade in but a lot softer than when it cuts out.
Is there a way to keep the roscreen from showing until its rendered, eliminating the black period described above?
Thanks
function Scroll(curr_photo, infomenu, can)
sleep(1200)
time2 = CreateObject("roTimeSpan")
if IsHD()
screen=CreateObject("roScreen", true,1280, 720)
else
screen=CreateObject("roScreen", true)
endif
if true
bigbm=CreateObject("roBitmap", "tmp:/scroll"+curr_photo.GetName())
else ' generic version
bigbm=CreateObject("roBitmap", "tmp:/scroll"+curr_photo.GetName())
end if
if bigbm = invalid
print "bigbm create failed"
stop
endif
backgroundRegion=CreateObject("roRegion", bigbm, 60, 60, screen.getwidth()-120, screen.getheight()-110)
if backgroundRegion = invalid
print "create region failed"
stop
endif
backgroundRegion.SetWrap(false)
screen.clear(&hebebebFF)
screen.drawobject(60, 60, backgroundRegion)
fontReg = CreateObject("roFontRegistry")
fontReg.Register("tmp:/caps.otf")
font = fontReg.GetFont("LMRoman10-Caps", 32, false, false)
font2 = fontReg.GetFont("LMRoman10-Caps", 24, false, false)
text = "Detail - "+chr(34)+curr_photo.GetTitle()+chr(34)
text2 = "*arrow keys scroll"
w = font.GetOneLineWidth(text, 500)
h = font.GetOneLineHeight()
screen.DrawText(text, 50, 27, &h960404FF, font)
screen.DrawText(text2, 960, 35, &h960404FF, font2)
infomenu.close()
can.Close()
screen.SwapBuffers()
Kinetics Screensavers