effect Checkbox Control Checkbox firstKeyTime thisProperty key time вр

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
m = effect("Checkbox Control")("Checkbox");
firstKeyTime = thisProperty.key(1).time; //время первого ключа
n = 0;
if (m.numKeys > 0) {
n = m.nearestKey(time).index;
if (m.key(n).time > time) n--;
}
if (n > 0) {
inMarker = m.key(n).time;
thisProperty.valueAtTime(firstKeyTime + (time - inMarker));
} else thisProperty.valueAtTime(firstKeyTime);