scene.setField("extra", m.top.extra)
scene.extra = m.top.extra
screen = CreateObject("roSGScreen")
scene = screen.CreateScene(m.top.scene)
<interface>
<field id="scene" type="string" />
<field id="extra" type="string" />
</interface>
<component name="languagesScene" extends="Scene" >
...
function startFeed()
languageItem = m.languages[m.assetList.itemFocused]
print "PLAY: " + languageItem[1]
m.sceneTask = CreateObject("roSGNode", "launchSceneTask")
print "SCENE TASK CREATED"
m.sceneTask.setField("scene", "playVideoScene")
m.sceneTask.setField("extra", languageItem[1])
m.sceneTask.control = "RUN"
end function
...
</component>
<component name="launchSceneTask" extends="Task" >
...
sub init()
m.top.functionName = "showSGScene"
end sub
sub showSGScene()
print "in showSGScene"
screen = CreateObject("roSGScreen")
m.port = CreateObject("roMessagePort")
screen.setMessagePort(m.port)
scene = screen.CreateScene(m.top.scene)
if (m.top.extra <> "") then
print "Packing '" + m.top.extra + "' into 'extra'"
'FAILS:
scene.setField("extra", m.top.extra)
'SUCCEEDS:
'scene.extra = m.top.extra
end if
screen.show()
while(true)
msg = wait(0, m.port)
msgType = type(msg)
if msgType = "roSGScreenEvent" then
if msg.isScreenClosed() then
m.top.open = false
exit while
endif
endif
end while
screen.Close()
end sub
...
</component>
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. You will not be able to log in or post new comments or kudos during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 12 and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
Thanks for your patience — we’re excited to share what’s next!