It is currently 28 Mar 2017, 10:58



mask in template [*SOLVED*]

Videos, graphics, Flash templates – how to create and play them using CasparCG

Moderators: Macey, Jonas Hummelstrand, didikunz

mask in template [*SOLVED*]

Postby tusa » 26 Feb 2017, 11:43

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.
tusa
 
Posts: 49
Joined: 14 Nov 2014, 15:15

Re: mask in template

Postby Jesper Stærkær » 26 Feb 2017, 11:51

Did you make the maskin in a Flash template, or are you masking with the MIXER KEYER command/doing so in the CasparCG Client?

The two layers, are they flash layers or mixer layers?
Jesper Stærkær
Independent Consultant at SuperFly.tv
User avatar
Jesper Stærkær
 
Posts: 835
Joined: 13 Apr 2010, 18:06
Location: Trondheim, Norway

Re: mask in template

Postby tusa » 26 Feb 2017, 12:16

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 366 times

Udklip2.PNG
Udklip2.PNG (9.18 KiB) Viewed 365 times


brg Tue.
tusa
 
Posts: 49
Joined: 14 Nov 2014, 15:15

Re: mask in template

Postby Jesper Stærkær » 26 Feb 2017, 14:19

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
User avatar
Jesper Stærkær
 
Posts: 835
Joined: 13 Apr 2010, 18:06
Location: Trondheim, Norway

Re: mask in template

Postby tusa » 27 Feb 2017, 00:51

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


      }
   }
}
tusa
 
Posts: 49
Joined: 14 Nov 2014, 15:15

Re: mask in template

Postby didikunz » 27 Feb 2017, 12:09

Have you set your Windows according to this?

SysSettings.PNG
SysSettings.PNG (591.82 KiB) Viewed 305 times

(German Windows, but all buttons etc. at the same position)
Didi Kunz
CasparCG Client-Programmer, Template Maker & Live CG-Operator
Media Support, CH-5722 Gränichen, Switzerland http://mediasupport.ch/
Problems? Guide to posting Bug reports & Feature requests
User avatar
didikunz
 
Posts: 3401
Joined: 10 May 2010, 09:08
Location: Aarau, Switzerland

Re: mask in template

Postby tusa » 27 Feb 2017, 15:04

Yes, I've also tried that, does'nt seem like that problem.
When I clear the channal, there's no problem, it seems to be the template?

It seems like the mask is still there, or something?
tusa
 
Posts: 49
Joined: 14 Nov 2014, 15:15

Re: mask in template

Postby Jesper Stærkær » 27 Feb 2017, 18:36

Try to add

this.removeTemplate();

last in your Stop()-function, alternatively add

Super.Stop();

last in your Stop()-function, which effectively will do the same thing for you.
Jesper Stærkær
Independent Consultant at SuperFly.tv
User avatar
Jesper Stærkær
 
Posts: 835
Joined: 13 Apr 2010, 18:06
Location: Trondheim, Norway

Re: mask in template

Postby Jesper Stærkær » 27 Feb 2017, 18:39

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
User avatar
Jesper Stærkær
 
Posts: 835
Joined: 13 Apr 2010, 18:06
Location: Trondheim, Norway

Re: mask in template

Postby didikunz » 27 Feb 2017, 19:47

Can you share the .fla and .as files?
Didi Kunz
CasparCG Client-Programmer, Template Maker & Live CG-Operator
Media Support, CH-5722 Gränichen, Switzerland http://mediasupport.ch/
Problems? Guide to posting Bug reports & Feature requests
User avatar
didikunz
 
Posts: 3401
Joined: 10 May 2010, 09:08
Location: Aarau, Switzerland

Re: mask in template

Postby tusa » 04 Mar 2017, 03:56

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)
tusa
 
Posts: 49
Joined: 14 Nov 2014, 15:15


Return to Content

Who is online

Users browsing this forum: No registered users and 4 guests