mask in template [*SOLVED*]

#1
I have 2 template's with a mask in.
I use the 2 template's on 2 different layers, cause I need them on the screen at the same time.
When I use the template in the highest layer the mask seems to stay on when I take the template offline again.
When I use the other template on the lowest layer, I have a black shape in front.
Seems to bee the mask from the first template.
How do I remove the mask with the template?
Last edited by tusa on 04 Mar 2017, 03:57, edited 1 time in total.

Re: mask in template

#3
Hello Jesper.

I've made the mask in the flash template.
The to layers are different video layer's (20 and 21)
Udklip.PNG
Udklip.PNG (26.22 KiB) Viewed 744 times
Udklip2.PNG
Udklip2.PNG (9.18 KiB) Viewed 743 times
brg Tue.

Re: mask in template

#4
Hmm, are you sure your template fully clears? If you are running just a STOP command, you could end up - depending on your scripting and/or timeline layout - with a freeze on the last frame.

I'm pretty sure this issue is isoloated to how that single template is constructed.

You could do some tests, sending two consecutive STOP commands or just sending a CLEAR command for the upper layer.
Jesper Stærkær
Independent Consultant at SuperFly.tv

Re: mask in template

#5
I think you are right, it must be the template, but what?

I does'nt help sending 2 stop commands, but when I send a clear command I get rit of it.

This is my AS3 script:

Code: Select all

package
{
	import flash.display.MovieClip;
	import se.svt.caspar.template.CasparTemplate;
	import caurina.transitions.Tweener;
	import flash.display.*;	
	import flash.text.*;
	import flash.text.TextField;
	import flash.text.TextFormat;
	
	public class upcoming_2017 extends CasparTemplate
	{
		private const customParameterDescription:XML = 	
		<parameters>
	   		<parameter id="f0" type="string" info="Tekst input til Navn 1" />
			<parameter id="f1" type="string" info="Tekst input til Navn 2" />
			<parameter id="f2" type="string" info="Tekst input til Navn 3" />
			<parameter id="color_line" type="string" info="Fil URL til linjens farve" />
		</parameters>;
		
		override public function postInitialize():void
		{
			bundt_line_mc.y = 1080;
			bundt_bkg_mc.y = 478;
			bundt_bkg_mc.mask = mask_mc;
			titel_mc.y = 478;
			name_mc_1.y = 523;
			name_mc_2.y = 590;
			name_mc_3.y = 657;
		}
		
		override public function Play():void
		{
			Tweener.addTween(bundt_line_mc, {y:748, time:0.28, transition:"easeOutSine"});
			Tweener.addTween(bundt_bkg_mc, {y:755, time:0.20, delay:0.28, transition:"easeOutSine"});
			Tweener.addTween(titel_mc, {y:755, time:0.20, delay:0.28, transition:"easeOutSine"});
			Tweener.addTween(name_mc_1, {y:800, time:0.20, delay:0.28, transition:"easeOutSine"});
			Tweener.addTween(name_mc_2, {y:867, time:0.20, delay:0.28, transition:"easeOutSine"});
			Tweener.addTween(name_mc_3, {y:934, time:0.20, delay:0.28, transition:"easeOutSine"});
		}

		override public function Stop():void
		{
			Tweener.addTween(bundt_line_mc, {alpha:0, time:0.48, transition:"linear"});
			Tweener.addTween(bundt_bkg_mc, {alpha:0, time:0.48, transition:"linear"});
			Tweener.addTween(titel_mc, {alpha:0, time:0.48, transition:"linear"});
			Tweener.addTween(name_mc_1, {alpha:0, time:0.48, transition:"linear"});
			Tweener.addTween(name_mc_2, {alpha:0, time:0.48, transition:"linear"});
			Tweener.addTween(name_mc_3, {alpha:0, time:0.48, transition:"linear"});
		}
		
		override public function SetData(xmlData:XML):void 
		{
			super.SetData(xmlData);
			
			for each (var element:XML in xmlData.children())
			{
				if (element.@id == "color_line")
				{
					bundt_line_mc.bundt_line.source = element.data.@value.toString();
				}
				if (element.@id == "f0")
				{
					name_mc_1.navn.text = element.data.@value;
				}
				if (element.@id == "f1")
				{
					name_mc_2.navn.text = element.data.@value;
				}
				if (element.@id == "f2")
				{
					name_mc_3.navn.text = element.data.@value;
				}
			}


		}
	}
}

Re: mask in template

#9
IMPORTANT: Since you're using Tweener to animate out content, you need to wrap your Super.Stop()/this.removeTemplate() in either a new Tweener with appropriate delay, or perhaps a callback from Tweener once the animation is done. I have never done so with Tweener, but know it is simple to do with other animation libraries.

If you just add the cleanup after the last Tweener, it will clear the tempalte before any animation is done.
Jesper Stærkær
Independent Consultant at SuperFly.tv

Re: mask in template

#11
After testing a bit more, it was actually this solution, wich solved my case...
didikunz wrote:Have you set your Windows according to this?
SysSettings.PNG
(German Windows, but all buttons etc. at the same position)

Who is online

Users browsing this forum: No registered users and 2 guests

cron