• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

1120 access of undefined property coverimg1 - UILoader

Community Beginner ,
Jun 11, 2020 Jun 11, 2020

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

 aaaa.png

aaaaa.png

a.pnga2.png

TOPICS
ActionScript , Code , Error

Views

472

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 17, 2020 Jun 17, 2020

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

Votes

Translate

Translate
Community Expert ,
Jun 12, 2020 Jun 12, 2020

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".)

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 12, 2020 Jun 12, 2020

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 ( xMBCjdvRDl.png ) 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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 17, 2020 Jun 17, 2020

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 17, 2020 Jun 17, 2020

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

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 17, 2020 Jun 17, 2020

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 18, 2020 Jun 18, 2020

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 18, 2020 Jun 18, 2020

Copy link to clipboard

Copied

LATEST

you're welcome.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines