panzhuli
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2011
11:16 AM
multiple canvases? newbie question
hi all. i'm trying to ad an ad on my channel. I'm running into a problem when there's another object on the canvas. We're putting up a channel information overlay when the user switches to a different channel. At the same time, I'm using this opportunity to test putting an ad up on the screen. This isn't appearing, tho... I tried using the same canvas object, different layer, to no avail. so then I thought I'd create a separate canvas to handle the ad. Is this supported? In general, the image isn't showing up either way.
Here's the code that puts up the channel info bar:
Ideas? Thanks
Here's the code that puts up the channel info bar:
m.canvas.AllowUpdates(false)
m.updateInfo()
m.canvas.Show()
m.canvas.AllowUpdates(true)
m.channelBarActive = true
where updateInfo() is:
m.canvas.SetLayer(3, [m.meta.backgroundImage]) //we store an object with a reference to an image here....
Ideas? Thanks
3 REPLIES 3
destruk
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2011
12:42 PM
Re: multiple canvases? newbie question
Perhaps you have the layers backwards - layer 1 would be drawn in back of layers 2 and 3. Layer 0 is the bottom most layer possible. The component reference guide says you can use negative values, however, those will be drawn as invisible.

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2011
12:57 PM
Re: multiple canvases? newbie question
What's your "m.meta.backgroundImage" code, and why are you passing it in an array? I would suspect something about that setup as being the culprit.
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)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
kbenson
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2011
01:04 PM
Re: multiple canvases? newbie question
"TheEndless" wrote:
What's your "m.meta.backgroundImage" code, and why are you passing it in an array? I would suspect something about that setup as being the culprit.
Indeed. If that isn't a data structure appropriate for passing into a setLayer() call (i.e. if it's just a filename...) that will cause a problem.
As to your question about multiple canvas objects, they work in theory and somewhat in practice, with major drawbacks. One of the drawbacks with multiple canvas objects (underlying canvas object is just left as existing back buffer image) will probably interact badly when used as an overlay for video, since the video is overwriting the back buffer...
-- GandK Labs
Check out Reversi! in the channel store!
Check out Reversi! in the channel store!