idunno
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-19-2012
08:59 AM
SwapLayers Problem
Sometimes when I use swaplayers, it can cause unexpected things to happen, for example, make the video on the left of the screen disappear even though they are not on the same layer, or not swap back when I use, for example
Where a button press can change the value of chooseStreams.
Has any one else had similar problems?
if chooseStreams = 0
m.canvas.swapLayers(8, -7)
end if
if chooseStreams = 0
m.canvas.swapLayers(-7, š
end if
Where a button press can change the value of chooseStreams.
Has any one else had similar problems?
2 REPLIES 2

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-19-2012
09:48 AM
Re: SwapLayers Problem
Without knowing the content of your layers it's hard to say what's happening, but in order for video to be visible all layers on top of it have to be transparent and use the "Source" CompositionMode.
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)
destruk
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-19-2012
04:27 PM
Re: SwapLayers Problem
Rather than using swaplayers(1,2) to switch 1 and 2 between each other, running a multi-staged swap tends to work best in my experience.
ie
swaplayers(1,-1) 'note negative z-orders might not work, simply used as an example - move layer 1 to layer -1
swaplayers(2,1) ' move layer 2 to layer 1
swaplayers(-1,2) 'move -1 layer to layer 2
This way you don't overwrite one of the layers - they are retained intact, and you don't have to redraw anything.
Swap the content Meta-Data stored in zOrderA with the content Meta-Data stored in zOrderB.
Enables the developer to change which layer is displayed āOn Topā
It is possible to SwapLayers with empty (unspecified) layers.
Your performance may vary.
ie
swaplayers(1,-1) 'note negative z-orders might not work, simply used as an example - move layer 1 to layer -1
swaplayers(2,1) ' move layer 2 to layer 1
swaplayers(-1,2) 'move -1 layer to layer 2
This way you don't overwrite one of the layers - they are retained intact, and you don't have to redraw anything.
Swap the content Meta-Data stored in zOrderA with the content Meta-Data stored in zOrderB.
Enables the developer to change which layer is displayed āOn Topā
It is possible to SwapLayers with empty (unspecified) layers.
Your performance may vary.