Skip to main content
D. A. Edwards
Inspiring
June 11, 2020
Answered

1120 access of undefined property coverimg1 - UILoader

  • June 11, 2020
  • 1 reply
  • 791 views

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);		
		}
	}
}

 

This topic has been closed for replies.
Correct answer kglad

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

 


i don't think you're using that CasperTemplate class correctly.  but to start, does you document class extend CasperTemplate?

1 reply

kglad
Community Expert
Community Expert
June 12, 2020

try using "this" (your object) in your class instead of "coverimg1" (your object name) in your class.  (ie, this.name = "coverimg1".)

 

 

D. A. Edwards
Inspiring
June 12, 2020

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

kglad
Community Expert
Community Expert
June 17, 2020

wait a minute, what actionscript class is CasperTemplate?  it looks like it should extend the urlloader class.  does it?