Copy link to clipboard
Copied
Hello, I read through all questions I could find regarding this issue, but none could help my with specific situation.
UILoader is on frame one, instance name double and triple checked (even changed the object name, worth a try), targeting should be fine too.
I'm sorta lost here, what am I missing?
package
{
import flash.display.MovieClip;
import se.svt.caspar.ICommunicationManager;
import se.svt.caspar.IRegisteredDataSharer;
import se.svt.caspar.template.CasparTemplate;
public class CoverIMGLoader extends CasparTemplate
{
private const customParameterDescription:XML =
<parameters>
<parameter id="coverIMG" type="string" info="File URL for cover image" />
</parameters>;
override public function SetData(xmlData:XML):void
{
for each (var element:XML in xmlData.children())
{
if (element.@id == "coverIMG")
{
coverimg1.source = element.data.@value.toString();
}
}
super.SetData(xmlData);
}
}
}
i don't think you're using that CasperTemplate class correctly. but to start, does you document class extend CasperTemplate?
Copy link to clipboard
Copied
try using "this" (your object) in your class instead of "coverimg1" (your object name) in your class. (ie, this.name = "coverimg1".)
Copy link to clipboard
Copied
Hey thank you for your response!
I'm not sure if I understood your suggestion correctly - I replaced coverimg1 in the action script with this.name = "coverimg1", which resulted in a 1119 error ( ) and I also tried it in a script for the UILoader with same outcome of the original problem.
My brain is a bit foggy today, so apologies if I'm being silly and missing obvious things with your suggestion
Copy link to clipboard
Copied
wait a minute, what actionscript class is CasperTemplate? it looks like it should extend the urlloader class. does it?
Copy link to clipboard
Copied
It extends functions of CasparCG, the playout software that's supposed to run the flash template (I forgot to mention that in the original post, sorry)
https://github.com/CasparCG/help/wiki/Guide%3A-Creating-Advanced-Flash-Templates
Copy link to clipboard
Copied
i don't think you're using that CasperTemplate class correctly. but to start, does you document class extend CasperTemplate?
Copy link to clipboard
Copied
I feel like a complete idiot now, but that solved my issue. I had it in the UILoader class, not the document class.
Thank you for the hint and sorry for wasting your time with this haha
Copy link to clipboard
Copied
you're welcome.