Forum Discussion
speechles
6 years agoRoku Guru
<component name="PosterWithFadeIn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" extends="Poster" xsi:noNamespaceSchemaLocation="http://rokudev.roku.com/rokudev/schema/RokuSceneGraph.xsd"> <children>
<Poster id="myPoster" loadheight="250" loadwidth="400" width="400" height="250" uri="" opacity="0.0" />
<Animation id = "fadeIn" duration = "1" easeFunction = "linear" > <FloatFieldInterpolator key = "[ 0.0, 1.0 ]" keyValue = "[ 0.0, 1.0 ]" fieldToInterp = "myPoster.opacity" /> </Animation> </children> </component>
...
the in brs:
m.poster = m.top.findnode("MyPoster")
m.animation = m.top.findnode("fadeIn")
m.poster.uri = < uri >
then during times when you want the animation and the poster to show use this:
m.animation.control = "stop"
m.animation.control = "start"
stop it always before you start it. you can only start a stopped task.