Script works on text fields on main timeline but not when they're inside movie clips

#1
Hi, guys.

The following script works fine:

package
{
import flash.display.MovieClip;
import se.svt.caspar.ICommunicationManager;
import se.svt.caspar.IRegisteredDataSharer;
import se.svt.caspar.template.CasparTemplate;
import flash.text.TextFieldAutoSize;

public class playerinfo extends CasparTemplate
{
override public function SetData(xmlData:XML):void
{
super.SetData(xmlData);
for each (var element:XML in xmlData.children())
{
if (element. @ id == "imeprezime")
{
imeprezime.textColor=777777;
imeprezime.x=270;
imeprezime.scaleX=200/imeprezime.textWidth;
}
}
}
}

}

But when I place text field imeprezime inside of the movieclip named playerinfomc and as the reference in the script I use playerinfomc.imeprezime instead of imeprezime, Caspar doesn't show anything on the screen upon playing that template.