-
Fade in and out script
I was wondering if someone could help me with writing a simple script. I just want to have a script that I can run that change the opacity of the selected layer from 0 to 100% in 15 frames. And then have the opposite happen, 100 to 0.
I can get it to work when referencing the first layer, and when using seconds.
myComp = app.project.activeItem;
myOpacity = myComp.layer(1).property(“opacity”);myOpacity.setValueAtTime(0, 0);
myOpacity.setValueAtTime(1, 100);But is there a way to just reference the selected layer and I could do 1/2 and that will give me 15 frames on a 30fps project but not if I’m working with a 15fps project.
Also, I’m new to AE scripting and I’m unsure where to get information on it. There seems to be very limited info, I can write some AS and I understand the concept but it’s confusing when you don’t know what to call objects in AE.
Thanks!