Hey Dan, I’m currently having a problem and I can’t get this expression to work. My syntax is:
var path = "~/Desktop/fireball.png";
var io = new ImportOptions(File(path));
if (io.canImportAs(ImportAsType.FOOTAGE)){
io.importAs = ImportAsType.FOOTAGE;
io.sequence = false;
io.forceAlphabetical = true;
var sequence = app.project.importFile(io);
sequence.name = "importA";
}
var myComp = null; // assume the worst
for (var i = 1; i <= app.project.numItems; i++){
if ((app.project.item(i).name == "importA")){
myComp = app.project.item(i);
break;
}
}
if (myComp != null){
app.project.activeItem.layers.add(myComp);
}
no matter where I put the expression to disable the layer, it doesn’t seem to do it’s job. Any ideas? Thanks.