//moveAmt is defined by the length of another composition // Starpos is defined by a slider control in a "control-comp" if (dropMenu == 1) { if (m.numKeys > 0) { n = m.nearestKey(time).index; if (time < m.key(n).time) n--; accum = 0; y = 0; if (n > 0){ if ( n > 1){ for (i = 1; i < n; i++){ if (m.key(i).comment == "Move") accum += moveAmt } } if (m.key(n).comment == "Move"){ t = time - m.key(n).time; y = linear(t,0,m.key(n).duration,0,moveAmt); } val = value + y + accum + StarPos ; } } val }