Finding Start Time of Footage
I'm trying to get the starting timecode of footage via scripting. The only way I can think of doing this is using the "New Comp from Selection" app.executeCommand to create a comp. Then I can use displayStartTime function on the new comp. Is there a smarter way to do this? I'd rather not use the app.executeCommand but I can't think of anything else. If there isn't a better way, could someone tell me why the script below isn't working? It does the first loop but after that the remaining loops don't execute fully. Thanks for the help!
--
var selectedFootage = app.project.selection;
var footageComps = new Array();
var startTimes = new Array();
for (var i=0; i<selectedFootage.length; i++)
{
// Deselect All
app.executeCommand(2004);
// Select Footage Item
selectedFootage.selected = true;
// New Comp From Selection
app.executeCommand(2796);
// Deselect Footage Item
selectedFootage.selected = false;
// Set footageComps Varible
footageComps = app.project.activeItem;
// Get Start Time
startTimes = footageComps.displayStartTime;
alert(startTimes);
}