Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

duration in composition

Community Beginner ,
Aug 27, 2015 Aug 27, 2015

Hi,

    I am new to After effect scripting. can you please tell me how to change (increase and decrease values) the composition duration through script .

duration.png

Thanks

TOPICS
Scripting
678
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Aug 27, 2015 Aug 27, 2015

After Effects scripting reference page 31

AVItem duration attribute

app.project.item(index).duration

Description

Returns the duration, in seconds, of the item. Still footage items have a duration of 0.

• In a CompItem, the value is linked to the duration of the composition, and is read/write.

• In a FootageItem, the value is linked to the duration of the mainSource object, and is read-only.

Type

Floating-point value in the range [0.0..10800.0]; read/write for a CompItem; otherwise, read-only.

var myComp

...
Translate
Enthusiast ,
Aug 27, 2015 Aug 27, 2015

After Effects scripting reference page 31

AVItem duration attribute

app.project.item(index).duration

Description

Returns the duration, in seconds, of the item. Still footage items have a duration of 0.

• In a CompItem, the value is linked to the duration of the composition, and is read/write.

• In a FootageItem, the value is linked to the duration of the mainSource object, and is read-only.

Type

Floating-point value in the range [0.0..10800.0]; read/write for a CompItem; otherwise, read-only.

var myComp = app.project.activeItem;

myComp.duration = 10; // set duration

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 27, 2015 Aug 27, 2015
LATEST

Thanks Alex,

               You have made me to go one step ahead.

Thanks for your help once again

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines