I have a main comp that has pre-comps that start staggered in time. The pre-comps have elements that i would like to be animated using sound keys, but the sound keys output is in the main comp. When i link the items in the pre-comp to the sound keys output, it always goes to frame 1 instead of where it is shifted in time in the main comp. is there a way to tell it to sync relative to it's time in the main comp?
(kind of like the sync time of all related items pref I guess)
thanks,
Lloyd
Sync between pre-comp and main comp
- lloydalvarez
- Enhancement master
- Posts: 460
- Joined: June 17th, 2004, 9:27 am
- Location: New York City, NY
- Contact:
You'll have to use the startTime property and find how much it's offset by in the main comp. Then use valueAtTime and subtract or add your difference in the precomp.
something like this (this is not syntax accurate)
I hope that didn't confuse you too much. If you are still stuck let me know.
something like this (this is not syntax accurate)
Code: Select all
offset = mainComp.preCompLayer.startTime - compStartTime;
soundKeylayer.value.valueAtTime(time - offset)
I hope that didn't confuse you too much. If you are still stuck let me know.
- lloydalvarez
- Enhancement master
- Posts: 460
- Joined: June 17th, 2004, 9:27 am
- Location: New York City, NY
- Contact:
that works.. thanks!