-
time value form another comp
Hi.
I have a problem with an expression.
I want to control a Glow value with a marker key from another Comp when a checkbox from main comp is checked.
The nested comp starts from about 2 seconds.
It work’s this way, but it start counting time when the nested comp (i.e. comp(“Box”) ) start’s in the Main comp.
So when I place the marker on 2 seconds on the time line, then the Glow intensity start’s at 4 seconds.
My code for the Glow intensity(this effect is in the nested comp):
//Added the Math.round because it didn’t work otherwise.
cb = comp("Main").layer("Adjustments").effect("Box Asset Glow")("Checkbox")m = Math.round(10*comp("Main").layer("Adjustments").marker.key("Glow On").time)/10
t = Math.round(10*comp("Main").layer("Adjustments").time)/10
if (cb == 1){
if(t<=m){
0
}else{
1
}
}else{
0
}
Sorry, there were no replies found.