Getting Essential Elements to provide input for expression variables

New Here ,
Nov 19, 2021 Nov 19, 2021

Copy link to clipboard

Copied

I have an expression tied to a source text field to create a simple countdown timer. I am using the clockStart and clockStop variables to set start and stop and the countdown will hold atthe stop value. Use is as a video overlay for sports video in Premier. So, I want to turn this into an Essential Graphics template but I can't figure out how to make the two variables reside in Essential Graphics as adjustable parameters. Code is below but the more generic question is how to get an  Essential Graphics element to drive an expression value.

 

rate = -1;
clockStart = 900;
clockStop = 795.5;
 
function padZero(n){
  return (n < 10 ? "0" : "") + n;
}
 
clockTime = clockStart + rate*(time - inPoint);
 
if (clockTime <= 0){
  clockTime = 0;
}
 
if (clockTime <= clockStop){
clockTime = clockStop;
}
 
t = Math.floor(clockTime);
min = Math.floor((t%3600)/60);
sec = Math.floor(t%60);
ms = clockTime.toFixed(1).substr(-1);
padZero(min) + ":" + padZero(sec) + "." + ms
TOPICS
Expressions

Views

66

Likes

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

Participant , Nov 19, 2021 Nov 19, 2021
Hi Lorim, You can simply create 2 sliders to link it to clockStart and clockStop and drag the 2 sliders to the essential graphics template to make it adjustable in the Master properties.

Likes

Translate

Translate
Participant ,
Nov 19, 2021 Nov 19, 2021

Copy link to clipboard

Copied

Hi Lorim,

You can simply create 2 sliders to link it to clockStart and clockStop and drag the 2 sliders to the essential graphics template to make it adjustable in the Master properties.

 

Likes

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
Participant ,
Nov 19, 2021 Nov 19, 2021

Copy link to clipboard

Copied

I did an example. It's as attached. Hope this helps! 🙂

Likes

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
New Here ,
Nov 21, 2021 Nov 21, 2021

Copy link to clipboard

Copied

LATEST

Thanks! So simple. Not sure if there is an automatic way to link but copying the expression code from the effects into the code for the source text was what I did to replicate. Thanks for the example as well.

Likes

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