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: 
dreamer2057
Channel Surfer

Canvas animation

Can I use animation in canvas?


canvas = CreateObject("roImageCanvas")
port = CreateObject("roMessagePort")
canvas.SetMessagePort(port)
canvas.SetRequireAllImagesToDraw(false)
canvas.SetLayer(0, [ {url:"pkg:/images/tv_grid_bg.png", TargetRect:{x:0,y:0,w:1280,h:720}},{url:"pkg:/images/channels_bg.png", TargetRect:{x:0,y:105,w:314,h:594}}])


I what to move png's and change it's opacity.
Sincerely, Sergey Shoshin, software developer.
0 Kudos
2 REPLIES 2
TheEndless
Channel Surfer

Re: Canvas animation

Technically you can, but the framerate for the image canvas is abysmal, so you're better off using roScreen for animation.
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
dreamer2057
Channel Surfer

Re: Canvas animation

Thanks! If I rigth undestood, that i can made animated application only with:

1) Few Scenes (or screens?) (pages, such as VOD, EPG, Settings, etc).
2) Components with animation (reusable elements)

And when all will be done, how i can navigate between scenes (screens?)?

We have show method:

scene = screen.CreateScene("GuideScene")
screen.show()


but how can i hide one scene (EPG for example) and open another (Main menu for example) ?
Sincerely, Sergey Shoshin, software developer.
0 Kudos