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.

Technically you can, but the framerate for the image canvas is abysmal, so you’re better off using roScreen for 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) ?