Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lamberms
Visitor

Having Trouble With A Simple ScreenSaver

Hi. I seem to be having trouble with what looks like an incredibly simple screensaver. Here is the code:


' Main() is useful for testing screensaver. It should be commented
' out before this is checked in.

'Sub Main()
' ShowScreenSaver()
'End Sub

' The screensaver entry point.
Sub RunScreenSaver()
ShowScreenSaver()
End Sub

Sub ShowScreenSaver()
' Works With Images
facade = CreateObject("roParagraphScreen")
facade.Show()
m.canvas = CreateObject("roImageCanvas")
canvas_size = m.canvas.GetCanvasRect()
m.canvas.Show()
while(true)
date = CreateObject("roDateTime")
m.canvas.SetLayer(1,{ url: "http://somesite.com/WeeklyFinal.png?&nocache=" + date.AsSeconds().ToStr()
CompositionMode: "Source"
TargetRect: {x:0,y:0,w:canvas_size.w,h:canvas_size.h}})
' Sleep For 30 Seconds
sleep(30000)
end while
m.canvas.Close()
End Sub


When I run the ShowScreenSaver from the Main subroutine it shows the WeeklyFinal.png image and updates it every 30 seconds. However, when I comment out the Main routine and run ShowScreenSaver from the RunScreenSaver subroutine all I get is a blank screen when I preview the screensaver.

Does anyone have any ideas. I'm sure I'm just being an imbecile.
0 Kudos
2 REPLIES 2
TheEndless
Channel Surfer

Re: Having Trouble With A Simple ScreenSaver

Telnet to port 8087 on the box and that will give you the debug console for the screensaver thread. You shouldn't be creating a facade within a screensaver, so that may be the issue, but the debug output should give you an idea of what's going on either way.
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)
0 Kudos
lamberms
Visitor

Re: Having Trouble With A Simple ScreenSaver

You are awesome! It must have been the facade call. Thanks so very much.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.