I would like to create an animation node purely in BrightScript, no XML involved. I have created the following function:
function SymetricScaleAnimation(target as object) as object
print "In SymetricScaleAnimation"
animation = CreateObject("roSGNode", "Animation")
animation.duration = .15
animation.repeat = true
animation.easeFunction="linear"
animatin.id = "animateScaleBS"
interp = CreateObject("roSGNode", "Vector2DFieldInterpolator")
interp.key = [0.0, 1.0]
interp.keyValue = [[1,1], [3,3]]
interp.fieldToInterp = target.id + ".scale"
animation.AppendChild(interp)
return animation
end function
This mirrors an animation node I have created in XML. As far as I can tell, all fields are identical on my programmatically-created animation node and my XML-created node. However, the animation node I created in code doesn't run, while the one I created in XML does. Is created animation nodes in BrightScript not supported? If so, why not? What prevents this from working?