Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 7

Canvas animation

Can I use animation in canvas?

canvas = CreateObject("roImageCanvas")
port = CreateObject("roMessagePort")
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
Level 10

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: - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
Level 7

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")

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