roScreen

I have a slideshow. From there you call a message dialog that shows info, pauses the slideshow & starts downloading the scrolling image if needed. From the message dialog, you call a roScreen with a large scrolling version of the current slide. However, as soon as the roScreen is called it throws up a black screen until its ready to show the scrolling image.
So, How to get rid of the black screen -
A way to keep it from showing at all until its loaded the way an image canvas does? Can the black be made transparent?
At least a screen facade type thing that works in this situation? ( not my first choice)

Am not real familiar with roScreen so looking for help here.
thanks

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()

You might try waiting to create the roScreen until you’re ready to display it. Do things like building bitmaps and fonts first.

OK thanks Chris, I’ll try moving stuff around.

Ok i did as Chris suggested and moved all the pre-screen stuff ahead of creating the roScreen, and its a big improvement. Now it just sort of dips to black before showing the roScreen. So i ask my question again, how do I render that roScreen without showing it yet, so it can just pop up? Surely someone with Roku in their name knows the answer to this.
Thanks.

function Scroll(curr_photo, infomenu, can)

	sleep(1200)
	time2 = CreateObject("roTimeSpan")
	bigbm=CreateObject("roBitmap", "tmp:/scroll"+curr_photo.GetName())
	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"
	if IsHD()
        screen=CreateObject("roScreen", true,1280, 720)  
    else
        screen=CreateObject("roScreen", true)
    endif
	backgroundRegion=CreateObject("roRegion", bigbm, 60, 60, screen.getwidth()-120, screen.getheight()-110)
	backgroundRegion.SetWrap(false)
  	screen.clear(&hebebebFF)
	screen.drawobject(60, 60, backgroundRegion)
   	screen.DrawText(text, 50, 27, &h960404FF, font)
	screen.DrawText(text2, 960, 35, &h960404FF, font2)
   	infomenu.close()
	can.Close()
  	screen.SwapBuffers()

“squirreltown” wrote:
So i ask my question again, how do I render that roScreen without showing it yet, so it can just pop up?
You can’t. As soon as you create the roScreen, it displays whatever is in the back buffer, so the only thing you can do it swap the buffers immediately and hope the single black frame isn’t too jarring. It’s a “known issue” but I don’t recall if there’s ever been any indication from Roku whether it’ll be fixed at any point.

Thanks for the reply Endless.
Thats a shame, but then there are a ton of visual things that could be cleaned up in this Roku/Brightscript system and I’m sure you’ve run into a lot more of them then I have.