I don't like to give away all my secrets, but of course, I wouldn't be doing this Roku stuff if TheEndless hadn't shared with me, so:
Have a function called "loading"
function loading() as object
overlay=createobject("roimagecanvas")
return overlay
end function
Then in my Video screen, after
videoscreen.show()
I put
launch=loading()
Doing it like this seems to work. In my brief testing, I was unable to get this to work any other way.
launch.show()
art=getart() (returns a background image with no url so I can set the transparency
Now the next thing I did was to call a fade in routine which I pass my screen to:
fade(launch,art)
but since we don't really want to interfere with the iterations of the video player loop, you should really do all your fades in-line with the wait loop of the video, use msg=wait(50,port)
and run your fade routine in-line. Here is an in-line fade IN routine I created:
function inlinefade(screen as object,layer as integer,art as object, resets as boolean) as object
st=5
if resets then
m.f=45
return screen
end if
ba=createobject("robytearray")
ba.push(int(m.f))
ba.push(255)
ba.push(255)
ba.push(255)
colorhex="#"+ba.tohexstring()
art.color=colorhex
screen.setlayer(layer,art)
m.f=m.f+st
art.color="#FFFFFFFF"
screen.setlayer(layer,art)
return screen
end function
where m.f is a global var to increment the transparency of the layer.
To set transparency back to zero, resets=true.
Hopefully this is helpful, and if you can make it work, please publish your resulting code, or at least a general outline of how it worked.
- Joel
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!