<ParallelAnimation id = "ShowMenu" > <!--** ParallelAnimation id = "testParallelAnimation" repeat = "true" **-->
<Animation id = "testPosterAnimation" duration = "1" easeFunction = "linear" >
<Vector2DFieldInterpolator key= "[0, 1]" keyValue= "[ [640, 1000], [640, 620] ]" fieldToInterp="menuBar.translation" />
<FloatFieldInterpolator key= "[0, 1]" keyValue= "[ 0.2, 1]" fieldToInterp="menuBar.opacity" />
</Animation>
<Animation id = "testPosterBckgAnimation" duration = "1" easeFunction = "linear" >
<Vector2DFieldInterpolator key= "[0, 1]" keyValue= "[ [0, 870], [0, 490] ]" fieldToInterp="testPosterBckg.translation" />
<FloatFieldInterpolator key= "[0, 1]" keyValue= "[ 0.2, 1 ]" fieldToInterp="testPosterBckg.opacity" />
</Animation>
<Animation id = "testPosterSelectAnimation" duration = "1" easeFunction = "linear" >
<Vector2DFieldInterpolator key= "[0, 1]" keyValue= "[ [230, 910], [230, 530] ]" fieldToInterp="testPosterSelect.translation" />
<FloatFieldInterpolator key= "[0, 1]" keyValue= "[ 0.2, 1 ]" fieldToInterp="testPosterSelect.opacity" />
</Animation>
</ParallelAnimation>
screenAnimationInterp.fieldToInterp = screen.id + ".opacity"
screenAnimation.control = "start"
m.mainannie = m.top.createChild("ParallelAnimation")
m.mainannie.id="ThisAnnie"
m.mainannie.repeat = false
m.nodez.clr[i]=m.mainannie.CreateChild("Animation")
m.nodez.clr[i].id="color_"+i.toStr()
m.nodez.clrcha[i]=m.nodez.clr[i].CreateChild("ColorFieldInterpolator")
m.nodez.clrcha[i].id="colorcha_"+i.toStr()
m.nodez.clrcha[i].fieldToInterp= "player_"+i.toStr()+".blendcolor"
etc.....
m.mainannie.control = "start"
"squirreltown" wrote:
I don't use XML at all. All animations can be done in Brightscript .
Init:m.mainannie = m.top.createChild("ParallelAnimation")
m.mainannie.id="ThisAnnie"
m.mainannie.repeat = false
m.nodez.clr[i]=m.mainannie.CreateChild("Animation")
m.nodez.clr[i].id="color_"+i.toStr()
m.nodez.clrcha[i]=m.nodez.clr[i].CreateChild("ColorFieldInterpolator")
m.nodez.clrcha[i].id="colorcha_"+i.toStr()
m.nodez.clrcha[i].fieldToInterp= "player_"+i.toStr()+".blendcolor"
etc.....
m.mainannie.control = "start"
function _createAnimation(objToAnimate as Object) as Object
animation = createObject("roSGNode", "Animation")
animation.id = Substitute("{0}{1}", objToAnimate.id, "Animation")
animation.delay = 1
animation.duration = 5
animation.easeFunction = "linear"
floatField = animation.createChild("FloatFieldInterpolator")
floatField.key = [0.0, 0.125, 0.250, 0.375, 0.5, 0.625, 0.750, 0.875, 1.0]
floatField.keyValue = [0.0, 0.25, 0.5, 0.75, 1.0, 0.75, 0.5, 0.25, 0.0]
floatField.fieldToInterp = "ticker.opacity"
return animation
end function