Does anyone have a script example using FootageItem replace() method to replace a footage file with another file? As a newbie scripter, I have tried many approaches and keep getting "app.project.item() is undefined" in line 6 when calling the method. The item index is valid and correct
The extendkit javascript console shows the variables project and filepath correctly, however app.project.item(70) shows Result: [object CompItem] ... I expected a footage item, or a file object ?!?
The method shown in the JavaScript reference shows: app.project.item(index).replace(f i l e )
Here's the "simple" test script I'm trying to get to work.
// test replace function
{
app.beginUndoGroup("Test Replace Footage File");
project=("/C/AE cs5 working/Styles/Basic 1.aep")
var filepath=new File ("/C/_Vidigram3D/Nasa/SpaceProbes/GPN-2000-000482.jpg");
app.project.item(70).replace(filepath);
app.endUndoGroup();
}
OK... thanks for the help in advance
