Page 1 of 1

replacing a file in CS3

Posted: October 25th, 2007, 4:48 pm
by yuppster
I'm trying to replace a source file with scripting in CS3. For some reason when I do this, I get the error "this module does not support input".

Code: Select all

var theimage = new File ("/Graphics/Users/matt/Desktop/story1.gif");
app.project.item(1).replace(theimage);
It worked in AE7 - I'm sure it's something stupid I'm not doing. Thanks.

Re: replacing a file in CS3

Posted: October 25th, 2007, 9:38 pm
by redefinery
yuppster wrote:I'm trying to replace a source file with scripting in CS3. For some reason when I do this, I get the error "this module does not support input".
hi yuppster,

hmm, i'm getting the same error here if i use a GIF file. if i use a JPEG file, it's fine. is there any way to use a non-GIF file in your workflow?

i'll check with some folks at work, but please also file a bug report here:
http://www.adobe.com/cfusion/mmform/ind ... product=57

thanks,
:jeff

Posted: October 26th, 2007, 4:20 pm
by yuppster
Thanks for the response. I'll report it. I can't believe it actually might have been the program's problem and not user-error!

possible replace() workaround

Posted: October 26th, 2007, 5:11 pm
by redefinery
yuppster,

it seems like FootageItem replace() and even AVItem setProxy() isn't working for GIF files.

other than using non-GIF (e.g., JPEG), the only workaround I could find was to import the GIF file, and then scan your comps for layers that use the GIF file as footage source, then use the AVLayer replaceSource() method to point to the imported GIF file. this would be a CS3-specific workaround, though.

i hope one of these (non-GIF, or use import/replaceSource) is a suitable workaround for now.

:jeff

Posted: October 26th, 2007, 5:19 pm
by yuppster
Hey Jeff, thanks for letting me know the options. Ya, importing then replacing would work for now. I'm just trying to update a script for CS3.