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: 

problem with slide show using image canvas

I have developed a screen using roImageCanvas on this i m having an image slideshow on the first half of the screen .I am able to slide the image using a while loop.But I want a screen on which on first half images should slide .On the second half there are some movie thumbnails .And on press of down button I should be able navigate to those thumbnails.But I m not able to achieve this because it is not coming out of while loop.

Please help me .................how I will be able slide images and as well as navigate to to the thumbnails.................I have seen similar screen in hulu plus...................please kindly provide me a direction to proceed.
0 Kudos
1 REPLY 1
RokuJoel
Binge Watcher

Re: problem with slide show using image canvas

First of all, I think you probably mean roScreen - roImageCanvas isn't really very good at sliding things. Second, if you want to slide things around while still allowing the user to navigate, you need to switch from using:
msg=wait(0,port) 

to something more like:
msg=port.getmessage()


That way, you can continue to update the screen while listening for roUniversalControlEvent and other event types. Pseudocode:


while true
'get message from port
'if user input then act on message, calculate new screen positions
'if download of graphics complete, update graphic image
'unload offscreen graphics
'request download of any graphics that are about to come onto the screen
'update screen positions of graphics
'update screen [i.e: screen.swapbuffers()]
end while


None of these should be written so as to block user interaction, so that means for downloading images, either use roTextureManager or use async roURLTransfer with the unique ID property so you can track which downloads to tmp:/ apply to which images on screen.

- Joel
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.