@speechles Unfortunately this does not answer the question I am asking. The top component is already a Poster (<component … extends=“Poster”…>).
In Brightscript I can simply access the “opacity” of the component by writing “m.top.opacity” and I want to access this very field in the animation. Not create another poster inside a Poster component.
The solution you propose also has the issue that if you write the attribute uri is applied to the main component, not the one you define inside (and that is true for every single attribute…). This is why I am extending from Poster…
The question is to access the opacity field of the main component (or any other field for that matter) via the fieldToInterp attribute in the animation.
@speechles Thank you for your answers. I understand what you are trying to achieve and I agree with you that what you propose will work.
But it is still not answering the question I am asking. The field of the top level component is accessible in Brightscript via “m.top.opacity”.
My question is: how do I access it from the Animation / fieldToInterp attribute.
And maybe at the end of the day, the answer is that it is not possible. But this is the question I am asking. If it is not possible, then yes there are workarounds (like what you suggest, or implementing the interpolation via a timer which is what I did…), but I am interested to know if it is possible at all and if yes, how.
Actually, no, that doesn’t work. You can set the id of the component to be animated in brightscript to have it match the interpolator’s fieldToInterp value, but it only works if the component is a child. The animation code must do a search of the top level component’s children, but ignores the top level component itself.
Your best bet is to make the top level component a Group and replicate all the Poster fields you need.