
squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2013
05:33 PM
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
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
Kinetics Screensavers
6 REPLIES 6

squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2013
08:12 PM
Re: roScreen
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
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


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2013
08:44 PM
Re: roScreen
You might try waiting to create the roScreen until you're ready to display it. Do things like building bitmaps and fonts first.

squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2013
07:26 AM
Re: roScreen
OK thanks Chris, I'll try moving stuff around.
Kinetics Screensavers

squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2013
08:25 AM
Re: roScreen
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.
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()
Kinetics Screensavers

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2013
08:47 AM
Re: roScreen
"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.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)

squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2013
09:12 AM
Re: roScreen
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.
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.
Kinetics Screensavers